@ken-jo/agent-connector 0.3.1 → 0.4.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/README.md +178 -14
- package/dist/action-PLZW5BGX.js +54 -0
- package/dist/action-PLZW5BGX.js.map +1 -0
- package/dist/{amp-YGV66GJT.js → amp-B524U6LO.js} +81 -5
- package/dist/amp-B524U6LO.js.map +1 -0
- package/dist/{antigravity-7IBYFO6P.js → antigravity-ANDKF3K7.js} +4 -4
- package/dist/{antigravity-cli-JEOUP2VN.js → antigravity-cli-LLRPDDOT.js} +4 -4
- package/dist/chunk-22Y24V7O.js +21 -0
- package/dist/chunk-22Y24V7O.js.map +1 -0
- package/dist/chunk-3PFFTFCU.js +190 -0
- package/dist/chunk-3PFFTFCU.js.map +1 -0
- package/dist/{chunk-SCVBYSF7.js → chunk-6XHB6BE3.js} +1 -1
- package/dist/chunk-76FUSVIA.js +43 -0
- package/dist/chunk-76FUSVIA.js.map +1 -0
- package/dist/{chunk-GSGDG2BV.js → chunk-ADTHT2FN.js} +109 -16
- package/dist/chunk-ADTHT2FN.js.map +1 -0
- package/dist/{chunk-ZAM4M7LI.js → chunk-BHUCB6LY.js} +135 -296
- package/dist/chunk-BHUCB6LY.js.map +1 -0
- package/dist/{chunk-MEH7GC7R.js → chunk-BXGFUENQ.js} +20 -3
- package/dist/chunk-BXGFUENQ.js.map +1 -0
- package/dist/chunk-CIRDOY2V.js +351 -0
- package/dist/chunk-CIRDOY2V.js.map +1 -0
- package/dist/{chunk-KMAKDD3Z.js → chunk-G3ER4SY5.js} +37 -12
- package/dist/chunk-G3ER4SY5.js.map +1 -0
- package/dist/{chunk-PD4VFEBY.js → chunk-IW77FFNX.js} +39 -1
- package/dist/chunk-IW77FFNX.js.map +1 -0
- package/dist/chunk-J3D5W5T2.js +83 -0
- package/dist/chunk-J3D5W5T2.js.map +1 -0
- package/dist/{openclaw-UZ5BMCGQ.js → chunk-KGGBNKI4.js} +125 -33
- package/dist/chunk-KGGBNKI4.js.map +1 -0
- package/dist/{chunk-3JCRUROU.js → chunk-KGJWE6A2.js} +13 -4
- package/dist/chunk-KGJWE6A2.js.map +1 -0
- package/dist/{chunk-3RBLIHPZ.js → chunk-KGXDYGNJ.js} +26 -16
- package/dist/chunk-KGXDYGNJ.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-LL4OBGRU.js} +3 -3
- package/dist/{chunk-WNREHWKL.js → chunk-MAH6QQTO.js} +3 -3
- package/dist/{claude-code-4275HQU4.js → claude-code-MLWS7CW6.js} +180 -28
- package/dist/claude-code-MLWS7CW6.js.map +1 -0
- package/dist/cli/sdk.js +4 -3
- package/dist/cli/sdk.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/{codebuff-LE3KBZGM.js → codebuff-SH2S3QAN.js} +102 -5
- package/dist/codebuff-SH2S3QAN.js.map +1 -0
- package/dist/{codex-4BY2ZJIW.js → codex-BXA4FIF4.js} +3 -3
- package/dist/{copilot-cli-IPISKO3V.js → copilot-cli-ROIBTTDT.js} +3 -3
- package/dist/{crush-X3E25EQG.js → crush-QLEFLHUC.js} +3 -3
- package/dist/{cursor-UH3W622V.js → cursor-ASJPWZ4R.js} +6 -3
- package/dist/cursor-ASJPWZ4R.js.map +1 -0
- package/dist/{detect-U3E7NVNW.js → detect-ZIIS55LD.js} +4 -3
- package/dist/{detect-U3E7NVNW.js.map → detect-ZIIS55LD.js.map} +1 -1
- package/dist/{doctor-DZTWED4O.js → doctor-TJUGSQ5C.js} +16 -12
- package/dist/doctor-TJUGSQ5C.js.map +1 -0
- package/dist/{droid-T5VBRXZF.js → droid-NCSS3B5Y.js} +170 -4
- package/dist/droid-NCSS3B5Y.js.map +1 -0
- package/dist/{gemini-cli-ZSUK55UA.js → gemini-cli-SLVWLXJW.js} +3 -3
- package/dist/{goose-M3RR3CZG.js → goose-PBA7KTE5.js} +100 -5
- package/dist/goose-PBA7KTE5.js.map +1 -0
- package/dist/{hermes-CUNKIAR5.js → hermes-ONDCECP2.js} +3 -3
- package/dist/{hook-EVY7LOUQ.js → hook-OU522ABV.js} +12 -9
- package/dist/{hook-EVY7LOUQ.js.map → hook-OU522ABV.js.map} +1 -1
- package/dist/index.d.ts +71 -3
- package/dist/index.js +22 -3
- package/dist/{install-OWAS5UIE.js → install-UDCBL7HP.js} +11 -9
- package/dist/{install-OWAS5UIE.js.map → install-UDCBL7HP.js.map} +1 -1
- package/dist/introspect-DuZSPSHB.d.ts +53 -0
- package/dist/{jetbrains-copilot-C3HDGGML.js → jetbrains-copilot-YABZ3HFA.js} +3 -3
- package/dist/{kilo-PKAJCWPX.js → kilo-F3ZDZKCT.js} +3 -3
- package/dist/{kilo-cli-QWUVXG2O.js → kilo-cli-3HWPWBY4.js} +3 -3
- package/dist/{kimi-EVD7YKXS.js → kimi-NV72FVAO.js} +3 -3
- package/dist/{kiro-UQRY6EIO.js → kiro-C5W6AGDR.js} +3 -3
- package/dist/{leaderboard-CSWHI4UY.js → leaderboard-TIBVONVT.js} +3 -3
- package/dist/mimo-code-IMM5YM3M.js +754 -0
- package/dist/mimo-code-IMM5YM3M.js.map +1 -0
- package/dist/{mux-5CI5FP2W.js → mux-DSSH4AFS.js} +3 -3
- package/dist/nemoclaw-3EVNKD3I.js +58 -0
- package/dist/nemoclaw-3EVNKD3I.js.map +1 -0
- package/dist/{omp-AXA7XY22.js → omp-Z6FRNDPN.js} +3 -3
- package/dist/openclaw-7G437NT7.js +18 -0
- package/dist/openclaw-7G437NT7.js.map +1 -0
- package/dist/{opencode-NZBRLJN3.js → opencode-Q6KBSAKW.js} +3 -3
- package/dist/{package-WFOS4QVU.js → package-RMPN57YZ.js} +7 -6
- package/dist/{package-WFOS4QVU.js.map → package-RMPN57YZ.js.map} +1 -1
- package/dist/{pi-WMTUX6ES.js → pi-LZT6WWAZ.js} +2 -2
- package/dist/{qwen-code-MRRIUQ3P.js → qwen-code-WQBKRPWJ.js} +3 -3
- package/dist/{roo-code-NI5UU6JB.js → roo-code-GWSNU3OW.js} +137 -4
- package/dist/roo-code-GWSNU3OW.js.map +1 -0
- package/dist/runtime/index.d.ts +96 -2
- package/dist/runtime/index.js +18 -10
- package/dist/sdk/index.d.ts +52 -0
- package/dist/sdk/index.js +81 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/test.d.ts +74 -0
- package/dist/sdk/test.js +291 -0
- package/dist/sdk/test.js.map +1 -0
- package/dist/{serve-3C2VFPAY.js → serve-D3GO36UT.js} +12 -9
- package/dist/{serve-3C2VFPAY.js.map → serve-D3GO36UT.js.map} +1 -1
- package/dist/{status-MKQYX5MW.js → status-KOSKCETC.js} +9 -7
- package/dist/{status-MKQYX5MW.js.map → status-KOSKCETC.js.map} +1 -1
- package/dist/statusline-ZNTCL5YC.js +59 -0
- package/dist/statusline-ZNTCL5YC.js.map +1 -0
- package/dist/{telemetry-3DN6XGYB.js → telemetry-XIKUUGTQ.js} +5 -4
- package/dist/{telemetry-3DN6XGYB.js.map → telemetry-XIKUUGTQ.js.map} +1 -1
- package/dist/{trae-CQC72RHH.js → trae-NWT3TMSZ.js} +99 -5
- package/dist/trae-NWT3TMSZ.js.map +1 -0
- package/dist/{types-CNigfEuR.d.ts → types-BEKsAium.d.ts} +268 -6
- package/dist/{uninstall-WG6PFWF3.js → uninstall-2LBLQVFA.js} +11 -9
- package/dist/{uninstall-WG6PFWF3.js.map → uninstall-2LBLQVFA.js.map} +1 -1
- package/dist/{upgrade-32NC2RKI.js → upgrade-ZC2S7VRN.js} +11 -9
- package/dist/{upgrade-32NC2RKI.js.map → upgrade-ZC2S7VRN.js.map} +1 -1
- package/dist/{usage-CJOM2WQM.js → usage-E2A4O2CY.js} +3 -3
- package/dist/{usage-event-472X3DOY.js → usage-event-JKMC4QC4.js} +11 -8
- package/dist/{usage-event-472X3DOY.js.map → usage-event-JKMC4QC4.js.map} +1 -1
- package/dist/{vscode-copilot-4RVRTCKV.js → vscode-copilot-ALV45XF6.js} +3 -3
- package/dist/{warp-X6MB67NT.js → warp-H6IX4U3J.js} +3 -3
- package/dist/{zed-NTCYW4V2.js → zed-RH34TNSW.js} +3 -3
- package/package.json +9 -1
- 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-ZAM4M7LI.js.map +0 -1
- package/dist/claude-code-4275HQU4.js.map +0 -1
- package/dist/codebuff-LE3KBZGM.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/goose-M3RR3CZG.js.map +0 -1
- package/dist/openclaw-UZ5BMCGQ.js.map +0 -1
- package/dist/roo-code-NI5UU6JB.js.map +0 -1
- package/dist/trae-CQC72RHH.js.map +0 -1
- /package/dist/{antigravity-7IBYFO6P.js.map → antigravity-ANDKF3K7.js.map} +0 -0
- /package/dist/{antigravity-cli-JEOUP2VN.js.map → antigravity-cli-LLRPDDOT.js.map} +0 -0
- /package/dist/{chunk-SCVBYSF7.js.map → chunk-6XHB6BE3.js.map} +0 -0
- /package/dist/{chunk-KQSNDFBN.js.map → chunk-LL4OBGRU.js.map} +0 -0
- /package/dist/{chunk-WNREHWKL.js.map → chunk-MAH6QQTO.js.map} +0 -0
- /package/dist/{codex-4BY2ZJIW.js.map → codex-BXA4FIF4.js.map} +0 -0
- /package/dist/{copilot-cli-IPISKO3V.js.map → copilot-cli-ROIBTTDT.js.map} +0 -0
- /package/dist/{crush-X3E25EQG.js.map → crush-QLEFLHUC.js.map} +0 -0
- /package/dist/{gemini-cli-ZSUK55UA.js.map → gemini-cli-SLVWLXJW.js.map} +0 -0
- /package/dist/{hermes-CUNKIAR5.js.map → hermes-ONDCECP2.js.map} +0 -0
- /package/dist/{jetbrains-copilot-C3HDGGML.js.map → jetbrains-copilot-YABZ3HFA.js.map} +0 -0
- /package/dist/{kilo-PKAJCWPX.js.map → kilo-F3ZDZKCT.js.map} +0 -0
- /package/dist/{kilo-cli-QWUVXG2O.js.map → kilo-cli-3HWPWBY4.js.map} +0 -0
- /package/dist/{kimi-EVD7YKXS.js.map → kimi-NV72FVAO.js.map} +0 -0
- /package/dist/{kiro-UQRY6EIO.js.map → kiro-C5W6AGDR.js.map} +0 -0
- /package/dist/{leaderboard-CSWHI4UY.js.map → leaderboard-TIBVONVT.js.map} +0 -0
- /package/dist/{mux-5CI5FP2W.js.map → mux-DSSH4AFS.js.map} +0 -0
- /package/dist/{omp-AXA7XY22.js.map → omp-Z6FRNDPN.js.map} +0 -0
- /package/dist/{opencode-NZBRLJN3.js.map → opencode-Q6KBSAKW.js.map} +0 -0
- /package/dist/{pi-WMTUX6ES.js.map → pi-LZT6WWAZ.js.map} +0 -0
- /package/dist/{qwen-code-MRRIUQ3P.js.map → qwen-code-WQBKRPWJ.js.map} +0 -0
- /package/dist/{usage-CJOM2WQM.js.map → usage-E2A4O2CY.js.map} +0 -0
- /package/dist/{vscode-copilot-4RVRTCKV.js.map → vscode-copilot-ALV45XF6.js.map} +0 -0
- /package/dist/{warp-X6MB67NT.js.map → warp-H6IX4U3J.js.map} +0 -0
- /package/dist/{zed-NTCYW4V2.js.map → zed-RH34TNSW.js.map} +0 -0
|
@@ -23,7 +23,7 @@
|
|
|
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" | "trae" | "amp" | "codebuff" | "mux" | "crush" | "goose" | "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
|
|
@@ -33,9 +33,10 @@ type PlatformId = "claude-code" | "codex" | "cursor" | "vscode-copilot" | "jetbr
|
|
|
33
33
|
* Copilot, Copilot CLI, Gemini CLI, Qwen, Kiro, Kimi, Crush, Goose, Hermes,
|
|
34
34
|
* Droid (Factory), Antigravity (+ the agy CLI). One universal entrypoint
|
|
35
35
|
* binary handles all of them.
|
|
36
|
-
* - "ts-plugin" (
|
|
37
|
-
* — OpenCode, Kilo CLI, OMP, OpenClaw
|
|
38
|
-
*
|
|
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" (8): no hook layer at all — Warp, Roo Code, Trae, Zed,
|
|
39
40
|
* Amp, Codebuff, Mux, Pi. Only the MCP server (or skills surface) is
|
|
40
41
|
* installed; hooks are reported unavailable.
|
|
41
42
|
*/
|
|
@@ -104,6 +105,17 @@ interface BaseEvent {
|
|
|
104
105
|
projectDir?: string;
|
|
105
106
|
/** Raw host-specific payload for passthrough/escape-hatch use. */
|
|
106
107
|
raw: unknown;
|
|
108
|
+
/**
|
|
109
|
+
* What the host can honor (the adapter's capability flags). OPTIONAL on the
|
|
110
|
+
* TYPE so adapters' parseEvent (which has no capabilities at parse time) need
|
|
111
|
+
* no change, but the runtime ALWAYS populates it before the handler runs — so
|
|
112
|
+
* a hook handler can rely on evt.capabilities being present at runtime.
|
|
113
|
+
*/
|
|
114
|
+
capabilities?: PlatformCapabilities;
|
|
115
|
+
/** Install scope, when recovered from the registered metadata (else undefined). */
|
|
116
|
+
scope?: InstallScope;
|
|
117
|
+
/** Async accessor to this connector's own telemetry usage (see HostCtx.telemetry). */
|
|
118
|
+
telemetry?: TelemetryAccessor;
|
|
107
119
|
}
|
|
108
120
|
interface PreToolUseEvent extends BaseEvent {
|
|
109
121
|
toolName: string;
|
|
@@ -257,6 +269,23 @@ interface HookDefinition<E extends HookEventName = HookEventName> {
|
|
|
257
269
|
*/
|
|
258
270
|
matcher?: string;
|
|
259
271
|
handler(event: EventPayloadMap[E]): HookResponse | void | Promise<HookResponse | void>;
|
|
272
|
+
/**
|
|
273
|
+
* Per-host handler override. When dispatching for host X, `hosts[X].handler`
|
|
274
|
+
* WINS over the top-level `handler`; a host not listed here falls back to the
|
|
275
|
+
* top-level handler. Keys MUST be registered platform ids and each entry's
|
|
276
|
+
* handler MUST be a function (validated at defineConnector). The runtime
|
|
277
|
+
* selection preserves fail-open: a missing/invalid per-host entry simply falls
|
|
278
|
+
* back to the top-level handler — selection never throws.
|
|
279
|
+
*
|
|
280
|
+
* The top-level `handler` is ALWAYS required, even when every host is
|
|
281
|
+
* overridden — it is the mandatory fallback (a `hosts`-only definition is a
|
|
282
|
+
* ConnectorConfigError). A per-host handler SHARES the top-level `matcher`
|
|
283
|
+
* (there is no per-host matcher); the matcher is evaluated before per-host
|
|
284
|
+
* selection, so a non-matching subject suppresses the per-host handler too.
|
|
285
|
+
*/
|
|
286
|
+
hosts?: Partial<Record<PlatformId, {
|
|
287
|
+
handler: HookDefinition<E>["handler"];
|
|
288
|
+
}>>;
|
|
260
289
|
}
|
|
261
290
|
/** Developer-declared hooks, keyed by canonical event name. */
|
|
262
291
|
interface HooksConfig {
|
|
@@ -280,6 +309,12 @@ interface HooksConfig {
|
|
|
280
309
|
* own contract (e.g. Claude's snake_case `task_id` / `teammate_name` fields)
|
|
281
310
|
* with full native fidelity.
|
|
282
311
|
*/
|
|
312
|
+
/**
|
|
313
|
+
* Native passthrough hook event. NOTE: unlike a normalized {@link BaseEvent},
|
|
314
|
+
* this deliberately does NOT carry the HostCtx trio (capabilities / scope /
|
|
315
|
+
* telemetry) — native hooks are a raw-envelope passthrough, so the handler
|
|
316
|
+
* receives only the verbatim payload below.
|
|
317
|
+
*/
|
|
283
318
|
interface NativeHookEvent {
|
|
284
319
|
/** Host-native event name, VERBATIM (e.g. "TaskCreated", "WorktreeRemove"). */
|
|
285
320
|
event: string;
|
|
@@ -440,6 +475,28 @@ interface PlatformCapabilities {
|
|
|
440
475
|
* per-adapter `memoryTargets()` hook.
|
|
441
476
|
*/
|
|
442
477
|
supportsMemory?: boolean;
|
|
478
|
+
/**
|
|
479
|
+
* Statusline-surface support (a HUD/status line wired at the single home
|
|
480
|
+
* binary). OPTIONAL, read as `?? false` (supportsMemory precedent). Only
|
|
481
|
+
* statusline-supporting adapters set this true; the BaseAdapter
|
|
482
|
+
* install/uninstall defaults skip-warn regardless of the flag (v1:
|
|
483
|
+
* claude-code only). Unlike the content surfaces this is a runtime-dispatched
|
|
484
|
+
* handler — the supporting adapter wires the host's status line at
|
|
485
|
+
* `<homeBin> statusline <host> --connector <id>`.
|
|
486
|
+
*/
|
|
487
|
+
supportsStatusline?: boolean;
|
|
488
|
+
/**
|
|
489
|
+
* Action-surface support — can this adapter EMIT a host affordance (slash
|
|
490
|
+
* command / keybinding / clickable element) bound to the universal
|
|
491
|
+
* `<homeBin> action <host> <actionId> --connector <id>` verb? OPTIONAL, read
|
|
492
|
+
* as `?? false` (supportsStatusline precedent). v1 ships only the dispatch
|
|
493
|
+
* BACKBONE — no adapter sets this true, because the host-feasibility survey
|
|
494
|
+
* found no verifiable CLI emission target (slash commands are prompt
|
|
495
|
+
* templates that cannot run a shell verb; plugin APIs expose no command
|
|
496
|
+
* registration). It is the flag a future affordance-emitter flips; until then
|
|
497
|
+
* every adapter's BaseAdapter install/uninstall defaults honestly skip-warn.
|
|
498
|
+
*/
|
|
499
|
+
supportsActions?: boolean;
|
|
443
500
|
}
|
|
444
501
|
/** Tool access expressed once; adapters render to allowed-tools / tools[] / readonly. */
|
|
445
502
|
interface SurfaceToolPolicy {
|
|
@@ -499,7 +556,7 @@ interface SubagentDef {
|
|
|
499
556
|
* writes it as a MANAGED BLOCK (marker-fenced, hash-stamped,
|
|
500
557
|
* uninstall-reversible — see core/managed-block.ts) into the memory/rules file
|
|
501
558
|
* that host actually reads: AGENTS.md wherever the host supports the agents.md
|
|
502
|
-
* standard (
|
|
559
|
+
* standard (29/31 hosts), the host's own file (CLAUDE.md / GEMINI.md)
|
|
503
560
|
* otherwise. CONTENT-ONLY like commands/skills/subagents: no runtime dispatch,
|
|
504
561
|
* no telemetry wrapping — a pure, surgical file edit that never touches bytes
|
|
505
562
|
* outside its own marker pair.
|
|
@@ -525,6 +582,163 @@ interface MemoryDef {
|
|
|
525
582
|
*/
|
|
526
583
|
content: string;
|
|
527
584
|
}
|
|
585
|
+
/**
|
|
586
|
+
* Shared context for handler surfaces. v1: {@link StatuslineContext} extends it
|
|
587
|
+
* (render sees host + capabilities). Hook payloads (the normalized
|
|
588
|
+
* {@link EventPayloadMap} events) keep their existing shape for now and adopt
|
|
589
|
+
* HostCtx in a later phase (lower blast radius — they carry `hostPlatform` +
|
|
590
|
+
* `connectorId` + per-event fields already, and changing the runtime hook
|
|
591
|
+
* payload shape is a wider change than this statusline-only unification).
|
|
592
|
+
*/
|
|
593
|
+
interface HostCtx {
|
|
594
|
+
/** Which host is running this handler. */
|
|
595
|
+
host: PlatformId;
|
|
596
|
+
/** What this host can actually honor (the adapter's capability flags). */
|
|
597
|
+
capabilities: PlatformCapabilities;
|
|
598
|
+
/**
|
|
599
|
+
* Install scope, when known. OPTIONAL: scope is an install-time property the
|
|
600
|
+
* runtime recovers from the connector's registered metadata
|
|
601
|
+
* (`readRegisteredMeta(connectorId)?.scope`) and stamps onto the ctx, so it is
|
|
602
|
+
* now POPULATED when the meta carries it. It is still undefined for an
|
|
603
|
+
* unregistered / ad-hoc connector (no meta) or one registered before scope was
|
|
604
|
+
* persisted — branch on `host` + `capabilities` when scope may be absent.
|
|
605
|
+
* CAVEAT: the persisted scope is the install's RUN-WIDE DEFAULT scope; it may
|
|
606
|
+
* differ from the EFFECTIVE per-host scope when the connector set a
|
|
607
|
+
* `platforms[host].scope` override (the single registry record is keyed by
|
|
608
|
+
* connector id only, so it cannot hold a per-host scope). Treat it as the
|
|
609
|
+
* default, not a guaranteed per-host truth.
|
|
610
|
+
*/
|
|
611
|
+
scope?: InstallScope;
|
|
612
|
+
/** Project directory, when the host reports it. */
|
|
613
|
+
projectDir?: string;
|
|
614
|
+
/** Host session id, when the host reports it. */
|
|
615
|
+
sessionId?: string;
|
|
616
|
+
/**
|
|
617
|
+
* Async accessor to THIS connector's own telemetry usage (token sums + call
|
|
618
|
+
* count). ASYNC (reads the store); resolves empty zeros when
|
|
619
|
+
* AGENT_CONNECTOR_TELEMETRY=0; NEVER throws (returns zeros on any read error).
|
|
620
|
+
* Stamped by the runtime entrypoint, so a handler reads it via
|
|
621
|
+
* `await ctx.telemetry?.()`. Undefined only in contexts that do not build it.
|
|
622
|
+
*/
|
|
623
|
+
telemetry?: TelemetryAccessor;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Normalized context handed to {@link StatuslineDef.render}. Extends the shared
|
|
627
|
+
* {@link HostCtx} (so render sees `host` + `capabilities` + the optional
|
|
628
|
+
* scope/projectDir/sessionId) and adds the statusline-specific fields. Each
|
|
629
|
+
* adapter's `parseStatusInput` maps the host's verbatim status payload into this
|
|
630
|
+
* shape, filling only the fields that host exposes. `raw` is the untouched host
|
|
631
|
+
* payload (the escape hatch for fields not modeled here).
|
|
632
|
+
*/
|
|
633
|
+
interface StatuslineContext extends HostCtx {
|
|
634
|
+
/**
|
|
635
|
+
* Connector id this status line is dispatched for (stamped by the runtime,
|
|
636
|
+
* NOT by the adapter). Kept on StatuslineContext rather than HostCtx: it is a
|
|
637
|
+
* runtime-dispatch detail, and HostCtx is meant to describe the HOST, not the
|
|
638
|
+
* connector being dispatched.
|
|
639
|
+
*/
|
|
640
|
+
connectorId?: string;
|
|
641
|
+
/** Working directory the host reports for this session. */
|
|
642
|
+
cwd?: string;
|
|
643
|
+
/** Active model, when the host reports it. */
|
|
644
|
+
model?: {
|
|
645
|
+
id?: string;
|
|
646
|
+
displayName?: string;
|
|
647
|
+
};
|
|
648
|
+
/** Running cost, when the host reports it. */
|
|
649
|
+
cost?: {
|
|
650
|
+
totalUsd?: number;
|
|
651
|
+
};
|
|
652
|
+
/** Context-window usage, when the host reports it. */
|
|
653
|
+
context?: {
|
|
654
|
+
usedTokens?: number;
|
|
655
|
+
maxTokens?: number;
|
|
656
|
+
percent?: number;
|
|
657
|
+
};
|
|
658
|
+
/** Path to the session transcript, when the host reports one. */
|
|
659
|
+
transcriptPath?: string;
|
|
660
|
+
/** The host's verbatim status payload (escape hatch). */
|
|
661
|
+
raw: unknown;
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* A connector's status line ("HUD"): a single handler that renders the line
|
|
665
|
+
* text from the normalized {@link StatuslineContext}. The handler lives in the
|
|
666
|
+
* connector module and is re-imported at runtime (like hook handlers), so it
|
|
667
|
+
* must survive defineConnector resolution as a live function.
|
|
668
|
+
*
|
|
669
|
+
* v1 returns a plain string (no Segment[] yet — a future enhancement). Adapters
|
|
670
|
+
* with {@link PlatformCapabilities.supportsStatusline} wire the host's status
|
|
671
|
+
* line at the single home binary (`<homeBin> statusline <host> --connector
|
|
672
|
+
* <id>`); every other adapter reports the standard skip-warn.
|
|
673
|
+
*/
|
|
674
|
+
interface StatuslineDef {
|
|
675
|
+
/**
|
|
676
|
+
* kebab-case id; default "statusline". Stable identifier surfaced in
|
|
677
|
+
* status/docs output (the status line is singular, so it is not used as a
|
|
678
|
+
* marker key like memory names — but it stays kebab-case for consistency).
|
|
679
|
+
*/
|
|
680
|
+
name?: string;
|
|
681
|
+
/** One-line "what this status line shows" — status/docs output only. */
|
|
682
|
+
description?: string;
|
|
683
|
+
/**
|
|
684
|
+
* Renderer. Receives the normalized context; returns the status line text.
|
|
685
|
+
* Re-imported at runtime via the connector module path (like hook handlers).
|
|
686
|
+
*/
|
|
687
|
+
render: (ctx: StatuslineContext) => string | Promise<string>;
|
|
688
|
+
/**
|
|
689
|
+
* Per-host render override. When rendering for host X, `hosts[X].render` WINS
|
|
690
|
+
* over the top-level `render`; a host not listed here falls back to the
|
|
691
|
+
* top-level render. Keys MUST be registered platform ids and each entry's
|
|
692
|
+
* render MUST be a function (validated at defineConnector). The runtime
|
|
693
|
+
* selection preserves fail-safe: a missing/invalid per-host entry simply falls
|
|
694
|
+
* back to the top-level render — selection never throws.
|
|
695
|
+
*
|
|
696
|
+
* The top-level `render` is ALWAYS required, even when every host is
|
|
697
|
+
* overridden — it is the mandatory fallback (a `hosts`-only definition is a
|
|
698
|
+
* ConnectorConfigError). A `hosts` entry targeting a host that has no
|
|
699
|
+
* statusline surface is inert (the runtime no-ops it), exactly as the surface
|
|
700
|
+
* itself skip-warns there.
|
|
701
|
+
*/
|
|
702
|
+
hosts?: Partial<Record<PlatformId, {
|
|
703
|
+
render: StatuslineDef["render"];
|
|
704
|
+
}>>;
|
|
705
|
+
}
|
|
706
|
+
/** What an action's run() returns. v1 minimal: an optional user-facing message. */
|
|
707
|
+
interface ActionResult {
|
|
708
|
+
message?: string;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* A user-invokable action: an id + a run(ctx) handler. The connector binds it to
|
|
712
|
+
* a host affordance (slash command / keybinding) in a LATER phase; v1 ships the
|
|
713
|
+
* dispatch backbone (the `agent-connector action` verb runs run(ctx)). run
|
|
714
|
+
* receives the shared {@link HostCtx} (host + capabilities; no stdin — an action
|
|
715
|
+
* takes no host payload, unlike a hook or status line). The handler lives in the
|
|
716
|
+
* connector module and is re-imported at runtime (like hook handlers /
|
|
717
|
+
* statusline.render), so it must survive defineConnector resolution as a live
|
|
718
|
+
* function.
|
|
719
|
+
*/
|
|
720
|
+
interface ActionDef {
|
|
721
|
+
/** kebab-case id; unique within the connector. The verb's positional arg. */
|
|
722
|
+
id: string;
|
|
723
|
+
/** One-line "what this action does" — status/docs output only. */
|
|
724
|
+
description?: string;
|
|
725
|
+
/**
|
|
726
|
+
* The action handler. Receives the normalized {@link HostCtx}; an optional
|
|
727
|
+
* {@link ActionResult} return prints its `message` to the user. Re-imported at
|
|
728
|
+
* runtime via the connector module path (like hook handlers).
|
|
729
|
+
*/
|
|
730
|
+
run: (ctx: HostCtx) => ActionResult | void | Promise<ActionResult | void>;
|
|
731
|
+
/**
|
|
732
|
+
* Per-host run override. When dispatching for host X, `hosts[X].run` WINS over
|
|
733
|
+
* the top-level `run`; a host not listed here falls back to the top-level run.
|
|
734
|
+
* Same shape/semantics as {@link StatuslineDef.hosts}: keys MUST be registered
|
|
735
|
+
* platform ids and each entry's run MUST be a function (validated at
|
|
736
|
+
* defineConnector). The top-level `run` is ALWAYS the mandatory fallback.
|
|
737
|
+
*/
|
|
738
|
+
hosts?: Partial<Record<PlatformId, {
|
|
739
|
+
run: ActionDef["run"];
|
|
740
|
+
}>>;
|
|
741
|
+
}
|
|
528
742
|
/** Per-host memory tuning — the object form of {@link PlatformOverride.memory}. */
|
|
529
743
|
interface PlatformMemoryOverride {
|
|
530
744
|
/**
|
|
@@ -547,6 +761,25 @@ interface PlatformMemoryOverride {
|
|
|
547
761
|
*/
|
|
548
762
|
mode?: "block" | "agents-import";
|
|
549
763
|
}
|
|
764
|
+
/**
|
|
765
|
+
* A handler-facing rollup of THIS connector's own recorded telemetry usage —
|
|
766
|
+
* the sum of every stored row for the connector (inputTokens/outputTokens) plus
|
|
767
|
+
* the row count (`calls`). Aggregate counts only; no raw content (mirrors the
|
|
768
|
+
* {@link ToolEventRecord} contract). Exposed via {@link HostCtx.telemetry}.
|
|
769
|
+
*/
|
|
770
|
+
interface TelemetryUsageSummary {
|
|
771
|
+
inputTokens: number;
|
|
772
|
+
outputTokens: number;
|
|
773
|
+
totalTokens: number;
|
|
774
|
+
calls: number;
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Async accessor a handler calls to read its connector's own telemetry usage.
|
|
778
|
+
* ASYNC (it reads the store). Returns empty zeros when AGENT_CONNECTOR_TELEMETRY=0,
|
|
779
|
+
* and NEVER throws (any read error resolves to zeros) — a handler can always
|
|
780
|
+
* `await ctx.telemetry?.()` without a try/catch.
|
|
781
|
+
*/
|
|
782
|
+
type TelemetryAccessor = () => Promise<TelemetryUsageSummary>;
|
|
550
783
|
interface TelemetryConfig {
|
|
551
784
|
/** On by default. Global kill switch also via AGENT_CONNECTOR_TELEMETRY=0. */
|
|
552
785
|
enabled?: boolean;
|
|
@@ -624,6 +857,8 @@ interface PlatformOverride {
|
|
|
624
857
|
* object → per-host target/mode tuning ({@link PlatformMemoryOverride}).
|
|
625
858
|
*/
|
|
626
859
|
memory?: boolean | PlatformMemoryOverride;
|
|
860
|
+
/** false → do not wire the status line on this platform (no object form in v1). */
|
|
861
|
+
statusline?: boolean;
|
|
627
862
|
/** Verbatim fields merged into the native config (reach platform-exclusive features). */
|
|
628
863
|
extra?: Record<string, unknown>;
|
|
629
864
|
}
|
|
@@ -685,6 +920,18 @@ interface ConnectorConfig {
|
|
|
685
920
|
* memory/rules file (AGENTS.md-first). Omit when the connector ships none.
|
|
686
921
|
*/
|
|
687
922
|
memory?: MemoryDef[];
|
|
923
|
+
/**
|
|
924
|
+
* The connector's status line (a HUD). SINGULAR — a connector renders ONE
|
|
925
|
+
* status line. Omit when the connector ships none.
|
|
926
|
+
*/
|
|
927
|
+
statusline?: StatuslineDef;
|
|
928
|
+
/**
|
|
929
|
+
* User-invokable actions (each an id + run(ctx) handler the universal
|
|
930
|
+
* `agent-connector action` verb dispatches). Omit when the connector ships
|
|
931
|
+
* none. The host-affordance binding is a later phase; v1 ships the dispatch
|
|
932
|
+
* backbone only.
|
|
933
|
+
*/
|
|
934
|
+
actions?: ActionDef[];
|
|
688
935
|
/** Per-platform overrides / escape hatches. */
|
|
689
936
|
platforms?: Partial<Record<PlatformId, PlatformOverride>>;
|
|
690
937
|
/** "auto" (all detected) or an explicit allow-list. Default "auto". */
|
|
@@ -716,6 +963,21 @@ interface ResolvedConnector {
|
|
|
716
963
|
subagents: SubagentDef[];
|
|
717
964
|
/** Normalized memory entries; names defaulted ("memory"); [] when none. */
|
|
718
965
|
memory: MemoryDef[];
|
|
966
|
+
/**
|
|
967
|
+
* Normalized status line (a HUD); name defaulted ("statusline"). Undefined
|
|
968
|
+
* when the connector declares none. SINGULAR (not an array) — see
|
|
969
|
+
* {@link StatuslineDef}. Carries the live `render` handler, so it survives
|
|
970
|
+
* defineConnector but NOT JSON serialization (re-imported at runtime, like
|
|
971
|
+
* hook handlers).
|
|
972
|
+
*/
|
|
973
|
+
statusline?: StatuslineDef;
|
|
974
|
+
/**
|
|
975
|
+
* Normalized actions (each id defaulted/validated kebab-case + unique); [] when
|
|
976
|
+
* none. Carries the live `run` handlers, so it survives defineConnector but NOT
|
|
977
|
+
* JSON serialization (re-imported at runtime, like hook handlers / the
|
|
978
|
+
* statusline render).
|
|
979
|
+
*/
|
|
980
|
+
actions: ActionDef[];
|
|
719
981
|
platforms: Partial<Record<PlatformId, PlatformOverride>>;
|
|
720
982
|
targets: "auto" | PlatformId[];
|
|
721
983
|
/** Distribution metadata (registry server.json + MCPB bundle); passed through verbatim. */
|
|
@@ -754,4 +1016,4 @@ interface DiagnosticResult {
|
|
|
754
1016
|
fix?: string;
|
|
755
1017
|
}
|
|
756
1018
|
|
|
757
|
-
export type {
|
|
1019
|
+
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-G3ER4SY5.js";
|
|
9
|
+
import "./chunk-MAH6QQTO.js";
|
|
10
10
|
import {
|
|
11
11
|
marketplaceEvidence,
|
|
12
12
|
readMarketplaceInstalls
|
|
@@ -17,17 +17,19 @@ import {
|
|
|
17
17
|
parseTargets,
|
|
18
18
|
print,
|
|
19
19
|
renderInstallResult
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-KGXDYGNJ.js";
|
|
21
|
+
import "./chunk-22Y24V7O.js";
|
|
22
|
+
import "./chunk-J3D5W5T2.js";
|
|
23
|
+
import "./chunk-KHO5WNTP.js";
|
|
23
24
|
import {
|
|
24
25
|
findConnectorConfig,
|
|
25
26
|
loadConnectorFromPath
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-KGJWE6A2.js";
|
|
28
|
+
import "./chunk-ADTHT2FN.js";
|
|
29
|
+
import "./chunk-3PFFTFCU.js";
|
|
28
30
|
import "./chunk-OPXAP3AC.js";
|
|
29
31
|
import "./chunk-7L6ITC4T.js";
|
|
30
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-BXGFUENQ.js";
|
|
31
33
|
import "./chunk-N6HH7K6P.js";
|
|
32
34
|
import "./chunk-TRQKHP7D.js";
|
|
33
35
|
|
|
@@ -159,4 +161,4 @@ async function run(argv) {
|
|
|
159
161
|
export {
|
|
160
162
|
run
|
|
161
163
|
};
|
|
162
|
-
//# sourceMappingURL=uninstall-
|
|
164
|
+
//# sourceMappingURL=uninstall-2LBLQVFA.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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B,aAAa,QAAQ,WAAW;AAAA,IACtD;AACA,YAAQ,KAAK,WAAW;AAAA,EAC1B;AAEA,QAAM,SAAwB;AAAA,IAC5B;AAAA,IACA;AAAA,IACA,SAAS,QAAQ,QAAQ,CAAC,MAAM,EAAE,OAAO;AAAA,IACzC,UAAU,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(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;AAAA,IAC3C;AAAA,IACA,kBAAkB;AAAA,EACpB,CAAC;AAED,QAAM,SAAS,qBAAqB,OAAO,MAAM;AACjD,MAAI,UAAU,MAAM;AAClB,WAAO,KAAK,qBAAqB,OAAO,MAAM,iCAAiC;AAAA,EACjF;AAEA,QAAM,aAAa,OAAO,WAAW,QAAQ,IAAI;AAEjD,QAAM,Q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
resolveCliEntry,
|
|
5
5
|
syncConnector,
|
|
6
6
|
upgradeViaMarketplace
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-G3ER4SY5.js";
|
|
8
|
+
import "./chunk-MAH6QQTO.js";
|
|
9
9
|
import "./chunk-G5CQHVQG.js";
|
|
10
10
|
import {
|
|
11
11
|
fail,
|
|
@@ -13,17 +13,19 @@ import {
|
|
|
13
13
|
parseTargets,
|
|
14
14
|
print,
|
|
15
15
|
renderInstallResult
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-KGXDYGNJ.js";
|
|
17
|
+
import "./chunk-22Y24V7O.js";
|
|
18
|
+
import "./chunk-J3D5W5T2.js";
|
|
19
|
+
import "./chunk-KHO5WNTP.js";
|
|
19
20
|
import {
|
|
20
21
|
findConnectorConfig,
|
|
21
22
|
loadConnectorFromPath
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-KGJWE6A2.js";
|
|
24
|
+
import "./chunk-ADTHT2FN.js";
|
|
25
|
+
import "./chunk-3PFFTFCU.js";
|
|
24
26
|
import "./chunk-OPXAP3AC.js";
|
|
25
27
|
import "./chunk-7L6ITC4T.js";
|
|
26
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-BXGFUENQ.js";
|
|
27
29
|
import "./chunk-N6HH7K6P.js";
|
|
28
30
|
import {
|
|
29
31
|
ensureHomeBin,
|
|
@@ -120,4 +122,4 @@ Refreshed home binary pointer: ${binPath}`);
|
|
|
120
122
|
export {
|
|
121
123
|
run
|
|
122
124
|
};
|
|
123
|
-
//# sourceMappingURL=upgrade-
|
|
125
|
+
//# sourceMappingURL=upgrade-ZC2S7VRN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/commands/upgrade.ts"],"sourcesContent":["/**\n * cli/commands/upgrade — bring an agent-connector install current.\n *\n * `upgrade` (aliases: `update`, `sync`) consolidates the two former verbs into\n * ONE the way npm/brew pair `install` + `upgrade`, so there is a single verb to\n * learn for \"make everything current\". It:\n *\n * 1. re-renders the connector's config into every target host idempotently\n * (identical entries report \"skip\"), exactly like the old `sync` — this is\n * also the self-heal path: run `upgrade` to repair a drifted install; then\n * 2. refreshes the stable home-bin pointer and prints managed (never-silent)\n * update guidance for the chosen channel, exactly like the old `update`.\n *\n * When no connector config is resolvable it still does step 2, so `upgrade`\n * works as a pure tool-refresh from anywhere. By design agent-connector NEVER\n * silently auto-updates (docs/ARCHITECTURE.md §3 R1).\n */\n\nimport { parseArgs } from \"node:util\";\n\nimport { resolveCliEntry, syncConnector } from \"../../core/installer.js\";\nimport { parseInstallMethod, upgradeViaMarketplace } from \"../../core/marketplace.js\";\nimport { findConnectorConfig, loadConnectorFromPath } from \"../../core/load-connector.js\";\nimport { ensureHomeBin, homeBinPath } from \"../../core/paths.js\";\nimport { fail, parseScope, parseTargets, print, renderInstallResult } from \"../app.js\";\n\ntype Channel = \"stable\" | \"latest\";\n\n/** Heuristic: does the running CLI live under an npm-style node_modules tree? */\nfunction looksNpmManaged(): boolean {\n const entry = resolveCliEntry().replace(/\\\\/g, \"/\");\n return entry.includes(\"/node_modules/\");\n}\n\nexport async function run(argv: string[]): Promise<number> {\n const { values } = parseArgs({\n args: argv,\n options: {\n channel: { type: \"string\", default: \"stable\" },\n method: { type: \"string\", default: \"direct\" },\n scope: { type: \"string\", default: \"user\" },\n targets: { type: \"string\" },\n connector: { type: \"string\" },\n project: { type: \"string\" },\n \"dry-run\": { type: \"boolean\", default: false },\n },\n allowPositionals: false,\n });\n\n const channel = values.channel;\n if (channel !== \"stable\" && channel !== \"latest\") {\n return fail(`invalid --channel \"${channel}\" (use stable|latest)`);\n }\n const ch: Channel = channel;\n\n const method = parseInstallMethod(values.method);\n if (method == null) {\n return fail(`invalid --method \"${values.method}\" (use direct|marketplace)`);\n }\n\n const scope = parseScope(values.scope);\n if (scope == null) return fail(`invalid --scope \"${values.scope}\" (use user|project)`);\n if (method === \"marketplace\" && scope !== \"user\") {\n return fail(\n \"--method marketplace supports --scope user only (project-scope plugin installs are deferred)\",\n );\n }\n\n let hadWarn = false;\n\n // ── Step 1: bring the connector's deploys current (former `sync`):\n // direct — idempotent re-render into every target host.\n // marketplace — re-stage the bundle + catalog in place, then drive the\n // host's update verb (claude `plugin update`, with a recorded\n // uninstall+install fallback); warns when connector.version is\n // unchanged since the recorded install (Claude caches a\n // versioned copy, so a same-version update silently no-ops).\n const projectDir = values.project ?? process.cwd();\n const configPath = values.connector ?? findConnectorConfig(projectDir);\n if (configPath) {\n const { connector, modulePath } = await loadConnectorFromPath(configPath);\n const targets = parseTargets(values.targets);\n const opts = {\n connector,\n modulePath,\n scope,\n projectDir,\n dryRun: values[\"dry-run\"],\n ...(targets ? { targets } : {}),\n };\n const result =\n method === \"marketplace\"\n ? await upgradeViaMarketplace(opts)\n : await syncConnector(opts);\n print(renderInstallResult(result, \"upgrade\"));\n if (result.changes.some((c) => c.action === \"warn\")) hadWarn = true;\n print(\"\");\n } else {\n print(\"upgrade: no connector config found — refreshing the tool only.\");\n print(\n \"(pass --connector <path> or run inside a project to also re-render host config.)\\n\",\n );\n }\n\n // ── Step 2: managed update guidance + home-bin pointer refresh (former `update`). ──\n print(\"agent-connector uses managed (explicit) updates — never silent\");\n print(\"auto-update — so one bad release can't break every project at once.\\n\");\n\n const dist = ch === \"stable\" ? \"latest\" : \"next\";\n if (looksNpmManaged()) {\n print(`To update the ${ch} channel, run:`);\n print(` npm i -g @ken-jo/agent-connector@${dist}`);\n } else {\n print(\n `This install does not look npm-managed. Update it the way you installed it,`,\n );\n print(`then re-run \\`agent-connector upgrade\\` to refresh the home pointer.`);\n print(`(npm installs would use: npm i -g @ken-jo/agent-connector@${dist})`);\n }\n\n // Refresh the stable home-bin pointer so hosts keep execing a working CLI.\n if (!values[\"dry-run\"]) {\n try {\n const binPath = ensureHomeBin(resolveCliEntry());\n print(`\\nRefreshed home binary pointer: ${binPath}`);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n print(`\\n[warn] could not refresh home binary at ${homeBinPath()}: ${message}`);\n return 1;\n }\n }\n\n return hadWarn ? 1 : 0;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/cli/commands/upgrade.ts"],"sourcesContent":["/**\n * cli/commands/upgrade — bring an agent-connector install current.\n *\n * `upgrade` (aliases: `update`, `sync`) consolidates the two former verbs into\n * ONE the way npm/brew pair `install` + `upgrade`, so there is a single verb to\n * learn for \"make everything current\". It:\n *\n * 1. re-renders the connector's config into every target host idempotently\n * (identical entries report \"skip\"), exactly like the old `sync` — this is\n * also the self-heal path: run `upgrade` to repair a drifted install; then\n * 2. refreshes the stable home-bin pointer and prints managed (never-silent)\n * update guidance for the chosen channel, exactly like the old `update`.\n *\n * When no connector config is resolvable it still does step 2, so `upgrade`\n * works as a pure tool-refresh from anywhere. By design agent-connector NEVER\n * silently auto-updates (docs/ARCHITECTURE.md §3 R1).\n */\n\nimport { parseArgs } from \"node:util\";\n\nimport { resolveCliEntry, syncConnector } from \"../../core/installer.js\";\nimport { parseInstallMethod, upgradeViaMarketplace } from \"../../core/marketplace.js\";\nimport { findConnectorConfig, loadConnectorFromPath } from \"../../core/load-connector.js\";\nimport { ensureHomeBin, homeBinPath } from \"../../core/paths.js\";\nimport { fail, parseScope, parseTargets, print, renderInstallResult } from \"../app.js\";\n\ntype Channel = \"stable\" | \"latest\";\n\n/** Heuristic: does the running CLI live under an npm-style node_modules tree? */\nfunction looksNpmManaged(): boolean {\n const entry = resolveCliEntry().replace(/\\\\/g, \"/\");\n return entry.includes(\"/node_modules/\");\n}\n\nexport async function run(argv: string[]): Promise<number> {\n const { values } = parseArgs({\n args: argv,\n options: {\n channel: { type: \"string\", default: \"stable\" },\n method: { type: \"string\", default: \"direct\" },\n scope: { type: \"string\", default: \"user\" },\n targets: { type: \"string\" },\n connector: { type: \"string\" },\n project: { type: \"string\" },\n \"dry-run\": { type: \"boolean\", default: false },\n },\n allowPositionals: false,\n });\n\n const channel = values.channel;\n if (channel !== \"stable\" && channel !== \"latest\") {\n return fail(`invalid --channel \"${channel}\" (use stable|latest)`);\n }\n const ch: Channel = channel;\n\n const method = parseInstallMethod(values.method);\n if (method == null) {\n return fail(`invalid --method \"${values.method}\" (use direct|marketplace)`);\n }\n\n const scope = parseScope(values.scope);\n if (scope == null) return fail(`invalid --scope \"${values.scope}\" (use user|project)`);\n if (method === \"marketplace\" && scope !== \"user\") {\n return fail(\n \"--method marketplace supports --scope user only (project-scope plugin installs are deferred)\",\n );\n }\n\n let hadWarn = false;\n\n // ── Step 1: bring the connector's deploys current (former `sync`):\n // direct — idempotent re-render into every target host.\n // marketplace — re-stage the bundle + catalog in place, then drive the\n // host's update verb (claude `plugin update`, with a recorded\n // uninstall+install fallback); warns when connector.version is\n // unchanged since the recorded install (Claude caches a\n // versioned copy, so a same-version update silently no-ops).\n const projectDir = values.project ?? process.cwd();\n const configPath = values.connector ?? findConnectorConfig(projectDir);\n if (configPath) {\n const { connector, modulePath } = await loadConnectorFromPath(configPath);\n const targets = parseTargets(values.targets);\n const opts = {\n connector,\n modulePath,\n scope,\n projectDir,\n dryRun: values[\"dry-run\"],\n ...(targets ? { targets } : {}),\n };\n const result =\n method === \"marketplace\"\n ? await upgradeViaMarketplace(opts)\n : await syncConnector(opts);\n print(renderInstallResult(result, \"upgrade\"));\n if (result.changes.some((c) => c.action === \"warn\")) hadWarn = true;\n print(\"\");\n } else {\n print(\"upgrade: no connector config found — refreshing the tool only.\");\n print(\n \"(pass --connector <path> or run inside a project to also re-render host config.)\\n\",\n );\n }\n\n // ── Step 2: managed update guidance + home-bin pointer refresh (former `update`). ──\n print(\"agent-connector uses managed (explicit) updates — never silent\");\n print(\"auto-update — so one bad release can't break every project at once.\\n\");\n\n const dist = ch === \"stable\" ? \"latest\" : \"next\";\n if (looksNpmManaged()) {\n print(`To update the ${ch} channel, run:`);\n print(` npm i -g @ken-jo/agent-connector@${dist}`);\n } else {\n print(\n `This install does not look npm-managed. Update it the way you installed it,`,\n );\n print(`then re-run \\`agent-connector upgrade\\` to refresh the home pointer.`);\n print(`(npm installs would use: npm i -g @ken-jo/agent-connector@${dist})`);\n }\n\n // Refresh the stable home-bin pointer so hosts keep execing a working CLI.\n if (!values[\"dry-run\"]) {\n try {\n const binPath = ensureHomeBin(resolveCliEntry());\n print(`\\nRefreshed home binary pointer: ${binPath}`);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n print(`\\n[warn] could not refresh home binary at ${homeBinPath()}: ${message}`);\n return 1;\n }\n }\n\n return hadWarn ? 1 : 0;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,SAAS,iBAAiB;AAW1B,SAAS,kBAA2B;AAClC,QAAM,QAAQ,gBAAgB,EAAE,QAAQ,OAAO,GAAG;AAClD,SAAO,MAAM,SAAS,gBAAgB;AACxC;AAEA,eAAsB,IAAI,MAAiC;AACzD,QAAM,EAAE,OAAO,IAAI,UAAU;AAAA,IAC3B,MAAM;AAAA,IACN,SAAS;AAAA,MACP,SAAS,EAAE,MAAM,UAAU,SAAS,SAAS;AAAA,MAC7C,QAAQ,EAAE,MAAM,UAAU,SAAS,SAAS;AAAA,MAC5C,OAAO,EAAE,MAAM,UAAU,SAAS,OAAO;AAAA,MACzC,SAAS,EAAE,MAAM,SAAS;AAAA,MAC1B,WAAW,EAAE,MAAM,SAAS;AAAA,MAC5B,SAAS,EAAE,MAAM,SAAS;AAAA,MAC1B,WAAW,EAAE,MAAM,WAAW,SAAS,MAAM;AAAA,IAC/C;AAAA,IACA,kBAAkB;AAAA,EACpB,CAAC;AAED,QAAM,UAAU,OAAO;AACvB,MAAI,YAAY,YAAY,YAAY,UAAU;AAChD,WAAO,KAAK,sBAAsB,OAAO,uBAAuB;AAAA,EAClE;AACA,QAAM,KAAc;AAEpB,QAAM,SAAS,mBAAmB,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CAAC,OAAO,SAAS,GAAG;AACtB,QAAI;AACF,YAAM,UAAU,cAAc,gBAAgB,CAAC;AAC/C,YAAM;AAAA,iCAAoC,OAAO,EAAE;AAAA,IACrD,SAAS,KAAK;AACZ,YAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC/D,YAAM;AAAA,0CAA6C,YAAY,CAAC,KAAK,OAAO,EAAE;AAC9E,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,UAAU,IAAI;AACvB;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
formatHostLeaderboard,
|
|
4
4
|
hostLeaderboard,
|
|
5
5
|
scanUsage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6XHB6BE3.js";
|
|
7
7
|
import {
|
|
8
8
|
aggregateBy,
|
|
9
9
|
sumTokens
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
fail,
|
|
13
13
|
print
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KGXDYGNJ.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/usage.ts
|
|
17
17
|
import { writeFileSync } from "fs";
|
|
@@ -321,4 +321,4 @@ export {
|
|
|
321
321
|
parseSince,
|
|
322
322
|
run
|
|
323
323
|
};
|
|
324
|
-
//# sourceMappingURL=usage-
|
|
324
|
+
//# sourceMappingURL=usage-E2A4O2CY.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runUsageEvent
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-BCHWFTV4.js";
|
|
4
|
+
} from "./chunk-BHUCB6LY.js";
|
|
6
5
|
import "./chunk-OP4KBXUO.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-22Y24V7O.js";
|
|
7
|
+
import "./chunk-J3D5W5T2.js";
|
|
8
|
+
import "./chunk-CIRDOY2V.js";
|
|
9
|
+
import "./chunk-BCHWFTV4.js";
|
|
10
|
+
import "./chunk-KHO5WNTP.js";
|
|
11
|
+
import "./chunk-KGJWE6A2.js";
|
|
12
|
+
import "./chunk-ADTHT2FN.js";
|
|
13
|
+
import "./chunk-3PFFTFCU.js";
|
|
14
|
+
import "./chunk-BXGFUENQ.js";
|
|
12
15
|
import "./chunk-N6HH7K6P.js";
|
|
13
16
|
import "./chunk-TRQKHP7D.js";
|
|
14
17
|
|
|
@@ -46,4 +49,4 @@ async function run(argv) {
|
|
|
46
49
|
export {
|
|
47
50
|
run
|
|
48
51
|
};
|
|
49
|
-
//# sourceMappingURL=usage-event-
|
|
52
|
+
//# sourceMappingURL=usage-event-JKMC4QC4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/commands/usage-event.ts"],"sourcesContent":["/**\n * cli/commands/usage-event — the HIDDEN host-native turn-usage entrypoint (4a).\n *\n * agent-connector usage-event <platform> --connector <id>\n *\n * An OPT-IN AfterModel / PostInvocation hook (installed by the Gemini / Antigravity\n * adapters only when host-native usage is enabled) points here. It reads the ENTIRE\n * host payload from stdin, hands it to {@link runUsageEvent}, and ALWAYS exits 0 —\n * a host-native usage hook must never block a model turn. Hidden (not in the help\n * text) and intentionally a peer of `hook` so it mirrors the same plumbing.\n *\n * Fail-open is the contract: runUsageEvent never throws; on any parse/store error\n * it records nothing and we still exit 0.\n */\n\nimport { parseArgs } from \"node:util\";\n\nimport { runUsageEvent } from \"../../runtime/index.js\";\n\n/** Read all of a readable stream to a UTF-8 string. */\nasync function readAll(stream: NodeJS.ReadStream): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of stream) {\n chunks.push(typeof chunk === \"string\" ? Buffer.from(chunk) : chunk);\n }\n return Buffer.concat(chunks).toString(\"utf8\");\n}\n\nexport async function run(argv: string[]): Promise<number> {\n // strict:false so a future flag from a newer install can never make this throw\n // and surface a non-zero exit into the host's model turn.\n let platformId = \"\";\n let connectorId = \"\";\n try {\n const { values, positionals } = parseArgs({\n args: argv,\n options: { connector: { type: \"string\" } },\n allowPositionals: true,\n strict: false,\n });\n platformId = positionals[0] ?? \"\";\n connectorId = typeof values.connector === \"string\" ? values.connector : \"\";\n } catch {\n // A malformed invocation must still fail-open (record nothing, exit 0).\n return 0;\n }\n\n // Drain stdin regardless — a host expects the hook command to consume its\n // payload. A missing platform/connector simply records nothing.\n const stdin = await readAll(process.stdin).catch(() => \"\");\n\n if (platformId === \"\" || connectorId === \"\") {\n return 0;\n }\n\n const result = await runUsageEvent({ platformId, connectorId, stdin });\n return result.exitCode;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/cli/commands/usage-event.ts"],"sourcesContent":["/**\n * cli/commands/usage-event — the HIDDEN host-native turn-usage entrypoint (4a).\n *\n * agent-connector usage-event <platform> --connector <id>\n *\n * An OPT-IN AfterModel / PostInvocation hook (installed by the Gemini / Antigravity\n * adapters only when host-native usage is enabled) points here. It reads the ENTIRE\n * host payload from stdin, hands it to {@link runUsageEvent}, and ALWAYS exits 0 —\n * a host-native usage hook must never block a model turn. Hidden (not in the help\n * text) and intentionally a peer of `hook` so it mirrors the same plumbing.\n *\n * Fail-open is the contract: runUsageEvent never throws; on any parse/store error\n * it records nothing and we still exit 0.\n */\n\nimport { parseArgs } from \"node:util\";\n\nimport { runUsageEvent } from \"../../runtime/index.js\";\n\n/** Read all of a readable stream to a UTF-8 string. */\nasync function readAll(stream: NodeJS.ReadStream): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of stream) {\n chunks.push(typeof chunk === \"string\" ? Buffer.from(chunk) : chunk);\n }\n return Buffer.concat(chunks).toString(\"utf8\");\n}\n\nexport async function run(argv: string[]): Promise<number> {\n // strict:false so a future flag from a newer install can never make this throw\n // and surface a non-zero exit into the host's model turn.\n let platformId = \"\";\n let connectorId = \"\";\n try {\n const { values, positionals } = parseArgs({\n args: argv,\n options: { connector: { type: \"string\" } },\n allowPositionals: true,\n strict: false,\n });\n platformId = positionals[0] ?? \"\";\n connectorId = typeof values.connector === \"string\" ? values.connector : \"\";\n } catch {\n // A malformed invocation must still fail-open (record nothing, exit 0).\n return 0;\n }\n\n // Drain stdin regardless — a host expects the hook command to consume its\n // payload. A missing platform/connector simply records nothing.\n const stdin = await readAll(process.stdin).catch(() => \"\");\n\n if (platformId === \"\" || connectorId === \"\") {\n return 0;\n }\n\n const result = await runUsageEvent({ platformId, connectorId, stdin });\n return result.exitCode;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAeA,SAAS,iBAAiB;AAK1B,eAAe,QAAQ,QAA4C;AACjE,QAAM,SAAmB,CAAC;AAC1B,mBAAiB,SAAS,QAAQ;AAChC,WAAO,KAAK,OAAO,UAAU,WAAW,OAAO,KAAK,KAAK,IAAI,KAAK;AAAA,EACpE;AACA,SAAO,OAAO,OAAO,MAAM,EAAE,SAAS,MAAM;AAC9C;AAEA,eAAsB,IAAI,MAAiC;AAGzD,MAAI,aAAa;AACjB,MAAI,cAAc;AAClB,MAAI;AACF,UAAM,EAAE,QAAQ,YAAY,IAAI,UAAU;AAAA,MACxC,MAAM;AAAA,MACN,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,EAAE;AAAA,MACzC,kBAAkB;AAAA,MAClB,QAAQ;AAAA,IACV,CAAC;AACD,iBAAa,YAAY,CAAC,KAAK;AAC/B,kBAAc,OAAO,OAAO,cAAc,WAAW,OAAO,YAAY;AAAA,EAC1E,QAAQ;AAEN,WAAO;AAAA,EACT;AAIA,QAAM,QAAQ,MAAM,QAAQ,QAAQ,KAAK,EAAE,MAAM,MAAM,EAAE;AAEzD,MAAI,eAAe,MAAM,gBAAgB,IAAI;AAC3C,WAAO;AAAA,EACT;AAEA,QAAM,SAAS,MAAM,cAAc,EAAE,YAAY,aAAa,MAAM,CAAC;AACrE,SAAO,OAAO;AAChB;","names":[]}
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-DBQMX75U.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseAdapter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IW77FFNX.js";
|
|
8
8
|
import "./chunk-7L6ITC4T.js";
|
|
9
9
|
import {
|
|
10
10
|
buildHomeBinHookCommand,
|
|
11
11
|
buildServeWrapperCommand,
|
|
12
12
|
isHomeBinHookCommand,
|
|
13
13
|
shouldWrapForTelemetry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BXGFUENQ.js";
|
|
15
15
|
import "./chunk-N6HH7K6P.js";
|
|
16
16
|
import "./chunk-TRQKHP7D.js";
|
|
17
17
|
|
|
@@ -761,4 +761,4 @@ export {
|
|
|
761
761
|
adapter,
|
|
762
762
|
vscode_copilot_default as default
|
|
763
763
|
};
|
|
764
|
-
//# sourceMappingURL=vscode-copilot-
|
|
764
|
+
//# sourceMappingURL=vscode-copilot-ALV45XF6.js.map
|