From 2a8c025bfefd394a3a972d02e089ea1cc89a92c4 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2026 17:40:58 +0000 Subject: [PATCH] chore(release): 0.8.3 --- .github/workflows/publish.yaml | 2 +- pyproject.toml | 2 +- upstreamer-changelog.md | 11 +++++++++++ uv.lock | 4 ++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index f63cf31..37025e1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -111,7 +111,7 @@ jobs: # Downstream-only patch releases: versions upstream never published, # each mapped to the upstream release its tree is ported from. case "$VERSION" in - 0.8.1 | 0.8.2) BASE_VERSION="0.8.0" ;; + 0.8.1 | 0.8.2 | 0.8.3) BASE_VERSION="0.8.0" ;; *) BASE_VERSION="$VERSION" ;; esac TAG="@openrouter/agent@${BASE_VERSION}" diff --git a/pyproject.toml b/pyproject.toml index 18cf68a..14a042d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ name = "openrouter-agent-sdk" # says plainly which upstream version it is a port of. The verifier enforces the # match against upstream's package.json during a sync. See the Package Version # section of .upstreamer/upstreamer.md. -version = "0.8.2" +version = "0.8.3" description = "Python port of @openrouter/agent: OpenRouter tool orchestration, streaming, state, and format compatibility." readme = "README.md" requires-python = ">=3.10" diff --git a/upstreamer-changelog.md b/upstreamer-changelog.md index 6ba3704..da07f6e 100644 --- a/upstreamer-changelog.md +++ b/upstreamer-changelog.md @@ -1,5 +1,16 @@ # openrouter-agent-sdk Changelog +## 0.8.3 — tool execution, schema, and lifecycle-hook hardening + +Downstream-only fixes on top of the 0.8.0 port; no new upstream work. + +- **Security:** gate tool execution on `completed` response status and clear specific forced `tool_choice` after the first turn (`#46`). +- **Security:** enforce `PreToolUse` (and `PermissionRequest`/`PostToolUse`/`PostToolUseFailure`) on schema-parsed tool arguments with mutation re-validation, and run `UserPromptSubmit` on typed SDK messages and structured content arrays (`#47`). +- **Security:** fail closed when a blocking hook chain (`PreToolUse`, `UserPromptSubmit`) is cancelled or timed out (`#43`). +- **Security:** enforce JSON Schema dict validation for tool `input_schema`/`output_schema` and forward validated HITL tool outputs (`#45`), and validate tool context against its schema before storing it (`#44`). +- **Security:** refuse tool batches and approval resumes containing duplicate call IDs (`#38`), and refuse responses whose streamed tool calls differ from the completed response (`#39`). +- **Security:** pass schema-parsed input to `to_model_output` and `next_turn_params`, send the JSON value returned by `to_model_output` (including for unsent results), run `next_turn_params` only after successful tool execution, run `on_response_received` when resumed history holds typed SDK models, and keep only the final generator yield when `event_schema` is a dict (`#36`, `#37`, `#40`, `#41`, `#42`). + ## 0.8.2 — stop-condition approval fix Downstream-only fix on top of the 0.8.0 port; no new upstream work. diff --git a/uv.lock b/uv.lock index 30f4e11..3373006 100644 --- a/uv.lock +++ b/uv.lock @@ -164,7 +164,7 @@ name = "exceptiongroup" version = "1.3.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } wheels = [ @@ -420,7 +420,7 @@ wheels = [ [[package]] name = "openrouter-agent-sdk" -version = "0.8.2" +version = "0.8.3" source = { editable = "." } dependencies = [ { name = "jsonschema" },