@outerlayer/cli 0.38.0-next.20261110212358 → 0.38.0-next.20261111004457
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-setup-OU7CGYSN.js +40 -0
- package/dist/{agent-subcommand-5PNHUNZZ.js → agent-subcommand-GG4PSHYT.js} +4 -4
- package/dist/{artifact-link-cmd-XOFZP7U5.js → artifact-link-cmd-L4BXSQQP.js} +2 -2
- package/dist/{bridge-RNM7OWRW.js → bridge-MVW5RNQD.js} +7 -7
- package/dist/{build-VKO7IVOQ.js → build-D4Y3LBPO.js} +13 -13
- package/dist/{build-disk-M2JYJF6R.js → build-disk-VDMWH3C3.js} +11 -11
- package/dist/build-info.json +1 -1
- package/dist/{builder-HMHJ6U7C.js → builder-6L5ZMXBE.js} +10 -10
- package/dist/caller-FFSXVMLB.js +23 -0
- package/dist/{check-3XHEVEXS.js → check-U5DOQU64.js} +55 -55
- package/dist/{chunk-SBPMDO47.js → chunk-2HLMGVK6.js} +1 -1
- package/dist/{chunk-TW2V2IQ4.js → chunk-2KUFDLLY.js} +1 -1
- package/dist/{chunk-XCTE5S2C.js → chunk-2PYQ6BZJ.js} +1 -1
- package/dist/{chunk-HMDEF3UT.js → chunk-2ZPXDOCU.js} +16 -16
- package/dist/{chunk-ALCZ2SEW.js → chunk-3AHABZMA.js} +5 -5
- package/dist/{chunk-5QFFQCSY.js → chunk-3IL6H7A4.js} +1 -1
- package/dist/{chunk-5QDHJT73.js → chunk-4JKCTCCC.js} +6 -5
- package/dist/{chunk-NE7EG3SN.js → chunk-4S6ML2YX.js} +4 -4
- package/dist/{chunk-ATQHPT3B.js → chunk-5TODASD5.js} +1 -1
- package/dist/{chunk-C574RHGN.js → chunk-5U4IKVF5.js} +3 -3
- package/dist/{chunk-AC6DM3S3.js → chunk-6Z5AC4ZK.js} +1 -1
- package/dist/{chunk-IGO766M6.js → chunk-7GYY7RHR.js} +4 -4
- package/dist/{chunk-OI4ZV7MJ.js → chunk-7ILAGC3U.js} +1 -1
- package/dist/{chunk-YOAJLD2D.js → chunk-7NRULS6C.js} +7 -7
- package/dist/{chunk-VU5PPWIQ.js → chunk-A6CCWLUP.js} +7 -7
- package/dist/{chunk-YZQYTOCR.js → chunk-BYWVHMBR.js} +1 -1
- package/dist/{chunk-KGHYNTF6.js → chunk-BZSGU2WC.js} +7 -7
- package/dist/{chunk-UCUBQWJC.js → chunk-CKA4JQKR.js} +1 -1
- package/dist/{chunk-ITOIM3WV.js → chunk-CSFMIUYS.js} +1 -1
- package/dist/{chunk-QGUCHNSQ.js → chunk-D7OVS2LL.js} +3 -3
- package/dist/{chunk-PA6FKP5B.js → chunk-DDEJP7YT.js} +6 -6
- package/dist/{chunk-72LXVD4O.js → chunk-DNCF3XOC.js} +4 -4
- package/dist/{chunk-MBPBYMHU.js → chunk-E5G6K7C4.js} +1 -1
- package/dist/{chunk-L32O52SH.js → chunk-EKV7QATX.js} +1 -1
- package/dist/{chunk-F2ADK2KB.js → chunk-EN3OWMED.js} +5 -5
- package/dist/{chunk-VNHDMOZW.js → chunk-F5ONFHHU.js} +52 -31
- package/dist/{chunk-MT4XF5OL.js → chunk-G2CRPYFO.js} +2 -2
- package/dist/{chunk-3HJK7WTM.js → chunk-GELUV567.js} +137 -14
- package/dist/{chunk-TUSIYONR.js → chunk-HWXBOHEA.js} +1 -1
- package/dist/{chunk-2TXYQANG.js → chunk-IWJFARST.js} +1 -1
- package/dist/{chunk-DKDBMMX7.js → chunk-IZHI643L.js} +6 -6
- package/dist/{chunk-I2N427GS.js → chunk-J3KW7GPE.js} +8 -8
- package/dist/{chunk-47JRSV6Y.js → chunk-J4DTF5MN.js} +1 -1
- package/dist/{chunk-QFQ2UNZU.js → chunk-JASHMKDN.js} +6 -6
- package/dist/{chunk-25G5KXBE.js → chunk-JDXYBQBZ.js} +7 -7
- package/dist/{chunk-I64CTY4U.js → chunk-JNEK36QK.js} +113 -63
- package/dist/{chunk-E27XMQKR.js → chunk-JP5D37RZ.js} +3 -3
- package/dist/{chunk-EHPKACA7.js → chunk-JPO6RJEW.js} +1 -1
- package/dist/{chunk-IVB6A3I7.js → chunk-JRM35NTG.js} +7 -7
- package/dist/{chunk-735C5J6Q.js → chunk-LNTNFSRI.js} +5 -5
- package/dist/{chunk-L6CZTRNW.js → chunk-MRSN67FY.js} +1 -1
- package/dist/{chunk-RBLXGO5K.js → chunk-MV5WJEIB.js} +2 -2
- package/dist/{chunk-WH2QUYXH.js → chunk-MX5XVAOI.js} +2 -2
- package/dist/{chunk-OK4RSIB2.js → chunk-N3KGXHV4.js} +1 -1
- package/dist/{chunk-7E55P2NR.js → chunk-NAKFPE2V.js} +1 -1
- package/dist/{chunk-S56J4BMQ.js → chunk-NBJPY3OC.js} +10 -10
- package/dist/{chunk-XAR2CJFV.js → chunk-NCPZP6PQ.js} +7 -7
- package/dist/{chunk-FXVHF6RX.js → chunk-NEXKR5RR.js} +64 -13
- package/dist/{chunk-VRWZNI6U.js → chunk-NIQXLC6A.js} +1 -1
- package/dist/{chunk-3DY4DQOC.js → chunk-ONZNFKCH.js} +4 -4
- package/dist/{chunk-BTH6HTE5.js → chunk-OUKSF3LK.js} +5 -5
- package/dist/{chunk-6RQP5GP5.js → chunk-OVJSVC5U.js} +2 -2
- package/dist/{chunk-ENHD5PNW.js → chunk-OWBNADRQ.js} +1 -1
- package/dist/{chunk-MSARYPFD.js → chunk-OZDUVL5L.js} +2 -2
- package/dist/{chunk-FGBBGUM4.js → chunk-P5XX7VZ6.js} +4 -4
- package/dist/{chunk-YO2NPS66.js → chunk-PG33WPRF.js} +1 -1
- package/dist/{chunk-OEWSICWM.js → chunk-QB5MU2WS.js} +8 -8
- package/dist/{chunk-B5Z4VA4Q.js → chunk-QHYCF36K.js} +1 -1
- package/dist/{chunk-2WNJ2MHD.js → chunk-R6UNNKV3.js} +1 -1
- package/dist/{chunk-TD6DN5LU.js → chunk-RI37FFPL.js} +3 -3
- package/dist/{chunk-GJMLLXZJ.js → chunk-RWXLTF3K.js} +1 -1
- package/dist/{chunk-XFU37HIM.js → chunk-U43K2JS5.js} +3 -3
- package/dist/{chunk-6XROZIV6.js → chunk-UF3X5ECJ.js} +6 -6
- package/dist/{chunk-VQQF6MDT.js → chunk-W5OAKC2W.js} +10 -10
- package/dist/{chunk-BCQFMAGM.js → chunk-WPGGRTF4.js} +3 -3
- package/dist/{chunk-67BVM7JK.js → chunk-WVJDXOIG.js} +3 -3
- package/dist/{chunk-CXXQQST7.js → chunk-WWGXWKLT.js} +9 -9
- package/dist/{chunk-UUSSRXUJ.js → chunk-X7BVDOS2.js} +3 -3
- package/dist/{chunk-OWEJP5HJ.js → chunk-YB3M2TM3.js} +1 -1
- package/dist/{chunk-HDEYRLWK.js → chunk-YE3KPAT5.js} +1 -1
- package/dist/{chunk-3GTAPQBG.js → chunk-YWQ3S3F5.js} +2 -2
- package/dist/{chunk-B4U5XI4F.js → chunk-ZNQRFRBW.js} +8 -8
- package/dist/{claude-launcher-WMIUTAXY.js → claude-launcher-GNRTFQMI.js} +7 -7
- package/dist/{cli-PS6GSOAE.js → cli-SNHD2D6X.js} +157 -157
- package/dist/{command-XQPL75PX.js → command-NTKAT7KB.js} +50 -50
- package/dist/{config-ZRGYLVDX.js → config-LUIWZESD.js} +12 -12
- package/dist/{connect-cmd-MZXTWM4R.js → connect-cmd-4M4DN6GO.js} +13 -13
- package/dist/{container-start-M7SFF62T.js → container-start-BVEDUA7N.js} +48 -48
- package/dist/{context-cleanup-Z3HZZZXW.js → context-cleanup-JPPSK7DE.js} +4 -4
- package/dist/{context-show-cmd-SCOVPVDM.js → context-show-cmd-DAMQJOAL.js} +14 -14
- package/dist/{control-plane-launch-MWZHJ4G5.js → control-plane-launch-SD45JYKF.js} +14 -14
- package/dist/{demo-record-cmd-4RVSWVMK.js → demo-record-cmd-CFOXCR42.js} +8 -8
- package/dist/{demo-voice-cmd-TQP3PZE2.js → demo-voice-cmd-4YZJPUIP.js} +20 -20
- package/dist/{dist-XEPPXF4M.js → dist-5VKIP767.js} +2 -2
- package/dist/{docker-25F2KOBJ.js → docker-2DLKQOK3.js} +10 -10
- package/dist/{doctor-Z3U3ICVR.js → doctor-VFCDAKM4.js} +50 -50
- package/dist/{emit-artifact-cmd-Z4SHPKFT.js → emit-artifact-cmd-IWZDXJBY.js} +19 -19
- package/dist/{emit-cmd-NHMZ4M5S.js → emit-cmd-AIAY4WTW.js} +7 -7
- package/dist/{emit-criteria-cmd-HCN3DOJM.js → emit-criteria-cmd-UVCLLYEZ.js} +16 -16
- package/dist/{emit-demo-cmd-R3TIGMFX.js → emit-demo-cmd-BHKNT36Y.js} +20 -20
- package/dist/{emit-finding-cmd-YXR3ZVCJ.js → emit-finding-cmd-Y3XX26B4.js} +16 -16
- package/dist/{emit-result-cmd-Z7MBE37R.js → emit-result-cmd-TTQ3MLY4.js} +18 -18
- package/dist/{emit-step-cmd-JOSYDSEO.js → emit-step-cmd-EASDIM5Q.js} +16 -16
- package/dist/{exec-client-SZRXXKJ5.js → exec-client-MEIRWXLR.js} +8 -8
- package/dist/find-unit-2RZ4NCXQ.js +24 -0
- package/dist/{findings-cmd-NGFY25WZ.js → findings-cmd-KQOL6NJG.js} +16 -16
- package/dist/{fleet-readiness-NWIVQQ4P.js → fleet-readiness-R2BMWLXQ.js} +14 -14
- package/dist/governing-source-ARSS7R7L.js +41 -0
- package/dist/{guest-init-T7QJW2AJ.js → guest-init-UGBFOWNC.js} +9 -9
- package/dist/{hook-fast-ECQBMESE.js → hook-fast-DC556GE2.js} +1 -1
- package/dist/{hook-install-MBMG3G6B.js → hook-install-QQXREIMI.js} +4 -4
- package/dist/host-checks-UTZBDSWV.js +80 -0
- package/dist/host-key-CTRFLP2W.js +18 -0
- package/dist/{image-tag-OCVY4W5D.js → image-tag-RU4RHPIT.js} +8 -8
- package/dist/index.js +4 -4
- package/dist/init-I5HVGOQC.js +80 -0
- package/dist/{init-NRN2DQC3.js → init-QFTRSBBT.js} +46 -46
- package/dist/{init-agent-GDOZHPQH.js → init-agent-TKQ67BS4.js} +46 -46
- package/dist/{init-cmd-QJYX47LS.js → init-cmd-I36LJ6YC.js} +27 -27
- package/dist/{init-update-EUJ4264S.js → init-update-KG7V3VJF.js} +24 -24
- package/dist/{install-cmd-HWG6LJX5.js → install-cmd-66Z7TY52.js} +10 -10
- package/dist/{layout-CGE4KWGO.js → layout-CE6QLPNH.js} +4 -4
- package/dist/{login-browser-G7WNR74C.js → login-browser-COSWHZEC.js} +2 -2
- package/dist/{logs-TKWJ4S4W.js → logs-XWMVEAUP.js} +7 -7
- package/dist/loop-YCOSJRLW.js +90 -0
- package/dist/machine-BJEAYCHT.js +80 -0
- package/dist/{machine-skills-CXA57QHE.js → machine-skills-YJLPUAYZ.js} +4 -4
- package/dist/{mcp-install-cmd-6IGK65DV.js → mcp-install-cmd-VSWX5BSZ.js} +4 -4
- package/dist/{mcp-serve-cmd-DVE5XP2U.js → mcp-serve-cmd-M7CX4RO3.js} +9 -9
- package/dist/{paths-VOWYUJLZ.js → paths-GQ66KHNT.js} +7 -7
- package/dist/pending-COVCIH4Q.js +18 -0
- package/dist/{pidfile-MFP6B2KV.js → pidfile-RBG6FQ7K.js} +8 -8
- package/dist/{record-AWCJ3LTG.js → record-6IAZ26H3.js} +8 -8
- package/dist/{relay-YVZM5M6B.js → relay-VEBGGPYV.js} +5 -5
- package/dist/{relay-protocol-MNWITORT.js → relay-protocol-2AJCUAMJ.js} +5 -5
- package/dist/{run-cmd-MBH5Z2UL.js → run-cmd-EJPHCENL.js} +16 -16
- package/dist/{runner-agents-L3PLYFWJ.js → runner-agents-P562WZJB.js} +4 -4
- package/dist/runner-env-XPZ3FPQL.js +24 -0
- package/dist/{runner-identity-E2XKIJNB.js → runner-identity-TAJAY5M5.js} +10 -10
- package/dist/{runner-key-W5M6AYY5.js → runner-key-I3M7GEJE.js} +46 -46
- package/dist/{session-sender-IS6S7PBC.js → session-sender-OIOE4QR2.js} +19 -19
- package/dist/{spec-cmd-ZLDYL4N5.js → spec-cmd-2J43XP3L.js} +17 -17
- package/dist/{starter-pack-XINCCMDN.js → starter-pack-IT2KYFWU.js} +5 -5
- package/dist/state-NAZKB77R.js +18 -0
- package/dist/{status-L7R6FKWD.js → status-BFRDAZQP.js} +46 -46
- package/dist/{sync-cmd-3YZ4IB3T.js → sync-cmd-KWTFVQCR.js} +18 -18
- package/dist/update-steps-LINCNPGV.js +81 -0
- package/dist/{watch-LIIODJ5U.js → watch-3IBFF2SQ.js} +18 -18
- package/dist/{work-claim-cmd-GWBWIZ43.js → work-claim-cmd-C2WFSOKE.js} +22 -22
- package/dist/{work-cmd-CJWTGOU5.js → work-cmd-DO2QNBKA.js} +16 -16
- package/dist/{work-comment-cmd-RFVCNEET.js → work-comment-cmd-P5VJHCX7.js} +18 -18
- package/dist/{work-demo-cmd-Q2GKJCVL.js → work-demo-cmd-UJBZLOMQ.js} +16 -16
- package/dist/{work-logs-cmd-KZQBPU2J.js → work-logs-cmd-OVE5JUMH.js} +16 -16
- package/dist/{work-needs-attention-cmd-L3DOYAMK.js → work-needs-attention-cmd-QNCOUXMT.js} +16 -16
- package/dist/{work-no-change-cmd-SHP25CJB.js → work-no-change-cmd-KQSONMJX.js} +16 -16
- package/dist/{work-open-pr-cmd-VATPLVSL.js → work-open-pr-cmd-HBE74CZU.js} +17 -17
- package/dist/{work-pr-cmd-XBLNONT3.js → work-pr-cmd-62BGKUJM.js} +16 -16
- package/dist/{work-proofs-cmd-7HSLB52S.js → work-proofs-cmd-SLUFPOEN.js} +18 -18
- package/dist/{work-proofs-record-BE6UMZPH.js → work-proofs-record-6KGPMUHD.js} +24 -24
- package/dist/{work-stop-cmd-BLOSL24H.js → work-stop-cmd-7WEHA365.js} +16 -16
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-findings/SKILL.md +46 -41
- package/skill-pack/maintained/outerlayer-findings/references/examples.md +23 -0
- package/dist/agent-setup-GZBGCV3K.js +0 -40
- package/dist/caller-U26SATTV.js +0 -23
- package/dist/find-unit-3RHC4375.js +0 -24
- package/dist/governing-source-DNWVPRXP.js +0 -41
- package/dist/host-checks-QLGWXKOC.js +0 -80
- package/dist/host-key-6SMJUTJ2.js +0 -18
- package/dist/init-JY3XYZI6.js +0 -80
- package/dist/loop-HWYHQ374.js +0 -90
- package/dist/machine-NVXRV4BO.js +0 -80
- package/dist/pending-35ML3JE5.js +0 -18
- package/dist/runner-env-IHWYZ3B6.js +0 -24
- package/dist/state-NIA6XT7D.js +0 -18
- package/dist/update-steps-6SPAPBAB.js +0 -81
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveCredentials, postBytes, RateLimitedError, postJson, getJson, getBytes } from './chunk-
|
|
4
|
-
import { detectActiveSession } from './chunk-
|
|
5
|
-
import { sanitizeTerminal } from './chunk-
|
|
3
|
+
import { resolveCredentials, postBytes, RateLimitedError, postJson, getJson, getBytes } from './chunk-ZNQRFRBW.js';
|
|
4
|
+
import { detectActiveSession } from './chunk-2HLMGVK6.js';
|
|
5
|
+
import { sanitizeTerminal } from './chunk-QHYCF36K.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
|
-
import { defaultFetch } from './chunk-
|
|
8
|
-
import { logHookError } from './chunk-
|
|
7
|
+
import { defaultFetch } from './chunk-NIQXLC6A.js';
|
|
8
|
+
import { logHookError } from './chunk-D7OVS2LL.js';
|
|
9
9
|
import { parseWorkItemEnv } from './chunk-LGJ56FCM.js';
|
|
10
10
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
11
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
12
|
-
import { resolveRepoIdentity } from './chunk-
|
|
13
|
-
import { ATTACHMENT_CLIENT_ID_HEADER, ATTACHMENT_SHA256_HEADER, ATTACHMENT_FILENAME_HEADER, cleanAttachmentFilename, WORK_ITEM_ATTACHMENTS_MAX_PER_COMMENT, attachmentKind, WORK_ITEM_ATTACHMENT_MAX_BYTES, WORK_ITEM_ATTACHMENTS_MAX_TOTAL_BYTES } from './chunk-
|
|
12
|
+
import { resolveRepoIdentity } from './chunk-E5G6K7C4.js';
|
|
13
|
+
import { ATTACHMENT_CLIENT_ID_HEADER, ATTACHMENT_SHA256_HEADER, ATTACHMENT_FILENAME_HEADER, cleanAttachmentFilename, WORK_ITEM_ATTACHMENTS_MAX_PER_COMMENT, attachmentKind, WORK_ITEM_ATTACHMENT_MAX_BYTES, WORK_ITEM_ATTACHMENTS_MAX_TOTAL_BYTES } from './chunk-NEXKR5RR.js';
|
|
14
14
|
import { randomUUID, createHash } from 'crypto';
|
|
15
15
|
import { mkdirSync, statSync, readFileSync, writeFileSync } from 'fs';
|
|
16
16
|
import { resolve, extname, basename, join } from 'path';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { staleBuildRefusal, staleBuildWarning, detectCi } from './chunk-
|
|
3
|
+
import { staleBuildRefusal, staleBuildWarning, detectCi } from './chunk-WWGXWKLT.js';
|
|
4
4
|
import { launchRefusalForSession } from './chunk-C2PZOLN7.js';
|
|
5
|
-
import { detectActiveSession } from './chunk-
|
|
6
|
-
import { autoConnect } from './chunk-
|
|
7
|
-
import { readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, sanitizeTerminal, appendArtifactTombstone } from './chunk-
|
|
5
|
+
import { detectActiveSession } from './chunk-2HLMGVK6.js';
|
|
6
|
+
import { autoConnect } from './chunk-U43K2JS5.js';
|
|
7
|
+
import { readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, sanitizeTerminal, appendArtifactTombstone } from './chunk-QHYCF36K.js';
|
|
8
8
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
9
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
9
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-NIQXLC6A.js';
|
|
10
10
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
11
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
12
12
|
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
13
13
|
import { homeFromEnv, spoolHomeFromEnv } from './chunk-352DHUTP.js';
|
|
14
|
-
import { resolveRepoIdentity } from './chunk-
|
|
15
|
-
import { ARTIFACT_MAX_CAPTION_LENGTH, ArtifactCriterionIdSchema, ARTIFACT_MAX_BYTES, ARTIFACT_MAX_FILENAME_LENGTH, mediaTypeForArtifactPath, inferArtifactKind, ARTIFACT_MAX_REPLACES_TARGETS, parseTestSelector, parseJunit, bindTests } from './chunk-
|
|
14
|
+
import { resolveRepoIdentity } from './chunk-E5G6K7C4.js';
|
|
15
|
+
import { ARTIFACT_MAX_CAPTION_LENGTH, ArtifactCriterionIdSchema, ARTIFACT_MAX_BYTES, ARTIFACT_MAX_FILENAME_LENGTH, mediaTypeForArtifactPath, inferArtifactKind, ARTIFACT_MAX_REPLACES_TARGETS, parseTestSelector, parseJunit, bindTests } from './chunk-NEXKR5RR.js';
|
|
16
16
|
import { createHash, randomUUID } from 'crypto';
|
|
17
17
|
import { statSync, readFileSync, mkdirSync, existsSync, writeFileSync, renameSync, unlinkSync } from 'fs';
|
|
18
18
|
import { resolve, basename, join } from 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-6Z5AC4ZK.js';
|
|
4
4
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readNewestDemo } from './chunk-ER6KQCVJ.js';
|
|
4
|
-
import { runEmitArtifact } from './chunk-
|
|
4
|
+
import { runEmitArtifact } from './chunk-A6CCWLUP.js';
|
|
5
5
|
import { VoiceDownloadError, downloadPinned, sha256OfFile } from './chunk-2PGI6RDE.js';
|
|
6
|
-
import { detectActiveSession } from './chunk-
|
|
7
|
-
import { autoConnect } from './chunk-
|
|
6
|
+
import { detectActiveSession } from './chunk-2HLMGVK6.js';
|
|
7
|
+
import { autoConnect } from './chunk-U43K2JS5.js';
|
|
8
8
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
9
|
-
import { defaultFetch, resolveGatewayCredentials } from './chunk-
|
|
9
|
+
import { defaultFetch, resolveGatewayCredentials } from './chunk-NIQXLC6A.js';
|
|
10
10
|
import { launchedItemForSession } from './chunk-LGJ56FCM.js';
|
|
11
|
-
import { VOICE_PACK_FILES, VOICE_PACK_VERSION } from './chunk-
|
|
11
|
+
import { VOICE_PACK_FILES, VOICE_PACK_VERSION } from './chunk-CKA4JQKR.js';
|
|
12
12
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
13
|
-
import { resolveRepoIdentity } from './chunk-
|
|
14
|
-
import { ARTIFACT_MAX_BYTES, ARTIFACT_MAX_CAPTION_LENGTH, DEMO_RECORD_MEDIA_TYPE, ARTIFACT_MAX_REPLACES_TARGETS, DEMO_MANIFEST_LATEST_VERSION, DemoManifestSchema, ARTIFACT_KINDS } from './chunk-
|
|
13
|
+
import { resolveRepoIdentity } from './chunk-E5G6K7C4.js';
|
|
14
|
+
import { ARTIFACT_MAX_BYTES, ARTIFACT_MAX_CAPTION_LENGTH, DEMO_RECORD_MEDIA_TYPE, ARTIFACT_MAX_REPLACES_TARGETS, DEMO_MANIFEST_LATEST_VERSION, DemoManifestSchema, ARTIFACT_KINDS } from './chunk-NEXKR5RR.js';
|
|
15
15
|
import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
|
|
16
16
|
import { createHash } from 'crypto';
|
|
17
17
|
import { readFileSync, mkdtempSync, writeFileSync, statSync, rmSync, mkdirSync, existsSync, copyFileSync, accessSync, constants, realpathSync, createReadStream, createWriteStream } from 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { defaultAgents, agentById } from './chunk-
|
|
3
|
+
import { defaultAgents, agentById } from './chunk-G2CRPYFO.js';
|
|
4
4
|
import { PROVIDERS, LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
5
5
|
import { join, dirname } from 'path';
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readContextManifest, removeContextManifest } from './chunk-YQR6E6OV.js';
|
|
4
4
|
import { removePreCommitGuardHook } from './chunk-CJPTUU2E.js';
|
|
5
|
-
import { CONTEXT_PIN_FILENAME, agentRootFolders } from './chunk-
|
|
5
|
+
import { CONTEXT_PIN_FILENAME, agentRootFolders } from './chunk-G2CRPYFO.js';
|
|
6
6
|
import { execFileSync } from 'child_process';
|
|
7
7
|
import { lstatSync, existsSync, unlinkSync, readdirSync, rmdirSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
8
8
|
import { join, dirname, isAbsolute } from 'path';
|
|
@@ -678,7 +678,7 @@ async function missingRenewalHookContext(home, cwd, codec) {
|
|
|
678
678
|
try {
|
|
679
679
|
const event = codec.events.find((name) => kindOf(codec, name) === "tool-used");
|
|
680
680
|
if (event === void 0) return void 0;
|
|
681
|
-
const { hookRegistered } = await import('./hook-install-
|
|
681
|
+
const { hookRegistered } = await import('./hook-install-QQXREIMI.js');
|
|
682
682
|
const registered = hookRegistered(event, { home, cwd });
|
|
683
683
|
if (registered !== false) return void 0;
|
|
684
684
|
return `This install has no ${event} hook, so this session's work-item lease will never be renewed while it works and may be lost to another worker mid-session. Run \`${cliInvocation()} init\` to register it.`;
|
|
@@ -878,11 +878,11 @@ async function missingControlPlane(cwd, sessionId, home, env) {
|
|
|
878
878
|
const dirs = findGitDirs(cwd);
|
|
879
879
|
if (dirs === void 0) return void 0;
|
|
880
880
|
if (existsSync(join(dirs.gitCommonDir, "outerlayer", "materialized.json")) || hasExcludeBlock(dirs.gitCommonDir)) {
|
|
881
|
-
const { cleanupEarlierCopies } = await import('./context-cleanup-
|
|
881
|
+
const { cleanupEarlierCopies } = await import('./context-cleanup-JPPSK7DE.js');
|
|
882
882
|
cleanupEarlierCopies(dirs);
|
|
883
883
|
}
|
|
884
884
|
if (!contextPossiblyGoverned(cwd, home)) return void 0;
|
|
885
|
-
const { governanceOf } = await import('./control-plane-launch-
|
|
885
|
+
const { governanceOf } = await import('./control-plane-launch-SD45JYKF.js');
|
|
886
886
|
if (await governanceOf({ cwd, env, home }) !== "governed") return void 0;
|
|
887
887
|
recordMissingContext(dirs, sessionId, home);
|
|
888
888
|
const launcher = `${cliInvocation()} ${LEGACY.legacy.subcommand}`;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { sanitizeTerminal } from './chunk-
|
|
4
|
-
import { isAgentsMdLayout } from './chunk-
|
|
5
|
-
import { resolveGatewayCredentials, defaultFetch } from './chunk-
|
|
3
|
+
import { sanitizeTerminal } from './chunk-QHYCF36K.js';
|
|
4
|
+
import { isAgentsMdLayout } from './chunk-PG33WPRF.js';
|
|
5
|
+
import { resolveGatewayCredentials, defaultFetch } from './chunk-NIQXLC6A.js';
|
|
6
6
|
import { versionAtLeast } from './chunk-SF2TBJBP.js';
|
|
7
7
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
8
|
-
import { machineSkillsState, staleAgentSkills } from './chunk-
|
|
8
|
+
import { machineSkillsState, staleAgentSkills } from './chunk-NAKFPE2V.js';
|
|
9
9
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
10
|
-
import { hasSymlinkComponent } from './chunk-
|
|
11
|
-
import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, AGENTS_SKILLS_BASE, defaultAgents, namesCore, MACHINE_SKILL_PATH, skillBases, isMaintainedCopy, contextAgents, loadTemplateFiles, splitRawFile } from './chunk-
|
|
10
|
+
import { hasSymlinkComponent } from './chunk-CSFMIUYS.js';
|
|
11
|
+
import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, AGENTS_SKILLS_BASE, defaultAgents, namesCore, MACHINE_SKILL_PATH, skillBases, isMaintainedCopy, contextAgents, loadTemplateFiles, splitRawFile } from './chunk-G2CRPYFO.js';
|
|
12
12
|
import { MAINTAINED_SKILLS } from './chunk-ATEMEVFF.js';
|
|
13
13
|
import { execFileSync } from 'child_process';
|
|
14
14
|
import { existsSync, readFileSync, writeFileSync, realpathSync, readdirSync } from 'fs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { PROXY_WARNING_FLAG } from './chunk-
|
|
4
|
-
import { RELAY_ID, RELAY_USER } from './chunk-
|
|
5
|
-
import { imageInstalls, GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL_REVISION, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, HEADLESS_SHELL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_VERSION } from './chunk-
|
|
6
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { PROXY_WARNING_FLAG } from './chunk-4S6ML2YX.js';
|
|
4
|
+
import { RELAY_ID, RELAY_USER } from './chunk-MX5XVAOI.js';
|
|
5
|
+
import { imageInstalls, GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL_REVISION, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, HEADLESS_SHELL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_VERSION } from './chunk-CKA4JQKR.js';
|
|
6
|
+
import { defaultAgents } from './chunk-G2CRPYFO.js';
|
|
7
7
|
|
|
8
8
|
createRequire(import.meta.url);
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-
|
|
3
|
+
import { inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-NEXKR5RR.js';
|
|
4
4
|
import { readFileSync, mkdirSync, statSync, copyFileSync, renameSync, unlinkSync, writeFileSync, readdirSync, realpathSync, watch as watch$1 } from 'fs';
|
|
5
5
|
import * as sp5 from 'path';
|
|
6
6
|
import { join, relative, dirname, resolve, sep } from 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RELAY_PORT, BUILD_HOME } from './chunk-
|
|
3
|
+
import { RELAY_PORT, BUILD_HOME } from './chunk-4S6ML2YX.js';
|
|
4
4
|
import { createServer, connect } from 'net';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
4
|
-
import { RUNNER_FILE_MODE } from './chunk-
|
|
5
|
-
import { parseRunnerEnv, withoutCredentialLines } from './chunk-
|
|
6
|
-
import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-
|
|
7
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-IZHI643L.js';
|
|
4
|
+
import { RUNNER_FILE_MODE } from './chunk-6Z5AC4ZK.js';
|
|
5
|
+
import { parseRunnerEnv, withoutCredentialLines } from './chunk-MX5XVAOI.js';
|
|
6
|
+
import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-CKA4JQKR.js';
|
|
7
|
+
import { defaultAgents } from './chunk-G2CRPYFO.js';
|
|
8
8
|
import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
|
|
9
9
|
import { join, dirname } from 'path';
|
|
10
10
|
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
4
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
4
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-JDXYBQBZ.js';
|
|
5
5
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
6
|
-
import { writeFleetState } from './chunk-
|
|
7
|
-
import { writePendingUpdate } from './chunk-
|
|
8
|
-
import { renderUpdateSteps } from './chunk-
|
|
9
|
-
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-
|
|
10
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-
|
|
11
|
-
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-
|
|
12
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, deliverJobFiles, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, inTeardown } from './chunk-
|
|
6
|
+
import { writeFleetState } from './chunk-JPO6RJEW.js';
|
|
7
|
+
import { writePendingUpdate } from './chunk-YE3KPAT5.js';
|
|
8
|
+
import { renderUpdateSteps } from './chunk-WVJDXOIG.js';
|
|
9
|
+
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-BYWVHMBR.js';
|
|
10
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-W5OAKC2W.js';
|
|
11
|
+
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-3IL6H7A4.js';
|
|
12
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, deliverJobFiles, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, inTeardown } from './chunk-JNEK36QK.js';
|
|
13
13
|
import { RUNNER_PROTOCOL } from './chunk-6XMC6R4W.js';
|
|
14
|
-
import { RUNNER_RESERVE_BYTES } from './chunk-
|
|
15
|
-
import { RepoFilter } from './chunk-
|
|
14
|
+
import { RUNNER_RESERVE_BYTES } from './chunk-IZHI643L.js';
|
|
15
|
+
import { RepoFilter } from './chunk-WWGXWKLT.js';
|
|
16
16
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
17
|
-
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-
|
|
17
|
+
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-R6UNNKV3.js';
|
|
18
18
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
19
|
-
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, configForJob } from './chunk-
|
|
20
|
-
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-
|
|
19
|
+
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, configForJob } from './chunk-OZDUVL5L.js';
|
|
20
|
+
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-7ILAGC3U.js';
|
|
21
21
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
22
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
23
|
-
import { isSignatureRefusal, WorkCommandError, getJson, postJson, getBytes } from './chunk-
|
|
24
|
-
import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm,
|
|
25
|
-
import { allocatedBytes, freeBytes, formatBytes } from './chunk-
|
|
26
|
-
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-
|
|
27
|
-
import { loadHostKey, ensureHostKey, signerFor } from './chunk-
|
|
28
|
-
import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE, buildDir, attemptStamp, jobDir, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-
|
|
29
|
-
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, JOB_MOUNT } from './chunk-
|
|
30
|
-
import { jobCredentialProblem, COMMAND_LOST_REASON, takeAgentCredentials, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-
|
|
31
|
-
import { cleanAttachmentName } from './chunk-
|
|
32
|
-
import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-
|
|
22
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-JRM35NTG.js';
|
|
23
|
+
import { isSignatureRefusal, WorkCommandError, getJson, postJson, getBytes } from './chunk-ZNQRFRBW.js';
|
|
24
|
+
import { keyRunnerFactory, isBuiltinSandbox, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-4JKCTCCC.js';
|
|
25
|
+
import { allocatedBytes, freeBytes, formatBytes } from './chunk-MV5WJEIB.js';
|
|
26
|
+
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-J3KW7GPE.js';
|
|
27
|
+
import { loadHostKey, ensureHostKey, signerFor } from './chunk-OWBNADRQ.js';
|
|
28
|
+
import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE, buildDir, attemptStamp, jobDir, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-6Z5AC4ZK.js';
|
|
29
|
+
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, JOB_MOUNT } from './chunk-4S6ML2YX.js';
|
|
30
|
+
import { jobCredentialProblem, COMMAND_LOST_REASON, takeAgentCredentials, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-MX5XVAOI.js';
|
|
31
|
+
import { cleanAttachmentName } from './chunk-D7OVS2LL.js';
|
|
32
|
+
import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-CKA4JQKR.js';
|
|
33
33
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
34
34
|
import { mkdirSync, existsSync, writeFileSync, chmodSync, renameSync, statSync, readdirSync, readFileSync, rmSync, closeSync } from 'fs';
|
|
35
35
|
import { join, dirname } from 'path';
|
|
@@ -2515,7 +2515,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
2515
2515
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
2516
2516
|
);
|
|
2517
2517
|
async function tryClaimAndStart(state, item, queue) {
|
|
2518
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
2518
|
+
const { postJson: postJson2 } = await import('./work-cmd-DO2QNBKA.js');
|
|
2519
2519
|
const log = logOf(state);
|
|
2520
2520
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
2521
2521
|
const claim = await retrySend(
|
|
@@ -2652,19 +2652,40 @@ async function startClaimedBuild(state, item, queue, data, fleet) {
|
|
|
2652
2652
|
for (const entry of parseUnreachable(data.unreachable)) {
|
|
2653
2653
|
log.line(`${tag}: ${entry.repository} is left out of this build because its GitHub App installation is suspended`);
|
|
2654
2654
|
}
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
} catch (err) {
|
|
2655
|
+
const starting = startJob(state, item, queue, claimId, itemKey, branch, identity, repositories, fleet, data.freshDisk === true, data.diskHeldElsewhere === true, data.codeReview === true);
|
|
2656
|
+
const endStranded = async (err) => {
|
|
2658
2657
|
const stranded = [...state.jobs.values()].find((active) => active.job.claimId === claimId);
|
|
2659
|
-
if (stranded === void 0)
|
|
2658
|
+
if (stranded === void 0) return false;
|
|
2660
2659
|
const reason = `provision failed: ${describeCallFailure(err)}`;
|
|
2661
2660
|
logOf(state).error(`${tag} ${reason} \xB7 ending job as failed`);
|
|
2662
2661
|
await endJob(state, stranded, "failed", { stage: "provision", reason });
|
|
2662
|
+
return true;
|
|
2663
|
+
};
|
|
2664
|
+
if (provisionsBesideOthers(state.config)) {
|
|
2665
|
+
endWhenStartFails(starting, endStranded, (line) => logOf(state).error(`${tag} ${line}`));
|
|
2666
|
+
return { kind: "started" };
|
|
2667
|
+
}
|
|
2668
|
+
try {
|
|
2669
|
+
await starting;
|
|
2670
|
+
} catch (err) {
|
|
2671
|
+
if (!await endStranded(err)) throw err;
|
|
2663
2672
|
return { kind: "started", provisionFailed: true };
|
|
2664
2673
|
}
|
|
2665
2674
|
const running = [...state.jobs.values()].some((active) => active.job.claimId === claimId);
|
|
2666
2675
|
return running ? { kind: "started" } : { kind: "started", provisionFailed: true };
|
|
2667
2676
|
}
|
|
2677
|
+
function endWhenStartFails(starting, endStranded, error) {
|
|
2678
|
+
void starting.catch(async (err) => {
|
|
2679
|
+
try {
|
|
2680
|
+
if (!await endStranded(err)) error(`unexpected error while the build started: ${describeCallFailure(err)}`);
|
|
2681
|
+
} catch (ending) {
|
|
2682
|
+
error(`could not be ended: ${describeCallFailure(ending)}`);
|
|
2683
|
+
}
|
|
2684
|
+
});
|
|
2685
|
+
}
|
|
2686
|
+
function provisionsBesideOthers(config) {
|
|
2687
|
+
return isBuiltinSandbox(config.hooks.provision);
|
|
2688
|
+
}
|
|
2668
2689
|
function claimIsAlreadyRunning(state, claimId) {
|
|
2669
2690
|
for (const active of state.jobs.values()) {
|
|
2670
2691
|
if (active.job.claimId === claimId) return true;
|
|
@@ -3977,7 +3998,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3977
3998
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
3978
3999
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
3979
4000
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
3980
|
-
return (await import('./check-
|
|
4001
|
+
return (await import('./check-U5DOQU64.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
3981
4002
|
},
|
|
3982
4003
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
3983
4004
|
log
|
|
@@ -4362,4 +4383,4 @@ function runnerProcessState(configPath) {
|
|
|
4362
4383
|
return isSameProcess(entry.pid, entry.start) ? { state: "running", pid: entry.pid } : { state: "stale", pid: entry.pid };
|
|
4363
4384
|
}
|
|
4364
4385
|
|
|
4365
|
-
export { LAPSED_REASON, RunnerStartError, applyComments, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick };
|
|
4386
|
+
export { LAPSED_REASON, RunnerStartError, applyComments, endWhenStartFails, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, provisionsBesideOthers, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick };
|
|
@@ -5,8 +5,8 @@ import { CLAUDE_CODE, OPENCODE, NATIVE_AGENTS, LEGACY_AGENT, homeRelative } from
|
|
|
5
5
|
import { MAINTAINED_SKILLS } from './chunk-ATEMEVFF.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-
|
|
9
|
-
import { CODE_REVIEW_NAME, RESERVED_EMIT_NAMES, EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, ARTIFACT_KINDS, ArtifactCriterionIdSchema, SPEED_MAX_LENGTH } from './chunk-
|
|
8
|
+
import { forkFor, RAW_MIRROR_SEGMENTS, WarningCollector, WARNING_CODES, isNewerThanSupported, bucketsFromTurns, costOfUsage } from './chunk-E5G6K7C4.js';
|
|
9
|
+
import { CODE_REVIEW_NAME, RESERVED_EMIT_NAMES, EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, ARTIFACT_KINDS, ArtifactCriterionIdSchema, SPEED_MAX_LENGTH } from './chunk-NEXKR5RR.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';
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-C2PZOLN7.js';
|
|
4
|
-
import { detectActiveSession, transcriptPathForSession } from './chunk-
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
4
|
+
import { detectActiveSession, transcriptPathForSession } from './chunk-2HLMGVK6.js';
|
|
5
|
+
import { autoConnect } from './chunk-U43K2JS5.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
7
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-NIQXLC6A.js';
|
|
8
8
|
import { readLatestProvenanceForSession } from './chunk-545P7JY7.js';
|
|
9
9
|
import { launchedItemForSession } from './chunk-LGJ56FCM.js';
|
|
10
10
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
11
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
12
|
-
import { legacyAgent, captureAgents, sessionFolderIn } from './chunk-
|
|
12
|
+
import { legacyAgent, captureAgents, sessionFolderIn } from './chunk-G2CRPYFO.js';
|
|
13
13
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
14
|
-
import { resolveRepoIdentity, scrubText } from './chunk-
|
|
15
|
-
import { FindingBatchSchema, FindingsResponseSchema, SAME_PROBLEM_RULES } from './chunk-
|
|
14
|
+
import { resolveRepoIdentity, scrubText } from './chunk-E5G6K7C4.js';
|
|
15
|
+
import { FindingBatchSchema, findingGaps, FindingsResponseSchema, FINDING_CODE_EXCERPT_MAX_LENGTH, SAME_PROBLEM_RULES, FINDING_TRANSCRIPT_EXCERPT_MAX_LENGTH } from './chunk-NEXKR5RR.js';
|
|
16
16
|
import { readFileSync, existsSync } from 'fs';
|
|
17
17
|
import { homedir } from 'os';
|
|
18
|
-
import { join, dirname } from 'path';
|
|
18
|
+
import { resolve, relative, isAbsolute, join, dirname } from 'path';
|
|
19
|
+
import { execFileSync } from 'child_process';
|
|
19
20
|
|
|
20
21
|
createRequire(import.meta.url);
|
|
21
22
|
var RECENT_EVENT_COUNT = 30;
|
|
@@ -50,10 +51,9 @@ function blockText(block) {
|
|
|
50
51
|
function contentOf(message) {
|
|
51
52
|
return message?.content;
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function bodyText(message) {
|
|
54
55
|
const content = contentOf(message);
|
|
55
|
-
|
|
56
|
-
return text.replace(/\s+/g, " ").trim();
|
|
56
|
+
return (Array.isArray(content) ? content.map(blockText).join("\n") : blockText(content)).trim();
|
|
57
57
|
}
|
|
58
58
|
function summarize(type, flat, agent) {
|
|
59
59
|
const scrubbed = scrubText(flat);
|
|
@@ -83,12 +83,14 @@ function readSessionEvents(transcriptPath, agent) {
|
|
|
83
83
|
}
|
|
84
84
|
if (record.type !== "user" && record.type !== "assistant" || typeof record.timestamp !== "string") return;
|
|
85
85
|
if (!Number.isFinite(Date.parse(record.timestamp))) return;
|
|
86
|
-
const
|
|
86
|
+
const body = bodyText(record.message);
|
|
87
|
+
const text2 = body.replace(/\s+/g, " ");
|
|
87
88
|
events.push({
|
|
88
89
|
id: agent !== void 0 ? `${agent}:e${index + 1}` : `e${index + 1}`,
|
|
89
90
|
at: record.timestamp,
|
|
90
91
|
summary: summarize(record.type, text2, agent),
|
|
91
92
|
text: text2,
|
|
93
|
+
body,
|
|
92
94
|
isResult: isToolResult(record.message)
|
|
93
95
|
});
|
|
94
96
|
});
|
|
@@ -230,6 +232,108 @@ function rerunBatch(file) {
|
|
|
230
232
|
const target = file === "-" ? "the batch" : file;
|
|
231
233
|
return `In ${target}, give each finding listed above "problems": [<id>, ...] with "linkReason": "<why>", or "new": true if none of these is the same problem. Then run emit findings again: the findings already stored are updated in place.`;
|
|
232
234
|
}
|
|
235
|
+
var CODE_EXCERPT_CONTEXT_LINES = 3;
|
|
236
|
+
function checkoutHeadSha(cwd) {
|
|
237
|
+
try {
|
|
238
|
+
const out = execFileSync("git", ["rev-parse", "HEAD"], { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: 1e4 });
|
|
239
|
+
const sha = out.trim();
|
|
240
|
+
return /^[0-9a-f]{40,64}$/.test(sha) ? sha : void 0;
|
|
241
|
+
} catch {
|
|
242
|
+
return void 0;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function codeExcerptFor(repoRoot, path, line, sha) {
|
|
246
|
+
const absolute = resolve(repoRoot, path);
|
|
247
|
+
const inside = relative(repoRoot, absolute);
|
|
248
|
+
if (inside.startsWith("..") || isAbsolute(inside)) return void 0;
|
|
249
|
+
let text;
|
|
250
|
+
try {
|
|
251
|
+
text = readFileSync(absolute, "utf8");
|
|
252
|
+
} catch {
|
|
253
|
+
return void 0;
|
|
254
|
+
}
|
|
255
|
+
const lines = text.split("\n");
|
|
256
|
+
if (lines[lines.length - 1] === "") lines.pop();
|
|
257
|
+
if (line > lines.length) return void 0;
|
|
258
|
+
let startLine = Math.max(1, line - CODE_EXCERPT_CONTEXT_LINES);
|
|
259
|
+
const kept = lines.slice(startLine - 1, line + CODE_EXCERPT_CONTEXT_LINES);
|
|
260
|
+
let excerpt = scrubText(kept.join("\n"));
|
|
261
|
+
while (excerpt.length > FINDING_CODE_EXCERPT_MAX_LENGTH && kept.length > 1) {
|
|
262
|
+
if (startLine + kept.length - 1 > line) kept.pop();
|
|
263
|
+
else {
|
|
264
|
+
kept.shift();
|
|
265
|
+
startLine += 1;
|
|
266
|
+
}
|
|
267
|
+
excerpt = scrubText(kept.join("\n"));
|
|
268
|
+
}
|
|
269
|
+
if (excerpt.length > FINDING_CODE_EXCERPT_MAX_LENGTH) excerpt = `${excerpt.slice(0, FINDING_CODE_EXCERPT_MAX_LENGTH - 1)}\u2026`;
|
|
270
|
+
if (excerpt.trim() === "") return void 0;
|
|
271
|
+
return { path, startLine, text: excerpt, ...sha !== void 0 ? { sha } : {} };
|
|
272
|
+
}
|
|
273
|
+
var ELISION = "\n\u2026\n";
|
|
274
|
+
function fit(text, max) {
|
|
275
|
+
if (text.length <= max) return text;
|
|
276
|
+
const head = Math.floor((max - ELISION.length) / 3);
|
|
277
|
+
const tail = max - ELISION.length - head;
|
|
278
|
+
return `${text.slice(0, head)}${ELISION}${text.slice(text.length - tail)}`;
|
|
279
|
+
}
|
|
280
|
+
function transcriptExcerptFor(events, startId) {
|
|
281
|
+
if (events === void 0) return void 0;
|
|
282
|
+
const index = events.findIndex((event) => event.id === startId);
|
|
283
|
+
if (index === -1) return void 0;
|
|
284
|
+
const start = events[index];
|
|
285
|
+
const prefix = start.id.includes(":") ? start.id.slice(0, start.id.indexOf(":")) : void 0;
|
|
286
|
+
const call = start.isResult ? events.slice(0, index).reverse().find((event) => (event.id.includes(":") ? event.id.slice(0, event.id.indexOf(":")) : void 0) === prefix) : void 0;
|
|
287
|
+
const parts = [call !== void 0 && !call.isResult ? call.body : void 0, start.body].filter(
|
|
288
|
+
(part) => part !== void 0 && part.trim() !== ""
|
|
289
|
+
);
|
|
290
|
+
if (parts.length === 0) return void 0;
|
|
291
|
+
return fit(scrubText(parts.join("\n\n")), FINDING_TRANSCRIPT_EXCERPT_MAX_LENGTH);
|
|
292
|
+
}
|
|
293
|
+
function positiveInt(value) {
|
|
294
|
+
return Number.isSafeInteger(value) && value >= 1 ? value : void 0;
|
|
295
|
+
}
|
|
296
|
+
function withCapturedContext(finding, opts) {
|
|
297
|
+
const out = { ...finding };
|
|
298
|
+
if (out.codeExcerpt === void 0 && opts.repoRoot !== void 0) {
|
|
299
|
+
const rule = typeof out.rule === "object" && out.rule !== null ? out.rule : {};
|
|
300
|
+
const fileLine = positiveInt(out.line);
|
|
301
|
+
const ruleLine = positiveInt(rule.line);
|
|
302
|
+
const target = typeof out.file === "string" && fileLine !== void 0 ? { path: out.file, line: fileLine } : typeof rule.path === "string" && ruleLine !== void 0 ? { path: rule.path, line: ruleLine } : void 0;
|
|
303
|
+
const excerpt = target !== void 0 ? codeExcerptFor(opts.repoRoot, target.path, target.line, opts.sha) : void 0;
|
|
304
|
+
if (excerpt !== void 0) out.codeExcerpt = excerpt;
|
|
305
|
+
}
|
|
306
|
+
const started = out.startedAt;
|
|
307
|
+
if (out.transcriptExcerpt === void 0 && typeof started?.id === "string") {
|
|
308
|
+
const excerpt = transcriptExcerptFor(opts.events, started.id);
|
|
309
|
+
if (excerpt !== void 0) out.transcriptExcerpt = excerpt;
|
|
310
|
+
}
|
|
311
|
+
return out;
|
|
312
|
+
}
|
|
313
|
+
var FLAG_OF = {
|
|
314
|
+
detail: "--detail",
|
|
315
|
+
cause: "--cause",
|
|
316
|
+
command: "--command",
|
|
317
|
+
error: "--error",
|
|
318
|
+
test: "--test",
|
|
319
|
+
symbol: "--symbol",
|
|
320
|
+
line: "--line",
|
|
321
|
+
"rule.line": "--rule-line"
|
|
322
|
+
};
|
|
323
|
+
function incompleteFindingsMessage(findings, opts) {
|
|
324
|
+
const lines = [];
|
|
325
|
+
findings.forEach((finding, index) => {
|
|
326
|
+
for (const gap of findingGaps(finding)) {
|
|
327
|
+
const name = opts.flags ? FLAG_OF[gap.field] : `findings.${index}.${gap.field}`;
|
|
328
|
+
lines.push(` ${name}: ${gap.reason}`);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
if (lines.length === 0) return void 0;
|
|
332
|
+
const subject = opts.flags ? "this finding" : "the batch";
|
|
333
|
+
return `nothing was stored: ${subject} needs more context for a reader who was not in this session.
|
|
334
|
+
${lines.join("\n")}
|
|
335
|
+
Add each field and run the same command again.`;
|
|
336
|
+
}
|
|
233
337
|
|
|
234
338
|
// src/emit-finding-cmd.ts
|
|
235
339
|
var EmitFindingError = class extends Error {
|
|
@@ -483,16 +587,24 @@ async function runEmitFinding(opts) {
|
|
|
483
587
|
if (timed.needsStart !== void 0) {
|
|
484
588
|
throw new EmitFindingError(formatNeedsStart({ recent: newestEvents(timed.needsStart), errorGiven: opts.error !== void 0 }));
|
|
485
589
|
}
|
|
590
|
+
const headSha = opts.headSha ?? checkoutHeadSha(cwd);
|
|
591
|
+
const captured = withCapturedContext(timed.finding, {
|
|
592
|
+
repoRoot: resolveRepoIdentity(cwd).repoRoot ?? cwd,
|
|
593
|
+
sha: headSha,
|
|
594
|
+
events: sessionId !== void 0 ? loadEvents(sessionId) : void 0
|
|
595
|
+
});
|
|
486
596
|
const rawBatch = {
|
|
487
597
|
schemaVersion: 3,
|
|
488
|
-
|
|
598
|
+
headSha,
|
|
489
599
|
...contextSourceSha !== void 0 ? { contextSourceSha } : {},
|
|
490
|
-
findings: [
|
|
600
|
+
findings: [captured]
|
|
491
601
|
};
|
|
492
602
|
const parsed = FindingBatchSchema.safeParse(rawBatch);
|
|
493
603
|
if (!parsed.success) {
|
|
494
604
|
throw new EmitFindingError(`invalid finding \u2014 ${firstIssueMessage(parsed)}`);
|
|
495
605
|
}
|
|
606
|
+
const incomplete = incompleteFindingsMessage(parsed.data.findings, { flags: true });
|
|
607
|
+
if (incomplete !== void 0) throw new EmitFindingError(incomplete);
|
|
496
608
|
const target = resolveUploadTarget({ item: opts.item, sessionId, home });
|
|
497
609
|
return upload(parsed.data, target, {
|
|
498
610
|
json: opts.json,
|
|
@@ -539,6 +651,8 @@ async function runEmitFindings(opts) {
|
|
|
539
651
|
let timed = [];
|
|
540
652
|
if (Array.isArray(raw?.findings)) {
|
|
541
653
|
const batch = raw;
|
|
654
|
+
const headSha = typeof batch.headSha === "string" ? batch.headSha : checkoutHeadSha(cwd);
|
|
655
|
+
const repoRoot = resolveRepoIdentity(cwd).repoRoot ?? cwd;
|
|
542
656
|
const loadEvents = eventLoader(home);
|
|
543
657
|
const flags = { startFlag: "startedAt", endFlag: "endedAt", untimedFlag: '"untimed"' };
|
|
544
658
|
const entries = batch.findings.map(
|
|
@@ -549,12 +663,21 @@ async function runEmitFindings(opts) {
|
|
|
549
663
|
if (missing.length > 0) {
|
|
550
664
|
throw new EmitFindingError(formatBatchNeedsStart(missing.map((t) => String(t.finding.id)), newestEvents(missing[0].needsStart)));
|
|
551
665
|
}
|
|
552
|
-
|
|
666
|
+
const events = sessionId !== void 0 ? loadEvents(sessionId) : void 0;
|
|
667
|
+
raw = {
|
|
668
|
+
...batch,
|
|
669
|
+
...headSha !== void 0 ? { headSha } : {},
|
|
670
|
+
findings: entries.map(
|
|
671
|
+
(entry) => timed.includes(entry) ? withCapturedContext(entry.finding, { repoRoot, sha: headSha, events }) : entry
|
|
672
|
+
)
|
|
673
|
+
};
|
|
553
674
|
}
|
|
554
675
|
const parsed = FindingBatchSchema.safeParse(raw);
|
|
555
676
|
if (!parsed.success) {
|
|
556
677
|
throw new EmitFindingError(`invalid finding batch \u2014 ${firstIssueMessage(parsed)}`);
|
|
557
678
|
}
|
|
679
|
+
const incomplete = incompleteFindingsMessage(parsed.data.findings, { flags: false });
|
|
680
|
+
if (incomplete !== void 0) throw new EmitFindingError(incomplete);
|
|
558
681
|
const target = resolveUploadTarget({ item: opts.item, sessionId, home });
|
|
559
682
|
return upload(parsed.data, target, {
|
|
560
683
|
json: opts.json,
|
|
@@ -3,7 +3,7 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
4
4
|
import { readCloudConfig } from './chunk-HWVMRETT.js';
|
|
5
5
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
6
|
-
import { legacyAgent, laptopAgents, defaultAgents, McpFileError } from './chunk-
|
|
6
|
+
import { legacyAgent, laptopAgents, defaultAgents, McpFileError } from './chunk-G2CRPYFO.js';
|
|
7
7
|
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
8
8
|
import { join, dirname } from 'path';
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_DIGEST } from './chunk-
|
|
3
|
+
import { UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_DIGEST } from './chunk-CKA4JQKR.js';
|
|
4
4
|
import { existsSync, readdirSync, readFileSync, lstatSync, realpathSync, writeFileSync } from 'fs';
|
|
5
5
|
import { join, resolve, relative, dirname, sep, basename } from 'path';
|
|
6
6
|
import { createRequire as createRequire$1 } from 'module';
|