feat: Scope SDK identity and scratch paths per request

Closed
CY
13d ago
+201-0

The SDK exposes current_invocation_identity() and invocation_scratch_dir() for request-scoped plugin identity and scratch paths. This lets a long-lived plugin process serve concurrent invocations while keeping their files and attribution separate.

A bound invocation context is authoritative, including fields it leaves absent. Without a context, identity falls back to the process environment and the scratch root is unchanged. With a context, the helper returns a sanitized job/node/invocation path.

Validation: 211 SDK tests and Ruff, covering concurrent calls, safe paths, batch correlation and streaming context retention.

Package metadata and changelog specify stable 0.1.1. After merge, publish a GitHub release tagged 0.1.1 from the merged commit; .github/workflows/release.yml builds and publishes the package to PyPI.