@ken-jo/agent-connector 0.5.0 → 0.6.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.
Files changed (116) hide show
  1. package/README.md +3 -3
  2. package/dist/{action-LEYTHNIU.js → action-EKK6FMPY.js} +8 -8
  3. package/dist/{audit-HPKCUCES.js → audit-H7PQWIVH.js} +5 -5
  4. package/dist/{chunk-BXPSDNIB.js → chunk-34RRWEWU.js} +2 -2
  5. package/dist/{chunk-SFY6YLVK.js → chunk-4YOYR3T5.js} +5 -6
  6. package/dist/{chunk-SFY6YLVK.js.map → chunk-4YOYR3T5.js.map} +1 -1
  7. package/dist/{chunk-6WN37NVN.js → chunk-6FRAVOVF.js} +2 -2
  8. package/dist/{chunk-2Y2MZRLP.js → chunk-CWUPIT72.js} +2 -2
  9. package/dist/{chunk-6XMV2OOA.js → chunk-CZOXXS77.js} +3 -3
  10. package/dist/{chunk-IRUYJD23.js → chunk-IVJUPNLD.js} +2 -8
  11. package/dist/chunk-IVJUPNLD.js.map +1 -0
  12. package/dist/{chunk-FKW5A6HE.js → chunk-IY3SSCNK.js} +4 -4
  13. package/dist/{chunk-U2XJWG7N.js → chunk-JUBEM3OR.js} +2 -2
  14. package/dist/{chunk-UM5S7DKK.js → chunk-KOFCNA5T.js} +11 -2
  15. package/dist/{chunk-UM5S7DKK.js.map → chunk-KOFCNA5T.js.map} +1 -1
  16. package/dist/{chunk-4KIXXJ7B.js → chunk-KY2VQGD7.js} +2 -2
  17. package/dist/{chunk-M6OS4OLU.js → chunk-R4FABNAL.js} +2 -2
  18. package/dist/{chunk-T5AI3AW3.js → chunk-SA6CSOH5.js} +19 -19
  19. package/dist/{chunk-G5HAIYRM.js → chunk-XJSVJD5T.js} +37 -29
  20. package/dist/chunk-XJSVJD5T.js.map +1 -0
  21. package/dist/{chunk-WZMSSIDN.js → chunk-XSR3GF55.js} +14 -6
  22. package/dist/chunk-XSR3GF55.js.map +1 -0
  23. package/dist/{claude-code-LJ6DVXWQ.js → claude-code-VEERATN5.js} +4 -4
  24. package/dist/cli/sdk.js +4 -4
  25. package/dist/cli.js +1 -1
  26. package/dist/{cline-JAPJNOZQ.js → cline-UW6WCQRK.js} +2 -2
  27. package/dist/cline-UW6WCQRK.js.map +1 -0
  28. package/dist/{codebuff-3VODFPD4.js → codebuff-R7QBLCSJ.js} +11 -11
  29. package/dist/codebuff-R7QBLCSJ.js.map +1 -0
  30. package/dist/{codex-RXIS5BHM.js → codex-S2RADR5K.js} +2 -2
  31. package/dist/{crush-YB3SK6NK.js → crush-AJNQRFVE.js} +2 -2
  32. package/dist/{define-connector-odRHEC4H.d.ts → define-connector-iosc34CA.d.ts} +1 -1
  33. package/dist/{detect-USP5JMWM.js → detect-ZC344YOJ.js} +4 -4
  34. package/dist/{doctor-VSW5KHBM.js → doctor-ABYQF2YX.js} +13 -13
  35. package/dist/{goose-3X7ID7YW.js → goose-SXFRT7UF.js} +2 -2
  36. package/dist/grok-build-EP2ZUFXZ.js +682 -0
  37. package/dist/grok-build-EP2ZUFXZ.js.map +1 -0
  38. package/dist/{grok-cli-4VFVF2CQ.js → grok-cli-UUNPOUYY.js} +4 -3
  39. package/dist/grok-cli-UUNPOUYY.js.map +1 -0
  40. package/dist/{hook-QRW3ON6C.js → hook-M3KQSEO3.js} +8 -8
  41. package/dist/index.d.ts +3 -3
  42. package/dist/index.js +2 -2
  43. package/dist/{install-ASTAUZKB.js → install-4X4JDKGY.js} +10 -10
  44. package/dist/{introspect-gTx6GzpW.d.ts → introspect-z3eKVWHN.d.ts} +1 -1
  45. package/dist/{kilo-SW7BH6EG.js → kilo-FVBFSS4Y.js} +1 -1
  46. package/dist/kilo-FVBFSS4Y.js.map +1 -0
  47. package/dist/{kilo-T4OXNUYY.js → kilo-N5T6KXAG.js} +2 -2
  48. package/dist/{kilo-cli-I2S3W245.js → kilo-cli-JOAEWYI4.js} +2 -2
  49. package/dist/{leaderboard-3XSVSGAJ.js → leaderboard-Q4YZ3LI7.js} +3 -3
  50. package/dist/{mux-BO2L5CTW.js → mux-WSZWWZOX.js} +27 -21
  51. package/dist/mux-WSZWWZOX.js.map +1 -0
  52. package/dist/{package-VWBPHCLA.js → package-FY2QZWRM.js} +6 -6
  53. package/dist/runtime/index.d.ts +1 -1
  54. package/dist/runtime/index.js +6 -6
  55. package/dist/sdk/index.d.ts +4 -4
  56. package/dist/sdk/index.js +3 -3
  57. package/dist/sdk/test.d.ts +2 -2
  58. package/dist/sdk/test.js +6 -6
  59. package/dist/{serve-IQGHE4SJ.js → serve-XT76DWUN.js} +8 -8
  60. package/dist/{status-BVLY6XDL.js → status-DHVWBRLI.js} +8 -8
  61. package/dist/{statusline-PRODZV2J.js → statusline-SY5UBQOJ.js} +7 -7
  62. package/dist/{telemetry-UU4SHJ23.js → telemetry-TJIFAKWX.js} +5 -5
  63. package/dist/{types-DWXnnx-N.d.ts → types-CAKApZpX.d.ts} +4 -4
  64. package/dist/{uninstall-WI5YLDCT.js → uninstall-VQO36IQ4.js} +10 -10
  65. package/dist/{upgrade-L45BTG6X.js → upgrade-QEYZOA7S.js} +10 -10
  66. package/dist/{usage-K3NQTAJP.js → usage-LV7UGO64.js} +3 -3
  67. package/dist/{usage-event-J5CQ6LNT.js → usage-event-MQMKMK2R.js} +7 -7
  68. package/dist/{windsurf-R6D2JUTN.js → windsurf-ZWVFNJ73.js} +1 -1
  69. package/dist/windsurf-ZWVFNJ73.js.map +1 -0
  70. package/dist/{zed-DQV3ZUCU.js → zed-JCOKXOLA.js} +2 -2
  71. package/package.json +1 -1
  72. package/dist/chunk-G5HAIYRM.js.map +0 -1
  73. package/dist/chunk-IRUYJD23.js.map +0 -1
  74. package/dist/chunk-WZMSSIDN.js.map +0 -1
  75. package/dist/cline-JAPJNOZQ.js.map +0 -1
  76. package/dist/codebuff-3VODFPD4.js.map +0 -1
  77. package/dist/grok-cli-4VFVF2CQ.js.map +0 -1
  78. package/dist/kilo-SW7BH6EG.js.map +0 -1
  79. package/dist/mux-BO2L5CTW.js.map +0 -1
  80. package/dist/roo-code-SUWI4BBN.js +0 -229
  81. package/dist/roo-code-SUWI4BBN.js.map +0 -1
  82. package/dist/roo-code-VI2ZKTZC.js +0 -361
  83. package/dist/roo-code-VI2ZKTZC.js.map +0 -1
  84. package/dist/windsurf-R6D2JUTN.js.map +0 -1
  85. /package/dist/{action-LEYTHNIU.js.map → action-EKK6FMPY.js.map} +0 -0
  86. /package/dist/{audit-HPKCUCES.js.map → audit-H7PQWIVH.js.map} +0 -0
  87. /package/dist/{chunk-BXPSDNIB.js.map → chunk-34RRWEWU.js.map} +0 -0
  88. /package/dist/{chunk-6WN37NVN.js.map → chunk-6FRAVOVF.js.map} +0 -0
  89. /package/dist/{chunk-2Y2MZRLP.js.map → chunk-CWUPIT72.js.map} +0 -0
  90. /package/dist/{chunk-6XMV2OOA.js.map → chunk-CZOXXS77.js.map} +0 -0
  91. /package/dist/{chunk-FKW5A6HE.js.map → chunk-IY3SSCNK.js.map} +0 -0
  92. /package/dist/{chunk-U2XJWG7N.js.map → chunk-JUBEM3OR.js.map} +0 -0
  93. /package/dist/{chunk-4KIXXJ7B.js.map → chunk-KY2VQGD7.js.map} +0 -0
  94. /package/dist/{chunk-M6OS4OLU.js.map → chunk-R4FABNAL.js.map} +0 -0
  95. /package/dist/{chunk-T5AI3AW3.js.map → chunk-SA6CSOH5.js.map} +0 -0
  96. /package/dist/{claude-code-LJ6DVXWQ.js.map → claude-code-VEERATN5.js.map} +0 -0
  97. /package/dist/{codex-RXIS5BHM.js.map → codex-S2RADR5K.js.map} +0 -0
  98. /package/dist/{crush-YB3SK6NK.js.map → crush-AJNQRFVE.js.map} +0 -0
  99. /package/dist/{detect-USP5JMWM.js.map → detect-ZC344YOJ.js.map} +0 -0
  100. /package/dist/{doctor-VSW5KHBM.js.map → doctor-ABYQF2YX.js.map} +0 -0
  101. /package/dist/{goose-3X7ID7YW.js.map → goose-SXFRT7UF.js.map} +0 -0
  102. /package/dist/{hook-QRW3ON6C.js.map → hook-M3KQSEO3.js.map} +0 -0
  103. /package/dist/{install-ASTAUZKB.js.map → install-4X4JDKGY.js.map} +0 -0
  104. /package/dist/{kilo-T4OXNUYY.js.map → kilo-N5T6KXAG.js.map} +0 -0
  105. /package/dist/{kilo-cli-I2S3W245.js.map → kilo-cli-JOAEWYI4.js.map} +0 -0
  106. /package/dist/{leaderboard-3XSVSGAJ.js.map → leaderboard-Q4YZ3LI7.js.map} +0 -0
  107. /package/dist/{package-VWBPHCLA.js.map → package-FY2QZWRM.js.map} +0 -0
  108. /package/dist/{serve-IQGHE4SJ.js.map → serve-XT76DWUN.js.map} +0 -0
  109. /package/dist/{status-BVLY6XDL.js.map → status-DHVWBRLI.js.map} +0 -0
  110. /package/dist/{statusline-PRODZV2J.js.map → statusline-SY5UBQOJ.js.map} +0 -0
  111. /package/dist/{telemetry-UU4SHJ23.js.map → telemetry-TJIFAKWX.js.map} +0 -0
  112. /package/dist/{uninstall-WI5YLDCT.js.map → uninstall-VQO36IQ4.js.map} +0 -0
  113. /package/dist/{upgrade-L45BTG6X.js.map → upgrade-QEYZOA7S.js.map} +0 -0
  114. /package/dist/{usage-K3NQTAJP.js.map → usage-LV7UGO64.js.map} +0 -0
  115. /package/dist/{usage-event-J5CQ6LNT.js.map → usage-event-MQMKMK2R.js.map} +0 -0
  116. /package/dist/{zed-DQV3ZUCU.js.map → zed-JCOKXOLA.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/usage/registry.ts","../src/usage/scan.ts","../src/usage/leaderboard.ts"],"sourcesContent":["/**\n * usage/registry — the single source of truth for HOST usage readers.\n *\n * Mirrors adapters/registry.ts: each platform is ONE entry with a lazy `load()`\n * thunk resolving the reader module's default export. Adding a platform is a\n * single new entry here plus one `readers/<id>.ts` file — `getUsageReader` /\n * `allUsageReaders` and the scan orchestrator all derive from this list.\n *\n * `format` and `kind` are declared on the factory so the scan layer can describe\n * a reader (e.g. note a \"synced\" reader as skipped) without importing it.\n */\n\nimport type { PlatformId } from \"../core/types.js\";\nimport type { UsageReader, UsageReaderFactory } from \"./types.js\";\n\n/**\n * Authoritative list of usage readers. To add a platform: drop\n * `src/usage/readers/<id>.ts` (default-exporting a {@link UsageReader}) and add\n * one entry below.\n */\nexport const USAGE_READER_REGISTRY: readonly UsageReaderFactory[] = [\n // U1 — JSONL readers\n {\n platformId: \"claude-code\",\n format: \"jsonl\",\n kind: \"local\",\n load: () => import(\"./readers/claude-code.js\").then((m) => m.default),\n },\n {\n platformId: \"codex\",\n format: \"jsonl\",\n kind: \"local\",\n load: () => import(\"./readers/codex.js\").then((m) => m.default),\n },\n {\n platformId: \"gemini-cli\",\n format: \"jsonl\",\n kind: \"local\",\n load: () => import(\"./readers/gemini-cli.js\").then((m) => m.default),\n },\n {\n platformId: \"qwen-code\",\n format: \"jsonl\",\n kind: \"local\",\n load: () => import(\"./readers/qwen-code.js\").then((m) => m.default),\n },\n {\n platformId: \"copilot-cli\",\n format: \"jsonl\",\n kind: \"local\",\n load: () => import(\"./readers/copilot-cli.js\").then((m) => m.default),\n },\n {\n platformId: \"pi\",\n format: \"jsonl\",\n kind: \"local\",\n load: () => import(\"./readers/pi.js\").then((m) => m.default),\n },\n {\n platformId: \"kimi\",\n format: \"jsonl\",\n kind: \"local\",\n load: () => import(\"./readers/kimi.js\").then((m) => m.default),\n },\n {\n platformId: \"openclaw\",\n format: \"jsonl\",\n kind: \"local\",\n load: () => import(\"./readers/openclaw.js\").then((m) => m.default),\n },\n // U2 — JSON readers\n {\n platformId: \"amp\",\n format: \"json\",\n kind: \"local\",\n load: () => import(\"./readers/amp.js\").then((m) => m.default),\n },\n {\n platformId: \"droid\",\n format: \"json\",\n kind: \"local\",\n load: () => import(\"./readers/droid.js\").then((m) => m.default),\n },\n {\n platformId: \"codebuff\",\n format: \"json\",\n kind: \"local\",\n load: () => import(\"./readers/codebuff.js\").then((m) => m.default),\n },\n {\n platformId: \"mux\",\n format: \"json\",\n kind: \"local\",\n load: () => import(\"./readers/mux.js\").then((m) => m.default),\n },\n {\n platformId: \"kilo\",\n format: \"json\",\n kind: \"local\",\n load: () => import(\"./readers/kilo.js\").then((m) => m.default),\n },\n {\n platformId: \"kiro\",\n format: \"json\",\n kind: \"local\",\n load: () => import(\"./readers/kiro.js\").then((m) => m.default),\n },\n // U3 — SQLite readers (via sql.js wasm)\n {\n platformId: \"opencode\",\n format: \"sqlite\",\n kind: \"local\",\n load: () => import(\"./readers/opencode.js\").then((m) => m.default),\n },\n {\n platformId: \"goose\",\n format: \"sqlite\",\n kind: \"local\",\n load: () => import(\"./readers/goose.js\").then((m) => m.default),\n },\n {\n platformId: \"hermes\",\n format: \"sqlite\",\n kind: \"local\",\n load: () => import(\"./readers/hermes.js\").then((m) => m.default),\n },\n {\n platformId: \"kilo-cli\",\n format: \"sqlite\",\n kind: \"local\",\n load: () => import(\"./readers/kilo-cli.js\").then((m) => m.default),\n },\n {\n platformId: \"synthetic\",\n format: \"sqlite\",\n kind: \"local\",\n load: () => import(\"./readers/synthetic.js\").then((m) => m.default),\n },\n {\n platformId: \"crush\",\n format: \"sqlite\",\n kind: \"local\",\n load: () => import(\"./readers/crush.js\").then((m) => m.default),\n },\n {\n platformId: \"zed\",\n format: \"sqlite\",\n kind: \"local\",\n load: () => import(\"./readers/zed.js\").then((m) => m.default),\n },\n // U4 — synced/cloud readers (read tokscale local cache if present, else skip)\n {\n platformId: \"cursor\",\n format: \"synced-cache\",\n kind: \"synced\",\n load: () => import(\"./readers/cursor.js\").then((m) => m.default),\n },\n {\n // Antigravity IDE: the native `~/.gemini/antigravity/conversations/<uuid>.pb`\n // store is PROTOBUF with no public schema (CONFIRMED by install) → not\n // parseable. So this is a SYNCED reader: it reads the tokscale synced-cache\n // if present, else [] (\"requires sync\"). The native dir is detection-only.\n platformId: \"antigravity\",\n format: \"synced-cache\",\n kind: \"synced\",\n load: () => import(\"./readers/antigravity.js\").then((m) => m.default),\n },\n {\n // Antigravity CLI (`agy`): SHARES the IDE's protobuf (.pb) store (no separate\n // dir, no public schema) → not parseable. SYNCED reader: tokscale cache if\n // present, else [] (\"requires sync\").\n platformId: \"antigravity-cli\",\n format: \"synced-cache\",\n kind: \"synced\",\n load: () => import(\"./readers/antigravity-cli.js\").then((m) => m.default),\n },\n {\n platformId: \"trae\",\n format: \"synced-cache\",\n kind: \"synced\",\n load: () => import(\"./readers/trae.js\").then((m) => m.default),\n },\n {\n platformId: \"warp\",\n format: \"synced-cache\",\n kind: \"synced\",\n load: () => import(\"./readers/warp.js\").then((m) => m.default),\n },\n];\n\n/** O(1) lookup index, built once at module-load time. */\nconst REGISTRY_BY_ID: ReadonlyMap<PlatformId, UsageReaderFactory> = new Map(\n USAGE_READER_REGISTRY.map((factory) => [factory.platformId, factory] as const),\n);\n\n/** Look up the lazy factory for a platform id, or undefined when unregistered. */\nexport function getUsageReaderFactory(id: PlatformId | string): UsageReaderFactory | undefined {\n return REGISTRY_BY_ID.get(id as PlatformId);\n}\n\n/** Resolve a platform id to its reader singleton, or undefined when unregistered. */\nexport async function getUsageReader(id: PlatformId | string): Promise<UsageReader | undefined> {\n const factory = getUsageReaderFactory(id);\n return factory ? factory.load() : undefined;\n}\n\n/** Load every registered reader (imports run in parallel; preserves order). */\nexport async function allUsageReaders(): Promise<UsageReader[]> {\n return Promise.all(USAGE_READER_REGISTRY.map((factory) => factory.load()));\n}\n","/**\n * usage/scan — orchestrate every registered reader into one deduped record set.\n *\n * Iterates USAGE_READER_REGISTRY (optionally filtered by platform), loads and\n * runs each reader, and folds the results together. Per-reader robustness:\n * • a reader that throws (it shouldn't — readers are fail-open) is CAUGHT and\n * recorded as skipped, never aborting the whole scan;\n * • a \"synced\" reader that returns no rows is noted as skipped(\"requires sync\")\n * so the report can honestly explain why a cloud platform shows nothing;\n * • a reader that simply has no local data returns [] silently (no root).\n *\n * After collection: global cross-source dedupe, then a final sinceMs filter\n * (readers also honor sinceMs, but the scan re-filters as a backstop).\n */\n\nimport type { PlatformId } from \"../core/types.js\";\nimport type { UsageReader, UsageReaderFactory, UsageRecord } from \"./types.js\";\nimport { dedupe } from \"./aggregate.js\";\nimport { USAGE_READER_REGISTRY } from \"./registry.js\";\n\n/** A platform the scan could not (fully) read, with a human reason. */\nexport interface SkippedPlatform {\n platformId: PlatformId;\n reason: string;\n}\n\n/** Options controlling a scan. */\nexport interface ScanOptions {\n /** Lower-bound epoch ms; records older than this are dropped. */\n sinceMs?: number;\n /** Restrict to these platforms; omit/empty to scan every registered reader. */\n platforms?: PlatformId[];\n}\n\n/** The result of a scan: deduped records + notes on anything skipped. */\nexport interface ScanResult {\n records: UsageRecord[];\n skipped: SkippedPlatform[];\n}\n\n/**\n * Scan host usage across the selected readers. Returns deduped, since-filtered\n * records plus a `skipped` list (load/read failures and synced-but-uncached\n * platforms). Never throws — a single bad reader is isolated.\n */\nexport async function scanUsage(opts: ScanOptions = {}): Promise<ScanResult> {\n const { sinceMs, platforms } = opts;\n const wanted = platforms && platforms.length > 0 ? new Set(platforms) : undefined;\n\n const factories = USAGE_READER_REGISTRY.filter(\n (f) => wanted === undefined || wanted.has(f.platformId),\n );\n\n const collected: UsageRecord[] = [];\n const skipped: SkippedPlatform[] = [];\n\n // Run readers concurrently; each result is independent.\n const results = await Promise.all(\n factories.map(async (factory) => readOne(factory, sinceMs)),\n );\n\n for (const r of results) {\n if (r.skipped) skipped.push(r.skipped);\n // Loop-push, never push(...spread): a reader over a large host history can\n // return hundreds of thousands of records, and spreading them as call\n // arguments overflows the stack (RangeError) — hit on a real machine the\n // first time the claude-code reader saw a multi-week log directory.\n for (const rec of r.records) collected.push(rec);\n }\n\n const deduped = dedupe(collected);\n const filtered =\n sinceMs === undefined ? deduped : deduped.filter((rec) => rec.ts >= sinceMs);\n\n return { records: filtered, skipped };\n}\n\n/** Load + run a single reader, isolating any failure into a skip note. */\nasync function readOne(\n factory: UsageReaderFactory,\n sinceMs: number | undefined,\n): Promise<{ records: UsageRecord[]; skipped?: SkippedPlatform }> {\n let reader: UsageReader;\n try {\n reader = await factory.load();\n } catch (err) {\n return {\n records: [],\n skipped: { platformId: factory.platformId, reason: `failed to load reader: ${errMsg(err)}` },\n };\n }\n\n let records: UsageRecord[];\n try {\n records = await reader.read(sinceMs === undefined ? {} : { sinceMs });\n } catch (err) {\n return {\n records: [],\n skipped: { platformId: factory.platformId, reason: `read error: ${errMsg(err)}` },\n };\n }\n\n if (records.length === 0 && factory.kind === \"synced\") {\n return {\n records: [],\n skipped: {\n platformId: factory.platformId,\n reason: \"requires sync (no local cache found)\",\n },\n };\n }\n\n return { records };\n}\n\nfunction errMsg(err: unknown): string {\n return err instanceof Error ? err.message : String(err);\n}\n","/**\n * usage/leaderboard — the USER / HOST leaderboard, derived from the host usage\n * readers (src/usage/*).\n *\n * Where {@link import(\"../telemetry/leaderboard.js\")} answers \"which MCP server\n * costs the most\" from the bytes WE wrap, this answers \"which CLI / host spent\n * the most\" from each agent's OWN native session logs. Origin is always\n * `host-native`; it is NEVER summed with the serve-proxy MCP leaderboard (they\n * measure different things: server bytes vs whole-conversation usage).\n *\n * Thin wrapper over {@link scanUsage} + {@link aggregateBy}: the ranking is just\n * the platform (or model) group-by, which `aggregateBy` already sorts by total\n * tokens desc. A dedicated formatter notes synced / host-estimated platforms.\n */\n\nimport type { SkippedPlatform } from \"./scan.js\";\nimport type { PlatformId } from \"../core/types.js\";\nimport type { UsageRecord, UsageSummary } from \"./types.js\";\nimport { aggregateBy } from \"./aggregate.js\";\nimport { scanUsage } from \"./scan.js\";\n\n/** Options for the host leaderboard queries. */\nexport interface HostLeaderboardOptions {\n /** Lower-bound epoch ms (inclusive); forwarded to {@link scanUsage}. */\n sinceMs?: number;\n /** Restrict to these platforms; omit/empty to scan every registered reader. */\n platforms?: PlatformId[];\n /** Rank dimension. \"platform\" (default) is the headline host leaderboard. */\n by?: \"platform\" | \"model\";\n}\n\n/** The host leaderboard result: ranked rows plus any honest skip notes. */\nexport interface HostLeaderboardResult {\n /** The ranking dimension actually used. */\n by: \"platform\" | \"model\";\n /** Ranked summary rows (sorted by total tokens desc by aggregateBy). */\n rows: UsageSummary[];\n /** Platforms the scan could not (fully) read (synced-but-uncached, errors). */\n skipped: SkippedPlatform[];\n}\n\n/**\n * The USER / HOST leaderboard: scan every host reader, then rank by platform\n * (the default — \"which CLI/host spent the most\") or by model. Returns the\n * ranked rows and the scan's skip notes so the formatter can stay honest about\n * cloud platforms that require a sync we do not perform.\n */\nexport async function hostLeaderboard(\n opts: HostLeaderboardOptions = {},\n): Promise<HostLeaderboardResult> {\n const by = opts.by ?? \"platform\";\n const scanOpts: { sinceMs?: number; platforms?: PlatformId[] } = {};\n if (opts.sinceMs !== undefined) scanOpts.sinceMs = opts.sinceMs;\n if (opts.platforms !== undefined && opts.platforms.length > 0) {\n scanOpts.platforms = opts.platforms;\n }\n const { records, skipped } = await scanUsage(scanOpts);\n const rows = aggregateBy(records, by);\n return { by, rows, skipped };\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Formatting (mirrors usage/report.ts style: aligned table + honesty legend)\n// ─────────────────────────────────────────────────────────────────────────\n\n/** Compact integer formatting with thousands separators. */\nfunction fmtInt(n: number): string {\n return n.toLocaleString(\"en-US\");\n}\n\n/** Right-pad (left-aligned columns). */\nfunction padRight(s: string, width: number): string {\n return s.length >= width ? s : s + \" \".repeat(width - s.length);\n}\n\n/** Left-pad (right-aligned numeric columns). */\nfunction padLeft(s: string, width: number): string {\n return s.length >= width ? s : \" \".repeat(width - s.length) + s;\n}\n\n/**\n * Format the host leaderboard as an aligned, ranked table:\n * RANK | PLATFORM|MODEL | IN | OUT | CACHE_R | CACHE_W | REASON | TOTAL | SESS | CONF\n * with a TOTAL footer (worst confidence across rows), an estimate legend, and\n * skip notes for synced-but-uncached platforms.\n */\nexport function formatHostLeaderboard(\n result: HostLeaderboardResult,\n): string {\n const keyHeader = result.by === \"model\" ? \"MODEL\" : \"PLATFORM\";\n const headers = [\n \"RANK\",\n keyHeader,\n \"IN\",\n \"OUT\",\n \"CACHE_R\",\n \"CACHE_W\",\n \"REASON\",\n \"TOTAL\",\n \"SESS\",\n \"CONF\",\n ];\n\n // aggregateBy already sorts by total desc; re-sort defensively for stability.\n const sorted = [...result.rows].sort(\n (a, b) => b.total - a.total || b.lastTs - a.lastTs,\n );\n\n const dataRows = sorted.map((r, i) => [\n `${i + 1}`,\n r.key,\n fmtInt(r.tokens.input),\n fmtInt(r.tokens.output),\n fmtInt(r.tokens.cacheRead),\n fmtInt(r.tokens.cacheWrite),\n fmtInt(r.tokens.reasoning),\n fmtInt(r.total),\n fmtInt(r.sessions),\n r.confidence,\n ]);\n\n const totals = sorted.reduce(\n (acc, r) => {\n acc.input += r.tokens.input;\n acc.output += r.tokens.output;\n acc.cacheRead += r.tokens.cacheRead;\n acc.cacheWrite += r.tokens.cacheWrite;\n acc.reasoning += r.tokens.reasoning;\n acc.total += r.total;\n acc.sessions += r.sessions;\n return acc;\n },\n { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, reasoning: 0, total: 0, sessions: 0 },\n );\n const totalRow = [\n \"\",\n \"TOTAL\",\n fmtInt(totals.input),\n fmtInt(totals.output),\n fmtInt(totals.cacheRead),\n fmtInt(totals.cacheWrite),\n fmtInt(totals.reasoning),\n fmtInt(totals.total),\n fmtInt(totals.sessions),\n \"\",\n ];\n\n const widths = headers.map((h, col) => {\n let w = h.length;\n for (const row of dataRows) w = Math.max(w, (row[col] ?? \"\").length);\n w = Math.max(w, (totalRow[col] ?? \"\").length);\n return w;\n });\n\n // Left-align RANK (0), the KEY column (1), and CONF (9); numbers right.\n const leftCols = new Set<number>([0, 1, 9]);\n const renderRow = (cells: string[]): string =>\n cells\n .map((c, col) =>\n leftCols.has(col) ? padRight(c, widths[col] ?? 0) : padLeft(c, widths[col] ?? 0),\n )\n .join(\" \")\n .trimEnd();\n\n const ruleWidth = widths.reduce((a, b) => a + b, 0) + 2 * (widths.length - 1);\n const rule = \"-\".repeat(ruleWidth);\n\n const lines: string[] = [];\n lines.push(renderRow(headers));\n lines.push(rule);\n if (dataRows.length === 0) {\n lines.push(\"(no host usage found)\");\n } else {\n for (const row of dataRows) lines.push(renderRow(row));\n }\n lines.push(rule);\n lines.push(renderRow(totalRow));\n\n // Honesty legend — estimated rows and skipped synced platforms.\n if (sorted.some((r) => r.confidence === \"host-estimated\")) {\n lines.push(\"\");\n lines.push(\n \"note: host-estimated rows are derived (e.g. char/4 or cost-only), \" +\n \"not exact host-reported token counts.\",\n );\n }\n if (result.skipped.length > 0) {\n lines.push(\"\");\n lines.push(\"skipped (synced/host-estimated platforms):\");\n for (const s of result.skipped) lines.push(` - ${s.platformId}: ${s.reason}`);\n }\n\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;AAoBO,IAAM,wBAAuD;AAAA;AAAA,EAElE;AAAA,IACE,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM,MAAM,OAAO,2BAA0B,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EACtE;AAAA,EACA;AAAA,IACE,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM,MAAM,OAAO,qBAAoB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EAChE;AAAA,EACA;AAAA,IACE,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM,MAAM,OAAO,0BAAyB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EACrE;AAAA,EACA;AAAA,IACE,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM,MAAM,OAAO,yBAAwB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EACpE;AAAA,EACA;AAAA,IACE,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM,MAAM,OAAO,2BAA0B,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EACtE;AAAA,EACA;AAAA,IACE,YAAY;A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,IAAI,KAAK,OAAO,SAAS;AAC3E,QAAM,OAAO,IAAI,OAAO,SAAS;AAEjC,QAAM,QAAkB,CAAC;AACzB,QAAM,KAAK,UAAU,OAAO,CAAC;AAC7B,QAAM,KAAK,IAAI;AACf,MAAI,SAAS,WAAW,GAAG;AACzB,UAAM,KAAK,uBAAuB;AAAA,EACpC,OAAO;AACL,eAAW,OAAO,SAAU,OAAM,KAAK,UAAU,GAAG,CAAC;AAAA,EACvD;AACA,QAAM,KAAK,IAAI;AACf,QAAM,KAAK,UAAU,QAAQ,CAAC;AAG9B,MAAI,OAAO,KAAK,CAAC,MAAM,EAAE,eAAe,gBAAgB,GAAG;AACzD,UAAM,KAAK,EAAE;AACb,UAAM;AAAA,MACJ;AAAA,IAEF;AAAA,EACF;AACA,MAAI,OAAO,QAAQ,SAAS,GAAG;AAC7B,UAAM,KAAK,EAAE;AACb,UAAM,KAAK,4CAA4C;AACvD,eAAW,KAAK,OAAO,QAAS,OAAM,KAAK,OAAO,EAAE,UAAU,KAAK,EAAE,MAAM,EAAE;AAAA,EAC/E;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  compileMatcher,
4
4
  eventMatcherSubject
5
- } from "./chunk-6XMV2OOA.js";
5
+ } from "./chunk-CZOXXS77.js";
6
6
  import {
7
7
  SURFACE_PREDICATES,
8
8
  hostCanFireEvent
9
- } from "./chunk-BXPSDNIB.js";
9
+ } from "./chunk-34RRWEWU.js";
10
10
  import {
11
11
  applyStatuslineOutputLimits,
12
12
  statuslineOptionsForHost
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  allAdapters,
16
16
  loadAdapter
17
- } from "./chunk-G5HAIYRM.js";
17
+ } from "./chunk-XJSVJD5T.js";
18
18
 
19
19
  // src/sdk/test-harness.ts
20
20
  function declaredGlobalSurfaces(connector) {
@@ -399,4 +399,4 @@ export {
399
399
  simulate,
400
400
  explainHooks
401
401
  };
402
- //# sourceMappingURL=chunk-FKW5A6HE.js.map
402
+ //# sourceMappingURL=chunk-IY3SSCNK.js.map
@@ -14,7 +14,7 @@ import {
14
14
  isConcreteSemver,
15
15
  isPlaceholderVersion,
16
16
  registryTransportType
17
- } from "./chunk-6WN37NVN.js";
17
+ } from "./chunk-6FRAVOVF.js";
18
18
  import {
19
19
  renderCommandMd,
20
20
  renderSkillMd,
@@ -1490,4 +1490,4 @@ export {
1490
1490
  packageConnectorAll,
1491
1491
  installInstructions
1492
1492
  };
1493
- //# sourceMappingURL=chunk-U2XJWG7N.js.map
1493
+ //# sourceMappingURL=chunk-JUBEM3OR.js.map
@@ -23,11 +23,20 @@ function codexConfigHome() {
23
23
  }
24
24
  return join(homedir(), ".codex");
25
25
  }
26
+ function grokBuildConfigHome() {
27
+ const env = process.env.GROK_HOME;
28
+ if (env && env.trim() !== "") {
29
+ if (env.startsWith("~")) return join(homedir(), env.replace(/^~[/\\]?/, ""));
30
+ return resolve(env);
31
+ }
32
+ return join(homedir(), ".grok");
33
+ }
26
34
 
27
35
  export {
28
36
  xdgConfigHome,
29
37
  roamingAppData,
30
38
  localAppData,
31
- codexConfigHome
39
+ codexConfigHome,
40
+ grokBuildConfigHome
32
41
  };
33
- //# sourceMappingURL=chunk-UM5S7DKK.js.map
42
+ //# sourceMappingURL=chunk-KOFCNA5T.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/host-paths.ts"],"sourcesContent":["// ─────────────────────────────────────────────────────────────────────────\n// host-paths.ts — shared OS user-config-dir base resolvers\n//\n// Several adapters resolve the SAME per-OS \"user config base\" directory with\n// the same logic (XDG on posix; %APPDATA%/%LOCALAPPDATA% on Windows, each with\n// a ~/AppData fallback). These helpers consolidate that resolution so the\n// per-host adapters only carry their host-specific SUFFIX. The result is\n// byte-identical for absolute/clean config-dir inputs (the realistic case);\n// a non-canonical env value (relative, trailing slash, `..`) is normalized via\n// `resolve()` rather than passed through bare — a safe canonicalization.\n//\n// Scope note: these are the USER-CONFIG-DIR bases (where a host keeps its\n// settings/config files). The agent-connector *data-root* paths (our own\n// per-project state) live in core/paths.ts — do NOT conflate the two.\n//\n// Host-specific config-home resolvers that are SHARED across modules (e.g.\n// `codexConfigHome`, used by BOTH the codex adapter and marketplace detection)\n// DO live here, so the writer and the probe can never disagree on the dir.\n// Single-caller host envs (PI_CODING_AGENT_DIR, OPENCLAW_*) stay in their own\n// adapter.\n// ─────────────────────────────────────────────────────────────────────────\n\nimport { homedir } from \"node:os\";\nimport { join, resolve } from \"node:path\";\n\n/** $XDG_CONFIG_HOME when set & non-empty, else ~/.config. */\nexport function xdgConfigHome(): string {\n const xdg = process.env.XDG_CONFIG_HOME;\n return xdg && xdg.trim() !== \"\" ? resolve(xdg) : join(homedir(), \".config\");\n}\n\n/** %APPDATA% (Roaming) when set & non-empty, else ~/AppData/Roaming. */\nexport function roamingAppData(): string {\n const appData = process.env.APPDATA;\n return appData && appData.trim() !== \"\"\n ? resolve(appData)\n : join(homedir(), \"AppData\", \"Roaming\");\n}\n\n/** %LOCALAPPDATA% when set & non-empty, else ~/AppData/Local. */\nexport function localAppData(): string {\n const local = process.env.LOCALAPPDATA;\n return local && local.trim() !== \"\"\n ? resolve(local)\n : join(homedir(), \"AppData\", \"Local\");\n}\n\n/** Codex's config home: $CODEX_HOME (tilde-expanded, then resolved) when set\n * & non-empty, else ~/.codex. Shared by the codex adapter (writer) and the\n * marketplace detection probe so they never disagree on the config dir. */\nexport function codexConfigHome(): string {\n const env = process.env.CODEX_HOME;\n if (env && env.trim() !== \"\") {\n if (env.startsWith(\"~\")) return join(homedir(), env.replace(/^~[/\\\\]?/, \"\"));\n return resolve(env);\n }\n return join(homedir(), \".codex\");\n}\n"],"mappings":";;;AAsBA,SAAS,eAAe;AACxB,SAAS,MAAM,eAAe;AAGvB,SAAS,gBAAwB;AACtC,QAAM,MAAM,QAAQ,IAAI;AACxB,SAAO,OAAO,IAAI,KAAK,MAAM,KAAK,QAAQ,GAAG,IAAI,KAAK,QAAQ,GAAG,SAAS;AAC5E;AAGO,SAAS,iBAAyB;AACvC,QAAM,UAAU,QAAQ,IAAI;AAC5B,SAAO,WAAW,QAAQ,KAAK,MAAM,KACjC,QAAQ,OAAO,IACf,KAAK,QAAQ,GAAG,WAAW,SAAS;AAC1C;AAGO,SAAS,eAAuB;AACrC,QAAM,QAAQ,QAAQ,IAAI;AAC1B,SAAO,SAAS,MAAM,KAAK,MAAM,KAC7B,QAAQ,KAAK,IACb,KAAK,QAAQ,GAAG,WAAW,OAAO;AACxC;AAKO,SAAS,kBAA0B;AACxC,QAAM,MAAM,QAAQ,IAAI;AACxB,MAAI,OAAO,IAAI,KAAK,MAAM,IAAI;AAC5B,QAAI,IAAI,WAAW,GAAG,EAAG,QAAO,KAAK,QAAQ,GAAG,IAAI,QAAQ,YAAY,EAAE,CAAC;AAC3E,WAAO,QAAQ,GAAG;AAAA,EACpB;AACA,SAAO,KAAK,QAAQ,GAAG,QAAQ;AACjC;","names":[]}
1
+ {"version":3,"sources":["../src/core/host-paths.ts"],"sourcesContent":["// ─────────────────────────────────────────────────────────────────────────\n// host-paths.ts — shared OS user-config-dir base resolvers\n//\n// Several adapters resolve the SAME per-OS \"user config base\" directory with\n// the same logic (XDG on posix; %APPDATA%/%LOCALAPPDATA% on Windows, each with\n// a ~/AppData fallback). These helpers consolidate that resolution so the\n// per-host adapters only carry their host-specific SUFFIX. The result is\n// byte-identical for absolute/clean config-dir inputs (the realistic case);\n// a non-canonical env value (relative, trailing slash, `..`) is normalized via\n// `resolve()` rather than passed through bare — a safe canonicalization.\n//\n// Scope note: these are the USER-CONFIG-DIR bases (where a host keeps its\n// settings/config files). The agent-connector *data-root* paths (our own\n// per-project state) live in core/paths.ts — do NOT conflate the two.\n//\n// Host-specific config-home resolvers that are SHARED across modules (e.g.\n// `codexConfigHome`, used by BOTH the codex adapter and marketplace detection)\n// DO live here, so the writer and the probe can never disagree on the dir.\n// Single-caller host envs (PI_CODING_AGENT_DIR, OPENCLAW_*) stay in their own\n// adapter.\n// ─────────────────────────────────────────────────────────────────────────\n\nimport { homedir } from \"node:os\";\nimport { join, resolve } from \"node:path\";\n\n/** $XDG_CONFIG_HOME when set & non-empty, else ~/.config. */\nexport function xdgConfigHome(): string {\n const xdg = process.env.XDG_CONFIG_HOME;\n return xdg && xdg.trim() !== \"\" ? resolve(xdg) : join(homedir(), \".config\");\n}\n\n/** %APPDATA% (Roaming) when set & non-empty, else ~/AppData/Roaming. */\nexport function roamingAppData(): string {\n const appData = process.env.APPDATA;\n return appData && appData.trim() !== \"\"\n ? resolve(appData)\n : join(homedir(), \"AppData\", \"Roaming\");\n}\n\n/** %LOCALAPPDATA% when set & non-empty, else ~/AppData/Local. */\nexport function localAppData(): string {\n const local = process.env.LOCALAPPDATA;\n return local && local.trim() !== \"\"\n ? resolve(local)\n : join(homedir(), \"AppData\", \"Local\");\n}\n\n/** Codex's config home: $CODEX_HOME (tilde-expanded, then resolved) when set\n * & non-empty, else ~/.codex. Shared by the codex adapter (writer) and the\n * marketplace detection probe so they never disagree on the config dir. */\nexport function codexConfigHome(): string {\n const env = process.env.CODEX_HOME;\n if (env && env.trim() !== \"\") {\n if (env.startsWith(\"~\")) return join(homedir(), env.replace(/^~[/\\\\]?/, \"\"));\n return resolve(env);\n }\n return join(homedir(), \".codex\");\n}\n\n/**\n * Grok Build's config home: $GROK_HOME (tilde-expanded, then resolved) when set\n * & non-empty, else ~/.grok.\n *\n * Source: xai-org/grok-build user guide 05-configuration.md (\"`GROK_HOME` |\n * Override config directory (default: `~/.grok`)\") and 26-config-reference.md\n * (\"`$GROK_HOME/config.toml` … Default `$GROK_HOME` is `~/.grok`\").\n *\n * COLLISION NOTE: the unrelated community CLI behind adapter id `grok-cli`\n * (superagent-ai/grok-cli) hardcodes `~/.grok` too and does NOT honor\n * $GROK_HOME. The two products therefore share the default directory but never\n * a FILE: Grok Build owns `config.toml`, Grok CLI owns `user-settings.json`.\n * Both adapters key detection on their own exclusive marker file and bow out of\n * a bare shared dir that carries only the sibling's marker.\n */\nexport function grokBuildConfigHome(): string {\n const env = process.env.GROK_HOME;\n if (env && env.trim() !== \"\") {\n if (env.startsWith(\"~\")) return join(homedir(), env.replace(/^~[/\\\\]?/, \"\"));\n return resolve(env);\n }\n return join(homedir(), \".grok\");\n}\n"],"mappings":";;;AAsBA,SAAS,eAAe;AACxB,SAAS,MAAM,eAAe;AAGvB,SAAS,gBAAwB;AACtC,QAAM,MAAM,QAAQ,IAAI;AACxB,SAAO,OAAO,IAAI,KAAK,MAAM,KAAK,QAAQ,GAAG,IAAI,KAAK,QAAQ,GAAG,SAAS;AAC5E;AAGO,SAAS,iBAAyB;AACvC,QAAM,UAAU,QAAQ,IAAI;AAC5B,SAAO,WAAW,QAAQ,KAAK,MAAM,KACjC,QAAQ,OAAO,IACf,KAAK,QAAQ,GAAG,WAAW,SAAS;AAC1C;AAGO,SAAS,eAAuB;AACrC,QAAM,QAAQ,QAAQ,IAAI;AAC1B,SAAO,SAAS,MAAM,KAAK,MAAM,KAC7B,QAAQ,KAAK,IACb,KAAK,QAAQ,GAAG,WAAW,OAAO;AACxC;AAKO,SAAS,kBAA0B;AACxC,QAAM,MAAM,QAAQ,IAAI;AACxB,MAAI,OAAO,IAAI,KAAK,MAAM,IAAI;AAC5B,QAAI,IAAI,WAAW,GAAG,EAAG,QAAO,KAAK,QAAQ,GAAG,IAAI,QAAQ,YAAY,EAAE,CAAC;AAC3E,WAAO,QAAQ,GAAG;AAAA,EACpB;AACA,SAAO,KAAK,QAAQ,GAAG,QAAQ;AACjC;AAiBO,SAAS,sBAA8B;AAC5C,QAAM,MAAM,QAAQ,IAAI;AACxB,MAAI,OAAO,IAAI,KAAK,MAAM,IAAI;AAC5B,QAAI,IAAI,WAAW,GAAG,EAAG,QAAO,KAAK,QAAQ,GAAG,IAAI,QAAQ,YAAY,EAAE,CAAC;AAC3E,WAAO,QAAQ,GAAG;AAAA,EACpB;AACA,SAAO,KAAK,QAAQ,GAAG,OAAO;AAChC;","names":[]}
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ADAPTER_REGISTRY
4
- } from "./chunk-G5HAIYRM.js";
4
+ } from "./chunk-XJSVJD5T.js";
5
5
 
6
6
  // src/adapters/detect.ts
7
7
  async function detectInstalledPlatforms(projectDir) {
@@ -85,4 +85,4 @@ export {
85
85
  detectInstalledPlatforms,
86
86
  detectRuntimeHost
87
87
  };
88
- //# sourceMappingURL=chunk-4KIXXJ7B.js.map
88
+ //# sourceMappingURL=chunk-KY2VQGD7.js.map
@@ -3,7 +3,7 @@ import {
3
3
  defineConnector,
4
4
  readConnectorPackageMetadataNearFile,
5
5
  withConnectorPackageMetadata
6
- } from "./chunk-6WN37NVN.js";
6
+ } from "./chunk-6FRAVOVF.js";
7
7
  import {
8
8
  assertNoSymlinkInPath,
9
9
  connectorDir,
@@ -193,4 +193,4 @@ export {
193
193
  connectorFromMeta,
194
194
  listRegisteredConnectors
195
195
  };
196
- //# sourceMappingURL=chunk-M6OS4OLU.js.map
196
+ //# sourceMappingURL=chunk-R4FABNAL.js.map
@@ -460,37 +460,37 @@ function renderInstallResult(result, verb) {
460
460
  return lines.join("\n");
461
461
  }
462
462
  var COMMANDS = {
463
- detect: () => import("./detect-USP5JMWM.js"),
464
- install: () => import("./install-ASTAUZKB.js"),
465
- uninstall: () => import("./uninstall-WI5YLDCT.js"),
463
+ detect: () => import("./detect-ZC344YOJ.js"),
464
+ install: () => import("./install-4X4JDKGY.js"),
465
+ uninstall: () => import("./uninstall-VQO36IQ4.js"),
466
466
  // `upgrade` is the single "bring everything current" verb (re-render host
467
467
  // config + refresh the home pointer + managed channel guidance). `sync` and
468
468
  // `update` are kept as back-compat aliases that route to the same module so
469
469
  // existing scripts/docs keep working without a second concept to learn.
470
- upgrade: () => import("./upgrade-L45BTG6X.js"),
471
- sync: () => import("./upgrade-L45BTG6X.js"),
472
- update: () => import("./upgrade-L45BTG6X.js"),
473
- package: () => import("./package-VWBPHCLA.js"),
474
- audit: () => import("./audit-HPKCUCES.js"),
475
- doctor: () => import("./doctor-VSW5KHBM.js"),
476
- status: () => import("./status-BVLY6XDL.js"),
477
- telemetry: () => import("./telemetry-UU4SHJ23.js"),
478
- usage: () => import("./usage-K3NQTAJP.js"),
479
- leaderboard: () => import("./leaderboard-3XSVSGAJ.js"),
480
- hook: () => import("./hook-QRW3ON6C.js"),
470
+ upgrade: () => import("./upgrade-QEYZOA7S.js"),
471
+ sync: () => import("./upgrade-QEYZOA7S.js"),
472
+ update: () => import("./upgrade-QEYZOA7S.js"),
473
+ package: () => import("./package-FY2QZWRM.js"),
474
+ audit: () => import("./audit-H7PQWIVH.js"),
475
+ doctor: () => import("./doctor-ABYQF2YX.js"),
476
+ status: () => import("./status-DHVWBRLI.js"),
477
+ telemetry: () => import("./telemetry-TJIFAKWX.js"),
478
+ usage: () => import("./usage-LV7UGO64.js"),
479
+ leaderboard: () => import("./leaderboard-Q4YZ3LI7.js"),
480
+ hook: () => import("./hook-M3KQSEO3.js"),
481
481
  // Internal (omitted from USAGE): the statusline (HUD) entrypoint a host's
482
482
  // status line config points at. Fail-safe: always exits 0 with at most a
483
483
  // rendered line. See cli/commands/statusline.ts.
484
- statusline: () => import("./statusline-PRODZV2J.js"),
484
+ statusline: () => import("./statusline-SY5UBQOJ.js"),
485
485
  // Internal (omitted from USAGE): the user-invokable action entrypoint a future
486
486
  // host affordance points at. USER-TRIGGERED: surfaces errors (exit 1 + stderr),
487
487
  // unlike the fail-open hook / fail-safe statusline. See cli/commands/action.ts.
488
- action: () => import("./action-LEYTHNIU.js"),
489
- serve: () => import("./serve-IQGHE4SJ.js"),
488
+ action: () => import("./action-EKK6FMPY.js"),
489
+ serve: () => import("./serve-XT76DWUN.js"),
490
490
  // Hidden (omitted from USAGE): the opt-in host-native turn-usage entrypoint an
491
491
  // AfterModel / PostInvocation hook points at. Always exits 0; records a
492
492
  // distinct `model_turn` row. See cli/commands/usage-event.ts.
493
- "usage-event": () => import("./usage-event-J5CQ6LNT.js")
493
+ "usage-event": () => import("./usage-event-MQMKMK2R.js")
494
494
  };
495
495
  var DEFAULT_PROGRAM_NAME = "agent-connector";
496
496
  var COMMAND_USAGE = {
@@ -590,4 +590,4 @@ export {
590
590
  renderInstallResult,
591
591
  main
592
592
  };
593
- //# sourceMappingURL=chunk-T5AI3AW3.js.map
593
+ //# sourceMappingURL=chunk-SA6CSOH5.js.map
@@ -12,11 +12,11 @@ var ADAPTER_REGISTRY = [
12
12
  },
13
13
  {
14
14
  id: "claude-code",
15
- load: () => import("./claude-code-LJ6DVXWQ.js").then((m) => m.default)
15
+ load: () => import("./claude-code-VEERATN5.js").then((m) => m.default)
16
16
  },
17
17
  {
18
18
  id: "codex",
19
- load: () => import("./codex-RXIS5BHM.js").then((m) => m.default)
19
+ load: () => import("./codex-S2RADR5K.js").then((m) => m.default)
20
20
  },
21
21
  {
22
22
  id: "cursor",
@@ -62,7 +62,7 @@ var ADAPTER_REGISTRY = [
62
62
  // the "kilo" extension so there is no fork-ordering constraint between them.
63
63
  {
64
64
  id: "kilo-cli",
65
- load: () => import("./kilo-cli-I2S3W245.js").then((m) => m.default)
65
+ load: () => import("./kilo-cli-JOAEWYI4.js").then((m) => m.default)
66
66
  },
67
67
  // Wave 1 — mcp-only adapters (no lifecycle hooks; MCP registration only).
68
68
  {
@@ -78,27 +78,23 @@ var ADAPTER_REGISTRY = [
78
78
  id: "openhands",
79
79
  load: () => import("./openhands-QGXMQR6I.js").then((m) => m.default)
80
80
  },
81
- {
82
- id: "roo-code",
83
- load: () => import("./roo-code-VI2ZKTZC.js").then((m) => m.default)
84
- },
85
- // kilo is the Kilo Code VS Code extension (kilocode.kilo-code) — a Roo/Cline
86
- // fork, so it sits beside roo-code (mcp-only, root key "mcpServers", VS Code
81
+ // kilo is the Kilo Code VS Code extension (kilocode.kilo-code) — a Cline
82
+ // fork, so it sits beside cline (mcp-only, root key "mcpServers", VS Code
87
83
  // globalStorage / .kilocode project scope). Distinct host from "kilo-cli".
88
84
  {
89
85
  id: "kilo",
90
- load: () => import("./kilo-T4OXNUYY.js").then((m) => m.default)
86
+ load: () => import("./kilo-N5T6KXAG.js").then((m) => m.default)
91
87
  },
92
88
  // cline is the Cline VS Code extension (saoudrizwan.claude-dev) — the most-
93
- // installed AI coding extension and the PARENT that roo-code and kilo forked.
89
+ // installed AI coding extension and the PARENT that kilo forked.
94
90
  // mcp-only (no hook layer); MCP at the globalStorage cline_mcp_settings.json
95
91
  // ("mcpServers"); content lives in the .clinerules tree + ~/Documents/Cline.
96
- // NO runtime-marker collision with roo-code (rooveterinaryinc.roo-cline / .roo)
97
- // or kilo (kilocode.kilo-code / .kilo) — distinct ext ids + dotdirs — so there
98
- // is NO fork-before-parent ordering constraint here; it simply sits beside them.
92
+ // NO runtime-marker collision with kilo (kilocode.kilo-code / .kilo)
93
+ // distinct ext ids + dotdirs — so there is NO fork-before-parent ordering
94
+ // constraint here; it simply sits beside it.
99
95
  {
100
96
  id: "cline",
101
- load: () => import("./cline-JAPJNOZQ.js").then((m) => m.default)
97
+ load: () => import("./cline-UW6WCQRK.js").then((m) => m.default)
102
98
  },
103
99
  {
104
100
  id: "trae",
@@ -118,7 +114,7 @@ var ADAPTER_REGISTRY = [
118
114
  },
119
115
  {
120
116
  id: "zed",
121
- load: () => import("./zed-DQV3ZUCU.js").then((m) => m.default)
117
+ load: () => import("./zed-JCOKXOLA.js").then((m) => m.default)
122
118
  },
123
119
  {
124
120
  id: "amp",
@@ -126,11 +122,11 @@ var ADAPTER_REGISTRY = [
126
122
  },
127
123
  {
128
124
  id: "codebuff",
129
- load: () => import("./codebuff-3VODFPD4.js").then((m) => m.default)
125
+ load: () => import("./codebuff-R7QBLCSJ.js").then((m) => m.default)
130
126
  },
131
127
  {
132
128
  id: "mux",
133
- load: () => import("./mux-BO2L5CTW.js").then((m) => m.default)
129
+ load: () => import("./mux-WSZWWZOX.js").then((m) => m.default)
134
130
  },
135
131
  // Pi — mcp-only host with no writable MCP config; drives the Agent Skills
136
132
  // surface only (writes <piDir>/skills/<name>/SKILL.md).
@@ -158,12 +154,12 @@ var ADAPTER_REGISTRY = [
158
154
  },
159
155
  {
160
156
  id: "crush",
161
- load: () => import("./crush-YB3SK6NK.js").then((m) => m.default)
157
+ load: () => import("./crush-AJNQRFVE.js").then((m) => m.default)
162
158
  },
163
159
  // Wave 3 — json-stdio adapters with YAML config (MCP in YAML; hooks per host).
164
160
  {
165
161
  id: "goose",
166
- load: () => import("./goose-3X7ID7YW.js").then((m) => m.default)
162
+ load: () => import("./goose-SXFRT7UF.js").then((m) => m.default)
167
163
  },
168
164
  {
169
165
  id: "hermes",
@@ -225,19 +221,31 @@ var ADAPTER_REGISTRY = [
225
221
  // memory surface. Distinct ~/.codeium marker — no fork-ordering constraint.
226
222
  {
227
223
  id: "windsurf",
228
- load: () => import("./windsurf-R6D2JUTN.js").then((m) => m.default)
224
+ load: () => import("./windsurf-ZWVFNJ73.js").then((m) => m.default)
225
+ },
226
+ // Grok Build (xAI's OFFICIAL coding agent, xai-org/grok-build, Apache-2.0,
227
+ // bin `grok`) — json-stdio. MCP lives in $GROK_HOME/config.toml (default
228
+ // ~/.grok) under [mcp_servers.<id>]; hooks in $GROK_HOME/hooks/*.json
229
+ // (Claude-compatible JSON). Placed immediately BEFORE grok-cli because the two
230
+ // are UNRELATED products that share the default ~/.grok directory: keeping
231
+ // them adjacent keeps the disambiguation readable. There is no fork-ordering
232
+ // constraint (neither exports runtime env markers we detect on); the shared
233
+ // dir is handled by per-adapter marker-file detection with a sibling bow-out,
234
+ // not by registry order.
235
+ {
236
+ id: "grok-build",
237
+ load: () => import("./grok-build-EP2ZUFXZ.js").then((m) => m.default)
229
238
  },
230
239
  // Grok CLI (the community superagent-ai/grok-cli, npm `grok-dev`, bin `grok`,
231
240
  // MIT) — json-stdio. Id is `grok-cli` (NOT `grok`) to stay distinct from xAI's
232
- // separate "Grok Build" product. USER-SCOPE ONLY: both MCP servers (nested
233
- // `mcp.servers` JSON ARRAY, keyed by `id`) and hooks (top-level `hooks`,
234
- // Claude nested-rule shape) live in ~/.grok/user-settings.json (project
235
- // .grok/settings.json holds neither — Grok excludes project hooks for
236
- // security). Distinct ~/.grok marker no fork-ordering constraint vs any
237
- // sibling.
241
+ // separate "Grok Build" product above. USER-SCOPE ONLY: both MCP servers
242
+ // (nested `mcp.servers` JSON ARRAY, keyed by `id`) and hooks (top-level
243
+ // `hooks`, Claude nested-rule shape) live in ~/.grok/user-settings.json
244
+ // (project .grok/settings.json holds neither — Grok excludes project hooks for
245
+ // security). Shares the ~/.grok DIRECTORY with grok-build but never a FILE.
238
246
  {
239
247
  id: "grok-cli",
240
- load: () => import("./grok-cli-4VFVF2CQ.js").then((m) => m.default)
248
+ load: () => import("./grok-cli-UUNPOUYY.js").then((m) => m.default)
241
249
  },
242
250
  // Devin CLI (Cognition) — json-stdio. A Rust binary (`devin`, installed via
243
251
  // `curl cli.devin.ai/install.sh` → ~/.local/bin/devin). MCP + hooks live in
@@ -314,4 +322,4 @@ export {
314
322
  loadAdapter,
315
323
  allAdapters
316
324
  };
317
- //# sourceMappingURL=chunk-G5HAIYRM.js.map
325
+ //# sourceMappingURL=chunk-XJSVJD5T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/adapters/registry.ts"],"sourcesContent":["/**\n * adapters/registry — single source of truth for the platforms agent-connector\n * targets. Generalized from context-mode's `ADAPTER_REGISTRY` pattern, adapted\n * to our `Adapter` / `AdapterFactory` contract (adapters/spi.ts).\n *\n * In context-mode the same platform set was redeclared in four places (env-var\n * detection, session-dir lookup, the lazy adapter loader, and per-adapter base\n * constructors); adding a platform meant editing all of them and missing one\n * was silent. Here the list lives ONCE below: each platform is one entry with a\n * lazy `load()` thunk that resolves the adapter singleton. Adding a platform is\n * a single new entry — `getFactory` / `loadAdapter` / `allAdapters` and the\n * detection cascade in detect.ts all derive from this list.\n *\n * `load()` returns the module's default export, which every adapter file is\n * required to provide as its singleton (`export default adapter;`). It is a\n * function (not an eager import) so module loading stays lazy: an adapter is\n * only imported when it is actually needed, keeping startup cheap.\n *\n * Order is load-bearing for runtime host detection (detect.ts iterates env\n * markers in registry order): forks MUST precede their parent so a session\n * running inside a derived shell is not misclassified as the parent. For the\n * three Phase-1 adapters this is moot, but the ordering convention is fixed now\n * so later additions (cursor is a VS Code fork, etc.) slot in correctly.\n */\n\nimport type { PlatformId } from \"../core/types.js\";\nimport type { Adapter, AdapterFactory } from \"./spi.js\";\n\n/**\n * Authoritative list of installable platforms. One entry per platform; the\n * `load` thunk lazily imports the adapter module and returns its default-export\n * singleton. To add a platform: drop its `src/adapters/<id>/index.ts` in place\n * (default-exporting an `Adapter`) and add one entry here.\n */\nexport const ADAPTER_REGISTRY: readonly AdapterFactory[] = [\n // codebuddy (Tencent CodeBuddy) is a Claude Code fork that ALSO exports\n // CLAUDE_SESSION_ID at runtime (its bundle sets both CODEBUDDY_SESSION_ID and\n // CLAUDE_SESSION_ID), so it must precede claude-code: the fork's exclusive\n // runtime markers are checked first during host detection (fork-before-parent).\n {\n id: \"codebuddy\",\n load: () => import(\"./codebuddy/index.js\").then((m) => m.default),\n },\n {\n id: \"claude-code\",\n load: () => import(\"./claude-code/index.js\").then((m) => m.default),\n },\n {\n id: \"codex\",\n load: () => import(\"./codex/index.js\").then((m) => m.default),\n },\n {\n id: \"cursor\",\n load: () => import(\"./cursor/index.js\").then((m) => m.default),\n },\n // vscode-copilot after cursor: cursor is a VS Code fork, so the fork's runtime\n // markers must be checked first during host detection.\n {\n id: \"vscode-copilot\",\n load: () => import(\"./vscode-copilot/index.js\").then((m) => m.default),\n },\n {\n id: \"copilot-cli\",\n load: () => import(\"./copilot-cli/index.js\").then((m) => m.default),\n },\n {\n id: \"gemini-cli\",\n load: () => import(\"./gemini-cli/index.js\").then((m) => m.default),\n },\n {\n id: \"warp\",\n load: () => import(\"./warp/index.js\").then((m) => m.default),\n },\n // ts-plugin paradigm: OpenCode loads a generated plugin module that bridges\n // its in-process events to the universal hook entrypoint.\n {\n id: \"opencode\",\n load: () => import(\"./opencode/index.js\").then((m) => m.default),\n },\n // mimo-code is Xiaomi's MiMoCode (@mimo-ai/cli, bin `mimo`) — an OpenCode FORK\n // (ts-plugin, MCP root key \"mcp\", ~/.config/mimocode/mimocode.json). Grouped\n // beside the OpenCode family whose config dialect + plugin contract it shares;\n // detected via the DISTINCT ~/.config/mimocode dir, so there is no fork-ordering\n // constraint vs opencode (no shared config file to disambiguate).\n {\n id: \"mimo-code\",\n load: () => import(\"./mimo-code/index.js\").then((m) => m.default),\n },\n // kilo-cli is the SQLite-backed OpenCode FORK command-line product (ts-plugin,\n // loads @kilocode/plugin modules registered in kilo.jsonc's \"plugin\" array;\n // MCP root key \"mcp\", ~/.config/kilo/kilo.jsonc). Grouped beside the OpenCode\n // family whose plugin contract + config dialect it shares; distinct host from\n // the \"kilo\" extension so there is no fork-ordering constraint between them.\n {\n id: \"kilo-cli\",\n load: () => import(\"./kilo-cli/index.js\").then((m) => m.default),\n },\n // Wave 1 — mcp-only adapters (no lifecycle hooks; MCP registration only).\n {\n id: \"droid\",\n load: () => import(\"./droid/index.js\").then((m) => m.default),\n },\n // openhands is the All-Hands-AI OpenHands CLI (`openhands`, ex-OpenDevin) —\n // a standalone json-stdio host: MCP at ~/.openhands/mcp.json (\"mcpServers\",\n // FastMCP entry shape) + a SEPARATE .openhands/hooks.json carrying the\n // Claude-Code-plugin-compatible nested-rule hooks (6 events). Its persistence\n // dir (~/.openhands) is distinct, so there is no fork-ordering constraint.\n {\n id: \"openhands\",\n load: () => import(\"./openhands/index.js\").then((m) => m.default),\n },\n // kilo is the Kilo Code VS Code extension (kilocode.kilo-code) — a Cline\n // fork, so it sits beside cline (mcp-only, root key \"mcpServers\", VS Code\n // globalStorage / .kilocode project scope). Distinct host from \"kilo-cli\".\n {\n id: \"kilo\",\n load: () => import(\"./kilo/index.js\").then((m) => m.default),\n },\n // cline is the Cline VS Code extension (saoudrizwan.claude-dev) — the most-\n // installed AI coding extension and the PARENT that kilo forked.\n // mcp-only (no hook layer); MCP at the globalStorage cline_mcp_settings.json\n // (\"mcpServers\"); content lives in the .clinerules tree + ~/Documents/Cline.\n // NO runtime-marker collision with kilo (kilocode.kilo-code / .kilo) —\n // distinct ext ids + dotdirs — so there is NO fork-before-parent ordering\n // constraint here; it simply sits beside it.\n {\n id: \"cline\",\n load: () => import(\"./cline/index.js\").then((m) => m.default),\n },\n {\n id: \"trae\",\n load: () => import(\"./trae/index.js\").then((m) => m.default),\n },\n // antigravity-cli BEFORE antigravity: the `agy` CLI is a fork of the IDE\n // adapter with its own runtime markers (the universal hook command tags the\n // host as \"antigravity-cli\"), so the more-specific CLI marker must be checked\n // before the IDE/parent during host detection.\n {\n id: \"antigravity-cli\",\n load: () => import(\"./antigravity-cli/index.js\").then((m) => m.default),\n },\n {\n id: \"antigravity\",\n load: () => import(\"./antigravity/index.js\").then((m) => m.default),\n },\n {\n id: \"zed\",\n load: () => import(\"./zed/index.js\").then((m) => m.default),\n },\n {\n id: \"amp\",\n load: () => import(\"./amp/index.js\").then((m) => m.default),\n },\n {\n id: \"codebuff\",\n load: () => import(\"./codebuff/index.js\").then((m) => m.default),\n },\n {\n id: \"mux\",\n load: () => import(\"./mux/index.js\").then((m) => m.default),\n },\n // Pi — mcp-only host with no writable MCP config; drives the Agent Skills\n // surface only (writes <piDir>/skills/<name>/SKILL.md).\n {\n id: \"pi\",\n load: () => import(\"./pi/index.js\").then((m) => m.default),\n },\n // Wave 2 — json-stdio adapters (full hook dispatch via the universal entrypoint).\n // jetbrains-copilot before vscode-copilot is unnecessary (distinct hosts); grouped here.\n {\n id: \"jetbrains-copilot\",\n load: () => import(\"./jetbrains-copilot/index.js\").then((m) => m.default),\n },\n {\n id: \"qwen-code\",\n load: () => import(\"./qwen-code/index.js\").then((m) => m.default),\n },\n {\n id: \"kiro\",\n load: () => import(\"./kiro/index.js\").then((m) => m.default),\n },\n {\n id: \"kimi\",\n load: () => import(\"./kimi/index.js\").then((m) => m.default),\n },\n {\n id: \"crush\",\n load: () => import(\"./crush/index.js\").then((m) => m.default),\n },\n // Wave 3 — json-stdio adapters with YAML config (MCP in YAML; hooks per host).\n {\n id: \"goose\",\n load: () => import(\"./goose/index.js\").then((m) => m.default),\n },\n {\n id: \"hermes\",\n load: () => import(\"./hermes/index.js\").then((m) => m.default),\n },\n // Wave 4 — ts-plugin adapters (generate a bridge module to the universal entrypoint).\n {\n id: \"omp\",\n load: () => import(\"./omp/index.js\").then((m) => m.default),\n },\n // nemoclaw BEFORE openclaw (fork-before-parent convention). NVIDIA NemoClaw\n // wraps OpenClaw and DRIVES the SAME ~/.openclaw/openclaw.json, so a NemoClaw\n // box carries BOTH the ~/.nemoclaw/ and ~/.openclaw/ markers. Exclusivity is\n // enforced at the SOURCE: OpenClawAdapter.detectInstalled BOWS OUT when\n // ~/.nemoclaw/ is present, so the shared config is never double-targeted as two\n // platforms. This ordering is the deterministic tie-break (matching the\n // antigravity-cli/antigravity precedent). nemoclaw extends OpenClawAdapter\n // (id/name/detection overridden), so inherited server/hook registration still\n // lands in the wrapped openclaw.json.\n {\n id: \"nemoclaw\",\n load: () => import(\"./nemoclaw/index.js\").then((m) => m.default),\n },\n {\n id: \"openclaw\",\n load: () => import(\"./openclaw/index.js\").then((m) => m.default),\n },\n // Wave 5 — mcp-only: Amazon Q Developer CLI. JSON MCP config under ~/.aws/amazonq/\n // (user) and .amazonq/ (project); root key \"mcpServers\"; bare stdio entry\n // { command, args, env, timeout? } or remote entry { type: \"http\", url } (no\n // headers) for http. The agent-format hooks layer (cli-agents/*.json) +\n // agents/prompts content surfaces are separate, not-yet-wired surfaces; this\n // adapter installs MCP entries + the .amazonq/rules memory surface.\n {\n id: \"amazon-q\",\n load: () => import(\"./amazon-q/index.js\").then((m) => m.default),\n },\n // Continue (the `cn` terminal agent / Continue.dev, npm @continuedev/cli) —\n // json-stdio (Claude-compatible hooks). MCP config is YAML at ~/.continue/config.yaml (user) and\n // <projectDir>/.continue/config.yaml (project); root key \"mcpServers\" is a\n // YAML ARRAY of { name, command, type?, args?, env?, cwd?, url } entries (NOT a\n // keyed map). Hooks: a Claude-compatible json-stdio layer in settings.json\n // (~/.continue/settings.json — separate from the MCP config.yaml; PR #11029) +\n // nativeHooks for the host-specific events. Distinct ~/.continue marker — no\n // fork-ordering constraint vs any sibling.\n {\n id: \"continue\",\n load: () => import(\"./continue/index.js\").then((m) => m.default),\n },\n // Windsurf (Codeium / Cognition's Cascade agent) — mcp-only. USER/GLOBAL scope\n // ONLY: MCP config is JSON at ~/.codeium/windsurf/mcp_config.json (the docs\n // document no project/workspace path), root key \"mcpServers\" is a Claude-\n // Desktop-style OBJECT map keyed by server name (like cursor). stdio entry\n // { command, args?, env? }; remote entry { serverUrl, headers? } (NOT `url`;\n // no type/disabled). No user-installable hook/plugin layer (GUI editor), so it\n // stays mcp-only paradigm — but content surfaces ARE wired: workflows\n // (.windsurf/workflows + ~/.codeium/windsurf/global_workflows), skills\n // (.windsurf/skills + ~/.codeium/windsurf/skills), and the .windsurf/rules\n // memory surface. Distinct ~/.codeium marker — no fork-ordering constraint.\n {\n id: \"windsurf\",\n load: () => import(\"./windsurf/index.js\").then((m) => m.default),\n },\n // Grok Build (xAI's OFFICIAL coding agent, xai-org/grok-build, Apache-2.0,\n // bin `grok`) — json-stdio. MCP lives in $GROK_HOME/config.toml (default\n // ~/.grok) under [mcp_servers.<id>]; hooks in $GROK_HOME/hooks/*.json\n // (Claude-compatible JSON). Placed immediately BEFORE grok-cli because the two\n // are UNRELATED products that share the default ~/.grok directory: keeping\n // them adjacent keeps the disambiguation readable. There is no fork-ordering\n // constraint (neither exports runtime env markers we detect on); the shared\n // dir is handled by per-adapter marker-file detection with a sibling bow-out,\n // not by registry order.\n {\n id: \"grok-build\",\n load: () => import(\"./grok-build/index.js\").then((m) => m.default),\n },\n // Grok CLI (the community superagent-ai/grok-cli, npm `grok-dev`, bin `grok`,\n // MIT) — json-stdio. Id is `grok-cli` (NOT `grok`) to stay distinct from xAI's\n // separate \"Grok Build\" product above. USER-SCOPE ONLY: both MCP servers\n // (nested `mcp.servers` JSON ARRAY, keyed by `id`) and hooks (top-level\n // `hooks`, Claude nested-rule shape) live in ~/.grok/user-settings.json\n // (project .grok/settings.json holds neither — Grok excludes project hooks for\n // security). Shares the ~/.grok DIRECTORY with grok-build but never a FILE.\n {\n id: \"grok-cli\",\n load: () => import(\"./grok-cli/index.js\").then((m) => m.default),\n },\n // Devin CLI (Cognition) — json-stdio. A Rust binary (`devin`, installed via\n // `curl cli.devin.ai/install.sh` → ~/.local/bin/devin). MCP + hooks live in\n // ONE config.json per scope: user ~/.config/devin/config.json\n // (%APPDATA%\\devin\\config.json on Windows) / project <projectDir>/.devin/\n // config.json. MCP root key \"mcpServers\" (object map; stdio { command, args?,\n // env? }, remote { url, transport?, headers? }; native ${env:VAR}). Hooks\n // under the same file's \"hooks\" key (Claude-compatible NESTED-rule shape; reply\n // is the SIMPLE top-level {decision:\"approve\"|\"block\"|\"deny\", reason}). Distinct\n // ~/.config/devin / .devin marker — no fork-ordering constraint.\n {\n id: \"devin\",\n load: () => import(\"./devin/index.js\").then((m) => m.default),\n },\n // Open Interpreter (the new Rust `interpreter` / `i` CLI) — mcp-only. It is a\n // FORK of OpenAI's Codex (README: \"Open Interpreter is a fork of OpenAI's\n // Codex\"), so its native config is Codex's: a TOML `config.toml` carrying\n // `[mcp_servers.<id>]` tables (command/args/env stdio; url/bearer_token_env_var/\n // http_headers streamable-HTTP). The config home is DELIBERATELY isolated from\n // Codex — the `interpreter` binary honors ONLY `$INTERPRETER_HOME` (NOT\n // `$CODEX_HOME`, which it explicitly ignores) and defaults to ~/.openinterpreter\n // (codex-rs/utils/home-dir/src/lib.rs). That distinct dir means there is NO\n // fork-ordering constraint vs codex — the two never target the same file — so\n // it simply sits at the end of the registry. Kept mcp-only (the codex hook\n // subsystem is present in the fork, but the `interpreter` product's live hook\n // wire contract is not first-party-verified, so hooks are not claimed).\n {\n id: \"open-interpreter\",\n load: () => import(\"./open-interpreter/index.js\").then((m) => m.default),\n },\n // Junie (JetBrains' OWN LLM-agnostic coding agent — DISTINCT from\n // jetbrains-copilot, which is GitHub Copilot in JetBrains IDEs) — mcp-only.\n // The `junie` CLI (npm @jetbrains/junie, github.com/JetBrains/junie) shares its\n // MCP JSON config with Junie in JetBrains IDEs: object map \"mcpServers\" at\n // <projectDir>/.junie/mcp/mcp.json (project) and ~/.junie/mcp/mcp.json (user);\n // stdio { command, args?, env? }, remote { url, headers? }. No documented\n // user-installable hook surface → mcp-only. Distinct ~/.junie marker — no\n // fork-ordering constraint vs any sibling.\n {\n id: \"junie\",\n load: () => import(\"./junie/index.js\").then((m) => m.default),\n },\n // mistral-vibe is Mistral's coding-agent CLI — an mcp-only host. MCP config is\n // TOML at <projectDir>/.vibe/config.toml (project, precedence) → ~/.vibe/\n // config.toml (user); root key `mcp_servers` is a TOML ARRAY-OF-TABLES\n // ([[mcp_servers]], each entry carries a `name` short alias — distinct from\n // codex's table-keyed [mcp_servers.<name>]). Distinct ~/.vibe / .vibe marker —\n // no fork-ordering constraint.\n {\n id: \"mistral-vibe\",\n load: () => import(\"./mistral-vibe/index.js\").then((m) => m.default),\n },\n];\n\n/** O(1) lookup index, built once at module-load time. */\nconst REGISTRY_BY_ID: ReadonlyMap<PlatformId, AdapterFactory> = new Map(\n ADAPTER_REGISTRY.map((factory) => [factory.id, factory] as const),\n);\n\n/** Every platform id present in the registry (useful for matrix tests). */\nexport const REGISTERED_PLATFORM_IDS: ReadonlySet<PlatformId> = new Set(\n ADAPTER_REGISTRY.map((factory) => factory.id),\n);\n\n/**\n * Look up the lazy factory for a platform id. Returns `undefined` for ids that\n * are not registered (including `\"unknown\"` and typos) so callers can fall back\n * deliberately rather than crash.\n */\nexport function getFactory(id: PlatformId | string): AdapterFactory | undefined {\n return REGISTRY_BY_ID.get(id as PlatformId);\n}\n\n/**\n * Resolve a platform id to its adapter singleton. Returns `undefined` when the\n * id is not registered — callers decide whether to skip or fall back.\n */\nexport async function loadAdapter(id: PlatformId | string): Promise<Adapter | undefined> {\n const factory = getFactory(id);\n return factory ? factory.load() : undefined;\n}\n\n/**\n * Load every registered adapter. Imports run in parallel; the result preserves\n * registry order so downstream detection/install logic sees forks before\n * parents.\n */\nexport async function allAdapters(): Promise<Adapter[]> {\n return Promise.all(ADAPTER_REGISTRY.map((factory) => factory.load()));\n}\n"],"mappings":";;;AAkCO,IAAM,mBAA8C;AAAA;AAAA;AAAA;AAAA;AAAA,EAKzD;AAAA,IACE,IAAI;AAAA,IACJ,MAAM,MAAM,OAAO,yBAAsB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EAClE;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM,MAAM,OAAO,2BAAwB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EACpE;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM,MAAM,OAAO,qBAAkB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EAC9D;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM,MAAM,OAAO,sBAAmB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EAC/D;AAAA;AAAA;AAAA,EAGA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM,MAAM,OAAO,8BAA2B,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EACvE;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM,MAAM,OAAO,2BAAwB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EACpE;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM,MAAM,OAAO,0BAAuB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EACnE;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM,MAAM,OAAO,oBAAiB,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO;AAAA,EAC7D;AAAA;AAAA;AAAA,EAGA;AA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AAM,UAAU,WAAW,EAAE;AAC7B,SAAO,UAAU,QAAQ,KAAK,IAAI;AACpC;AAOA,eAAsB,cAAkC;AACtD,SAAO,QAAQ,IAAI,iBAAiB,IAAI,CAAC,YAAY,QAAQ,KAAK,CAAC,CAAC;AACtE;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  installInstructions,
4
4
  packageConnector,
5
5
  readAgentPluginManifest
6
- } from "./chunk-U2XJWG7N.js";
6
+ } from "./chunk-JUBEM3OR.js";
7
7
  import {
8
8
  MARKETPLACE_NAME,
9
9
  agyPluginInstalled,
@@ -44,13 +44,13 @@ import {
44
44
  readMarketplaceInstalls,
45
45
  readNpmConfig,
46
46
  writeMarketplaceInstalls
47
- } from "./chunk-2Y2MZRLP.js";
47
+ } from "./chunk-CWUPIT72.js";
48
48
  import {
49
49
  spawnChild
50
50
  } from "./chunk-GDIAHWNY.js";
51
51
  import {
52
52
  detectInstalledPlatforms
53
- } from "./chunk-4KIXXJ7B.js";
53
+ } from "./chunk-KY2VQGD7.js";
54
54
  import {
55
55
  log
56
56
  } from "./chunk-KHO5WNTP.js";
@@ -58,11 +58,11 @@ import {
58
58
  deregisterConnector,
59
59
  loadRegisteredConnector,
60
60
  registerConnector
61
- } from "./chunk-M6OS4OLU.js";
61
+ } from "./chunk-R4FABNAL.js";
62
62
  import {
63
63
  REGISTERED_PLATFORM_IDS,
64
64
  loadAdapter
65
- } from "./chunk-G5HAIYRM.js";
65
+ } from "./chunk-XJSVJD5T.js";
66
66
  import {
67
67
  configPatchManualEdit
68
68
  } from "./chunk-NBYKLUF6.js";
@@ -2853,7 +2853,15 @@ function newResult2(connectorId, dryRun) {
2853
2853
  function errMessage10(err) {
2854
2854
  return err instanceof Error ? err.message : String(err);
2855
2855
  }
2856
+ var DELEGATED_MARKETPLACE_HINTS = {
2857
+ "vscode-copilot": "install through the GitHub Copilot CLI driver \u2014 `agent-connector install --method marketplace --targets copilot-cli` \u2014 VS Code auto-discovers plugins the CLI installed under ~/.copilot/installed-plugins/ and lists them in its Agent Plugins view",
2858
+ "jetbrains-copilot": "install through the GitHub Copilot CLI driver \u2014 `agent-connector install --method marketplace --targets copilot-cli` \u2014 run it in the JetBrains integrated terminal, which GitHub documents as a supported way to use Copilot there. GitHub documents no plugin-install path for the JetBrains Copilot IDE plugin itself"
2859
+ };
2856
2860
  function manualHint(platform, format, id) {
2861
+ const delegated = DELEGATED_MARKETPLACE_HINTS[platform];
2862
+ if (delegated) {
2863
+ return `agent-connector cannot drive the ${platform} marketplace flow directly \u2014 ${delegated}`;
2864
+ }
2857
2865
  const steps = installInstructions(format, id, "<out-dir>").join("; ");
2858
2866
  return `agent-connector cannot drive the ${platform} marketplace flow yet \u2014 install manually: \`agent-connector package --format ${format} --out <out-dir>\` then: ${steps}`;
2859
2867
  }
@@ -3413,4 +3421,4 @@ export {
3413
3421
  upgradeViaMarketplace,
3414
3422
  marketplaceDoctorChecks
3415
3423
  };
3416
- //# sourceMappingURL=chunk-WZMSSIDN.js.map
3424
+ //# sourceMappingURL=chunk-XSR3GF55.js.map