machine-bridge-mcp 0.8.1 → 0.9.0
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 +28 -0
- package/CONTRIBUTING.md +12 -4
- package/README.md +38 -2
- package/SECURITY.md +10 -0
- package/docs/AGENT_CONTEXT.md +206 -0
- package/docs/ARCHITECTURE.md +11 -2
- package/docs/ENGINEERING.md +6 -0
- package/docs/LOGGING.md +9 -7
- package/docs/OPERATIONS.md +3 -3
- package/docs/TESTING.md +5 -3
- package/package.json +6 -4
- package/src/local/agent-context.mjs +708 -0
- package/src/local/cli.mjs +22 -0
- package/src/local/relay-connection.mjs +100 -17
- package/src/local/runtime.mjs +51 -3
- package/src/local/service.mjs +1 -1
- package/src/shared/server-metadata.json +1 -0
- package/src/shared/tool-catalog.json +172 -0
- package/src/worker/index.ts +23 -5
- package/tsconfig.json +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0 - 2026-07-12
|
|
4
|
+
|
|
5
|
+
### Agent context and local workflows
|
|
6
|
+
|
|
7
|
+
- Add `agent_context`, a bounded bootstrap tool with Codex-compatible instruction precedence: unrestricted `CODEX_HOME`/`~/.codex` guidance, then project root-to-target scopes, selecting the first non-empty `AGENTS.override.md` or `AGENTS.md` candidate per directory under a default 32 KiB combined budget. Add hierarchical `.machine-bridge/agent.json` manifests plus an optional unrestricted user manifest at `~/.config/machine-bridge-mcp/agent.json` for custom candidate priority and bounds.
|
|
8
|
+
- Add `list_local_skills` and `load_local_skill` with Codex-style progressive disclosure. Default discovery scans target-to-root `.agents/skills`, unrestricted user/admin roots, and canonicalized symlinked skill directories; invalid metadata is skipped with bounded warnings. Skill loading returns instructions and a relative file inventory without implicitly executing scripts.
|
|
9
|
+
- Add `list_local_commands` and direct-argv `run_local_command`. Nearest manifests can override or remove inherited commands, caller arguments require manifest opt-in, and callers cannot increase the manifest timeout ceiling.
|
|
10
|
+
|
|
11
|
+
### Architecture, security, and tests
|
|
12
|
+
|
|
13
|
+
- Extract agent discovery into `AgentContextManager` rather than expanding transport or runtime dispatch responsibilities. Keep a static MCP catalog across Worker and stdio transports so host-side caching and filtering do not require dynamic per-skill tools.
|
|
14
|
+
- Reject escaping instruction/config paths, unknown manifest fields, out-of-policy skill symlink targets, symbolic-link skill entrypoints, ambiguous skill names, oversized content/argv, and execution attempts under non-execution profiles. Document that repository instructions and skills are untrusted content and that registered commands are convenience aliases, not a sandbox or approval boundary.
|
|
15
|
+
- Add regression coverage for global/project override selection, empty-candidate fallback, custom priority, instruction-byte ceilings, target-to-root skill discovery, symlinked skill folders, invalid metadata warnings, command override/removal, literal argument handling without shell parsing, timeout ceilings, path escape denial, and execution-profile denial. Update server instructions, architecture, security, testing, and operator documentation for the new bootstrap workflow.
|
|
16
|
+
|
|
17
|
+
## 0.8.2 - 2026-07-11
|
|
18
|
+
|
|
19
|
+
### Relay reliability and protocol correctness
|
|
20
|
+
|
|
21
|
+
- Add a deadline for WebSocket connection establishment so a transport stuck in `CONNECTING` cannot freeze automatic reconnection indefinitely. Sustained-outage reminders now run on an independent exponential-backoff timer capped at 15 minutes instead of appearing only when another reconnect event happens.
|
|
22
|
+
- Handle Worker `{type:"error"}` messages explicitly. A daemon hello timeout is classified as transient and retried; unknown protocol errors, duplicate hello messages, identity/version mismatch, and authentication rejection terminate with actionable guidance instead of becoming an `unknown websocket message` warning.
|
|
23
|
+
- Validate daemon WebSocket JSON as a non-array object before field access. Invalid JSON closes with code 1007, non-object/unknown/duplicate protocol messages close with code 1002, and active daemon replacement semantics remain unchanged.
|
|
24
|
+
|
|
25
|
+
### Logging, tests, and documentation
|
|
26
|
+
|
|
27
|
+
- Replace default outage/recovery JSON field dumps with readable duration, attempt, cause, automatic-recovery, and long-outage action text. Exact seconds, error classes, retry delays, and raw transport details remain debug-only. Advance the autostart log schema so historical 0.8.1-format lines are separated into the bounded owner-only legacy snapshot. Treat a service-style daemon-only start that finds the workspace daemon already running as a silent idempotent success, preventing repeated lock warnings and duplicate readiness output from accumulating in service logs.
|
|
28
|
+
- Add deterministic tests for stalled connection attempts, autonomous reminder backoff, retryable versus fatal relay error messages, close-reason classification, and runtime control-message routing. Extend live Worker integration coverage to invalid JSON, non-object messages, duplicate hello, and unknown authenticated messages. Enable TypeScript unused-local and unused-parameter checks to prevent dead Worker code from accumulating.
|
|
29
|
+
- Update architecture, operations, logging, testing, and README guidance to match the implemented state machine and operator-facing behavior. Add a repository automation contract separating code/test/commit/push work from npm publication, global CLI installation, Worker deployment, credential rotation, and daemon/service operations; the owner performs those live release steps explicitly. Improve release-check diagnostics so a missing local or remote version tag is reported distinctly from a tag pointing at the wrong commit, with the required `release:publish` step named directly.
|
|
30
|
+
|
|
3
31
|
## 0.8.1 - 2026-07-11
|
|
4
32
|
|
|
5
33
|
### Fixed
|
package/CONTRIBUTING.md
CHANGED
|
@@ -4,15 +4,23 @@ This repository treats every Git-tracked or nonignored repository file as releas
|
|
|
4
4
|
|
|
5
5
|
## Required for every release-relevant change
|
|
6
6
|
|
|
7
|
-
Before
|
|
7
|
+
Before the reviewed code is pushed to `main`:
|
|
8
8
|
|
|
9
9
|
1. bump `package.json` to a version newer than the latest reachable `v*` tag;
|
|
10
10
|
2. add the matching dated section to `CHANGELOG.md`;
|
|
11
11
|
3. run `npm run check`, `npm audit`, `npm audit --omit=dev`, and `npm run worker:dry-run`;
|
|
12
12
|
4. inspect the complete diff and the npm package manifest;
|
|
13
|
-
5. push the reviewed
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
5. commit and push the reviewed change to GitHub.
|
|
14
|
+
|
|
15
|
+
The release operator then creates the matching Git tag and GitHub Release and publishes the same version to npm. These release actions are not implicit coding-agent tasks. Unless the user explicitly requests them in the current task, automation must not publish or alter npm versions, create tags or releases, install the CLI globally, deploy the Worker, rotate credentials, mutate live deployment state, or start/stop/install/remove the daemon or autostart service. See [AGENTS.md](AGENTS.md) for the repository automation contract.
|
|
16
|
+
|
|
17
|
+
After npm publication, the standard machine update is:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g --allow-scripts=esbuild,workerd,sharp machine-bridge-mcp@latest && machine-mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The npm command updates the global CLI. Normal `machine-mcp` startup checks the Worker deployment hash, expected version, and health, redeploys when necessary, and reconciles the daemon/autostart flow.
|
|
16
24
|
|
|
17
25
|
`npm run release-impact:check` enforces the version and changelog parts. It fails when release-relevant files changed after the latest version tag but the package version was not advanced.
|
|
18
26
|
|
package/README.md
CHANGED
|
@@ -108,6 +108,37 @@ machine-mcp stdio --workspace /path/to/project
|
|
|
108
108
|
|
|
109
109
|
The stdio server writes only JSON-RPC messages to stdout and operational logs to stderr. See [docs/CLIENTS.md](docs/CLIENTS.md) for the host/model distinction and transport trade-offs.
|
|
110
110
|
|
|
111
|
+
## Agent instructions, local skills, and command registry
|
|
112
|
+
|
|
113
|
+
For substantive workspace tasks, clients can call `agent_context` for the relevant file or directory. Its default instruction discovery mirrors Codex: under unrestricted policy it first checks `CODEX_HOME` or `~/.codex`, then walks from the project root to the target directory, selecting the first non-empty `AGENTS.override.md` or `AGENTS.md` in each scope. Deeper guidance has higher precedence, and the default combined budget is 32 KiB.
|
|
114
|
+
|
|
115
|
+
Skill discovery also follows Codex-style progressive disclosure. By default, Machine Bridge scans `.agents/skills` from the target directory through the project root; unrestricted policy additionally enables `~/.agents/skills` and, on Unix-like systems, `/etc/codex/skills`. `agent_context` initially returns bounded metadata, while `load_local_skill` returns the selected `SKILL.md` and file inventory without executing anything implicitly.
|
|
116
|
+
|
|
117
|
+
A project can add custom instruction candidates, explicit skill roots, and registered commands with `.machine-bridge/agent.json`:
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"version": 1,
|
|
122
|
+
"instruction_files": [
|
|
123
|
+
"PROJECT.override.md",
|
|
124
|
+
"AGENTS.override.md",
|
|
125
|
+
"AGENTS.md"
|
|
126
|
+
],
|
|
127
|
+
"instruction_max_bytes": 65536,
|
|
128
|
+
"commands": {
|
|
129
|
+
"check": {
|
|
130
|
+
"description": "Run repository validation.",
|
|
131
|
+
"argv": ["npm", "run", "check"],
|
|
132
|
+
"cwd": ".",
|
|
133
|
+
"timeout_seconds": 600,
|
|
134
|
+
"allow_extra_args": false
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`instruction_files` is a priority list: each directory contributes only its first non-empty candidate. Deeper manifests override earlier settings and can remove an inherited command with `null`. `run_local_command` executes registered commands as direct argv processes without shell parsing and is available only when direct execution is enabled. See [Agent context, local skills, and registered commands](docs/AGENT_CONTEXT.md) for the complete contract.
|
|
141
|
+
|
|
111
142
|
## Policy controls
|
|
112
143
|
|
|
113
144
|
The default is `full`. Narrow or customize it with explicit flags:
|
|
@@ -233,6 +264,10 @@ The exact `tools/list` response reflects the active local policy. Definitions co
|
|
|
233
264
|
|
|
234
265
|
- `server_info`
|
|
235
266
|
- `project_overview`
|
|
267
|
+
- `agent_context` — effective instructions, skill summaries, and registered commands for a target path
|
|
268
|
+
- `list_local_skills`
|
|
269
|
+
- `load_local_skill` — load instructions and file inventory without implicit execution
|
|
270
|
+
- `list_local_commands`
|
|
236
271
|
- `list_roots`
|
|
237
272
|
- `list_dir`
|
|
238
273
|
- `list_files`
|
|
@@ -270,6 +305,7 @@ Managed jobs are non-interactive and persist independently of the MCP connection
|
|
|
270
305
|
|
|
271
306
|
### Processes
|
|
272
307
|
|
|
308
|
+
- `run_local_command` — direct argv execution of a manifest-registered command
|
|
273
309
|
- `run_process` — one-shot argv execution without a shell
|
|
274
310
|
- `start_process`
|
|
275
311
|
- `read_process`
|
|
@@ -335,7 +371,7 @@ Default state roots:
|
|
|
335
371
|
|
|
336
372
|
State/config writes use owner-only temporary files, flushes, and atomic rename. Malformed state is retained as a bounded corrupt backup before reconstruction. Resource source paths are redacted from `status` output. Active managed-job plans are owner-only and are deleted after a terminal result; bounded redacted results are retained temporarily. Uninstall validates markers, canonical paths, active locks, workspace/source exclusions, and known contents before recursive deletion.
|
|
337
373
|
|
|
338
|
-
Default foreground logs report authenticated relay readiness, persistent
|
|
374
|
+
Default foreground logs report authenticated relay readiness, readable persistent-degradation summaries, and recovery rather than raw WebSocket callbacks or JSON field dumps. Brief self-healing disconnects and close codes/reasons are debug-only. Stalled connection attempts have a deadline, and sustained-outage reminders use autonomous exponential backoff. Every per-tool event—including success, failure, cancellation, and slow-call timing—also appears only at `--log-level debug` or `--verbose`. Background services use `warn`, so ordinary tool outcomes and brief network changes do not fill daemon logs. Log messages and structured fields are bounded, secret-like keys and known token formats are redacted, and tool arguments/results are not written. See [docs/LOGGING.md](docs/LOGGING.md) and [docs/OPERATIONS.md](docs/OPERATIONS.md).
|
|
339
375
|
|
|
340
376
|
## Development and verification
|
|
341
377
|
|
|
@@ -350,7 +386,7 @@ npm pack --dry-run
|
|
|
350
386
|
|
|
351
387
|
`npm run check` covers privacy and release-impact gates, architecture/link invariants, generated Worker types, TypeScript, JavaScript syntax, catalog-to-runtime handler parity, deterministic relay lifecycle and secure-file tests, local path/write/process/state/log/service invariants, Ed25519/RSA generation and key-pair validation, real-machine `full` sandbox acceptance, a clean npm package-manifest/sensitive-artifact check, managed-job integrity/redaction/finally/cancellation/recovery, a live stdio MCP flow, and a live local OAuth/Worker/WebSocket/MCP flow. GitHub Actions runs the suite on Linux, macOS, and Windows with the pinned Node 26/npm 12 baseline; macOS and package-audit jobs also exercise the documented isolated global installation.
|
|
352
388
|
|
|
353
|
-
See [docs/MANAGED_JOBS.md](docs/MANAGED_JOBS.md), [docs/TESTING.md](docs/TESTING.md), [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md), [docs/ENGINEERING.md](docs/ENGINEERING.md), and [SECURITY.md](SECURITY.md).
|
|
389
|
+
See [docs/AGENT_CONTEXT.md](docs/AGENT_CONTEXT.md), [docs/MANAGED_JOBS.md](docs/MANAGED_JOBS.md), [docs/TESTING.md](docs/TESTING.md), [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md), [docs/ENGINEERING.md](docs/ENGINEERING.md), and [SECURITY.md](SECURITY.md).
|
|
354
390
|
|
|
355
391
|
## Uninstall
|
|
356
392
|
|
package/SECURITY.md
CHANGED
|
@@ -51,6 +51,16 @@ The default for newly selected workspaces is `full`, which prioritizes ease of u
|
|
|
51
51
|
|
|
52
52
|
For untrusted repositories or instructions, run the bridge inside a disposable VM/container or under a dedicated low-privilege OS account. On macOS and Windows, this external isolation is especially important. The project does not claim an in-process OS sandbox.
|
|
53
53
|
|
|
54
|
+
## Agent instructions, skills, and command manifests
|
|
55
|
+
|
|
56
|
+
Repository and user instruction files are untrusted content from the model's perspective. `agent_context` returns their text in deterministic precedence order but does not certify correctness or safety. A malicious `AGENTS.md`, custom instruction file, or `SKILL.md` can attempt prompt injection or recommend destructive operations. Use only trusted repositories and skill roots, or isolate the bridge externally.
|
|
57
|
+
|
|
58
|
+
Skill loading is non-executing. `load_local_skill` returns an entrypoint and bounded file inventory; scripts remain inert until a separate process or command tool is called. Symlinked skill directories are followed only after canonical path-policy validation, while symbolic-link `SKILL.md` entrypoints are rejected. Traversal, cycles, content, summaries, and inventory are bounded.
|
|
59
|
+
|
|
60
|
+
Registered commands are available only under direct-execution-capable policy. They use argv spawning rather than shell parsing, reject undeclared caller arguments, and enforce the manifest timeout as a ceiling. They are not an approval or sandbox boundary: a repository-controlled package script, interpreter, compiler, or executable can still run arbitrary code with local-user authority. Deeper manifests can override or remove inherited commands, so callers must obtain context for the actual target path rather than assuming the repository-root registry applies everywhere.
|
|
61
|
+
|
|
62
|
+
The remote MCP host remains an independent boundary. Machine Bridge can advertise these tools and instruct the model to bootstrap with `agent_context`, but it cannot force a host to expose or invoke them, and it cannot bypass host confirmation or refusal.
|
|
63
|
+
|
|
54
64
|
## Filesystem exposure
|
|
55
65
|
|
|
56
66
|
Direct filesystem scope is profile-dependent. The default `full` profile is unrestricted. The `agent`, `edit`, and `review` profiles confine direct filesystem tools to the canonical selected workspace, including symbolic-link resolution.
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Agent context, local skills, and registered commands
|
|
2
|
+
|
|
3
|
+
The default compatibility target is the current OpenAI Codex guidance for repository instructions and filesystem skills.
|
|
4
|
+
|
|
5
|
+
Machine Bridge exposes a stable agent bootstrap layer so an MCP client can use repository instructions and local workflows without requiring one dynamically named MCP tool per skill or command.
|
|
6
|
+
|
|
7
|
+
The default discovery rules intentionally track current Codex conventions where practical. Machine Bridge also adds a JSON manifest for custom instruction priority, additional skill roots, and named local commands.
|
|
8
|
+
|
|
9
|
+
This does not make a remote MCP session identical to a locally installed coding agent. The MCP host can independently filter tools, require confirmation, truncate results, or decline calls before they reach Machine Bridge. The bridge cannot alter or bypass those host decisions.
|
|
10
|
+
|
|
11
|
+
## Tool model
|
|
12
|
+
|
|
13
|
+
Five tools form the agent-context surface:
|
|
14
|
+
|
|
15
|
+
- `agent_context` discovers effective instructions, skill summaries, and registered commands for a target path;
|
|
16
|
+
- `list_local_skills` searches discovered `SKILL.md` or `skill.md` bundles;
|
|
17
|
+
- `load_local_skill` returns one skill entrypoint plus a bounded relative file inventory;
|
|
18
|
+
- `list_local_commands` returns the effective command registry;
|
|
19
|
+
- `run_local_command` executes one registered command as a direct argv process.
|
|
20
|
+
|
|
21
|
+
The server instructions tell MCP clients to call `agent_context` before substantive workspace work. This is behavioral guidance, not a protocol-enforced precondition. Every file, Git, mutation, and process tool therefore retains its own policy enforcement.
|
|
22
|
+
|
|
23
|
+
## Instruction scope and precedence
|
|
24
|
+
|
|
25
|
+
For a target path, Machine Bridge chooses the nearest ancestor containing `.git` as the project scope root. If no Git marker is found, a target inside the configured workspace uses the workspace root; an unrestricted target outside the workspace uses the target directory.
|
|
26
|
+
|
|
27
|
+
The default instruction candidates, in priority order, are:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
[
|
|
31
|
+
"AGENTS.override.md",
|
|
32
|
+
"AGENTS.md"
|
|
33
|
+
]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Discovery then works as follows:
|
|
37
|
+
|
|
38
|
+
1. under unrestricted policy, read the first non-empty candidate in `CODEX_HOME` or `~/.codex`;
|
|
39
|
+
2. walk from the project scope root to the target directory;
|
|
40
|
+
3. in each directory, apply its optional `.machine-bridge/agent.json` first;
|
|
41
|
+
4. select only the first non-empty instruction candidate in that directory;
|
|
42
|
+
5. concatenate selected files from global to root to leaf, so later directories have higher precedence.
|
|
43
|
+
|
|
44
|
+
Empty candidates are skipped. Only one instruction file is selected per directory. This matches the important Codex override behavior: `AGENTS.override.md` suppresses `AGENTS.md` in the same directory, while deeper directories override broader guidance.
|
|
45
|
+
|
|
46
|
+
The combined instruction budget defaults to 32 KiB. Once the budget would be exceeded, discovery stops and returns `instructions_truncated: true`. A manifest can raise or lower the budget within the hard 2 MiB ceiling.
|
|
47
|
+
|
|
48
|
+
Global instruction discovery is disabled under workspace-confined profiles because reading `~/.codex` would otherwise bypass the profile's direct-filesystem boundary. Project instructions still work in every profile.
|
|
49
|
+
|
|
50
|
+
## Custom instruction priority
|
|
51
|
+
|
|
52
|
+
A manifest may replace the candidate list. The list is priority order, not a list of files to concatenate from the same directory:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"version": 1,
|
|
57
|
+
"instruction_files": [
|
|
58
|
+
"LOCAL.override.md",
|
|
59
|
+
"AGENTS.override.md",
|
|
60
|
+
"AGENTS.md",
|
|
61
|
+
".github/agent-guidance.md"
|
|
62
|
+
],
|
|
63
|
+
"instruction_max_bytes": 65536
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
For each directory, Machine Bridge selects the first non-empty file in that list. Candidate paths must be relative and their canonical targets must remain inside the directory being inspected.
|
|
68
|
+
|
|
69
|
+
## Configuration format
|
|
70
|
+
|
|
71
|
+
A project configuration lives at `.machine-bridge/agent.json`. Relative skill roots and command working directories are resolved against the directory containing `.machine-bridge`, not against the hidden configuration directory itself.
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"version": 1,
|
|
76
|
+
"instruction_files": [
|
|
77
|
+
"PROJECT.override.md",
|
|
78
|
+
"AGENTS.override.md",
|
|
79
|
+
"AGENTS.md"
|
|
80
|
+
],
|
|
81
|
+
"instruction_max_bytes": 65536,
|
|
82
|
+
"skill_roots": [
|
|
83
|
+
".agents/skills",
|
|
84
|
+
".codex/skills"
|
|
85
|
+
],
|
|
86
|
+
"commands": {
|
|
87
|
+
"check": {
|
|
88
|
+
"description": "Run the repository validation suite.",
|
|
89
|
+
"argv": ["npm", "run", "check"],
|
|
90
|
+
"cwd": ".",
|
|
91
|
+
"timeout_seconds": 600,
|
|
92
|
+
"allow_extra_args": false
|
|
93
|
+
},
|
|
94
|
+
"test-file": {
|
|
95
|
+
"description": "Run one test file selected by the caller.",
|
|
96
|
+
"argv": ["node", "--test"],
|
|
97
|
+
"cwd": ".",
|
|
98
|
+
"timeout_seconds": 120,
|
|
99
|
+
"allow_extra_args": true
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Supported top-level fields are:
|
|
106
|
+
|
|
107
|
+
- `version`: required and currently fixed at `1`;
|
|
108
|
+
- `instruction_files`: non-empty priority-ordered relative candidates;
|
|
109
|
+
- `instruction_max_bytes`: combined instruction budget from 1 KiB through 2 MiB;
|
|
110
|
+
- `skill_roots`: explicit skill directories; when present, this replaces inherited/default roots;
|
|
111
|
+
- `commands`: named command definitions merged with inherited commands.
|
|
112
|
+
|
|
113
|
+
Configuration is evaluated from global to project root to target directory. A deeper definition replaces the inherited value. A deeper command value of `null` removes that command:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"version": 1,
|
|
118
|
+
"commands": {
|
|
119
|
+
"deploy": null
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Unknown fields are rejected so misspellings do not silently weaken the intended workflow.
|
|
125
|
+
|
|
126
|
+
Under unrestricted policy only, `~/.config/machine-bridge-mcp/agent.json` acts as the initial user-level manifest. Relative paths in that file are resolved from the user's home directory.
|
|
127
|
+
|
|
128
|
+
## Skill discovery
|
|
129
|
+
|
|
130
|
+
Without an explicit `skill_roots` setting, Machine Bridge uses Codex-compatible filesystem locations:
|
|
131
|
+
|
|
132
|
+
- `<target>/.agents/skills`;
|
|
133
|
+
- every ancestor's `.agents/skills` through the project root;
|
|
134
|
+
- under unrestricted policy, `~/.agents/skills`;
|
|
135
|
+
- under unrestricted policy on Unix-like systems, `/etc/codex/skills`.
|
|
136
|
+
|
|
137
|
+
An explicit `skill_roots` list can add compatibility with other layouts, such as `.codex/skills`, or narrow discovery to selected directories.
|
|
138
|
+
|
|
139
|
+
Machine Bridge recursively finds directories containing `SKILL.md` or `skill.md`. The entrypoint must contain simple YAML front matter with non-empty `name` and `description` fields:
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
---
|
|
143
|
+
name: release-review
|
|
144
|
+
description: Review a release without publishing it.
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
# Workflow
|
|
148
|
+
|
|
149
|
+
...
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Invalid skills are skipped and reported in `skill_warnings` or `warnings`; one malformed bundle does not prevent valid skills from loading.
|
|
153
|
+
|
|
154
|
+
Symlinked skill folders are followed, matching Codex behavior. Under workspace-confined profiles, the canonical symlink target must remain inside the workspace. Skill entrypoint files themselves may not be symbolic links. Directory traversal, cycles, entry count, depth, content, and returned file inventory are bounded.
|
|
155
|
+
|
|
156
|
+
## Progressive disclosure
|
|
157
|
+
|
|
158
|
+
`agent_context` initially returns only skill metadata: name, description, path, ID, size, and hash. Its skill summary list has an 8,000-character budget and a caller-selected count limit. Descriptions are shortened first and excess skills are omitted with `skills_truncated: true`.
|
|
159
|
+
|
|
160
|
+
`load_local_skill` accepts a stable opaque ID, an unambiguous exact name, or a displayed entrypoint path. It returns:
|
|
161
|
+
|
|
162
|
+
- the full bounded UTF-8 `SKILL.md` content;
|
|
163
|
+
- metadata and a content hash;
|
|
164
|
+
- a bounded relative inventory of files in the skill directory.
|
|
165
|
+
|
|
166
|
+
Loading a skill never executes its scripts. The model must inspect the instructions and then invoke an ordinary bridge tool, a registered command, or a managed job. This keeps documentation loading separate from executable authority.
|
|
167
|
+
|
|
168
|
+
## Registered command execution
|
|
169
|
+
|
|
170
|
+
`run_local_command` is available only when direct process execution is enabled (`agent` or `full`, including equivalent custom policies). It does not invoke a shell. Manifest `argv` elements and caller-supplied arguments remain distinct process arguments, so characters such as `;`, `$()`, pipes, and redirections are not interpreted by a shell.
|
|
171
|
+
|
|
172
|
+
The manifest remains authoritative:
|
|
173
|
+
|
|
174
|
+
- caller arguments are rejected unless `allow_extra_args` is true;
|
|
175
|
+
- a caller can reduce the timeout but cannot increase it beyond `timeout_seconds`;
|
|
176
|
+
- the working directory is canonicalized and remains subject to active path policy;
|
|
177
|
+
- the command receives the isolated or full environment selected by the Machine Bridge profile.
|
|
178
|
+
|
|
179
|
+
Registered commands are workflow aliases, not a sandbox or approval boundary. Repository-controlled package scripts, interpreters, compilers, and executables can run arbitrary code with the local user's authority. Use `edit` or `review`, or external VM/container isolation, for untrusted repositories.
|
|
180
|
+
|
|
181
|
+
For arbitrary one-off execution, existing tools remain available according to policy:
|
|
182
|
+
|
|
183
|
+
- `run_process` for direct argv execution;
|
|
184
|
+
- `exec_command` for shell syntax under shell-enabled policy;
|
|
185
|
+
- `start_job` for durable multi-step work;
|
|
186
|
+
- `stage_job` for local operator review and later approval.
|
|
187
|
+
|
|
188
|
+
## Recommended remote workflow
|
|
189
|
+
|
|
190
|
+
A remote coding task should normally follow this sequence:
|
|
191
|
+
|
|
192
|
+
1. call `agent_context` with the file or directory being changed;
|
|
193
|
+
2. apply returned instructions in precedence order;
|
|
194
|
+
3. load only skills relevant to the task;
|
|
195
|
+
4. inspect files before editing;
|
|
196
|
+
5. prefer a registered command for validation or a standard workflow;
|
|
197
|
+
6. use direct or shell execution only when the registry does not cover the operation;
|
|
198
|
+
7. report files changed and commands run.
|
|
199
|
+
|
|
200
|
+
This approximates local coding-agent context loading while keeping MCP transport, local policy, and host policy as explicit independent boundaries.
|
|
201
|
+
|
|
202
|
+
## Security and failure behavior
|
|
203
|
+
|
|
204
|
+
Agent configuration, instruction content, skill traversal, skill summaries, skill inventory, command count, argv size, timeouts, and process output are bounded. Invalid JSON, unknown fields, escaping paths, ambiguous skill names, invalid skill metadata, and missing commands fail explicitly or produce bounded warnings.
|
|
205
|
+
|
|
206
|
+
Instruction and skill contents are untrusted operational text. They may contain prompt injection or unsafe command guidance. Machine Bridge exposes the content; it does not certify or approve it.
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -32,12 +32,21 @@ A canonical workspace receives an independent profile, Worker name, secret set,
|
|
|
32
32
|
- process-session buffers and stdin lifecycle;
|
|
33
33
|
- layered fixed runtime diagnostics;
|
|
34
34
|
- local resource aliases and detached managed-job coordination;
|
|
35
|
+
- agent-context discovery and registered-command execution coordination;
|
|
35
36
|
- mutation serialization;
|
|
36
37
|
- child-process tracking and cancellation;
|
|
37
38
|
- output, traversal, concurrency, and time limits.
|
|
38
39
|
|
|
39
40
|
`RelayConnection` owns remote WebSocket transport, authenticated `hello_ack` readiness, heartbeat liveness, reconnect backoff, and outage logging. Stdio mode invokes `LocalRuntime` directly without that adapter.
|
|
40
41
|
|
|
42
|
+
### Agent context manager
|
|
43
|
+
|
|
44
|
+
`AgentContextManager` is a local domain module beneath `LocalRuntime`. It discovers the nearest Git/workspace scope, applies optional user configuration and hierarchical `.machine-bridge/agent.json` files, selects the first non-empty instruction candidate in each global/root-to-target scope, discovers bounded Codex-style `.agents/skills` metadata, and resolves registered commands. The runtime remains responsible for canonical path policy and process execution.
|
|
45
|
+
|
|
46
|
+
The MCP surface is deliberately static: `agent_context`, `list_local_skills`, `load_local_skill`, `list_local_commands`, and `run_local_command`. Skills and commands do not become dynamically named MCP tools. This avoids host-side catalog caching/filtering problems and keeps one schema contract across Worker and stdio transports. Initial skill delivery is metadata-only and budgeted; loading a skill is read-only and execution requires a separate ordinary tool call. Registered commands use direct argv spawning and inherit the active runtime environment policy.
|
|
47
|
+
|
|
48
|
+
See [Agent context, local skills, and registered commands](AGENT_CONTEXT.md) for precedence and configuration semantics.
|
|
49
|
+
|
|
41
50
|
### Managed job runner
|
|
42
51
|
|
|
43
52
|
`ManagedJobManager` persists bounded per-workspace job envelopes below the owner-only profile directory. `start_job` validates the complete plan, snapshots referenced resource metadata/hashes, writes an owner-only plan/status, and launches `job-runner.mjs` as a detached process with runner-level logs redirected to owner-only files. `stage_job` performs the same acceptance validation but writes a non-running `staged` envelope; only local `job approve` transitions it to queued and launches the runner.
|
|
@@ -177,11 +186,11 @@ Managed jobs use the same argv/environment primitives but a different lifecycle.
|
|
|
177
186
|
|
|
178
187
|
## Daemon reconnect and replacement
|
|
179
188
|
|
|
180
|
-
The local `RelayConnection` treats transport open, authenticated readiness, and outage recovery as separate states.
|
|
189
|
+
The local `RelayConnection` treats transport construction, transport open, authenticated readiness, and outage recovery as separate states. A connection-attempt deadline terminates sockets stuck in `CONNECTING`; after WebSocket open it sends `hello` and reports readiness only after `hello_ack`. A missing acknowledgement reaches a distinct handshake deadline and the candidate is terminated. Once ready, application heartbeats require inbound activity; a silent half-open socket is terminated and reconnected. Outage reminders run on their own exponential-backoff timer rather than depending on another transport callback.
|
|
181
190
|
|
|
182
191
|
Reconnect uses bounded exponential backoff with jitter. Brief self-healing interruptions are debug-only. An unresolved outage is promoted to a rate-limited warning after a grace period, and recovery produces one summary. Raw close codes and reason strings remain debug-only.
|
|
183
192
|
|
|
184
|
-
The Worker also treats a new connection as a bounded candidate until it authenticates and completes `hello`; a Durable Object alarm enforces the deadline across hibernation. Only a completed candidate replaces the old socket. Pending calls retain their originating socket reference. A stale socket cannot complete or cancel replacement-socket calls. Closing a socket rejects only calls assigned to it.
|
|
193
|
+
The Worker also treats a new connection as a bounded candidate until it authenticates and completes `hello`; a Durable Object alarm enforces the deadline across hibernation. Only a completed candidate replaces the old socket. Daemon messages must be valid JSON objects, duplicate `hello` and unknown message types are rejected with explicit protocol errors, and protocol violations close with standard WebSocket status codes. Pending calls retain their originating socket reference. A stale socket cannot complete or cancel replacement-socket calls. Closing a socket rejects only calls assigned to it.
|
|
185
194
|
|
|
186
195
|
## Persistence
|
|
187
196
|
|
package/docs/ENGINEERING.md
CHANGED
|
@@ -13,6 +13,12 @@ This document records project-wide decisions that must survive individual fixes,
|
|
|
13
13
|
|
|
14
14
|
A proposed change that conflicts with an invariant requires an explicit owner decision and corresponding documentation update. It must not be hidden inside an unrelated refactor.
|
|
15
15
|
|
|
16
|
+
## Change and release-operation ownership
|
|
17
|
+
|
|
18
|
+
Repository changes and live release operations are separate responsibilities. Unless the current task explicitly authorizes a broader scope, coding automation may edit source, tests, documentation, package metadata, and changelog entries; run repository-local checks; commit; and push to GitHub. It must not publish or alter npm releases, create tags or GitHub Releases, install the package globally, deploy or reconfigure a Cloudflare Worker, rotate credentials, mutate live deployment state, or start/stop/install/remove the daemon or autostart service.
|
|
19
|
+
|
|
20
|
+
The normal handoff is: the repository owner publishes the reviewed npm version, then runs `npm install -g --allow-scripts=esbuild,workerd,sharp machine-bridge-mcp@latest && machine-mcp`. The npm command updates the global CLI. The subsequent normal startup validates the Worker deployment hash, expected version, and health, redeploys when necessary, and reconciles the daemon/autostart flow. Live operations require explicit authorization even when they appear to be the obvious next release step.
|
|
21
|
+
|
|
16
22
|
## Architectural boundaries
|
|
17
23
|
|
|
18
24
|
The preferred dependency direction is:
|
package/docs/LOGGING.md
CHANGED
|
@@ -41,10 +41,12 @@ Brief network interruptions are expected on laptop network changes, Worker deplo
|
|
|
41
41
|
|
|
42
42
|
- the raw close code, close reason, error class, connected duration, and retry delay are debug-only;
|
|
43
43
|
- a brief interruption that reconnects within the grace period produces no `info` or `warn` line;
|
|
44
|
-
- an outage that remains unresolved for 10 seconds produces
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
44
|
+
- an outage that remains unresolved for 10 seconds produces a user-readable warning stating the duration, reconnect attempt count, classified cause, and automatic recovery behavior;
|
|
45
|
+
- while the outage remains unresolved, reminders are scheduled independently of reconnect callbacks and use exponential backoff capped at 15 minutes;
|
|
46
|
+
- a WebSocket that remains in `CONNECTING` beyond its deadline is terminated so one stalled network attempt cannot freeze the reconnect loop;
|
|
47
|
+
- relay identity/version mismatch, authentication rejection, and unexpected protocol messages are non-transient: they produce an immediate actionable error and terminate that daemon instead of entering the reconnect loop;
|
|
48
|
+
- a Worker `daemon_hello_timeout` error is transient and follows the normal reconnect path rather than being misclassified as authentication rejection;
|
|
49
|
+
- recovery after a visible outage produces one information summary with a human-readable duration and attempt count; exact seconds and error classes remain debug-only;
|
|
48
50
|
- an authenticated replacement is a distinct warning and permanently stops the older daemon;
|
|
49
51
|
- failure to receive `hello_ack` within the handshake deadline terminates the candidate socket and retries;
|
|
50
52
|
- lack of inbound heartbeat activity terminates a half-open socket and reconnects.
|
|
@@ -55,11 +57,11 @@ Examples:
|
|
|
55
57
|
|
|
56
58
|
```text
|
|
57
59
|
[info] daemon: remote relay connected
|
|
58
|
-
[warn] daemon: remote relay
|
|
59
|
-
[info] daemon: remote relay connection restored
|
|
60
|
+
[warn] daemon: remote relay unavailable for 12 seconds; reconnecting automatically (3 reconnect attempts; connection interrupted).
|
|
61
|
+
[info] daemon: remote relay connection restored after 18 seconds (4 reconnect attempts)
|
|
60
62
|
```
|
|
61
63
|
|
|
62
|
-
With `--verbose`, the same incident
|
|
64
|
+
With `--verbose`, the same incident additionally includes bounded structured fields such as exact seconds, coarse error class, retry delay, and transport close diagnostics.
|
|
63
65
|
|
|
64
66
|
## Tool events
|
|
65
67
|
|
package/docs/OPERATIONS.md
CHANGED
|
@@ -26,19 +26,19 @@ A successful diagnostic result applies only to that probe. An MCP host can still
|
|
|
26
26
|
|
|
27
27
|
### Relay interruption messages
|
|
28
28
|
|
|
29
|
-
A brief relay interruption is retried automatically and is visible only with `--verbose`. Default logs do not print raw WebSocket values such as `code=1006` with an empty reason. If a transient outage persists for 10 seconds,
|
|
29
|
+
A brief relay interruption is retried automatically and is visible only with `--verbose`. Default logs do not print raw WebSocket values such as `code=1006` with an empty reason. If a transient outage persists for 10 seconds, the daemon emits a readable duration/cause/reconnect summary; later reminders use autonomous exponential backoff capped at 15 minutes, and recovery produces one readable summary. Each transport connection attempt also has a deadline, so a socket stuck in `CONNECTING` cannot freeze retries. Identity/version mismatch, authentication rejection, and unexpected protocol messages are not retried as ordinary network faults: the daemon emits an immediate actionable error and exits, requiring upgrade/redeployment or credential repair. A Worker-side daemon handshake timeout remains retryable.
|
|
30
30
|
|
|
31
31
|
Use `--verbose` only when close codes, close reasons, heartbeat timeouts, and retry delays are needed for diagnosis. A close code of 1006 means the transport ended without a normal close handshake; it does not by itself identify the cause.
|
|
32
32
|
|
|
33
33
|
## Logs
|
|
34
34
|
|
|
35
|
-
Remote autostart definitions prefer a stable PATH alias that resolves to the currently running Node executable and persist a sanitized absolute-only service `PATH` containing the Node/CLI directories, the installer's absolute PATH entries, and platform defaults. This avoids versioned Homebrew-style paths becoming invalid after upgrades and prevents launchd/systemd from falling back to a minimal system-only PATH. Re-run `machine-mcp service install` after changing Node installation families or PATH layout. Autostart logs are stored under the state root in `logs/daemon.out.log` and `logs/daemon.err.log`. Files are owner-only where supported and tail-trimmed before daemon startup. On a logging-schema upgrade, bounded prior content is moved into `daemon.out.legacy.log` and `daemon.err.legacy.log`; use the active filenames when diagnosing current behavior.
|
|
35
|
+
Remote autostart definitions prefer a stable PATH alias that resolves to the currently running Node executable and persist a sanitized absolute-only service `PATH` containing the Node/CLI directories, the installer's absolute PATH entries, and platform defaults. This avoids versioned Homebrew-style paths becoming invalid after upgrades and prevents launchd/systemd from falling back to a minimal system-only PATH. Re-run `machine-mcp service install` after changing Node installation families or PATH layout. A service-style `--daemon-only` start that finds the same workspace daemon already running is an idempotent no-op: it exits successfully without repeating warnings or readiness output; explicit policy/secret/change requests still report that changes were not applied. Autostart logs are stored under the state root in `logs/daemon.out.log` and `logs/daemon.err.log`. Files are owner-only where supported and tail-trimmed before daemon startup. On a logging-schema upgrade, bounded prior content is moved into `daemon.out.legacy.log` and `daemon.err.legacy.log`; use the active filenames when diagnosing current behavior.
|
|
36
36
|
|
|
37
37
|
Logging is level-based:
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
40
|
error unrecoverable local/transport/service failures
|
|
41
|
-
warn
|
|
41
|
+
warn persistent retryable relay degradation, supersession, and service problems
|
|
42
42
|
info startup/deploy/connect transitions
|
|
43
43
|
debug all per-tool starts/successes/failures/cancellations/timing, correlation and reconnect details
|
|
44
44
|
```
|
package/docs/TESTING.md
CHANGED
|
@@ -13,9 +13,11 @@ The repository requires Node.js 26 and npm 12. `.node-version`, `.nvmrc`, `packa
|
|
|
13
13
|
The suite includes:
|
|
14
14
|
|
|
15
15
|
- release-impact enforcement requiring a new package version and CHANGELOG section for release-relevant changes;
|
|
16
|
-
-
|
|
16
|
+
- release-state diagnostics distinguishing missing local/remote version tags from tags that point to the wrong commit, including the required publication order;
|
|
17
|
+
- generated Cloudflare Worker types and strict TypeScript checking, including unused-local and unused-parameter rejection;
|
|
17
18
|
- syntax validation for every shipped JavaScript entry point;
|
|
18
19
|
- shared tool-catalog schema, annotation, and profile-inventory checks;
|
|
20
|
+
- hierarchical agent-context precedence, custom instruction ordering, local skill discovery/loading, command override/removal, direct argv argument handling, timeout ceilings, and execution-profile denial;
|
|
19
21
|
- canonical path and symbolic-link escape tests;
|
|
20
22
|
- relative-path privacy and error-path redaction tests;
|
|
21
23
|
- atomic create/update, optimistic hash, exact edit, and patch transaction tests;
|
|
@@ -37,11 +39,11 @@ The suite includes:
|
|
|
37
39
|
- guarded state-root removal, schema migration, policy-origin persistence, and legacy implicit-default migration;
|
|
38
40
|
- no filename-based sensitive-file denial under unrestricted policy;
|
|
39
41
|
- log redaction, control-character handling, message/field bounds, suppression of both successful and failed per-tool events outside debug, service warning-level configuration, and idempotent bounded migration of legacy log formats;
|
|
40
|
-
- deterministic relay connection lifecycle coverage for transport construction/error, pre-handshake `welcome` validation, authenticated `hello_ack` readiness, identity/version mismatch, handshake and heartbeat timeout, brief-outage suppression, sustained-outage escalation, recovery summaries, and supersession;
|
|
42
|
+
- deterministic relay connection lifecycle coverage for transport construction/error/deadline, pre-handshake `welcome` validation, authenticated `hello_ack` readiness, identity/version mismatch, retryable Worker handshake errors, fatal protocol errors, autonomous outage-reminder backoff, handshake and heartbeat timeout, brief-outage suppression, sustained-outage escalation, recovery summaries, and supersession;
|
|
41
43
|
- shared no-follow bounded-file reads for normal files, over-limit data, directories, and symbolic links;
|
|
42
44
|
- CLI parsing, policy profiles, and client configuration boundaries;
|
|
43
45
|
- live stdio MCP initialization, discovery, calls, rich content, sessions, cancellation, managed-job acceptance, and a detached job/finally phase that survives stdio shutdown;
|
|
44
|
-
- live local Worker OAuth registration, consent, PKCE, token replay rejection, throttling, CORS, protocol negotiation, dynamic tool advertisement, rich content, daemon replacement, and
|
|
46
|
+
- live local Worker OAuth registration, consent, PKCE, token replay rejection, throttling, CORS, protocol negotiation, dynamic tool advertisement, rich content, daemon replacement, cancellation, malformed daemon JSON/non-object rejection, duplicate hello rejection, and unknown-message closure.
|
|
45
47
|
|
|
46
48
|
## Additional release checks
|
|
47
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "machine-bridge-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Cross-client MCP bridge for canonical local automation, files, Git, SSH resources, managed jobs, and processes over stdio or an OAuth-protected remote relay.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"prepublishOnly": "npm run check && npm run version:check && npm run release:check",
|
|
44
44
|
"worker:types": "wrangler types src/worker/worker-configuration.d.ts",
|
|
45
45
|
"typecheck": "npm run worker:types && tsc -p tsconfig.json --noEmit",
|
|
46
|
-
"syntax": "sh -n mbm && node --check bin/machine-mcp.mjs && node --check src/local/cli.mjs && node --check src/local/runtime.mjs && node --check src/local/relay-connection.mjs && node --check src/local/secure-file.mjs && node --check src/local/patch.mjs && node --check src/local/process-sessions.mjs && node --check src/local/tools.mjs && node --check src/local/stdio.mjs && node --check src/local/state.mjs && node --check src/local/shell.mjs && node --check src/local/service.mjs && node --check src/local/log.mjs && node --check src/local/atomic-fs.mjs && node --check src/local/ssh-key.mjs && node --check src/local/resource-operations.mjs && node --check src/local/full-access-test.mjs && node --check src/local/managed-jobs.mjs && node --check src/local/job-runner.mjs && node --check scripts/sync-worker-version.mjs && node --check scripts/privacy-check.mjs && node --check scripts/release-impact-check.mjs && node --check scripts/network-retry.mjs && node --check scripts/github-release.mjs && node --check tests/worker-integration-test.mjs && node --check tests/stdio-integration-test.mjs && node --check tests/catalog-test.mjs && node --check tests/local-self-test.mjs && node --check tests/runtime-self-test.mjs && node --check tests/managed-jobs-test.mjs && node --check tests/ssh-key-test.mjs && node --check tests/full-access-test.mjs && node --check tests/atomic-fs-test.mjs && node --check tests/package-test.mjs && node --check tests/release-impact-test.mjs && node --check tests/privacy-test.mjs && node --check tests/network-retry-test.mjs && node --check tests/relay-connection-test.mjs && node --check tests/install-smoke-test.mjs && node --check tests/secure-file-test.mjs && node --check tests/architecture-test.mjs",
|
|
47
|
-
"check": "npm run privacy:check && npm run privacy:test && npm run release-impact:check && npm run release-impact:test && npm run network-retry:test && npm run relay:test && npm run secure-file:test && npm run architecture:test && npm run typecheck && npm run syntax && npm run catalog:test && npm run self-test && npm run atomic-fs:test && npm run package:test && npm run ssh-key:test && npm run full-access:test && npm run managed-jobs:test && npm run stdio:integration-test && npm run worker:integration-test",
|
|
46
|
+
"syntax": "sh -n mbm && node --check bin/machine-mcp.mjs && node --check src/local/cli.mjs && node --check src/local/runtime.mjs && node --check src/local/agent-context.mjs && node --check src/local/relay-connection.mjs && node --check src/local/secure-file.mjs && node --check src/local/patch.mjs && node --check src/local/process-sessions.mjs && node --check src/local/tools.mjs && node --check src/local/stdio.mjs && node --check src/local/state.mjs && node --check src/local/shell.mjs && node --check src/local/service.mjs && node --check src/local/log.mjs && node --check src/local/atomic-fs.mjs && node --check src/local/ssh-key.mjs && node --check src/local/resource-operations.mjs && node --check src/local/full-access-test.mjs && node --check src/local/managed-jobs.mjs && node --check src/local/job-runner.mjs && node --check scripts/sync-worker-version.mjs && node --check scripts/privacy-check.mjs && node --check scripts/release-impact-check.mjs && node --check scripts/network-retry.mjs && node --check scripts/release-state.mjs && node --check scripts/github-release.mjs && node --check tests/worker-integration-test.mjs && node --check tests/stdio-integration-test.mjs && node --check tests/catalog-test.mjs && node --check tests/agent-context-test.mjs && node --check tests/local-self-test.mjs && node --check tests/runtime-self-test.mjs && node --check tests/managed-jobs-test.mjs && node --check tests/ssh-key-test.mjs && node --check tests/full-access-test.mjs && node --check tests/atomic-fs-test.mjs && node --check tests/package-test.mjs && node --check tests/release-impact-test.mjs && node --check tests/release-state-test.mjs && node --check tests/privacy-test.mjs && node --check tests/network-retry-test.mjs && node --check tests/relay-connection-test.mjs && node --check tests/install-smoke-test.mjs && node --check tests/secure-file-test.mjs && node --check tests/architecture-test.mjs",
|
|
47
|
+
"check": "npm run privacy:check && npm run privacy:test && npm run release-impact:check && npm run release-impact:test && npm run release-state:test && npm run network-retry:test && npm run relay:test && npm run secure-file:test && npm run architecture:test && npm run typecheck && npm run syntax && npm run catalog:test && npm run agent-context:test && npm run self-test && npm run atomic-fs:test && npm run package:test && npm run ssh-key:test && npm run full-access:test && npm run managed-jobs:test && npm run stdio:integration-test && npm run worker:integration-test",
|
|
48
48
|
"worker:dry-run": "wrangler deploy --dry-run",
|
|
49
49
|
"worker:integration-test": "node tests/worker-integration-test.mjs",
|
|
50
50
|
"release:check": "node scripts/github-release.mjs --check",
|
|
@@ -65,7 +65,9 @@
|
|
|
65
65
|
"relay:test": "node tests/relay-connection-test.mjs",
|
|
66
66
|
"install:test": "node tests/install-smoke-test.mjs",
|
|
67
67
|
"secure-file:test": "node tests/secure-file-test.mjs",
|
|
68
|
-
"architecture:test": "node tests/architecture-test.mjs"
|
|
68
|
+
"architecture:test": "node tests/architecture-test.mjs",
|
|
69
|
+
"release-state:test": "node tests/release-state-test.mjs",
|
|
70
|
+
"agent-context:test": "node tests/agent-context-test.mjs"
|
|
69
71
|
},
|
|
70
72
|
"dependencies": {
|
|
71
73
|
"wrangler": "4.110.0",
|