@outerlayer/cli 0.16.1 → 0.18.0

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.
Files changed (153) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +26 -11
  3. package/dist/agent-setup-RBTEACYU.js +28 -0
  4. package/dist/artifact-link-cmd-AVM2EKTV.js +25 -0
  5. package/dist/{build-BG2YENGK.js → build-TQ6X5PYN.js} +5 -4
  6. package/dist/build-info.json +1 -1
  7. package/dist/{builder-2D3WSOOY.js → builder-DUI2ZH2H.js} +5 -6
  8. package/dist/{check-CNTMSGOG.js → check-5C4YDZYV.js} +53 -50
  9. package/dist/{chunk-R7PF5OOU.js → chunk-3CWUOFV6.js} +21 -14
  10. package/dist/{chunk-R4ZQQ7U2.js → chunk-3OFZM4X6.js} +551 -72
  11. package/dist/{chunk-2MNPHL23.js → chunk-47TTLEDX.js} +6 -5
  12. package/dist/{chunk-PLMTLGYH.js → chunk-52NC2FIU.js} +4 -3
  13. package/dist/chunk-6CHIYEZZ.js +564 -0
  14. package/dist/{chunk-TI7B7UEO.js → chunk-AMFWYESY.js} +1 -1
  15. package/dist/{chunk-YRYMNBGQ.js → chunk-ANPNT6PM.js} +2 -1
  16. package/dist/{chunk-JJEGKEFV.js → chunk-B3UKB46N.js} +6 -6
  17. package/dist/{chunk-JXYVA45C.js → chunk-BMYGAGBJ.js} +1050 -304
  18. package/dist/{chunk-4Q7OMKAT.js → chunk-BQXFBI7T.js} +81 -5
  19. package/dist/chunk-CRB3POP4.js +34 -0
  20. package/dist/{chunk-F47JBIAW.js → chunk-DSF2FWAZ.js} +2 -1
  21. package/dist/{chunk-N5FOE5PS.js → chunk-ECODQ7II.js} +4 -33
  22. package/dist/{chunk-NBGDBTO2.js → chunk-ESC6UR76.js} +6 -5
  23. package/dist/{chunk-HHJDN6AU.js → chunk-ESVW4MJY.js} +1 -1
  24. package/dist/{chunk-42ZI52JW.js → chunk-F4XSVQJ4.js} +4 -3
  25. package/dist/{chunk-FWX735W7.js → chunk-FUB7LRUE.js} +7 -7
  26. package/dist/chunk-G2YNJIGF.js +44 -0
  27. package/dist/{chunk-QKFB4K7X.js → chunk-GGOMT6KF.js} +1 -1
  28. package/dist/{chunk-CA3XMYFN.js → chunk-GOBOJMOJ.js} +6 -6
  29. package/dist/{chunk-N6LURUEF.js → chunk-GOSFARMS.js} +1 -1
  30. package/dist/chunk-JBJTC3UU.js +35 -0
  31. package/dist/{chunk-U3HXXRTY.js → chunk-JF42URPU.js} +16 -15
  32. package/dist/{chunk-ADJRGVZC.js → chunk-KDVIU23F.js} +1 -1
  33. package/dist/{chunk-6QRMLNH3.js → chunk-KK4VBOH6.js} +93 -37
  34. package/dist/{chunk-KMDLFI4P.js → chunk-L2USZT6T.js} +1 -1
  35. package/dist/{chunk-WTE3MQML.js → chunk-LXAY4A2G.js} +3 -12
  36. package/dist/{chunk-V7NIVOFD.js → chunk-M2ZWWTWZ.js} +1 -1
  37. package/dist/{chunk-ERI5GBNI.js → chunk-MLAAT4S6.js} +3 -3
  38. package/dist/{chunk-POJMEEJJ.js → chunk-MNTSH4CL.js} +1 -1
  39. package/dist/{chunk-WUYTWNMA.js → chunk-MQJSXHV7.js} +1 -1
  40. package/dist/{chunk-O765JR4W.js → chunk-MTP2QEVO.js} +1 -1
  41. package/dist/{chunk-ZM2IMMYN.js → chunk-N2PXGQRL.js} +9 -1
  42. package/dist/{chunk-J5M7BSJQ.js → chunk-N3CUDFCW.js} +9 -3
  43. package/dist/{chunk-4KSQKQXE.js → chunk-NACDBXUG.js} +19 -15
  44. package/dist/{chunk-RSPXEVDX.js → chunk-NL4XPC7W.js} +1 -1
  45. package/dist/{chunk-EHAAPRWY.js → chunk-QQM2UJ6T.js} +31 -26
  46. package/dist/{chunk-5FEK6PNE.js → chunk-RAZTWYZN.js} +10 -9
  47. package/dist/{chunk-4NPZVMJU.js → chunk-S26M3YBJ.js} +60 -4
  48. package/dist/{chunk-UGP76IZ5.js → chunk-S5PCA3SN.js} +1 -1
  49. package/dist/{chunk-YDSMROTB.js → chunk-S76AYB4M.js} +25 -20
  50. package/dist/{chunk-RMWLBUCJ.js → chunk-SADUQSO4.js} +1 -1
  51. package/dist/{chunk-OZGHL5Y5.js → chunk-SWCTGCSC.js} +2 -2
  52. package/dist/{chunk-GQD22KKN.js → chunk-T2Q7ISPE.js} +2 -1
  53. package/dist/{chunk-C5Y5ZJJZ.js → chunk-T4Y6SCG3.js} +5 -4
  54. package/dist/{chunk-6JNURGOA.js → chunk-ULSIJGLS.js} +45 -13
  55. package/dist/{chunk-ONRCEE6D.js → chunk-UYOYTKE2.js} +4 -4
  56. package/dist/{chunk-PTW6W5NR.js → chunk-VYAL7PUE.js} +1 -1
  57. package/dist/{chunk-JEHRUE3F.js → chunk-W5VPCONO.js} +166 -196
  58. package/dist/{chunk-NPQWKGUA.js → chunk-WBT5X3NH.js} +5 -4
  59. package/dist/{chunk-RLYZLUQ7.js → chunk-WGAUY5LE.js} +2 -2
  60. package/dist/{chunk-RSNSZ2LJ.js → chunk-X5H2WYMB.js} +1 -1
  61. package/dist/{chunk-OHVJA253.js → chunk-X5N6KC6V.js} +47 -29
  62. package/dist/{chunk-22RMZBGW.js → chunk-XGP3VYOG.js} +1 -1
  63. package/dist/{chunk-HYZRY4KZ.js → chunk-XNGMQ27R.js} +16 -6
  64. package/dist/{chunk-W3EKCZSQ.js → chunk-Y5GE76XC.js} +180 -53
  65. package/dist/{chunk-EWORLJMO.js → chunk-Y5MXET4M.js} +277 -526
  66. package/dist/{chunk-XCK2YAY5.js → chunk-YVZJ6GKF.js} +3 -2
  67. package/dist/{chunk-YO4PSLVB.js → chunk-ZRL6HKBY.js} +1 -1
  68. package/dist/claude-launcher-YVXI76NX.js +102 -0
  69. package/dist/{cli-AEWH62UE.js → cli-C77H54BV.js} +489 -174
  70. package/dist/{command-HHPBR6CS.js → command-H5CILO4S.js} +40 -37
  71. package/dist/{config-N3C6DFQA.js → config-FXDG4NPJ.js} +2 -3
  72. package/dist/connect-cmd-ZW5FV3ZW.js +17 -0
  73. package/dist/{context-adopt-VMMGFRUZ.js → context-adopt-O5OFXMKI.js} +13 -12
  74. package/dist/context-materialize-Y5IJ4MQT.js +23 -0
  75. package/dist/{dist-LKDWQWZ7.js → dist-QTX4RSCL.js} +2 -2
  76. package/dist/{docker-4J77Q2BF.js → docker-RC3PRX3Q.js} +7 -8
  77. package/dist/{doctor-N6Y7HKK3.js → doctor-2NQQML6P.js} +47 -39
  78. package/dist/{emit-artifact-cmd-H5MH3AOP.js → emit-artifact-cmd-7MP63KXU.js} +25 -22
  79. package/dist/emit-cmd-PPN4QQF2.js +14 -0
  80. package/dist/{emit-criteria-cmd-HBP6XS5C.js → emit-criteria-cmd-3RXPDLNK.js} +16 -14
  81. package/dist/{emit-finding-cmd-ZXDRL6PG.js → emit-finding-cmd-OL7JB6H3.js} +18 -16
  82. package/dist/{emit-result-cmd-RFKALS5Z.js → emit-result-cmd-UZVMOCF4.js} +20 -17
  83. package/dist/{exec-client-CQV746UF.js → exec-client-7UMESIE2.js} +3 -4
  84. package/dist/governing-source-BUU4IABS.js +35 -0
  85. package/dist/guest-init-KPBQOFE5.js +9 -0
  86. package/dist/hidden-prompt-UXBFMQC5.js +68 -0
  87. package/dist/{hook-fast-D7HV4IXG.js → hook-fast-W5MKHMJT.js} +4 -1
  88. package/dist/host-key-U4B5QETR.js +8 -0
  89. package/dist/{import-capture-cmd-EQ35EARA.js → import-capture-cmd-ZO6KGHI2.js} +7 -5
  90. package/dist/{import-ruler-cmd-BGAZXCQM.js → import-ruler-cmd-KJMWL5V6.js} +5 -3
  91. package/dist/index.js +8 -4
  92. package/dist/init-VWXIZEAN.js +54 -0
  93. package/dist/{init-FBCA4DRA.js → init-WNXXYMO7.js} +80 -53
  94. package/dist/{init-cmd-CAG572UE.js → init-cmd-WS6TIRYT.js} +28 -24
  95. package/dist/{init-update-VDFF4K3B.js → init-update-E3J6TVIN.js} +27 -26
  96. package/dist/{install-HDBIPHTX.js → install-CBWIEF3R.js} +4 -5
  97. package/dist/{install-cmd-5HYMXLEW.js → install-cmd-QDOTR4OM.js} +5 -4
  98. package/dist/{login-browser-QZCS3WW6.js → login-browser-O63QZN7D.js} +4 -3
  99. package/dist/{logout-cmd-QAUFDJ6J.js → logout-cmd-5V5MMBSY.js} +3 -2
  100. package/dist/{logs-H55NWW4H.js → logs-AMLKC3VP.js} +3 -1
  101. package/dist/loop-UGI2BJOT.js +76 -0
  102. package/dist/machine-JOW4RNZ7.js +49 -0
  103. package/dist/{mcp-install-cmd-FDTPQQS6.js → mcp-install-cmd-GGWB3JJ2.js} +3 -2
  104. package/dist/{mcp-serve-cmd-3KVYEUXG.js → mcp-serve-cmd-DOTY5FKY.js} +10 -8
  105. package/dist/paths-7XP63OAX.js +7 -0
  106. package/dist/pending-532ABZYC.js +8 -0
  107. package/dist/{pidfile-UZRH774M.js → pidfile-3DM4OBKO.js} +4 -2
  108. package/dist/{record-C43U4PKS.js → record-3WP6V2K5.js} +3 -2
  109. package/dist/{runner-env-EN7YE7QX.js → runner-env-4NB2GA7O.js} +5 -6
  110. package/dist/runner-key-TC3NFWFV.js +177 -0
  111. package/dist/{session-sender-24L5EW25.js → session-sender-NNVPSPY7.js} +17 -14
  112. package/dist/spec-cmd-OWVTBB4J.js +116 -0
  113. package/dist/{starter-pack-KF66HGZR.js → starter-pack-OPWUDOWX.js} +7 -5
  114. package/dist/{status-XHSGEYO5.js → status-TKCLLKFG.js} +42 -39
  115. package/dist/{statusline-fast-SVTMBMD7.js → statusline-fast-KN3BX67H.js} +2 -1
  116. package/dist/{sync-cmd-5G5EIEHD.js → sync-cmd-Q6VYNPWG.js} +16 -13
  117. package/dist/{watch-UTOXO4SE.js → watch-ARAGADTF.js} +16 -13
  118. package/dist/{work-claim-cmd-RKHYFE5Y.js → work-claim-cmd-34FERLYX.js} +25 -27
  119. package/dist/work-cmd-7S5B2H2P.js +25 -0
  120. package/dist/{work-comment-cmd-A55CUSYE.js → work-comment-cmd-SZJSPM5S.js} +15 -13
  121. package/dist/{work-launch-R5HTAP6X.js → work-launch-LEQ2MPM3.js} +3 -1
  122. package/dist/{work-open-pr-cmd-E6O53IJD.js → work-open-pr-cmd-RPXKCBWS.js} +17 -15
  123. package/dist/work-pr-cmd-5LGANL32.js +26 -0
  124. package/package.json +3 -2
  125. package/skill-pack/maintained/outerlayer-amend/SKILL.md +6 -2
  126. package/skill-pack/maintained/outerlayer-cli/SKILL.md +2 -0
  127. package/skill-pack/maintained/outerlayer-evidence/SKILL.md +4 -2
  128. package/skill-pack/maintained/outerlayer-findings/SKILL.md +2 -0
  129. package/skill-pack/shipped.json +27 -5
  130. package/skill-pack/template/build/SKILL.md +25 -10
  131. package/skill-pack/template/build/references/agent-briefs.md +3 -1
  132. package/skill-pack/template/build/references/criteria-judge.md +27 -0
  133. package/skill-pack/template/build/references/release.md +27 -34
  134. package/skill-pack/template/build/scripts/criterion-citations.mjs +8 -3
  135. package/skill-pack/template/build/scripts/record-criteria.mjs +8 -2
  136. package/skill-pack/template/spec/SKILL.md +37 -10
  137. package/skill-pack/validators/acceptance-criteria.yaml +25 -25
  138. package/skill-pack/validators/code-review.yaml +6 -5
  139. package/dist/agent-setup-K3ABU5NL.js +0 -27
  140. package/dist/chunk-BYT5O5RV.js +0 -61
  141. package/dist/connect-cmd-JUAW6MU4.js +0 -16
  142. package/dist/context-materialize-2WXTS4CW.js +0 -22
  143. package/dist/emit-cmd-IJ3GVRFD.js +0 -12
  144. package/dist/guest-init-LJP5GPZF.js +0 -9
  145. package/dist/host-key-YMLXY6QB.js +0 -7
  146. package/dist/init-MYX7YMIH.js +0 -51
  147. package/dist/loop-75J4YXLZ.js +0 -73
  148. package/dist/machine-A6ZCTUGS.js +0 -46
  149. package/dist/paths-OYKMVYJP.js +0 -6
  150. package/dist/pending-MXLSRYMO.js +0 -7
  151. package/dist/runner-key-W25ISHI3.js +0 -155
  152. package/dist/work-cmd-DJQJEZVB.js +0 -23
  153. package/dist/work-pr-cmd-L77K32WK.js +0 -24
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { realLogoutDeps, revokeTokenOnDashboard, runLogoutCommand } from './chunk-N6LURUEF.js';
4
- import './chunk-YRYMNBGQ.js';
3
+ export { realLogoutDeps, revokeTokenOnDashboard, runLogoutCommand } from './chunk-GOSFARMS.js';
4
+ import './chunk-ANPNT6PM.js';
5
5
  import './chunk-EABW6AJQ.js';
6
+ import './chunk-CRB3POP4.js';
6
7
  import './chunk-VNVZDWO3.js';
7
8
  import './chunk-Z5GEFMRW.js';
8
9
 
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { jobsDir } from './chunk-ZM2IMMYN.js';
3
+ import { jobsDir } from './chunk-N2PXGQRL.js';
4
+ import './chunk-BQXFBI7T.js';
4
5
  import './chunk-Z5GEFMRW.js';
5
6
  import { existsSync, watch, statSync, createReadStream } from 'fs';
6
7
  import { join } from 'path';
@@ -11,6 +12,7 @@ var RunnerLogsError = class extends Error {
11
12
  var STAGE_LOG = {
12
13
  provision: "provision.log",
13
14
  command: "command.log",
15
+ judge: "judge.log",
14
16
  checks: "checks/environment.log",
15
17
  sync: "command.log",
16
18
  cleanup: "cleanup.log",
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ export { RunnerStartError, listJobFiles, probeCredentials, requestStop, runnerProcessState, start, tick, watchTick } from './chunk-QQM2UJ6T.js';
4
+ import './chunk-3JVYMD4G.js';
5
+ import './chunk-I2UOAV7X.js';
6
+ import './chunk-YETTWTAY.js';
7
+ import './chunk-3OFZM4X6.js';
8
+ import './chunk-SADUQSO4.js';
9
+ import './chunk-KDVIU23F.js';
10
+ import './chunk-MTP2QEVO.js';
11
+ import './chunk-S5PCA3SN.js';
12
+ import './chunk-UYOYTKE2.js';
13
+ import './chunk-XNGMQ27R.js';
14
+ import './chunk-FUB7LRUE.js';
15
+ import './chunk-AMFWYESY.js';
16
+ import './chunk-YYYRBYWG.js';
17
+ import './chunk-GOBOJMOJ.js';
18
+ import './chunk-JF42URPU.js';
19
+ import './chunk-ESVW4MJY.js';
20
+ import './chunk-TBT347UY.js';
21
+ import './chunk-NL4XPC7W.js';
22
+ import './chunk-Y5MXET4M.js';
23
+ import './chunk-L2USZT6T.js';
24
+ import './chunk-S26M3YBJ.js';
25
+ import './chunk-GGOMT6KF.js';
26
+ import './chunk-X5H2WYMB.js';
27
+ import './chunk-6CHIYEZZ.js';
28
+ import './chunk-SWCTGCSC.js';
29
+ import './chunk-WGAUY5LE.js';
30
+ import './chunk-6MZSX4M7.js';
31
+ import './chunk-KK4VBOH6.js';
32
+ import './chunk-WBT5X3NH.js';
33
+ import './chunk-IP7BIBXJ.js';
34
+ import './chunk-S76AYB4M.js';
35
+ import './chunk-MQJSXHV7.js';
36
+ import './chunk-XGP3VYOG.js';
37
+ import './chunk-UXYLWVTQ.js';
38
+ import './chunk-7RQ73DLO.js';
39
+ import './chunk-3CWUOFV6.js';
40
+ import './chunk-QOZKPLVJ.js';
41
+ import './chunk-CX22S5BA.js';
42
+ import './chunk-ECODQ7II.js';
43
+ import './chunk-JBJTC3UU.js';
44
+ import './chunk-OGFGZQA3.js';
45
+ import './chunk-F7CU5ABH.js';
46
+ import './chunk-BKO6JEZI.js';
47
+ import './chunk-BMYGAGBJ.js';
48
+ import './chunk-NACDBXUG.js';
49
+ import './chunk-GOSFARMS.js';
50
+ import './chunk-ANPNT6PM.js';
51
+ import './chunk-T2Q7ISPE.js';
52
+ import './chunk-WZBHBH3J.js';
53
+ import './chunk-5QRP3MVS.js';
54
+ import './chunk-W5VPCONO.js';
55
+ import './chunk-LXAY4A2G.js';
56
+ import './chunk-T4Y6SCG3.js';
57
+ import './chunk-ZRL6HKBY.js';
58
+ import './chunk-52NC2FIU.js';
59
+ import './chunk-MNTSH4CL.js';
60
+ import './chunk-X5N6KC6V.js';
61
+ import './chunk-N3CUDFCW.js';
62
+ import './chunk-EABW6AJQ.js';
63
+ import './chunk-RA3O54FC.js';
64
+ import './chunk-M2ZWWTWZ.js';
65
+ import './chunk-N2PXGQRL.js';
66
+ import './chunk-BQXFBI7T.js';
67
+ import './chunk-ULSIJGLS.js';
68
+ import './chunk-G2YNJIGF.js';
69
+ import './chunk-XCCLFVXM.js';
70
+ import './chunk-ZJSNLVCE.js';
71
+ import './chunk-BJ3KTMDH.js';
72
+ import './chunk-CRB3POP4.js';
73
+ import './chunk-VNVZDWO3.js';
74
+ import './chunk-Z5GEFMRW.js';
75
+
76
+ createRequire(import.meta.url);
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ export { describeMachineDocker, detectMachine, microVmArchSupported, microVmAssetsPinned, reachDockerStep, supportsContainerBuilds, supportsMicroVmBuilds } from './chunk-NL4XPC7W.js';
4
+ import './chunk-Y5MXET4M.js';
5
+ import './chunk-L2USZT6T.js';
6
+ import './chunk-S26M3YBJ.js';
7
+ import './chunk-GGOMT6KF.js';
8
+ import './chunk-X5H2WYMB.js';
9
+ import './chunk-6CHIYEZZ.js';
10
+ import './chunk-KK4VBOH6.js';
11
+ import './chunk-WBT5X3NH.js';
12
+ import './chunk-IP7BIBXJ.js';
13
+ import './chunk-S76AYB4M.js';
14
+ import './chunk-MQJSXHV7.js';
15
+ import './chunk-UXYLWVTQ.js';
16
+ import './chunk-7RQ73DLO.js';
17
+ import './chunk-3CWUOFV6.js';
18
+ import './chunk-QOZKPLVJ.js';
19
+ import './chunk-CX22S5BA.js';
20
+ import './chunk-ECODQ7II.js';
21
+ import './chunk-JBJTC3UU.js';
22
+ import './chunk-OGFGZQA3.js';
23
+ import './chunk-BMYGAGBJ.js';
24
+ import './chunk-NACDBXUG.js';
25
+ import './chunk-GOSFARMS.js';
26
+ import './chunk-ANPNT6PM.js';
27
+ import './chunk-WZBHBH3J.js';
28
+ import './chunk-W5VPCONO.js';
29
+ import './chunk-LXAY4A2G.js';
30
+ import './chunk-T4Y6SCG3.js';
31
+ import './chunk-ZRL6HKBY.js';
32
+ import './chunk-52NC2FIU.js';
33
+ import './chunk-MNTSH4CL.js';
34
+ import './chunk-X5N6KC6V.js';
35
+ import './chunk-N3CUDFCW.js';
36
+ import './chunk-EABW6AJQ.js';
37
+ import './chunk-RA3O54FC.js';
38
+ import './chunk-M2ZWWTWZ.js';
39
+ import './chunk-N2PXGQRL.js';
40
+ import './chunk-BQXFBI7T.js';
41
+ import './chunk-G2YNJIGF.js';
42
+ import './chunk-XCCLFVXM.js';
43
+ import './chunk-ZJSNLVCE.js';
44
+ import './chunk-BJ3KTMDH.js';
45
+ import './chunk-CRB3POP4.js';
46
+ import './chunk-VNVZDWO3.js';
47
+ import './chunk-Z5GEFMRW.js';
48
+
49
+ createRequire(import.meta.url);
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { DEFAULT_MCP_COMMAND, DOCS_MCP_SERVER_NAME, INIT_DOCS_ENTRY, INIT_STDIO_ENTRY, McpInstallError, addDocsMcpEntryIfAbsent, addStdioMcpEntryIfAbsent, buildServerEntry, buildStdioServerEntry, defaultMcpUrl, handleMcpInstallError, mcpTargetPath, runMcpInstall, setMcpEntry } from './chunk-XCK2YAY5.js';
4
- import './chunk-YRYMNBGQ.js';
3
+ export { DEFAULT_MCP_COMMAND, DOCS_MCP_SERVER_NAME, INIT_DOCS_ENTRY, INIT_STDIO_ENTRY, McpInstallError, addDocsMcpEntryIfAbsent, addStdioMcpEntryIfAbsent, buildServerEntry, buildStdioServerEntry, defaultMcpUrl, handleMcpInstallError, mcpTargetPath, runMcpInstall, setMcpEntry } from './chunk-YVZJ6GKF.js';
4
+ import './chunk-ANPNT6PM.js';
5
5
  import './chunk-EABW6AJQ.js';
6
+ import './chunk-CRB3POP4.js';
6
7
  import './chunk-VNVZDWO3.js';
7
8
  import './chunk-Z5GEFMRW.js';
8
9
 
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { C } from './chunk-YRYMNBGQ.js';
4
- import { defaultFetch } from './chunk-YO4PSLVB.js';
5
- import { resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
3
+ import { C } from './chunk-ANPNT6PM.js';
4
+ import { defaultFetch } from './chunk-ZRL6HKBY.js';
5
+ import { resolveGatewayCredentials } from './chunk-52NC2FIU.js';
6
6
  import { cloudConfigPath } from './chunk-EABW6AJQ.js';
7
- import './chunk-V7NIVOFD.js';
8
- import './chunk-ZM2IMMYN.js';
7
+ import './chunk-M2ZWWTWZ.js';
8
+ import './chunk-N2PXGQRL.js';
9
+ import './chunk-BQXFBI7T.js';
9
10
  import './chunk-BJ3KTMDH.js';
11
+ import { cliInvocation } from './chunk-CRB3POP4.js';
10
12
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
11
13
  import './chunk-Z5GEFMRW.js';
12
14
  import { createInterface } from 'readline';
@@ -26,7 +28,7 @@ function resolveMcpServeTarget(opts = {}) {
26
28
  const apiKey = resolved.credential;
27
29
  if (!apiKey) {
28
30
  throw new McpServeConfigError(
29
- `no API key: run "outerlayer login", set OUTERLAYER_API_KEY, or save "apiKey" to ${cloudConfigPath(home)} (mint a key in the dashboard: Settings \u2192 API keys).`
31
+ `no API key: run "${cliInvocation()} login", set OUTERLAYER_API_KEY, or save "apiKey" to ${cloudConfigPath(home)} (mint a key in the dashboard: Settings \u2192 API keys).`
30
32
  );
31
33
  }
32
34
  if (!resolved.ok && resolved.kind === "login" && !resolved.appId && resolved.url) {
@@ -35,7 +37,7 @@ function resolveMcpServeTarget(opts = {}) {
35
37
  const origin = resolved.url;
36
38
  if (!opts.url && !origin) {
37
39
  throw new McpServeConfigError(
38
- `no gateway URL: set OUTERLAYER_URL or save "url" to ${cloudConfigPath(home)} (run \`outerlayer login\`), or pass --url.`
40
+ `no gateway URL: set OUTERLAYER_URL or save "url" to ${cloudConfigPath(home)} (run \`${cliInvocation()} login\`), or pass --url.`
39
41
  );
40
42
  }
41
43
  const url = opts.url ?? mcpEndpointFromOrigin(origin);
@@ -101,7 +103,7 @@ async function bridgeMessage(line, opts) {
101
103
  return JSON.stringify(body);
102
104
  }
103
105
  const detail = gatewayErrorMessage(body) ?? text.slice(0, 200);
104
- const hint = status === 401 ? usesLoginToken(opts.target.headers) ? " \u2014 the login is expired or was revoked; run `outerlayer login` to sign in again" : ` \u2014 check the API key in ${cloudConfigPath(opts.home ?? homeFromEnv())} (or OUTERLAYER_API_KEY)` : "";
106
+ const hint = status === 401 ? usesLoginToken(opts.target.headers) ? ` \u2014 the login is expired or was revoked; run \`${cliInvocation()} login\` to sign in again` : ` \u2014 check the API key in ${cloudConfigPath(opts.home ?? homeFromEnv())} (or OUTERLAYER_API_KEY)` : "";
105
107
  return errorResponse(id, JSON_RPC_GATEWAY_ERROR, `OuterLayer gateway returned HTTP ${status}: ${detail}${hint}`);
106
108
  }
107
109
  function usesLoginToken(headers) {
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ export { RUNNER_DIR_MODE, RUNNER_FILE_MODE, SHIM_DIR, attemptStamp, buildDir, contextHomeDir, deliveryDir, diskTemplatesDir, ghConfigDir, hostKeyPath, imagesDir, jobDir, jobsDir, mirrorDir, pidFilePath, repoCacheDir, rootfsDir, rootfsPathFor, runnerDir, runnerDirOfBuild, spoolDir, stagedContextDir, vmAssetsDir, vsockPath } from './chunk-N2PXGQRL.js';
4
+ import './chunk-BQXFBI7T.js';
5
+ import './chunk-Z5GEFMRW.js';
6
+
7
+ createRequire(import.meta.url);
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ export { readPendingUpdate, writePendingUpdate } from './chunk-MTP2QEVO.js';
4
+ import './chunk-N2PXGQRL.js';
5
+ import './chunk-BQXFBI7T.js';
6
+ import './chunk-Z5GEFMRW.js';
7
+
8
+ createRequire(import.meta.url);
@@ -1,7 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { RunnerAlreadyRunningError, claimPidFile, readPidFile, releasePidFile } from './chunk-N5FOE5PS.js';
4
- import './chunk-ZM2IMMYN.js';
3
+ export { RunnerAlreadyRunningError, claimPidFile, readPidFile, releasePidFile } from './chunk-ECODQ7II.js';
4
+ import './chunk-JBJTC3UU.js';
5
+ import './chunk-N2PXGQRL.js';
6
+ import './chunk-BQXFBI7T.js';
5
7
  import './chunk-Z5GEFMRW.js';
6
8
 
7
9
  createRequire(import.meta.url);
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-UGP76IZ5.js';
4
- import './chunk-ZM2IMMYN.js';
3
+ export { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-S5PCA3SN.js';
4
+ import './chunk-N2PXGQRL.js';
5
+ import './chunk-BQXFBI7T.js';
5
6
  import './chunk-Z5GEFMRW.js';
6
7
 
7
8
  createRequire(import.meta.url);
@@ -1,14 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { AGENT_COMMANDS, RunnerEnvError, credentialFromStdin, hasStoredCredential, isAgentName, restartForCredential, storeClaudeCredential } from './chunk-OZGHL5Y5.js';
4
- import './chunk-RLYZLUQ7.js';
3
+ export { AGENT_COMMANDS, RunnerEnvError, credentialFromStdin, hasStoredCredential, isAgentName, restartForCredential, storeClaudeCredential } from './chunk-SWCTGCSC.js';
4
+ import './chunk-WGAUY5LE.js';
5
5
  import './chunk-6MZSX4M7.js';
6
- import './chunk-22RMZBGW.js';
6
+ import './chunk-XGP3VYOG.js';
7
7
  import './chunk-UXYLWVTQ.js';
8
8
  import './chunk-7RQ73DLO.js';
9
- import './chunk-4Q7OMKAT.js';
10
- import './chunk-BYT5O5RV.js';
11
- import './chunk-ZM2IMMYN.js';
9
+ import './chunk-N2PXGQRL.js';
10
+ import './chunk-BQXFBI7T.js';
12
11
  import './chunk-VNVZDWO3.js';
13
12
  import './chunk-Z5GEFMRW.js';
14
13
 
@@ -0,0 +1,177 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { readConfigObject, RunnerInitError } from './chunk-GOBOJMOJ.js';
4
+ import './chunk-NL4XPC7W.js';
5
+ import './chunk-Y5MXET4M.js';
6
+ import './chunk-L2USZT6T.js';
7
+ import './chunk-S26M3YBJ.js';
8
+ import './chunk-GGOMT6KF.js';
9
+ import './chunk-X5H2WYMB.js';
10
+ import './chunk-6CHIYEZZ.js';
11
+ import './chunk-SWCTGCSC.js';
12
+ import './chunk-WGAUY5LE.js';
13
+ import './chunk-6MZSX4M7.js';
14
+ import { getJson } from './chunk-KK4VBOH6.js';
15
+ import './chunk-WBT5X3NH.js';
16
+ import './chunk-IP7BIBXJ.js';
17
+ import { fetchFactories, slug, dashboardBase, listText } from './chunk-S76AYB4M.js';
18
+ import './chunk-MQJSXHV7.js';
19
+ import { runnerCredentialProblem } from './chunk-XGP3VYOG.js';
20
+ import './chunk-UXYLWVTQ.js';
21
+ import './chunk-7RQ73DLO.js';
22
+ import './chunk-3CWUOFV6.js';
23
+ import './chunk-QOZKPLVJ.js';
24
+ import './chunk-CX22S5BA.js';
25
+ import './chunk-ECODQ7II.js';
26
+ import './chunk-JBJTC3UU.js';
27
+ import './chunk-OGFGZQA3.js';
28
+ import './chunk-BMYGAGBJ.js';
29
+ import './chunk-NACDBXUG.js';
30
+ import './chunk-GOSFARMS.js';
31
+ import './chunk-ANPNT6PM.js';
32
+ import './chunk-WZBHBH3J.js';
33
+ import './chunk-W5VPCONO.js';
34
+ import './chunk-LXAY4A2G.js';
35
+ import './chunk-T4Y6SCG3.js';
36
+ import './chunk-ZRL6HKBY.js';
37
+ import './chunk-52NC2FIU.js';
38
+ import './chunk-MNTSH4CL.js';
39
+ import './chunk-X5N6KC6V.js';
40
+ import './chunk-N3CUDFCW.js';
41
+ import { readCloudConfig } from './chunk-EABW6AJQ.js';
42
+ import './chunk-RA3O54FC.js';
43
+ import './chunk-M2ZWWTWZ.js';
44
+ import './chunk-N2PXGQRL.js';
45
+ import './chunk-BQXFBI7T.js';
46
+ import './chunk-G2YNJIGF.js';
47
+ import './chunk-XCCLFVXM.js';
48
+ import './chunk-ZJSNLVCE.js';
49
+ import { readRepoConnection } from './chunk-BJ3KTMDH.js';
50
+ import './chunk-CRB3POP4.js';
51
+ import { homeFromEnv } from './chunk-VNVZDWO3.js';
52
+ import './chunk-Z5GEFMRW.js';
53
+ import { existsSync } from 'fs';
54
+
55
+ createRequire(import.meta.url);
56
+ async function runnerKeyLogin(configPath, opts = {}) {
57
+ const env = opts.env ?? process.env;
58
+ const config = existsSync(configPath) ? readConfigObject(configPath) : {};
59
+ if (config.apiKey !== void 0) {
60
+ if (opts.appId !== void 0 && opts.appId !== config.appId) {
61
+ throw new RunnerInitError(
62
+ `${configPath} already holds a runner key, for the factory its appId names, so --app-id ${opts.appId} creates no key. Leave --app-id out, or give it the same id.`
63
+ );
64
+ }
65
+ if (opts.factory !== void 0) {
66
+ throw new RunnerInitError(
67
+ `${configPath} already holds a runner key, for the factory its appId names, so --factory ${opts.factory} creates no key. Leave --factory out.`
68
+ );
69
+ }
70
+ return void 0;
71
+ }
72
+ const saved = readCloudConfig(opts.home ?? homeFromEnv(env));
73
+ const own = typeof config.accountToken === "string" && config.accountToken !== "";
74
+ const accountToken = own ? config.accountToken : saved.accountToken;
75
+ if (accountToken === void 0 || accountToken === "") return void 0;
76
+ const url = config.url ?? (own ? void 0 : saved.url);
77
+ let appId = opts.appId ?? (env.OUTERLAYER_APP_ID || void 0) ?? config.appId ?? readRepoConnection(opts.cwd ?? process.cwd())?.appId;
78
+ let note;
79
+ let chosen;
80
+ const mustList = opts.factory !== void 0 || appId === void 0;
81
+ const urlProblem = runnerCredentialProblem({ url, apiKey: accountToken, appId: "pending" });
82
+ if (urlProblem !== void 0 && mustList) throw new RunnerInitError(`${configPath}: ${urlProblem.field} ${urlProblem.reason}.`);
83
+ if (urlProblem === void 0) {
84
+ const listed = await fetchFactories(opts.fetchImpl ?? fetch, url, accountToken);
85
+ if (!listed.ok) {
86
+ if (mustList) throw new RunnerInitError(listed.result.text.trim());
87
+ } else if (mustList) {
88
+ chosen = chooseFactory(listed.factories, opts.factory);
89
+ if (opts.appId !== void 0 && opts.appId.toLowerCase() !== chosen.id.toLowerCase()) {
90
+ throw new RunnerInitError(
91
+ `--factory ${opts.factory} is the factory ${chosen.id}, but --app-id is ${opts.appId}. Pass only one of them, or the same factory in both.`
92
+ );
93
+ }
94
+ appId = chosen.id;
95
+ if (opts.factory === void 0) note = `Using factory ${slug(chosen)}, the only one this login can use.`;
96
+ } else {
97
+ chosen = listed.factories.find((f) => f.id.toLowerCase() === appId.toLowerCase());
98
+ }
99
+ }
100
+ const problem = runnerCredentialProblem({ url, apiKey: accountToken, appId });
101
+ if (problem !== void 0) {
102
+ const where = problem.field === "appId" ? "the factory id" : `${configPath}: ${problem.field}`;
103
+ throw new RunnerInitError(`${where} ${problem.reason}.`);
104
+ }
105
+ const named = chosen === void 0 ? {} : {
106
+ slug: slug(chosen),
107
+ keysUrl: `${dashboardBase(opts.home ?? homeFromEnv(env))}/orgs/${encodeURIComponent(chosen.organization.name)}/factories/${encodeURIComponent(chosen.name)}/settings/api-keys`
108
+ };
109
+ return { url, accountToken, appId, ...note === void 0 ? {} : { note }, ...named };
110
+ }
111
+ function chooseFactory(factories, flag) {
112
+ if (flag !== void 0) {
113
+ const wanted = flag.toLowerCase();
114
+ const named = factories.find((f) => f.id.toLowerCase() === wanted || slug(f).toLowerCase() === wanted);
115
+ if (named !== void 0) return named;
116
+ throw new RunnerInitError(
117
+ factories.length === 0 ? `no factory you can use is named "${flag}": this login can use no factory.` : `no factory you can use is named "${flag}". Pass --factory with one of:
118
+ ${listText(factories)}`
119
+ );
120
+ }
121
+ if (factories.length === 1) return factories[0];
122
+ if (factories.length === 0) {
123
+ throw new RunnerInitError("you are logged in, but this login can use no factory, so there is none to create the runner key on.");
124
+ }
125
+ throw new RunnerInitError(
126
+ `you are logged in, but no factory is chosen, and this login can use more than one. Run this again with --factory <org>/<factory> using one of:
127
+ ${listText(factories)}
128
+ Or pass --app-id with the Factory Id from the factory's Settings \u2192 General, or set OUTERLAYER_APP_ID.`
129
+ );
130
+ }
131
+ function clause(message) {
132
+ return message.replace(/\.+$/, "");
133
+ }
134
+ function withoutMintAdvice(message) {
135
+ return message.replace(/\s*Mint a fresh key[^.]*\.?/i, "");
136
+ }
137
+ function createKeyText(login) {
138
+ const page = login.keysUrl === void 0 ? "the factory's API keys page (open the factory's Settings, then the API keys tab)" : `the factory's API keys page:
139
+ ${login.keysUrl}`;
140
+ return `Create a runner key on ${page}
141
+ Choose Create API key, pick the Runner preset, and copy the key. It is shown once.`;
142
+ }
143
+ async function checkKey(key, fetchImpl) {
144
+ const unusable = (why) => new RunnerInitError(`the pasted key cannot be used: ${why}. Nothing was changed. Create a new key with the Runner preset on the page above, then run this again.`);
145
+ let data;
146
+ try {
147
+ ({ data } = await getJson(key.url, "/v1/runner/host-key", key.apiKey, key.appId, fetchImpl));
148
+ } catch (err) {
149
+ throw unusable(`the gateway did not accept it: ${clause(withoutMintAdvice(err instanceof Error ? err.message : String(err)))}`);
150
+ }
151
+ if (data.bound !== false) {
152
+ throw unusable("the gateway did not report it as a new runner key, so it is already in use on another host");
153
+ }
154
+ }
155
+ var KEY_PROMPT = "Paste the runner key, then press Enter. Nothing is shown as you paste: ";
156
+ async function obtainRunnerKey(login, opts) {
157
+ const write = opts.write ?? ((text) => void process.stdout.write(text));
158
+ const instructions = createKeyText(login);
159
+ if (opts.readKey === void 0) {
160
+ throw new RunnerInitError(
161
+ `there is no terminal to paste the runner key in, so nothing was changed.
162
+ ${instructions}
163
+ Then put the key in ${opts.configPath} as apiKey, with appId ${login.appId} and url ${login.url}, and run this again.`
164
+ );
165
+ }
166
+ write(`${login.slug === void 0 || login.note !== void 0 ? "" : `Factory ${login.slug}
167
+ `}${instructions}
168
+ `);
169
+ const pasted = await opts.readKey(KEY_PROMPT);
170
+ const apiKey = pasted.trim();
171
+ if (apiKey === "") throw new RunnerInitError("no key was pasted, so nothing was changed. Run this again and paste the runner key.");
172
+ const key = { url: login.url, apiKey, appId: login.appId };
173
+ await checkKey(key, opts.fetchImpl ?? fetch);
174
+ return key;
175
+ }
176
+
177
+ export { KEY_PROMPT, obtainRunnerKey, runnerKeyLogin };
@@ -1,28 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { runSessionSender, senderPidfile, startSessionSender } from './chunk-ONRCEE6D.js';
4
- import './chunk-U3HXXRTY.js';
5
- import './chunk-HHJDN6AU.js';
3
+ export { runSessionSender, senderPidfile, startSessionSender } from './chunk-UYOYTKE2.js';
4
+ import './chunk-JF42URPU.js';
5
+ import './chunk-ESVW4MJY.js';
6
6
  import './chunk-TBT347UY.js';
7
7
  import './chunk-IP7BIBXJ.js';
8
+ import './chunk-MQJSXHV7.js';
8
9
  import './chunk-F7CU5ABH.js';
9
10
  import './chunk-BKO6JEZI.js';
10
- import './chunk-WUYTWNMA.js';
11
- import './chunk-JXYVA45C.js';
12
- import './chunk-YRYMNBGQ.js';
13
- import './chunk-GQD22KKN.js';
11
+ import './chunk-BMYGAGBJ.js';
12
+ import './chunk-ANPNT6PM.js';
13
+ import './chunk-T2Q7ISPE.js';
14
14
  import './chunk-WZBHBH3J.js';
15
15
  import './chunk-5QRP3MVS.js';
16
- import './chunk-ZJSNLVCE.js';
17
- import './chunk-YO4PSLVB.js';
18
- import './chunk-PLMTLGYH.js';
19
- import './chunk-J5M7BSJQ.js';
16
+ import './chunk-ZRL6HKBY.js';
17
+ import './chunk-52NC2FIU.js';
18
+ import './chunk-N3CUDFCW.js';
20
19
  import './chunk-EABW6AJQ.js';
21
- import './chunk-V7NIVOFD.js';
22
- import './chunk-ZM2IMMYN.js';
23
- import './chunk-6JNURGOA.js';
20
+ import './chunk-M2ZWWTWZ.js';
21
+ import './chunk-N2PXGQRL.js';
22
+ import './chunk-BQXFBI7T.js';
23
+ import './chunk-ULSIJGLS.js';
24
+ import './chunk-G2YNJIGF.js';
24
25
  import './chunk-XCCLFVXM.js';
26
+ import './chunk-ZJSNLVCE.js';
25
27
  import './chunk-BJ3KTMDH.js';
28
+ import './chunk-CRB3POP4.js';
26
29
  import './chunk-VNVZDWO3.js';
27
30
  import './chunk-Z5GEFMRW.js';
28
31
 
@@ -0,0 +1,116 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { getJson, postJson, patchJson, WorkCommandError, resolveCredentials } from './chunk-KK4VBOH6.js';
4
+ import { autoConnect } from './chunk-WBT5X3NH.js';
5
+ import './chunk-IP7BIBXJ.js';
6
+ import './chunk-S76AYB4M.js';
7
+ import './chunk-MQJSXHV7.js';
8
+ import './chunk-BMYGAGBJ.js';
9
+ import './chunk-NACDBXUG.js';
10
+ import './chunk-GOSFARMS.js';
11
+ import './chunk-ANPNT6PM.js';
12
+ import './chunk-WZBHBH3J.js';
13
+ import { defaultFetch } from './chunk-ZRL6HKBY.js';
14
+ import './chunk-52NC2FIU.js';
15
+ import './chunk-N3CUDFCW.js';
16
+ import './chunk-EABW6AJQ.js';
17
+ import './chunk-M2ZWWTWZ.js';
18
+ import './chunk-N2PXGQRL.js';
19
+ import './chunk-BQXFBI7T.js';
20
+ import './chunk-BJ3KTMDH.js';
21
+ import './chunk-CRB3POP4.js';
22
+ import './chunk-VNVZDWO3.js';
23
+ import './chunk-Z5GEFMRW.js';
24
+ import { readFileSync } from 'fs';
25
+
26
+ createRequire(import.meta.url);
27
+ async function credentialsFor(opts, repository) {
28
+ const refusal = await autoConnect({ ...opts, repository });
29
+ if (refusal !== void 0) throw new WorkCommandError(refusal);
30
+ return resolveCredentials(opts);
31
+ }
32
+ function finish(opts, data, text) {
33
+ const output = opts.json === true ? JSON.stringify(data, null, 2) : text;
34
+ if (opts.quiet !== true) process.stdout.write(`${output}
35
+ `);
36
+ return { data, output };
37
+ }
38
+ function readBody(bodyFile) {
39
+ if (bodyFile === void 0) {
40
+ throw new WorkCommandError("no body. Pass --body-file <path>, or --body-file - to read it from standard input.");
41
+ }
42
+ let text;
43
+ try {
44
+ text = readFileSync(bodyFile === "-" ? 0 : bodyFile, "utf8");
45
+ } catch (err) {
46
+ throw new WorkCommandError(`cannot read the body from ${bodyFile === "-" ? "standard input" : bodyFile}: ${String(err)}`);
47
+ }
48
+ if (text.trim() === "") throw new WorkCommandError("the body is empty.");
49
+ return text;
50
+ }
51
+ function list(values) {
52
+ return Array.isArray(values) && values.length > 0 ? values.join(", ") : "none";
53
+ }
54
+ async function runSpecTarget(opts) {
55
+ const creds = await credentialsFor(opts);
56
+ const query = opts.tracker !== void 0 ? `?${new URLSearchParams({ tracker: opts.tracker })}` : "";
57
+ const { data } = await getJson(creds.url, `/v1/specs/target${query}`, creds.apiKey, creds.appId, opts.fetchImpl ?? defaultFetch);
58
+ const target = data;
59
+ const text = [
60
+ `tracker: ${typeof target.tracker === "string" ? target.tracker : "none chosen"}`,
61
+ `trackers: ${list(target.trackers)}`,
62
+ `scopes: ${list(target.scopes)}`,
63
+ `repositories: ${list(target.repositories)}`,
64
+ `can file: ${target.canFile === true ? "yes" : "no"}`
65
+ ].join("\n");
66
+ return finish(opts, data, text);
67
+ }
68
+ async function runSpecSearch(opts) {
69
+ const creds = await credentialsFor(opts);
70
+ const params = new URLSearchParams({ q: opts.query });
71
+ if (opts.tracker !== void 0) params.set("tracker", opts.tracker);
72
+ const { data } = await getJson(creds.url, `/v1/specs/search?${params}`, creds.apiKey, creds.appId, opts.fetchImpl ?? defaultFetch);
73
+ const issues = data.issues ?? [];
74
+ const text = issues.length === 0 ? "no matching issues" : issues.map((issue) => `${issue.state.padEnd(6)} ${issue.key} ${issue.title}
75
+ ${issue.url}`).join("\n");
76
+ return finish(opts, data, text);
77
+ }
78
+ function updatedAtLine(data) {
79
+ return typeof data.updatedAt === "string" ? [` updatedAt: ${data.updatedAt}`] : [];
80
+ }
81
+ async function runSpecFile(opts) {
82
+ const body = readBody(opts.bodyFile);
83
+ const creds = await credentialsFor(opts, opts.repo);
84
+ const payload = {
85
+ title: opts.title,
86
+ body,
87
+ ...opts.repo !== void 0 ? { repository: opts.repo } : {},
88
+ ...opts.tracker !== void 0 ? { tracker: opts.tracker } : {},
89
+ ...opts.scope !== void 0 ? { scope: opts.scope } : {}
90
+ };
91
+ const { data } = await postJson(creds.url, "/v1/specs", creds.apiKey, creds.appId, payload, opts.fetchImpl ?? defaultFetch);
92
+ const text = [
93
+ `\u2713 filed ${String(data.key)}`,
94
+ ` ${String(data.url)}`,
95
+ ...updatedAtLine(data),
96
+ ` build it with: ${String(data.workBuild)}`
97
+ ].join("\n");
98
+ return finish(opts, data, text);
99
+ }
100
+ async function runSpecEdit(opts) {
101
+ const body = readBody(opts.bodyFile);
102
+ const creds = await credentialsFor(opts);
103
+ const payload = { body, ...opts.updatedAt !== void 0 ? { expectedUpdatedAt: opts.updatedAt } : {} };
104
+ const { data } = await patchJson(
105
+ creds.url,
106
+ `/v1/specs/${encodeURIComponent(opts.key)}`,
107
+ creds.apiKey,
108
+ creds.appId,
109
+ payload,
110
+ opts.fetchImpl ?? defaultFetch
111
+ );
112
+ const text = [`\u2713 edited ${String(data.key)}`, ` ${String(data.url)}`, ...updatedAtLine(data)].join("\n");
113
+ return finish(opts, data, text);
114
+ }
115
+
116
+ export { runSpecEdit, runSpecFile, runSpecSearch, runSpecTarget };
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { POLICY_CONTENT, POLICY_PATH, StarterPackError, VALIDATORS_DIR, VALIDATOR_FILES, assertKnownTemplate, formatStarterPackOutput, installStarterPack } from './chunk-42ZI52JW.js';
4
- import './chunk-YRYMNBGQ.js';
5
- import './chunk-POJMEEJJ.js';
6
- import './chunk-OHVJA253.js';
7
- import './chunk-J5M7BSJQ.js';
3
+ export { POLICY_CONTENT, POLICY_PATH, StarterPackError, VALIDATORS_DIR, VALIDATOR_FILES, assertKnownTemplate, formatStarterPackOutput, installStarterPack } from './chunk-F4XSVQJ4.js';
4
+ import './chunk-ANPNT6PM.js';
5
+ import './chunk-MNTSH4CL.js';
6
+ import './chunk-X5N6KC6V.js';
7
+ import './chunk-N3CUDFCW.js';
8
8
  import './chunk-RA3O54FC.js';
9
+ import './chunk-CRB3POP4.js';
10
+ import './chunk-VNVZDWO3.js';
9
11
  import './chunk-Z5GEFMRW.js';
10
12
 
11
13
  createRequire(import.meta.url);