@outerlayer/cli 0.40.0 → 0.41.0-next.20261117195646
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 +8 -5
- package/dist/agent-credential-JN5VDRUX.js +16 -0
- package/dist/agent-setup-7A66WE3X.js +43 -0
- package/dist/{agent-subcommand-U7TXKOF4.js → agent-subcommand-AE42NSHC.js} +6 -6
- package/dist/{artifact-link-cmd-HYEM4X5U.js → artifact-link-cmd-YMMRVRQD.js} +2 -2
- package/dist/bridge-PJTQ3XHE.js +19 -0
- package/dist/build-75I2U74U.js +28 -0
- package/dist/build-disk-Z5YFT47Z.js +23 -0
- package/dist/build-info.json +1 -1
- package/dist/builder-NNNVIN4P.js +22 -0
- package/dist/caller-H3KRGMJH.js +25 -0
- package/dist/{check-U5P5FFFB.js → check-KFQCKXHZ.js} +108 -90
- package/dist/{chunk-4KCWAP5L.js → chunk-23YVVYQC.js} +1 -1
- package/dist/{chunk-J3P4WLJA.js → chunk-26RXLXEX.js} +1 -1
- package/dist/{chunk-YYHSGZHO.js → chunk-2RUTYYYA.js} +1 -1
- package/dist/{chunk-6IGOHB3O.js → chunk-37WA2LQC.js} +6 -1
- package/dist/{chunk-WNX2RR5P.js → chunk-3HH2AQKF.js} +1 -1
- package/dist/{chunk-ZHRXINEW.js → chunk-3RXLDGWE.js} +7 -7
- package/dist/{chunk-ZCBKVSBK.js → chunk-4I3SN7WG.js} +3 -3
- package/dist/{chunk-TWKW3BL3.js → chunk-4RPDWURG.js} +1 -1
- package/dist/{chunk-Y34AHK7R.js → chunk-4SMKP5QI.js} +2 -2
- package/dist/{chunk-XC2ZN7UA.js → chunk-6SYVSIGA.js} +1 -1
- package/dist/{chunk-CQIJVNUB.js → chunk-A2AFTKMN.js} +7 -7
- package/dist/{chunk-PKBW4RL7.js → chunk-APVMCKLK.js} +1 -1
- package/dist/{chunk-4JUAJVOW.js → chunk-ATXTGXGK.js} +2 -2
- package/dist/{chunk-24K3CV6P.js → chunk-B2WCKRMW.js} +6 -6
- package/dist/{chunk-LA66NWUO.js → chunk-B3ZKYFBI.js} +1 -1
- package/dist/{chunk-HS45JMDJ.js → chunk-B6W2LW7E.js} +1 -1
- package/dist/{chunk-3UFBSPHM.js → chunk-BO5TMIRG.js} +4 -4
- package/dist/{chunk-5VANIC7Z.js → chunk-BPZ23EMS.js} +7 -7
- package/dist/{chunk-CDMNKUFT.js → chunk-CUMLCXFI.js} +2 -2
- package/dist/{chunk-YZQDTL3T.js → chunk-D47Z2Z7F.js} +190 -173
- package/dist/{chunk-VXL7SLO3.js → chunk-D5TZYUGZ.js} +1 -1
- package/dist/{chunk-AE6A5DVR.js → chunk-D5YKSWK3.js} +8 -8
- package/dist/{chunk-5GJWIATY.js → chunk-DJCSAWBV.js} +4 -4
- package/dist/{chunk-F3J4UKBF.js → chunk-DJK3IK6K.js} +1 -1
- package/dist/{chunk-CHIKNMWU.js → chunk-DXZ6QBUJ.js} +1 -1
- package/dist/{chunk-7N6MB6NR.js → chunk-EVAK6FAS.js} +6 -6
- package/dist/{chunk-WGWIB5JH.js → chunk-EYD5HOQ7.js} +1 -1
- package/dist/{chunk-AOAXRPXC.js → chunk-FD42O5SH.js} +13 -4
- package/dist/{chunk-FIH3QA4E.js → chunk-FMOGX7RR.js} +5 -5
- package/dist/{chunk-EOKIUWXY.js → chunk-FRLGVHJP.js} +1 -1
- package/dist/{chunk-7RIWXHSY.js → chunk-G4B473J5.js} +3 -3
- package/dist/chunk-GAHP2AI3.js +163 -0
- package/dist/{chunk-3KT24F2C.js → chunk-GVGHEQCU.js} +9 -9
- package/dist/{chunk-WNPLSKH6.js → chunk-H2NTP6OM.js} +1 -1
- package/dist/{chunk-F3P7DP7R.js → chunk-I6G5CO3K.js} +1 -1
- package/dist/{chunk-D6CU6N5S.js → chunk-IOSONR7N.js} +2 -2
- package/dist/{chunk-SKVA4VMG.js → chunk-J2ADYASG.js} +1 -1
- package/dist/{chunk-CVDB3ILT.js → chunk-JMSMNKCK.js} +1 -1
- package/dist/{chunk-TTPOEZFE.js → chunk-KTZOD7A3.js} +1 -1
- package/dist/{chunk-SGVMC66D.js → chunk-LOWZZ4QA.js} +1 -1
- package/dist/{chunk-DCY6QUS6.js → chunk-M4YTSRJI.js} +1 -1
- package/dist/chunk-MQ6SKVLA.js +9 -0
- package/dist/{chunk-ZZN2TUHE.js → chunk-MYFC3HKP.js} +9 -9
- package/dist/{chunk-Q5A5WWZI.js → chunk-NCZNYMTB.js} +23 -21
- package/dist/{chunk-R2VUU5TC.js → chunk-NEOM73RW.js} +1 -1
- package/dist/{chunk-AQNL3XHS.js → chunk-NPVIEJX6.js} +1 -1
- package/dist/{chunk-K5J7AKRL.js → chunk-P7WAAN35.js} +1 -1
- package/dist/{chunk-SQIFPWGN.js → chunk-PLVLC7SU.js} +2 -2
- package/dist/{chunk-A6DFTKQF.js → chunk-PMJGT7SQ.js} +25 -19
- package/dist/{chunk-WVEN3DDJ.js → chunk-PTZF6MC5.js} +6 -6
- package/dist/{chunk-OLWDENJZ.js → chunk-Q3QJG2P6.js} +3 -3
- package/dist/{chunk-JIMISJV2.js → chunk-Q7Z6ELTL.js} +28 -7
- package/dist/{chunk-HHOFP647.js → chunk-QDJBEQCE.js} +1 -1
- package/dist/{chunk-BV4I6IIT.js → chunk-QFGKTIPS.js} +3 -3
- package/dist/{chunk-2SS737DI.js → chunk-QHGVLLOJ.js} +1 -1
- package/dist/{chunk-EOO274OK.js → chunk-QKVOUI56.js} +3 -3
- package/dist/{chunk-MUDXPJT6.js → chunk-QPC6OKD2.js} +11 -11
- package/dist/{chunk-MRM7CQJ3.js → chunk-QS2O5G64.js} +116 -14
- package/dist/{chunk-WKO72EYV.js → chunk-R6ME6MWL.js} +3 -3
- package/dist/{chunk-H7IY5B2M.js → chunk-RVUOSR2D.js} +526 -107
- package/dist/{chunk-L6UD5LKU.js → chunk-SDCECDBS.js} +5 -5
- package/dist/{chunk-P6GTJQMA.js → chunk-SE5ZVVDJ.js} +3 -3
- package/dist/{chunk-2ZF62BAK.js → chunk-TLCTOEU5.js} +1 -1
- package/dist/{chunk-PG4KH7G6.js → chunk-TVU7AL2Z.js} +6 -6
- package/dist/{chunk-XEVGUSP6.js → chunk-UTZULAN6.js} +10 -10
- package/dist/{chunk-VIIJAM2R.js → chunk-UYIWLYLX.js} +5 -5
- package/dist/{chunk-IGYRJWB4.js → chunk-V5MR6BWR.js} +226 -143
- package/dist/{chunk-BEPP2C3U.js → chunk-VATN55FQ.js} +8 -8
- package/dist/{chunk-ZCFGRVGX.js → chunk-VYF5BILX.js} +34 -7
- package/dist/{chunk-U74YD3WB.js → chunk-W7P5QFRN.js} +7 -7
- package/dist/{chunk-QMC2MM2S.js → chunk-WNFITHNX.js} +1 -1
- package/dist/{chunk-XMUNNJMO.js → chunk-WOQOZCZZ.js} +4 -4
- package/dist/{chunk-UHGU2EAK.js → chunk-WRIQGJKT.js} +225 -17
- package/dist/{chunk-DAAZIWK2.js → chunk-X7YMKZ7A.js} +23 -21
- package/dist/{chunk-WQRFIWYB.js → chunk-XCAPYFJ3.js} +5 -5
- package/dist/{chunk-VUSPSY6N.js → chunk-XDAMSCJG.js} +1 -1
- package/dist/{chunk-LAO7LRIR.js → chunk-XMJNIIPM.js} +411 -92
- package/dist/{chunk-Q7OOS23E.js → chunk-XNB2VFZI.js} +4 -4
- package/dist/{chunk-GBCTYHZ4.js → chunk-YLDCYJRP.js} +15 -13
- package/dist/{chunk-YKVFVP4A.js → chunk-YLDHHHBJ.js} +43 -13
- package/dist/{chunk-2GAQRL4S.js → chunk-YNZVC7XT.js} +4 -4
- package/dist/{chunk-HMW3UCME.js → chunk-YXKZGVUL.js} +36 -8
- package/dist/{chunk-YVBJ74GP.js → chunk-YXUSSZAE.js} +23 -21
- package/dist/{claude-launcher-ZLZ4UMHJ.js → claude-launcher-HNE36BKE.js} +68 -18
- package/dist/{cli-EFLEZPHB.js → cli-NEZV54LS.js} +220 -179
- package/dist/{command-22NUIO7Z.js → command-H2R6EFUH.js} +68 -61
- package/dist/{config-HZEVAUDO.js → config-DIUO2GQY.js} +16 -14
- package/dist/{connect-cmd-IUDF62SX.js → connect-cmd-SXSWOHVT.js} +17 -15
- package/dist/{container-start-PQAEL5ZS.js → container-start-B7BACAFN.js} +61 -57
- package/dist/{context-cleanup-OT7BL2NG.js → context-cleanup-BUZVQNKC.js} +6 -6
- package/dist/{context-show-cmd-JDO6DBBU.js → context-show-cmd-ZWOTXOXV.js} +18 -16
- package/dist/{control-plane-launch-M545J63D.js → control-plane-launch-BPJQYN6J.js} +19 -17
- package/dist/{demo-record-cmd-DGP3CW3A.js → demo-record-cmd-4H2J2N3X.js} +12 -10
- package/dist/{demo-voice-cmd-23BV7L6V.js → demo-voice-cmd-VIOM4SF5.js} +26 -24
- package/dist/{dist-AKLRKVET.js → dist-FKOMD5MC.js} +2 -2
- package/dist/docker-QQEZWBI3.js +22 -0
- package/dist/{doctor-5VN6Q4ZU.js → doctor-Y7CIJZX5.js} +115 -64
- package/dist/emit-artifact-cmd-HUAKLOH4.js +46 -0
- package/dist/{emit-cmd-RM6FHATP.js → emit-cmd-UDTT7ENT.js} +9 -9
- package/dist/emit-criteria-cmd-7LKPQRFE.js +37 -0
- package/dist/emit-demo-cmd-7TW5Y3MN.js +49 -0
- package/dist/{emit-finding-cmd-E7WKK2A4.js → emit-finding-cmd-T3JBAGS2.js} +20 -18
- package/dist/{emit-result-cmd-5LKEMUOD.js → emit-result-cmd-ILRQ6OIL.js} +24 -22
- package/dist/emit-step-cmd-4ISFOYRC.js +37 -0
- package/dist/exec-client-UJKPJRNK.js +20 -0
- package/dist/{find-unit-XKWFS4BL.js → find-unit-OAJKRZI2.js} +17 -15
- package/dist/{findings-cmd-5BNDO3YM.js → findings-cmd-37RCXQK2.js} +20 -18
- package/dist/fleet-readiness-IVFQSHPL.js +33 -0
- package/dist/governing-source-RXJBJHN7.js +45 -0
- package/dist/guest-init-EXKSBS7A.js +22 -0
- package/dist/{hook-fast-CQ2YCZLB.js → hook-fast-BSH6IHRN.js} +4 -4
- package/dist/{hook-install-VWF5C6EL.js → hook-install-NOWMUPSI.js} +6 -6
- package/dist/{hook-wrap-fast-Y5KKK67C.js → hook-wrap-fast-7E5LAYEU.js} +3 -3
- package/dist/host-checks-GWUYRJXA.js +84 -0
- package/dist/host-key-7WPFECOD.js +20 -0
- package/dist/{image-tag-VZTFHG6T.js → image-tag-GLR3OAO3.js} +12 -10
- package/dist/index.js +6 -6
- package/dist/init-4MF5M74X.js +84 -0
- package/dist/{init-IXQBYUOM.js → init-BEMNWKES.js} +55 -53
- package/dist/{init-agent-BWLBRVNP.js → init-agent-6E3FAOEZ.js} +55 -53
- package/dist/init-cmd-R5ICA2LP.js +55 -0
- package/dist/{init-update-35IRDVWQ.js → init-update-FAFXM2YE.js} +29 -27
- package/dist/install-cmd-HI5OQW5J.js +28 -0
- package/dist/launch-agent-JLANNHFC.js +28 -0
- package/dist/{layout-F6FDPUC2.js → layout-U2ZTNGVB.js} +6 -6
- package/dist/{login-browser-G3NBTYT6.js → login-browser-QAPMBSQA.js} +2 -2
- package/dist/{logs-NWVFDJS3.js → logs-RVPQEAYN.js} +11 -9
- package/dist/loop-PP7QFT3F.js +94 -0
- package/dist/machine-JHWQCYS3.js +84 -0
- package/dist/{machine-skills-U7RNJTPH.js → machine-skills-2QFBY2II.js} +6 -6
- package/dist/{mcp-install-cmd-QDYJB3RW.js → mcp-install-cmd-KRZJVOND.js} +6 -6
- package/dist/{mcp-serve-cmd-JEYAQJPY.js → mcp-serve-cmd-UT3YCM5P.js} +13 -11
- package/dist/{paths-DWVALEBM.js → paths-72CWJPND.js} +11 -9
- package/dist/pending-ES4EF46B.js +20 -0
- package/dist/pidfile-WI6SE35U.js +21 -0
- package/dist/record-KX763L6R.js +20 -0
- package/dist/{relay-SKBUV4HQ.js → relay-ZZWAUA6P.js} +9 -7
- package/dist/{relay-protocol-YSGHT7C4.js → relay-protocol-4GCTOIT4.js} +9 -7
- package/dist/{run-cmd-S7IQ6OVY.js → run-cmd-SCXMROKB.js} +20 -18
- package/dist/runner-agents-QS3IX55G.js +15 -0
- package/dist/runner-env-FU6EWMWW.js +26 -0
- package/dist/runner-identity-PUW27LAT.js +22 -0
- package/dist/{runner-key-OM2HCEVM.js → runner-key-5G2AJD57.js} +55 -53
- package/dist/session-sender-A46R3S66.js +46 -0
- package/dist/{setup-cmd-S4ZIVRRF.js → setup-cmd-OZS4QOPI.js} +18 -16
- package/dist/{setup-wiring-FRY6CKZ7.js → setup-wiring-G2RLSBQ6.js} +64 -62
- package/dist/{shell-function-7N3ILFLG.js → shell-function-6ZFAVOSM.js} +2 -2
- package/dist/{spec-cmd-PRGEIOJ7.js → spec-cmd-C4KSLTAD.js} +21 -19
- package/dist/{starter-pack-YVBD7AKE.js → starter-pack-G5TQVPMW.js} +7 -7
- package/dist/state-TCZAKBBZ.js +20 -0
- package/dist/{status-JORNKH3T.js → status-T6WDUAI4.js} +65 -53
- package/dist/{statusline-fast-ZWMTN36K.js → statusline-fast-VVJF5W7X.js} +3 -3
- package/dist/{sync-cmd-QVSAP72U.js → sync-cmd-ZYTJMWET.js} +24 -22
- package/dist/update-steps-PU34FN7N.js +85 -0
- package/dist/{watch-F2ELGBST.js → watch-VCKWAILU.js} +24 -22
- package/dist/{work-claim-cmd-LEM7P2ME.js → work-claim-cmd-7TR6LNIY.js} +27 -25
- package/dist/{work-cmd-M2RCHHKE.js → work-cmd-7KOXRPOJ.js} +20 -18
- package/dist/work-comment-cmd-EDXP3K7B.js +41 -0
- package/dist/{work-demo-cmd-FQMFCLZ6.js → work-demo-cmd-OYZTKNCG.js} +20 -18
- package/dist/{work-logs-cmd-KLPX4TYX.js → work-logs-cmd-P3QS5AFY.js} +20 -18
- package/dist/{work-mock-cmd-XJEG6AAT.js → work-mock-cmd-3QEXWV43.js} +20 -18
- package/dist/{work-needs-attention-cmd-BOINZLEQ.js → work-needs-attention-cmd-ZTQB2DXB.js} +20 -18
- package/dist/{work-no-change-cmd-IINJFYBD.js → work-no-change-cmd-FGHOOPLY.js} +20 -18
- package/dist/{work-open-pr-cmd-S2XL6OZV.js → work-open-pr-cmd-WFIPFVQR.js} +21 -19
- package/dist/work-pr-cmd-262GWNKI.js +36 -0
- package/dist/work-proofs-cmd-PAJSCMJ2.js +39 -0
- package/dist/{work-proofs-record-34VAOVND.js → work-proofs-record-A4NZTAME.js} +30 -28
- package/dist/{work-stop-cmd-HWG6IUFS.js → work-stop-cmd-CBRWKR4Q.js} +20 -18
- package/package.json +1 -1
- package/dist/agent-setup-KJVEDAHY.js +0 -41
- package/dist/bridge-UIT7F5DZ.js +0 -17
- package/dist/build-W2Z43HX5.js +0 -26
- package/dist/build-disk-AOY6DOEK.js +0 -21
- package/dist/builder-PHD5WM6J.js +0 -20
- package/dist/caller-WJVESIHQ.js +0 -23
- package/dist/docker-S6XFE42W.js +0 -20
- package/dist/emit-artifact-cmd-H3HULADF.js +0 -44
- package/dist/emit-criteria-cmd-UM3DXOOD.js +0 -35
- package/dist/emit-demo-cmd-BMAXX7M2.js +0 -47
- package/dist/emit-step-cmd-6TX7FGWI.js +0 -35
- package/dist/exec-client-H2AOUP6U.js +0 -18
- package/dist/fleet-readiness-YDRQPUI5.js +0 -31
- package/dist/governing-source-CLLOKTZF.js +0 -43
- package/dist/guest-init-PDLZDDB4.js +0 -20
- package/dist/host-checks-43WBI5JE.js +0 -82
- package/dist/host-key-AOUOQNV5.js +0 -18
- package/dist/init-IZJENDA6.js +0 -82
- package/dist/init-cmd-AL3ODKU6.js +0 -53
- package/dist/install-cmd-DMAMD7BD.js +0 -26
- package/dist/launch-agent-XAPO3FGT.js +0 -26
- package/dist/loop-Q5CTVY7B.js +0 -92
- package/dist/machine-55WUTHG3.js +0 -82
- package/dist/pending-PA5UWRHN.js +0 -18
- package/dist/pidfile-KOM3XD4E.js +0 -19
- package/dist/record-S2WGEUIM.js +0 -18
- package/dist/runner-agents-ZVIM6XVC.js +0 -14
- package/dist/runner-env-WD6CPYTN.js +0 -24
- package/dist/runner-identity-LDFFB6YB.js +0 -20
- package/dist/session-sender-IZP4E562.js +0 -44
- package/dist/state-LAKZKWCJ.js +0 -18
- package/dist/update-steps-LM3C7MG6.js +0 -83
- package/dist/work-comment-cmd-QGAY3QUN.js +0 -39
- package/dist/work-pr-cmd-6YTJRHVC.js +0 -34
- package/dist/work-proofs-cmd-OC3O264U.js +0 -37
- package/dist/{real-deps-B7NMEDXM.js → real-deps-HNNHF3UN.js} +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { CLAUDE_CODE_HOOKS, CODEX_CODEC, OPENCODE_CODEC } from './chunk-
|
|
4
|
-
import { CLAUDE_CODE, CODEX, OPENCODE, NATIVE_AGENTS, LEGACY_AGENT, homeRelative } from './chunk-
|
|
3
|
+
import { CLAUDE_CODE_HOOKS, CODEX_CODEC, OPENCODE_CODEC } from './chunk-B6W2LW7E.js';
|
|
4
|
+
import { CLAUDE_CODE, CODEX, OPENCODE, NATIVE_AGENTS, LEGACY_AGENT, homeRelative } from './chunk-Q7Z6ELTL.js';
|
|
5
5
|
import { MAINTAINED_SKILLS } from './chunk-VSBG7MMU.js';
|
|
6
6
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
8
|
-
import { WARNING_CODES, forkFor, RAW_MIRROR_SEGMENTS, compareVersions, WarningCollector, isNewerThanSupported, bucketsFromTurns, costOfUsage, ZSTD_UNSUPPORTED_MESSAGE } from './chunk-
|
|
9
|
-
import { CODE_REVIEW_NAME, CRITERIA_JUDGE_NAME, RESERVED_EMIT_NAMES, EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, ARTIFACT_KINDS, ArtifactCriterionIdSchema, SPEED_MAX_LENGTH } from './chunk-
|
|
8
|
+
import { WARNING_CODES, forkFor, RAW_MIRROR_SEGMENTS, compareVersions, WarningCollector, isNewerThanSupported, bucketsFromTurns, costOfUsage, ZSTD_UNSUPPORTED_MESSAGE } from './chunk-KTZOD7A3.js';
|
|
9
|
+
import { CODE_REVIEW_NAME, CRITERIA_JUDGE_NAME, RESERVED_EMIT_NAMES, EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, ARTIFACT_KINDS, ArtifactCriterionIdSchema, SPEED_MAX_LENGTH } from './chunk-37WA2LQC.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';
|
|
12
12
|
import { join as join$1, dirname, sep, basename, relative, delimiter } from 'path';
|
|
@@ -3645,22 +3645,22 @@ var require_Document = __commonJS({
|
|
|
3645
3645
|
var require_errors = __commonJS({
|
|
3646
3646
|
"../../node_modules/yaml/dist/errors.js"(exports$1) {
|
|
3647
3647
|
var YAMLError = class extends Error {
|
|
3648
|
-
constructor(name, pos, code,
|
|
3648
|
+
constructor(name, pos, code, message2) {
|
|
3649
3649
|
super();
|
|
3650
3650
|
this.name = name;
|
|
3651
3651
|
this.code = code;
|
|
3652
|
-
this.message =
|
|
3652
|
+
this.message = message2;
|
|
3653
3653
|
this.pos = pos;
|
|
3654
3654
|
}
|
|
3655
3655
|
};
|
|
3656
3656
|
var YAMLParseError = class extends YAMLError {
|
|
3657
|
-
constructor(pos, code,
|
|
3658
|
-
super("YAMLParseError", pos, code,
|
|
3657
|
+
constructor(pos, code, message2) {
|
|
3658
|
+
super("YAMLParseError", pos, code, message2);
|
|
3659
3659
|
}
|
|
3660
3660
|
};
|
|
3661
3661
|
var YAMLWarning = class extends YAMLError {
|
|
3662
|
-
constructor(pos, code,
|
|
3663
|
-
super("YAMLWarning", pos, code,
|
|
3662
|
+
constructor(pos, code, message2) {
|
|
3663
|
+
super("YAMLWarning", pos, code, message2);
|
|
3664
3664
|
}
|
|
3665
3665
|
};
|
|
3666
3666
|
var prettifyError = (src, lc) => (error) => {
|
|
@@ -4331,8 +4331,8 @@ var require_compose_collection = __commonJS({
|
|
|
4331
4331
|
const { anchor, newlineAfterProp: nl } = props;
|
|
4332
4332
|
const lastProp = anchor && tagToken ? anchor.offset > tagToken.offset ? anchor : tagToken : anchor ?? tagToken;
|
|
4333
4333
|
if (lastProp && (!nl || nl.offset < lastProp.offset)) {
|
|
4334
|
-
const
|
|
4335
|
-
onError(lastProp, "MISSING_CHAR",
|
|
4334
|
+
const message2 = "Missing newline after block sequence props";
|
|
4335
|
+
onError(lastProp, "MISSING_CHAR", message2);
|
|
4336
4336
|
}
|
|
4337
4337
|
}
|
|
4338
4338
|
const expType = token.type === "block-map" ? "map" : token.type === "block-seq" ? "seq" : token.start.source === "{" ? "map" : "seq";
|
|
@@ -4403,15 +4403,15 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4403
4403
|
trimIndent = indent.length;
|
|
4404
4404
|
} else {
|
|
4405
4405
|
if (indent.length < trimIndent) {
|
|
4406
|
-
const
|
|
4407
|
-
onError(offset + indent.length, "MISSING_CHAR",
|
|
4406
|
+
const message2 = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator";
|
|
4407
|
+
onError(offset + indent.length, "MISSING_CHAR", message2);
|
|
4408
4408
|
}
|
|
4409
4409
|
if (header.indent === 0)
|
|
4410
4410
|
trimIndent = indent.length;
|
|
4411
4411
|
contentStart = i;
|
|
4412
4412
|
if (trimIndent === 0 && !ctx.atRoot) {
|
|
4413
|
-
const
|
|
4414
|
-
onError(offset, "BAD_INDENT",
|
|
4413
|
+
const message2 = "Block scalar values in collections must be indented";
|
|
4414
|
+
onError(offset, "BAD_INDENT", message2);
|
|
4415
4415
|
}
|
|
4416
4416
|
break;
|
|
4417
4417
|
}
|
|
@@ -4434,8 +4434,8 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4434
4434
|
content = content.slice(0, -1);
|
|
4435
4435
|
if (content && indent.length < trimIndent) {
|
|
4436
4436
|
const src = header.indent ? "explicit indentation indicator" : "first line";
|
|
4437
|
-
const
|
|
4438
|
-
onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT",
|
|
4437
|
+
const message2 = `Block scalar lines must not be less indented than their ${src}`;
|
|
4438
|
+
onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message2);
|
|
4439
4439
|
indent = "";
|
|
4440
4440
|
}
|
|
4441
4441
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
@@ -4513,8 +4513,8 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4513
4513
|
break;
|
|
4514
4514
|
case "comment":
|
|
4515
4515
|
if (strict && !hasSpace) {
|
|
4516
|
-
const
|
|
4517
|
-
onError(token, "MISSING_CHAR",
|
|
4516
|
+
const message2 = "Comments must be separated from other tokens by white space characters";
|
|
4517
|
+
onError(token, "MISSING_CHAR", message2);
|
|
4518
4518
|
}
|
|
4519
4519
|
length += token.source.length;
|
|
4520
4520
|
comment = token.source.substring(1);
|
|
@@ -4525,8 +4525,8 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4525
4525
|
break;
|
|
4526
4526
|
/* istanbul ignore next should not happen */
|
|
4527
4527
|
default: {
|
|
4528
|
-
const
|
|
4529
|
-
onError(token, "UNEXPECTED_TOKEN",
|
|
4528
|
+
const message2 = `Unexpected token in block scalar header: ${token.type}`;
|
|
4529
|
+
onError(token, "UNEXPECTED_TOKEN", message2);
|
|
4530
4530
|
const ts = token.source;
|
|
4531
4531
|
if (ts && typeof ts === "string")
|
|
4532
4532
|
length += ts.length;
|
|
@@ -4915,13 +4915,13 @@ var require_compose_node = __commonJS({
|
|
|
4915
4915
|
if (anchor)
|
|
4916
4916
|
node.anchor = anchor.source.substring(1);
|
|
4917
4917
|
} catch (error) {
|
|
4918
|
-
const
|
|
4919
|
-
onError(token, "RESOURCE_EXHAUSTION",
|
|
4918
|
+
const message2 = error instanceof Error ? error.message : String(error);
|
|
4919
|
+
onError(token, "RESOURCE_EXHAUSTION", message2);
|
|
4920
4920
|
}
|
|
4921
4921
|
break;
|
|
4922
4922
|
default: {
|
|
4923
|
-
const
|
|
4924
|
-
onError(token, "UNEXPECTED_TOKEN",
|
|
4923
|
+
const message2 = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`;
|
|
4924
|
+
onError(token, "UNEXPECTED_TOKEN", message2);
|
|
4925
4925
|
isSrcToken = false;
|
|
4926
4926
|
}
|
|
4927
4927
|
}
|
|
@@ -5075,12 +5075,12 @@ var require_composer = __commonJS({
|
|
|
5075
5075
|
this.prelude = [];
|
|
5076
5076
|
this.errors = [];
|
|
5077
5077
|
this.warnings = [];
|
|
5078
|
-
this.onError = (source, code,
|
|
5078
|
+
this.onError = (source, code, message2, warning) => {
|
|
5079
5079
|
const pos = getErrorPos(source);
|
|
5080
5080
|
if (warning)
|
|
5081
|
-
this.warnings.push(new errors.YAMLWarning(pos, code,
|
|
5081
|
+
this.warnings.push(new errors.YAMLWarning(pos, code, message2));
|
|
5082
5082
|
else
|
|
5083
|
-
this.errors.push(new errors.YAMLParseError(pos, code,
|
|
5083
|
+
this.errors.push(new errors.YAMLParseError(pos, code, message2));
|
|
5084
5084
|
};
|
|
5085
5085
|
this.directives = new directives.Directives({ version: options.version || "1.2" });
|
|
5086
5086
|
this.options = options;
|
|
@@ -5150,10 +5150,10 @@ ${cb}` : comment;
|
|
|
5150
5150
|
console.dir(token, { depth: null });
|
|
5151
5151
|
switch (token.type) {
|
|
5152
5152
|
case "directive":
|
|
5153
|
-
this.directives.add(token.source, (offset,
|
|
5153
|
+
this.directives.add(token.source, (offset, message2, warning) => {
|
|
5154
5154
|
const pos = getErrorPos(token);
|
|
5155
5155
|
pos[0] += offset;
|
|
5156
|
-
this.onError(pos, "BAD_DIRECTIVE",
|
|
5156
|
+
this.onError(pos, "BAD_DIRECTIVE", message2, warning);
|
|
5157
5157
|
});
|
|
5158
5158
|
this.prelude.push(token.source);
|
|
5159
5159
|
this.atDirectives = true;
|
|
@@ -5241,12 +5241,12 @@ var require_cst_scalar = __commonJS({
|
|
|
5241
5241
|
var stringifyString = require_stringifyString();
|
|
5242
5242
|
function resolveAsScalar(token, strict = true, onError) {
|
|
5243
5243
|
if (token) {
|
|
5244
|
-
const _onError = (pos, code,
|
|
5244
|
+
const _onError = (pos, code, message2) => {
|
|
5245
5245
|
const offset = typeof pos === "number" ? pos : Array.isArray(pos) ? pos[0] : pos.offset;
|
|
5246
5246
|
if (onError)
|
|
5247
|
-
onError(offset, code,
|
|
5247
|
+
onError(offset, code, message2);
|
|
5248
5248
|
else
|
|
5249
|
-
throw new errors.YAMLParseError([offset, offset + 1], code,
|
|
5249
|
+
throw new errors.YAMLParseError([offset, offset + 1], code, message2);
|
|
5250
5250
|
};
|
|
5251
5251
|
switch (token.type) {
|
|
5252
5252
|
case "scalar":
|
|
@@ -6400,8 +6400,8 @@ var require_parser = __commonJS({
|
|
|
6400
6400
|
}
|
|
6401
6401
|
const type = cst.tokenType(source);
|
|
6402
6402
|
if (!type) {
|
|
6403
|
-
const
|
|
6404
|
-
yield* this.pop({ type: "error", offset: this.offset, message, source });
|
|
6403
|
+
const message2 = `Not a YAML token: ${source}`;
|
|
6404
|
+
yield* this.pop({ type: "error", offset: this.offset, message: message2, source });
|
|
6405
6405
|
this.offset += source.length;
|
|
6406
6406
|
} else if (type === "scalar") {
|
|
6407
6407
|
this.atNewLine = false;
|
|
@@ -6491,8 +6491,8 @@ var require_parser = __commonJS({
|
|
|
6491
6491
|
*pop(error) {
|
|
6492
6492
|
const token = error ?? this.stack.pop();
|
|
6493
6493
|
if (!token) {
|
|
6494
|
-
const
|
|
6495
|
-
yield { type: "error", offset: this.offset, source: "", message };
|
|
6494
|
+
const message2 = "Tried to pop an empty stack";
|
|
6495
|
+
yield { type: "error", offset: this.offset, source: "", message: message2 };
|
|
6496
6496
|
} else if (this.stack.length === 0) {
|
|
6497
6497
|
yield token;
|
|
6498
6498
|
} else {
|
|
@@ -8112,7 +8112,7 @@ function parseCustomFile(file, problems) {
|
|
|
8112
8112
|
let declaresEmit = null;
|
|
8113
8113
|
let runWhere;
|
|
8114
8114
|
let command;
|
|
8115
|
-
let
|
|
8115
|
+
let judge3;
|
|
8116
8116
|
if (hasRun) {
|
|
8117
8117
|
const run = root["run"];
|
|
8118
8118
|
if (!isRecord(run) || Object.keys(run).some((key) => key !== "where" && key !== "emit" && key !== "command" && key !== "judge")) {
|
|
@@ -8155,7 +8155,7 @@ function parseCustomFile(file, problems) {
|
|
|
8155
8155
|
`"${id}" run.judge.brief must be a relative path inside the repository, of at most ${MAX_BRIEF_LENGTH} characters, with no ".." segment`
|
|
8156
8156
|
);
|
|
8157
8157
|
}
|
|
8158
|
-
|
|
8158
|
+
judge3 = { brief: brief.trim(), subjects: rawSubjects };
|
|
8159
8159
|
runWhere = "host";
|
|
8160
8160
|
} else if (where === "host") {
|
|
8161
8161
|
const rawCommand = run["command"];
|
|
@@ -8197,7 +8197,7 @@ function parseCustomFile(file, problems) {
|
|
|
8197
8197
|
declaresEmit,
|
|
8198
8198
|
...runWhere === void 0 ? {} : { runWhere },
|
|
8199
8199
|
...command === void 0 ? {} : { command },
|
|
8200
|
-
...
|
|
8200
|
+
...judge3 === void 0 ? {} : { judge: judge3 }
|
|
8201
8201
|
},
|
|
8202
8202
|
file: file.path,
|
|
8203
8203
|
validatorRefs: requireAny.flatMap((alt) => alt.type === "validator" ? [alt.id] : []),
|
|
@@ -9118,12 +9118,12 @@ function maxUsage(a, b) {
|
|
|
9118
9118
|
}
|
|
9119
9119
|
function mergeAssistantLine(open, line, tsIso) {
|
|
9120
9120
|
if (!open.ts && tsIso) open.ts = tsIso;
|
|
9121
|
-
const
|
|
9122
|
-
const isSyntheticStub = line.isApiErrorMessage === true ||
|
|
9123
|
-
if (!isSyntheticStub && typeof
|
|
9124
|
-
const usage = readUsage(
|
|
9121
|
+
const message2 = line.message;
|
|
9122
|
+
const isSyntheticStub = line.isApiErrorMessage === true || message2?.model === "<synthetic>";
|
|
9123
|
+
if (!isSyntheticStub && typeof message2?.model === "string" && !open.model) open.model = message2.model;
|
|
9124
|
+
const usage = readUsage(message2?.usage);
|
|
9125
9125
|
if (usage) open.usage = open.usage ? maxUsage(open.usage, usage) : usage;
|
|
9126
|
-
const content =
|
|
9126
|
+
const content = message2?.content;
|
|
9127
9127
|
if (typeof content === "string") {
|
|
9128
9128
|
if (content && !open.texts.includes(content)) open.texts.push(content);
|
|
9129
9129
|
return;
|
|
@@ -10513,7 +10513,7 @@ function createClaudeCodeHeadless() {
|
|
|
10513
10513
|
return {
|
|
10514
10514
|
commandLine: (prompt, queue) => `${CLAUDE_CODE.program} -p "${prompt}" --permission-mode bypassPermissions${queue === void 0 ? "" : ` ${QUEUE_FLAGS[queue]}`}`,
|
|
10515
10515
|
jobEnv: JOB_ENV,
|
|
10516
|
-
modelFlag:
|
|
10516
|
+
modelFlag: CLAUDE_CODE.runner.modelFlag,
|
|
10517
10517
|
promptFlags: ["-p", "--print"],
|
|
10518
10518
|
permissionMode: { flag: "--permission-mode", accepted: PERMISSION_MODES },
|
|
10519
10519
|
judge,
|
|
@@ -10925,10 +10925,12 @@ function parseText(text, options) {
|
|
|
10925
10925
|
if (session === null) return { ...emptyResult(lines), versions };
|
|
10926
10926
|
return { session, warnings: {}, stats: { lines, parsed: lines - skipped, skipped, unmapped: 0 }, versions, blobs: [] };
|
|
10927
10927
|
}
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
|
|
10928
|
+
var AFTER_TIME = /^rollout-\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}-(.+?)\.jsonl(?:\.zst)?$/;
|
|
10929
|
+
function threadIdOf(name) {
|
|
10930
|
+
const base = name.split(/[/\\]/).pop() ?? name;
|
|
10931
|
+
return THREAD_ID.exec(base)?.[1] ?? AFTER_TIME.exec(base)?.[1] ?? base.replace(/\.jsonl(\.zst)?$/, "");
|
|
10931
10932
|
}
|
|
10933
|
+
var idOf = threadIdOf;
|
|
10932
10934
|
function createCodexCapture(io) {
|
|
10933
10935
|
const sessionsIn = (home) => {
|
|
10934
10936
|
const own = io.env().CODEX_HOME;
|
|
@@ -10977,10 +10979,44 @@ function createCodexCapture(io) {
|
|
|
10977
10979
|
if (found === void 0) return { dir: folder, entries: [`${sessionId}.jsonl`] };
|
|
10978
10980
|
return { dir: found.slice(0, found.lastIndexOf("/")), entries: [found.slice(found.lastIndexOf("/") + 1)] };
|
|
10979
10981
|
},
|
|
10982
|
+
locateInBuild: ({ home }) => ({
|
|
10983
|
+
argv: ["/bin/sh", "-c", 'find "$1" -type f -name "rollout-*.jsonl" 2>/dev/null', "sh", `${home}/${homeRelative(CODEX.capture.sessionFolder)}`],
|
|
10984
|
+
// The names start with the time the session began, so the first name sorts the oldest session: the restored one, or the build's first.
|
|
10985
|
+
read: (stdout) => stdout.split("\n").map((line) => line.trim()).filter((line) => line !== "").sort((a, b) => a.split("/").pop() < b.split("/").pop() ? -1 : 1)[0]
|
|
10986
|
+
}),
|
|
10980
10987
|
identify: (file) => ({ sessionId: idOf(file), isSubagent: false })
|
|
10981
10988
|
};
|
|
10982
10989
|
}
|
|
10983
10990
|
|
|
10991
|
+
// ../agents/src/codex/credentials.ts
|
|
10992
|
+
var { forwarded: forwarded2, kinds: kinds2, placeholders: placeholders2 } = CODEX.credentials;
|
|
10993
|
+
var FORWARDED2 = forwarded2;
|
|
10994
|
+
var KINDS2 = kinds2;
|
|
10995
|
+
var BASE_URL_VARIABLE2 = "OPENAI_BASE_URL";
|
|
10996
|
+
function createCodexCredentials() {
|
|
10997
|
+
return {
|
|
10998
|
+
classify(env) {
|
|
10999
|
+
for (const variable of FORWARDED2) {
|
|
11000
|
+
const value = env[variable];
|
|
11001
|
+
if (value === void 0 || value === "") continue;
|
|
11002
|
+
const kind = KINDS2[variable];
|
|
11003
|
+
return { variable, provider: kind.provider, kind: kind.providerKind };
|
|
11004
|
+
}
|
|
11005
|
+
return void 0;
|
|
11006
|
+
},
|
|
11007
|
+
identify(value) {
|
|
11008
|
+
return FORWARDED2.find((variable) => new RegExp(KINDS2[variable].pattern).test(value));
|
|
11009
|
+
},
|
|
11010
|
+
buildEnvironment({ providerUrl, variable }) {
|
|
11011
|
+
const placeholder = placeholders2[variable ?? ""];
|
|
11012
|
+
return {
|
|
11013
|
+
[BASE_URL_VARIABLE2]: `${providerUrl(CODEX.providers[0])}/v1`,
|
|
11014
|
+
...placeholder === void 0 ? {} : { [variable]: placeholder }
|
|
11015
|
+
};
|
|
11016
|
+
}
|
|
11017
|
+
};
|
|
11018
|
+
}
|
|
11019
|
+
|
|
10984
11020
|
// ../agents/src/codex/delivery.ts
|
|
10985
11021
|
var SKILL_SOURCES = [".outerlayer/skills", ".agents/skills", ".claude/skills"];
|
|
10986
11022
|
var CONTROL_PLANE_EVENTS = ["SessionStart", "PreToolUse", "PostToolUse", "UserPromptSubmit", "PermissionRequest", "Stop"];
|
|
@@ -11282,6 +11318,204 @@ function withTopLevelKey(text, key, literal2) {
|
|
|
11282
11318
|
const tail = lines.slice(first).join("");
|
|
11283
11319
|
return `${head}${head === "" || head.endsWith("\n") ? "" : "\n"}${line}${tail === "" ? "" : "\n"}${tail}`;
|
|
11284
11320
|
}
|
|
11321
|
+
var escaped = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
11322
|
+
function withTableKey(text, table2, key, literal2) {
|
|
11323
|
+
const lines = linesOf(text);
|
|
11324
|
+
const tables = tablesOf(lines);
|
|
11325
|
+
const found = tables.find((candidate) => candidate.path.length === table2.length && candidate.path.every((part, index) => part === table2[index]));
|
|
11326
|
+
const keyPattern = new RegExp(`^\\s*${escaped(key)}\\s*=`);
|
|
11327
|
+
if (found !== void 0) {
|
|
11328
|
+
const at = lines.findIndex((line2, index) => index > found.start && index < found.end && keyPattern.test(line2));
|
|
11329
|
+
const out = [...lines];
|
|
11330
|
+
if (at >= 0) {
|
|
11331
|
+
out[at] = `${key} = ${literal2}
|
|
11332
|
+
`;
|
|
11333
|
+
return out.join("");
|
|
11334
|
+
}
|
|
11335
|
+
let last = found.end - 1;
|
|
11336
|
+
while (last > found.start && lines[last].trim() === "") last -= 1;
|
|
11337
|
+
const line = lines[last];
|
|
11338
|
+
out.splice(last, 1, line.endsWith("\n") ? line : `${line}
|
|
11339
|
+
`, `${key} = ${literal2}
|
|
11340
|
+
`);
|
|
11341
|
+
return out.join("");
|
|
11342
|
+
}
|
|
11343
|
+
if (table2.length === 1) {
|
|
11344
|
+
const first = tables[0]?.start ?? lines.length;
|
|
11345
|
+
const dotted = new RegExp(`^\\s*${escaped(table2[0])}\\.${escaped(key)}\\s*=`);
|
|
11346
|
+
const at = lines.slice(0, first).findIndex((line) => dotted.test(line));
|
|
11347
|
+
if (at >= 0) {
|
|
11348
|
+
const out = [...lines];
|
|
11349
|
+
out[at] = `${table2[0]}.${key} = ${literal2}
|
|
11350
|
+
`;
|
|
11351
|
+
return out.join("");
|
|
11352
|
+
}
|
|
11353
|
+
}
|
|
11354
|
+
const head = lines.join("");
|
|
11355
|
+
return `${head}${head === "" ? "" : head.endsWith("\n") ? "\n" : "\n\n"}[${table2.map(keyText).join(".")}]
|
|
11356
|
+
${key} = ${literal2}
|
|
11357
|
+
`;
|
|
11358
|
+
}
|
|
11359
|
+
|
|
11360
|
+
// ../agents/src/codex/build-config.ts
|
|
11361
|
+
var BUILD_PROVIDER = "outerlayer";
|
|
11362
|
+
var KEY_VARIABLE = "OPENAI_API_KEY";
|
|
11363
|
+
function isRunnerBuild(env) {
|
|
11364
|
+
const base = env[BASE_URL_VARIABLE2];
|
|
11365
|
+
return env[KEY_VARIABLE] === CODEX.credentials.placeholders[KEY_VARIABLE] && base !== void 0 && base !== "";
|
|
11366
|
+
}
|
|
11367
|
+
function buildSettings(input) {
|
|
11368
|
+
const provider = ["model_providers", BUILD_PROVIDER];
|
|
11369
|
+
return [
|
|
11370
|
+
{ table: [], key: "model_provider", literal: JSON.stringify(BUILD_PROVIDER) },
|
|
11371
|
+
{ table: [], key: "check_for_update_on_startup", literal: "false" },
|
|
11372
|
+
{ table: ["analytics"], key: "enabled", literal: "false" },
|
|
11373
|
+
{ table: ["otel"], key: "exporter", literal: JSON.stringify("none") },
|
|
11374
|
+
{ table: ["features"], key: "plugins", literal: "false" },
|
|
11375
|
+
{ table: ["features"], key: "apps", literal: "false" },
|
|
11376
|
+
{ table: provider, key: "name", literal: JSON.stringify("OuterLayer runner") },
|
|
11377
|
+
{ table: provider, key: "base_url", literal: JSON.stringify(input.baseUrl) },
|
|
11378
|
+
{ table: provider, key: "env_key", literal: JSON.stringify(input.keyVariable) },
|
|
11379
|
+
{ table: provider, key: "wire_api", literal: JSON.stringify("responses") }
|
|
11380
|
+
];
|
|
11381
|
+
}
|
|
11382
|
+
function withBuildConfig(text, input) {
|
|
11383
|
+
let out = text;
|
|
11384
|
+
for (const setting of buildSettings(input)) {
|
|
11385
|
+
out = setting.table.length === 0 ? withTopLevelKey(out, setting.key, setting.literal) : withTableKey(out, setting.table, setting.key, setting.literal);
|
|
11386
|
+
}
|
|
11387
|
+
return out;
|
|
11388
|
+
}
|
|
11389
|
+
function buildConfigOverrides(input) {
|
|
11390
|
+
return buildSettings(input).flatMap((setting) => ["-c", `${[...setting.table, setting.key].join(".")}=${setting.literal}`]);
|
|
11391
|
+
}
|
|
11392
|
+
|
|
11393
|
+
// ../agents/src/codex/image.ts
|
|
11394
|
+
var PREFIX2 = "/opt/outerlayer/codex";
|
|
11395
|
+
var PACKAGE2 = "@openai/codex";
|
|
11396
|
+
function createCodexImage() {
|
|
11397
|
+
return {
|
|
11398
|
+
install: (version) => [`RUN npm install --global --prefix /out${PREFIX2} ${PACKAGE2}@${version}`],
|
|
11399
|
+
program: `${PREFIX2}/bin/codex`,
|
|
11400
|
+
command: CODEX.program,
|
|
11401
|
+
files: [],
|
|
11402
|
+
env: {},
|
|
11403
|
+
versionKey: "codexVersion",
|
|
11404
|
+
latestUrl: `https://registry.npmjs.org/${PACKAGE2}/latest`
|
|
11405
|
+
};
|
|
11406
|
+
}
|
|
11407
|
+
|
|
11408
|
+
// ../agents/src/codex/headless.ts
|
|
11409
|
+
var CODEX_STALL = { pattern: '^\\{"type":"error"', afterMs: 3e5 };
|
|
11410
|
+
function judgeEnv(input) {
|
|
11411
|
+
return {
|
|
11412
|
+
HOME: input.home,
|
|
11413
|
+
CODEX_HOME: input.home,
|
|
11414
|
+
TMPDIR: `${input.home}/tmp`,
|
|
11415
|
+
PATH: input.path,
|
|
11416
|
+
...input.credential === void 0 ? {} : { [input.credential.variable]: input.credential.placeholder }
|
|
11417
|
+
};
|
|
11418
|
+
}
|
|
11419
|
+
function judgeRules(input) {
|
|
11420
|
+
return [
|
|
11421
|
+
"Rules for this run. Read the files you are given and change none of them.",
|
|
11422
|
+
"Use no network.",
|
|
11423
|
+
"Run no tests, builds or package commands in place: their caches and reports are changes. Read the code, or copy it to a folder outside the judge's folder first.",
|
|
11424
|
+
`Write only these files: ${input.writable.join(", ")}.`,
|
|
11425
|
+
"If you change any other file, the runner discards your verdict."
|
|
11426
|
+
].join("\n");
|
|
11427
|
+
}
|
|
11428
|
+
function judge2(input) {
|
|
11429
|
+
const keyVariable = input.credential?.variable ?? "OPENAI_API_KEY";
|
|
11430
|
+
const args = [
|
|
11431
|
+
"exec",
|
|
11432
|
+
"--json",
|
|
11433
|
+
"--skip-git-repo-check",
|
|
11434
|
+
"--ephemeral",
|
|
11435
|
+
"--ignore-user-config",
|
|
11436
|
+
"--ignore-rules",
|
|
11437
|
+
"--dangerously-bypass-approvals-and-sandbox",
|
|
11438
|
+
...buildConfigOverrides({ baseUrl: `${input.providerUrl("openai")}/v1`, keyVariable }),
|
|
11439
|
+
"-c",
|
|
11440
|
+
'approval_policy="never"',
|
|
11441
|
+
"-c",
|
|
11442
|
+
"project_doc_max_bytes=0",
|
|
11443
|
+
"-c",
|
|
11444
|
+
'web_search="disabled"',
|
|
11445
|
+
...input.effort === void 0 ? [] : ["-c", `model_reasoning_effort=${JSON.stringify(input.effort)}`],
|
|
11446
|
+
// After the separator, so a brief that starts with a dash is not read as an option.
|
|
11447
|
+
"--",
|
|
11448
|
+
`${judgeRules(input)}
|
|
11449
|
+
|
|
11450
|
+
${input.brief}`
|
|
11451
|
+
];
|
|
11452
|
+
return { program: createCodexImage().program, args, env: judgeEnv(input), driver: "exec", exitFrom: "code" };
|
|
11453
|
+
}
|
|
11454
|
+
function endOf(events) {
|
|
11455
|
+
let text = "";
|
|
11456
|
+
let completed = false;
|
|
11457
|
+
let failure;
|
|
11458
|
+
for (const event of events) {
|
|
11459
|
+
if (event.type === "item.completed") {
|
|
11460
|
+
const item = event.item;
|
|
11461
|
+
if (item?.type === "agent_message" && typeof item.text === "string") {
|
|
11462
|
+
text = item.text;
|
|
11463
|
+
completed = false;
|
|
11464
|
+
}
|
|
11465
|
+
} else if (event.type === "turn.completed") {
|
|
11466
|
+
completed = true;
|
|
11467
|
+
} else if (event.type === "turn.failed" && failure === void 0) {
|
|
11468
|
+
const error = event.error;
|
|
11469
|
+
failure = typeof error?.message === "string" && error.message !== "" ? error.message : "the turn failed";
|
|
11470
|
+
}
|
|
11471
|
+
}
|
|
11472
|
+
return { text, completed, failure };
|
|
11473
|
+
}
|
|
11474
|
+
function readJudgeOutput2(stdout, run) {
|
|
11475
|
+
const events = [];
|
|
11476
|
+
for (const line of stdout.split("\n")) {
|
|
11477
|
+
if (line.trim() === "") continue;
|
|
11478
|
+
try {
|
|
11479
|
+
const parsed = JSON.parse(line);
|
|
11480
|
+
if (typeof parsed === "object" && parsed !== null && typeof parsed.type === "string") events.push(parsed);
|
|
11481
|
+
} catch {
|
|
11482
|
+
continue;
|
|
11483
|
+
}
|
|
11484
|
+
}
|
|
11485
|
+
if (events.length === 0) return void 0;
|
|
11486
|
+
const end = endOf(events);
|
|
11487
|
+
if (end.failure !== void 0) return { kind: "unfinished", reason: `the turn failed: ${end.failure}` };
|
|
11488
|
+
if (!end.completed) return { kind: "unfinished", reason: "the run ended before its turn completed" };
|
|
11489
|
+
if (run?.status !== void 0 && run.status !== 0) return { kind: "unfinished", reason: `the run exited ${run.status}` };
|
|
11490
|
+
return { kind: "text", text: end.text };
|
|
11491
|
+
}
|
|
11492
|
+
function lastError(stdout) {
|
|
11493
|
+
let last;
|
|
11494
|
+
for (const line of stdout.split("\n")) {
|
|
11495
|
+
if (!line.startsWith("{")) continue;
|
|
11496
|
+
try {
|
|
11497
|
+
const event = JSON.parse(line);
|
|
11498
|
+
if (typeof event?.type === "string") last = event;
|
|
11499
|
+
} catch {
|
|
11500
|
+
continue;
|
|
11501
|
+
}
|
|
11502
|
+
}
|
|
11503
|
+
const text = last?.type === "turn.failed" ? last.error?.message : void 0;
|
|
11504
|
+
return typeof text === "string" && text.trim() !== "" ? text.trim() : void 0;
|
|
11505
|
+
}
|
|
11506
|
+
function createCodexHeadless() {
|
|
11507
|
+
return {
|
|
11508
|
+
commandLine: (prompt) => `${CODEX.program} exec --json --dangerously-bypass-approvals-and-sandbox "${prompt}"`,
|
|
11509
|
+
promptFlags: ["exec"],
|
|
11510
|
+
modelFlag: CODEX.runner.modelFlag,
|
|
11511
|
+
modelFlagAliases: ["-m"],
|
|
11512
|
+
stall: CODEX_STALL,
|
|
11513
|
+
lastError,
|
|
11514
|
+
judge: judge2,
|
|
11515
|
+
judgeSupervised: true,
|
|
11516
|
+
readJudgeOutput: readJudgeOutput2
|
|
11517
|
+
};
|
|
11518
|
+
}
|
|
11285
11519
|
|
|
11286
11520
|
// ../agents/src/codex/mcp.ts
|
|
11287
11521
|
var isObject4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -11376,7 +11610,21 @@ var STALE_MS = 24 * 60 * 60 * 1e3;
|
|
|
11376
11610
|
var LAUNCHER_PID = "launcher.pid";
|
|
11377
11611
|
var SHARED_FOLDERS = ["sessions", "plugins", ".tmp"];
|
|
11378
11612
|
var BYPASS_HOOK_TRUST = "--dangerously-bypass-hook-trust";
|
|
11379
|
-
var VALUE_OPTIONS = /* @__PURE__ */ new Set(["-c", "--config", "-m", "--model", "-p", "--profile", "-s", "--sandbox", "-C", "--cd", "-i", "--image", "--enable", "--disable", "-a", "--ask-for-approval", "--add-dir", "--color", "--output-schema", "-o", "--output-last-message", "--local-provider", "--remote"]);
|
|
11613
|
+
var VALUE_OPTIONS = /* @__PURE__ */ new Set(["-c", "--config", "-m", "--model", "-p", "--profile", "-s", "--sandbox", "-C", "--cd", "-i", "--image", "--enable", "--disable", "-a", "--ask-for-approval", "--add-dir", "--color", "--output-schema", "-o", "--output-last-message", "--local-provider", "--remote", "--remote-auth-token-env", "--thread-source", "--cyber-access-program"]);
|
|
11614
|
+
function execIndex(args) {
|
|
11615
|
+
for (let at = 0; at < args.length; at += 1) {
|
|
11616
|
+
const arg = args[at];
|
|
11617
|
+
if (arg.startsWith("-")) {
|
|
11618
|
+
if (VALUE_OPTIONS.has(arg)) at += 1;
|
|
11619
|
+
continue;
|
|
11620
|
+
}
|
|
11621
|
+
return arg === "exec" ? at : -1;
|
|
11622
|
+
}
|
|
11623
|
+
return -1;
|
|
11624
|
+
}
|
|
11625
|
+
var EXEC_SUBCOMMANDS = /* @__PURE__ */ new Set(["resume", "fork", "review"]);
|
|
11626
|
+
var SESSION_ID_VARIABLE2 = "OUTERLAYER_SESSION_ID";
|
|
11627
|
+
var RESUME_SESSION_VARIABLE2 = "OUTERLAYER_RESUME_SESSION";
|
|
11380
11628
|
var MCP_ENTRY = { type: "stdio", command: "outerlayer", args: ["mcp", "serve"] };
|
|
11381
11629
|
function isSkipped2(io, candidate) {
|
|
11382
11630
|
try {
|
|
@@ -11436,7 +11684,7 @@ ${own}`);
|
|
|
11436
11684
|
fs.link(join2(own, name), join2(folder, "skills", name));
|
|
11437
11685
|
}
|
|
11438
11686
|
}
|
|
11439
|
-
function configOf(folder, userHome) {
|
|
11687
|
+
function configOf(folder, userHome, env) {
|
|
11440
11688
|
const own = isFile(join2(userHome, "config.toml")) ? fs.readText(join2(userHome, "config.toml")) ?? "" : "";
|
|
11441
11689
|
try {
|
|
11442
11690
|
let text = CODEX_MCP.setServer(own, "outerlayer", MCP_ENTRY, "if-absent").text;
|
|
@@ -11446,18 +11694,21 @@ ${own}`);
|
|
|
11446
11694
|
const set = topLevelPairs(text).project_doc_max_bytes;
|
|
11447
11695
|
if (typeof set !== "number" || set < wanted) text = withTopLevelKey(text, "project_doc_max_bytes", String(wanted));
|
|
11448
11696
|
}
|
|
11697
|
+
if (isRunnerBuild(env)) text = withBuildConfig(text, { baseUrl: env[BASE_URL_VARIABLE2], keyVariable: "OPENAI_API_KEY" });
|
|
11449
11698
|
return text;
|
|
11450
11699
|
} catch {
|
|
11451
|
-
return own;
|
|
11700
|
+
if (!isRunnerBuild(env)) return own;
|
|
11701
|
+
return withBuildConfig(CODEX_MCP.setServer("", "outerlayer", MCP_ENTRY, "if-absent").text, { baseUrl: env[BASE_URL_VARIABLE2], keyVariable: "OPENAI_API_KEY" });
|
|
11452
11702
|
}
|
|
11453
11703
|
}
|
|
11454
|
-
function withSkillMention(args, folder) {
|
|
11704
|
+
function withSkillMention(args, folder, cwd, home) {
|
|
11455
11705
|
if (args.length === 0) return [];
|
|
11456
11706
|
const last = args[args.length - 1];
|
|
11457
11707
|
const before = args[args.length - 2];
|
|
11458
11708
|
const name = /^\/([A-Za-z0-9][A-Za-z0-9._-]*)$/.exec(last)?.[1];
|
|
11459
11709
|
if (name === void 0 || before !== void 0 && VALUE_OPTIONS.has(before)) return [...args];
|
|
11460
|
-
|
|
11710
|
+
const places = [join2(folder, "skills", name, "SKILL.md"), join2(cwd, ".agents", "skills", name, "SKILL.md"), join2(home, ".agents", "skills", name, "SKILL.md")];
|
|
11711
|
+
return places.some((place) => fs.stat(place).kind === "file") ? [...args.slice(0, -1), `$${name}`] : [...args];
|
|
11461
11712
|
}
|
|
11462
11713
|
function interactive3(input) {
|
|
11463
11714
|
const home = input.env.HOME !== void 0 && input.env.HOME !== "" ? input.env.HOME : io.home();
|
|
@@ -11472,7 +11723,7 @@ ${own}`);
|
|
|
11472
11723
|
else composeInto(io, input.controlPlane, folder, input.controlPlane, ownHooks);
|
|
11473
11724
|
instructionsOf(folder, userHome);
|
|
11474
11725
|
linkOwnSkills(folder, userHome);
|
|
11475
|
-
fs.write(join2(folder, "config.toml"), configOf(folder, userHome));
|
|
11726
|
+
fs.write(join2(folder, "config.toml"), configOf(folder, userHome, input.env));
|
|
11476
11727
|
const login = join2(userHome, "auth.json");
|
|
11477
11728
|
const authText = isFile(login) ? fs.readText(login) : void 0;
|
|
11478
11729
|
if (authText !== void 0) fs.copy(login, join2(folder, "auth.json"));
|
|
@@ -11482,7 +11733,9 @@ ${own}`);
|
|
|
11482
11733
|
}
|
|
11483
11734
|
launches.set(folder, { userHome, authText });
|
|
11484
11735
|
const env = Object.fromEntries(Object.entries({ ...input.env, CODEX_HOME: folder }).filter((entry) => entry[1] !== void 0));
|
|
11485
|
-
|
|
11736
|
+
const spec = { program: input.program, args: [BYPASS_HOOK_TRUST, ...withSkillMention(input.callerArgs, folder, input.cwd, home)], env, driver: "exec", exitFrom: "code" };
|
|
11737
|
+
if (!isRunnerBuild(input.env) || execIndex(input.callerArgs) < 0) return spec;
|
|
11738
|
+
return { ...spec, stdin: "", ...input.callerArgs.includes("--json") ? { stall: CODEX_STALL } : {} };
|
|
11486
11739
|
}
|
|
11487
11740
|
function finish(spec) {
|
|
11488
11741
|
const folder = spec.env.CODEX_HOME;
|
|
@@ -11506,11 +11759,43 @@ ${own}`);
|
|
|
11506
11759
|
}
|
|
11507
11760
|
removeFolder(folder);
|
|
11508
11761
|
}
|
|
11762
|
+
let resumed;
|
|
11763
|
+
const session = {
|
|
11764
|
+
args(env, callerArgs) {
|
|
11765
|
+
const { [SESSION_ID_VARIABLE2]: _id, [RESUME_SESSION_VARIABLE2]: resumePath, ...rest } = env;
|
|
11766
|
+
const resumable = resumePath !== void 0 && resumePath !== "" && fs.kind(resumePath) === "file" && execIndex(callerArgs) >= 0 && !EXEC_SUBCOMMANDS.has(callerArgs[execIndex(callerArgs) + 1] ?? "");
|
|
11767
|
+
if (!resumable) return { args: [], env: rest };
|
|
11768
|
+
const home = rest.HOME !== void 0 && rest.HOME !== "" ? rest.HOME : io.home();
|
|
11769
|
+
const userHome = rest.CODEX_HOME !== void 0 && rest.CODEX_HOME !== "" ? rest.CODEX_HOME : join2(home, ".codex");
|
|
11770
|
+
const name = resumePath.split("/").pop();
|
|
11771
|
+
const target = join2(userHome, "sessions", name);
|
|
11772
|
+
fs.makeDir(join2(userHome, "sessions"));
|
|
11773
|
+
try {
|
|
11774
|
+
fs.rename(resumePath, target);
|
|
11775
|
+
} catch {
|
|
11776
|
+
fs.copy(resumePath, target);
|
|
11777
|
+
fs.remove(resumePath);
|
|
11778
|
+
}
|
|
11779
|
+
resumed = target;
|
|
11780
|
+
return { args: ["resume", threadIdOf(name)], env: rest };
|
|
11781
|
+
},
|
|
11782
|
+
place(flags, callerArgs) {
|
|
11783
|
+
const at = execIndex(callerArgs);
|
|
11784
|
+
return at < 0 ? [...flags, ...callerArgs] : [...callerArgs.slice(0, at + 1), ...flags, ...callerArgs.slice(at + 1)];
|
|
11785
|
+
},
|
|
11786
|
+
// Codex names its own thread, so no id is taken before the run.
|
|
11787
|
+
exists: () => false,
|
|
11788
|
+
hasReplySince: (_id, _env, sinceMs) => resumed !== void 0 && fs.stat(resumed).mtimeMs >= sinceMs,
|
|
11789
|
+
discard() {
|
|
11790
|
+
if (resumed !== void 0) fs.remove(resumed);
|
|
11791
|
+
}
|
|
11792
|
+
};
|
|
11509
11793
|
return {
|
|
11510
11794
|
findProgram: (path, delimiter2 = ":") => findProgram2(io, path, delimiter2),
|
|
11511
11795
|
version: (program, env) => io.runSync(program, ["--version"], { env, timeoutMs: 15e3 }).stdout,
|
|
11512
11796
|
interactive: interactive3,
|
|
11513
11797
|
finish,
|
|
11798
|
+
session,
|
|
11514
11799
|
minimumReason: "the oldest version whose rollouts and hooks OuterLayer reads"
|
|
11515
11800
|
};
|
|
11516
11801
|
}
|
|
@@ -11527,6 +11812,7 @@ function createCodexAdapter(io) {
|
|
|
11527
11812
|
return {
|
|
11528
11813
|
context,
|
|
11529
11814
|
launch,
|
|
11815
|
+
headless: createCodexHeadless(),
|
|
11530
11816
|
lifecycle: {
|
|
11531
11817
|
source: { kind: "hook-process", codec: CODEX_CODEC },
|
|
11532
11818
|
// Codex sets CODEX_THREAD_ID for the shell commands it runs.
|
|
@@ -11535,6 +11821,8 @@ function createCodexAdapter(io) {
|
|
|
11535
11821
|
},
|
|
11536
11822
|
deliver: { kind: "none" },
|
|
11537
11823
|
capture: createCodexCapture(io),
|
|
11824
|
+
credentials: createCodexCredentials(),
|
|
11825
|
+
image: createCodexImage(),
|
|
11538
11826
|
diagnostics: createCodexDiagnostics(io, launch)
|
|
11539
11827
|
};
|
|
11540
11828
|
}
|
|
@@ -11602,19 +11890,19 @@ function sessionOf2(exported, options) {
|
|
|
11602
11890
|
const totals = { in: 0, out: 0, cacheRead: 0, cacheCreate: 0 };
|
|
11603
11891
|
let cost = 0;
|
|
11604
11892
|
let anyCost = false;
|
|
11605
|
-
for (const
|
|
11606
|
-
if (!isObject5(
|
|
11607
|
-
const created = isObject5(
|
|
11608
|
-
if (
|
|
11609
|
-
turns.push({ index: turns.length, role: "user", ...isoOf2(created.created) === void 0 ? {} : { ts: isoOf2(created.created) }, text: typeof
|
|
11893
|
+
for (const message2 of messages) {
|
|
11894
|
+
if (!isObject5(message2)) continue;
|
|
11895
|
+
const created = isObject5(message2.time) ? message2.time : {};
|
|
11896
|
+
if (message2.type === "user") {
|
|
11897
|
+
turns.push({ index: turns.length, role: "user", ...isoOf2(created.created) === void 0 ? {} : { ts: isoOf2(created.created) }, text: typeof message2.text === "string" ? message2.text : null, toolCalls: [] });
|
|
11610
11898
|
continue;
|
|
11611
11899
|
}
|
|
11612
|
-
if (
|
|
11613
|
-
const model = isObject5(
|
|
11614
|
-
const tokens = isObject5(
|
|
11900
|
+
if (message2.type !== "assistant") continue;
|
|
11901
|
+
const model = isObject5(message2.model) && typeof message2.model.id === "string" ? message2.model.id : void 0;
|
|
11902
|
+
const tokens = isObject5(message2.tokens) ? message2.tokens : {};
|
|
11615
11903
|
const cache = isObject5(tokens.cache) ? tokens.cache : {};
|
|
11616
11904
|
const usage = { in: num3(tokens.input), out: num3(tokens.output) + num3(tokens.reasoning), cacheRead: num3(cache.read), cacheCreate: num3(cache.write) };
|
|
11617
|
-
const content = Array.isArray(
|
|
11905
|
+
const content = Array.isArray(message2.content) ? message2.content : [];
|
|
11618
11906
|
const { text, thinking } = wordsOf2(content);
|
|
11619
11907
|
const costUsd = model === void 0 ? null : costOfUsage(model, usage);
|
|
11620
11908
|
totals.in += usage.in;
|
|
@@ -11638,7 +11926,7 @@ function sessionOf2(exported, options) {
|
|
|
11638
11926
|
toolCalls: toolCallsOf(content),
|
|
11639
11927
|
text,
|
|
11640
11928
|
thinking,
|
|
11641
|
-
...typeof
|
|
11929
|
+
...typeof message2.id === "string" ? { messageId: message2.id } : {}
|
|
11642
11930
|
});
|
|
11643
11931
|
}
|
|
11644
11932
|
if (turns.length === 0) return null;
|
|
@@ -11692,9 +11980,9 @@ var stemOf = (file) => (file.split(/[/\\]/).pop() ?? file).replace(/\.json$/, ""
|
|
|
11692
11980
|
function childIdsOf(exported) {
|
|
11693
11981
|
if (!isObject5(exported) || !Array.isArray(exported.messages)) return [];
|
|
11694
11982
|
const ids = [];
|
|
11695
|
-
for (const
|
|
11696
|
-
if (!isObject5(
|
|
11697
|
-
for (const item of
|
|
11983
|
+
for (const message2 of exported.messages) {
|
|
11984
|
+
if (!isObject5(message2) || !Array.isArray(message2.content)) continue;
|
|
11985
|
+
for (const item of message2.content) {
|
|
11698
11986
|
if (!isObject5(item) || item.type !== "tool" || item.name !== "subagent" || !isObject5(item.state) || !isObject5(item.state.metadata)) continue;
|
|
11699
11987
|
const child = item.state.metadata.sessionID;
|
|
11700
11988
|
if (typeof child === "string" && SESSION_ID.test(child)) ids.push(child);
|
|
@@ -11805,29 +12093,29 @@ function createOpenCodeCapture(io, launch) {
|
|
|
11805
12093
|
}
|
|
11806
12094
|
|
|
11807
12095
|
// ../agents/src/opencode/credentials.ts
|
|
11808
|
-
var { forwarded:
|
|
11809
|
-
var
|
|
11810
|
-
var
|
|
11811
|
-
var
|
|
12096
|
+
var { forwarded: forwarded3, kinds: kinds3, placeholders: placeholders3 } = OPENCODE.credentials;
|
|
12097
|
+
var FORWARDED3 = forwarded3;
|
|
12098
|
+
var KINDS3 = kinds3;
|
|
12099
|
+
var BASE_URL_VARIABLE3 = "ANTHROPIC_BASE_URL";
|
|
11812
12100
|
var MODELS_FETCH_VARIABLE = "OPENCODE_DISABLE_MODELS_FETCH";
|
|
11813
12101
|
function createOpenCodeCredentials() {
|
|
11814
12102
|
return {
|
|
11815
12103
|
classify(env) {
|
|
11816
|
-
for (const variable of
|
|
12104
|
+
for (const variable of FORWARDED3) {
|
|
11817
12105
|
const value = env[variable];
|
|
11818
12106
|
if (value === void 0 || value === "") continue;
|
|
11819
|
-
const kind =
|
|
12107
|
+
const kind = KINDS3[variable];
|
|
11820
12108
|
return { variable, provider: kind.provider, kind: kind.providerKind };
|
|
11821
12109
|
}
|
|
11822
12110
|
return void 0;
|
|
11823
12111
|
},
|
|
11824
12112
|
identify(value) {
|
|
11825
|
-
return
|
|
12113
|
+
return FORWARDED3.find((variable) => new RegExp(KINDS3[variable].pattern).test(value));
|
|
11826
12114
|
},
|
|
11827
12115
|
buildEnvironment({ providerUrl, variable }) {
|
|
11828
|
-
const placeholder =
|
|
12116
|
+
const placeholder = placeholders3[variable ?? ""];
|
|
11829
12117
|
return {
|
|
11830
|
-
[
|
|
12118
|
+
[BASE_URL_VARIABLE3]: providerUrl(OPENCODE.providers[0]),
|
|
11831
12119
|
...placeholder === void 0 ? {} : { [variable]: placeholder },
|
|
11832
12120
|
[MODELS_FETCH_VARIABLE]: "1"
|
|
11833
12121
|
};
|
|
@@ -11984,25 +12272,25 @@ ${instructions}`);
|
|
|
11984
12272
|
}
|
|
11985
12273
|
|
|
11986
12274
|
// ../agents/src/opencode/image.ts
|
|
11987
|
-
var
|
|
11988
|
-
var
|
|
12275
|
+
var PREFIX3 = "/opt/outerlayer/opencode";
|
|
12276
|
+
var PACKAGE3 = "@opencode/cli";
|
|
11989
12277
|
function createOpenCodeImage() {
|
|
11990
12278
|
return {
|
|
11991
12279
|
install: (version) => [
|
|
11992
12280
|
// The package lists a binary per CPU and C library as optional dependencies, and npm fetches every one of them: about 1 GB, which a build limited to 1 GB of memory cannot write.
|
|
11993
12281
|
// So npm installs only the launcher. Its install script then fetches the one binary that fits the machine, and checks that it runs. OpenCode skips its model-list download for that check.
|
|
11994
|
-
`RUN npm install --no-audit --no-fund --omit=optional --ignore-scripts --prefix /out${
|
|
11995
|
-
` && OPENCODE_DISABLE_MODELS_FETCH=1 node /out${
|
|
11996
|
-
` && mkdir -p /out${
|
|
11997
|
-
` && ln -s ../lib/node_modules/${
|
|
12282
|
+
`RUN npm install --no-audit --no-fund --omit=optional --ignore-scripts --prefix /out${PREFIX3}/lib ${PACKAGE3}@${version} \\`,
|
|
12283
|
+
` && OPENCODE_DISABLE_MODELS_FETCH=1 node /out${PREFIX3}/lib/node_modules/${PACKAGE3}/postinstall.mjs \\`,
|
|
12284
|
+
` && mkdir -p /out${PREFIX3}/bin \\`,
|
|
12285
|
+
` && ln -s ../lib/node_modules/${PACKAGE3}/bin/opencode.exe /out${PREFIX3}/bin/opencode`
|
|
11998
12286
|
],
|
|
11999
|
-
program: `${
|
|
12287
|
+
program: `${PREFIX3}/bin/opencode`,
|
|
12000
12288
|
command: OPENCODE.program,
|
|
12001
12289
|
files: [],
|
|
12002
12290
|
// The model list comes from the runner's key proxy. Any OpenCode process in the image, a session export included, would otherwise ask a hosted service for it.
|
|
12003
12291
|
env: { OPENCODE_DISABLE_MODELS_FETCH: "1" },
|
|
12004
12292
|
versionKey: "opencodeVersion",
|
|
12005
|
-
latestUrl: `https://registry.npmjs.org/${
|
|
12293
|
+
latestUrl: `https://registry.npmjs.org/${PACKAGE3}/latest`
|
|
12006
12294
|
};
|
|
12007
12295
|
}
|
|
12008
12296
|
|
|
@@ -12053,7 +12341,7 @@ function judgeOf(io) {
|
|
|
12053
12341
|
};
|
|
12054
12342
|
}
|
|
12055
12343
|
var isObject6 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12056
|
-
function
|
|
12344
|
+
function readJudgeOutput3(stdout) {
|
|
12057
12345
|
let sawEvent = false;
|
|
12058
12346
|
let stepLimit = false;
|
|
12059
12347
|
let lastFinish;
|
|
@@ -12085,7 +12373,7 @@ function createOpenCodeHeadless(io) {
|
|
|
12085
12373
|
commandLine: (prompt) => `${OPENCODE.program} run --auto "${prompt}"`,
|
|
12086
12374
|
promptFlags: ["run"],
|
|
12087
12375
|
judge: judgeOf(io),
|
|
12088
|
-
readJudgeOutput:
|
|
12376
|
+
readJudgeOutput: readJudgeOutput3
|
|
12089
12377
|
};
|
|
12090
12378
|
}
|
|
12091
12379
|
|
|
@@ -12271,10 +12559,40 @@ var PATHS = [".outerlayer/AGENTS.md", ".outerlayer/skills/build/SKILL.md", ".out
|
|
|
12271
12559
|
`}}
|
|
12272
12560
|
});
|
|
12273
12561
|
|
|
12562
|
+
// ../agents/src/codex/fixtures/judge-stream.ts
|
|
12563
|
+
var THREAD = JSON.stringify({ type: "thread.started", thread_id: "01a1e45f-55a1-7510-bfac-de6417cd7571" });
|
|
12564
|
+
var TURN = JSON.stringify({ type: "turn.started" });
|
|
12565
|
+
var USAGE = JSON.stringify({
|
|
12566
|
+
type: "turn.completed",
|
|
12567
|
+
usage: { input_tokens: 2e3, cached_input_tokens: 800, cache_write_input_tokens: 0, output_tokens: 40, reasoning_output_tokens: 0 }
|
|
12568
|
+
});
|
|
12569
|
+
function commandCall(index, output, exitCode) {
|
|
12570
|
+
const command = "/bin/sh -lc 'cat /outerlayer/judge/criteria.json'";
|
|
12571
|
+
return [
|
|
12572
|
+
JSON.stringify({ type: "item.started", item: { id: `item_${index}`, type: "command_execution", command, aggregated_output: "", exit_code: null, status: "in_progress" } }),
|
|
12573
|
+
JSON.stringify({ type: "item.completed", item: { id: `item_${index}`, type: "command_execution", command, aggregated_output: output, exit_code: exitCode, status: "completed" } })
|
|
12574
|
+
];
|
|
12575
|
+
}
|
|
12576
|
+
function message(index, text) {
|
|
12577
|
+
return JSON.stringify({ type: "item.completed", item: { id: `item_${index}`, type: "agent_message", text } });
|
|
12578
|
+
}
|
|
12579
|
+
var PASS_TEXT = "all done\nresult: pass";
|
|
12580
|
+
function passStream() {
|
|
12581
|
+
return [
|
|
12582
|
+
THREAD,
|
|
12583
|
+
TURN,
|
|
12584
|
+
...commandCall(0, '{"criteria":[]}\n', 0),
|
|
12585
|
+
JSON.stringify({ type: "item.started", item: { id: "item_1", type: "file_change", changes: [{ path: "/outerlayer/judge/items.json", kind: "add" }], status: "in_progress" } }),
|
|
12586
|
+
JSON.stringify({ type: "item.completed", item: { id: "item_1", type: "file_change", changes: [{ path: "/outerlayer/judge/items.json", kind: "add" }], status: "completed" } }),
|
|
12587
|
+
message(2, PASS_TEXT),
|
|
12588
|
+
USAGE
|
|
12589
|
+
].join("\n");
|
|
12590
|
+
}
|
|
12591
|
+
|
|
12274
12592
|
// ../agents/src/codex/fixtures/rollout.ts
|
|
12275
12593
|
var ROLLOUT_ID = "01a1df4f-70d8-74a3-8ad8-eda2b0e60065";
|
|
12276
12594
|
var ROLLOUT_CWD = "/work/project";
|
|
12277
|
-
var
|
|
12595
|
+
var USAGE2 = { input_tokens: 500, cached_input_tokens: 200, cache_write_input_tokens: 0, output_tokens: 20, reasoning_output_tokens: 5, total_tokens: 520 };
|
|
12278
12596
|
var TOTAL = { input_tokens: 1e3, cached_input_tokens: 400, cache_write_input_tokens: 0, output_tokens: 40, reasoning_output_tokens: 10, total_tokens: 1040 };
|
|
12279
12597
|
var TURN_ID = "01a1df4f-70fa-73b2-bb4c-01c7d80d0431";
|
|
12280
12598
|
function rolloutLines(cliVersion = "0.169.0") {
|
|
@@ -12286,9 +12604,9 @@ function rolloutLines(cliVersion = "0.169.0") {
|
|
|
12286
12604
|
{ timestamp: "2026-11-15T13:04:47.950Z", ordinal: 4, type: "response_item", payload: { type: "function_call", name: "exec_command", arguments: JSON.stringify({ cmd: "echo hi" }), call_id: "call_1" } },
|
|
12287
12605
|
{ timestamp: "2026-11-15T13:04:47.960Z", ordinal: 5, type: "event_msg", payload: { type: "item_completed", turn_id: TURN_ID, item: { type: "CommandExecution", id: "call_1", command: ["/bin/sh", "-lc", "echo hi"], status: "completed", aggregated_output: "hi\n", exit_code: 0, duration: { secs: 0, nanos: 12e6 } } } },
|
|
12288
12606
|
{ timestamp: "2026-11-15T13:04:47.970Z", ordinal: 6, type: "response_item", payload: { type: "function_call_output", call_id: "call_1", output: "Chunk ID: 78a920\nWall time: 0.0000 seconds\nProcess exited with code 0\nOriginal token count: 1\nOutput:\nhi\n" } },
|
|
12289
|
-
{ timestamp: "2026-11-15T13:04:47.980Z", ordinal: 7, type: "event_msg", payload: { type: "token_count", info: { total_token_usage: { ...
|
|
12607
|
+
{ timestamp: "2026-11-15T13:04:47.980Z", ordinal: 7, type: "event_msg", payload: { type: "token_count", info: { total_token_usage: { ...USAGE2 }, last_token_usage: { ...USAGE2 }, model_context_window: 258400 } } },
|
|
12290
12608
|
{ timestamp: "2026-11-15T13:04:48.060Z", ordinal: 8, type: "response_item", payload: { type: "message", role: "assistant", content: [{ type: "output_text", text: "done" }] } },
|
|
12291
|
-
{ timestamp: "2026-11-15T13:04:48.070Z", ordinal: 9, type: "event_msg", payload: { type: "token_count", info: { total_token_usage: { ...TOTAL }, last_token_usage: { ...
|
|
12609
|
+
{ timestamp: "2026-11-15T13:04:48.070Z", ordinal: 9, type: "event_msg", payload: { type: "token_count", info: { total_token_usage: { ...TOTAL }, last_token_usage: { ...USAGE2 }, model_context_window: 258400 } } },
|
|
12292
12610
|
{ timestamp: "2026-11-15T13:04:48.080Z", ordinal: 10, type: "event_msg", payload: { type: "task_complete", turn_id: TURN_ID, last_agent_message: "done", duration_ms: 200 } }
|
|
12293
12611
|
];
|
|
12294
12612
|
}
|
|
@@ -12300,6 +12618,7 @@ var PATHS2 = [".outerlayer/AGENTS.md", ".outerlayer/skills/build/SKILL.md"];
|
|
|
12300
12618
|
var ROLLOUT_FILE = `/home/test/.codex/sessions/2026/11/15/rollout-2026-11-15T13-04-47-${ROLLOUT_ID}.jsonl`;
|
|
12301
12619
|
({
|
|
12302
12620
|
capture: { text: rolloutText() },
|
|
12621
|
+
judgeOutput: { stdout: passStream()},
|
|
12303
12622
|
hooks: {
|
|
12304
12623
|
payloads: Object.fromEntries(
|
|
12305
12624
|
["SessionStart", "PostToolUse", "Stop"].map((name) => [name, JSON.stringify({ session_id: ROLLOUT_ID, cwd: "/work", hook_event_name: name, transcript_path: ROLLOUT_FILE, model: "gpt-5.5" })])
|