@outerlayer/cli 0.36.0-next.20261102124202 → 0.36.0-next.20261102195652
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/agent-setup-5UWZZMZM.js +39 -0
- package/dist/agent-subcommand-4TEUJJNL.js +25 -0
- package/dist/{bridge-DFG2GTXQ.js → bridge-4KPODDN7.js} +6 -4
- package/dist/{build-THAD3B4Q.js → build-3CEFKWGY.js} +13 -11
- package/dist/{build-disk-HO2VPIBJ.js → build-disk-DLW3WKC5.js} +11 -9
- package/dist/build-info.json +1 -1
- package/dist/{builder-AXJNIF4S.js → builder-ALMQ5AWP.js} +10 -8
- package/dist/caller-XNBGW4SP.js +22 -0
- package/dist/{check-SF2OVZXB.js → check-AEDFTYH6.js} +61 -59
- package/dist/{chunk-772ILTCK.js → chunk-2XN34EKQ.js} +3 -3
- package/dist/{chunk-KN4VIK53.js → chunk-2YC3TXWX.js} +1 -1
- package/dist/{chunk-6JJITHBI.js → chunk-42DBDDHP.js} +1 -1
- package/dist/chunk-4DLJ343I.js +38 -0
- package/dist/{chunk-5WYT3PPE.js → chunk-4OD45RBP.js} +4 -1
- package/dist/{chunk-PTPF36Q7.js → chunk-4UUKUOS7.js} +3 -3
- package/dist/{chunk-RK4JQRVT.js → chunk-5XX75FJ6.js} +9 -9
- package/dist/{chunk-TWYHSMHM.js → chunk-6JLYU322.js} +3 -2
- package/dist/{chunk-5GHJFETA.js → chunk-6KH3NMIT.js} +3010 -1196
- package/dist/{chunk-GSXGA6KF.js → chunk-6QSIK5VA.js} +1 -1
- package/dist/{chunk-5FIOUQGC.js → chunk-6Z7R24XA.js} +8 -8
- package/dist/{chunk-LVXR37OG.js → chunk-73E33ZA2.js} +9 -8
- package/dist/{chunk-4TNUQLXH.js → chunk-7UGMB5VS.js} +12 -11
- package/dist/{chunk-J7TCTARR.js → chunk-7XTLS5PG.js} +5 -5
- package/dist/{chunk-K3X3L5YW.js → chunk-A24PDRNU.js} +6 -6
- package/dist/{chunk-GDZTL6BI.js → chunk-A2U7T4ZH.js} +123 -277
- package/dist/{chunk-GZ75FRLB.js → chunk-B36NSEUM.js} +1 -1
- package/dist/{chunk-XHFSBSIA.js → chunk-B5SWBFVE.js} +3 -2
- package/dist/{chunk-NTMRMBLM.js → chunk-BACWWK3E.js} +22 -7
- package/dist/{chunk-RSRZDF3K.js → chunk-BN5U4RJU.js} +11 -9
- package/dist/{chunk-NC3QAHOS.js → chunk-BSPJI5T7.js} +4 -2
- package/dist/{chunk-A5Y2HBVU.js → chunk-BZSJ77MO.js} +1 -1
- package/dist/{chunk-L3JXQDVH.js → chunk-CA4OE2QT.js} +4 -4
- package/dist/{chunk-ESSJPSJ2.js → chunk-CI5LFLKH.js} +2 -2
- package/dist/{chunk-M2NIHHQI.js → chunk-CXJC3JLN.js} +3 -2
- package/dist/{chunk-WDQPBAFV.js → chunk-D6EXW4EB.js} +2 -1
- package/dist/{chunk-PQDFW422.js → chunk-D74RGORK.js} +1 -1
- package/dist/{chunk-NWBB2SQ4.js → chunk-DL2RYNXQ.js} +66 -25
- package/dist/{chunk-J7Y3PCO2.js → chunk-DTQPDMHG.js} +2 -1
- package/dist/{chunk-6LO62EQ5.js → chunk-F36EKGMP.js} +712 -249
- package/dist/{chunk-HIN4BMRW.js → chunk-FIUUESD4.js} +5 -5
- package/dist/{chunk-XLOM2BNL.js → chunk-FOSYM7TQ.js} +1 -1
- package/dist/{chunk-LCOQN6NR.js → chunk-FWKQHKCR.js} +4 -4
- package/dist/{chunk-IP7BIBXJ.js → chunk-FWSVWPMS.js} +16 -7
- package/dist/{chunk-GD6KIHOS.js → chunk-G35Y4LN5.js} +5 -2
- package/dist/{chunk-LSXHTBAM.js → chunk-GBGJGYEE.js} +7 -7
- package/dist/{chunk-Q42K6XZ6.js → chunk-H23JP73I.js} +1 -1
- package/dist/{chunk-WLMAGMTU.js → chunk-H2NJG3TE.js} +4 -3
- package/dist/{chunk-4CTVN3C5.js → chunk-HRBSEXYC.js} +5 -5
- package/dist/{chunk-T5Z22NA6.js → chunk-HRHWA6TZ.js} +1 -1
- package/dist/chunk-HTRDL42C.js +45 -0
- package/dist/{chunk-WNYH42PF.js → chunk-HZVS4MGL.js} +7 -7
- package/dist/{chunk-YBAVN6WS.js → chunk-I4DM7SNX.js} +7 -7
- package/dist/{chunk-CKPQOQFC.js → chunk-I6U6QPN6.js} +769 -101
- package/dist/{chunk-QJDX6VJS.js → chunk-IX6CFXSW.js} +10 -9
- package/dist/{chunk-FIO6PIZ6.js → chunk-J2OMKFYB.js} +3 -3
- package/dist/{chunk-C3JWWPLC.js → chunk-J6HWRVN2.js} +10 -8
- package/dist/{chunk-PT34C6SU.js → chunk-J6VC3JCG.js} +1 -1
- package/dist/{chunk-I6FRCBMU.js → chunk-JBPVEXHQ.js} +8 -8
- package/dist/{chunk-EBIYRRJW.js → chunk-JVHWWJ2J.js} +80 -94
- package/dist/{chunk-LYFLUNWK.js → chunk-KN3TDNF7.js} +7 -7
- package/dist/{chunk-RPZIHELI.js → chunk-LHHDX7FB.js} +5 -5
- package/dist/{chunk-FUJUFLDC.js → chunk-LO4CK734.js} +8 -14
- package/dist/chunk-LSLK4RS4.js +82 -0
- package/dist/{chunk-I626B72C.js → chunk-LSZUTI6O.js} +1 -1
- package/dist/{chunk-JVCQZDQ6.js → chunk-LZS5EYZ6.js} +1 -1
- package/dist/{chunk-OYKAOHX5.js → chunk-M4HH2F64.js} +6 -6
- package/dist/{chunk-CVGQ3BNF.js → chunk-ML5YKV3B.js} +1 -1
- package/dist/{chunk-H2FFONRY.js → chunk-MVPOYQQY.js} +1 -1
- package/dist/{chunk-JXXHLQQR.js → chunk-NMBXA3AT.js} +3 -3
- package/dist/{chunk-VRQM4A64.js → chunk-PBGNX3PS.js} +1 -1
- package/dist/{chunk-CJJDJ7AT.js → chunk-PIZA7OG2.js} +5 -3
- package/dist/{chunk-L2BA2HXM.js → chunk-PN4LWT5F.js} +1 -1
- package/dist/{chunk-TYCZVJTB.js → chunk-PSQEGJPN.js} +5 -5
- package/dist/{chunk-EUDG754F.js → chunk-SBZ545DH.js} +2 -2
- package/dist/{chunk-5FND4PIU.js → chunk-T2KBHW6P.js} +3 -3
- package/dist/chunk-T5QBWM6M.js +113 -0
- package/dist/{chunk-XABJMU5A.js → chunk-UCMIS74X.js} +2 -2
- package/dist/{chunk-564Q2STF.js → chunk-VKKKVYA4.js} +1 -1
- package/dist/{chunk-AAGU5FJF.js → chunk-WGC7UFRM.js} +1 -1
- package/dist/{chunk-XAOIHYPS.js → chunk-WVAXJOWG.js} +5 -4
- package/dist/{chunk-AYLYAOHH.js → chunk-XIDDJSQU.js} +3 -2
- package/dist/{chunk-OZOATEK3.js → chunk-Y2P3HWUG.js} +6 -6
- package/dist/{chunk-PKO5IDW4.js → chunk-Y5S2G2EZ.js} +7 -7
- package/dist/{chunk-WQB3XOEP.js → chunk-Z3MB7SV7.js} +6 -6
- package/dist/{chunk-XE3DIJJT.js → chunk-Z66CKWOM.js} +1 -1
- package/dist/chunk-ZHQC43NH.js +130 -0
- package/dist/{chunk-3FSKTGM6.js → chunk-ZSRMJOAK.js} +3 -3
- package/dist/{claude-launcher-LXZPTDNC.js → claude-launcher-NJGZUB3P.js} +82 -108
- package/dist/{cli-QFUT3UQS.js → cli-POIDBCZA.js} +323 -293
- package/dist/{command-45RZT4CK.js → command-ZLBFX553.js} +55 -53
- package/dist/config-GKSSGMXD.js +21 -0
- package/dist/{connect-cmd-LUCQ7FSV.js → connect-cmd-6YKNFJJR.js} +12 -10
- package/dist/{container-start-T776VI3M.js → container-start-55QELXPJ.js} +53 -51
- package/dist/{context-cleanup-QE2MIO2Q.js → context-cleanup-3K2AOECJ.js} +4 -2
- package/dist/{context-show-cmd-7QEHUOEL.js → context-show-cmd-FGMRJ7IG.js} +13 -11
- package/dist/{control-plane-launch-THUH6YU5.js → control-plane-launch-DGPA3ONU.js} +25 -21
- package/dist/{demo-record-cmd-SBERRQNW.js → demo-record-cmd-2OKCGST7.js} +7 -5
- package/dist/{demo-voice-cmd-VM3FITZU.js → demo-voice-cmd-BPTSL7JA.js} +24 -22
- package/dist/{dist-6KGTCWKR.js → dist-VVZIGSAF.js} +1 -1
- package/dist/{docker-MQNLK4OO.js → docker-GFEEV42Z.js} +10 -8
- package/dist/{doctor-NQOSPJGS.js → doctor-ZOQSI3HL.js} +55 -53
- package/dist/emit-artifact-cmd-3LDJ4VRW.js +43 -0
- package/dist/{emit-cmd-ZPFCPVSR.js → emit-cmd-RO4L4PFZ.js} +7 -5
- package/dist/emit-criteria-cmd-V3ERJXHB.js +34 -0
- package/dist/{emit-demo-cmd-PMQGNNVX.js → emit-demo-cmd-5KL64L74.js} +24 -22
- package/dist/{emit-finding-cmd-MYWQN5WW.js → emit-finding-cmd-R4OEWQQR.js} +17 -15
- package/dist/{emit-result-cmd-GXK3KMAP.js → emit-result-cmd-5YNQDTYG.js} +22 -20
- package/dist/{emit-step-cmd-ZV2XTUVT.js → emit-step-cmd-Z5WC7UEQ.js} +17 -15
- package/dist/{exec-client-P7RFRUCK.js → exec-client-54XKNPTI.js} +7 -5
- package/dist/find-unit-OI56YEX5.js +23 -0
- package/dist/{findings-cmd-OGMBVVSM.js → findings-cmd-J5ZCY2AT.js} +17 -15
- package/dist/{fleet-readiness-4RBKLXBQ.js → fleet-readiness-DKCFOUYP.js} +13 -11
- package/dist/{governing-source-XJMXFSAR.js → governing-source-7PD4ISRN.js} +21 -19
- package/dist/{guest-init-XZHRPIMG.js → guest-init-5QZRGP62.js} +8 -6
- package/dist/{hook-fast-ZOWGWCPO.js → hook-fast-ICT2PRQX.js} +4 -2
- package/dist/{pending-YU2GE2UV.js → hook-install-GDNRMML4.js} +5 -5
- package/dist/{hook-wrap-fast-545QJSBJ.js → hook-wrap-fast-LWWKKPGK.js} +4 -2
- package/dist/host-checks-GADKYJFN.js +78 -0
- package/dist/host-key-FI6KWMJC.js +16 -0
- package/dist/{image-tag-E4JK2APF.js → image-tag-RX4WTHJH.js} +7 -5
- package/dist/index.js +8 -9
- package/dist/{init-LO6U7YTW.js → init-BZXVQO22.js} +51 -49
- package/dist/init-EKF4ILHF.js +78 -0
- package/dist/{init-cmd-2JANO5EN.js → init-cmd-3LWFEKHD.js} +35 -29
- package/dist/{init-update-D6PRTGNE.js → init-update-THEHC25C.js} +24 -22
- package/dist/{install-cmd-SJMBNQEH.js → install-cmd-WBVTTE5Z.js} +9 -7
- package/dist/{layout-AQHIMJMO.js → layout-7XMC7S6K.js} +4 -2
- package/dist/{logs-NE55HOET.js → logs-7YIXBO2K.js} +6 -4
- package/dist/loop-RUQQ4L5A.js +89 -0
- package/dist/machine-IGHZW3IO.js +78 -0
- package/dist/{machine-skills-KK2HXYMR.js → machine-skills-HR4RNRNR.js} +4 -2
- package/dist/{mcp-install-cmd-2QAS3AQZ.js → mcp-install-cmd-SMPLT43Q.js} +4 -2
- package/dist/{mcp-serve-cmd-U6USKHYR.js → mcp-serve-cmd-HLS24XCG.js} +8 -6
- package/dist/{paths-O7LCWY33.js → paths-2YTU4QIO.js} +6 -4
- package/dist/pending-S2SKIBCB.js +16 -0
- package/dist/{pidfile-5GDCQ5HA.js → pidfile-SPBTMTCJ.js} +7 -5
- package/dist/{record-NETSDAO6.js → record-3KXRFK5C.js} +7 -5
- package/dist/{relay-VZ733BVJ.js → relay-I2T43PPB.js} +4 -2
- package/dist/{relay-protocol-24GEUGCO.js → relay-protocol-GI2GC2AM.js} +4 -2
- package/dist/runner-env-HOWRS6I6.js +23 -0
- package/dist/{runner-identity-PSCZBILD.js → runner-identity-32MTGA2F.js} +10 -8
- package/dist/{runner-key-VM2LYVRK.js → runner-key-FXYWHMMO.js} +51 -49
- package/dist/{session-sender-P2RHDM6U.js → session-sender-B6INUY7G.js} +23 -21
- package/dist/{shell-function-NRD4KVUK.js → shell-function-GYD2ZQQG.js} +2 -1
- package/dist/{spec-cmd-LGKP6MT7.js → spec-cmd-ZEZFMC4A.js} +18 -16
- package/dist/{starter-pack-SMK6UPRL.js → starter-pack-IMKIUA56.js} +5 -3
- package/dist/state-DVKFUWB3.js +16 -0
- package/dist/{status-HEHCNIDS.js → status-VPFIIHOZ.js} +51 -49
- package/dist/{statusline-fast-E7RWVREA.js → statusline-fast-NUVHCNRX.js} +4 -2
- package/dist/{sync-cmd-HKN45HXL.js → sync-cmd-W756BQWX.js} +22 -20
- package/dist/update-steps-D6L6AG6E.js +79 -0
- package/dist/{watch-RGZCUCR3.js → watch-6EDRJZMG.js} +22 -20
- package/dist/{work-claim-cmd-6DSPGCZE.js → work-claim-cmd-7HR4AVCT.js} +22 -20
- package/dist/{work-cmd-GPLYLWY7.js → work-cmd-ZP4UIHBT.js} +15 -13
- package/dist/{work-comment-cmd-V5WM7LAW.js → work-comment-cmd-CYDOEMW3.js} +18 -16
- package/dist/{work-demo-cmd-SWWI6AGD.js → work-demo-cmd-3A7Z3VVS.js} +15 -13
- package/dist/{work-launch-TTGSHLY4.js → work-launch-LWDQXLGI.js} +1 -1
- package/dist/{work-logs-cmd-CTFBOPCI.js → work-logs-cmd-NDPSRSCM.js} +15 -13
- package/dist/{work-open-pr-cmd-HX2U3YBR.js → work-open-pr-cmd-Z5B3ERAU.js} +17 -15
- package/dist/{work-pr-cmd-EI2R4FQG.js → work-pr-cmd-ZVPGCDWD.js} +16 -14
- package/dist/{work-proofs-cmd-QXNPHLYC.js → work-proofs-cmd-VAXJ5UBF.js} +18 -16
- package/dist/{work-proofs-record-72OKWEES.js → work-proofs-record-K467JH24.js} +28 -26
- package/dist/{work-stop-cmd-7M7ZYUN2.js → work-stop-cmd-J45Q2QT7.js} +15 -13
- package/package.json +3 -3
- package/dist/agent-setup-AOB76EDJ.js +0 -37
- package/dist/caller-GOY2X6QT.js +0 -20
- package/dist/chunk-KYDEBGJG.js +0 -402
- package/dist/config-WYQPXLOP.js +0 -19
- package/dist/emit-artifact-cmd-6E365VBQ.js +0 -41
- package/dist/emit-criteria-cmd-HWQOYZZ4.js +0 -32
- package/dist/find-unit-63SXQ7IM.js +0 -21
- package/dist/host-checks-WHW24PJR.js +0 -76
- package/dist/host-key-MWLXB5U5.js +0 -14
- package/dist/init-EZIAHBMH.js +0 -76
- package/dist/loop-2E34CGCX.js +0 -87
- package/dist/machine-6ALGG4IO.js +0 -76
- package/dist/runner-env-KHCONH2R.js +0 -21
- package/dist/settings-XB2HYBKO.js +0 -7
- package/dist/state-RJR4PMMX.js +0 -14
- package/dist/update-steps-7E4RD47J.js +0 -77
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
|
|
4
|
+
createRequire(import.meta.url);
|
|
5
|
+
|
|
6
|
+
// ../agents/src/claude-code/descriptor.ts
|
|
7
|
+
var CLAUDE_CODE = {
|
|
8
|
+
id: "claude-code",
|
|
9
|
+
label: "Claude Code",
|
|
10
|
+
color: "#D97757",
|
|
11
|
+
program: "claude",
|
|
12
|
+
legacy: {
|
|
13
|
+
subcommand: "claude",
|
|
14
|
+
runnerName: "claude",
|
|
15
|
+
usageEventValue: "claude_code",
|
|
16
|
+
envFile: "claude.env",
|
|
17
|
+
credentialId: "claude",
|
|
18
|
+
imagePaths: ["/opt/outerlayer/claude", "/usr/local/bin/claude", "/etc/claude-code"],
|
|
19
|
+
toolsVersionKey: "claudeCodeVersion",
|
|
20
|
+
handOffKey: "claudeCredential"
|
|
21
|
+
},
|
|
22
|
+
versions: { minimum: "2.1.284", tested: { from: "2.1.0", to: "2.1.255" } },
|
|
23
|
+
providers: ["anthropic"],
|
|
24
|
+
credentials: {
|
|
25
|
+
label: "Claude",
|
|
26
|
+
setupCommand: "claude setup-token",
|
|
27
|
+
forwarded: ["CLAUDE_CODE_OAUTH_TOKEN", "ANTHROPIC_API_KEY"],
|
|
28
|
+
stripped: ["CLAUDE_CODE_OAUTH_TOKEN", "ANTHROPIC_API_KEY", "ANTHROPIC_AUTH_TOKEN"],
|
|
29
|
+
placeholders: {
|
|
30
|
+
CLAUDE_CODE_OAUTH_TOKEN: "sk-ant-oat01-placeholder-not-a-real-token",
|
|
31
|
+
ANTHROPIC_API_KEY: "sk-ant-api03-placeholder-not-a-real-key"
|
|
32
|
+
},
|
|
33
|
+
kinds: {
|
|
34
|
+
CLAUDE_CODE_OAUTH_TOKEN: { pattern: "^sk-ant-oat[0-9]*-[A-Za-z0-9_-]+$", provider: "anthropic", providerKind: "oauth-token", starts: "sk-ant-oat" },
|
|
35
|
+
ANTHROPIC_API_KEY: { pattern: "^sk-ant-api[0-9]*-[A-Za-z0-9_-]+$", provider: "anthropic", providerKind: "api-key", starts: "sk-ant-api" },
|
|
36
|
+
ANTHROPIC_AUTH_TOKEN: { pattern: ".+", provider: "anthropic", providerKind: "oauth-token", starts: "" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
context: {
|
|
40
|
+
instructionFiles: ["CLAUDE.md"],
|
|
41
|
+
repoSkillFolders: [".claude/skills"],
|
|
42
|
+
userSkillFolder: "~/.claude/skills",
|
|
43
|
+
attach: "additive",
|
|
44
|
+
native: ["agents-md", "skills", "settings-hooks", "subagents", "commands", "mcp"]
|
|
45
|
+
},
|
|
46
|
+
capabilities: {
|
|
47
|
+
sessionId: "assignable",
|
|
48
|
+
resume: true,
|
|
49
|
+
fork: true,
|
|
50
|
+
subagents: { spawnTools: ["Agent", "Task"], transcript: "separate-file" },
|
|
51
|
+
cost: "status-line",
|
|
52
|
+
longCommands: "blocking",
|
|
53
|
+
permission: { unattended: "bypassPermissions", "accept-edits": "acceptEdits", plan: "plan", default: "default" },
|
|
54
|
+
structuredOutput: true,
|
|
55
|
+
mcp: true,
|
|
56
|
+
judge: true
|
|
57
|
+
},
|
|
58
|
+
hooks: { contextCap: 1e4, timeoutCeilingMs: 6e5 }
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// ../agents/src/native/agents.ts
|
|
62
|
+
var NATIVE_AGENTS = {
|
|
63
|
+
"claude-code": CLAUDE_CODE
|
|
64
|
+
};
|
|
65
|
+
var LEGACY_AGENT = "claude-code";
|
|
66
|
+
|
|
67
|
+
// ../agents/src/providers/index.ts
|
|
68
|
+
var PROVIDERS = {
|
|
69
|
+
anthropic: {
|
|
70
|
+
id: "anthropic",
|
|
71
|
+
label: "Anthropic",
|
|
72
|
+
upstream: "https://api.anthropic.com/",
|
|
73
|
+
credentialKinds: [
|
|
74
|
+
{ id: "api-key", label: "API key", header: "x-api-key", prefix: "" },
|
|
75
|
+
{ id: "oauth-token", label: "OAuth token", header: "Authorization", prefix: "Bearer " }
|
|
76
|
+
],
|
|
77
|
+
droppedHeaders: ["x-api-key", "authorization"],
|
|
78
|
+
destination: { name: "claude", port: 3127, socket: "claude.sock" }
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export { CLAUDE_CODE, LEGACY_AGENT, NATIVE_AGENTS, PROVIDERS };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { contextAgents, defaultAgents, userSkillFolderIn, loadMachineSkillFiles, resolvePackRoot } from './chunk-
|
|
3
|
+
import { contextAgents, defaultAgents, userSkillFolderIn, loadMachineSkillFiles, resolvePackRoot } from './chunk-I6U6QPN6.js';
|
|
4
4
|
import { MAINTAINED_SKILLS, maintainedLineVersion } from './chunk-CDDED64E.js';
|
|
5
5
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
6
6
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readCloudConfigStrict, readCloudConfig, cloudConfigPath } from './chunk-HWVMRETT.js';
|
|
4
|
-
import { signRunnerRequest, signerFor } from './chunk-
|
|
4
|
+
import { signRunnerRequest, signerFor } from './chunk-42DBDDHP.js';
|
|
5
5
|
import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
6
6
|
import { PLAIN_VERSION, recordCliVersion, removeRecordedVersion } from './chunk-NFZMENCY.js';
|
|
7
7
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveCredentials, postJson, getJson } from './chunk-
|
|
4
|
-
import { detectActiveSession } from './chunk-
|
|
5
|
-
import { C } from './chunk-2AM6Z5BP.js';
|
|
3
|
+
import { resolveCredentials, postJson, getJson } from './chunk-IX6CFXSW.js';
|
|
4
|
+
import { detectActiveSession } from './chunk-FWSVWPMS.js';
|
|
6
5
|
import { sanitizeTerminal } from './chunk-P6PHY33P.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { resolveRepoIdentity } from './chunk-6KH3NMIT.js';
|
|
7
|
+
import { C } from './chunk-2AM6Z5BP.js';
|
|
8
|
+
import { defaultFetch } from './chunk-LZS5EYZ6.js';
|
|
9
|
+
import { logHookError } from './chunk-JVHWWJ2J.js';
|
|
10
10
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
11
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
12
12
|
import { randomUUID } from 'crypto';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { isVersion, compareVersions } from './chunk-TQMI335S.js';
|
|
4
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
4
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-G35Y4LN5.js';
|
|
5
5
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
6
6
|
import { join } from 'path';
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
4
4
|
import { readCloudConfig } from './chunk-HWVMRETT.js';
|
|
5
5
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
6
|
-
import { defaultAgents, legacyAgent, contextAgents, McpFileError } from './chunk-
|
|
6
|
+
import { defaultAgents, legacyAgent, contextAgents, McpFileError } from './chunk-I6U6QPN6.js';
|
|
7
7
|
import { mkdirSync, writeFileSync, existsSync, readFileSync } from 'fs';
|
|
8
8
|
import { join, dirname } from 'path';
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { stripTerminalControls } from './chunk-
|
|
4
|
-
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-F36EKGMP.js';
|
|
4
|
+
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-ML5YKV3B.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
|
@@ -55,7 +55,7 @@ function envNamesOf(row, imageEnv) {
|
|
|
55
55
|
return [...new Set(names)].sort();
|
|
56
56
|
}
|
|
57
57
|
async function readOwnContainer(deps = {}) {
|
|
58
|
-
const run = deps.run ?? (await import('./docker-
|
|
58
|
+
const run = deps.run ?? (await import('./docker-GFEEV42Z.js')).spawnRun;
|
|
59
59
|
const ids = candidateIds(deps.env ?? process.env, deps.readFile ?? ((path) => readFileSync(path, "utf8")));
|
|
60
60
|
if (ids.length === 0) return { ok: false, reason: "the runner cannot tell which container it runs in: HOSTNAME is empty and /proc/self/mountinfo names none" };
|
|
61
61
|
let problem = "";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readContextManifest, removeContextManifest } from './chunk-YQR6E6OV.js';
|
|
4
4
|
import { removePreCommitGuardHook } from './chunk-CJPTUU2E.js';
|
|
5
|
-
import { CONTEXT_PIN_FILENAME, agentRootFolders } from './chunk-
|
|
5
|
+
import { CONTEXT_PIN_FILENAME, agentRootFolders } from './chunk-I6U6QPN6.js';
|
|
6
6
|
import { execFileSync } from 'child_process';
|
|
7
7
|
import { lstatSync, existsSync, unlinkSync, readdirSync, rmdirSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
8
8
|
import { join, dirname, isAbsolute } from 'path';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
+
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
3
4
|
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
4
5
|
import { join, basename } from 'path';
|
|
5
6
|
|
|
6
7
|
createRequire(import.meta.url);
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var AGENT = NATIVE_AGENTS[LEGACY_AGENT];
|
|
9
|
+
var BEGIN = `# BEGIN outerlayer ${AGENT.legacy.subcommand}`;
|
|
10
|
+
var END = `# END outerlayer ${AGENT.legacy.subcommand}`;
|
|
11
|
+
var SHELL_FUNCTION_LINE = `${AGENT.program}() { outerlayer ${AGENT.legacy.subcommand} "$@"; }`;
|
|
10
12
|
var STARTUP_FILES = { zsh: ".zshrc", bash: ".bashrc" };
|
|
11
13
|
function startupFileFor(home, shellPath) {
|
|
12
14
|
const name = STARTUP_FILES[basename(shellPath ?? "")];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { builtinKind, keepsHostBuilder } from './chunk-
|
|
4
|
-
import { parseSize } from './chunk-
|
|
5
|
-
import { runnerDir } from './chunk-
|
|
6
|
-
import { FD_SLOTS_PER_BUILD, runnerAgents, credentialNames, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialAgent, credentialForms, credentialLineIn, withoutCredentialLines } from './chunk-
|
|
7
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { builtinKind, keepsHostBuilder } from './chunk-BACWWK3E.js';
|
|
4
|
+
import { parseSize } from './chunk-J6HWRVN2.js';
|
|
5
|
+
import { runnerDir } from './chunk-G35Y4LN5.js';
|
|
6
|
+
import { FD_SLOTS_PER_BUILD, runnerAgents, credentialNames, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialAgent, credentialForms, credentialLineIn, withoutCredentialLines } from './chunk-DTQPDMHG.js';
|
|
7
|
+
import { defaultAgents } from './chunk-I6U6QPN6.js';
|
|
8
8
|
import { existsSync, readFileSync, writeFileSync, chmodSync, renameSync } from 'fs';
|
|
9
9
|
import { dirname, join } from 'path';
|
|
10
10
|
import { spawnSync } from 'child_process';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { keyRunnerFactory, RunnerConfigError } from './chunk-
|
|
4
|
-
import { orgHomeDir } from './chunk-
|
|
3
|
+
import { keyRunnerFactory, RunnerConfigError } from './chunk-BACWWK3E.js';
|
|
4
|
+
import { orgHomeDir } from './chunk-G35Y4LN5.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
7
7
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-
|
|
4
|
-
import {
|
|
3
|
+
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-HRBSEXYC.js';
|
|
4
|
+
import { resolveRepoIdentity } from './chunk-6KH3NMIT.js';
|
|
5
|
+
import { resolveGatewayCredentials } from './chunk-LZS5EYZ6.js';
|
|
5
6
|
import { readCloudConfig } from './chunk-HWVMRETT.js';
|
|
6
7
|
import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
7
|
-
import { resolveRepoIdentity } from './chunk-5GHJFETA.js';
|
|
8
8
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
9
9
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
10
10
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
4
|
+
|
|
5
|
+
createRequire(import.meta.url);
|
|
6
|
+
|
|
7
|
+
// ../agents/src/claude-code/hooks.ts
|
|
8
|
+
var REGISTERED = [
|
|
9
|
+
["SessionStart", "session-start"],
|
|
10
|
+
["SessionEnd", "session-ended"],
|
|
11
|
+
["Stop", "turn-ended"],
|
|
12
|
+
["PostToolUse", "tool-used"]
|
|
13
|
+
];
|
|
14
|
+
var KIND_BY_NAME = new Map(REGISTERED);
|
|
15
|
+
var TOOL_KINDS = {
|
|
16
|
+
Bash: "shell",
|
|
17
|
+
Read: "read",
|
|
18
|
+
Edit: "edit",
|
|
19
|
+
MultiEdit: "edit",
|
|
20
|
+
Write: "edit",
|
|
21
|
+
NotebookEdit: "edit",
|
|
22
|
+
Grep: "search",
|
|
23
|
+
Glob: "search",
|
|
24
|
+
Agent: "spawn",
|
|
25
|
+
Task: "spawn"
|
|
26
|
+
};
|
|
27
|
+
function toolKind(name) {
|
|
28
|
+
if (name === void 0) return void 0;
|
|
29
|
+
if (name.startsWith("mcp__")) return "mcp";
|
|
30
|
+
return TOOL_KINDS[name] ?? "other";
|
|
31
|
+
}
|
|
32
|
+
function parsePayload(stdin) {
|
|
33
|
+
try {
|
|
34
|
+
const parsed = stdin === "" ? {} : JSON.parse(stdin);
|
|
35
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : {};
|
|
36
|
+
} catch {
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
var text = (value) => typeof value === "string" ? value : void 0;
|
|
41
|
+
function decode(name, stdin) {
|
|
42
|
+
const payload = parsePayload(stdin);
|
|
43
|
+
const nativeName = String(name ?? payload.hook_event_name ?? "unknown");
|
|
44
|
+
const kind = KIND_BY_NAME.get(nativeName);
|
|
45
|
+
const sessionId = text(payload.session_id);
|
|
46
|
+
const cwd = text(payload.cwd);
|
|
47
|
+
const transcript = text(payload.transcript_path);
|
|
48
|
+
const toolName = text(payload.tool_name);
|
|
49
|
+
const toolUseId = text(payload.tool_use_id);
|
|
50
|
+
const tool = toolKind(toolName);
|
|
51
|
+
return {
|
|
52
|
+
nativeName,
|
|
53
|
+
...kind === void 0 ? {} : { kind },
|
|
54
|
+
...kind !== void 0 && sessionId !== void 0 && cwd !== void 0 && transcript !== void 0 ? {
|
|
55
|
+
event: {
|
|
56
|
+
kind,
|
|
57
|
+
sessionId,
|
|
58
|
+
cwd,
|
|
59
|
+
session: { agent: "claude-code", id: sessionId, locator: { kind: "file", path: transcript } },
|
|
60
|
+
...kind === "tool-used" && tool !== void 0 ? { tool } : {}
|
|
61
|
+
}
|
|
62
|
+
} : {},
|
|
63
|
+
spool: {
|
|
64
|
+
sessionId: payload.session_id ?? null,
|
|
65
|
+
transcriptPath: payload.transcript_path ?? null,
|
|
66
|
+
cwd: payload.cwd ?? null,
|
|
67
|
+
payloadEvent: payload.hook_event_name ?? null
|
|
68
|
+
},
|
|
69
|
+
// A tool call a subagent makes carries the subagent's id.
|
|
70
|
+
fromSubagent: payload.agent_id !== void 0,
|
|
71
|
+
...toolName === void 0 && toolUseId === void 0 ? {} : { tool: { ...toolUseId === void 0 ? {} : { useId: toolUseId }, ...toolName === void 0 ? {} : { name: toolName } } }
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function reply(value) {
|
|
75
|
+
switch (value.kind) {
|
|
76
|
+
case "session-start":
|
|
77
|
+
return JSON.stringify({
|
|
78
|
+
...value.notice === void 0 ? {} : { systemMessage: value.notice },
|
|
79
|
+
hookSpecificOutput: { hookEventName: "SessionStart", additionalContext: value.context }
|
|
80
|
+
});
|
|
81
|
+
case "tool-used":
|
|
82
|
+
return JSON.stringify({ hookSpecificOutput: { hookEventName: "PostToolUse", additionalContext: value.context } });
|
|
83
|
+
case "turn-ended":
|
|
84
|
+
return JSON.stringify({ decision: "block", reason: value.continueWith });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function statusLine(stdin) {
|
|
88
|
+
const payload = parsePayload(stdin);
|
|
89
|
+
const cost = payload.cost?.total_cost_usd;
|
|
90
|
+
const sessionId = text(payload.session_id);
|
|
91
|
+
return {
|
|
92
|
+
...sessionId === void 0 ? {} : { sessionId },
|
|
93
|
+
...typeof cost === "number" ? { costUsd: cost } : {}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
var CLAUDE_CODE_HOOKS = {
|
|
97
|
+
events: REGISTERED.map(([name]) => name),
|
|
98
|
+
decode,
|
|
99
|
+
reply,
|
|
100
|
+
statusLine
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// ../agents/src/native/hook-codecs.ts
|
|
104
|
+
var HOOK_CODECS = {
|
|
105
|
+
"claude-code": CLAUDE_CODE_HOOKS
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// ../agents/src/lifecycle.ts
|
|
109
|
+
function hookCodec(agentId) {
|
|
110
|
+
return HOOK_CODECS[agentId ?? LEGACY_AGENT];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { CLAUDE_CODE_HOOKS, hookCodec };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { escapeUnitPath, UNIT_MARKER, DEFAULT_UNIT_NAME } from './chunk-
|
|
4
|
-
import { inspectService, realInspectProbes } from './chunk-
|
|
3
|
+
import { escapeUnitPath, UNIT_MARKER, DEFAULT_UNIT_NAME } from './chunk-PSQEGJPN.js';
|
|
4
|
+
import { inspectService, realInspectProbes } from './chunk-DTQPDMHG.js';
|
|
5
5
|
import { realpathSync, readFileSync, readdirSync } from 'fs';
|
|
6
6
|
import { resolve, dirname, join } from 'path';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir } from './chunk-
|
|
3
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir } from './chunk-G35Y4LN5.js';
|
|
4
4
|
import { mkdirSync, writeFileSync, renameSync, existsSync, readFileSync } from 'fs';
|
|
5
5
|
import { dirname, join } from 'path';
|
|
6
6
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
+
import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-D6EXW4EB.js';
|
|
3
4
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { retiredSkillPaths, removeRetiredSkills } from './chunk-GZ75FRLB.js';
|
|
5
|
+
import { invalidConfigMessage } from './chunk-XIDDJSQU.js';
|
|
6
|
+
import { retiredSkillPaths, removeRetiredSkills } from './chunk-B36NSEUM.js';
|
|
7
7
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
8
|
-
import { maintainedFilesForExistingSkills, loadMaintainedFiles, emitTree, emitBuilders, defaultAgents, targetIds, generatedHeaderSource, parseOuterlayerConfig, classifyTree, writeMaintainedFiles,
|
|
8
|
+
import { maintainedFilesForExistingSkills, loadMaintainedFiles, emitTree, emitBuilders, defaultAgents, targetIds, generatedHeaderSource, parseOuterlayerConfig, classifyTree, writeMaintainedFiles, agentById } from './chunk-I6U6QPN6.js';
|
|
9
|
+
import { LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
9
10
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, copyFileSync, unlinkSync, rmdirSync, readdirSync } from 'fs';
|
|
10
11
|
import { join, dirname } from 'path';
|
|
11
12
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { parseOuterlayerConfig, targetIds, defaultAgents } from './chunk-
|
|
3
|
+
import { parseOuterlayerConfig, targetIds, defaultAgents } from './chunk-I6U6QPN6.js';
|
|
4
|
+
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
4
5
|
import { readFileSync } from 'fs';
|
|
5
6
|
import { join } from 'path';
|
|
6
7
|
|
|
@@ -24,7 +25,7 @@ function removedTargetErrorIn(root, agents = defaultAgents()) {
|
|
|
24
25
|
return removedTargetError(text, agents);
|
|
25
26
|
}
|
|
26
27
|
function launchRefusal(repository, error) {
|
|
27
|
-
return `outerlayer
|
|
28
|
+
return `outerlayer ${NATIVE_AGENTS[LEGACY_AGENT].legacy.subcommand}: the control plane ${repository} has an ${error}
|
|
28
29
|
`;
|
|
29
30
|
}
|
|
30
31
|
function buildRefusalReason(repository, error) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { launchRefusalForSession } from './chunk-
|
|
4
|
-
import { detectActiveSession, transcriptPathForSession } from './chunk-
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
3
|
+
import { launchRefusalForSession } from './chunk-WGC7UFRM.js';
|
|
4
|
+
import { detectActiveSession, transcriptPathForSession } from './chunk-FWSVWPMS.js';
|
|
5
|
+
import { autoConnect } from './chunk-T2KBHW6P.js';
|
|
6
|
+
import { resolveRepoIdentity, defaultProjectsDir, findTranscripts, sessionIdFromPath, scrubText } from './chunk-6KH3NMIT.js';
|
|
6
7
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
8
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-LZS5EYZ6.js';
|
|
8
9
|
import { readLatestProvenanceForSession } from './chunk-545P7JY7.js';
|
|
9
|
-
import {
|
|
10
|
-
import { launchedItemForSession } from './chunk-5WYT3PPE.js';
|
|
10
|
+
import { launchedItemForSession } from './chunk-4OD45RBP.js';
|
|
11
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
12
12
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
13
13
|
import { FindingBatchSchema, FindingsResponseSchema, SAME_PROBLEM_RULES } from './chunk-WUKLQWGY.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { scrubReason, stripTerminalControls } from './chunk-
|
|
4
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
5
|
-
import { RunnerAlreadyRunningError, readPidFile } from './chunk-
|
|
3
|
+
import { scrubReason, stripTerminalControls } from './chunk-F36EKGMP.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-PSQEGJPN.js';
|
|
5
|
+
import { RunnerAlreadyRunningError, readPidFile } from './chunk-Z66CKWOM.js';
|
|
6
6
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
7
|
-
import { keyRunnerFactory } from './chunk-
|
|
8
|
-
import { isSignatureRefusal, postJson } from './chunk-
|
|
9
|
-
import { signerFor } from './chunk-
|
|
10
|
-
import { pidFilePath } from './chunk-
|
|
7
|
+
import { keyRunnerFactory } from './chunk-BACWWK3E.js';
|
|
8
|
+
import { isSignatureRefusal, postJson } from './chunk-IX6CFXSW.js';
|
|
9
|
+
import { signerFor } from './chunk-42DBDDHP.js';
|
|
10
|
+
import { pidFilePath } from './chunk-G35Y4LN5.js';
|
|
11
11
|
import { readFileSync } from 'fs';
|
|
12
12
|
|
|
13
13
|
createRequire(import.meta.url);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { sanitizeTerminal } from './chunk-P6PHY33P.js';
|
|
4
|
-
import { isAgentsMdLayout } from './chunk-
|
|
5
|
-
import { resolveGatewayCredentials, defaultFetch } from './chunk-
|
|
6
|
-
import { versionAtLeast } from './chunk-
|
|
4
|
+
import { isAgentsMdLayout } from './chunk-D6EXW4EB.js';
|
|
5
|
+
import { resolveGatewayCredentials, defaultFetch } from './chunk-LZS5EYZ6.js';
|
|
6
|
+
import { versionAtLeast } from './chunk-BSPJI5T7.js';
|
|
7
7
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
8
|
-
import { machineSkillsState, staleAgentSkills } from './chunk-
|
|
8
|
+
import { machineSkillsState, staleAgentSkills } from './chunk-LSZUTI6O.js';
|
|
9
9
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
10
|
-
import { hasSymlinkComponent } from './chunk-
|
|
11
|
-
import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, AGENTS_SKILLS_BASE, defaultAgents, namesCore, MACHINE_SKILL_PATH, skillBases, isMaintainedCopy, contextAgents, loadTemplateFiles, splitRawFile } from './chunk-
|
|
10
|
+
import { hasSymlinkComponent } from './chunk-PBGNX3PS.js';
|
|
11
|
+
import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, AGENTS_SKILLS_BASE, defaultAgents, namesCore, MACHINE_SKILL_PATH, skillBases, isMaintainedCopy, contextAgents, loadTemplateFiles, splitRawFile } from './chunk-I6U6QPN6.js';
|
|
12
12
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
13
13
|
import { execFileSync } from 'child_process';
|
|
14
14
|
import { existsSync, readFileSync, writeFileSync, realpathSync, readdirSync } from 'fs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
4
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
4
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-G35Y4LN5.js';
|
|
5
5
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'fs';
|
|
6
6
|
import { dirname } from 'path';
|
|
7
7
|
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { existsSync, readFileSync, mkdirSync, copyFileSync, writeFileSync } from 'fs';
|
|
4
|
+
import { dirname } from 'path';
|
|
5
|
+
|
|
6
|
+
createRequire(import.meta.url);
|
|
7
|
+
function tokenizeCommand(command) {
|
|
8
|
+
const tokens = [];
|
|
9
|
+
let current = "";
|
|
10
|
+
let inToken = false;
|
|
11
|
+
let quote = null;
|
|
12
|
+
for (const ch of command) {
|
|
13
|
+
if (quote !== null) {
|
|
14
|
+
if (ch === quote) quote = null;
|
|
15
|
+
else current += ch;
|
|
16
|
+
} else if (ch === '"' || ch === "'") {
|
|
17
|
+
quote = ch;
|
|
18
|
+
inToken = true;
|
|
19
|
+
} else if (/\s/.test(ch)) {
|
|
20
|
+
if (inToken) {
|
|
21
|
+
tokens.push(current);
|
|
22
|
+
current = "";
|
|
23
|
+
inToken = false;
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
current += ch;
|
|
27
|
+
inToken = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (quote !== null) return null;
|
|
31
|
+
if (inToken) tokens.push(current);
|
|
32
|
+
return tokens;
|
|
33
|
+
}
|
|
34
|
+
function quoteBin(bin) {
|
|
35
|
+
return /\s/.test(bin) ? `"${bin}"` : bin;
|
|
36
|
+
}
|
|
37
|
+
function isScriptBin(bin) {
|
|
38
|
+
return /\.[cm]?js$/i.test(bin);
|
|
39
|
+
}
|
|
40
|
+
function cliCommand(cliBin) {
|
|
41
|
+
return isScriptBin(cliBin) ? `node ${quoteBin(cliBin)}` : quoteBin(cliBin);
|
|
42
|
+
}
|
|
43
|
+
var PORTABLE_BIN = "outerlayer";
|
|
44
|
+
function isOurBin(bin, cliBin) {
|
|
45
|
+
if (cliBin !== void 0 && normalizeBinPath(bin) === normalizeBinPath(cliBin)) return true;
|
|
46
|
+
const parts = bin.replace(/\\/g, "/").split("/");
|
|
47
|
+
if (isPublishedPackageBin(parts)) return true;
|
|
48
|
+
const base = (parts.pop() ?? "").toLowerCase();
|
|
49
|
+
if (base === "outerlayer" || base === "outerlayer.exe" || base === "outerlayer.cmd") return true;
|
|
50
|
+
return parts.some((p) => p.toLowerCase() === ".outerlayer");
|
|
51
|
+
}
|
|
52
|
+
function isPublishedPackageBin(parts) {
|
|
53
|
+
const n = parts.length;
|
|
54
|
+
if (n === 2 && parts[0] === "@outerlayer" && /^cli(@[^/]+)?$/.test(parts[1])) return true;
|
|
55
|
+
return parts[n - 4] === "@outerlayer" && parts[n - 3] === "cli" && parts[n - 2] === "dist" && parts[n - 1] === "index.js";
|
|
56
|
+
}
|
|
57
|
+
function normalizeBinPath(bin) {
|
|
58
|
+
return bin.replace(/\\/g, "/");
|
|
59
|
+
}
|
|
60
|
+
function splitCliInvocation(command, cliBin) {
|
|
61
|
+
if (typeof command !== "string") return null;
|
|
62
|
+
const tokens = tokenizeCommand(command.trim());
|
|
63
|
+
if (!tokens) return null;
|
|
64
|
+
const launcher = (tokens[0] ?? "").replace(/\\/g, "/").split("/").pop() ?? "";
|
|
65
|
+
const viaNode = launcher === "node" || launcher === "node.exe";
|
|
66
|
+
const viaNpx = launcher === "npx";
|
|
67
|
+
const i = viaNode || viaNpx ? 1 : 0;
|
|
68
|
+
const bin = tokens[i];
|
|
69
|
+
if (!bin || !isOurBin(bin, cliBin)) return null;
|
|
70
|
+
return { bin, args: tokens.slice(i + 1), viaNpx, viaNode };
|
|
71
|
+
}
|
|
72
|
+
function parseCliInvocation(command, cliBin) {
|
|
73
|
+
return splitCliInvocation(command, cliBin)?.args ?? null;
|
|
74
|
+
}
|
|
75
|
+
function decodeVerifiedWrapId(token) {
|
|
76
|
+
if (typeof token !== "string") return null;
|
|
77
|
+
const original = decodeWrappedCommand(token);
|
|
78
|
+
const canonical = encodeWrappedCommand(original);
|
|
79
|
+
return canonical.replace(/=+$/, "") === token.replace(/=+$/, "") ? original : null;
|
|
80
|
+
}
|
|
81
|
+
function cliBinResolvable(cliBin) {
|
|
82
|
+
if (!cliBin.includes("/") && !cliBin.includes("\\")) return true;
|
|
83
|
+
return existsSync(cliBin);
|
|
84
|
+
}
|
|
85
|
+
function encodeWrappedCommand(command) {
|
|
86
|
+
return Buffer.from(command, "utf8").toString("base64");
|
|
87
|
+
}
|
|
88
|
+
function decodeWrappedCommand(id) {
|
|
89
|
+
return Buffer.from(id, "base64").toString("utf8");
|
|
90
|
+
}
|
|
91
|
+
function readSettingsText(path) {
|
|
92
|
+
return existsSync(path) ? readFileSync(path, "utf8") : void 0;
|
|
93
|
+
}
|
|
94
|
+
var SettingsParseError = class extends Error {
|
|
95
|
+
constructor(path, cause) {
|
|
96
|
+
super(`refusing to modify ${path}: it is not valid JSON (${cause instanceof Error ? cause.message : cause})`);
|
|
97
|
+
this.path = path;
|
|
98
|
+
this.cause = cause;
|
|
99
|
+
this.name = "SettingsParseError";
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
function writeSettingsText(path, text, now = Date.now) {
|
|
103
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
104
|
+
let backupPath;
|
|
105
|
+
if (existsSync(path)) {
|
|
106
|
+
backupPath = `${path}.bak-${now()}`;
|
|
107
|
+
copyFileSync(path, backupPath);
|
|
108
|
+
}
|
|
109
|
+
writeFileSync(path, text);
|
|
110
|
+
return backupPath;
|
|
111
|
+
}
|
|
112
|
+
function cliForInstall(bin) {
|
|
113
|
+
return {
|
|
114
|
+
command(args) {
|
|
115
|
+
if (bin === void 0) throw new Error("this command line has no CLI to run");
|
|
116
|
+
return `${cliCommand(bin)} ${args}`;
|
|
117
|
+
},
|
|
118
|
+
parse: (command) => parseCliInvocation(command, bin),
|
|
119
|
+
split(command) {
|
|
120
|
+
const split = splitCliInvocation(command, bin);
|
|
121
|
+
return split === null ? null : { ...split, script: isScriptBin(split.bin) };
|
|
122
|
+
},
|
|
123
|
+
startsLikeCommand: (split) => bin !== void 0 && normalizeBinPath(split.bin) === normalizeBinPath(bin) && split.viaNode === isScriptBin(bin),
|
|
124
|
+
encode: encodeWrappedCommand,
|
|
125
|
+
decode: decodeVerifiedWrapId,
|
|
126
|
+
resolvable: () => bin !== void 0 && cliBinResolvable(bin)
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { PORTABLE_BIN, SettingsParseError, cliBinResolvable, cliForInstall, decodeWrappedCommand, readSettingsText, writeSettingsText };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { PROXY_WARNING_FLAG } from './chunk-
|
|
4
|
-
import { buildAgent, GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, RELAY_ID, RELAY_USER, HEADLESS_SHELL_REVISION, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, HEADLESS_SHELL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_VERSION } from './chunk-
|
|
5
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { PROXY_WARNING_FLAG } from './chunk-CXJC3JLN.js';
|
|
4
|
+
import { buildAgent, GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, RELAY_ID, RELAY_USER, HEADLESS_SHELL_REVISION, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, HEADLESS_SHELL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_VERSION } from './chunk-DTQPDMHG.js';
|
|
5
|
+
import { defaultAgents } from './chunk-I6U6QPN6.js';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
|
8
8
|
|