@outerlayer/cli 0.38.0-next.20261109235338 → 0.38.0-next.20261110130701
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 +9 -2
- package/dist/agent-setup-GZBGCV3K.js +40 -0
- package/dist/{agent-subcommand-JC5JXZ3X.js → agent-subcommand-5PNHUNZZ.js} +4 -4
- package/dist/{artifact-link-cmd-RUGAK5EX.js → artifact-link-cmd-XOFZP7U5.js} +2 -2
- package/dist/{bridge-TYO2YB2X.js → bridge-RNM7OWRW.js} +7 -7
- package/dist/{build-QUCL3HFM.js → build-VKO7IVOQ.js} +13 -13
- package/dist/{build-disk-3JUHPJEQ.js → build-disk-M2JYJF6R.js} +11 -11
- package/dist/build-info.json +1 -1
- package/dist/{builder-PADLK3VJ.js → builder-HMHJ6U7C.js} +10 -10
- package/dist/caller-U26SATTV.js +23 -0
- package/dist/{check-DBYJIP44.js → check-SJCTNS7N.js} +56 -56
- package/dist/{chunk-IXC5EISR.js → chunk-2TXYQANG.js} +1 -1
- package/dist/{chunk-HT4OKJDB.js → chunk-2WNJ2MHD.js} +1 -1
- package/dist/{chunk-4NRIC2G5.js → chunk-3DY4DQOC.js} +4 -4
- package/dist/{chunk-553QW3PJ.js → chunk-3GTAPQBG.js} +2 -2
- package/dist/{chunk-F3NW5TBW.js → chunk-3HJK7WTM.js} +6 -6
- package/dist/{chunk-KGHVJI7V.js → chunk-3W5JLANR.js} +3 -3
- package/dist/{chunk-X3CGWGAG.js → chunk-47JRSV6Y.js} +1 -1
- package/dist/{chunk-QA3U3MJZ.js → chunk-4EJHQYVI.js} +152 -34
- package/dist/{chunk-WISVAUTD.js → chunk-5QDHJT73.js} +4 -4
- package/dist/{chunk-DPBFNZ6H.js → chunk-5QFFQCSY.js} +1 -1
- package/dist/{chunk-P43BSQGV.js → chunk-6RQP5GP5.js} +2 -2
- package/dist/{chunk-RN5VLKZ2.js → chunk-6XMC6R4W.js} +1 -1
- package/dist/{chunk-Y67NEZMW.js → chunk-6XROZIV6.js} +6 -6
- package/dist/{chunk-LJPYKCIP.js → chunk-72LXVD4O.js} +4 -4
- package/dist/{chunk-4A4TMFGV.js → chunk-735C5J6Q.js} +5 -5
- package/dist/{chunk-PCY626FL.js → chunk-7E55P2NR.js} +1 -1
- package/dist/{chunk-O7IJBJ6Z.js → chunk-AC6DM3S3.js} +1 -1
- package/dist/{chunk-2TA2Z5IJ.js → chunk-ALCZ2SEW.js} +5 -5
- package/dist/{chunk-SKKKPLOC.js → chunk-AS4NMHJM.js} +3 -3
- package/dist/{chunk-OQHHPJNK.js → chunk-ATQHPT3B.js} +1 -1
- package/dist/{chunk-QZP3O6IM.js → chunk-B4U5XI4F.js} +69 -9
- package/dist/{chunk-2DVQHK37.js → chunk-B5Z4VA4Q.js} +1 -1
- package/dist/{chunk-XMVASSUZ.js → chunk-BCQFMAGM.js} +3 -3
- package/dist/{chunk-EYFIWJFI.js → chunk-BTH6HTE5.js} +5 -5
- package/dist/{chunk-HWHJDQLC.js → chunk-C574RHGN.js} +3 -3
- package/dist/{chunk-KHC7ICRR.js → chunk-CXXQQST7.js} +9 -9
- package/dist/{chunk-52IVBUIU.js → chunk-DKDBMMX7.js} +6 -6
- package/dist/{chunk-XLUQC2PE.js → chunk-EHPKACA7.js} +1 -1
- package/dist/{chunk-JLCEQXQF.js → chunk-ENHD5PNW.js} +1 -1
- package/dist/{chunk-5J4WME44.js → chunk-F2ADK2KB.js} +5 -5
- package/dist/{chunk-AZRZBG45.js → chunk-FGBBGUM4.js} +4 -4
- package/dist/{chunk-HE53NIRE.js → chunk-FXVHF6RX.js} +54 -4
- package/dist/{chunk-W37QA6WG.js → chunk-GJMLLXZJ.js} +1 -1
- package/dist/{chunk-IJWQT2Y7.js → chunk-HDEYRLWK.js} +1 -1
- package/dist/{chunk-A237UPRS.js → chunk-HJK2KI3Q.js} +16 -16
- package/dist/{chunk-G2J574LS.js → chunk-I2N427GS.js} +8 -8
- package/dist/{chunk-GH5Y3R5R.js → chunk-IGO766M6.js} +4 -4
- package/dist/{chunk-XPXJWIOJ.js → chunk-ITOIM3WV.js} +1 -1
- package/dist/{chunk-MGOEHY72.js → chunk-IVB6A3I7.js} +7 -7
- package/dist/{chunk-7HN6T4MY.js → chunk-L32O52SH.js} +1 -1
- package/dist/{chunk-DE5QLWJK.js → chunk-L6CZTRNW.js} +1 -1
- package/dist/{chunk-N2QYP3NQ.js → chunk-MBPBYMHU.js} +565 -16
- package/dist/{chunk-TYLZR7HX.js → chunk-MSARYPFD.js} +2 -2
- package/dist/{chunk-3Q2SEOT3.js → chunk-MT4XF5OL.js} +2 -2
- package/dist/{chunk-UU6FN6PZ.js → chunk-NE7EG3SN.js} +4 -4
- package/dist/{chunk-PE5J46EE.js → chunk-OEWSICWM.js} +8 -8
- package/dist/{chunk-26NMJGEY.js → chunk-OI4ZV7MJ.js} +1 -1
- package/dist/{chunk-IJ4DF5QS.js → chunk-OK4RSIB2.js} +1 -1
- package/dist/{chunk-ZZ4AX25R.js → chunk-OWEJP5HJ.js} +1 -1
- package/dist/{chunk-NL2MMRJI.js → chunk-PA6FKP5B.js} +6 -6
- package/dist/{chunk-ZRTGX4GN.js → chunk-QFQ2UNZU.js} +6 -6
- package/dist/{chunk-SOLQ3JA6.js → chunk-QGUCHNSQ.js} +66 -11
- package/dist/{chunk-NAU7U44X.js → chunk-QNHBJU74.js} +7 -7
- package/dist/{chunk-7NP5G2FV.js → chunk-RBLXGO5K.js} +2 -2
- package/dist/{chunk-F4XMG7EO.js → chunk-SBPMDO47.js} +1 -1
- package/dist/{chunk-Y2M2NZX4.js → chunk-SKGUS2CB.js} +10 -10
- package/dist/{chunk-5AU2GQGH.js → chunk-TD6DN5LU.js} +3 -3
- package/dist/{chunk-BAWOWJ3G.js → chunk-TUEEGFAQ.js} +10 -10
- package/dist/{chunk-FLIRUHVT.js → chunk-TUSIYONR.js} +1 -1
- package/dist/{chunk-HITUWIB7.js → chunk-TW2V2IQ4.js} +1 -1
- package/dist/{chunk-ZUIHEOSC.js → chunk-UCUBQWJC.js} +1 -1
- package/dist/{chunk-DQLHVV62.js → chunk-UUSSRXUJ.js} +3 -3
- package/dist/{chunk-6ZMFEZ2K.js → chunk-VRWZNI6U.js} +1 -1
- package/dist/{chunk-ZIOMM4LL.js → chunk-VU5PPWIQ.js} +7 -7
- package/dist/{chunk-2BMH3373.js → chunk-WH2QUYXH.js} +2 -2
- package/dist/{chunk-2YOFSE7U.js → chunk-WVMKXDOW.js} +30 -30
- package/dist/{chunk-WE4CWGNR.js → chunk-XAR2CJFV.js} +7 -7
- package/dist/{chunk-XDHMRHMC.js → chunk-XCTE5S2C.js} +1 -1
- package/dist/{chunk-6L55K352.js → chunk-XFODM3V7.js} +7 -7
- package/dist/{chunk-IPB5UOHH.js → chunk-XFU37HIM.js} +3 -3
- package/dist/{chunk-C7YFAPMY.js → chunk-YO2NPS66.js} +1 -1
- package/dist/chunk-YOAJLD2D.js +270 -0
- package/dist/{chunk-3QTC4UWC.js → chunk-YZQYTOCR.js} +1 -1
- package/dist/{claude-launcher-UYCMHZOU.js → claude-launcher-WMIUTAXY.js} +7 -7
- package/dist/{cli-KEVUJ6PY.js → cli-R5SJT3YL.js} +186 -156
- package/dist/{command-DNGERCQW.js → command-LWMX6I7W.js} +51 -51
- package/dist/{config-M66C2AGN.js → config-ZRGYLVDX.js} +12 -12
- package/dist/{connect-cmd-JBM5ODV3.js → connect-cmd-MZXTWM4R.js} +13 -13
- package/dist/{container-start-4NKXX3MA.js → container-start-VQR5ERZE.js} +49 -49
- package/dist/{context-cleanup-UE5HQRHP.js → context-cleanup-Z3HZZZXW.js} +4 -4
- package/dist/{context-show-cmd-HX5LND6O.js → context-show-cmd-SCOVPVDM.js} +14 -14
- package/dist/{control-plane-launch-XEMMZ7VZ.js → control-plane-launch-MWZHJ4G5.js} +14 -14
- package/dist/{demo-record-cmd-PI4PFFEO.js → demo-record-cmd-4RVSWVMK.js} +8 -8
- package/dist/{demo-voice-cmd-3GASMSCU.js → demo-voice-cmd-PGM5JPCQ.js} +20 -20
- package/dist/{dist-OMJJT636.js → dist-XEPPXF4M.js} +2 -2
- package/dist/{docker-KWHEDC6K.js → docker-25F2KOBJ.js} +10 -10
- package/dist/{doctor-GPATU5TY.js → doctor-3QJLCHQY.js} +51 -51
- package/dist/{emit-artifact-cmd-OH7PNHZF.js → emit-artifact-cmd-Z4SHPKFT.js} +19 -19
- package/dist/{emit-cmd-RPICQ5H2.js → emit-cmd-NHMZ4M5S.js} +7 -7
- package/dist/{emit-criteria-cmd-JW2GS2SO.js → emit-criteria-cmd-HCN3DOJM.js} +16 -16
- package/dist/{emit-demo-cmd-5W6H6AI4.js → emit-demo-cmd-NOSQTOES.js} +20 -20
- package/dist/{emit-finding-cmd-PSCJFCBZ.js → emit-finding-cmd-YXR3ZVCJ.js} +16 -16
- package/dist/{emit-result-cmd-VJZDDWD3.js → emit-result-cmd-Z7MBE37R.js} +18 -18
- package/dist/{emit-step-cmd-ER65MOU6.js → emit-step-cmd-JOSYDSEO.js} +16 -16
- package/dist/{exec-client-PHJ4YGYG.js → exec-client-SZRXXKJ5.js} +8 -8
- package/dist/find-unit-3RHC4375.js +24 -0
- package/dist/{findings-cmd-BN6LO7LI.js → findings-cmd-NGFY25WZ.js} +16 -16
- package/dist/{fleet-readiness-FHVT7ZXE.js → fleet-readiness-NWIVQQ4P.js} +14 -14
- package/dist/governing-source-DNWVPRXP.js +41 -0
- package/dist/{guest-init-IREU7IIE.js → guest-init-T7QJW2AJ.js} +9 -9
- package/dist/{hook-fast-OFCB6O5N.js → hook-fast-ECQBMESE.js} +1 -1
- package/dist/{hook-install-3SSLJYA3.js → hook-install-MBMG3G6B.js} +4 -4
- package/dist/host-checks-EHSA6FLE.js +80 -0
- package/dist/host-key-6SMJUTJ2.js +18 -0
- package/dist/{image-tag-MYCA26HL.js → image-tag-OCVY4W5D.js} +8 -8
- package/dist/index.js +4 -4
- package/dist/{init-RUY6NPTN.js → init-ETG7XYFQ.js} +47 -47
- package/dist/init-F7NB7GBW.js +80 -0
- package/dist/{init-agent-Z6PF22UT.js → init-agent-WEYGBAII.js} +47 -47
- package/dist/{init-cmd-3M4QENFU.js → init-cmd-KGM7TN6Z.js} +27 -27
- package/dist/{init-update-V4AWGCUH.js → init-update-EUJ4264S.js} +24 -24
- package/dist/{install-cmd-UJO2EMXF.js → install-cmd-HWG6LJX5.js} +10 -10
- package/dist/{layout-VZ3MERWV.js → layout-CGE4KWGO.js} +4 -4
- package/dist/{login-browser-ZEOXKIQ2.js → login-browser-G7WNR74C.js} +2 -2
- package/dist/{logs-SQJ5BKAP.js → logs-TKWJ4S4W.js} +7 -7
- package/dist/loop-K3QREUHK.js +90 -0
- package/dist/machine-5GTYN2LP.js +80 -0
- package/dist/{machine-skills-SAD5OWIH.js → machine-skills-CXA57QHE.js} +4 -4
- package/dist/{mcp-install-cmd-7KKOGEFA.js → mcp-install-cmd-6IGK65DV.js} +4 -4
- package/dist/{mcp-serve-cmd-EKANKY4W.js → mcp-serve-cmd-DVE5XP2U.js} +9 -9
- package/dist/{paths-LYF7UNWL.js → paths-VOWYUJLZ.js} +7 -7
- package/dist/pending-35ML3JE5.js +18 -0
- package/dist/{pidfile-EYAULWL2.js → pidfile-MFP6B2KV.js} +8 -8
- package/dist/{record-CHYO34BN.js → record-AWCJ3LTG.js} +8 -8
- package/dist/{relay-J3OROVNN.js → relay-YVZM5M6B.js} +5 -5
- package/dist/{relay-protocol-UI7QUDOZ.js → relay-protocol-MNWITORT.js} +5 -5
- package/dist/{run-cmd-PIMQNBAX.js → run-cmd-MBH5Z2UL.js} +16 -16
- package/dist/{runner-agents-KSP3MLAH.js → runner-agents-L3PLYFWJ.js} +4 -4
- package/dist/runner-env-IHWYZ3B6.js +24 -0
- package/dist/{runner-identity-WZAKGBRX.js → runner-identity-E2XKIJNB.js} +10 -10
- package/dist/{runner-key-HGHQYJJX.js → runner-key-3AHJX75Z.js} +47 -47
- package/dist/{session-sender-W6MTYKLE.js → session-sender-IS6S7PBC.js} +19 -19
- package/dist/{spec-cmd-RJVMWOOX.js → spec-cmd-ZLDYL4N5.js} +17 -17
- package/dist/{starter-pack-52PX6IPU.js → starter-pack-XINCCMDN.js} +5 -5
- package/dist/state-NIA6XT7D.js +18 -0
- package/dist/{status-YQ25OCUL.js → status-GZ7KAIMH.js} +47 -47
- package/dist/{sync-cmd-2NBSELL7.js → sync-cmd-3YZ4IB3T.js} +18 -18
- package/dist/update-steps-XY46I7FV.js +81 -0
- package/dist/{watch-WQGK2SQB.js → watch-LIIODJ5U.js} +18 -18
- package/dist/{work-claim-cmd-CQ3DSJBR.js → work-claim-cmd-GWBWIZ43.js} +23 -23
- package/dist/work-cmd-CJWTGOU5.js +33 -0
- package/dist/work-comment-cmd-RFVCNEET.js +39 -0
- package/dist/{work-demo-cmd-BOKSQSA5.js → work-demo-cmd-Q2GKJCVL.js} +16 -16
- package/dist/{work-logs-cmd-TZXDF3UI.js → work-logs-cmd-KZQBPU2J.js} +16 -16
- package/dist/{work-needs-attention-cmd-WR5GR3B6.js → work-needs-attention-cmd-L3DOYAMK.js} +16 -16
- package/dist/{work-no-change-cmd-TKC3V64O.js → work-no-change-cmd-SHP25CJB.js} +16 -16
- package/dist/{work-open-pr-cmd-T2IFI7OR.js → work-open-pr-cmd-VATPLVSL.js} +17 -17
- package/dist/{work-pr-cmd-WM6PGSGK.js → work-pr-cmd-XBLNONT3.js} +16 -16
- package/dist/{work-proofs-cmd-E4VJP55B.js → work-proofs-cmd-T5WZG3CX.js} +18 -18
- package/dist/{work-proofs-record-MIVUWECF.js → work-proofs-record-6YF4BS3K.js} +24 -24
- package/dist/{work-stop-cmd-52WGVYF5.js → work-stop-cmd-BLOSL24H.js} +16 -16
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-amend/SKILL.md +1 -0
- package/skill-pack/maintained/outerlayer-amend/references/attachments.md +23 -0
- package/skill-pack/maintained/outerlayer-build/SKILL.md +5 -0
- package/skill-pack/maintained/outerlayer-cli/SKILL.md +9 -0
- package/dist/agent-setup-F4KAKOQE.js +0 -40
- package/dist/caller-LYH64TZB.js +0 -23
- package/dist/chunk-SWXAP4GM.js +0 -128
- package/dist/find-unit-D7MX5YW7.js +0 -24
- package/dist/governing-source-6WWMRJEI.js +0 -41
- package/dist/host-checks-KYLKXG2A.js +0 -80
- package/dist/host-key-4764FB4U.js +0 -18
- package/dist/init-EPBASJNK.js +0 -80
- package/dist/loop-VUNIGNXU.js +0 -90
- package/dist/machine-2KFSAU27.js +0 -80
- package/dist/pending-3FQ3GG6T.js +0 -18
- package/dist/runner-env-AMGOE3UI.js +0 -24
- package/dist/state-UIV37NXY.js +0 -18
- package/dist/update-steps-FH7UXI5N.js +0 -81
- package/dist/work-cmd-B32BDBV2.js +0 -33
- package/dist/work-comment-cmd-L5FTPUGE.js +0 -38
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { scrubReason, stripTerminalControls } from './chunk-
|
|
4
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
5
|
-
import { RunnerAlreadyRunningError, readPidFile } from './chunk-
|
|
3
|
+
import { scrubReason, stripTerminalControls } from './chunk-WVMKXDOW.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-DKDBMMX7.js';
|
|
5
|
+
import { RunnerAlreadyRunningError, readPidFile } from './chunk-OI4ZV7MJ.js';
|
|
6
6
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
7
|
-
import { isSignatureRefusal, postJson } from './chunk-
|
|
8
|
-
import { keyRunnerFactory } from './chunk-
|
|
9
|
-
import { signerFor } from './chunk-
|
|
10
|
-
import { pidFilePath } from './chunk-
|
|
7
|
+
import { isSignatureRefusal, postJson } from './chunk-B4U5XI4F.js';
|
|
8
|
+
import { keyRunnerFactory } from './chunk-5QDHJT73.js';
|
|
9
|
+
import { signerFor } from './chunk-ENHD5PNW.js';
|
|
10
|
+
import { pidFilePath } from './chunk-AC6DM3S3.js';
|
|
11
11
|
import { readFileSync } from 'fs';
|
|
12
12
|
|
|
13
13
|
createRequire(import.meta.url);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-
|
|
4
|
-
import { resolveGatewayCredentials } from './chunk-
|
|
3
|
+
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-QFQ2UNZU.js';
|
|
4
|
+
import { resolveGatewayCredentials } from './chunk-VRWZNI6U.js';
|
|
5
5
|
import { readCloudConfig } from './chunk-HWVMRETT.js';
|
|
6
6
|
import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
7
7
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
8
8
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
9
|
-
import { resolveRepoIdentity } from './chunk-
|
|
9
|
+
import { resolveRepoIdentity } from './chunk-MBPBYMHU.js';
|
|
10
10
|
|
|
11
11
|
createRequire(import.meta.url);
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { normalizePath, CONTEXT_PIN_FILENAME, laptopAgents, defaultAgents, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, contextAgents, legacyAgent, legacySubcommand } from './chunk-
|
|
3
|
+
import { normalizePath, CONTEXT_PIN_FILENAME, laptopAgents, defaultAgents, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, contextAgents, legacyAgent, legacySubcommand } from './chunk-MT4XF5OL.js';
|
|
4
4
|
import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
5
5
|
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, lstatSync, readlinkSync, symlinkSync, rmdirSync } from 'fs';
|
|
6
6
|
import { relative, sep, join, posix } from 'path';
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { resolveCredentials, postBytes, RateLimitedError, postJson, getJson, getBytes } from './chunk-B4U5XI4F.js';
|
|
4
|
+
import { detectActiveSession } from './chunk-SBPMDO47.js';
|
|
5
|
+
import { sanitizeTerminal } from './chunk-B5Z4VA4Q.js';
|
|
6
|
+
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
|
+
import { defaultFetch } from './chunk-VRWZNI6U.js';
|
|
8
|
+
import { logHookError } from './chunk-QGUCHNSQ.js';
|
|
9
|
+
import { parseWorkItemEnv } from './chunk-LGJ56FCM.js';
|
|
10
|
+
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
|
+
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
12
|
+
import { resolveRepoIdentity } from './chunk-MBPBYMHU.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-FXVHF6RX.js';
|
|
14
|
+
import { randomUUID, createHash } from 'crypto';
|
|
15
|
+
import { mkdirSync, statSync, readFileSync, writeFileSync } from 'fs';
|
|
16
|
+
import { resolve, extname, basename, join } from 'path';
|
|
17
|
+
|
|
18
|
+
createRequire(import.meta.url);
|
|
19
|
+
var WorkCommentCommandError = class extends Error {
|
|
20
|
+
};
|
|
21
|
+
function resolveAction(opts) {
|
|
22
|
+
const set = ["pass", "fail", "attach", "ready"].filter((flag) => opts[flag] === true);
|
|
23
|
+
if (set.length > 1) {
|
|
24
|
+
throw new WorkCommentCommandError(`only one of --${set.join(", --")} may be given \u2014 a comment carries at most one action`);
|
|
25
|
+
}
|
|
26
|
+
return set[0];
|
|
27
|
+
}
|
|
28
|
+
var MEDIA_TYPE_BY_EXTENSION = {
|
|
29
|
+
".png": "image/png",
|
|
30
|
+
".jpg": "image/jpeg",
|
|
31
|
+
".jpeg": "image/jpeg",
|
|
32
|
+
".gif": "image/gif",
|
|
33
|
+
".webp": "image/webp",
|
|
34
|
+
".mp4": "video/mp4",
|
|
35
|
+
".webm": "video/webm",
|
|
36
|
+
".pdf": "application/pdf",
|
|
37
|
+
".txt": "text/plain",
|
|
38
|
+
".log": "text/plain",
|
|
39
|
+
".csv": "text/csv",
|
|
40
|
+
".md": "text/markdown",
|
|
41
|
+
".json": "application/json",
|
|
42
|
+
".ndjson": "application/x-ndjson",
|
|
43
|
+
".jsonl": "application/x-ndjson",
|
|
44
|
+
".zip": "application/zip",
|
|
45
|
+
".gz": "application/gzip",
|
|
46
|
+
".tgz": "application/gzip"
|
|
47
|
+
};
|
|
48
|
+
function readFilesToUpload(paths, cwd) {
|
|
49
|
+
if (paths.length > WORK_ITEM_ATTACHMENTS_MAX_PER_COMMENT) {
|
|
50
|
+
throw new WorkCommentCommandError(`a comment takes at most ${WORK_ITEM_ATTACHMENTS_MAX_PER_COMMENT} files; ${paths.length} were given`);
|
|
51
|
+
}
|
|
52
|
+
let total = 0;
|
|
53
|
+
return paths.map((given) => {
|
|
54
|
+
const path = resolve(cwd, given);
|
|
55
|
+
const mediaType = MEDIA_TYPE_BY_EXTENSION[extname(path).toLowerCase()];
|
|
56
|
+
if (mediaType === void 0 || attachmentKind(mediaType) === null) {
|
|
57
|
+
throw new WorkCommentCommandError(`${basename(path)} was not added: this file type is not allowed. Allowed: ${Object.keys(MEDIA_TYPE_BY_EXTENSION).join(" ")}`);
|
|
58
|
+
}
|
|
59
|
+
let size;
|
|
60
|
+
try {
|
|
61
|
+
size = statSync(path).size;
|
|
62
|
+
} catch {
|
|
63
|
+
throw new WorkCommentCommandError(`${basename(path)} was not added: the file cannot be read`);
|
|
64
|
+
}
|
|
65
|
+
if (size > WORK_ITEM_ATTACHMENT_MAX_BYTES) {
|
|
66
|
+
throw new WorkCommentCommandError(`${basename(path)} was not added: it is larger than 8 MiB`);
|
|
67
|
+
}
|
|
68
|
+
total += size;
|
|
69
|
+
if (total > WORK_ITEM_ATTACHMENTS_MAX_TOTAL_BYTES) {
|
|
70
|
+
throw new WorkCommentCommandError(`the files together are larger than 10 MiB; ${basename(path)} was not added`);
|
|
71
|
+
}
|
|
72
|
+
const bytes = readFileSync(path);
|
|
73
|
+
return { path, filename: cleanAttachmentFilename(basename(path)), mediaType, bytes, sha256: createHash("sha256").update(bytes).digest("hex") };
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function rateLimitedError(err) {
|
|
77
|
+
const wait = err.retryAfterSeconds === void 0 ? "Wait, then run the command again." : `Wait ${err.retryAfterSeconds} seconds, then run the command again.`;
|
|
78
|
+
return new WorkCommentCommandError(`rate_limited: ${err.message}. ${wait}`);
|
|
79
|
+
}
|
|
80
|
+
async function runWorkComment(opts) {
|
|
81
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
82
|
+
const home = opts.home ?? homeFromEnv();
|
|
83
|
+
const env = opts.env ?? process.env;
|
|
84
|
+
const now = opts.now ?? (() => /* @__PURE__ */ new Date());
|
|
85
|
+
const itemNumber = parseTrackerNumber(opts.item);
|
|
86
|
+
if (itemNumber === void 0) {
|
|
87
|
+
throw new WorkCommentCommandError(trackerNumberError("--item", opts.item ?? ""));
|
|
88
|
+
}
|
|
89
|
+
const action = resolveAction(opts);
|
|
90
|
+
if (opts.thread !== void 0 && (opts.criterion !== void 0 || action !== void 0)) {
|
|
91
|
+
throw new WorkCommentCommandError("--thread answers one thread and takes no --criterion and no action flag");
|
|
92
|
+
}
|
|
93
|
+
if (action === "attach" && !opts.artifact) {
|
|
94
|
+
throw new WorkCommentCommandError("--attach needs --artifact <id>, naming the artifact that becomes the criterion's proof");
|
|
95
|
+
}
|
|
96
|
+
if (action === "attach" && !opts.criterion) {
|
|
97
|
+
throw new WorkCommentCommandError("--attach needs --criterion <id> \u2014 it names which criterion the artifact becomes proof for");
|
|
98
|
+
}
|
|
99
|
+
const identity = resolveRepoIdentity(cwd);
|
|
100
|
+
const sessionId = opts.sessionId ?? detectActiveSession({
|
|
101
|
+
env,
|
|
102
|
+
home,
|
|
103
|
+
cwds: identity.repoRoot !== void 0 ? [identity.repoRoot, cwd] : [cwd],
|
|
104
|
+
nowMs: now().getTime()
|
|
105
|
+
});
|
|
106
|
+
const files = opts.files ?? [];
|
|
107
|
+
if (files.length > 0 && action === "attach") {
|
|
108
|
+
throw new WorkCommentCommandError("--attach names its proof with --artifact and takes no --file");
|
|
109
|
+
}
|
|
110
|
+
const uploads = readFilesToUpload(files, cwd);
|
|
111
|
+
const creds = resolveCredentials({ ...opts, cwd, home, env });
|
|
112
|
+
const fetchImpl = opts.fetchImpl ?? defaultFetch;
|
|
113
|
+
const clientCommentId = opts.clientCommentId ?? randomUUID();
|
|
114
|
+
const attachmentIds = [];
|
|
115
|
+
try {
|
|
116
|
+
for (const [index, upload] of uploads.entries()) {
|
|
117
|
+
const { data: stored } = await postBytes(
|
|
118
|
+
creds.url,
|
|
119
|
+
`/v1/work-items/${itemNumber}/attachments`,
|
|
120
|
+
creds.apiKey,
|
|
121
|
+
creds.appId,
|
|
122
|
+
upload.bytes,
|
|
123
|
+
{
|
|
124
|
+
"content-type": upload.mediaType,
|
|
125
|
+
[ATTACHMENT_FILENAME_HEADER]: encodeURIComponent(upload.filename),
|
|
126
|
+
[ATTACHMENT_SHA256_HEADER]: upload.sha256,
|
|
127
|
+
[ATTACHMENT_CLIENT_ID_HEADER]: `${clientCommentId}:${index}`
|
|
128
|
+
},
|
|
129
|
+
fetchImpl
|
|
130
|
+
);
|
|
131
|
+
attachmentIds.push(String(stored.id));
|
|
132
|
+
}
|
|
133
|
+
} catch (err) {
|
|
134
|
+
if (err instanceof RateLimitedError) throw rateLimitedError(err);
|
|
135
|
+
throw err;
|
|
136
|
+
}
|
|
137
|
+
const comment = {
|
|
138
|
+
clientCommentId,
|
|
139
|
+
body: opts.body ?? "",
|
|
140
|
+
...opts.criterion !== void 0 ? { criterion: opts.criterion } : {},
|
|
141
|
+
thread: opts.thread,
|
|
142
|
+
...action !== void 0 ? { action } : {},
|
|
143
|
+
...opts.artifact !== void 0 ? { artifact: opts.artifact } : {},
|
|
144
|
+
...sessionId !== void 0 ? { sessionId } : {},
|
|
145
|
+
...attachmentIds.length > 0 ? { attachments: attachmentIds } : {}
|
|
146
|
+
};
|
|
147
|
+
const { data } = await postJson(
|
|
148
|
+
creds.url,
|
|
149
|
+
`/v1/work-items/${itemNumber}/comments`,
|
|
150
|
+
creds.apiKey,
|
|
151
|
+
creds.appId,
|
|
152
|
+
{ schemaVersion: 1, comment },
|
|
153
|
+
fetchImpl
|
|
154
|
+
);
|
|
155
|
+
const thread = data.thread;
|
|
156
|
+
const waitingOn = thread?.waitingOn ?? null;
|
|
157
|
+
const criterionLabel = opts.thread ? `thread ${opts.thread}` : opts.criterion ? `criterion ${opts.criterion}` : "the general thread";
|
|
158
|
+
const output = opts.json ? JSON.stringify(data) : `${C.green}\u2713${C.reset} commented on ${criterionLabel} of item #${itemNumber} ${C.dim}\xB7${C.reset} waiting on ${waitingOn ?? "no one"}`;
|
|
159
|
+
if (!opts.quiet) process.stdout.write(output + "\n");
|
|
160
|
+
return { data, output };
|
|
161
|
+
}
|
|
162
|
+
async function runWorkThreads(opts) {
|
|
163
|
+
const itemNumber = parseTrackerNumber(opts.item);
|
|
164
|
+
if (itemNumber === void 0) {
|
|
165
|
+
throw new WorkCommentCommandError(trackerNumberError("--item", opts.item ?? ""));
|
|
166
|
+
}
|
|
167
|
+
const creds = resolveCredentials(opts);
|
|
168
|
+
const fetchImpl = opts.fetchImpl ?? defaultFetch;
|
|
169
|
+
const { data } = await getJson(creds.url, `/v1/work-items/${itemNumber}/threads`, creds.apiKey, creds.appId, fetchImpl);
|
|
170
|
+
if (opts.json) {
|
|
171
|
+
const output2 = JSON.stringify(data);
|
|
172
|
+
if (!opts.quiet) process.stdout.write(output2 + "\n");
|
|
173
|
+
return { data, output: output2 };
|
|
174
|
+
}
|
|
175
|
+
const page = data;
|
|
176
|
+
const lines = [
|
|
177
|
+
renderThread("general", page.general),
|
|
178
|
+
...page.criteria.map((t) => renderThread(t.criterion ?? "", t)),
|
|
179
|
+
...(page.threads ?? []).map(renderSourceThread)
|
|
180
|
+
];
|
|
181
|
+
const output = lines.join("\n");
|
|
182
|
+
if (!opts.quiet) process.stdout.write(output + "\n");
|
|
183
|
+
return { data, output };
|
|
184
|
+
}
|
|
185
|
+
function attachmentLines(attachments) {
|
|
186
|
+
return (attachments ?? []).map((a) => ` attachment ${sanitizeTerminal(a.id)} \xB7 ${sanitizeTerminal(a.filename)} \xB7 ${a.sizeBytes} bytes`);
|
|
187
|
+
}
|
|
188
|
+
function renderSourceThread(thread) {
|
|
189
|
+
const place = thread.anchor ? ` \xB7 ${sanitizeTerminal(thread.anchor.path)}:${thread.anchor.line}` : "";
|
|
190
|
+
const header = `${C.dim}thread ${sanitizeTerminal(thread.id)} \xB7 ${sanitizeTerminal(thread.source)}${place} \xB7 waiting on ${thread.waitingOn ?? "no one"}${C.reset}`;
|
|
191
|
+
const comments = thread.comments.flatMap((c) => [
|
|
192
|
+
` ${c.authorKind === "person" ? "person" : "agent"} ${sanitizeTerminal(c.authorName)}: ${sanitizeTerminal(c.body)}`,
|
|
193
|
+
...attachmentLines(c.attachments)
|
|
194
|
+
]);
|
|
195
|
+
return [header, ...comments].join("\n");
|
|
196
|
+
}
|
|
197
|
+
function renderThread(label, thread) {
|
|
198
|
+
const header = `${C.dim}${label === "general" ? "general" : `criterion ${label}`} \xB7 waiting on ${thread.waitingOn ?? "no one"}${C.reset}`;
|
|
199
|
+
const checks = (thread.checkItems ?? []).flatMap((item) => [
|
|
200
|
+
` check ${sanitizeTerminal(item.check)}${item.id === thread.criterion ? "" : ` \xB7 ${sanitizeTerminal(item.id)}`} \xB7 ${sanitizeTerminal(item.result)}${item.reason ? `: ${sanitizeTerminal(item.reason)}` : ""}`,
|
|
201
|
+
...(item.refs ?? []).map((ref) => ` ${sanitizeTerminal(ref.path)}${ref.line === void 0 ? "" : `:${ref.line}`}`)
|
|
202
|
+
]);
|
|
203
|
+
const comments = thread.comments.flatMap((c) => [
|
|
204
|
+
` ${c.author.kind === "person" ? "person" : "agent"} ${sanitizeTerminal(c.author.name)}: ${sanitizeTerminal(c.body)}${c.action ? ` (${c.action})` : ""}`,
|
|
205
|
+
...attachmentLines(c.attachments)
|
|
206
|
+
]);
|
|
207
|
+
return [header, ...checks, ...comments].join("\n");
|
|
208
|
+
}
|
|
209
|
+
async function runWorkCommentsRead(opts) {
|
|
210
|
+
const home = opts.home ?? homeFromEnv();
|
|
211
|
+
try {
|
|
212
|
+
const itemNumber = parseTrackerNumber(opts.item);
|
|
213
|
+
if (itemNumber === void 0) throw new WorkCommentCommandError(trackerNumberError("--item", opts.item ?? ""));
|
|
214
|
+
const creds = resolveCredentials({ ...opts, cwd: opts.cwd ?? process.cwd(), home, env: opts.env ?? process.env });
|
|
215
|
+
await postJson(creds.url, `/v1/work-items/${itemNumber}/comments/read`, creds.apiKey, creds.appId, { commentIds: opts.commentIds }, opts.fetchImpl ?? defaultFetch);
|
|
216
|
+
} catch (err) {
|
|
217
|
+
logHookError(home, new Error(`work comments-read for item ${opts.item ?? ""} failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function dispositionFilename(header) {
|
|
221
|
+
const match = header?.match(/filename\*=(?:UTF-8'')?([^;]+)/i);
|
|
222
|
+
if (match?.[1] === void 0) return void 0;
|
|
223
|
+
try {
|
|
224
|
+
return decodeURIComponent(match[1].trim());
|
|
225
|
+
} catch {
|
|
226
|
+
return void 0;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
function writeWithoutReplacing(folder, name, bytes) {
|
|
230
|
+
const dot = name.lastIndexOf(".");
|
|
231
|
+
const stem = dot > 0 ? name.slice(0, dot) : name;
|
|
232
|
+
const extension = dot > 0 ? name.slice(dot) : "";
|
|
233
|
+
for (let n = 1; ; n++) {
|
|
234
|
+
const path = join(folder, n === 1 ? name : `${stem} (${n})${extension}`);
|
|
235
|
+
try {
|
|
236
|
+
writeFileSync(path, bytes, { flag: "wx" });
|
|
237
|
+
return path;
|
|
238
|
+
} catch (err) {
|
|
239
|
+
if (err.code !== "EEXIST") throw err;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
async function runWorkAttachmentGet(opts) {
|
|
244
|
+
let item = opts.item;
|
|
245
|
+
if (item === void 0) {
|
|
246
|
+
const parsed = parseWorkItemEnv((opts.env ?? process.env).OUTERLAYER_WORK);
|
|
247
|
+
if (!("number" in parsed)) throw new WorkCommentCommandError(`pass --item <number>: ${parsed.reason}`);
|
|
248
|
+
item = parsed.number;
|
|
249
|
+
}
|
|
250
|
+
const itemNumber = parseTrackerNumber(item);
|
|
251
|
+
if (itemNumber === void 0) throw new WorkCommentCommandError(trackerNumberError("--item", opts.item ?? ""));
|
|
252
|
+
const creds = resolveCredentials(opts);
|
|
253
|
+
const fetchImpl = opts.fetchImpl ?? defaultFetch;
|
|
254
|
+
const got = await getBytes(creds.url, `/v1/work-items/${itemNumber}/attachments/${encodeURIComponent(opts.attachment)}`, creds.apiKey, creds.appId, fetchImpl);
|
|
255
|
+
let name = dispositionFilename(got.disposition);
|
|
256
|
+
if (name === void 0) {
|
|
257
|
+
const { data } = await getJson(creds.url, `/v1/work-items/${itemNumber}/threads`, creds.apiKey, creds.appId, fetchImpl);
|
|
258
|
+
const page = data;
|
|
259
|
+
const comments = [page.general, ...page.criteria ?? [], ...page.threads ?? []].flatMap((t) => t?.comments ?? []);
|
|
260
|
+
name = comments.flatMap((c) => c.attachments ?? []).find((a) => a.id === opts.attachment)?.filename;
|
|
261
|
+
}
|
|
262
|
+
const folder = resolve(opts.cwd ?? process.cwd(), opts.out ?? ".");
|
|
263
|
+
mkdirSync(folder, { recursive: true });
|
|
264
|
+
const path = writeWithoutReplacing(folder, cleanAttachmentFilename(name ?? opts.attachment), got.bytes);
|
|
265
|
+
const output = opts.json ? JSON.stringify({ path }) : path;
|
|
266
|
+
if (!opts.quiet) process.stdout.write(output + "\n");
|
|
267
|
+
return { path, output };
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export { WorkCommentCommandError, runWorkAttachmentGet, runWorkComment, runWorkCommentsRead, runWorkThreads };
|
|
@@ -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-AC6DM3S3.js';
|
|
4
4
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { withInjectedPrograms } from './chunk-
|
|
4
|
-
import { sharedSkillNames } from './chunk-
|
|
3
|
+
import { withInjectedPrograms } from './chunk-47JRSV6Y.js';
|
|
4
|
+
import { sharedSkillNames } from './chunk-L6CZTRNW.js';
|
|
5
5
|
import { GOVERNANCE_VARIABLE, versionAtLeast, CONTROL_PLANE_DIR_VARIABLE } from './chunk-SF2TBJBP.js';
|
|
6
6
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
7
|
-
import { setupMachineSkills } from './chunk-
|
|
8
|
-
import { defaultAgents, agentById, legacyAgent } from './chunk-
|
|
7
|
+
import { setupMachineSkills } from './chunk-7E55P2NR.js';
|
|
8
|
+
import { defaultAgents, agentById, legacyAgent } from './chunk-MT4XF5OL.js';
|
|
9
9
|
import './chunk-PLVHIQJN.js';
|
|
10
10
|
import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
11
11
|
import './chunk-ATEMEVFF.js';
|
|
12
12
|
import './chunk-RA3O54FC.js';
|
|
13
13
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import './chunk-MBPBYMHU.js';
|
|
15
|
+
import './chunk-FXVHF6RX.js';
|
|
16
16
|
import './chunk-Z5GEFMRW.js';
|
|
17
17
|
import { spawn, execFileSync } from 'child_process';
|
|
18
18
|
import { existsSync, readdirSync, lstatSync, readFileSync, writeFileSync, rmSync, mkdirSync, realpathSync, symlinkSync, renameSync, readlinkSync, statSync } from 'fs';
|
|
@@ -325,7 +325,7 @@ async function runAgentLauncher(agentId, args, deps = {}) {
|
|
|
325
325
|
return 1;
|
|
326
326
|
}
|
|
327
327
|
} else {
|
|
328
|
-
const { resolveLaunchPlane } = await import('./control-plane-launch-
|
|
328
|
+
const { resolveLaunchPlane } = await import('./control-plane-launch-MWZHJ4G5.js');
|
|
329
329
|
const plane = env[GOVERNANCE_VARIABLE] === "self" ? { kind: "none" } : await resolveLaunchPlane({ cwd, env, home, fetchImpl: deps.fetchImpl, stderr });
|
|
330
330
|
if (plane.kind === "none") {
|
|
331
331
|
const own2 = ownSkillsDirFor(prefix, cwd, home, /* @__PURE__ */ new Set(), stderr);
|