refactor: remove coding-agent hook management (P2.2)

The hooks for Claude Code, Codex and the other agents ran the
hive-mind-hooks-* packages, which left the repository; ADR-0002 hides
the feature in v1. Remove the hook installer surface from the tool
launcher, the POST /api/tools/hooks route, the hook status probe in
tool detection, and the hook fields of the tool manifest and detection
envelope (hookCapable, hookRoot, hookPointer, hooksInstalled,
hookPointerPath). Third-party adapter manifests no longer accept the
hook fields.

In the web UI, remove the hidden hook actions and the "How memory is
shared" explainer from the Launcher, adapter.manageHooks, the
hook-wired count in Mission Control and the agentHooks and memoryMcp
memory feature flags. Launch, watch and stop are unchanged; the
roadmap tool note no longer mentions hooks.
This commit is contained in:
shumeiko.it
2026-11-01 00:35:13 +01:00
parent 46687a823a
commit 2edfd01e6e
32 changed files with 168 additions and 2575 deletions

View File

@@ -3165,7 +3165,7 @@ class LocalAdapter {
};
// --- AI-OS launcher (Phase 2B) ---
// detectTools/launchTool/manageHooks each surface the matching
// detectTools/launchTool each surface the matching
// sidecar route. All are loopback-only and report only the user's
// own machine — no remote calls.
@@ -3286,38 +3286,6 @@ class LocalAdapter {
};
}
async manageHooks(payload: {
id: string;
action: 'install' | 'verify' | 'uninstall';
cliPath?: string;
}): Promise<{
ok: boolean;
action: string;
stdout: string;
stderr: string;
code: number;
error?: string;
}> {
// P1b D3: fetchRaw — hook-failure diagnostics (stderr/exit code) ride the error body.
const res = await this.fetchRaw('/api/tools/hooks', {
method: 'POST',
body: JSON.stringify(payload),
});
const body = await res.json().catch(() => ({}));
const hasHookEnvelope =
typeof body.ok === 'boolean' &&
typeof body.action === 'string' &&
typeof body.code === 'number';
return {
ok: res.ok && body.ok === true,
action: body.action ?? payload.action,
stdout: body.stdout ?? '',
stderr: body.stderr ?? '',
code: body.code ?? -1,
error: body.error ?? (res.ok || hasHookEnvelope ? undefined : `HTTP ${res.status}`),
};
}
/**
* P1b-SSE: shared EventSource lifecycle — token-attached, lazy-open,
* reconnecting. Fixes the three defects that made every stream dead in