@outerlayer/cli 0.1.1 → 0.2.0

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 (28) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +14 -20
  3. package/dist/build-info.json +1 -1
  4. package/dist/{chunk-BQB3U2VD.js → chunk-4TNZMO7V.js} +1874 -3191
  5. package/dist/{chunk-RCQXYLMO.js → chunk-65WXAANR.js} +2 -17
  6. package/dist/{chunk-KKEU6FFR.js → chunk-DCNOXRMV.js} +1 -1
  7. package/dist/{chunk-IWIUYLDR.js → chunk-I3ETLSNE.js} +7 -187
  8. package/dist/{chunk-3VQ4XXQA.js → chunk-NXLLURA4.js} +3 -3
  9. package/dist/{chunk-HNCCD2IX.js → chunk-Q6CL5THG.js} +3 -2
  10. package/dist/chunk-U32VSRLO.js +2225 -0
  11. package/dist/chunk-WZBHBH3J.js +20 -0
  12. package/dist/{cli-EFJIG2VT.js → cli-G7DILYJY.js} +48 -130
  13. package/dist/{context-materialize-J6CRQ7O7.js → context-materialize-6WKT3RBQ.js} +1 -1
  14. package/dist/{emit-artifact-cmd-KPPD3YLO.js → emit-artifact-cmd-UQVT3OKW.js} +6 -4
  15. package/dist/{emit-finding-cmd-VR5VEGXJ.js → emit-finding-cmd-FDOU2OPD.js} +6 -4
  16. package/dist/{emit-result-cmd-YOA5BJKL.js → emit-result-cmd-H2T4C2K3.js} +6 -4
  17. package/dist/{hook-fast-I2XTHDE6.js → hook-fast-J5LCDHUJ.js} +2 -2
  18. package/dist/index.js +2 -2
  19. package/dist/{loop-BWE2BS6J.js → loop-ASZRX3CZ.js} +10 -8
  20. package/dist/{status-JHVSZYC5.js → status-I27IST4L.js} +8 -6
  21. package/dist/{sync-cmd-S7Q6DWU3.js → sync-cmd-BBAUZ5JD.js} +6 -4
  22. package/dist/{watch-NRLXJUST.js → watch-3DTPJETH.js} +6 -4
  23. package/dist/{work-claim-cmd-HXB7K27H.js → work-claim-cmd-5AUNCLS2.js} +8 -6
  24. package/dist/{work-cmd-ABP6XDBP.js → work-cmd-2P4BVX47.js} +7 -5
  25. package/dist/{work-launch-YNNCKIH3.js → work-launch-LT663PB3.js} +2 -1
  26. package/dist/{work-pr-cmd-GOYSPEN2.js → work-pr-cmd-AZQPWH4H.js} +6 -4
  27. package/package.json +1 -1
  28. package/dist/emit-commit-credit-cmd-656BRAQ4.js +0 -121
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+
4
+ createRequire(import.meta.url);
5
+
6
+ // src/tracker-number.ts
7
+ var MAX_TRACKER_NUMBER = Number.MAX_SAFE_INTEGER;
8
+ function parseTrackerNumber(raw) {
9
+ if (raw === void 0) return void 0;
10
+ const text = typeof raw === "number" ? String(raw) : raw;
11
+ if (!/^\d+$/.test(text)) return void 0;
12
+ const n = Number(text);
13
+ if (!Number.isSafeInteger(n) || n <= 0) return void 0;
14
+ return n;
15
+ }
16
+ function trackerNumberError(flag, raw) {
17
+ return `invalid ${flag} "${raw}" \u2014 expected a positive integer no larger than ${MAX_TRACKER_NUMBER}`;
18
+ }
19
+
20
+ export { parseTrackerNumber, trackerNumberError };
@@ -3,13 +3,11 @@ import { createRequire } from 'node:module';
3
3
  import { pinExists, readPin, readContextManifest, readDegraded, readSourceCache } from './chunk-A3WLZX2F.js';
4
4
  import './chunk-KFYJV2ZG.js';
5
5
  import { readStatuslineState, STATE_FRESH_MS } from './chunk-NTTPJV35.js';
6
- import { compareVersions, SUPPORTED_VERSIONS, readSessionRepos } from './chunk-BQB3U2VD.js';
6
+ import { compareVersions, SUPPORTED_VERSIONS } from './chunk-4TNZMO7V.js';
7
7
  import { C, NO_COLOR_FLAG, warnDeprecated, stripNoColor, API_KEY_FLAG_DEPRECATION } from './chunk-YRYMNBGQ.js';
8
- import { parseTrackerNumber, trackerNumberError } from './chunk-RCQXYLMO.js';
9
- import './chunk-ZJSNLVCE.js';
10
- import { hookFiredMarkerPath, installedCliDistDir, sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, refreshCommand } from './chunk-3VQ4XXQA.js';
11
- import { managedHookScripts, installPostRewriteHook, installPreCommitGuardHook, removePostRewriteHook, removePreCommitGuardHook, deadHooksState, preparePackageManagerCommand, contextExcludesPresent, postRewriteHookPresence } from './chunk-IWIUYLDR.js';
12
- import './chunk-YOOSBOKS.js';
8
+ import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
9
+ import { hookFiredMarkerPath, installedCliDistDir, sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, refreshCommand } from './chunk-NXLLURA4.js';
10
+ import { managedHookScripts, removeJournalHooks, installPreCommitGuardHook, removePreCommitGuardHook, deadHooksState, preparePackageManagerCommand, contextExcludesPresent } from './chunk-I3ETLSNE.js';
13
11
  import { SettingsParseError, settingsPath, readSettings, listHookCandidates, wrapHooks, writeSettings, unwrapHooks, REGISTERED_EVENTS, removeHooks, removeStatusline, cliBinResolvable, mergeHooks, repointWrappedHooks, AUTO_WRAP_EVENTS, mergeStatusline, isOurStatuslineSlot, statuslineWrappedOriginal, isOurHookCommand, ourCommandBins, wrappedOriginalCommand } from './chunk-R5KBGVII.js';
14
12
  import { readCloudConfig } from './chunk-TFUIDMOB.js';
15
13
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -3527,7 +3525,7 @@ function runInit(opts) {
3527
3525
  const statuslineRemoved = removeStatusline(hooksUnwrapped.next, opts.cliBin);
3528
3526
  const changed2 = hooksRemoved.changed || hooksUnwrapped.changed || statuslineRemoved.changed;
3529
3527
  const backupPath2 = changed2 ? writeSettings(path2, statuslineRemoved.next) : void 0;
3530
- const gitHookRemoval = removePostRewriteHook(opts.cwd ?? process.cwd());
3528
+ const gitHookRemoval2 = removeJournalHooks(opts.cwd ?? process.cwd());
3531
3529
  const guardHookRemoval = removePreCommitGuardHook(opts.cwd ?? process.cwd());
3532
3530
  recordRemoval(manifestHome, path2);
3533
3531
  const remaining = readManifest(manifestHome);
@@ -3545,7 +3543,7 @@ function runInit(opts) {
3545
3543
  backupPath: backupPath2,
3546
3544
  events: REGISTERED_EVENTS,
3547
3545
  removed: true,
3548
- gitHookRemoved: gitHookRemoval.removed,
3546
+ gitHookRemoved: gitHookRemoval2.removed,
3549
3547
  guardHookRemoved: guardHookRemoval.removed,
3550
3548
  wrapped: [],
3551
3549
  unwrappedCount: hooksUnwrapped.unwrapped,
@@ -3585,9 +3583,7 @@ function runInit(opts) {
3585
3583
  if (statusline && statusline !== "skipped") {
3586
3584
  recordStatusline(manifestHome, path2, statuslineWrappedCommand !== void 0 ? "wrapped" : "installed", statuslineWrappedCommand);
3587
3585
  }
3588
- const gitHook = installPostRewriteHook(opts.cwd ?? process.cwd(), {
3589
- stampTrailers: readCloudConfig().gitHooks?.stampTrailers !== false
3590
- });
3586
+ const gitHookRemoval = removeJournalHooks(opts.cwd ?? process.cwd());
3591
3587
  const guardHook = installPreCommitGuardHook(opts.cwd ?? process.cwd());
3592
3588
  let gitignoreUpdated = false;
3593
3589
  if (scope === "project" && opts.addGitignore) {
@@ -3599,7 +3595,7 @@ function runInit(opts) {
3599
3595
  backupPath,
3600
3596
  events: REGISTERED_EVENTS,
3601
3597
  gitignoreUpdated,
3602
- gitHook,
3598
+ ...gitHookRemoval.removed ? { gitHookRemoved: true } : {},
3603
3599
  guardHook,
3604
3600
  wrapped,
3605
3601
  ...statusline ? { statusline } : {},
@@ -3846,48 +3842,8 @@ function checkHooks(home, cwd, transcripts, now) {
3846
3842
  if (firing) checks.push(firing);
3847
3843
  const wrapped = checkWrappedHooks(home, cwd);
3848
3844
  if (wrapped) checks.push(wrapped);
3849
- const journal = checkJournalHookCoverage(home);
3850
- if (journal) checks.push(journal);
3851
3845
  return checks;
3852
3846
  }
3853
- function checkJournalHookCoverage(home) {
3854
- const name = "Rewrite journal hooks";
3855
- const repos = readSessionRepos(home).filter((r) => existsSync(r.repoRoot));
3856
- if (repos.length === 0) return null;
3857
- let ours = 0;
3858
- let managed = 0;
3859
- let foreign = 0;
3860
- const absentRepos = [];
3861
- for (const r of repos) {
3862
- switch (postRewriteHookPresence(r.repoRoot)) {
3863
- case "ours":
3864
- ours += 1;
3865
- break;
3866
- case "custom-hooks-path":
3867
- managed += 1;
3868
- break;
3869
- case "foreign":
3870
- foreign += 1;
3871
- break;
3872
- case "absent":
3873
- absentRepos.push(r.gitRepo || r.repoRoot);
3874
- break;
3875
- }
3876
- }
3877
- const parts = [`${ours}/${repos.length} synced repos covered`];
3878
- if (managed > 0) parts.push(`${managed} hook-managed (README has the snippet)`);
3879
- if (foreign > 0) parts.push(`${foreign} foreign hook`);
3880
- if (absentRepos.length > 0) {
3881
- const sample = absentRepos.slice(0, 3).join(", ") + (absentRepos.length > 3 ? ", \u2026" : "");
3882
- return {
3883
- name,
3884
- status: "warn",
3885
- detail: `${parts.join(", ")} \u2014 ${absentRepos.length} without rewrite journaling: ${sample}`,
3886
- fix: 'Run `outerlayer hooks install-git` in each repo, or set {"gitHooks":{"autoInstall":true}} in ~/.outerlayer/config.json.'
3887
- };
3888
- }
3889
- return { name, status: "pass", detail: parts.join(", ") };
3890
- }
3891
3847
  function checkHooksInstalled(home, cwd, firingFresh) {
3892
3848
  const name = "Hooks installed";
3893
3849
  const readablePaths = [];
@@ -4402,9 +4358,15 @@ function formatGuardInstallOutput(guard) {
4402
4358
  if (guard.adopted) {
4403
4359
  return { lines: [`${C.green}\u2713${C.reset} materialized-context commit guard hand-adopted at ${guard.path} (core.hooksPath) \u2014 left untouched.`] };
4404
4360
  }
4405
- return { lines: [] };
4361
+ return {
4362
+ lines: [
4363
+ `${C.yellow}!${C.reset} this repo manages hooks in its working tree (core.hooksPath) \u2014 nothing written.`,
4364
+ ` Add the script to your hook manager instead: ${C.yellow}outerlayer hooks install-git --print${C.reset}`
4365
+ ],
4366
+ exitCode: 1
4367
+ };
4406
4368
  case "not-a-repo":
4407
- return { lines: [] };
4369
+ return { lines: [], error: "not inside a git repository." };
4408
4370
  }
4409
4371
  }
4410
4372
  function invokedCommandToken(argv) {
@@ -4510,7 +4472,7 @@ ${fails === 0 ? `${C.green}\u2713${C.reset}` : `${C.red}\u2717${C.reset}`} ${pas
4510
4472
  "\nIncremental: only sessions newer than the last checkpoint ship. The tier\nis applied on this machine before anything leaves it; `--dry-run` prints\nexactly what would. The hook-triggered background sync runs `--quiet`.\nExit 2 means the server rejected at least one session.\n"
4511
4473
  ).action(async (opts) => {
4512
4474
  warnIfApiKeyFlag(opts);
4513
- const { runSync, SyncConfigError, SyncTransportError } = await import('./sync-cmd-S7Q6DWU3.js');
4475
+ const { runSync, SyncConfigError, SyncTransportError } = await import('./sync-cmd-BBAUZ5JD.js');
4514
4476
  try {
4515
4477
  const result = await runSync({
4516
4478
  url: opts.url,
@@ -4539,7 +4501,7 @@ ${fails === 0 ? `${C.green}\u2713${C.reset}` : `${C.red}\u2717${C.reset}`} ${pas
4539
4501
  if (invokedCommandToken(argv) === "watch") {
4540
4502
  warnDeprecated("`outerlayer watch` is now `outerlayer daemon`; the old name will be removed in a future release.");
4541
4503
  }
4542
- const { runWatch } = await import('./watch-NRLXJUST.js');
4504
+ const { runWatch } = await import('./watch-3DTPJETH.js');
4543
4505
  await runWatch({ once: opts.once });
4544
4506
  });
4545
4507
  program2.command("hook <event>", { hidden: true }).description("capture-hook fast path, installed by `init`").action(() => {
@@ -4578,7 +4540,7 @@ async function compileContext(opts) {
4578
4540
  function registerEmitCommands(program2) {
4579
4541
  const emitCmd = program2.command("emit").enablePositionalOptions().description("Record evidence for a work item: a named check result").argument("[name]", "the check name a validator declares (e.g. smoke.pass)").option("--link <url>", "proof link, usually the CI run URL").option("--body <text>", "one sentence recording your judgment").option("--body-file <path>", "read the sentence from a file; - reads standard input").option("--result <pass|fail>", "check outcome (default: pass)").option("--item <number>", "work item to record on directly, by its number in this factory").option("--artifact <id>", "artifact this verdict is on \u2014 only with the artifact-review check name").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "app id the key is bound to (or OUTERLAYER_APP_ID / config)").addOption(new Option("--check", "deprecated: use `context emit --check`").hideHelp()).addOption(new Option("--dir <path>", "deprecated: use `context emit --dir`").hideHelp()).addHelpText(
4580
4542
  "after",
4581
- '\n outerlayer emit smoke.pass --item 412 --link https://ci.example.com/run/42\n outerlayer emit code-review --result fail --item 412 --body "The button should be red."\n outerlayer emit artifact-review --result fail --artifact a1b2c3d4 --body "Wrong state."\n\nRecords that a named check passed or failed, anchored to a work item.\n--item is always required, in or out of a recorded session \u2014 there is no\nsession fallback. A check that ran carries the run URL as proof (--link);\na judgment you are making yourself carries one sentence (--body, or\n--body-file to read it from a file or standard input). A fail needs at\nleast one of the two. Run from inside a session, --item can only name a\nwork item that session was NOT launched for \u2014 a session cannot record a\ncheck on its own item. With nothing to attach it to, the command refuses.\n\nWho recorded a check is decided by your API key, never by what you send:\na key bound to your membership records it as yours, and nothing automated\ncan then clear it.\n\nThe check name `artifact-review` is a different act: a person\'s own pass\nor fail on one artifact, named with --artifact instead of --item, refused\nfrom inside a recorded session \u2014 an artifact verdict is a person\'s act.\n--link is refused in this mode; a fail needs --body / --body-file.\n\nSubcommands: `emit artifact <file>` for screenshots, recordings, reports and\nlogs; `emit commit-credit` to attest a commit belongs to a pull request;\n`emit finding` / `emit findings <file>` to record what was found wrong about\nthe change or about a rule.\nCompiling .outerlayer/ moved to `outerlayer context emit`.\n'
4543
+ '\n outerlayer emit smoke.pass --item 412 --link https://ci.example.com/run/42\n outerlayer emit code-review --result fail --item 412 --body "The button should be red."\n outerlayer emit artifact-review --result fail --artifact a1b2c3d4 --body "Wrong state."\n\nRecords that a named check passed or failed, anchored to a work item.\n--item is always required, in or out of a recorded session \u2014 there is no\nsession fallback. A check that ran carries the run URL as proof (--link);\na judgment you are making yourself carries one sentence (--body, or\n--body-file to read it from a file or standard input). A fail needs at\nleast one of the two. Run from inside a session, --item can only name a\nwork item that session was NOT launched for \u2014 a session cannot record a\ncheck on its own item. With nothing to attach it to, the command refuses.\n\nWho recorded a check is decided by your API key, never by what you send:\na key bound to your membership records it as yours, and nothing automated\ncan then clear it.\n\nThe check name `artifact-review` is a different act: a person\'s own pass\nor fail on one artifact, named with --artifact instead of --item, refused\nfrom inside a recorded session \u2014 an artifact verdict is a person\'s act.\n--link is refused in this mode; a fail needs --body / --body-file.\n\nSubcommands: `emit artifact <file>` for screenshots, recordings, reports and\nlogs; `emit finding` / `emit findings <file>` to record what was found wrong\nabout the change or about a rule.\nCompiling .outerlayer/ moved to `outerlayer context emit`.\n'
4582
4544
  ).action(async (name, opts) => {
4583
4545
  if (name === void 0) {
4584
4546
  warnDeprecated("`outerlayer emit` with no name now lives at `outerlayer context emit`; the bare form will be removed in a future release.");
@@ -4586,7 +4548,7 @@ function registerEmitCommands(program2) {
4586
4548
  return;
4587
4549
  }
4588
4550
  warnIfApiKeyFlag(opts);
4589
- const { runEmitResult, EmitResultError } = await import('./emit-result-cmd-YOA5BJKL.js');
4551
+ const { runEmitResult, EmitResultError } = await import('./emit-result-cmd-H2T4C2K3.js');
4590
4552
  try {
4591
4553
  const result = await runEmitResult({
4592
4554
  name,
@@ -4615,7 +4577,7 @@ function registerEmitCommands(program2) {
4615
4577
  '\n outerlayer emit artifact shot.png --caption "the dot row, current dot marked" --for LOGIN-01\n\nInside a recorded Claude Code session the artifact spools locally and ships,\nbound to that session, on the next `outerlayer sync` \u2014 but only if that\nsession was launched with OUTERLAYER_WORK; without it nothing the session\nproduces may leave the machine, and the command refuses rather than queue an\nartifact that can never ship. Otherwise it uploads immediately, anchored to a\npull request (--pr, or CI\'s PR context) or to the current git checkout. With\nnothing to attach it to, the command refuses.\n\n--replaces: an already-uploaded target is marked superseded and hidden\neverywhere, bytes and deep link untouched; a still-queued one is cancelled\nlocally so it never uploads. One correction can retire several duplicates.\n'
4616
4578
  ).action(async (file, opts) => {
4617
4579
  warnIfApiKeyFlag(opts);
4618
- const { runEmitArtifact, EmitArtifactError } = await import('./emit-artifact-cmd-KPPD3YLO.js');
4580
+ const { runEmitArtifact, EmitArtifactError } = await import('./emit-artifact-cmd-UQVT3OKW.js');
4619
4581
  let pr;
4620
4582
  if (opts.pr !== void 0) {
4621
4583
  pr = parseTrackerNumber(opts.pr);
@@ -4649,7 +4611,7 @@ function registerEmitCommands(program2) {
4649
4611
  '\n outerlayer emit finding --id r1-f1 --subject change --title "Off-by-one" \\\n --file src/loop.ts --line 42 --severity major --kind behavior \\\n --verdict confirmed --source reviewer --where "review pass 1"\n\nRecords one finding \u2014 what an agent noticed was wrong about the change, or\nabout a rule it ran on. Validated against the same contract the gateway\nchecks before anything is sent; a subject of context needs --rule-path,\n--rule-quote and --rule-relation together \u2014 all three are required, not\njust --rule-path.\n--item names the work item; without it, inside a recorded session, the\nitem that session was launched for is used automatically \u2014 a session may\nrecord findings on its own item, unlike `outerlayer emit <name>`.\n'
4650
4612
  ).action(async (opts) => {
4651
4613
  warnIfApiKeyFlag(opts);
4652
- const { runEmitFinding, EmitFindingError } = await import('./emit-finding-cmd-VR5VEGXJ.js');
4614
+ const { runEmitFinding, EmitFindingError } = await import('./emit-finding-cmd-FDOU2OPD.js');
4653
4615
  try {
4654
4616
  const result = await runEmitFinding({
4655
4617
  id: opts.id,
@@ -4692,7 +4654,7 @@ function registerEmitCommands(program2) {
4692
4654
  "\n outerlayer emit findings review.json --item 412\n\nRecords a whole batch at once \u2014 a FindingBatch JSON file (schemaVersion,\noptional headSha / contextSourceSha, and 1-500 findings), validated against\nthe same contract `emit finding` uses before anything is sent. Re-emitting\nan id already on the item replaces that row rather than adding a second one.\n--item names the work item; without it, inside a recorded session, the item\nthat session was launched for is used automatically.\n"
4693
4655
  ).action(async (file, opts) => {
4694
4656
  warnIfApiKeyFlag(opts);
4695
- const { runEmitFindings, EmitFindingError } = await import('./emit-finding-cmd-VR5VEGXJ.js');
4657
+ const { runEmitFindings, EmitFindingError } = await import('./emit-finding-cmd-FDOU2OPD.js');
4696
4658
  try {
4697
4659
  const result = await runEmitFindings({
4698
4660
  file,
@@ -4711,29 +4673,6 @@ function registerEmitCommands(program2) {
4711
4673
  throw err;
4712
4674
  }
4713
4675
  });
4714
- emitCmd.command("commit-credit").description("Attest that a commit belongs to a pull request").requiredOption("--sha <sha>", "full 40-character hex commit SHA").requiredOption("--pr <number>", "pull request number to anchor to").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "app id the key is bound to (or OUTERLAYER_APP_ID / config)").addHelpText(
4715
- "after",
4716
- '\nThe escape hatch for a checkout, and reflog, that no longer exists. Records\none explicit human attestation, uploaded immediately \u2014 no session detection,\nno spool. The attesting identity is the dashboard member the control plane\nresolves from the API key; it renders as "attested by <name>" in the PR\nevidence comment, distinct from recorded or recovered credit. Refused, with\nnothing stored, for a malformed SHA, an unknown PR, or a machine key with no\nmember to attest as.\n'
4717
- ).action(async (opts) => {
4718
- warnIfApiKeyFlag(opts);
4719
- const { runEmitCommitCredit, EmitCommitCreditError } = await import('./emit-commit-credit-cmd-656BRAQ4.js');
4720
- try {
4721
- await runEmitCommitCredit({
4722
- sha: opts.sha,
4723
- pr: opts.pr,
4724
- json: opts.json,
4725
- url: opts.url,
4726
- apiKey: opts.apiKey,
4727
- appId: opts.appId
4728
- });
4729
- } catch (err) {
4730
- if (err instanceof EmitCommitCreditError) {
4731
- fail(err.message);
4732
- return;
4733
- }
4734
- throw err;
4735
- }
4736
- });
4737
4676
  }
4738
4677
  function registerWorkCommands(program2) {
4739
4678
  const workCmd = program2.command("work").description("Add, remove, or read what the factory is working on (the Floor)");
@@ -4742,7 +4681,7 @@ function registerWorkCommands(program2) {
4742
4681
  "\n outerlayer work add --issue 42\n\nRecords that a named source \u2014 a recorded session, a CI run, or the API\nkey's bound member \u2014 is working on an issue or pull request. This is\nthe only way an item becomes visible on the Floor. A second add of the\nsame subject by the same source is a no-op.\n"
4743
4682
  ).action(async (opts) => {
4744
4683
  warnIfApiKeyFlag(opts);
4745
- const { runWorkAdd, WorkCommandError } = await import('./work-cmd-ABP6XDBP.js');
4684
+ const { runWorkAdd, WorkCommandError } = await import('./work-cmd-2P4BVX47.js');
4746
4685
  try {
4747
4686
  await runWorkAdd(opts);
4748
4687
  } catch (err) {
@@ -4758,7 +4697,7 @@ function registerWorkCommands(program2) {
4758
4697
  "\n outerlayer work link-session 42\n\nNames an item that already exists on the calling session \u2014 it never\ncreates one. Create an item first with `outerlayer work add`. Linking\nthe same session to the same item twice is a no-op.\n"
4759
4698
  ).action(async (number, opts) => {
4760
4699
  warnIfApiKeyFlag(opts);
4761
- const { runWorkLinkSession, WorkCommandError } = await import('./work-cmd-ABP6XDBP.js');
4700
+ const { runWorkLinkSession, WorkCommandError } = await import('./work-cmd-2P4BVX47.js');
4762
4701
  try {
4763
4702
  await runWorkLinkSession({ ...opts, number });
4764
4703
  } catch (err) {
@@ -4780,7 +4719,7 @@ live addition remains on it.
4780
4719
  `
4781
4720
  ).action(async (opts) => {
4782
4721
  warnIfApiKeyFlag(opts);
4783
- const { runWorkRemove, WorkCommandError } = await import('./work-cmd-ABP6XDBP.js');
4722
+ const { runWorkRemove, WorkCommandError } = await import('./work-cmd-2P4BVX47.js');
4784
4723
  try {
4785
4724
  await runWorkRemove(opts);
4786
4725
  } catch (err) {
@@ -4793,7 +4732,7 @@ live addition remains on it.
4793
4732
  });
4794
4733
  workCmd.command("status").description("Show one item's stage, gate ledger, and additions").option("--item <number>", "the item's number inside this factory").option("--issue <number>", "issue number").option("--repo <owner/name>", "repository (default: the current checkout's remote)").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "app id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
4795
4734
  warnIfApiKeyFlag(opts);
4796
- const { runWorkStatus, WorkCommandError } = await import('./work-cmd-ABP6XDBP.js');
4735
+ const { runWorkStatus, WorkCommandError } = await import('./work-cmd-2P4BVX47.js');
4797
4736
  try {
4798
4737
  await runWorkStatus(opts);
4799
4738
  } catch (err) {
@@ -4806,7 +4745,7 @@ live addition remains on it.
4806
4745
  });
4807
4746
  workCmd.command("list").description("List live work items for this factory").option("--stage <spec|build|review>", "filter by stage").option("--section <attention|waiting|flowing>", "filter by Queue section").option("--repo <owner/name>", "repository (default: the current checkout's remote)").option("--unclaimed", "only items with no live claim").option("--startable", "only items with no live claim, linked session, or linked pull request").option("--needs <amend>", "only items an open artifact fail is waiting on").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "app id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
4808
4747
  warnIfApiKeyFlag(opts);
4809
- const { runWorkList, WorkCommandError } = await import('./work-cmd-ABP6XDBP.js');
4748
+ const { runWorkList, WorkCommandError } = await import('./work-cmd-2P4BVX47.js');
4810
4749
  try {
4811
4750
  await runWorkList(opts);
4812
4751
  } catch (err) {
@@ -4822,7 +4761,7 @@ live addition remains on it.
4822
4761
  "\n outerlayer work claim --item 42 --kind implement\n\nRecords a lease for this host. A live lease already held by a\ndifferent host is refused; claiming again under the same host extends\nit.\n"
4823
4762
  ).action(async (opts) => {
4824
4763
  warnIfApiKeyFlag(opts);
4825
- const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-HXB7K27H.js');
4764
+ const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-5AUNCLS2.js');
4826
4765
  try {
4827
4766
  await runWorkClaim(opts);
4828
4767
  } catch (err) {
@@ -4838,7 +4777,7 @@ live addition remains on it.
4838
4777
  "\n outerlayer work renew --item 42\n\nExtends this host's own live lease. Refused with a 410 if the lease\nhas expired, or a 403 if a different host holds it.\n"
4839
4778
  ).action(async (opts) => {
4840
4779
  warnIfApiKeyFlag(opts);
4841
- const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-HXB7K27H.js');
4780
+ const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-5AUNCLS2.js');
4842
4781
  try {
4843
4782
  await runWorkRenew(opts);
4844
4783
  } catch (err) {
@@ -4857,7 +4796,7 @@ live addition remains on it.
4857
4796
  "\n outerlayer work release --item 42 --outcome ok\n\nMarks this host's lease released, optionally with an outcome.\nReleasing an already-released lease is a no-op that returns the\nrecorded release time and outcome.\n"
4858
4797
  ).action(async (opts) => {
4859
4798
  warnIfApiKeyFlag(opts);
4860
- const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-HXB7K27H.js');
4799
+ const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-5AUNCLS2.js');
4861
4800
  try {
4862
4801
  await runWorkRelease(opts);
4863
4802
  } catch (err) {
@@ -4873,7 +4812,7 @@ live addition remains on it.
4873
4812
  "\n outerlayer work pr 481\n\nRun inside a session already on a work item. Records that pull\nrequest 481 in the checkout's repository belongs to that item \u2014 the\nsame fact a `pr-link` in the session's own transcript records on\nsync. Idempotent: declaring the same pull request twice is a no-op.\n"
4874
4813
  ).action(async (number, opts) => {
4875
4814
  warnIfApiKeyFlag(opts);
4876
- const { runWorkPr, WorkPrCommandError } = await import('./work-pr-cmd-GOYSPEN2.js');
4815
+ const { runWorkPr, WorkPrCommandError } = await import('./work-pr-cmd-AZQPWH4H.js');
4877
4816
  try {
4878
4817
  await runWorkPr({ ...opts, number });
4879
4818
  } catch (err) {
@@ -4890,7 +4829,7 @@ function registerRunnerCommands(program2) {
4890
4829
  const configOption = "the cloud config file to run against (default: ~/.outerlayer/config.json)";
4891
4830
  runnerCmd.command("start").description("Run the loop: claim work, run it, report, clean up, repeat").option("--config <path>", configOption).action(async (opts) => {
4892
4831
  const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-POF7DEQW.js');
4893
- const { start, RunnerStartError } = await import('./loop-BWE2BS6J.js');
4832
+ const { start, RunnerStartError } = await import('./loop-ASZRX3CZ.js');
4894
4833
  const { RunnerAlreadyRunningError } = await import('./pidfile-PTW76F56.js');
4895
4834
  const configPath = opts.config ?? defaultRunnerConfigPath();
4896
4835
  try {
@@ -4905,7 +4844,7 @@ function registerRunnerCommands(program2) {
4905
4844
  });
4906
4845
  runnerCmd.command("check").description("Validate the config, the hooks and the key, and print the effective settings").option("--config <path>", configOption).action(async (opts) => {
4907
4846
  const { defaultRunnerConfigPath, loadRunnerConfig, checkHooks: checkHooks2, RunnerConfigError } = await import('./config-POF7DEQW.js');
4908
- const { probeCredentials } = await import('./loop-BWE2BS6J.js');
4847
+ const { probeCredentials } = await import('./loop-ASZRX3CZ.js');
4909
4848
  const configPath = opts.config ?? defaultRunnerConfigPath();
4910
4849
  let config;
4911
4850
  try {
@@ -4978,15 +4917,15 @@ Next:
4978
4917
  });
4979
4918
  runnerCmd.command("stop").description("Take no more work; wait for running jobs to finish, then exit").option("--config <path>", "the cloud config file naming the runner to stop").option("--now", "end running jobs immediately, with outcome stopped").action(async (opts) => {
4980
4919
  const { defaultRunnerConfigPath } = await import('./config-POF7DEQW.js');
4981
- const { requestStop } = await import('./loop-BWE2BS6J.js');
4920
+ const { requestStop } = await import('./loop-ASZRX3CZ.js');
4982
4921
  const configPath = opts.config ?? defaultRunnerConfigPath();
4983
4922
  await requestStop(configPath, Boolean(opts.now));
4984
4923
  });
4985
4924
  runnerCmd.command("status").description("List running jobs; with --recent, finished ones too").option("--config <path>", "the cloud config file naming the runner to inspect").option("--recent", "also list finished jobs, newest first, capped at 20").option("--json", "machine-readable JSON output").action(async (opts) => {
4986
4925
  const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-POF7DEQW.js');
4987
4926
  const { jobsDir } = await import('./paths-D2VGWWFI.js');
4988
- const { listJobFiles, runnerProcessState } = await import('./loop-BWE2BS6J.js');
4989
- const { renderStatus } = await import('./status-JHVSZYC5.js');
4927
+ const { listJobFiles, runnerProcessState } = await import('./loop-ASZRX3CZ.js');
4928
+ const { renderStatus } = await import('./status-I27IST4L.js');
4990
4929
  const path2 = await import('path');
4991
4930
  const configPath = opts.config ?? defaultRunnerConfigPath();
4992
4931
  const all = listJobFiles(configPath);
@@ -5024,7 +4963,7 @@ Next:
5024
4963
  });
5025
4964
  runnerCmd.command("logs").argument("<item>", "the work item's number in the factory").description("Print the newest attempt's log for one item").option("--config <path>", "the cloud config file naming the runner to inspect").option("-f, --follow", "keep printing as the log grows").action(async (itemArg, opts) => {
5026
4965
  const { defaultRunnerConfigPath } = await import('./config-POF7DEQW.js');
5027
- const { listJobFiles } = await import('./loop-BWE2BS6J.js');
4966
+ const { listJobFiles } = await import('./loop-ASZRX3CZ.js');
5028
4967
  const { newestAttempt, logPathFor, tail, RunnerLogsError } = await import('./logs-TRNPQM42.js');
5029
4968
  const configPath = opts.config ?? defaultRunnerConfigPath();
5030
4969
  const item = parseTrackerNumber(itemArg);
@@ -5059,9 +4998,9 @@ function registerHooksCommands(program2) {
5059
4998
  "after",
5060
4999
  "\n`init` auto-wraps PreToolUse/PostToolUse hooks; these subcommands cover the\nrest: manual re-scans, other events, and undo.\n"
5061
5000
  );
5062
- hooksCmd.command("install-git").description("Install the rewrite-journal and commit-guard git hooks in this repo").option("--print", "print the hook scripts instead of installing").addHelpText(
5001
+ hooksCmd.command("install-git").description("Install the commit-guard git hook in this repo").option("--print", "print the hook scripts instead of installing").addHelpText(
5063
5002
  "after",
5064
- "\nThe same install `init` performs. `--print` writes the scripts to stdout for\nrepositories that manage hooks in-tree (husky and friends).\n"
5003
+ "\nThe same install `init` performs. `--print` writes the script to stdout for\nrepositories that manage hooks in-tree (husky and friends).\n"
5065
5004
  ).action((opts) => {
5066
5005
  if (opts.print) {
5067
5006
  for (const [name, script] of managedHookScripts()) {
@@ -5071,38 +5010,17 @@ ${script}
5071
5010
  }
5072
5011
  return;
5073
5012
  }
5074
- const { status, path: path2 } = installPostRewriteHook(process.cwd(), {
5075
- stampTrailers: readCloudConfig().gitHooks?.stampTrailers !== false
5076
- });
5077
- switch (status) {
5078
- case "installed":
5079
- case "updated":
5080
- case "unchanged":
5081
- process.stdout.write(`${C.green}\u2713${C.reset} post-rewrite journal hook ${status} \u2192 ${path2}
5013
+ const removal = removeJournalHooks(process.cwd());
5014
+ if (removal.removed) {
5015
+ process.stdout.write(`${C.green}\u2713${C.reset} removed the commit journal hooks an earlier version installed \u2192 ${removal.path}
5082
5016
  `);
5083
- break;
5084
- case "skipped-foreign":
5085
- process.stdout.write(
5086
- `${C.yellow}!${C.reset} a post-rewrite hook we did not write already exists (${path2}) \u2014 left untouched.
5087
- Append the journal script yourself: ${C.yellow}outerlayer hooks install-git --print${C.reset}
5088
- `
5089
- );
5090
- process.exitCode = 1;
5091
- break;
5092
- case "skipped-custom-hooks-path":
5093
- process.stdout.write(
5094
- `${C.yellow}!${C.reset} this repo manages hooks in its working tree (core.hooksPath) \u2014 nothing written.
5095
- Add the script to your hook manager instead: ${C.yellow}outerlayer hooks install-git --print${C.reset}
5096
- `
5097
- );
5098
- process.exitCode = 1;
5099
- break;
5100
- case "not-a-repo":
5101
- fail("not inside a git repository.");
5102
- break;
5103
5017
  }
5104
5018
  const guard = installPreCommitGuardHook(process.cwd());
5105
5019
  const report = formatGuardInstallOutput(guard);
5020
+ if (report.error !== void 0) {
5021
+ fail(report.error);
5022
+ return;
5023
+ }
5106
5024
  for (const line of report.lines) process.stdout.write(`${line}
5107
5025
  `);
5108
5026
  if (report.exitCode !== void 0) process.exitCode = report.exitCode;
@@ -5364,7 +5282,7 @@ function registerContextCommands(program2) {
5364
5282
  "after",
5365
5283
  "\nThe same flow SessionStart runs automatically, exposed for a manual retry or a\nfirst check outside a session. Writes AGENTS.md, .claude/**, and .outerlayer/**.\n"
5366
5284
  ).action(async (opts) => {
5367
- const { materializeContext } = await import('./context-materialize-J6CRQ7O7.js');
5285
+ const { materializeContext } = await import('./context-materialize-6WKT3RBQ.js');
5368
5286
  const result = await materializeContext({ cwd: process.cwd(), sessionId: `manual-${Date.now()}` });
5369
5287
  const output = formatContextMaterializeOutput(result);
5370
5288
  if (output.exitCode !== void 0) process.exitCode = output.exitCode;
@@ -3,7 +3,7 @@ import { createRequire } from 'node:module';
3
3
  import { readPin, pinExists, writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, SOURCE_CACHE_TTL_SUCCESS_MS, readContextManifest, isLastCheckFresh, manifestFilesPresent, readDegraded, touchLastCheck, clearDegraded, writeContextManifest, writePinIfChanged, readSourceCache, isSourceCacheFresh } from './chunk-A3WLZX2F.js';
4
4
  import { parseGoverns, normalizeRepoName, CONTEXT_SOURCE_CONFIG_PATH } from './chunk-KFYJV2ZG.js';
5
5
  import { appendContextProvenance } from './chunk-ZJSNLVCE.js';
6
- import { ensureContextExcludes, ensurePreCommitGuardHook } from './chunk-IWIUYLDR.js';
6
+ import { ensureContextExcludes, ensurePreCommitGuardHook } from './chunk-I3ETLSNE.js';
7
7
  import { readCloudConfig } from './chunk-TFUIDMOB.js';
8
8
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
9
9
  import './chunk-Z5GEFMRW.js';
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { staleBuildRefusal, staleBuildWarning, ARTIFACT_MAX_CAPTION_LENGTH, ArtifactCriterionIdSchema, ARTIFACT_MAX_FILENAME_LENGTH, readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, mediaTypeForArtifactPath, inferArtifactKind, resolveRepoIdentity, detectActiveSession, launchRefusalForSession, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, detectCi, appendArtifactTombstone, ARTIFACT_MAX_REPLACES_TARGETS } from './chunk-BQB3U2VD.js';
3
+ import { staleBuildRefusal, staleBuildWarning, readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, detectActiveSession, launchRefusalForSession, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, detectCi, appendArtifactTombstone } from './chunk-U32VSRLO.js';
4
+ import { ARTIFACT_MAX_CAPTION_LENGTH, ArtifactCriterionIdSchema, ARTIFACT_MAX_FILENAME_LENGTH, mediaTypeForArtifactPath, inferArtifactKind, resolveRepoIdentity, ARTIFACT_MAX_REPLACES_TARGETS } from './chunk-4TNZMO7V.js';
4
5
  import './chunk-YRYMNBGQ.js';
5
- import { parseTrackerNumber, trackerNumberError } from './chunk-RCQXYLMO.js';
6
+ import './chunk-65WXAANR.js';
7
+ import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
6
8
  import './chunk-ZJSNLVCE.js';
7
- import './chunk-3VQ4XXQA.js';
8
- import './chunk-IWIUYLDR.js';
9
+ import './chunk-NXLLURA4.js';
10
+ import './chunk-I3ETLSNE.js';
9
11
  import './chunk-YOOSBOKS.js';
10
12
  import './chunk-R5KBGVII.js';
11
13
  import { readCloudConfig } from './chunk-TFUIDMOB.js';
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { FindingBatchSchema, resolveRepoIdentity, detectActiveSession, launchRefusalForSession } from './chunk-BQB3U2VD.js';
3
+ import { detectActiveSession, launchRefusalForSession } from './chunk-U32VSRLO.js';
4
+ import { FindingBatchSchema, resolveRepoIdentity } from './chunk-4TNZMO7V.js';
4
5
  import './chunk-YRYMNBGQ.js';
5
- import { launchedItemForSession, parseTrackerNumber, trackerNumberError } from './chunk-RCQXYLMO.js';
6
+ import { launchedItemForSession } from './chunk-65WXAANR.js';
7
+ import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
6
8
  import { readLatestProvenanceForSession } from './chunk-ZJSNLVCE.js';
7
- import './chunk-3VQ4XXQA.js';
8
- import './chunk-IWIUYLDR.js';
9
+ import './chunk-NXLLURA4.js';
10
+ import './chunk-I3ETLSNE.js';
9
11
  import './chunk-YOOSBOKS.js';
10
12
  import './chunk-R5KBGVII.js';
11
13
  import { readCloudConfig } from './chunk-TFUIDMOB.js';
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { EmittedNameSchema, ARTIFACT_REVIEW_CHECK_NAME, EMITTED_RESULT_MAX_LINK_LENGTH, EMITTED_RESULTS, EMITTED_RESULT_MAX_BODY_LENGTH, resolveRepoIdentity, detectActiveSession, launchRefusalForSession, detectCi } from './chunk-BQB3U2VD.js';
3
+ import { detectActiveSession, launchRefusalForSession, detectCi } from './chunk-U32VSRLO.js';
4
+ import { EmittedNameSchema, ARTIFACT_REVIEW_CHECK_NAME, EMITTED_RESULT_MAX_LINK_LENGTH, EMITTED_RESULTS, EMITTED_RESULT_MAX_BODY_LENGTH, resolveRepoIdentity } from './chunk-4TNZMO7V.js';
4
5
  import './chunk-YRYMNBGQ.js';
5
- import { parseTrackerNumber, trackerNumberError } from './chunk-RCQXYLMO.js';
6
+ import './chunk-65WXAANR.js';
7
+ import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
6
8
  import './chunk-ZJSNLVCE.js';
7
- import './chunk-3VQ4XXQA.js';
8
- import './chunk-IWIUYLDR.js';
9
+ import './chunk-NXLLURA4.js';
10
+ import './chunk-I3ETLSNE.js';
9
11
  import './chunk-YOOSBOKS.js';
10
12
  import './chunk-R5KBGVII.js';
11
13
  import { readCloudConfig } from './chunk-TFUIDMOB.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { AUTO_SYNC_DEBOUNCE_MS, WORK_ADD_RETRIES, contextPossiblyGoverned, handleWorkLaunch, hookFiredMarkerPath, maybeAutoSync, runHookFast, spoolDir } from './chunk-3VQ4XXQA.js';
4
- import './chunk-IWIUYLDR.js';
3
+ export { AUTO_SYNC_DEBOUNCE_MS, WORK_ADD_RETRIES, contextPossiblyGoverned, handleWorkLaunch, hookFiredMarkerPath, maybeAutoSync, runHookFast, spoolDir } from './chunk-NXLLURA4.js';
4
+ import './chunk-I3ETLSNE.js';
5
5
  import './chunk-VNVZDWO3.js';
6
6
  import './chunk-Z5GEFMRW.js';
7
7
 
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ createRequire(import.meta.url);
6
6
  // src/index.ts
7
7
  var argv = process.argv.slice(2);
8
8
  if (argv[0] === "hook") {
9
- const { runHookFast } = await import('./hook-fast-I2XTHDE6.js');
9
+ const { runHookFast } = await import('./hook-fast-J5LCDHUJ.js');
10
10
  await runHookFast(argv[1]);
11
11
  process.exit(0);
12
12
  }
@@ -21,5 +21,5 @@ if (argv[0] === "statusline") {
21
21
  await runStatuslineFast(argv.slice(1));
22
22
  process.exit(0);
23
23
  }
24
- var { runCli } = await import('./cli-EFJIG2VT.js');
24
+ var { runCli } = await import('./cli-G7DILYJY.js');
25
25
  await runCli(process.argv);
@@ -2,16 +2,18 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { loadRunnerConfig, checkHooks } from './chunk-WQ6VGRGZ.js';
4
4
  import { claimPidFile, readPidFile, releasePidFile } from './chunk-D77LS3UI.js';
5
- import { describeCallFailure, retrySend, LEASE_SECONDS, shortClaim, isUnfinished, writeJobFile, relativeToRunner, setStage, jobEnv, runHook, formatDuration, describeHookEnd, readProvisionOut, workdirProblem, runCommand, finishJob, isGroupAlive, outcomeFromExitCode, needsRenew, renewLease, formatClock, RENEW_INTERVAL_SECONDS, isTimedOut, readCpuUsec, isIdle, createRunnerLog, listAdoptableJobs, retryFailedReleases, recoverLostJobs, readJobFile, hookLimitsFor } from './chunk-KKEU6FFR.js';
5
+ import { describeCallFailure, retrySend, LEASE_SECONDS, shortClaim, isUnfinished, writeJobFile, relativeToRunner, setStage, jobEnv, runHook, formatDuration, describeHookEnd, readProvisionOut, workdirProblem, runCommand, finishJob, isGroupAlive, outcomeFromExitCode, needsRenew, renewLease, formatClock, RENEW_INTERVAL_SECONDS, isTimedOut, readCpuUsec, isIdle, createRunnerLog, listAdoptableJobs, retryFailedReleases, recoverLostJobs, readJobFile, hookLimitsFor } from './chunk-DCNOXRMV.js';
6
6
  import { startTimeOf, isSameProcess } from './chunk-OZ7C3XUE.js';
7
7
  import { RUNNER_DIR_MODE, runnerDir, attemptStamp, jobDir, jobsDir, pidFilePath } from './chunk-JJP7YLMN.js';
8
- import { WorkCommandError, getJson } from './chunk-HNCCD2IX.js';
9
- import { RepoFilter } from './chunk-BQB3U2VD.js';
8
+ import { WorkCommandError, getJson } from './chunk-Q6CL5THG.js';
9
+ import { RepoFilter } from './chunk-U32VSRLO.js';
10
+ import './chunk-4TNZMO7V.js';
10
11
  import './chunk-YRYMNBGQ.js';
11
- import './chunk-RCQXYLMO.js';
12
+ import './chunk-65WXAANR.js';
13
+ import './chunk-WZBHBH3J.js';
12
14
  import './chunk-ZJSNLVCE.js';
13
- import './chunk-3VQ4XXQA.js';
14
- import './chunk-IWIUYLDR.js';
15
+ import './chunk-NXLLURA4.js';
16
+ import './chunk-I3ETLSNE.js';
15
17
  import './chunk-YOOSBOKS.js';
16
18
  import './chunk-R5KBGVII.js';
17
19
  import './chunk-TFUIDMOB.js';
@@ -151,7 +153,7 @@ async function runTick(state) {
151
153
  );
152
154
  }
153
155
  async function tryClaimAndStart(state, item, queue) {
154
- const { postJson } = await import('./work-cmd-ABP6XDBP.js');
156
+ const { postJson } = await import('./work-cmd-2P4BVX47.js');
155
157
  const log = logOf(state);
156
158
  const claim = await retrySend(
157
159
  () => postJson(
@@ -438,7 +440,7 @@ async function probeCredentials(config, fetchImpl = fetch) {
438
440
  return {
439
441
  ok: false,
440
442
  fatal: true,
441
- reason: `${config.configPath}: the API key was refused (${status}). A runner key needs git_connection.read to list and read work items, work_item_claim.insert to claim, and work_item_claim.update to renew and release.`
443
+ reason: `${config.configPath}: the API key was refused (${status}). A runner key needs git.read and work.read to list and read work items, and work.claim to claim, renew and release.`
442
444
  };
443
445
  }
444
446
  return { ok: false, fatal: false, reason: describeCallFailure(err) };
@@ -1,15 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { formatDuration, formatClock, relativeToRunner, LEASE_SECONDS, RENEW_INTERVAL_SECONDS } from './chunk-KKEU6FFR.js';
3
+ import { formatDuration, formatClock, relativeToRunner, LEASE_SECONDS, RENEW_INTERVAL_SECONDS } from './chunk-DCNOXRMV.js';
4
4
  import './chunk-OZ7C3XUE.js';
5
5
  import { runnerDir, jobsDir } from './chunk-JJP7YLMN.js';
6
- import './chunk-HNCCD2IX.js';
7
- import './chunk-BQB3U2VD.js';
6
+ import './chunk-Q6CL5THG.js';
7
+ import './chunk-U32VSRLO.js';
8
+ import './chunk-4TNZMO7V.js';
8
9
  import './chunk-YRYMNBGQ.js';
9
- import './chunk-RCQXYLMO.js';
10
+ import './chunk-65WXAANR.js';
11
+ import './chunk-WZBHBH3J.js';
10
12
  import './chunk-ZJSNLVCE.js';
11
- import './chunk-3VQ4XXQA.js';
12
- import './chunk-IWIUYLDR.js';
13
+ import './chunk-NXLLURA4.js';
14
+ import './chunk-I3ETLSNE.js';
13
15
  import './chunk-YOOSBOKS.js';
14
16
  import './chunk-R5KBGVII.js';
15
17
  import './chunk-TFUIDMOB.js';
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { CHUNK_PART_TARGET_BYTES, RETRYABLE_STATUSES, SyncConfigError, SyncTransportError, detectCi, isLoopbackUrl, resolveTier, runSync } from './chunk-BQB3U2VD.js';
3
+ export { CHUNK_PART_TARGET_BYTES, RETRYABLE_STATUSES, SyncConfigError, SyncTransportError, detectCi, isLoopbackUrl, resolveTier, runSync } from './chunk-U32VSRLO.js';
4
+ import './chunk-4TNZMO7V.js';
4
5
  import './chunk-YRYMNBGQ.js';
5
- import './chunk-RCQXYLMO.js';
6
+ import './chunk-65WXAANR.js';
7
+ import './chunk-WZBHBH3J.js';
6
8
  import './chunk-ZJSNLVCE.js';
7
- import './chunk-3VQ4XXQA.js';
8
- import './chunk-IWIUYLDR.js';
9
+ import './chunk-NXLLURA4.js';
10
+ import './chunk-I3ETLSNE.js';
9
11
  import './chunk-YOOSBOKS.js';
10
12
  import './chunk-R5KBGVII.js';
11
13
  export { cloudConfigPath, readCloudConfig, writeCloudConfig } from './chunk-TFUIDMOB.js';