@outerlayer/cli 0.36.0-next.20261103003101 → 0.36.0-next.20261103032948

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 (124) hide show
  1. package/README.md +6 -1
  2. package/dist/{agent-setup-7WC4BHY4.js → agent-setup-PCMTLHTT.js} +7 -7
  3. package/dist/{agent-subcommand-LABZ7CVN.js → agent-subcommand-DZWYGCPN.js} +1 -1
  4. package/dist/{bridge-WVWJBVTG.js → bridge-RY2CLUYP.js} +2 -2
  5. package/dist/{build-TB4QKVBG.js → build-CV6IUJWD.js} +7 -7
  6. package/dist/{build-disk-27ZTD2EH.js → build-disk-ITPCE4ME.js} +5 -5
  7. package/dist/build-info.json +1 -1
  8. package/dist/{builder-DN2S6EVU.js → builder-TP6RBPGB.js} +4 -4
  9. package/dist/{caller-ZDANV7YK.js → caller-6X73FHOM.js} +7 -7
  10. package/dist/{check-ACHEHGYH.js → check-HJ3CKWDZ.js} +38 -38
  11. package/dist/{chunk-AXOO6FNA.js → chunk-3IEVIKMC.js} +3 -3
  12. package/dist/{chunk-JAFSDXK7.js → chunk-4EJH2EE4.js} +26 -26
  13. package/dist/{chunk-NTOHZMPN.js → chunk-55RNQFPE.js} +2 -2
  14. package/dist/{chunk-HLJQONDG.js → chunk-5OQTDTWB.js} +3 -3
  15. package/dist/{chunk-JYFZC776.js → chunk-5SDUOS4G.js} +2 -2
  16. package/dist/{chunk-GQHT6N47.js → chunk-757WX4YX.js} +3 -3
  17. package/dist/{chunk-HYRWQYVE.js → chunk-A4QJ2E4D.js} +5 -5
  18. package/dist/{chunk-W4WWPN52.js → chunk-ARAH3W3L.js} +3 -3
  19. package/dist/{chunk-GANI63IL.js → chunk-AT6RLTDF.js} +1 -1
  20. package/dist/{chunk-VQ4KQGLY.js → chunk-AXGTLADG.js} +2 -2
  21. package/dist/{chunk-UHVYFXW6.js → chunk-B3XUAKJI.js} +1 -1
  22. package/dist/{chunk-KJN74LA5.js → chunk-CGVYMX4N.js} +7 -7
  23. package/dist/{chunk-P63MQNDV.js → chunk-CIG5RZ7Z.js} +170 -5
  24. package/dist/{chunk-6ILOTKYR.js → chunk-CSWT3PDT.js} +3 -3
  25. package/dist/{chunk-QPIWCDVK.js → chunk-CULBCABP.js} +2 -2
  26. package/dist/{chunk-DUENAYRI.js → chunk-D4MQRI56.js} +9 -9
  27. package/dist/{chunk-EQ5M2WWA.js → chunk-DBXWEZ3L.js} +2 -2
  28. package/dist/{chunk-33OQSCE2.js → chunk-DQJCVLYE.js} +1 -1
  29. package/dist/{chunk-GEYJLP6L.js → chunk-ECUP2QQH.js} +149 -152
  30. package/dist/{chunk-EA67BJCF.js → chunk-EE3FR5JP.js} +1 -1
  31. package/dist/{chunk-GIAODP2B.js → chunk-EKCOXTS2.js} +1 -1
  32. package/dist/{chunk-BGTQHUGU.js → chunk-FQ6ZKZCH.js} +1 -1
  33. package/dist/{chunk-EYUJCGF2.js → chunk-GK7QN7K6.js} +3 -3
  34. package/dist/{chunk-EFSJGRWD.js → chunk-GVRD3MBC.js} +3 -3
  35. package/dist/{chunk-AU3QZKC4.js → chunk-J4M35XQA.js} +5 -5
  36. package/dist/{chunk-CDDWYP73.js → chunk-JXAUDSTQ.js} +1 -1
  37. package/dist/{chunk-MDJ6ILXG.js → chunk-LEQWPWZA.js} +1 -1
  38. package/dist/{chunk-LFUEODDW.js → chunk-LPKNESZ5.js} +5 -5
  39. package/dist/{chunk-LLCRQWH5.js → chunk-LWKV36FC.js} +1 -1
  40. package/dist/{chunk-UNWCM4FR.js → chunk-MHIXBZDZ.js} +1 -1
  41. package/dist/{chunk-JZDTDGRO.js → chunk-MHRZVSXP.js} +1 -1
  42. package/dist/{chunk-GXCU5HTU.js → chunk-MMCVDHDX.js} +2 -2
  43. package/dist/{chunk-YTERTIGW.js → chunk-NKT32ZHB.js} +2 -2
  44. package/dist/{chunk-3JVLRIX3.js → chunk-NNTORDVS.js} +1 -1
  45. package/dist/{chunk-R3JSLSMG.js → chunk-OR2TAE22.js} +2 -2
  46. package/dist/{chunk-VJKHQSSS.js → chunk-PEKITBZX.js} +1 -1
  47. package/dist/{chunk-Y5LWTGOV.js → chunk-RT7R4COY.js} +6 -6
  48. package/dist/{chunk-Q7BECZIF.js → chunk-RWQ5XKRH.js} +5 -5
  49. package/dist/{chunk-DNUA6244.js → chunk-SLWDYHO5.js} +2 -2
  50. package/dist/{chunk-PVUBF24F.js → chunk-SSYFNK4W.js} +2 -1
  51. package/dist/{chunk-NJKCJVJL.js → chunk-TE3Q6LVL.js} +1 -1
  52. package/dist/{chunk-DRGGJH2V.js → chunk-TQDYP45H.js} +2 -2
  53. package/dist/{chunk-EDZ2OZYI.js → chunk-U3SXAKQZ.js} +3 -3
  54. package/dist/{chunk-DPTBQIF6.js → chunk-UYPE2MYB.js} +3 -3
  55. package/dist/{chunk-UJISSEJG.js → chunk-VI233QH2.js} +1 -1
  56. package/dist/{chunk-PUPUOQ6Y.js → chunk-W2ZZ6KQP.js} +2 -2
  57. package/dist/{chunk-3L6XOE4K.js → chunk-WEHUIYTR.js} +1 -1
  58. package/dist/{chunk-PN4LWT5F.js → chunk-WNQGSAUE.js} +1 -1
  59. package/dist/{chunk-XL6DG5LC.js → chunk-YEETN7NH.js} +5 -5
  60. package/dist/{chunk-SSVG2IOD.js → chunk-ZEILNR5Q.js} +1 -1
  61. package/dist/{chunk-UCUZJ5W5.js → chunk-ZIRMH464.js} +3 -3
  62. package/dist/{claude-launcher-5UGFLCYJ.js → claude-launcher-5I7TNYQJ.js} +1 -1
  63. package/dist/{cli-NYRTR2QR.js → cli-4F4XTBBF.js} +113 -113
  64. package/dist/{command-W7OFZRJL.js → command-ABIQ63NE.js} +32 -32
  65. package/dist/{config-ODIFTWTQ.js → config-4W4MXVZR.js} +6 -6
  66. package/dist/{connect-cmd-BMA6JWN5.js → connect-cmd-I7TUU2BM.js} +5 -5
  67. package/dist/{container-start-GQRXAXXQ.js → container-start-5EFWPLEB.js} +30 -30
  68. package/dist/{context-show-cmd-FN6RY7JN.js → context-show-cmd-6U42IUEX.js} +6 -6
  69. package/dist/{control-plane-launch-7FWJACHT.js → control-plane-launch-SLIYO4BZ.js} +5 -5
  70. package/dist/{demo-record-cmd-LRQMMMPB.js → demo-record-cmd-HBFGZHVK.js} +2 -2
  71. package/dist/{demo-voice-cmd-ORYSHARJ.js → demo-voice-cmd-ZINZNDWR.js} +11 -11
  72. package/dist/{docker-POAJWLZ5.js → docker-5L7BRY2J.js} +4 -4
  73. package/dist/{doctor-4W5RSKJN.js → doctor-ZTOJ53SA.js} +32 -32
  74. package/dist/{emit-artifact-cmd-KMGO53PL.js → emit-artifact-cmd-DNA5R6C2.js} +10 -10
  75. package/dist/{emit-criteria-cmd-2KDA4LPJ.js → emit-criteria-cmd-UGLCECVP.js} +7 -7
  76. package/dist/{emit-demo-cmd-26URBRX2.js → emit-demo-cmd-GBNYC5GU.js} +11 -11
  77. package/dist/{emit-finding-cmd-GM4G3ZGU.js → emit-finding-cmd-66OOJS5Q.js} +7 -7
  78. package/dist/{emit-result-cmd-SXS6AJP3.js → emit-result-cmd-3BAYNI6R.js} +9 -9
  79. package/dist/{emit-step-cmd-TDO3NFV3.js → emit-step-cmd-S2ZISEQS.js} +7 -7
  80. package/dist/{exec-client-DBSWP3AQ.js → exec-client-PISQ53KG.js} +3 -3
  81. package/dist/{find-unit-4EP7BW2F.js → find-unit-QQP7HH3R.js} +8 -8
  82. package/dist/{findings-cmd-ED52QLP2.js → findings-cmd-BPYW5IMS.js} +7 -7
  83. package/dist/{fleet-readiness-X7YICYMA.js → fleet-readiness-XNWEAVW7.js} +5 -5
  84. package/dist/{governing-source-R7F6GZLO.js → governing-source-GS73BIQ3.js} +9 -9
  85. package/dist/{guest-init-4YXOOA6P.js → guest-init-7OVIIKLM.js} +4 -4
  86. package/dist/{hook-fast-Q6HOUK64.js → hook-fast-IXIYJKAN.js} +1 -1
  87. package/dist/{host-checks-OAFGSUUM.js → host-checks-XVHIR3EK.js} +28 -28
  88. package/dist/{pending-WSR6KRTI.js → host-key-3FKGWSHL.js} +3 -3
  89. package/dist/{image-tag-BHAEZYXN.js → image-tag-U4YQCHRG.js} +3 -3
  90. package/dist/index.js +4 -4
  91. package/dist/{init-DTG7SJUJ.js → init-V6ESW3K6.js} +28 -28
  92. package/dist/{init-GPW5WSRP.js → init-WGLH27Q3.js} +28 -28
  93. package/dist/{init-cmd-BLCYQVCC.js → init-cmd-N7MZ3LA3.js} +10 -10
  94. package/dist/{init-update-F3JZ2GEW.js → init-update-5RY6XB27.js} +8 -8
  95. package/dist/{install-cmd-4PDNS3MC.js → install-cmd-6GXTY4UW.js} +5 -5
  96. package/dist/{logs-HHNF6ABR.js → logs-U7QU7KPL.js} +2 -2
  97. package/dist/{loop-XYZGEYNX.js → loop-XM24ZVOO.js} +37 -37
  98. package/dist/{machine-ZBF7MTPU.js → machine-X2Z5RLVD.js} +28 -28
  99. package/dist/{mcp-serve-cmd-RKM4BLX3.js → mcp-serve-cmd-LRNO35OS.js} +4 -4
  100. package/dist/{paths-WQUQWBL6.js → paths-TH2PHIEY.js} +2 -2
  101. package/dist/{host-key-2OWJL2HZ.js → pending-EZKNEM2I.js} +3 -3
  102. package/dist/{pidfile-P6WZBOR4.js → pidfile-CI7F3737.js} +3 -3
  103. package/dist/{record-WMING5ZQ.js → record-OFRT5V22.js} +3 -3
  104. package/dist/{runner-env-NXNGYKU4.js → runner-env-PO3FMLIW.js} +8 -8
  105. package/dist/{runner-identity-ZCXCKYYO.js → runner-identity-QS26JIKL.js} +4 -4
  106. package/dist/{runner-key-BFWKR3LC.js → runner-key-OKTRAUHO.js} +28 -28
  107. package/dist/{session-sender-JIWCOKW4.js → session-sender-UB6GJWZS.js} +10 -10
  108. package/dist/{spec-cmd-TQ6VCLCS.js → spec-cmd-B3Y2JF4M.js} +8 -8
  109. package/dist/{state-ZOM5PUYK.js → state-BV5BZMTE.js} +3 -3
  110. package/dist/{status-27ZZEKIO.js → status-MPPZT5KS.js} +28 -28
  111. package/dist/{sync-cmd-TKGTFHFZ.js → sync-cmd-YUWBZNQD.js} +9 -9
  112. package/dist/{update-steps-NMSIEZBR.js → update-steps-UNOE66M4.js} +29 -29
  113. package/dist/{watch-GMLQW3S7.js → watch-GOWRN3BK.js} +9 -9
  114. package/dist/{work-claim-cmd-I6VVJZHK.js → work-claim-cmd-CHCADUYP.js} +13 -13
  115. package/dist/{work-cmd-UOLSKQ5A.js → work-cmd-WUJXUXHP.js} +7 -7
  116. package/dist/{work-comment-cmd-FMAHDTN4.js → work-comment-cmd-E3GBVCQX.js} +9 -9
  117. package/dist/{work-demo-cmd-BIONKBZM.js → work-demo-cmd-YOLKT6ZD.js} +7 -7
  118. package/dist/{work-logs-cmd-IXHGQ443.js → work-logs-cmd-SHWLRI4D.js} +7 -7
  119. package/dist/{work-open-pr-cmd-E7KGEH42.js → work-open-pr-cmd-LHMYF4CX.js} +8 -8
  120. package/dist/{work-pr-cmd-GWYKEMBY.js → work-pr-cmd-PAYHF664.js} +7 -7
  121. package/dist/{work-proofs-cmd-RD5PPXAF.js → work-proofs-cmd-VRZ5EOTH.js} +8 -8
  122. package/dist/{work-proofs-record-QRTL7KIP.js → work-proofs-record-ECHOY77G.js} +14 -14
  123. package/dist/{work-stop-cmd-DJWAZRM3.js → work-stop-cmd-Z6RMU44Y.js} +7 -7
  124. package/package.json +1 -1
@@ -3,33 +3,33 @@ import { createRequire } from 'node:module';
3
3
  import { itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, MAX_TEST_FILE_BYTES, MAX_TEST_FILES, criterionInputs, uncitedIds, planCriteria, parseJudgeAnswer, inCriteriaOrder, oneLineReason, judgedItems, IdScan, firstInPathOrder, isSearchCandidate } from './chunk-A76SNTAM.js';
4
4
  import { zodProblem } from './chunk-I3LTIAOR.js';
5
5
  import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
6
- import { hasStoredCredential, AGENT_COMMANDS, storeAgentCredential, credentialFromStdin, isAgentName } from './chunk-VQ4KQGLY.js';
6
+ import { hasStoredCredential, AGENT_COMMANDS, storeAgentCredential, credentialFromStdin, isAgentName } from './chunk-AXGTLADG.js';
7
7
  import { upgradedStarterText } from './chunk-VNYAJEKO.js';
8
- import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-AXOO6FNA.js';
9
- import { senderPidfile } from './chunk-R3JSLSMG.js';
10
- import { installScrubContext } from './chunk-Q7BECZIF.js';
8
+ import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-3IEVIKMC.js';
9
+ import { senderPidfile } from './chunk-OR2TAE22.js';
10
+ import { installScrubContext } from './chunk-RWQ5XKRH.js';
11
11
  import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-ZVB57WI6.js';
12
- import { runnerImageVersion } from './chunk-JZDTDGRO.js';
13
- import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey } from './chunk-DNUA6244.js';
12
+ import { runnerImageVersion } from './chunk-MHRZVSXP.js';
13
+ import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey } from './chunk-SLWDYHO5.js';
14
14
  import { receiveFiles } from './chunk-NN33FYXG.js';
15
- import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-XL6DG5LC.js';
16
- import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-CDDWYP73.js';
15
+ import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-YEETN7NH.js';
16
+ import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-JXAUDSTQ.js';
17
17
  import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
18
18
  import { currentCliBuild } from './chunk-OGFGZQA3.js';
19
- import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-3JVLRIX3.js';
20
- import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-PVUBF24F.js';
21
- import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-AU3QZKC4.js';
22
- import { writeDockerClientConfig } from './chunk-33OQSCE2.js';
23
- import { runnerCredentialProblem, builtinKind, keyRunnerFactory, optionalEgress, isBuiltinContainer, isBuiltinVm, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, imageBuildOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-EYUJCGF2.js';
24
- import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-PUPUOQ6Y.js';
25
- import { writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL, NETWORK_HELPER_MEMORY, createDockerHost, builderSpec, containerExecArgs, childEnvironment, readDu, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, parseSize, runnerLabelValue, readJobFileChecked, NETWORK_READY_FILE, networkHelperName, prepareRunArgs, containerRunArgs, JUDGE_MAX_TURNS, WORKSPACE_LABEL, homeCopyRunArgs, networkHelperRunArgs, JUDGE_DIR, HASH_ARGV, parseProgramHash, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, JUDGE_PROGRAM, MAX_ITEMS_BYTES, JUDGE_ITEMS, JUDGE_REPORT, identityRunArgs, SAVED_STATE_LABEL } from './chunk-UCUZJ5W5.js';
19
+ import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-NNTORDVS.js';
20
+ import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-SSYFNK4W.js';
21
+ import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-J4M35XQA.js';
22
+ import { writeDockerClientConfig } from './chunk-DQJCVLYE.js';
23
+ import { runnerCredentialProblem, builtinKind, keyRunnerFactory, optionalEgress, isBuiltinContainer, isBuiltinVm, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, imageBuildOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-GK7QN7K6.js';
24
+ import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-W2ZZ6KQP.js';
25
+ import { writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL, NETWORK_HELPER_MEMORY, createDockerHost, builderSpec, containerExecArgs, childEnvironment, readDu, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, parseSize, runnerLabelValue, readJobFileChecked, NETWORK_READY_FILE, networkHelperName, prepareRunArgs, containerRunArgs, JUDGE_MAX_TURNS, WORKSPACE_LABEL, homeCopyRunArgs, networkHelperRunArgs, JUDGE_DIR, HASH_ARGV, parseProgramHash, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, JUDGE_PROGRAM, MAX_ITEMS_BYTES, JUDGE_ITEMS, JUDGE_REPORT, identityRunArgs, SAVED_STATE_LABEL } from './chunk-ZIRMH464.js';
26
26
  import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-ASR6TU43.js';
27
- import { postJson, WorkCommandError, getJson, isSignatureRefusal } from './chunk-LFUEODDW.js';
27
+ import { postJson, WorkCommandError, getJson, isSignatureRefusal } from './chunk-LPKNESZ5.js';
28
28
  import { sanitizeTerminal, planArtifactUpload } from './chunk-F3T5QJ24.js';
29
29
  import { readCloudConfig } from './chunk-HWVMRETT.js';
30
- import { signerFor } from './chunk-MDJ6ILXG.js';
31
- import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, workspacesDir, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-GANI63IL.js';
32
- import { CHECKOUT_DIR, JOB_MOUNT, buildEnvironment, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, repositoriesOf, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, proxyEnvironment, checkEnvironment, withMiseVariables, checkoutPath, EVAL_INPUT_DIR, isMiseVariableAllowed, BUILD_HOME, primaryOf } from './chunk-P63MQNDV.js';
30
+ import { signerFor } from './chunk-LEQWPWZA.js';
31
+ import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, workspacesDir, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-AT6RLTDF.js';
32
+ import { CHECKOUT_DIR, JOB_MOUNT, buildEnvironment, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, repositoriesOf, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, proxyEnvironment, checkEnvironment, withMiseVariables, checkoutPath, maxDestinations, resolveDestinations, isReservedVariable, classifyAddress, carried6to4, EVAL_INPUT_DIR, isMiseVariableAllowed, BUILD_HOME, primaryOf } from './chunk-CIG5RZ7Z.js';
33
33
  import { sharedSkillNames, skillConflictMessage } from './chunk-4XYEPTZP.js';
34
34
  import { versionAtLeast, MINIMUM_CLAUDE_VERSION } from './chunk-UWYU46GF.js';
35
35
  import { firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, credentialAgent, agentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, credentialHandOffKey, strippedVariables, runnerAgents, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, RELAY_USER, realFdStorePort, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, builtInNames, UNIVERSAL_IMAGE, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, agentVersionOf, AGENT_CREDENTIAL_MISSING, buildAgent, fdName, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-QTU6GW2M.js';
@@ -43,8 +43,8 @@ import { randomUUID, randomBytes, createHash } from 'crypto';
43
43
  import { rmSync, mkdirSync, existsSync, readFileSync, mkdtempSync, statSync, appendFileSync, writeFileSync, readdirSync, accessSync, constants, openSync, closeSync, renameSync, rmdirSync, createReadStream, lstatSync, unlinkSync, chmodSync, realpathSync, writeSync, truncateSync, cpSync, fstatSync, readSync, createWriteStream, copyFileSync, linkSync } from 'fs';
44
44
  import { join, dirname, isAbsolute, delimiter, sep, basename, relative, resolve } from 'path';
45
45
  import { Readable, Transform, Duplex, PassThrough } from 'stream';
46
- import { spawn, spawnSync } from 'child_process';
47
46
  import { createServer, createConnection, connect, isIP } from 'net';
47
+ import { spawn, spawnSync } from 'child_process';
48
48
  import { availableParallelism, networkInterfaces, tmpdir } from 'os';
49
49
  import { once } from 'events';
50
50
  import { createServer as createServer$1, request } from 'http';
@@ -370,17 +370,82 @@ function hasClaudeCredential(config, hostEnv, jobDir, agents) {
370
370
  if (buildAgent(agents)?.adapter.credentials === void 0) return true;
371
371
  return config.managed === true ? managedClaudeKeyFor(jobDir) !== void 0 : agentCredential(hostEnv, {}, agents) !== void 0;
372
372
  }
373
+ var PROXIED_SLOTS = 16;
374
+ var MAX_NAME_IN_DESTINATION = 40;
375
+ function destinationNameOf(variable) {
376
+ const readable = variable.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, MAX_NAME_IN_DESTINATION).replace(/-+$/g, "");
377
+ return readable === "" ? `var-${variable.slot}` : `var-${variable.slot}-${readable}`;
378
+ }
379
+ function destinationOf(variable) {
380
+ return {
381
+ name: destinationNameOf(variable),
382
+ upstream: new URL(variable.upstream).href,
383
+ header: { name: variable.header.name, value: variable.header.value.replace(/\$\{VALUE\}/g, `\${${variable.name}}`), variables: [variable.name] },
384
+ env: variable.env
385
+ };
386
+ }
387
+ var VARIABLE_NAME = /^[A-Za-z_][A-Za-z0-9_]{0,254}$/;
388
+ function parseProxied(given, malformed) {
389
+ if (given === void 0) return { proxied: [] };
390
+ if (!Array.isArray(given)) return { problem: malformed };
391
+ if (given.length > maxDestinations()) {
392
+ return { problem: `the gateway sent ${given.length} variables for a service; a build holds at most ${maxDestinations()}` };
393
+ }
394
+ const proxied = [];
395
+ const names = /* @__PURE__ */ new Set();
396
+ const slots = /* @__PURE__ */ new Set();
397
+ for (const entry of given) {
398
+ if (typeof entry !== "object" || entry === null) return { problem: malformed };
399
+ const { name, value, slot, upstream, header, env } = entry;
400
+ if (typeof name !== "string" || typeof value !== "string" || typeof upstream !== "string") return { problem: malformed };
401
+ if (typeof slot !== "number" || !Number.isInteger(slot) || slot < 0 || slot >= PROXIED_SLOTS) return { problem: malformed };
402
+ if (typeof header !== "object" || header === null) return { problem: malformed };
403
+ const { name: headerName, value: headerValue } = header;
404
+ if (typeof headerName !== "string" || typeof headerValue !== "string") return { problem: malformed };
405
+ if (env !== void 0 && (typeof env !== "object" || env === null || Array.isArray(env))) return { problem: malformed };
406
+ if (!VARIABLE_NAME.test(name)) return { problem: `the factory's build variable ${JSON.stringify(name)} is not a variable name` };
407
+ if (names.has(name)) return { problem: `the factory's build variable ${name} is listed twice` };
408
+ if (slots.has(slot)) return { problem: `the factory's build variables ${name} and another use the slot ${slot}` };
409
+ names.add(name);
410
+ slots.add(slot);
411
+ if (value.trim().length < MIN_SCRUBBED_LITERAL) {
412
+ return { problem: `the value of the factory's build variable ${name} has fewer than ${MIN_SCRUBBED_LITERAL} characters, so the runner could not remove it from logs and transcripts` };
413
+ }
414
+ if ([...headerValue.matchAll(/\$\{([^}]*)\}/g)].some((match) => match[1] !== "VALUE") || !headerValue.includes("${VALUE}")) {
415
+ return { problem: `the header of the factory's build variable ${name} must name \${VALUE} and no other variable` };
416
+ }
417
+ const variable = { name, value, slot, upstream, header: { name: headerName, value: headerValue }, env: { ...env ?? {} } };
418
+ let reason;
419
+ try {
420
+ const resolved = resolveDestinations(
421
+ [{ name: destinationNameOf(variable), upstream, header: `${headerName}: ${headerValue.replace(/\$\{VALUE\}/g, `\${${name}}`)}`, env: variable.env }],
422
+ [],
423
+ isReservedVariable,
424
+ (key, why) => {
425
+ throw new Error(`${key} ${why}`);
426
+ }
427
+ );
428
+ const host = new URL(resolved[0].upstream).hostname.replace(/^\[|\]$/g, "");
429
+ if (isIP(host) !== 0 && classifyAddress(host) !== void 0) throw new Error(`upstream ${host} is a private address`);
430
+ } catch (err) {
431
+ reason = err instanceof Error ? err.message : "is refused";
432
+ }
433
+ if (reason !== void 0) return { problem: `the service of the factory's build variable ${name}: ${reason}` };
434
+ proxied.push(variable);
435
+ }
436
+ return { proxied };
437
+ }
373
438
 
374
439
  // src/runner/managed-build-settings.ts
375
440
  var FETCH_RETRY_WINDOW_MS2 = 3e4;
376
441
  var GIB = 1024 ** 3;
377
442
  var GB = 1e9;
378
- var VARIABLE_NAME = /^[A-Za-z_][A-Za-z0-9_]{0,254}$/;
443
+ var VARIABLE_NAME2 = /^[A-Za-z_][A-Za-z0-9_]{0,254}$/;
379
444
  var MALFORMED = "the gateway's answer was not a machine, a list of hosts and a list of variables";
380
445
  function parseSettings(data) {
381
446
  const isPositive = (value) => typeof value === "number" && Number.isFinite(value) && value > 0;
382
447
  if (typeof data !== "object" || data === null) return { problem: MALFORMED };
383
- const { machine, allowHosts, variables } = data;
448
+ const { machine, allowHosts, variables, proxied } = data;
384
449
  if (typeof machine !== "object" || machine === null) return { problem: MALFORMED };
385
450
  const { size, vcpus, memoryGiB, diskGB } = machine;
386
451
  if (size !== "small" && size !== "large" || !isPositive(vcpus) || !isPositive(memoryGiB) || !isPositive(diskGB)) return { problem: MALFORMED };
@@ -395,13 +460,21 @@ function parseSettings(data) {
395
460
  if (typeof entry !== "object" || entry === null) return { problem: MALFORMED };
396
461
  const { name, value } = entry;
397
462
  if (typeof name !== "string" || name === "" || typeof value !== "string") return { problem: MALFORMED };
398
- if (!VARIABLE_NAME.test(name)) return { problem: `the factory's build variable ${JSON.stringify(name)} is not a variable name` };
463
+ if (!VARIABLE_NAME2.test(name)) return { problem: `the factory's build variable ${JSON.stringify(name)} is not a variable name` };
399
464
  if (value.trim().length < MIN_SCRUBBED_LITERAL) {
400
465
  return { problem: `the value of the factory's build variable ${name} has fewer than ${MIN_SCRUBBED_LITERAL} characters, so the runner could not remove it from logs and transcripts` };
401
466
  }
402
467
  parsed.push({ name, value });
403
468
  }
404
- return { settings: { machine: { size, vcpus, memoryGiB, diskGB }, allowHosts: [...allowHosts], variables: parsed } };
469
+ const sent = parseProxied(proxied, MALFORMED);
470
+ if ("problem" in sent) return { problem: sent.problem };
471
+ const plain3 = new Set(parsed.map((variable) => variable.name));
472
+ for (const variable of sent.proxied) {
473
+ for (const name of [variable.name, ...Object.keys(variable.env)]) {
474
+ if (plain3.has(name)) return { problem: `the gateway listed the factory's build variable ${name} as plain and as sent to a service` };
475
+ }
476
+ }
477
+ return { settings: { machine: { size, vcpus, memoryGiB, diskGB }, allowHosts: [...allowHosts], variables: parsed, proxied: sent.proxied } };
405
478
  }
406
479
  async function fetchManagedBuildSettings(config, item, deps = {}) {
407
480
  const fetchImpl = deps.fetchImpl ?? fetch;
@@ -425,10 +498,11 @@ function dropManagedBuildSettings(jobDir) {
425
498
  held2.delete(jobDir);
426
499
  }
427
500
  function managedBuildSettingValues() {
428
- return [...new Set([...held2.values()].flatMap((settings) => settings.variables.map(({ value }) => value)))];
501
+ return [...new Set([...held2.values()].flatMap((settings) => [...settings.variables, ...settings.proxied ?? []].map(({ value }) => value)))];
429
502
  }
430
503
  function managedBuildSettingValuesFor(jobDir) {
431
- return [...new Set((held2.get(jobDir)?.variables ?? []).map(({ value }) => value))];
504
+ const settings = held2.get(jobDir);
505
+ return [...new Set([...settings?.variables ?? [], ...settings?.proxied ?? []].map(({ value }) => value))];
432
506
  }
433
507
  function managedMachineLimits(settings) {
434
508
  const { vcpus, memoryGiB, diskGB } = settings.machine;
@@ -438,6 +512,34 @@ function withFactoryHosts(runnerHosts, settings) {
438
512
  if (settings === void 0) return runnerHosts;
439
513
  return [.../* @__PURE__ */ new Set([...runnerHosts ?? [], ...settings.allowHosts])];
440
514
  }
515
+
516
+ // src/runner/factory-destinations.ts
517
+ var STAND_IN = "olvar_placeholder-not-a-real-value";
518
+ var FACTORY_INDEX_BASE = 32;
519
+ function heldValue(jobDir, name) {
520
+ const env = /* @__PURE__ */ Object.create(null);
521
+ Object.defineProperty(env, name, { enumerable: true, get: () => managedBuildSettingsFor(jobDir)?.proxied?.find((entry) => entry.name === name)?.value });
522
+ return env;
523
+ }
524
+ function factoryDestinations(jobDir) {
525
+ return (managedBuildSettingsFor(jobDir)?.proxied ?? []).map((variable) => ({
526
+ destination: destinationOf(variable),
527
+ hostEnv: heldValue(jobDir, variable.name),
528
+ index: FACTORY_INDEX_BASE + variable.slot
529
+ }));
530
+ }
531
+ function factoryIndexes(jobDir) {
532
+ return (managedBuildSettingsFor(jobDir)?.proxied ?? []).map((variable) => FACTORY_INDEX_BASE + variable.slot);
533
+ }
534
+ function proxiedEnvironment(jobDir) {
535
+ const env = {};
536
+ for (const variable of managedBuildSettingsFor(jobDir)?.proxied ?? []) {
537
+ env[variable.name] = STAND_IN;
538
+ const local = containerLocalAddress(FACTORY_INDEX_BASE + variable.slot);
539
+ for (const [name, value] of Object.entries(variable.env)) env[name] = value.split("{local}").join(local);
540
+ }
541
+ return env;
542
+ }
441
543
  var AssetError = class extends Error {
442
544
  constructor(file, message) {
443
545
  super(message);
@@ -3835,7 +3937,8 @@ async function provisionMicroVmOnce(input, allowRestore, itemDiskFailed) {
3835
3937
  agents: runtime.agents,
3836
3938
  containerEnv: report.apply.containerEnv,
3837
3939
  builtIns: true,
3838
- factoryVariables: factoryVariablesOf(config, jobDir)
3940
+ factoryVariables: factoryVariablesOf(config, jobDir),
3941
+ proxiedEnvironment: proxiedEnvironment(jobDir)
3839
3942
  };
3840
3943
  const env = buildEnvironment(envInput);
3841
3944
  if (env.skippedTokenVariables.length > 0) {
@@ -3903,7 +4006,7 @@ async function provisionMicroVmOnce(input, allowRestore, itemDiskFailed) {
3903
4006
  } catch (err) {
3904
4007
  return bail(`the tunnel could not start: ${describeCallFailure(err)}`);
3905
4008
  }
3906
- const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: true }, runtime.agents);
4009
+ const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: true, factory: factoryIndexes(jobDir) }, runtime.agents);
3907
4010
  const served = input.leaseTimeLeftMs === void 0 ? links : [...links, LEASE_LINK];
3908
4011
  let leaseServer;
3909
4012
  if (input.leaseTimeLeftMs !== void 0) {
@@ -4197,7 +4300,8 @@ function vmExecFor(input, argv) {
4197
4300
  miseVariables: state.miseVariables,
4198
4301
  builtIns: state.builtIns === true,
4199
4302
  identity: input.job.commitIdentity,
4200
- factoryVariables: factoryVariablesOf(input.config, input.jobDir)
4303
+ factoryVariables: factoryVariablesOf(input.config, input.jobDir),
4304
+ proxiedEnvironment: proxiedEnvironment(input.jobDir)
4201
4305
  });
4202
4306
  const env = withExtraEnv(built, input.extraEnv);
4203
4307
  const options = {
@@ -4234,7 +4338,8 @@ async function startMicroVmCommand(input) {
4234
4338
  miseVariables: state.miseVariables,
4235
4339
  builtIns: state.builtIns === true,
4236
4340
  identity: input.job.commitIdentity,
4237
- factoryVariables: factoryVariablesOf(input.config, input.jobDir)
4341
+ factoryVariables: factoryVariablesOf(input.config, input.jobDir),
4342
+ proxiedEnvironment: proxiedEnvironment(input.jobDir)
4238
4343
  }), input.extraEnv);
4239
4344
  const started = await input.runtime.vm.exec(state.vsockPath, {
4240
4345
  argv: ["/bin/sh", "-c", commandWithShim(input.job, input.cmdline)],
@@ -4286,7 +4391,8 @@ async function runCliInMicroVm(input, argv, logName, goneReason) {
4286
4391
  miseVariables: state.miseVariables,
4287
4392
  builtIns: state.builtIns === true,
4288
4393
  identity: job.commitIdentity,
4289
- factoryVariables: factoryVariablesOf(input.config, input.jobDir)
4394
+ factoryVariables: factoryVariablesOf(input.config, input.jobDir),
4395
+ proxiedEnvironment: proxiedEnvironment(input.jobDir)
4290
4396
  });
4291
4397
  const result = await runtime.vm.exec(state.vsockPath, {
4292
4398
  argv,
@@ -4485,7 +4591,7 @@ async function startCheckMicroVm(input) {
4485
4591
  return fail(`the tunnel could not start: ${describeCallFailure(err)}`);
4486
4592
  }
4487
4593
  if (abandoned()) return fail(ABANDONED);
4488
- const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: false });
4594
+ const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: false, factory: factoryIndexes(jobDir) });
4489
4595
  const configPath = join(buildDir2, "vm.json");
4490
4596
  const helper = await helperFor(runtime, (line2) => log.line(`${tag} ${line2}`), config.managed === true);
4491
4597
  if (helper === void 0 && config.managed === true) return fail(MANAGED_UNJAILED_REASON);
@@ -4558,7 +4664,8 @@ async function startCheckMicroVm(input) {
4558
4664
  hostEnv: runtime.hostEnv,
4559
4665
  containerEnv: built.containerEnv ?? {},
4560
4666
  // The checks of a managed build get its factory's variables, as its command did, and none of the runner's own.
4561
- factoryVariables: factoryVariablesOf(config, jobDir)
4667
+ factoryVariables: factoryVariablesOf(config, jobDir),
4668
+ proxiedEnvironment: proxiedEnvironment(jobDir)
4562
4669
  });
4563
4670
  const evalInput = { dir: join(checksDir, EVAL_INPUT_NAME), delivered: false };
4564
4671
  const deliverEvalInput2 = async () => {
@@ -4809,123 +4916,6 @@ async function sampleGuest(runtime, state) {
4809
4916
  return void 0;
4810
4917
  }
4811
4918
  }
4812
-
4813
- // src/runner/container/ranges.ts
4814
- var V4 = [
4815
- ["unspecified", "0.0.0.0/8"],
4816
- ["loopback", "127.0.0.0/8"],
4817
- ["private", "10.0.0.0/8"],
4818
- ["private", "172.16.0.0/12"],
4819
- ["private", "192.168.0.0/16"],
4820
- ["protocol-assignments", "192.0.0.0/24"],
4821
- ["benchmarking", "198.18.0.0/15"],
4822
- ["azure-wireserver", "168.63.129.16/32"],
4823
- ["link-local", "169.254.0.0/16"],
4824
- ["shared-address", "100.64.0.0/10"],
4825
- ["multicast", "224.0.0.0/4"],
4826
- ["reserved", "240.0.0.0/4"]
4827
- ];
4828
- var V6 = [
4829
- ["unspecified", "::/128"],
4830
- ["loopback", "::1/128"],
4831
- ["ipv4-mapped", "::ffff:0:0/96"],
4832
- ["nat64", "64:ff9b::/96"],
4833
- // The location of an embedded IPv4 address depends on the translator's prefix length, so the whole prefix is refused.
4834
- ["nat64-local", "64:ff9b:1::/48"],
4835
- ["ipv4-compatible", "::/96"],
4836
- ["link-local", "fe80::/10"],
4837
- ["unique-local", "fc00::/7"],
4838
- ["multicast", "ff00::/8"]
4839
- ];
4840
- var UNPARSEABLE = { name: "unparseable", cidr: "-" };
4841
- function parseV4(text2) {
4842
- const parts = text2.split(".");
4843
- if (parts.length !== 4) return void 0;
4844
- let value = 0;
4845
- for (const part of parts) {
4846
- if (!/^\d{1,3}$/.test(part)) return void 0;
4847
- const octet = Number(part);
4848
- if (octet > 255) return void 0;
4849
- value = value * 256 + octet;
4850
- }
4851
- return value;
4852
- }
4853
- function parseV6(input) {
4854
- const zone = input.indexOf("%");
4855
- let text2 = zone === -1 ? input : input.slice(0, zone);
4856
- const lastColon = text2.lastIndexOf(":");
4857
- const tail = text2.slice(lastColon + 1);
4858
- if (tail.includes(".")) {
4859
- const v4 = parseV4(tail);
4860
- if (v4 === void 0) return void 0;
4861
- text2 = `${text2.slice(0, lastColon + 1)}${(v4 >>> 16).toString(16)}:${(v4 & 65535).toString(16)}`;
4862
- }
4863
- const halves = text2.split("::");
4864
- if (halves.length > 2) return void 0;
4865
- const groups = (part) => {
4866
- if (part === "") return [];
4867
- const found = part.split(":");
4868
- return found.every((g) => /^[0-9a-fA-F]{1,4}$/.test(g)) ? found : void 0;
4869
- };
4870
- const head = groups(halves[0]);
4871
- const rest = groups(halves[1] ?? "");
4872
- if (head === void 0 || rest === void 0) return void 0;
4873
- let words;
4874
- if (halves.length === 2) {
4875
- const missing = 8 - head.length - rest.length;
4876
- if (missing < 1) return void 0;
4877
- words = [...head, ...Array(missing).fill("0"), ...rest];
4878
- } else {
4879
- if (head.length !== 8) return void 0;
4880
- words = head;
4881
- }
4882
- return words.reduce((acc, word) => acc << BigInt(16) | BigInt(parseInt(word, 16)), BigInt(0));
4883
- }
4884
- function build4() {
4885
- return V4.map(([name, cidr]) => {
4886
- const [address, length] = cidr.split("/");
4887
- return { name, cidr, base: parseV4(address), bits: Number(length) };
4888
- });
4889
- }
4890
- function build6() {
4891
- return V6.map(([name, cidr]) => {
4892
- const [address, length] = cidr.split("/");
4893
- return { name, cidr, base: parseV6(address), bits: Number(length) };
4894
- });
4895
- }
4896
- var RANGES_4 = build4();
4897
- var RANGES_6 = build6();
4898
- [...RANGES_4, ...RANGES_6].map(({ name, cidr }) => ({ name, cidr }));
4899
- function carried6to4(address) {
4900
- const v6 = parseV6(address);
4901
- if (v6 === void 0 || v6 >> BigInt(112) !== BigInt(8194)) return void 0;
4902
- const v4 = Number(v6 >> BigInt(80) & BigInt(4294967295));
4903
- return [v4 >>> 24, v4 >>> 16 & 255, v4 >>> 8 & 255, v4 & 255].join(".");
4904
- }
4905
- function classifyAddress(address) {
4906
- const v4 = parseV4(address);
4907
- if (v4 !== void 0) {
4908
- for (const range of RANGES_4) {
4909
- const shift = 32 - range.bits;
4910
- if (Math.floor(v4 / 2 ** shift) === Math.floor(range.base / 2 ** shift)) return { name: range.name, cidr: range.cidr };
4911
- }
4912
- return void 0;
4913
- }
4914
- const v6 = parseV6(address);
4915
- if (v6 === void 0) return UNPARSEABLE;
4916
- const carries = carried6to4(address);
4917
- if (carries !== void 0) {
4918
- const inner = classifyAddress(carries);
4919
- return inner === void 0 ? void 0 : { ...inner, carries };
4920
- }
4921
- for (const range of RANGES_6) {
4922
- const shift = BigInt(128 - range.bits);
4923
- if (v6 >> shift === range.base >> shift) return { name: range.name, cidr: range.cidr };
4924
- }
4925
- return void 0;
4926
- }
4927
-
4928
- // src/runner/container/tunnel.ts
4929
4919
  function isLiteralAddress(text2) {
4930
4920
  return isIP(text2) !== 0;
4931
4921
  }
@@ -8537,7 +8527,9 @@ async function giveBackCacheSpace(input) {
8537
8527
  try {
8538
8528
  if (input.helper !== void 0) {
8539
8529
  try {
8540
- return { ok: true, ...await input.helper.discard(input.buildId) };
8530
+ const first = await input.helper.discard(input.buildId);
8531
+ if (first.freedBytes > 0) return { ok: true, freedBytes: first.freedBytes };
8532
+ return { ok: true, freedBytes: (await input.helper.discard(input.buildId)).freedBytes };
8541
8533
  } catch (err) {
8542
8534
  if (err instanceof HelperRefusal && err.code === "bad-request") {
8543
8535
  return { ok: false, reason: `${err.message}; run \`outerlayer runner install --service --replace\` to install the root helper that goes with this release` };
@@ -8547,7 +8539,10 @@ async function giveBackCacheSpace(input) {
8547
8539
  }
8548
8540
  if (!existsSync(input.diskPath)) return { ok: false, reason: `${input.diskPath} does not exist` };
8549
8541
  const before = allocatedBytes(input.diskPath);
8550
- const result = await (input.run ?? e2fsckRunner())("e2fsck", ["-f", "-y", "-E", "discard", input.diskPath]);
8542
+ const run = input.run ?? e2fsckRunner();
8543
+ const check = () => run("e2fsck", ["-f", "-y", "-E", "discard", input.diskPath]);
8544
+ let result = await check();
8545
+ if (result.status === 1) result = await check();
8551
8546
  if (result.status !== 0 && result.status !== 1) {
8552
8547
  const why = firstLine6(result.stderr);
8553
8548
  return { ok: false, reason: `e2fsck failed (${result.status === null ? "ended by a signal" : `exit ${result.status}`})${why === "" ? "" : `: ${why}`}` };
@@ -10776,6 +10771,8 @@ async function startServicesFor(runtime, config, buildDir2, jobDir, itemKey, bui
10776
10771
  buildDir: buildDir2,
10777
10772
  jobDir,
10778
10773
  destinations: config.build?.destinations ?? [],
10774
+ // A managed build's proxied variables are served for this claim alone.
10775
+ factory: factoryDestinations(settingsDir ?? jobDir),
10779
10776
  // A managed build's tunnel allows the factory's hosts beside the runner's own.
10780
10777
  allowHosts: withFactoryHosts(config.build?.allowHosts, managedBuildSettingsFor(settingsDir ?? jobDir)),
10781
10778
  ...optionalEgress(config),
@@ -803,7 +803,7 @@ async function missingControlPlane(cwd, sessionId, home, env) {
803
803
  cleanupEarlierCopies(dirs);
804
804
  }
805
805
  if (!contextPossiblyGoverned(cwd, home)) return void 0;
806
- const { governanceOf } = await import('./control-plane-launch-7FWJACHT.js');
806
+ const { governanceOf } = await import('./control-plane-launch-SLIYO4BZ.js');
807
807
  if (await governanceOf({ cwd, env, home }) !== "governed") return void 0;
808
808
  recordMissingContext(dirs, sessionId, home);
809
809
  const launcher = `${cliInvocation()} ${LEGACY.legacy.subcommand}`;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { isSameProcess } from './chunk-JBJTC3UU.js';
4
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-GANI63IL.js';
4
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-AT6RLTDF.js';
5
5
  import { existsSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'fs';
6
6
  import { dirname } from 'path';
7
7
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-GANI63IL.js';
3
+ import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-AT6RLTDF.js';
4
4
  import { readlinkSync, realpathSync, mkdirSync, unlinkSync, symlinkSync, renameSync, readFileSync, writeFileSync, rmSync, existsSync, readdirSync } from 'fs';
5
5
  import { join, basename, sep, resolve } from 'path';
6
6
 
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-PUPUOQ6Y.js';
4
- import { parseSize } from './chunk-UCUZJ5W5.js';
5
- import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-P63MQNDV.js';
3
+ import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-W2ZZ6KQP.js';
4
+ import { parseSize } from './chunk-ZIRMH464.js';
5
+ import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-CIG5RZ7Z.js';
6
6
  import { builderDiskPinned } from './chunk-QTU6GW2M.js';
7
7
  import { homeFromEnv } from './chunk-352DHUTP.js';
8
8
  import { existsSync, statSync, accessSync, constants, readFileSync } from 'fs';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { helperSocketPath } from './chunk-GEYJLP6L.js';
4
- import { UNIT_MARKER } from './chunk-GQHT6N47.js';
5
- import { runnerDir } from './chunk-GANI63IL.js';
3
+ import { helperSocketPath } from './chunk-ECUP2QQH.js';
4
+ import { UNIT_MARKER } from './chunk-757WX4YX.js';
5
+ import { runnerDir } from './chunk-AT6RLTDF.js';
6
6
  import { createHash } from 'crypto';
7
7
  import { join } from 'path';
8
8
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { WorkCommandError, postJson } from './chunk-LFUEODDW.js';
4
- import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-EQ5M2WWA.js';
3
+ import { WorkCommandError, postJson } from './chunk-LPKNESZ5.js';
4
+ import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-DBXWEZ3L.js';
5
5
  import { buildRefusalReason } from './chunk-6V6ONATO.js';
6
- import { signingFetchFor } from './chunk-VJKHQSSS.js';
7
- import { signerFor } from './chunk-MDJ6ILXG.js';
8
- import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-GANI63IL.js';
6
+ import { signingFetchFor } from './chunk-PEKITBZX.js';
7
+ import { signerFor } from './chunk-LEQWPWZA.js';
8
+ import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-AT6RLTDF.js';
9
9
  import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-4XYEPTZP.js';
10
10
  import { SHIM_SCRIPT, GOVERNANCE_VARIABLE } from './chunk-UWYU46GF.js';
11
11
  import { readDegraded, readContextManifest, readSourceCache } from './chunk-YQR6E6OV.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { PROXY_WARNING_FLAG } from './chunk-P63MQNDV.js';
3
+ import { PROXY_WARNING_FLAG } from './chunk-CIG5RZ7Z.js';
4
4
  import { buildAgent, GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, RELAY_ID, RELAY_USER, HEADLESS_SHELL_REVISION, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, HEADLESS_SHELL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_VERSION } from './chunk-QTU6GW2M.js';
5
5
  import { defaultAgents } from './chunk-EI22245K.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-GANI63IL.js';
3
+ import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-AT6RLTDF.js';
4
4
  import { generateKeyPairSync, createPrivateKey, createPublicKey, sign } from 'crypto';
5
5
  import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
6
6
 
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { detectActiveSession } from './chunk-66GYPUUN.js';
4
- import { autoConnect } from './chunk-GXCU5HTU.js';
5
- import { workPageUrl } from './chunk-UHVYFXW6.js';
4
+ import { autoConnect } from './chunk-MMCVDHDX.js';
5
+ import { workPageUrl } from './chunk-B3XUAKJI.js';
6
6
  import { sanitizeTerminal } from './chunk-F3T5QJ24.js';
7
7
  import { C } from './chunk-2AM6Z5BP.js';
8
- import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-VJKHQSSS.js';
9
- import { signRunnerRequest } from './chunk-MDJ6ILXG.js';
8
+ import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-PEKITBZX.js';
9
+ import { signRunnerRequest } from './chunk-LEQWPWZA.js';
10
10
  import { readRepoConnection } from './chunk-BJ3KTMDH.js';
11
11
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
12
12
  import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-LLZ2CX4M.js';
@@ -475,7 +475,7 @@ async function runWorkLinkSession(opts) {
475
475
  return await linkSession(opts);
476
476
  } catch (err) {
477
477
  if (opts.logFailures) {
478
- const { logHookError } = await import('./hook-fast-Q6HOUK64.js');
478
+ const { logHookError } = await import('./hook-fast-IXIYJKAN.js');
479
479
  const reason = err instanceof Error ? err.message : String(err);
480
480
  logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
481
481
  }
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { escapeUnitPath, UNIT_MARKER, DEFAULT_UNIT_NAME } from './chunk-GQHT6N47.js';
3
+ import { escapeUnitPath, UNIT_MARKER, DEFAULT_UNIT_NAME } from './chunk-757WX4YX.js';
4
4
  import { inspectService, realInspectProbes } from './chunk-QTU6GW2M.js';
5
5
  import { realpathSync, readFileSync, readdirSync } from 'fs';
6
6
  import { resolve, dirname, join } from 'path';
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { sanitizeTerminal } from './chunk-F3T5QJ24.js';
4
4
  import { isAgentsMdLayout } from './chunk-XEZO7VQH.js';
5
- import { resolveGatewayCredentials, defaultFetch } from './chunk-VJKHQSSS.js';
5
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-PEKITBZX.js';
6
6
  import { versionAtLeast } from './chunk-UWYU46GF.js';
7
7
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
8
8
  import { machineSkillsState, staleAgentSkills } from './chunk-7VUTGCGH.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { isVersion, compareVersions } from './chunk-TQMI335S.js';
4
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-GANI63IL.js';
4
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-AT6RLTDF.js';
5
5
  import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
6
6
  import { join } from 'path';
7
7
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-UHVYFXW6.js';
4
- import { resolveGatewayCredentials } from './chunk-VJKHQSSS.js';
3
+ import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-B3XUAKJI.js';
4
+ import { resolveGatewayCredentials } from './chunk-PEKITBZX.js';
5
5
  import { readCloudConfig } from './chunk-HWVMRETT.js';
6
6
  import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
7
7
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
@@ -3,10 +3,10 @@ import { createRequire } from 'node:module';
3
3
  import { runEmit } from './chunk-HBE75JAU.js';
4
4
  import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-WFRYPYPT.js';
5
5
  import { installStarterPack } from './chunk-6DOYJN44.js';
6
- import { listWithAnd } from './chunk-UHVYFXW6.js';
6
+ import { listWithAnd } from './chunk-B3XUAKJI.js';
7
7
  import { AGENTS_MD_LAYOUT, mcpFiles, declareAgentsMdLayout, linkAgentSkills, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-XEZO7VQH.js';
8
8
  import { C } from './chunk-2AM6Z5BP.js';
9
- import { resolveGitCommonDir, defaultGitRunner } from './chunk-EQ5M2WWA.js';
9
+ import { resolveGitCommonDir, defaultGitRunner } from './chunk-DBXWEZ3L.js';
10
10
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
11
11
  import { linkedAgentsPath } from './chunk-UZ5SDO7Y.js';
12
12
  import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { EXEC_PORT } from './chunk-PVUBF24F.js';
3
+ import { EXEC_PORT } from './chunk-SSYFNK4W.js';
4
4
  import { createConnection } from 'net';
5
5
 
6
6
  createRequire(import.meta.url);