Skip to content

v0.2.0a14 — the TypeScript path works

Pre-release
Pre-release

Choose a tag to compare

@yfxiao16 yfxiao16 released this 04 Sep 04:10
· 2 commits to main since this release
9738c6d

Every change here is on the TypeScript side, and @sponsio/sdk moves with it to 0.2.0-alpha.5.

pip install --pre sponsio
npm install -D @sponsio/sdk@alpha

The install line pointed at a different release

npm install @sponsio/sdk resolves to 0.1.0. The alpha lives under npm's alpha tag, and 0.1.0 is different software: @sponsio/sdk/mcp does not exist in it. Every install line now names the tag, and a test checks the ones in every shipped markdown file.

QUICKSTART also taught Sponsio({ config }), which throws Class constructor Sponsio cannot be invoked without 'new' on every published version.

A mistyped command exited 0

sponsio valdate fell through to the scanner, printed {"tools":[]} and exited 0. The onboarding prompt tells coding agents to run these commands, so an agent that typos one reads the zero exit and moves on. It now exits 2 and says what it did not recognise. sponsio --help lists the commands, which it never did.

npm test had also never run three of its test files: the glob missed dist/cli/__tests__/. 20 tests became 59 across this release.

A redirect came back as a block

Same rulebook, two runtimes, opposite answers:

redirect_to_safe(rm_rf, trash)
Python:  blocked=False  redirected=True  redirected_to=trash  stop_original=True
TS:      blocked=true   (no redirected, no redirectedTo, no stopOriginal)

TS was fail-closed, so nothing unsafe ran, but the substitution was gone: no adapter could learn which tool to call instead, which is the point of the pattern. A compiled contract now carries its strategy, and a verdict carries a per-violation action that blocked / escalated / redirected / stopOriginal derive from, as Python's does.

stopOriginal is the field an adapter gates on, not blocked: a redirect leaves blocked false because the flow continues down the safe path.

The evidence lane, from TypeScript

Rules check what an agent does; evidence checks what it says. @sponsio/sdk/cloud/evidence sends a claim to the same /v1/evidence/verify Python uses. Both were run against production on the same four claims and their output is byte-identical.

The last two patterns landed with it, so pattern parity is now 48 to 48, nothing on either side alone.

Writing it found a bug in the Python client that TS had inherited: {"items": [40, 60]} was read as value=40, source="60", and the server then refused source "60" under the taint rule, an error naming nothing the caller had written. Fixed in both.

Also

QUICKSTART had the mode precedence backwards. The real order is SPONSIO_MODE > ctor arg > yaml, and the asymmetry is deliberate: whoever runs the deployment has to flip enforcement without waiting for a release. Backwards in that direction tells a team with SPONSIO_MODE=enforce in the container that their mode="observe" is shadowing.

A DeepSeek Harness plugin ships in the workspace, not yet on npm.

2826 passed, 19 skipped. TS 59 passed.