@outerlayer/cli 0.36.0-next.20261101174803 → 0.36.0-next.20261102135508

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 (206) hide show
  1. package/dist/agent-setup-Q3HDN23U.js +39 -0
  2. package/dist/agent-subcommand-Z6SOLWZW.js +25 -0
  3. package/dist/bridge-4KPODDN7.js +15 -0
  4. package/dist/build-KYXFZQ33.js +23 -0
  5. package/dist/build-disk-W6AL5WHI.js +20 -0
  6. package/dist/build-info.json +1 -1
  7. package/dist/builder-IMNOEYV7.js +19 -0
  8. package/dist/caller-NLRE272L.js +22 -0
  9. package/dist/{check-K4RVAP4L.js → check-WWX32IGY.js} +78 -74
  10. package/dist/{chunk-MKSZHT6S.js → chunk-2YC3TXWX.js} +1 -1
  11. package/dist/{chunk-QIOTIQWD.js → chunk-3UFX6KH2.js} +12 -11
  12. package/dist/{chunk-F2LPX2HS.js → chunk-3YEPLVNW.js} +8 -8
  13. package/dist/chunk-4DLJ343I.js +38 -0
  14. package/dist/{chunk-5WYT3PPE.js → chunk-4OD45RBP.js} +4 -1
  15. package/dist/{chunk-H7SKHAUE.js → chunk-4XXBV37R.js} +6 -6
  16. package/dist/{chunk-XNBUZGRO.js → chunk-6B3V6EGQ.js} +11 -9
  17. package/dist/{chunk-O36YAH2G.js → chunk-6HDXRDC5.js} +4 -4
  18. package/dist/chunk-6JLYU322.js +68 -0
  19. package/dist/{chunk-5GHJFETA.js → chunk-6KH3NMIT.js} +3010 -1196
  20. package/dist/{chunk-SPXVFFQV.js → chunk-AQE6E54X.js} +10 -9
  21. package/dist/{chunk-LGV5N5DG.js → chunk-ATKCHMFD.js} +1 -1
  22. package/dist/{chunk-7J7HRYZ3.js → chunk-B2P72DAE.js} +1 -1
  23. package/dist/{chunk-LEHBDEUG.js → chunk-B36NSEUM.js} +4 -5
  24. package/dist/{chunk-B62TYDP2.js → chunk-B5SWBFVE.js} +5 -4
  25. package/dist/chunk-BSPJI5T7.js +28 -0
  26. package/dist/{chunk-VJYSPH2J.js → chunk-BUYXEU7J.js} +26 -21
  27. package/dist/{chunk-CIUD3436.js → chunk-BZSJ77MO.js} +1 -1
  28. package/dist/{chunk-OEBFKPHK.js → chunk-CDG475ZP.js} +11 -11
  29. package/dist/{chunk-AGKQEOFS.js → chunk-CSBW4LGL.js} +54 -31
  30. package/dist/{chunk-D2OTBS47.js → chunk-CSVJGW3I.js} +2 -2
  31. package/dist/{chunk-GANAOCHR.js → chunk-CXJC3JLN.js} +25 -374
  32. package/dist/{chunk-WAZJPDR2.js → chunk-D4VGJQY7.js} +1 -1
  33. package/dist/{chunk-BRUDBWLO.js → chunk-D5I5SSPU.js} +7 -7
  34. package/dist/{chunk-KFUDKFEH.js → chunk-D6EXW4EB.js} +45 -19
  35. package/dist/{chunk-AF6DQJ5W.js → chunk-DG3M5DZU.js} +1 -1
  36. package/dist/{chunk-WT7J2627.js → chunk-DTCTXDJP.js} +1 -1
  37. package/dist/chunk-DTQPDMHG.js +654 -0
  38. package/dist/{chunk-EZRAR5YG.js → chunk-E3TP4QTM.js} +1 -1
  39. package/dist/{chunk-NFZJ5XHP.js → chunk-ENBOAE2W.js} +33 -32
  40. package/dist/{chunk-R3252UTU.js → chunk-ENMX3VQ7.js} +7 -7
  41. package/dist/{chunk-AH6634HC.js → chunk-FOSYM7TQ.js} +1 -2
  42. package/dist/{chunk-HL7UNTXO.js → chunk-FRMAQ3C4.js} +17 -10
  43. package/dist/{chunk-HAWPG7QW.js → chunk-FTP7SE6Y.js} +3 -3
  44. package/dist/{chunk-IP7BIBXJ.js → chunk-FWSVWPMS.js} +16 -7
  45. package/dist/{chunk-GLUQVET2.js → chunk-GFZ7PELR.js} +6 -6
  46. package/dist/{chunk-UZGQT6OF.js → chunk-H2NJG3TE.js} +6 -3
  47. package/dist/{chunk-46OBCATR.js → chunk-HRHWA6TZ.js} +1 -1
  48. package/dist/chunk-HTRDL42C.js +45 -0
  49. package/dist/{chunk-YBAVN6WS.js → chunk-I4DM7SNX.js} +7 -7
  50. package/dist/{chunk-24FEVLX7.js → chunk-I6U6QPN6.js} +1311 -73
  51. package/dist/{chunk-4DJZSNVT.js → chunk-IKFAJTLZ.js} +1 -1
  52. package/dist/{chunk-55PYF6S2.js → chunk-J2OMKFYB.js} +3 -3
  53. package/dist/{chunk-7Y5VW4JG.js → chunk-K2G3VB7W.js} +1 -1
  54. package/dist/chunk-K7N6LAPC.js +78 -0
  55. package/dist/{chunk-ULBVE7MP.js → chunk-KRCU66AM.js} +9 -9
  56. package/dist/{chunk-JU3VU42K.js → chunk-LHHDX7FB.js} +5 -5
  57. package/dist/{chunk-FUJUFLDC.js → chunk-LO4CK734.js} +8 -14
  58. package/dist/chunk-LSLK4RS4.js +82 -0
  59. package/dist/{chunk-ABAVN4RT.js → chunk-LSZUTI6O.js} +29 -26
  60. package/dist/chunk-MVPOYQQY.js +136 -0
  61. package/dist/{chunk-YQHEJ5SV.js → chunk-NXQK2I3G.js} +3 -3
  62. package/dist/{chunk-DJMR4YPG.js → chunk-O3MJAHLI.js} +82 -96
  63. package/dist/{chunk-B7PYT2BY.js → chunk-PBGNX3PS.js} +6 -3
  64. package/dist/{chunk-CJJDJ7AT.js → chunk-PIZA7OG2.js} +5 -3
  65. package/dist/{chunk-RIHB3HA2.js → chunk-PMA67TIN.js} +3 -3
  66. package/dist/{chunk-DJDTL6AY.js → chunk-QKOJ22OV.js} +148 -293
  67. package/dist/{chunk-RDWKRG4K.js → chunk-RF4JHGGB.js} +7 -7
  68. package/dist/{chunk-MOOZJRKM.js → chunk-SJJXDU2J.js} +27 -30
  69. package/dist/chunk-T5QBWM6M.js +113 -0
  70. package/dist/{chunk-W7I65BKE.js → chunk-TJIFYV2Z.js} +12 -12
  71. package/dist/{chunk-EBOQU6QC.js → chunk-TKY3SDXH.js} +6 -6
  72. package/dist/{chunk-ALEUIS35.js → chunk-ULBYRPAP.js} +1 -1
  73. package/dist/{chunk-ZP7F3OHV.js → chunk-URHS76GV.js} +48 -38
  74. package/dist/{chunk-X2XTCGUS.js → chunk-VAYVTUU4.js} +11 -12
  75. package/dist/{chunk-TSYHUUAT.js → chunk-VUH7KKVD.js} +3 -3
  76. package/dist/{chunk-RIIPBJK6.js → chunk-WACPWYMH.js} +4 -4
  77. package/dist/{chunk-AAGU5FJF.js → chunk-WGC7UFRM.js} +1 -1
  78. package/dist/{chunk-2SRQSGPR.js → chunk-WVAXJOWG.js} +30 -24
  79. package/dist/{chunk-KLXECBIE.js → chunk-XEWG4AB2.js} +151 -108
  80. package/dist/{chunk-KDK6AF7B.js → chunk-XIDDJSQU.js} +7 -6
  81. package/dist/{chunk-MXIFRYLA.js → chunk-Y4E7IS7H.js} +2 -2
  82. package/dist/{chunk-DHFNBNC3.js → chunk-YJQ7YA7J.js} +5 -5
  83. package/dist/{chunk-6A2GEFN3.js → chunk-YMVRCSKD.js} +4 -4
  84. package/dist/{chunk-JW5BENE6.js → chunk-YYQ5NOT5.js} +3 -3
  85. package/dist/chunk-ZHQC43NH.js +130 -0
  86. package/dist/{chunk-KB5B6ZT5.js → chunk-ZSRMJOAK.js} +20 -20
  87. package/dist/{claude-launcher-L77BKZOC.js → claude-launcher-LGKJZH33.js} +99 -120
  88. package/dist/{cli-QQY5UECM.js → cli-Q5L64EEG.js} +327 -298
  89. package/dist/{cli-update-notice-T3CXRWNB.js → cli-update-notice-AWYJ4A7R.js} +2 -2
  90. package/dist/{command-QLHQZ32L.js → command-CGEFJZNC.js} +65 -64
  91. package/dist/{config-5GY7FL35.js → config-T22KVOOT.js} +14 -10
  92. package/dist/connect-cmd-RUBP466E.js +28 -0
  93. package/dist/{container-start-OCJODSMB.js → container-start-JRF3SBUA.js} +65 -62
  94. package/dist/{context-cleanup-A7KBEBIO.js → context-cleanup-3K2AOECJ.js} +6 -2
  95. package/dist/{context-show-cmd-MZ74ZIVO.js → context-show-cmd-4UXO5WQJ.js} +18 -16
  96. package/dist/{control-plane-launch-3TZFOSCX.js → control-plane-launch-AAH4YH56.js} +31 -27
  97. package/dist/{demo-record-cmd-Y57UWBCX.js → demo-record-cmd-2OKCGST7.js} +10 -5
  98. package/dist/{demo-voice-cmd-4INIOVTC.js → demo-voice-cmd-GEPX7GIG.js} +27 -27
  99. package/dist/{dist-6KGTCWKR.js → dist-VVZIGSAF.js} +1 -1
  100. package/dist/docker-5VWK335X.js +19 -0
  101. package/dist/{doctor-DB2AJUAO.js → doctor-EQM3JRZI.js} +81 -76
  102. package/dist/emit-artifact-cmd-TA3MPHLU.js +43 -0
  103. package/dist/{emit-cmd-IOWTTZSA.js → emit-cmd-RO4L4PFZ.js} +9 -8
  104. package/dist/emit-criteria-cmd-NMTUV2KM.js +34 -0
  105. package/dist/emit-demo-cmd-Y2Y6LEL7.js +46 -0
  106. package/dist/{emit-finding-cmd-KQIGM5IF.js → emit-finding-cmd-VECM64UR.js} +20 -19
  107. package/dist/{emit-result-cmd-6Q7OU2NY.js → emit-result-cmd-2ERWFDUN.js} +25 -24
  108. package/dist/{emit-step-cmd-GZU5O2FR.js → emit-step-cmd-V2ET66N4.js} +20 -19
  109. package/dist/exec-client-54XKNPTI.js +16 -0
  110. package/dist/find-unit-CNAPU7XQ.js +23 -0
  111. package/dist/{findings-cmd-T7PQAVJG.js → findings-cmd-QJPPF6BY.js} +20 -19
  112. package/dist/{fleet-readiness-PTMOEX6L.js → fleet-readiness-DKAPHAZN.js} +16 -15
  113. package/dist/governing-source-7PZ6DAJU.js +40 -0
  114. package/dist/guest-init-5QZRGP62.js +18 -0
  115. package/dist/{hook-fast-RW7RU3O6.js → hook-fast-VXROB4KF.js} +7 -5
  116. package/dist/hook-install-GDNRMML4.js +14 -0
  117. package/dist/{hook-wrap-fast-545QJSBJ.js → hook-wrap-fast-LWWKKPGK.js} +4 -2
  118. package/dist/host-checks-WAPO5X7X.js +78 -0
  119. package/dist/host-key-HLLV37NV.js +16 -0
  120. package/dist/image-tag-PBWQBATH.js +17 -0
  121. package/dist/index.js +8 -9
  122. package/dist/init-EK3PUU6W.js +78 -0
  123. package/dist/{init-HUQLVUPO.js → init-Y2URPVVY.js} +62 -59
  124. package/dist/{init-cmd-6NQGBVAJ.js → init-cmd-XNANUDIW.js} +38 -33
  125. package/dist/{init-update-MA6QKX46.js → init-update-EFCTKF6D.js} +55 -46
  126. package/dist/install-cmd-RHFUZFV4.js +19 -0
  127. package/dist/layout-7XMC7S6K.js +13 -0
  128. package/dist/{logs-FEITSC2V.js → logs-E7MGQINH.js} +10 -3
  129. package/dist/loop-L6TX6OR4.js +89 -0
  130. package/dist/machine-VJKAY2GX.js +78 -0
  131. package/dist/{machine-skills-237PQFRC.js → machine-skills-HR4RNRNR.js} +5 -4
  132. package/dist/{mcp-install-cmd-23ZY4IBK.js → mcp-install-cmd-SMPLT43Q.js} +7 -1
  133. package/dist/{mcp-serve-cmd-ZINYSLY6.js → mcp-serve-cmd-XXERT673.js} +11 -7
  134. package/dist/{paths-XEYE7OZ2.js → paths-F2ZR2EKC.js} +10 -3
  135. package/dist/pending-VOFQRXP4.js +16 -0
  136. package/dist/pidfile-7M7O2M7T.js +17 -0
  137. package/dist/record-YCJ6DZOY.js +16 -0
  138. package/dist/{relay-IEYNSKAZ.js → relay-I2T43PPB.js} +8 -1
  139. package/dist/relay-protocol-GI2GC2AM.js +13 -0
  140. package/dist/runner-env-YW55JVU7.js +23 -0
  141. package/dist/runner-identity-Y5ZFCC7V.js +19 -0
  142. package/dist/{runner-key-CFZ47PR3.js → runner-key-R47C6374.js} +54 -54
  143. package/dist/session-sender-UPACLRGG.js +43 -0
  144. package/dist/{shell-function-NRD4KVUK.js → shell-function-GYD2ZQQG.js} +2 -1
  145. package/dist/{spec-cmd-CNASSB6L.js → spec-cmd-7QRE2SZK.js} +21 -20
  146. package/dist/{starter-pack-CCVIEY72.js → starter-pack-IMKIUA56.js} +7 -6
  147. package/dist/state-VAHBIMS5.js +16 -0
  148. package/dist/{status-VNHIHQ57.js → status-BQEYEG2V.js} +54 -54
  149. package/dist/{statusline-fast-E7RWVREA.js → statusline-fast-NUVHCNRX.js} +4 -2
  150. package/dist/{sync-cmd-5JLJBODH.js → sync-cmd-NBLYEPQG.js} +25 -24
  151. package/dist/update-steps-VGKNGWTZ.js +79 -0
  152. package/dist/{watch-AEWWTUEK.js → watch-IHV4V3HZ.js} +25 -24
  153. package/dist/{work-claim-cmd-GUYOJYH7.js → work-claim-cmd-WGTSU5IT.js} +24 -24
  154. package/dist/{work-cmd-YRPYMGII.js → work-cmd-HKOJU5FJ.js} +18 -17
  155. package/dist/{work-comment-cmd-U5Z6FKEU.js → work-comment-cmd-H3JCWQ2J.js} +21 -20
  156. package/dist/{work-demo-cmd-OLCWTVWM.js → work-demo-cmd-J4AZAIVP.js} +18 -17
  157. package/dist/{work-launch-TTGSHLY4.js → work-launch-LWDQXLGI.js} +1 -1
  158. package/dist/{work-logs-cmd-2OA7ENDU.js → work-logs-cmd-UOO4JVLG.js} +18 -17
  159. package/dist/{work-open-pr-cmd-6GUCDYVM.js → work-open-pr-cmd-QFRDDBAM.js} +20 -19
  160. package/dist/{work-pr-cmd-KK3VQUQI.js → work-pr-cmd-3Q2D5RQT.js} +19 -18
  161. package/dist/{work-proofs-cmd-BUOS5OJC.js → work-proofs-cmd-7Y3HGT7C.js} +21 -20
  162. package/dist/{work-proofs-record-6WLMOK53.js → work-proofs-record-QPUM6DY4.js} +31 -31
  163. package/dist/{work-stop-cmd-VZJX5X4L.js → work-stop-cmd-SD2ZRMSY.js} +18 -17
  164. package/package.json +1 -1
  165. package/dist/agent-setup-DJRQFPDU.js +0 -33
  166. package/dist/bridge-XM4QLKIX.js +0 -8
  167. package/dist/build-ZE5IG3V6.js +0 -18
  168. package/dist/build-disk-GMXDIZU4.js +0 -15
  169. package/dist/builder-LJ3FSB36.js +0 -14
  170. package/dist/caller-YLNJJPFU.js +0 -18
  171. package/dist/chunk-CXFJOX2C.js +0 -144
  172. package/dist/chunk-FGF52V4V.js +0 -137
  173. package/dist/chunk-HCVLP7XA.js +0 -53
  174. package/dist/chunk-KYDEBGJG.js +0 -402
  175. package/dist/chunk-MESOOLF4.js +0 -45
  176. package/dist/chunk-OHQMGLJP.js +0 -113
  177. package/dist/chunk-OUPQTA7N.js +0 -145
  178. package/dist/chunk-VRMXYQWR.js +0 -74
  179. package/dist/connect-cmd-THV7XBVP.js +0 -27
  180. package/dist/docker-5YVUZ3J2.js +0 -14
  181. package/dist/emit-artifact-cmd-H27MFSKH.js +0 -42
  182. package/dist/emit-criteria-cmd-IOUVMB2Q.js +0 -33
  183. package/dist/emit-demo-cmd-WJSS7KU2.js +0 -46
  184. package/dist/exec-client-FGGPQSYQ.js +0 -9
  185. package/dist/find-unit-PRZIFBIK.js +0 -19
  186. package/dist/governing-source-CND5ZZC3.js +0 -39
  187. package/dist/guest-init-WPUS45IN.js +0 -11
  188. package/dist/host-checks-S3B7Z4SY.js +0 -78
  189. package/dist/host-key-O4DFMOSV.js +0 -9
  190. package/dist/image-tag-WBD57QBN.js +0 -10
  191. package/dist/init-ILTX4V56.js +0 -78
  192. package/dist/install-cmd-JKPXIOEY.js +0 -12
  193. package/dist/layout-2ZMCT2D3.js +0 -11
  194. package/dist/loop-KDWDOSMQ.js +0 -89
  195. package/dist/machine-Z6K5XXI6.js +0 -78
  196. package/dist/pending-D2NNV54J.js +0 -9
  197. package/dist/pidfile-FLFVRKVW.js +0 -10
  198. package/dist/record-JMZOXD4R.js +0 -9
  199. package/dist/relay-protocol-5LSWUJCW.js +0 -6
  200. package/dist/runner-env-W2UMHY7P.js +0 -19
  201. package/dist/runner-identity-IIY5UJL3.js +0 -14
  202. package/dist/session-sender-NO4F2IQ5.js +0 -42
  203. package/dist/settings-XB2HYBKO.js +0 -7
  204. package/dist/state-UWIM42JH.js +0 -9
  205. package/dist/update-steps-XGOXDCOS.js +0 -79
  206. package/dist/{chunk-OLM2TIOW.js → chunk-NFZMENCY.js} +1 -1
@@ -1,34 +1,34 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-7Y5VW4JG.js';
3
+ import { writePendingUpdate } from './chunk-E3TP4QTM.js';
4
+ import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-K2G3VB7W.js';
4
5
  import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
5
6
  import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
6
- import { reportFailedStart, fitImageBuildMemory } from './chunk-BRUDBWLO.js';
7
- import { renderUpdateSteps } from './chunk-JW5BENE6.js';
7
+ import { reportFailedStart, fitImageBuildMemory } from './chunk-D5I5SSPU.js';
8
+ import { renderUpdateSteps } from './chunk-YYQ5NOT5.js';
8
9
  import { RUNNER_PROTOCOL } from './chunk-L2BA2HXM.js';
9
- import { writeFleetState } from './chunk-LGV5N5DG.js';
10
- import { writePendingUpdate } from './chunk-EZRAR5YG.js';
11
- import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-VJYSPH2J.js';
12
- import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-AF6DQJ5W.js';
13
- import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, releaseLease, LEASE_SECONDS, itemTag, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, createLeaseChannel, serveLease, vmAlive, writeGuestGhConfig, shellQuote, deliverJobFiles, inTeardown } from './chunk-KLXECBIE.js';
14
- import { RepoFilter } from './chunk-QIOTIQWD.js';
10
+ import { writeFleetState } from './chunk-ATKCHMFD.js';
11
+ import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-BUYXEU7J.js';
12
+ import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-DG3M5DZU.js';
13
+ import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, releaseLease, LEASE_SECONDS, itemTag, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, createLeaseChannel, serveLease, vmAlive, writeGuestGhConfig, shellQuote, deliverJobFiles, inTeardown } from './chunk-XEWG4AB2.js';
14
+ import { RUNNER_RESERVE_BYTES } from './chunk-CSBW4LGL.js';
15
+ import { RepoFilter } from './chunk-3UFX6KH2.js';
15
16
  import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
16
- import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-ALEUIS35.js';
17
+ import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-ULBYRPAP.js';
17
18
  import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
18
- import { RUNNER_RESERVE_BYTES } from './chunk-AGKQEOFS.js';
19
- import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-WAZJPDR2.js';
20
- import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-F2LPX2HS.js';
19
+ import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls } from './chunk-CSVJGW3I.js';
20
+ import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-D4VGJQY7.js';
21
21
  import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
22
- import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls } from './chunk-D2OTBS47.js';
23
- import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-RIIPBJK6.js';
24
- import { allocatedBytes, freeBytes, formatBytes } from './chunk-MXIFRYLA.js';
25
- import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-OEBFKPHK.js';
26
- import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-SPXVFFQV.js';
27
- import { loadHostKey, ensureHostKey, signerFor } from './chunk-4DJZSNVT.js';
22
+ import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-3YEPLVNW.js';
23
+ import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-WACPWYMH.js';
24
+ import { allocatedBytes, freeBytes, formatBytes } from './chunk-Y4E7IS7H.js';
25
+ import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-CDG475ZP.js';
26
+ import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-AQE6E54X.js';
27
+ import { loadHostKey, ensureHostKey, signerFor } from './chunk-IKFAJTLZ.js';
28
+ import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-DTCTXDJP.js';
29
+ import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT } from './chunk-CXJC3JLN.js';
30
+ import { COMMAND_LOST_REASON, takeAgentCredentials, runnerAgents, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-DTQPDMHG.js';
28
31
  import { resolveVersion } from './chunk-RA3O54FC.js';
29
- import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-WT7J2627.js';
30
- import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT, takeClaudeCredential, heldClaudeCredential, currentClaudeCredential, fdName } from './chunk-GANAOCHR.js';
31
- import { COMMAND_LOST_REASON, CONTAINER_STOPPED_REASON } from './chunk-MESOOLF4.js';
32
32
  import { mkdirSync, existsSync, chmodSync, writeFileSync, renameSync, statSync, readdirSync, readFileSync, rmSync, closeSync } from 'fs';
33
33
  import { join, dirname } from 'path';
34
34
  import { randomBytes, createHash } from 'crypto';
@@ -808,8 +808,8 @@ async function prepareUpdate(args) {
808
808
  return finish(args, retryFailure(version, err));
809
809
  }
810
810
  if (!verified.ok) return finish(args, { outcome: verified.outcome, reason: verified.reason });
811
- const held = currentClaudeCredential(process.env);
812
- const stagedEnv = held === void 0 ? void 0 : { ...process.env, [held.variable]: held.value };
811
+ const held = runnerAgents().flatMap((agent) => currentAgentCredential(process.env, agent.descriptor.id) ?? []);
812
+ const stagedEnv = held.length === 0 ? void 0 : { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
813
813
  const staged = await deps.runNode([entryIn(verified.dir), "runner", "check", "--config", configPath], verified.dir, stagedEnv);
814
814
  if (staged.status !== 0) {
815
815
  removeStaging(verified.dir);
@@ -1197,7 +1197,7 @@ function leaseTimeLeftFor(state, active) {
1197
1197
  return () => (state.deps.leaseTimeLeftMs ?? leaseTimeLeftMs)(active.job, nowOf(state).getTime());
1198
1198
  }
1199
1199
  function runtimeOf(state) {
1200
- state.containerRuntime ??= createContainerRuntime(withTunnelLog(state.deps.container, (line) => logOf(state).line(line)));
1200
+ state.containerRuntime ??= createContainerRuntime({ agents: state.deps.agents, ...withTunnelLog(state.deps.container, (line) => logOf(state).line(line)) });
1201
1201
  return state.containerRuntime;
1202
1202
  }
1203
1203
  function finishDepsOf(state) {
@@ -2173,7 +2173,7 @@ var CLAIM_REFUSAL_CODES = new Set(
2173
2173
  "pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
2174
2174
  );
2175
2175
  async function tryClaimAndStart(state, item, queue) {
2176
- const { postJson: postJson2 } = await import('./work-cmd-YRPYMGII.js');
2176
+ const { postJson: postJson2 } = await import('./work-cmd-HKOJU5FJ.js');
2177
2177
  const log = logOf(state);
2178
2178
  const hostKey = await loadHostKey(state.config.configPath);
2179
2179
  const claim = await retrySend(
@@ -2349,6 +2349,7 @@ async function prepareSession(state, active, item, queue, tag) {
2349
2349
  workItemId: item.id,
2350
2350
  queue,
2351
2351
  builtin,
2352
+ requireScrubNote: state.config.managed === true,
2352
2353
  restore: async ({ dir, meta }) => {
2353
2354
  if (job.microvm !== void 0) await restoreSessionIntoMicroVm(runtimeOf(state), job.microvm, dir, meta);
2354
2355
  else if (job.container !== void 0) await restoreSessionIntoContainer(runtimeOf(state), job.container, dir, meta);
@@ -2691,7 +2692,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
2691
2692
  if (active.ending) return;
2692
2693
  writeJobFile(jobFilePath, active.job);
2693
2694
  if (named.exec !== void 0 && named.recipe !== void 0) {
2694
- const lifecycleEnv = hostCommandEnvironment(jobEnv(claimCalls(state.config, active.job), item.number, itemKey, dirPath, process.env, branch, identity?.author, spoolHomeFor(state.config, active.job)), build.state, state.config, void 0, noteOnce);
2695
+ const lifecycleEnv = hostCommandEnvironment(jobEnv(claimCalls(state.config, active.job), item.number, itemKey, dirPath, process.env, branch, identity?.author, spoolHomeFor(state.config, active.job)), build.state, state.config, void 0, noteOnce, state.deps.agents);
2695
2696
  for (const step of lifecycleSteps(named.recipe.apply.lifecycle)) {
2696
2697
  if (active.ending) return;
2697
2698
  log.line(`${tag} lifecycle ${step.name} (${step.source})`);
@@ -2789,7 +2790,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
2789
2790
  }
2790
2791
  } else {
2791
2792
  const build = job.build;
2792
- const commandEnv = hostCommandEnvironment(jobEnv(claimCalls(state.config, active.job), item.number, itemKey, dirPath, process.env, branch, identity?.author, spoolHomeFor(state.config, active.job)), build, state.config, identity?.hooksPath, noteOnce);
2793
+ const commandEnv = hostCommandEnvironment(jobEnv(claimCalls(state.config, active.job), item.number, itemKey, dirPath, process.env, branch, identity?.author, spoolHomeFor(state.config, active.job)), build, state.config, identity?.hooksPath, noteOnce, state.deps.agents);
2793
2794
  running = build.exec === void 0 ? runCommand(cmdline, commandEnv, workdir, join(dirPath, "command.log"), state.deps.spawnFn) : runCommand(execCommandLine(build.exec, workdir, cmdline), commandEnv, dirPath, join(dirPath, "command.log"), state.deps.spawnFn);
2794
2795
  }
2795
2796
  } catch (err) {
@@ -3535,16 +3536,16 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
3535
3536
  }
3536
3537
  async function startRunner(configPath, deps, startup) {
3537
3538
  const log = deps.log ??= createRunnerLog(deps.now ?? (() => /* @__PURE__ */ new Date()));
3538
- takeClaudeCredential(process.env, hooksOf(configPath));
3539
+ takeAgentCredentials(process.env, hooksOf(configPath), deps.agents);
3539
3540
  const update = deps.update;
3540
3541
  if (update !== void 0) {
3541
3542
  const outcome = await onStartUnderMarker({
3542
3543
  configPath,
3543
3544
  own: ownVersionOf(deps),
3544
3545
  check: update.check ? () => update.check(configPath) : async () => {
3545
- const held = heldClaudeCredential();
3546
- const env = held === void 0 ? process.env : { ...process.env, [held.variable]: held.value };
3547
- return (await import('./check-K4RVAP4L.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
3546
+ const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
3547
+ const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
3548
+ return (await import('./check-WWX32IGY.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
3548
3549
  },
3549
3550
  now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
3550
3551
  log
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { launchRefusalForSession } from './chunk-AAGU5FJF.js';
4
- import { detectActiveSession } from './chunk-IP7BIBXJ.js';
5
- import { autoConnect } from './chunk-TSYHUUAT.js';
6
- import { C } from './chunk-2AM6Z5BP.js';
3
+ import { launchRefusalForSession } from './chunk-WGC7UFRM.js';
4
+ import { detectActiveSession } from './chunk-FWSVWPMS.js';
5
+ import { autoConnect } from './chunk-VUH7KKVD.js';
7
6
  import { acquireSpoolLockAt } from './chunk-P6PHY33P.js';
8
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-YQHEJ5SV.js';
9
- import { resolveRepoIdentity } from './chunk-5GHJFETA.js';
10
- import { launchedItemForSession } from './chunk-5WYT3PPE.js';
7
+ import { resolveRepoIdentity } from './chunk-6KH3NMIT.js';
8
+ import { C } from './chunk-2AM6Z5BP.js';
9
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-NXQK2I3G.js';
10
+ import { launchedItemForSession } from './chunk-4OD45RBP.js';
11
11
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
12
12
  import { StepNameSchema, StepBodySchema } from './chunk-WUKLQWGY.js';
13
13
  import { homeFromEnv } from './chunk-352DHUTP.js';
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { sanitizeTerminal } from './chunk-P6PHY33P.js';
4
- import { resolvePackRoot } from './chunk-CXFJOX2C.js';
5
- import { parseProofsConfig } from './chunk-24FEVLX7.js';
4
+ import { resolvePackRoot, parseProofsConfig } from './chunk-I6U6QPN6.js';
6
5
  import { CHECK_ITEM_REASON_MAX_LENGTH, CheckItemsSchema } from './chunk-WUKLQWGY.js';
7
6
  import { createHash } from 'crypto';
8
7
  import { join } from 'path';
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { DEFAULT_DASHBOARD } from './chunk-TPMLB3VZ.js';
4
3
  import { sanitizeTerminal } from './chunk-P6PHY33P.js';
5
- import { isAgentsMdLayout } from './chunk-KFUDKFEH.js';
6
- import { cliFetch, resolveGatewayCredentials } from './chunk-YQHEJ5SV.js';
4
+ import { remoteLookupFailed } from './chunk-6KH3NMIT.js';
5
+ import { mcpFiles, skillLinkFolders, isAgentsMdLayout } from './chunk-D6EXW4EB.js';
6
+ import { DEFAULT_DASHBOARD } from './chunk-TPMLB3VZ.js';
7
+ import { cliFetch, resolveGatewayCredentials } from './chunk-NXQK2I3G.js';
7
8
  import { readCloudConfig } from './chunk-HWVMRETT.js';
8
9
  import { findGitDirs, writeRepoConnection, readRepoConnection } from './chunk-BJ3KTMDH.js';
9
- import { remoteLookupFailed } from './chunk-5GHJFETA.js';
10
10
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
11
+ import { defaultAgents } from './chunk-I6U6QPN6.js';
11
12
  import { execFileSync } from 'child_process';
12
13
  import { lstatSync } from 'fs';
13
14
  import { join, relative } from 'path';
@@ -64,18 +65,24 @@ Then run \`${cliInvocation()} connect\` again.
64
65
  // src/connect-cmd.ts
65
66
  var REQUEST_TIMEOUT_MS = 15e3;
66
67
  var COMMIT_LINE = "Commit and push .outerlayer/ so the factory reads your policy and skills. No checks run on a pull request until the policy is on the branch it targets.";
67
- var AGENTS_LAYOUT_COMMIT_LINE = "Commit and push .outerlayer/, AGENTS.md, .agents/, .mcp.json and .claude/skills so the factory reads your policy and skills. No checks run on a pull request until the policy is on the branch it targets.";
68
+ function listWithAnd(items) {
69
+ return items.length < 2 ? items.join("") : `${items.slice(0, -1).join(", ")} and ${items.at(-1)}`;
70
+ }
71
+ function agentsLayoutCommitLine(agents = defaultAgents()) {
72
+ const items = [".outerlayer/", "AGENTS.md", ".agents/", ...mcpFiles(agents), ...skillLinkFolders(agents)];
73
+ return `Commit and push ${listWithAnd(items)} so the factory reads your policy and skills. No checks run on a pull request until the policy is on the branch it targets.`;
74
+ }
68
75
  var COMMIT_PATHS = [":/.outerlayer"];
69
- var AGENTS_LAYOUT_COMMIT_PATHS = [":/.outerlayer", ":/AGENTS.md", ":/.agents", ":/.mcp.json", ":/.claude/skills"];
76
+ var agentsLayoutCommitPaths = (agents) => [":/.outerlayer", ":/AGENTS.md", ":/.agents", ...mcpFiles(agents).map((file) => `:/${file}`), ...skillLinkFolders(agents).map((folder) => `:/${folder}`)];
70
77
  function inAgentsMdLayout(cwd) {
71
78
  const dirs = findGitDirs(cwd);
72
79
  return dirs !== void 0 && isAgentsMdLayout(dirs.repoRoot);
73
80
  }
74
81
  function commitLineFor(cwd) {
75
- return inAgentsMdLayout(cwd) ? AGENTS_LAYOUT_COMMIT_LINE : COMMIT_LINE;
82
+ return inAgentsMdLayout(cwd) ? agentsLayoutCommitLine() : COMMIT_LINE;
76
83
  }
77
84
  function setupPathsFor(root) {
78
- return isAgentsMdLayout(root) ? ["AGENTS.md", ".agents", ".claude/skills", ".mcp.json", ".outerlayer"] : [".outerlayer"];
85
+ return isAgentsMdLayout(root) ? ["AGENTS.md", ".agents", ...skillLinkFolders(), ...mcpFiles(), ".outerlayer"] : [".outerlayer"];
79
86
  }
80
87
  var MAX_IGNORED_NAMED = 10;
81
88
  function gitOutput(root, args) {
@@ -132,7 +139,7 @@ function commitCommandsFor(cwd) {
132
139
  return lines.join("\n");
133
140
  }
134
141
  function hasUncommittedPolicy(cwd) {
135
- const paths = inAgentsMdLayout(cwd) ? AGENTS_LAYOUT_COMMIT_PATHS : COMMIT_PATHS;
142
+ const paths = inAgentsMdLayout(cwd) ? agentsLayoutCommitPaths(defaultAgents()) : COMMIT_PATHS;
136
143
  try {
137
144
  const status = execFileSync("git", ["status", "--porcelain", "--untracked-files=all", "--", ...paths], {
138
145
  cwd,
@@ -389,4 +396,4 @@ ${commitLineFor(deps.cwd)}
389
396
  return r.code;
390
397
  }
391
398
 
392
- export { AGENTS_LAYOUT_COMMIT_LINE, COMMIT_LINE, autoConnectedLine, commitCommandsFor, commitLineFor, dashboardBase, fetchFactories, hasUncommittedPolicy, isLinkedRepository, listText, promptOnTerminal, realConnectDeps, runConnect, runConnectCommand, saveFactoryConnection, selectFactory, slug, workPageUrl };
399
+ export { COMMIT_LINE, agentsLayoutCommitLine, autoConnectedLine, commitCommandsFor, commitLineFor, dashboardBase, fetchFactories, hasUncommittedPolicy, isLinkedRepository, listText, listWithAnd, promptOnTerminal, realConnectDeps, runConnect, runConnectCommand, saveFactoryConnection, selectFactory, slug, workPageUrl };
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { helperSocketPath } from './chunk-KLXECBIE.js';
4
- import { UNIT_MARKER } from './chunk-AGKQEOFS.js';
5
- import { runnerDir } from './chunk-WT7J2627.js';
3
+ import { helperSocketPath } from './chunk-XEWG4AB2.js';
4
+ import { UNIT_MARKER } from './chunk-CSBW4LGL.js';
5
+ import { runnerDir } from './chunk-DTCTXDJP.js';
6
6
  import { createHash } from 'crypto';
7
7
  import { join } from 'path';
8
8
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
+ import { defaultAgents } from './chunk-I6U6QPN6.js';
3
4
  import { openSync, fstatSync, readSync, closeSync } from 'fs';
4
5
  import { join } from 'path';
5
6
 
@@ -22,8 +23,20 @@ var readTail = (path, maxBytes) => {
22
23
  return void 0;
23
24
  }
24
25
  };
26
+ function endedEventNames(env, agents) {
27
+ const names = /* @__PURE__ */ new Set();
28
+ for (const agent of agents) {
29
+ const lifecycle = agent.adapter.lifecycle;
30
+ if (lifecycle === void 0 || !lifecycle.detectInSession(env) || lifecycle.source.kind !== "hook-process") continue;
31
+ const { codec } = lifecycle.source;
32
+ for (const name of codec.events) if (codec.decode(name, "").kind === "session-ended") names.add(name);
33
+ }
34
+ return names;
35
+ }
25
36
  function detectActiveSession(opts) {
26
- if (!opts.env.CLAUDECODE) return void 0;
37
+ const agents = opts.agents ?? defaultAgents();
38
+ if (!agents.some((agent) => agent.adapter.lifecycle?.detectInSession(opts.env) === true)) return void 0;
39
+ const endNames = endedEventNames(opts.env, agents);
27
40
  const read = opts.readTailImpl ?? readTail;
28
41
  const tail = read(join(opts.home, ".outerlayer", "spool", "events.jsonl"), SESSION_DETECT_TAIL_BYTES);
29
42
  if (!tail || tail.data.length === 0) return void 0;
@@ -40,15 +53,11 @@ function detectActiveSession(opts) {
40
53
  }
41
54
  }
42
55
  const ended = /* @__PURE__ */ new Set();
43
- for (const record of records) {
44
- if (record.event === "SessionEnd" && typeof record.sessionId === "string" && record.sessionId !== "") {
45
- ended.add(record.sessionId);
46
- }
47
- }
56
+ for (const record of records) if (endNames.has(record.event)) ended.add(record.sessionId);
48
57
  let newest;
49
58
  for (const record of records) {
50
59
  if (typeof record.sessionId !== "string" || record.sessionId === "") continue;
51
- if (record.event === "SessionEnd" || ended.has(record.sessionId)) continue;
60
+ if (ended.has(record.sessionId)) continue;
52
61
  if (typeof record.cwd !== "string" || !opts.cwds.includes(record.cwd)) continue;
53
62
  if (typeof record.t !== "string") continue;
54
63
  const tMs = Date.parse(record.t);
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { launchRefusalForSession } from './chunk-AAGU5FJF.js';
4
- import { detectActiveSession } from './chunk-IP7BIBXJ.js';
5
- import { autoConnect } from './chunk-TSYHUUAT.js';
3
+ import { launchRefusalForSession } from './chunk-WGC7UFRM.js';
4
+ import { detectActiveSession } from './chunk-FWSVWPMS.js';
5
+ import { autoConnect } from './chunk-VUH7KKVD.js';
6
+ import { resolveRepoIdentity } from './chunk-6KH3NMIT.js';
6
7
  import { C } from './chunk-2AM6Z5BP.js';
7
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-YQHEJ5SV.js';
8
- import { resolveRepoIdentity } from './chunk-5GHJFETA.js';
9
- import { launchedItemForSession } from './chunk-5WYT3PPE.js';
8
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-NXQK2I3G.js';
9
+ import { launchedItemForSession } from './chunk-4OD45RBP.js';
10
10
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
11
11
  import { CriteriaListSchema } from './chunk-WUKLQWGY.js';
12
12
  import { homeFromEnv } from './chunk-352DHUTP.js';
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RELAY_PORT, GATEWAY_SOCKET, GATEWAY_PORT, CLAUDE_SOCKET, CLAUDE_PORT, DESTINATION_BASE_PORT } from './chunk-GANAOCHR.js';
3
+ import { RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-CXJC3JLN.js';
4
+ import { GATEWAY_SOCKET, GATEWAY_PORT, providerDestinations } from './chunk-DTQPDMHG.js';
5
+ import { defaultAgents } from './chunk-I6U6QPN6.js';
6
+ import { PROVIDERS } from './chunk-LSLK4RS4.js';
4
7
  import { symlinkSync, unlinkSync } from 'fs';
5
8
  import { join } from 'path';
6
9
 
@@ -10,13 +13,13 @@ var LEASE_PORT = 3125;
10
13
  var GUEST_CID = 3;
11
14
  var MAX_SOCKET_PATH = 107;
12
15
  var LEASE_LINK = { port: LEASE_PORT, socket: "lease.sock" };
13
- function vsockLinks(input) {
16
+ function vsockLinks(input, agents = defaultAgents(), providers = PROVIDERS) {
14
17
  return [
15
18
  { port: RELAY_PORT, socket: "tunnel.sock" },
16
19
  ...Array.from({ length: input.destinations }, (_unused, index) => ({ port: DESTINATION_BASE_PORT + index, socket: `dest-${index}.sock` })),
17
20
  ...input.builtIns ? [
18
21
  { port: GATEWAY_PORT, socket: GATEWAY_SOCKET },
19
- { port: CLAUDE_PORT, socket: CLAUDE_SOCKET }
22
+ ...providerDestinations(agents, providers).map((destination) => ({ port: destination.port, socket: destination.socket }))
20
23
  ] : []
21
24
  ];
22
25
  }
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { EXEC_PORT } from './chunk-UZGQT6OF.js';
3
+ import { EXEC_PORT } from './chunk-H2NJG3TE.js';
4
4
  import { createConnection } from 'net';
5
5
 
6
6
  createRequire(import.meta.url);
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { readSettingsText, SettingsParseError, cliForInstall } from './chunk-ZHQC43NH.js';
4
+ import { legacyAgent, defaultAgents, HookTextError } from './chunk-I6U6QPN6.js';
5
+
6
+ createRequire(import.meta.url);
7
+
8
+ // src/hook-install.ts
9
+ function installAgents(agents = defaultAgents()) {
10
+ const found = agents.flatMap((entry) => {
11
+ const lifecycle = entry.adapter.lifecycle;
12
+ if (lifecycle?.install === void 0) return [];
13
+ return [{ entry, install: lifecycle.install, events: lifecycle.source.kind === "hook-process" ? lifecycle.source.codec.events : [] }];
14
+ });
15
+ const legacyId = legacyAgent(agents).descriptor.id;
16
+ return [...found.filter((agent) => agent.entry.descriptor.id === legacyId), ...found.filter((agent) => agent.entry.descriptor.id !== legacyId)];
17
+ }
18
+ function settingsFileOf(agent, scope, where) {
19
+ return agent.install.settingsFile(scope, where);
20
+ }
21
+ function withSettingsText(path, change) {
22
+ const text = readSettingsText(path);
23
+ try {
24
+ return change(text);
25
+ } catch (err) {
26
+ if (err instanceof HookTextError) throw new SettingsParseError(path, err.cause);
27
+ throw err;
28
+ }
29
+ }
30
+ function hookRegistered(event, where, agents = defaultAgents()) {
31
+ const agent = installAgents(agents).find((candidate) => candidate.entry.descriptor.id === legacyAgent(agents).descriptor.id);
32
+ if (agent === void 0) return void 0;
33
+ const cli = cliForInstall();
34
+ let found = false;
35
+ let registered = false;
36
+ for (const scope of ["user", "project"]) {
37
+ const text = readSettingsText(agent.install.settingsFile(scope, where));
38
+ if (text === void 0) continue;
39
+ found = true;
40
+ if (agent.install.installed(text, cli).events.includes(event)) registered = true;
41
+ }
42
+ return found ? registered : void 0;
43
+ }
44
+
45
+ export { hookRegistered, installAgents, settingsFileOf, withSettingsText };
@@ -2,7 +2,8 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { recordReportedCost } from './chunk-BKO6JEZI.js';
4
4
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
5
- import { decodeWrappedCommand } from './chunk-KYDEBGJG.js';
5
+ import { decodeWrappedCommand } from './chunk-ZHQC43NH.js';
6
+ import { hookCodec } from './chunk-T5QBWM6M.js';
6
7
  import { homeFromEnv } from './chunk-352DHUTP.js';
7
8
  import { readFileSync } from 'fs';
8
9
  import { spawn } from 'child_process';
@@ -28,10 +29,9 @@ function fmtUsd(n) {
28
29
  if (n >= 100) return `$${Math.round(n).toLocaleString("en-US")}`;
29
30
  return `$${n.toFixed(2)}`;
30
31
  }
31
- function parseStatuslineStdin(text) {
32
+ function parseStatuslineStdin(text, codec = hookCodec()) {
32
33
  try {
33
- const parsed = text ? JSON.parse(text) : {};
34
- return parsed && typeof parsed === "object" ? parsed : {};
34
+ return codec.statusLine?.(text) ?? {};
35
35
  } catch {
36
36
  return {};
37
37
  }
@@ -52,7 +52,7 @@ function stateFresh(state, now) {
52
52
  }
53
53
  function renderStatusline(stdin, state, now) {
54
54
  const segments = [];
55
- const sessionCost = stdin.cost?.total_cost_usd;
55
+ const sessionCost = stdin.costUsd;
56
56
  if (Number.isFinite(sessionCost)) {
57
57
  segments.push(`${fmtUsd(sessionCost)} session`);
58
58
  }
@@ -134,8 +134,8 @@ async function runStatuslineFast(args, opts = {}) {
134
134
  const home = opts.home ?? homeFromEnv();
135
135
  const now = (opts.now ?? Date.now)();
136
136
  const stdinText = (opts.read ?? readStdin)();
137
- const stdin = parseStatuslineStdin(stdinText);
138
- recordReportedCost(home, stdin.session_id, stdin.cost?.total_cost_usd);
137
+ const stdin = parseStatuslineStdin(stdinText, opts.codec);
138
+ recordReportedCost(home, stdin.sessionId, stdin.costUsd);
139
139
  const state = readStatuslineState(home);
140
140
  const ourLine = renderStatusline(stdin, state, now);
141
141
  const { wrapId } = parseStatuslineArgs(args);