@outerlayer/cli 0.26.2 → 0.26.4

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 (96) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{agent-setup-PZYQWN4H.js → agent-setup-5DXPEO64.js} +7 -7
  3. package/dist/{build-AW4A2QPK.js → build-F5QWH7G5.js} +4 -4
  4. package/dist/build-info.json +1 -1
  5. package/dist/{builder-TDCBQ2RD.js → builder-KDUXCHTY.js} +4 -4
  6. package/dist/{check-KL3LDAI3.js → check-ZSYCR5WG.js} +31 -31
  7. package/dist/{chunk-OL2O5PEI.js → chunk-27RDUTQH.js} +21 -13
  8. package/dist/{chunk-665QWBNW.js → chunk-2J46BQ5Y.js} +1 -1
  9. package/dist/{chunk-W3NVHOCS.js → chunk-4UFSTKE5.js} +1 -1
  10. package/dist/{chunk-XSPA5ODY.js → chunk-6BLXUD56.js} +4 -3
  11. package/dist/{chunk-GMPXOQTH.js → chunk-6CGXSMKX.js} +5 -5
  12. package/dist/{chunk-MLD2NA7N.js → chunk-6SPXKRQR.js} +1 -1
  13. package/dist/{chunk-XFGL53GU.js → chunk-6WTAYEKJ.js} +1 -1
  14. package/dist/{chunk-4IFKLYMM.js → chunk-7Z2WMXM5.js} +1 -1
  15. package/dist/{chunk-FI66JNLT.js → chunk-B6K7R5UY.js} +4 -4
  16. package/dist/{chunk-RO3BRAO6.js → chunk-EHBDYLM6.js} +3 -3
  17. package/dist/{chunk-L4CW6LZQ.js → chunk-F3BBEBPL.js} +4 -1
  18. package/dist/{chunk-GOSFARMS.js → chunk-G2JWZDFA.js} +9 -2
  19. package/dist/{chunk-DJILFADE.js → chunk-GFHLEVUE.js} +3 -3
  20. package/dist/{chunk-F6DIHHBS.js → chunk-GWRDL75D.js} +1 -1
  21. package/dist/{chunk-HXFRJKMU.js → chunk-H57M3HC7.js} +2 -2
  22. package/dist/{chunk-PYSKSROG.js → chunk-IZAOO5AR.js} +1 -1
  23. package/dist/{chunk-KDDFI5MR.js → chunk-K4FXNMV5.js} +1 -1
  24. package/dist/{chunk-6M4LNO22.js → chunk-KNBWOL2B.js} +2 -2
  25. package/dist/{chunk-YVZJ6GKF.js → chunk-KT4CN6OU.js} +1 -1
  26. package/dist/{chunk-QRZLUUNN.js → chunk-MCSINUVC.js} +8 -3
  27. package/dist/{chunk-6FAP657M.js → chunk-NWPRNKZ5.js} +1 -1
  28. package/dist/{chunk-TPAF24PK.js → chunk-O4362FPA.js} +2 -2
  29. package/dist/{chunk-TKL74NLB.js → chunk-OFTFW7TH.js} +1 -1
  30. package/dist/{chunk-PCY7IGSL.js → chunk-OQUD3UYF.js} +4 -4
  31. package/dist/{chunk-DXHISLCI.js → chunk-OZKEEXVH.js} +28 -7
  32. package/dist/{chunk-EABW6AJQ.js → chunk-PJDQPF5N.js} +18 -5
  33. package/dist/{chunk-TEVO3RUV.js → chunk-PZA6ZFYW.js} +3 -3
  34. package/dist/{chunk-V5LUWRCV.js → chunk-Q2SVLBMI.js} +2 -2
  35. package/dist/{chunk-KZLLLARE.js → chunk-QUP6CVBQ.js} +3 -3
  36. package/dist/{chunk-GUT4IU7K.js → chunk-SBW4K3XZ.js} +17 -8
  37. package/dist/{chunk-TODY3MTS.js → chunk-UOGQZQXN.js} +4 -4
  38. package/dist/{chunk-2EAVBJMO.js → chunk-UZEQVPKF.js} +40 -3
  39. package/dist/{chunk-6OYAW5SF.js → chunk-V3YJFEZA.js} +29 -22
  40. package/dist/{chunk-5PMQDQFV.js → chunk-VGHKTSHU.js} +2 -2
  41. package/dist/{chunk-U2FSJBNI.js → chunk-VQ7OAG6H.js} +5 -5
  42. package/dist/{chunk-EORWWFPA.js → chunk-WK35HB56.js} +2 -2
  43. package/dist/{chunk-JF572PM5.js → chunk-Y4BXRVDI.js} +3 -3
  44. package/dist/{chunk-WA7R6U2F.js → chunk-ZMZGWLYD.js} +7 -7
  45. package/dist/{claude-launcher-O2U6P6ZD.js → claude-launcher-TTLTS4N6.js} +1 -1
  46. package/dist/{cli-UH2YQA5M.js → cli-SKF3AMZ5.js} +89 -89
  47. package/dist/{command-ZECJJNLY.js → command-E5OG5NCH.js} +22 -22
  48. package/dist/{connect-cmd-2JHSLBXK.js → connect-cmd-SL4S5HJM.js} +7 -7
  49. package/dist/{container-start-GFH5LLSG.js → container-start-IA2HK4QI.js} +21 -21
  50. package/dist/{control-plane-launch-654RV5PO.js → control-plane-launch-JIQOE6BP.js} +5 -5
  51. package/dist/{docker-Q7QJMX7I.js → docker-KKE5Q5S2.js} +4 -4
  52. package/dist/{doctor-3LCCPBX6.js → doctor-U2N7AF3N.js} +24 -24
  53. package/dist/{emit-artifact-cmd-AIBDDJGW.js → emit-artifact-cmd-SDG5H6D7.js} +11 -11
  54. package/dist/{emit-criteria-cmd-VMZIRJCQ.js → emit-criteria-cmd-QGSP77AG.js} +8 -8
  55. package/dist/{emit-finding-cmd-KMJNYQI7.js → emit-finding-cmd-6FGMTEFM.js} +8 -8
  56. package/dist/{emit-result-cmd-LQN6AGGP.js → emit-result-cmd-AUPIXPEU.js} +11 -11
  57. package/dist/{emit-step-cmd-AUHA3EXY.js → emit-step-cmd-PORHEKHN.js} +9 -9
  58. package/dist/{governing-source-5OU235UP.js → governing-source-YPBK4H5H.js} +11 -11
  59. package/dist/hook-fast-XMZFMBKC.js +12 -0
  60. package/dist/{pending-54HC7MM3.js → host-key-GQFBRX3J.js} +2 -2
  61. package/dist/{image-tag-5SJ6ZKT7.js → image-tag-W4JKVNP4.js} +2 -2
  62. package/dist/index.js +4 -4
  63. package/dist/{init-ARB2JUPA.js → init-GEFKJNJU.js} +21 -21
  64. package/dist/{init-C2RROWQU.js → init-Y64OAKKQ.js} +21 -21
  65. package/dist/{init-cmd-SLXPX44L.js → init-cmd-YR4LLIRU.js} +13 -13
  66. package/dist/{init-update-FJDKY4SJ.js → init-update-46G6QJHB.js} +11 -11
  67. package/dist/{install-QSTTBUHX.js → install-AFMXH25X.js} +2 -2
  68. package/dist/{install-cmd-3DXJJUAA.js → install-cmd-X5XCUTSX.js} +4 -4
  69. package/dist/{login-browser-4OMZFP3U.js → login-browser-EWXSGHM7.js} +3 -3
  70. package/dist/{logout-cmd-5V5MMBSY.js → logout-cmd-5WE2N5B5.js} +2 -2
  71. package/dist/{logs-VN2HKDSH.js → logs-PKNQOJN6.js} +1 -1
  72. package/dist/{loop-QQV4PYNX.js → loop-3TJKFRN7.js} +31 -31
  73. package/dist/{machine-OVXDPPFK.js → machine-3W4LKTEW.js} +18 -18
  74. package/dist/{mcp-install-cmd-GGWB3JJ2.js → mcp-install-cmd-LD7KYAOP.js} +2 -2
  75. package/dist/{mcp-serve-cmd-U5N5DK3H.js → mcp-serve-cmd-MJIJHSQ6.js} +4 -4
  76. package/dist/{paths-ZC6BMWMT.js → paths-6V7572NN.js} +1 -1
  77. package/dist/{host-key-5TKBNUZ4.js → pending-GUHHKO42.js} +2 -2
  78. package/dist/{pidfile-BY5Z6YH7.js → pidfile-ZQOFDY7T.js} +2 -2
  79. package/dist/{record-K23IN6QN.js → record-C4ZVSLKV.js} +2 -2
  80. package/dist/{runner-env-2D7MPOIJ.js → runner-env-6Q2RMENH.js} +3 -3
  81. package/dist/{runner-identity-QQU6BUUO.js → runner-identity-DP577A7S.js} +4 -4
  82. package/dist/{runner-key-WIEESRA5.js → runner-key-LR5P2EJ5.js} +21 -21
  83. package/dist/{session-sender-DFB2N3DO.js → session-sender-ZTPWIU5L.js} +12 -12
  84. package/dist/{spec-cmd-FBA4BJPZ.js → spec-cmd-RLZMX67G.js} +9 -9
  85. package/dist/{status-V2DWSLL3.js → status-GNUOTHRH.js} +22 -22
  86. package/dist/{sync-cmd-KU567KX6.js → sync-cmd-GLWEAULP.js} +11 -11
  87. package/dist/{watch-LBPCO6GR.js → watch-F47NPUDX.js} +11 -11
  88. package/dist/{work-claim-cmd-IT7R7G3E.js → work-claim-cmd-GXPIRRBG.js} +11 -11
  89. package/dist/{work-cmd-SJB6N6FZ.js → work-cmd-S2FHIFJA.js} +9 -9
  90. package/dist/{work-comment-cmd-FGUQM2F3.js → work-comment-cmd-UJRKULO6.js} +9 -9
  91. package/dist/{work-logs-cmd-74GRYFTW.js → work-logs-cmd-SCAHJXSP.js} +9 -9
  92. package/dist/{work-open-pr-cmd-CX7A2BE5.js → work-open-pr-cmd-BGMHUQGD.js} +10 -10
  93. package/dist/{work-pr-cmd-DKTBEFHO.js → work-pr-cmd-EDDRP5DK.js} +9 -9
  94. package/dist/{work-stop-cmd-W6EKY5Y3.js → work-stop-cmd-ADE5K6UX.js} +9 -9
  95. package/package.json +1 -1
  96. package/dist/hook-fast-LZSHEKUA.js +0 -12
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-RO3BRAO6.js';
4
- import { MIN_ENGINE_MAJOR } from './chunk-GUT4IU7K.js';
5
- import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-5PMQDQFV.js';
3
+ import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-EHBDYLM6.js';
4
+ import { MIN_ENGINE_MAJOR } from './chunk-SBW4K3XZ.js';
5
+ import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-VGHKTSHU.js';
6
6
  import { runnerCredentialProblem } from './chunk-JWRX5ZTT.js';
7
- import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-L4CW6LZQ.js';
7
+ import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-F3BBEBPL.js';
8
8
  import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
9
9
  import { dirname } from 'path';
10
10
 
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { WorkCommandError, postJson } from './chunk-GMPXOQTH.js';
4
- import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-W3NVHOCS.js';
5
- import { signingFetchFor } from './chunk-QRZLUUNN.js';
3
+ import { WorkCommandError, postJson } from './chunk-6CGXSMKX.js';
4
+ import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-4UFSTKE5.js';
5
+ import { signingFetchFor } from './chunk-MCSINUVC.js';
6
6
  import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-VPEGE3QZ.js';
7
7
  import { SHIM_SCRIPT, GOVERNANCE_VARIABLE } from './chunk-HCVLP7XA.js';
8
8
  import { readDegraded, readContextManifest, readSourceCache } from './chunk-YQR6E6OV.js';
9
- import { signerFor } from './chunk-F6DIHHBS.js';
10
- import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir } from './chunk-L4CW6LZQ.js';
11
- import { fstatSync, mkdirSync, writeFileSync, chmodSync, rmSync, lstatSync } from 'fs';
9
+ import { signerFor } from './chunk-GWRDL75D.js';
10
+ import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-F3BBEBPL.js';
11
+ import { fstatSync, mkdirSync, writeFileSync, chmodSync, rmSync, cpSync, readFileSync, existsSync, lstatSync } from 'fs';
12
12
  import { relative, join, dirname } from 'path';
13
13
 
14
14
  createRequire(import.meta.url);
@@ -464,6 +464,27 @@ async function controlPlaneAccess(ask, candidates, repository, log, tag) {
464
464
  function removeStagedContext(buildDir) {
465
465
  rmSync(stagedContextDir(buildDir), { recursive: true, force: true });
466
466
  }
467
+ function keepStagedContext(staged, jobDir) {
468
+ const kept = keptContextDir(jobDir);
469
+ rmSync(kept, { recursive: true, force: true });
470
+ const tree = join(staged.dir, "tree");
471
+ cpSync(tree, join(kept, "tree"), { recursive: true, verbatimSymlinks: true, filter: (source) => source !== join(tree, ".git") });
472
+ writeFileSync(join(kept, "kept.json"), JSON.stringify({ schemaVersion: 1, repository: staged.repository, sha: staged.sha }) + "\n");
473
+ }
474
+ function keptContextTree(jobDir, governing) {
475
+ const kept = keptContextDir(jobDir);
476
+ let record;
477
+ try {
478
+ record = JSON.parse(readFileSync(join(kept, "kept.json"), "utf8"));
479
+ } catch {
480
+ return void 0;
481
+ }
482
+ if (governing === void 0 || record.sha !== governing.commit || String(record.repository).toLowerCase() !== governing.repository.toLowerCase()) return void 0;
483
+ return existsSync(join(kept, "tree")) ? join(kept, "tree") : void 0;
484
+ }
485
+ function removeKeptContext(jobDir) {
486
+ rmSync(keptContextDir(jobDir), { recursive: true, force: true });
487
+ }
467
488
 
468
489
  // src/runner/governing-source.ts
469
490
  var unavailable2 = (why) => ({ ok: false, reason: `context_unavailable: ${why}` });
@@ -494,4 +515,4 @@ async function imageTargetFor(input) {
494
515
  return { ok: true, repository: resolved.source.repository, pinned: { commit: resolved.source.sha, ref: resolved.source.ref } };
495
516
  }
496
517
 
497
- export { BuildTokens, classifyRefusal, commandWithShim, controlPlaneTokenFailure, createRunnerLog, describeCallFailure, formatClock, formatDuration, imageTargetFor, logStamp, pinnedSourceOf, refusalCode, relativeToRunner, removeStagedContext, resolveGoverningSource, retrySend, shimScript, shortClaim, stageGovernedContext };
518
+ export { BuildTokens, classifyRefusal, commandWithShim, controlPlaneTokenFailure, createRunnerLog, describeCallFailure, formatClock, formatDuration, imageTargetFor, keepStagedContext, keptContextTree, logStamp, pinnedSourceOf, refusalCode, relativeToRunner, removeKeptContext, removeStagedContext, resolveGoverningSource, retrySend, shimScript, shortClaim, stageGovernedContext };
@@ -8,18 +8,31 @@ createRequire(import.meta.url);
8
8
  function cloudConfigPath(home = homeFromEnv()) {
9
9
  return join(home, ".outerlayer", "config.json");
10
10
  }
11
- function readCloudConfig(home = homeFromEnv()) {
11
+ var CloudConfigError = class extends Error {
12
+ };
13
+ function unparseableConfigMessage(path, parserMessage) {
14
+ return `${path} is not valid JSON (${parserMessage}). Fix it or move it aside.`;
15
+ }
16
+ function readCloudConfigStrict(home = homeFromEnv()) {
12
17
  const path = cloudConfigPath(home);
13
18
  if (!existsSync(path)) return {};
19
+ const text = readFileSync(path, "utf8");
20
+ try {
21
+ return JSON.parse(text);
22
+ } catch (err) {
23
+ throw new CloudConfigError(unparseableConfigMessage(path, err.message));
24
+ }
25
+ }
26
+ function readCloudConfig(home = homeFromEnv()) {
14
27
  try {
15
- return JSON.parse(readFileSync(path, "utf8"));
28
+ return readCloudConfigStrict(home);
16
29
  } catch {
17
30
  return {};
18
31
  }
19
32
  }
20
33
  function writeCloudConfig(config, home = homeFromEnv()) {
21
34
  const path = cloudConfigPath(home);
22
- const merged = { ...readCloudConfig(home) };
35
+ const merged = { ...readCloudConfigStrict(home) };
23
36
  for (const [key, value] of Object.entries(config)) {
24
37
  if (value !== void 0) merged[key] = value;
25
38
  }
@@ -33,7 +46,7 @@ function writeCloudConfig(config, home = homeFromEnv()) {
33
46
  function removeCloudConfigKeys(keys, home = homeFromEnv()) {
34
47
  const path = cloudConfigPath(home);
35
48
  if (!existsSync(path)) return;
36
- const stored = { ...readCloudConfig(home) };
49
+ const stored = { ...readCloudConfigStrict(home) };
37
50
  for (const key of keys) delete stored[key];
38
51
  writeFileSync(path, JSON.stringify(stored, null, 2) + "\n", { mode: 384 });
39
52
  try {
@@ -42,4 +55,4 @@ function removeCloudConfigKeys(keys, home = homeFromEnv()) {
42
55
  }
43
56
  }
44
57
 
45
- export { cloudConfigPath, readCloudConfig, removeCloudConfigKeys, writeCloudConfig };
58
+ export { CloudConfigError, cloudConfigPath, readCloudConfig, readCloudConfigStrict, removeCloudConfigKeys, writeCloudConfig };
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
4
- import { DEFAULT_DASHBOARD } from './chunk-XSPA5ODY.js';
5
- import { cliFetch, resolveGatewayCredentials } from './chunk-QRZLUUNN.js';
4
+ import { DEFAULT_DASHBOARD } from './chunk-6BLXUD56.js';
5
+ import { cliFetch, resolveGatewayCredentials } from './chunk-MCSINUVC.js';
6
6
  import { writeRepoConnection, findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
7
7
  import { remoteLookupFailed } from './chunk-QE3UQAHK.js';
8
- import { readCloudConfig } from './chunk-EABW6AJQ.js';
8
+ import { readCloudConfig } from './chunk-PJDQPF5N.js';
9
9
  import { isAgentsMdLayout } from './chunk-JKNYTNYD.js';
10
10
  import { cliInvocation } from './chunk-CRB3POP4.js';
11
11
  import { execFileSync } from 'child_process';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { LiveUploader } from './chunk-U2FSJBNI.js';
4
- import { spoolDir } from './chunk-2EAVBJMO.js';
3
+ import { LiveUploader } from './chunk-VQ7OAG6H.js';
4
+ import { spoolDir } from './chunk-UZEQVPKF.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,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RecipeError, BUILDKIT_IMAGE } from './chunk-FI66JNLT.js';
3
+ import { RecipeError, BUILDKIT_IMAGE } from './chunk-B6K7R5UY.js';
4
4
  import { parseSize } from './chunk-7RQ73DLO.js';
5
5
  import { compareVersions } from './chunk-QE3UQAHK.js';
6
- import { ensureHostKey } from './chunk-F6DIHHBS.js';
7
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-L4CW6LZQ.js';
6
+ import { ensureHostKey } from './chunk-GWRDL75D.js';
7
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-F3BBEBPL.js';
8
8
  import { CLAUDE_PORT, JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-2K3TCQHW.js';
9
9
  import { JOIN_DIR, RELAY_ID, JOIN_SOCKET, TARGET_GATEWAY, TARGET_CLAUDE, destinationTarget, RELAY_USER } from './chunk-JGD5TWQ2.js';
10
10
  import { StringDecoder } from 'string_decoder';
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { runnerImageVersion } from './chunk-665QWBNW.js';
4
- import { readDefaultBranchHead, cloneRepository, buildRepositoryImage } from './chunk-DJILFADE.js';
3
+ import { runnerImageVersion } from './chunk-2J46BQ5Y.js';
4
+ import { readDefaultBranchHead, cloneRepository, buildRepositoryImage } from './chunk-GFHLEVUE.js';
5
5
  import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
6
6
  import { currentCliBuild } from './chunk-OGFGZQA3.js';
7
- import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, JUDGE_DIR, JUDGE_REPORT, MAX_REPORT_BYTES, spawnRun } from './chunk-KZLLLARE.js';
8
- import { FIRECRACKER_VERSION, hostHelperPinned, firecrackerArch, MICROVM_ARCHES, RecipeError, DOCKER_FEATURE, CLAUDE_CODE_VERSION, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, DEFAULT_BASE_IMAGE } from './chunk-FI66JNLT.js';
7
+ import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, JUDGE_DIR, JUDGE_REPORT, MAX_REPORT_BYTES, spawnRun } from './chunk-QUP6CVBQ.js';
8
+ import { FIRECRACKER_VERSION, hostHelperPinned, firecrackerArch, MICROVM_ARCHES, RecipeError, DOCKER_FEATURE, CLAUDE_CODE_VERSION, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, DEFAULT_BASE_IMAGE } from './chunk-B6K7R5UY.js';
9
9
  import { execCapture } from './chunk-MXTN35XN.js';
10
10
  import { GUEST_CID } from './chunk-XLC7KEUV.js';
11
- import { describeCallFailure, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript } from './chunk-DXHISLCI.js';
12
- import { WorkCommandError } from './chunk-GMPXOQTH.js';
11
+ import { keepStagedContext, describeCallFailure, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript } from './chunk-OZKEEXVH.js';
12
+ import { WorkCommandError } from './chunk-6CGXSMKX.js';
13
13
  import { hostAllowed } from './chunk-UXYLWVTQ.js';
14
14
  import { parseDuKilobytes } from './chunk-7RQ73DLO.js';
15
15
  import { sharedSkillNames, skillConflictMessage } from './chunk-VPEGE3QZ.js';
@@ -17,7 +17,7 @@ import { versionAtLeast, MINIMUM_CLAUDE_VERSION } from './chunk-HCVLP7XA.js';
17
17
  import { setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-QE3UQAHK.js';
18
18
  import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-RKOTJQVG.js';
19
19
  import { downconvertSession } from './chunk-QZBXLLTV.js';
20
- import { vmAssetsDir, RUNNER_DIR_MODE, rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, buildDir, SHIM_DIR } from './chunk-L4CW6LZQ.js';
20
+ import { vmAssetsDir, RUNNER_DIR_MODE, rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, buildDir, SHIM_DIR } from './chunk-F3BBEBPL.js';
21
21
  import { repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, claudeCredential, buildEnvironment, startBuildServices, checkEnvironment, AGENT_CREDENTIAL_MISSING, checkoutPath, JOB_MOUNT } from './chunk-2K3TCQHW.js';
22
22
  import { RELAY_USER, RELAY_ID, UNKNOWN_TRANSPORT_REASON, DOCKER_DESKTOP_REASON, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, MAX_OPEN_STREAMS, STREAM_WINDOW, SESSION_WINDOW, targetOfPath } from './chunk-JGD5TWQ2.js';
23
23
  import { readFileSync, mkdirSync, existsSync, mkdtempSync, rmSync, chmodSync, truncateSync, writeFileSync, readdirSync, lstatSync, copyFileSync, accessSync, constants, statSync, rmdirSync, renameSync, unlinkSync, openSync, closeSync, createWriteStream, createReadStream } from 'fs';
@@ -210,6 +210,9 @@ function helperClient(socketPath, options = {}) {
210
210
  async list() {
211
211
  const reply = await ask(socketPath, { v: 1, op: "list" }, REQUEST_TIMEOUT_MS);
212
212
  return Array.isArray(reply.builds) ? reply.builds.map(String) : [];
213
+ },
214
+ async relink(build) {
215
+ await ask(socketPath, { v: 1, op: "relink", build }, REQUEST_TIMEOUT_MS);
213
216
  }
214
217
  };
215
218
  }
@@ -1048,6 +1051,11 @@ async function runBuildSteps(input) {
1048
1051
  const delivered = await deliver(input, staged);
1049
1052
  if (!delivered.ok) return delivered;
1050
1053
  controlPlane = { repository: staged.repository, commit: staged.sha };
1054
+ try {
1055
+ if (input.keepIn !== void 0) keepStagedContext(staged, input.keepIn);
1056
+ } catch (err) {
1057
+ log.error(`${tag} the governed context could not be kept for the host's checks: ${describeCallFailure(err)} \xB7 they fetch it again`);
1058
+ }
1051
1059
  log.line(`${tag} governed context ${staged.sha.slice(0, 7)} delivered to ${deliveryDir(staged.repository, staged.sha)} (${staged.files.length} files)`);
1052
1060
  } finally {
1053
1061
  input.removeStagedContext();
@@ -2883,7 +2891,8 @@ async function provisionContainer(input) {
2883
2891
  const delivered = await deliverJobFiles(runtime, state, ["context"], secrets);
2884
2892
  return delivered.ok ? delivered : { ok: false, reason: `context_unavailable: ${delivered.reason}` };
2885
2893
  },
2886
- removeStagedContext: () => removeStagedContext(buildDir2)
2894
+ removeStagedContext: () => removeStagedContext(buildDir2),
2895
+ keepIn: jobDir
2887
2896
  });
2888
2897
  if (!steps.ok) return bail(steps.reason, steps.aborted === true);
2889
2898
  state.startCommit = steps.startCommit;
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { isPlaceholderCommand } from './chunk-PCY7IGSL.js';
4
- import { describeCallFailure } from './chunk-DXHISLCI.js';
5
- import { WorkCommandError, getJson } from './chunk-GMPXOQTH.js';
3
+ import { isPlaceholderCommand } from './chunk-OQUD3UYF.js';
4
+ import { describeCallFailure } from './chunk-OZKEEXVH.js';
5
+ import { WorkCommandError, getJson } from './chunk-6CGXSMKX.js';
6
6
  import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
7
7
  import { builtinKind } from './chunk-JWRX5ZTT.js';
8
- import { signerFor } from './chunk-F6DIHHBS.js';
8
+ import { signerFor } from './chunk-GWRDL75D.js';
9
9
  import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential } from './chunk-2K3TCQHW.js';
10
10
 
11
11
  createRequire(import.meta.url);
@@ -6,7 +6,7 @@ import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
6
6
  import { cliInvocation } from './chunk-CRB3POP4.js';
7
7
  import { deadHooksState, huskyPrepareScript, preparePackageManagerCommand } from './chunk-TUSYOL2O.js';
8
8
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
9
- import { readFileSync, mkdirSync, writeFileSync, renameSync, existsSync, statSync, appendFileSync, opendirSync, unlinkSync } from 'fs';
9
+ import { readFileSync, mkdirSync, writeFileSync, renameSync, existsSync, readdirSync, unlinkSync, statSync, appendFileSync, opendirSync } from 'fs';
10
10
  import { spawn, execFileSync } from 'child_process';
11
11
  import { createHash } from 'crypto';
12
12
  import { join, dirname, resolve } from 'path';
@@ -308,6 +308,42 @@ function refreshCommand(workspaceDistDir, trusted) {
308
308
  function spoolDir(home = homeFromEnv()) {
309
309
  return join(home, ".outerlayer", "spool");
310
310
  }
311
+ var DUPLICATE_RUN_WINDOW_MS = 2e3;
312
+ var DUPLICATE_RUN_CLAIM_TTL_MS = 6e4;
313
+ function isDuplicateRun(dir, event, input, now = Date.now(), claim = claimRun) {
314
+ try {
315
+ const claims = join(dir, "hook-runs");
316
+ mkdirSync(claims, { recursive: true });
317
+ const key = createHash("sha256").update(`${event}
318
+ ${input}`).digest("hex");
319
+ const bucket = Math.floor(now / DUPLICATE_RUN_WINDOW_MS);
320
+ try {
321
+ claim(join(claims, `${key}-${bucket}`), now);
322
+ } catch (err) {
323
+ return err.code === "EEXIST";
324
+ }
325
+ if (claimedWithinWindow(join(claims, `${key}-${bucket - 1}`), now)) return true;
326
+ for (const name of readdirSync(claims)) {
327
+ const claimed = Number(name.slice(name.lastIndexOf("-") + 1)) * DUPLICATE_RUN_WINDOW_MS;
328
+ if (!(now - claimed <= DUPLICATE_RUN_CLAIM_TTL_MS)) unlinkSync(join(claims, name));
329
+ }
330
+ return false;
331
+ } catch {
332
+ return false;
333
+ }
334
+ }
335
+ function claimRun(path, now) {
336
+ writeFileSync(path, String(now), { flag: "wx" });
337
+ }
338
+ function claimedWithinWindow(path, now) {
339
+ let text;
340
+ try {
341
+ text = readFileSync(path, "utf8");
342
+ } catch {
343
+ return false;
344
+ }
345
+ return text === "" || now - Number(text) < DUPLICATE_RUN_WINDOW_MS;
346
+ }
311
347
  function hookFiredMarkerPath(event, home = homeFromEnv()) {
312
348
  const safe = event.replace(/[^A-Za-z0-9_-]/g, "").slice(0, 64) || "unknown";
313
349
  return join(spoolDir(home), `last-fired-${safe}`);
@@ -628,7 +664,7 @@ async function missingControlPlane(cwd, sessionId, home, env) {
628
664
  cleanupEarlierCopies(dirs);
629
665
  }
630
666
  if (!contextPossiblyGoverned(cwd, home)) return void 0;
631
- const { governanceOf } = await import('./control-plane-launch-654RV5PO.js');
667
+ const { governanceOf } = await import('./control-plane-launch-JIQOE6BP.js');
632
668
  if (await governanceOf({ cwd, env, home }) !== "governed") return void 0;
633
669
  recordMissingContext(dirs, sessionId, home);
634
670
  const launcher = `${cliInvocation()} claude`;
@@ -679,6 +715,7 @@ async function runHookFast(event, home = homeFromEnv(), read = readStdin, env =
679
715
  }
680
716
  const dir = spoolDir(home);
681
717
  mkdirSync(dir, { recursive: true });
718
+ if (isDuplicateRun(dir, resolvedEvent, stdin)) return;
682
719
  const record = {
683
720
  t: (/* @__PURE__ */ new Date()).toISOString(),
684
721
  event: resolvedEvent,
@@ -773,4 +810,4 @@ function recordLinkExitFailure(argv, home = homeFromEnv(), target = process) {
773
810
  });
774
811
  }
775
812
 
776
- export { AUTO_SYNC_DEBOUNCE_MS, SYNC_STALE_AFTER_MS, WORK_LEASE_RENEW_DEBOUNCE_MS, WORK_LINK_RETRIES, assessSyncHealth, checkInstalledCliStaleness, contextPossiblyGoverned, formatAgo, handleWorkLaunch, handleWorkSessionEnd, hookFiredMarkerPath, installedCliDistDir, logHookError, markWorkLeaseRenewed, maybeAutoSync, maybeRenewWorkLease, readSyncStatus, recordLinkExitFailure, refreshCommand, runHookFast, sanitizeForContext, spoolDir, workspaceRootOf, writeSyncStatus };
813
+ export { AUTO_SYNC_DEBOUNCE_MS, DUPLICATE_RUN_WINDOW_MS, SYNC_STALE_AFTER_MS, WORK_LEASE_RENEW_DEBOUNCE_MS, WORK_LINK_RETRIES, assessSyncHealth, checkInstalledCliStaleness, contextPossiblyGoverned, formatAgo, handleWorkLaunch, handleWorkSessionEnd, hookFiredMarkerPath, installedCliDistDir, isDuplicateRun, logHookError, markWorkLeaseRenewed, maybeAutoSync, maybeRenewWorkLease, readSyncStatus, recordLinkExitFailure, refreshCommand, runHookFast, sanitizeForContext, spoolDir, workspaceRootOf, writeSyncStatus };
@@ -1,30 +1,30 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, hostCommandEnvironment, execArgv, microVmCommandLine, runCommand, commandLogOffset, execCommandLine, startSender, startHostServices, finishJob, isContainerTracked, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, hookLimitsFor, AttemptLogBook, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, ALREADY_RELEASED, inTeardown } from './chunk-OL2O5PEI.js';
4
- import { writePendingUpdate } from './chunk-TKL74NLB.js';
3
+ import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, hostCommandEnvironment, execArgv, microVmCommandLine, runCommand, commandLogOffset, execCommandLine, startSender, startHostServices, finishJob, isContainerTracked, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, hookLimitsFor, AttemptLogBook, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, ALREADY_RELEASED, inTeardown } from './chunk-27RDUTQH.js';
4
+ import { writePendingUpdate } from './chunk-OFTFW7TH.js';
5
5
  import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
6
- import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-6FAP657M.js';
6
+ import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-NWPRNKZ5.js';
7
7
  import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
8
8
  import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-YETTWTAY.js';
9
9
  import { RUNNER_PROTOCOL } from './chunk-TPKYTORP.js';
10
- import { currentSkillCommand, formerSkillProblem, placeholderQueues, placeholderProblem } from './chunk-TODY3MTS.js';
11
- import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, isInLayout, cleanVersions, stagingDir } from './chunk-4IFKLYMM.js';
10
+ import { currentSkillCommand, formerSkillProblem, placeholderQueues, placeholderProblem } from './chunk-UOGQZQXN.js';
11
+ import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, isInLayout, cleanVersions, stagingDir } from './chunk-7Z2WMXM5.js';
12
12
  import { freeBytes, formatBytes } from './chunk-YYYRBYWG.js';
13
13
  import { RepoFilter } from './chunk-TBT347UY.js';
14
- import { leaseTimeLeftMs, LEASE_SECONDS, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandExec, measureDisk, setUpRunnerCgroup, createContainerRuntime, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied } from './chunk-GUT4IU7K.js';
15
- import { tagToPull, pullInstruction, imageTag, writeUpdateStatus } from './chunk-665QWBNW.js';
14
+ import { leaseTimeLeftMs, LEASE_SECONDS, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandExec, measureDisk, setUpRunnerCgroup, createContainerRuntime, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied } from './chunk-SBW4K3XZ.js';
15
+ import { tagToPull, pullInstruction, imageTag, writeUpdateStatus } from './chunk-2J46BQ5Y.js';
16
16
  import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
17
- import { checkFit } from './chunk-MLD2NA7N.js';
18
- import { claimPidFile, readPidFile, releasePidFile } from './chunk-PYSKSROG.js';
17
+ import { checkFit } from './chunk-6SPXKRQR.js';
18
+ import { claimPidFile, readPidFile, releasePidFile } from './chunk-IZAOO5AR.js';
19
19
  import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
20
- import { writeJobFile, ensureRunnerIdentity, readJobFile, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-KZLLLARE.js';
21
- import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-DXHISLCI.js';
22
- import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-GMPXOQTH.js';
20
+ import { writeJobFile, ensureRunnerIdentity, readJobFile, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-QUP6CVBQ.js';
21
+ import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-OZKEEXVH.js';
22
+ import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-6CGXSMKX.js';
23
23
  import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-JWRX5ZTT.js';
24
24
  import { exceedsDisk } from './chunk-7RQ73DLO.js';
25
25
  import { resolveVersion } from './chunk-RA3O54FC.js';
26
- import { loadHostKey, ensureHostKey, signerFor } from './chunk-F6DIHHBS.js';
27
- import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, rootfsDir } from './chunk-L4CW6LZQ.js';
26
+ import { loadHostKey, ensureHostKey, signerFor } from './chunk-GWRDL75D.js';
27
+ import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, rootfsDir } from './chunk-F3BBEBPL.js';
28
28
  import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT, claudeCredential } from './chunk-2K3TCQHW.js';
29
29
  import { COMMAND_LOST_REASON, CONTAINER_STOPPED_REASON } from './chunk-JGD5TWQ2.js';
30
30
  import { randomBytes } from 'crypto';
@@ -1749,7 +1749,7 @@ var CLAIM_REFUSAL_CODES = new Set(
1749
1749
  "pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
1750
1750
  );
1751
1751
  async function tryClaimAndStart(state, item, queue) {
1752
- const { postJson: postJson2 } = await import('./work-cmd-SJB6N6FZ.js');
1752
+ const { postJson: postJson2 } = await import('./work-cmd-S2FHIFJA.js');
1753
1753
  const log = logOf(state);
1754
1754
  const hostKey = await loadHostKey(state.config.configPath);
1755
1755
  const claim = await retrySend(
@@ -1933,11 +1933,16 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
1933
1933
  writeJobFile(jobFilePath, active.job);
1934
1934
  tokens = buildTokensFor(state, active, item.number);
1935
1935
  runtimeOf(state).credentials.set(dirPath, tokens);
1936
+ let asking;
1936
1937
  try {
1937
1938
  await tokens.token("read");
1939
+ for (const entry of repositories) {
1940
+ asking = entry.repository;
1941
+ await tokens.token("read", entry.repository);
1942
+ }
1938
1943
  } catch (err) {
1939
1944
  if (active.ending) return;
1940
- await endOnTokenRefusal(state, active, err);
1945
+ await endOnTokenRefusal(state, active, err, asking);
1941
1946
  return;
1942
1947
  }
1943
1948
  if (active.ending) return;
@@ -2323,19 +2328,21 @@ function buildTokensFor(state, active, item) {
2323
2328
  }
2324
2329
  });
2325
2330
  }
2326
- async function endOnTokenRefusal(state, active, err) {
2331
+ async function endOnTokenRefusal(state, active, err, repository) {
2327
2332
  const log = logOf(state);
2328
2333
  const tag = `#${active.job.item}`;
2329
2334
  const refusal = classifyRefusal(err);
2335
+ const which = repository === void 0 ? "the build's read token" : `the build's read token for ${repository}`;
2330
2336
  if (refusal.kind === "retry") {
2331
- log.error(`${tag} the build's read token could not be had (${describeCallFailure(err)}) \xB7 releasing the claim to try again`);
2337
+ log.error(`${tag} ${which} could not be had (${describeCallFailure(err)}) \xB7 releasing the claim to try again`);
2332
2338
  await endJob(state, active, void 0);
2333
2339
  } else if (refusal.kind === "lease_lost") {
2334
- log.error(`${tag} the build's read token was refused: ${refusalCode(err)} \xB7 ending job as lease_lost`);
2340
+ log.error(`${tag} ${which} was refused: ${refusalCode(err)} \xB7 ending job as lease_lost`);
2335
2341
  await endJob(state, active, "lease_lost");
2336
2342
  } else {
2337
- log.error(`${tag} the build's read token was refused: ${refusal.reason} \xB7 ending job as failed`);
2338
- await endJob(state, active, "failed", { stage: "provision", reason: refusal.reason });
2343
+ const reason = repository === void 0 ? refusal.reason : `${which} could not be had: ${refusal.reason}`;
2344
+ log.error(`${tag} ${which} was refused: ${refusal.reason} \xB7 ending job as failed`);
2345
+ await endJob(state, active, "failed", { stage: "provision", reason });
2339
2346
  }
2340
2347
  }
2341
2348
  async function endOnProvisionFailure(state, active, tokens, took, reason) {
@@ -2735,7 +2742,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
2735
2742
  const outcome = await onStartUnderMarker({
2736
2743
  configPath,
2737
2744
  own: ownVersionOf(deps),
2738
- check: update.check ? () => update.check(configPath) : async () => (await import('./check-KL3LDAI3.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl }),
2745
+ check: update.check ? () => update.check(configPath) : async () => (await import('./check-ZSYCR5WG.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl }),
2739
2746
  now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
2740
2747
  log
2741
2748
  });
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { DEFAULT_UNIT_NAME } from './chunk-MLD2NA7N.js';
3
+ import { DEFAULT_UNIT_NAME } from './chunk-6SPXKRQR.js';
4
4
  import { parseRunnerEnv } from './chunk-6MZSX4M7.js';
5
- import { RUNNER_FILE_MODE } from './chunk-L4CW6LZQ.js';
5
+ import { RUNNER_FILE_MODE } from './chunk-F3BBEBPL.js';
6
6
  import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
7
7
  import { join, dirname } from 'path';
8
8
 
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { uploadSpooledSteps } from './chunk-EORWWFPA.js';
3
+ import { uploadSpooledSteps } from './chunk-WK35HB56.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-QRZLUUNN.js';
8
- import { writeSyncStatus, spoolDir } from './chunk-2EAVBJMO.js';
7
+ import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-MCSINUVC.js';
8
+ import { writeSyncStatus, spoolDir } from './chunk-UZEQVPKF.js';
9
9
  import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
10
10
  import { hookExecSpoolPath } from './chunk-2O5KA67H.js';
11
11
  import { applyReportedCost } from './chunk-BKO6JEZI.js';
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';
14
14
  import { C } from './chunk-ANPNT6PM.js';
15
- import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-EABW6AJQ.js';
15
+ import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-PJDQPF5N.js';
16
16
  import { readLaunchSpoolState, launchStatusIsDecisive, launchedItemsBySession, launchesPath } from './chunk-T2Q7ISPE.js';
17
17
  import { cliInvocation } from './chunk-CRB3POP4.js';
18
18
  import { removeJournalHooks } from './chunk-TUSYOL2O.js';
19
19
  import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-QZBXLLTV.js';
20
20
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
21
- import { signerFor, signRunnerRequest } from './chunk-F6DIHHBS.js';
21
+ import { signerFor, signRunnerRequest } from './chunk-GWRDL75D.js';
22
22
  import { dirname, basename, join } from 'path';
23
23
  import { statSync, readFileSync, readdirSync, mkdirSync, writeFileSync, renameSync, existsSync, rmSync } from 'fs';
24
24
  import { execFileSync } from 'child_process';
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
4
- import { autoConnect, detectActiveSession } from './chunk-HXFRJKMU.js';
4
+ import { autoConnect, detectActiveSession } from './chunk-H57M3HC7.js';
5
5
  import { acquireSpoolLockAt } from './chunk-BUP5N3X6.js';
6
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-QRZLUUNN.js';
6
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-MCSINUVC.js';
7
7
  import { resolveRepoIdentity } from './chunk-QE3UQAHK.js';
8
8
  import { C } from './chunk-ANPNT6PM.js';
9
9
  import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { launcherPath, writeLauncher, LauncherWriteError, pathNotes } from './chunk-KDDFI5MR.js';
4
- import { currentVersion, currentLink, isInLayout, packageRootIn, versionDir, switchCurrent, execStartLine } from './chunk-4IFKLYMM.js';
3
+ import { launcherPath, writeLauncher, LauncherWriteError, pathNotes } from './chunk-K4FXNMV5.js';
4
+ import { currentVersion, currentLink, isInLayout, packageRootIn, versionDir, switchCurrent, execStartLine } from './chunk-7Z2WMXM5.js';
5
5
  import { compareVersions } from './chunk-TQMI335S.js';
6
- import { RUNNER_DIR_MODE } from './chunk-L4CW6LZQ.js';
6
+ import { RUNNER_DIR_MODE } from './chunk-F3BBEBPL.js';
7
7
  import { realpathSync, readFileSync, mkdirSync, rmSync, cpSync, existsSync } from 'fs';
8
8
  import { dirname, sep, join } from 'path';
9
9
 
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { checkStarterFiles, contextIsGoverned, checkBuildSkill } from './chunk-XFGL53GU.js';
4
- import { resolveCredentials, getJson, WorkCommandError } from './chunk-GMPXOQTH.js';
5
- import { isLinkedRepository } from './chunk-TEVO3RUV.js';
3
+ import { checkStarterFiles, contextIsGoverned, checkBuildSkill } from './chunk-6WTAYEKJ.js';
4
+ import { resolveCredentials, getJson, WorkCommandError } from './chunk-6CGXSMKX.js';
5
+ import { isLinkedRepository } from './chunk-PZA6ZFYW.js';
6
6
  import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
7
7
  import { checkFormerSkillNames } from './chunk-MQ743JX3.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';
8
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-MCSINUVC.js';
9
+ import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-UZEQVPKF.js';
10
10
  import { readStatuslineState, STATE_FRESH_MS } from './chunk-I7RZHMXW.js';
11
11
  import { hookCommandEscapesControlPlane, CONTROL_PLANE_DIR_VARIABLE } from './chunk-HCVLP7XA.js';
12
12
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
@@ -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-3LCCPBX6.js');
1189
+ const { runnerHostChecks } = await import('./doctor-U2N7AF3N.js');
1190
1190
  const hooks = (() => {
1191
1191
  try {
1192
1192
  return loadRunnerConfig(configPath).hooks;
@@ -1221,7 +1221,7 @@ async function gatherDoctorChecks() {
1221
1221
  const { existsSync: existsSync3 } = await import('fs');
1222
1222
  if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
1223
1223
  const { inspectService, realInspectProbes } = await import('./inspect-6UYAAXH7.js');
1224
- const { DEFAULT_UNIT_NAME } = await import('./install-QSTTBUHX.js');
1224
+ const { DEFAULT_UNIT_NAME } = await import('./install-AFMXH25X.js');
1225
1225
  const { dirname: dirname2 } = await import('path');
1226
1226
  return inspectService(DEFAULT_UNIT_NAME, dirname2(configPath), realInspectProbes());
1227
1227
  })();
@@ -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-654RV5PO.js');
239
+ const { resolveLaunchPlane } = await import('./control-plane-launch-JIQOE6BP.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);