@outerlayer/cli 0.26.4 → 0.27.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 (117) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +12 -9
  3. package/dist/{agent-setup-5DXPEO64.js → agent-setup-UW36TAQM.js} +11 -11
  4. package/dist/{bridge-5KZ36YDG.js → bridge-B5VJVECY.js} +2 -2
  5. package/dist/{build-F5QWH7G5.js → build-TNM7HYCA.js} +4 -4
  6. package/dist/build-info.json +1 -1
  7. package/dist/{builder-KDUXCHTY.js → builder-LDJGS2JC.js} +5 -5
  8. package/dist/{check-ZSYCR5WG.js → check-JVBAWIN6.js} +40 -39
  9. package/dist/{chunk-GFHLEVUE.js → chunk-24ID7EQ2.js} +6 -3
  10. package/dist/{chunk-H57M3HC7.js → chunk-2F762IXY.js} +2 -2
  11. package/dist/{chunk-2K3TCQHW.js → chunk-2I3LIRZP.js} +26 -8
  12. package/dist/{chunk-6CGXSMKX.js → chunk-55GNQPO6.js} +17 -6
  13. package/dist/{chunk-MWPBF2XG.js → chunk-6KKM7VGZ.js} +32 -4
  14. package/dist/{chunk-VPEGE3QZ.js → chunk-6TRNCUM4.js} +1 -1
  15. package/dist/{chunk-6SPXKRQR.js → chunk-7AQ5AM7U.js} +12 -5
  16. package/dist/{chunk-HBISTTG3.js → chunk-7OUOLGUV.js} +20 -5
  17. package/dist/{chunk-NWPRNKZ5.js → chunk-ABXQBEYK.js} +1 -1
  18. package/dist/chunk-BM7EC3OZ.js +181 -0
  19. package/dist/{chunk-4UFSTKE5.js → chunk-BPKO76QR.js} +4 -4
  20. package/dist/{chunk-MCSINUVC.js → chunk-BWH36FOC.js} +1 -1
  21. package/dist/{chunk-IZAOO5AR.js → chunk-D7ECMB7B.js} +4 -4
  22. package/dist/{chunk-UZEQVPKF.js → chunk-DJHNEGNM.js} +27 -3
  23. package/dist/{chunk-O4362FPA.js → chunk-E5IJ5533.js} +2 -2
  24. package/dist/{chunk-JWRX5ZTT.js → chunk-EPPIISRD.js} +2 -2
  25. package/dist/{chunk-KNBWOL2B.js → chunk-FP23SVDD.js} +5 -5
  26. package/dist/{chunk-6WTAYEKJ.js → chunk-G3EZA6MK.js} +55 -7
  27. package/dist/{chunk-VGHKTSHU.js → chunk-GFUE5TKO.js} +3 -3
  28. package/dist/{chunk-XLC7KEUV.js → chunk-GLUKDQS4.js} +1 -1
  29. package/dist/{chunk-QUP6CVBQ.js → chunk-JH2GQU5T.js} +4 -4
  30. package/dist/{chunk-JKNYTNYD.js → chunk-LOKSLO25.js} +1 -1
  31. package/dist/{chunk-2J46BQ5Y.js → chunk-M3MHHIUW.js} +1 -1
  32. package/dist/{chunk-7Z2WMXM5.js → chunk-MATUHHN4.js} +1 -1
  33. package/dist/{chunk-MQ743JX3.js → chunk-MHX7YX7Y.js} +1 -1
  34. package/dist/{chunk-PZA6ZFYW.js → chunk-N4D5TMVU.js} +2 -2
  35. package/dist/{chunk-WK35HB56.js → chunk-O2IJTY7L.js} +2 -2
  36. package/dist/{chunk-K4FXNMV5.js → chunk-QHH4OSD4.js} +1 -1
  37. package/dist/{chunk-OQUD3UYF.js → chunk-QIVOTQOQ.js} +5 -5
  38. package/dist/{chunk-Y4BXRVDI.js → chunk-QKIQ2R7F.js} +3 -3
  39. package/dist/{chunk-F3BBEBPL.js → chunk-RHAGBUL5.js} +1 -1
  40. package/dist/{chunk-OFTFW7TH.js → chunk-RHGF73IU.js} +1 -1
  41. package/dist/{chunk-27RDUTQH.js → chunk-RK7FWC6B.js} +194 -38
  42. package/dist/{chunk-6MZSX4M7.js → chunk-STSLH5EJ.js} +3 -1
  43. package/dist/{chunk-ZMZGWLYD.js → chunk-TXHJ7BGR.js} +13 -13
  44. package/dist/{chunk-EHBDYLM6.js → chunk-UQYBCJ2L.js} +2 -2
  45. package/dist/{chunk-VQ7OAG6H.js → chunk-VS27BP3E.js} +4 -4
  46. package/dist/{chunk-OZKEEXVH.js → chunk-WSYXLLA5.js} +6 -6
  47. package/dist/{chunk-WX2WEERU.js → chunk-WUL2OP5A.js} +3 -3
  48. package/dist/{chunk-UOGQZQXN.js → chunk-WVDP6HVZ.js} +6 -6
  49. package/dist/{chunk-MXTN35XN.js → chunk-XBPUTQ7E.js} +1 -1
  50. package/dist/{chunk-UNF7MWEL.js → chunk-XS3FDWSZ.js} +1 -1
  51. package/dist/{chunk-VJBFQP3H.js → chunk-XZ6Q6ZNR.js} +9 -5
  52. package/dist/{chunk-GWRDL75D.js → chunk-Y4OKEFAX.js} +1 -1
  53. package/dist/{chunk-Q2SVLBMI.js → chunk-Y7ZCHBYB.js} +2 -2
  54. package/dist/chunk-YB3CSYXX.js +95 -0
  55. package/dist/{chunk-SBW4K3XZ.js → chunk-YF56R4DV.js} +75 -29
  56. package/dist/chunk-YJLHUKYS.js +38 -0
  57. package/dist/{chunk-V3YJFEZA.js → chunk-ZXRWMOJ3.js} +274 -45
  58. package/dist/{claude-launcher-TTLTS4N6.js → claude-launcher-TKX4WCUN.js} +8 -4
  59. package/dist/{cli-SKF3AMZ5.js → cli-XVXQDKZT.js} +133 -127
  60. package/dist/{command-E5OG5NCH.js → command-B2T7VR77.js} +29 -28
  61. package/dist/{config-JJ3EO7SB.js → config-TWS5VZEN.js} +3 -3
  62. package/dist/{connect-cmd-SL4S5HJM.js → connect-cmd-HGS7YPA2.js} +7 -7
  63. package/dist/{container-start-IA2HK4QI.js → container-start-JE7HTKZG.js} +28 -27
  64. package/dist/{control-plane-launch-JIQOE6BP.js → control-plane-launch-DBQA3KLJ.js} +8 -8
  65. package/dist/{docker-KKE5Q5S2.js → docker-MJEEHUUA.js} +5 -5
  66. package/dist/{doctor-U2N7AF3N.js → doctor-6ZIF2BRZ.js} +180 -33
  67. package/dist/{emit-artifact-cmd-SDG5H6D7.js → emit-artifact-cmd-ALDK55Y2.js} +11 -11
  68. package/dist/{emit-cmd-WQH2NK7H.js → emit-cmd-VAQHRWJR.js} +4 -4
  69. package/dist/{emit-criteria-cmd-QGSP77AG.js → emit-criteria-cmd-Q7SM6VP2.js} +8 -8
  70. package/dist/{emit-finding-cmd-6FGMTEFM.js → emit-finding-cmd-2NBAPDSV.js} +8 -8
  71. package/dist/{emit-result-cmd-AUPIXPEU.js → emit-result-cmd-KUSL56RI.js} +11 -11
  72. package/dist/{emit-step-cmd-PORHEKHN.js → emit-step-cmd-KD4AKEAT.js} +9 -9
  73. package/dist/{exec-client-J6L5FDRR.js → exec-client-6WVS7DRZ.js} +3 -3
  74. package/dist/{governing-source-YPBK4H5H.js → governing-source-VVUA5TKB.js} +13 -13
  75. package/dist/{guest-init-CXIHA5VI.js → guest-init-H5K2RW3P.js} +4 -4
  76. package/dist/{hook-fast-XMZFMBKC.js → hook-fast-3SUJM765.js} +1 -1
  77. package/dist/{host-key-GQFBRX3J.js → host-key-XNKZCWTS.js} +3 -3
  78. package/dist/{image-tag-W4JKVNP4.js → image-tag-R34J4O3F.js} +3 -3
  79. package/dist/index.js +4 -4
  80. package/dist/{init-GEFKJNJU.js → init-ETKGFCXR.js} +28 -27
  81. package/dist/{init-Y64OAKKQ.js → init-Q2RPUUVP.js} +29 -28
  82. package/dist/{init-cmd-YR4LLIRU.js → init-cmd-M6MQRGOU.js} +15 -14
  83. package/dist/{init-update-46G6QJHB.js → init-update-N4HTZGVS.js} +55 -26
  84. package/dist/{inspect-6UYAAXH7.js → inspect-IPFA7AAT.js} +1 -1
  85. package/dist/{install-AFMXH25X.js → install-6OIY3KHZ.js} +6 -5
  86. package/dist/{install-cmd-X5XCUTSX.js → install-cmd-JMT67P35.js} +5 -5
  87. package/dist/{layout-UOJQGEPW.js → layout-XNFDTOET.js} +2 -2
  88. package/dist/{logs-PKNQOJN6.js → logs-XHAS6LMZ.js} +2 -2
  89. package/dist/{loop-3TJKFRN7.js → loop-2Y4CUFNP.js} +40 -39
  90. package/dist/{machine-3W4LKTEW.js → machine-Z2S47JW7.js} +23 -22
  91. package/dist/machine-skills-RRF4HLAD.js +11 -0
  92. package/dist/{mcp-serve-cmd-MJIJHSQ6.js → mcp-serve-cmd-LY5A3CE7.js} +4 -4
  93. package/dist/{paths-6V7572NN.js → paths-LHSPNORF.js} +2 -2
  94. package/dist/{pending-GUHHKO42.js → pending-3YZCSKON.js} +3 -3
  95. package/dist/{pidfile-ZQOFDY7T.js → pidfile-DKMYYXLH.js} +3 -3
  96. package/dist/{record-C4ZVSLKV.js → record-3LPTY3G5.js} +3 -3
  97. package/dist/{runner-env-6Q2RMENH.js → runner-env-YRRNRKF4.js} +8 -7
  98. package/dist/{runner-identity-DP577A7S.js → runner-identity-EX7HXPUE.js} +5 -5
  99. package/dist/{runner-key-LR5P2EJ5.js → runner-key-GO277GW2.js} +28 -27
  100. package/dist/{session-sender-ZTPWIU5L.js → session-sender-SC5PSU2G.js} +12 -12
  101. package/dist/{spec-cmd-RLZMX67G.js → spec-cmd-JGYHHJ4P.js} +9 -9
  102. package/dist/{starter-pack-55EFILC5.js → starter-pack-GPU4X6B7.js} +2 -2
  103. package/dist/{status-GNUOTHRH.js → status-CJCE2FHD.js} +30 -29
  104. package/dist/{sync-cmd-GLWEAULP.js → sync-cmd-ATXJVS7S.js} +11 -11
  105. package/dist/{watch-F47NPUDX.js → watch-M7NR3DOW.js} +11 -11
  106. package/dist/{work-claim-cmd-GXPIRRBG.js → work-claim-cmd-DNUDZKJA.js} +13 -13
  107. package/dist/{work-cmd-S2FHIFJA.js → work-cmd-VECTYST6.js} +9 -9
  108. package/dist/{work-comment-cmd-UJRKULO6.js → work-comment-cmd-F3NRWKPZ.js} +9 -9
  109. package/dist/{work-logs-cmd-SCAHJXSP.js → work-logs-cmd-QF6P32FE.js} +9 -9
  110. package/dist/{work-open-pr-cmd-BGMHUQGD.js → work-open-pr-cmd-XE23JA3R.js} +10 -10
  111. package/dist/{work-pr-cmd-EDDRP5DK.js → work-pr-cmd-BH56GUKN.js} +9 -9
  112. package/dist/{work-stop-cmd-ADE5K6UX.js → work-stop-cmd-C3F5HNUO.js} +9 -9
  113. package/package.json +1 -1
  114. package/skill-pack/maintained/outerlayer-cli/SKILL.md +6 -5
  115. package/skill-pack/shipped.json +1 -0
  116. package/skill-pack/template/build/SKILL.md +1 -1
  117. package/dist/chunk-7RQ73DLO.js +0 -23
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-EHBDYLM6.js';
4
- import { MIN_ENGINE_MAJOR } from './chunk-SBW4K3XZ.js';
5
- import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-VGHKTSHU.js';
6
- import { runnerCredentialProblem } from './chunk-JWRX5ZTT.js';
7
- import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-F3BBEBPL.js';
3
+ import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-UQYBCJ2L.js';
4
+ import { MIN_ENGINE_MAJOR } from './chunk-YF56R4DV.js';
5
+ import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-GFUE5TKO.js';
6
+ import { runnerCredentialProblem } from './chunk-EPPIISRD.js';
7
+ import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-RHAGBUL5.js';
8
8
  import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
9
9
  import { dirname } from 'path';
10
10
 
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { launcherPath, writeLauncher, LauncherWriteError, pathNotes } from './chunk-K4FXNMV5.js';
4
- import { currentVersion, currentLink, isInLayout, packageRootIn, versionDir, switchCurrent, execStartLine } from './chunk-7Z2WMXM5.js';
3
+ import { launcherPath, writeLauncher, LauncherWriteError, pathNotes } from './chunk-QHH4OSD4.js';
4
+ import { currentVersion, currentLink, isInLayout, packageRootIn, versionDir, switchCurrent, execStartLine } from './chunk-MATUHHN4.js';
5
5
  import { compareVersions } from './chunk-TQMI335S.js';
6
- import { RUNNER_DIR_MODE } from './chunk-F3BBEBPL.js';
6
+ import { RUNNER_DIR_MODE } from './chunk-RHAGBUL5.js';
7
7
  import { realpathSync, readFileSync, mkdirSync, rmSync, cpSync, existsSync } from 'fs';
8
8
  import { dirname, sep, join } from 'path';
9
9
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { BUILD_HOME } from './chunk-2K3TCQHW.js';
3
+ import { BUILD_HOME } from './chunk-2I3LIRZP.js';
4
4
  import { join, dirname } from 'path';
5
5
 
6
6
  createRequire(import.meta.url);
@@ -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-F3BBEBPL.js';
3
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-RHAGBUL5.js';
4
4
  import { readFileSync, existsSync, rmSync, mkdirSync, writeFileSync, renameSync } from 'fs';
5
5
  import { join } from 'path';
6
6
 
@@ -1,48 +1,50 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-ZVB57WI6.js';
4
- import { senderPidfile } from './chunk-Q2SVLBMI.js';
5
- import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-MWPBF2XG.js';
6
- import { writeDockerClientConfig } from './chunk-UNF7MWEL.js';
7
- import { installScrubContext } from './chunk-VQ7OAG6H.js';
8
- import { ADDED_USER, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, resolveAgentUser, AgentUserError, runBuildSteps, shellQuote, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, helperFirecrackerNote, HelperRefusal, GH_CONFIG_YML, ghHostsYml, isLiteralAddress, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, copyJudgeTree } from './chunk-SBW4K3XZ.js';
9
- import { readBranchHead, fetchCommit, diffBetween } from './chunk-GFHLEVUE.js';
4
+ import { senderPidfile } from './chunk-Y7ZCHBYB.js';
5
+ import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-6KKM7VGZ.js';
6
+ import { writeDockerClientConfig } from './chunk-XS3FDWSZ.js';
7
+ import { installScrubContext } from './chunk-VS27BP3E.js';
8
+ import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, resolveAgentUser, AgentUserError, runBuildSteps, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, helperFirecrackerNote, HelperRefusal, isLiteralAddress, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, copyJudgeTree } from './chunk-YF56R4DV.js';
9
+ import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, keptContextTree } from './chunk-WSYXLLA5.js';
10
+ import { fdName } from './chunk-YB3CSYXX.js';
11
+ import { readBranchHead, fetchCommit, diffBetween } from './chunk-24ID7EQ2.js';
10
12
  import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
11
- import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, COMMAND_DIR, childEnvironment, judgeCommand, JUDGE_MAX_TURNS, MAX_REPORT_BYTES, JUDGE_DIR } from './chunk-QUP6CVBQ.js';
13
+ import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, childEnvironment, judgeCommand, JUDGE_MAX_TURNS, MAX_REPORT_BYTES, JUDGE_DIR, COMMAND_DIR } from './chunk-JH2GQU5T.js';
12
14
  import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-B6K7R5UY.js';
13
- import { waitForAgent, vmExecArgs } from './chunk-MXTN35XN.js';
14
- import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-XLC7KEUV.js';
15
- import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, keptContextTree } from './chunk-OZKEEXVH.js';
16
- import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-6CGXSMKX.js';
15
+ import { waitForAgent, vmExecArgs } from './chunk-XBPUTQ7E.js';
16
+ import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-GLUKDQS4.js';
17
+ import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-55GNQPO6.js';
17
18
  import { planArtifactUpload } from './chunk-BUP5N3X6.js';
18
- import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-JWRX5ZTT.js';
19
- import { parseSize } from './chunk-7RQ73DLO.js';
19
+ import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-EPPIISRD.js';
20
+ import { parseSize } from './chunk-YJLHUKYS.js';
21
+ import { resolvePackRoot, MAINTAINED_SKILLS } from './chunk-7OUOLGUV.js';
20
22
  import { scrubText } from './chunk-QE3UQAHK.js';
21
23
  import { readCloudConfig } from './chunk-PJDQPF5N.js';
22
- import { resolvePackRoot } from './chunk-HBISTTG3.js';
23
24
  import { parsePolicy } from './chunk-RKOTJQVG.js';
24
25
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
25
26
  import { resolveVersion } from './chunk-RA3O54FC.js';
26
- import { signerFor } from './chunk-GWRDL75D.js';
27
- import { RUNNER_FILE_MODE, runnerDir, buildDir, vsockPath } from './chunk-F3BBEBPL.js';
28
- import { claudeCredential, repositoriesOf, primaryOf, buildEnvironment, JOB_MOUNT, CHECKOUT_DIR, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, authorEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, checkEnvironment, EVAL_INPUT_DIR } from './chunk-2K3TCQHW.js';
27
+ import { signerFor } from './chunk-Y4OKEFAX.js';
28
+ import { RUNNER_FILE_MODE, runnerDir, buildDir, vsockPath } from './chunk-RHAGBUL5.js';
29
+ import { JOB_MOUNT, claudeCredential, repositoriesOf, primaryOf, buildEnvironment, CHECKOUT_DIR, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, authorEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, checkEnvironment, EVAL_INPUT_DIR } from './chunk-2I3LIRZP.js';
29
30
  import { RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON } from './chunk-JGD5TWQ2.js';
30
- import { existsSync, statSync, appendFileSync, mkdirSync, chmodSync, writeFileSync, accessSync, constants, openSync, readFileSync, closeSync, rmSync, readdirSync, linkSync, lstatSync, fstatSync, readSync, realpathSync } from 'fs';
31
+ import { existsSync, statSync, appendFileSync, rmSync, mkdirSync, chmodSync, writeFileSync, accessSync, constants, openSync, readFileSync, closeSync, readdirSync, linkSync, lstatSync, fstatSync, readSync, realpathSync } from 'fs';
31
32
  import { join, isAbsolute, dirname, delimiter, sep } from 'path';
32
- import { spawn, spawnSync } from 'child_process';
33
- import { randomBytes, createHash } from 'crypto';
34
33
  import { once } from 'events';
35
34
  import { createServer } from 'net';
35
+ import { spawn, spawnSync } from 'child_process';
36
+ import { randomBytes, createHash } from 'crypto';
36
37
  import { pathToFileURL } from 'url';
37
38
 
38
39
  createRequire(import.meta.url);
39
40
  var PROBE_TIMEOUT_MS = 3e4;
40
41
  var PROBE_BYTES = 256 * 1024;
41
- var PROBE_SCRIPT = `d=${COMMAND_DIR}
42
+ function probeScript(dir, alive) {
43
+ return `d=${dir}
42
44
  code=$(cat "$d/exit-code" 2>/dev/null | tr -d ' \\r\\n')
43
45
  pid=$(cat "$d/command.pid" 2>/dev/null | tr -d ' \\r\\n')
44
46
  alive=0
45
- if [ -n "$pid" ] && grep -qa build-command "/proc/$pid/cmdline" 2>/dev/null; then alive=1; fi
47
+ if [ -n "$pid" ] && ${alive}; then alive=1; fi
46
48
  size=$(wc -c < "$d/command.log" 2>/dev/null || echo 0)
47
49
  size=$(echo $size)
48
50
  echo "OL-COMMAND exit=$code alive=$alive size=$size"
@@ -51,8 +53,10 @@ if [ "$n" -gt "$2" ]; then n=$2; fi
51
53
  if [ "$n" -gt 0 ]; then tail -c +$(($1 + 1)) "$d/command.log" | head -c "$n" | base64 | tr -d '\\n'; fi
52
54
  echo
53
55
  `;
54
- function probeArgv(offset) {
55
- return ["/bin/sh", "-c", PROBE_SCRIPT, "probe", String(offset), String(PROBE_BYTES)];
56
+ }
57
+ var PROBE_SCRIPT = probeScript(COMMAND_DIR, 'grep -qa build-command "/proc/$pid/cmdline" 2>/dev/null');
58
+ function probeArgv(offset, script = PROBE_SCRIPT) {
59
+ return ["/bin/sh", "-c", script, "probe", String(offset), String(PROBE_BYTES)];
56
60
  }
57
61
  function parseProbe(stdout) {
58
62
  const [header = "", body = ""] = stdout.split("\n");
@@ -97,14 +101,19 @@ function judgeProbe(probe, missedBefore) {
97
101
  if (probe.alive) return { kind: "running" };
98
102
  return missedBefore ? { kind: "lost" } : { kind: "recheck" };
99
103
  }
100
- async function serveLease(socketPath, channel, makeServer = createServer) {
104
+ async function serveLease(socketPath, channel, makeServer = createServer, listenOn) {
101
105
  const server = makeServer((socket) => channel.accept(socket));
102
- rmSync(socketPath, { force: true });
103
- server.listen(socketPath);
104
- await once(server, "listening");
106
+ if (listenOn === void 0) {
107
+ rmSync(socketPath, { force: true });
108
+ server.listen(socketPath);
109
+ await once(server, "listening");
110
+ } else {
111
+ await listenOn(server);
112
+ }
105
113
  server.on("error", () => void 0);
106
114
  return {
107
115
  ...channel,
116
+ listener: server,
108
117
  close() {
109
118
  channel.close();
110
119
  server.close();
@@ -112,6 +121,57 @@ async function serveLease(socketPath, channel, makeServer = createServer) {
112
121
  }
113
122
  };
114
123
  }
124
+
125
+ // src/runner/microvm/command-state.ts
126
+ var MICROVM_COMMAND_DIR = "/build/.command";
127
+ var SCRIPT = probeScript(MICROVM_COMMAND_DIR, '[ -d "/proc/$pid" ]');
128
+ var GUEST_PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
129
+ var STOP_COMMAND_SCRIPT = `pid=$(cat ${MICROVM_COMMAND_DIR}/command.pid 2>/dev/null | tr -d ' \\r\\n'); [ -n "$pid" ] && kill -KILL "-$pid" 2>/dev/null; true`;
130
+ var EXEC_TIMEOUT_MS = 3e4;
131
+ var ABORT_GRACE_MS = 5e3;
132
+ async function withinTime(exec) {
133
+ const controller = new AbortController();
134
+ let abortTimer;
135
+ let graceTimer;
136
+ const deadline = new Promise((_resolve, reject) => {
137
+ abortTimer = setTimeout(() => {
138
+ controller.abort();
139
+ graceTimer = setTimeout(() => reject(new Error("the guest did not end the exec after it was aborted")), ABORT_GRACE_MS);
140
+ }, EXEC_TIMEOUT_MS);
141
+ });
142
+ try {
143
+ return await Promise.race([exec(controller.signal), deadline]);
144
+ } finally {
145
+ clearTimeout(abortTimer);
146
+ clearTimeout(graceTimer);
147
+ }
148
+ }
149
+ async function probeMicroVmCommand(runtime, state, offset) {
150
+ try {
151
+ const result = await withinTime(
152
+ (signal) => runtime.vm.exec(state.vsockPath, { argv: probeArgv(offset, SCRIPT), user: state.agentUser ?? ADDED_USER, cwd: "/", env: { PATH: GUEST_PATH } }, { signal })
153
+ );
154
+ return result.status === 0 ? parseProbe(result.stdout) : void 0;
155
+ } catch {
156
+ return void 0;
157
+ }
158
+ }
159
+ var MAX_TAIL_READS2 = 8;
160
+ async function copyMicroVmLogTail(runtime, state, jobDir) {
161
+ for (let reads = 0; reads < MAX_TAIL_READS2; reads++) {
162
+ const offset = commandLogOffset(jobDir, state.commandLogBase);
163
+ const probe = await probeMicroVmCommand(runtime, state, offset);
164
+ if (probe === void 0) return false;
165
+ appendCommandLog(jobDir, probe.bytes);
166
+ if (probe.bytes.length === 0 || offset + probe.bytes.length >= probe.size) return true;
167
+ }
168
+ return false;
169
+ }
170
+ async function stopMicroVmCommand(runtime, state) {
171
+ await withinTime(
172
+ (signal) => runtime.vm.exec(state.vsockPath, { argv: ["/bin/sh", "-c", STOP_COMMAND_SCRIPT], user: "root", cwd: "/", env: { PATH: GUEST_PATH } }, { signal })
173
+ );
174
+ }
115
175
  function unitNameFor(buildId) {
116
176
  return `outerlayer-build-${buildId}`;
117
177
  }
@@ -256,6 +316,30 @@ async function microVmOomKills(runtime, state) {
256
316
  if (state.jailed !== void 0) return helperKills(runtime, state);
257
317
  return 0;
258
318
  }
319
+ var socketNameOf = (file) => file.replace(/\.sock$/, "");
320
+ async function keepSockets(runtime, buildId, listeners, leaseServer, line, error) {
321
+ const store = runtime.vm.fdStore;
322
+ const status = await store.status();
323
+ if (!status.ok) {
324
+ line(`this build ends with its runner: ${status.reason}`);
325
+ return [];
326
+ }
327
+ const sockets = Object.entries(listeners);
328
+ if (leaseServer !== void 0) sockets.push([LEASE_LINK.socket, leaseServer]);
329
+ const stored = [];
330
+ try {
331
+ for (const [file, server] of sockets) {
332
+ const name = fdName(buildId, socketNameOf(file));
333
+ await store.push(name, server);
334
+ stored.push(name);
335
+ }
336
+ } catch (err) {
337
+ error(`this build ends with its runner: its sockets could not be kept for the next one: ${describeCallFailure(err)}`);
338
+ for (const name of stored) await store.remove(name).catch(() => void 0);
339
+ return [];
340
+ }
341
+ return stored;
342
+ }
259
343
  async function provisionMicroVm(input) {
260
344
  const { config, runtime, item, itemKey, jobDir, log, tokens } = input;
261
345
  const { vm } = runtime;
@@ -363,9 +447,11 @@ async function provisionMicroVm(input) {
363
447
  mkdirSync(buildDir2, { recursive: true, mode: 448 });
364
448
  chmodSync(buildDir2, 448);
365
449
  makeBuildsDirPrivate(buildDir2);
450
+ let services;
366
451
  try {
367
452
  const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, log: (line) => log.line(`${tag} ${line}`) });
368
- runtime.tunnels.set(buildId, await startServicesFor(runtime, config, buildDir2, jobDir, itemKey, true, gitRemote));
453
+ services = await startServicesFor(runtime, config, buildDir2, jobDir, itemKey, true, gitRemote);
454
+ runtime.tunnels.set(buildId, services);
369
455
  } catch (err) {
370
456
  return bail(`the tunnel could not start: ${describeCallFailure(err)}`);
371
457
  }
@@ -376,11 +462,13 @@ async function provisionMicroVm(input) {
376
462
  };
377
463
  const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: true });
378
464
  const served = input.leaseTimeLeftMs === void 0 ? links : [...links, LEASE_LINK];
465
+ let leaseServer;
379
466
  if (input.leaseTimeLeftMs !== void 0) {
380
467
  try {
381
468
  const channel = createLeaseChannel(input.leaseTimeLeftMs);
382
469
  const served2 = await serveLease(join(buildDir2, LEASE_LINK.socket), { ...channel, accept: (stream) => runtime.leases.get(buildId)?.accept(stream) });
383
470
  runtime.leases.set(buildId, { ...channel, close: served2.close });
471
+ leaseServer = served2.listener;
384
472
  } catch (err) {
385
473
  return bail(`the lease stream could not start: ${describeCallFailure(err)}`);
386
474
  }
@@ -430,6 +518,11 @@ async function provisionMicroVm(input) {
430
518
  } catch (err) {
431
519
  return bail(`the microVM did not start under the jailer: ${describeCallFailure(err)}`);
432
520
  }
521
+ const kept = await keepSockets(runtime, buildId, services.listeners, leaseServer, (line) => log.line(`${tag} ${line}`), (line) => log.error(`${tag} ${line}`));
522
+ if (kept.length > 0) {
523
+ state.fdStore = kept;
524
+ input.save(state, environment);
525
+ }
433
526
  } else {
434
527
  try {
435
528
  state.firecracker = await vm.firecracker.spawn({ binary: assets.firecracker, configPath, consolePath, cgroup: state.cgroup });
@@ -606,6 +699,38 @@ function microVmCommandLine(input) {
606
699
  const { options, env } = vmExecFor(input, ["/bin/sh", "-c", commandWithShim(input.job, input.cmdline)]);
607
700
  return { line: [process.execPath, input.cli, "vm-exec", ...vmExecArgs(options)].map(shellQuote).join(" "), options, env };
608
701
  }
702
+ async function startMicroVmCommand(input) {
703
+ const state = input.job.microvm;
704
+ const env = buildEnvironment({
705
+ config: input.config,
706
+ item: input.job.item,
707
+ itemKey: input.job.itemKey,
708
+ branch: input.job.branch,
709
+ repository: state.repository,
710
+ repositories: input.job.repositories,
711
+ hostEnv: input.runtime.hostEnv,
712
+ containerEnv: state.containerEnv ?? {},
713
+ builtIns: state.builtIns === true,
714
+ identity: input.job.commitIdentity,
715
+ imageEnv: state.imageEnv
716
+ });
717
+ const started = await input.runtime.vm.exec(state.vsockPath, {
718
+ argv: ["/bin/sh", "-c", commandWithShim(input.job, input.cmdline)],
719
+ user: state.agentUser ?? ADDED_USER,
720
+ cwd: CHECKOUT_DIR,
721
+ env: execEnvironment(state.imageEnv, env),
722
+ detach: state.commandDir ?? MICROVM_COMMAND_DIR
723
+ });
724
+ if (started.status !== 0) {
725
+ const said = firstLine(started.stderr);
726
+ throw new Error(`the guest's exec agent exited ${started.status}${said === "" ? "" : `: ${said}`}`);
727
+ }
728
+ }
729
+ async function endMicroVmCommand(runtime, state, jobDir, onError) {
730
+ if (!vmAlive(runtime, state)) return;
731
+ await copyMicroVmLogTail(runtime, state, jobDir).catch((err) => onError(`copying the end of the command's log failed: ${describeCallFailure(err)} \xB7 continuing`));
732
+ await stopMicroVmCommand(runtime, state).catch((err) => onError(`ending the command in the microVM failed: ${describeCallFailure(err)} \xB7 continuing`));
733
+ }
609
734
  function microVmSenderCommand(input) {
610
735
  const { options, env } = vmExecFor(input, ["outerlayer", "session-sender"]);
611
736
  return { command: process.execPath, args: [input.cli, "vm-exec", ...vmExecArgs(options)], env };
@@ -954,6 +1079,7 @@ async function cleanupMicroVm(runtime, state, jobDir) {
954
1079
  runtime.tunnels.delete(state.buildId);
955
1080
  await tunnel.close();
956
1081
  }
1082
+ for (const name of state.fdStore ?? []) await runtime.vm.fdStore.remove(name).catch(() => void 0);
957
1083
  rmSync(state.buildDir, { recursive: true, force: true });
958
1084
  if (failures.length > 0) throw new Error(failures.join("; "));
959
1085
  }
@@ -961,7 +1087,9 @@ async function stopOrphanedMicroVms(input) {
961
1087
  const stopped = [];
962
1088
  const report = (line) => input.onError?.(line);
963
1089
  const jailedByJobs = [];
1090
+ const kept = input.keep ?? /* @__PURE__ */ new Set();
964
1091
  for (const { job } of input.jobs) {
1092
+ if (job.microvm !== void 0 && kept.has(job.microvm.buildId)) continue;
965
1093
  const states = [job.microvm, job.checkMicrovm].filter((state) => state !== void 0);
966
1094
  if (states.length === 0) continue;
967
1095
  if (job.pid !== void 0 && job.start !== void 0 && isSameProcess(job.pid, job.start)) {
@@ -997,6 +1125,7 @@ async function stopOrphanedMicroVms(input) {
997
1125
  return stopped;
998
1126
  }
999
1127
  for (const build of builds) {
1128
+ if (kept.has(build)) continue;
1000
1129
  try {
1001
1130
  await probe.client.stop(build);
1002
1131
  } catch (err) {
@@ -1429,6 +1558,18 @@ function readInside(root, rel) {
1429
1558
  return void 0;
1430
1559
  }
1431
1560
  }
1561
+ var MAINTAINED_BRIEF = /^\.(?:agents|outerlayer)\/skills\/(outerlayer-[a-z]+)\/([A-Za-z0-9_./-]+)$/;
1562
+ function readBrief(root, brief) {
1563
+ const own = readInside(root, brief);
1564
+ if (own !== void 0) return own;
1565
+ const match = MAINTAINED_BRIEF.exec(brief);
1566
+ if (match === null || match[2].split("/").includes("..") || !MAINTAINED_SKILLS.includes(match[1])) return void 0;
1567
+ try {
1568
+ return readFileSync(join(resolvePackRoot(), "maintained", match[1], match[2]), "utf8");
1569
+ } catch {
1570
+ return void 0;
1571
+ }
1572
+ }
1432
1573
  function validatorFilesIn(root) {
1433
1574
  const dir = join(root, VALIDATORS_DIR);
1434
1575
  let names;
@@ -1453,7 +1594,7 @@ function checksIn(root, log, tag) {
1453
1594
  const hostChecks = loaded.customs.filter((def) => def.runWhere === "host" && def.level !== "off" && def.declaresEmit !== null);
1454
1595
  const checks = [];
1455
1596
  for (const def of hostChecks) {
1456
- if (def.judge !== void 0) checks.push({ name: def.declaresEmit, judge: { brief: def.judge.brief, text: readInside(root, def.judge.brief) } });
1597
+ if (def.judge !== void 0) checks.push({ name: def.declaresEmit, judge: { brief: def.judge.brief, text: readBrief(root, def.judge.brief) } });
1457
1598
  else if (def.command !== void 0) checks.push({ name: def.declaresEmit, command: def.command });
1458
1599
  }
1459
1600
  return checks;
@@ -2564,6 +2705,9 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
2564
2705
  const build = job.container === void 0 ? void 0 : { state: job.container, runtime: deps.container ?? createContainerRuntime() };
2565
2706
  const vmBuild = job.microvm === void 0 ? void 0 : { state: job.microvm, runtime: deps.container ?? createContainerRuntime() };
2566
2707
  const commandMayRun = job.pid !== void 0 && isGroupAlive(job.pid) || isContainerTracked(job) && job.exitCode === void 0;
2708
+ if (vmBuild !== void 0 && isMicroVmTracked(job) && job.exitCode === void 0) {
2709
+ await endMicroVmCommand(vmBuild.runtime, vmBuild.state, jobDirPath, (line) => log.error(`${tag} ${line}`));
2710
+ }
2567
2711
  if (build !== void 0 && commandMayRun) {
2568
2712
  if (isContainerTracked(job) && build.state.stopped !== true) {
2569
2713
  await copyCommandLogTail(build.runtime, build.state, jobDirPath).catch((err) => {
@@ -2637,8 +2781,11 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
2637
2781
  }
2638
2782
  if (job.checkMicrovm !== void 0 && job.checksRan === true) {
2639
2783
  try {
2640
- await cleanupMicroVm(deps.container ?? createContainerRuntime(), job.checkMicrovm);
2784
+ const runtime = deps.container ?? createContainerRuntime();
2785
+ const again = isMicroVmTracked(job) && outcome === "ok" && !job.cleanupRan;
2786
+ await cleanupMicroVm(runtime, job.checkMicrovm);
2641
2787
  delete job.checkMicrovm;
2788
+ if (again) job.checksRan = false;
2642
2789
  writeJobFile(jobFilePath, job);
2643
2790
  } catch (err) {
2644
2791
  log.error(`${tag} removing an earlier attempt's check environment failed: ${describeCallFailure(err)} \xB7 continuing`);
@@ -2947,6 +3094,15 @@ function unfinishedJobs(jobsDirPath) {
2947
3094
  function isContainerTracked(job) {
2948
3095
  return job.container?.tracking === "container";
2949
3096
  }
3097
+ function isMicroVmTracked(job) {
3098
+ return job.microvm?.tracking === "microvm";
3099
+ }
3100
+ function isTracked(job) {
3101
+ return isContainerTracked(job) || isMicroVmTracked(job);
3102
+ }
3103
+ function trackingOf(job) {
3104
+ return job.container?.tracking ?? job.microvm?.tracking;
3105
+ }
2950
3106
  function isReadable(job) {
2951
3107
  return readsJobState(job, READ_JOB_STATE_FORMATS);
2952
3108
  }
@@ -2956,10 +3112,10 @@ function listUnreadableJobs(jobsDirPath) {
2956
3112
  function listTrackedJobs(jobsDirPath) {
2957
3113
  return unfinishedJobs(jobsDirPath).flatMap(({ dirPath, job }) => {
2958
3114
  if (!isReadable(job)) return [];
2959
- const tracking = job.container?.tracking;
3115
+ const tracking = trackingOf(job);
2960
3116
  if (tracking === void 0) return [];
2961
- if (tracking === "container" && inTeardown(job)) return [];
2962
- return [{ dirPath, job, known: tracking === "container" }];
3117
+ if ((tracking === "container" || tracking === "microvm") && inTeardown(job)) return [];
3118
+ return [{ dirPath, job, known: tracking === "container" || tracking === "microvm" }];
2963
3119
  });
2964
3120
  }
2965
3121
  function listAdoptableJobs(jobsDirPath) {
@@ -2971,12 +3127,12 @@ async function recoverLostJobs(jobsDirPath, config, deps) {
2971
3127
  const recovered = [];
2972
3128
  for (const { dirPath, job } of unfinishedJobs(jobsDirPath)) {
2973
3129
  if (!isReadable(job)) continue;
2974
- const tracking = job.container?.tracking;
2975
- if (tracking !== void 0 && tracking !== "container") {
3130
+ const tracking = trackingOf(job);
3131
+ if (tracking !== void 0 && tracking !== "container" && tracking !== "microvm") {
2976
3132
  recovered.push(await finishJob(job, dirPath, "interrupted", config, deps, { reason: UNKNOWN_TRACKING_REASON }));
2977
3133
  continue;
2978
3134
  }
2979
- if (tracking === "container" && !inTeardown(job)) continue;
3135
+ if ((tracking === "container" || tracking === "microvm") && !inTeardown(job)) continue;
2980
3136
  const alive = job.pid !== void 0 && job.start !== void 0 && isSameProcess(job.pid, job.start);
2981
3137
  if (alive) continue;
2982
3138
  const recorded = outcomeFromExitCode(dirPath);
@@ -3144,4 +3300,4 @@ async function stopSender(input) {
3144
3300
  }
3145
3301
  }
3146
3302
 
3147
- export { ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, RENEW_INTERVAL_SECONDS, appendCommandLog, commandLogOffset, deliverCommitHooks, describeHookEnd, execArgv, execCommandLine, finishJob, hookLimitsFor, hostCommandEnvironment, hostEnvironment, inTeardown, isContainerTracked, isGroupAlive, isIdle, isReadable, isTimedOut, isUnfinished, jobEnv, judgeProbe, listAdoptableJobs, listTrackedJobs, listUnreadableJobs, listenOnBroker, microVmCommandLine, needsRenew, outcomeFromExitCode, probeCommand, provisionEnvironment, provisionMicroVm, provisionProcess, readCpuUsec, readProvisionOut, recoverLostJobs, releaseLease, renewLease, resolveHostBuild, restartSender, retryFailedReleases, runCommand, runHook, setStage, startHostServices, startSender, stopOrphanedMicroVms, unfinishedJobs, workdirProblem };
3303
+ export { ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, MICROVM_COMMAND_DIR, RENEW_INTERVAL_SECONDS, appendCommandLog, commandLogOffset, deliverCommitHooks, describeHookEnd, execArgv, execCommandLine, finishJob, hookLimitsFor, hostCommandEnvironment, hostEnvironment, inTeardown, isContainerTracked, isGroupAlive, isIdle, isMicroVmTracked, isReadable, isTimedOut, isTracked, isUnfinished, jobEnv, judgeProbe, listAdoptableJobs, listTrackedJobs, listUnreadableJobs, listenOnBroker, microVmCommandLine, microVmOomKills, needsRenew, outcomeFromExitCode, probeCommand, probeMicroVmCommand, provisionEnvironment, provisionMicroVm, provisionProcess, readCpuUsec, readProvisionOut, recoverLostJobs, releaseLease, renewLease, resolveHostBuild, restartSender, retryFailedReleases, runCommand, runHook, serveLease, setStage, startHostServices, startMicroVmCommand, startSender, stopOrphanedMicroVms, unfinishedJobs, vmAlive, workdirProblem, writeGuestGhConfig };
@@ -33,12 +33,14 @@ function inspectService(unit, configDir, probes) {
33
33
  const pid = Number(property(shown, "MainPID") ?? "0");
34
34
  const mainPid = Number.isInteger(pid) && pid > 0 ? pid : void 0;
35
35
  const delegate = property(shown, "Delegate");
36
+ const storeMax = Number(property(shown, "FileDescriptorStoreMax"));
36
37
  const status = mainPid === void 0 ? void 0 : probes.readFile(`/proc/${mainPid}/status`);
37
38
  const kvm = probes.kvmGid();
38
39
  return {
39
40
  unit,
40
41
  mainPid,
41
42
  delegate: delegate === void 0 ? void 0 : delegate !== "no",
43
+ ...Number.isInteger(storeMax) && property(shown, "FileDescriptorStoreMax") !== void 0 ? { fdStoreMax: storeMax } : {},
42
44
  hasKvmGroup: status === void 0 || kvm === void 0 ? void 0 : holdsGroup(status, kvm),
43
45
  credentialVariables: credentialNames(probes.readFile(join(configDir, "runner.env")))
44
46
  };
@@ -46,7 +48,7 @@ function inspectService(unit, configDir, probes) {
46
48
  function realInspectProbes() {
47
49
  return {
48
50
  show: (unit) => {
49
- const result = spawnSync("systemctl", ["show", "--property=LoadState,MainPID,Delegate", unit], { encoding: "utf8", timeout: 1e4 });
51
+ const result = spawnSync("systemctl", ["show", "--property=LoadState,MainPID,Delegate,FileDescriptorStoreMax", unit], { encoding: "utf8", timeout: 1e4 });
50
52
  return result.status === 0 ? result.stdout : void 0;
51
53
  },
52
54
  readFile: (path) => {
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { checkStarterFiles, contextIsGoverned, checkBuildSkill } from './chunk-6WTAYEKJ.js';
4
- import { resolveCredentials, getJson, WorkCommandError } from './chunk-6CGXSMKX.js';
5
- import { isLinkedRepository } from './chunk-PZA6ZFYW.js';
3
+ import { checkStarterFiles, contextIsGoverned, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills } from './chunk-G3EZA6MK.js';
4
+ import { resolveCredentials, getJson, WorkCommandError } from './chunk-55GNQPO6.js';
5
+ import { isLinkedRepository } from './chunk-N4D5TMVU.js';
6
6
  import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
7
- import { checkFormerSkillNames } from './chunk-MQ743JX3.js';
8
- import { resolveGatewayCredentials, defaultFetch } from './chunk-MCSINUVC.js';
9
- import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-UZEQVPKF.js';
7
+ import { checkFormerSkillNames } from './chunk-MHX7YX7Y.js';
8
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-BWH36FOC.js';
9
+ import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-DJHNEGNM.js';
10
10
  import { readStatuslineState, STATE_FRESH_MS } from './chunk-I7RZHMXW.js';
11
11
  import { hookCommandEscapesControlPlane, CONTROL_PLANE_DIR_VARIABLE } from './chunk-HCVLP7XA.js';
12
12
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
@@ -191,7 +191,7 @@ function runDoctor(env = {}) {
191
191
  ...checkInstalls(env),
192
192
  ...starter?.checks ?? [],
193
193
  ...laptop ? checkRenamedSkills(env.cwd) : [],
194
- ...checkBuildSkillState(env.cwd),
194
+ ...checkBuildSkillState(env.cwd, home),
195
195
  ...starter !== void 0 && !starter.mcpOutdated ? checkMcpCommand(env.cwd, env.processEnv) : [],
196
196
  ...checkContextSource(env.cwd),
197
197
  ...checkGovernsList(env.cwd),
@@ -204,10 +204,10 @@ function checkRenamedSkills(cwd) {
204
204
  if (dirs === void 0 || contextIsGoverned(dirs.gitCommonDir)) return [];
205
205
  return checkFormerSkillNames(dirs.repoRoot);
206
206
  }
207
- function checkBuildSkillState(cwd) {
207
+ function checkBuildSkillState(cwd, home) {
208
208
  const dirs = findGitDirs(cwd ?? process.cwd());
209
209
  if (dirs === void 0 || contextIsGoverned(dirs.gitCommonDir)) return [];
210
- return checkBuildSkill(dirs.repoRoot);
210
+ return [...checkBuildSkill(dirs.repoRoot), ...checkMachineSkills({ repoRoot: dirs.repoRoot, home }), ...checkCommittedMaintainedSkills(dirs.repoRoot)];
211
211
  }
212
212
  function checkInstalledCli(home, cwd) {
213
213
  const name = "Installed CLI";
@@ -1174,7 +1174,7 @@ function doctorExitCode(checks) {
1174
1174
 
1175
1175
  // src/doctor-report.ts
1176
1176
  async function gatherDoctorChecks() {
1177
- const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-JJ3EO7SB.js');
1177
+ const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-TWS5VZEN.js');
1178
1178
  const configPath = defaultRunnerConfigPath();
1179
1179
  const checks = runDoctor({ runnerHost: hasRunnerBlock(configPath) });
1180
1180
  const credential = await credentialChecks();
@@ -1186,7 +1186,7 @@ async function gatherDoctorChecks() {
1186
1186
  const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
1187
1187
  checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
1188
1188
  } else if (hasRunnerBlock(configPath)) {
1189
- const { runnerHostChecks } = await import('./doctor-U2N7AF3N.js');
1189
+ const { runnerHostChecks } = await import('./doctor-6ZIF2BRZ.js');
1190
1190
  const hooks = (() => {
1191
1191
  try {
1192
1192
  return loadRunnerConfig(configPath).hooks;
@@ -1220,8 +1220,8 @@ async function gatherDoctorChecks() {
1220
1220
  const service = await (async () => {
1221
1221
  const { existsSync: existsSync3 } = await import('fs');
1222
1222
  if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
1223
- const { inspectService, realInspectProbes } = await import('./inspect-6UYAAXH7.js');
1224
- const { DEFAULT_UNIT_NAME } = await import('./install-AFMXH25X.js');
1223
+ const { inspectService, realInspectProbes } = await import('./inspect-IPFA7AAT.js');
1224
+ const { DEFAULT_UNIT_NAME } = await import('./install-6OIY3KHZ.js');
1225
1225
  const { dirname: dirname2 } = await import('path');
1226
1226
  return inspectService(DEFAULT_UNIT_NAME, dirname2(configPath), realInspectProbes());
1227
1227
  })();
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { MIN_ENGINE_MAJOR } from './chunk-SBW4K3XZ.js';
4
- import { runnerImageVersion } from './chunk-2J46BQ5Y.js';
3
+ import { MIN_ENGINE_MAJOR } from './chunk-YF56R4DV.js';
4
+ import { runnerImageVersion } from './chunk-M3MHHIUW.js';
5
5
  import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-B6K7R5UY.js';
6
6
  import { spawnSync } from 'child_process';
7
7
  import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { uploadSpooledSteps } from './chunk-WK35HB56.js';
3
+ import { uploadSpooledSteps } from './chunk-O2IJTY7L.js';
4
4
  import { LaunchFilter } from './chunk-ESVW4MJY.js';
5
5
  import { RepoFilter } from './chunk-TBT347UY.js';
6
6
  import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-BUP5N3X6.js';
7
- import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-MCSINUVC.js';
8
- import { writeSyncStatus, spoolDir } from './chunk-UZEQVPKF.js';
7
+ import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-BWH36FOC.js';
8
+ import { writeSyncStatus, spoolDir } from './chunk-DJHNEGNM.js';
9
9
  import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
10
10
  import { hookExecSpoolPath } from './chunk-2O5KA67H.js';
11
11
  import { applyReportedCost } from './chunk-BKO6JEZI.js';
@@ -18,7 +18,7 @@ import { cliInvocation } from './chunk-CRB3POP4.js';
18
18
  import { removeJournalHooks } from './chunk-TUSYOL2O.js';
19
19
  import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-QZBXLLTV.js';
20
20
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
21
- import { signerFor, signRunnerRequest } from './chunk-GWRDL75D.js';
21
+ import { signerFor, signRunnerRequest } from './chunk-Y4OKEFAX.js';
22
22
  import { dirname, basename, join } from 'path';
23
23
  import { statSync, readFileSync, readdirSync, mkdirSync, writeFileSync, renameSync, existsSync, rmSync } from 'fs';
24
24
  import { execFileSync } from 'child_process';
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { WorkCommandError, postJson } from './chunk-6CGXSMKX.js';
4
- import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-4UFSTKE5.js';
5
- import { signingFetchFor } from './chunk-MCSINUVC.js';
6
- import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-VPEGE3QZ.js';
3
+ import { WorkCommandError, postJson } from './chunk-55GNQPO6.js';
4
+ import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-BPKO76QR.js';
5
+ import { signingFetchFor } from './chunk-BWH36FOC.js';
6
+ import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-6TRNCUM4.js';
7
7
  import { SHIM_SCRIPT, GOVERNANCE_VARIABLE } from './chunk-HCVLP7XA.js';
8
8
  import { readDegraded, readContextManifest, readSourceCache } from './chunk-YQR6E6OV.js';
9
- import { signerFor } from './chunk-GWRDL75D.js';
10
- import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-F3BBEBPL.js';
9
+ import { signerFor } from './chunk-Y4OKEFAX.js';
10
+ import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-RHAGBUL5.js';
11
11
  import { fstatSync, mkdirSync, writeFileSync, chmodSync, rmSync, cpSync, readFileSync, existsSync, lstatSync } from 'fs';
12
12
  import { relative, join, dirname } from 'path';
13
13
 
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { retiredSkillPaths, removeRetiredSkills } from './chunk-MQ743JX3.js';
3
+ import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-LOKSLO25.js';
4
+ import { retiredSkillPaths, removeRetiredSkills } from './chunk-MHX7YX7Y.js';
5
+ import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-7OUOLGUV.js';
4
6
  import { C } from './chunk-ANPNT6PM.js';
5
- import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-JKNYTNYD.js';
6
- import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-HBISTTG3.js';
7
7
  import { cliInvocation } from './chunk-CRB3POP4.js';
8
8
  import { emitTree, generatedHeaderSource, parseOuterlayerConfig, classifyTree } from './chunk-RKOTJQVG.js';
9
9
  import { existsSync, readFileSync, mkdirSync, writeFileSync, copyFileSync, unlinkSync, rmdirSync, readdirSync } from 'fs';