@awebai/oats 0.64.0 → 0.65.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 (36) hide show
  1. package/bin/oats.mjs +101 -4
  2. package/docs/desktop-cli-api.md +84 -2
  3. package/docs/desktop.md +14 -5
  4. package/docs/implementation.md +17 -3
  5. package/docs/release-notes/v0.65.0.md +187 -0
  6. package/docs/tui.md +416 -238
  7. package/docs/upgrading.md +1 -1
  8. package/docs/workspaces.md +124 -0
  9. package/lib/core.mjs +14 -4
  10. package/lib/deployments.mjs +325 -0
  11. package/lib/resolved-deployment.mjs +37 -0
  12. package/lib/workspace.mjs +2 -0
  13. package/package.json +1 -1
  14. package/packages/client/cli-locator.mjs +2 -2
  15. package/packages/client/deployment-label.mjs +2 -2
  16. package/packages/client/deployment-list-cli.mjs +98 -0
  17. package/packages/client/deployment-list.mjs +91 -0
  18. package/packages/client/keymap.mjs +106 -0
  19. package/packages/client/own-codes.mjs +2 -0
  20. package/packages/client/panel-views.mjs +1 -1
  21. package/packages/client/workspace-admission.mjs +2 -1
  22. package/packages/tui/README.md +4 -4
  23. package/packages/tui/lib/actions.mjs +29 -5
  24. package/packages/tui/lib/client.mjs +3 -1
  25. package/packages/tui/lib/config.mjs +21 -14
  26. package/packages/tui/lib/main.mjs +108 -31
  27. package/packages/tui/lib/model.mjs +71 -41
  28. package/packages/tui/lib/read.mjs +15 -45
  29. package/packages/tui/lib/store.mjs +158 -39
  30. package/packages/tui/lib/term/through.mjs +40 -18
  31. package/packages/tui/lib/views/act.mjs +17 -13
  32. package/packages/tui/lib/views/frame.mjs +418 -421
  33. package/packages/tui/lib/views/help.mjs +41 -19
  34. package/packages/tui/lib/views/instances.mjs +38 -9
  35. package/packages/tui/lib/views/switcher.mjs +65 -21
  36. package/skills/oats-getting-started/SKILL.md +6 -4
package/bin/oats.mjs CHANGED
@@ -66,6 +66,8 @@ import { retainedRecoveryLines, retainedWorktreeLines, retainedWorktrees } from
66
66
  const await_import_lifecycle = () => ({ resolveInstance: resolveInstanceForCli });
67
67
  import { homeTarget, soulTarget, isWorkspaceContext, inspectDocument, withComposedInstructions, withSkills, readinessDocument, policyOf, policySoul, manifestMissingRequires, INSPECT_OPERATIONS_API } from "../lib/instance-inspect.mjs";
68
68
  import { readEvents, setWaiting, incarnationOf } from "../lib/instance-events.mjs";
69
+ import { CLIENT_VIA, addDeployment, deploymentAtOrAbove, importDesktopDeployments, listDeployments, listResolved, removeDeployment } from "../lib/deployments.mjs";
70
+ import { observeResolvedDeployment } from "../lib/resolved-deployment.mjs";
69
71
 
70
72
  const rawArgs = process.argv.slice(2);
71
73
  /** The kernel's switches: a value never rides one (`--yolo=false` must not turn yolo on). */
@@ -98,14 +100,14 @@ function expandInlineValues(argv) {
98
100
  const { argv: args, problem: argvProblem, inline: inlineValues } = expandInlineValues(rawArgs);
99
101
  let cmd = args[0];
100
102
  const HELP_WORDS = new Set(["help", "--help", "-h"]);
101
- const KERNEL_COMMANDS = new Set(["harness", "automations", "trigger", "capture", "capabilities", "doctor", "inspect", "instance", "operation", "package", "readiness", "souls", "soul", "teams", "launch-config", "experimental", "onboard", "pane", "recall", "retire", "root", "schedule", "server", "session", "setup", "spawn", "status", "sync", "tui", "update", "version", "workspace", "worktree"]);
103
+ const KERNEL_COMMANDS = new Set(["harness", "automations", "trigger", "capture", "capabilities", "deployments", "doctor", "inspect", "instance", "operation", "package", "readiness", "souls", "soul", "teams", "launch-config", "experimental", "onboard", "pane", "recall", "retire", "root", "schedule", "server", "session", "setup", "spawn", "status", "sync", "tui", "update", "version", "workspace", "worktree"]);
102
104
  /** Commands whose argv another parser reads (packages/record, packages/experimental and packages/tui parse process.argv). */
103
105
  const OWN_ARGV_COMMANDS = new Set(["capture", "recall", "setup", "experimental", "tui"]);
104
106
  /** The kernel features this binary implements: `features` in `version --json` (the Desktop API v1
105
107
  * probe) and in `status --json`, which a remote roster relays as the host's (feature
106
108
  * server-probe-features, lib/servers.mjs hostFeatures). ONE list for both, emitted at output
107
109
  * time, never stored. A name must pass hostFeatures's check (test/cli-json-contract.test.mjs). */
108
- const KERNEL_FEATURES = ["retire-home", "session-start", "session-restart", "launch-config", "schedule", "schedule-host-caps", "session-upload", "operations", "instance-git", "instance-git-remote", "souls-declarations", "lifecycle-plans", "retire-retention", "readiness", "spawn-preview", "instance-events", "instance-events-2", "schedule-history", "schedule-read-2", "spawn-preview-2", "spawn-idempotency", "spawn-idempotency-2", "spawn-apply-2", "workspace-v2", "instance-modules", "spawn-provider-payload", "served-identity", "packages-no-approval", "spawn-name", "settings-origins", "team-model-3", "settings-declared", "capabilities-private", "layers-from", "harness", "package-souls", "triggers", "automations", "desktop-facts", "launch-preference", "preview-composed-from", "observe-max-age", "spawn-preview-max-age", "launch-config-default", "capability-show", "capture-file", "workspace-identity", "server-connect", "capability-route", "servers-per-workspace", "operator-default-soul", "waiting-on-you", "automation-descriptions", "souls-capabilities", "soul-composed-instructions", "teams-conditional-default", "server-probe-features", "worktree-event", "trigger-sources", "session-attach-detach-key", "lifecycle-kernel-codes", "schedule-run-warnings", "lifecycle-claim-stop", "launch-prompt-dev-channel", "soul-launch", "retire-plan-own-worktree", "spawn-kernel-codes", "soul-skills", "roster-workspace-key", "spawn-apply-max-age", "status-retire-state", "session-inspect-size", "session-inspect-running"];
110
+ const KERNEL_FEATURES = ["retire-home", "session-start", "session-restart", "launch-config", "schedule", "schedule-host-caps", "session-upload", "operations", "instance-git", "instance-git-remote", "souls-declarations", "lifecycle-plans", "retire-retention", "readiness", "spawn-preview", "instance-events", "instance-events-2", "schedule-history", "schedule-read-2", "spawn-preview-2", "spawn-idempotency", "spawn-idempotency-2", "spawn-apply-2", "workspace-v2", "instance-modules", "spawn-provider-payload", "served-identity", "packages-no-approval", "spawn-name", "settings-origins", "team-model-3", "settings-declared", "capabilities-private", "layers-from", "harness", "package-souls", "triggers", "automations", "desktop-facts", "launch-preference", "preview-composed-from", "observe-max-age", "spawn-preview-max-age", "launch-config-default", "capability-show", "capture-file", "workspace-identity", "server-connect", "capability-route", "servers-per-workspace", "operator-default-soul", "waiting-on-you", "automation-descriptions", "souls-capabilities", "soul-composed-instructions", "teams-conditional-default", "server-probe-features", "worktree-event", "trigger-sources", "session-attach-detach-key", "lifecycle-kernel-codes", "schedule-run-warnings", "lifecycle-claim-stop", "launch-prompt-dev-channel", "soul-launch", "retire-plan-own-worktree", "spawn-kernel-codes", "soul-skills", "roster-workspace-key", "spawn-apply-max-age", "status-retire-state", "session-inspect-size", "session-inspect-running", "deployments-list"];
109
111
  /** Commands `--server <id>` runs on a registered server. */
110
112
  const ROUTED_COMMANDS = new Set(["spawn", "retire", "status", "session", "okf", "schedule", "inspect", "operation", "launch-config", "readiness", "instance"]);
111
113
  const flag = (name) => {
@@ -3535,6 +3537,74 @@ async function tuiCmd() {
3535
3537
  await import(new URL("../packages/tui/bin/tui.mjs", import.meta.url));
3536
3538
  }
3537
3539
 
3540
+ /**
3541
+ * `oats deployments [list] | add [<dir>] | remove <path> | import --from desktop <path>... [--json]`:
3542
+ * this computer's list of its deployments (lib/deployments.mjs; docs/workspaces.md "This computer's
3543
+ * deployments"). Runs anywhere, needs no deployment, never routes to another machine. `--via
3544
+ * tui|desktop` (add) is the clients' and is not in the usage.
3545
+ */
3546
+ function deploymentsCmd() {
3547
+ const usage = "usage: oats deployments [list] | add [<dir>] | remove <path> | import --from desktop <path>... [--json]";
3548
+ const fail = (code, message, details) => cmdFail(code, message, details);
3549
+ const positional = [];
3550
+ const values = {};
3551
+ for (let i = 1; i < args.length; i++) {
3552
+ const a = args[i];
3553
+ if (a === "--json") continue;
3554
+ if (a === "--server") return fail("E_BAD_ARGS", "oats deployments lists this computer's deployments: --server is not accepted");
3555
+ if (a === "--via" || a === "--from") {
3556
+ const v = args[i + 1];
3557
+ if (v === undefined || v.startsWith("--")) return fail("E_BAD_ARGS", `${a} needs a value\n${usage}`);
3558
+ if (values[a.slice(2)] !== undefined) return fail("E_BAD_ARGS", `${a} is given twice\n${usage}`);
3559
+ values[a.slice(2)] = v; i++; continue;
3560
+ }
3561
+ if (a.startsWith("--")) return fail("E_BAD_ARGS", `unknown flag ${a}\n${usage}`);
3562
+ positional.push(a);
3563
+ }
3564
+ const sub = positional.length ? positional.shift() : "list";
3565
+ if (!["list", "add", "remove", "import"].includes(sub)) return fail("E_BAD_ARGS", `unknown subcommand ${JSON.stringify(sub)}\n${usage}`);
3566
+ if (values.via !== undefined && sub !== "add") return fail("E_BAD_ARGS", `--via is for oats deployments add\n${usage}`);
3567
+ if (values.from !== undefined && sub !== "import") return fail("E_BAD_ARGS", `--from is for oats deployments import\n${usage}`);
3568
+ const run = (fn) => { try { return fn(); } catch (e) { if (typeof e?.code === "string" && e.code.startsWith("E_")) return fail(e.code, e.message, e.details); throw e; } };
3569
+
3570
+ if (sub === "list") {
3571
+ if (positional.length) return fail("E_BAD_ARGS", usage);
3572
+ const result = run(() => listDeployments());
3573
+ if (JSON_MODE) return jsonOk(result);
3574
+ if (!result.deployments.length) {
3575
+ console.log(`no deployments listed (${shortPath(result.file)}): create one with \`oats onboard <dir> --workspace <ref>\`, or add one with \`oats deployments add <dir>\``);
3576
+ return;
3577
+ }
3578
+ const rows = [["PATH", "STATE", "VIA"], ...result.deployments.map((d) => [shortPath(d.path), d.state, d.via ?? ""])];
3579
+ const [pathWidth, stateWidth] = [0, 1].map((i) => Math.max(...rows.map((r) => r[i].length)));
3580
+ for (const r of rows) console.log(`${r[0].padEnd(pathWidth)} ${r[1].padEnd(stateWidth)} ${r[2]}`.trimEnd());
3581
+ return;
3582
+ }
3583
+ if (sub === "add") {
3584
+ if (positional.length > 1) return fail("E_BAD_ARGS", usage);
3585
+ if (values.via !== undefined && !CLIENT_VIA.includes(values.via)) return fail("E_BAD_ARGS", `--via takes ${CLIENT_VIA.join(" or ")}, got ${JSON.stringify(values.via)}`);
3586
+ const from = resolve(positional[0] ?? process.cwd());
3587
+ const found = deploymentAtOrAbove(from);
3588
+ if (!found) return fail("E_LOCAL_MISSING", `no oats-local.yaml at or above ${from}: it is not in a deployment (\`oats onboard <dir> --workspace <ref>\` creates one)`, { dir: from });
3589
+ const result = run(() => addDeployment(found, { via: values.via ?? "cli" }));
3590
+ if (JSON_MODE) return jsonOk(result);
3591
+ console.log(result.added ? `listed ${shortPath(result.path)}` : `${shortPath(result.path)} is already listed; nothing was changed`);
3592
+ return;
3593
+ }
3594
+ if (sub === "remove") {
3595
+ if (positional.length !== 1) return fail("E_BAD_ARGS", `oats deployments remove takes one path\n${usage}`);
3596
+ const result = run(() => removeDeployment(positional[0]));
3597
+ if (JSON_MODE) return jsonOk(result);
3598
+ console.log(result.removed ? `removed ${shortPath(result.path)} from this computer's list (nothing on disk was touched)` : `${shortPath(result.path)} is not listed; nothing was changed`);
3599
+ return;
3600
+ }
3601
+ // import
3602
+ if (values.from !== "desktop") return fail("E_BAD_ARGS", `oats deployments import needs --from desktop\n${usage}`);
3603
+ const result = run(() => importDesktopDeployments(positional));
3604
+ if (JSON_MODE) return jsonOk(result);
3605
+ console.log(result.imported ? `imported the Desktop's deployments: ${result.added.length} listed` : `the Desktop's deployments were imported already (${result.at}); nothing was changed`);
3606
+ }
3607
+
3538
3608
  /** `oats onboard [<dir>] --workspace <repo ref> [--json]` — workspace model v2 (decision 9).
3539
3609
  *
3540
3610
  * Realizes a workspace on this machine in the directory the operator chooses
@@ -3652,8 +3722,14 @@ async function onboardCmd() {
3652
3722
  // cannot see forge visibility, so it states the rule rather than judging.
3653
3723
  const hostIsMember = members.some((m) => m.key === synced.discovery.key);
3654
3724
  const hosting = { host: synced.discovery.key, hostIsMember, rule: "If any member is private, host oats-workspace.yaml in a private repo that is not a public member (a dedicated <org>/workspace repo); public contributors then use the standalone case (from: here capabilities + oats.core)." };
3655
- const result = { onboardApi: 2, standalone: standalone || undefined, local: localFile, dir, agents: join(dir, "agents"), lock: synced.lockFile, sync: synced.report, hosting, next: { clone: clones, spawn: spawnHint, souls: soulNames.slice(0, 3) } };
3725
+ // This computer's deployments list gains what was created (awebai/oats#1390); a failed add never
3726
+ // fails the onboard, it is answered in `listed`.
3727
+ let listed = true;
3728
+ try { addDeployment(dir, { via: "onboard" }); }
3729
+ catch (e) { listed = { code: typeof e?.code === "string" && e.code.startsWith("E_") ? e.code : "E_DEPLOYMENTS_WRITE", message: String(e?.message ?? e) }; }
3730
+ const result = { onboardApi: 2, standalone: standalone || undefined, local: localFile, dir, agents: join(dir, "agents"), lock: synced.lockFile, sync: synced.report, hosting, next: { clone: clones, spawn: spawnHint, souls: soulNames.slice(0, 3) }, listed };
3656
3731
  if (JSON_MODE) { jsonOk(result); return; }
3732
+ if (listed !== true) console.error(`oats: ${shortPath(dir)} was onboarded, but not added to this computer's deployments list: ${listed.message}`);
3657
3733
 
3658
3734
  console.log(`Onboarded ${shortPath(dir)} into workspace ${workspaceName(synced.discovery)} (${synced.discovery.key} @ ${short(synced.discovery.commit)}).${standalone ? `\n (${standaloneNote(synced.discovery, { from: " from here" })})` : ""}\n`);
3659
3735
  printSyncReport(ctx, synced);
@@ -4606,6 +4682,14 @@ try {
4606
4682
  die(message);
4607
4683
  }
4608
4684
  }
4685
+ // This computer's deployments list (awebai/oats#1390, amendment 1 and its performance budget): a
4686
+ // kernel command that resolves a local deployment lists it when it is not listed yet. The one table
4687
+ // of those commands is here. The check runs on the command's own resolution, once, at exit, on
4688
+ // the canonical root when the command resolved one (lib/resolved-deployment.mjs; lib/deployments.mjs
4689
+ // listResolved): a listed deployment costs one bounded read of the list. Never on --server (the remote's path is not this computer's), never for
4690
+ // help, and silent: no output, no change to the command's answer or exit status.
4691
+ const LISTS_ITS_DEPLOYMENT = new Set(["automations", "capabilities", "doctor", "harness", "inspect", "instance", "launch-config", "operation", "package", "pane", "readiness", "retire", "schedule", "session", "soul", "souls", "spawn", "status", "sync", "teams", "trigger", "update", "workspace", "worktree"]);
4692
+ if (LISTS_ITS_DEPLOYMENT.has(cmd) && flag("server") === undefined && !args.slice(1).some((a) => a === "--help" || a === "-h")) observeResolvedDeployment(listResolved);
4609
4693
  if (cmd === "onboard") {
4610
4694
  if (args.includes("--help") || args.includes("-h")) { if (JSON_MODE) jsonOk({ command: cmd, usage: usageLinesFor(cmd) }); else usageFor(cmd); process.exit(0); }
4611
4695
  await onboardCmd();
@@ -4619,6 +4703,7 @@ const wantsHelp = args.slice(1).some((a) => a === "--help" || a === "-h");
4619
4703
  if (cmd && KERNEL_COMMANDS.has(cmd) && wantsHelp) { if (JSON_MODE) { jsonOk({ command: cmd, usage: usageLinesFor(cmd) }); process.exit(0); } usageFor(cmd); process.exit(0); }
4620
4704
  if (flag("server") !== undefined && ROUTED_COMMANDS.has(cmd)) await serverRouteCmd();
4621
4705
  else if (cmd === "server") await serverCmd();
4706
+ else if (cmd === "deployments") deploymentsCmd();
4622
4707
  else if (cmd === "inspect") await inspectCmd();
4623
4708
  else if (cmd === "operation") await operationCmd();
4624
4709
  else if (cmd === "launch-config") await launchConfigCmd();
@@ -4774,9 +4859,21 @@ Usage:
4774
4859
  and prints the
4775
4860
  next steps (clone members you work IN, spawn the
4776
4861
  workspace's setup expert (the soul holding oats.setup));
4777
- creates no soul, spawns nothing
4862
+ creates no soul, spawns nothing; lists <dir> in this
4863
+ computer's deployments (below)
4778
4864
  [--check] --check: write nothing; report <dir> (~ = this home),
4779
4865
  its state and whether Git reads the workspace remote
4866
+ oats deployments [list] [--json] this computer's deployments (~/.oats/config/
4867
+ deployments.json): path, state (ok, missing,
4868
+ not-a-deployment, unreadable) and how each was listed.
4869
+ Onboard lists what it creates, and a kernel command run
4870
+ in an unlisted deployment lists it; ~/Agents is
4871
+ imported once, on first use
4872
+ oats deployments add [<dir>] [--json] list the deployment at or above <dir> (default: here)
4873
+ oats deployments remove <path> [--json] take <path> off the list (nothing on disk is touched);
4874
+ nothing lists it again but an explicit add or onboard
4875
+ oats deployments import --from desktop <path>... [--json]
4876
+ the Desktop's one-time import of its own lists
4780
4877
  oats session inspect|input|attach --home <absolute-home> [--text-file <path>] [--json]
4781
4878
  oats session attach --home <absolute-home> [--detach-key <key>]
4782
4879
  a viewer of one instance. <key> (C-<letter>, M-<letter
@@ -46,7 +46,7 @@ see the [official catalog](official-catalog.md) for current pins.
46
46
  "server-probe-features","worktree-event","trigger-sources","session-attach-detach-key",
47
47
  "lifecycle-kernel-codes","schedule-run-warnings","lifecycle-claim-stop","launch-prompt-dev-channel",
48
48
  "soul-launch","retire-plan-own-worktree","spawn-kernel-codes","soul-skills","roster-workspace-key","spawn-apply-max-age",
49
- "status-retire-state","session-inspect-size","session-inspect-running"],
49
+ "status-retire-state","session-inspect-size","session-inspect-running","deployments-list"],
50
50
  "automationsApi":1,"workspaceApi":2,"instanceGitApi":1,"spawnApplyApi":1,"soulsApi":2,"lifecycleApi":1,
51
51
  "readinessApi":2,"spawnPreviewApi":2,"eventsApi":2,"scheduleHistoryApi":3,"scheduleApi":2,"operationsApi":2,
52
52
  "capabilityShowApi":1}
@@ -135,6 +135,7 @@ see the [official catalog](official-catalog.md) for current pins.
135
135
  | `spawn-kernel-codes` | `oats spawn`, apply and `--preview`, answers the kernel's own code, as raised, whatever stage of the spawn raised it; `E_SPAWN_FAILED` is for an error with no kernel code (with `details.cause`, as the lifecycle commands' general codes have it). A code says nothing about how far the spawn got: `details.unconfirmed` does. Details are those each code had before; OATS 0.56.0 ([spawn errors](#spawn-errors)). A kernel without it answers `E_SPAWN_FAILED` for most kernel codes its kernel stage raised: there, that code may hide one | |
136
136
  | `roster-workspace-key` | `oats server roster --workspace-key <key>`, repeatable: only the groups that can belong to one of the given workspaces are probed and returned (registered for one of them, registered with no known `workspaceKey`, or saved routes only); the answer's shape is unchanged, OATS 0.56.0 ([The remote roster](#roster-workspace-key)). Gate on the probe: a kernel without it ignores the flag and probes and answers every group | |
137
137
  | `spawn-apply-max-age` | `--max-age <s>` on a spawn apply bound by `--expect-decision <revision>`: the apply reuses member heads as the preview does, its decision fence unchanged, and its answer carries no `observation` block, OATS 0.58.0 ([Apply](#apply)). Gate on the probe: a kernel without it refuses the flag on an apply (`E_BAD_ARGS`) | |
138
+ | `deployments-list` | `oats deployments [list]\|add\|remove\|import --json`, this computer's list of its deployments (`~/.oats/config/deployments.json`); `listed` on `oats onboard --json`; a kernel command run in an unlisted deployment lists it ([This computer's deployments](#this-computers-deployments-oats-deployments)). Gate on the probe: there is no fallback scan | `deploymentsApi: 1` |
138
139
  | `status-retire-state` | `retire` on `oats status --json` instance rows and on remote roster rows: whether a retire of the home is running, cannot be told, failed or was interrupted, read only from the files beside the home, OATS 0.59.0 ([`retire`](#row-retire)). `retirePending` is unchanged. Gate on the probe: a kernel without it never carries the field, so its absence there says nothing | |
139
140
 
140
141
  Payload-only integers, never in the probe: `onboardApi: 2`, `syncApi: 1`,
@@ -884,7 +885,8 @@ same argument, given once). The ref is checked before anything is written.
884
885
  "next":{"clone":[{"key":"github.com/acme/agents","name":"agents","url":"https://github.com/acme/agents.git","dir":"/w/agents-repo","present":false,"host":true},
885
886
  {"key":"github.com/acme/platform","name":"platform","url":"https://github.com/acme/platform.git","dir":"/w/platform","present":true,"host":false}],
886
887
  "spawn":"oats spawn acme-oats-setup-expert --dir /w",
887
- "souls":["acme-oats-setup-expert","platform-engineer","release-manager"]}}
888
+ "souls":["acme-oats-setup-expert","platform-engineer","release-manager"]},
889
+ "listed":true}
888
890
  ```
889
891
 
890
892
  - `sync` is the full [`oats sync`](#oats-sync) report (abridged above).
@@ -922,6 +924,10 @@ same argument, given once). The ref is checked before anything is written.
922
924
  share a repository name, `<member repo key>/<soul>`. The text output's step 3 names
923
925
  the same soul, or, with none, the conventional name to add.
924
926
  `next.souls` is the first three soul names, sorted.
927
+ - `listed` (feature `deployments-list`): `true` once the deployment is on this
928
+ computer's deployments list ([This computer's deployments](#this-computers-deployments-oats-deployments)),
929
+ else `{code, message}` with the list's error (`E_DEPLOYMENTS_*`). A failed
930
+ add never fails the onboard. `--check` lists nothing.
925
931
  - Errors: `E_BAD_ARGS` (usage, no `--workspace`, a repeated directory, an
926
932
  unknown flag), `E_REPO_REF`, `E_ALREADY_ONBOARDED {local, dir}` (this
927
933
  directory already has `oats-local.yaml`), `E_ONBOARD_FAILED {dir}`. A
@@ -929,6 +935,82 @@ same argument, given once). The ref is checked before anything is written.
929
935
  carries `details: {…, dir, rolledBack: true}`; a later failure keeps the
930
936
  files and carries `details: {…, dir, local}`.
931
937
 
938
+ <a id="this-computers-deployments-oats-deployments"></a>
939
+ ### This computer's deployments (`oats deployments`)
940
+
941
+ Feature `deployments-list`. The kernel's per-user list of the deployments on
942
+ this computer ([workspaces.md](workspaces.md#this-computers-deployments)).
943
+ Every verb runs from anywhere, needs no deployment, takes no `--server`
944
+ (`E_BAD_ARGS`) and never routes to another machine. Each runs the first-use
945
+ `~/Agents` import before it answers.
946
+
947
+ ```text
948
+ oats deployments [list] --json
949
+ oats deployments add [<dir>] [--via tui|desktop] --json
950
+ oats deployments remove <path> --json
951
+ oats deployments import --from desktop <path>... --json
952
+ ```
953
+
954
+ Every answer is a closed key set ([Shapes are closed](#scope)):
955
+
956
+ | Verb | `result` keys, exactly |
957
+ |---|---|
958
+ | `list` | `deploymentsApi`, `file`, `deployments`, `imports`; each row `path`, `name`, `state`, `addedAt`, `via` |
959
+ | `add` | `path`, `added` |
960
+ | `remove` | `path`, `removed` |
961
+ | `import` | `imported`, `at`, `added` on the first run; `imported`, `at` on every later one |
962
+
963
+ A key added to any of them later is a contract change: it is announced here
964
+ first, and accepted by the readers in `packages/client/deployment-list.mjs`
965
+ before a kernel that writes it ships. A change of meaning moves
966
+ `deploymentsApi` to 2. A tombstone stays inside the file: its `removed` and
967
+ `removedAt` never reach an answer, and a tombstoned row is never listed.
968
+
969
+ **`list`** (the default verb):
970
+
971
+ ```json
972
+ {"deploymentsApi":1,"file":"/home/me/.oats/config/deployments.json",
973
+ "deployments":[{"path":"/home/me/acme","name":"acme","state":"ok","addedAt":"2026-10-19T10:00:00.000Z","via":"onboard"}],
974
+ "imports":{"agents-dir":"2026-10-19T10:00:00.000Z"}}
975
+ ```
976
+
977
+ - The answer is exactly these four keys, and each row exactly
978
+ `{path, name, state, addedAt, via}`. A row `remove` took out is never in
979
+ it, and fields of the file the answer does not name never reach it.
980
+ - Rows are sorted by `path`. `name` is the last segment of `path`.
981
+ - `state`: `ok`, `missing`, `not-a-deployment` or `unreadable`, from
982
+ existence checks only. A row is a suggestion: a client admits the
983
+ deployment again before it serves it.
984
+ - `via`: `onboard`, `tui`, `desktop`, `cli`, `import:agents-dir` or
985
+ `import:desktop`, for information only.
986
+ - `imports`: the one-time markers as stored (`agents-dir`, `desktop`), each
987
+ the time it ran.
988
+
989
+ **`add`** lists the deployment at or above `<dir>` (default: the working
990
+ directory), canonical, and clears a `remove`. → `{"path":"/home/me/acme","added":true}`;
991
+ `added: false` when it was listed already, and nothing is written. `--via
992
+ tui|desktop` names the client that adds it (default `cli`); any other value is
993
+ `E_BAD_ARGS`. Outside every deployment: `E_LOCAL_MISSING {dir}`.
994
+
995
+ **`remove`** takes the row whose stored path is `<path>` resolved (no walk up,
996
+ so a row whose directory is gone can be removed); nothing on disk is touched.
997
+ → `{"path":"/home/me/acme","removed":true}`; `removed: false`, exit 0, when
998
+ `<path>` is not listed. The row is kept as a tombstone: nothing but `add` or
999
+ `onboard` lists that path again.
1000
+
1001
+ **`import --from desktop`** is the Desktop's one-time migration of its own
1002
+ lists. The first run lists every absolute path given, whatever its state, and
1003
+ sets `imports.desktop`, in one write →
1004
+ `{"imported":true,"at":"<marker>","added":["/home/me/acme"]}` (`added`: the
1005
+ paths it listed; zero paths are accepted). Every later run changes nothing →
1006
+ `{"imported":false,"at":"<marker>"}`. A relative path is `E_BAD_ARGS` before
1007
+ anything is written. A path `remove` took out is not listed again.
1008
+
1009
+ Errors of every verb: `E_DEPLOYMENTS_INVALID {file, reason}`,
1010
+ `E_DEPLOYMENTS_VERSION {file, schemaVersion}`, `E_DEPLOYMENTS_BUSY {file, lock}`,
1011
+ `E_DEPLOYMENTS_WRITE {file}`, `E_DEPLOYMENTS_IMPORT {dir}` ([the messages](workspaces.md#this-computers-deployments)),
1012
+ and `E_BAD_ARGS`.
1013
+
932
1014
  ### `oats sync`
933
1015
 
934
1016
  ```text
package/docs/desktop.md CHANGED
@@ -120,14 +120,23 @@ OATS deployment — the directory (the operator's choice) holding
120
120
  `oats-local.yaml` and `agents/`. A folder that is not a deployment is never
121
121
  opened: started from Finder, with nothing open to restore, the window shows
122
122
  the workspace switcher instead. It lists the deployments on this computer
123
- under **On this computer** (those directly inside `~/Agents`, and a saved
124
- one that is not open); click one to open it in this window. **Add local
125
- workspace… → Browse** points it at any other deployment.
123
+ under **On this computer**: those on this computer's deployments list
124
+ (`oats deployments`, see [Workspaces](workspaces.md)) and a saved one,
125
+ that are not open. Click one to open it in this window. A deployment the list
126
+ holds but that can't be opened says why: missing (the folder is gone, or its
127
+ volume isn't mounted), not a deployment any more, or can't be checked. **Remove**
128
+ beside a row takes it off the list (Right Arrow, then Enter, from the
129
+ keyboard); nothing on disk changes. With an oats that has no such list, the
130
+ switcher shows the saved deployments and says "This oats can't list this
131
+ computer's deployments. Update oats." **Add local workspace… → Browse**
132
+ points it at any other deployment.
126
133
  A picked folder without `oats-local.yaml` is offered onboarding instead. The
127
134
  Desktop never parses the deployment: its members, lock state and header come
128
135
  from `oats workspace status`, and its instances from the deployment's one
129
136
  `agents/` root.
130
- Added workspaces are remembered and offered as suggestions next time.
137
+ Every deployment you open (an add, or the one the app was launched on) is
138
+ put on this computer's deployments list, so it is offered next time. The first launch of this Desktop moves its own list of
139
+ recently added workspaces there, once.
131
140
  **Browse** opens in the folder holding the workspace most recently added or
132
141
  opened, or your home directory when there is none (never ~/Downloads);
133
142
  **Choose oats…** opens in the directory of the chosen or discovered CLI.
@@ -295,7 +304,7 @@ feature (OATS 0.36.0); without it each deployment has its own entry.
295
304
  - **Deployments.** The **Deployments** page (formerly the Active overview)
296
305
  shows the workspace's overview trees. **All** stacks one section per
297
306
  deployment, each headed by its machine and folder ("This Mac ·
298
- ~/Agents/oats", "altair · ~/Agents/tsm"). Then each deployment has a tab of
307
+ ~/acme", "altair · ~/northwind"). Then each deployment has a tab of
299
308
  its own, named by its machine ("altair"; "This Mac · oats-v2" when this Mac
300
309
  holds two). A workspace with one deployment shows just that deployment's
301
310
  tab. The tab you chose is remembered per workspace. With two or more
@@ -53,9 +53,10 @@ effect of reading: for each deployment opened in a run it runs the kernel
53
53
  of the same install and the shared liveness collector as children, through
54
54
  the shared observer and refresh loop; it runs that kernel's read of the
55
55
  other machines (`oats server roster --json`), one at a time and awaited by
56
- no cycle; it ends every child; and it makes the two looks at the file
57
- system the workspace switcher needs (the entries of `~/Agents`, and whether
58
- a picked folder is a deployment). `lib/store.mjs` is the state and a pure
56
+ no cycle; it ends every child; and it makes the one look at the file
57
+ system the workspace switcher needs (whether a picked row is a deployment).
58
+ This computer's list of deployments is the kernel's: `lib/main.mjs` reads
59
+ and changes it through the shared `cliDeploymentList`. `lib/store.mjs` is the state and a pure
59
60
  `reduce(state, event)`; `lib/model.mjs` turns the state into the rows to
60
61
  draw by calling the shared readers through `lib/client.mjs`, the one module
61
62
  that imports `packages/client/`; `lib/views/` are pure functions from that
@@ -126,6 +127,8 @@ and the rules its tests pin.
126
127
  | `read-ahead.mjs`, `read-ahead-worker.mjs` | read-ahead for the tree digests (`fingerprintTrees`): while a digest reads a tree on the calling thread, a planner thread walks it in the digest's order and a few reader threads read the next files into the page cache, within a window of bytes and files ahead of the digest. The digest still reads and hashes every byte itself, so no value or error depends on it; one that cannot start or falls behind costs speed only |
127
128
  | `session-input.mjs` | session inspection and input transport. `createSessionPaneInspector` interprets one window's panes for both lifecycle inspection and status, sharing a lazy process scan across a status read; `core.mjs` batches pane reads per socket/session and applies its shared `harnessRunning` predicate |
128
129
  | `servers.mjs` | routing commands to a registered server |
130
+ | `deployments.mjs` | this computer's deployments ([workspaces.md](workspaces.md#this-computers-deployments)): the per-user files `<OATS_HOME_DIR>/config/deployments.json` (the list, 0600 in a 0700 `config/`) and `config/deployments.lock` (`withDirLock`, waited for up to 3 s), the bounded no-follow read, the atomic write, the first-use `~/Agents` import (the real `$HOME`) and the five `E_DEPLOYMENTS_*` codes. `oats deployments`, onboard's `listed` and the auto-add write through it. `listResolved` is the auto-add: `bin/oats.mjs` sets it as the observer of `resolved-deployment.mjs` for the commands in its one table (`LISTS_ITS_DEPLOYMENT`), so it runs once per process on the deployment the command itself resolved. A listed deployment costs one bounded read (no lock, write, process or realpath), another spelling of it a realpath; a spelled root in a linked worktree or submodule (a `.git` file above it) is left to the commands that resolve its canonical root; only a path not listed is canonicalized and takes the lock, without waiting for it. It never throws or prints |
131
+ | `resolved-deployment.mjs` | the deployment a command resolved: `loadLocal` (`workspace.mjs`) reports the directory it found as spelled, `ensureRoot` (`core.mjs`) the canonical one, and the observer the CLI set is called once, at exit, with the first canonical root (else the first spelled one), so an earlier spelling never stands for a root the command canonicalized. A no-op until the CLI sets one, so library callers and tests are unaffected. Dependency-free |
129
132
  | `launch-prompt-evidence.mjs` | private bounded storage of exact unmatched, stable-screen completed or flag-ignored notice frames, original-home identity checks and receipt-last publication; no terminal operations or public raw text |
130
133
  | `launch-prompt-completion.mjs` | the 21 question markers that block after the development-channel Enter; reporting only, never an input matcher |
131
134
  | `launch-prompt-fixtures.mjs` | the development-channel tolerance list (`launch-prompt-fixtures/dev-channel-confirmation.json`): engagement from the argv, the enumerated normalization, equality matching, the `flag-ignored` notice block, the running-session banner hint, what differed, and the Claude version read from the executable's path |
@@ -501,6 +504,17 @@ the rule:
501
504
  preload in `OATS_TEST_RUN_DIR`, and the preload takes that variable out of
502
505
  the file's environment before any code of the file runs. No test sees it,
503
506
  nor any process a test starts.
507
+ - The preload also gives each file an `OATS_HOME_DIR` of its own,
508
+ `<n>.oats-home` beside its directory, holding a deployments list whose
509
+ `~/Agents` import is marked done (awebai/oats#1390). Any kernel command run
510
+ in a deployment adds that deployment to this computer's list, so a test
511
+ that runs the CLI with the environment it was given never writes the
512
+ person's `~/.oats`, nor reads their `~/Agents`. A test that names an
513
+ `OATS_HOME_DIR` of its own beside the person's `HOME` seeds the same marker
514
+ (`test/helpers/host-fixture.mjs` `deploymentsImported`); a fixture with a
515
+ `HOME` of its own needs nothing. When the run has ended, a row added to the
516
+ person's list during the run under a temporary directory fails the run,
517
+ naming it.
504
518
  - When the run has ended it reads each file's directory. If one is not empty
505
519
  the run fails, even if every test passed, and names each file and what it
506
520
  left.
@@ -0,0 +1,187 @@
1
+ # OATS 0.65.0
2
+
3
+ Unreleased
4
+
5
+ ## Upgrade
6
+
7
+ - **Install the Desktop first and the CLI second,** as
8
+ [Upgrading](../upgrading.md) says: a 0.64 Desktop refuses a 0.65.0 CLI. The
9
+ 0.65.0 Desktop accepts OATS CLIs `>=0.26.0 <0.66.0`. With an older CLI its
10
+ switcher shows the saved workspaces only and says "Update oats".
11
+
12
+ - **No package moves.** The official catalog keeps oats.framework 1.13.3; no
13
+ `oats sync` is needed for this release.
14
+
15
+ - **This computer's deployments list fills itself.** Nothing to run: the
16
+ first kernel command in a deployment lists it, `oats onboard` lists what it
17
+ creates, the first command that touches the list imports `~/Agents` once,
18
+ and the 0.65.0 Desktop's first launch imports its own saved and recent
19
+ workspaces. The Desktop and `oats tui` both read it, and no longer look
20
+ inside `~/Agents`. `oats deployments` shows the list, and
21
+ `oats deployments remove` takes off a row you don't want.
22
+
23
+ - **Coming from 0.61 or earlier:** do 0.62.0's Upgrade steps too (the capture
24
+ service's `oats setup`, once per user on each host, from that user's shell).
25
+
26
+ ## Added
27
+
28
+ - **One list of this computer's deployments, `~/.oats/config/deployments.json`,
29
+ and `oats deployments`** to read and change it
30
+ ([#1390](https://github.com/awebai/oats/issues/1390);
31
+ [This computer's deployments](../workspaces.md#this-computers-deployments)).
32
+ The clients read it to offer the deployments that are not open. It holds
33
+ this computer's deployments only; other machines stay in the server
34
+ registry.
35
+ - **`oats deployments [list] [--json]`** shows each deployment's path, its
36
+ state (`ok`, `missing`, `not-a-deployment` or `unreadable`, from
37
+ existence checks only) and how it was listed. `add [<dir>]` lists the
38
+ deployment at or above `<dir>`; `remove <path>` takes a row off the list
39
+ and touches nothing on disk; `import --from desktop <path>...` is the
40
+ Desktop's one-time import of its own lists. The JSON is in the
41
+ [Desktop CLI API](../desktop-cli-api.md#this-computers-deployments-oats-deployments),
42
+ under the feature `deployments-list`.
43
+ - **The list fills itself.** `oats onboard` lists what it creates (`listed`
44
+ in its result; a failed add never fails the onboard). Any kernel command
45
+ that resolves a deployment that is not listed yet (`status`, `spawn`,
46
+ `sync`, `doctor` and the others that read a deployment) lists it,
47
+ silently. A deployment inside a linked Git worktree or submodule is
48
+ listed by the first command that resolves its instance root (`status`,
49
+ `spawn`, `session` and the like), not by `sync`, `doctor` and the other
50
+ configuration commands. Once it is listed, a command reads the list and
51
+ nothing more: no lock, no write, no process (at most about
52
+ 0.5 ms a command); another spelling of it, a link for example, adds
53
+ one realpath. A busy lock never delays a command, and a command routed
54
+ with `--server` lists nothing.
55
+ - **A removed deployment stays removed.** Nothing automatic lists a path
56
+ `oats deployments remove` took out; `oats deployments add` or
57
+ `oats onboard` brings it back.
58
+ - **`~/Agents` is imported once.** The first command that touches the list
59
+ lists the deployments directly inside `~/Agents` (at most 200 entries, no
60
+ link followed) and records that it did. Nothing reads `~/Agents` again.
61
+ - **Five new codes:** `E_DEPLOYMENTS_INVALID`, `E_DEPLOYMENTS_VERSION`,
62
+ `E_DEPLOYMENTS_BUSY`, `E_DEPLOYMENTS_WRITE` and `E_DEPLOYMENTS_IMPORT`
63
+ (`~/Agents` cannot be read for the first-use import), each saying what
64
+ to do.
65
+
66
+ - Desktop: the TUI's leader. Alt+O on Linux and Windows, ⌃\ on macOS, then
67
+ one key from the TUI's own table: `k` or Space the command palette, `1` `2`
68
+ `3` Instances, Souls and Capabilities, ↑/↓ the terminal of the roster row
69
+ before or after, ←/→ the tabs, `z` focus mode, `w` close the tab, `|` `-`
70
+ the splits, Tab and `x` the split's groups, `X` `R` `S` `D` Stop, Restart,
71
+ Start and Retire, `n` `N` spawn, `/` the filter, `o` the workspace
72
+ switcher, `?` the shortcuts and Esc the instance roster. It works from a
73
+ terminal too: there the leader pressed twice sends the program what the
74
+ chord sends (Alt+O is ESC o, ⌃\ is 0x1c). While it waits, a panel at the
75
+ bottom of the main area lists the keys that apply now. `m` (move a tab to
76
+ the other group) has nothing to act on in the Desktop and is left out. A
77
+ test holds the Desktop's table to the TUI's, so the two cannot drift apart
78
+ ([Desktop keyboard](../../packages/desktop/docs/desktop-keyboard.md#the-leader)).
79
+ - Desktop: the TUI's plain keys in the sidebar. With focus in the sidebar,
80
+ `1` `2` `3`, `w`, `/`, `r`, `z`, `c`, `[` `]`, `|` `-`, `X` `D` `S` `R`,
81
+ `n` `N` and `?` do what they do in the TUI, each rebindable in the
82
+ shortcuts editor; on a roster row `k` `j` `g` `G` `h` `l` and
83
+ PageUp/PageDown move through the tree
84
+ ([Sidebar keys](../../packages/desktop/docs/desktop-keyboard.md#sidebar-keys)).
85
+ - Desktop: help leads with the leader. The shortcuts editor opens on a
86
+ Leader group, the leader's chord and then one row per key after it, which
87
+ its search finds (`alt+o k`), then the sidebar keys. The sidebar footer
88
+ starts with the leader's chord and "commands", a button that starts it.
89
+
90
+ ## Changed
91
+
92
+ - **The Desktop's switcher lists this computer's deployments from the
93
+ kernel's list,** `oats deployments`
94
+ ([#1390](https://github.com/awebai/oats/issues/1390)), and no longer looks
95
+ inside `~/Agents`.
96
+ - **Under "On this computer"** a window with no workspace shows the
97
+ deployments on that list that are not open, beside the saved ones.
98
+ - **A row that can't be opened says why:** missing (the folder is gone, or
99
+ its volume isn't mounted), not a deployment any more, or can't be checked.
100
+ - **Remove** beside a row takes it off the list, and off the Desktop's saved
101
+ workspaces when it is one. Nothing on disk changes. From the keyboard:
102
+ Right Arrow, then Enter.
103
+ - **Every deployment the Desktop opens is listed:** an add, an onboarding,
104
+ and the deployment it was launched on. A failure is a notification, and
105
+ the deployment stays open.
106
+ - **Once, at the first launch,** the Desktop moves its own list of recently
107
+ added workspaces and its saved workspaces onto the list, then renames
108
+ `workspace-recents.json` to `workspace-recents.imported.json`. It reads
109
+ recents for nothing else.
110
+ - **With an older oats,** which has no such list, the switcher shows the
111
+ saved workspaces and says "This oats can't list this computer's
112
+ deployments. Update oats." See [OATS Desktop](../desktop.md#opening-a-workspace).
113
+
114
+ - **`oats tui`'s switcher lists this computer's deployments from the
115
+ kernel's list,** `oats deployments`
116
+ ([#1390](https://github.com/awebai/oats/issues/1390)), and no longer looks
117
+ inside `~/Agents`.
118
+ - **Started outside every deployment** with no `--dir`, it reads the list
119
+ and starts with the switcher when the list holds a row. With none, it
120
+ exits with `E_NO_DEPLOYMENT`, and the line says how to open one
121
+ (`oats tui --dir <path>`) or create one (`oats onboard`). A list that
122
+ can't be read exits with the kernel's own code and message.
123
+ - **Opening a deployment lists it:** the deployment a run starts in, from
124
+ where you are or with `--dir`, is added to the list once. A failure is
125
+ said once, under the sidebar's title, and opens nothing less.
126
+ - **Under "On this machine, not opened"** stand the list's deployments the
127
+ run hasn't opened. A row that can't be opened says why: `Not found.`,
128
+ `Not an OATS deployment any more.` or `Can't be read.`
129
+ - **`Delete` on such a row asks, then removes it from the list,** with
130
+ `Enter`; nothing on disk changes. `tui.json` can give `remove` another
131
+ key. `r` reads the list again.
132
+ - The `More folders than are listed here.` row is gone. See
133
+ [OATS TUI](../tui.md#the-switcher).
134
+
135
+ - **The `oats-getting-started` skill suggests no deployment directory.** It
136
+ asks for `D` and no longer suggests `~/Agents/<workspace>`: from this
137
+ release `oats onboard` lists `D` in this computer's list of deployments, so
138
+ the Desktop and the TUI find it wherever it is
139
+ ([#1390](https://github.com/awebai/oats/issues/1390)). On Linux, the person
140
+ picks `D` in the Desktop's switcher, where it is listed; when it isn't
141
+ (an older Desktop, or a list that could not be written), they add it with
142
+ **Add local workspace… → Browse**.
143
+
144
+ - **OATS Desktop accepts an `oats` CLI 0.65.x.** Its band is now
145
+ `>=0.26.0 <0.66.0`. 0.65 adds no new gate on the band: the Desktop reads
146
+ `oats deployments` only behind its feature `deployments-list`, and does not
147
+ read `listed` on `oats onboard --json`.
148
+
149
+ - Desktop: the command palette (⌘K / Ctrl+Shift+K) now opens on its first
150
+ row, the top of the list, which its last-focus order makes the most recently
151
+ focused path. With a query it opens on the first match. It no longer opens on
152
+ the agent you were on before, which was often a row in the middle of the
153
+ list (#1391).
154
+
155
+ - Desktop: none of the existing default shortcuts changes. A shortcut you set
156
+ yourself that now shares its chord with the leader or a sidebar key is kept
157
+ as it is, and the shortcuts editor shows the clash until you rebind or reset
158
+ one side.
159
+
160
+ - **`oats tui` is one sidebar and the main area, with no header and no
161
+ footer.** An agent's open terminal now spans every row, and zoomed (`z`)
162
+ it has the whole screen. The sidebar starts with the workspace's name and
163
+ what the view holds of other machines. A deployment's state and reason,
164
+ the note of a one-deployment view and the line after an open stand under
165
+ it. The three views follow as an accordion, each with its key: the open
166
+ one's heading with its list under it, and with no instances
167
+ `No agents yet: n spawns one`. A short cheat sheet comes last: the
168
+ leader, the palette, what `Enter` does now, spawn, help and quit; the
169
+ leader's hint, the palette and the help name the other keys. On a narrow
170
+ sidebar a row's name keeps its cells ahead of its word. The filter field
171
+ and a kept filter stand on the open view's heading. The counts and the
172
+ time of the read have left the screen. The help shows that time at its top, with how many rows were
173
+ withheld. From 80 columns the switcher, the palette, the spawn prompt, the
174
+ help and the confirmations cover the main area, and the sidebar stays
175
+ beside them. Under 80 columns they cover the whole screen, with their keys
176
+ on their first row, as the detail does
177
+ ([docs/tui.md](../tui.md#what-it-shows)).
178
+
179
+ - **The leader is `Alt+O` on Linux and Windows.** `Ctrl+\` was a stretch on
180
+ most keyboards and needs AltGr on many layouts. macOS keeps `Ctrl+\` for
181
+ now. `open.detachKey` in `tui.json` still names another key, `C-\`
182
+ among them. `Alt+O` counts as the leader only when it arrives as one
183
+ keypress: an `Esc` then `o` typed as two keys reaches the agent unchanged.
184
+ The leader pressed twice now types it into the terminal that has the
185
+ focus, and the leader then `Esc` gives the list the focus. The cheat
186
+ sheet and the help name keys as people read them: `Alt+O`, `Ctrl+K`,
187
+ `Enter` ([docs/tui.md](../tui.md#the-leader)).