diff --git a/CHANGELOG.md b/CHANGELOG.md index fbf01d59..65640aea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ Historical SDK change notes are recorded here. For current published versions an changes after the entries below, see the [public release history](https://github.com/stringsofthemind-oss/once/releases). Website-only changes do not alter SDK execution semantics. +## 0.1.26 - Unreleased candidate + +- Update the development MCP TypeScript SDK dependency to patched 1.32.1 for GHSA-6qxp-vccf-f47h. The development dependency is not shipped as an SDK runtime dependency. +- Clarify diagnostic evidence wording and current onboarding guidance; diagnosis and scanner findings do not establish protection or independent adoption. +- Include the already advertised `http-response-json` CommonJS entrypoint in the package and verify both module formats across the packed boundary. +- No execution kernel, public export, ledger schema, identity/effect binding or reconciliation behavior change. See [candidate release notes](docs/RELEASE_0_1_26.md). + ## 0.1.25 - 2026-10-04 - Add `once prove`: account-free local HTTP refund fixture with separate provider journal, acknowledgement loss, fresh processes, replay, CONFLICT and authoritative recovery. It never invokes arbitrary application code. diff --git a/docs/RELEASE_0_1_26.md b/docs/RELEASE_0_1_26.md new file mode 100644 index 00000000..f9f5cc22 --- /dev/null +++ b/docs/RELEASE_0_1_26.md @@ -0,0 +1,15 @@ +# SDK 0.1.26 candidate — development dependency and evidence wording + +This is an unpublished release candidate. It incorporates the reviewed adoption-guidance changes from PR308 and pins the development MCP TypeScript SDK dependency to 1.32.1, outside the affected range for [GHSA-6qxp-vccf-f47h](https://github.com/advisories/GHSA-6qxp-vccf-f47h). + +Diagnostic output distinguishes configured, discoverable and tested behavior. Read-only candidates and successful local fixtures do not establish real-provider qualification, independent adoption or production readiness. + +The candidate also repairs an existing packaging defect: the advertised CommonJS `@once-agent/sdk/http-response-json` export lacked its compiled file. The existing helper is now included in the CommonJS build, with packed ESM/CommonJS import regression coverage; its implementation and public signature are unchanged. + +No execution kernel, public export, identity/fingerprint algorithm, durable ledger schema, provider authority or redispatch rule changes. UNKNOWN remains blocked until authoritative reconciliation; changed effects conflict and confirmed results replay. Local SQLite still requires Node24.15+ and a retained same-machine authority. No ledger migration is required. + +The patched MCP dependency is development-only; shipped SDK runtime dependencies remain unchanged. Compatibility is checked with serial release regressions, packed ESM/CommonJS/TypeScript consumers, and package content/API comparison. Windows results must be complemented by Linux validation of the exact candidate head before publication. + +Publication must use the exact tested tarball and verify registry integrity and clean installed consumers afterward. `docs/published-versions.json` and public installation pins remain at 0.1.25 until 0.1.26 is independently verified in the registry. MCP and Python versions remain separate. + +Rollback: applications can pin the previous published `@once-agent/sdk@0.1.25` while retaining the original operation identities and durable state. This patch does not change ledger formats or require destructive recovery. If publication verification fails, do not update current-version pins or fabricate release completion. diff --git a/docs/adoption-measurement.md b/docs/adoption-measurement.md new file mode 100644 index 00000000..9e316a5c --- /dev/null +++ b/docs/adoption-measurement.md @@ -0,0 +1,48 @@ +# Measuring adoption without overstating evidence + +Installation, download counts, scanner candidates, route-proof receipts and +controlled fixtures measure different things. None establishes independent +customer usage or production-provider safety. + +## Opt-in onboarding records + +Keep records locally by default. A participant may voluntarily share a redacted +record; no SDK telemetry endpoint or customer identifier is required. Freeze the +package versions, runtime, instructions and fixture before starting each cohort. + +Record one row per attempted path, including failures: + +| Field | Meaning | +| --- | --- | +| run_id | Random study-local identifier; no user/account identifier | +| evidence_tier | controlled-fixture, provider-sandbox, or voluntary-independent-reproduction | +| versions/runtime/platform | Exact installed packages and execution environment | +| path | TypeScript, Python, MCP, Claude Code, Codex, Agents SDK or ADK | +| start/installation/first-protected/recovery timestamps | Measure each phase separately; leave unobserved phases null | +| outcome | success, install-failure, adapter-required, unsupported, recovery-blocked or abandoned | +| interventions | Number of manual corrections or maintainer interventions | +| effect_counts | Separately observed initial, replay, changed-input and recovery effects | +| receipt | Redacted link to journal/test evidence, with its authority and limitations | + +Never share secrets, payloads, account IDs, raw operation IDs or filesystem paths. +Publishing aggregate results is opt-in; report the sample size and all failures. +Calculate fresh-install success as successful attempts / all attempted installs, +and report adapter-required and unsupported outcomes separately. Time to first +protected action starts at the participant's first view of the frozen instructions, +not at CLI launch. Separate installation time, execution time and human integration +time. Recovery success requires independently observed provider truth and effect +counts, not only a returned success object. + +## Existing local CLI metrics + +`once` prints heuristic candidate/applicability counts and a current route-proof +receipt. Its elapsed time is CLI processing time. These diagnostics send no +telemetry; their labels do not establish a complete application/provider proof or +human onboarding duration. Do not combine these rates with actual installations, +independent reproductions, repeat usage or customer totals. + +The FIRST 10 proof is a reproducible controlled loopback fixture. Keep its +provider journal and negative control alongside results. Its runtime can track +fixture regressions, but does not measure real-world user adoption. Hosted Python +execution, live model selection and installed Claude/Codex routing need separate +account/configuration and observed checks. diff --git a/examples/connected-openai-agents/README.md b/examples/connected-openai-agents/README.md index 94ec6f2b..d4f1cb67 100644 --- a/examples/connected-openai-agents/README.md +++ b/examples/connected-openai-agents/README.md @@ -1,20 +1,21 @@ # OpenAI Agents calls Once automatically at the tool boundary > [!NOTE] -> ## Published baseline and next-release candidate +> ## Historical published baseline > -> This directory is intentionally pinned to the **currently published** +> This directory is intentionally pinned to the **historically published** > `@once-agent/sdk@0.1.11` package so it remains a reproducible baseline. > -> Repository `main` now also contains the higher-level automatic Connect stack, -> including whole-toolset routing, automatic identity/effect binding, and direct -> OpenAI Agents FunctionTool wrapping. That release candidate has passed the -> source, packed-package, ESM/CommonJS, and Node.js 24.15 protected-execution -> gates, but it is not in npm until the next SDK version is explicitly published. +> The current published SDK is **0.1.25**. Its Connect stack includes whole-toolset +> routing and direct OpenAI Agents FunctionTool wrapping. Developers still own +> stable logical operation identity and complete effect-bearing fields; tool-call +> IDs and payload hashes do not establish user intent. Installation does not +> automatically protect sibling tools or direct provider calls. > > See [`docs/CONNECT_AUTO.md`](../../docs/CONNECT_AUTO.md) for the automatic -> Connect API and tested release boundary. The release PR will update this -> example's SDK dependency only after the new npm version exists. +> Connect API and tested release boundary. To start with the current package, +> use [`examples/first10`](../first10/README.md), then review your application's +> execution boundary. This older fixture remains pinned for reproducibility. This is a runnable example using the **published** `@once-agent/sdk@0.1.11`, OpenAI Agents SDK and a fake booking provider. It uses the Agents SDK's diff --git a/mcp/CHANGELOG.md b/mcp/CHANGELOG.md index aaf32357..37063a74 100644 --- a/mcp/CHANGELOG.md +++ b/mcp/CHANGELOG.md @@ -1,4 +1,12 @@ -# MCP 0.2.1 candidate +# Unreleased + +- Update the declared MCP client dependency from 2.0.0 to 2.3.1, removing the + affected OAuth client version in GHSA-6qxp-vccf-f47h. Once's inspected runtime + is a server/stdio boundary, which the advisory excludes; no HTTP OAuth + credential path was identified. Tool schemas and execution behavior are unchanged. +- This is source preparation for a future MCP patch; npm/Registry remains 0.2.1. + +# MCP 0.2.1 - Correct once_verify_connection: retain local diagnostics, explicitly report Cloud configuration/verification, request actual read-only Cloud checks when @@ -6,7 +14,7 @@ - Add one compatibility/continuity matrix; correct stale release and timeout statements and distinguish default helper, opt-in action and reviewed proxy. - No execution state-machine, ledger schema, plugin pin or private adapter change. -- Not published: current npm/Registry remains 0.2.0 until independently verified. +- npm and the MCP Registry were independently verified at 0.2.1 on 10 October 2026. # MCP 0.2.0 diff --git a/mcp/package-lock.json b/mcp/package-lock.json index 118e56c4..2bfd9cf6 100644 --- a/mcp/package-lock.json +++ b/mcp/package-lock.json @@ -9,7 +9,7 @@ "version": "0.2.1", "license": "MIT", "dependencies": { - "@modelcontextprotocol/client": "2.0.0", + "@modelcontextprotocol/client": "2.3.1", "@modelcontextprotocol/server": "2.0.0", "@once-agent/sdk": "0.1.25", "zod": "4.6.5" @@ -469,15 +469,15 @@ } }, "node_modules/@modelcontextprotocol/client": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/client/-/client-2.0.0.tgz", - "integrity": "sha512-8f1OghQ2rjzIOfqgUCP+8GiUWqRs89njoWLNqAe8kWmDePv3s1fZXseej+QXemssEuuOvLLmLO/kqM3IQHtISw==", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/client/-/client-2.3.1.tgz", + "integrity": "sha512-mIGZXpHsjnZ6lD+gD/WCMpR5k8yVQQ8nNFH1N0Srf7AvnwTUMYD6pvTY8ng2+He5FfV7YMZLmrjL7cLa/cc3dQ==", + "license": "Apache-2.0", "dependencies": { - "@modelcontextprotocol/core": "2.0.0", + "@modelcontextprotocol/core": "2.3.1", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", - "eventsource-parser": "^3.0.0", + "eventsource-parser": "^3.0.8", "jose": "^6.1.3", "pkce-challenge": "^5.0.0", "zod": "^4.2.0" @@ -486,6 +486,18 @@ "node": ">=20" } }, + "node_modules/@modelcontextprotocol/client/node_modules/@modelcontextprotocol/core": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.3.1.tgz", + "integrity": "sha512-laVmIhPGpWi7rG9q+0UigblRN0Hws/Yjlb6qLFtVqryXVLkc4h+yN8z731POD2LnAGQlFe7/tXhUm7Bi0YB91g==", + "license": "Apache-2.0", + "dependencies": { + "zod": "^4.2.0" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/@modelcontextprotocol/core": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.0.0.tgz", diff --git a/mcp/package.json b/mcp/package.json index e8909778..b5b43261 100644 --- a/mcp/package.json +++ b/mcp/package.json @@ -74,7 +74,7 @@ "node": ">=20" }, "dependencies": { - "@modelcontextprotocol/client": "2.0.0", + "@modelcontextprotocol/client": "2.3.1", "@modelcontextprotocol/server": "2.0.0", "@once-agent/sdk": "0.1.25", "zod": "4.6.5" diff --git a/mcp/scripts/phase13b-stdio-e2e.mjs b/mcp/scripts/phase13b-stdio-e2e.mjs index 5e6ba772..e4104f73 100644 --- a/mcp/scripts/phase13b-stdio-e2e.mjs +++ b/mcp/scripts/phase13b-stdio-e2e.mjs @@ -75,12 +75,38 @@ try { assert.equal(count(), 0); unlinkSync(driftPath); - // MCP client v2.0.0 auto-aggregation can silently truncate a catalog when a - // server legally repeats an opaque cursor. Once walks raw pages separately, - // primes the SDK cache, and refuses to proceed if the two inventories differ. + // The patched client preserves the complete inventory when a server repeats + // an opaque cursor. Verify that third page independently, then require Once + // to reject its unreviewed tool before any provider dispatch. writeFileSync(driftPath, "repeated-cursor"); + const paginated = new Client({ name: "once-pagination-control", version: "0.0.1" }); + try { + await paginated.connect(new StdioClientTransport({ + command: config.command, args: config.args, + })); + assert.deepEqual((await paginated.listTools()).tools.map(tool => tool.name), + ["create_order", "read_count", "third_read"]); + } finally { + await paginated.close(); + } await assert.rejects(connectStdioProxy(config), - /INVALID_TOOL_CATALOG: SDK aggregate differs from raw catalog/); + /^Error: TOOL_SCHEMA_CHANGED: upstream catalog differs from reviewed configuration$/); + assert.equal(count(), 0); + + // Retain a negative control for the older client's truncated aggregation: + // even when an SDK inventory omits page three, the raw walk detects the + // mismatch. This changes only the test client's convenience API, not truth. + const originalListTools = Client.prototype.listTools; + Client.prototype.listTools = async function (...args) { + const result = await originalListTools.apply(this, args); + return { ...result, tools: result.tools.filter(tool => tool.name !== "third_read") }; + }; + try { + await assert.rejects(connectStdioProxy(config), + /^Error: INVALID_TOOL_CATALOG: SDK aggregate differs from raw catalog$/); + } finally { + Client.prototype.listTools = originalListTools; + } assert.equal(count(), 0); unlinkSync(driftPath); diff --git a/sdk/python/README.md b/sdk/python/README.md index 9c8dd6da..e545d2cd 100644 --- a/sdk/python/README.md +++ b/sdk/python/README.md @@ -16,13 +16,19 @@ Published package: https://pypi.org/project/once-agent-sdk/ ## Quick start +This hosted-client example needs an `ONCE_API_KEY` and a reviewed provider +registered under `my-provider`; the alias below is a placeholder. Installation +alone does not register a payment provider or protect other tool calls. Set the +key before constructing `Once`. Do not run this against real money for a smoke test. + ```python from once_agent import Once once = Once() order_id = "order_123" -operation_id = Once.id("refund", order_id) +refund_intent_id = "refund_request_456" # Persist once for this intentional refund. +operation_id = Once.id("merchant_7", "refund", refund_intent_id) result = once.execute( operation_id=operation_id, @@ -30,6 +36,9 @@ result = once.execute( action={ "type": "refund", "order_id": order_id, + "amount_cents": 5000, + "currency": "GBP", + "merchant_id": "merchant_7", }, ) ``` @@ -48,6 +57,11 @@ If an external action succeeds but its response is lost, retrying the action wit `Once.id(...)` generates a deterministic operation ID, so retries of the same logical operation can retain the same identity. +Use a persisted intent ID and account/tenant authority. Separate intentional +partial refunds on one order need different intent IDs, even if their amounts +match. Bind every effect-bearing field in the reviewed action schema. Do not +mint a new ID to bypass an unresolved original action. + ```python a = Once.id("refund", "order_123") b = Once.id("refund", "order_123") diff --git a/sdk/typescript/package-lock.json b/sdk/typescript/package-lock.json index ad9d8f4b..c87c8958 100644 --- a/sdk/typescript/package-lock.json +++ b/sdk/typescript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@once-agent/sdk", - "version": "0.1.25", + "version": "0.1.26", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@once-agent/sdk", - "version": "0.1.25", + "version": "0.1.26", "license": "MIT", "dependencies": { "typescript": "^5.9.0" @@ -17,7 +17,7 @@ "once-monitor": "dist/monitor-cli.js" }, "devDependencies": { - "@modelcontextprotocol/sdk": "1.27.1", + "@modelcontextprotocol/sdk": "1.32.1", "@types/node": "^26.6.1" }, "engines": { @@ -38,13 +38,13 @@ } }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz", - "integrity": "sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA==", + "version": "1.32.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.32.1.tgz", + "integrity": "sha512-2DdE+SJDtzLEEWzY1ZjY7Q+VcPhcV1KisD3zI4u0XZyktsjHum1mwbMI+JaulUBi2OZk+KJAi2uPXzxichPkdw==", "dev": true, "license": "MIT", "dependencies": { - "@hono/node-server": "^1.19.9", + "@hono/node-server": "^1.19.9 || ^2.0.5", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json index f9188cac..2de7945b 100644 --- a/sdk/typescript/package.json +++ b/sdk/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@once-agent/sdk", - "version": "0.1.25", + "version": "0.1.26", "description": "Block duplicate consequential writes after lost acknowledgements; replay confirmed results and reconcile uncertain outcomes.", "type": "module", "main": "./dist/index.js", @@ -133,7 +133,7 @@ "node": ">=18" }, "devDependencies": { - "@modelcontextprotocol/sdk": "1.27.1", + "@modelcontextprotocol/sdk": "1.32.1", "@types/node": "^26.6.1" }, "bin": { diff --git a/sdk/typescript/scripts/http-response-packed-consumer-regression.mjs b/sdk/typescript/scripts/http-response-packed-consumer-regression.mjs index c7aea2aa..d0130625 100644 --- a/sdk/typescript/scripts/http-response-packed-consumer-regression.mjs +++ b/sdk/typescript/scripts/http-response-packed-consumer-regression.mjs @@ -173,6 +173,8 @@ try { import assert from "node:assert/strict"; import { Buffer } from "node:buffer"; import { executeHttpWriteResponse } from "@once-agent/sdk/http-response"; +import { executeHttpWriteJsonResponse } from "@once-agent/sdk/http-response-json"; +assert.equal(typeof executeHttpWriteJsonResponse, "function"); const targetBody = JSON.stringify({ created: true, id: "external-1" }); const targetBytes = Buffer.from(targetBody, "utf8"); @@ -330,6 +332,8 @@ console.log("PACKED NATIVE RESPONSE PASS"); "-e", [ 'const m = require("@once-agent/sdk/http-response");', + 'const json = require("@once-agent/sdk/http-response-json");', + 'if (typeof json.executeHttpWriteJsonResponse !== "function") process.exit(3);', 'if (typeof m.executeHttpWriteResponse !== "function") process.exit(2);', 'console.log("CJS NATIVE RESPONSE PASS");' ].join("\n") @@ -350,6 +354,7 @@ console.log("PACKED NATIVE RESPONSE PASS"); console.log("PASS - fresh publishable SDK tarball created"); console.log("PASS - packed SDK exposes @once-agent/sdk/http-response for ESM and CJS"); + console.log("PASS - packed SDK exposes @once-agent/sdk/http-response-json for ESM and CJS"); console.log("PASS - packed helper reconstructs a real native Response with replay-v2 metadata"); console.log("PASS - clone/bodyUsed/text/json/header immutability survive the package boundary"); console.log("PASS - legacy v1 and malformed v2 receipts fail closed"); diff --git a/sdk/typescript/scripts/zero-friction-cli-regression.mjs b/sdk/typescript/scripts/zero-friction-cli-regression.mjs index b9a4b7f8..63859718 100644 --- a/sdk/typescript/scripts/zero-friction-cli-regression.mjs +++ b/sdk/typescript/scripts/zero-friction-cli-regression.mjs @@ -55,6 +55,8 @@ try { assert.match(bare.stdout, /Verified Protection Rate: \d+(?:\.\d+)?%/); assert.match(bare.stdout, /Time-to-Protected: not yet achieved/); assert.match(bare.stdout, /no telemetry is sent/i); + assert.match(bare.stdout, /Candidates and applicability are heuristic/); + assert.match(bare.stdout, /not an observed provider effect/); assert.equal( await readFile(sourcePath, "utf8"), source, diff --git a/sdk/typescript/src/adoption-metrics.ts b/sdk/typescript/src/adoption-metrics.ts index 0b56457d..3bde9e3d 100644 --- a/sdk/typescript/src/adoption-metrics.ts +++ b/sdk/typescript/src/adoption-metrics.ts @@ -119,4 +119,7 @@ export function printAdoptionMetrics( console.log( "Metrics are computed locally from the protection plan and current route-proof receipt; no telemetry is sent." ); -} \ No newline at end of file + console.log( + "Candidates and applicability are heuristic. A route-proof receipt is not an observed provider effect, successful recovery, customer adoption, or end-to-end onboarding time." + ); +} diff --git a/sdk/typescript/tsconfig.cjs.json b/sdk/typescript/tsconfig.cjs.json index f667e8ba..812d3e18 100644 --- a/sdk/typescript/tsconfig.cjs.json +++ b/sdk/typescript/tsconfig.cjs.json @@ -14,7 +14,8 @@ "src/discovery/index.ts", "src/gateway/index.ts", "src/reconciliation/index.ts", - "src/http-response.ts" + "src/http-response.ts", + "src/http-response-json.ts" ], "exclude": [ "src/**/*.before-*.ts"