@outerlayer/cli 0.33.0-next.20261022004023 → 0.33.0-next.20261022124145

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 (94) hide show
  1. package/README.md +12 -11
  2. package/dist/{agent-setup-UY5NBT7C.js → agent-setup-2MJXGAZ5.js} +10 -10
  3. package/dist/{artifact-link-cmd-2MBHG3PO.js → artifact-link-cmd-6FF2Y6QI.js} +2 -2
  4. package/dist/build-disk-5GIWYDOB.js +18 -0
  5. package/dist/build-info.json +1 -1
  6. package/dist/{builder-VR55L4PV.js → builder-EELBB7SI.js} +4 -4
  7. package/dist/{check-XGBAFJPP.js → check-EJKRXI2N.js} +36 -34
  8. package/dist/{chunk-N3KK5BKF.js → chunk-2GHI2J26.js} +7 -7
  9. package/dist/{chunk-AKR32WHV.js → chunk-5DNCFOXA.js} +9 -7
  10. package/dist/{chunk-UIBTEDLA.js → chunk-6JNCNHSV.js} +5 -5
  11. package/dist/{chunk-GHQFV3TS.js → chunk-6WUQSARX.js} +11 -10
  12. package/dist/{chunk-EG7KPSSP.js → chunk-72BIONOT.js} +6 -6
  13. package/dist/{chunk-XNGS6LUK.js → chunk-AESNEWYR.js} +1 -1
  14. package/dist/{chunk-LN4WDONI.js → chunk-AVTI3FL5.js} +1 -1
  15. package/dist/{chunk-5RUH3PCG.js → chunk-B3EE7OKK.js} +4 -4
  16. package/dist/{chunk-Y3LIJIRH.js → chunk-BJQ25STI.js} +4 -4
  17. package/dist/{chunk-6TFTRVOA.js → chunk-C3XLVHN6.js} +2 -2
  18. package/dist/{chunk-OEITN64Z.js → chunk-D7ECJX4J.js} +15 -38
  19. package/dist/{chunk-UWEJ6HGB.js → chunk-DY7Y7UT4.js} +2 -2
  20. package/dist/{chunk-AKHGQKNR.js → chunk-E6CO3MJE.js} +34 -2
  21. package/dist/{chunk-DM4EGXDO.js → chunk-EWVYQLD3.js} +1 -1
  22. package/dist/{chunk-BUBMAMIP.js → chunk-FQW7TKIU.js} +2 -2
  23. package/dist/{chunk-KUTZ6XLS.js → chunk-G63KT5I5.js} +1 -1
  24. package/dist/{chunk-Q2D4M3GC.js → chunk-GFYEMCPP.js} +1 -1
  25. package/dist/{chunk-4IG6EZHU.js → chunk-HJYBWJAS.js} +2 -2
  26. package/dist/{chunk-CMTRZC23.js → chunk-HVIYKGK5.js} +79 -12
  27. package/dist/{chunk-TNJXCNQ6.js → chunk-JHTJPQSL.js} +4 -4
  28. package/dist/{chunk-RVWADVBN.js → chunk-JZ4FXSLI.js} +3 -3
  29. package/dist/{chunk-HT7LVCTX.js → chunk-L3DUKDTR.js} +2 -2
  30. package/dist/{chunk-KDM77TVX.js → chunk-LCVR4UIS.js} +2 -2
  31. package/dist/{chunk-OGCG5LOX.js → chunk-LJG6EMLJ.js} +1 -1
  32. package/dist/{chunk-HJEZ3D3E.js → chunk-LWODW66U.js} +16 -16
  33. package/dist/chunk-MBE6FEQ3.js +111 -0
  34. package/dist/{chunk-RW52CUFX.js → chunk-NSPRS7WK.js} +1 -1
  35. package/dist/{chunk-DE7YSNDX.js → chunk-OJ63GRZ2.js} +2 -2
  36. package/dist/{chunk-Q4YVHYHT.js → chunk-QJNFO7TQ.js} +3 -3
  37. package/dist/{chunk-NOXK3QW6.js → chunk-QSSYXK6C.js} +3 -3
  38. package/dist/{chunk-UENWEDZ3.js → chunk-S2IJQER5.js} +255 -255
  39. package/dist/{chunk-RQKQTRXM.js → chunk-THTBXIK5.js} +4 -4
  40. package/dist/{chunk-M5OBRUQE.js → chunk-UIUGTW5C.js} +2 -2
  41. package/dist/{chunk-YH2632RT.js → chunk-V2EUC2MJ.js} +43 -20
  42. package/dist/{chunk-SFJD4MRY.js → chunk-WHRR55PC.js} +14 -7
  43. package/dist/{chunk-CALFNNIY.js → chunk-XTBGPISI.js} +17 -6
  44. package/dist/chunk-YYYRBYWG.js +32 -0
  45. package/dist/{claude-launcher-STSKZNW3.js → claude-launcher-IUDNUD2J.js} +17 -6
  46. package/dist/{cli-BMV37UKQ.js → cli-5JSVOAE5.js} +89 -89
  47. package/dist/{command-35IERXEA.js → command-7IY3XGAG.js} +24 -23
  48. package/dist/{connect-cmd-WFHAPGCZ.js → connect-cmd-AQSJVDQU.js} +8 -8
  49. package/dist/{container-start-3FFBFFNK.js → container-start-BPQHJMNF.js} +25 -24
  50. package/dist/{context-cleanup-UBOJHGQM.js → context-cleanup-BX5Y3AFL.js} +3 -3
  51. package/dist/{control-plane-launch-R4X63DYW.js → control-plane-launch-K7YD6KEN.js} +6 -6
  52. package/dist/{dist-ADFLG3AY.js → dist-ACTRIBVW.js} +2 -2
  53. package/dist/{docker-2NN3EKTR.js → docker-UKJBLZLW.js} +4 -4
  54. package/dist/{doctor-CA5QQ5KS.js → doctor-JUR62PMF.js} +48 -25
  55. package/dist/{emit-artifact-cmd-FR5PUUJR.js → emit-artifact-cmd-HI3EYJA3.js} +13 -13
  56. package/dist/{emit-cmd-JOO6ZTEI.js → emit-cmd-OX6LYS6I.js} +6 -6
  57. package/dist/{emit-criteria-cmd-DKPZJTIN.js → emit-criteria-cmd-IC5OIZX2.js} +9 -9
  58. package/dist/{emit-demo-cmd-G2I4SB7A.js → emit-demo-cmd-HWDC3MAK.js} +211 -101
  59. package/dist/{emit-finding-cmd-VM4KIVEM.js → emit-finding-cmd-A7RBLHTN.js} +10 -10
  60. package/dist/{emit-result-cmd-SEKL6HUU.js → emit-result-cmd-2WVVAGST.js} +12 -12
  61. package/dist/{emit-step-cmd-4YAWK4VE.js → emit-step-cmd-KNVHYSXT.js} +10 -10
  62. package/dist/{findings-cmd-RXYIWXY4.js → findings-cmd-ISP3P3UY.js} +10 -10
  63. package/dist/{fleet-readiness-VIX76RNL.js → fleet-readiness-O2WAJJVT.js} +8 -8
  64. package/dist/{governing-source-APGCKDTS.js → governing-source-PMWZJCXJ.js} +13 -13
  65. package/dist/{guest-init-BI7267TB.js → guest-init-3LNAL3TB.js} +2 -2
  66. package/dist/{hook-fast-NVBMSE3N.js → hook-fast-FJ2PMBML.js} +1 -1
  67. package/dist/index.js +4 -4
  68. package/dist/{init-BZMBUTU4.js → init-YRSKJNSB.js} +25 -24
  69. package/dist/{init-VPK3MDM5.js → init-ZXV6LILS.js} +26 -25
  70. package/dist/{init-cmd-PTQ5WSQ5.js → init-cmd-3F436JBW.js} +18 -18
  71. package/dist/{init-update-HOTJISWA.js → init-update-6OPETOBA.js} +17 -17
  72. package/dist/{layout-ZI4RJ6MT.js → layout-JGF7MJHG.js} +4 -4
  73. package/dist/{login-browser-WUSIVD5E.js → login-browser-3RIZQJY2.js} +2 -2
  74. package/dist/{loop-FDFEXDKA.js → loop-MCR3EUSZ.js} +36 -34
  75. package/dist/{machine-ZL72TS6B.js → machine-35YQ7MGN.js} +23 -22
  76. package/dist/{machine-skills-REHDWINX.js → machine-skills-AGERT2HN.js} +4 -4
  77. package/dist/{runner-identity-DSFLFUR2.js → runner-identity-GO762MHZ.js} +4 -4
  78. package/dist/{runner-key-XJ7YSMOF.js → runner-key-BQSR6MK4.js} +25 -24
  79. package/dist/{session-sender-PLQ5NOEW.js → session-sender-ENL3IBVD.js} +13 -13
  80. package/dist/{spec-cmd-NIAQWMLE.js → spec-cmd-SLJT7MRX.js} +10 -10
  81. package/dist/{starter-pack-OESK7UX2.js → starter-pack-UBEC5LTE.js} +5 -5
  82. package/dist/{status-LJ2UBJCE.js → status-GQEAZBUJ.js} +29 -28
  83. package/dist/{sync-cmd-UTESQMDU.js → sync-cmd-Z4BYKM6K.js} +12 -12
  84. package/dist/{watch-4UC4FGI5.js → watch-MBEA6QB4.js} +12 -12
  85. package/dist/{work-claim-cmd-ODYRE44S.js → work-claim-cmd-TLXRPJWO.js} +12 -12
  86. package/dist/{work-cmd-QQDUI3YX.js → work-cmd-DYM67Z3F.js} +10 -10
  87. package/dist/{work-comment-cmd-FIOMDPIZ.js → work-comment-cmd-CRRWP3AH.js} +10 -10
  88. package/dist/{work-logs-cmd-DA6MPQ6O.js → work-logs-cmd-7LFOEVXI.js} +10 -10
  89. package/dist/{work-open-pr-cmd-QG2FT7OW.js → work-open-pr-cmd-XXQ75PSU.js} +11 -11
  90. package/dist/{work-pr-cmd-XNXWWLS5.js → work-pr-cmd-ZVE7EGSC.js} +10 -10
  91. package/dist/{work-stop-cmd-2KLZ2UH2.js → work-stop-cmd-GVFSTGLK.js} +10 -10
  92. package/package.json +1 -1
  93. package/skill-pack/maintained/outerlayer-evidence/SKILL.md +8 -5
  94. package/dist/{chunk-RJYKTWUP.js → chunk-ELYHDWCC.js} +1 -1
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { uploadSpooledSteps } from './chunk-RQKQTRXM.js';
3
+ import { uploadSpooledSteps } from './chunk-THTBXIK5.js';
4
4
  import { LaunchFilter } from './chunk-ESVW4MJY.js';
5
5
  import { RepoFilter } from './chunk-TBT347UY.js';
6
- import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-DM4EGXDO.js';
7
- import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-AKR32WHV.js';
6
+ import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-EWVYQLD3.js';
7
+ import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-5DNCFOXA.js';
8
8
  import { C } from './chunk-ANPNT6PM.js';
9
9
  import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-VQ2JGZSC.js';
10
10
  import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-PJDQPF5N.js';
11
11
  import { signerFor, signRunnerRequest } from './chunk-JT3YO5MH.js';
12
- import { writeSyncStatus, spoolDir } from './chunk-HT7LVCTX.js';
12
+ import { writeSyncStatus, spoolDir } from './chunk-L3DUKDTR.js';
13
13
  import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
14
14
  import { hookExecSpoolPath } from './chunk-2O5KA67H.js';
15
15
  import { applyReportedCost } from './chunk-BKO6JEZI.js';
@@ -17,7 +17,7 @@ import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
17
17
  import { readLaunchSpoolState, launchStatusIsDecisive, launchedItemsBySession, launchesPath } from './chunk-T2Q7ISPE.js';
18
18
  import { cliInvocation } from './chunk-CRB3POP4.js';
19
19
  import { removeJournalHooks } from './chunk-TUSYOL2O.js';
20
- import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-AKHGQKNR.js';
20
+ import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-E6CO3MJE.js';
21
21
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
22
22
  import { dirname, basename, join, sep } from 'path';
23
23
  import { statSync, readFileSync, readdirSync, mkdirSync, writeFileSync, renameSync, existsSync, rmSync } from 'fs';
@@ -1705,25 +1705,32 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1705
1705
  ...replaces !== void 0 ? { replaces } : {},
1706
1706
  ...record.replacesTargets !== void 0 ? { replacesTargets: record.replacesTargets } : {},
1707
1707
  ...record.tests !== void 0 ? { tests: record.tests } : {},
1708
+ ...record.range !== void 0 ? { range: record.range } : {},
1708
1709
  session: { sessionId: record.sessionId, ...turnIndex !== void 0 ? { turnIndex } : {} }
1709
1710
  },
1710
1711
  blob: { data: blobData.toString("base64") }
1711
1712
  };
1713
+ const { blob: _blob, ...requestWithoutBlob } = request;
1712
1714
  let failure = "";
1713
1715
  let status;
1714
1716
  let errorCode = "";
1715
1717
  let serverMessage = "";
1716
1718
  let accepted;
1717
1719
  try {
1718
- const response = await fetchImpl(artifactEndpoint, {
1720
+ const send = (body) => fetchImpl(artifactEndpoint, {
1719
1721
  method: "POST",
1720
1722
  headers: {
1721
1723
  "content-type": "application/json",
1722
1724
  authorization: `Bearer ${apiKey}`,
1723
1725
  "x-outerlayer-app-id": appId
1724
1726
  },
1725
- body: JSON.stringify(request)
1727
+ body: JSON.stringify(body)
1726
1728
  });
1729
+ let response = await send(record.blobOptional === true ? requestWithoutBlob : request);
1730
+ if (record.blobOptional === true && response.status === 409) {
1731
+ const refusal = await response.clone().json().then((body) => body.error?.code).catch(() => void 0);
1732
+ if (refusal === "blob_required") response = await send(request);
1733
+ }
1727
1734
  if (!response.ok) {
1728
1735
  failure = `HTTP ${response.status}`;
1729
1736
  status = response.status;
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { isPlaceholderCommand } from './chunk-BUBMAMIP.js';
4
- import { describeCallFailure } from './chunk-KDM77TVX.js';
3
+ import { isPlaceholderCommand } from './chunk-FQW7TKIU.js';
4
+ import { describeCallFailure } from './chunk-LCVR4UIS.js';
5
5
  import { checkFit } from './chunk-HBBCQ5NE.js';
6
- import { builtinKind, imageBuildOf } from './chunk-ALSE7YKX.js';
6
+ import { realBuildDiskProbe, checkDiskFit, DEFAULT_BUILD_DISK } from './chunk-MBE6FEQ3.js';
7
7
  import { builderDiskPinned } from './chunk-R6QCSHKC.js';
8
- import { WorkCommandError, getJson } from './chunk-UIBTEDLA.js';
9
- import { sanitizeTerminal } from './chunk-DM4EGXDO.js';
8
+ import { builtinKind, imageBuildOf } from './chunk-ALSE7YKX.js';
9
+ import { WorkCommandError, getJson } from './chunk-6JNCNHSV.js';
10
+ import { sanitizeTerminal } from './chunk-EWVYQLD3.js';
10
11
  import { signerFor } from './chunk-JT3YO5MH.js';
11
12
  import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential, claudeCredentialVariablesSet } from './chunk-HDSDUTX4.js';
12
13
  import { closeSync, openSync, constants } from 'fs';
@@ -124,8 +125,10 @@ function openKvm() {
124
125
  return err.code === "ENOENT" ? "absent" : "no-permission";
125
126
  }
126
127
  }
128
+ var sharedBuildDisk;
127
129
  function realBlockedProbes() {
128
- return { env: process.env, kvm: openKvm, totalMemoryBytes: totalmem, imageBuilder: "unknown" };
130
+ sharedBuildDisk ??= realBuildDiskProbe();
131
+ return { env: process.env, kvm: openKvm, totalMemoryBytes: totalmem, imageBuilder: "unknown", buildDisk: sharedBuildDisk };
129
132
  }
130
133
  var DEFAULT_BUILD_MEMORY = "8g";
131
134
  function managedProblems(facts) {
@@ -202,6 +205,14 @@ function checkBlocked(config, probes) {
202
205
  const advice = probes.inImage === true ? "Set OUTERLAYER_BUILD_MEMORY or OUTERLAYER_CONCURRENCY in the env file and recreate the container, or give the machine more memory" : `Lower runner.concurrency or runner.build.memory in ${config.configPath}`;
203
206
  return { reason: `${fit.message}. ${advice}` };
204
207
  }
208
+ const facts = probes.buildDisk?.(kind, config.configPath);
209
+ if (facts !== void 0) {
210
+ const diskFit = checkDiskFit({ concurrency: config.concurrency, buildDisk: config.build?.disk ?? DEFAULT_BUILD_DISK, facts });
211
+ if (!diskFit.fits) {
212
+ const advice = probes.inImage === true ? "Set OUTERLAYER_CONCURRENCY in the env file and recreate the container, or give the machine more disk" : `Lower runner.concurrency or runner.build.disk in ${config.configPath}`;
213
+ return { reason: `${diskFit.message}. ${advice}` };
214
+ }
215
+ }
205
216
  }
206
217
  const kvm = kind === "vm" ? probes.kvm() : "usable";
207
218
  if (kvm === "absent") {
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { statfsSync } from 'fs';
4
+ import { dirname } from 'path';
5
+
6
+ createRequire(import.meta.url);
7
+ function freeBytes(path, statfs = statfsSync) {
8
+ let at = path;
9
+ for (; ; ) {
10
+ try {
11
+ const stats = statfs(at);
12
+ return Number(stats.bavail) * Number(stats.bsize);
13
+ } catch (err) {
14
+ if (err.code !== "ENOENT") return void 0;
15
+ const parent = dirname(at);
16
+ if (parent === at) return void 0;
17
+ at = parent;
18
+ }
19
+ }
20
+ }
21
+ var UNITS = ["B", "KB", "MB", "GB", "TB"];
22
+ function formatBytes(bytes) {
23
+ let value = Math.max(0, bytes);
24
+ let unit = 0;
25
+ while (value >= 1024 && unit < UNITS.length - 1) {
26
+ value /= 1024;
27
+ unit++;
28
+ }
29
+ return unit === 0 ? `${Math.round(value)} B` : `${value.toFixed(1)} ${UNITS[unit]}`;
30
+ }
31
+
32
+ export { formatBytes, freeBytes };
@@ -4,12 +4,12 @@ import { sharedSkillNames } from './chunk-FGF52V4V.js';
4
4
  import { GOVERNANCE_VARIABLE, versionAtLeast, MINIMUM_CLAUDE_VERSION, SHIM_SCRIPT, CONTROL_PLANE_DIR_VARIABLE } from './chunk-HCVLP7XA.js';
5
5
  export { MINIMUM_CLAUDE_VERSION } from './chunk-HCVLP7XA.js';
6
6
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
7
- import { setupMachineSkills } from './chunk-Q2D4M3GC.js';
8
- import './chunk-KUTZ6XLS.js';
7
+ import { setupMachineSkills } from './chunk-GFYEMCPP.js';
8
+ import './chunk-G63KT5I5.js';
9
9
  import './chunk-CDDED64E.js';
10
10
  import './chunk-RA3O54FC.js';
11
- import './chunk-OGCG5LOX.js';
12
- import './chunk-AKHGQKNR.js';
11
+ import './chunk-LJG6EMLJ.js';
12
+ import './chunk-E6CO3MJE.js';
13
13
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
14
14
  import './chunk-Z5GEFMRW.js';
15
15
  import { spawnSync, execFileSync, spawn } from 'child_process';
@@ -64,6 +64,16 @@ function removeQuietly(path) {
64
64
  rmSync(path, { recursive: true, force: true });
65
65
  }
66
66
  var REPLACE_ATTEMPTS = 3;
67
+ var REMOVE_ATTEMPTS = 3;
68
+ function removeMovedAside(path) {
69
+ for (let attempt = 0; attempt < REMOVE_ATTEMPTS; attempt += 1) {
70
+ try {
71
+ rmSync(path, { recursive: true });
72
+ return;
73
+ } catch {
74
+ }
75
+ }
76
+ }
67
77
  function ensureOwnSkillsDir(input) {
68
78
  const wanted = wantedLinks(input.repoRoot, new Set(input.shared));
69
79
  if (wanted.size === 0) return void 0;
@@ -101,9 +111,10 @@ function ensureOwnSkillsDir(input) {
101
111
  const old = join(root, `.old-${randomBytes(6).toString("hex")}`);
102
112
  try {
103
113
  renameSync(final, old);
104
- removeQuietly(old);
105
114
  } catch {
115
+ continue;
106
116
  }
117
+ removeMovedAside(old);
107
118
  }
108
119
  }
109
120
  return void 0;
@@ -241,7 +252,7 @@ async function runClaudeLauncher(args, deps = {}) {
241
252
  return 1;
242
253
  }
243
254
  } else {
244
- const { resolveLaunchPlane } = await import('./control-plane-launch-R4X63DYW.js');
255
+ const { resolveLaunchPlane } = await import('./control-plane-launch-K7YD6KEN.js');
245
256
  const plane = env[GOVERNANCE_VARIABLE] === "self" ? { kind: "none" } : await resolveLaunchPlane({ cwd, env, home, fetchImpl: deps.fetchImpl, stderr });
246
257
  if (plane.kind === "none") {
247
258
  const own2 = ownSkillsDirFor(cwd, home, [], stderr);