@outerlayer/cli 0.36.0-next.20261103024917 → 0.36.0-next.20261103102716
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/agent-setup-DZZZH3SE.js +40 -0
- package/dist/{agent-subcommand-LABZ7CVN.js → agent-subcommand-WRHH6SRD.js} +5 -5
- package/dist/{bridge-WVWJBVTG.js → bridge-GZSZQGLI.js} +8 -7
- package/dist/{build-TB4QKVBG.js → build-UKZ5RPRR.js} +14 -13
- package/dist/{build-disk-27ZTD2EH.js → build-disk-3HOXULLP.js} +12 -11
- package/dist/build-info.json +1 -1
- package/dist/{builder-DN2S6EVU.js → builder-QEK4GIRY.js} +11 -10
- package/dist/caller-WSMJJSFL.js +23 -0
- package/dist/{check-MNFIC7TT.js → check-QLJ2O7VO.js} +61 -60
- package/dist/{chunk-ORU76DHF.js → chunk-2JWLK2TU.js} +1 -1
- package/dist/{chunk-IVAX5RVX.js → chunk-2QIK3JRV.js} +1 -1
- package/dist/{chunk-HWIV4MF6.js → chunk-2SBNZ4EC.js} +1 -1
- package/dist/{chunk-SSVG2IOD.js → chunk-2W5C47AE.js} +1 -1
- package/dist/{chunk-4XYEPTZP.js → chunk-3XEYA3QF.js} +3 -3
- package/dist/{chunk-NTOHZMPN.js → chunk-42X6CTBI.js} +4 -4
- package/dist/{chunk-VNYAJEKO.js → chunk-4MLH5MDB.js} +5 -5
- package/dist/{chunk-XL6DG5LC.js → chunk-4MN4BBKZ.js} +7 -7
- package/dist/{chunk-EI22245K.js → chunk-54ERDQ3O.js} +77 -9
- package/dist/{chunk-6DOYJN44.js → chunk-54PQNYA7.js} +3 -3
- package/dist/{chunk-EYUJCGF2.js → chunk-6J3QWXTA.js} +4 -4
- package/dist/{chunk-UCUZJ5W5.js → chunk-6UI4ELNA.js} +62 -53
- package/dist/{chunk-QTU6GW2M.js → chunk-7UYXSF62.js} +8 -227
- package/dist/{chunk-CAGZNACH.js → chunk-A64EXQUL.js} +31 -30
- package/dist/{chunk-3L6XOE4K.js → chunk-B5VKRKLJ.js} +1 -1
- package/dist/{chunk-DRGGJH2V.js → chunk-BEJJJZXF.js} +4 -4
- package/dist/{chunk-37B2SIAT.js → chunk-BTGNFRRT.js} +7 -7
- package/dist/{chunk-CJNZ2FIW.js → chunk-BZQ3S24G.js} +1 -1
- package/dist/{chunk-LLCRQWH5.js → chunk-CDTBXABP.js} +2 -2
- package/dist/{chunk-UZ5SDO7Y.js → chunk-DEZSNJSE.js} +1 -1
- package/dist/{chunk-AUZAQL7C.js → chunk-DWYQKLCL.js} +1 -1
- package/dist/{chunk-R3JSLSMG.js → chunk-EHS3HEB6.js} +4 -4
- package/dist/{chunk-JZDTDGRO.js → chunk-EUWTGCK5.js} +1 -1
- package/dist/{chunk-33OQSCE2.js → chunk-FLQL6ZIG.js} +1 -1
- package/dist/{chunk-A76SNTAM.js → chunk-GPBTTHK3.js} +1 -1
- package/dist/{chunk-LFUEODDW.js → chunk-H4G26OZC.js} +8 -8
- package/dist/{chunk-GIAODP2B.js → chunk-HO4DPX5N.js} +1 -1
- package/dist/{chunk-HBE75JAU.js → chunk-HQBKKYYQ.js} +5 -5
- package/dist/{chunk-VJKHQSSS.js → chunk-HR4PJLOO.js} +1 -1
- package/dist/{chunk-OE5JWY3T.js → chunk-HX6B34ZF.js} +17 -17
- package/dist/chunk-IEDO26G4.js +243 -0
- package/dist/{chunk-PUPUOQ6Y.js → chunk-IEVARJ6G.js} +2 -2
- package/dist/{chunk-EQ5M2WWA.js → chunk-J4NJWTNO.js} +5 -5
- package/dist/{chunk-WFRYPYPT.js → chunk-JD5EVW6Y.js} +1 -1
- package/dist/{chunk-JYFZC776.js → chunk-JMM3L5RG.js} +5 -5
- package/dist/{chunk-Q7BECZIF.js → chunk-K26KMWU4.js} +10 -10
- package/dist/{chunk-UJISSEJG.js → chunk-K373UCEV.js} +1 -1
- package/dist/{chunk-MDJ6ILXG.js → chunk-KHJPRTOW.js} +1 -1
- package/dist/{chunk-GANI63IL.js → chunk-L3SHPR2M.js} +1 -1
- package/dist/{chunk-P63MQNDV.js → chunk-LDKF6B2R.js} +174 -8
- package/dist/{chunk-VQ4KQGLY.js → chunk-LV4IDDD3.js} +8 -13
- package/dist/{chunk-QPIWCDVK.js → chunk-LXXP5HRJ.js} +4 -4
- package/dist/{chunk-PVUBF24F.js → chunk-MPVTZLOM.js} +5 -4
- package/dist/{chunk-AU3QZKC4.js → chunk-N3SO5VCM.js} +8 -8
- package/dist/{chunk-HLJQONDG.js → chunk-NMMGRG5V.js} +6 -6
- package/dist/{chunk-RW6TM4OU.js → chunk-NOLS2G2W.js} +1 -1
- package/dist/{chunk-M6FMJXYO.js → chunk-NQYTUVZR.js} +1 -1
- package/dist/{chunk-CDDWYP73.js → chunk-OGG5ELXF.js} +5 -4
- package/dist/{chunk-DPTBQIF6.js → chunk-OPEZVPF7.js} +3 -3
- package/dist/{chunk-UWYU46GF.js → chunk-OV4XTV5M.js} +2 -2
- package/dist/{chunk-BGTQHUGU.js → chunk-P4Q6M6PI.js} +1 -1
- package/dist/{chunk-UHVYFXW6.js → chunk-PDRWRFB2.js} +4 -4
- package/dist/{chunk-UNWCM4FR.js → chunk-PYK6GCCU.js} +6 -6
- package/dist/{chunk-LLZ2CX4M.js → chunk-QJKW4MKH.js} +6 -1
- package/dist/{chunk-RKU2CRQN.js → chunk-QKLCIJEU.js} +349 -318
- package/dist/{chunk-XEZO7VQH.js → chunk-QVOU2QUR.js} +2 -2
- package/dist/{chunk-6ILOTKYR.js → chunk-RGKJ5J72.js} +5 -5
- package/dist/{chunk-OL6URNWQ.js → chunk-RKV3UQCG.js} +9 -8
- package/dist/{chunk-EA67BJCF.js → chunk-SYKEQT63.js} +6 -6
- package/dist/{chunk-66GYPUUN.js → chunk-T5I2H7TJ.js} +1 -1
- package/dist/{chunk-AXOO6FNA.js → chunk-TWGSXBZM.js} +3 -3
- package/dist/{chunk-7VUTGCGH.js → chunk-U6EACUUG.js} +1 -1
- package/dist/{chunk-4QE6PSGN.js → chunk-U6HCTKPH.js} +7 -7
- package/dist/{chunk-EDZ2OZYI.js → chunk-U7MLC45I.js} +6 -6
- package/dist/{chunk-GXCU5HTU.js → chunk-UZSMDU4U.js} +3 -3
- package/dist/{chunk-DNUA6244.js → chunk-VMPVQE4D.js} +2 -2
- package/dist/{chunk-YTERTIGW.js → chunk-VST3BWL4.js} +9 -9
- package/dist/{chunk-3JVLRIX3.js → chunk-WAGHPZP2.js} +1 -1
- package/dist/{chunk-PN4LWT5F.js → chunk-WNQGSAUE.js} +1 -1
- package/dist/{chunk-FINJC6BS.js → chunk-WZOWXDDM.js} +20 -14
- package/dist/{chunk-ZSEAA74Q.js → chunk-XSGWMQJF.js} +3 -3
- package/dist/{chunk-ASR6TU43.js → chunk-YCBVYTFI.js} +1 -1
- package/dist/{chunk-6V6ONATO.js → chunk-YEZGNCSK.js} +2 -2
- package/dist/{chunk-RCEK22S2.js → chunk-YWCK4EOT.js} +3 -3
- package/dist/{chunk-NJKCJVJL.js → chunk-ZE2JJQPC.js} +1 -1
- package/dist/{chunk-GQHT6N47.js → chunk-ZZ4WIQRF.js} +6 -5
- package/dist/{claude-launcher-5UGFLCYJ.js → claude-launcher-CPSCSL6U.js} +9 -9
- package/dist/{cli-AVPIE2LZ.js → cli-4M74XOWW.js} +192 -161
- package/dist/{command-4CPHPV55.js → command-RY76GIQG.js} +54 -53
- package/dist/{config-ODIFTWTQ.js → config-23EBIGW4.js} +13 -12
- package/dist/{connect-cmd-BMA6JWN5.js → connect-cmd-GEBIOBQQ.js} +12 -11
- package/dist/{container-start-AQIO47FJ.js → container-start-SUBTHQME.js} +59 -54
- package/dist/{context-cleanup-7XUQDCJ5.js → context-cleanup-I7FLIV5A.js} +5 -5
- package/dist/{context-show-cmd-FN6RY7JN.js → context-show-cmd-CSPMSRHX.js} +13 -12
- package/dist/{control-plane-launch-7FWJACHT.js → control-plane-launch-KC7NUNYQ.js} +16 -15
- package/dist/{demo-record-cmd-LRQMMMPB.js → demo-record-cmd-ZW6U2LAV.js} +9 -8
- package/dist/{demo-voice-cmd-ORYSHARJ.js → demo-voice-cmd-IDW3QX3E.js} +22 -21
- package/dist/{dist-AIMCXBLZ.js → dist-LOBYZWOU.js} +1 -1
- package/dist/docker-2VHMWLNK.js +20 -0
- package/dist/{doctor-X663FFNY.js → doctor-GEG64FBO.js} +54 -53
- package/dist/{emit-artifact-cmd-KMGO53PL.js → emit-artifact-cmd-2ZHPNLPG.js} +21 -20
- package/dist/{emit-cmd-OGNFGQF6.js → emit-cmd-UN7HGZC5.js} +8 -8
- package/dist/{emit-criteria-cmd-2KDA4LPJ.js → emit-criteria-cmd-TUXGD7CW.js} +15 -14
- package/dist/{emit-demo-cmd-26URBRX2.js → emit-demo-cmd-4YMYB556.js} +22 -21
- package/dist/{emit-finding-cmd-GM4G3ZGU.js → emit-finding-cmd-O2NN22XF.js} +15 -14
- package/dist/{emit-result-cmd-SXS6AJP3.js → emit-result-cmd-VRITADX2.js} +20 -19
- package/dist/{emit-step-cmd-TDO3NFV3.js → emit-step-cmd-LGNBZTWJ.js} +15 -14
- package/dist/{exec-client-DBSWP3AQ.js → exec-client-NXTXAVHI.js} +9 -8
- package/dist/find-unit-RYYTX2O5.js +24 -0
- package/dist/{findings-cmd-ED52QLP2.js → findings-cmd-RJD7KTSW.js} +15 -14
- package/dist/{fleet-readiness-X7YICYMA.js → fleet-readiness-RIO2SWC7.js} +15 -14
- package/dist/{governing-source-R7F6GZLO.js → governing-source-IR3KUGQF.js} +21 -20
- package/dist/guest-init-FLSL5RI7.js +20 -0
- package/dist/{hook-fast-Q6HOUK64.js → hook-fast-HYRZAY5K.js} +4 -4
- package/dist/{hook-install-LHVMFLO6.js → hook-install-CSHKOLWT.js} +5 -5
- package/dist/{hook-wrap-fast-FCZEUJKT.js → hook-wrap-fast-ITUBSHEF.js} +3 -3
- package/dist/host-checks-OB45XC67.js +79 -0
- package/dist/host-key-CPAEQSNU.js +18 -0
- package/dist/{image-tag-BHAEZYXN.js → image-tag-MAMFM4SO.js} +9 -8
- package/dist/index.js +6 -6
- package/dist/{init-IOOA3TJA.js → init-G34M5Y4W.js} +50 -49
- package/dist/init-HHD2NNWY.js +79 -0
- package/dist/{init-cmd-3TLX7N3E.js → init-cmd-GDT27DWD.js} +30 -29
- package/dist/{init-update-F3JZ2GEW.js → init-update-TQH2Q7IZ.js} +24 -23
- package/dist/install-cmd-PVQ5M5NM.js +21 -0
- package/dist/{layout-3YKZWTPE.js → layout-2DF7ON2F.js} +5 -5
- package/dist/{logs-HHNF6ABR.js → logs-BM644OOJ.js} +8 -7
- package/dist/loop-6MSKJN52.js +90 -0
- package/dist/machine-LGD4UVCI.js +79 -0
- package/dist/{machine-skills-4UHKD4HT.js → machine-skills-O7XAZYLN.js} +5 -5
- package/dist/{mcp-install-cmd-SQV4UZD6.js → mcp-install-cmd-METCXTTR.js} +5 -5
- package/dist/{mcp-serve-cmd-RKM4BLX3.js → mcp-serve-cmd-CTKBLSM6.js} +10 -9
- package/dist/{paths-WQUQWBL6.js → paths-VIBBLJ2W.js} +8 -7
- package/dist/pending-RXJKH4AC.js +18 -0
- package/dist/{pidfile-P6WZBOR4.js → pidfile-PAX5XHQJ.js} +9 -8
- package/dist/{record-WMING5ZQ.js → record-QPXOUL6F.js} +9 -8
- package/dist/{relay-NCWAF6NQ.js → relay-KASDMV3R.js} +6 -5
- package/dist/{relay-protocol-Y3HGIACN.js → relay-protocol-7HSCZC5H.js} +6 -5
- package/dist/runner-agents-WUMCXVS2.js +14 -0
- package/dist/runner-env-R2C5LYCX.js +24 -0
- package/dist/{runner-identity-ZCXCKYYO.js → runner-identity-UDPLWT7I.js} +11 -10
- package/dist/{runner-key-2ECLBGUH.js → runner-key-Z2IQ5TS7.js} +49 -48
- package/dist/{session-sender-JIWCOKW4.js → session-sender-4QKSVX5Z.js} +21 -20
- package/dist/{shell-function-H75JWHLA.js → shell-function-FTY7SSAJ.js} +2 -2
- package/dist/{spec-cmd-TQ6VCLCS.js → spec-cmd-TON4PYGQ.js} +16 -15
- package/dist/{starter-pack-3BXEKGIH.js → starter-pack-LAPDUG6E.js} +6 -6
- package/dist/state-OTWJW4O7.js +18 -0
- package/dist/{status-TFHPMLOA.js → status-ROMTDMFO.js} +49 -48
- package/dist/{statusline-fast-BTJSU3MB.js → statusline-fast-7V7U4SI4.js} +3 -3
- package/dist/{sync-cmd-TKGTFHFZ.js → sync-cmd-FLNYVXAE.js} +20 -19
- package/dist/update-steps-A5OSPYAS.js +80 -0
- package/dist/{watch-GMLQW3S7.js → watch-4V7FZI5R.js} +20 -19
- package/dist/{work-claim-cmd-I6VVJZHK.js → work-claim-cmd-5EYXVPKH.js} +22 -21
- package/dist/{work-cmd-UOLSKQ5A.js → work-cmd-RUOTA5K7.js} +15 -14
- package/dist/{work-comment-cmd-FMAHDTN4.js → work-comment-cmd-7UM3O3EL.js} +18 -17
- package/dist/{work-demo-cmd-BIONKBZM.js → work-demo-cmd-K4NRR2AK.js} +15 -14
- package/dist/{work-logs-cmd-IXHGQ443.js → work-logs-cmd-QW7PNI6V.js} +15 -14
- package/dist/{work-open-pr-cmd-E7KGEH42.js → work-open-pr-cmd-Y6MTWQG5.js} +16 -15
- package/dist/{work-pr-cmd-GWYKEMBY.js → work-pr-cmd-WUIMC7XB.js} +15 -14
- package/dist/{work-proofs-cmd-LY7OLWXH.js → work-proofs-cmd-5LMTROA6.js} +17 -16
- package/dist/{work-proofs-record-IPP6XUOF.js → work-proofs-record-3JGUT2F5.js} +26 -25
- package/dist/{work-stop-cmd-DJWAZRM3.js → work-stop-cmd-R5F5VRUM.js} +15 -14
- package/package.json +1 -1
- package/dist/agent-setup-7WC4BHY4.js +0 -39
- package/dist/caller-ZDANV7YK.js +0 -22
- package/dist/docker-POAJWLZ5.js +0 -19
- package/dist/find-unit-4EP7BW2F.js +0 -23
- package/dist/guest-init-4YXOOA6P.js +0 -19
- package/dist/host-checks-VUDUPDL2.js +0 -78
- package/dist/host-key-2OWJL2HZ.js +0 -17
- package/dist/init-MXVIYHXE.js +0 -78
- package/dist/install-cmd-4PDNS3MC.js +0 -20
- package/dist/loop-N3C4AOPY.js +0 -89
- package/dist/machine-JYGGT4TB.js +0 -78
- package/dist/pending-WSR6KRTI.js +0 -17
- package/dist/runner-env-NXNGYKU4.js +0 -23
- package/dist/state-ZOM5PUYK.js +0 -17
- package/dist/update-steps-BWIZEAAM.js +0 -79
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { CLAUDE_CODE_HOOKS } from './chunk-
|
|
4
|
-
import { CLAUDE_CODE, NATIVE_AGENTS, LEGACY_AGENT } from './chunk-
|
|
3
|
+
import { CLAUDE_CODE_HOOKS } from './chunk-NOLS2G2W.js';
|
|
4
|
+
import { CLAUDE_CODE, NATIVE_AGENTS, LEGACY_AGENT, homeRelative } from './chunk-QJKW4MKH.js';
|
|
5
5
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
6
6
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
8
|
-
import { forkFor, RAW_MIRROR_SEGMENTS, WarningCollector, WARNING_CODES, isNewerThanSupported, bucketsFromTurns, costOfUsage } from './chunk-
|
|
8
|
+
import { forkFor, RAW_MIRROR_SEGMENTS, WarningCollector, WARNING_CODES, isNewerThanSupported, bucketsFromTurns, costOfUsage } from './chunk-WZOWXDDM.js';
|
|
9
9
|
import { RESERVED_EMIT_NAMES, EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, ARTIFACT_KINDS, ArtifactCriterionIdSchema, SPEED_MAX_LENGTH } from './chunk-WUKLQWGY.js';
|
|
10
10
|
import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
|
|
11
11
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync, rmSync, renameSync, realpathSync, readlinkSync, symlinkSync, copyFileSync, statSync, accessSync, constants, lstatSync } from 'fs';
|
|
@@ -8089,7 +8089,7 @@ function parseCustomFile(file, problems) {
|
|
|
8089
8089
|
let declaresEmit = null;
|
|
8090
8090
|
let runWhere;
|
|
8091
8091
|
let command;
|
|
8092
|
-
let
|
|
8092
|
+
let judge2;
|
|
8093
8093
|
if (hasRun) {
|
|
8094
8094
|
const run = root["run"];
|
|
8095
8095
|
if (!isRecord(run) || Object.keys(run).some((key) => key !== "where" && key !== "emit" && key !== "command" && key !== "judge")) {
|
|
@@ -8132,7 +8132,7 @@ function parseCustomFile(file, problems) {
|
|
|
8132
8132
|
`"${id}" run.judge.brief must be a relative path inside the repository, of at most ${MAX_BRIEF_LENGTH} characters, with no ".." segment`
|
|
8133
8133
|
);
|
|
8134
8134
|
}
|
|
8135
|
-
|
|
8135
|
+
judge2 = { brief: brief.trim(), subjects: rawSubjects };
|
|
8136
8136
|
runWhere = "host";
|
|
8137
8137
|
} else if (where === "host") {
|
|
8138
8138
|
const rawCommand = run["command"];
|
|
@@ -8174,7 +8174,7 @@ function parseCustomFile(file, problems) {
|
|
|
8174
8174
|
declaresEmit,
|
|
8175
8175
|
...runWhere === void 0 ? {} : { runWhere },
|
|
8176
8176
|
...command === void 0 ? {} : { command },
|
|
8177
|
-
...
|
|
8177
|
+
...judge2 === void 0 ? {} : { judge: judge2 }
|
|
8178
8178
|
},
|
|
8179
8179
|
file: file.path,
|
|
8180
8180
|
validatorRefs: requireAny.flatMap((alt) => alt.type === "validator" ? [alt.id] : []),
|
|
@@ -8528,7 +8528,7 @@ function parseProofsConfig(text) {
|
|
|
8528
8528
|
|
|
8529
8529
|
// ../agents/src/claude-code/capture/discover.ts
|
|
8530
8530
|
function defaultProjectsDir(io) {
|
|
8531
|
-
return io.path.join(io.home(), CLAUDE_CODE.capture.sessionFolder
|
|
8531
|
+
return io.path.join(io.home(), homeRelative(CLAUDE_CODE.capture.sessionFolder));
|
|
8532
8532
|
}
|
|
8533
8533
|
function defaultRawDir(io) {
|
|
8534
8534
|
return io.path.join(io.home(), ...RAW_MIRROR_SEGMENTS);
|
|
@@ -9526,6 +9526,10 @@ function createClaudeCodeCapture(io) {
|
|
|
9526
9526
|
}
|
|
9527
9527
|
return [...byId.values()];
|
|
9528
9528
|
},
|
|
9529
|
+
sessionFiles: ({ home, cwd, sessionId }) => ({
|
|
9530
|
+
dir: `${home}/${homeRelative(CLAUDE_CODE.capture.sessionFolder)}/${cwd.replace(/[^A-Za-z0-9]/g, "-")}`,
|
|
9531
|
+
entries: [`${sessionId}.jsonl`, sessionId]
|
|
9532
|
+
}),
|
|
9529
9533
|
parse(entry, opts) {
|
|
9530
9534
|
const text = io.fs.readRawText(entry.file);
|
|
9531
9535
|
if (text === void 0) throw new Error(`cannot read the transcript ${entry.file}`);
|
|
@@ -10406,6 +10410,66 @@ function createClaudeCodeImage() {
|
|
|
10406
10410
|
};
|
|
10407
10411
|
}
|
|
10408
10412
|
|
|
10413
|
+
// ../agents/src/claude-code/headless.ts
|
|
10414
|
+
var PERMISSION_MODES = ["acceptEdits", "auto", "bypassPermissions", "default", "dontAsk", "manual", "plan"];
|
|
10415
|
+
var JUDGE_TOOLS = "Read,Grep,Glob,Write";
|
|
10416
|
+
function judge(input) {
|
|
10417
|
+
const env = {
|
|
10418
|
+
HOME: input.home,
|
|
10419
|
+
TMPDIR: `${input.home}/tmp`,
|
|
10420
|
+
PATH: input.path,
|
|
10421
|
+
ANTHROPIC_BASE_URL: input.providerUrl("anthropic"),
|
|
10422
|
+
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1",
|
|
10423
|
+
DISABLE_AUTOUPDATER: "1",
|
|
10424
|
+
...input.credential === void 0 ? {} : { [input.credential.variable]: input.credential.placeholder }
|
|
10425
|
+
};
|
|
10426
|
+
const args = [
|
|
10427
|
+
"-p",
|
|
10428
|
+
"--output-format",
|
|
10429
|
+
"json",
|
|
10430
|
+
"--setting-sources",
|
|
10431
|
+
"user",
|
|
10432
|
+
"--strict-mcp-config",
|
|
10433
|
+
"--disable-slash-commands",
|
|
10434
|
+
"--no-session-persistence",
|
|
10435
|
+
"--tools",
|
|
10436
|
+
JUDGE_TOOLS,
|
|
10437
|
+
"--allowedTools",
|
|
10438
|
+
// A path that starts with two slashes is absolute in a permission rule.
|
|
10439
|
+
[`Read(/${input.dir}/**)`, ...input.writable.map((file) => `Edit(/${file})`)].join(","),
|
|
10440
|
+
"--add-dir",
|
|
10441
|
+
input.tree,
|
|
10442
|
+
"--permission-mode",
|
|
10443
|
+
"dontAsk",
|
|
10444
|
+
"--max-turns",
|
|
10445
|
+
String(input.maxTurns),
|
|
10446
|
+
// After the separator, so a brief that starts with a dash is not read as an option.
|
|
10447
|
+
"--",
|
|
10448
|
+
input.brief
|
|
10449
|
+
];
|
|
10450
|
+
return { program: createClaudeCodeImage().program, args, env, driver: "exec", exitFrom: "code" };
|
|
10451
|
+
}
|
|
10452
|
+
function readJudgeOutput(stdout) {
|
|
10453
|
+
try {
|
|
10454
|
+
const parsed = JSON.parse(stdout);
|
|
10455
|
+
if (typeof parsed !== "object" || parsed === null) return void 0;
|
|
10456
|
+
const { subtype, result } = parsed;
|
|
10457
|
+
if (subtype === "error_max_turns") return { kind: "turn-limit" };
|
|
10458
|
+
return { kind: "text", text: typeof result === "string" ? result : "" };
|
|
10459
|
+
} catch {
|
|
10460
|
+
return void 0;
|
|
10461
|
+
}
|
|
10462
|
+
}
|
|
10463
|
+
function createClaudeCodeHeadless() {
|
|
10464
|
+
return {
|
|
10465
|
+
commandLine: (prompt) => `${CLAUDE_CODE.program} -p "${prompt}" --permission-mode bypassPermissions`,
|
|
10466
|
+
promptFlags: ["-p", "--print"],
|
|
10467
|
+
permissionMode: { flag: "--permission-mode", accepted: PERMISSION_MODES },
|
|
10468
|
+
judge,
|
|
10469
|
+
readJudgeOutput
|
|
10470
|
+
};
|
|
10471
|
+
}
|
|
10472
|
+
|
|
10409
10473
|
// ../agents/src/claude-code/launch.ts
|
|
10410
10474
|
var SESSION_ID_VARIABLE = "OUTERLAYER_SESSION_ID";
|
|
10411
10475
|
var RESUME_SESSION_VARIABLE = "OUTERLAYER_RESUME_SESSION";
|
|
@@ -10541,15 +10605,18 @@ var CLAUDE_CODE_MCP = {
|
|
|
10541
10605
|
};
|
|
10542
10606
|
|
|
10543
10607
|
// ../agents/src/claude-code/adapter.ts
|
|
10608
|
+
var DELIVERED_ENTRIES = ["AGENTS.md", "CLAUDE.md", "settings.json", ".claude", ".outerlayer", ".agents"];
|
|
10544
10609
|
function createClaudeCodeAdapter(io) {
|
|
10545
10610
|
const context = {
|
|
10546
10611
|
emit: buildClaudeCode,
|
|
10547
10612
|
...createDelivery(io),
|
|
10613
|
+
deliveredEntries: DELIVERED_ENTRIES,
|
|
10548
10614
|
mcp: CLAUDE_CODE_MCP
|
|
10549
10615
|
};
|
|
10550
10616
|
return {
|
|
10551
10617
|
context,
|
|
10552
10618
|
launch: createLaunch(io),
|
|
10619
|
+
headless: createClaudeCodeHeadless(),
|
|
10553
10620
|
lifecycle: {
|
|
10554
10621
|
source: { kind: "hook-process", codec: CLAUDE_CODE_HOOKS },
|
|
10555
10622
|
detectInSession: (env) => Boolean(env.CLAUDECODE),
|
|
@@ -10583,6 +10650,7 @@ var PATHS = [".outerlayer/AGENTS.md", ".outerlayer/skills/build/SKILL.md", ".out
|
|
|
10583
10650
|
})}
|
|
10584
10651
|
`
|
|
10585
10652
|
},
|
|
10653
|
+
judgeOutput: { stdout: JSON.stringify({ type: "result", subtype: "success", result: "result: pass" })},
|
|
10586
10654
|
hooks: {
|
|
10587
10655
|
payloads: Object.fromEntries(
|
|
10588
10656
|
["SessionStart", "SessionEnd", "Stop", "PostToolUse"].map((name) => [
|
|
@@ -10844,10 +10912,10 @@ function legacySubcommand(agents = defaultAgents()) {
|
|
|
10844
10912
|
return legacyAgent(agents).descriptor.legacy?.subcommand ?? LEGACY_AGENT;
|
|
10845
10913
|
}
|
|
10846
10914
|
function userSkillFolderIn(home, descriptor) {
|
|
10847
|
-
return join$1(home, descriptor.context.userSkillFolder
|
|
10915
|
+
return join$1(home, homeRelative(descriptor.context.userSkillFolder));
|
|
10848
10916
|
}
|
|
10849
10917
|
function sessionFolderIn(home, descriptor) {
|
|
10850
|
-
return join$1(home, descriptor.capture.sessionFolder
|
|
10918
|
+
return join$1(home, homeRelative(descriptor.capture.sessionFolder));
|
|
10851
10919
|
}
|
|
10852
10920
|
function agentRootFolders(agents = defaultAgents()) {
|
|
10853
10921
|
return [...new Set(contextAgents(agents).flatMap((agent) => agent.descriptor.context.repoSkillFolders.map((folder) => folder.split("/")[0])))];
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
4
4
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
5
|
-
import { linkedAgentsPath } from './chunk-
|
|
6
|
-
import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-
|
|
7
|
-
import { LEGACY_AGENT } from './chunk-
|
|
5
|
+
import { linkedAgentsPath } from './chunk-DEZSNJSE.js';
|
|
6
|
+
import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-54ERDQ3O.js';
|
|
7
|
+
import { LEGACY_AGENT } from './chunk-QJKW4MKH.js';
|
|
8
8
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
9
9
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
10
10
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-
|
|
4
|
-
import { parseSize } from './chunk-
|
|
5
|
-
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-
|
|
6
|
-
import { builderDiskPinned } from './chunk-
|
|
3
|
+
import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-IEVARJ6G.js';
|
|
4
|
+
import { parseSize } from './chunk-6UI4ELNA.js';
|
|
5
|
+
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-LDKF6B2R.js';
|
|
6
|
+
import { builderDiskPinned } from './chunk-IEDO26G4.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
8
8
|
import { existsSync, statSync, accessSync, constants, readFileSync } from 'fs';
|
|
9
9
|
import { hostname } from 'os';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveDevcontainerCli, devcontainerBuildInvocation, universalImagePending, RecipeError } from './chunk-
|
|
4
|
-
import { ensureHostKey } from './chunk-
|
|
5
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-
|
|
6
|
-
import { BUILD_HOME, JOB_MOUNT, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { resolveDevcontainerCli, devcontainerBuildInvocation, universalImagePending, RecipeError } from './chunk-YCBVYTFI.js';
|
|
4
|
+
import { ensureHostKey } from './chunk-KHJPRTOW.js';
|
|
5
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-L3SHPR2M.js';
|
|
6
|
+
import { BUILD_HOME, JOB_MOUNT, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-LDKF6B2R.js';
|
|
7
|
+
import { primaryDestination, JOIN_DIR, RELAY_ID, JOIN_SOCKET, GATEWAY_PORT, TARGET_GATEWAY, GATEWAY_SOCKET, destinationTarget, providerDestinations, RELAY_USER } from './chunk-7UYXSF62.js';
|
|
8
|
+
import { jobAgent, universalImagePinned, UNIVERSAL_IMAGE, BUILDKIT_IMAGE } from './chunk-IEDO26G4.js';
|
|
9
|
+
import { defaultAgents } from './chunk-54ERDQ3O.js';
|
|
10
|
+
import { PROVIDERS } from './chunk-QJKW4MKH.js';
|
|
11
|
+
import { compareVersions } from './chunk-WZOWXDDM.js';
|
|
11
12
|
import { createHash } from 'crypto';
|
|
12
13
|
import { mkdirSync, createWriteStream, rmSync, existsSync, readFileSync, chmodSync, writeFileSync, realpathSync, readdirSync, renameSync } from 'fs';
|
|
13
14
|
import { dirname, join, posix, resolve } from 'path';
|
|
@@ -387,54 +388,48 @@ async function ensureRunnerIdentity(configPath, deps = {}) {
|
|
|
387
388
|
return identity;
|
|
388
389
|
}
|
|
389
390
|
|
|
391
|
+
// src/runner/command-output.ts
|
|
392
|
+
function firstLine(text) {
|
|
393
|
+
return text.trim().split("\n")[0] ?? "";
|
|
394
|
+
}
|
|
395
|
+
function said(output) {
|
|
396
|
+
const line = firstLine(output);
|
|
397
|
+
return line === "" ? "" : `: ${line}`;
|
|
398
|
+
}
|
|
399
|
+
|
|
390
400
|
// src/runner/judge-command.ts
|
|
391
401
|
var JUDGE_DIR = "/outerlayer/judge";
|
|
392
402
|
var JUDGE_HOME = `${JUDGE_DIR}/home`;
|
|
393
403
|
var JUDGE_TREE = `${JUDGE_DIR}/tree`;
|
|
394
404
|
var JUDGE_REPORT = `${JUDGE_DIR}/report.html`;
|
|
395
405
|
var JUDGE_ITEMS = `${JUDGE_DIR}/items.json`;
|
|
396
|
-
|
|
406
|
+
function judgeProgram(agents = defaultAgents()) {
|
|
407
|
+
return jobAgent(void 0, agents)?.adapter.image?.program;
|
|
408
|
+
}
|
|
409
|
+
judgeProgram() ?? "";
|
|
397
410
|
var MAX_REPORT_BYTES = 5 * 1024 * 1024;
|
|
398
411
|
var MAX_ITEMS_BYTES = 1024 * 1024;
|
|
399
412
|
var JUDGE_MAX_TURNS = 60;
|
|
400
413
|
var JUDGE_PATH = "/opt/outerlayer/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
"--disable-slash-commands",
|
|
421
|
-
"--no-session-persistence",
|
|
422
|
-
"--tools",
|
|
423
|
-
JUDGE_TOOLS,
|
|
424
|
-
"--allowedTools",
|
|
425
|
-
// A path that starts with two slashes is absolute in a permission rule.
|
|
426
|
-
`Read(/${JUDGE_DIR}/**),Edit(/${JUDGE_REPORT}),Edit(/${JUDGE_ITEMS})`,
|
|
427
|
-
"--add-dir",
|
|
428
|
-
JUDGE_TREE,
|
|
429
|
-
"--permission-mode",
|
|
430
|
-
"dontAsk",
|
|
431
|
-
"--max-turns",
|
|
432
|
-
String(JUDGE_MAX_TURNS),
|
|
433
|
-
// After the separator, so a brief that starts with a dash is not read as an option.
|
|
434
|
-
"--",
|
|
435
|
-
input.brief
|
|
436
|
-
];
|
|
437
|
-
return { argv, env, cwd: JUDGE_DIR };
|
|
414
|
+
function judgeCommand(input, agents = defaultAgents()) {
|
|
415
|
+
const agent = jobAgent(void 0, agents);
|
|
416
|
+
if (agent?.adapter.headless === void 0) throw new Error(`${agent?.descriptor.label ?? "the agent list"} has no headless part, so it cannot run the judge`);
|
|
417
|
+
const headless = agent.adapter.headless;
|
|
418
|
+
const providers = PROVIDERS;
|
|
419
|
+
const fallback = primaryDestination(agents)?.port;
|
|
420
|
+
const spec = headless.judge({
|
|
421
|
+
brief: input.brief,
|
|
422
|
+
dir: JUDGE_DIR,
|
|
423
|
+
tree: JUDGE_TREE,
|
|
424
|
+
home: JUDGE_HOME,
|
|
425
|
+
path: JUDGE_PATH,
|
|
426
|
+
writable: [JUDGE_REPORT, JUDGE_ITEMS],
|
|
427
|
+
maxTurns: JUDGE_MAX_TURNS,
|
|
428
|
+
providerUrl: (provider) => `http://127.0.0.1:${providers[provider]?.destination.port ?? fallback}`,
|
|
429
|
+
credential: input.credential
|
|
430
|
+
});
|
|
431
|
+
if (spec.program !== judgeProgram(agents)) throw new Error(`${agent.descriptor.label} runs the judge as ${spec.program}, and not as its image program that the runner hashes`);
|
|
432
|
+
return { argv: [spec.program, ...spec.args], env: spec.env, cwd: JUDGE_DIR };
|
|
438
433
|
}
|
|
439
434
|
function withAnswerProtocol(brief, subjects) {
|
|
440
435
|
const inputs = subjects === "criteria" ? `\`${JUDGE_DIR}/criteria.json\` lists the criteria to judge, \`${JUDGE_DIR}/citations.json\` the tests that cite each one, \`${JUDGE_DIR}/diff.patch\` the change and \`${JUDGE_TREE}/\` the files of the pushed commit.` : `\`${JUDGE_DIR}/diff.patch\` holds the change and \`${JUDGE_TREE}/\` the files of the pushed commit.`;
|
|
@@ -451,7 +446,21 @@ Then end your reply with one line \`unmet: <id>\` for each failing ${subjects ==
|
|
|
451
446
|
`;
|
|
452
447
|
}
|
|
453
448
|
var HASH_SCRIPT = 'const fs=require("fs"),c=require("crypto");const p=fs.realpathSync(process.argv[1]);process.stdout.write(c.createHash("sha256").update(fs.readFileSync(p)).digest("hex")+" "+p+"\\n")';
|
|
454
|
-
|
|
449
|
+
function hashArgv(agents = defaultAgents()) {
|
|
450
|
+
return ["/opt/outerlayer/bin/node", "-e", HASH_SCRIPT, judgeProgram(agents) ?? ""];
|
|
451
|
+
}
|
|
452
|
+
hashArgv();
|
|
453
|
+
async function hashJudgeProgram(run, agents = defaultAgents()) {
|
|
454
|
+
const ran = await run([...hashArgv(agents)]);
|
|
455
|
+
const sha256 = ran.status === 0 ? parseProgramHash(ran.stdout) : void 0;
|
|
456
|
+
return sha256 === void 0 ? { ok: false, reason: firstLine(ran.stderr) || `the hash could not be taken (exit ${ran.status})` } : { ok: true, sha256 };
|
|
457
|
+
}
|
|
458
|
+
async function judgeProgramRecord(run, agents = defaultAgents()) {
|
|
459
|
+
const path = judgeProgram(agents);
|
|
460
|
+
if (path === void 0) return void 0;
|
|
461
|
+
const hashed = await hashJudgeProgram(run, agents);
|
|
462
|
+
return hashed.ok ? { path, sha256: hashed.sha256 } : void 0;
|
|
463
|
+
}
|
|
455
464
|
function parseProgramHash(stdout) {
|
|
456
465
|
return /^([0-9a-f]{64}) /.exec(stdout.trim())?.[1];
|
|
457
466
|
}
|
|
@@ -751,8 +760,8 @@ function driverOpt(pair) {
|
|
|
751
760
|
async function buildxState(run) {
|
|
752
761
|
const result = await run("docker", ["buildx", "version"]);
|
|
753
762
|
if (result.status !== 0) {
|
|
754
|
-
const
|
|
755
|
-
return { problem: `docker buildx is not available${
|
|
763
|
+
const said2 = (result.stderr.trim() || result.stdout.trim()).split("\n")[0] ?? "";
|
|
764
|
+
return { problem: `docker buildx is not available${said2 === "" ? "" : ` (${said2})`}, so image builds cannot be limited; ${INSTALL_HINT}` };
|
|
756
765
|
}
|
|
757
766
|
const version = /\bv?(\d+\.\d+\.\d+)/.exec(result.stdout)?.[1];
|
|
758
767
|
if (version !== void 0 && compareVersions(version, MIN_BUILDX_VERSION) < 0) {
|
|
@@ -837,11 +846,11 @@ function ensureBuilder(rawRun, spec, options = {}) {
|
|
|
837
846
|
...opts.flatMap((opt) => ["--driver-opt", driverOpt(opt)])
|
|
838
847
|
]);
|
|
839
848
|
if (created.status !== 0) {
|
|
840
|
-
const
|
|
841
|
-
if (/failed to find driver/i.test(
|
|
849
|
+
const said2 = created.stderr.trim() || `docker exited ${created.status}`;
|
|
850
|
+
if (/failed to find driver/i.test(said2)) {
|
|
842
851
|
return { ok: false, problem: `this Docker's Buildx has no docker-container driver, so image builds cannot be limited; ${INSTALL_HINT}` };
|
|
843
852
|
}
|
|
844
|
-
return { ok: false, problem: `could not create the image builder ${spec.name}: ${
|
|
853
|
+
return { ok: false, problem: `could not create the image builder ${spec.name}: ${said2}` };
|
|
845
854
|
}
|
|
846
855
|
}
|
|
847
856
|
if (options.bootstrap === true) {
|
|
@@ -864,4 +873,4 @@ function ensureBuilder(rawRun, spec, options = {}) {
|
|
|
864
873
|
);
|
|
865
874
|
}
|
|
866
875
|
|
|
867
|
-
export { BUILD_LABEL, COMMAND_DIR,
|
|
876
|
+
export { BUILD_LABEL, COMMAND_DIR, JUDGE_DIR, JUDGE_ITEMS, JUDGE_MAX_TURNS, JUDGE_REPORT, MAX_ITEMS_BYTES, MAX_REPORT_BYTES, MIN_BUILDX_VERSION, NETWORK_HELPER_MEMORY, NETWORK_READY_FILE, RUNNER_LABEL, SAVED_STATE_LABEL, WORKSPACE_LABEL, builderName, builderNameFor, builderSpec, buildxState, childEnvironment, containerExecArgs, containerRunArgs, createDockerHost, dockerIdentity, ensureBuilder, ensureFailureCount, ensureRunnerIdentity, exceedsDisk, firstLine, hashJudgeProgram, homeCopyArgs, homeCopyRunArgs, homeCopyScript, identityArgs, identityDockerFor, identityRunArgs, identityScript, isOutOfMemory, judgeCommand, judgeProgramRecord, mountableHome, networkHelperName, networkHelperRunArgs, parseIdentity, parseSize, pathLabelValue, prepareRunArgs, proxyEnvironment, readDu, readJobFile, readJobFileChecked, readRunnerIdentity, runnerLabelValue, said, spawnRun, trackImageBuild, withAnswerProtocol, writeJobFile };
|
|
@@ -1,232 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { providersOf, JOB_AGENT_ID, credentialEnvPath, credentialNames, credentialForms, runnerAgents, strippedVariables, credentialAgent, forwardedVariables, MANAGED_KIND } from './chunk-IEDO26G4.js';
|
|
4
|
+
import { defaultAgents } from './chunk-54ERDQ3O.js';
|
|
5
|
+
import { PROVIDERS } from './chunk-QJKW4MKH.js';
|
|
5
6
|
import { statSync, readFileSync } from 'fs';
|
|
6
|
-
import { join
|
|
7
|
+
import { join } from 'path';
|
|
7
8
|
import { spawn, spawnSync } from 'child_process';
|
|
8
9
|
|
|
9
10
|
createRequire(import.meta.url);
|
|
10
|
-
|
|
11
|
-
// src/runner/image/pins.ts
|
|
12
|
-
var CLAUDE_CODE_VERSION = "2.1.284";
|
|
13
|
-
var DEFAULT_BASE_IMAGE = "ubuntu:24.04@sha256:008173c23f95b170204355c12626cb5a965d779a7e1283b09e9cffbb1bf33ca3";
|
|
14
|
-
var NODE_IMAGE = "node:22-bookworm-slim@sha256:43ac6c60b8f89723f746e8a92ce91abd5017e627ce1ddfe4238355d3a30b772c";
|
|
15
|
-
var BUILDKIT_IMAGE = "moby/buildkit:v0.33.1@sha256:cec9f139f45e93c5c69c60f8b07cfad9f43f4ef6b6a6cd917527fea5ff2e3dea";
|
|
16
|
-
var GH_VERSION = "2.101.0";
|
|
17
|
-
var GH_SHA256 = {
|
|
18
|
-
amd64: "9bca2d1c16825f109907a23307628a2f0698fbf99662b73a5cf0b020293072b8",
|
|
19
|
-
arm64: "b57e8063f18862647c9d22727c32e9da1b963f8bf9db648fe123a6975695640f"
|
|
20
|
-
};
|
|
21
|
-
var TINI_VERSION = "0.19.0";
|
|
22
|
-
var TINI_SHA256 = {
|
|
23
|
-
amd64: "c5b0666b4cb676901f90dfcb37106783c5fe2077b04590973b885950611b30ee",
|
|
24
|
-
arm64: "eae1d3aa50c48fb23b8cbdf4e369d0910dfc538566bfd09df89a774aa84a48b9"
|
|
25
|
-
};
|
|
26
|
-
var MICROVM_ARCHES = ["x86_64"];
|
|
27
|
-
function firecrackerArch(nodeArch) {
|
|
28
|
-
return nodeArch === "x64" ? "x86_64" : nodeArch === "arm64" ? "aarch64" : nodeArch;
|
|
29
|
-
}
|
|
30
|
-
var FIRECRACKER_VERSION = "1.17.0";
|
|
31
|
-
var FIRECRACKER_SHA256 = {
|
|
32
|
-
x86_64: "06094a1108ae9e82aa4c23a775aa92758f53f1175d422270d9d6162cb9ade558"
|
|
33
|
-
};
|
|
34
|
-
var FIRECRACKER_BINARY_SHA256 = {
|
|
35
|
-
x86_64: "99ad0f5cd0514a88aad0e9ae8cfdb3cc3b4ab9d190e1194602406c786b5de7a5"
|
|
36
|
-
};
|
|
37
|
-
var GUEST_ASSETS_VERSION = "16";
|
|
38
|
-
var GUEST_ASSETS_BASE_URL = `https://github.com/outerlayerai/guest-assets/releases/download/guest-${GUEST_ASSETS_VERSION}`;
|
|
39
|
-
var GUEST_KERNEL_SHA256 = {
|
|
40
|
-
x86_64: "8552fad4bdea1d49f3e7d2aa500ce3f8918fcd2fc66779fd83235949688a39bb"
|
|
41
|
-
};
|
|
42
|
-
var GUEST_HELPER_SHA256 = {
|
|
43
|
-
x86_64: "c3c7f30a7238d274ea220632bb43a0e46589ee4194e9d7351774c17a2541cc12"
|
|
44
|
-
};
|
|
45
|
-
function guestAssetsPinned(arch) {
|
|
46
|
-
const zero = "0".repeat(64);
|
|
47
|
-
return GUEST_KERNEL_SHA256[arch] !== zero && GUEST_HELPER_SHA256[arch] !== zero;
|
|
48
|
-
}
|
|
49
|
-
var NETWORK_HELPER_SHA256 = {
|
|
50
|
-
x86_64: "c3c7f30a7238d274ea220632bb43a0e46589ee4194e9d7351774c17a2541cc12",
|
|
51
|
-
aarch64: "02c10b2c2b7b233375e8f127ef3dd9fe43f9426a18f0d2cbb81b103911c62703"
|
|
52
|
-
};
|
|
53
|
-
function networkHelperPinned(arch, hashes = NETWORK_HELPER_SHA256) {
|
|
54
|
-
return Object.hasOwn(hashes, arch) && hashes[arch] !== "0".repeat(64);
|
|
55
|
-
}
|
|
56
|
-
var JAILER_BINARY_SHA256 = {
|
|
57
|
-
x86_64: "65ef226e96f0ceda55ba643f445801ef2cc0ea667ef67cad8ac4f406c9c8434f"
|
|
58
|
-
};
|
|
59
|
-
var HOST_HELPER_ASSETS_VERSION = "17";
|
|
60
|
-
var HOST_HELPER_BASE_URL = `https://github.com/outerlayerai/guest-assets/releases/download/guest-${HOST_HELPER_ASSETS_VERSION}`;
|
|
61
|
-
var HOST_HELPER_SHA256 = {
|
|
62
|
-
x86_64: "0cd70e76a462212ed334b90edefb3dc1e4c584f93af7d990dbc801b67884f29f"
|
|
63
|
-
};
|
|
64
|
-
var HOST_HELPER_SLICE_SINCE = 15;
|
|
65
|
-
function hostHelperSupportsSlice(version = HOST_HELPER_ASSETS_VERSION) {
|
|
66
|
-
return Number(version) >= HOST_HELPER_SLICE_SINCE;
|
|
67
|
-
}
|
|
68
|
-
function hostHelperPinned(arch = "x86_64", hashes = HOST_HELPER_SHA256) {
|
|
69
|
-
return hashes[arch] !== "0".repeat(64);
|
|
70
|
-
}
|
|
71
|
-
var BUILDER_DISK_VERSION = "1";
|
|
72
|
-
var BUILDER_DISK_BASE_URL = `https://github.com/outerlayerai/guest-assets/releases/download/builder-${BUILDER_DISK_VERSION}`;
|
|
73
|
-
var BUILDER_DISK_SHA256 = {
|
|
74
|
-
x86_64: "fb581f3cc5a7329b2f65b5d62e42be8a53cf845596a76d7ad938ba4c2598dc37"
|
|
75
|
-
};
|
|
76
|
-
function builderDiskPinned(arch = "x86_64", hashes = BUILDER_DISK_SHA256) {
|
|
77
|
-
return hashes[arch] !== "0".repeat(64);
|
|
78
|
-
}
|
|
79
|
-
var VOICE_PACK_VERSION = "kokoro-82m-v1.0-ort-1.21.0";
|
|
80
|
-
var KOKORO_REVISION = "1939ad2a8e416c0acfeecc08a694d14ef25f2231";
|
|
81
|
-
var KOKORO_BASE_URL = `https://huggingface.co/onnx-community/Kokoro-82M-v1.0-ONNX/resolve/${KOKORO_REVISION}`;
|
|
82
|
-
var ONNX_RUNTIME_VERSION = "1.21.0";
|
|
83
|
-
var VOICE_PACK_FILES = [
|
|
84
|
-
{
|
|
85
|
-
name: "model.onnx",
|
|
86
|
-
url: `${KOKORO_BASE_URL}/onnx/model.onnx`,
|
|
87
|
-
sha256: "8fbea51ea711f2af382e88c833d9e288c6dc82ce5e98421ea61c058ce21a34cb"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
name: "af_heart.bin",
|
|
91
|
-
url: `${KOKORO_BASE_URL}/voices/af_heart.bin`,
|
|
92
|
-
sha256: "d583ccff3cdca2f7fae535cb998ac07e9fcb90f09737b9a41fa2734ec44a8f0b"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: "tokenizer.json",
|
|
96
|
-
url: `${KOKORO_BASE_URL}/tokenizer.json`,
|
|
97
|
-
sha256: "77a02c8e164413299b4b4c403b14f8e0e1c1b727db4d46a09d6327b861060a34"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: `onnxruntime-node-${ONNX_RUNTIME_VERSION}.tgz`,
|
|
101
|
-
url: `https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-${ONNX_RUNTIME_VERSION}.tgz`,
|
|
102
|
-
sha256: "c711a4048a8b460a70de25a5008b1628e3773878ef9deec1dd4a4ccab46de01a"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
name: `onnxruntime-common-${ONNX_RUNTIME_VERSION}.tgz`,
|
|
106
|
-
url: `https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-${ONNX_RUNTIME_VERSION}.tgz`,
|
|
107
|
-
sha256: "9c6126102b312514e64703c0922772974ee5c83e89eb345161226bcfeb67a22c"
|
|
108
|
-
}
|
|
109
|
-
];
|
|
110
|
-
var FFMPEG_BUILD_TAG = "autobuild-2026-09-30-13-08";
|
|
111
|
-
var FFMPEG_STATIC = {
|
|
112
|
-
amd64: {
|
|
113
|
-
file: "ffmpeg-n8.1.3-9-g29e619e767-linux64-lgpl-8.1.tar.xz",
|
|
114
|
-
sha256: "dfa863a00ca81f1bdf58a372b18cff4820f0017e55de32778de8ecd8ed92a02e"
|
|
115
|
-
},
|
|
116
|
-
arm64: {
|
|
117
|
-
file: "ffmpeg-n8.1.3-9-g29e619e767-linuxarm64-lgpl-8.1.tar.xz",
|
|
118
|
-
sha256: "8463881ca7a25015ca6e00f5c91dd2f1637eb73d33c8230413cb74db760a86b3"
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
var PLAYWRIGHT_VERSION = "1.64.1";
|
|
122
|
-
var HEADLESS_SHELL_VERSION = "156.0.8078.4";
|
|
123
|
-
var HEADLESS_SHELL_REVISION = "1248";
|
|
124
|
-
var HEADLESS_SHELL_BASE_URL = `https://cdn.playwright.dev/builds/cft/${HEADLESS_SHELL_VERSION}`;
|
|
125
|
-
var HEADLESS_SHELL = {
|
|
126
|
-
amd64: {
|
|
127
|
-
file: "linux64/chrome-headless-shell-linux64.zip",
|
|
128
|
-
sha256: "c3e50596aef52c58f8fda3c6b3411c33d34c88b177b3ed1c2243359fd3b8ba20"
|
|
129
|
-
},
|
|
130
|
-
arm64: {
|
|
131
|
-
file: "linux-arm64/chrome-headless-shell-linux-arm64.zip",
|
|
132
|
-
sha256: "81ab9d4d3c301dc5fdfb6c541b9e6632b16fc819a6a854460f40a76fe2b2c476"
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
var PLAYWRIGHT_FFMPEG_REVISION = "1013";
|
|
136
|
-
var PLAYWRIGHT_FFMPEG_BASE_URL = `https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/${PLAYWRIGHT_FFMPEG_REVISION}`;
|
|
137
|
-
var PLAYWRIGHT_FFMPEG = {
|
|
138
|
-
amd64: { file: "ffmpeg-linux.zip", sha256: "ee986434d158f74fb5d9c5ff1092026ceedb63f324fe90b5be89460926b7b679" },
|
|
139
|
-
arm64: { file: "ffmpeg-linux-arm64.zip", sha256: "457360e803a7d8d5f8f7f5ecf562b2d338f6b4f7f86339d0c31938a451e8878b" }
|
|
140
|
-
};
|
|
141
|
-
var MEDIA_PINS = `${VOICE_PACK_VERSION}+${FFMPEG_BUILD_TAG}+${HEADLESS_SHELL_VERSION}+${PLAYWRIGHT_FFMPEG_REVISION}`;
|
|
142
|
-
var UNIVERSAL_IMAGE_REPOSITORY = "ghcr.io/outerlayerai/universal";
|
|
143
|
-
var UNIVERSAL_IMAGE_SOURCE = "src-31a73cfe0a526ab602fbbec0deedffa4165e8f53f640da8fc4be775922f5c4f8";
|
|
144
|
-
var UNIVERSAL_IMAGE_DIGEST = "sha256:6ea02267766a9d312c80a9cff34d4af3d458f672df4befbba7c9c826d20cf9d5";
|
|
145
|
-
var UNIVERSAL_IMAGE = `${UNIVERSAL_IMAGE_REPOSITORY}:${UNIVERSAL_IMAGE_SOURCE}@${UNIVERSAL_IMAGE_DIGEST}`;
|
|
146
|
-
function universalImagePinned(digest = UNIVERSAL_IMAGE_DIGEST) {
|
|
147
|
-
return digest !== `sha256:${"0".repeat(64)}`;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// src/runner/runner-agents.ts
|
|
151
|
-
var AGENT_PINS = { [LEGACY_AGENT]: CLAUDE_CODE_VERSION };
|
|
152
|
-
function runnerAgents(agents = defaultAgents()) {
|
|
153
|
-
return agents.flatMap((agent) => agent.adapter.credentials === void 0 ? [] : [{ descriptor: agent.descriptor, adapter: agent.adapter, credentials: agent.adapter.credentials }]);
|
|
154
|
-
}
|
|
155
|
-
function credentialAgent(agents = defaultAgents()) {
|
|
156
|
-
return runnerAgents(agents)[0];
|
|
157
|
-
}
|
|
158
|
-
function buildAgent(agents = defaultAgents()) {
|
|
159
|
-
return agentById(LEGACY_AGENT, agents);
|
|
160
|
-
}
|
|
161
|
-
function runnerNameOf(descriptor) {
|
|
162
|
-
return descriptor.legacy?.runnerName ?? descriptor.id;
|
|
163
|
-
}
|
|
164
|
-
function runnerAgentNamed(name, agents = defaultAgents()) {
|
|
165
|
-
return runnerAgents(agents).find((agent) => runnerNameOf(agent.descriptor) === name);
|
|
166
|
-
}
|
|
167
|
-
function credentialNames(descriptor) {
|
|
168
|
-
return { envFile: descriptor.legacy?.envFile ?? `${descriptor.id}.env`, credentialId: descriptor.legacy?.credentialId ?? descriptor.id };
|
|
169
|
-
}
|
|
170
|
-
function credentialEnvPath(configPath, agents = defaultAgents()) {
|
|
171
|
-
const agent = credentialAgent(agents);
|
|
172
|
-
return agent === void 0 ? void 0 : join(dirname(configPath), credentialNames(agent.descriptor).envFile);
|
|
173
|
-
}
|
|
174
|
-
function handOffKey(descriptor) {
|
|
175
|
-
return descriptor.legacy?.handOffKey ?? `${descriptor.id}Credential`;
|
|
176
|
-
}
|
|
177
|
-
function credentialHandOffKey(agents = defaultAgents()) {
|
|
178
|
-
const agent = credentialAgent(agents);
|
|
179
|
-
return agent === void 0 ? "credential" : handOffKey(agent.descriptor);
|
|
180
|
-
}
|
|
181
|
-
var MANAGED_KIND = "api-key";
|
|
182
|
-
function managedKeyName(agents = defaultAgents(), providers = PROVIDERS) {
|
|
183
|
-
const provider = providersOf(agents, providers)[0];
|
|
184
|
-
if (provider === void 0) return MANAGED_KIND;
|
|
185
|
-
return `${provider.label} ${provider.credentialKinds.find((kind) => kind.id === MANAGED_KIND)?.label ?? MANAGED_KIND}`;
|
|
186
|
-
}
|
|
187
|
-
function storeVariables(forms) {
|
|
188
|
-
const [first, ...rest] = forms.variables;
|
|
189
|
-
return [`${first} (from \`${forms.setupCommand}\`)`, ...rest].join(" or ");
|
|
190
|
-
}
|
|
191
|
-
function credentialForms(descriptor) {
|
|
192
|
-
const { label, setupCommand, forwarded } = descriptor.credentials;
|
|
193
|
-
return { label, possessive: `${label}'s`, checkName: `${runnerNameOf(descriptor)} credential`, setupCommand, variables: forwarded, runnerName: runnerNameOf(descriptor), envFile: credentialNames(descriptor).envFile };
|
|
194
|
-
}
|
|
195
|
-
function credentialShapes(descriptor, providers = PROVIDERS) {
|
|
196
|
-
const { setupCommand, forwarded, kinds } = descriptor.credentials;
|
|
197
|
-
return forwarded.map((variable, index) => {
|
|
198
|
-
const kind = kinds[variable];
|
|
199
|
-
const provider = providers[kind.provider];
|
|
200
|
-
const name = `${provider?.label ?? kind.provider} ${provider?.credentialKinds.find((candidate) => candidate.id === kind.providerKind)?.label ?? kind.providerKind}`;
|
|
201
|
-
return { phrase: index === 0 ? `a token from \`${setupCommand}\`` : `${/^[AEIOU]/i.test(name) ? "an" : "a"} ${name}`, starts: kind.starts };
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
function orList(items) {
|
|
205
|
-
return items.length <= 2 ? items.join(", or ") : `${items.slice(0, -1).join(", ")}, or ${items.at(-1)}`;
|
|
206
|
-
}
|
|
207
|
-
function forwardedVariables(agents = defaultAgents()) {
|
|
208
|
-
return [...new Set(runnerAgents(agents).flatMap((agent) => agent.descriptor.credentials.forwarded))];
|
|
209
|
-
}
|
|
210
|
-
function strippedVariables(agents = defaultAgents()) {
|
|
211
|
-
return [...new Set(runnerAgents(agents).flatMap((agent) => agent.descriptor.credentials.stripped))];
|
|
212
|
-
}
|
|
213
|
-
function providersOf(agents = defaultAgents(), providers = PROVIDERS) {
|
|
214
|
-
const named = runnerAgents(agents).flatMap((agent) => agent.descriptor.providers);
|
|
215
|
-
return [...new Set(named)].flatMap((id) => providers[id] === void 0 ? [] : [providers[id]]);
|
|
216
|
-
}
|
|
217
|
-
function buildAgentPin(agents = defaultAgents()) {
|
|
218
|
-
return AGENT_PINS[buildAgent(agents)?.descriptor.id ?? LEGACY_AGENT];
|
|
219
|
-
}
|
|
220
|
-
function agentVersionOf(toolsJson, agents = defaultAgents()) {
|
|
221
|
-
const agent = buildAgent(agents);
|
|
222
|
-
try {
|
|
223
|
-
const key = agent?.adapter.image?.versionKey;
|
|
224
|
-
const version = key === void 0 ? void 0 : JSON.parse(toolsJson)[key];
|
|
225
|
-
if (typeof version === "string" && version !== "") return version;
|
|
226
|
-
} catch {
|
|
227
|
-
}
|
|
228
|
-
return buildAgentPin(agents);
|
|
229
|
-
}
|
|
230
11
|
var FD_STORE_ENV = "OUTERLAYER_FD_STORE";
|
|
231
12
|
var MIN_SYSTEMD = 254;
|
|
232
13
|
var LISTEN_FDS_START = 3;
|
|
@@ -415,7 +196,7 @@ function firstOf(agent, values, source) {
|
|
|
415
196
|
const found = agent.credentials.classify(values);
|
|
416
197
|
return found === void 0 ? void 0 : { variable: found.variable, value: values[found.variable], source };
|
|
417
198
|
}
|
|
418
|
-
function readAgentCredential(env, agentId =
|
|
199
|
+
function readAgentCredential(env, agentId = JOB_AGENT_ID, agents = defaultAgents()) {
|
|
419
200
|
const agent = agentOf(agentId, agents);
|
|
420
201
|
if (agent === void 0) return void 0;
|
|
421
202
|
const fromEnvironment = firstOf(agent, env, "environment");
|
|
@@ -484,10 +265,10 @@ function takeAgentCredentials(env, hooks, agents = defaultAgents()) {
|
|
|
484
265
|
function removedAgentCredentialValues() {
|
|
485
266
|
return [...removedValues];
|
|
486
267
|
}
|
|
487
|
-
function heldAgentCredential(agentId =
|
|
268
|
+
function heldAgentCredential(agentId = JOB_AGENT_ID) {
|
|
488
269
|
return heldCopies.get(agentId);
|
|
489
270
|
}
|
|
490
|
-
function currentAgentCredential(env, agentId =
|
|
271
|
+
function currentAgentCredential(env, agentId = JOB_AGENT_ID, agents = defaultAgents()) {
|
|
491
272
|
return heldCopies.get(agentId) ?? readAgentCredential(env, agentId, agents);
|
|
492
273
|
}
|
|
493
274
|
var SETS = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=/;
|
|
@@ -651,4 +432,4 @@ var RUNNER_WORDED_REASONS = /* @__PURE__ */ new Set([
|
|
|
651
432
|
DOCKER_DESKTOP_REASON
|
|
652
433
|
]);
|
|
653
434
|
|
|
654
|
-
export { AGENT_CREDENTIAL_MISSING,
|
|
435
|
+
export { AGENT_CREDENTIAL_MISSING, BUILD_SLICE_MEMORY_ENV, COMMAND_LOST_REASON, CONTAINER_STOPPED_REASON, DOCKER_DESKTOP_REASON, FD_SLOTS_PER_BUILD, FD_STORE_ENV, GATEWAY_PORT, GATEWAY_SOCKET, JOIN_DIR, JOIN_SOCKET, JOIN_WAIT_MS, MALFORMED_REASON, MAX_MALFORMED_SESSIONS, MAX_OPEN_STREAMS, MIN_SYSTEMD, RELAY_ID, RELAY_USER, RUNNER_WORDED_REASONS, SESSION_WINDOW, STREAM_RESET_BURST, STREAM_RESET_RATE, STREAM_WINDOW, TARGET_GATEWAY, TARGET_LEASE, TARGET_TUNNEL, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, agentCredential, agentCredentialVariablesSet, builtInDestinations, builtInEnvironment, builtInNames, credentialLineIn, currentAgentCredential, destinationPort, destinationTarget, fdName, heldAgentCredential, inspectService, managedAgentCredential, parseRunnerEnv, primaryDestination, providerDestinations, readAgentCredential, realFdStorePort, realInspectProbes, removedAgentCredentialValues, takeAgentCredentials, targetOfPath, withoutCredentialLines };
|