machine-bridge-mcp 2.0.0 → 3.0.0-beta.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1142 -0
- package/CONTRIBUTING.md +23 -25
- package/GOVERNANCE.md +2 -2
- package/README.md +58 -20
- package/SECURITY.md +161 -120
- package/SUPPORT.md +1 -1
- package/browser-extension/broker-auth.js +83 -0
- package/browser-extension/broker-liveness.js +35 -0
- package/browser-extension/browser-error-boundary.js +96 -0
- package/browser-extension/browser-operations.js +1456 -101
- package/browser-extension/devtools-input.js +195 -34
- package/browser-extension/devtools-observation.js +429 -0
- package/browser-extension/devtools-session.js +48 -0
- package/browser-extension/manifest.json +4 -3
- package/browser-extension/page-automation.js +578 -118
- package/browser-extension/pairing-bootstrap.js +42 -0
- package/browser-extension/pairing.js +28 -12
- package/browser-extension/service-worker.js +126 -106
- package/docs/AGENT_CONTEXT.md +13 -10
- package/docs/ARCHITECTURE.md +159 -67
- package/docs/AUDIT.md +1302 -4
- package/docs/CLIENTS.md +19 -6
- package/docs/COMPUTER_USE.md +297 -0
- package/docs/ENGINEERING.md +72 -13
- package/docs/GETTING_STARTED.md +18 -20
- package/docs/LOCAL_AUTHORIZATION.md +115 -72
- package/docs/LOCAL_AUTOMATION.md +27 -21
- package/docs/LOGGING.md +40 -19
- package/docs/MANAGED_JOBS.md +37 -34
- package/docs/MULTI_ACCOUNT.md +98 -37
- package/docs/OPERATIONS.md +145 -51
- package/docs/OVERVIEW.md +14 -11
- package/docs/POLICY_REFERENCE.md +71 -3
- package/docs/PRIVACY.md +41 -2
- package/docs/PROJECT_STANDARDS.md +29 -6
- package/docs/RELEASING.md +238 -64
- package/docs/TESTING.md +150 -39
- package/docs/THREAT_MODEL.md +164 -67
- package/docs/TOOL_REFERENCE.md +653 -60
- package/docs/UPGRADING.md +78 -18
- package/native/macos/MachineBridgeBackgroundInput.swift +1051 -0
- package/native/macos/MachineBridgeBackgroundInputSmokeFixture.swift +295 -0
- package/native/macos/MachineBridgeTrustBroker.swift +233 -0
- package/package.json +94 -16
- package/scripts/accepted-candidate-tarball.mjs +77 -0
- package/scripts/candidate-runtime-store.mjs +93 -0
- package/scripts/check-plan.mjs +73 -3
- package/scripts/check-runner.mjs +129 -17
- package/scripts/commit-message-check.mjs +5 -2
- package/scripts/consumer-package-security.mjs +293 -0
- package/scripts/coverage-check.mjs +251 -15
- package/scripts/coverage-generation.mjs +41 -0
- package/scripts/coverage-range-merge.mjs +41 -0
- package/scripts/foreground-daemon-recovery.mjs +88 -0
- package/scripts/generate-policy-reference.mjs +28 -5
- package/scripts/generate-tool-reference.mjs +1 -1
- package/scripts/generate-worker-types.mjs +21 -11
- package/scripts/github-backlog.mjs +11 -10
- package/scripts/github-push.mjs +62 -16
- package/scripts/github-release-asset.mjs +58 -0
- package/scripts/github-release.mjs +241 -132
- package/scripts/global-package-installation.mjs +68 -0
- package/scripts/hardened-npm-session.mjs +42 -0
- package/scripts/install-published-prerelease.mjs +198 -0
- package/scripts/local-release-acceptance.mjs +103 -45
- package/scripts/macos-background-input-smoke.mjs +515 -0
- package/scripts/network-retry.mjs +8 -1
- package/scripts/npm-global-prefix.mjs +27 -0
- package/scripts/npm-publication-policy.mjs +17 -0
- package/scripts/official-mcp-conformance.mjs +267 -0
- package/scripts/persistent-activation-process.mjs +101 -0
- package/scripts/prepare-pinned-npm.mjs +12 -69
- package/scripts/prerelease-activation.mjs +160 -0
- package/scripts/privacy-check.mjs +14 -6
- package/scripts/promotion-digest.mjs +128 -0
- package/scripts/publish-npm.mjs +260 -0
- package/scripts/published-release.mjs +132 -0
- package/scripts/release-acceptance.mjs +62 -54
- package/scripts/release-browser-extension-store.mjs +172 -0
- package/scripts/release-candidate-manifest.mjs +52 -0
- package/scripts/release-channel.mjs +106 -0
- package/scripts/release-diagnostic.mjs +41 -0
- package/scripts/release-impact-check.mjs +12 -22
- package/scripts/release-oauth-canary-core.mjs +325 -0
- package/scripts/release-oauth-canary-evidence.mjs +100 -0
- package/scripts/release-oauth-canary.mjs +127 -0
- package/scripts/release-publication-guard.mjs +67 -0
- package/scripts/release-soak.mjs +284 -0
- package/scripts/release-state.mjs +1 -1
- package/scripts/run-checks.mjs +44 -7
- package/scripts/run-worker-dry-run.mjs +21 -0
- package/scripts/sarif-security-gate.mjs +2 -1
- package/scripts/sbom-check.mjs +106 -0
- package/scripts/start-release-candidate.mjs +267 -44
- package/scripts/syntax-check.mjs +36 -14
- package/scripts/verification-generation-guard.mjs +15 -0
- package/scripts/verification-idle-sleep-guard.mjs +37 -0
- package/scripts/verification-state.mjs +108 -0
- package/scripts/wrangler-command-lifecycle.mjs +115 -0
- package/src/local/account-access.mjs +13 -1
- package/src/local/account-admin-response.mjs +92 -0
- package/src/local/account-admin.mjs +52 -19
- package/src/local/agent-context-projection.mjs +26 -7
- package/src/local/agent-context.mjs +88 -49
- package/src/local/agent-skill-discovery.mjs +16 -5
- package/src/local/app-automation-macos-jxa.mjs +350 -0
- package/src/local/app-automation.mjs +873 -163
- package/src/local/application-capability-projection.mjs +24 -0
- package/src/local/authority-context.mjs +106 -0
- package/src/local/autostart-log-maintenance.mjs +36 -0
- package/src/local/browser-bridge-http.mjs +5 -3
- package/src/local/browser-bridge.mjs +109 -31
- package/src/local/browser-broker-auth-http.mjs +67 -0
- package/src/local/browser-broker-auth.mjs +98 -0
- package/src/local/browser-broker-routes.mjs +63 -20
- package/src/local/browser-broker-server.mjs +17 -7
- package/src/local/browser-command.mjs +79 -30
- package/src/local/browser-computer-observation-service.mjs +266 -0
- package/src/local/browser-extension-identity.mjs +50 -0
- package/src/local/browser-extension-path.mjs +22 -0
- package/src/local/browser-extension-protocol.mjs +50 -11
- package/src/local/browser-operation-service.mjs +147 -117
- package/src/local/browser-pairing-grant.mjs +109 -0
- package/src/local/browser-pairing-http.mjs +36 -0
- package/src/local/browser-pairing-launch.mjs +58 -0
- package/src/local/browser-pairing-store.mjs +85 -48
- package/src/local/browser-request-registry.mjs +40 -14
- package/src/local/browser-request-settlement.mjs +78 -0
- package/src/local/browser-resource-input.mjs +74 -0
- package/src/local/browser-trusted-input-health.mjs +63 -0
- package/src/local/call-authority.mjs +21 -0
- package/src/local/call-capacity.mjs +45 -0
- package/src/local/call-registry-drain.mjs +54 -0
- package/src/local/call-registry.mjs +30 -15
- package/src/local/capability-observer.mjs +5 -0
- package/src/local/capability-ranking.mjs +3 -2
- package/src/local/child-process-settlement.mjs +132 -0
- package/src/local/cli-account-admin.mjs +40 -6
- package/src/local/cli-activate.mjs +162 -0
- package/src/local/cli-local-admin.mjs +20 -45
- package/src/local/cli-options.mjs +12 -13
- package/src/local/cli-ready-output.mjs +52 -0
- package/src/local/cli-service.mjs +91 -11
- package/src/local/cli.mjs +232 -150
- package/src/local/computer-use-application-observation.mjs +224 -0
- package/src/local/computer-use-arguments.mjs +270 -0
- package/src/local/computer-use-deadline.mjs +50 -0
- package/src/local/computer-use-dispatch-settlement.mjs +40 -0
- package/src/local/computer-use-expectation.mjs +171 -0
- package/src/local/computer-use-observation.mjs +769 -0
- package/src/local/computer-use-recovery.mjs +82 -0
- package/src/local/computer-use-result-budget.mjs +145 -0
- package/src/local/computer-use-snapshot-store.mjs +67 -0
- package/src/local/computer-use.mjs +2255 -0
- package/src/local/daemon-http-relay-auth.mjs +26 -0
- package/src/local/daemon-http-relay-connection.mjs +298 -0
- package/src/local/daemon-http-relay-request.mjs +64 -0
- package/src/local/daemon-http-relay-sequence.mjs +49 -0
- package/src/local/daemon-process.mjs +40 -7
- package/src/local/delegated-process-sandbox.mjs +148 -0
- package/src/local/device-identity.mjs +156 -49
- package/src/local/device-root-provider.mjs +81 -0
- package/src/local/directory-metadata.mjs +47 -0
- package/src/local/doctor-reporting.mjs +23 -0
- package/src/local/durable-process-spec.mjs +80 -0
- package/src/local/errors.mjs +25 -15
- package/src/local/exclusive-file.mjs +74 -26
- package/src/local/execution-limits.mjs +9 -0
- package/src/local/execution-routing.mjs +276 -0
- package/src/local/execution-surface.mjs +23 -0
- package/src/local/file-mutation-coordinator.mjs +47 -0
- package/src/local/file-snapshot-preservation.mjs +24 -0
- package/src/local/filesystem-identity.mjs +54 -0
- package/src/local/fixed-process-environment.mjs +21 -0
- package/src/local/full-access-test.mjs +31 -13
- package/src/local/git-commit.mjs +69 -0
- package/src/local/git-config-safety.mjs +55 -0
- package/src/local/git-log-parser.mjs +41 -0
- package/src/local/git-metadata-boundary.mjs +77 -0
- package/src/local/git-metadata-tree-safety.mjs +59 -0
- package/src/local/git-operation-state.mjs +19 -0
- package/src/local/git-service.mjs +165 -30
- package/src/local/hardened-npm-download-timeout.mjs +46 -0
- package/src/local/hardened-npm-download.mjs +109 -0
- package/src/local/hardened-npm-extract.mjs +20 -0
- package/src/local/hardened-npm-verification.mjs +104 -0
- package/src/local/hardened-npm.mjs +199 -0
- package/src/local/job-runner.mjs +244 -89
- package/src/local/lifecycle.mjs +6 -0
- package/src/local/log.mjs +19 -45
- package/src/local/macos-background-input.mjs +398 -0
- package/src/local/macos-idle-sleep-assertion.mjs +65 -0
- package/src/local/macos-trust-broker.mjs +404 -0
- package/src/local/managed-job-cancellation.mjs +42 -0
- package/src/local/managed-job-capacity.mjs +16 -0
- package/src/local/managed-job-directory-generation.mjs +60 -0
- package/src/local/managed-job-directory.mjs +75 -0
- package/src/local/managed-job-durable-process.mjs +49 -0
- package/src/local/managed-job-lock.mjs +46 -14
- package/src/local/managed-job-plan.mjs +38 -14
- package/src/local/managed-job-projection.mjs +23 -15
- package/src/local/managed-job-retention.mjs +128 -0
- package/src/local/managed-job-runner-claim.mjs +70 -0
- package/src/local/managed-job-runner.mjs +35 -10
- package/src/local/managed-job-storage.mjs +22 -6
- package/src/local/managed-job-terminal-maintenance.mjs +40 -0
- package/src/local/managed-job-terminal.mjs +150 -0
- package/src/local/managed-jobs.mjs +424 -287
- package/src/local/npm-cli.mjs +42 -0
- package/src/local/npm-environment.mjs +37 -0
- package/src/local/operation-authorization.mjs +68 -324
- package/src/local/operation-risk.mjs +51 -4
- package/src/local/owner-state-lock.mjs +118 -0
- package/src/local/package-identity.mjs +9 -0
- package/src/local/patch.mjs +20 -18
- package/src/local/path-inspection.mjs +23 -0
- package/src/local/policy.mjs +19 -0
- package/src/local/private-toolchain-integrity.mjs +54 -0
- package/src/local/process-execution.mjs +87 -75
- package/src/local/process-foreground-timeout.mjs +50 -0
- package/src/local/process-identity.mjs +41 -7
- package/src/local/process-nonreplayable-settlement.mjs +50 -0
- package/src/local/process-result-projection.mjs +22 -0
- package/src/local/process-session-events.mjs +47 -0
- package/src/local/process-session-remote-activity.mjs +10 -0
- package/src/local/process-session-termination.mjs +73 -0
- package/src/local/process-sessions.mjs +144 -112
- package/src/local/process-tracker.mjs +140 -13
- package/src/local/process-tree-ownership-types.d.ts +37 -0
- package/src/local/process-tree-ownership.mjs +57 -0
- package/src/local/process-tree-signal.mjs +34 -0
- package/src/local/process-tree-snapshot.mjs +77 -0
- package/src/local/process-tree-supervisor.mjs +69 -0
- package/src/local/process-tree.mjs +11 -53
- package/src/local/project-metadata.mjs +19 -6
- package/src/local/relay-call-recovery.mjs +58 -38
- package/src/local/relay-connection-classification.mjs +131 -0
- package/src/local/relay-connection-support.mjs +91 -0
- package/src/local/relay-connection.mjs +179 -272
- package/src/local/relay-diagnostics.mjs +91 -0
- package/src/local/relay-heartbeat.mjs +119 -0
- package/src/local/relay-liveness.mjs +109 -0
- package/src/local/relay-peer-diagnostics.mjs +29 -0
- package/src/local/release-runtime-lock.mjs +18 -0
- package/src/local/remote-activity-idle-sleep-guard.mjs +77 -0
- package/src/local/remote-configuration.mjs +48 -0
- package/src/local/resilient-relay-connection.mjs +178 -0
- package/src/local/resource-admission-diagnostics.mjs +52 -0
- package/src/local/resource-admission-policy.mjs +115 -0
- package/src/local/resource-admission.mjs +339 -0
- package/src/local/resource-build-root.mjs +83 -0
- package/src/local/resource-cargo-concurrency.mjs +38 -0
- package/src/local/resource-cmake-concurrency.mjs +42 -0
- package/src/local/resource-command-concurrency.mjs +37 -0
- package/src/local/resource-command-profile.mjs +176 -0
- package/src/local/resource-coordinator-accounting.mjs +21 -0
- package/src/local/resource-cpu-window.mjs +20 -0
- package/src/local/resource-disk-headroom.mjs +13 -0
- package/src/local/resource-elastic-memory.mjs +19 -0
- package/src/local/resource-elastic-request.mjs +36 -0
- package/src/local/resource-foreground-wait.mjs +29 -0
- package/src/local/resource-go-concurrency.mjs +43 -0
- package/src/local/resource-gradle-concurrency.mjs +57 -0
- package/src/local/resource-host-cache.mjs +39 -0
- package/src/local/resource-host-darwin.mjs +54 -0
- package/src/local/resource-host-linux.mjs +35 -0
- package/src/local/resource-host-sample-file.mjs +23 -0
- package/src/local/resource-host-snapshot.mjs +99 -0
- package/src/local/resource-lease-accounting.mjs +119 -0
- package/src/local/resource-light-command.mjs +6 -0
- package/src/local/resource-make-concurrency.mjs +42 -0
- package/src/local/resource-maven-concurrency.mjs +38 -0
- package/src/local/resource-ninja-command-concurrency.mjs +20 -0
- package/src/local/resource-ninja-concurrency.mjs +28 -0
- package/src/local/resource-operations.mjs +26 -10
- package/src/local/resource-pressure.mjs +67 -0
- package/src/local/resource-probe-command.mjs +35 -0
- package/src/local/resource-process-admission.mjs +59 -0
- package/src/local/resource-process-ancestry-cache.mjs +43 -0
- package/src/local/resource-process-ancestry.mjs +32 -0
- package/src/local/resource-process-priority.mjs +15 -0
- package/src/local/resource-project-key.mjs +53 -0
- package/src/local/resource-pytest-concurrency.mjs +33 -0
- package/src/local/resource-release-control-classification.mjs +14 -0
- package/src/local/resource-release-control-executable.mjs +70 -0
- package/src/local/resource-release-control-workspace.mjs +41 -0
- package/src/local/resource-request-contract.mjs +30 -0
- package/src/local/resource-script-classification.mjs +44 -0
- package/src/local/resource-shell-analysis.mjs +58 -0
- package/src/local/resource-staging-recovery.mjs +97 -0
- package/src/local/resource-swift-concurrency.mjs +31 -0
- package/src/local/resource-transaction-lock.mjs +189 -0
- package/src/local/resource-wait.mjs +48 -0
- package/src/local/resource-waiters.mjs +139 -0
- package/src/local/resource-xcode-command.mjs +7 -0
- package/src/local/resource-xcode-concurrency.mjs +34 -0
- package/src/local/resource-xcode-non-build.mjs +19 -0
- package/src/local/runtime-activation.mjs +700 -0
- package/src/local/runtime-activity-projection.mjs +48 -0
- package/src/local/runtime-capabilities.mjs +48 -15
- package/src/local/runtime-diagnostic-state.mjs +14 -0
- package/src/local/runtime-diagnostics.mjs +40 -13
- package/src/local/runtime-info-projection.mjs +60 -0
- package/src/local/runtime-info-relay-projection.mjs +21 -0
- package/src/local/runtime-paths.mjs +2 -1
- package/src/local/runtime-process-routing.mjs +33 -0
- package/src/local/runtime-relay-connection-options.mjs +44 -0
- package/src/local/runtime-relay-control.mjs +98 -0
- package/src/local/runtime-relay.mjs +26 -50
- package/src/local/runtime-reporting.mjs +37 -21
- package/src/local/runtime-resource-service.mjs +77 -0
- package/src/local/runtime-tool-handlers.mjs +13 -10
- package/src/local/runtime.mjs +244 -208
- package/src/local/secure-file.mjs +73 -20
- package/src/local/security-audit-dispatch.mjs +35 -0
- package/src/local/security-audit-log.mjs +215 -0
- package/src/local/security-audit-state.mjs +139 -0
- package/src/local/security-audit-storage.mjs +135 -0
- package/src/local/security-audit-warning.mjs +31 -0
- package/src/local/security-audit-worker.mjs +87 -0
- package/src/local/service-convergence.mjs +42 -1
- package/src/local/service-definition.mjs +24 -0
- package/src/local/service-environment.mjs +18 -10
- package/src/local/service-owner.mjs +146 -0
- package/src/local/service-ownership.mjs +17 -0
- package/src/local/service-restart-handoff.mjs +64 -0
- package/src/local/service-restart-scheduler.mjs +49 -0
- package/src/local/service-runtime-convergence.mjs +52 -0
- package/src/local/service-runtime.mjs +105 -0
- package/src/local/service-status.mjs +60 -0
- package/src/local/service.mjs +385 -92
- package/src/local/shell.mjs +39 -19
- package/src/local/ssh-key.mjs +158 -42
- package/src/local/state-inventory.mjs +50 -24
- package/src/local/state-owner-lock-inventory.mjs +23 -0
- package/src/local/state-root-owned-namespaces.mjs +83 -0
- package/src/local/state-root-retirement.mjs +89 -0
- package/src/local/state.mjs +386 -96
- package/src/local/stdio.mjs +96 -66
- package/src/local/support-state-projection.mjs +30 -0
- package/src/local/system-network-route.mjs +76 -0
- package/src/local/systemd-removal.mjs +20 -0
- package/src/local/tool-executor.mjs +85 -20
- package/src/local/tool-result-boundary.mjs +51 -0
- package/src/local/toolchain-operation-lock.mjs +41 -0
- package/src/local/tools.mjs +7 -5
- package/src/local/trusted-executable.mjs +53 -0
- package/src/local/trusted-git-executable.mjs +34 -0
- package/src/local/trusted-github-cli.mjs +24 -0
- package/src/local/windows-service-convergence.mjs +49 -0
- package/src/local/windows-service.mjs +52 -45
- package/src/local/worker-deployment-fingerprint.mjs +102 -0
- package/src/local/worker-deployment.mjs +48 -60
- package/src/local/worker-health.mjs +12 -4
- package/src/local/worker-secret-file.mjs +37 -17
- package/src/local/workspace-file-service.mjs +156 -239
- package/src/local/workspace-file-transaction.mjs +189 -0
- package/src/local/workspace-search.mjs +55 -0
- package/src/local/wrangler-toolchain/package-lock.json +1505 -0
- package/src/local/wrangler-toolchain/package.json +23 -0
- package/src/local/wrangler-toolchain-verification.mjs +135 -0
- package/src/local/wrangler-toolchain.mjs +188 -0
- package/src/shared/access-contract.json +7 -1
- package/src/shared/activation-recovery.mjs +49 -0
- package/src/shared/admin-auth.d.mts +2 -1
- package/src/shared/admin-auth.mjs +3 -3
- package/src/shared/authority-revocation.d.mts +9 -0
- package/src/shared/authority-revocation.mjs +28 -0
- package/src/shared/daemon-auth.d.mts +11 -0
- package/src/shared/daemon-auth.mjs +17 -0
- package/src/shared/device-session-auth.d.mts +20 -0
- package/src/shared/device-session-auth.mjs +51 -0
- package/src/shared/foreground-timeout.d.mts +15 -0
- package/src/shared/foreground-timeout.mjs +70 -0
- package/src/shared/log-redaction.d.mts +9 -0
- package/src/shared/log-redaction.mjs +51 -0
- package/src/shared/mcp-protocol.d.mts +27 -0
- package/src/shared/mcp-protocol.mjs +275 -0
- package/src/shared/project-overview-projection.d.mts +4 -0
- package/src/shared/project-overview-projection.mjs +96 -0
- package/src/shared/relay-contract.json +28 -0
- package/src/shared/result-projection.d.mts +2 -1
- package/src/shared/result-projection.mjs +13 -2
- package/src/shared/server-metadata.json +15 -9
- package/src/shared/tool-argument-validation.d.mts +17 -0
- package/src/shared/tool-argument-validation.mjs +325 -0
- package/src/shared/tool-call-capacity.d.mts +41 -0
- package/src/shared/tool-call-capacity.mjs +59 -0
- package/src/shared/tool-catalog.json +626 -57
- package/src/worker/access.ts +12 -0
- package/src/worker/account-admin.ts +55 -33
- package/src/worker/authority-revocations.ts +174 -0
- package/src/worker/authority.ts +52 -6
- package/src/worker/daemon-auth.ts +49 -68
- package/src/worker/daemon-channel.ts +36 -0
- package/src/worker/daemon-http-auth.ts +63 -0
- package/src/worker/daemon-http-channel.ts +120 -0
- package/src/worker/daemon-http-controller.ts +163 -0
- package/src/worker/daemon-http-protocol.ts +62 -0
- package/src/worker/daemon-http-registry.ts +82 -0
- package/src/worker/daemon-last-observation.ts +30 -0
- package/src/worker/daemon-liveness.ts +8 -6
- package/src/worker/daemon-ready-dispatch.ts +17 -0
- package/src/worker/daemon-ready-messages.ts +73 -0
- package/src/worker/daemon-ready-waiters.ts +79 -0
- package/src/worker/daemon-recovery-budget.ts +13 -0
- package/src/worker/daemon-registry.ts +58 -0
- package/src/worker/daemon-relay-diagnostics.ts +127 -0
- package/src/worker/daemon-socket-attachment.ts +55 -0
- package/src/worker/daemon-sockets.ts +72 -62
- package/src/worker/daemon-status.ts +38 -0
- package/src/worker/device-session-verifier.ts +129 -0
- package/src/worker/dpop.ts +157 -0
- package/src/worker/durable-process-timeout.ts +29 -0
- package/src/worker/errors.ts +57 -0
- package/src/worker/http.ts +112 -26
- package/src/worker/index.ts +446 -440
- package/src/worker/mcp-access.ts +57 -0
- package/src/worker/mcp-controller.ts +188 -0
- package/src/worker/mcp-http-accept.ts +11 -0
- package/src/worker/mcp-http-contract.ts +322 -0
- package/src/worker/mcp-initialization-compat.ts +141 -0
- package/src/worker/mcp-jsonrpc.ts +11 -29
- package/src/worker/mcp-removed-protocol.ts +17 -0
- package/src/worker/mcp-response-proxy.ts +135 -0
- package/src/worker/mcp-response-stream.ts +65 -0
- package/src/worker/mcp-stale-schema-compat.ts +57 -0
- package/src/worker/mcp-stream-proxy-contract.ts +48 -0
- package/src/worker/mcp-tool-call-input.ts +23 -0
- package/src/worker/nonce-store.ts +33 -35
- package/src/worker/oauth-authorization-page.ts +21 -1
- package/src/worker/oauth-client-admin.ts +52 -0
- package/src/worker/oauth-client-contract.ts +38 -0
- package/src/worker/oauth-controller.ts +107 -47
- package/src/worker/oauth-field-contract.ts +31 -0
- package/src/worker/oauth-record-contract.ts +7 -0
- package/src/worker/oauth-refresh-authority.ts +27 -0
- package/src/worker/oauth-refresh-exchange.ts +162 -0
- package/src/worker/oauth-refresh-families.ts +130 -27
- package/src/worker/oauth-refresh-persistence.ts +116 -0
- package/src/worker/oauth-state.ts +33 -18
- package/src/worker/oauth-store-validation.ts +131 -0
- package/src/worker/oauth-token-derivation.ts +33 -0
- package/src/worker/oauth-token-issuance.ts +119 -0
- package/src/worker/oauth-tokens.ts +56 -190
- package/src/worker/observability.ts +38 -5
- package/src/worker/pending-admission.ts +15 -0
- package/src/worker/pending-call-capacity.ts +108 -0
- package/src/worker/pending-call-contract.ts +42 -5
- package/src/worker/pending-call-deadlines.ts +75 -0
- package/src/worker/pending-calls.ts +131 -125
- package/src/worker/runtime-alarm-storage.ts +37 -0
- package/src/worker/runtime-alarm.ts +136 -0
- package/src/worker/server-info-activity.ts +36 -0
- package/src/worker/server-info-tool-delivery.ts +15 -0
- package/src/worker/server-info.ts +168 -0
- package/src/worker/tool-catalog.ts +47 -1
- package/src/worker/tool-timeout.ts +75 -14
- package/src/worker/websocket-protocol.ts +26 -2
- package/src/worker/worker-edge-guard.ts +90 -0
- package/src/worker/worker-edge-log.ts +65 -0
- package/src/worker/worker-entry.ts +52 -0
- package/src/worker/worker-mcp-config.ts +23 -0
- package/src/worker/worker-metadata.ts +48 -0
- package/src/worker/worker-rate-limit-key.ts +30 -0
- package/src/worker/worker-runtime-config.ts +20 -0
- package/src/worker/worker-static-routes.ts +54 -0
- package/src/worker/worker-task-lifetime.ts +18 -0
- package/tsconfig.local.json +17 -1
- package/wrangler.jsonc +13 -0
- package/src/local/cli-approval.mjs +0 -117
- package/src/local/operation-state-lock.mjs +0 -92
- package/src/worker/mcp-session.ts +0 -72
package/docs/OVERVIEW.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# System overview
|
|
2
2
|
|
|
3
|
-
Machine Bridge is one local authority surface with two MCP transports. The architecture is organized around
|
|
3
|
+
Machine Bridge is one local authority surface with two MCP transports. The architecture is organized around four independent questions:
|
|
4
4
|
|
|
5
5
|
1. **Who may request an operation?** Remote OAuth account/client identity and role, or the local process identity that launched stdio.
|
|
6
6
|
2. **Which tools are exposed?** The shared tool catalog, policy profile, and account-role intersection.
|
|
7
|
-
3. **Is this remote effect
|
|
7
|
+
3. **Is this remote effect inside the current authority?** The daemon ceiling, account role, trusted client, account version, refresh family, operation invariants, and object owner must all agree.
|
|
8
8
|
4. **What can an authorized tool actually do?** The local runtime, workspace/path rules, operating-system user authority, and platform security controls.
|
|
9
9
|
|
|
10
10
|
Transport authentication does not create an operating-system sandbox. The local daemon executes with the authority of its OS user.
|
|
@@ -15,7 +15,7 @@ Transport authentication does not create an operating-system sandbox. The local
|
|
|
15
15
|
flowchart LR
|
|
16
16
|
HC[Hosted MCP client] -->|HTTPS + OAuth 2.1 / PKCE| W[Cloudflare Worker]
|
|
17
17
|
W --> DO[Durable Object room]
|
|
18
|
-
DO -->|P-256
|
|
18
|
+
DO -->|root-certified ephemeral P-256 session| R[LocalRuntime]
|
|
19
19
|
|
|
20
20
|
LC[Local MCP client] -->|stdio| S[stdio adapter]
|
|
21
21
|
S --> R
|
|
@@ -40,11 +40,11 @@ flowchart LR
|
|
|
40
40
|
|
|
41
41
|
### Remote transport
|
|
42
42
|
|
|
43
|
-
1. The Worker validates OAuth client, token, account state, role, resource binding, and MCP
|
|
44
|
-
2. The Worker
|
|
45
|
-
3. The Durable Object relays a bounded tool envelope carrying account
|
|
43
|
+
1. The Worker validates OAuth client, token, account state, role, resource binding, and the MCP request/version/media contract.
|
|
44
|
+
2. The Worker exposes a stable account-role discovery catalog, then independently intersects each execution with the current end-to-end-ready daemon capability ceiling.
|
|
45
|
+
3. The Durable Object relays a bounded tool envelope carrying account, account-version, OAuth-client, refresh-family, and role identity over the root-certified ephemeral daemon socket.
|
|
46
46
|
4. The local runtime revalidates account authorization, policy, call lifecycle, timeout, and cancellation.
|
|
47
|
-
5. The local
|
|
47
|
+
5. The local authority gate permits work only inside the immutable role ceiling. Consequential effects are classified for hard enforcement and audit; they never create a temporary elevation path.
|
|
48
48
|
6. The selected local service executes with the daemon OS user's authority.
|
|
49
49
|
|
|
50
50
|
The Worker never receives ambient filesystem or process authority. It receives only explicit request/result messages.
|
|
@@ -68,23 +68,23 @@ Local and Worker code consume these contracts. Generated references and drift te
|
|
|
68
68
|
`LocalRuntime` is an orchestrator, not a low-level implementation module. It composes:
|
|
69
69
|
|
|
70
70
|
- policy and account authorization;
|
|
71
|
-
-
|
|
71
|
+
- request-scoped effective authority, hard role ceilings, operation classification, and principal-bound object ownership;
|
|
72
72
|
- call registration, timeout, cancellation, and observability;
|
|
73
73
|
- workspace and path services;
|
|
74
74
|
- direct and shell process execution;
|
|
75
75
|
- Git operations;
|
|
76
76
|
- managed jobs and local resources;
|
|
77
77
|
- Agent context and capability resolution;
|
|
78
|
-
- application and
|
|
78
|
+
- application/browser automation and snapshot-bound Computer Use;
|
|
79
79
|
- remote relay adaptation.
|
|
80
80
|
|
|
81
81
|
Low-level responsibilities remain in focused modules. Architecture tests enforce an acyclic local import graph, domain/adapter direction, and module-size budgets. Behavior and fault-injection tests remain authoritative; source-shape checks are supplementary.
|
|
82
82
|
|
|
83
83
|
## State and lifecycle
|
|
84
84
|
|
|
85
|
-
Each canonical workspace has independent profile state, Worker identity,
|
|
85
|
+
Each canonical workspace has independent profile state, Worker identity, trusted clients, account/token state, one-time obsolete-lease cleanup state, audit-chain state, locks, service metadata, and managed jobs. State mutations use owner-only files where supported, bounded reads, atomic replacement, and process-identity-aware locks.
|
|
86
86
|
|
|
87
|
-
The relay distinguishes signed preflight, challenge authentication, readiness probing, and active service. A candidate daemon must prove possession of the
|
|
87
|
+
The relay distinguishes a root-certified ephemeral session, signed preflight, challenge authentication, readiness probing, and active service. A candidate daemon must prove possession of the certified session key and complete an end-to-end probe before replacing an incumbent. A transient socket loss detaches ordinary calls for the bounded same-daemon reconnect window; only explicit cancellation, timeout, reconnect-grace expiry, runtime shutdown, or a non-recoverable daemon replacement terminates their local process trees.
|
|
88
88
|
|
|
89
89
|
Managed jobs use a separate durable lifecycle. Their plans are integrity-bound, runners are process-identity checked, transitions are lock-protected, terminal plans are scrubbed, and recovery is bounded.
|
|
90
90
|
|
|
@@ -94,6 +94,8 @@ The local browser broker binds only to loopback and authenticates the packaged e
|
|
|
94
94
|
|
|
95
95
|
The extension controls the Chromium profile into which it is loaded. Machine Bridge does not launch, isolate, or prove the identity of that profile. Browser cookies, sessions, tabs, and page content therefore remain part of the local user's browser authority.
|
|
96
96
|
|
|
97
|
+
Computer Use is a higher-level state/verification layer over these existing browser and application backends, not a second automation engine. `computer_observe` publishes bounded process-local snapshot authority with semantic evidence and optional native image content; `computer_act` consumes the exact snapshot once, revalidates the target, dispatches no more than once, and returns post-state plus separate dispatch/effect settlement. Snapshot-bound points never become caller-supplied raw CDP or unrestricted pixel APIs.
|
|
98
|
+
|
|
97
99
|
## Verification layers
|
|
98
100
|
|
|
99
101
|
The repository uses several complementary layers:
|
|
@@ -111,6 +113,7 @@ The repository uses several complementary layers:
|
|
|
111
113
|
## Read next
|
|
112
114
|
|
|
113
115
|
- [Architecture](ARCHITECTURE.md) for detailed invariants and protocol flow
|
|
116
|
+
- [Computer Use](COMPUTER_USE.md) for snapshot identity, verified UI actions, visual grounding, and retry settlement
|
|
114
117
|
- [Threat model](THREAT_MODEL.md) for assets, attackers, non-goals, and residual risks
|
|
115
118
|
- [Security policy](../SECURITY.md) for reporting and supported security boundaries
|
|
116
119
|
- [Engineering](ENGINEERING.md) for implementation rules
|
package/docs/POLICY_REFERENCE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Policy reference
|
|
2
2
|
|
|
3
|
-
> Generated from `src/shared/policy-contract.json` and `src/shared/tool-catalog.json`. Do not edit this file manually.
|
|
3
|
+
> Generated from `src/shared/policy-contract.json`, `src/shared/access-contract.json`, and `src/shared/tool-catalog.json`. Do not edit this file manually.
|
|
4
4
|
|
|
5
5
|
Policy revision: **5**. Default profile: **full**.
|
|
6
6
|
|
|
@@ -25,7 +25,9 @@ Policy revision: **5**. Default profile: **full**.
|
|
|
25
25
|
| `shell-exec` | exec in shell |
|
|
26
26
|
| `full` | profile = full, write, exec in shell, unrestricted paths = true, minimal env = false, absolute paths = true |
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Local policy tool access
|
|
29
|
+
|
|
30
|
+
This table describes the local daemon policy ceiling. Remote account roles apply an additional authorization overlay shown below.
|
|
29
31
|
|
|
30
32
|
| Tool | Availability | review | edit | agent | full |
|
|
31
33
|
|---|---|---|---|---|---|
|
|
@@ -42,10 +44,13 @@ Policy revision: **5**. Default profile: **full**.
|
|
|
42
44
|
| `browser_upload_files` | `full` | no | no | no | yes |
|
|
43
45
|
| `browser_wait` | `full` | no | no | no | yes |
|
|
44
46
|
| `cancel_job` | `write` | no | yes | yes | yes |
|
|
47
|
+
| `computer_act` | `full` | no | no | no | yes |
|
|
48
|
+
| `computer_observe` | `full` | no | no | no | yes |
|
|
45
49
|
| `diagnose_runtime` | `always` | yes | yes | yes | yes |
|
|
46
50
|
| `edit_file` | `write` | no | yes | yes | yes |
|
|
47
51
|
| `exec_command` | `shell-exec` | no | no | no | yes |
|
|
48
52
|
| `generate_ssh_key_resource` | `full` | no | no | no | yes |
|
|
53
|
+
| `git_commit` | `direct-exec` | no | no | yes | yes |
|
|
49
54
|
| `git_diff` | `always` | yes | yes | yes | yes |
|
|
50
55
|
| `git_log` | `always` | yes | yes | yes | yes |
|
|
51
56
|
| `git_show` | `always` | yes | yes | yes | yes |
|
|
@@ -55,7 +60,7 @@ Policy revision: **5**. Default profile: **full**.
|
|
|
55
60
|
| `list_dir` | `always` | yes | yes | yes | yes |
|
|
56
61
|
| `list_files` | `always` | yes | yes | yes | yes |
|
|
57
62
|
| `list_jobs` | `always` | yes | yes | yes | yes |
|
|
58
|
-
| `list_local_applications` | `
|
|
63
|
+
| `list_local_applications` | `always` | yes | yes | yes | yes |
|
|
59
64
|
| `list_local_commands` | `always` | yes | yes | yes | yes |
|
|
60
65
|
| `list_local_resources` | `always` | yes | yes | yes | yes |
|
|
61
66
|
| `list_local_skills` | `always` | yes | yes | yes | yes |
|
|
@@ -81,6 +86,69 @@ Policy revision: **5**. Default profile: **full**.
|
|
|
81
86
|
| `write_file` | `write` | no | yes | yes | yes |
|
|
82
87
|
| `write_process` | `direct-exec` | no | no | yes | yes |
|
|
83
88
|
|
|
89
|
+
## Remote account-role tool access
|
|
90
|
+
|
|
91
|
+
Account-access revision: **4**. Default role: **reviewer**. Remote effective authority is the intersection of this account-role ceiling with the connected daemon policy/tool ceiling; the MCP host may expose a further subset.
|
|
92
|
+
|
|
93
|
+
| Tool | reviewer | editor | operator | owner |
|
|
94
|
+
|---|---|---|---|---|
|
|
95
|
+
| `agent_context` | yes | yes | yes | yes |
|
|
96
|
+
| `apply_patch` | no | yes | yes | yes |
|
|
97
|
+
| `browser_action` | no | no | no | yes |
|
|
98
|
+
| `browser_fill_form` | no | no | no | yes |
|
|
99
|
+
| `browser_get_source` | no | no | no | yes |
|
|
100
|
+
| `browser_inspect_page` | no | no | no | yes |
|
|
101
|
+
| `browser_list_tabs` | no | no | no | yes |
|
|
102
|
+
| `browser_manage_tabs` | no | no | no | yes |
|
|
103
|
+
| `browser_screenshot` | no | no | no | yes |
|
|
104
|
+
| `browser_status` | no | no | no | yes |
|
|
105
|
+
| `browser_upload_files` | no | no | no | yes |
|
|
106
|
+
| `browser_wait` | no | no | no | yes |
|
|
107
|
+
| `cancel_job` | no | yes | yes | yes |
|
|
108
|
+
| `computer_act` | no | no | no | yes |
|
|
109
|
+
| `computer_observe` | no | no | no | yes |
|
|
110
|
+
| `diagnose_runtime` | no | no | no | yes |
|
|
111
|
+
| `edit_file` | no | yes | yes | yes |
|
|
112
|
+
| `exec_command` | no | no | no | yes |
|
|
113
|
+
| `generate_ssh_key_resource` | no | no | no | yes |
|
|
114
|
+
| `git_commit` | no | no | yes | yes |
|
|
115
|
+
| `git_diff` | yes | yes | yes | yes |
|
|
116
|
+
| `git_log` | yes | yes | yes | yes |
|
|
117
|
+
| `git_show` | yes | yes | yes | yes |
|
|
118
|
+
| `git_status` | yes | yes | yes | yes |
|
|
119
|
+
| `inspect_local_application` | no | no | no | yes |
|
|
120
|
+
| `kill_process` | no | no | yes | yes |
|
|
121
|
+
| `list_dir` | yes | yes | yes | yes |
|
|
122
|
+
| `list_files` | yes | yes | yes | yes |
|
|
123
|
+
| `list_jobs` | yes | yes | yes | yes |
|
|
124
|
+
| `list_local_applications` | yes | yes | yes | yes |
|
|
125
|
+
| `list_local_commands` | yes | yes | yes | yes |
|
|
126
|
+
| `list_local_resources` | no | no | no | yes |
|
|
127
|
+
| `list_local_skills` | yes | yes | yes | yes |
|
|
128
|
+
| `list_roots` | yes | yes | yes | yes |
|
|
129
|
+
| `load_local_skill` | yes | yes | yes | yes |
|
|
130
|
+
| `open_local_application` | no | no | no | yes |
|
|
131
|
+
| `operate_local_application` | no | no | no | yes |
|
|
132
|
+
| `pair_browser_extension` | no | no | no | yes |
|
|
133
|
+
| `project_overview` | yes | yes | yes | yes |
|
|
134
|
+
| `read_file` | yes | yes | yes | yes |
|
|
135
|
+
| `read_job` | yes | yes | yes | yes |
|
|
136
|
+
| `read_process` | no | no | yes | yes |
|
|
137
|
+
| `resolve_task_capabilities` | yes | yes | yes | yes |
|
|
138
|
+
| `run_local_command` | no | no | yes | yes |
|
|
139
|
+
| `run_process` | no | no | yes | yes |
|
|
140
|
+
| `search_text` | yes | yes | yes | yes |
|
|
141
|
+
| `server_info` | yes | yes | yes | yes |
|
|
142
|
+
| `session_bootstrap` | yes | yes | yes | yes |
|
|
143
|
+
| `stage_job` | no | no | no | yes |
|
|
144
|
+
| `start_job` | no | no | no | yes |
|
|
145
|
+
| `start_process` | no | no | yes | yes |
|
|
146
|
+
| `view_image` | yes | yes | yes | yes |
|
|
147
|
+
| `write_file` | no | yes | yes | yes |
|
|
148
|
+
| `write_process` | no | no | yes | yes |
|
|
149
|
+
|
|
150
|
+
Owner-only remote tools: `diagnose_runtime`, `list_local_resources`, `stage_job`, `start_job`. Their local availability class is unchanged; the extra restriction applies only to authenticated remote account roles.
|
|
151
|
+
|
|
84
152
|
## Enforcement contract
|
|
85
153
|
|
|
86
154
|
The local runtime and Cloudflare Worker both load the same policy contract. Tool advertisement and execution authorization use the catalog availability class; manager-level checks call the same gate rather than reimplementing profile logic.
|
package/docs/PRIVACY.md
CHANGED
|
@@ -13,10 +13,14 @@ npm run privacy:history
|
|
|
13
13
|
|
|
14
14
|
`privacy:check` scans tracked and unignored new UTF-8 files and relative names for generic/encrypted/algorithm-specific private-key headers, AWS/GitHub/GitLab/npm/Slack/Google/live-payment/API token forms, JWT-shaped bearer values, embedded-credential URLs, absolute user-home paths, non-example email/`user@host` identifiers, credential-shaped filenames, and locally configured private identifiers. A tracked `.npmrc` is parsed: non-secret repository settings such as `engine-strict=true` are allowed, while authentication/identity keys, environment interpolation, and embedded credentials fail closed. Publication-surface symbolic links are rejected rather than followed. Binary, invalid UTF-8, and files above the bounded scanner limit require explicit manual review instead of being silently skipped. Findings report only file, line, and rule; the matched value is never printed.
|
|
15
15
|
|
|
16
|
+
Operational free-form log sanitization separately redacts compact JWT/JWS-shaped bearer values, including DPoP-proof-shaped compact tokens, before messages are emitted. That sanitizer is deliberately not a generic IP-address anonymizer: remote/client network addresses are omitted or reduced at the source boundary unless an explicit diagnostic contract requires them. This avoids relying on broad IPv4/IPv6 regexes that can corrupt unrelated timestamps, hashes, URLs, or protocol values while still keeping network identity out of routine logs.
|
|
17
|
+
|
|
16
18
|
`privacy:history` first runs the same current-tree checks, then scans every reachable historical blob path and bounded UTF-8 blob plus every reachable commit message. It catches values that were committed and later deleted. Standard public Dependabot signing trailers are ignored only in that exact commit-message context; the same non-example address remains disallowed in ordinary files. The local `.privacy-denylist` is also applied to history, so a developer may discover older identifiers that CI cannot know. Such a finding is real publication history, but ordinary commits cannot erase it.
|
|
17
19
|
|
|
18
20
|
Git author and committer identity headers are canonical Git metadata rather than blob or commit-message content and are not automatically rejected. Audit them separately with `git log`; changing historical identity metadata requires a coordinated history rewrite and force-update of affected refs.
|
|
19
21
|
|
|
22
|
+
Delegated callers obtain Git metadata through the structured Git surface rather than direct control-directory file access. Author email remains opt-in, structured log framing is validated before projection, and restricted repository discovery rejects metadata redirection outside the effective path boundary.
|
|
23
|
+
|
|
20
24
|
Maintain machine-specific names in an ignored owner-only file:
|
|
21
25
|
|
|
22
26
|
```sh
|
|
@@ -30,16 +34,42 @@ Add one identifier per line. The denylist is deliberately local and must never b
|
|
|
30
34
|
|
|
31
35
|
Machine-specific operational notes may be kept under the ignored `.project-local/` directory. Use it for temporary environment state and one-machine recovery observations, not for reusable engineering decisions. General lessons belong in tracked documentation such as `ENGINEERING.md`.
|
|
32
36
|
|
|
33
|
-
Ignored does not mean safe for secrets: do not store passwords, tokens, private keys, authorization URLs, or copied secret-bearing logs there. `.privacy-denylist` remains the dedicated local vocabulary gate.
|
|
37
|
+
Ignored does not mean safe for secrets: do not store passwords, tokens, private keys, authorization URLs, or copied secret-bearing logs there. Treat live Worker endpoints, absolute home paths, downloaded toolchains, browser captures, and other machine identifiers as retention-sensitive metadata even when they are not credentials. Prune reconstructible dependency/toolchain experiments, stale live-endpoint probes, obsolete candidate logs, and superseded workflow snapshots once their reusable conclusions have moved into tracked documentation; retain only the minimum one-machine evidence needed for an active release/recovery investigation. `.privacy-denylist` remains the dedicated local vocabulary gate.
|
|
38
|
+
|
|
39
|
+
`machine-mcp doctor` is the support-report path and projects bounded configuration facts instead of the complete local state. Successful Worker health is reported as reachability, while endpoint/name, workspace identity, device key material and stable key identifiers, resource paths, and similar local correlation values are omitted from its state summary. `machine-mcp status` is an owner-local diagnostic and intentionally remains more detailed. Review support output before publication because operating-system/version context and failure timing can still be identifying metadata.
|
|
34
40
|
|
|
35
41
|
## Runtime instruction context
|
|
36
42
|
|
|
37
|
-
When automatic project context is enabled, Machine Bridge
|
|
43
|
+
When automatic project context is enabled, Machine Bridge can send a small generated block through the authorized MCP transport when the client explicitly calls `session_bootstrap` or capability resolution. `server/discover` does not load or attach this local context. The generated block may contain the target path relative to the repository root, recognized project/build filenames, package-manager and lockfile names, package script names, runtime constraints, common documentation filenames, and CI workflow filenames.
|
|
38
44
|
|
|
39
45
|
The generator does not include package script bodies, dependency names or versions, source/document contents, environment values, absolute home paths, or command output. It executes nothing and writes no repository or user files. File and script names can still reveal project structure, so users who do not want that metadata to traverse a remote Worker/host can set `"automatic_project_context": false` in `~/.config/machine-bridge-mcp/agent.json`. Built-in instructions can be disabled separately with `"builtin_instructions": false`.
|
|
40
46
|
|
|
41
47
|
Neither generated nor explicit instruction content is written to ordinary operational logs.
|
|
42
48
|
|
|
49
|
+
## Capability-routing privacy
|
|
50
|
+
|
|
51
|
+
Task routing is computed only from the current request, bounded project/skill/command metadata, public tool descriptions, and policy-visible application/browser metadata. Installed-application discovery is intentionally available as read-only device inventory to all authenticated roles, so application names and launcher/bundle identifiers are not treated as hidden capability metadata. Restricted roles still receive projected external paths and cannot use discovery to acquire application launch, Accessibility control, browser, shell, or write authority; those routes are filtered through the effective account/daemon policy intersection.
|
|
52
|
+
|
|
53
|
+
The returned route set contains tool names, coarse scores, named reasons, ambiguity, and fallbacks. It does not include command bodies, secret values, application documents, browser page data, or tool arguments. Runtime observability keeps only an HMAC task fingerprint and coarse route fields; raw task text and route explanations are not logged. A client-supplied `known_refresh_fingerprint` is a content identity for static context, not a bearer credential.
|
|
54
|
+
|
|
55
|
+
## Protocol validation privacy
|
|
56
|
+
|
|
57
|
+
Modern Streamable HTTP mirrors protocol version, method, tool/resource/prompt name, and explicitly annotated primitive tool parameters into headers. These values are used only for routing consistency and are compared with the body before dispatch. Operational logs omit all request headers and every `Mcp-Param-*` value; mismatch errors identify only the field class and do not echo either side. Unknown names, methods, metadata keys, extension keys, and unsupported-version data are bounded or omitted rather than reflected verbatim.
|
|
58
|
+
|
|
59
|
+
Modern response closure is conveyed by a random internal stream capability. Public requests cannot set it because the outer Worker removes both internal headers, and the credential-free cancel control forwards no access token or DPoP proof. The capability is used only to remove one active pending call and is never logged or persisted as user-visible evidence.
|
|
60
|
+
|
|
61
|
+
Tool schemas are compiled locally. Network `$ref` dereference is unsupported, so schema validation cannot turn a catalog entry into an outbound metadata request or SSRF channel. Runtime validation also has a total step budget: each array item and own object property consumes work without first allocating an unbounded key list. Open `_meta`, capability-extension, and subscription-filter JSON has an independent 4,096-node/32-level/bounded-key limit; resource subscription lists are count/length bounded. Failures report only JSON Pointer path, keyword, and constraint text; the rejected value is never copied into an error or log, even when it resembles a credential.
|
|
62
|
+
|
|
63
|
+
## Computer Use privacy
|
|
64
|
+
|
|
65
|
+
`computer_observe` may return browser screenshots, macOS window screenshots, Accessibility semantics, page labels/text, URLs, control metadata, and bounded post-action diffs. These are requested tool results and can contain personal or secret-bearing information even when value fields are suppressed. They are never copied into operational logs, audit payloads, release evidence, or repository fixtures. Private backend-node IDs, application process generations, owner-window screen bounds, exact-value verification handles, and native input coordinates remain daemon-local snapshot state and are not projected in the public observation.
|
|
66
|
+
|
|
67
|
+
`browser_get_source` is a materially higher-disclosure read than semantic inspection. Raw serialized HTML can contain application bootstrap payloads, hidden session/account identifiers, authentication material, preloaded data, and other values that are absent from the rendered text or actionable semantic tree. Machine Bridge bounds the bytes and frame count but does not attempt to classify or redact arbitrary site-controlled HTML. Use raw source only when markup itself is necessary, prefer `browser_inspect_page` or `computer_observe` otherwise, and never copy authenticated-page source into fixtures, support logs, release evidence, or documentation.
|
|
68
|
+
|
|
69
|
+
Computer Use snapshots are process-local, bounded, and expire after ten monotonic minutes; wall-clock changes do not extend the authority lifetime, and they are not durable managed-job state or MCP replay/session state. Resource-backed non-sensitive application values retained solely for exact post-write verification use one-shot opaque handles, a maximum of 32 live records, and a 60-second monotonic fallback lifetime; normal `computer_act` cleanup removes them earlier whenever possible. An observation screenshot that would make the native MCP result exceed the ordinary 7 MiB result boundary is omitted before the snapshot ID is published. A post-action screenshot that would overflow the same boundary is omitted from the returned result and stored continuation snapshot while the already-established dispatch/effect settlement and bounded `post_snapshot_id` are preserved. In either case the semantic snapshot may still be returned, but screenshot-bound pixel authority is removed. This is a delivery/retention bound, not image-content classification: the local capture can still have existed transiently in memory before the size decision, so callers must treat the operation as having observed that surface.
|
|
70
|
+
|
|
71
|
+
The experimental macOS visual backend compiles a fixed native helper into the owner-local runtime cache only after explicit opt-in. It does not persist captured screenshot bytes or user-entered text as part of the backend cache. The manual smoke test uses a synthetic temporary application fixture and must not be repurposed to capture ordinary user applications or real private content for repository evidence.
|
|
72
|
+
|
|
43
73
|
## Review rules
|
|
44
74
|
|
|
45
75
|
Before committing or publishing:
|
|
@@ -54,6 +84,15 @@ Before committing or publishing:
|
|
|
54
84
|
|
|
55
85
|
The scanner is heuristic. It cannot identify every personal or organizational name, split/transformed/encrypted value, image, archive, binary fixture, custom credential format, unreachable/pruned object, reflog-only object, fork/cache copy, or Git identity header. Passing current-tree and reachable-history checks is a gate, not proof that every publication copy contains no private data.
|
|
56
86
|
|
|
87
|
+
Recovered prerelease activation is also a publication-sensitive evidence boundary. Current schema-2 records may retain only an allowlisted recovery reason plus the fixed canonical detail owned by that reason. Lower-layer exception messages can contain paths, endpoints, account identifiers, or credential-shaped text, so they must stay in local causal/debugging state and must not be copied into recovered-success CLI JSON or activation records. Historical schema-2 records with a bounded legacy detail are normalized to the canonical detail when read; the current writer never republishes the legacy text.
|
|
88
|
+
|
|
57
89
|
## Incident response
|
|
58
90
|
|
|
59
91
|
For an accidental publication, remove the value from the current tree and release artifacts, determine whether it is merely identifying metadata or an active credential, and rotate/revoke any credential immediately. Public Git and npm history are immutable in ordinary workflows: replacing the current file does not erase old commits or a published package. A coordinated history rewrite, cache invalidation request, or replacement release may be appropriate, but those actions are disruptive and require an explicit repository-owner decision.
|
|
92
|
+
## Current response delivery
|
|
93
|
+
|
|
94
|
+
MCP `2026-07-28` response streams are request-scoped, not persisted, and not resumable by the client. Closing a public response stream cancels that request and releases its transient Worker ownership. The Worker's pending-call registry is in memory and does not persist tool arguments or terminal results as protocol replay state.
|
|
95
|
+
|
|
96
|
+
During a brief relay interruption, the same local daemon process may retain an already-completed result envelope in memory until the Worker acknowledges it or the bounded reconnect window expires. This is relay-delivery continuity for an already-dispatched call, not a client-visible protocol session or replay store. Tool arguments and results remain absent from normal operational logs, and durable work that must survive process or machine replacement uses the managed-job subsystem instead.
|
|
97
|
+
|
|
98
|
+
The signed daemon HTTPS fallback does not change those persistence rules. It carries the same daemon control/tool envelopes over TLS when WSS is unavailable and retains only bounded in-memory transport queues on each side. An unacknowledged envelope may be retransmitted with the same transport sequence after response loss, but duplicate sequences are discarded before business handling; no public MCP replay identifier or persisted fallback result store is created. Fallback authentication headers contain a short-lived root-certified session certificate, one-time nonce, timestamp, body hash, and signature; they are validated but not written to operational logs. Browser broker ping/Pong carries only a bounded sequence number and is not content logging.
|
|
@@ -18,15 +18,37 @@ Branch names use a short category and purpose, for example `feat/browser-downloa
|
|
|
18
18
|
|
|
19
19
|
Direct pushes to `main`, force pushes, and branch deletion are blocked by repository protection. An exception requires an incident record and an explicit owner decision.
|
|
20
20
|
|
|
21
|
-
###
|
|
21
|
+
### Local repository readiness and release readiness
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
A review or automation report must state the scope of its readiness claim. `local_repository` readiness means that the current working-tree candidate is bound to its objective revision, has passed every required local and project-native verification stage, has requirement-specific evidence, and has the required reviews. It does not assert that a hosted Worker, browser client, GitHub repository, npm registry, service installation, or production network currently matches that candidate.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
`release_ready` is a separate claim. It requires the exact candidate identity plus the applicable independent-environment and independent-authority lifecycle evidence, including hosted CI and security checks, candidate activation where package behavior changed, publication controls, and any required soak. A local simulator, local owner attestation, or absence of a local failure cannot substitute for those external observations.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
During a deliberately local-only review, not invoking activation, publication, push, tag, or hosted-mutation commands is evidence that the observed review path did not request those side effects. It is not evidence that external state is healthy or synchronized. Reports must retain that limitation and list missing external stages rather than converting them into local blockers or silently treating them as passed.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
### Incident evidence discipline
|
|
30
|
+
|
|
31
|
+
For production or candidate failures, the defect record must distinguish observed facts, inferences, falsified hypotheses, and unknowns. The exact deployed package/Worker/daemon/workspace identity is established before behavioral changes. Generic UI/connector messages and local simulator success are not causal evidence.
|
|
32
|
+
|
|
33
|
+
Before changing authentication, persistence, transport, or release semantics, prefer a privacy-bounded stage discriminator or a minimal control experiment that can separate the plausible branches. Change one causal hypothesis at a time when live evidence can distinguish alternatives. If a live observation disproves the hypothesis, remove that patch before finalization unless an independent invariant and regression test justify it; do not accumulate speculative compatibility or security changes merely because each is individually plausible.
|
|
34
|
+
|
|
35
|
+
Credential rotation, account recreation, security weakening, state deletion, forced deployment, and remote-resource renaming are not diagnostic resets. They require positive evidence at that boundary and must not erase the state needed to explain the incident. When local emulation differs from the hosted runtime, the hosted observation is the acceptance authority for that hosted behavior and the discrepancy becomes an explicit test/residual-risk item.
|
|
36
|
+
|
|
37
|
+
Verification is run against a frozen tree. Starting a long integration/release check and then editing watched source invalidates the run; a hot reload or concurrent packaged-file write requires a clean rerun after the final edit. The same rule applies to a generated candidate: any packaged-byte change makes the prior candidate and acceptance evidence stale.
|
|
38
|
+
|
|
39
|
+
### Completion ownership, prerelease activation, and soak
|
|
40
|
+
|
|
41
|
+
Repository automation owns implementation, local validation, candidate preparation, observed verification, acceptance recording, and pull-request completion. Package work for version 3 or later must use a `dev`, `beta`, or `rc` version before stable promotion. Direct implementation-to-stable release is prohibited.
|
|
42
|
+
|
|
43
|
+
One complete frozen-tree verification precedes candidate preparation. Its successful `check:full` writes an ignored, short-lived local receipt bound to the exact source generation plus package and runtime identity; starting a later full run invalidates the old receipt before tests begin. `npm run release:candidate` requires that receipt and creates the exact tarball without repeating the same full suite. Before live activation, repository automation runs `node scripts/start-release-candidate.mjs --install-only`; this non-live disposable-install preflight must still match current source/package modes and exact tarball identity, and failure requires candidate regeneration. After explicit owner authorization, the owner or authorized agent executes `npm run release:candidate:activate -- --allow-worker-deploy`; the command installs that tarball under the private state root, updates the same-name Worker, verifies candidate relay readiness, replaces the login daemon, verifies the background handoff, and exits. The coding agent then derives `<activated-runtime-package>` from activation `runtime_entry` and runs `node <activated-runtime-package>/scripts/release-oauth-canary.mjs --allow-live-oauth-canary` as direct argv from the checkout cwd: this candidate-bound release probe executes activated-package code while treating the checkout only as candidate/evidence data, and creates one synthetic temporary reviewer account and DCR client, exercises authorization-code exchange, authenticated MCP, refresh rotation, and refreshed MCP, removes both temporary objects, and records only non-secret candidate/check metadata. The coding agent then performs observed live verification through Machine Bridge and records acceptance only after both the canary and that observed success. No per-operation terminal approval is involved.
|
|
44
|
+
|
|
45
|
+
The tracked `release-acceptance/v<version>.json` binds npm hashes, a portable package digest, and a version-normalized promotion digest. Any packaged change invalidates acceptance. `npm run github:push`, CI, and source-release commands verify the record. Raw pushes of package branches are prohibited.
|
|
46
|
+
|
|
47
|
+
The accepted prerelease's Git tag and GitHub Prerelease require explicit owner authorization and use `npm run prerelease:release -- --owner-confirm`. A TTY is optional; the command may also run from an explicitly authorized local automation/Machine Bridge session. npm publication remains a separate explicit owner decision through `npm run prerelease:publish`. Exact registry installation/activation likewise requires explicit owner authorization and uses `npm run prerelease:install -- --allow-worker-deploy`. Formal soak begins only from this registry-verified activation. Minimum soak is seven days for major, three days for minor, and one day for patch releases. A blocking defect increments the prerelease number and restarts the soak interval.
|
|
48
|
+
|
|
49
|
+
Stable promotion requires a tracked `release-soak/v<stable>.json` and identical promotion-content digest. Only normalized release metadata may differ from the soaked prerelease. The stable candidate is activated and observed again before explicitly authorized Git tag/GitHub Release publication through `npm run release -- --owner-confirm`; npm stable publication remains a separate explicit owner decision through `npm run stable:publish`.
|
|
50
|
+
|
|
51
|
+
GitHub-only repository infrastructure changes that do not alter npm package contents do not require a synthetic version, candidate activation, or soak. They still require review and applicable checks.
|
|
30
52
|
|
|
31
53
|
### Local GitHub control plane
|
|
32
54
|
|
|
@@ -97,6 +119,7 @@ Tests follow risk rather than a repository-wide aggregate percentage:
|
|
|
97
119
|
- Permission expansion includes denial tests. Bounded resources include over-limit tests. Multi-stage mutations include partial-failure and rollback tests.
|
|
98
120
|
- Concurrency, locking, process trees, persistence, cancellation, retry, and recovery require behavior-level or fault-injection coverage.
|
|
99
121
|
- Protocol changes include producer-consumer contract tests and malformed-input tests.
|
|
122
|
+
- Hosted-runtime boundaries such as deployed Durable Object persistence, edge request cancellation, browser integration, and provider lifecycle receive deployed/live canaries when local workerd, emulators, or OS fakes cannot prove equivalent semantics. OAuth/token persistence changes require deployed authorization-code exchange, access/refresh persistence, one authenticated MCP request, and refresh rotation before acceptance.
|
|
100
123
|
- Supported operating systems run the required suite in CI.
|
|
101
124
|
- Critical modules have explicit function and branch baselines. Thresholds may rise after better tests or extraction; lowering one requires an audit note explaining why the old measurement was misleading.
|
|
102
125
|
- High-risk JavaScript contract modules opt into strict TypeScript checking through `tsconfig.local.json`; implicit `any`, `@ts-ignore`, and untyped duplicate protocol/configuration shapes are not acceptable substitutes for a defined boundary.
|
|
@@ -122,7 +145,7 @@ Flaky tests are defects. A retry may diagnose environmental instability but may
|
|
|
122
145
|
- Third-party Actions are pinned to immutable commit SHAs and reviewed when Dependabot updates them. GitHub Action updates are grouped into one atomic pull request so coupled suites such as CodeQL cannot be split across incompatible versions.
|
|
123
146
|
- npm dependencies use exact versions and a committed lockfile. Source bootstrap uses `npm ci`; the CI npm baseline itself is downloaded from an exact URL and verified against a pinned SHA-512 SRI before use. Registry signatures and attestations are verified in CI.
|
|
124
147
|
- Dependency review blocks newly introduced vulnerable dependencies. CodeQL performs JavaScript/TypeScript and workflow analysis. OpenSSF Scorecard audits supply-chain posture, and both SARIF streams are failing gates with exact, expiring exceptions rather than advisory-only uploads.
|
|
125
|
-
- CI generates and validates a CycloneDX SBOM. Release artifacts must match the repository-owner-tested tarball hash, be reproducible from a reviewed commit, and be tied to successful exact-commit CI, CodeQL, Governance, and Scorecard evidence.
|
|
148
|
+
- CI generates and validates a CycloneDX SBOM. Release artifacts must match the repository-owner-tested tarball hash, be reproducible from a reviewed commit, and be tied to successful exact-commit CI, CodeQL, Governance, Workflow Policy Gate, and Scorecard evidence.
|
|
126
149
|
- Secret scanning and push protection are enabled. Repository examples use synthetic identities and reserved domains; reachable history is scanned before release.
|
|
127
150
|
- Long-lived publication tokens should be replaced by npm trusted publishing with GitHub OIDC. Until that external registry configuration is completed, release credentials remain an explicit operator responsibility and must never be stored in the repository.
|
|
128
151
|
- Security reports follow [SECURITY.md](../SECURITY.md), not public issue templates.
|