@outerlayer/cli 0.36.1-next.20261104133805 → 0.36.1-next.20261104161854

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-11-04T13:44:08.876Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
1
+ {"id":"2026-11-04T16:36:08.441Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
@@ -5377,6 +5377,9 @@ them. It then prints the factory's API keys page, where you create a key with
5377
5377
  the Runner preset, and asks you to paste it. Nothing is shown as you paste.
5378
5378
  With no terminal to ask on, it stops and says what to put in the config file.
5379
5379
 
5380
+ On a terminal with no --agent, runner init asks which agent builds start, and then
5381
+ asks for its credential with nothing shown. Answer none to keep placeholder commands.
5382
+
5380
5383
  With --agent ${words().runnerName}, the queue commands start ${words().agent} instead of the
5381
5384
  placeholder, and ${words().possessive} credential is read from stdin: a token from
5382
5385
  \`${words().setupCommand}\` (${words().starts[0]}...) or an API key (${words().starts[1]}...). It is
@@ -5399,21 +5402,34 @@ already in ${words().envFile} is used.
5399
5402
  fail(`--agent ${opts.agent}: runner init writes commands for ${headlessNames().join(", ")}. For another agent, leave --agent out and edit runner.commands.`);
5400
5403
  return;
5401
5404
  }
5402
- const agent = opts.agent;
5405
+ let agent = opts.agent;
5403
5406
  if (agent !== void 0 && opts.configStdin === true) {
5404
5407
  fail("the VM-side hand-off names the agent in its config on stdin; pass no --agent with it.");
5405
5408
  return;
5406
5409
  }
5407
5410
  try {
5411
+ const { agentCredentialText, credentialQuestion, initAgent, terminalQuestion } = await import('./init-agent-ZQICLASB.js');
5412
+ agent = await initAgent({
5413
+ flag: agent,
5414
+ handOff: opts.configStdin === true,
5415
+ isTTY: process.stdin.isTTY === true,
5416
+ ask: terminalQuestion(process.stdin, process.stdout)
5417
+ });
5408
5418
  let credential;
5409
5419
  if (agent !== void 0) {
5420
+ const chosen = agent;
5410
5421
  const { readPipedKey } = await import('./login-browser-NUQQYH5J.js');
5411
- credential = credentialFromStdin(
5412
- await readPipedKey(process.stdin, {
5422
+ const { terminalPrompt: terminalPrompt2 } = await import('./hidden-prompt-UXBFMQC5.js');
5423
+ const text = await agentCredentialText({
5424
+ isTTY: process.stdin.isTTY === true,
5425
+ readPiped: () => readPipedKey(process.stdin, {
5413
5426
  onWaiting: () => process.stderr.write(`runner init is waiting for ${words().possessive} credential on stdin; close stdin to use the one already in ${words().envFile}
5414
5427
  `)
5415
- })
5416
- );
5428
+ }),
5429
+ secretReader: terminalPrompt2,
5430
+ question: () => credentialQuestion(chosen)
5431
+ });
5432
+ credential = credentialFromStdin(text);
5417
5433
  }
5418
5434
  const machine = detectMachine();
5419
5435
  if (opts.configStdin === true) {
package/dist/index.js CHANGED
@@ -25,5 +25,5 @@ var { runSubcommand } = await import('./agent-subcommand-ASYEDGY2.js');
25
25
  var launcherCode = await runSubcommand(argv);
26
26
  if (launcherCode !== void 0) process.exit(launcherCode);
27
27
  (await import('./hook-fast-J26JZG67.js')).recordLinkExitFailure(argv);
28
- var { runCli } = await import('./cli-5IYZ4KPF.js');
28
+ var { runCli } = await import('./cli-UPBWBSZK.js');
29
29
  await runCli(process.argv);
@@ -0,0 +1,124 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { RunnerInitError } from './chunk-GBTHXD74.js';
4
+ import './chunk-ZDFZWQUF.js';
5
+ import './chunk-2PGI6RDE.js';
6
+ import './chunk-I3LTIAOR.js';
7
+ import './chunk-ZEM4IRBH.js';
8
+ import './chunk-PCIWQUBH.js';
9
+ import './chunk-DU2QDWHB.js';
10
+ import './chunk-ULFMR5UJ.js';
11
+ import './chunk-V6VMFAKC.js';
12
+ import './chunk-3TEZYUG6.js';
13
+ import './chunk-R6CQLTRC.js';
14
+ import './chunk-3GHHGCNU.js';
15
+ import './chunk-WGC7UFRM.js';
16
+ import './chunk-ZVB57WI6.js';
17
+ import './chunk-UYCK4L43.js';
18
+ import './chunk-TQMI335S.js';
19
+ import './chunk-PDBYH3V5.js';
20
+ import './chunk-NN33FYXG.js';
21
+ import './chunk-DOSM5H4B.js';
22
+ import './chunk-C47K5UDL.js';
23
+ import './chunk-RTPGEOBA.js';
24
+ import './chunk-JBJTC3UU.js';
25
+ import './chunk-OGFGZQA3.js';
26
+ import './chunk-TYLXRXDY.js';
27
+ import './chunk-GXZTSNVW.js';
28
+ import './chunk-FFJHFOFD.js';
29
+ import './chunk-2BUZUDSH.js';
30
+ import './chunk-MA4ZUS4A.js';
31
+ import './chunk-3Z5KIYBR.js';
32
+ import './chunk-KNGCCNVO.js';
33
+ import './chunk-ALPMGHDV.js';
34
+ import './chunk-HNKGBQFA.js';
35
+ import './chunk-XGGXKR4M.js';
36
+ import './chunk-A72Q4LSP.js';
37
+ import './chunk-MFVANFEJ.js';
38
+ import './chunk-RJTFSUZI.js';
39
+ import './chunk-F3T5QJ24.js';
40
+ import './chunk-R6SOMMDQ.js';
41
+ import './chunk-A6RI6KTI.js';
42
+ import './chunk-A2LHHKTT.js';
43
+ import './chunk-2AM6Z5BP.js';
44
+ import './chunk-ULIDETYK.js';
45
+ import './chunk-2A5LRRGL.js';
46
+ import './chunk-KYFMMW65.js';
47
+ import './chunk-4PGTFUTY.js';
48
+ import './chunk-6C6WH6KL.js';
49
+ import './chunk-HWVMRETT.js';
50
+ import './chunk-UDX4B237.js';
51
+ import './chunk-KWOQTSSZ.js';
52
+ import './chunk-RFNETJEH.js';
53
+ import './chunk-EKPSKSEJ.js';
54
+ import './chunk-JXHN4E4Q.js';
55
+ import './chunk-545P7JY7.js';
56
+ import './chunk-OV4XTV5M.js';
57
+ import './chunk-BJ3KTMDH.js';
58
+ import './chunk-AWY7ORQ2.js';
59
+ import './chunk-BKO6JEZI.js';
60
+ import './chunk-NFZMENCY.js';
61
+ import './chunk-4OD45RBP.js';
62
+ import './chunk-WZBHBH3J.js';
63
+ import './chunk-FZKNTIOJ.js';
64
+ import './chunk-ZHQC43NH.js';
65
+ import './chunk-NKQL3LHK.js';
66
+ import './chunk-YQR6E6OV.js';
67
+ import './chunk-CJPTUU2E.js';
68
+ import { headlessNames, runnerAgentNamed, credentialForms, orList, credentialShapes } from './chunk-UN6X7TYJ.js';
69
+ import { defaultAgents } from './chunk-KQSRABR6.js';
70
+ import './chunk-WWTZLRPH.js';
71
+ import './chunk-QJKW4MKH.js';
72
+ import './chunk-CDDED64E.js';
73
+ import './chunk-RA3O54FC.js';
74
+ import './chunk-352DHUTP.js';
75
+ import './chunk-FGA3EXGJ.js';
76
+ import './chunk-WUKLQWGY.js';
77
+ import './chunk-Z5GEFMRW.js';
78
+ import { createInterface } from 'readline/promises';
79
+
80
+ createRequire(import.meta.url);
81
+ var NO_AGENT = "none";
82
+ var MAX_TRIES = 3;
83
+ async function chooseRunnerAgent(options) {
84
+ const names = headlessNames(options.agents ?? defaultAgents());
85
+ const first = names[0];
86
+ if (!options.isTTY || first === void 0) return void 0;
87
+ const choices = [...names, NO_AGENT].join(", ");
88
+ const question = `Which agent should builds start? ${choices} (${NO_AGENT} writes placeholder commands that you edit) [${first}] `;
89
+ for (let tries = 0; tries < MAX_TRIES; tries++) {
90
+ const answer = (await options.ask(question)).trim().toLowerCase();
91
+ if (answer === "") return first;
92
+ if (answer === NO_AGENT) return void 0;
93
+ if (names.includes(answer)) return answer;
94
+ }
95
+ throw new RunnerInitError(`no agent was chosen. Answer one of: ${choices}. Or pass --agent ${first}.`);
96
+ }
97
+ function credentialQuestion(agent, agents = defaultAgents()) {
98
+ const found = runnerAgentNamed(agent, agents);
99
+ if (found === void 0) throw new RunnerInitError(`${agent} takes no credential, so runner init cannot ask for one.`);
100
+ const forms = credentialForms(found.descriptor);
101
+ const kinds = orList(credentialShapes(found.descriptor).map((shape) => `${shape.phrase} (${shape.starts}...)`));
102
+ return `Paste ${kinds} for ${forms.label}. Nothing is shown. Press Enter to use the one already in ${forms.envFile}: `;
103
+ }
104
+ async function initAgent(options) {
105
+ if (options.flag !== void 0 || options.handOff) return options.flag;
106
+ return chooseRunnerAgent(options);
107
+ }
108
+ function terminalQuestion(input, output) {
109
+ return async (question) => {
110
+ const rl = createInterface({ input, output });
111
+ try {
112
+ return await rl.question(question);
113
+ } finally {
114
+ rl.close();
115
+ }
116
+ };
117
+ }
118
+ async function agentCredentialText(options) {
119
+ if (!options.isTTY) return options.readPiped();
120
+ const readSecret = options.secretReader();
121
+ return readSecret === void 0 ? null : readSecret(options.question());
122
+ }
123
+
124
+ export { agentCredentialText, chooseRunnerAgent, credentialQuestion, initAgent, terminalQuestion };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outerlayer/cli",
3
- "version": "0.36.1-next.20261104133805",
3
+ "version": "0.36.1-next.20261104161854",
4
4
  "description": "OuterLayer CLI — commands: init, claude, connect, doctor, login, logout, sync, daemon (alias: watch), emit, demo, 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.",
@@ -114,18 +114,18 @@ repository. Commit and push in each checkout you change, to its own branch only.
114
114
  `outerlayer work comment --item "$OUTERLAYER_WORK" --thread <id> --body "<what changed>"`.
115
115
  Give no `--criterion` and no action flag. Answer a review summary on the
116
116
  general thread.
117
- 6. **Record the proofs again** before you watch CI: the evidence check waits
118
- on them. Run `outerlayer work proofs --record --comment --pr <prNumber>` in each
117
+ 6. **Record the proofs again** after you push. Run
118
+ `outerlayer work proofs --record --comment --pr <prNumber>` in each
119
119
  checkout you pushed. Run it in the foreground and read all its output. A
120
120
  runner amend's host records the proofs again after the session ends.
121
- 7. **Watch CI.** Skip this step when you pushed nothing. Run
122
- `gh pr checks <prNumber> --repo <repository> --watch` on each pull request
123
- you pushed. Leave out any check that waits on results recorded after the
124
- session ends. "No checks reported" is not green: query again.
125
- - For a failed check, read `gh run view <run-id> --log-failed`, fix it, push
126
- again, and repeat step 6.
127
- - If it also fails on the base branch, or outside the code, change nothing.
128
- - Stop after two fixes for one check.
121
+ 7. **Fix failed checks.** Run `outerlayer work status --item "$OUTERLAYER_WORK" --json`.
122
+ For each pull request whose `headSha` is this checkout's commit, read each
123
+ of its `failedChecks` (`name`, `summary`, `detailsUrl`). Read logs with `gh run view <run-id> --log-failed`.
124
+ - Fix the failure. Run the repository's pre-push gate, then push.
125
+ - If the check also fails on the base branch, or fails outside the code,
126
+ change nothing. Hand off with `--ready` and name the check (step 8).
127
+ - Do not wait for checks after the push.
128
+ - After a push, repeat step 6.
129
129
  8. **Hand off what you cannot fix.** Reply on the thread with `--ready`: one
130
130
  sentence of fact, then the decision a person must make. For a spec problem,
131
131
  quote the criterion and give the replacement wording. `--ready` hands the
@@ -137,8 +137,8 @@ repository. Commit and push in each checkout you change, to its own branch only.
137
137
  10. **Report.** Write one line per thread: the criterion (or the general
138
138
  thread), and fixed (with the replacement) or handed off (with the reason).
139
139
  Add a line for a merge conflict (merged with the base sha, or handed off
140
- with the reason), a CI line when you pushed (green, or each red check and
141
- why), the lines from step 6, and a line naming each proof missing or
140
+ with the reason), a line for each failed check (fixed, or handed off with
141
+ the reason), the lines from step 6, and a line naming each proof missing or
142
142
  out of date.
143
143
  Post the lines once on the general thread:
144
144
  `outerlayer work comment --item "$OUTERLAYER_WORK" --body "<the lines>"`.
@@ -26,7 +26,7 @@ phase reads its own reference on entry, never before:
26
26
  - [references/review-loop.md](references/review-loop.md): the review phase.
27
27
  - [references/review-briefs.md](references/review-briefs.md): the reviewer, refuter and mutation briefs.
28
28
  - [references/agent-briefs.md](references/agent-briefs.md): the briefs for every other agent.
29
- - [references/release.md](references/release.md): sync, pull request, CI.
29
+ - [references/release.md](references/release.md): sync and pull request.
30
30
  - [references/criteria-judge.md](references/criteria-judge.md): the brief that judges each criterion.
31
31
  - [references/evidence.md](references/evidence.md): manual test and evidence.
32
32
 
@@ -393,8 +393,8 @@ Run them in order.
393
393
  the criteria itself and records the `acceptance-criteria` check, as
394
394
  release.md says. It records one check item per criterion. When the state
395
395
  file holds no criteria, no judge runs.
396
- Watch CI until every check has concluded. Start the Evidence phase at the
397
- same time, as release.md's "Watch CI" says: CI never reads the proofs.
396
+ Do not wait for checks. Start the Evidence phase when the pull request opens,
397
+ as release.md says.
398
398
  6. **Evidence.** Run `outerlayer emit step "Evidence" --item "$OUTERLAYER_WORK"`,
399
399
  then apply the team's changes for this phase. Read [references/evidence.md](references/evidence.md)
400
400
  when the pull request opens, and run it. Write and commit the demo test and the
@@ -8,7 +8,7 @@
8
8
  - Merger brief
9
9
  - Fix brief
10
10
  - Release brief: sync and push
11
- - Release brief: CI and mergeability
11
+ - Release brief: mergeability
12
12
  - Evidence brief
13
13
 
14
14
  ## How to use this file
@@ -236,22 +236,15 @@ Write `build-reports/release.md` naming every conflict you resolved and every
236
236
  file the sync moved that the review had already cleared. The orchestrator acts
237
237
  on that second list, so do not omit a file because the move looked harmless.
238
238
 
239
- ## Release brief: CI and mergeability
239
+ ## Release brief: mergeability
240
240
 
241
241
  The shared rules apply. Your inputs are the branch and the pull request
242
242
  number.
243
243
 
244
- Watch the pull request's checks until they reach a conclusive state, by
245
- watching them or by a bounded poll. Any check that waits on results recorded
246
- after the session ends stays pending for the whole run. Leave it out of the
247
- wait. CI is conclusive when every other check has finished. Right after a pull
248
- request opens, "no checks reported" is ambiguous, not green. Query again over
249
- a short window before believing it.
250
-
251
244
  Confirm mergeability, and query again while it reads unknown.
252
245
 
253
246
  Write the quoted command output to `build-reports/release.md`. Return at most
254
- ten lines naming the CI conclusion, the mergeability and every failed check.
247
+ ten lines naming the mergeability.
255
248
 
256
249
  ## Evidence brief
257
250
 
@@ -1,8 +1,8 @@
1
1
  # Evidence phase: manual test and evidence
2
2
 
3
3
  Read this when the pull request opens. The evidence agent starts then, in the
4
- same wave as the CI watch. Everything after it in this file runs once CI is
5
- conclusive and the evidence agent has returned. It deletes the state file and
4
+ same wave as the mergeability check. Everything after it in this file runs once
5
+ the evidence agent has returned. It deletes the state file and
6
6
  the report directory, then the run ends as "Ending the run" in SKILL.md says. The evidence
7
7
  brief is in [agent-briefs.md](agent-briefs.md). Read every value from an
8
8
  earlier phase from the state file.
@@ -40,7 +40,7 @@ citing tests have not changed: change a test that cites it, and commit.
40
40
 
41
41
  A commit makes every proof out of date, and each `--record` run starts the app
42
42
  again. So record only at the run's last head. First make every commit the run
43
- still needs, such as a CI fix or a merge of the base branch. Push the last
43
+ still needs, such as a fix or a merge of the base branch. Push the last
44
44
  commit, then run `outerlayer work proofs --record` once. It records each
45
45
  proof that is not current and skips the rest. If a commit lands after that,
46
46
  record once more after it. The final report names that head and the proofs
@@ -7,7 +7,7 @@ file, not from the transcript.
7
7
 
8
8
  ## Sync and push
9
9
 
10
- The orchestrator does not sync, run the gate, push or watch CI itself. Spawn
10
+ The orchestrator does not sync, run the gate, or push itself. Spawn
11
11
  one release agent in a fresh context on the "sync and push" brief, with the
12
12
  state file path, the branch and the instructions-file pointer. The agent
13
13
  brings the base branch in as
@@ -114,18 +114,17 @@ When the state file holds no criteria at all (`criteria.source` is `none`, for
114
114
  example because drafting found nothing to draft), no judge runs and no judge
115
115
  report is emitted. Name the unjudged check in the final report.
116
116
 
117
- ## Watch CI
117
+ ## Check mergeability
118
118
 
119
119
  With the pull request open, spawn two agents in the same wave. The release
120
- agent runs again on the "CI and mergeability" brief with the pull request
121
- number. The evidence agent starts as [evidence.md](evidence.md) describes. The
122
- manual test needs only the pull request number, and CI never reads the
123
- captures, so the two waits overlap.
124
-
125
- Act on the release agent's return. A failed check has the standing of a red
126
- gate: fix it within the review phase's remaining budget or escalate. Never
127
- carry it into the Evidence phase. A persistent unknown mergeability escalates. A
128
- conflict means one more sync through the release agent, told it is a resync so
129
- it gates the merge's diff and not the branch's. A second conflict escalates.
130
- Any fix or sync that lands after the evidence agent captured goes through
131
- the Evidence phase's late-commit rule.
120
+ agent runs again on the "mergeability" brief with the pull request number. The
121
+ evidence agent starts as [evidence.md](evidence.md) describes.
122
+
123
+ Act on the release agent's return. A persistent unknown mergeability
124
+ escalates. A conflict means one more sync through the release agent, told it
125
+ is a resync so it gates the merge's diff and not the branch's. A second
126
+ conflict escalates. Any sync that lands after the evidence agent captured goes
127
+ through the Evidence phase's late-commit rule.
128
+
129
+ A failed check is not part of this build. The factory host starts an amend
130
+ that fixes it.