@ken-jo/agent-connector 0.3.1 → 0.4.1
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/README.md +180 -16
- package/dist/action-WT7GVRCC.js +55 -0
- package/dist/action-WT7GVRCC.js.map +1 -0
- package/dist/amazon-q-COAL3764.js +276 -0
- package/dist/amazon-q-COAL3764.js.map +1 -0
- package/dist/{amp-YGV66GJT.js → amp-4U33CU7E.js} +81 -5
- package/dist/amp-4U33CU7E.js.map +1 -0
- package/dist/{antigravity-7IBYFO6P.js → antigravity-AMKKKHS4.js} +4 -4
- package/dist/{antigravity-cli-JEOUP2VN.js → antigravity-cli-XERXEH5W.js} +4 -4
- package/dist/{chunk-3JCRUROU.js → chunk-24IDL5RW.js} +13 -4
- package/dist/chunk-24IDL5RW.js.map +1 -0
- package/dist/chunk-2AVLX7GH.js +351 -0
- package/dist/chunk-2AVLX7GH.js.map +1 -0
- package/dist/{chunk-GSGDG2BV.js → chunk-4ENJK5S2.js} +106 -176
- package/dist/chunk-4ENJK5S2.js.map +1 -0
- package/dist/{chunk-ZAM4M7LI.js → chunk-5OWS5CMA.js} +136 -296
- package/dist/chunk-5OWS5CMA.js.map +1 -0
- package/dist/{chunk-PD4VFEBY.js → chunk-CPLK7GTE.js} +79 -5
- package/dist/chunk-CPLK7GTE.js.map +1 -0
- package/dist/chunk-DCKFYWGM.js +237 -0
- package/dist/chunk-DCKFYWGM.js.map +1 -0
- package/dist/chunk-EGCBZ2DC.js +83 -0
- package/dist/chunk-EGCBZ2DC.js.map +1 -0
- package/dist/chunk-F5RX62T7.js +21 -0
- package/dist/chunk-F5RX62T7.js.map +1 -0
- package/dist/chunk-FAHIMJRU.js +177 -0
- package/dist/chunk-FAHIMJRU.js.map +1 -0
- package/dist/{chunk-MEH7GC7R.js → chunk-I5MLE6S7.js} +33 -3
- package/dist/chunk-I5MLE6S7.js.map +1 -0
- package/dist/{chunk-KVAAFYRR.js → chunk-KHO5WNTP.js} +2 -18
- package/dist/chunk-KHO5WNTP.js.map +1 -0
- package/dist/{chunk-KQSNDFBN.js → chunk-LQRAPXS4.js} +3 -3
- package/dist/{chunk-3RBLIHPZ.js → chunk-O5TWCIJN.js} +27 -17
- package/dist/chunk-O5TWCIJN.js.map +1 -0
- package/dist/{chunk-WNREHWKL.js → chunk-QREL7LZJ.js} +5 -4
- package/dist/chunk-QREL7LZJ.js.map +1 -0
- package/dist/{chunk-KMAKDD3Z.js → chunk-RIMVWCZY.js} +37 -12
- package/dist/chunk-RIMVWCZY.js.map +1 -0
- package/dist/{openclaw-UZ5BMCGQ.js → chunk-URHQMFB3.js} +210 -41
- package/dist/chunk-URHQMFB3.js.map +1 -0
- package/dist/chunk-WZA4CSGJ.js +28 -0
- package/dist/chunk-WZA4CSGJ.js.map +1 -0
- package/dist/chunk-XJ4S47CT.js +44 -0
- package/dist/chunk-XJ4S47CT.js.map +1 -0
- package/dist/{claude-code-4275HQU4.js → claude-code-W4PUFZL5.js} +194 -52
- package/dist/claude-code-W4PUFZL5.js.map +1 -0
- package/dist/cli/sdk.js +5 -3
- package/dist/cli/sdk.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cline-WRYMNS7Z.js +442 -0
- package/dist/cline-WRYMNS7Z.js.map +1 -0
- package/dist/{codebuff-LE3KBZGM.js → codebuff-DH5Y7GAT.js} +106 -5
- package/dist/codebuff-DH5Y7GAT.js.map +1 -0
- package/dist/{codex-4BY2ZJIW.js → codex-DDHIV767.js} +43 -11
- package/dist/codex-DDHIV767.js.map +1 -0
- package/dist/continue-K43SUHLQ.js +790 -0
- package/dist/continue-K43SUHLQ.js.map +1 -0
- package/dist/{copilot-cli-IPISKO3V.js → copilot-cli-Q3SSPT4V.js} +70 -12
- package/dist/copilot-cli-Q3SSPT4V.js.map +1 -0
- package/dist/{crush-X3E25EQG.js → crush-MBEH2R3I.js} +130 -6
- package/dist/crush-MBEH2R3I.js.map +1 -0
- package/dist/{cursor-UH3W622V.js → cursor-TMBXDYR4.js} +119 -16
- package/dist/cursor-TMBXDYR4.js.map +1 -0
- package/dist/{detect-U3E7NVNW.js → detect-KG5FG3EV.js} +5 -3
- package/dist/{detect-U3E7NVNW.js.map → detect-KG5FG3EV.js.map} +1 -1
- package/dist/{doctor-DZTWED4O.js → doctor-FLZF34Y3.js} +226 -96
- package/dist/doctor-FLZF34Y3.js.map +1 -0
- package/dist/{droid-T5VBRXZF.js → droid-JC2NT6S4.js} +298 -10
- package/dist/droid-JC2NT6S4.js.map +1 -0
- package/dist/{gemini-cli-ZSUK55UA.js → gemini-cli-ILR7M5X3.js} +62 -10
- package/dist/gemini-cli-ILR7M5X3.js.map +1 -0
- package/dist/{goose-M3RR3CZG.js → goose-SFO5BBGW.js} +112 -10
- package/dist/goose-SFO5BBGW.js.map +1 -0
- package/dist/{hermes-CUNKIAR5.js → hermes-3N7WN4WS.js} +329 -15
- package/dist/hermes-3N7WN4WS.js.map +1 -0
- package/dist/{hook-EVY7LOUQ.js → hook-XR3Z45FB.js} +16 -10
- package/dist/hook-XR3Z45FB.js.map +1 -0
- package/dist/index.d.ts +71 -3
- package/dist/index.js +23 -3
- package/dist/{install-OWAS5UIE.js → install-BSR62UHJ.js} +12 -9
- package/dist/{install-OWAS5UIE.js.map → install-BSR62UHJ.js.map} +1 -1
- package/dist/introspect-Nw8hTReX.d.ts +53 -0
- package/dist/{jetbrains-copilot-C3HDGGML.js → jetbrains-copilot-NRZHI5PC.js} +85 -18
- package/dist/jetbrains-copilot-NRZHI5PC.js.map +1 -0
- package/dist/{kilo-PKAJCWPX.js → kilo-5NWOXVSD.js} +16 -16
- package/dist/kilo-5NWOXVSD.js.map +1 -0
- package/dist/{kilo-cli-QWUVXG2O.js → kilo-cli-UZ7R5UOP.js} +3 -3
- package/dist/{kimi-EVD7YKXS.js → kimi-2YFK2GBA.js} +87 -25
- package/dist/kimi-2YFK2GBA.js.map +1 -0
- package/dist/{kiro-UQRY6EIO.js → kiro-YL6AWUYG.js} +3 -3
- package/dist/{leaderboard-CSWHI4UY.js → leaderboard-MJG24O35.js} +2 -2
- package/dist/mimo-code-FTMGSKMQ.js +790 -0
- package/dist/mimo-code-FTMGSKMQ.js.map +1 -0
- package/dist/{mux-5CI5FP2W.js → mux-5XZFB44C.js} +156 -6
- package/dist/mux-5XZFB44C.js.map +1 -0
- package/dist/nemoclaw-W5KEJ3WX.js +58 -0
- package/dist/nemoclaw-W5KEJ3WX.js.map +1 -0
- package/dist/{omp-AXA7XY22.js → omp-2QMEY6HD.js} +138 -18
- package/dist/omp-2QMEY6HD.js.map +1 -0
- package/dist/openclaw-EXJEFNZI.js +18 -0
- package/dist/openclaw-EXJEFNZI.js.map +1 -0
- package/dist/{opencode-NZBRLJN3.js → opencode-WNXYJR4X.js} +84 -27
- package/dist/opencode-WNXYJR4X.js.map +1 -0
- package/dist/{package-WFOS4QVU.js → package-ACZXJHWB.js} +8 -6
- package/dist/{package-WFOS4QVU.js.map → package-ACZXJHWB.js.map} +1 -1
- package/dist/{pi-WMTUX6ES.js → pi-PVVPVWKG.js} +3 -2
- package/dist/{pi-WMTUX6ES.js.map → pi-PVVPVWKG.js.map} +1 -1
- package/dist/{qwen-code-MRRIUQ3P.js → qwen-code-G4CXKUHR.js} +426 -10
- package/dist/qwen-code-G4CXKUHR.js.map +1 -0
- package/dist/{roo-code-NI5UU6JB.js → roo-code-67TYJIQR.js} +137 -4
- package/dist/roo-code-67TYJIQR.js.map +1 -0
- package/dist/runtime/index.d.ts +96 -2
- package/dist/runtime/index.js +19 -10
- package/dist/sdk/index.d.ts +52 -0
- package/dist/sdk/index.js +82 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/test.d.ts +74 -0
- package/dist/sdk/test.js +292 -0
- package/dist/sdk/test.js.map +1 -0
- package/dist/{serve-3C2VFPAY.js → serve-GER7URPR.js} +13 -9
- package/dist/{serve-3C2VFPAY.js.map → serve-GER7URPR.js.map} +1 -1
- package/dist/{status-MKQYX5MW.js → status-LAJE3BM5.js} +10 -7
- package/dist/{status-MKQYX5MW.js.map → status-LAJE3BM5.js.map} +1 -1
- package/dist/statusline-L376ZPZU.js +60 -0
- package/dist/statusline-L376ZPZU.js.map +1 -0
- package/dist/{telemetry-3DN6XGYB.js → telemetry-B3DX3PWU.js} +6 -4
- package/dist/{telemetry-3DN6XGYB.js.map → telemetry-B3DX3PWU.js.map} +1 -1
- package/dist/{trae-CQC72RHH.js → trae-7CZZGOGI.js} +99 -5
- package/dist/trae-7CZZGOGI.js.map +1 -0
- package/dist/{types-CNigfEuR.d.ts → types-CRVrFWeU.d.ts} +322 -18
- package/dist/{uninstall-WG6PFWF3.js → uninstall-ZYTW7YMZ.js} +12 -9
- package/dist/{uninstall-WG6PFWF3.js.map → uninstall-ZYTW7YMZ.js.map} +1 -1
- package/dist/{upgrade-32NC2RKI.js → upgrade-4LUEEOZW.js} +12 -9
- package/dist/{upgrade-32NC2RKI.js.map → upgrade-4LUEEOZW.js.map} +1 -1
- package/dist/{usage-CJOM2WQM.js → usage-ZFBVQF3H.js} +2 -2
- package/dist/{usage-event-472X3DOY.js → usage-event-GZ32AGEB.js} +12 -8
- package/dist/{usage-event-472X3DOY.js.map → usage-event-GZ32AGEB.js.map} +1 -1
- package/dist/{vscode-copilot-4RVRTCKV.js → vscode-copilot-MF2CDNMT.js} +23 -10
- package/dist/vscode-copilot-MF2CDNMT.js.map +1 -0
- package/dist/{warp-X6MB67NT.js → warp-VKG55TAT.js} +55 -4
- package/dist/warp-VKG55TAT.js.map +1 -0
- package/dist/windsurf-FU5G4SHF.js +443 -0
- package/dist/windsurf-FU5G4SHF.js.map +1 -0
- package/dist/{zed-NTCYW4V2.js → zed-SFUHL3GS.js} +3 -3
- package/package.json +10 -2
- package/dist/amp-YGV66GJT.js.map +0 -1
- package/dist/chunk-3JCRUROU.js.map +0 -1
- package/dist/chunk-3RBLIHPZ.js.map +0 -1
- package/dist/chunk-GSGDG2BV.js.map +0 -1
- package/dist/chunk-KMAKDD3Z.js.map +0 -1
- package/dist/chunk-KVAAFYRR.js.map +0 -1
- package/dist/chunk-MEH7GC7R.js.map +0 -1
- package/dist/chunk-NJU275US.js +0 -238
- package/dist/chunk-NJU275US.js.map +0 -1
- package/dist/chunk-PD4VFEBY.js.map +0 -1
- package/dist/chunk-WNREHWKL.js.map +0 -1
- package/dist/chunk-ZAM4M7LI.js.map +0 -1
- package/dist/claude-code-4275HQU4.js.map +0 -1
- package/dist/codebuff-LE3KBZGM.js.map +0 -1
- package/dist/codex-4BY2ZJIW.js.map +0 -1
- package/dist/copilot-cli-IPISKO3V.js.map +0 -1
- package/dist/crush-X3E25EQG.js.map +0 -1
- package/dist/cursor-UH3W622V.js.map +0 -1
- package/dist/doctor-DZTWED4O.js.map +0 -1
- package/dist/droid-T5VBRXZF.js.map +0 -1
- package/dist/gemini-cli-ZSUK55UA.js.map +0 -1
- package/dist/goose-M3RR3CZG.js.map +0 -1
- package/dist/hermes-CUNKIAR5.js.map +0 -1
- package/dist/hook-EVY7LOUQ.js.map +0 -1
- package/dist/jetbrains-copilot-C3HDGGML.js.map +0 -1
- package/dist/kilo-PKAJCWPX.js.map +0 -1
- package/dist/kimi-EVD7YKXS.js.map +0 -1
- package/dist/mux-5CI5FP2W.js.map +0 -1
- package/dist/omp-AXA7XY22.js.map +0 -1
- package/dist/openclaw-UZ5BMCGQ.js.map +0 -1
- package/dist/opencode-NZBRLJN3.js.map +0 -1
- package/dist/qwen-code-MRRIUQ3P.js.map +0 -1
- package/dist/roo-code-NI5UU6JB.js.map +0 -1
- package/dist/trae-CQC72RHH.js.map +0 -1
- package/dist/vscode-copilot-4RVRTCKV.js.map +0 -1
- package/dist/warp-X6MB67NT.js.map +0 -1
- /package/dist/{antigravity-7IBYFO6P.js.map → antigravity-AMKKKHS4.js.map} +0 -0
- /package/dist/{antigravity-cli-JEOUP2VN.js.map → antigravity-cli-XERXEH5W.js.map} +0 -0
- /package/dist/{chunk-KQSNDFBN.js.map → chunk-LQRAPXS4.js.map} +0 -0
- /package/dist/{kilo-cli-QWUVXG2O.js.map → kilo-cli-UZ7R5UOP.js.map} +0 -0
- /package/dist/{kiro-UQRY6EIO.js.map → kiro-YL6AWUYG.js.map} +0 -0
- /package/dist/{leaderboard-CSWHI4UY.js.map → leaderboard-MJG24O35.js.map} +0 -0
- /package/dist/{usage-CJOM2WQM.js.map → usage-ZFBVQF3H.js.map} +0 -0
- /package/dist/{zed-NTCYW4V2.js.map → zed-SFUHL3GS.js.map} +0 -0
|
@@ -23,21 +23,22 @@
|
|
|
23
23
|
* exposes no writable MCP config to install into. The registry-completeness test
|
|
24
24
|
* (tests/adapters/registry-completeness.test.ts) allowlists it for this reason.
|
|
25
25
|
*/
|
|
26
|
-
type PlatformId = "claude-code" | "codex" | "cursor" | "vscode-copilot" | "jetbrains-copilot" | "copilot-cli" | "gemini-cli" | "opencode" | "kilo" | "kilo-cli" | "warp" | "hermes" | "openclaw" | "zed" | "antigravity" | "antigravity-cli" | "kiro" | "qwen-code" | "kimi" | "pi" | "omp" | "droid" | "roo-code" | "trae" | "amp" | "codebuff" | "mux" | "crush" | "goose" | "synthetic" | "unknown";
|
|
26
|
+
type PlatformId = "claude-code" | "codex" | "cursor" | "vscode-copilot" | "jetbrains-copilot" | "copilot-cli" | "gemini-cli" | "opencode" | "mimo-code" | "kilo" | "kilo-cli" | "warp" | "hermes" | "nemoclaw" | "openclaw" | "zed" | "antigravity" | "antigravity-cli" | "kiro" | "qwen-code" | "kimi" | "pi" | "omp" | "droid" | "roo-code" | "cline" | "trae" | "amp" | "codebuff" | "mux" | "crush" | "goose" | "amazon-q" | "continue" | "windsurf" | "synthetic" | "unknown";
|
|
27
27
|
/**
|
|
28
28
|
* Hook I/O paradigm — the deepest cross-platform divergence (report §4).
|
|
29
29
|
* Canonical shipped sets (keep in sync with src/adapters/registry.ts — this
|
|
30
30
|
* comment once drifted and seeded a docs-wide misclassification):
|
|
31
|
-
* - "json-stdio" (
|
|
31
|
+
* - "json-stdio" (17): host pipes JSON to a command on stdin, reads
|
|
32
32
|
* JSON/exit-code back — Claude Code, Codex, Cursor, VS Code/JetBrains
|
|
33
33
|
* Copilot, Copilot CLI, Gemini CLI, Qwen, Kiro, Kimi, Crush, Goose, Hermes,
|
|
34
|
-
* Droid (Factory), Antigravity (+ the agy CLI). One universal
|
|
35
|
-
* binary handles all of them.
|
|
36
|
-
* - "ts-plugin" (
|
|
37
|
-
* — OpenCode, Kilo CLI, OMP, OpenClaw
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
34
|
+
* Droid (Factory), Antigravity (+ the agy CLI), Continue. One universal
|
|
35
|
+
* entrypoint binary handles all of them.
|
|
36
|
+
* - "ts-plugin" (7): host loads a JS/TS module exporting lifecycle functions
|
|
37
|
+
* — OpenCode, MiMoCode (an OpenCode fork), Kilo CLI, Kilo, OMP, OpenClaw,
|
|
38
|
+
* NemoClaw (an OpenClaw wrapper/fork). Framework generates the module.
|
|
39
|
+
* - "mcp-only" (11): no hook layer at all — Warp, Roo Code, Cline, Trae, Zed,
|
|
40
|
+
* Amp, Codebuff, Mux, Pi, Amazon Q, Windsurf. Only the MCP server (or skills
|
|
41
|
+
* surface) is installed; hooks are reported unavailable.
|
|
41
42
|
*/
|
|
42
43
|
type HookParadigm = "json-stdio" | "ts-plugin" | "mcp-only";
|
|
43
44
|
/**
|
|
@@ -87,12 +88,14 @@ interface ServerDef {
|
|
|
87
88
|
/**
|
|
88
89
|
* Canonical, platform-agnostic lifecycle event names.
|
|
89
90
|
*
|
|
90
|
-
* The
|
|
91
|
-
* SubagentStop
|
|
92
|
-
* native analog mark them unsupported in capabilities and the install
|
|
93
|
-
* a skip-warn — an event is never silently dropped.
|
|
91
|
+
* The newer additions (PermissionRequest / PostToolUseFailure / SubagentStart /
|
|
92
|
+
* SubagentStop and the trailing PostCompact) have cross-host analogs; hosts
|
|
93
|
+
* without a native analog mark them unsupported in capabilities and the install
|
|
94
|
+
* reports a skip-warn — an event is never silently dropped. PostCompact is
|
|
95
|
+
* observational only (the post-compaction sibling of PreCompact; cannot
|
|
96
|
+
* block/modify) and is appended LAST to keep the canonical order append-only.
|
|
94
97
|
*/
|
|
95
|
-
type HookEventName = "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PreCompact" | "Stop" | "Notification" | "PermissionRequest" | "PostToolUseFailure" | "SubagentStart" | "SubagentStop";
|
|
98
|
+
type HookEventName = "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PreCompact" | "Stop" | "Notification" | "PermissionRequest" | "PostToolUseFailure" | "SubagentStart" | "SubagentStop" | "PostCompact";
|
|
96
99
|
interface BaseEvent {
|
|
97
100
|
/** Which host produced this event (from runtime detection). */
|
|
98
101
|
hostPlatform: PlatformId;
|
|
@@ -104,6 +107,17 @@ interface BaseEvent {
|
|
|
104
107
|
projectDir?: string;
|
|
105
108
|
/** Raw host-specific payload for passthrough/escape-hatch use. */
|
|
106
109
|
raw: unknown;
|
|
110
|
+
/**
|
|
111
|
+
* What the host can honor (the adapter's capability flags). OPTIONAL on the
|
|
112
|
+
* TYPE so adapters' parseEvent (which has no capabilities at parse time) need
|
|
113
|
+
* no change, but the runtime ALWAYS populates it before the handler runs — so
|
|
114
|
+
* a hook handler can rely on evt.capabilities being present at runtime.
|
|
115
|
+
*/
|
|
116
|
+
capabilities?: PlatformCapabilities;
|
|
117
|
+
/** Install scope, when recovered from the registered metadata (else undefined). */
|
|
118
|
+
scope?: InstallScope;
|
|
119
|
+
/** Async accessor to this connector's own telemetry usage (see HostCtx.telemetry). */
|
|
120
|
+
telemetry?: TelemetryAccessor;
|
|
107
121
|
}
|
|
108
122
|
interface PreToolUseEvent extends BaseEvent {
|
|
109
123
|
toolName: string;
|
|
@@ -127,6 +141,17 @@ interface UserPromptSubmitEvent extends BaseEvent {
|
|
|
127
141
|
interface PreCompactEvent extends BaseEvent {
|
|
128
142
|
trigger?: "auto" | "manual";
|
|
129
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* PostCompact — the post-compaction sibling of {@link PreCompactEvent}. Fires
|
|
146
|
+
* AFTER the host finishes compacting/summarizing the conversation. Observational
|
|
147
|
+
* only: it cannot block or modify (compaction already happened), exactly like
|
|
148
|
+
* PreCompact's reply contract. The single normalized field is `trigger`
|
|
149
|
+
* (manual|auto); everything else rides on `raw`. Codex is the verified firing
|
|
150
|
+
* host (its hook system ships PreCompact AND PostCompact).
|
|
151
|
+
*/
|
|
152
|
+
interface PostCompactEvent extends BaseEvent {
|
|
153
|
+
trigger?: "auto" | "manual";
|
|
154
|
+
}
|
|
130
155
|
interface StopEvent extends BaseEvent {
|
|
131
156
|
/** True when the stop hook itself was triggered during a previous stop hook. */
|
|
132
157
|
stopHookActive?: boolean;
|
|
@@ -213,6 +238,7 @@ interface EventPayloadMap {
|
|
|
213
238
|
PostToolUseFailure: PostToolUseFailureEvent;
|
|
214
239
|
SubagentStart: SubagentStartEvent;
|
|
215
240
|
SubagentStop: SubagentStopEvent;
|
|
241
|
+
PostCompact: PostCompactEvent;
|
|
216
242
|
}
|
|
217
243
|
/**
|
|
218
244
|
* Normalized hook response. A handler returns a subset of these; the adapter
|
|
@@ -257,6 +283,23 @@ interface HookDefinition<E extends HookEventName = HookEventName> {
|
|
|
257
283
|
*/
|
|
258
284
|
matcher?: string;
|
|
259
285
|
handler(event: EventPayloadMap[E]): HookResponse | void | Promise<HookResponse | void>;
|
|
286
|
+
/**
|
|
287
|
+
* Per-host handler override. When dispatching for host X, `hosts[X].handler`
|
|
288
|
+
* WINS over the top-level `handler`; a host not listed here falls back to the
|
|
289
|
+
* top-level handler. Keys MUST be registered platform ids and each entry's
|
|
290
|
+
* handler MUST be a function (validated at defineConnector). The runtime
|
|
291
|
+
* selection preserves fail-open: a missing/invalid per-host entry simply falls
|
|
292
|
+
* back to the top-level handler — selection never throws.
|
|
293
|
+
*
|
|
294
|
+
* The top-level `handler` is ALWAYS required, even when every host is
|
|
295
|
+
* overridden — it is the mandatory fallback (a `hosts`-only definition is a
|
|
296
|
+
* ConnectorConfigError). A per-host handler SHARES the top-level `matcher`
|
|
297
|
+
* (there is no per-host matcher); the matcher is evaluated before per-host
|
|
298
|
+
* selection, so a non-matching subject suppresses the per-host handler too.
|
|
299
|
+
*/
|
|
300
|
+
hosts?: Partial<Record<PlatformId, {
|
|
301
|
+
handler: HookDefinition<E>["handler"];
|
|
302
|
+
}>>;
|
|
260
303
|
}
|
|
261
304
|
/** Developer-declared hooks, keyed by canonical event name. */
|
|
262
305
|
interface HooksConfig {
|
|
@@ -272,6 +315,7 @@ interface HooksConfig {
|
|
|
272
315
|
PostToolUseFailure?: HookDefinition<"PostToolUseFailure">;
|
|
273
316
|
SubagentStart?: HookDefinition<"SubagentStart">;
|
|
274
317
|
SubagentStop?: HookDefinition<"SubagentStop">;
|
|
318
|
+
PostCompact?: HookDefinition<"PostCompact">;
|
|
275
319
|
}
|
|
276
320
|
/**
|
|
277
321
|
* The payload a NATIVE (passthrough) hook handler receives. Unlike the
|
|
@@ -280,6 +324,12 @@ interface HooksConfig {
|
|
|
280
324
|
* own contract (e.g. Claude's snake_case `task_id` / `teammate_name` fields)
|
|
281
325
|
* with full native fidelity.
|
|
282
326
|
*/
|
|
327
|
+
/**
|
|
328
|
+
* Native passthrough hook event. NOTE: unlike a normalized {@link BaseEvent},
|
|
329
|
+
* this deliberately does NOT carry the HostCtx trio (capabilities / scope /
|
|
330
|
+
* telemetry) — native hooks are a raw-envelope passthrough, so the handler
|
|
331
|
+
* receives only the verbatim payload below.
|
|
332
|
+
*/
|
|
283
333
|
interface NativeHookEvent {
|
|
284
334
|
/** Host-native event name, VERBATIM (e.g. "TaskCreated", "WorktreeRemove"). */
|
|
285
335
|
event: string;
|
|
@@ -396,6 +446,14 @@ interface PlatformCapabilities {
|
|
|
396
446
|
postToolUseFailure?: boolean;
|
|
397
447
|
subagentStart?: boolean;
|
|
398
448
|
subagentStop?: boolean;
|
|
449
|
+
/**
|
|
450
|
+
* PostCompact — observational post-compaction event (the sibling of
|
|
451
|
+
* preCompact). OPTIONAL, read as `?? false`: a host that leaves it unset does
|
|
452
|
+
* not fire PostCompact natively and a declared hook for it warn-skips at
|
|
453
|
+
* install. v1: codex only (its hook system ships both PreCompact and
|
|
454
|
+
* PostCompact).
|
|
455
|
+
*/
|
|
456
|
+
postCompact?: boolean;
|
|
399
457
|
/** Can a PreToolUse hook rewrite tool arguments? */
|
|
400
458
|
canModifyArgs: boolean;
|
|
401
459
|
/** Can a PostToolUse hook rewrite tool output? */
|
|
@@ -440,6 +498,29 @@ interface PlatformCapabilities {
|
|
|
440
498
|
* per-adapter `memoryTargets()` hook.
|
|
441
499
|
*/
|
|
442
500
|
supportsMemory?: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Statusline-surface support (a HUD/status line wired at the single home
|
|
503
|
+
* binary). OPTIONAL, read as `?? false` (supportsMemory precedent). Only
|
|
504
|
+
* statusline-supporting adapters set this true; the BaseAdapter
|
|
505
|
+
* install/uninstall defaults skip-warn regardless of the flag (v1:
|
|
506
|
+
* claude-code only). Unlike the content surfaces this is a runtime-dispatched
|
|
507
|
+
* handler — the supporting adapter wires the host's status line at
|
|
508
|
+
* `<homeBin> statusline <host> --connector <id>`.
|
|
509
|
+
*/
|
|
510
|
+
supportsStatusline?: boolean;
|
|
511
|
+
/**
|
|
512
|
+
* Action-surface support — can this adapter EMIT a host affordance (slash
|
|
513
|
+
* command / palette workflow / exec-file) bound to the universal
|
|
514
|
+
* `<homeBin> action <host> <actionId> --connector <id>` verb? OPTIONAL, read
|
|
515
|
+
* as `?? false` (supportsStatusline precedent). The dispatch BACKBONE shipped
|
|
516
|
+
* first; the EMITTERS now ship on the hosts with a verifiable target: droid
|
|
517
|
+
* (executable command file), hermes (quick_commands exec slash command), warp
|
|
518
|
+
* (palette workflow — pastes the command for the user to run). Hosts whose
|
|
519
|
+
* slash commands are prompt templates that cannot run a shell verb, or whose
|
|
520
|
+
* plugin APIs expose no command registration, leave this unset — every such
|
|
521
|
+
* adapter's BaseAdapter install/uninstall defaults honestly skip-warn.
|
|
522
|
+
*/
|
|
523
|
+
supportsActions?: boolean;
|
|
443
524
|
}
|
|
444
525
|
/** Tool access expressed once; adapters render to allowed-tools / tools[] / readonly. */
|
|
445
526
|
interface SurfaceToolPolicy {
|
|
@@ -499,7 +580,7 @@ interface SubagentDef {
|
|
|
499
580
|
* writes it as a MANAGED BLOCK (marker-fenced, hash-stamped,
|
|
500
581
|
* uninstall-reversible — see core/managed-block.ts) into the memory/rules file
|
|
501
582
|
* that host actually reads: AGENTS.md wherever the host supports the agents.md
|
|
502
|
-
* standard (
|
|
583
|
+
* standard (29/35 hosts), the host's own file (CLAUDE.md / GEMINI.md)
|
|
503
584
|
* otherwise. CONTENT-ONLY like commands/skills/subagents: no runtime dispatch,
|
|
504
585
|
* no telemetry wrapping — a pure, surgical file edit that never touches bytes
|
|
505
586
|
* outside its own marker pair.
|
|
@@ -525,6 +606,173 @@ interface MemoryDef {
|
|
|
525
606
|
*/
|
|
526
607
|
content: string;
|
|
527
608
|
}
|
|
609
|
+
/**
|
|
610
|
+
* Shared context for handler surfaces. v1: {@link StatuslineContext} extends it
|
|
611
|
+
* (render sees host + capabilities). Hook payloads (the normalized
|
|
612
|
+
* {@link EventPayloadMap} events) keep their existing shape for now and adopt
|
|
613
|
+
* HostCtx in a later phase (lower blast radius — they carry `hostPlatform` +
|
|
614
|
+
* `connectorId` + per-event fields already, and changing the runtime hook
|
|
615
|
+
* payload shape is a wider change than this statusline-only unification).
|
|
616
|
+
*/
|
|
617
|
+
interface HostCtx {
|
|
618
|
+
/** Which host is running this handler. */
|
|
619
|
+
host: PlatformId;
|
|
620
|
+
/** What this host can actually honor (the adapter's capability flags). */
|
|
621
|
+
capabilities: PlatformCapabilities;
|
|
622
|
+
/**
|
|
623
|
+
* Install scope, when known. OPTIONAL: scope is an install-time property the
|
|
624
|
+
* runtime recovers from the connector's registered metadata
|
|
625
|
+
* (`readRegisteredMeta(connectorId)?.scope`) and stamps onto the ctx, so it is
|
|
626
|
+
* now POPULATED when the meta carries it. It is still undefined for an
|
|
627
|
+
* unregistered / ad-hoc connector (no meta) or one registered before scope was
|
|
628
|
+
* persisted — branch on `host` + `capabilities` when scope may be absent.
|
|
629
|
+
* CAVEAT: the persisted scope is the install's RUN-WIDE DEFAULT scope; it may
|
|
630
|
+
* differ from the EFFECTIVE per-host scope when the connector set a
|
|
631
|
+
* `platforms[host].scope` override (the single registry record is keyed by
|
|
632
|
+
* connector id only, so it cannot hold a per-host scope). Treat it as the
|
|
633
|
+
* default, not a guaranteed per-host truth.
|
|
634
|
+
*/
|
|
635
|
+
scope?: InstallScope;
|
|
636
|
+
/** Project directory, when the host reports it. */
|
|
637
|
+
projectDir?: string;
|
|
638
|
+
/** Host session id, when the host reports it. */
|
|
639
|
+
sessionId?: string;
|
|
640
|
+
/**
|
|
641
|
+
* Async accessor to THIS connector's own telemetry usage (token sums + call
|
|
642
|
+
* count). ASYNC (reads the store); resolves empty zeros when
|
|
643
|
+
* AGENT_CONNECTOR_TELEMETRY=0; NEVER throws (returns zeros on any read error).
|
|
644
|
+
* Stamped by the runtime entrypoint, so a handler reads it via
|
|
645
|
+
* `await ctx.telemetry?.()`. Undefined only in contexts that do not build it.
|
|
646
|
+
*/
|
|
647
|
+
telemetry?: TelemetryAccessor;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Normalized context handed to {@link StatuslineDef.render}. Extends the shared
|
|
651
|
+
* {@link HostCtx} (so render sees `host` + `capabilities` + the optional
|
|
652
|
+
* scope/projectDir/sessionId) and adds the statusline-specific fields. Each
|
|
653
|
+
* adapter's `parseStatusInput` maps the host's verbatim status payload into this
|
|
654
|
+
* shape, filling only the fields that host exposes. `raw` is the untouched host
|
|
655
|
+
* payload (the escape hatch for fields not modeled here).
|
|
656
|
+
*/
|
|
657
|
+
interface StatuslineContext extends HostCtx {
|
|
658
|
+
/**
|
|
659
|
+
* Connector id this status line is dispatched for (stamped by the runtime,
|
|
660
|
+
* NOT by the adapter). Kept on StatuslineContext rather than HostCtx: it is a
|
|
661
|
+
* runtime-dispatch detail, and HostCtx is meant to describe the HOST, not the
|
|
662
|
+
* connector being dispatched.
|
|
663
|
+
*/
|
|
664
|
+
connectorId?: string;
|
|
665
|
+
/** Working directory the host reports for this session. */
|
|
666
|
+
cwd?: string;
|
|
667
|
+
/** Active model, when the host reports it. */
|
|
668
|
+
model?: {
|
|
669
|
+
id?: string;
|
|
670
|
+
displayName?: string;
|
|
671
|
+
};
|
|
672
|
+
/** Running cost, when the host reports it. */
|
|
673
|
+
cost?: {
|
|
674
|
+
totalUsd?: number;
|
|
675
|
+
};
|
|
676
|
+
/** Context-window usage, when the host reports it. */
|
|
677
|
+
context?: {
|
|
678
|
+
usedTokens?: number;
|
|
679
|
+
maxTokens?: number;
|
|
680
|
+
percent?: number;
|
|
681
|
+
};
|
|
682
|
+
/**
|
|
683
|
+
* THIS connector's OWN recorded MCP telemetry usage (token sums + call count),
|
|
684
|
+
* pre-computed by the runtime so render() can read it synchronously. ALL-TIME
|
|
685
|
+
* for the connector (every stored row) — NOT the host context-window (see
|
|
686
|
+
* `context`) and NOT session-scoped. When pre-computed it is always a real
|
|
687
|
+
* summary (zeros when there's no telemetry or it's switched off, never
|
|
688
|
+
* undefined); it is undefined only for a context that does not pre-compute it.
|
|
689
|
+
* render() can still `await ctx.telemetry?.()` to fetch a live or custom slice.
|
|
690
|
+
*/
|
|
691
|
+
usage?: TelemetryUsageSummary;
|
|
692
|
+
/** Path to the session transcript, when the host reports one. */
|
|
693
|
+
transcriptPath?: string;
|
|
694
|
+
/** The host's verbatim status payload (escape hatch). */
|
|
695
|
+
raw: unknown;
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* A connector's status line ("HUD"): a single handler that renders the line
|
|
699
|
+
* text from the normalized {@link StatuslineContext}. The handler lives in the
|
|
700
|
+
* connector module and is re-imported at runtime (like hook handlers), so it
|
|
701
|
+
* must survive defineConnector resolution as a live function.
|
|
702
|
+
*
|
|
703
|
+
* v1 returns a plain string (no Segment[] yet — a future enhancement). Adapters
|
|
704
|
+
* with {@link PlatformCapabilities.supportsStatusline} wire the host's status
|
|
705
|
+
* line at the single home binary (`<homeBin> statusline <host> --connector
|
|
706
|
+
* <id>`); every other adapter reports the standard skip-warn.
|
|
707
|
+
*/
|
|
708
|
+
interface StatuslineDef {
|
|
709
|
+
/**
|
|
710
|
+
* kebab-case id; default "statusline". Stable identifier surfaced in
|
|
711
|
+
* status/docs output (the status line is singular, so it is not used as a
|
|
712
|
+
* marker key like memory names — but it stays kebab-case for consistency).
|
|
713
|
+
*/
|
|
714
|
+
name?: string;
|
|
715
|
+
/** One-line "what this status line shows" — status/docs output only. */
|
|
716
|
+
description?: string;
|
|
717
|
+
/**
|
|
718
|
+
* Renderer. Receives the normalized context; returns the status line text.
|
|
719
|
+
* Re-imported at runtime via the connector module path (like hook handlers).
|
|
720
|
+
*/
|
|
721
|
+
render: (ctx: StatuslineContext) => string | Promise<string>;
|
|
722
|
+
/**
|
|
723
|
+
* Per-host render override. When rendering for host X, `hosts[X].render` WINS
|
|
724
|
+
* over the top-level `render`; a host not listed here falls back to the
|
|
725
|
+
* top-level render. Keys MUST be registered platform ids and each entry's
|
|
726
|
+
* render MUST be a function (validated at defineConnector). The runtime
|
|
727
|
+
* selection preserves fail-safe: a missing/invalid per-host entry simply falls
|
|
728
|
+
* back to the top-level render — selection never throws.
|
|
729
|
+
*
|
|
730
|
+
* The top-level `render` is ALWAYS required, even when every host is
|
|
731
|
+
* overridden — it is the mandatory fallback (a `hosts`-only definition is a
|
|
732
|
+
* ConnectorConfigError). A `hosts` entry targeting a host that has no
|
|
733
|
+
* statusline surface is inert (the runtime no-ops it), exactly as the surface
|
|
734
|
+
* itself skip-warns there.
|
|
735
|
+
*/
|
|
736
|
+
hosts?: Partial<Record<PlatformId, {
|
|
737
|
+
render: StatuslineDef["render"];
|
|
738
|
+
}>>;
|
|
739
|
+
}
|
|
740
|
+
/** What an action's run() returns. v1 minimal: an optional user-facing message. */
|
|
741
|
+
interface ActionResult {
|
|
742
|
+
message?: string;
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* A user-invokable action: an id + a run(ctx) handler. The connector binds it to
|
|
746
|
+
* a host affordance (slash command / keybinding) in a LATER phase; v1 ships the
|
|
747
|
+
* dispatch backbone (the `agent-connector action` verb runs run(ctx)). run
|
|
748
|
+
* receives the shared {@link HostCtx} (host + capabilities; no stdin — an action
|
|
749
|
+
* takes no host payload, unlike a hook or status line). The handler lives in the
|
|
750
|
+
* connector module and is re-imported at runtime (like hook handlers /
|
|
751
|
+
* statusline.render), so it must survive defineConnector resolution as a live
|
|
752
|
+
* function.
|
|
753
|
+
*/
|
|
754
|
+
interface ActionDef {
|
|
755
|
+
/** kebab-case id; unique within the connector. The verb's positional arg. */
|
|
756
|
+
id: string;
|
|
757
|
+
/** One-line "what this action does" — status/docs output only. */
|
|
758
|
+
description?: string;
|
|
759
|
+
/**
|
|
760
|
+
* The action handler. Receives the normalized {@link HostCtx}; an optional
|
|
761
|
+
* {@link ActionResult} return prints its `message` to the user. Re-imported at
|
|
762
|
+
* runtime via the connector module path (like hook handlers).
|
|
763
|
+
*/
|
|
764
|
+
run: (ctx: HostCtx) => ActionResult | void | Promise<ActionResult | void>;
|
|
765
|
+
/**
|
|
766
|
+
* Per-host run override. When dispatching for host X, `hosts[X].run` WINS over
|
|
767
|
+
* the top-level `run`; a host not listed here falls back to the top-level run.
|
|
768
|
+
* Same shape/semantics as {@link StatuslineDef.hosts}: keys MUST be registered
|
|
769
|
+
* platform ids and each entry's run MUST be a function (validated at
|
|
770
|
+
* defineConnector). The top-level `run` is ALWAYS the mandatory fallback.
|
|
771
|
+
*/
|
|
772
|
+
hosts?: Partial<Record<PlatformId, {
|
|
773
|
+
run: ActionDef["run"];
|
|
774
|
+
}>>;
|
|
775
|
+
}
|
|
528
776
|
/** Per-host memory tuning — the object form of {@link PlatformOverride.memory}. */
|
|
529
777
|
interface PlatformMemoryOverride {
|
|
530
778
|
/**
|
|
@@ -547,6 +795,25 @@ interface PlatformMemoryOverride {
|
|
|
547
795
|
*/
|
|
548
796
|
mode?: "block" | "agents-import";
|
|
549
797
|
}
|
|
798
|
+
/**
|
|
799
|
+
* A handler-facing rollup of THIS connector's own recorded telemetry usage —
|
|
800
|
+
* the sum of every stored row for the connector (inputTokens/outputTokens) plus
|
|
801
|
+
* the row count (`calls`). Aggregate counts only; no raw content (mirrors the
|
|
802
|
+
* {@link ToolEventRecord} contract). Exposed via {@link HostCtx.telemetry}.
|
|
803
|
+
*/
|
|
804
|
+
interface TelemetryUsageSummary {
|
|
805
|
+
inputTokens: number;
|
|
806
|
+
outputTokens: number;
|
|
807
|
+
totalTokens: number;
|
|
808
|
+
calls: number;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Async accessor a handler calls to read its connector's own telemetry usage.
|
|
812
|
+
* ASYNC (it reads the store). Returns empty zeros when AGENT_CONNECTOR_TELEMETRY=0,
|
|
813
|
+
* and NEVER throws (any read error resolves to zeros) — a handler can always
|
|
814
|
+
* `await ctx.telemetry?.()` without a try/catch.
|
|
815
|
+
*/
|
|
816
|
+
type TelemetryAccessor = () => Promise<TelemetryUsageSummary>;
|
|
550
817
|
interface TelemetryConfig {
|
|
551
818
|
/** On by default. Global kill switch also via AGENT_CONNECTOR_TELEMETRY=0. */
|
|
552
819
|
enabled?: boolean;
|
|
@@ -584,13 +851,13 @@ interface PlatformOverride {
|
|
|
584
851
|
* VERBATIM. This immediately covers all 30 current Claude Code events (e.g.
|
|
585
852
|
* TaskCreated, TaskCompleted, TeammateIdle, StopFailure, MessageDisplay,
|
|
586
853
|
* WorktreeCreate/WorktreeRemove, Elicitation/ElicitationResult,
|
|
587
|
-
* InstructionsLoaded, ConfigChange, FileChanged,
|
|
854
|
+
* InstructionsLoaded, ConfigChange, FileChanged, CwdChanged, …) and any
|
|
588
855
|
* future event a host adds — with zero agent-connector releases.
|
|
589
856
|
*
|
|
590
857
|
* Scoping: per-platform-keyed, so a declaration only ever applies to the
|
|
591
858
|
* platform it is declared under. Adapters without
|
|
592
859
|
* {@link PlatformCapabilities.supportsNativeHooks} report a skip-warn
|
|
593
|
-
* ChangeRecord at install (never silent). Declaring one of the
|
|
860
|
+
* ChangeRecord at install (never silent). Declaring one of the 13 normalized
|
|
594
861
|
* event names here is a ConnectorConfigError — use the normalized `hooks`
|
|
595
862
|
* API for those.
|
|
596
863
|
*
|
|
@@ -624,6 +891,10 @@ interface PlatformOverride {
|
|
|
624
891
|
* object → per-host target/mode tuning ({@link PlatformMemoryOverride}).
|
|
625
892
|
*/
|
|
626
893
|
memory?: boolean | PlatformMemoryOverride;
|
|
894
|
+
/** false → do not wire the status line on this platform (no object form in v1). */
|
|
895
|
+
statusline?: boolean;
|
|
896
|
+
/** false → do not emit the action affordance(s) on this platform (no object form in v1). */
|
|
897
|
+
actions?: boolean;
|
|
627
898
|
/** Verbatim fields merged into the native config (reach platform-exclusive features). */
|
|
628
899
|
extra?: Record<string, unknown>;
|
|
629
900
|
}
|
|
@@ -685,6 +956,18 @@ interface ConnectorConfig {
|
|
|
685
956
|
* memory/rules file (AGENTS.md-first). Omit when the connector ships none.
|
|
686
957
|
*/
|
|
687
958
|
memory?: MemoryDef[];
|
|
959
|
+
/**
|
|
960
|
+
* The connector's status line (a HUD). SINGULAR — a connector renders ONE
|
|
961
|
+
* status line. Omit when the connector ships none.
|
|
962
|
+
*/
|
|
963
|
+
statusline?: StatuslineDef;
|
|
964
|
+
/**
|
|
965
|
+
* User-invokable actions (each an id + run(ctx) handler the universal
|
|
966
|
+
* `agent-connector action` verb dispatches). Omit when the connector ships
|
|
967
|
+
* none. The host-affordance binding is a later phase; v1 ships the dispatch
|
|
968
|
+
* backbone only.
|
|
969
|
+
*/
|
|
970
|
+
actions?: ActionDef[];
|
|
688
971
|
/** Per-platform overrides / escape hatches. */
|
|
689
972
|
platforms?: Partial<Record<PlatformId, PlatformOverride>>;
|
|
690
973
|
/** "auto" (all detected) or an explicit allow-list. Default "auto". */
|
|
@@ -716,6 +999,21 @@ interface ResolvedConnector {
|
|
|
716
999
|
subagents: SubagentDef[];
|
|
717
1000
|
/** Normalized memory entries; names defaulted ("memory"); [] when none. */
|
|
718
1001
|
memory: MemoryDef[];
|
|
1002
|
+
/**
|
|
1003
|
+
* Normalized status line (a HUD); name defaulted ("statusline"). Undefined
|
|
1004
|
+
* when the connector declares none. SINGULAR (not an array) — see
|
|
1005
|
+
* {@link StatuslineDef}. Carries the live `render` handler, so it survives
|
|
1006
|
+
* defineConnector but NOT JSON serialization (re-imported at runtime, like
|
|
1007
|
+
* hook handlers).
|
|
1008
|
+
*/
|
|
1009
|
+
statusline?: StatuslineDef;
|
|
1010
|
+
/**
|
|
1011
|
+
* Normalized actions (each id defaulted/validated kebab-case + unique); [] when
|
|
1012
|
+
* none. Carries the live `run` handlers, so it survives defineConnector but NOT
|
|
1013
|
+
* JSON serialization (re-imported at runtime, like hook handlers / the
|
|
1014
|
+
* statusline render).
|
|
1015
|
+
*/
|
|
1016
|
+
actions: ActionDef[];
|
|
719
1017
|
platforms: Partial<Record<PlatformId, PlatformOverride>>;
|
|
720
1018
|
targets: "auto" | PlatformId[];
|
|
721
1019
|
/** Distribution metadata (registry server.json + MCPB bundle); passed through verbatim. */
|
|
@@ -752,6 +1050,12 @@ interface DiagnosticResult {
|
|
|
752
1050
|
status: "pass" | "fail" | "warn";
|
|
753
1051
|
message: string;
|
|
754
1052
|
fix?: string;
|
|
1053
|
+
/**
|
|
1054
|
+
* true ⇒ a plain re-sync re-asserts this (the surface is simply absent and
|
|
1055
|
+
* agent-connector owns it). Omitted/false ⇒ heal must DEFER (drift we'd
|
|
1056
|
+
* clobber, external dep, or ambiguous ownership).
|
|
1057
|
+
*/
|
|
1058
|
+
fixable?: boolean;
|
|
755
1059
|
}
|
|
756
1060
|
|
|
757
|
-
export type {
|
|
1061
|
+
export type { ActionDef as A, SubagentDef as B, CommandDef as C, SubagentStartEvent as D, EventPayloadMap as E, SubagentStopEvent as F, SurfaceToolPolicy as G, HookDefinition as H, InstallScope as I, JsonValue as J, TelemetryConfig as K, TelemetryUsageSummary as L, MemoryDef as M, NativeHookDef as N, ToolFilter as O, PlatformId as P, Transport as Q, ResolvedConnector as R, ServerDef as S, TelemetryAccessor as T, UserPromptSubmitEvent as U, ChangeRecord as V, DetectedPlatform as W, DiagnosticResult as X, InstallResult as Y, ActionResult as a, AuthSpec as b, ConfigPatchDef as c, ConnectorConfig as d, HookEventName as e, HookParadigm as f, HookResponse as g, HooksConfig as h, HostCtx as i, NativeHookEvent as j, NotificationEvent as k, PermissionRequestEvent as l, PlatformCapabilities as m, PlatformMemoryOverride as n, PlatformOverride as o, PostToolUseEvent as p, PostToolUseFailureEvent as q, PreCompactEvent as r, PreToolUseEvent as s, PublishConfig as t, SessionEndEvent as u, SessionStartEvent as v, SkillDef as w, StatuslineContext as x, StatuslineDef as y, StopEvent as z };
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
resolveUninstallTargets,
|
|
6
6
|
uninstallConnector,
|
|
7
7
|
uninstallViaMarketplace
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-RIMVWCZY.js";
|
|
9
|
+
import "./chunk-QREL7LZJ.js";
|
|
10
10
|
import {
|
|
11
11
|
marketplaceEvidence,
|
|
12
12
|
readMarketplaceInstalls
|
|
@@ -17,17 +17,20 @@ import {
|
|
|
17
17
|
parseTargets,
|
|
18
18
|
print,
|
|
19
19
|
renderInstallResult
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-O5TWCIJN.js";
|
|
21
|
+
import "./chunk-F5RX62T7.js";
|
|
22
|
+
import "./chunk-EGCBZ2DC.js";
|
|
23
|
+
import "./chunk-KHO5WNTP.js";
|
|
23
24
|
import {
|
|
24
25
|
findConnectorConfig,
|
|
25
26
|
loadConnectorFromPath
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-24IDL5RW.js";
|
|
28
|
+
import "./chunk-4ENJK5S2.js";
|
|
29
|
+
import "./chunk-DCKFYWGM.js";
|
|
30
|
+
import "./chunk-FAHIMJRU.js";
|
|
28
31
|
import "./chunk-OPXAP3AC.js";
|
|
29
32
|
import "./chunk-7L6ITC4T.js";
|
|
30
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-I5MLE6S7.js";
|
|
31
34
|
import "./chunk-N6HH7K6P.js";
|
|
32
35
|
import "./chunk-TRQKHP7D.js";
|
|
33
36
|
|
|
@@ -159,4 +162,4 @@ async function run(argv) {
|
|
|
159
162
|
export {
|
|
160
163
|
run
|
|
161
164
|
};
|
|
162
|
-
//# sourceMappingURL=uninstall-
|
|
165
|
+
//# sourceMappingURL=uninstall-ZYTW7YMZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/commands/uninstall.ts"],"sourcesContent":["/**\n * cli/commands/uninstall — strip a connector's registrations, method-aware.\n *\n * The connector id is taken from --connector-id, or inferred from the local\n * connector config (--connector <path> / findConnectorConfig).\n *\n * --method auto (default) reverses WHATEVER is actually there, per target:\n * targets with marketplace evidence (the state record, or the host's own plugin\n * state) get the HOST plugin uninstall; everything else gets the existing\n * direct adapter strip. Install chooses a method (a user decision); uninstall\n * reverses what exists (a state decision) — and since the double-install guard\n * enforces exactly one method per (connector, host, scope), auto is\n * unambiguous. Explicit --method direct|marketplace forces one path for every\n * target. Config removal vs plugin uninstall is therefore method-resolved:\n * never both, never neither.\n *\n * --purge additionally removes the framework-state this connector left behind:\n * its DATA-dir connector record (connectorDir(id)), the empty marketplace\n * staging root, and, when no connectors remain, the shared home-bin launcher.\n * Without --purge those linger so the connector can be re-synced without\n * re-registering.\n */\n\nimport { parseArgs } from \"node:util\";\n\nimport {\n purgeFrameworkState,\n resolveUninstallTargets,\n uninstallConnector,\n} from \"../../core/installer.js\";\nimport {\n marketplaceEvidence,\n parseUninstallMethod,\n uninstallViaMarketplace,\n} from \"../../core/marketplace.js\";\nimport { readMarketplaceInstalls } from \"../../core/marketplace-state.js\";\nimport { findConnectorConfig, loadConnectorFromPath } from \"../../core/load-connector.js\";\nimport type { InstallResult, PlatformId } from \"../../core/types.js\";\nimport { fail, parseScope, parseTargets, print, renderInstallResult } from \"../app.js\";\n\n/** Resolve the connector id from flags, then from a local config file. */\nasync function resolveConnectorId(\n explicitId: string | undefined,\n connectorPath: string | undefined,\n projectDir: string,\n): Promise<string | null> {\n if (explicitId && explicitId.trim() !== \"\") return explicitId;\n const configPath = connectorPath ?? findConnectorConfig(projectDir);\n if (!configPath) return null;\n const { connector } = await loadConnectorFromPath(configPath);\n return connector.id;\n}\n\nexport async function run(argv: string[]): Promise<number> {\n const { values } = parseArgs({\n args: argv,\n options: {\n method: { type: \"string\", default: \"auto\" },\n scope: { type: \"string\", default: \"user\" },\n targets: { type: \"string\" },\n connector: { type: \"string\" },\n \"connector-id\": { type: \"string\" },\n project: { type: \"string\" },\n \"dry-run\": { type: \"boolean\", default: false },\n purge: { type: \"boolean\", default: false },\n },\n allowPositionals: false,\n });\n\n const method = parseUninstallMethod(values.method);\n if (method == null) {\n return fail(`invalid --method \"${values.method}\" (use auto|direct|marketplace)`);\n }\n\n const projectDir = values.project ?? process.cwd();\n\n const scope = parseScope(values.scope);\n if (scope == null) return fail(`invalid --scope \"${values.scope}\" (use user|project)`);\n\n const connectorId = await resolveConnectorId(\n values[\"connector-id\"],\n values.connector,\n projectDir,\n );\n if (!connectorId) {\n return fail(\n \"could not determine connector id. Pass --connector-id <id>, \" +\n \"--connector <path>, or run inside a project with an agent-connector config.\",\n );\n }\n\n const targets = parseTargets(values.targets);\n const dryRun = values[\"dry-run\"];\n\n // ── Explicit --method marketplace: every target goes to the marketplace path\n // (targets default to the recorded installs); framework purge runs here since\n // no direct pass follows.\n if (method === \"marketplace\") {\n const result = await uninstallViaMarketplace({\n connectorId,\n projectDir,\n dryRun,\n purge: values.purge,\n ...(targets ? { targets } : {}),\n });\n if (values.purge) purgeFrameworkState(connectorId, dryRun, result);\n print(renderInstallResult(result, \"uninstall\"));\n return result.changes.some((c) => c.action === \"warn\") ? 1 : 0;\n }\n\n // ── --method auto: partition the resolved targets by marketplace evidence.\n // (--method direct keeps every target on the adapter strip — today's path.)\n let marketplaceTargets: PlatformId[] = [];\n let directTargets: PlatformId[] = [];\n if (method === \"auto\") {\n const resolved = await resolveUninstallTargets(connectorId, targets, projectDir);\n // With no explicit --targets, recorded marketplace platforms are unioned\n // in: the state record IS the authority for what we installed, and host\n // detection can miss a host whose probe-able config dir was relocated.\n // An explicit --targets list is always respected as-is.\n const recorded = targets\n ? []\n : (Object.keys(readMarketplaceInstalls(connectorId)) as PlatformId[]);\n const candidates = [...new Set([...resolved, ...recorded])];\n marketplaceTargets = candidates.filter(\n (id) => marketplaceEvidence(connectorId, id) != null,\n );\n directTargets = resolved.filter((id) => !marketplaceTargets.includes(id));\n }\n\n // No marketplace evidence anywhere (or --method direct): exactly today's\n // single-orchestration path, byte-for-byte — zero behavior change for users\n // who never touched the marketplace method.\n if (marketplaceTargets.length === 0) {\n const result = await uninstallConnector({\n connectorId,\n scope,\n projectDir,\n dryRun,\n purge: values.purge,\n ...(targets ? { targets } : {}),\n });\n print(renderInstallResult(result, \"uninstall\"));\n return result.changes.some((c) => c.action === \"warn\") ? 1 : 0;\n }\n\n const results: InstallResult[] = [\n await uninstallViaMarketplace({\n connectorId,\n projectDir,\n targets: marketplaceTargets,\n dryRun,\n purge: values.purge,\n }),\n ];\n\n // The direct strip runs only for its partition (never both methods on one\n // target). When every target was marketplace-routed, --purge still runs the\n // framework purge (the marketplace records were just cleared, so it can\n // proceed to the connector record + home-bin).\n if (directTargets.length > 0) {\n results.push(\n await uninstallConnector({\n connectorId,\n scope,\n projectDir,\n dryRun,\n purge: values.purge,\n targets: directTargets,\n }),\n );\n } else if (values.purge) {\n const purgeResult: InstallResult = {\n connectorId,\n dryRun,\n changes: [],\n warnings: [],\n };\n if (dryRun) {\n // On a real run the marketplace records are removed BEFORE this purge;\n // calling purgeFrameworkState now would false-refuse on records that the\n // marketplace pass only PLANNED to remove. Report the plan instead.\n purgeResult.changes.push({\n platform: connectorId as PlatformId,\n action: \"remove\",\n detail:\n \"would purge framework state (connector record; home-bin when no connectors remain)\",\n });\n } else {\n purgeFrameworkState(connectorId, dryRun, purgeResult);\n }\n results.push(purgeResult);\n }\n\n const merged: InstallResult = {\n connectorId,\n dryRun,\n changes: results.flatMap((r) => r.changes),\n warnings: results.flatMap((r) => r.warnings),\n };\n print(renderInstallResult(merged, \"uninstall\"));\n return merged.changes.some((c) => c.action === \"warn\") ? 1 : 0;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAS,iBAAiB;AAkB1B,eAAe,mBACb,YACA,eACA,YACwB;AACxB,MAAI,cAAc,WAAW,KAAK,MAAM,GAAI,QAAO;AACnD,QAAM,aAAa,iBAAiB,oBAAoB,UAAU;AAClE,MAAI,CAAC,WAAY,QAAO;AACxB,QAAM,EAAE,UAAU,IAAI,MAAM,sBAAsB,UAAU;AAC5D,SAAO,UAAU;AACnB;AAEA,eAAsB,IAAI,MAAiC;AACzD,QAAM,EAAE,OAAO,IAAI,UAAU;AAAA,IAC3B,MAAM;AAAA,IACN,SAAS;AAAA,MACP,QAAQ,EAAE,MAAM,UAAU,SAAS,OAAO;AAAA,MAC1C,OAAO,EAAE,MAAM,UAAU,SAAS,OAAO;AAAA,MACzC,SAAS,EAAE,MAAM,SAAS;AAAA,MAC1B,WAAW,EAAE,MAAM,SAAS;AAAA,MAC5B,gBAAgB,EAAE,MAAM,SAAS;AAAA,MACjC,SAAS,EAAE,MAAM,SAAS;AAAA,MAC1B,WAAW,EAAE,MAAM,WAAW,SAAS,MAAM;AAAA,MAC7C,OAAO,EAAE,MAAM,WAAW,SAAS,MAAM;AAA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U,QAAQ,QAAQ,CAAC,MAAM,EAAE,QAAQ;AAAA,EAC7C;AACA,QAAM,oBAAoB,QAAQ,WAAW,CAAC;AAC9C,SAAO,OAAO,QAAQ,KAAK,CAAC,MAAM,EAAE,WAAW,MAAM,IAAI,IAAI;AAC/D;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/cli/commands/uninstall.ts"],"sourcesContent":["/**\n * cli/commands/uninstall — strip a connector's registrations, method-aware.\n *\n * The connector id is taken from --connector-id, or inferred from the local\n * connector config (--connector <path> / findConnectorConfig).\n *\n * --method auto (default) reverses WHATEVER is actually there, per target:\n * targets with marketplace evidence (the state record, or the host's own plugin\n * state) get the HOST plugin uninstall; everything else gets the existing\n * direct adapter strip. Install chooses a method (a user decision); uninstall\n * reverses what exists (a state decision) — and since the double-install guard\n * enforces exactly one method per (connector, host, scope), auto is\n * unambiguous. Explicit --method direct|marketplace forces one path for every\n * target. Config removal vs plugin uninstall is therefore method-resolved:\n * never both, never neither.\n *\n * --purge additionally removes the framework-state this connector left behind:\n * its DATA-dir connector record (connectorDir(id)), the empty marketplace\n * staging root, and, when no connectors remain, the shared home-bin launcher.\n * Without --purge those linger so the connector can be re-synced without\n * re-registering.\n */\n\nimport { parseArgs } from \"node:util\";\n\nimport {\n purgeFrameworkState,\n resolveUninstallTargets,\n uninstallConnector,\n} from \"../../core/installer.js\";\nimport {\n marketplaceEvidence,\n parseUninstallMethod,\n uninstallViaMarketplace,\n} from \"../../core/marketplace.js\";\nimport { readMarketplaceInstalls } from \"../../core/marketplace-state.js\";\nimport { findConnectorConfig, loadConnectorFromPath } from \"../../core/load-connector.js\";\nimport type { InstallResult, PlatformId } from \"../../core/types.js\";\nimport { fail, parseScope, parseTargets, print, renderInstallResult } from \"../app.js\";\n\n/** Resolve the connector id from flags, then from a local config file. */\nasync function resolveConnectorId(\n explicitId: string | undefined,\n connectorPath: string | undefined,\n projectDir: string,\n): Promise<string | null> {\n if (explicitId && explicitId.trim() !== \"\") return explicitId;\n const configPath = connectorPath ?? findConnectorConfig(projectDir);\n if (!configPath) return null;\n const { connector } = await loadConnectorFromPath(configPath);\n return connector.id;\n}\n\nexport async function run(argv: string[]): Promise<number> {\n const { values } = parseArgs({\n args: argv,\n options: {\n method: { type: \"string\", default: \"auto\" },\n scope: { type: \"string\", default: \"user\" },\n targets: { type: \"string\" },\n connector: { type: \"string\" },\n \"connector-id\": { type: \"string\" },\n project: { type: \"string\" },\n \"dry-run\": { type: \"boolean\", default: false },\n purge: { type: \"boolean\", default: false },\n },\n allowPositionals: false,\n });\n\n const method = parseUninstallMethod(values.method);\n if (method == null) {\n return fail(`invalid --method \"${values.method}\" (use auto|direct|marketplace)`);\n }\n\n const projectDir = values.project ?? process.cwd();\n\n const scope = parseScope(values.scope);\n if (scope == null) return fail(`invalid --scope \"${values.scope}\" (use user|project)`);\n\n const connectorId = await resolveConnectorId(\n values[\"connector-id\"],\n values.connector,\n projectDir,\n );\n if (!connectorId) {\n return fail(\n \"could not determine connector id. Pass --connector-id <id>, \" +\n \"--connector <path>, or run inside a project with an agent-connector config.\",\n );\n }\n\n const targets = parseTargets(values.targets);\n const dryRun = values[\"dry-run\"];\n\n // ── Explicit --method marketplace: every target goes to the marketplace path\n // (targets default to the recorded installs); framework purge runs here since\n // no direct pass follows.\n if (method === \"marketplace\") {\n const result = await uninstallViaMarketplace({\n connectorId,\n projectDir,\n dryRun,\n purge: values.purge,\n ...(targets ? { targets } : {}),\n });\n if (values.purge) purgeFrameworkState(connectorId, dryRun, result);\n print(renderInstallResult(result, \"uninstall\"));\n return result.changes.some((c) => c.action === \"warn\") ? 1 : 0;\n }\n\n // ── --method auto: partition the resolved targets by marketplace evidence.\n // (--method direct keeps every target on the adapter strip — today's path.)\n let marketplaceTargets: PlatformId[] = [];\n let directTargets: PlatformId[] = [];\n if (method === \"auto\") {\n const resolved = await resolveUninstallTargets(connectorId, targets, projectDir);\n // With no explicit --targets, recorded marketplace platforms are unioned\n // in: the state record IS the authority for what we installed, and host\n // detection can miss a host whose probe-able config dir was relocated.\n // An explicit --targets list is always respected as-is.\n const recorded = targets\n ? []\n : (Object.keys(readMarketplaceInstalls(connectorId)) as PlatformId[]);\n const candidates = [...new Set([...resolved, ...recorded])];\n marketplaceTargets = candidates.filter(\n (id) => marketplaceEvidence(connectorId, id) != null,\n );\n directTargets = resolved.filter((id) => !marketplaceTargets.includes(id));\n }\n\n // No marketplace evidence anywhere (or --method direct): exactly today's\n // single-orchestration path, byte-for-byte — zero behavior change for users\n // who never touched the marketplace method.\n if (marketplaceTargets.length === 0) {\n const result = await uninstallConnector({\n connectorId,\n scope,\n projectDir,\n dryRun,\n purge: values.purge,\n ...(targets ? { targets } : {}),\n });\n print(renderInstallResult(result, \"uninstall\"));\n return result.changes.some((c) => c.action === \"warn\") ? 1 : 0;\n }\n\n const results: InstallResult[] = [\n await uninstallViaMarketplace({\n connectorId,\n projectDir,\n targets: marketplaceTargets,\n dryRun,\n purge: values.purge,\n }),\n ];\n\n // The direct strip runs only for its partition (never both methods on one\n // target). When every target was marketplace-routed, --purge still runs the\n // framework purge (the marketplace records were just cleared, so it can\n // proceed to the connector record + home-bin).\n if (directTargets.length > 0) {\n results.push(\n await uninstallConnector({\n connectorId,\n scope,\n projectDir,\n dryRun,\n purge: values.purge,\n targets: directTargets,\n }),\n );\n } else if (values.purge) {\n const purgeResult: InstallResult = {\n connectorId,\n dryRun,\n changes: [],\n warnings: [],\n };\n if (dryRun) {\n // On a real run the marketplace records are removed BEFORE this purge;\n // calling purgeFrameworkState now would false-refuse on records that the\n // marketplace pass only PLANNED to remove. Report the plan instead.\n purgeResult.changes.push({\n platform: connectorId as PlatformId,\n action: \"remove\",\n detail:\n \"would purge framework state (connector record; home-bin when no connectors remain)\",\n });\n } else {\n purgeFrameworkState(connectorId, dryRun, purgeResult);\n }\n results.push(purgeResult);\n }\n\n const merged: InstallResult = {\n connectorId,\n dryRun,\n changes: results.flatMap((r) => r.changes),\n warnings: results.flatMap((r) => r.warnings),\n };\n print(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
|
import "./chunk-G5CQHVQG.js";
|
|
10
10
|
import {
|
|
11
11
|
fail,
|
|
@@ -13,17 +13,20 @@ import {
|
|
|
13
13
|
parseTargets,
|
|
14
14
|
print,
|
|
15
15
|
renderInstallResult
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-O5TWCIJN.js";
|
|
17
|
+
import "./chunk-F5RX62T7.js";
|
|
18
|
+
import "./chunk-EGCBZ2DC.js";
|
|
19
|
+
import "./chunk-KHO5WNTP.js";
|
|
19
20
|
import {
|
|
20
21
|
findConnectorConfig,
|
|
21
22
|
loadConnectorFromPath
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-24IDL5RW.js";
|
|
24
|
+
import "./chunk-4ENJK5S2.js";
|
|
25
|
+
import "./chunk-DCKFYWGM.js";
|
|
26
|
+
import "./chunk-FAHIMJRU.js";
|
|
24
27
|
import "./chunk-OPXAP3AC.js";
|
|
25
28
|
import "./chunk-7L6ITC4T.js";
|
|
26
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-I5MLE6S7.js";
|
|
27
30
|
import "./chunk-N6HH7K6P.js";
|
|
28
31
|
import {
|
|
29
32
|
ensureHomeBin,
|
|
@@ -120,4 +123,4 @@ Refreshed home binary pointer: ${binPath}`);
|
|
|
120
123
|
export {
|
|
121
124
|
run
|
|
122
125
|
};
|
|
123
|
-
//# sourceMappingURL=upgrade-
|
|
126
|
+
//# sourceMappingURL=upgrade-4LUEEOZW.js.map
|