@outerlayer/cli 0.34.0-next.20261026145838 → 0.34.0-next.20261026182624

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 (125) hide show
  1. package/README.md +6 -0
  2. package/dist/{agent-setup-FNDKCPUP.js → agent-setup-WOEZELVB.js} +6 -6
  3. package/dist/{bridge-YJBB4YA3.js → bridge-F5FBQSPZ.js} +2 -2
  4. package/dist/{build-ZJK6CPNH.js → build-UDOBVX5J.js} +7 -7
  5. package/dist/{build-disk-7HS4UF7O.js → build-disk-C3WIAHCL.js} +6 -6
  6. package/dist/build-info.json +1 -1
  7. package/dist/{builder-MHZKDI4H.js → builder-YNXWVH2V.js} +5 -5
  8. package/dist/{check-4W4QUBMP.js → check-G2K76NEM.js} +39 -38
  9. package/dist/{chunk-2ILU7UAU.js → chunk-3VZTNXK5.js} +1 -1
  10. package/dist/{chunk-4YFMNF5Y.js → chunk-4J2FF5HZ.js} +3 -3
  11. package/dist/{chunk-CAQCDYKF.js → chunk-5JGPTYLT.js} +2 -2
  12. package/dist/chunk-6D7H5DMZ.js +152 -0
  13. package/dist/{chunk-OGPEHSNW.js → chunk-6KFJIU73.js} +1 -1
  14. package/dist/{chunk-3EJBI5JW.js → chunk-7FQYTM7M.js} +1 -1
  15. package/dist/{chunk-3N77LUQI.js → chunk-7QAJQDHS.js} +1 -1
  16. package/dist/{chunk-SI6WDF3U.js → chunk-CFFVCI2I.js} +1 -1
  17. package/dist/{chunk-7P3H4RY2.js → chunk-CNZRUVZ5.js} +102 -36
  18. package/dist/{chunk-WMNPKBX5.js → chunk-ELO5XEES.js} +4 -4
  19. package/dist/{chunk-PP6OX4OT.js → chunk-EPFFYDNX.js} +5 -5
  20. package/dist/{chunk-CY5TCVBS.js → chunk-ERTIEYDG.js} +6 -6
  21. package/dist/{chunk-35JMYSUD.js → chunk-EUQZAH2W.js} +2 -2
  22. package/dist/{chunk-WHDS6MEG.js → chunk-GHFI5GBF.js} +3 -3
  23. package/dist/{chunk-PXGU3GKY.js → chunk-GJ4KBHBD.js} +1 -1
  24. package/dist/chunk-GYVMMU3U.js +321 -0
  25. package/dist/{chunk-VVOSUGEF.js → chunk-H47VGSCW.js} +4 -4
  26. package/dist/{chunk-TFPNPS4Q.js → chunk-HOUFCUMH.js} +1 -1
  27. package/dist/{chunk-7JE2WFNK.js → chunk-HVPW272H.js} +3 -3
  28. package/dist/{chunk-M3ME6TLQ.js → chunk-HVQMIZ22.js} +4 -4
  29. package/dist/{chunk-7DXVL7TN.js → chunk-IO2BBKG4.js} +3 -3
  30. package/dist/{chunk-UONH72CJ.js → chunk-IWVGALDC.js} +2 -2
  31. package/dist/{chunk-ZP7GKJSM.js → chunk-JC6AQ6PC.js} +39 -6
  32. package/dist/{chunk-6JZXIWX7.js → chunk-JKNOJKVD.js} +34 -9
  33. package/dist/{chunk-GEQT3RPN.js → chunk-JSZRBQY3.js} +3 -3
  34. package/dist/{chunk-MOI2KDLH.js → chunk-L5VHGRQE.js} +1 -1
  35. package/dist/{chunk-SKVA4KWD.js → chunk-LD3BHLK7.js} +3 -3
  36. package/dist/{chunk-YNMVVQOQ.js → chunk-LQHCNXPK.js} +1 -1
  37. package/dist/{chunk-PWSUNS6Y.js → chunk-LTN2YFLR.js} +99 -31
  38. package/dist/{chunk-YHKU2NOZ.js → chunk-LTYBHCL4.js} +1 -1
  39. package/dist/{chunk-PAK5P2ND.js → chunk-MH6QLXUO.js} +1 -1
  40. package/dist/{chunk-OS7DJOQJ.js → chunk-MN3PP45X.js} +1 -1
  41. package/dist/{chunk-25GRRBTH.js → chunk-NHEU5CON.js} +1 -1
  42. package/dist/{chunk-IM6IL3F4.js → chunk-OQT7RT5I.js} +3 -3
  43. package/dist/{chunk-KRTD2F3I.js → chunk-P3CHDKXD.js} +3 -3
  44. package/dist/{chunk-63IVRRIO.js → chunk-P3NPTFLF.js} +3 -3
  45. package/dist/{chunk-GC5PVMIJ.js → chunk-RR3VDM7M.js} +3 -3
  46. package/dist/{chunk-G4W4B33M.js → chunk-SDAEXUIX.js} +25 -10
  47. package/dist/{chunk-SYVRBBLW.js → chunk-SDELQEG4.js} +1 -1
  48. package/dist/{chunk-AE3OTPUU.js → chunk-SZU4YCBH.js} +964 -1056
  49. package/dist/{chunk-FDJPDZSR.js → chunk-TS3EFB7S.js} +1 -1
  50. package/dist/{chunk-EMH2LNIE.js → chunk-V2VJYK46.js} +4 -4
  51. package/dist/{chunk-KAVZAB3E.js → chunk-VEJWLQ4G.js} +10 -10
  52. package/dist/{chunk-XTYYF6P7.js → chunk-VUQKGBIQ.js} +14 -7
  53. package/dist/{chunk-3RLKILPT.js → chunk-WE4C3ODP.js} +2 -2
  54. package/dist/{chunk-QEIA5Q35.js → chunk-XL2MPORM.js} +4 -4
  55. package/dist/{chunk-VGRCZE6U.js → chunk-XSFR76J7.js} +3 -3
  56. package/dist/{chunk-UMYYYF7B.js → chunk-YL3RWW7X.js} +1 -1
  57. package/dist/{chunk-GSSVJNP2.js → chunk-Z7WMU3RA.js} +3 -2
  58. package/dist/{chunk-3EHDZTRT.js → chunk-ZIKZZ4LK.js} +3 -3
  59. package/dist/{claude-launcher-OQZNW7XJ.js → claude-launcher-6KGANL7E.js} +1 -1
  60. package/dist/{cli-PFWJD5QM.js → cli-5KY3TE3S.js} +114 -112
  61. package/dist/{command-CM22HPN5.js → command-VQPQDPCZ.js} +24 -24
  62. package/dist/{config-W2XWNR4C.js → config-WSZIWPP4.js} +7 -7
  63. package/dist/{connect-cmd-TOWE4P45.js → connect-cmd-LI34HS5Q.js} +6 -6
  64. package/dist/{container-start-D2OEPMUO.js → container-start-XRR4VC5Z.js} +31 -30
  65. package/dist/{context-show-cmd-5UJUWBJL.js → context-show-cmd-X27GMOT6.js} +7 -7
  66. package/dist/{control-plane-launch-XBGHM7DB.js → control-plane-launch-74EIIB5Z.js} +5 -5
  67. package/dist/dist-HVXLUMRV.js +7 -0
  68. package/dist/{docker-GA63DVME.js → docker-KZ3OQTPW.js} +5 -5
  69. package/dist/{doctor-GVWQBHBC.js → doctor-KPKLFIJH.js} +24 -24
  70. package/dist/{emit-artifact-cmd-TUOLSGHB.js → emit-artifact-cmd-BJICHW2E.js} +11 -11
  71. package/dist/{emit-criteria-cmd-VEUMA7MZ.js → emit-criteria-cmd-MUWPT25P.js} +8 -8
  72. package/dist/{emit-demo-cmd-YLEZB6FG.js → emit-demo-cmd-YQN7VKQH.js} +12 -12
  73. package/dist/{emit-finding-cmd-BX3FWGSX.js → emit-finding-cmd-NPBWVY44.js} +8 -8
  74. package/dist/{emit-result-cmd-AYXGCIPR.js → emit-result-cmd-7CJZZQGK.js} +10 -10
  75. package/dist/{emit-step-cmd-CU6GQ3WW.js → emit-step-cmd-ZPLHZAMA.js} +8 -8
  76. package/dist/{exec-client-QB4OZRGM.js → exec-client-LXHTMVIB.js} +3 -3
  77. package/dist/find-unit-UKH6JH4S.js +18 -0
  78. package/dist/{findings-cmd-G4V4M3PO.js → findings-cmd-DZ4ESTHX.js} +8 -8
  79. package/dist/{fleet-readiness-NJYTQYTA.js → fleet-readiness-YSI4NOHT.js} +5 -5
  80. package/dist/{governing-source-JQV3ZKD7.js → governing-source-JPRMOB3O.js} +10 -10
  81. package/dist/{guest-init-IF5LXGUL.js → guest-init-WWL2WL7R.js} +4 -4
  82. package/dist/{hook-fast-GPUL7T77.js → hook-fast-6EW2MGA2.js} +1 -1
  83. package/dist/host-checks-NDXNYOMA.js +75 -0
  84. package/dist/{pending-ERXWVLLG.js → host-key-TSOKVSZX.js} +3 -3
  85. package/dist/{image-tag-SEMBVB5D.js → image-tag-BTXKIH73.js} +3 -3
  86. package/dist/index.js +4 -4
  87. package/dist/{init-FY3HP73H.js → init-MN3MNG7V.js} +21 -21
  88. package/dist/{init-3NT4YX2X.js → init-V6Y2VNKW.js} +21 -21
  89. package/dist/{init-cmd-RXHHEAOT.js → init-cmd-QCWLJDIF.js} +11 -11
  90. package/dist/{init-update-RHS6HWLI.js → init-update-GTFLPDEL.js} +9 -9
  91. package/dist/{install-cmd-5H6M2KJ7.js → install-cmd-RGO7NWKP.js} +5 -5
  92. package/dist/{logs-6CMB3DO6.js → logs-LEVH6VAI.js} +2 -2
  93. package/dist/{loop-V3GED2WX.js → loop-NGFNQF3Y.js} +38 -37
  94. package/dist/{machine-HLZLH327.js → machine-XG54XYYZ.js} +21 -21
  95. package/dist/{mcp-serve-cmd-MWGIN6YL.js → mcp-serve-cmd-4O5INM77.js} +4 -4
  96. package/dist/{paths-T2DEBI62.js → paths-AQ47ZRHK.js} +2 -2
  97. package/dist/{host-key-5RU322O3.js → pending-UWFDVFOA.js} +3 -3
  98. package/dist/{pidfile-EAD2OEM7.js → pidfile-PCG2H5T4.js} +3 -3
  99. package/dist/{record-IMXQNHPB.js → record-SVCNFCGQ.js} +3 -3
  100. package/dist/{runner-env-V52JUOD5.js → runner-env-YPXWTNP3.js} +9 -9
  101. package/dist/{runner-identity-J4NCBSBU.js → runner-identity-XPZO3TG4.js} +5 -5
  102. package/dist/{runner-key-ZUHMQCHZ.js → runner-key-B5EJH25Z.js} +21 -21
  103. package/dist/{session-sender-XDKMK4SF.js → session-sender-XED7CKHP.js} +11 -11
  104. package/dist/{spec-cmd-XQV7EIJW.js → spec-cmd-TRXAGQYM.js} +9 -9
  105. package/dist/{status-ZJJEJ52D.js → status-WQ53MWC3.js} +29 -28
  106. package/dist/{sync-cmd-BG2M536W.js → sync-cmd-UQVENF25.js} +10 -10
  107. package/dist/{update-steps-I5JLERXS.js → update-steps-IQVAL64Y.js} +30 -29
  108. package/dist/{watch-7A63565I.js → watch-EZGDDRTQ.js} +10 -10
  109. package/dist/{work-claim-cmd-OVPMBIRR.js → work-claim-cmd-YSAJ7DAK.js} +14 -14
  110. package/dist/{work-cmd-KVFRK24I.js → work-cmd-V5FHLWJM.js} +8 -8
  111. package/dist/{work-comment-cmd-GC3WAFM7.js → work-comment-cmd-KLEMDYI4.js} +9 -9
  112. package/dist/{work-demo-cmd-IOB5UDGQ.js → work-demo-cmd-XYRKFP4G.js} +8 -8
  113. package/dist/{work-logs-cmd-7II6D2JJ.js → work-logs-cmd-DOGPK7Q6.js} +8 -8
  114. package/dist/{work-open-pr-cmd-FYKRKCDL.js → work-open-pr-cmd-UAUEEP3V.js} +9 -9
  115. package/dist/{work-pr-cmd-KP3RI7TV.js → work-pr-cmd-LYWL7ZLF.js} +8 -8
  116. package/dist/{work-proofs-cmd-TVU6QFZN.js → work-proofs-cmd-YMMDAA6W.js} +11 -9
  117. package/dist/{work-proofs-record-XANZE3K4.js → work-proofs-record-NUCWR7ZJ.js} +17 -15
  118. package/dist/{work-stop-cmd-5V3DV3HJ.js → work-stop-cmd-MRLJEQRP.js} +8 -8
  119. package/package.json +1 -1
  120. package/skill-pack/maintained/outerlayer-amend/SKILL.md +2 -1
  121. package/skill-pack/maintained/outerlayer-build/SKILL.md +3 -1
  122. package/skill-pack/maintained/outerlayer-build/references/evidence.md +9 -3
  123. package/dist/chunk-YZ375YBI.js +0 -151
  124. package/dist/dist-IOPJIQWK.js +0 -7
  125. package/dist/find-unit-GGBRYOSO.js +0 -18
@@ -1,28 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
4
- import { readDefaultBranchHead, cloneRepository, buildRepositoryImage, prepareImageBuild, KEY_PREFIX, FETCHED_DIR, toolsDockerfile, TAG_HOST, metadataFromLabels, writeRecord, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_VOICE_DIR } from './chunk-VVOSUGEF.js';
4
+ import { readDefaultBranchHead, cloneRepository, buildRepositoryImage, prepareImageBuild, KEY_PREFIX, FETCHED_DIR, toolsDockerfile, TAG_HOST, metadataFromLabels, writeRecord, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_VOICE_DIR } from './chunk-H47VGSCW.js';
5
5
  import { currentCliBuild } from './chunk-OGFGZQA3.js';
6
- import { runExec, execCapture, waitForAgent } from './chunk-2ILU7UAU.js';
7
- import { GUEST_CID, linkVsockSockets } from './chunk-OGPEHSNW.js';
8
- import { retrySend, describeCallFailure, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-PP6OX4OT.js';
9
- import { runnerImageVersion } from './chunk-SYVRBBLW.js';
10
- import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-7JE2WFNK.js';
11
- import { runnerCredentialProblem, builtinKind, hostAllowed } from './chunk-3EHDZTRT.js';
12
- import { formatBytes, allocatedBytes } from './chunk-UONH72CJ.js';
13
- import { createDockerHost, builderSpec, RecipeError, DOCKER_FEATURE, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, readDu, JUDGE_DIR, MAX_ITEMS_BYTES, JUDGE_ITEMS, MAX_REPORT_BYTES, JUDGE_REPORT, spawnRun, writeSanitizedRecipe, classifyProperties } from './chunk-M3ME6TLQ.js';
6
+ import { runExec, execCapture, waitForAgent } from './chunk-3VZTNXK5.js';
7
+ import { GUEST_CID, linkVsockSockets } from './chunk-6KFJIU73.js';
8
+ import { retrySend, describeCallFailure, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-EPFFYDNX.js';
9
+ import { runnerImageVersion } from './chunk-SDELQEG4.js';
10
+ import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-HVPW272H.js';
11
+ import { runnerCredentialProblem, builtinKind, allowHostProblem, hostAllowed } from './chunk-ZIKZZ4LK.js';
12
+ import { formatBytes, allocatedBytes } from './chunk-IWVGALDC.js';
13
+ import { createDockerHost, builderSpec, RecipeError, DOCKER_FEATURE, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, readDu, JUDGE_DIR, MAX_ITEMS_BYTES, JUDGE_ITEMS, MAX_REPORT_BYTES, JUDGE_REPORT, spawnRun, writeSanitizedRecipe, classifyProperties } from './chunk-HVQMIZ22.js';
14
14
  import { firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, CLAUDE_CODE_VERSION, builderDiskPinned, guestAssetsPinned, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE } from './chunk-4UPET3R7.js';
15
15
  import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
16
- import { postJson, WorkCommandError, getJson } from './chunk-6JZXIWX7.js';
16
+ import { postJson, WorkCommandError, getJson } from './chunk-JKNOJKVD.js';
17
17
  import { sanitizeTerminal } from './chunk-MECW77XP.js';
18
- import { signerFor } from './chunk-MOI2KDLH.js';
18
+ import { signerFor } from './chunk-L5VHGRQE.js';
19
19
  import { sharedSkillNames, skillConflictMessage } from './chunk-FGF52V4V.js';
20
20
  import { versionAtLeast, MINIMUM_CLAUDE_VERSION } from './chunk-HCVLP7XA.js';
21
- import { setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-GSSVJNP2.js';
21
+ import { MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-Z7WMU3RA.js';
22
22
  import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-FGXT5OXS.js';
23
23
  import { downconvertSession } from './chunk-EOTMDIYC.js';
24
- import { vmAssetsDir, RUNNER_DIR_MODE, rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, buildsDir, buildDir, runnerDir, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, SHIM_DIR, vsockPath, builderCacheDiskPath, builderConsolePath } from './chunk-PXGU3GKY.js';
25
- import { claudeCredential, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, buildEnvironment, writeBuildMavenSettings, checkEnvironment, AGENT_CREDENTIAL_MISSING, mavenSettingsXml, namesGlobalSettings, MAVEN_NO_PROXY_NOTE, mavenArgs, MAVEN_SPACE_NOTE, writeMavenSettings, checkoutPath, JOB_MOUNT, realFdStorePort } from './chunk-G4W4B33M.js';
24
+ import { vmAssetsDir, RUNNER_DIR_MODE, rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, buildsDir, buildDir, runnerDir, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, SHIM_DIR, vsockPath, builderCacheDiskPath, builderConsolePath } from './chunk-GJ4KBHBD.js';
25
+ import { claudeCredential, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, buildEnvironment, writeBuildMavenSettings, checkEnvironment, AGENT_CREDENTIAL_MISSING, mavenSettingsXml, namesGlobalSettings, MAVEN_NO_PROXY_NOTE, mavenArgs, MAVEN_SPACE_NOTE, writeMavenSettings, checkoutPath, JOB_MOUNT, realFdStorePort } from './chunk-SDAEXUIX.js';
26
26
  import { RELAY_USER, RELAY_ID, UNKNOWN_TRANSPORT_REASON, DOCKER_DESKTOP_REASON, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath } from './chunk-MESOOLF4.js';
27
27
  import { spawn, spawnSync } from 'child_process';
28
28
  import { mkdirSync, existsSync, readFileSync, mkdtempSync, rmSync, chmodSync, truncateSync, statSync, accessSync, constants, readdirSync, writeFileSync, lstatSync, copyFileSync, renameSync, rmdirSync, unlinkSync, linkSync, openSync, closeSync, cpSync, writeSync, appendFileSync, createWriteStream, createReadStream } from 'fs';
@@ -74,6 +74,71 @@ function managedClaudeKeyValues() {
74
74
  function hasClaudeCredential(config, hostEnv, jobDir) {
75
75
  return config.managed === true ? managedClaudeKeyFor(jobDir) !== void 0 : claudeCredential(hostEnv) !== void 0;
76
76
  }
77
+
78
+ // src/runner/managed-build-settings.ts
79
+ var FETCH_RETRY_WINDOW_MS2 = 3e4;
80
+ var GIB = 1024 ** 3;
81
+ var GB = 1e9;
82
+ var VARIABLE_NAME = /^[A-Za-z_][A-Za-z0-9_]{0,254}$/;
83
+ var MALFORMED = "the gateway's answer was not a machine, a list of hosts and a list of variables";
84
+ function parseSettings(data) {
85
+ const isPositive = (value) => typeof value === "number" && Number.isFinite(value) && value > 0;
86
+ if (typeof data !== "object" || data === null) return { problem: MALFORMED };
87
+ const { machine, allowHosts, variables } = data;
88
+ if (typeof machine !== "object" || machine === null) return { problem: MALFORMED };
89
+ const { size, vcpus, memoryGiB, diskGB } = machine;
90
+ if (size !== "small" && size !== "large" || !isPositive(vcpus) || !isPositive(memoryGiB) || !isPositive(diskGB)) return { problem: MALFORMED };
91
+ if (!Array.isArray(allowHosts) || !allowHosts.every((host) => typeof host === "string")) return { problem: MALFORMED };
92
+ if (!Array.isArray(variables)) return { problem: MALFORMED };
93
+ for (const host of allowHosts) {
94
+ const problem = allowHostProblem(host);
95
+ if (problem !== void 0) return { problem: `the factory's allowed host ${JSON.stringify(host)} ${problem}` };
96
+ }
97
+ const parsed = [];
98
+ for (const entry of variables) {
99
+ if (typeof entry !== "object" || entry === null) return { problem: MALFORMED };
100
+ const { name, value } = entry;
101
+ if (typeof name !== "string" || name === "" || typeof value !== "string") return { problem: MALFORMED };
102
+ if (!VARIABLE_NAME.test(name)) return { problem: `the factory's build variable ${JSON.stringify(name)} is not a variable name` };
103
+ if (value.trim().length < MIN_SCRUBBED_LITERAL) {
104
+ 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` };
105
+ }
106
+ parsed.push({ name, value });
107
+ }
108
+ return { settings: { machine: { size, vcpus, memoryGiB, diskGB }, allowHosts: [...allowHosts], variables: parsed } };
109
+ }
110
+ async function fetchManagedBuildSettings(config, item, deps = {}) {
111
+ const fetchImpl = deps.fetchImpl ?? fetch;
112
+ const outcome = await retrySend(
113
+ async () => postJson(config.url, `/v1/work-items/${item}/claim/build-settings`, config.apiKey, config.appId, {}, fetchImpl, void 0, await signerFor(config.configPath)),
114
+ { now: deps.now, sleep: deps.sleep, windowMs: deps.windowMs ?? FETCH_RETRY_WINDOW_MS2 }
115
+ );
116
+ if (!outcome.ok) return { ok: false, code: outcome.code, reason: outcome.message ?? outcome.reason, retryable: outcome.retryable };
117
+ const parsed = parseSettings(outcome.value.data);
118
+ if ("problem" in parsed) return { ok: false, code: "malformed_settings_response", reason: parsed.problem, retryable: false };
119
+ return { ok: true, settings: parsed.settings };
120
+ }
121
+ var held2 = /* @__PURE__ */ new Map();
122
+ function holdManagedBuildSettings(jobDir, settings) {
123
+ held2.set(jobDir, settings);
124
+ }
125
+ function managedBuildSettingsFor(jobDir) {
126
+ return held2.get(jobDir);
127
+ }
128
+ function dropManagedBuildSettings(jobDir) {
129
+ held2.delete(jobDir);
130
+ }
131
+ function managedBuildSettingValues() {
132
+ return [...new Set([...held2.values()].flatMap((settings) => settings.variables.map(({ value }) => value)))];
133
+ }
134
+ function managedMachineLimits(settings) {
135
+ const { vcpus, memoryGiB, diskGB } = settings.machine;
136
+ return { cpus: vcpus, memoryBytes: Math.round(memoryGiB * GIB), diskBytes: Math.round(diskGB * GB) };
137
+ }
138
+ function withFactoryHosts(runnerHosts, settings) {
139
+ if (settings === void 0) return runnerHosts;
140
+ return [.../* @__PURE__ */ new Set([...runnerHosts ?? [], ...settings.allowHosts])];
141
+ }
77
142
  var AssetError = class extends Error {
78
143
  constructor(file, message) {
79
144
  super(message);
@@ -2505,8 +2570,8 @@ function claudeCredentialCheck(env, options = {}) {
2505
2570
  }
2506
2571
  return { name, status: "pass", detail: `${variables[0]} is set in the claude.env or runner.env of the service ${unit}` };
2507
2572
  }
2508
- const held2 = claudeCredential(env, { ignoreHeld: options.ignoreHeld === true });
2509
- if (held2 === void 0) {
2573
+ const held3 = claudeCredential(env, { ignoreHeld: options.ignoreHeld === true });
2574
+ if (held3 === void 0) {
2510
2575
  return {
2511
2576
  name,
2512
2577
  status: "fail",
@@ -2515,7 +2580,7 @@ function claudeCredentialCheck(env, options = {}) {
2515
2580
  };
2516
2581
  }
2517
2582
  const sameVariables = options.shell === true ? "; the runner must be started with the same variable" : "";
2518
- return { name, status: "pass", detail: `${held2.variable} is set${sameVariables}` };
2583
+ return { name, status: "pass", detail: `${held3.variable} is set${sameVariables}` };
2519
2584
  }
2520
2585
  function missingPermissionOf(err) {
2521
2586
  if (!(err instanceof WorkCommandError) || err.status !== 403) return void 0;
@@ -2813,10 +2878,10 @@ async function runBuildSteps(input) {
2813
2878
  if (staged.kind === "refused") return { ok: false, reason: staged.reason };
2814
2879
  let controlPlane;
2815
2880
  if (input.requireBuildSkill === true && !(staged.kind === "staged" && stagedHasBuildSkill(staged))) {
2816
- const held2 = await checkoutHasBuildSkill(input);
2817
- if (held2 !== true) {
2881
+ const held3 = await checkoutHasBuildSkill(input);
2882
+ if (held3 !== true) {
2818
2883
  if (staged.kind === "staged") input.removeStagedContext();
2819
- if (held2 !== false) return { ok: false, reason: held2.failed };
2884
+ if (held3 !== false) return { ok: false, reason: held3.failed };
2820
2885
  return { ok: false, reason: missingBuildSkillReason(staged.kind === "staged" ? { repository: staged.repository, commit: staged.sha } : void 0) };
2821
2886
  }
2822
2887
  }
@@ -3680,17 +3745,17 @@ async function drain(req) {
3680
3745
  }
3681
3746
  function readPrefix(req, gzip) {
3682
3747
  return new Promise((resolve2, reject) => {
3683
- const held2 = [];
3748
+ const held3 = [];
3684
3749
  const finish = (section) => {
3685
3750
  req.off("data", onData);
3686
3751
  req.off("end", onEnd);
3687
3752
  req.off("error", reject);
3688
3753
  req.pause();
3689
- resolve2({ held: held2, section });
3754
+ resolve2({ held: held3, section });
3690
3755
  };
3691
3756
  const onData = (chunk) => {
3692
- held2.push(chunk);
3693
- const section = readCommandSection(Buffer.concat(held2), gzip);
3757
+ held3.push(chunk);
3758
+ const section = readCommandSection(Buffer.concat(held3), gzip);
3694
3759
  if (section.kind !== "need-more") finish(section);
3695
3760
  };
3696
3761
  const onEnd = () => finish({ kind: "need-more" });
@@ -3778,7 +3843,7 @@ function createGitRemote(options) {
3778
3843
  async function push(req, res, route, target) {
3779
3844
  const encoding = req.headers["content-encoding"];
3780
3845
  const gzip = encoding === "gzip";
3781
- const { held: held2, section } = await readPrefix(req, gzip);
3846
+ const { held: held3, section } = await readPrefix(req, gzip);
3782
3847
  const refuse = async (reason) => {
3783
3848
  log(`push refused: ${reason}`);
3784
3849
  await drain(req);
@@ -3808,7 +3873,7 @@ function createGitRemote(options) {
3808
3873
  const file = createWriteStream(bodyPath);
3809
3874
  const cap = options.maxPushBytes ?? 2 * 1024 ** 3;
3810
3875
  let size = 0;
3811
- for (const chunk of held2) {
3876
+ for (const chunk of held3) {
3812
3877
  size += chunk.length;
3813
3878
  file.write(chunk);
3814
3879
  }
@@ -3854,7 +3919,7 @@ function createGitRemote(options) {
3854
3919
  createReadStream(spooled).pipe(upstream);
3855
3920
  return;
3856
3921
  }
3857
- for (const chunk of held2) upstream.write(chunk);
3922
+ for (const chunk of held3) upstream.write(chunk);
3858
3923
  req.pipe(upstream);
3859
3924
  }
3860
3925
  });
@@ -3965,27 +4030,27 @@ function usableCpus(deps = {}) {
3965
4030
  }
3966
4031
  function createCpuAllocator(cores) {
3967
4032
  const usable = [...new Set(cores)].sort((a, b) => a - b);
3968
- const held2 = /* @__PURE__ */ new Map();
4033
+ const held3 = /* @__PURE__ */ new Map();
3969
4034
  const holders = (core) => {
3970
4035
  let count = 0;
3971
- for (const set of held2.values()) if (set.includes(core)) count++;
4036
+ for (const set of held3.values()) if (set.includes(core)) count++;
3972
4037
  return count;
3973
4038
  };
3974
4039
  return {
3975
4040
  acquire(buildId, cpus) {
3976
- const existing = held2.get(buildId);
4041
+ const existing = held3.get(buildId);
3977
4042
  if (existing !== void 0) return existing;
3978
4043
  const wanted = Math.min(Math.ceil(cpus), usable.length);
3979
4044
  const ranked = usable.map((core) => ({ core, count: holders(core) })).sort((a, b) => a.count - b.count);
3980
4045
  const chosen = ranked.slice(0, wanted).map(({ core }) => core).sort((a, b) => a - b);
3981
- held2.set(buildId, chosen);
4046
+ held3.set(buildId, chosen);
3982
4047
  return chosen;
3983
4048
  },
3984
4049
  hold(buildId, set) {
3985
- held2.set(buildId, [...set]);
4050
+ held3.set(buildId, [...set]);
3986
4051
  },
3987
4052
  release(buildId) {
3988
- held2.delete(buildId);
4053
+ held3.delete(buildId);
3989
4054
  }
3990
4055
  };
3991
4056
  }
@@ -4580,14 +4645,15 @@ async function measureDisk(runtime, state) {
4580
4645
  clearTimeout(timer);
4581
4646
  }
4582
4647
  }
4583
- async function startServicesFor(runtime, config, buildDir2, jobDir, itemKey, builtIns, gitRemote, serve = "socket", lease, inherit, routeLog) {
4648
+ async function startServicesFor(runtime, config, buildDir2, jobDir, itemKey, builtIns, gitRemote, serve = "socket", lease, inherit, routeLog, settingsDir) {
4584
4649
  return startBuildServices({
4585
4650
  startTunnel: runtime.startTunnel,
4586
4651
  tunnelOptions: { ...runtime.tunnelOptions, ...gitRemote === void 0 ? {} : { gitRemote } },
4587
4652
  buildDir: buildDir2,
4588
4653
  jobDir,
4589
4654
  destinations: config.build?.destinations ?? [],
4590
- allowHosts: config.build?.allowHosts,
4655
+ // A managed build's tunnel allows the factory's hosts beside the runner's own.
4656
+ allowHosts: withFactoryHosts(config.build?.allowHosts, managedBuildSettingsFor(settingsDir ?? jobDir)),
4591
4657
  serve,
4592
4658
  ...lease === void 0 ? {} : { lease },
4593
4659
  ...inherit === void 0 ? {} : { inherit },
@@ -5016,4 +5082,4 @@ function describeMachineDocker(machine) {
5016
5082
  return `Docker Engine ${version ?? "of no known version"}, older than the ${MIN_ENGINE_MAJOR} that container builds need`;
5017
5083
  }
5018
5084
 
5019
- export { ADDED_USER, ADOPTED_FETCH_RETRY_WINDOW_MS, AgentUserError, AssetError, DeliveryFailure, EVAL_INPUT_NAME, GH_CONFIG_YML, HELPER_ENV, LEASE_SECONDS, MANAGED_UNJAILED_REASON, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, ROOT_DISK_ID_PREFIX, RunnerInitError, attemptNote, claimPermissionProblem, claudeCredentialCheck, cleanupContainer, closeHostBuild, containerCommandExec, containerJudgeEnvironment, containerSenderCommand, copyJudgeTree, copyTranscripts, copyTranscriptsFromContainer, createBuildDisk, createContainerRuntime, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deleteBuildDisk, deliverContainerHooks, deliverExecMaven, describeMachineDocker, detectMachine, dropManagedClaudeKey, ensureFirecrackerAndJailer, ensureRootfs, ensureTunnel, execArgv, execCommandLine, fetchManagedClaudeKey, filesAreCopied, formerSkillProblem, formerSkillQueues, ghHostsYml, gitRemoteFor, hasClaudeCredential, helperFirecrackerNote, helperSocketPath, holdManagedClaudeKey, hostCommandEnvironment, hostEnvironment, isPlaceholderCommand, keepGhConfigCurrent, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listenOnBroker, machineConfig, makeBuildsDirPrivate, managedClaudeKeyFor, managedClaudeKeyValues, measureDisk, microVmArchSupported, microVmAssetsPinned, missingPermissionFix, missingPermissionOf, needsBuildSkill, needsClaudeCredential, obtainImage, outOfMemoryReason, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareRunnerInit, probeHelper, provisionContainer, provisionEnvironment, reachDockerStep, readConfigObject, resolveAgentUser, resolveHostBuild, runBuildSteps, runRunnerInit, runWithSpawn, senderAliveScript, senderSignalScript, setUpRunnerCgroup, shellQuote, signalInContainer, startCheckContainer, startHostServices, startJailedInto, startServicesFor, stopContainer, stopJailed, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, syncInContainer, withTunnelLog, writeEvalInput, writeRunnerInit };
5085
+ export { ADDED_USER, ADOPTED_FETCH_RETRY_WINDOW_MS, AgentUserError, AssetError, DeliveryFailure, EVAL_INPUT_NAME, GH_CONFIG_YML, HELPER_ENV, LEASE_SECONDS, MANAGED_UNJAILED_REASON, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, ROOT_DISK_ID_PREFIX, RunnerInitError, attemptNote, claimPermissionProblem, claudeCredentialCheck, cleanupContainer, closeHostBuild, containerCommandExec, containerJudgeEnvironment, containerSenderCommand, copyJudgeTree, copyTranscripts, copyTranscriptsFromContainer, createBuildDisk, createContainerRuntime, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deleteBuildDisk, deliverContainerHooks, deliverExecMaven, describeMachineDocker, detectMachine, dropManagedBuildSettings, dropManagedClaudeKey, ensureFirecrackerAndJailer, ensureRootfs, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, formerSkillProblem, formerSkillQueues, ghHostsYml, gitRemoteFor, hasClaudeCredential, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hostCommandEnvironment, hostEnvironment, isPlaceholderCommand, keepGhConfigCurrent, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listenOnBroker, machineConfig, makeBuildsDirPrivate, managedBuildSettingValues, managedBuildSettingsFor, managedClaudeKeyFor, managedClaudeKeyValues, managedMachineLimits, measureDisk, microVmArchSupported, microVmAssetsPinned, missingPermissionFix, missingPermissionOf, needsBuildSkill, needsClaudeCredential, obtainImage, outOfMemoryReason, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareRunnerInit, probeHelper, provisionContainer, provisionEnvironment, reachDockerStep, readConfigObject, resolveAgentUser, resolveHostBuild, runBuildSteps, runRunnerInit, runWithSpawn, senderAliveScript, senderSignalScript, setUpRunnerCgroup, shellQuote, signalInContainer, startCheckContainer, startHostServices, startJailedInto, startServicesFor, stopContainer, stopJailed, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, syncInContainer, withFactoryHosts, withTunnelLog, writeEvalInput, writeRunnerInit };
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { readNewestDemo } from './chunk-ER6KQCVJ.js';
4
- import { runEmitArtifact } from './chunk-QEIA5Q35.js';
4
+ import { runEmitArtifact } from './chunk-XL2MPORM.js';
5
5
  import { VoiceDownloadError, downloadPinned, sha256OfFile } from './chunk-2PGI6RDE.js';
6
6
  import { VOICE_PACK_FILES, VOICE_PACK_VERSION } from './chunk-4UPET3R7.js';
7
7
  import { detectActiveSession } from './chunk-IP7BIBXJ.js';
8
- import { autoConnect } from './chunk-7DXVL7TN.js';
8
+ import { autoConnect } from './chunk-IO2BBKG4.js';
9
9
  import { C } from './chunk-ANPNT6PM.js';
10
- import { defaultFetch, resolveGatewayCredentials } from './chunk-3N77LUQI.js';
11
- import { resolveRepoIdentity } from './chunk-GSSVJNP2.js';
10
+ import { defaultFetch, resolveGatewayCredentials } from './chunk-7QAJQDHS.js';
11
+ import { resolveRepoIdentity } from './chunk-Z7WMU3RA.js';
12
12
  import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
13
13
  import { ARTIFACT_MAX_BYTES, ARTIFACT_MAX_CAPTION_LENGTH, DEMO_RECORD_MEDIA_TYPE, ARTIFACT_MAX_REPLACES_TARGETS, DemoManifestSchema, ARTIFACT_KINDS } from './chunk-EOTMDIYC.js';
14
14
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { WorkCommandError, postJson } from './chunk-6JZXIWX7.js';
4
- import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-CAQCDYKF.js';
5
- import { signingFetchFor } from './chunk-3N77LUQI.js';
6
- import { signerFor } from './chunk-MOI2KDLH.js';
3
+ import { WorkCommandError, postJson } from './chunk-JKNOJKVD.js';
4
+ import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-5JGPTYLT.js';
5
+ import { signingFetchFor } from './chunk-7QAJQDHS.js';
6
+ import { signerFor } from './chunk-L5VHGRQE.js';
7
7
  import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-FGF52V4V.js';
8
8
  import { SHIM_SCRIPT, GOVERNANCE_VARIABLE } from './chunk-HCVLP7XA.js';
9
9
  import { readDegraded, readContextManifest, readSourceCache } from './chunk-YQR6E6OV.js';
10
- import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-PXGU3GKY.js';
10
+ import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-GJ4KBHBD.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,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { scrubReason, stripTerminalControls } from './chunk-AE3OTPUU.js';
4
- import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-EMH2LNIE.js';
5
- import { RunnerAlreadyRunningError, readPidFile } from './chunk-YNMVVQOQ.js';
3
+ import { scrubReason, stripTerminalControls } from './chunk-SZU4YCBH.js';
4
+ import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-V2VJYK46.js';
5
+ import { RunnerAlreadyRunningError, readPidFile } from './chunk-LQHCNXPK.js';
6
6
  import { isSameProcess } from './chunk-JBJTC3UU.js';
7
- import { isSignatureRefusal, postJson } from './chunk-6JZXIWX7.js';
8
- import { signerFor } from './chunk-MOI2KDLH.js';
9
- import { pidFilePath } from './chunk-PXGU3GKY.js';
7
+ import { isSignatureRefusal, postJson } from './chunk-JKNOJKVD.js';
8
+ import { signerFor } from './chunk-L5VHGRQE.js';
9
+ import { pidFilePath } from './chunk-GJ4KBHBD.js';
10
10
  import { readFileSync } from 'fs';
11
11
 
12
12
  createRequire(import.meta.url);
@@ -3,10 +3,10 @@ import { createRequire } from 'node:module';
3
3
  import { DEFAULT_DASHBOARD } from './chunk-Y5YCX6AL.js';
4
4
  import { sanitizeTerminal } from './chunk-MECW77XP.js';
5
5
  import { isAgentsMdLayout } from './chunk-NKOM4JKY.js';
6
- import { cliFetch, resolveGatewayCredentials } from './chunk-3N77LUQI.js';
6
+ import { cliFetch, resolveGatewayCredentials } from './chunk-7QAJQDHS.js';
7
7
  import { readCloudConfig } from './chunk-PJDQPF5N.js';
8
8
  import { findGitDirs, writeRepoConnection, readRepoConnection } from './chunk-BJ3KTMDH.js';
9
- import { remoteLookupFailed } from './chunk-GSSVJNP2.js';
9
+ import { remoteLookupFailed } from './chunk-Z7WMU3RA.js';
10
10
  import { cliInvocation } from './chunk-CRB3POP4.js';
11
11
  import { execFileSync } from 'child_process';
12
12
  import { lstatSync } from 'fs';
@@ -2,10 +2,10 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
4
4
  import { detectActiveSession } from './chunk-IP7BIBXJ.js';
5
- import { autoConnect } from './chunk-7DXVL7TN.js';
5
+ import { autoConnect } from './chunk-IO2BBKG4.js';
6
6
  import { C } from './chunk-ANPNT6PM.js';
7
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-3N77LUQI.js';
8
- import { resolveRepoIdentity } from './chunk-GSSVJNP2.js';
7
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-7QAJQDHS.js';
8
+ import { resolveRepoIdentity } from './chunk-Z7WMU3RA.js';
9
9
  import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
10
10
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
11
11
  import { CriteriaListSchema } from './chunk-EOTMDIYC.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { BUILD_HOME } from './chunk-G4W4B33M.js';
3
+ import { BUILD_HOME } from './chunk-SDAEXUIX.js';
4
4
  import { join, dirname } from 'path';
5
5
 
6
6
  createRequire(import.meta.url);