@ken-jo/agent-connector 0.4.75 → 0.4.79
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/dist/{action-TCKBTTZX.js → action-OHGFVKMC.js} +14 -14
- package/dist/{amazon-q-CB4XFX7T.js → amazon-q-B52EY2SV.js} +5 -5
- package/dist/{amp-6Q5OYHNW.js → amp-UXABVUKC.js} +5 -5
- package/dist/{antigravity-WIK3XBN5.js → antigravity-RZHN53VB.js} +6 -6
- package/dist/{antigravity-cli-L3RZMF6V.js → antigravity-cli-KODEKUTM.js} +6 -6
- package/dist/{chunk-D6ZJS4ND.js → chunk-4FWETID5.js} +2 -2
- package/dist/{chunk-Q42SEI7W.js → chunk-4HVQ7IUM.js} +3 -3
- package/dist/{chunk-IU42THN7.js → chunk-4NSU3KWX.js} +2 -2
- package/dist/{chunk-7CZKXXBD.js → chunk-56R2ER7K.js} +2 -2
- package/dist/{chunk-5LAFKXFM.js → chunk-7NXEHZAK.js} +3 -3
- package/dist/{chunk-MDZG5QHB.js → chunk-AMK2K6XZ.js} +2 -2
- package/dist/{chunk-TZ5KGCE2.js → chunk-AY3RGRTT.js} +2 -2
- package/dist/{chunk-TO57WYBB.js → chunk-HORHRHNG.js} +9 -3
- package/dist/chunk-HORHRHNG.js.map +1 -0
- package/dist/{chunk-2HCJV6UO.js → chunk-IXOQDZWC.js} +9 -2
- package/dist/chunk-IXOQDZWC.js.map +1 -0
- package/dist/{chunk-MHDQWZ4A.js → chunk-LKAVD4HP.js} +20 -10
- package/dist/chunk-LKAVD4HP.js.map +1 -0
- package/dist/{chunk-7QRUZAUG.js → chunk-LN76OGNR.js} +2 -2
- package/dist/{chunk-DI6OWKH2.js → chunk-NBUEL74R.js} +3 -3
- package/dist/{chunk-7ITLLYWB.js → chunk-PZHB5TVA.js} +5 -5
- package/dist/{chunk-AXAHW2KU.js → chunk-QKLJU4JX.js} +2 -2
- package/dist/{chunk-TW4DVR4V.js → chunk-S4E6QQEM.js} +2 -2
- package/dist/{chunk-FUXUEXDP.js → chunk-UBB7T54N.js} +3 -3
- package/dist/{chunk-OEQJGBBW.js → chunk-UYZ53KWS.js} +6 -6
- package/dist/{chunk-2L6LTQ6L.js → chunk-VD4EG6SG.js} +21 -10
- package/dist/chunk-VD4EG6SG.js.map +1 -0
- package/dist/{chunk-HKM3HUOK.js → chunk-VKRGQLY4.js} +18 -18
- package/dist/{chunk-NUGMVVV2.js → chunk-VVFDU4IX.js} +4 -4
- package/dist/{chunk-Q5LECKZL.js → chunk-X457NOFE.js} +36 -36
- package/dist/{chunk-ECSRTK4M.js → chunk-YJP3KGLM.js} +4 -4
- package/dist/{chunk-ALVXORZM.js → chunk-YYNXIUR2.js} +2 -2
- package/dist/{chunk-24K6JOKV.js → chunk-ZXX5DVSE.js} +5 -5
- package/dist/{claude-code-HFBAAVWS.js → claude-code-T6ZRCMA7.js} +9 -9
- package/dist/cli/sdk.js +7 -7
- package/dist/cli.js +1 -1
- package/dist/{cline-26W4FEZ6.js → cline-NNMVCECA.js} +5 -5
- package/dist/{codebuff-J5KEEBIL.js → codebuff-RJIDSEU3.js} +5 -5
- package/dist/{codex-JKQ6TLRI.js → codex-RHKQKNNG.js} +5 -5
- package/dist/{continue-KQSJUSWX.js → continue-MNM7YVJY.js} +6 -6
- package/dist/{copilot-cli-YBNKLYUB.js → copilot-cli-SMTX5F65.js} +5 -5
- package/dist/{crush-JTWTZIPB.js → crush-NYDBHIJE.js} +5 -5
- package/dist/{cursor-2NIZSDZ4.js → cursor-AOELDNZU.js} +6 -6
- package/dist/{detect-CWEIQCRC.js → detect-ALAKE54S.js} +4 -4
- package/dist/{doctor-AC437ZAW.js → doctor-UNF7FCF4.js} +20 -20
- package/dist/{droid-HF2AIFB2.js → droid-PTCH2K7Y.js} +5 -5
- package/dist/{gemini-cli-2EOK26S2.js → gemini-cli-QGLN2UMS.js} +5 -5
- package/dist/{goose-55JOTXS5.js → goose-DQ6GSZ5O.js} +6 -6
- package/dist/{hermes-QVZOZU4B.js → hermes-E47IG63A.js} +6 -6
- package/dist/{hook-VYD3OCLM.js → hook-GM2IDA3C.js} +14 -14
- package/dist/index.js +5 -5
- package/dist/{install-S6BYIJ62.js → install-7O4XWH7T.js} +16 -16
- package/dist/{jetbrains-copilot-DZ2ATXFN.js → jetbrains-copilot-4IOT3I2Y.js} +5 -5
- package/dist/{kilo-GJNSBWVV.js → kilo-TAHOPT2Q.js} +5 -5
- package/dist/{kilo-cli-2CCB3DBI.js → kilo-cli-X4NPJWGX.js} +5 -5
- package/dist/{kimi-YRPCSB6N.js → kimi-Z7L2LEEI.js} +5 -5
- package/dist/{kiro-BUOQFASX.js → kiro-YZ4TTZGD.js} +5 -5
- package/dist/{leaderboard-SUSUDKHR.js → leaderboard-DVW4WYJ6.js} +5 -5
- package/dist/{mimo-code-V4FP5PUJ.js → mimo-code-G2CBZ4M6.js} +5 -5
- package/dist/{mux-CMJSM42O.js → mux-JNM3F2NW.js} +5 -5
- package/dist/{nemoclaw-VP56PGKC.js → nemoclaw-SHA4IUML.js} +6 -6
- package/dist/{omp-OOFGD3GG.js → omp-OOVUNXME.js} +5 -5
- package/dist/openclaw-BD56E5MV.js +17 -0
- package/dist/{opencode-MKLHSQRD.js → opencode-W2RK4M7G.js} +5 -5
- package/dist/{package-KOAAVKHH.js → package-H5V3AZHR.js} +12 -12
- package/dist/{pi-NMVL7OFL.js → pi-I7BLL4EI.js} +5 -5
- package/dist/{qwen-code-2XE2T6F4.js → qwen-code-JG7AF442.js} +6 -6
- package/dist/{roo-code-YJOIKCCS.js → roo-code-L5F7S6QH.js} +5 -5
- package/dist/runtime/index.d.ts +11 -0
- package/dist/runtime/index.js +12 -12
- package/dist/sdk/index.js +6 -6
- package/dist/sdk/test.js +10 -10
- package/dist/{serve-BU23QUSJ.js → serve-WMO2TUW3.js} +24 -17
- package/dist/serve-WMO2TUW3.js.map +1 -0
- package/dist/{status-N5LCQQ3R.js → status-WRLBTBRE.js} +10 -10
- package/dist/{statusline-442XOF7R.js → statusline-EUD4DMIP.js} +13 -13
- package/dist/{telemetry-V4YQL2NU.js → telemetry-U3LGMR3D.js} +10 -10
- package/dist/{trae-QSV2JZFT.js → trae-Z7CQ2A2Q.js} +5 -5
- package/dist/{uninstall-WGEKTCDZ.js → uninstall-TWPUEJEC.js} +16 -16
- package/dist/{upgrade-IH7CKPTO.js → upgrade-EM6Y7QLH.js} +16 -16
- package/dist/{usage-DI7XRCKM.js → usage-3HQDTXGY.js} +2 -2
- package/dist/{usage-event-2FCU55AN.js → usage-event-DWIGKO7V.js} +13 -13
- package/dist/{vscode-copilot-R23RTVST.js → vscode-copilot-LU5NC4ZS.js} +5 -5
- package/dist/{warp-B72XSQ5G.js → warp-4PPG5LOM.js} +5 -5
- package/dist/{windsurf-642VBMQ2.js → windsurf-3T3RVXKM.js} +5 -5
- package/dist/{zed-6UJS7JKB.js → zed-LLOAUXSA.js} +5 -5
- package/package.json +1 -1
- package/dist/chunk-2HCJV6UO.js.map +0 -1
- package/dist/chunk-2L6LTQ6L.js.map +0 -1
- package/dist/chunk-MHDQWZ4A.js.map +0 -1
- package/dist/chunk-TO57WYBB.js.map +0 -1
- package/dist/openclaw-V73XHPXP.js +0 -17
- package/dist/serve-BU23QUSJ.js.map +0 -1
- /package/dist/{action-TCKBTTZX.js.map → action-OHGFVKMC.js.map} +0 -0
- /package/dist/{amazon-q-CB4XFX7T.js.map → amazon-q-B52EY2SV.js.map} +0 -0
- /package/dist/{amp-6Q5OYHNW.js.map → amp-UXABVUKC.js.map} +0 -0
- /package/dist/{antigravity-WIK3XBN5.js.map → antigravity-RZHN53VB.js.map} +0 -0
- /package/dist/{antigravity-cli-L3RZMF6V.js.map → antigravity-cli-KODEKUTM.js.map} +0 -0
- /package/dist/{chunk-D6ZJS4ND.js.map → chunk-4FWETID5.js.map} +0 -0
- /package/dist/{chunk-Q42SEI7W.js.map → chunk-4HVQ7IUM.js.map} +0 -0
- /package/dist/{chunk-IU42THN7.js.map → chunk-4NSU3KWX.js.map} +0 -0
- /package/dist/{chunk-7CZKXXBD.js.map → chunk-56R2ER7K.js.map} +0 -0
- /package/dist/{chunk-5LAFKXFM.js.map → chunk-7NXEHZAK.js.map} +0 -0
- /package/dist/{chunk-MDZG5QHB.js.map → chunk-AMK2K6XZ.js.map} +0 -0
- /package/dist/{chunk-TZ5KGCE2.js.map → chunk-AY3RGRTT.js.map} +0 -0
- /package/dist/{chunk-7QRUZAUG.js.map → chunk-LN76OGNR.js.map} +0 -0
- /package/dist/{chunk-DI6OWKH2.js.map → chunk-NBUEL74R.js.map} +0 -0
- /package/dist/{chunk-7ITLLYWB.js.map → chunk-PZHB5TVA.js.map} +0 -0
- /package/dist/{chunk-AXAHW2KU.js.map → chunk-QKLJU4JX.js.map} +0 -0
- /package/dist/{chunk-TW4DVR4V.js.map → chunk-S4E6QQEM.js.map} +0 -0
- /package/dist/{chunk-FUXUEXDP.js.map → chunk-UBB7T54N.js.map} +0 -0
- /package/dist/{chunk-OEQJGBBW.js.map → chunk-UYZ53KWS.js.map} +0 -0
- /package/dist/{chunk-HKM3HUOK.js.map → chunk-VKRGQLY4.js.map} +0 -0
- /package/dist/{chunk-NUGMVVV2.js.map → chunk-VVFDU4IX.js.map} +0 -0
- /package/dist/{chunk-Q5LECKZL.js.map → chunk-X457NOFE.js.map} +0 -0
- /package/dist/{chunk-ECSRTK4M.js.map → chunk-YJP3KGLM.js.map} +0 -0
- /package/dist/{chunk-ALVXORZM.js.map → chunk-YYNXIUR2.js.map} +0 -0
- /package/dist/{chunk-24K6JOKV.js.map → chunk-ZXX5DVSE.js.map} +0 -0
- /package/dist/{claude-code-HFBAAVWS.js.map → claude-code-T6ZRCMA7.js.map} +0 -0
- /package/dist/{cline-26W4FEZ6.js.map → cline-NNMVCECA.js.map} +0 -0
- /package/dist/{codebuff-J5KEEBIL.js.map → codebuff-RJIDSEU3.js.map} +0 -0
- /package/dist/{codex-JKQ6TLRI.js.map → codex-RHKQKNNG.js.map} +0 -0
- /package/dist/{continue-KQSJUSWX.js.map → continue-MNM7YVJY.js.map} +0 -0
- /package/dist/{copilot-cli-YBNKLYUB.js.map → copilot-cli-SMTX5F65.js.map} +0 -0
- /package/dist/{crush-JTWTZIPB.js.map → crush-NYDBHIJE.js.map} +0 -0
- /package/dist/{cursor-2NIZSDZ4.js.map → cursor-AOELDNZU.js.map} +0 -0
- /package/dist/{detect-CWEIQCRC.js.map → detect-ALAKE54S.js.map} +0 -0
- /package/dist/{doctor-AC437ZAW.js.map → doctor-UNF7FCF4.js.map} +0 -0
- /package/dist/{droid-HF2AIFB2.js.map → droid-PTCH2K7Y.js.map} +0 -0
- /package/dist/{gemini-cli-2EOK26S2.js.map → gemini-cli-QGLN2UMS.js.map} +0 -0
- /package/dist/{goose-55JOTXS5.js.map → goose-DQ6GSZ5O.js.map} +0 -0
- /package/dist/{hermes-QVZOZU4B.js.map → hermes-E47IG63A.js.map} +0 -0
- /package/dist/{hook-VYD3OCLM.js.map → hook-GM2IDA3C.js.map} +0 -0
- /package/dist/{install-S6BYIJ62.js.map → install-7O4XWH7T.js.map} +0 -0
- /package/dist/{jetbrains-copilot-DZ2ATXFN.js.map → jetbrains-copilot-4IOT3I2Y.js.map} +0 -0
- /package/dist/{kilo-GJNSBWVV.js.map → kilo-TAHOPT2Q.js.map} +0 -0
- /package/dist/{kilo-cli-2CCB3DBI.js.map → kilo-cli-X4NPJWGX.js.map} +0 -0
- /package/dist/{kimi-YRPCSB6N.js.map → kimi-Z7L2LEEI.js.map} +0 -0
- /package/dist/{kiro-BUOQFASX.js.map → kiro-YZ4TTZGD.js.map} +0 -0
- /package/dist/{leaderboard-SUSUDKHR.js.map → leaderboard-DVW4WYJ6.js.map} +0 -0
- /package/dist/{mimo-code-V4FP5PUJ.js.map → mimo-code-G2CBZ4M6.js.map} +0 -0
- /package/dist/{mux-CMJSM42O.js.map → mux-JNM3F2NW.js.map} +0 -0
- /package/dist/{nemoclaw-VP56PGKC.js.map → nemoclaw-SHA4IUML.js.map} +0 -0
- /package/dist/{omp-OOFGD3GG.js.map → omp-OOVUNXME.js.map} +0 -0
- /package/dist/{openclaw-V73XHPXP.js.map → openclaw-BD56E5MV.js.map} +0 -0
- /package/dist/{opencode-MKLHSQRD.js.map → opencode-W2RK4M7G.js.map} +0 -0
- /package/dist/{package-KOAAVKHH.js.map → package-H5V3AZHR.js.map} +0 -0
- /package/dist/{pi-NMVL7OFL.js.map → pi-I7BLL4EI.js.map} +0 -0
- /package/dist/{qwen-code-2XE2T6F4.js.map → qwen-code-JG7AF442.js.map} +0 -0
- /package/dist/{roo-code-YJOIKCCS.js.map → roo-code-L5F7S6QH.js.map} +0 -0
- /package/dist/{status-N5LCQQ3R.js.map → status-WRLBTBRE.js.map} +0 -0
- /package/dist/{statusline-442XOF7R.js.map → statusline-EUD4DMIP.js.map} +0 -0
- /package/dist/{telemetry-V4YQL2NU.js.map → telemetry-U3LGMR3D.js.map} +0 -0
- /package/dist/{trae-QSV2JZFT.js.map → trae-Z7CQ2A2Q.js.map} +0 -0
- /package/dist/{uninstall-WGEKTCDZ.js.map → uninstall-TWPUEJEC.js.map} +0 -0
- /package/dist/{upgrade-IH7CKPTO.js.map → upgrade-EM6Y7QLH.js.map} +0 -0
- /package/dist/{usage-DI7XRCKM.js.map → usage-3HQDTXGY.js.map} +0 -0
- /package/dist/{usage-event-2FCU55AN.js.map → usage-event-DWIGKO7V.js.map} +0 -0
- /package/dist/{vscode-copilot-R23RTVST.js.map → vscode-copilot-LU5NC4ZS.js.map} +0 -0
- /package/dist/{warp-B72XSQ5G.js.map → warp-4PPG5LOM.js.map} +0 -0
- /package/dist/{windsurf-642VBMQ2.js.map → windsurf-3T3RVXKM.js.map} +0 -0
- /package/dist/{zed-6UJS7JKB.js.map → zed-LLOAUXSA.js.map} +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
fail
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VKRGQLY4.js";
|
|
5
5
|
import {
|
|
6
6
|
runAction
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LKAVD4HP.js";
|
|
8
8
|
import "./chunk-OP4KBXUO.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-LN76OGNR.js";
|
|
10
|
+
import "./chunk-S4E6QQEM.js";
|
|
11
|
+
import "./chunk-ZXX5DVSE.js";
|
|
12
|
+
import "./chunk-4FWETID5.js";
|
|
13
13
|
import "./chunk-KHO5WNTP.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-7NXEHZAK.js";
|
|
15
|
+
import "./chunk-PZHB5TVA.js";
|
|
16
|
+
import "./chunk-X457NOFE.js";
|
|
17
|
+
import "./chunk-56R2ER7K.js";
|
|
18
|
+
import "./chunk-HORHRHNG.js";
|
|
19
|
+
import "./chunk-YYNXIUR2.js";
|
|
20
|
+
import "./chunk-IXOQDZWC.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/commands/action.ts
|
|
23
23
|
import { parseArgs } from "util";
|
|
@@ -52,4 +52,4 @@ async function run(argv) {
|
|
|
52
52
|
export {
|
|
53
53
|
run
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=action-
|
|
55
|
+
//# sourceMappingURL=action-OHGFVKMC.js.map
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-BEFVJ2OE.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseAdapter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VVFDU4IX.js";
|
|
8
8
|
import {
|
|
9
9
|
buildWrappedStdio,
|
|
10
10
|
isHomeBinHookCommand
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-HORHRHNG.js";
|
|
12
|
+
import "./chunk-YYNXIUR2.js";
|
|
13
|
+
import "./chunk-IXOQDZWC.js";
|
|
14
14
|
|
|
15
15
|
// src/adapters/amazon-q/index.ts
|
|
16
16
|
import { existsSync, statSync } from "fs";
|
|
@@ -563,4 +563,4 @@ export {
|
|
|
563
563
|
adapter,
|
|
564
564
|
amazon_q_default as default
|
|
565
565
|
};
|
|
566
|
-
//# sourceMappingURL=amazon-q-
|
|
566
|
+
//# sourceMappingURL=amazon-q-B52EY2SV.js.map
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BaseAdapter,
|
|
10
10
|
renderSkillMd
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VVFDU4IX.js";
|
|
12
12
|
import {
|
|
13
13
|
buildWrappedStdio
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-HORHRHNG.js";
|
|
15
|
+
import "./chunk-YYNXIUR2.js";
|
|
16
|
+
import "./chunk-IXOQDZWC.js";
|
|
17
17
|
|
|
18
18
|
// src/adapters/amp/index.ts
|
|
19
19
|
import { existsSync } from "fs";
|
|
@@ -608,4 +608,4 @@ export {
|
|
|
608
608
|
adapter,
|
|
609
609
|
amp_default as default
|
|
610
610
|
};
|
|
611
|
-
//# sourceMappingURL=amp-
|
|
611
|
+
//# sourceMappingURL=amp-UXABVUKC.js.map
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
AntigravityAdapter,
|
|
4
4
|
adapter,
|
|
5
5
|
antigravity_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4HVQ7IUM.js";
|
|
7
7
|
import "./chunk-H53QZQJI.js";
|
|
8
8
|
import "./chunk-BEFVJ2OE.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-VVFDU4IX.js";
|
|
10
|
+
import "./chunk-HORHRHNG.js";
|
|
11
|
+
import "./chunk-YYNXIUR2.js";
|
|
12
|
+
import "./chunk-IXOQDZWC.js";
|
|
13
13
|
export {
|
|
14
14
|
AntigravityAdapter,
|
|
15
15
|
adapter,
|
|
16
16
|
antigravity_default as default
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=antigravity-
|
|
18
|
+
//# sourceMappingURL=antigravity-RZHN53VB.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
AntigravityAdapter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4HVQ7IUM.js";
|
|
5
5
|
import "./chunk-H53QZQJI.js";
|
|
6
6
|
import "./chunk-BEFVJ2OE.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-VVFDU4IX.js";
|
|
8
|
+
import "./chunk-HORHRHNG.js";
|
|
9
|
+
import "./chunk-YYNXIUR2.js";
|
|
10
|
+
import "./chunk-IXOQDZWC.js";
|
|
11
11
|
|
|
12
12
|
// src/adapters/antigravity-cli/index.ts
|
|
13
13
|
import { existsSync } from "fs";
|
|
@@ -84,4 +84,4 @@ export {
|
|
|
84
84
|
adapter,
|
|
85
85
|
antigravity_cli_default as default
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=antigravity-cli-
|
|
87
|
+
//# sourceMappingURL=antigravity-cli-KODEKUTM.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ensureDir,
|
|
4
4
|
telemetryPath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IXOQDZWC.js";
|
|
6
6
|
|
|
7
7
|
// src/telemetry/store.ts
|
|
8
8
|
import { appendFileSync, existsSync, readFileSync } from "fs";
|
|
@@ -193,4 +193,4 @@ export {
|
|
|
193
193
|
getTokenizer,
|
|
194
194
|
inferModelFamily
|
|
195
195
|
};
|
|
196
|
-
//# sourceMappingURL=chunk-
|
|
196
|
+
//# sourceMappingURL=chunk-4FWETID5.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BaseAdapter,
|
|
10
10
|
renderSkillMd
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VVFDU4IX.js";
|
|
12
12
|
import {
|
|
13
13
|
buildHomeBinHookCommand,
|
|
14
14
|
buildUsageEventCommand,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isHomeBinHookCommand,
|
|
17
17
|
isHostNativeUsageEnabled,
|
|
18
18
|
isUsageEventCommand
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HORHRHNG.js";
|
|
20
20
|
|
|
21
21
|
// src/adapters/antigravity/index.ts
|
|
22
22
|
import { existsSync } from "fs";
|
|
@@ -674,4 +674,4 @@ export {
|
|
|
674
674
|
adapter,
|
|
675
675
|
antigravity_default
|
|
676
676
|
};
|
|
677
|
-
//# sourceMappingURL=chunk-
|
|
677
|
+
//# sourceMappingURL=chunk-4HVQ7IUM.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ensureDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IXOQDZWC.js";
|
|
5
5
|
|
|
6
6
|
// src/core/yaml.ts
|
|
7
7
|
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
writeYaml,
|
|
35
35
|
yamlObjectMapCodec
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-4NSU3KWX.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
assertNoSymlinkInPath,
|
|
4
4
|
ensureDir
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IXOQDZWC.js";
|
|
6
6
|
|
|
7
7
|
// src/core/config-patch-ledger.ts
|
|
8
8
|
import { createHash, randomBytes } from "crypto";
|
|
@@ -176,4 +176,4 @@ export {
|
|
|
176
176
|
removeLedgerOwner,
|
|
177
177
|
dropLedgerEntry
|
|
178
178
|
};
|
|
179
|
-
//# sourceMappingURL=chunk-
|
|
179
|
+
//# sourceMappingURL=chunk-56R2ER7K.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
defineConnector
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PZHB5TVA.js";
|
|
5
5
|
import {
|
|
6
6
|
assertNoSymlinkInPath,
|
|
7
7
|
connectorDir,
|
|
8
8
|
connectorsDir,
|
|
9
9
|
ensureDir
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IXOQDZWC.js";
|
|
11
11
|
|
|
12
12
|
// src/core/load-connector.ts
|
|
13
13
|
import { existsSync, readdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from "fs";
|
|
@@ -181,4 +181,4 @@ export {
|
|
|
181
181
|
connectorFromMeta,
|
|
182
182
|
listRegisteredConnectors
|
|
183
183
|
};
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-7NXEHZAK.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
allAdapters,
|
|
4
4
|
loadAdapter
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-X457NOFE.js";
|
|
6
6
|
|
|
7
7
|
// src/sdk/introspect.ts
|
|
8
8
|
function hostCanFireEvent(c, event) {
|
|
@@ -87,4 +87,4 @@ export {
|
|
|
87
87
|
hostsSupporting,
|
|
88
88
|
surfaceSupport
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-AMK2K6XZ.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
inferModelFamily,
|
|
5
5
|
openStore,
|
|
6
6
|
worstConfidence
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4FWETID5.js";
|
|
8
8
|
|
|
9
9
|
// src/telemetry/surface-footprint.ts
|
|
10
10
|
function countParts(parts, family, tok) {
|
|
@@ -590,4 +590,4 @@ export {
|
|
|
590
590
|
formatHostNativeTurns,
|
|
591
591
|
formatSurfaceLeaderboard
|
|
592
592
|
};
|
|
593
|
-
//# sourceMappingURL=chunk-
|
|
593
|
+
//# sourceMappingURL=chunk-AY3RGRTT.js.map
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
isNonDefaultDataRoot
|
|
4
|
+
} from "./chunk-IXOQDZWC.js";
|
|
2
5
|
|
|
3
6
|
// src/core/spawn.ts
|
|
4
7
|
import { existsSync } from "fs";
|
|
@@ -70,10 +73,11 @@ function isHostNativeUsageEnabled(telemetry, env = process.env) {
|
|
|
70
73
|
function shouldWrapForTelemetry(server, telemetry) {
|
|
71
74
|
return server.wrapForTelemetry !== false && telemetry.enabled === true && server.transport === "stdio" && typeof server.command === "string" && server.command !== "";
|
|
72
75
|
}
|
|
73
|
-
function buildServeWrapperCommand(homeBinPath, connectorId, realCommand, realArgs, scope, platformId) {
|
|
76
|
+
function buildServeWrapperCommand(homeBinPath, connectorId, realCommand, realArgs, scope, platformId, dataDir) {
|
|
74
77
|
const flags = ["serve", "--connector", connectorId];
|
|
75
78
|
if (scope !== void 0) flags.push("--scope", narrowInstallScope(scope));
|
|
76
79
|
if (platformId !== void 0) flags.push("--host", platformId);
|
|
80
|
+
if (dataDir !== void 0 && dataDir !== "") flags.push("--data-dir", dataDir);
|
|
77
81
|
return {
|
|
78
82
|
command: homeBinPath,
|
|
79
83
|
args: [...flags, "--", realCommand, ...realArgs]
|
|
@@ -83,13 +87,15 @@ function buildWrappedStdio(ctx, server, platformId, command, args) {
|
|
|
83
87
|
if (!shouldWrapForTelemetry(server, ctx.connector.telemetry)) {
|
|
84
88
|
return { command, args };
|
|
85
89
|
}
|
|
90
|
+
const dataDir = isNonDefaultDataRoot(ctx.dataRoot) ? ctx.dataRoot : void 0;
|
|
86
91
|
return buildServeWrapperCommand(
|
|
87
92
|
ctx.homeBinPath,
|
|
88
93
|
ctx.connector.id,
|
|
89
94
|
command,
|
|
90
95
|
args,
|
|
91
96
|
ctx.scope,
|
|
92
|
-
platformId
|
|
97
|
+
platformId,
|
|
98
|
+
dataDir
|
|
93
99
|
);
|
|
94
100
|
}
|
|
95
101
|
function resolveSpawnCommand(command, deps = {}) {
|
|
@@ -152,4 +158,4 @@ export {
|
|
|
152
158
|
resolveSpawnCommand,
|
|
153
159
|
detectLaunchMethod
|
|
154
160
|
};
|
|
155
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-HORHRHNG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/spawn.ts"],"sourcesContent":["/**\n * core/spawn — cross-platform command construction.\n *\n * Borrowed from context-mode (issues #369/#372/#548/#738): bare `node` is\n * unreliable on Windows Git Bash (MSYS) and MSYS rewrites absolute paths on\n * non-C: drives. Always use the resolved runtime path, forward slashes, and\n * double-quoting. No-ops on macOS/Linux.\n */\n\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nimport { isNonDefaultDataRoot } from \"./paths.js\";\nimport type { InstallScope, PlatformId, ServerDef } from \"./types.js\";\nimport type { InstallContext } from \"../adapters/spi.js\";\nimport type {\n LaunchMethod,\n TelemetryInstallScope,\n} from \"../telemetry/types.js\";\n\n/**\n * Narrow the framework's 5-value {@link InstallScope} down to the two telemetry\n * slicing buckets: only a `project`-local install is `project`; everything else\n * (system/user/profile/managed) is global and reads as `user`.\n */\nexport function narrowInstallScope(scope: InstallScope): TelemetryInstallScope {\n return scope === \"project\" ? \"project\" : \"user\";\n}\n\n/** Build `\"<nodePath>\" \"<scriptPath>\"`. */\nexport function buildNodeCommand(\n scriptPath: string,\n opts?: { nodePath?: string },\n): string {\n const nodePath = (opts?.nodePath ?? process.execPath).replace(/\\\\/g, \"/\");\n const safe = scriptPath.replace(/\\\\/g, \"/\");\n return `\"${nodePath}\" \"${safe}\"`;\n}\n\n/**\n * Strict inverse of buildNodeCommand. Returns the two quoted tokens, or null if\n * `cmd` was not produced by buildNodeCommand (no fragile last-whitespace tail\n * grabbing — that was the #548 doubled-path bug when paths contained spaces).\n */\nexport function parseNodeCommand(\n cmd: string,\n): { nodePath: string; scriptPath: string } | null {\n if (typeof cmd !== \"string\" || cmd.length === 0) return null;\n const m = cmd.match(/^\"([^\"]+)\"\\s+\"([^\"]+)\"\\s*$/);\n if (!m || !m[1] || !m[2]) return null;\n return { nodePath: m[1], scriptPath: m[2] };\n}\n\n/** Quote a single argument for inclusion in a host hook command string. */\nexport function quoteArg(arg: string): string {\n return `\"${arg.replace(/\\\\/g, \"/\")}\"`;\n}\n\n/**\n * True when `hay` (slash-normalized) has the quoted home-bin path IMMEDIATELY\n * followed by `verb` — i.e. the verb sits in its command SLOT (right after the\n * home binary), not merely somewhere in the argument list. This distinguishes\n * `\"<bin>\" statusline …` from `\"<bin>\" action … statusline …`: the action verb\n * takes a free-form `actionId` positional that can legitimately equal another\n * verb's name (`statusline` / `usage-event` / `hook`), and only the SLOT\n * position identifies the real verb. `homeBinNorm` is the slash-normalized\n * home-bin path the caller already derived.\n */\nfunction hasVerbSlot(hay: string, homeBinNorm: string, verb: string): boolean {\n return hay.includes(`\"${homeBinNorm}\" ${verb} `);\n}\n\n/**\n * Build the universal hook command a host config points at:\n * \"<homeBin>\" hook <platformId> <event> --connector <id>\n * Pointing every host at the one stable home binary is how a single update\n * propagates everywhere (docs/ARCHITECTURE.md §3 R1).\n */\nexport function buildHomeBinHookCommand(\n homeBinPath: string,\n platformId: string,\n event: string,\n connectorId: string,\n): string {\n return `${quoteArg(homeBinPath)} hook ${platformId} ${event} --connector ${connectorId}`;\n}\n\n/**\n * True when `command` is a home-bin hook command for exactly `connectorId`.\n *\n * Critical: the connector id is the LAST token of the hook command\n * (`... --connector <id>`), so a naive `command.includes(\"--connector \" + id)`\n * collides on shared-prefix ids — `--connector acme-db` contains\n * `--connector acme`, which would let uninstalling `acme` strip `acme-db`'s\n * hooks. We anchor the id token: the character after it must be end-of-string,\n * whitespace, or a closing double-quote (the JSON-embedded case). Connector ids\n * are kebab-case (ID_RE) so they never contain whitespace or quotes themselves.\n */\nexport function isHomeBinHookCommand(\n command: string | undefined,\n homeBinPath: string,\n connectorId: string,\n): boolean {\n if (!command) return false;\n // The stored command was forward-slashed by quoteArg(); homeBinPath() yields\n // NATIVE (back)slashes on Windows (node:path join). Normalize BOTH sides so the\n // ownership substring test holds on win32 (without this, detection always\n // returns false there → duplicate hooks on re-install + orphans on uninstall).\n // No-op on POSIX.\n const hay = command.replace(/\\\\/g, \"/\");\n if (!hay.includes(homeBinPath.replace(/\\\\/g, \"/\"))) return false;\n const token = `--connector ${connectorId}`;\n let from = 0;\n for (;;) {\n const idx = hay.indexOf(token, from);\n if (idx < 0) return false;\n const after = hay.charAt(idx + token.length);\n if (after === \"\" || after === '\"' || /\\s/.test(after)) return true;\n from = idx + token.length;\n }\n}\n\n/**\n * Build the OPT-IN host-native usage-event command an AfterModel / PostInvocation\n * hook points at:\n * \"<homeBin>\" usage-event <platformId> --connector <id>\n * Mirrors {@link buildHomeBinHookCommand} (same anchoring rules apply) but routes\n * to the hidden `usage-event` entrypoint, which records a DISTINCT `model_turn`\n * row instead of dispatching a connector handler.\n */\nexport function buildUsageEventCommand(\n homeBinPath: string,\n platformId: string,\n connectorId: string,\n): string {\n return `${quoteArg(homeBinPath)} usage-event ${platformId} --connector ${connectorId}`;\n}\n\n/**\n * True when `command` is OUR host-native usage-event command for exactly\n * `connectorId`. Same end-of-token anchoring as {@link isHomeBinHookCommand} so a\n * shared-prefix id can't collide; additionally requires the ` usage-event ` verb\n * so it is never confused with a plain `hook` command during uninstall.\n */\nexport function isUsageEventCommand(\n command: string | undefined,\n homeBinPath: string,\n connectorId: string,\n): boolean {\n if (!command) return false;\n // Normalize separators like isHomeBinHookCommand (win32 ownership detection).\n const hay = command.replace(/\\\\/g, \"/\");\n const homeBinNorm = homeBinPath.replace(/\\\\/g, \"/\");\n if (!hay.includes(homeBinNorm)) return false;\n if (!hasVerbSlot(hay, homeBinNorm, \"usage-event\")) return false;\n return isHomeBinHookCommand(command, homeBinPath, connectorId);\n}\n\n/**\n * Build the home-bin statusline command a host's status line config points at:\n * \"<homeBin>\" statusline <platformId> --connector <id>\n * Mirrors {@link buildHomeBinHookCommand} / {@link buildUsageEventCommand} (the\n * same single-home-binary indirection) but routes to the `statusline`\n * entrypoint, which renders the connector's HUD line for the host.\n */\nexport function buildHomeBinStatuslineCommand(\n homeBinPath: string,\n platformId: string,\n connectorId: string,\n): string {\n return `${quoteArg(homeBinPath)} statusline ${platformId} --connector ${connectorId}`;\n}\n\n/**\n * True when `command` is OUR home-bin statusline command for exactly\n * `connectorId`. Same end-of-token anchoring as {@link isHomeBinHookCommand} so a\n * shared-prefix id can't collide; additionally requires the ` statusline ` verb\n * so it is never confused with a plain `hook` / `usage-event` command.\n */\nexport function isHomeBinStatuslineCommand(\n command: string | undefined,\n homeBinPath: string,\n connectorId: string,\n): boolean {\n if (!command) return false;\n // Normalize separators like isHomeBinHookCommand (win32 ownership detection).\n const hay = command.replace(/\\\\/g, \"/\");\n const homeBinNorm = homeBinPath.replace(/\\\\/g, \"/\");\n if (!hay.includes(homeBinNorm)) return false;\n if (!hasVerbSlot(hay, homeBinNorm, \"statusline\")) return false;\n return isHomeBinHookCommand(command, homeBinPath, connectorId);\n}\n\n/**\n * Build the home-bin action command a future host affordance (slash command /\n * keybinding) points at:\n * \"<homeBin>\" action <platformId> <actionId> --connector <id>\n * Mirrors {@link buildHomeBinStatuslineCommand} (the same single-home-binary\n * indirection) but routes to the `action` entrypoint, which re-imports the\n * connector and runs the named action's run(ctx). v1 ships only this command\n * builder + the runtime verb; no adapter EMITS the affordance yet.\n */\nexport function buildHomeBinActionCommand(\n homeBinPath: string,\n platformId: string,\n actionId: string,\n connectorId: string,\n): string {\n return `${quoteArg(homeBinPath)} action ${platformId} ${actionId} --connector ${connectorId}`;\n}\n\n/**\n * True when `command` is OUR home-bin action command for exactly `connectorId`.\n * Same end-of-token anchoring as {@link isHomeBinHookCommand} so a shared-prefix\n * id can't collide; additionally requires the ` action ` verb so it is never\n * confused with a plain `hook` / `usage-event` / `statusline` command.\n */\nexport function isHomeBinActionCommand(\n command: string | undefined,\n homeBinPath: string,\n connectorId: string,\n): boolean {\n if (!command) return false;\n // Normalize separators like isHomeBinHookCommand (win32 ownership detection).\n const hay = command.replace(/\\\\/g, \"/\");\n const homeBinNorm = homeBinPath.replace(/\\\\/g, \"/\");\n if (!hay.includes(homeBinNorm)) return false;\n if (!hasVerbSlot(hay, homeBinNorm, \"action\")) return false;\n return isHomeBinHookCommand(command, homeBinPath, connectorId);\n}\n\n/**\n * Single source of truth for \"is OPT-IN host-native turn-usage capture enabled\n * for this connector?\" — read by the Gemini / Antigravity adapters at install\n * time to decide whether to ALSO write the AfterModel / PostInvocation usage hook.\n * Enabled when the connector opts in via telemetry.hostNativeUsage OR when the\n * install-time env switch AGENT_CONNECTOR_HOST_NATIVE=1 forces it on. Off by\n * default (privacy: host-native capture is never installed silently).\n */\nexport function isHostNativeUsageEnabled(\n telemetry: { enabled: boolean; hostNativeUsage?: boolean },\n env: NodeJS.ProcessEnv = process.env,\n): boolean {\n if (telemetry.enabled !== true) return false;\n if (env.AGENT_CONNECTOR_HOST_NATIVE === \"1\") return true;\n return telemetry.hostNativeUsage === true;\n}\n\n/**\n * Single source of truth for \"should this server be wrapped by `serve` for\n * telemetry?\" — so every adapter behaves identically even for a server that\n * skipped normalizeServer (e.g. a per-platform override). On by default for an\n * stdio server with a command, unless explicitly disabled or telemetry is off.\n */\nexport function shouldWrapForTelemetry(\n server: ServerDef,\n telemetry: { enabled: boolean },\n): boolean {\n return (\n server.wrapForTelemetry !== false &&\n telemetry.enabled === true &&\n server.transport === \"stdio\" &&\n typeof server.command === \"string\" &&\n server.command !== \"\"\n );\n}\n\n/**\n * Build the telemetry-wrapping server command:\n * \"<homeBin>\" serve --connector <id> --scope <scope> --host <platformId> -- <realCommand> <realArgs...>\n * Used when a stdio server opts into transparent telemetry capture.\n *\n * `scope` records the install dimension (global user vs project-local) on every\n * telemetry row so usage can be sliced by it later. It is OPTIONAL for backward\n * compatibility: when omitted, the `--scope` flag is not emitted and the runtime\n * treats the scope as \"unknown\".\n *\n * `platformId` bakes the install TARGET platform into the wrapper so the proxy\n * stamps `hostPlatform` correctly even under a headless spawn where runtime env\n * markers are absent (detectRuntimeHost only knows claude-code/cursor/codex and\n * otherwise mis-attributes). Emitted as `--host <platformId>` in the FLAG\n * section (before `--`). It is OPTIONAL + backward-compatible: when omitted the\n * `--host` flag is not emitted and the runtime falls back to env detection.\n *\n * `dataDir` pins the framework data-root the spawned `serve` child must use to\n * resolve the connector record (and write telemetry). Emitted as `--data-dir\n * <path>` in the FLAG section. It exists because some hosts (codex strips the\n * MCP child's environment) do NOT propagate `AGENT_CONNECTOR_DATA_DIR` to the\n * spawned server — so a child that relied on inheriting it would resolve the\n * DEFAULT `~/.agent-connector` and die with \"Connector not registered\" when the\n * install wrote the record under an OVERRIDDEN root. Passing it explicitly makes\n * the wrap env-independent for any env-stripping host. OPTIONAL + backward-\n * compatible: callers pass it only for a non-default root (a default-root install\n * stays flag-free and relies on the correct fallback), and when omitted the\n * `--data-dir` flag is not emitted and the runtime resolves the data-root the\n * usual way.\n */\nexport function buildServeWrapperCommand(\n homeBinPath: string,\n connectorId: string,\n realCommand: string,\n realArgs: string[],\n scope?: InstallScope,\n platformId?: PlatformId,\n dataDir?: string,\n): { command: string; args: string[] } {\n const flags = [\"serve\", \"--connector\", connectorId];\n if (scope !== undefined) flags.push(\"--scope\", narrowInstallScope(scope));\n if (platformId !== undefined) flags.push(\"--host\", platformId);\n if (dataDir !== undefined && dataDir !== \"\") flags.push(\"--data-dir\", dataDir);\n return {\n command: homeBinPath,\n args: [...flags, \"--\", realCommand, ...realArgs],\n };\n}\n\n/**\n * Telemetry serve-wrap for a stdio command: when the connector opts in, route\n * `command`/`args` through `<homeBin> serve --connector <id> -- …`; otherwise\n * return them unchanged. Consolidates the per-host wrap snippet — the caller\n * keeps its own command/args seeding + downstream env-resolution + entry shaping.\n *\n * When the install's framework data-root is NON-DEFAULT (overridden via\n * AGENT_CONNECTOR_DATA_DIR), the wrap also carries an explicit `--data-dir\n * <root>` so the spawned `serve` child resolves the connector record from that\n * root even on hosts that strip the child's environment (codex). A default-root\n * install emits no flag and relies on the correct runtime fallback.\n */\nexport function buildWrappedStdio(\n ctx: Pick<InstallContext, \"homeBinPath\" | \"connector\" | \"scope\" | \"dataRoot\">,\n server: ServerDef,\n platformId: PlatformId,\n command: string,\n args: string[],\n): { command: string; args: string[] } {\n if (!shouldWrapForTelemetry(server, ctx.connector.telemetry)) {\n return { command, args };\n }\n const dataDir = isNonDefaultDataRoot(ctx.dataRoot) ? ctx.dataRoot : undefined;\n return buildServeWrapperCommand(\n ctx.homeBinPath,\n ctx.connector.id,\n command,\n args,\n ctx.scope,\n platformId,\n dataDir,\n );\n}\n\n/** Injectable deps for {@link resolveSpawnCommand} (so the win32 branch is unit-testable on POSIX). */\nexport interface SpawnResolveDeps {\n platform?: NodeJS.Platform;\n /** PATH value (`;`-separated on Windows). */\n pathEnv?: string;\n /** PATHEXT value (`;`-separated). */\n pathExt?: string;\n /** File-existence probe (defaults to fs.existsSync). */\n exists?: (p: string) => boolean;\n}\n\n/** How a child command should be handed to spawn() on this platform. */\nexport interface SpawnResolution {\n /** The command to pass to spawn() (an absolute path on win32 when resolved). */\n file: string;\n /**\n * Whether spawn() MUST use `shell: true`. On native Windows a `.cmd`/`.bat`\n * shim (npx.cmd, pnpm.cmd, the agent-connector.cmd launcher) cannot be run by\n * raw CreateProcess — Node throws EINVAL since the 2024 security fix unless a\n * shell is used. `.exe` resolves directly with no shell.\n */\n needsShell: boolean;\n}\n\n/**\n * Resolve a child command for spawn() across platforms. NO-OP on macOS/Linux\n * (returns the command unchanged, no shell). On native Windows it fixes the two\n * spawn failure modes for bare package runners:\n * 1. raw CreateProcess ignores PATHEXT, so spawn(\"npx\") → ENOENT even though\n * `npx.cmd` is on PATH. We search PATH × PATHEXT and return the resolved\n * absolute path.\n * 2. a resolved `.cmd`/`.bat` still cannot be launched without a shell, so we\n * flag `needsShell` for those (and `.exe`/`.com` run directly).\n * A bare name that PATH search misses falls back to `{ file: command,\n * needsShell: true }` so cmd.exe's own PATHEXT lookup still finds it.\n */\nexport function resolveSpawnCommand(\n command: string,\n deps: SpawnResolveDeps = {},\n): SpawnResolution {\n const platform = deps.platform ?? process.platform;\n if (platform !== \"win32\") return { file: command, needsShell: false };\n\n const isBatch = (s: string): boolean => /\\.(cmd|bat)$/i.test(s);\n\n // Already a path or already has an extension → don't search; only decide shell.\n if (/[\\\\/]/.test(command) || /\\.[a-z0-9]+$/i.test(command)) {\n return { file: command, needsShell: isBatch(command) };\n }\n\n const exists = deps.exists ?? existsSync;\n const pathEnv = deps.pathEnv ?? process.env.PATH ?? process.env.Path ?? \"\";\n const pathExt = deps.pathExt ?? process.env.PATHEXT ?? \".COM;.EXE;.BAT;.CMD\";\n const dirs = pathEnv.split(\";\").filter((d) => d !== \"\");\n const exts = pathExt.split(\";\").filter((e) => e !== \"\");\n for (const dir of dirs) {\n for (const ext of exts) {\n const candidate = join(dir, command + ext);\n if (exists(candidate)) return { file: candidate, needsShell: isBatch(ext) };\n }\n }\n // Not found on PATH — let cmd.exe resolve it (handles shim dirs we may miss).\n return { file: command, needsShell: true };\n}\n\n/** Basenames (case-insensitive, sans common extensions) of the ephemeral package runners. */\nconst PACKAGE_RUNNERS: Record<string, Extract<LaunchMethod, \"npx\" | \"bunx\" | \"uvx\">> = {\n npx: \"npx\",\n bunx: \"bunx\",\n uvx: \"uvx\",\n};\n\n/** Basenames of language interpreters that launch a local script. */\nconst INTERPRETERS: ReadonlySet<string> = new Set([\"node\", \"bun\", \"deno\"]);\n\n/**\n * Strip a directory prefix and a trailing executable extension to get the bare\n * program name. Tolerates both POSIX and Windows separators (the wrapped command\n * may be an absolute Windows path) and lowercases for case-insensitive matching.\n */\nfunction commandBasename(realCommand: string): string {\n const noDir = realCommand.replace(/\\\\/g, \"/\").split(\"/\").pop() ?? realCommand;\n return noDir.replace(/\\.(exe|cmd|bat|com)$/i, \"\").toLowerCase();\n}\n\n/**\n * Classify how the real MCP server is launched, for the \"launch-method\" slicing\n * dimension. Package runners (npx/bunx/uvx) and interpreters (node/bun/deno) are\n * detected by the command basename. A remote (http) server is not launched\n * locally, so the caller — which alone knows the transport — passes\n * `isRemote: true` to force \"http\". Anything else resolves to \"binary\".\n */\nexport function detectLaunchMethod(\n realCommand: string,\n realArgs: string[],\n opts?: { isRemote?: boolean },\n): LaunchMethod {\n void realArgs; // reserved: args may later refine node-vs-script heuristics\n if (opts?.isRemote === true) return \"http\";\n if (typeof realCommand !== \"string\" || realCommand.trim() === \"\") {\n return \"unknown\";\n }\n const base = commandBasename(realCommand);\n if (base === \"\") return \"unknown\";\n const runner = PACKAGE_RUNNERS[base];\n if (runner !== undefined) return runner;\n if (INTERPRETERS.has(base)) return \"node\";\n return \"binary\";\n}\n"],"mappings":";;;;;;AASA,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AAed,SAAS,mBAAmB,OAA4C;AAC7E,SAAO,UAAU,YAAY,YAAY;AAC3C;AA2BO,SAAS,SAAS,KAAqB;AAC5C,SAAO,IAA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EAAE,MAAM,WAAW,YAAY,QAAQ,GAAG,EAAE;AAAA,IAC5E;AAAA,EACF;AAEA,SAAO,EAAE,MAAM,SAAS,YAAY,KAAK;AAC3C;AAGA,IAAM,kBAAiF;AAAA,EACrF,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AACP;AAGA,IAAM,eAAoC,oBAAI,IAAI,CAAC,QAAQ,OAAO,MAAM,CAAC;AAOzE,SAAS,gBAAgB,aAA6B;AACpD,QAAM,QAAQ,YAAY,QAAQ,OAAO,GAAG,EAAE,MAAM,GAAG,EAAE,IAAI,KAAK;AAClE,SAAO,MAAM,QAAQ,yBAAyB,EAAE,EAAE,YAAY;AAChE;AASO,SAAS,mBACd,aACA,UACA,MACc;AACd,OAAK;AACL,MAAI,MAAM,aAAa,KAAM,QAAO;AACpC,MAAI,OAAO,gBAAgB,YAAY,YAAY,KAAK,MAAM,IAAI;AAChE,WAAO;AAAA,EACT;AACA,QAAM,OAAO,gBAAgB,WAAW;AACxC,MAAI,SAAS,GAAI,QAAO;AACxB,QAAM,SAAS,gBAAgB,IAAI;AACnC,MAAI,WAAW,OAAW,QAAO;AACjC,MAAI,aAAa,IAAI,IAAI,EAAG,QAAO;AACnC,SAAO;AACT;","names":[]}
|
|
@@ -24,10 +24,16 @@ import {
|
|
|
24
24
|
} from "fs";
|
|
25
25
|
import { homedir } from "os";
|
|
26
26
|
import { basename, isAbsolute, join, parse, relative, resolve, sep } from "path";
|
|
27
|
+
function defaultDataRoot() {
|
|
28
|
+
return join(homedir(), ".agent-connector");
|
|
29
|
+
}
|
|
27
30
|
function dataRoot() {
|
|
28
31
|
const override = process.env.AGENT_CONNECTOR_DATA_DIR;
|
|
29
32
|
if (override && override.trim() !== "") return resolve(override);
|
|
30
|
-
return
|
|
33
|
+
return defaultDataRoot();
|
|
34
|
+
}
|
|
35
|
+
function isNonDefaultDataRoot(root) {
|
|
36
|
+
return resolve(root) !== resolve(defaultDataRoot());
|
|
31
37
|
}
|
|
32
38
|
function connectorsDir() {
|
|
33
39
|
return join(dataRoot(), "connectors");
|
|
@@ -130,6 +136,7 @@ export {
|
|
|
130
136
|
isValidConnectorId,
|
|
131
137
|
assertConnectorId,
|
|
132
138
|
dataRoot,
|
|
139
|
+
isNonDefaultDataRoot,
|
|
133
140
|
connectorsDir,
|
|
134
141
|
connectorDir,
|
|
135
142
|
backupsDir,
|
|
@@ -141,4 +148,4 @@ export {
|
|
|
141
148
|
ensureHomeBin,
|
|
142
149
|
projectIdentity
|
|
143
150
|
};
|
|
144
|
-
//# sourceMappingURL=chunk-
|
|
151
|
+
//# sourceMappingURL=chunk-IXOQDZWC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/ids.ts","../src/core/paths.ts"],"sourcesContent":["/** Shared connector-id grammar for author-time configs and runtime ids. */\nexport const CONNECTOR_ID_RE = /^[a-z0-9][a-z0-9-]*$/;\n\nexport function isValidConnectorId(id: unknown): id is string {\n return typeof id === \"string\" && CONNECTOR_ID_RE.test(id);\n}\n\nexport function assertConnectorId(id: unknown, label = \"connector id\"): string {\n if (isValidConnectorId(id)) return id;\n throw new Error(\n `${label} must be kebab-case matching ${CONNECTOR_ID_RE} (got ${JSON.stringify(id)})`,\n );\n}\n","/**\n * core/paths — home data-root, stable home binary, and project identity.\n *\n * Operating model (docs/ARCHITECTURE.md §3):\n * • One home data-root holds the single binary + shared telemetry + state.\n * Override with AGENT_CONNECTOR_DATA_DIR (the cross-agent shared-DB key).\n * This relocates FRAMEWORK state only — never platform-native config files.\n * • The home binary lives at a STABLE path so every host's pointer config\n * keeps working across updates (no versioned cache dir → no cache-heal bug).\n * • Per-project data is keyed by a stable project identity (git remote ||\n * normalized absolute path), hashed — not by code location.\n */\n\nimport { createHash } from \"node:crypto\";\nimport {\n chmodSync,\n existsSync,\n lstatSync,\n mkdirSync,\n readFileSync,\n writeFileSync,\n} from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { basename, isAbsolute, join, parse, relative, resolve, sep } from \"node:path\";\n\nimport { assertConnectorId } from \"./ids.js\";\n\n/** The built-in default framework data-root (`~/.agent-connector`), ignoring\n * any AGENT_CONNECTOR_DATA_DIR override. */\nexport function defaultDataRoot(): string {\n return join(homedir(), \".agent-connector\");\n}\n\n/** Framework data-root: AGENT_CONNECTOR_DATA_DIR || ~/.agent-connector. */\nexport function dataRoot(): string {\n const override = process.env.AGENT_CONNECTOR_DATA_DIR;\n if (override && override.trim() !== \"\") return resolve(override);\n return defaultDataRoot();\n}\n\n/**\n * True when `root` is a NON-DEFAULT data root — i.e. it differs from the\n * built-in `~/.agent-connector`. Compared after `resolve()` so two spellings of\n * the same dir read as equal. Used at install time to decide whether the\n * telemetry serve-wrap must carry an explicit `--data-dir` flag: a default-root\n * install relies on the (correct) fallback and stays flag-free, but an overridden\n * root must be passed explicitly because some hosts (codex) strip the child env,\n * so the spawned `serve` would otherwise resolve the default root and fail to\n * find the connector record written under the overridden one.\n */\nexport function isNonDefaultDataRoot(root: string): boolean {\n return resolve(root) !== resolve(defaultDataRoot());\n}\n\nexport function connectorsDir(): string {\n return join(dataRoot(), \"connectors\");\n}\nexport function connectorDir(id: string): string {\n const root = resolve(connectorsDir());\n const safeId = assertConnectorId(id);\n const dir = resolve(root, safeId);\n const rel = relative(root, dir);\n if (rel === \"\" || rel.startsWith(\"..\") || isAbsolute(rel)) {\n throw new Error(`connector record path escapes ${root}: ${id}`);\n }\n return dir;\n}\nexport function backupsDir(): string {\n return join(dataRoot(), \"backups\");\n}\nexport function logsDir(): string {\n return join(dataRoot(), \"logs\");\n}\n\n/** Telemetry store path for the selected backend. */\nexport function telemetryPath(store: \"ndjson\" | \"sqlite\" = \"ndjson\"): string {\n return join(dataRoot(), store === \"sqlite\" ? \"telemetry.db\" : \"telemetry.ndjson\");\n}\n\n/** Stable, OS-correct path to the single home binary pointer. */\nexport function homeBinPath(): string {\n const name = process.platform === \"win32\" ? \"agent-connector.cmd\" : \"agent-connector\";\n return join(dataRoot(), \"bin\", name);\n}\n\nexport function ensureDir(dir: string): void {\n if (!existsSync(dir)) mkdirSync(dir, { recursive: true });\n}\n\n/**\n * Return the first existing symbolic-link component in `path`, or null when the\n * existing prefix is symlink-free. Stops at the first missing component so new\n * directories/files can still be created normally.\n */\nexport function firstSymlinkInPath(path: string): string | null {\n const abs = resolve(path);\n const root = parse(abs).root;\n const rest = relative(root, abs);\n if (rest === \"\") return null;\n\n let cur = root;\n for (const part of rest.split(sep)) {\n if (part === \"\") continue;\n cur = join(cur, part);\n try {\n if (lstatSync(cur).isSymbolicLink()) return cur;\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code;\n if (code === \"ENOENT\") return null;\n throw err;\n }\n }\n return null;\n}\n\nexport function assertNoSymlinkInPath(path: string): void {\n const symlink = firstSymlinkInPath(path);\n if (symlink !== null) {\n throw new Error(`${basename(path)} skipped: symbolic link in path (${symlink})`);\n }\n}\n\n/**\n * Write a stable launcher at homeBinPath() that execs the real CLI entry.\n * Avoids symlinks (Windows constraint) and versioned paths. Idempotent.\n *\n * @param cliEntry absolute path to the installed cli.js\n * @param nodePath node runtime to exec with (defaults to current process.execPath)\n * @returns the stable launcher path\n */\nexport function ensureHomeBin(cliEntry: string, nodePath: string = process.execPath): string {\n const binPath = homeBinPath();\n assertNoSymlinkInPath(binPath);\n ensureDir(join(dataRoot(), \"bin\"));\n const node = nodePath.replace(/\\\\/g, \"/\");\n const cli = cliEntry.replace(/\\\\/g, \"/\");\n if (process.platform === \"win32\") {\n writeFileSync(binPath, `@echo off\\r\\n\"${node}\" \"${cli}\" %*\\r\\n`, \"utf8\");\n } else {\n writeFileSync(binPath, `#!/bin/sh\\nexec \"${node}\" \"${cli}\" \"$@\"\\n`, \"utf8\");\n chmodSync(binPath, 0o755);\n }\n return binPath;\n}\n\n/** Read remote.origin.url from a project's .git/config without spawning git. */\nfunction gitRemoteUrl(projectDir: string): string | null {\n const cfg = join(projectDir, \".git\", \"config\");\n if (!existsSync(cfg)) return null;\n try {\n const text = readFileSync(cfg, \"utf8\");\n // Find [remote \"origin\"] ... url = X\n const lines = text.split(/\\r?\\n/);\n let inOrigin = false;\n for (const line of lines) {\n const s = line.trim();\n if (s.startsWith(\"[\")) inOrigin = /^\\[remote\\s+\"origin\"\\]$/.test(s);\n else if (inOrigin) {\n const m = s.match(/^url\\s*=\\s*(.+)$/);\n if (m && m[1]) return m[1].trim();\n }\n }\n } catch {\n /* ignore */\n }\n return null;\n}\n\nexport interface ProjectIdentity {\n /** Hashed stable key used to partition telemetry/state. */\n key: string;\n /** Human-readable label (git remote or directory name). */\n label: string;\n /** Absolute project directory. */\n dir: string;\n}\n\n/**\n * Derive a stable project identity. Prefers the git origin URL (stable across\n * clones/locations); falls back to the normalized absolute path.\n */\nexport function projectIdentity(projectDir: string): ProjectIdentity {\n const dir = resolve(projectDir);\n const remote = gitRemoteUrl(dir);\n const basis = remote ?? dir;\n const key = createHash(\"sha256\").update(basis).digest(\"hex\").slice(0, 16);\n return { key, label: remote ?? basename(dir), dir };\n}\n"],"mappings":";;;AACO,IAAM,kBAAkB;AAExB,SAAS,mBAAmB,IAA2B;AAC5D,SAAO,OAAO,OAAO,YAAY,gBAAgB,KAAK,EAAE;AAC1D;AAEO,SAAS,kBAAkB,IAAa,QAAQ,gBAAwB;AAC7E,MAAI,mBAAmB,EAAE,EAAG,QAAO;AACnC,QAAM,IAAI;AAAA,IACR,GAAG,KAAK,gCAAgC,eAAe,SAAS,KAAK,UAAU,EAAE,CAAC;AAAA,EACpF;AACF;;;ACCA,SAAS,kBAAkB;AAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe;AACxB,SAAS,UAAU,YAAY,MAAM,OAAO,UAAU,SAAS,WAAW;AAMnE,SAAS,kBAA0B;AACxC,SAAO,KAAK,QAAQ,GAAG,kBAAkB;AAC3C;AAGO,SAAS,WAAmB;AACjC,QAAM,WAAW,QAAQ,IAAI;A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AAG,QAAO,EAAE,CAAC,EAAE,KAAK;AAAA,MAClC;AAAA,IACF;AAAA,EACF,QAAQ;AAAA,EAER;AACA,SAAO;AACT;AAeO,SAAS,gBAAgB,YAAqC;AACnE,QAAM,MAAM,QAAQ,UAAU;AAC9B,QAAM,SAAS,aAAa,GAAG;AAC/B,QAAM,QAAQ,UAAU;AACxB,QAAM,MAAM,WAAW,QAAQ,EAAE,OAAO,KAAK,EAAE,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE;AACxE,SAAO,EAAE,KAAK,OAAO,UAAU,SAAS,GAAG,GAAG,IAAI;AACpD;","names":[]}
|
|
@@ -6,41 +6,41 @@ import {
|
|
|
6
6
|
} from "./chunk-OP4KBXUO.js";
|
|
7
7
|
import {
|
|
8
8
|
spawnChild
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LN76OGNR.js";
|
|
10
10
|
import {
|
|
11
11
|
detectRuntimeHost
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-S4E6QQEM.js";
|
|
13
13
|
import {
|
|
14
14
|
attachLazyTelemetryUsage,
|
|
15
15
|
buildTelemetryAccessor,
|
|
16
16
|
measureToolCall,
|
|
17
17
|
measureToolDefs
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZXX5DVSE.js";
|
|
19
19
|
import {
|
|
20
20
|
getTokenizer,
|
|
21
21
|
inferModelFamily,
|
|
22
22
|
newRecordId,
|
|
23
23
|
openStore
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-4FWETID5.js";
|
|
25
25
|
import {
|
|
26
26
|
log
|
|
27
27
|
} from "./chunk-KHO5WNTP.js";
|
|
28
28
|
import {
|
|
29
29
|
loadRegisteredConnector,
|
|
30
30
|
readRegisteredMeta
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7NXEHZAK.js";
|
|
32
32
|
import {
|
|
33
33
|
REGISTERED_PLATFORM_IDS,
|
|
34
34
|
loadAdapter
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-X457NOFE.js";
|
|
36
36
|
import {
|
|
37
37
|
detectLaunchMethod
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-HORHRHNG.js";
|
|
39
39
|
import {
|
|
40
40
|
dataRoot,
|
|
41
41
|
ensureDir,
|
|
42
42
|
projectIdentity
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-IXOQDZWC.js";
|
|
44
44
|
|
|
45
45
|
// src/runtime/serve.ts
|
|
46
46
|
import { randomUUID } from "crypto";
|
|
@@ -431,7 +431,17 @@ function resolveSessionId(env = process.env) {
|
|
|
431
431
|
return env.AGENT_CONNECTOR_SESSION || env.CLAUDE_SESSION_ID || env.CODEX_THREAD_ID || env.CURSOR_TRACE_ID || env.MCP_SESSION_ID || `proc-${randomUUID()}`;
|
|
432
432
|
}
|
|
433
433
|
async function runServe(opts) {
|
|
434
|
-
const {
|
|
434
|
+
const {
|
|
435
|
+
connectorId,
|
|
436
|
+
serverCommand,
|
|
437
|
+
serverArgs,
|
|
438
|
+
installScope,
|
|
439
|
+
hostPlatformOverride,
|
|
440
|
+
dataDir
|
|
441
|
+
} = opts;
|
|
442
|
+
if (dataDir !== void 0 && dataDir.trim() !== "") {
|
|
443
|
+
process.env.AGENT_CONNECTOR_DATA_DIR = dataDir;
|
|
444
|
+
}
|
|
435
445
|
const connector = await loadRegisteredConnector(connectorId);
|
|
436
446
|
const id = projectIdentity(process.cwd());
|
|
437
447
|
const hostPlatform = hostPlatformOverride !== void 0 && REGISTERED_PLATFORM_IDS.has(hostPlatformOverride) ? hostPlatformOverride : detectRuntimeHost().platform;
|
|
@@ -691,4 +701,4 @@ export {
|
|
|
691
701
|
runStatusline,
|
|
692
702
|
runAction
|
|
693
703
|
};
|
|
694
|
-
//# sourceMappingURL=chunk-
|
|
704
|
+
//# sourceMappingURL=chunk-LKAVD4HP.js.map
|