@outerlayer/cli 0.34.0-next.20261024123749 → 0.34.0-next.20261024163532

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.
@@ -1 +1 @@
1
- {"id":"2026-10-24T12:39:11.572Z+879b236","root":"/home/runner/_work/outerlayer/outerlayer","pkg":"outerlayer"}
1
+ {"id":"2026-10-24T16:36:38.512Z+5a2af5b","root":"/home/runner/_work/outerlayer/outerlayer","pkg":"outerlayer"}
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { probeCredentials } from './chunk-LW254XRN.js';
3
+ import { probeCredentials } from './chunk-DFLHVTXI.js';
4
4
  import './chunk-3JVYMD4G.js';
5
5
  import './chunk-PBIYM2Z6.js';
6
6
  import './chunk-E7R2GIAW.js';
@@ -2842,7 +2842,7 @@ async function watchTick(state, active, nowMs, logMtimeMs) {
2842
2842
  await endJob(state, active, "idle");
2843
2843
  }
2844
2844
  }
2845
- async function probeCredentials(config, fetchImpl = fetch) {
2845
+ async function probeCredentials(config, fetchImpl = fetch, keySource = "config") {
2846
2846
  try {
2847
2847
  await listStartable(config, config.queues[0] ?? "implement", fetchImpl);
2848
2848
  return { ok: true };
@@ -2859,10 +2859,12 @@ async function probeCredentials(config, fetchImpl = fetch) {
2859
2859
  };
2860
2860
  }
2861
2861
  if (status === 401 || status === 403) {
2862
+ const source = keySource === "variable" ? "the OUTERLAYER_API_KEY variable" : `apiKey in ${config.configPath}`;
2863
+ const cause = status === 401 ? `the gateway does not accept the API key (401): it is wrong, revoked or deleted.` : `the API key was refused (403). A runner key needs git.read and work.read to list and read work items, and work.claim to claim, renew and release.`;
2862
2864
  return {
2863
2865
  ok: false,
2864
2866
  fatal: true,
2865
- 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.`,
2867
+ reason: `${config.configPath}: ${cause} The key came from ${source}.`,
2866
2868
  status,
2867
2869
  code
2868
2870
  };
@@ -3130,7 +3132,7 @@ async function startRunner(configPath, deps, startup) {
3130
3132
  check: update.check ? () => update.check(configPath) : async () => {
3131
3133
  const held = heldClaudeCredential();
3132
3134
  const env = held === void 0 ? process.env : { ...process.env, [held.variable]: held.value };
3133
- return (await import('./check-S6S7XIUP.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
3135
+ return (await import('./check-K4I4EBEK.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
3134
3136
  },
3135
3137
  now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
3136
3138
  log
@@ -3161,7 +3163,7 @@ async function startRunner(configPath, deps, startup) {
3161
3163
  }).catch((err) => log.error(`the runner's Docker identity could not be stored: ${describeCallFailure(err)} \xB7 using the names its folder's path gives`));
3162
3164
  }
3163
3165
  check = "credentials";
3164
- const probe = await probeCredentials(config, deps.fetchImpl);
3166
+ const probe = await probeCredentials(config, deps.fetchImpl, deps.image === void 0 ? "config" : "variable");
3165
3167
  if (!probe.ok && probe.fatal) {
3166
3168
  probeRefusal = { status: probe.status, code: probe.code };
3167
3169
  throw new RunnerStartError(probe.reason);
@@ -5109,7 +5109,7 @@ function registerRunnerCommands(program2) {
5109
5109
  const configOption = "the cloud config file to run against (default: ~/.outerlayer/config.json)";
5110
5110
  runnerCmd.command("start").description("Run the loop: claim work, run it, report, clean up, repeat").option("--config <path>", configOption).action(async (opts) => {
5111
5111
  const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-WRHQDGVI.js');
5112
- const { start, RunnerStartError } = await import('./loop-VC3EE3RK.js');
5112
+ const { start, RunnerStartError } = await import('./loop-E4YJ6BLL.js');
5113
5113
  const { RunnerAlreadyRunningError } = await import('./pidfile-5UDLYPMC.js');
5114
5114
  const configPath = opts.config ?? defaultRunnerConfigPath();
5115
5115
  try {
@@ -5128,8 +5128,8 @@ function registerRunnerCommands(program2) {
5128
5128
  "\nReads OUTERLAYER_URL, OUTERLAYER_APP_ID, OUTERLAYER_API_KEY, OUTERLAYER_RUNNER_NAME and one Claude credential\n(CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY) from the environment. OUTERLAYER_AGENT\nis optional and defaults to claude. On a later start it refuses variables that disagree with the config in the volume.\nThe image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use `runner start`.\n"
5129
5129
  ).action(async () => {
5130
5130
  const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-WRHQDGVI.js');
5131
- const { containerStart } = await import('./container-start-7QFR3JWO.js');
5132
- const { start, RunnerStartError } = await import('./loop-VC3EE3RK.js');
5131
+ const { containerStart } = await import('./container-start-V5WVSWAB.js');
5132
+ const { start, RunnerStartError } = await import('./loop-E4YJ6BLL.js');
5133
5133
  const { RunnerAlreadyRunningError } = await import('./pidfile-5UDLYPMC.js');
5134
5134
  try {
5135
5135
  const result = await containerStart({
@@ -5149,7 +5149,7 @@ function registerRunnerCommands(program2) {
5149
5149
  });
5150
5150
  runnerCmd.command("check").description("Validate the config, the hooks and the key, and print the effective settings").option("--config <path>", configOption).action(async (opts) => {
5151
5151
  const { defaultRunnerConfigPath } = await import('./config-WRHQDGVI.js');
5152
- const { runRunnerCheck } = await import('./check-S6S7XIUP.js');
5152
+ const { runRunnerCheck } = await import('./check-K4I4EBEK.js');
5153
5153
  const configPath = opts.config ?? defaultRunnerConfigPath();
5154
5154
  const result = await runRunnerCheck(configPath);
5155
5155
  if (!result.ok) {
@@ -5549,7 +5549,7 @@ Next:
5549
5549
  });
5550
5550
  runnerCmd.command("stop").description("Take no more work; finish running jobs, 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) => {
5551
5551
  const { defaultRunnerConfigPath } = await import('./config-WRHQDGVI.js');
5552
- const { requestStop } = await import('./loop-VC3EE3RK.js');
5552
+ const { requestStop } = await import('./loop-E4YJ6BLL.js');
5553
5553
  const configPath = opts.config ?? defaultRunnerConfigPath();
5554
5554
  const { runnerImageVersion } = await import('./image-tag-ADSLWXBA.js');
5555
5555
  await requestStop(configPath, Boolean(opts.now), void 0, { image: runnerImageVersion() !== void 0 });
@@ -5557,7 +5557,7 @@ Next:
5557
5557
  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) => {
5558
5558
  const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-WRHQDGVI.js');
5559
5559
  const { jobsDir, runnerDir } = await import('./paths-7HVTDE6J.js');
5560
- const { listJobFiles, runnerProcessState } = await import('./loop-VC3EE3RK.js');
5560
+ const { listJobFiles, runnerProcessState } = await import('./loop-E4YJ6BLL.js');
5561
5561
  const { renderStatus } = await import('./status-6ISCZDBX.js');
5562
5562
  const { readHousekeepingRecord } = await import('./record-PPZEXAVA.js');
5563
5563
  const path2 = await import('path');
@@ -5618,7 +5618,7 @@ Next:
5618
5618
  });
5619
5619
  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) => {
5620
5620
  const { defaultRunnerConfigPath } = await import('./config-WRHQDGVI.js');
5621
- const { listJobFiles } = await import('./loop-VC3EE3RK.js');
5621
+ const { listJobFiles } = await import('./loop-E4YJ6BLL.js');
5622
5622
  const { newestAttempt, logPathFor, tail, RunnerLogsError } = await import('./logs-HI46FO6Z.js');
5623
5623
  const configPath = opts.config ?? defaultRunnerConfigPath();
5624
5624
  const item = parseTrackerNumber(itemArg);
@@ -215,7 +215,7 @@ async function containerStart(deps) {
215
215
  const different = disagreements(stored, env);
216
216
  if (different.length > 0) {
217
217
  return refuse(
218
- `the config in the volume and the container's variables disagree, so the runner does not start:
218
+ `the config in the volume (${configPath}) and the container's variables disagree, so the runner does not start:
219
219
  ${different.join("\n ")}
220
220
  Change the variables to match the volume, or use a new volume to make a new runner.`
221
221
  );
package/dist/index.js CHANGED
@@ -26,5 +26,5 @@ if (argv[0] === "claude") {
26
26
  process.exit(await runClaudeLauncher(argv.slice(1)));
27
27
  }
28
28
  (await import('./hook-fast-WENTLDMA.js')).recordLinkExitFailure(argv);
29
- var { runCli } = await import('./cli-RL2R7YTM.js');
29
+ var { runCli } = await import('./cli-KDAKXVVE.js');
30
30
  await runCli(process.argv);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { RunnerStartError, leaseTimeLeftFor, listJobFiles, logUnusableHelper, probeBuild, probeCredentials, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-LW254XRN.js';
3
+ export { RunnerStartError, leaseTimeLeftFor, listJobFiles, logUnusableHelper, probeBuild, probeCredentials, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-DFLHVTXI.js';
4
4
  import './chunk-3JVYMD4G.js';
5
5
  import './chunk-PBIYM2Z6.js';
6
6
  import './chunk-E7R2GIAW.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outerlayer/cli",
3
- "version": "0.34.0-next.20261024123749",
3
+ "version": "0.34.0-next.20261024163532",
4
4
  "description": "OuterLayer CLI — commands: init, claude, connect, doctor, login, logout, sync, daemon (alias: watch), emit, findings, work, spec, runner, hooks, mcp, context. Capture and sync coding-agent sessions, and record proof of factory work.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Magu Studios, Inc.",