From 86a6f22bfa82a54a3f105ec434ab880687155b4f Mon Sep 17 00:00:00 2001 From: tercel Date: Fri, 27 Nov 2026 21:23:13 +0800 Subject: [PATCH 1/2] feat(mcp): bind final approval scope across Surfaces Signed-off-by: tercel --- .github/workflows/core-candidate.yml | 8 ++-- .github/workflows/python.yml | 2 +- .github/workflows/rust.yml | 6 +-- .github/workflows/typescript.yml | 2 +- a2a/python/pyproject.toml | 2 +- a2a/rust/Cargo.lock | 4 +- a2a/rust/Cargo.toml | 2 +- a2a/typescript/package.json | 2 +- a2a/typescript/pnpm-lock.yaml | 12 +++--- cli/python/pyproject.toml | 2 +- cli/rust/Cargo.lock | 4 +- cli/rust/Cargo.toml | 2 +- cli/typescript/package.json | 4 +- cli/typescript/pnpm-lock.yaml | 12 +++--- mcp/docs/features/approval-phase-b.md | 2 + mcp/python/pyproject.toml | 2 +- .../src/apcore_mcp/adapters/approval.py | 22 +++++++++- .../tests/server/test_approval_bridge.py | 26 ++++++++++++ .../tests/server/test_scoped_approval_wire.py | 31 ++++++++++---- mcp/rust/Cargo.lock | 4 +- mcp/rust/Cargo.toml | 2 +- mcp/rust/src/adapters/approval.rs | 42 +++++++++++++++++++ mcp/rust/src/apcore_mcp.rs | 33 +++++++++++++-- mcp/rust/src/approval_store.rs | 15 +++++-- mcp/typescript/package.json | 2 +- mcp/typescript/pnpm-lock.yaml | 12 +++--- mcp/typescript/src/adapters/approval.ts | 22 +++++++++- .../tests/adapters/approval.test.ts | 23 ++++++++++ .../tests/server/scoped-approval.test.ts | 25 ++++++++--- toolkit/python/pyproject.toml | 2 +- toolkit/rust/Cargo.lock | 4 +- toolkit/rust/Cargo.toml | 2 +- toolkit/typescript/package.json | 2 +- toolkit/typescript/pnpm-lock.yaml | 2 +- 34 files changed, 267 insertions(+), 72 deletions(-) diff --git a/.github/workflows/core-candidate.yml b/.github/workflows/core-candidate.yml index 42b2b127..4b90105a 100644 --- a/.github/workflows/core-candidate.yml +++ b/.github/workflows/core-candidate.yml @@ -201,7 +201,7 @@ jobs: assert core_path == installed.locate_file("apcore/__init__.py").resolve() assert toolkit_path == toolkit_expected.resolve() if os.environ["CORE_MODE"] == "candidate": - assert installed.version == "1.0.0a2" + assert installed.version == "1.0.0a3" origin = json.loads(installed.read_text("direct_url.json") or "{}") assert origin.get("url") == Path(os.environ["CORE_INSTALL"]).resolve().as_uri() assert callable(getattr(Executor, "stream_with_completion", None)) @@ -340,7 +340,7 @@ jobs: assert.ok(coreEntry.startsWith(core + sep)); assert.equal(toolkitEntry, realpathSync(resolve(process.env.TOOLKIT_ROOT, 'dist/index.js'))); if (process.env.CORE_MODE === 'candidate') { - assert.equal(coreVersion, '1.0.0-alpha.2'); + assert.equal(coreVersion, '1.0.0-alpha.3'); assert.equal(typeof Executor.prototype.streamWithCompletion, 'function'); assert.equal(typeof APCore.prototype.streamWithCompletion, 'function'); } else { @@ -406,8 +406,8 @@ jobs: crate="${crates[0]}" version="${crate##*/apcore-}" version="${version%.crate}" - if [[ "$version" != 1.0.0-alpha.2 ]]; then - echo "Expected the alpha.2 Core crate." >&2 + if [[ "$version" != 1.0.0-alpha.3 ]]; then + echo "Expected the alpha.3 Core crate." >&2 exit 1 fi if [[ "$CORE_MODE" == candidate && -n "$EXPECTED_SHA256" ]]; then diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 5115d1ec..e08ba84e 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -15,7 +15,7 @@ permissions: contents: read env: - CORE_REF: 3b5fb5defb7e32900da4e826a848bb23258cd91e + CORE_REF: 83f627cb300a42b5c46550a04b48d18745147f21 jobs: test: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ee3d1e2f..674c6e9d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,9 +22,9 @@ permissions: env: # The released lockfiles already reference these prereleases. Bootstrap CI # from the reviewed Core commit while those versions are unpublished. - CORE_REF: 0384a3d4e7688c47eaa1feea6032fb4739813f20 - CORE_CRATE_VERSION: 1.0.0-alpha.2 - CORE_CRATE_SHA256: 54e630a6f3c82ee9e01aec1f58ad14a06e21d8082414a1f4d398bce2f45b4de3 + CORE_REF: 83f627cb300a42b5c46550a04b48d18745147f21 + CORE_CRATE_VERSION: 1.0.0-alpha.3 + CORE_CRATE_SHA256: 7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc jobs: source: diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index d709282e..8ffc0bf4 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -15,7 +15,7 @@ permissions: contents: read env: - CORE_REF: 3b5fb5defb7e32900da4e826a848bb23258cd91e + CORE_REF: 83f627cb300a42b5c46550a04b48d18745147f21 jobs: test: diff --git a/a2a/python/pyproject.toml b/a2a/python/pyproject.toml index 8443acad..3de6d192 100644 --- a/a2a/python/pyproject.toml +++ b/a2a/python/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ "Framework :: AsyncIO", ] dependencies = [ - "apcore[config,discovery]==1.0.0a2", + "apcore[config,discovery]==1.0.0a3", "apcore-toolkit==0.15.1a2", "a2a-sdk[http-server]>=1.1.2", "starlette>=0.40.0", diff --git a/a2a/rust/Cargo.lock b/a2a/rust/Cargo.lock index 68b227b3..7bbc12ff 100644 --- a/a2a/rust/Cargo.lock +++ b/a2a/rust/Cargo.lock @@ -92,9 +92,9 @@ dependencies = [ [[package]] name = "apcore" -version = "1.0.0-alpha.2" +version = "1.0.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e630a6f3c82ee9e01aec1f58ad14a06e21d8082414a1f4d398bce2f45b4de3" +checksum = "7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc" dependencies = [ "async-stream", "async-trait", diff --git a/a2a/rust/Cargo.toml b/a2a/rust/Cargo.toml index fb56bd2d..142fd7e5 100644 --- a/a2a/rust/Cargo.toml +++ b/a2a/rust/Cargo.toml @@ -27,7 +27,7 @@ default = [] openapi = ["apcore-toolkit/http-proxy"] [dependencies] -apcore = { version = "=1.0.0-alpha.2", default-features = false, features = ["discovery", "sys-modules"] } +apcore = { version = "=1.0.0-alpha.3", default-features = false, features = ["discovery", "sys-modules"] } # `default-features = false` so `http-proxy` — a *default* feature of the # toolkit — is reached through this crate's `openapi` feature instead of being # enabled unconditionally. The unconditional import (`deep_resolve_refs`) is diff --git a/a2a/typescript/package.json b/a2a/typescript/package.json index a1c229bf..d5348e47 100644 --- a/a2a/typescript/package.json +++ b/a2a/typescript/package.json @@ -33,7 +33,7 @@ }, "dependencies": { "@a2a-js/sdk": ">=1.0.1", - "apcore-js": "1.0.0-alpha.2", + "apcore-js": "1.0.0-alpha.3", "apcore-toolkit": "0.15.1-alpha.2", "express": "^5.1.0", "jsonwebtoken": "^9.0.3", diff --git a/a2a/typescript/pnpm-lock.yaml b/a2a/typescript/pnpm-lock.yaml index e933ee26..09622955 100644 --- a/a2a/typescript/pnpm-lock.yaml +++ b/a2a/typescript/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: '>=1.0.1' version: 1.0.1(express@5.2.1) apcore-js: - specifier: 1.0.0-alpha.2 - version: 1.0.0-alpha.2(typescript@5.9.3) + specifier: 1.0.0-alpha.3 + version: 1.0.0-alpha.3(typescript@5.9.3) apcore-toolkit: specifier: 0.15.1-alpha.2 version: 0.15.1-alpha.2(@sinclair/typebox@0.34.48)(typescript@5.9.3) @@ -656,8 +656,8 @@ packages: ajv@8.20.0: resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} - apcore-js@1.0.0-alpha.2: - resolution: {integrity: sha512-WnQj/V/f43e0PbYIALpvjrerv/XOJStKE+FuOEl80qYEAtKWb/pKn1ho7p11HBinc6diCBxqIGScoN7qscnsbg==} + apcore-js@1.0.0-alpha.3: + resolution: {integrity: sha512-dRFTfw5XKeQebIGO+PhSfsr8TB/8OfaRXCPhrk3teAAFHmLlfxjeo3JUff2mkMZHbB+OoKYj6kPjVo7mLQy3BQ==} engines: {node: '>=20.0.0'} peerDependencies: typescript: ^5.5.0 @@ -1951,7 +1951,7 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - apcore-js@1.0.0-alpha.2(typescript@5.9.3): + apcore-js@1.0.0-alpha.3(typescript@5.9.3): dependencies: '@sinclair/typebox': 0.34.48 js-yaml: 4.3.2 @@ -1963,7 +1963,7 @@ snapshots: dependencies: '@sinclair/typebox': 0.34.48 ajv: 8.20.0 - apcore-js: 1.0.0-alpha.2(typescript@5.9.3) + apcore-js: 1.0.0-alpha.3(typescript@5.9.3) js-yaml: 4.3.2 transitivePeerDependencies: - typescript diff --git a/cli/python/pyproject.toml b/cli/python/pyproject.toml index 5b3dabb6..49583d8b 100644 --- a/cli/python/pyproject.toml +++ b/cli/python/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ "Environment :: Console", ] dependencies = [ - "apcore[config,discovery]==1.0.0a2", + "apcore[config,discovery]==1.0.0a3", "apcore-toolkit[http-proxy]==0.15.1a2", "click>=8.1", "jsonschema>=4.20", diff --git a/cli/rust/Cargo.lock b/cli/rust/Cargo.lock index f348eb91..8838bf95 100644 --- a/cli/rust/Cargo.lock +++ b/cli/rust/Cargo.lock @@ -133,9 +133,9 @@ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "apcore" -version = "1.0.0-alpha.2" +version = "1.0.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e630a6f3c82ee9e01aec1f58ad14a06e21d8082414a1f4d398bce2f45b4de3" +checksum = "7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc" dependencies = [ "async-stream", "async-trait", diff --git a/cli/rust/Cargo.toml b/cli/rust/Cargo.toml index da15075b..2e08e1da 100644 --- a/cli/rust/Cargo.toml +++ b/cli/rust/Cargo.toml @@ -21,7 +21,7 @@ name = "apcore_cli" path = "src/lib.rs" [dependencies] -apcore = { version = "=1.0.0-alpha.2", default-features = false, features = ["config"] } +apcore = { version = "=1.0.0-alpha.3", default-features = false, features = ["config"] } async-trait = "0.1" clap = { version = "4", features = ["derive", "env", "string"] } serde = { version = "1", features = ["derive"] } diff --git a/cli/typescript/package.json b/cli/typescript/package.json index 51e8aeeb..638ece90 100644 --- a/cli/typescript/package.json +++ b/cli/typescript/package.json @@ -30,7 +30,7 @@ "node": ">=20.0.0" }, "peerDependencies": { - "apcore-js": "1.0.0-alpha.2", + "apcore-js": "1.0.0-alpha.3", "apcore-toolkit": "0.15.1-alpha.2" }, "dependencies": { @@ -47,7 +47,7 @@ "@typescript-eslint/eslint-plugin": "^8.59.0", "@typescript-eslint/parser": "^8.59.0", "@vitest/coverage-v8": "^5.1.0", - "apcore-js": "1.0.0-alpha.2", + "apcore-js": "1.0.0-alpha.3", "apcore-toolkit": "0.15.1-alpha.2", "apdev-js": "^0.2.4", "eslint": "^10.2.1", diff --git a/cli/typescript/pnpm-lock.yaml b/cli/typescript/pnpm-lock.yaml index 4286b510..d2cb033d 100644 --- a/cli/typescript/pnpm-lock.yaml +++ b/cli/typescript/pnpm-lock.yaml @@ -34,8 +34,8 @@ importers: specifier: ^5.1.0 version: 5.1.0(vitest@5.1.0) apcore-js: - specifier: 1.0.0-alpha.2 - version: 1.0.0-alpha.2(typescript@5.9.3) + specifier: 1.0.0-alpha.3 + version: 1.0.0-alpha.3(typescript@5.9.3) apcore-toolkit: specifier: 0.15.1-alpha.2 version: 0.15.1-alpha.2(@sinclair/typebox@0.34.48)(typescript@5.9.3) @@ -731,8 +731,8 @@ packages: any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} - apcore-js@1.0.0-alpha.2: - resolution: {integrity: sha512-WnQj/V/f43e0PbYIALpvjrerv/XOJStKE+FuOEl80qYEAtKWb/pKn1ho7p11HBinc6diCBxqIGScoN7qscnsbg==} + apcore-js@1.0.0-alpha.3: + resolution: {integrity: sha512-dRFTfw5XKeQebIGO+PhSfsr8TB/8OfaRXCPhrk3teAAFHmLlfxjeo3JUff2mkMZHbB+OoKYj6kPjVo7mLQy3BQ==} engines: {node: '>=20.0.0'} peerDependencies: typescript: ^5.5.0 @@ -1944,7 +1944,7 @@ snapshots: any-promise@1.3.0: {} - apcore-js@1.0.0-alpha.2(typescript@5.9.3): + apcore-js@1.0.0-alpha.3(typescript@5.9.3): dependencies: '@sinclair/typebox': 0.34.48 js-yaml: 4.3.2 @@ -1956,7 +1956,7 @@ snapshots: dependencies: '@sinclair/typebox': 0.34.48 ajv: 8.20.0 - apcore-js: 1.0.0-alpha.2(typescript@5.9.3) + apcore-js: 1.0.0-alpha.3(typescript@5.9.3) js-yaml: 4.3.2 transitivePeerDependencies: - typescript diff --git a/mcp/docs/features/approval-phase-b.md b/mcp/docs/features/approval-phase-b.md index 9dc7e419..c2881800 100644 --- a/mcp/docs/features/approval-phase-b.md +++ b/mcp/docs/features/approval-phase-b.md @@ -51,6 +51,8 @@ Phase B requires Core's scoped approval gate and a store that can atomically ver Core checks its access and approval gates on the retry. The handler matches the trusted principal, `caller_id`, target module, and business arguments. It consumes the grant when it authorizes one invocation. A further attempt needs its own approval. +With Core's optional post-validation policy enabled, the handler also binds approval to the selected module version and the validated arguments presented for review. A retry sends the original input, and Core applies the current trusted transformations and validation before checking the bound scope. A changed effective value or module version needs a new approval. Custom stores enforce the entire supplied scope with the same atomic consumption operation. + Use the record ID for polling, review notifications, and audit correlation. Restrict the resume token to the pending result and the caller's resumption request. ## ApprovalStore Interface diff --git a/mcp/python/pyproject.toml b/mcp/python/pyproject.toml index b2ee177a..35e31681 100644 --- a/mcp/python/pyproject.toml +++ b/mcp/python/pyproject.toml @@ -25,7 +25,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", ] dependencies = [ - "apcore[config,discovery]==1.0.0a2", + "apcore[config,discovery]==1.0.0a3", "mcp>=1.26,<2.0", "jsonschema>=4.20,<5", "referencing>=0.30,<1", diff --git a/mcp/python/src/apcore_mcp/adapters/approval.py b/mcp/python/src/apcore_mcp/adapters/approval.py index e8731ef9..aa39c3e5 100644 --- a/mcp/python/src/apcore_mcp/adapters/approval.py +++ b/mcp/python/src/apcore_mcp/adapters/approval.py @@ -162,11 +162,23 @@ def _argument_snapshot(arguments: dict[str, Any]) -> str: def _scope_for(request: ApprovalRequest, snapshot: str) -> ApprovalScope: + digest = getattr(request, "canonical_args_digest", None) + if digest is not None: + version = getattr(request, "module_version", None) + if not isinstance(digest, str) or not re.fullmatch(r"[0-9a-f]{64}", digest): + raise ValueError("Invalid final approval argument digest") + if version is not None and not isinstance(version, str): + raise ValueError("Invalid final approval module version") + encoded = json.dumps([version, digest], separators=(",", ":")).encode("utf-8") + # The prefix separates final-scope records from existing argument-object digests. + material = b"apcore-final-scope-v1\0" + encoded + else: + material = snapshot.encode("utf-8") return ApprovalScope( _approval_principal(request.context.identity), request.caller_id, request.module_id, - sha256(snapshot.encode("utf-8")).hexdigest(), + sha256(material).hexdigest(), ) @@ -207,6 +219,10 @@ def __init__(self, store: Any, *, notify_callback: Any | None = None) -> None: def scoped_approval_available(self) -> bool: return _CORE_SCOPED_APPROVAL and isinstance(self._store, ScopedApprovalStore) + @property + def supports_final_scope(self) -> bool: + return self.scoped_approval_available + async def request_approval(self, request: ApprovalRequest) -> ApprovalResult: if not self.scoped_approval_available: return ApprovalResult(status="rejected", reason=_NO_PHASE_B) @@ -330,6 +346,10 @@ class _MCPScopedApprovalGate: def __init__(self, handler: _ScopedMCPApprovalHandler) -> None: self._handler = handler + @property + def supports_final_scope(self) -> bool: + return getattr(self._handler, "supports_final_scope", None) is True + def _delivery_for(self, request: ApprovalRequest) -> _ApprovalDelivery | None: delivery = _approval_delivery.get() if ( diff --git a/mcp/python/tests/server/test_approval_bridge.py b/mcp/python/tests/server/test_approval_bridge.py index 69bcfac4..b03f11dd 100644 --- a/mcp/python/tests/server/test_approval_bridge.py +++ b/mcp/python/tests/server/test_approval_bridge.py @@ -3,6 +3,7 @@ from __future__ import annotations import json +from types import SimpleNamespace from typing import Any from unittest.mock import AsyncMock @@ -287,6 +288,31 @@ def _make_approval_request() -> Any: ) +@_requires_scoped_core +@pytest.mark.asyncio +async def test_final_scope_binds_module_version_and_cannot_resume_as_legacy() -> None: + store = InMemoryApprovalStore() + handler = StorageBackedApprovalHandler(store) + request = _make_approval_request() + fields = vars(request) | {"module_version": "1.2.3", "canonical_args_digest": "a" * 64} + final_request = SimpleNamespace(**fields) + pending = await handler.request_approval(final_request) + assert pending.status == "pending" + assert await store.resolve(pending.audit_id, approved=True) + + for changed in ( + request, + SimpleNamespace(**(fields | {"module_version": "1.2.4"})), + SimpleNamespace(**(fields | {"canonical_args_digest": "b" * 64})), + ): + result = await handler.check_approval_for_call(pending.approval_id, changed) + assert result.status == "rejected" + + assert (await handler.check_approval_for_call(pending.approval_id, final_request)).status == "approved" + assert (await handler.check_approval_for_call(pending.approval_id, final_request)).status == "rejected" + assert handler.supports_final_scope is True + + @_requires_scoped_core @pytest.mark.asyncio async def test_request_approval_returns_rejected_when_save_pending_raises() -> None: diff --git a/mcp/python/tests/server/test_scoped_approval_wire.py b/mcp/python/tests/server/test_scoped_approval_wire.py index a452e92e..1d3f58f5 100644 --- a/mcp/python/tests/server/test_scoped_approval_wire.py +++ b/mcp/python/tests/server/test_scoped_approval_wire.py @@ -9,7 +9,7 @@ import httpx import pytest -from apcore import AlwaysDenyHandler, Executor, Identity, ModuleAnnotations, Registry +from apcore import AlwaysDenyHandler, Executor, Identity, Middleware, ModuleAnnotations, PolicyVerdict, Registry from mcp.server.lowlevel import Server from mcp.shared import session as mcp_session from starlette.responses import JSONResponse @@ -60,10 +60,11 @@ def test_phase_b_preserves_a_supplied_executors_existing_handler() -> None: @_requires_scoped_core @pytest.mark.parametrize("tool_type", [Report, StreamingReport]) -async def test_pending_credentials_and_status_round_trip_through_core(tool_type, caplog) -> None: +@pytest.mark.parametrize("post_validation", [False, True]) +async def test_pending_credentials_and_status_round_trip_through_core(tool_type, post_validation, caplog) -> None: registry = Registry() report = tool_type() - registry.register(_TOOL, report) + registry.register(_TOOL, report, version="1.2.3") store = InMemoryApprovalStore() notifications = [] audit_events = [] @@ -73,7 +74,23 @@ def emit(self, event): if event.event_type == "apcore.approval.decision": audit_events.append(event.data) - executor = Executor(registry, event_emitter=EventRecorder()) + class RequireFinalApproval: + async def evaluate(self, request): + assert request.module_version == "1.2.3" + return PolicyVerdict("require_approval") + + class Normalize(Middleware): + async def before(self, _module_id, inputs, _context): + return {**inputs, "count": inputs["count"] + 10} + + executor = Executor( + registry, + event_emitter=EventRecorder(), + policy_evaluator=RequireFinalApproval() if post_validation else None, + ) + if post_validation: + executor.use(Normalize()) + effective = {"count": 11 if post_validation else 1} async def notify(approval_id, module_id, arguments): notifications.append((approval_id, module_id, arguments)) @@ -88,7 +105,7 @@ async def notify(approval_id, module_id, arguments): public_id, credential = approval["approvalId"], approval["resumeToken"] assert public_id != credential assert report.inputs == [] - assert notifications == [(public_id, _TOOL, {"count": 1})] + assert notifications == [(public_id, _TOOL, effective)] assert credential not in repr(pending.content) poll = await session.call_tool("__apcore_approval_check", {"approval_id": public_id}) assert json.loads(poll.content[0].text)["status"] == "pending" @@ -108,8 +125,8 @@ async def notify(approval_id, module_id, arguments): first, second = await asyncio.gather(*requests) assert sorted(result.isError for result in (first, second)) == [False, True] result = next(result for result in (first, second) if not result.isError) - assert result.structuredContent == {"count": 1} - assert report.inputs == [{"count": 1}] + assert result.structuredContent == effective + assert report.inputs == [effective] if credential in caplog.text: pytest.fail("Approval credential entered debug logs") assert credential not in repr(audit_events) diff --git a/mcp/rust/Cargo.lock b/mcp/rust/Cargo.lock index 26e107f0..0c77c7c8 100644 --- a/mcp/rust/Cargo.lock +++ b/mcp/rust/Cargo.lock @@ -98,9 +98,9 @@ dependencies = [ [[package]] name = "apcore" -version = "1.0.0-alpha.2" +version = "1.0.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e630a6f3c82ee9e01aec1f58ad14a06e21d8082414a1f4d398bce2f45b4de3" +checksum = "7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc" dependencies = [ "async-stream", "async-trait", diff --git a/mcp/rust/Cargo.toml b/mcp/rust/Cargo.toml index db23c9fb..7586807a 100644 --- a/mcp/rust/Cargo.toml +++ b/mcp/rust/Cargo.toml @@ -22,7 +22,7 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -apcore = { version = "=1.0.0-alpha.2", default-features = false, features = ["config", "sys-modules"] } +apcore = { version = "=1.0.0-alpha.3", default-features = false, features = ["config", "sys-modules"] } apcore-toolkit = "=0.15.1-alpha.2" mcp-embedded-ui = "0.5" tokio = { version = "1", features = ["full"] } diff --git a/mcp/rust/src/adapters/approval.rs b/mcp/rust/src/adapters/approval.rs index c52bd32a..89762a38 100644 --- a/mcp/rust/src/adapters/approval.rs +++ b/mcp/rust/src/adapters/approval.rs @@ -393,6 +393,10 @@ fn is_background_call(request: &ApprovalRequest) -> bool { #[async_trait] impl ApprovalHandler for StorageBackedApprovalHandler { + fn supports_final_scope(&self) -> bool { + self.store.supports_scoped_approval() + } + async fn request_approval( &self, request: &ApprovalRequest, @@ -626,6 +630,44 @@ mod tests { assert!(result.approval_id.is_none()); } + #[tokio::test] + async fn final_scope_binds_the_module_version_and_digest() { + let store = Arc::new(crate::approval_store::InMemoryApprovalStore::new()); + let handler = StorageBackedApprovalHandler::new(store.clone()); + let legacy = scoped_request(); + let mut request = legacy.clone(); + request.module_version = Some("1.2.3".into()); + request.canonical_args_digest = Some("a".repeat(64)); + let pending = handler.request_approval(&request).await.unwrap(); + let audit_id = pending.audit_id.as_deref().unwrap(); + let credential = pending.approval_id.as_deref().unwrap(); + assert!(handler.supports_final_scope()); + assert!(store.resolve(audit_id, true, None).await.unwrap()); + + let mut changed_version = request.clone(); + changed_version.module_version = Some("1.2.4".into()); + let mut changed_args = request.clone(); + changed_args.canonical_args_digest = Some("b".repeat(64)); + for changed in [legacy, changed_version, changed_args] { + let result = handler + .check_approval_for_call(credential, &changed) + .await + .unwrap(); + assert_eq!(result.status, "rejected"); + } + + let result = handler + .check_approval_for_call(credential, &request) + .await + .unwrap(); + assert_eq!(result.status, "approved"); + let replay = handler + .check_approval_for_call(credential, &request) + .await + .unwrap(); + assert_eq!(replay.status, "rejected"); + } + #[tokio::test] async fn scoped_rejection_keeps_the_operator_note_in_the_store() { let store = Arc::new(crate::approval_store::InMemoryApprovalStore::new()); diff --git a/mcp/rust/src/apcore_mcp.rs b/mcp/rust/src/apcore_mcp.rs index 4c755db9..c198ce46 100644 --- a/mcp/rust/src/apcore_mcp.rs +++ b/mcp/rust/src/apcore_mcp.rs @@ -2713,8 +2713,11 @@ mod tests { #[tokio::test] async fn wire_phase_b_keeps_approval_credentials_in_response_metadata() { - verify_wire_phase_b(false).await; - verify_wire_phase_b(true).await; + for native_stream in [false, true] { + for final_scope in [false, true] { + verify_wire_phase_b(native_stream, final_scope).await; + } + } } #[test] @@ -2753,7 +2756,7 @@ mod tests { if message == "Phase B approval requires stdio or Streamable HTTP")); } - async fn verify_wire_phase_b(native_stream: bool) { + async fn verify_wire_phase_b(native_stream: bool, final_scope: bool) { use crate::approval_store::{ApprovalStore, InMemoryApprovalStore}; use crate::auth::middleware::AUTH_IDENTITY; use crate::server::transport::McpHandler; @@ -2822,8 +2825,30 @@ mod tests { let store = Arc::new(InMemoryApprovalStore::new()); let notified = Arc::new(AtomicUsize::new(0)); let notices = Arc::clone(¬ified); + + struct RequireFinalApproval; + + #[async_trait::async_trait] + impl apcore::PolicyEvaluator for RequireFinalApproval { + async fn evaluate( + &self, + _: &apcore::PolicyEvaluationRequest, + ) -> Result { + Ok(apcore::PolicyVerdict { + decision: apcore::PolicyEffect::RequireApproval, + rule_id: None, + }) + } + } + + let mut executor = Executor::new(registry, Config::default()); + if final_scope { + executor + .set_policy_evaluator(Some(Arc::new(RequireFinalApproval))) + .unwrap(); + } let bridge = APCoreMCP::builder() - .backend(registry) + .backend(Arc::new(executor)) .approval_store(store.clone()) .approval_notify(move |_, _, _| { notices.fetch_add(1, Ordering::SeqCst); diff --git a/mcp/rust/src/approval_store.rs b/mcp/rust/src/approval_store.rs index b7b3b68a..542a006b 100644 --- a/mcp/rust/src/approval_store.rs +++ b/mcp/rust/src/approval_store.rs @@ -72,8 +72,17 @@ pub struct ApprovalScope { impl From<&ApprovalRequest> for ApprovalScope { fn from(request: &ApprovalRequest) -> Self { - let mut arguments = request.arguments.clone(); - arguments.sort_all_objects(); + let arguments_sha256 = if let Some(digest) = &request.canonical_args_digest { + let mut hasher = Sha256::new(); + // Final scopes use a separate domain from legacy argument objects. + hasher.update(b"apcore-final-scope-v1\0"); + hasher.update(serde_json::json!([request.module_version, digest]).to_string()); + hasher.finalize().into() + } else { + let mut arguments = request.arguments.clone(); + arguments.sort_all_objects(); + Sha256::digest(arguments.to_string().as_bytes()).into() + }; Self { module_id: request.module_id.clone(), caller_id: request.caller_id.clone(), @@ -82,7 +91,7 @@ impl From<&ApprovalRequest> for ApprovalScope { .as_ref() .and_then(|context| context.identity.as_ref()) .map(ApprovalPrincipal::from), - arguments_sha256: Sha256::digest(arguments.to_string().as_bytes()).into(), + arguments_sha256, } } } diff --git a/mcp/typescript/package.json b/mcp/typescript/package.json index f4a85437..53d20d52 100644 --- a/mcp/typescript/package.json +++ b/mcp/typescript/package.json @@ -51,7 +51,7 @@ "dependencies": { "@modelcontextprotocol/sdk": "1.32.0", "ajv": "^8.17.1", - "apcore-js": "1.0.0-alpha.2", + "apcore-js": "1.0.0-alpha.3", "apcore-toolkit": "0.15.1-alpha.2", "jsonwebtoken": ">=9.0.3", "mcp-embedded-ui": ">=0.5.1" diff --git a/mcp/typescript/pnpm-lock.yaml b/mcp/typescript/pnpm-lock.yaml index 7c4e16af..fe19a168 100644 --- a/mcp/typescript/pnpm-lock.yaml +++ b/mcp/typescript/pnpm-lock.yaml @@ -15,8 +15,8 @@ importers: specifier: ^8.17.1 version: 8.20.0 apcore-js: - specifier: 1.0.0-alpha.2 - version: 1.0.0-alpha.2(typescript@5.9.3) + specifier: 1.0.0-alpha.3 + version: 1.0.0-alpha.3(typescript@5.9.3) apcore-toolkit: specifier: 0.15.1-alpha.2 version: 0.15.1-alpha.2(@sinclair/typebox@0.34.48)(typescript@5.9.3) @@ -619,8 +619,8 @@ packages: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - apcore-js@1.0.0-alpha.2: - resolution: {integrity: sha512-WnQj/V/f43e0PbYIALpvjrerv/XOJStKE+FuOEl80qYEAtKWb/pKn1ho7p11HBinc6diCBxqIGScoN7qscnsbg==} + apcore-js@1.0.0-alpha.3: + resolution: {integrity: sha512-dRFTfw5XKeQebIGO+PhSfsr8TB/8OfaRXCPhrk3teAAFHmLlfxjeo3JUff2mkMZHbB+OoKYj6kPjVo7mLQy3BQ==} engines: {node: '>=20.0.0'} peerDependencies: typescript: ^5.5.0 @@ -1938,7 +1938,7 @@ snapshots: dependencies: color-convert: 2.0.1 - apcore-js@1.0.0-alpha.2(typescript@5.9.3): + apcore-js@1.0.0-alpha.3(typescript@5.9.3): dependencies: '@sinclair/typebox': 0.34.48 js-yaml: 4.3.2 @@ -1950,7 +1950,7 @@ snapshots: dependencies: '@sinclair/typebox': 0.34.48 ajv: 8.20.0 - apcore-js: 1.0.0-alpha.2(typescript@5.9.3) + apcore-js: 1.0.0-alpha.3(typescript@5.9.3) js-yaml: 4.3.2 transitivePeerDependencies: - typescript diff --git a/mcp/typescript/src/adapters/approval.ts b/mcp/typescript/src/adapters/approval.ts index 38b46a79..c5126173 100644 --- a/mcp/typescript/src/adapters/approval.ts +++ b/mcp/typescript/src/adapters/approval.ts @@ -166,13 +166,25 @@ function businessArguments(request: ApprovalRequest): Record { return args; } +function argumentsScopeDigest(request: ApprovalRequest, args: Record): string { + const digest: unknown = Reflect.get(request, "canonicalArgsDigest"); + if (digest == null) return sha256(JSON.stringify(canonicalValue(args))); + const version: unknown = Reflect.get(request, "moduleVersion") ?? null; + if (typeof digest !== "string" || !/^[0-9a-f]{64}$/.test(digest) + || (version !== null && typeof version !== "string")) { + throw new Error("Invalid final approval scope"); + } + // This prefix keeps final-scope records separate from legacy argument objects. + return sha256("apcore-final-scope-v1\0" + JSON.stringify([version, digest])); +} + function invocationScope(request: ApprovalRequest, args: Record): ApprovalScope { const identity = request.context?.identity; return { principal: identity ? { type: identity.type, id: identity.id } : null, callerId: request.callerId ?? request.context?.callerId ?? null, moduleId: request.moduleId, - argumentsDigest: sha256(JSON.stringify(canonicalValue(args))), + argumentsDigest: argumentsScopeDigest(request, args), }; } @@ -203,13 +215,19 @@ export class StorageBackedApprovalHandler { if (!supportsScopedApprovalStore(this.store)) throw new Error("Phase B requires a scoped approval store"); } + get supportsFinalScope(): boolean { + return supportsScopedCore() && supportsScopedApprovalStore(this.store); + } + /** Bind the provider to the server's private foreground response path. */ forMcpServer(): Pick { + "requestApproval" | "checkApproval" | "checkApprovalForPrincipal" | "checkApprovalForCall" | + "supportsFinalScope"> { const isForeground = (request: ApprovalRequest) => canIssueApprovalReply( request.moduleId, request.callerId ?? request.context?.callerId ?? null, request.context?.data, true, ); return { + supportsFinalScope: this.supportsFinalScope, requestApproval: async request => isForeground(request) ? this.requestApproval(request) : rejected("Scoped approval requires a direct tool call"), diff --git a/mcp/typescript/tests/adapters/approval.test.ts b/mcp/typescript/tests/adapters/approval.test.ts index 8b99c08e..8ce5c5a4 100644 --- a/mcp/typescript/tests/adapters/approval.test.ts +++ b/mcp/typescript/tests/adapters/approval.test.ts @@ -162,6 +162,29 @@ describe("StorageBackedApprovalHandler", () => { expect(await handler.requestApproval(request)).toMatchObject({ status: "rejected" }); }); + it.skipIf(!supportsScopedCore())("binds final approval to the module version and digest", async () => { + const store = new InMemoryApprovalStore(); + const handler = new StorageBackedApprovalHandler(store); + const finalRequest = { ...request, moduleVersion: "1.2.3", canonicalArgsDigest: "a".repeat(64) }; + try { + const pending = await handler.requestApproval(finalRequest); + expect(pending).toMatchObject({ status: "pending", auditId: expect.any(String) }); + await store.resolve(pending.auditId!, { approved: true }); + for (const changed of [ + request, + { ...finalRequest, moduleVersion: "1.2.4" }, + { ...finalRequest, canonicalArgsDigest: "b".repeat(64) }, + ]) { + expect(await handler.checkApprovalForCall(pending.approvalId!, changed)).toMatchObject({ status: "rejected" }); + } + expect(await handler.checkApprovalForCall(pending.approvalId!, finalRequest)).toMatchObject({ status: "approved" }); + expect(await handler.checkApprovalForCall(pending.approvalId!, finalRequest)).toMatchObject({ status: "rejected" }); + expect(handler.forMcpServer()).toMatchObject({ supportsFinalScope: true }); + } finally { + store.stop(); + } + }); + it.skipIf(!supportsScopedCore())("keeps Core credentials separate from public operator IDs", async () => { const store = new InMemoryApprovalStore(); const notify = vi.fn().mockResolvedValue(undefined); diff --git a/mcp/typescript/tests/server/scoped-approval.test.ts b/mcp/typescript/tests/server/scoped-approval.test.ts index 45ada979..77792243 100644 --- a/mcp/typescript/tests/server/scoped-approval.test.ts +++ b/mcp/typescript/tests/server/scoped-approval.test.ts @@ -40,7 +40,7 @@ function approvalMetadata(result: CallToolResult): PendingMetadata | undefined { return (result._meta?.apcore as { approval?: PendingMetadata } | undefined)?.approval; } -async function connect(options: { streaming?: boolean; background?: boolean; trace?: boolean } = {}) { +async function connect(options: { streaming?: boolean; background?: boolean; trace?: boolean; finalScope?: boolean } = {}) { const store = new InMemoryApprovalStore(); const notify = vi.fn().mockResolvedValue(undefined); const handler = new StorageBackedApprovalHandler(store, { notifyCallback: notify }).forMcpServer(); @@ -73,6 +73,15 @@ async function connect(options: { streaming?: boolean; background?: boolean; tra execute: () => ({ job: "ordinary" }), } as never); const executor = new core.Executor({ registry, approvalHandler: handler as never, eventEmitter: events }); + if (options.finalScope) { + executor.setPolicyEvaluator({ async evaluate() { return { decision: "require_approval" }; } }); + class Normalize extends core.Middleware { + override before(_moduleId: string, inputs: Record) { + return { ...inputs, copies: Number(inputs.copies) + 10 }; + } + } + executor.use(new Normalize()); + } const manager = options.background ? new AsyncTaskManager({ executor }) : undefined; const asyncTaskBridge = manager ? new AsyncTaskBridge(manager as never, { descriptorLookup: id => registry.getDefinition(id) as never, @@ -105,8 +114,12 @@ async function connect(options: { streaming?: boolean; background?: boolean; tra } describe.skipIf(!supportsScopedCore())("scoped approval through the MCP wire", () => { - it.each(["unary", "traced", "streamed"])("completes the %s approval lifecycle with private credential delivery", async kind => { - const target = await connect({ trace: kind === "traced", streaming: kind === "streamed" }); + it.each(["unary", "traced", "streamed", "final-unary", "final-streamed"])( + "completes the %s approval lifecycle with private credential delivery", async kind => { + const finalScope = kind.startsWith("final-"); + const streaming = kind.endsWith("streamed"); + const effective = finalScope ? { ...args, copies: 12 } : args; + const target = await connect({ trace: kind === "traced", streaming, finalScope }); const run = (arguments_ = args, resumeToken?: string) => identityStorage.run(reviewer, () => target.client.callTool({ name: moduleId, @@ -126,7 +139,7 @@ describe.skipIf(!supportsScopedCore())("scoped approval through the MCP wire", ( const { approvalId, resumeToken } = approval!; expect(JSON.stringify(pending.content)).toContain("Approval is pending"); expect(JSON.stringify(pending.content)).not.toContain(resumeToken); - expect(target.notify).toHaveBeenCalledExactlyOnceWith(approvalId, moduleId, args); + expect(target.notify).toHaveBeenCalledExactlyOnceWith(approvalId, moduleId, effective); expect(await poll(reviewer, approvalId)).toEqual({ approval_id: approvalId, status: "pending" }); expect(await poll(otherReviewer, approvalId)).toEqual({ approval_id: approvalId, status: "rejected" }); expect(await poll(null, approvalId)).toEqual({ approval_id: approvalId, status: "rejected" }); @@ -138,9 +151,9 @@ describe.skipIf(!supportsScopedCore())("scoped approval through the MCP wire", ( run(args, resumeToken), ]); expect(completions.filter(result => result.isError !== true)).toHaveLength(1); - const runner = kind === "streamed" ? target.stream : target.execute; + const runner = streaming ? target.stream : target.execute; expect(runner).toHaveBeenCalledOnce(); - expect(runner.mock.calls[0][0]).toEqual(args); + expect(runner.mock.calls[0][0]).toEqual(effective); expect(JSON.stringify(completions)).not.toContain(resumeToken); await target.events.flush(); diff --git a/toolkit/python/pyproject.toml b/toolkit/python/pyproject.toml index 4b981f78..a8103e26 100644 --- a/toolkit/python/pyproject.toml +++ b/toolkit/python/pyproject.toml @@ -23,7 +23,7 @@ keywords = [ "toolkit", ] dependencies = [ - "apcore>=0.33.0,<=1.0.0a2", + "apcore>=0.33.0,<=1.0.0a3", "pydantic>=2.0", "PyYAML>=6.0", ] diff --git a/toolkit/rust/Cargo.lock b/toolkit/rust/Cargo.lock index fa5609bd..a9165010 100644 --- a/toolkit/rust/Cargo.lock +++ b/toolkit/rust/Cargo.lock @@ -48,9 +48,9 @@ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "apcore" -version = "1.0.0-alpha.2" +version = "1.0.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e630a6f3c82ee9e01aec1f58ad14a06e21d8082414a1f4d398bce2f45b4de3" +checksum = "7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc" dependencies = [ "async-stream", "async-trait", diff --git a/toolkit/rust/Cargo.toml b/toolkit/rust/Cargo.toml index 3b7fcb24..9a995417 100644 --- a/toolkit/rust/Cargo.toml +++ b/toolkit/rust/Cargo.toml @@ -21,7 +21,7 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -apcore = { version = ">=0.33.0, <=1.0.0-alpha.2", default-features = false } +apcore = { version = ">=0.33.0, <=1.0.0-alpha.3", default-features = false } serde = { version = "1", features = ["derive"] } # `preserve_order` is required for the toolkit's byte-equivalent tabular # formatters (csv / jsonl): object key order MUST match insertion order to diff --git a/toolkit/typescript/package.json b/toolkit/typescript/package.json index c7a27c4c..403684b7 100644 --- a/toolkit/typescript/package.json +++ b/toolkit/typescript/package.json @@ -57,7 +57,7 @@ }, "dependencies": { "ajv": "^8.17.0", - "apcore-js": ">=0.33.0 <1.0.0 || 1.0.0-alpha.2", + "apcore-js": ">=0.33.0 <1.0.0 || 1.0.0-alpha.2 || 1.0.0-alpha.3", "js-yaml": "^4.3.2" }, "peerDependencies": { diff --git a/toolkit/typescript/pnpm-lock.yaml b/toolkit/typescript/pnpm-lock.yaml index 98f31559..2e362988 100644 --- a/toolkit/typescript/pnpm-lock.yaml +++ b/toolkit/typescript/pnpm-lock.yaml @@ -15,7 +15,7 @@ importers: specifier: ^8.17.0 version: 8.20.0 apcore-js: - specifier: '>=0.33.0 <1.0.0 || 1.0.0-alpha.2' + specifier: '>=0.33.0 <1.0.0 || 1.0.0-alpha.2 || 1.0.0-alpha.3' version: 0.33.0 js-yaml: specifier: ^4.3.2 From f391c511566908c1ab19d3e46b2f331c77606cd5 Mon Sep 17 00:00:00 2001 From: tercel Date: Fri, 27 Nov 2026 21:44:42 +0800 Subject: [PATCH 2/2] ci(surfaces): verify the reviewed alpha.3 Core candidate Signed-off-by: tercel --- .github/workflows/python.yml | 2 +- .github/workflows/rust.yml | 4 ++-- .github/workflows/typescript.yml | 2 +- a2a/rust/Cargo.lock | 2 +- a2a/typescript/pnpm-lock.yaml | 2 +- cli/rust/Cargo.lock | 2 +- cli/typescript/pnpm-lock.yaml | 2 +- mcp/rust/Cargo.lock | 2 +- mcp/typescript/pnpm-lock.yaml | 2 +- toolkit/rust/Cargo.lock | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index e08ba84e..9a831468 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -15,7 +15,7 @@ permissions: contents: read env: - CORE_REF: 83f627cb300a42b5c46550a04b48d18745147f21 + CORE_REF: 9ba719587d9a288c22b8b5ff2a10a187a9a21cee jobs: test: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 674c6e9d..876dad44 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,9 +22,9 @@ permissions: env: # The released lockfiles already reference these prereleases. Bootstrap CI # from the reviewed Core commit while those versions are unpublished. - CORE_REF: 83f627cb300a42b5c46550a04b48d18745147f21 + CORE_REF: 9ba719587d9a288c22b8b5ff2a10a187a9a21cee CORE_CRATE_VERSION: 1.0.0-alpha.3 - CORE_CRATE_SHA256: 7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc + CORE_CRATE_SHA256: 2813101192ceac629d58114dfafd4f6b519eb7dea2313cb253e1410a2ac52f65 jobs: source: diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 8ffc0bf4..e35a0a3d 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -15,7 +15,7 @@ permissions: contents: read env: - CORE_REF: 83f627cb300a42b5c46550a04b48d18745147f21 + CORE_REF: 9ba719587d9a288c22b8b5ff2a10a187a9a21cee jobs: test: diff --git a/a2a/rust/Cargo.lock b/a2a/rust/Cargo.lock index 7bbc12ff..dd20ae49 100644 --- a/a2a/rust/Cargo.lock +++ b/a2a/rust/Cargo.lock @@ -94,7 +94,7 @@ dependencies = [ name = "apcore" version = "1.0.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc" +checksum = "2813101192ceac629d58114dfafd4f6b519eb7dea2313cb253e1410a2ac52f65" dependencies = [ "async-stream", "async-trait", diff --git a/a2a/typescript/pnpm-lock.yaml b/a2a/typescript/pnpm-lock.yaml index 09622955..c828fa48 100644 --- a/a2a/typescript/pnpm-lock.yaml +++ b/a2a/typescript/pnpm-lock.yaml @@ -657,7 +657,7 @@ packages: resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} apcore-js@1.0.0-alpha.3: - resolution: {integrity: sha512-dRFTfw5XKeQebIGO+PhSfsr8TB/8OfaRXCPhrk3teAAFHmLlfxjeo3JUff2mkMZHbB+OoKYj6kPjVo7mLQy3BQ==} + resolution: {integrity: sha512-0zv5xlVunNaa7GhbeJsgG0q6Dd97+f3T/kFrRyhzIkVc957aX87bhWLMlhgqhg/4iFZ1ZWDXl15kxOE1xbCPqw==} engines: {node: '>=20.0.0'} peerDependencies: typescript: ^5.5.0 diff --git a/cli/rust/Cargo.lock b/cli/rust/Cargo.lock index 8838bf95..c03e5127 100644 --- a/cli/rust/Cargo.lock +++ b/cli/rust/Cargo.lock @@ -135,7 +135,7 @@ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" name = "apcore" version = "1.0.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc" +checksum = "2813101192ceac629d58114dfafd4f6b519eb7dea2313cb253e1410a2ac52f65" dependencies = [ "async-stream", "async-trait", diff --git a/cli/typescript/pnpm-lock.yaml b/cli/typescript/pnpm-lock.yaml index d2cb033d..05895b2d 100644 --- a/cli/typescript/pnpm-lock.yaml +++ b/cli/typescript/pnpm-lock.yaml @@ -732,7 +732,7 @@ packages: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} apcore-js@1.0.0-alpha.3: - resolution: {integrity: sha512-dRFTfw5XKeQebIGO+PhSfsr8TB/8OfaRXCPhrk3teAAFHmLlfxjeo3JUff2mkMZHbB+OoKYj6kPjVo7mLQy3BQ==} + resolution: {integrity: sha512-0zv5xlVunNaa7GhbeJsgG0q6Dd97+f3T/kFrRyhzIkVc957aX87bhWLMlhgqhg/4iFZ1ZWDXl15kxOE1xbCPqw==} engines: {node: '>=20.0.0'} peerDependencies: typescript: ^5.5.0 diff --git a/mcp/rust/Cargo.lock b/mcp/rust/Cargo.lock index 0c77c7c8..51f58c00 100644 --- a/mcp/rust/Cargo.lock +++ b/mcp/rust/Cargo.lock @@ -100,7 +100,7 @@ dependencies = [ name = "apcore" version = "1.0.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc" +checksum = "2813101192ceac629d58114dfafd4f6b519eb7dea2313cb253e1410a2ac52f65" dependencies = [ "async-stream", "async-trait", diff --git a/mcp/typescript/pnpm-lock.yaml b/mcp/typescript/pnpm-lock.yaml index fe19a168..77e15c81 100644 --- a/mcp/typescript/pnpm-lock.yaml +++ b/mcp/typescript/pnpm-lock.yaml @@ -620,7 +620,7 @@ packages: engines: {node: '>=8'} apcore-js@1.0.0-alpha.3: - resolution: {integrity: sha512-dRFTfw5XKeQebIGO+PhSfsr8TB/8OfaRXCPhrk3teAAFHmLlfxjeo3JUff2mkMZHbB+OoKYj6kPjVo7mLQy3BQ==} + resolution: {integrity: sha512-0zv5xlVunNaa7GhbeJsgG0q6Dd97+f3T/kFrRyhzIkVc957aX87bhWLMlhgqhg/4iFZ1ZWDXl15kxOE1xbCPqw==} engines: {node: '>=20.0.0'} peerDependencies: typescript: ^5.5.0 diff --git a/toolkit/rust/Cargo.lock b/toolkit/rust/Cargo.lock index a9165010..466d32d2 100644 --- a/toolkit/rust/Cargo.lock +++ b/toolkit/rust/Cargo.lock @@ -50,7 +50,7 @@ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" name = "apcore" version = "1.0.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7514b549b91d7beb83a0fefef9d4f365e4cb19b38f7a0664c4a814bcac4009bc" +checksum = "2813101192ceac629d58114dfafd4f6b519eb7dea2313cb253e1410a2ac52f65" dependencies = [ "async-stream", "async-trait",