The bin launchers now import dist/src/mcp-protocol.js, so the two fixtures
that copy a launcher into a stub tree transpile it from source (as the
policy fixture already does for policy-enforcer). The dispatch-contract
regex accepts the forwarded trace context.
Co-Authored-By: RuFlo <ruv@ruv.net>
Minor bump: ADR-524 adds MCP 2026-07-28 support (server/discover, new
error codes, result fields). Supersedes the unpublished 3.71.5 bump.
Co-Authored-By: RuFlo <ruv@ruv.net>
All three stdio MCP servers (bin/cli.js, bin/mcp-server.js, MCPServerManager)
answered initialize with a hardcoded 2024-11-05 and knew nothing of the
2026-07-28 revision. They are now dual-era through one shared module,
src/mcp-protocol.ts:
- initialize echoes a supported legacy version (else 2025-11-25) and reports
the real package version
- server/discover answered with or without _meta (stdio probe)
- per-request _meta version: -32022 for unknown, -32602 when a modern request
lacks clientCapabilities
- modern results carry resultType and serverInfo; list results carry
ttlMs/cacheScope; legacy responses are unchanged
- tools/list sorted by name in both eras (stable prompt caches)
- resources/read uses -32602 for modern, -32002 for legacy
- validated W3C traceparent/tracestate forwarded into the tool-call context
Tasks extension, subscriptions/listen and the HTTP package are Phase 2.
Co-Authored-By: RuFlo <ruv@ruv.net>
cost-health started four subchecks at once, each running
npx -y @claude-flow/cli@latest. With a cold npm cache the four first
installs raced in one ~/.npm/_npx directory and left a broken install. Its
memory reads then exited 1, and budget/_sessions read that as no data, so
the budget check reported "no budget set" and Case 2 of the integration
test failed about half the time.
- health.mjs resolves the CLI once, serially, when it comes from npx
(HEALTH_SKIP_WARMUP=1 skips it).
- A non-zero memory list is reported as an error with the CLI's stderr
(exit 2) by budget, burn, anomaly and projection.
- New test-cli-failure-4711.mjs, in smoke step 48 and the CI workflow; the
integration test runs with RUFLO_DAEMON_AUTOSTART=0.
- ruflo-cost-tracker 0.31.2.
Closes#4711
Co-Authored-By: RuFlo <ruv@ruv.net>
The root CI job has no built aidefence, so aidefence_has_pii fell through to
the auto-install path and failed. The test covers the MCP wrapper, not the
detector.
Co-Authored-By: RuFlo <ruv@ruv.net>
The start command now reads the camelCase key the parser produces (#4814),
and the root vitest runs from v3/, where tsx is not hoisted (#4821).
Co-Authored-By: RuFlo <ruv@ruv.net>
pre-bash now blocks when it gets no command (#4743), so a host that delivers
hook input after 500 ms would have every Bash command blocked. The read ends
at EOF, so a prompt host waits no longer.
Co-Authored-By: RuFlo <ruv@ruv.net>
pre-bash exited 0 on every failure path, so a command passed whenever the
hook input arrived after the 500 ms stdin window, failed to parse, or
raised an exception, and when the 5 s safety timer fired.
pre-bash now exits 2 with a [BLOCKED] reason when no command string was
obtained, when stdin is not valid JSON, in the handler and main catch
paths, and from the safety timer. Every other hook keeps exiting 0.
Fixes#4743
Unset keeps the current options exactly. true/false or a comma list of pack
names is passed to createAIDefence in every load and retry branch; any other
value is refused with a clear error.
Closes#4785
Co-Authored-By: RuFlo <ruv@ruv.net>
vitest resolves 'fs' and 'node:fs' to one module, so the second mock
(existsSync: () => false) won and 8 tests failed on Linux.
Co-Authored-By: RuFlo <ruv@ruv.net>
Polling a corrupt store made a new .corrupt-<ts> copy on every read (#4779
review). A backup with identical bytes is now reused.
Co-Authored-By: RuFlo <ruv@ruv.net>