machine-bridge-mcp 3.0.0-beta.201 → 3.0.0-beta.206
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 +20 -11
- package/README.md +5 -7
- package/SECURITY.md +5 -7
- package/bin/machine-mcp.mjs +11 -1
- package/browser-extension/manifest.json +1 -1
- package/cloudflare.config.ts +1 -0
- package/docs/AUDIT.md +8 -3
- package/docs/CLIENTS.md +137 -32
- package/docs/COMPUTER_USE.md +408 -96
- package/docs/LOCAL_AUTHORIZATION.md +10 -13
- package/docs/LOGGING.md +210 -51
- package/docs/MULTI_ACCOUNT.md +7 -7
- package/docs/OPERATIONS.md +793 -153
- package/docs/OVERVIEW.md +14 -0
- package/docs/POLICY_REFERENCE.md +8 -8
- package/docs/THREAT_MODEL.md +2 -2
- package/docs/TOOL_REFERENCE.md +49 -16
- package/docs/UPGRADING.md +16 -3
- package/package.json +19 -3
- package/scripts/github-push.mjs +4 -4
- package/scripts/github-release.mjs +4 -4
- package/scripts/network-retry.mjs +4 -1
- package/scripts/published-release.mjs +2 -0
- package/scripts/sync-worker-version.mjs +16 -0
- package/src/local/account-access.mjs +0 -2
- package/src/local/agent-context.mjs +28 -7
- package/src/local/agent-contract.mjs +2 -2
- package/src/local/agent-skill-discovery.mjs +14 -0
- package/src/local/agent-text-file.mjs +2 -0
- package/src/local/app-automation.mjs +17 -10
- package/src/local/application-capability-match.mjs +10 -0
- package/src/local/authority-context.mjs +26 -5
- package/src/local/autostart-log-maintenance.mjs +1 -5
- package/src/local/bounded-output-helpers.mjs +29 -0
- package/src/local/bounded-output.mjs +35 -27
- package/src/local/browser-extension-path.mjs +2 -0
- package/src/local/browser-operation-service.mjs +1 -0
- package/src/local/call-registry.mjs +1 -6
- package/src/local/cli-idle-sleep.mjs +2 -0
- package/src/local/cli.mjs +3 -0
- package/src/local/computer-use-arguments.mjs +34 -4
- package/src/local/daemon-http-relay-connection.mjs +1 -5
- package/src/local/daemon-http-retry-policy.mjs +4 -0
- package/src/local/delegated-process-sandbox.mjs +7 -2
- package/src/local/directory-metadata.mjs +7 -2
- package/src/local/errors.mjs +36 -5
- package/src/local/execution-routing.mjs +23 -4
- package/src/local/file-mutation-coordinator.mjs +6 -1
- package/src/local/git-content-service.mjs +83 -0
- package/src/local/git-sensitive-path-filter.mjs +63 -0
- package/src/local/git-service.mjs +12 -35
- package/src/local/git-version.mjs +6 -0
- package/src/local/idle-sleep-mode.mjs +7 -2
- package/src/local/managed-job-capacity-maintenance.mjs +24 -0
- package/src/local/managed-job-capacity.mjs +2 -0
- package/src/local/managed-job-dependencies.mjs +16 -1
- package/src/local/managed-job-dependency-metadata.mjs +4 -0
- package/src/local/managed-job-hosted-reconcile.mjs +2 -0
- package/src/local/managed-job-listing-records.mjs +45 -0
- package/src/local/managed-job-listing.mjs +4 -31
- package/src/local/managed-job-plan-integrity.mjs +8 -0
- package/src/local/managed-job-read-policy.mjs +8 -1
- package/src/local/managed-job-read-wait.mjs +14 -0
- package/src/local/managed-job-recovery-listing.mjs +3 -1
- package/src/local/managed-job-resource-context.mjs +4 -0
- package/src/local/managed-job-terminal-evidence-helpers.mjs +48 -0
- package/src/local/managed-job-terminal-evidence.mjs +71 -0
- package/src/local/managed-job-terminal-maintenance.mjs +20 -25
- package/src/local/managed-job-transient-recovery-capacity.mjs +1 -1
- package/src/local/managed-jobs.mjs +24 -17
- package/src/local/operation-authorization.mjs +61 -9
- package/src/local/operation-risk.mjs +10 -2
- package/src/local/owner-state-lock.mjs +1 -5
- package/src/local/package-identity.mjs +1 -0
- package/src/local/process-error-message.mjs +6 -0
- package/src/local/process-fatal.mjs +40 -0
- package/src/local/process-lock-read-retry.mjs +8 -1
- package/src/local/process-output-stream.mjs +33 -7
- package/src/local/process-session-read.mjs +1 -1
- package/src/local/process-session-remote-activity.mjs +3 -0
- package/src/local/process-sessions.mjs +1 -1
- package/src/local/process-tree.mjs +1 -0
- package/src/local/progress-reporter.mjs +3 -0
- package/src/local/project-package.mjs +1 -1
- package/src/local/relay-call-recovery.mjs +1 -1
- package/src/local/relay-heartbeat-options.mjs +13 -4
- package/src/local/relay-peer-diagnostics.mjs +11 -5
- package/src/local/relay-recovery-admission.mjs +2 -0
- package/src/local/relay-tool-schema-extension.mjs +10 -2
- package/src/local/relay-transport-confirmation.mjs +1 -4
- package/src/local/release-runtime-lock.mjs +8 -0
- package/src/local/resilient-relay-connection.mjs +1 -5
- package/src/local/resource-cpu-window.mjs +4 -1
- package/src/local/resource-disk-headroom.mjs +9 -0
- package/src/local/resource-elastic-memory.mjs +3 -0
- package/src/local/resource-host-sample-file.mjs +6 -0
- package/src/local/resource-process-priority.mjs +8 -0
- package/src/local/resource-release-control-classification.mjs +2 -0
- package/src/local/resource-transaction-lock.mjs +1 -1
- package/src/local/resource-xcode-command.mjs +5 -0
- package/src/local/resource-xcode-non-build.mjs +3 -0
- package/src/local/runtime-activity-projection.mjs +14 -6
- package/src/local/runtime-info-projection.mjs +5 -1
- package/src/local/runtime-info-relay-projection.mjs +18 -16
- package/src/local/runtime-relay-acknowledgements.mjs +2 -0
- package/src/local/runtime-relay.mjs +1 -1
- package/src/local/runtime-tool-handlers.mjs +2 -2
- package/src/local/runtime.mjs +5 -5
- package/src/local/security-audit-warning.mjs +13 -5
- package/src/local/service-ownership.mjs +10 -0
- package/src/local/service-restartability.mjs +3 -1
- package/src/local/service.mjs +3 -0
- package/src/local/short-identifiers.mjs +3 -0
- package/src/local/state.mjs +1 -1
- package/src/local/stdio.mjs +423 -50
- package/src/local/systemd-removal.mjs +2 -0
- package/src/local/tool-result-boundary.mjs +10 -5
- package/src/local/windows-launcher.mjs +3 -1
- package/src/local/worker-identity-contract.mjs +4 -0
- package/src/local/workspace-file-rename-retry.mjs +32 -0
- package/src/local/workspace-file-service.mjs +55 -62
- package/src/local/workspace-file-transaction-helpers.mjs +73 -0
- package/src/local/workspace-file-transaction.mjs +35 -67
- package/src/local/workspace-profile-migration.mjs +55 -11
- package/src/local/workspace-search-service.mjs +212 -0
- package/src/local/workspace-search.mjs +18 -1
- package/src/local/wrangler-toolchain.mjs +1 -5
- package/src/shared/access-contract.json +9 -2
- package/src/shared/mcp-protocol.d.mts +2 -0
- package/src/shared/mcp-protocol.mjs +17 -0
- package/src/shared/mcp-task-contract.d.mts +8 -0
- package/src/shared/mcp-task-contract.mjs +33 -0
- package/src/{local → shared}/numbers.mjs +7 -0
- package/src/shared/progress-reporter.d.mts +10 -0
- package/src/shared/progress-reporter.mjs +63 -0
- package/src/shared/project-overview-projection.mjs +10 -0
- package/src/{local → shared}/records.mjs +1 -0
- package/src/shared/result-projection.mjs +6 -4
- package/src/shared/sensitive-value-patterns.mjs +4 -2
- package/src/shared/server-metadata.json +3 -3
- package/src/shared/tool-call-capacity.mjs +4 -15
- package/src/shared/tool-catalog.json +49 -16
- package/src/worker/access.ts +2 -3
- package/src/worker/daemon-channel.ts +0 -8
- package/src/worker/daemon-http-channel.ts +2 -2
- package/src/worker/dpop.ts +7 -6
- package/src/worker/http.ts +2 -1
- package/src/worker/index.ts +16 -16
- package/src/worker/managed-job-hosted-schema.ts +1 -0
- package/src/worker/mcp-controller.ts +41 -83
- package/src/worker/mcp-http-contract.ts +15 -37
- package/src/worker/mcp-job-monitor-store.ts +1 -1
- package/src/worker/mcp-prompts.ts +118 -0
- package/src/worker/mcp-response-stream.ts +14 -1
- package/src/worker/mcp-streamed-tool-dispatch.ts +43 -0
- package/src/worker/mcp-streamed-tool-response.ts +4 -2
- package/src/worker/mcp-task-dispatch.ts +115 -0
- package/src/worker/mcp-task-projection.ts +53 -0
- package/src/worker/mcp-task-result-codec.ts +44 -0
- package/src/worker/mcp-task-seed.ts +33 -0
- package/src/worker/mcp-task-service.ts +33 -0
- package/src/worker/mcp-task-store.ts +275 -0
- package/src/worker/mcp-tasks.ts +4 -0
- package/src/worker/mcp-tool-call-dispatch.ts +81 -0
- package/src/worker/oauth-controller.ts +6 -3
- package/src/worker/oauth-refresh-exchange.ts +18 -15
- package/src/worker/oauth-refresh-persistence.ts +12 -4
- package/src/worker/oauth-refresh-retry.ts +34 -0
- package/src/worker/oauth-tokens.ts +5 -0
- package/src/worker/tool-catalog.ts +4 -4
- package/src/worker/worker-entry.ts +7 -1
- package/src/worker/worker-mcp-config.ts +6 -1
- package/tsconfig.json +3 -0
- package/tsconfig.local.json +78 -3
- package/wrangler.config.ts +1 -0
- package/wrangler.jsonc +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 3.0.0-beta.
|
|
3
|
+
## 3.0.0-beta.206 - 2026-10-20
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
5
|
+
- Fix minute-boundary calculation in progress reporter elapsed formatting to prevent overflow past 60 seconds.
|
|
6
|
+
- Wire progressToken through Worker MCP HTTP contract handling and streamed response dispatch.
|
|
7
|
+
- Remove redundant duplicate self-comparison import in records test suite.
|
|
8
|
+
- Enforce `package.json`/`package-lock.json` root version parity in the version-sync gate and package test.
|
|
9
|
+
- Run progress reporter unit tests against the shared production module, retaining only a local compatibility re-export.
|
|
10
|
+
- Remove the legacy stdio handshake and metadata-normalization mode, including the CLI option and environment switch.
|
|
11
|
+
- Document that multi-file patch rollback covers ordinary operation failures but is not crash-atomic across files; single-file write/edit visibility remains atomic.
|
|
12
|
+
- Add a child-process regression that reproduces the multi-file patch crash window and verifies retained backup/staging artifacts.
|
|
13
|
+
- Expand recursive-search control-plane filtering tests to cover security, browser-pairing, and service-control roots, and test stdio EOF cancellation and output-write failure.
|
|
14
|
+
- Add regression coverage for bounded stdio error responses and serialized concurrent task-state updates.
|
|
15
|
+
- Expand stdio output queue limit and reservation to safely process concurrent maximum-size tool results without dropping the transport.
|
|
16
|
+
- Implement remote Worker MCP Tasks operations (`tasks/get`, `tasks/update`, `tasks/cancel`) for clients that advertise the Tasks extension; local stdio intentionally does not advertise it, `tasks/list`/`tasks/result` aliases are unsupported, project cleanup/interrupted recovery states as active tasks, and tasks without a persisted terminal result fail explicitly if their backing job record disappears before result capture.
|
|
17
|
+
- Centralize MCP task job-ID validation in the shared task contract so task creation, dispatch and durable-record validation use one pattern.
|
|
18
|
+
- Add actionable error guidance (actionable_remedy) for agent reflexion on tool execution failures.
|
|
19
|
+
- Expand local TypeScript type checking coverage to 74 checked modules with strict JSDoc typing.
|
|
20
|
+
- Consolidate cross-module integer validation helpers into shared runtime modules.
|
|
21
|
+
- Add standard npm test script mapped to the verification runner.
|
|
22
|
+
- Tighten TypeScript compiler checks with noFallthroughCasesInSwitch, noImplicitReturns, and noUncheckedIndexedAccess.
|
|
23
|
+
- Include previously orphaned tests into the check runner plan.
|
|
15
24
|
|
|
16
25
|
## Historical releases
|
|
17
26
|
|
package/README.md
CHANGED
|
@@ -50,10 +50,8 @@ The complete component and trust-boundary diagram is in [docs/OVERVIEW.md](docs/
|
|
|
50
50
|
|
|
51
51
|
## MCP protocol model
|
|
52
52
|
|
|
53
|
-
Machine Bridge uses MCP `2026-07-28` for both stdio and remote HTTP.
|
|
54
|
-
|
|
55
|
-
- **Native current requests are self-describing.** Protocol version and client capabilities travel in `_meta`; HTTP requests also mirror the version, method, and applicable name/parameter values into validated headers. Current `2026-07-28` clients use `server/discover` and do not create an MCP protocol session.
|
|
56
|
-
- **Removed protocol requests fail closed.** `initialize`, `Mcp-Session-Id`, `Last-Event-ID`, and other explicit removed session/replay markers do not dispatch tool work and receive bounded upgrade guidance. Remote `/mcp` is POST-only; GET remains a 405 method rejection. Obsolete clients must reconnect with MCP `2026-07-28`.
|
|
53
|
+
Machine Bridge uses MCP `2026-07-28` for both stdio and remote HTTP under one request-scoped protocol contract. Both transports require current request-scoped metadata and reject the removed initialization/session/replay behavior. Stdio has no compatibility shim, and neither a CLI flag nor an environment variable can fill missing request metadata.
|
|
54
|
+
Removed protocol requests fail closed with bounded upgrade guidance; hosted clients must reconnect with MCP `2026-07-28` and use `server/discover` rather than initialization.
|
|
57
55
|
- **HTTP streams are request-scoped and non-resumable.** Closing the response stream cancels that request. There is no recovery GET, SSE event-ID replay, or session-bound delivery store.
|
|
58
56
|
- **Removed session/replay semantics never execute.** Unsupported protocol dates and requests for the retired session/recovery model receive bounded rejection or upgrade guidance rather than legacy state or replay behavior.
|
|
59
57
|
- **Transport identity is not conversation identity.** Stdio and HTTP processes/connections may interleave unrelated requests; state that spans calls must use an explicit tool, job, process-session, or resource identifier.
|
|
@@ -67,7 +65,7 @@ The Worker validates the actual `/mcp` Origin, mirrored headers, role-filtered t
|
|
|
67
65
|
- Node.js 26 or newer
|
|
68
66
|
- npm 12 or newer
|
|
69
67
|
|
|
70
|
-
The project intentionally follows one current runtime baseline rather than carrying compatibility branches for older Node/npm behavior. Node 26 provides the tested process, module, permission, and platform semantics used by the release gates; npm 12 provides the installation-script controls used by the documented global install. `.node-version`, `.nvmrc`, `packageManager`,
|
|
68
|
+
The project intentionally follows one current runtime baseline rather than carrying compatibility branches for older Node/npm behavior. Node 26 provides the tested process, module, permission, and platform semantics used by the release gates; npm 12 provides the installation-script controls used by the documented global install. `.node-version`, `.nvmrc`, `packageManager`, published `engines`, and `.npmrc engine-strict=true` keep that baseline consistent; `devEngines` is advisory (`onFail: warn`) so dependency automation can still refresh the lockfile on a newer Node.
|
|
71
69
|
|
|
72
70
|
## Install
|
|
73
71
|
|
|
@@ -186,7 +184,7 @@ Planned shutdown sends `daemon_draining` before relay close. An interrupted `rea
|
|
|
186
184
|
|
|
187
185
|
Hosted synchronous calls otherwise retain their ordinary 20-second execution plus separate five-second Worker settlement margin. Configurable browser/application tools use 20-second defaults; compound `computer_observe` / `computer_act` retain 30-second defaults, with a 45-second explicit maximum. Durable process acceptance and continuation have separate budgets below. These limits do not establish external host receipt or a whole-assistant-turn deadline.
|
|
188
186
|
|
|
189
|
-
`full` is the daemon capability ceiling. An authenticated owner may exercise it without per-operation approval IDs. Delegated reviewer, editor, and operator accounts remain inside immutable role ceilings; out-of-role operations are denied rather than converted into a temporary elevation workflow. Process sessions, retained output, and managed jobs are additionally bound to account, client, and refresh-token family. See [local authorization](docs/LOCAL_AUTHORIZATION.md).
|
|
187
|
+
`full` is the daemon capability ceiling. An authenticated owner may exercise it without per-operation approval IDs. Delegated reviewer, editor, and operator accounts remain inside immutable role ceilings; out-of-role operations are denied rather than converted into a temporary elevation workflow. Remote arbitrary process execution and process-session controls are owner-only, including under the `agent` profile. Process sessions, retained output, and managed jobs are additionally bound to account, client, and refresh-token family. See [local authorization](docs/LOCAL_AUTHORIZATION.md).
|
|
190
188
|
|
|
191
189
|
## Browser and application automation
|
|
192
190
|
|
|
@@ -215,7 +213,7 @@ The retained-state cap is 512. A hosted helper awaiting its promised terminal re
|
|
|
215
213
|
|
|
216
214
|
Jobs can declare `depends_on`: the dependent remains `queued/dependency_wait` before main execution, upstream failure yields `dependency_failed`, and active/staged dependencies protect referenced results. Register secrets as local resource aliases and put idempotent cleanup in `finally_steps`. Timeout or cancellation alone does not prove process-tree settlement. See [managed jobs](docs/MANAGED_JOBS.md) for examples, retention, recovery, and privacy boundaries.
|
|
217
215
|
|
|
218
|
-
The repository-tracked `workflow-bundle.json` is the project-native lifecycle authority for local readiness.
|
|
216
|
+
The repository-tracked `workflow-bundle.json` is the project-native lifecycle authority for local readiness. Offline artifact, project, and architecture fixtures require Seatbelt containment. The complete `project-native:npm:check:fast` and `project-native:npm:check:full` stages use normal host permissions because their required checks exercise loopback servers, browser/native operations, and registry installation. Release architecture checks enforce the exact commands, provenance, and containment modes; a machine-local lifecycle file cannot replace them.
|
|
219
217
|
|
|
220
218
|
The Job Monitor is deliberately a status surface, not a duplicate result viewer. Its app-only reads expose only bounded lifecycle state; command output, command text, paths, nested step results, and recovery/control capabilities remain on the normal managed-job result path. The `recovery_key` is present in the render input only because it is the View's read authority and is cleared from View memory on teardown. If optional monitor coordination storage is unavailable after `start_job` or `read_job` has already succeeded, Machine Bridge keeps the durable job result authoritative and falls back to normal model-side continuation rather than reporting a new job failure.
|
|
221
219
|
|
package/SECURITY.md
CHANGED
|
@@ -68,7 +68,7 @@ The roles are:
|
|
|
68
68
|
|
|
69
69
|
- `reviewer`: read-only selected-workspace access;
|
|
70
70
|
- `editor`: selected-workspace reads and deterministic file mutation;
|
|
71
|
-
- `operator`: workspace-confined mutation
|
|
71
|
+
- `operator`: workspace-confined mutation through structured tools; arbitrary process execution is owner-only;
|
|
72
72
|
- `owner`: complete bridge authority within the daemon policy ceiling.
|
|
73
73
|
|
|
74
74
|
No approval ID, refresh token, reconnect, or client registration can expand a role. Out-of-role operations fail with `authorization_denied`.
|
|
@@ -93,13 +93,11 @@ Whether a process receives the complete parent environment is derived from that
|
|
|
93
93
|
|
|
94
94
|
Owner execution is not OS-sandboxed by Machine Bridge. Use a dedicated low-privilege account, container, or VM for mutually untrusted workloads.
|
|
95
95
|
|
|
96
|
-
##
|
|
96
|
+
## Remote process authority
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
Remote `exec_command`, `run_process`, `run_local_command`, and process-session controls are owner-only. A workspace sandbox cannot prevent an arbitrary executable from reading credentials already present inside that workspace and sending them over the network. Delegated accounts use structured file and Git tools instead. The `agent` daemon profile remains a local capability ceiling and does not override this account-role restriction.
|
|
99
99
|
|
|
100
|
-
The sandbox
|
|
101
|
-
|
|
102
|
-
The existence of `sandbox-exec`, a container binary, or another sandbox command is not treated as proof of isolation.
|
|
100
|
+
The retained OS-sandbox implementation is defense in depth for internal restricted execution paths, not permission for delegated OAuth accounts to invoke arbitrary processes. Its probes must prove that the workspace is usable while protected roots remain unreadable; the existence of a sandbox executable alone proves nothing.
|
|
103
101
|
|
|
104
102
|
## Machine Bridge control plane
|
|
105
103
|
|
|
@@ -227,7 +225,7 @@ Managed jobs are durability, not sandboxing. Only `owner` may create remote pers
|
|
|
227
225
|
|
|
228
226
|
Hosted managed-job recovery adds a separate Worker capability boundary. `start_job`, `stage_job`, and durable one-step process acceptance return deterministic HMAC-SHA256 `recovery_key` and `control_key` values bound to account version, OAuth client, refresh family, role, job ID, and purpose. Hosted `read_job` and dependency references require the read capability; hosted `cancel_job` requires the control capability. The Worker verifies them before daemon dispatch and strips them from daemon arguments. Capability values are derived with domain separation from the existing Worker OAuth identity key, are not persisted in local job state, are not mirrored into MCP parameter headers, and are covered by ordinary log/privacy redaction. Rotating the OAuth identity key invalidates outstanding hosted capabilities. Hosted `list_jobs` returns aggregate state only, while local CLI/stdio remains the global administration surface. This prevents Machine Bridge inventory from turning one hosted conversation into another conversation's job-discovery authority, but it cannot identify host-side conversation misrouting if the host itself supplies the other conversation's still-valid capability.
|
|
229
227
|
|
|
230
|
-
|
|
228
|
+
Remote process calls and managed-job creation are owner-only. The retained non-owner transient-carrier quota is defense in depth for previously accepted or internal restricted plans; it does not grant current delegated execution authority. Remote `exec_command`, `run_process`, and `run_local_command` use internal `transient_process` managed-job carriers so an accepted owner one-step operation remains recoverable after a host boundary. Those carriers share the profile-wide 512-state job store. To keep the 24-hour hard undelivered-result promise from becoming a cross-principal capacity claim, one relay non-owner account version may hold at most 16 unresolved `transient_recovery_pending` carriers across all of its OAuth clients and refresh families. The fairness key is account ID plus account version; changing client or refresh-family identity does not reset it. The check runs inside the existing root `capacity.lock` before new durable status publication or runner launch and derives its count from persisted job truth rather than a second quota ledger. A securely readable valid persisted same-key job remains recoverable at quota because replay adds no reservation; deterministic-directory existence by itself is not replay, and a statusless partial publication must pass the account quota again. Present but unreadable, malformed, or integrity-invalid retained status fails closed. Already accepted pending results remain non-evictable for their full 24-hour grace, while hosted terminal delivery or terminal grace expiry releases the account quota. Owner/local work remains governed only by the existing global capacity contract. Quota errors expose only a bounded maximum and coarse capacity scope, not account/client/family/job identifiers, paths, command text, output, or recovery capabilities.
|
|
231
229
|
|
|
232
230
|
Job directories must remain canonical real children of the owner-only job root. Cancellation markers are atomically replaced owner-only timestamp files; unreadable, malformed, symlinked, or hard-linked markers fail closed instead of being treated as no cancellation.
|
|
233
231
|
|
package/bin/machine-mcp.mjs
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { main } from "../src/local/cli.mjs";
|
|
3
|
-
import { sanitizeLogText } from "../src/local/log.mjs";
|
|
3
|
+
import { createLogger, sanitizeLogText } from "../src/local/log.mjs";
|
|
4
|
+
import { installFatalProcessHandlers } from "../src/local/process-fatal.mjs";
|
|
5
|
+
|
|
6
|
+
installFatalProcessHandlers({
|
|
7
|
+
logger: createLogger({
|
|
8
|
+
component: "process-fatal",
|
|
9
|
+
level: "error",
|
|
10
|
+
format: process.env.MBM_LOG_FORMAT === "json" ? "json" : "text",
|
|
11
|
+
stderrOnly: true,
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
4
14
|
|
|
5
15
|
main().catch(error => {
|
|
6
16
|
const message = process.env.MBM_DEBUG === "1"
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"action": {
|
|
30
30
|
"default_title": "Machine Bridge Browser"
|
|
31
31
|
},
|
|
32
|
-
"version_name": "3.0.0-beta.
|
|
32
|
+
"version_name": "3.0.0-beta.206",
|
|
33
33
|
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxryYkpZhq8+VAQLHcGS9BAHQcyKX8RHGIpIwvtIVRU/rcOcE0bNdnM0aZJ/h6xWQsGDHlhvjT2+1aJaAn/9k8473BRWajzVXld961CdHYVFVHoce2hHiSJ0xydWrHMMZhAm0mN0UzjEpgZ0tMw209efcZHIvSwuxhteZMRy4kyiVjwFlOf5oXFCxRuCJnPj3AK9CmCf4XgEBuPIJ0TZmjGHOOdBvJmbCNnAWXYEo5/mf7MfCGhV4IJ1hNuhpoNQfOFKMUcw9/v/IpT62XpfXdGYTfGYCmCjC+gntK1spbkr2P4/2+sYMQtLpse71mpSNGXfcf3abU55Vpn+gncSxRQIDAQAB"
|
|
34
34
|
}
|
package/cloudflare.config.ts
CHANGED
package/docs/AUDIT.md
CHANGED
|
@@ -12,13 +12,18 @@ This review is scoped to source contracts, risk-bearing control paths, isolated
|
|
|
12
12
|
|
|
13
13
|
## Current conclusions
|
|
14
14
|
|
|
15
|
-
- **
|
|
15
|
+
- **Delegated content paths are filtered before reads.** Search, project instructions, skills, and structured Git content omit sensitive paths; hard-linked text inputs are rejected. Empty Git path enumeration returns empty content without an unfiltered second command. Search reports omitted candidate files as incomplete and bounds surrounding text and serialized output. Filename classification cannot identify credentials stored under arbitrary ordinary filenames.
|
|
16
|
+
- **Arbitrary remote execution is owner-only.** Workspace isolation alone cannot prevent an executable from reading in-workspace credentials and exporting them. Local role gates and Worker discovery/dispatch enforce the same restriction. Fatal process events log only fixed event/error classes and terminate even when rejection inspection or logging throws; raw rejection content is not operational log data.
|
|
17
|
+
- **Refresh retries cannot recreate consumed replacements.** A retry may return only the still-active derived token pair. Revoked families and consumed replacements are rejected, and access-token authorization checks family revocation. Local regression fixtures do not replace deployed OAuth acceptance.
|
|
18
|
+
- **Branch and prerelease identities have different evidence.** Explicit branch requests match exact case-sensitive names despite pending version edits; explicit prerelease requests still reject contradictory package generations. Resolver regressions cover both paths.
|
|
19
|
+
- **Output budgets include producer backing retention.** Diagnostic and continuation buffers trim before allocating retained bytes and copy independent snapshots. Stdio response writes are serialized through an 8 MiB queue; input is paused as backlog rises, and exceeding the hard cap closes input rather than allowing unbounded queued responses. Allocation/aliasing regressions, backpressure integration, and partition properties supplement the existing UTF-8 and continuation tests.
|
|
16
20
|
- **Successful settlement terminates retry classification.** Application stdout/stderr cannot cause a successful release command to run again. Failures retain bounded transient classification, while npm pre-lifecycle errors remain observable.
|
|
21
|
+
- **Workspace replacement retries remain bounded and atomic.** Transient sharing errors retry the staging-file rename without unlinking the visible destination. The expected content digest is rechecked before each attempt, so an external change after a sharing failure returns a conflict and preserves that generation. Exhausted and non-transient failures preserve the original error. Injected success/exhaustion/non-transient and retry-generation regressions supplement the concurrent-reader fixture; Windows CI remains the provider-level proof. This optimistic check does not provide an operating-system compare-and-swap against uncoordinated external writers.
|
|
17
22
|
|
|
18
23
|
- **Authority remains an intersection, never an accumulation.** Effective MCP authority is bounded by authenticated account role, daemon capability ceiling, and tool-specific policy. Reconnects, retries, stale host schemas, browser focus changes, or recovery metadata do not expand authority.
|
|
19
|
-
- **Removed protocol behavior stays removed.** Remote HTTP and stdio use the current MCP protocol only.
|
|
24
|
+
- **Removed protocol behavior stays removed.** Remote HTTP and stdio use the current MCP protocol only. `initialize` is rejected, `notifications/initialized` has no handshake effect, and neither a CLI option nor an environment variable can normalize missing request metadata. Clients must supply the current protocol version and capability metadata on every supported request.
|
|
20
25
|
- **State publication is atomic, type-exact and identity-sensitive.** Security-sensitive state readers reject symlinks, unexpected hard links, malformed content, permission failures, persistent identity changes, and coercible PID/token/timestamp fields. Persisted strings, arrays, booleans or objects cannot become process, cleanup, lock, lease, waiter or termination authority through JavaScript conversion. Bounded retries are reserved for explicitly classified atomic-publication races; durable state is complete before it becomes visible.
|
|
21
|
-
- **Durable execution owns continuity explicitly.** Managed jobs persist recovery state independently of the hosted MCP response. Idempotency keys bind uncertain acceptance retries only while the retained record exists; cancellation, dependency state, cleanup, output budgets, and terminal persistence have explicit fail-closed boundaries. Callers recover the same accepted job instead of replaying its side effect.
|
|
26
|
+
- **Durable execution owns continuity explicitly.** Managed jobs persist recovery state independently of the hosted MCP response. Idempotency keys bind uncertain acceptance retries only while the retained record exists; cancellation, dependency state, cleanup, output budgets, and terminal persistence have explicit fail-closed boundaries. Terminal evidence validation is bound to stable status/result file generations, and a live runner retains ownership of its final cleanup-status write. Routine inventory throttles full retention scans to 30 seconds, while capacity pressure, unreadable state, expired staged plans, and dependency-bearing active/staged jobs force maintenance. Callers recover the same accepted job instead of replaying its side effect.
|
|
22
27
|
- **Daemon-owned Node children use a verified runtime launcher.** A live concrete runtime executable is preferred; if it disappears after a package-manager upgrade, only the original absolute Node launcher is eligible as fallback. Diagnostics expose provenance booleans rather than executable paths, and an unavailable launcher requires service restart instead of PATH guessing.
|
|
23
28
|
- **Relay recovery separates transport, execution and quota pacing.** Authenticated WebSocket/HTTPS state is scoped to the current transport generation; ended-generation controls are discarded, and protocol violations affect their originating transport. Ambiguous side effects are not replayed. Cancellation removes ownership, terminal retention is bounded, and reconnects cannot accumulate execution time or delivery grace. Diagnostics retain sanitized classifications rather than peer text. The quota evidence and polling limits below distinguish repository mechanisms from provider usage.
|
|
24
29
|
- **Operating-system sleep is an observable suspension boundary, not a network guarantee.** On supported macOS hosts, diagnostics correlate bounded sleep history with runtime stalls and recovered relay outages. Machine Bridge cannot keep JavaScript or a socket executing while the machine is suspended, and sleep correlation does not identify unrelated upstream network causes.
|
package/docs/CLIENTS.md
CHANGED
|
@@ -2,23 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
## The central distinction
|
|
4
4
|
|
|
5
|
-
An MCP server is not a model provider.
|
|
5
|
+
An MCP server is not a model provider.
|
|
6
|
+
It exposes tools, resources, or prompts.
|
|
7
|
+
The MCP host is the AI application that owns the conversation, chooses or supplies the model, decides when a tool should be called, sends the tool request, and adds the result back to the model context.
|
|
6
8
|
|
|
7
9
|
For this project:
|
|
8
10
|
|
|
9
11
|
|
|
10
|
-
A local stdio connection does **not** use the model running in a separate ChatGPT web conversation.
|
|
12
|
+
A local stdio connection does **not** use the model running in a separate ChatGPT web conversation.
|
|
13
|
+
It uses whatever model/session the local host is configured to use:
|
|
11
14
|
|
|
12
15
|
- Claude Desktop uses the Claude account/model available to that application.
|
|
13
16
|
- Cursor uses the model/provider configured in Cursor.
|
|
14
17
|
- Codex CLI and the Codex IDE integration use their own authenticated Codex/OpenAI configuration.
|
|
15
18
|
- ChatGPT Desktop can use its signed-in ChatGPT/Codex host session and can launch local stdio servers on supported hosts.
|
|
16
19
|
|
|
17
|
-
The MCP protocol itself intentionally does not dictate how the host obtains an LLM.
|
|
20
|
+
The MCP protocol itself intentionally does not dictate how the host obtains an LLM.
|
|
21
|
+
The optional MCP sampling primitive can let a server ask a capable host for a completion, but `machine-bridge-mcp` does not depend on sampling and does not bundle a model SDK.
|
|
18
22
|
|
|
19
23
|
## Why keep stdio when coding clients already have tools?
|
|
20
24
|
|
|
21
|
-
For many users, the client's native filesystem, patch, terminal, and approval system is sufficient.
|
|
25
|
+
For many users, the client's native filesystem, patch, terminal, and approval system is sufficient.
|
|
26
|
+
In that case, adding Machine Bridge over stdio is redundant and should be skipped.
|
|
22
27
|
|
|
23
28
|
The stdio mode exists for narrower cases:
|
|
24
29
|
|
|
@@ -41,19 +46,35 @@ It is therefore an optional compatibility and reuse surface, not a replacement f
|
|
|
41
46
|
| Several local clients should share identical tool semantics | stdio |
|
|
42
47
|
| Access is required from another device or hosted agent | Remote Worker |
|
|
43
48
|
|
|
44
|
-
The MCP specification defines stdio and Streamable HTTP as standard transports.
|
|
49
|
+
The MCP specification defines stdio and Streamable HTTP as standard transports.
|
|
50
|
+
In stdio, the host launches the server as a subprocess and exchanges newline-delimited JSON-RPC through stdin/stdout.
|
|
51
|
+
Streamable HTTP runs the server independently behind an HTTP endpoint.
|
|
45
52
|
|
|
46
|
-
Machine Bridge uses MCP `2026-07-28` for both stdio and remote Streamable HTTP.
|
|
53
|
+
Machine Bridge uses MCP `2026-07-28` for both stdio and remote Streamable HTTP.
|
|
54
|
+
Requests carry version and capabilities in `_meta`; `server/discover` replaces initialization, there is no MCP protocol session, and an HTTP response stream belongs to exactly one request.
|
|
55
|
+
`initialize`, `Mcp-Session-Id`, `Last-Event-ID`, replay markers, and other removed protocol-session markers receive bounded upgrade guidance and cannot dispatch tool work. There is no stdio compatibility shim; clients must use request-scoped metadata and `server/discover`.
|
|
56
|
+
Remote `/mcp` is POST-only, so GET returns 405 rather than acting as a recovery channel.
|
|
57
|
+
Closing a current request stream cancels that request, and a connection, process, OAuth token, or stdio lifetime is never treated as conversation identity.
|
|
47
58
|
|
|
48
59
|
## Automatic capability selection
|
|
49
60
|
|
|
50
|
-
`server/discover` supplies conservative static server guidance, while `session_bootstrap` and `resolve_task_capabilities` explicitly refresh bounded project facts, authority-permitted instructions, skills, explicit/automatic package commands, applications, browser capability, and task-specific execution routes.
|
|
61
|
+
`server/discover` supplies conservative static server guidance, while `session_bootstrap` and `resolve_task_capabilities` explicitly refresh bounded project facts, authority-permitted instructions, skills, explicit/automatic package commands, applications, browser capability, and task-specific execution routes.
|
|
62
|
+
Use the resolver when that refreshed context or route selection is material; straightforward file, Git, and shell work should use the already exposed tools directly rather than paying an extra discovery round trip.
|
|
63
|
+
The resolver scores route bundles instead of forcing a single tool: registered commands, Bash/direct argv, process sessions, managed jobs, files/Git, browser, applications, resources, and diagnostics may appear together with ambiguity and fallback metadata.
|
|
64
|
+
This advice never removes a policy-visible tool; direct Bash remains available under shell-capable authority.
|
|
51
65
|
|
|
52
|
-
The resolver always rescans task-specific metadata.
|
|
66
|
+
The resolver always rescans task-specific metadata.
|
|
67
|
+
A client that already holds `refresh.fingerprint` may send it as `known_refresh_fingerprint`; if the static instruction/skill/command identity is unchanged, the response omits that repeated material but still returns fresh skill/command matches, application results, ranked tools, and route advice.
|
|
68
|
+
Capability results are filtered by effective account authority, so a restricted role does not receive hidden application/browser/shell metadata from a fuller daemon.
|
|
69
|
+
No instruction file is required for the default layers, and no repository file is written automatically.
|
|
53
70
|
|
|
54
|
-
The host still owns the agent loop.
|
|
71
|
+
The host still owns the agent loop.
|
|
72
|
+
A hosted client may use the recommendation automatically, ask for confirmation, expose only part of the catalog, or ignore server instructions.
|
|
73
|
+
No MCP implementation can guarantee automatic invocation from the server side.
|
|
74
|
+
Machine Bridge models that limitation explicitly instead of treating a recommendation as execution.
|
|
55
75
|
|
|
56
|
-
For browser tasks, the remote host reaches the local extension through the Worker and daemon.
|
|
76
|
+
For browser tasks, the remote host reaches the local extension through the Worker and daemon.
|
|
77
|
+
The extension controls the existing Chromium profile; it is not a separate Playwright profile.
|
|
57
78
|
|
|
58
79
|
## Generate local configuration
|
|
59
80
|
|
|
@@ -73,6 +94,12 @@ machine-mcp client-config --client all --workspace /path/to/project --profile ed
|
|
|
73
94
|
machine-mcp client-config --client all --workspace /path/to/project --profile review
|
|
74
95
|
```
|
|
75
96
|
|
|
97
|
+
## Current protocol requirements
|
|
98
|
+
|
|
99
|
+
Use a client that sends the current protocol version and client capabilities in request metadata on every supported request.
|
|
100
|
+
The default stdio path and remote HTTP reject `initialize` and missing or unsupported request metadata.
|
|
101
|
+
Stdio has no legacy handshake or metadata-normalization mode. `--compat` is an unsupported option, and `MBM_MCP_COMPAT` is ignored; requests missing the current version or capability metadata are rejected just as they are over remote HTTP.
|
|
102
|
+
|
|
76
103
|
## JSON stdio configuration
|
|
77
104
|
|
|
78
105
|
Claude Desktop, Cursor, and many generic clients use a shape similar to:
|
|
@@ -107,7 +134,8 @@ command = "/absolute/path/to/node"
|
|
|
107
134
|
args = ["/absolute/path/to/machine-mcp.mjs", "stdio", "--workspace", "/path/to/project", "--profile", "full"]
|
|
108
135
|
```
|
|
109
136
|
|
|
110
|
-
Codex CLI, the Codex IDE extension, and supported ChatGPT Desktop Codex hosts can share MCP configuration on the same Codex host.
|
|
137
|
+
Codex CLI, the Codex IDE extension, and supported ChatGPT Desktop Codex hosts can share MCP configuration on the same Codex host.
|
|
138
|
+
ChatGPT web does not read local Codex configuration files; web use requires a hosted plugin/connector or a reachable remote MCP endpoint.
|
|
111
139
|
|
|
112
140
|
## Remote hosted-client connection
|
|
113
141
|
|
|
@@ -117,7 +145,9 @@ Run:
|
|
|
117
145
|
machine-mcp --workspace /path/to/project
|
|
118
146
|
```
|
|
119
147
|
|
|
120
|
-
Enter the printed `/mcp` URL in the remote MCP connector.
|
|
148
|
+
Enter the printed `/mcp` URL in the remote MCP connector.
|
|
149
|
+
During OAuth authorization, verify the displayed client name and redirect URI before entering a Machine Bridge account name and password.
|
|
150
|
+
The Worker exposes Streamable HTTP plus protected-resource discovery, authorization-server discovery, dynamic client registration, PKCE S256, `offline_access`, and rotating refresh tokens.
|
|
121
151
|
|
|
122
152
|
Supported configuration paths are:
|
|
123
153
|
|
|
@@ -125,9 +155,15 @@ Supported configuration paths are:
|
|
|
125
155
|
- **Claude custom connectors:** add the exact `/mcp` URL under Claude's connector settings and leave static OAuth client credentials empty so Claude can use DCR. Hosted Claude surfaces use `https://claude.ai/api/mcp/auth_callback`; the Worker accepts that exact registered redirect and rotates refresh tokens for the public client. See Anthropic's [remote custom connector guide](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp) and [authentication contract](https://claude.com/docs/connectors/building/authentication).
|
|
126
156
|
- **Microsoft Copilot Studio:** from the agent's **Tools** page, select **Add a tool > New tool > Model Context Protocol**, enter the `/mcp` URL, then select **OAuth 2.0 > Dynamic discovery**. Create the connection and add it to the agent. See Microsoft's [existing MCP server guide](https://learn.microsoft.com/en-us/microsoft-copilot-studio/mcp-add-existing-server-to-agent).
|
|
127
157
|
|
|
128
|
-
OAuth navigations and form submissions from opaque or client-specific browser containers are routed normally but receive no cross-origin response-sharing permission unless their exact origin is allowed.
|
|
158
|
+
OAuth navigations and form submissions from opaque or client-specific browser containers are routed normally but receive no cross-origin response-sharing permission unless their exact origin is allowed.
|
|
159
|
+
The authorization page permits form navigation only to itself and the validated redirect origin.
|
|
160
|
+
For a validated Microsoft `consent.azure-apim.net` callback, the form policy also permits HTTPS subdomains of that same Microsoft consent domain and the exact Copilot Studio origin because Power Platform redirects its global callback to a regional endpoint and then back to Copilot Studio.
|
|
161
|
+
Claude remote connectors originate from Anthropic infrastructure, while Copilot Studio connectivity runs through Power Platform connectors, so neither is a reason to broaden the browser CORS allowlist.
|
|
129
162
|
|
|
130
|
-
Several OAuth clients and named accounts can coexist.
|
|
163
|
+
Several OAuth clients and named accounts can coexist.
|
|
164
|
+
Accounts have independent passwords, roles, active state, versions, authorization codes, access tokens, refresh tokens, and targeted revocation.
|
|
165
|
+
Their effective tool sets are intersected with the connected daemon policy.
|
|
166
|
+
All accounts still share one daemon and OS user, so hard tenant isolation requires separate deployments; see [MULTI_ACCOUNT.md](MULTI_ACCOUNT.md).
|
|
131
167
|
|
|
132
168
|
## Profile guidance
|
|
133
169
|
|
|
@@ -144,31 +180,100 @@ Before connecting a host, verify the local implementation directly:
|
|
|
144
180
|
machine-mcp full-test --workspace /path/to/project
|
|
145
181
|
```
|
|
146
182
|
|
|
147
|
-
A passing result proves that Machine Bridge and the local OS allowed its temporary file/process/shell/key/job probes at that time.
|
|
183
|
+
A passing result proves that Machine Bridge and the local OS allowed its temporary file/process/shell/key/job probes at that time.
|
|
184
|
+
It does not prove that a hosted MCP connector will expose every relay-advertised tool, deliver a later request, or that a cloud/remote account will authorize it.
|
|
148
185
|
|
|
149
|
-
For SSH automation, prefer `generate_ssh_key_resource` under canonical full, or `machine-mcp resource generate-ssh-key` from the terminal.
|
|
186
|
+
For SSH automation, prefer `generate_ssh_key_resource` under canonical full, or `machine-mcp resource generate-ssh-key` from the terminal.
|
|
187
|
+
The private key remains a local resource; private bytes and local paths are omitted by default, while metadata and the bare public fingerprint are returned.
|
|
188
|
+
Paths require an explicit disclosure option.
|
|
189
|
+
Installation of the public key into Google OS Login or a remote `authorized_keys` file remains an explicit external action.
|
|
150
190
|
|
|
151
191
|
## Host-side safety rules
|
|
152
192
|
|
|
153
|
-
The local `full` profile controls Machine Bridge's own tool catalog, path resolver, path display, process environment, and shell availability.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
193
|
+
The local `full` profile controls Machine Bridge's own tool catalog, path resolver, path display, process environment, and shell availability.
|
|
194
|
+
For remote transport, the local transaction gate additionally controls when high-impact effects may run.
|
|
195
|
+
It does not control the MCP host's model policy, approval UI, connector gateway, or platform execution filters.
|
|
196
|
+
See [LOCAL_AUTHORIZATION.md](LOCAL_AUTHORIZATION.md).
|
|
197
|
+
|
|
198
|
+
Host-rendered tool invocation chips, status lines, or labels such as “called tool” are presentation owned by the MCP host, not Machine Bridge log records.
|
|
199
|
+
Machine Bridge can suppress its own routine per-tool logs outside debug and can reduce unnecessary calls, but it cannot hide or restyle host-owned tool indicators.
|
|
200
|
+
A host-side UI setting, if one exists, is the only layer that can change that presentation.
|
|
201
|
+
Prefer fewer, coarser calls and avoid unnecessary capability-resolution calls when direct tools already suffice.
|
|
202
|
+
|
|
203
|
+
Hosts may cache MCP discovery metadata, input schemas, conversation/surface routing, and workspace-approved app actions independently of the running server.
|
|
204
|
+
For routine health checks, call `server_info` with `detail: "summary"`; it keeps the effective policy/count, account role without account ID, daemon readiness/relay state, pending/socket capacity, and foreground/settlement limits while omitting OAuth metadata, exact tool arrays, and full observability.
|
|
205
|
+
The empty/default call returns the current `full` projection and is the cold path when an exact effective-tool list, account identity, or detailed counters are required.
|
|
206
|
+
`server_info.tool_delivery` reports the current remote foreground maximum, process one-shot maximum, ordinary daemon-tool ceiling, process blocking-poll wait/cooldown ceilings, and Worker settlement overhead.
|
|
207
|
+
If an already-open host appears to advertise older/larger values, compare the live `server_info` contract with a harmless invocation-validator/behavior probe and, when the deployment uses a frozen ChatGPT workspace app snapshot, the Workspace **Action control** view after the supported refresh/review path.
|
|
208
|
+
Product-level remediation is warranted only when the governed Workspace approved snapshot itself remains stale/partial/mixed or separate workspace policy requires review.
|
|
209
|
+
Opaque host-internal cache inspection is intentionally excluded from release and upgrade verification.
|
|
210
|
+
Product-control-plane actions follow the repository's [authorization contract](https://github.com/YuLeiFuYun/machine-bridge-mcp/blob/main/AGENTS.md#sole-explicit-user-authorization-boundary).
|
|
211
|
+
The Worker handles known maximum-only version skew as a structured no-side-effect tool error.
|
|
212
|
+
|
|
213
|
+
For routine workspace inventory, prefer `project_overview` with `detail: "summary"`.
|
|
214
|
+
It keeps workspace/Git identity, effective and daemon policy/tool counts, compact capability-routing status, and up to 40 top-level names/types, while omitting account ID, exact tool arrays, routing fingerprints, and repeated entry paths/sizes.
|
|
215
|
+
Request full detail only when those exact diagnostic fields are needed.
|
|
216
|
+
As with `server_info`, summary is a presentation projection after authorization, not a lower-authority mode.
|
|
217
|
+
`server_info(detail="summary")` likewise keeps the established hot-path delivery/readiness fields but does not grow with every new exact timing diagnostic; the exact hosted nonterminal progress-coalescing interval is available in full detail while the tool contract and documentation carry the behavioral guarantee.
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
Machine Bridge itself does not block files because their names look sensitive.
|
|
221
|
+
In remote mode, use the compact projection to inspect `server_info.authorization.effective_policy`; request full detail when exact `effective_tools` membership is required.
|
|
222
|
+
`daemon.policy` is only the local ceiling.
|
|
223
|
+
If the effective profile is `full` and the effective tool is present but a direct call is rejected before a structured result, Machine Bridge has no observation of that rejected request and cannot identify the cause from server-side evidence alone; conversation/surface app-routing state, a stale host action/tool snapshot, host tool filtering, connector-gateway policy, client routing, and platform policy are possibilities, not a diagnosis.
|
|
224
|
+
Conversely, a successful `diagnose_runtime` response proves that request reached the local daemon through the currently used connector path and therefore does not support a blanket claim that Machine Bridge is currently disabled by the platform.
|
|
225
|
+
A successful same-tool invocation in a fresh supported conversation is additional host-side evidence against a blanket outage when an older conversation still fails before dispatch; treat the difference as a host conversation/surface/snapshot issue until stronger evidence identifies the exact layer.
|
|
226
|
+
If `diagnose_runtime` arrives but its fixed process or shell probe fails, the likely source moves downstream to local OS policy, endpoint-security software, permissions, shell configuration, or Machine Bridge policy.
|
|
227
|
+
If an execution tool instead returns a child exit code plus bounded stdout/stderr, the child did start; for nested commands such as `ssh`, a remote forced-command usage screen or allowlist refusal in that output is target-side authorization evidence, not a local spawn or Machine Bridge policy denial.
|
|
228
|
+
Changing `--profile`, `--unrestricted-paths`, or `--absolute-paths` cannot override host-side, operating-system, or remote-target enforcement.
|
|
229
|
+
|
|
230
|
+
Expected file-operation failures arrive as ordinary MCP tool-error results, not JSON-RPC transport failures.
|
|
231
|
+
Clients should branch first on `structuredContent.error.code`, then optionally on the bounded `details.reason`.
|
|
232
|
+
For example, `conflict/already_exists`, `conflict/hash_mismatch`, `conflict/text_ambiguous`, and `conflict/context_not_found` require a fresh read and reconciliation; `not_found/text_not_found` means the requested edit fragment is absent; `invalid_request` means the request or patch syntax must change.
|
|
233
|
+
Do not log or display tool arguments to reconstruct diagnostics: public error details intentionally omit paths, file content, edit fragments, and compared hashes.
|
|
234
|
+
|
|
235
|
+
Remote configurable browser/application foreground tools default to 20 seconds, compound `computer_observe`/`computer_act` default to 30 seconds, and all configurable foreground tools advertise a 45-second maximum.
|
|
236
|
+
Hosted browser content/action calls require an explicit `tab_id` obtained from `browser_list_tabs`, and hosted `computer_observe(surface="browser")` requires the same explicit target before it issues a snapshot; they do not silently retarget to whichever shared Chromium tab happens to be active.
|
|
237
|
+
Those values bound daemon execution; the Worker records its settlement deadline five seconds later.
|
|
238
|
+
Remote `exec_command`, `run_process`, and `run_local_command` use a separate durable 10-second acceptance contract with independently bounded detached execution.
|
|
239
|
+
Hosted `read_process` supports paced same-response follow-up: the actual output/exit blocking wait is at most one second, while a repeated would-block request inside the fifteen-second cooldown remains inside that same MCP call until output/exit or the cooldown boundary instead of returning a rapid running checkpoint.
|
|
240
|
+
A live result reports `status_polling_mode=paced_followup` plus `next_blocking_poll_after_ms`; callers may continue reading when the current task needs output or terminal state, but must not busy-loop.
|
|
241
|
+
Admission and transport latency may consume part of an individual request interval, and none of these values guarantees host receipt.
|
|
242
|
+
They are not evidence for a guessed whole-assistant-turn deadline: clients must not stop merely because some number of wall-clock minutes has elapsed.
|
|
243
|
+
Missing or role-hidden tools, non-object arguments, and requests above current limits fail at the shared Worker schema boundary before daemon dispatch; schema failures include `side_effects_started=false`.
|
|
244
|
+
SSE-capable current requests receive the same pre-dispatch validation as JSON responses and never allocate a recovery stream.
|
|
245
|
+
Do not treat this as a retry invitation for the same oversized mutation, and do not attempt to evade a host refusal by renaming, encoding, or switching to another arbitrary execution tool.
|
|
246
|
+
Durable acceptance does not force a hosted-turn handoff.
|
|
247
|
+
When the current task needs terminal state, a known active job may be followed through bounded same-response `read_job` calls while calls continue to be accepted; relay reads report `status_polling_mode=bounded_followup` and `host_turn_handoff_recommended=false`.
|
|
248
|
+
Hosted active `read_job` defaults to a 40-second server-side long-poll.
|
|
249
|
+
Terminal settlement returns on the next bounded five-second internal poll; nonterminal status/phase/dependency progress is coalesced for at least 30 seconds by default, and `current_step`-only churn does not wake the hosted call.
|
|
250
|
+
`wait_ms=0` requests an immediate checkpoint, while public hosted `wait_ms` is capped at 60 seconds.
|
|
251
|
+
The default is deliberately 40 seconds rather than equal to that maximum: live acceptance must prove that the target host carries the omitted-parameter default without terminating the tool call, and longer jobs continue through another paced read of the same `job_id` rather than a longer single HTTP request.
|
|
252
|
+
Per-call survival does not establish aggregate assistant-response lifetime; a host may still impose a real boundary after many individually successful reads.
|
|
253
|
+
Do not replace server-side pacing with a rapid host-side checkpoint loop.
|
|
254
|
+
Handoff is justified only after an actual host/tool boundary is observed, external input or authorization is required, or the user explicitly requested a checkpoint.
|
|
255
|
+
After a real host boundary, resume the same durable `job_id` rather than resubmitting the operation.
|
|
256
|
+
For a coherent non-interactive workflow with several local commands, prefer a repository umbrella command or one multi-step `start_job` rather than a chain of one-step process carriers; this is a host-event-density control, not a task-duration limit.
|
|
257
|
+
A valid job ID that is no longer retained returns typed `not_found`; this is missing recovery evidence, not proof that its side effect never executed.
|
|
258
|
+
Completed one-step process carriers use lower-priority terminal retention than explicit managed jobs, so removable helper history is reclaimed first within the shared 512-state durable store.
|
|
259
|
+
Hosted `list_jobs` is an aggregate-only inventory surface: the Worker removes job IDs, names, and `recent_process_recovery` handles, while local CLI/stdio retains the detailed bounded inventory for administration.
|
|
260
|
+
The same pacing principle applies to read-only status/diagnostic surfaces such as `server_info` and `diagnose_runtime`: use them to capture relevant evidence rather than switching surfaces merely to wait on the same background state.
|
|
261
|
+
`server/discover` and `tools/list` both advertise `ttlMs=0`; discovery instructions therefore refresh alongside the tool contract, every host-visible tool description carries `Tool schema generation N`, and `server_info.tool_delivery` exposes the current generation/version plus `discovery_ttl_ms=0` and `tool_list_ttl_ms=0` while reporting that the server cannot know which generation an external host has cached.
|
|
262
|
+
`host_turn_deadline_observable=false` means Machine Bridge also cannot predict when the external host will terminate an assistant turn; `managed_jobs_detached_from_mcp_response=true` means that boundary does not itself cancel an already accepted durable job.
|
|
263
|
+
A release that changes tool semantics therefore verifies the live Machine Bridge runtime/discovery contract and harmless changed-generation invocation behavior after activation.
|
|
264
|
+
When ChatGPT workspace governance freezes approved actions, use the Workspace Action control snapshot after automation performs the supported refresh/review path as the product-level publication evidence.
|
|
265
|
+
Opaque host-internal cache inspection is intentionally excluded from release acceptance and must not trigger reconnect, refresh, recreation, or republication.
|
|
266
|
+
For durable workflows that must survive a later host boundary:
|
|
167
267
|
|
|
168
268
|
1. register credentials locally as resource aliases so their values never enter MCP arguments;
|
|
169
|
-
2. choose a fresh `idempotency_key` and submit a complete policy-authorized `start_job` plan before the workflow depends on later cleanup calls; hosted `start_job` requires that key before dispatch so an ambiguous acceptance response can be retried with the same logical arguments instead of creating a second job.
|
|
269
|
+
2. choose a fresh `idempotency_key` and submit a complete policy-authorized `start_job` plan before the workflow depends on later cleanup calls; hosted `start_job` requires that key before dispatch so an ambiguous acceptance response can be retried with the same logical arguments instead of creating a second job.
|
|
270
|
+
Preserve the returned `job_id`, `recovery_key`, and `control_key` together: hosted `read_job` requires `recovery_key`, `cancel_job` requires `control_key`, and `depends_on` requires an exact `dependency_recovery` mapping.
|
|
271
|
+
These capabilities are purpose/principal bound and are not discoverable through hosted `list_jobs`; batch coherent non-interactive local commands into that managed plan (or a repository umbrella command) instead of creating a one-step tool event for every small probe; `stage_job` is only a non-running draft, while an explicit local operator may use `machine-mcp job submit PLAN.json`;
|
|
170
272
|
3. use job-scoped temporary files or remote stdin scripts;
|
|
171
273
|
4. put idempotent cleanup in `finally_steps`;
|
|
172
274
|
5. inspect/cancel through `machine-mcp job ...` if the host later denies tools.
|
|
173
275
|
|
|
174
|
-
The initial `start_job` request is still subject to host approval.
|
|
276
|
+
The initial `start_job` request is still subject to host approval.
|
|
277
|
+
If it is blocked before dispatch, the operator can review and submit the same JSON plan locally with `machine-mcp job submit plan.json`.
|
|
278
|
+
If the hosted acceptance outcome is **unknown** rather than definitely blocked, do not switch to a second submission path: retry the same hosted arguments with the same `idempotency_key` while the retained recovery window is still valid.
|
|
279
|
+
See [MANAGED_JOBS.md](MANAGED_JOBS.md).
|