@outerlayer/cli 0.26.0 → 0.26.2

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 (79) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +3 -1
  3. package/dist/{agent-setup-YHFZB2BC.js → agent-setup-PZYQWN4H.js} +3 -3
  4. package/dist/{build-JK2DLT6X.js → build-AW4A2QPK.js} +2 -2
  5. package/dist/build-info.json +1 -1
  6. package/dist/{builder-TMA25KRR.js → builder-TDCBQ2RD.js} +2 -2
  7. package/dist/{check-FAGTKWHT.js → check-KL3LDAI3.js} +24 -24
  8. package/dist/{chunk-C3AMVSMS.js → chunk-2EAVBJMO.js} +2 -2
  9. package/dist/{chunk-DYEFPYME.js → chunk-2O5KA67H.js} +1 -1
  10. package/dist/{chunk-H3AEZIYB.js → chunk-6M4LNO22.js} +1 -1
  11. package/dist/{chunk-DVAAATJP.js → chunk-6OYAW5SF.js} +15 -10
  12. package/dist/{chunk-AINUN2TT.js → chunk-DJILFADE.js} +1 -1
  13. package/dist/{chunk-WVM6PM2N.js → chunk-DXHISLCI.js} +3 -3
  14. package/dist/{chunk-P7UQZFNY.js → chunk-EORWWFPA.js} +2 -2
  15. package/dist/{chunk-4R24DSL2.js → chunk-FI66JNLT.js} +4 -4
  16. package/dist/{chunk-DZUANBKP.js → chunk-GMPXOQTH.js} +4 -4
  17. package/dist/{chunk-6WZKI6LQ.js → chunk-GUT4IU7K.js} +16 -12
  18. package/dist/{chunk-FQCLEH34.js → chunk-HXFRJKMU.js} +2 -2
  19. package/dist/{chunk-DXDF43YG.js → chunk-I7RZHMXW.js} +1 -1
  20. package/dist/{chunk-7I6GZSN3.js → chunk-KZLLLARE.js} +1 -1
  21. package/dist/{chunk-2N72GPS2.js → chunk-MWPBF2XG.js} +1 -1
  22. package/dist/{chunk-HPOEVC2V.js → chunk-MXTN35XN.js} +3 -3
  23. package/dist/{chunk-4QKHBDEN.js → chunk-OL2O5PEI.js} +61 -16
  24. package/dist/{chunk-ARMZI56S.js → chunk-PCY7IGSL.js} +2 -2
  25. package/dist/{chunk-GJZEUQ6D.js → chunk-QRZLUUNN.js} +13 -0
  26. package/dist/{chunk-6S3UEBLB.js → chunk-RO3BRAO6.js} +2 -2
  27. package/dist/{chunk-G2T4HCGT.js → chunk-TEVO3RUV.js} +1 -1
  28. package/dist/{chunk-TI33WRBT.js → chunk-TODY3MTS.js} +3 -3
  29. package/dist/{chunk-CLUUAX6O.js → chunk-TPAF24PK.js} +2 -2
  30. package/dist/{chunk-ITP76BST.js → chunk-U2FSJBNI.js} +4 -4
  31. package/dist/{chunk-GNPTU4BM.js → chunk-URIZRCRY.js} +2 -1
  32. package/dist/{chunk-XBCJI6SV.js → chunk-V5LUWRCV.js} +2 -2
  33. package/dist/{chunk-D4UDE2AP.js → chunk-W3NVHOCS.js} +1 -1
  34. package/dist/{chunk-XK7FRM5J.js → chunk-WA7R6U2F.js} +7 -7
  35. package/dist/{chunk-XGJUNNXL.js → chunk-XLC7KEUV.js} +3 -1
  36. package/dist/{claude-launcher-FXFXYW2E.js → claude-launcher-O2U6P6ZD.js} +1 -1
  37. package/dist/{cli-CD4UNXBY.js → cli-UH2YQA5M.js} +77 -75
  38. package/dist/{command-A54TSZWD.js → command-ZECJJNLY.js} +13 -13
  39. package/dist/{connect-cmd-HAFFAVEO.js → connect-cmd-2JHSLBXK.js} +2 -2
  40. package/dist/{container-start-NRPEMKKE.js → container-start-GFH5LLSG.js} +14 -14
  41. package/dist/{control-plane-launch-FRK5IZXC.js → control-plane-launch-654RV5PO.js} +2 -2
  42. package/dist/{docker-4X2A5HDY.js → docker-Q7QJMX7I.js} +2 -2
  43. package/dist/{doctor-AXJQQBKY.js → doctor-3LCCPBX6.js} +15 -15
  44. package/dist/{emit-artifact-cmd-Y2GMWCSD.js → emit-artifact-cmd-AIBDDJGW.js} +8 -8
  45. package/dist/{emit-criteria-cmd-LI7OLHEC.js → emit-criteria-cmd-VMZIRJCQ.js} +3 -3
  46. package/dist/{emit-finding-cmd-3LU7C356.js → emit-finding-cmd-KMJNYQI7.js} +3 -3
  47. package/dist/{emit-result-cmd-NKAKRBW2.js → emit-result-cmd-LQN6AGGP.js} +8 -8
  48. package/dist/{emit-step-cmd-JQ23TRF5.js → emit-step-cmd-AUHA3EXY.js} +4 -4
  49. package/dist/{exec-client-KH33DICR.js → exec-client-J6L5FDRR.js} +2 -2
  50. package/dist/{governing-source-73APROH6.js → governing-source-5OU235UP.js} +6 -6
  51. package/dist/{guest-init-TOSKPGPF.js → guest-init-CXIHA5VI.js} +2 -2
  52. package/dist/{hook-fast-GD7F2EBL.js → hook-fast-LZSHEKUA.js} +1 -1
  53. package/dist/{hook-wrap-fast-NOOGDNSW.js → hook-wrap-fast-7VYYAAH4.js} +2 -2
  54. package/dist/index.js +6 -6
  55. package/dist/{init-IFQCZKY6.js → init-ARB2JUPA.js} +14 -14
  56. package/dist/{init-5WVPLO3G.js → init-C2RROWQU.js} +14 -14
  57. package/dist/{init-cmd-KNYXSA6O.js → init-cmd-SLXPX44L.js} +8 -8
  58. package/dist/{init-update-HTHYQOHU.js → init-update-FJDKY4SJ.js} +4 -4
  59. package/dist/{loop-HTWKPG3J.js → loop-QQV4PYNX.js} +24 -24
  60. package/dist/{machine-AYYL2WXW.js → machine-OVXDPPFK.js} +13 -13
  61. package/dist/{mcp-serve-cmd-QBFQN553.js → mcp-serve-cmd-U5N5DK3H.js} +1 -1
  62. package/dist/{runner-identity-NH6RLVMI.js → runner-identity-QQU6BUUO.js} +2 -2
  63. package/dist/{runner-key-3HAVHQZI.js → runner-key-WIEESRA5.js} +14 -14
  64. package/dist/{session-sender-535VA2CA.js → session-sender-DFB2N3DO.js} +9 -9
  65. package/dist/settings-3DBYKYQD.js +7 -0
  66. package/dist/{spec-cmd-KERLZ6GJ.js → spec-cmd-FBA4BJPZ.js} +4 -4
  67. package/dist/{status-IAXWRX7B.js → status-V2DWSLL3.js} +20 -20
  68. package/dist/{statusline-fast-GVRSBHAF.js → statusline-fast-YVHG6ZLX.js} +2 -2
  69. package/dist/{sync-cmd-EIRKU5FA.js → sync-cmd-KU567KX6.js} +8 -8
  70. package/dist/{watch-SMF5CW5T.js → watch-LBPCO6GR.js} +8 -8
  71. package/dist/{work-claim-cmd-JCUBRZKN.js → work-claim-cmd-IT7R7G3E.js} +6 -6
  72. package/dist/{work-cmd-C3CFJZYD.js → work-cmd-SJB6N6FZ.js} +4 -4
  73. package/dist/{work-comment-cmd-NDE3O7PN.js → work-comment-cmd-FGUQM2F3.js} +4 -4
  74. package/dist/{work-logs-cmd-KUGBBJAO.js → work-logs-cmd-74GRYFTW.js} +4 -4
  75. package/dist/{work-open-pr-cmd-TFIGKPRL.js → work-open-pr-cmd-CX7A2BE5.js} +5 -5
  76. package/dist/{work-pr-cmd-KKCLXRJL.js → work-pr-cmd-DKTBEFHO.js} +4 -4
  77. package/dist/{work-stop-cmd-QUEDBM4Q.js → work-stop-cmd-W6EKY5Y3.js} +4 -4
  78. package/package.json +1 -1
  79. package/dist/settings-AKYEOCC2.js +0 -7
@@ -1,19 +1,19 @@
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-XBCJI6SV.js';
5
- import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-2N72GPS2.js';
4
+ import { senderPidfile } from './chunk-V5LUWRCV.js';
5
+ import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-MWPBF2XG.js';
6
6
  import { writeDockerClientConfig } from './chunk-UNF7MWEL.js';
7
- import { installScrubContext } from './chunk-ITP76BST.js';
8
- import { ADDED_USER, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, 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-6WZKI6LQ.js';
9
- import { readBranchHead, fetchCommit, diffBetween } from './chunk-AINUN2TT.js';
7
+ import { installScrubContext } from './chunk-U2FSJBNI.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-GUT4IU7K.js';
9
+ import { readBranchHead, fetchCommit, diffBetween } from './chunk-DJILFADE.js';
10
10
  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-7I6GZSN3.js';
12
- import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-4R24DSL2.js';
13
- import { waitForAgent, vmExecArgs } from './chunk-HPOEVC2V.js';
14
- import { socketPathProblem, vsockLinks, linkVsockSockets } from './chunk-XGJUNNXL.js';
15
- import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, formatDuration, retrySend, formatClock } from './chunk-WVM6PM2N.js';
16
- import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-DZUANBKP.js';
11
+ import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, COMMAND_DIR, childEnvironment, judgeCommand, JUDGE_MAX_TURNS, MAX_REPORT_BYTES, JUDGE_DIR } from './chunk-KZLLLARE.js';
12
+ import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-FI66JNLT.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, formatDuration, retrySend, formatClock } from './chunk-DXHISLCI.js';
16
+ import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-GMPXOQTH.js';
17
17
  import { planArtifactUpload } from './chunk-BUP5N3X6.js';
18
18
  import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-JWRX5ZTT.js';
19
19
  import { parseSize } from './chunk-7RQ73DLO.js';
@@ -31,6 +31,8 @@ import { existsSync, statSync, appendFileSync, mkdirSync, chmodSync, writeFileSy
31
31
  import { join, isAbsolute, dirname, delimiter, sep } from 'path';
32
32
  import { spawn, spawnSync } from 'child_process';
33
33
  import { randomBytes, createHash } from 'crypto';
34
+ import { once } from 'events';
35
+ import { createServer } from 'net';
34
36
  import { pathToFileURL } from 'url';
35
37
 
36
38
  createRequire(import.meta.url);
@@ -95,6 +97,21 @@ function judgeProbe(probe, missedBefore) {
95
97
  if (probe.alive) return { kind: "running" };
96
98
  return missedBefore ? { kind: "lost" } : { kind: "recheck" };
97
99
  }
100
+ async function serveLease(socketPath, channel, makeServer = createServer) {
101
+ const server = makeServer((socket) => channel.accept(socket));
102
+ rmSync(socketPath, { force: true });
103
+ server.listen(socketPath);
104
+ await once(server, "listening");
105
+ server.on("error", () => void 0);
106
+ return {
107
+ ...channel,
108
+ close() {
109
+ channel.close();
110
+ server.close();
111
+ rmSync(socketPath, { force: true });
112
+ }
113
+ };
114
+ }
98
115
  function unitNameFor(buildId) {
99
116
  return `outerlayer-build-${buildId}`;
100
117
  }
@@ -121,7 +138,7 @@ async function startJailed(input) {
121
138
  if (err.code !== "ENOENT") throw err;
122
139
  }
123
140
  }
124
- return input.client.start({ build: input.buildId, kind: input.kind });
141
+ return input.client.start({ build: input.buildId, kind: input.kind, ...input.timeLimitMinutes === void 0 ? {} : { timeLimitMinutes: input.timeLimitMinutes } });
125
142
  }
126
143
  async function startJailedInto(state, input, save) {
127
144
  state.jailed = { unit: unitNameFor(state.buildId), chroot: "" };
@@ -358,15 +375,33 @@ async function provisionMicroVm(input) {
358
375
  diskBytes: parseSize(config.build?.disk ?? DEFAULT_DISK) ?? parseSize(DEFAULT_DISK)
359
376
  };
360
377
  const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: true });
378
+ const served = input.leaseTimeLeftMs === void 0 ? links : [...links, LEASE_LINK];
379
+ if (input.leaseTimeLeftMs !== void 0) {
380
+ try {
381
+ const channel = createLeaseChannel(input.leaseTimeLeftMs);
382
+ const served2 = await serveLease(join(buildDir2, LEASE_LINK.socket), { ...channel, accept: (stream) => runtime.leases.get(buildId)?.accept(stream) });
383
+ runtime.leases.set(buildId, { ...channel, close: served2.close });
384
+ } catch (err) {
385
+ return bail(`the lease stream could not start: ${describeCallFailure(err)}`);
386
+ }
387
+ }
361
388
  const configPath = join(buildDir2, "vm.json");
362
389
  const helper = await helperFor(runtime, (line) => log.line(`${tag} ${line}`));
363
390
  try {
364
- if (helper === void 0) linkVsockSockets({ buildDir: buildDir2, vsockPath: state.vsockPath, links });
391
+ if (helper === void 0) linkVsockSockets({ buildDir: buildDir2, vsockPath: state.vsockPath, links: served });
365
392
  await createBuildDisk({ host: vm.rootfs, runnerDir: runnerDirPath, bytes: limits.diskBytes, dest: state.buildDisk, memoryBytes: limits.memoryBytes });
366
393
  writeFileSync(
367
394
  configPath,
368
395
  JSON.stringify(
369
- machineConfig(limits, { kernel: assets.kernel, rootfs: state.rootfs, buildDisk: state.buildDisk, vsock: state.vsockPath, relayPorts: links.map((link) => link.port), docker: report.docker }),
396
+ machineConfig(limits, {
397
+ kernel: assets.kernel,
398
+ rootfs: state.rootfs,
399
+ buildDisk: state.buildDisk,
400
+ vsock: state.vsockPath,
401
+ relayPorts: links.map((link) => link.port),
402
+ ...input.leaseTimeLeftMs === void 0 ? {} : { leasePort: LEASE_LINK.port },
403
+ docker: report.docker
404
+ }),
370
405
  null,
371
406
  2
372
407
  ),
@@ -387,7 +422,11 @@ async function provisionMicroVm(input) {
387
422
  const consolePath = join(jobDir, "vm-console.log");
388
423
  if (helper !== void 0) {
389
424
  try {
390
- await startJailedInto(state, { client: helper, kind: "build", kernel: assets.kernel, rootfs: state.rootfs, sockets: links.map((link) => link.socket) }, () => input.save(state, environment));
425
+ await startJailedInto(
426
+ state,
427
+ { client: helper, kind: "build", kernel: assets.kernel, rootfs: state.rootfs, sockets: served.map((link) => link.socket), timeLimitMinutes: config.timeLimitMinutes },
428
+ () => input.save(state, environment)
429
+ );
391
430
  } catch (err) {
392
431
  return bail(`the microVM did not start under the jailer: ${describeCallFailure(err)}`);
393
432
  }
@@ -813,7 +852,11 @@ async function startCheckMicroVm(input) {
813
852
  const boot = async () => {
814
853
  if (helper !== void 0) {
815
854
  try {
816
- await startJailedInto(state, { client: helper, kind: "check", kernel: assets.kernel, rootfs: state.rootfs, sockets: links.map((link) => link.socket) }, () => input.save(state));
855
+ await startJailedInto(
856
+ state,
857
+ { client: helper, kind: "check", kernel: assets.kernel, rootfs: state.rootfs, sockets: links.map((link) => link.socket), timeLimitMinutes: config.timeLimitMinutes },
858
+ () => input.save(state)
859
+ );
817
860
  } catch (err) {
818
861
  return `the microVM did not start under the jailer: ${describeCallFailure(err)}`;
819
862
  }
@@ -903,6 +946,8 @@ async function cleanupMicroVm(runtime, state, jobDir) {
903
946
  }
904
947
  }
905
948
  if (state.buildDisk !== void 0) deleteBuildDisk(state.buildDisk);
949
+ runtime.leases.get(state.buildId)?.close();
950
+ runtime.leases.delete(state.buildId);
906
951
  const tunnel = runtime.tunnels.get(state.buildId);
907
952
  if (tunnel !== void 0) {
908
953
  runtime.tunnels.delete(state.buildId);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-6S3UEBLB.js';
4
- import { MIN_ENGINE_MAJOR } from './chunk-6WZKI6LQ.js';
3
+ import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-RO3BRAO6.js';
4
+ import { MIN_ENGINE_MAJOR } from './chunk-GUT4IU7K.js';
5
5
  import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-5PMQDQFV.js';
6
6
  import { runnerCredentialProblem } from './chunk-JWRX5ZTT.js';
7
7
  import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-L4CW6LZQ.js';
@@ -13,7 +13,15 @@ createRequire(import.meta.url);
13
13
  var MISSING_HELP = `Run \`${cliInvocation()} login\` to sign in, or set OUTERLAYER_URL / OUTERLAYER_API_KEY / OUTERLAYER_APP_ID. Mint a key in the dashboard: Settings \u2192 API keys.`;
14
14
  var NO_FACTORY_MESSAGE = `you are logged in, but no factory is chosen for this repository. Run \`${cliInvocation()} connect\` to choose one, or pass --app-id / set OUTERLAYER_APP_ID.`;
15
15
  var NO_FACTORY_OUTSIDE_REPOSITORY_MESSAGE = "you are logged in, but this directory is not in a git repository, so no factory is chosen. Pass --app-id / set OUTERLAYER_APP_ID, or run this from inside a connected repository.";
16
+ var ORIGIN_MISMATCH_MESSAGE = "the gateway address is not the one your saved credential belongs to. A saved login or key is only sent to the address it was created for, so nothing can redirect it \u2014 or the session transcripts a sync carries with it \u2014 to a host set through OUTERLAYER_URL or --url. To call a different gateway, pass its own key too: --url <addr> --api-key <key>, or set OUTERLAYER_API_KEY beside OUTERLAYER_URL.";
16
17
  var LOGIN_TOKEN_PREFIX = "olu_";
18
+ function sameOrigin(a, b) {
19
+ try {
20
+ return new URL(a).origin === new URL(b).origin;
21
+ } catch {
22
+ return false;
23
+ }
24
+ }
17
25
  function unauthorizedMessage(credential) {
18
26
  return credential.startsWith(LOGIN_TOKEN_PREFIX) ? `not authorized \u2014 the login is expired or was revoked. Run \`${cliInvocation()} login\` to sign in again.` : "not authorized \u2014 the API key is unknown, expired, or bound to a different factory. Mint a fresh key: dashboard \u2192 Settings \u2192 API keys.";
19
27
  }
@@ -26,6 +34,11 @@ function resolveGatewayCredentials(sources = {}) {
26
34
  const credential = key ?? config.accountToken;
27
35
  const cwd = sources.cwd ?? process.cwd();
28
36
  const appId = sources.appId ?? (env.OUTERLAYER_APP_ID || void 0) ?? (kind === "key" ? config.appId : readRepoConnection(cwd)?.appId);
37
+ const suppliedKey = sources.apiKey !== void 0 || Boolean(env.OUTERLAYER_API_KEY);
38
+ const savedCredential = credential != null && !suppliedKey && (credential === config.apiKey || credential === config.accountToken);
39
+ if (savedCredential && url && config.url && !sameOrigin(url, config.url)) {
40
+ return { ok: false, message: ORIGIN_MISMATCH_MESSAGE, url, credential, appId, kind };
41
+ }
29
42
  if (credential && url && !appId && kind === "login") {
30
43
  const message = findGitDirs(cwd) === void 0 ? NO_FACTORY_OUTSIDE_REPOSITORY_MESSAGE : NO_FACTORY_MESSAGE;
31
44
  return { ok: false, message, url, credential, appId, kind };
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { MIN_ENGINE_MAJOR } from './chunk-6WZKI6LQ.js';
3
+ import { MIN_ENGINE_MAJOR } from './chunk-GUT4IU7K.js';
4
4
  import { runnerImageVersion } from './chunk-665QWBNW.js';
5
- import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-4R24DSL2.js';
5
+ import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-FI66JNLT.js';
6
6
  import { spawnSync } from 'child_process';
7
7
  import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
8
8
 
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
4
4
  import { DEFAULT_DASHBOARD } from './chunk-XSPA5ODY.js';
5
- import { cliFetch, resolveGatewayCredentials } from './chunk-GJZEUQ6D.js';
5
+ import { cliFetch, resolveGatewayCredentials } from './chunk-QRZLUUNN.js';
6
6
  import { writeRepoConnection, findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
7
7
  import { remoteLookupFailed } from './chunk-QE3UQAHK.js';
8
8
  import { readCloudConfig } from './chunk-EABW6AJQ.js';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { isPlaceholderCommand } from './chunk-ARMZI56S.js';
4
- import { describeCallFailure } from './chunk-WVM6PM2N.js';
5
- import { WorkCommandError, getJson } from './chunk-DZUANBKP.js';
3
+ import { isPlaceholderCommand } from './chunk-PCY7IGSL.js';
4
+ import { describeCallFailure } from './chunk-DXHISLCI.js';
5
+ import { WorkCommandError, getJson } from './chunk-GMPXOQTH.js';
6
6
  import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
7
7
  import { builtinKind } from './chunk-JWRX5ZTT.js';
8
8
  import { signerFor } from './chunk-F6DIHHBS.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { autoConnect, detectActiveSession } from './chunk-FQCLEH34.js';
4
- import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-GJZEUQ6D.js';
3
+ import { autoConnect, detectActiveSession } from './chunk-HXFRJKMU.js';
4
+ import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-QRZLUUNN.js';
5
5
  import { resolveRepoIdentity } from './chunk-QE3UQAHK.js';
6
6
  import { C } from './chunk-ANPNT6PM.js';
7
7
  import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { uploadSpooledSteps } from './chunk-P7UQZFNY.js';
3
+ import { uploadSpooledSteps } from './chunk-EORWWFPA.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-GJZEUQ6D.js';
8
- import { writeSyncStatus, spoolDir } from './chunk-C3AMVSMS.js';
7
+ import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-QRZLUUNN.js';
8
+ import { writeSyncStatus, spoolDir } from './chunk-2EAVBJMO.js';
9
9
  import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
10
- import { hookExecSpoolPath } from './chunk-DYEFPYME.js';
10
+ import { hookExecSpoolPath } from './chunk-2O5KA67H.js';
11
11
  import { applyReportedCost } from './chunk-BKO6JEZI.js';
12
12
  import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
13
13
  import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-QE3UQAHK.js';
@@ -49,6 +49,7 @@ function isScriptBin(bin) {
49
49
  function cliCommand(cliBin) {
50
50
  return isScriptBin(cliBin) ? `node ${quoteBin(cliBin)}` : quoteBin(cliBin);
51
51
  }
52
+ var PORTABLE_BIN = "outerlayer";
52
53
  function isOurBin(bin, cliBin) {
53
54
  if (cliBin !== void 0 && normalizeBinPath(bin) === normalizeBinPath(cliBin)) return true;
54
55
  const parts = bin.replace(/\\/g, "/").split("/");
@@ -398,4 +399,4 @@ function unwrapHooks(settings, cliBin) {
398
399
  return { next, changed, unwrapped };
399
400
  }
400
401
 
401
- export { AUTO_WRAP_EVENTS, REGISTERED_EVENTS, SettingsParseError, cliBinResolvable, cliCommand, decodeWrappedCommand, encodeWrappedCommand, isOurHookCommand, isOurHookCommandFor, isOurStatuslineSlot, isWrapped, listHookCandidates, mergeHooks, mergeStatusline, ourCommandBins, ourDirectScriptBins, parseLifecycleHookCommand, readSettings, removeHooks, removeStatusline, repointWrappedHooks, settingsPath, statuslineCommand, statuslineWrappedOriginal, unwrapHooks, wrapHooks, wrappedOriginalCommand, writeSettings };
402
+ export { AUTO_WRAP_EVENTS, PORTABLE_BIN, REGISTERED_EVENTS, SettingsParseError, cliBinResolvable, cliCommand, decodeWrappedCommand, encodeWrappedCommand, isOurHookCommand, isOurHookCommandFor, isOurStatuslineSlot, isWrapped, listHookCandidates, mergeHooks, mergeStatusline, ourCommandBins, ourDirectScriptBins, parseLifecycleHookCommand, readSettings, removeHooks, removeStatusline, repointWrappedHooks, settingsPath, statuslineCommand, statuslineWrappedOriginal, unwrapHooks, wrapHooks, wrappedOriginalCommand, writeSettings };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { LiveUploader } from './chunk-ITP76BST.js';
4
- import { spoolDir } from './chunk-C3AMVSMS.js';
3
+ import { LiveUploader } from './chunk-U2FSJBNI.js';
4
+ import { spoolDir } from './chunk-2EAVBJMO.js';
5
5
  import { CaptureDaemon } from './chunk-QE3UQAHK.js';
6
6
  import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
7
7
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { removeRetiredSkills } from './chunk-MQ743JX3.js';
4
- import { defaultFetch, resolveGatewayCredentials } from './chunk-GJZEUQ6D.js';
4
+ import { defaultFetch, resolveGatewayCredentials } from './chunk-QRZLUUNN.js';
5
5
  import { appendContextProvenance } from './chunk-ZJSNLVCE.js';
6
6
  import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-HBISTTG3.js';
7
7
  import { cliInvocation } from './chunk-CRB3POP4.js';
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { checkStarterFiles, contextIsGoverned, checkBuildSkill } from './chunk-XFGL53GU.js';
4
- import { resolveCredentials, getJson, WorkCommandError } from './chunk-DZUANBKP.js';
5
- import { isLinkedRepository } from './chunk-G2T4HCGT.js';
4
+ import { resolveCredentials, getJson, WorkCommandError } from './chunk-GMPXOQTH.js';
5
+ import { isLinkedRepository } from './chunk-TEVO3RUV.js';
6
6
  import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
7
7
  import { checkFormerSkillNames } from './chunk-MQ743JX3.js';
8
- import { resolveGatewayCredentials, defaultFetch } from './chunk-GJZEUQ6D.js';
9
- import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-C3AMVSMS.js';
10
- import { readStatuslineState, STATE_FRESH_MS } from './chunk-DXDF43YG.js';
8
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-QRZLUUNN.js';
9
+ import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-2EAVBJMO.js';
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';
13
13
  import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-QE3UQAHK.js';
14
14
  import { C } from './chunk-ANPNT6PM.js';
15
15
  import { cliInvocation } from './chunk-CRB3POP4.js';
16
- import { readSettings, settingsPath, isOurStatuslineSlot, statuslineWrappedOriginal, REGISTERED_EVENTS, isOurHookCommand, ourCommandBins, cliBinResolvable, ourDirectScriptBins, wrappedOriginalCommand } from './chunk-GNPTU4BM.js';
16
+ import { readSettings, settingsPath, isOurStatuslineSlot, statuslineWrappedOriginal, REGISTERED_EVENTS, isOurHookCommand, ourCommandBins, cliBinResolvable, ourDirectScriptBins, wrappedOriginalCommand } from './chunk-URIZRCRY.js';
17
17
  import { readDeliveryRecord, readDegraded, readSourceCache } from './chunk-YQR6E6OV.js';
18
18
  import { deadHooksState, preparePackageManagerCommand } from './chunk-TUSYOL2O.js';
19
19
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -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-AXJQQBKY.js');
1189
+ const { runnerHostChecks } = await import('./doctor-3LCCPBX6.js');
1190
1190
  const hooks = (() => {
1191
1191
  try {
1192
1192
  return loadRunnerConfig(configPath).hooks;
@@ -6,8 +6,10 @@ import { join } from 'path';
6
6
 
7
7
  createRequire(import.meta.url);
8
8
  var EXEC_PORT = 1024;
9
+ var LEASE_PORT = 3125;
9
10
  var GUEST_CID = 3;
10
11
  var MAX_SOCKET_PATH = 107;
12
+ var LEASE_LINK = { port: LEASE_PORT, socket: "lease.sock" };
11
13
  function vsockLinks(input) {
12
14
  return [
13
15
  { port: RELAY_PORT, socket: "tunnel.sock" },
@@ -39,4 +41,4 @@ function socketPathProblem(buildDir) {
39
41
  return `the build directory ${buildDir} is too deep for the microVM's sockets: a socket path holds at most ${MAX_SOCKET_PATH} bytes and the longest here is ${longest}; move the runner's config file closer to the root`;
40
42
  }
41
43
 
42
- export { EXEC_PORT, GUEST_CID, linkVsockSockets, socketPathProblem, vsockLinks };
44
+ export { EXEC_PORT, GUEST_CID, LEASE_LINK, linkVsockSockets, socketPathProblem, vsockLinks };
@@ -236,7 +236,7 @@ async function runClaudeLauncher(args, deps = {}) {
236
236
  return 1;
237
237
  }
238
238
  } else {
239
- const { resolveLaunchPlane } = await import('./control-plane-launch-FRK5IZXC.js');
239
+ const { resolveLaunchPlane } = await import('./control-plane-launch-654RV5PO.js');
240
240
  const plane = env[GOVERNANCE_VARIABLE] === "self" ? { kind: "none" } : await resolveLaunchPlane({ cwd, env, home, fetchImpl: deps.fetchImpl, stderr });
241
241
  if (plane.kind === "none") {
242
242
  const own2 = ownSkillsDirFor(cwd, home, [], stderr);