feat(cli): 1.28.0 — bridge deletion + daemon-policy flags

drop the orphaned bridge tier (~600 LoC). client/server/protocol
files deleted; tryBridge had returned null in production for seven
releases since the 1.24.0 mcp shim rewrite stopped opening the
sockets. each verb now has two paths: daemon (with 1.27.3's
auto-spawn) → cold ws.

add per-process daemon policy: --strict (error instead of cold
fallback) and --no-daemon (skip daemon entirely). enforcement at
withMesh so a single chokepoint covers every verb. env equivalents
CLAUDEMESH_STRICT_DAEMON / CLAUDEMESH_NO_DAEMON. flag wins.

net -394 loc; the daemon-up case ships ~600 loc lighter and the
fallback story is one tier simpler. first sprint A drop; per-session
ipc tokens and the wizard refactors follow in 1.29.0+.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-05-04 12:23:04 +01:00
parent 2b6cf2c14b
commit 81f0e4f7ac
13 changed files with 143 additions and 537 deletions

View File

@@ -9,6 +9,7 @@ import { renderVersion } from "~/cli/output/version.js";
import { isInviteUrl, normaliseInviteUrl } from "~/utils/url.js";
import { classifyInvocation } from "~/cli/policy-classify.js";
import { gate, type ApprovalMode } from "~/services/policy/index.js";
import { setDaemonPolicy, policyFromFlags } from "~/services/daemon/policy.js";
import { bold, clay, cyan, dim, orange } from "~/ui/styles.js";
installSignalHandlers();
@@ -16,6 +17,11 @@ installErrorHandlers();
const { command, positionals, flags } = parseArgv(process.argv);
// Resolve daemon policy once at boot — daemon-routing helpers read this
// instead of inspecting flags themselves. --no-daemon and --strict are
// mutually exclusive (--no-daemon wins if both are passed).
setDaemonPolicy(policyFromFlags(flags));
/**
* Resolve the coarse approval mode from CLI flags + env.
* --approval-mode <plan|read-only|write|yolo> explicit
@@ -210,6 +216,8 @@ Flags
--policy <path> override policy file
-y, --yes skip confirmations (= --approval-mode yolo)
-q, --quiet suppress non-essential output
--strict require daemon for broker-touching verbs (no cold-path fallback)
--no-daemon skip daemon entirely; open broker WS directly (CI / sandboxed scripts)
`;
/**