@awebai/oats 0.69.16 → 0.69.18

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 (53) hide show
  1. package/README.md +1 -1
  2. package/bin/oats.mjs +14 -13
  3. package/docs/capabilities.md +7 -0
  4. package/docs/container.md +172 -18
  5. package/docs/design/2026-09-23-workspace-module-contracts.md +8 -2
  6. package/docs/desktop-cli-api.md +73 -33
  7. package/docs/desktop.md +40 -18
  8. package/docs/execution-targets.md +36 -33
  9. package/docs/implementation.md +7 -6
  10. package/docs/integrations.md +2 -2
  11. package/docs/knowledge.md +5 -5
  12. package/docs/official-catalog.md +7 -7
  13. package/docs/packages.md +13 -13
  14. package/docs/release-lane.md +24 -19
  15. package/docs/release-notes/v0.69.17.md +49 -0
  16. package/docs/release-notes/v0.69.18.md +358 -0
  17. package/docs/servers.md +3 -1
  18. package/docs/souls-and-instances.md +18 -16
  19. package/docs/trust-model.md +119 -0
  20. package/docs/upgrading.md +46 -21
  21. package/docs/workspaces.md +3 -3
  22. package/lib/command-flags.mjs +1 -1
  23. package/lib/core.mjs +24 -9
  24. package/lib/errors.mjs +1 -1
  25. package/lib/home-owner.mjs +25 -0
  26. package/lib/host-run-admission.mjs +21 -0
  27. package/lib/host-run-child.mjs +31 -0
  28. package/lib/host-run-work.mjs +150 -0
  29. package/lib/host-run.mjs +20 -11
  30. package/lib/instance-naming.mjs +26 -44
  31. package/lib/packages.mjs +0 -43
  32. package/lib/pi-bridge.mjs +18 -6
  33. package/lib/schedule.mjs +5 -3
  34. package/lib/servers.mjs +4 -3
  35. package/lib/session-end.mjs +9 -0
  36. package/lib/session-resume.mjs +19 -9
  37. package/lib/session-seen.mjs +13 -8
  38. package/lib/triggers.mjs +3 -1
  39. package/lib/worktree.mjs +5 -2
  40. package/package-catalog.json +3 -3
  41. package/package.json +2 -2
  42. package/packages/client/above-tested-notice.mjs +30 -0
  43. package/packages/client/above-tested.mjs +225 -0
  44. package/packages/client/cli-locator.mjs +67 -52
  45. package/packages/client/deployment-label.mjs +4 -4
  46. package/packages/client/instance-name.mjs +5 -29
  47. package/packages/client/session-start.mjs +31 -3
  48. package/packages/client/workspace-choices.mjs +1 -1
  49. package/packages/client/workspace-views.mjs +1 -1
  50. package/packages/record/README.md +10 -8
  51. package/packages/record/lib/process-identity.mjs +14 -36
  52. package/packages/tui/lib/read.mjs +19 -3
  53. package/skills/oats-getting-started/SKILL.md +33 -4
@@ -1,7 +1,8 @@
1
1
  /** The suggested instance name (feature spawn-suggest-name, awebai/oats#1421 §3): `oats spawn <soul>
2
2
  * --preview --suggest-name` asks the soul's own harness, in one isolated non-interactive call, for a
3
- * descriptive name for the task, and names the instance `<descriptive>-<role>`. A failure is never an
4
- * error: the preview numbers the instance as before and says why (`naming.reason`, a closed set).
3
+ * name for the task, and names the instance with the model's whole `<work>-<role>`: nothing appends a
4
+ * role, and nothing reads the soul's name. A failure is never an error: the preview numbers the
5
+ * instance as before and says why (`naming.reason`, a closed set).
5
6
  *
6
7
  * The call starts nothing that runs code: no MCP server, hook, plugin, extension or project setting
7
8
  * (the maintainer's condition). NAMING_CALLS holds the argv of each harness where that is proven
@@ -18,7 +19,7 @@ import { join } from "node:path";
18
19
  import { killGroup } from "./process-group.mjs";
19
20
 
20
21
  /** The prompt's fixed words (the maintainer's wording); the task follows. */
21
- export const NAMING_PROMPT = "Name an agent for this task: 2–4 lowercase words joined by hyphens, describing the work, not the role. Reply with the name only.";
22
+ export const NAMING_PROMPT = "Name an agent for this task: <work>-<role>, at most five lowercase words joined by hyphens. First a few words for the work, then, last, one word for the agent's role as the task gives it; if the task gives no role, one word for what the agent does in it. Reply with the name only.";
22
23
  /** The task text the prompt carries, in characters (code points). */
23
24
  export const NAMING_TASK_MAX = 4000;
24
25
  /** The call's limits: the time after which its process group is killed, and the stdout read. */
@@ -28,55 +29,37 @@ export const NAMING_OUTPUT_MAX = 4096;
28
29
  export const NAMING_REASONS = Object.freeze(["no-task", "unsupported-harness", "timeout", "harness-failed", "invalid-reply"]);
29
30
  /** Instance names are at most this long (lib/core.mjs MAX_INSTANCE_NAME, the messaging alias's limit). */
30
31
  const NAME_MAX = 64;
31
- /** The descriptive part keeps at most this many words. */
32
- const WORDS_MAX = 4;
32
+ /** A name keeps at most this many words, the role included. */
33
+ const WORDS_MAX = 5;
33
34
 
34
35
  /** The prompt for `task`: the fixed words, then the task, cut to NAMING_TASK_MAX characters. */
35
36
  export function namingPrompt(task) {
36
37
  return `${NAMING_PROMPT}\n\nTask:\n${Array.from(String(task)).slice(0, NAMING_TASK_MAX).join("")}`;
37
38
  }
38
39
 
39
- /** The role of a soul name: its last `-`-separated word after any package qualifier (what follows the
40
- * last `/` or `--`); '' when there is none. The clients' rule (packages/client/instance-name.mjs
41
- * soulRole), kept here because the kernel imports nothing from packages/: test/instance-naming.test.mjs
42
- * pins it to the clients' cases (test/client-instance-name.test.mjs ROLE_CASES). */
43
- export function soulRole(soulName) {
44
- if (typeof soulName !== "string") return "";
45
- const slash = soulName.lastIndexOf("/"), dashes = soulName.lastIndexOf("--");
46
- const bare = soulName.slice(Math.max(slash < 0 ? 0 : slash + 1, dashes < 0 ? 0 : dashes + 2));
47
- return bare.slice(bare.lastIndexOf("-") + 1);
48
- }
49
-
50
40
  /** lib/core.mjs slug() without its "agent" fallback: lowercase letters and digits, single dashes. */
51
41
  const slugWords = (text) => String(text).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").split("-").filter(Boolean);
52
42
 
53
- /** The descriptive words of a reply: its first non-empty line as a slug, without one or more trailing
54
- * `-<role>` (a role the model adds is not doubled; a reply that is only the role describes no work),
55
- * at most WORDS_MAX words, cut at a word boundary to fit `NAME_MAX − 1 − len(role)`. [] when nothing
56
- * is left: an invalid reply. */
57
- export function descriptiveWords(reply, role) {
43
+ /** The name in a model's `reply`: its first non-empty line as slug words, the last of them the role,
44
+ * always kept. Over WORDS_MAX words, or over NAME_MAX characters with any suffix, the descriptive words
45
+ * nearest the role are dropped, and the first word's characters are cut only when it is the one
46
+ * descriptive word left. Unique by `-2`, `-3`, … at the end while `taken(name)` (an instance or a soul
47
+ * of the deployment, or a live window: what an explicit name is refused for). null when the line holds
48
+ * fewer than two words (no work and role), or when the role and suffix leave no room for one
49
+ * character of the first word: an invalid reply. */
50
+ export function nameFromReply(reply, taken) {
58
51
  const line = String(reply ?? "").split(/\r?\n/).find((l) => l.trim()) ?? "";
59
52
  const words = slugWords(line);
60
- while (role && words.length && words[words.length - 1] === role) words.pop();
61
- const kept = words.slice(0, WORDS_MAX);
62
- const budget = NAME_MAX - (role ? role.length + 1 : 0);
63
- while (kept.length && kept.join("-").length > budget) kept.pop();
64
- return kept;
65
- }
66
-
67
- /** The name for `words` and `role`: `<descriptive>-<role>`, made unique by `-2`, `-3`, … while
68
- * `taken(name)` (an instance or a soul of the deployment, or a live window: what an explicit name
69
- * is refused for). A suffix that would pass NAME_MAX drops a descriptive word first, and cuts the
70
- * last one only when one word is left. null for no words. */
71
- export function uniqueName(words, role, taken) {
72
- if (!words.length) return null;
73
- let kept = [...words];
53
+ if (words.length < 2) return null;
54
+ const role = words.pop();
55
+ let kept = words.slice(0, WORDS_MAX - 1);
74
56
  for (let i = 1; ; i++) {
75
57
  const suffix = i === 1 ? "" : `-${i}`;
76
- const fixed = (role ? role.length + 1 : 0) + suffix.length;
58
+ const fixed = role.length + 1 + suffix.length;
59
+ if (fixed + 1 > NAME_MAX) return null;
77
60
  while (kept.length > 1 && kept.join("-").length + fixed > NAME_MAX) kept.pop();
78
- if (kept.join("-").length + fixed > NAME_MAX) kept = [kept[0].slice(0, NAME_MAX - fixed).replace(/-+$/, "")];
79
- const name = `${kept.join("-")}${role ? `-${role}` : ""}${suffix}`;
61
+ if (kept[0].length + fixed > NAME_MAX) kept = [kept[0].slice(0, NAME_MAX - fixed)];
62
+ const name = `${kept.join("-")}-${role}${suffix}`;
80
63
  if (!taken(name)) return name;
81
64
  }
82
65
  }
@@ -174,14 +157,13 @@ export async function namingCall({ harness, bin, instanceModel, env, task, timeo
174
157
  return { answer: { source: "suggested", ms: ms(), harness, model }, reply: outcome.stdout };
175
158
  }
176
159
 
177
- /** The suggested name for `task`: the call, then the name built from its reply for `soulName`'s role,
178
- * unique by `taken`. → Promise of `{ naming, name? }`: `name` only when `naming.source` is
179
- * "suggested". Never rejects. */
180
- export async function suggestInstanceName({ soulName, taken, ...call }) {
160
+ /** The suggested name for `task`: the call, then the name in its reply (nameFromReply), unique by
161
+ * `taken`. → Promise of `{ naming, name? }`: `name` only when `naming.source` is "suggested". Never
162
+ * rejects. */
163
+ export async function suggestInstanceName({ taken, ...call }) {
181
164
  const { answer, reply } = await namingCall(call);
182
165
  if (answer.source !== "suggested") return { naming: answer };
183
- const role = soulRole(soulName);
184
- const name = uniqueName(descriptiveWords(reply, role), role, taken);
166
+ const name = nameFromReply(reply, taken);
185
167
  if (!name) return { naming: numbered("invalid-reply", `${call.harness}'s reply holds no name`, answer.ms) };
186
168
  return { naming: answer, name };
187
169
  }
package/lib/packages.mjs CHANGED
@@ -36,10 +36,6 @@
36
36
  *
37
37
  * A lock written before 0.26.0 may still carry an `approved` record per entry:
38
38
  * it is read with the field ignored, and the next write drops it.
39
- *
40
- * Deprecated shims: every name the 0.24 kernel still imports from this module
41
- * is exported below as a thin function throwing E_REMOVED so nothing breaks at
42
- * import time; callers are deleted in the next phase.
43
39
  */
44
40
  import { existsSync, mkdtempSync, readFileSync, rmSync, lstatSync } from "node:fs";
45
41
  import { tmpdir } from "node:os";
@@ -68,7 +64,6 @@ const SOUL_NAME_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
68
64
  /** The one symlink a soul source may carry: its CLAUDE.md → AGENTS.md alias (at the soul's root).
69
65
  * Sync and spawn fetch a package soul with this same predicate, so their digests agree. */
70
66
  export const SOUL_ALIAS_SYMLINK = (p) => p === "CLAUDE.md";
71
- const CONTRACT_DOC = "docs/design/2026-09-23-workspace-module-contracts.md";
72
67
 
73
68
  /** `oatsError` with details attached as BOTH `e.provenance` (today's field) and
74
69
  * `e.details` (the contract's name) so callers can read either. */
@@ -657,41 +652,3 @@ export function packageProviding(lock, capName) {
657
652
  }
658
653
  return { id: providers[0], entry: lock.packages[providers[0]] };
659
654
  }
660
-
661
- // ---------- deprecated shims (phase A only; callers are deleted next phase) ----------
662
-
663
- const removed = (name) => function removedByWorkspaceModel() {
664
- throw oatsError("E_REMOVED", `${name} was removed by the workspace model; see ${CONTRACT_DOC}`, { name, contract: CONTRACT_DOC });
665
- };
666
-
667
- export const aggregateMissingRequirements = removed("aggregateMissingRequirements");
668
- export const applyConfigMerge = removed("applyConfigMerge");
669
- export const applyFromOasScope = removed("applyFromOasScope");
670
- export const beginRunJournal = removed("beginRunJournal");
671
- export const capabilityRuntimeTargets = removed("capabilityRuntimeTargets");
672
- export const commandOnPath = removed("commandOnPath");
673
- export const discoverMigrationScopes = removed("discoverMigrationScopes");
674
- export const discoverOasScopes = removed("discoverOasScopes");
675
- export const discoverWorkspaceScopes = removed("discoverWorkspaceScopes");
676
- export const lockedPackageCapabilities = removed("lockedPackageCapabilities");
677
- export const normalizeRequirement = removed("normalizeRequirement");
678
- export const oasRenameMap = removed("oasRenameMap");
679
- export const packageSpecIdentity = removed("packageSpecIdentity");
680
- export const planConfigMerge = removed("planConfigMerge");
681
- export const planFromOasScope = removed("planFromOasScope");
682
- export const readAdoptedTemplate = removed("readAdoptedTemplate");
683
- export const requirementInstallPlan = removed("requirementInstallPlan");
684
- export const runRequirementInstall = removed("runRequirementInstall");
685
- export const runtimePackageInstalled = removed("runtimePackageInstalled");
686
- export const runtimePackageStatus = removed("runtimePackageStatus");
687
- export const selectConfigTemplate = removed("selectConfigTemplate");
688
- export const splitConfigLines = removed("splitConfigLines");
689
- export const transformOasConfigText = removed("transformOasConfigText");
690
- export const validateConfigTemplate = removed("validateConfigTemplate");
691
- export const writeAdoptedTemplate = removed("writeAdoptedTemplate");
692
- export const adoptedTemplateDir = removed("adoptedTemplateDir");
693
- /** Was a constant table; any property access throws E_REMOVED. */
694
- export const REQUIREMENT_MANAGERS = new Proxy(Object.freeze({}), {
695
- get(_t, prop) { if (typeof prop === "symbol" || prop === "then") return undefined; removed("REQUIREMENT_MANAGERS")(); },
696
- has() { removed("REQUIREMENT_MANAGERS")(); },
697
- });
package/lib/pi-bridge.mjs CHANGED
@@ -103,18 +103,30 @@ export function planCliUpdate(installed, registry) {
103
103
  return { installed, registry, target: registry, ahead: false, step: { argv, display: argv.join(" ") } };
104
104
  }
105
105
 
106
- /** The line `oats update` prints under its steps when the CLI's install (`cli`, from
107
- * planCliUpdate) moves it to another minor or major version: a Desktop accepts a CLI up to its
108
- * own minor version and refuses a newer one (docs/upgrading.md, "Why the Desktop goes first").
109
- * Fixed text, whether or not a Desktop is installed here: one on another host, or installed
110
- * another way, would not be seen. Prerelease and build metadata do not count (0.56.0-rc.1 to
106
+ /** The last OATS Desktop with the hard CLI ceiling: it refuses every CLI newer than its own minor version.
107
+ * Every later Desktop accepts such a CLI and holds back what it was not tested with (oats-project/oats#1879,
108
+ * option 3). The release lane corrects this one value if another 0.69 patch ships before the soft ceiling;
109
+ * test/release-packaging.test.mjs and test/above-tested-wording.test.mjs read it from here. */
110
+ export const LAST_HARD_CEILING_DESKTOP = "0.69.17";
111
+
112
+ /** The line `oats update` prints under its steps when the CLI's install (`cli`, from planCliUpdate) moves
113
+ * it to another minor or major version. A Desktop accepts a newer CLI and holds back every change it was
114
+ * not tested with until it is updated (docs/upgrading.md, "Either order works"); its core sentence is the
115
+ * Desktop's own notice for the same version, written here because the kernel imports nothing of its
116
+ * clients (packages/client/above-tested-notice.mjs `heldBackSentence`; test/above-tested-wording.test.mjs
117
+ * holds the two equal). An older Desktop, one with the hard ceiling, refuses the CLI instead, which the
118
+ * line says after the core. Fixed text, whether or not a Desktop is installed here: one on another host,
119
+ * or installed another way, would not be seen. Prerelease and build metadata do not count (0.56.0-rc.1 to
111
120
  * 0.56.0 says nothing); an installed version that cannot be read is another minor.
112
121
  * → the line, or null when there is no install or it stays within the minor. */
113
122
  export function desktopFirstLine(cli) {
114
123
  if (!cli.step) return null;
115
124
  const from = parseVersion(cli.installed), to = parseVersion(cli.target);
116
125
  if (from && to && from.major === to.major && from.minor === to.minor) return null;
117
- return `OATS Desktop refuses a CLI newer than its own minor version: if you use it, install OATS Desktop ${cli.target} first.`;
126
+ const minor = to ? `${to.major}.${to.minor}` : cli.target;
127
+ return `An OATS Desktop older than ${minor} holds actions back with this CLI. `
128
+ + `Stop, Remove, schedules, triggers and every other change except Spawn, Start, Restart, colour and background are off until you install OATS Desktop ${cli.target}. `
129
+ + `(An OATS Desktop of ${LAST_HARD_CEILING_DESKTOP} or older refuses this CLI until then.)`;
118
130
  }
119
131
 
120
132
  /** The lookup `oats update` makes before any step, as arguments: the bridge's exact version on
package/lib/schedule.mjs CHANGED
@@ -21,6 +21,7 @@
21
21
  * succeeded. A launch whose side effects cannot be confirmed stays
22
22
  * `unknown`, its job blocked until `reconcile` proves what happened; it keeps
23
23
  * its host slot too, unless it is a command whose process exit was observed. */
24
+ import { hostRunAdmissionOpen, hostRunChildArgs } from "./host-run-admission.mjs";
24
25
  import { runScheduleCommand } from "./schedule-command.mjs";
25
26
  import { closeSync, constants as fsConstants, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
26
27
  import { createHash } from "node:crypto";
@@ -717,7 +718,7 @@ function spawnPreview(ws, def, { root, discover }, io) {
717
718
  if (context.error) throw scheduleError(context.error.code, context.error.message);
718
719
  if (String(def.agent).startsWith("-")) throw scheduleError("E_SCHEDULE_INVALID", `agent: ${JSON.stringify(def.agent)} is not a soul name`, { field: "agent" });
719
720
  const argv = ["spawn", def.agent, `--dir=${context.dir}`, ...(discover ? [] : [`--agents-root=${root}`]), "--preview", "--json", ...spawnSelectorArgs(def)];
720
- const r = runScheduleCommand(process.execPath, [io?.oatsBin || OATS_BIN, ...argv], { cwd: context.dir, timeout: io?.commandTimeoutMs || COMMAND_TIMEOUT_MS, graceMs: io?.commandGraceMs, maxBuffer: 16 * 1024 * 1024, env: childEnv() });
721
+ const r = runScheduleCommand(process.execPath, hostRunChildArgs(io?.oatsBin || OATS_BIN, argv, true), { cwd: context.dir, timeout: io?.commandTimeoutMs || COMMAND_TIMEOUT_MS, graceMs: io?.commandGraceMs, maxBuffer: 16 * 1024 * 1024, env: childEnv() });
721
722
  const unconfirmed = (message) => scheduleError("E_SPAWN_FAILED", message, { unconfirmed: true });
722
723
  if (r.interrupted === true) throw unconfirmed("the spawn preview was interrupted; its result is unconfirmed");
723
724
  if (r.error?.code === "ETIMEDOUT" || (r.status === null && ["SIGTERM", "SIGKILL"].includes(r.signal))) throw unconfirmed("the spawn preview timed out; its result is unconfirmed");
@@ -751,7 +752,7 @@ function spawnViaCli(ws, root, agent, opts, context, io) {
751
752
  writeFileSync(taskFile, opts.task, { mode: 0o600 });
752
753
  argv.push(`--task-file=${taskFile}`);
753
754
  let r;
754
- try { r = runScheduleCommand(process.execPath, [io?.oatsBin || OATS_BIN, ...argv], { cwd: context.dir, timeout: io?.commandTimeoutMs || COMMAND_TIMEOUT_MS, graceMs: io?.commandGraceMs, maxBuffer: 16 * 1024 * 1024, env: childEnv() }); }
755
+ try { r = runScheduleCommand(process.execPath, hostRunChildArgs(io?.oatsBin || OATS_BIN, argv, true), { cwd: context.dir, timeout: io?.commandTimeoutMs || COMMAND_TIMEOUT_MS, graceMs: io?.commandGraceMs, maxBuffer: 16 * 1024 * 1024, env: childEnv() }); }
755
756
  finally { try { rmSync(taskFile, { force: true }); } catch { /* best effort */ } }
756
757
  const interrupted = r.interrupted === true;
757
758
  const timedOut = r.error?.code === "ETIMEDOUT" || (!interrupted && r.status === null && ["SIGTERM", "SIGKILL"].includes(r.signal));
@@ -836,7 +837,7 @@ function launchCommand(ws, def, io) {
836
837
  let envelope, timedOut = false, interrupted = false, raw = "", exit;
837
838
  if (io?.command) { envelope = io.command({ cwd: def.cwd, argv }); exit = { status: null, signal: null }; }
838
839
  else {
839
- const r = runScheduleCommand(process.execPath, [io?.oatsBin || OATS_BIN, ...argv], { cwd: def.cwd, timeout: io?.commandTimeoutMs || COMMAND_TIMEOUT_MS, graceMs: io?.commandGraceMs, maxBuffer: 16 * 1024 * 1024, env: childEnv() });
840
+ const r = runScheduleCommand(process.execPath, hostRunChildArgs(io?.oatsBin || OATS_BIN, argv, true), { cwd: def.cwd, timeout: io?.commandTimeoutMs || COMMAND_TIMEOUT_MS, graceMs: io?.commandGraceMs, maxBuffer: 16 * 1024 * 1024, env: childEnv() });
840
841
  interrupted = r.interrupted === true;
841
842
  timedOut = r.error?.code === "ETIMEDOUT" || (!interrupted && r.status === null && ["SIGTERM", "SIGKILL"].includes(r.signal));
842
843
  if (r.status !== null || r.signal !== null) exit = { status: r.status, signal: r.signal };
@@ -1037,6 +1038,7 @@ export function tickWorkspace(ws, { now = new Date(), firedAt = now, io, reg, ws
1037
1038
  // skipped or pending job keeps its place at the front of the line.
1038
1039
  const order = (candidates || Object.keys(defs.jobs)).filter((id) => Object.prototype.hasOwnProperty.call(defs.jobs, id) && (!only || id === only)).sort((a, b) => launchOrderKey(st.jobs[a]).localeCompare(launchOrderKey(st.jobs[b])) || a.localeCompare(b));
1039
1040
  for (const id of order) {
1041
+ if (!dryRun && !hostRunAdmissionOpen()) break;
1040
1042
  const def = defs.jobs[id];
1041
1043
  const js = stateOf(id);
1042
1044
  let due, cronError;
package/lib/servers.mjs CHANGED
@@ -772,9 +772,10 @@ export function routeCommand(serverId, cmd, oatsArgs, io = {}) {
772
772
  let answer = refusal;
773
773
  try { answer ??= spawnOnHost(applyArgs); }
774
774
  catch (e) {
775
- // The link failed under a bound apply: the host may have started it. The decision and the key
776
- // travel with the failure, so the spawn sent again lands on that one instance.
777
- if (bound && e.code === "E_SSH" && e.details?.sshStarted !== false) {
775
+ // A bound apply that came back with no answer, because the link failed or the host's oats
776
+ // ended without one: the host may have started it. The decision and the key travel with the
777
+ // failure, so the spawn sent again lands on that one instance.
778
+ if (bound && ((e.code === "E_SSH" && e.details?.sshStarted !== false) || e.code === "E_REMOTE_ENVELOPE")) {
778
779
  const fix = `run the same spawn again with ${suggesting ? `--name ${bound.decision.instance} in place of --suggest-name, and ` : ""}--expect-decision ${bound.decision.revision} --idempotency-key ${bound.idempotencyKey}: it answers the instance this attempt created there, or creates it`;
779
780
  e.message = `${e.message}; the host may have started the spawn: ${fix}`;
780
781
  e.details = { ...e.details, decision: bound.decision, idempotencyKey: bound.idempotencyKey, fix };
@@ -101,3 +101,12 @@ export function lostReasonOf(home, meta) {
101
101
  const stop = stopOfCurrentStart(home, meta);
102
102
  return stop?.resume === true && stop.reason === HOST_STOP_REASON ? HOST_STOP_REASON : null;
103
103
  }
104
+
105
+ /** A current-start administrative stop's time, or null when the receipt cannot establish it.
106
+ * A future, pre-start or unreadable timestamp cannot relax the sweep's eligibility or budget. */
107
+ export function hostStoppedAt(home, meta, { now = Date.now() } = {}) {
108
+ const stop = stopOfCurrentStart(home, meta);
109
+ if (stop?.resume !== true || stop.reason !== HOST_STOP_REASON || typeof stop.at !== "string") return null;
110
+ const at = Date.parse(stop.at), startedAt = currentStartTime(meta);
111
+ return Number.isFinite(at) && Number.isFinite(startedAt) && at >= startedAt && at <= now ? at : null;
112
+ }
@@ -29,9 +29,13 @@
29
29
  * `fresh`, `blocked`), noted as soon as that start has answered, so a sweep that is killed while
30
30
  * other starts run has counted the ones that answered. `session start --resume` run by hand is
31
31
  * neither bounded nor counted.
32
+ * A current-start host-stop receipt identifies an administrative restore: a successful one
33
+ * bypasses the crash ceiling without spending or clearing the carried budget. A blocked or
34
+ * failed restore keeps its failure accounting, and eligibility/prior refusal checks still hold.
32
35
  * Without a boot id (neither Linux nor macOS) nothing is noted or counted: each sweep tries again.
33
36
  * The lock and the note are kernel-private, not a contract. `plan` predicts from the note, starting
34
37
  * nothing, taking no lock and writing no note. */
38
+ import { hostRunAdmissionOpen, hostRunChildArgs } from "./host-run-admission.mjs";
35
39
  import { execFile } from "node:child_process";
36
40
  import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
37
41
  import { join, resolve } from "node:path";
@@ -41,8 +45,9 @@ import { acquireDirLock, dirLockHeld, stuckLockRemedy } from "./dir-lock.mjs";
41
45
  import { homeClaimHolder, listInstances, launchEnvRefs, missingLaunchEnvRefs, owedRetireSaid, resumeConversation } from "./core.mjs";
42
46
  import { checkStartEnv, launchEnvChangedMessage, launchEnvMissingMessage, launchEnvUnverifiedWarning } from "./start-env.mjs";
43
47
  import { FRESH_REASON, NOT_SWEPT, OUTCOME, RESUME_WAITING, ROW_REASON, SESSION_END } from "./session-resume-contract.mjs";
44
- import { bootId, homeKey, judgeLosses, readSeen, resumeEligible, resumeStateDir, takenInAnotherBoot } from "./session-seen.mjs";
48
+ import { bootId, homeKey, judgeLosses, readSeen, resumeEligible, resumeStateDir, sameBoot, takenInAnotherBoot } from "./session-seen.mjs";
45
49
  import { isAgentScopeWarning } from "./tmux-server-scope.mjs";
50
+ import { hostStoppedAt as readHostStoppedAt } from "./session-end.mjs";
46
51
 
47
52
  export { bootId, resumeStateDir };
48
53
 
@@ -106,7 +111,7 @@ export function resumeLockProblem({ boot = bootId() } = {}) {
106
111
  * empty for another boot's note, an unreadable one, or no boot id. */
107
112
  export function readBootNote(boot = bootId()) {
108
113
  const note = boot ? readJson(notePath()) : undefined;
109
- if (!note || note.bootId !== boot) return { bootId: boot, refused: [], resumes: {} };
114
+ if (!note || !sameBoot(note.bootId, boot)) return { bootId: boot, refused: [], resumes: {} };
110
115
  const resumes = {};
111
116
  if (note.resumes && typeof note.resumes === "object" && !Array.isArray(note.resumes)) {
112
117
  for (const [home, n] of Object.entries(note.resumes)) if (Number.isSafeInteger(n) && n > 0) resumes[home] = n;
@@ -165,7 +170,7 @@ function readDeployment(dir) {
165
170
  * any refusal, and nothing brings it back automatically, a reboot included (decided for #1567);
166
171
  * naming it here would let the next boot retry it. */
167
172
  const NOT_JUDGED = new Set([ROW_REASON.LIFECYCLE_BUSY]);
168
- /** The outcomes of a start that launched something: the ones RESUME_LIMIT counts. */
173
+ /** Outcomes that can consume the crash budget; a successful host-stop restore is exempt below. */
169
174
  const LAUNCHED = new Set([OUTCOME.RESUMED, OUTCOME.FRESH, OUTCOME.BLOCKED]);
170
175
  const base = (row) => ({ deployment: row.deployment, instance: row.instance, home: row.home });
171
176
 
@@ -215,7 +220,7 @@ function startEnvironment(env) {
215
220
  * Never rejects. */
216
221
  export function kernelAnswer({ execPath, bin, env }, argv, { cwd, code, what }) {
217
222
  return new Promise((done) => {
218
- execFile(execPath, [bin, ...argv], { cwd, env: startEnvironment(env), encoding: "utf8", maxBuffer: 16 * 1024 * 1024 }, (error, stdout) => {
223
+ execFile(execPath, hostRunChildArgs(bin, argv), { cwd, env: startEnvironment(env), encoding: "utf8", maxBuffer: 16 * 1024 * 1024 }, (error, stdout) => {
219
224
  let answer;
220
225
  try { answer = JSON.parse(String(stdout).trim().split("\n").pop()); } catch { answer = undefined; }
221
226
  if (!answer || typeof answer !== "object") answer = { ok: false, error: { code, message: `${what} exited${error?.code !== undefined ? ` with status ${error.code}` : ""}${error?.signal ? ` on ${error.signal}` : ""} without an answer` } };
@@ -258,7 +263,7 @@ export async function resumeSessions({ deployment, plan = false, kernel, env = p
258
263
  }
259
264
  }
260
265
  const note = readBootNote(boot), now = Date.now();
261
- const toStart = [];
266
+ const toStart = [], hostStopped = new Set();
262
267
  // Precedence, the first that applies: not seen recently, refused this boot, keeps getting lost,
263
268
  // started. The record and the note name a home by its real path (homeKey), whatever spelling the
264
269
  // sweep was given; a row shows the path it listed.
@@ -268,12 +273,17 @@ export async function resumeSessions({ deployment, plan = false, kernel, env = p
268
273
  for (const row of candidates) {
269
274
  const startId = row.startId ?? null, key = homeKey(row.home);
270
275
  const prior = note.refused.find((r) => r.home === key && (r.startId ?? null) === startId);
271
- const fit = resumeEligible(seen.get(key), row, { now });
276
+ const record = seen.get(key), at = readHostStoppedAt(row.home, row, { now });
277
+ const hostStoppedAt = at !== null && at <= Date.parse(record?.firstNotRunningAt) ? at : null;
278
+ const fit = resumeEligible(record, row, { now, hostStoppedAt });
272
279
  const busy = lifecycleBusy(row);
280
+ // A recorded stop of this start with the host is administrative, not another crash.
281
+ // Keep the crash budget, but neither charge a successful restore nor let it prevent one.
282
+ if (hostStoppedAt !== null) hostStopped.add(key);
273
283
  if (busy) rows.push({ ...base(row), outcome: OUTCOME.SKIPPED, reason: ROW_REASON.LIFECYCLE_BUSY, message: busy });
274
284
  else if (!fit.eligible) rows.push({ ...base(row), outcome: OUTCOME.SKIPPED, reason: ROW_REASON.NOT_SEEN_RECENTLY, message: `${row.instance} is not resumed automatically: ${fit.why}; start it by hand (oats session start --resume --home ${row.home}) if it should run` });
275
285
  else if (prior) rows.push({ ...base(row), outcome: OUTCOME.REFUSED, reason: ROW_REASON.REFUSED_THIS_BOOT, code: prior.code, message: prior.message });
276
- else if ((note.resumes[key] ?? 0) >= RESUME_LIMIT) rows.push({ ...base(row), outcome: OUTCOME.REFUSED, reason: ROW_REASON.KEEPS_GETTING_LOST, message: `${row.instance} was resumed ${note.resumes[key]} times in this boot and was lost again each time; no sweep starts this loss again: start it by hand (oats session start --resume --home ${row.home})` });
286
+ else if (!hostStopped.has(key) && (note.resumes[key] ?? 0) >= RESUME_LIMIT) rows.push({ ...base(row), outcome: OUTCOME.REFUSED, reason: ROW_REASON.KEEPS_GETTING_LOST, message: `${row.instance} was resumed ${note.resumes[key]} times in this boot and was lost again each time; no sweep starts this loss again: start it by hand (oats session start --resume --home ${row.home})` });
277
287
  else if (plan) rows.push(predicted(row, env));
278
288
  else toStart.push(row);
279
289
  }
@@ -294,11 +304,11 @@ export async function resumeSessions({ deployment, plan = false, kernel, env = p
294
304
  try {
295
305
  noteSweep({
296
306
  refusals: answered.outcome === OUTCOME.REFUSED ? [{ home: key, startId: row.startId ?? null, code: answered.code, message: answered.message, at: new Date().toISOString() }] : [],
297
- launched: LAUNCHED.has(answered.outcome) ? [key] : [],
307
+ launched: LAUNCHED.has(answered.outcome) && (!hostStopped.has(key) || answered.outcome === OUTCOME.BLOCKED) ? [key] : [],
298
308
  }, boot);
299
309
  } catch (e) { noteFailure ??= e; }
300
310
  return answered;
301
- }, () => noteFailure !== null)).filter(Boolean);
311
+ }, () => noteFailure !== null || !hostRunAdmissionOpen())).filter(Boolean);
302
312
  rows.push(...started);
303
313
  // Each lost home this sweep answered is judged: no later sweep resumes this loss (a status read
304
314
  // never uses one up). A plan judges nothing.
@@ -21,9 +21,9 @@ import { createHash, randomBytes } from "node:crypto";
21
21
  import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
22
22
  import { homedir } from "node:os";
23
23
  import { dirname, join, resolve } from "node:path";
24
- import { thisBoot } from "../packages/record/lib/process-identity.mjs";
24
+ import { sameBoot, thisBoot } from "../packages/record/lib/process-identity.mjs";
25
25
 
26
- export { bootId, identityHolderState, namesIdentity, takenInAnotherBoot, thisBoot, validPid } from "../packages/record/lib/process-identity.mjs";
26
+ export { bootId, identityHolderState, namesIdentity, sameBoot, takenInAnotherBoot, thisBoot, validPid } from "../packages/record/lib/process-identity.mjs";
27
27
 
28
28
  /** A loss first seen this long ago or more is not resumed. */
29
29
  export const FIRST_SEEN_MAX_MS = 24 * 60 * 60_000;
@@ -88,7 +88,7 @@ export function nextSeen(homes, rows, { now, boot }) {
88
88
  let next = prior;
89
89
  if (row.running === true) {
90
90
  if (!prior || prior.startId !== startId) next = { startId, lastSeenRunningAt: at, lastSeenRunningBoot: boot, firstNotRunningAt: null, firstNotRunningBoot: null, judgedBy: null };
91
- else if (!(now - Date.parse(prior.lastSeenRunningAt) < RUNNING_REFRESH_MS) || prior.lastSeenRunningBoot !== boot) next = { ...prior, lastSeenRunningAt: at, lastSeenRunningBoot: boot };
91
+ else if (!(now - Date.parse(prior.lastSeenRunningAt) < RUNNING_REFRESH_MS) || (prior.lastSeenRunningBoot !== boot && !sameBoot(prior.lastSeenRunningBoot, boot))) next = { ...prior, lastSeenRunningAt: at, lastSeenRunningBoot: boot };
92
92
  } else if (row.running === false && row.launched === true && prior && prior.startId === startId && !prior.firstNotRunningAt) {
93
93
  next = { ...prior, firstNotRunningAt: at, firstNotRunningBoot: boot };
94
94
  }
@@ -135,10 +135,11 @@ export function judgeLosses(root, judged, { now = Date.now(), boot = thisBoot()
135
135
  * 2. no earlier sweep judged this loss (`judgedBy`);
136
136
  * 3. the loss was first seen less than FIRST_SEEN_MAX_MS ago;
137
137
  * 4. within one boot (both looks in the same boot, or either without a boot id), the last running
138
- * look is less than WITHIN_BOOT_GAP_MS before the first not-running look. Across a reboot it
139
- * does not apply.
138
+ * look is less than WITHIN_BOOT_GAP_MS before the loss. A validated current-start host stop
139
+ * (`hostStoppedAt`) establishes that moment before downtime; otherwise the first not-running
140
+ * look does. Across a kernel reboot this gap clause does not apply.
140
141
  * The rule reads the boots the record holds, not this one's. Pure. */
141
- export function resumeEligible(record, row, { now }) {
142
+ export function resumeEligible(record, row, { now, hostStoppedAt = null }) {
142
143
  const no = (why) => ({ eligible: false, why });
143
144
  const lastRunning = Date.parse(record?.lastSeenRunningAt);
144
145
  if (!record || record.startId !== startIdOf(row) || !Number.isFinite(lastRunning)) return no("OATS never saw it running for its current start");
@@ -146,7 +147,11 @@ export function resumeEligible(record, row, { now }) {
146
147
  const firstLost = Date.parse(record.firstNotRunningAt);
147
148
  if (!Number.isFinite(firstLost)) return no("OATS has not seen it stop since it last saw it running");
148
149
  if (now - firstLost >= FIRST_SEEN_MAX_MS) return no(`its loss was first seen ${record.firstNotRunningAt}, 24 hours ago or more`);
149
- const oneBoot = !record.lastSeenRunningBoot || !record.firstNotRunningBoot || record.lastSeenRunningBoot === record.firstNotRunningBoot;
150
- if (oneBoot && firstLost - lastRunning >= WITHIN_BOOT_GAP_MS) return no(`in the boot it was lost in, it was last seen running ${record.lastSeenRunningAt}, 24 hours or more before its loss was seen`);
150
+ const oneBoot = !record.lastSeenRunningBoot || !record.firstNotRunningBoot || sameBoot(record.lastSeenRunningBoot, record.firstNotRunningBoot);
151
+ // A validated host stop establishes the loss before downtime. Keep the separate age of the
152
+ // first observation above, and every other guard. A listing during stop grace can still see
153
+ // the harness running after its receipt; that establishes no gap, not an invalid receipt.
154
+ const gapEnd = Number.isFinite(hostStoppedAt) && hostStoppedAt <= firstLost && hostStoppedAt <= now ? Math.max(lastRunning, hostStoppedAt) : firstLost;
155
+ if (oneBoot && gapEnd - lastRunning >= WITHIN_BOOT_GAP_MS) return no(`in the boot it was lost in, it was last seen running ${record.lastSeenRunningAt}, 24 hours or more before its loss was seen`);
151
156
  return { eligible: true };
152
157
  }
package/lib/triggers.mjs CHANGED
@@ -34,6 +34,7 @@
34
34
  * test/trigger-pipeline-fixture.test.mjs pins the built-in's state and outputs byte for byte.
35
35
  *
36
36
  * State: <scope>/.agents/schedules/triggers.json (gitignored with the schedule state). */
37
+ import { hostRunAdmissionOpen, hostRunChildArgs } from "./host-run-admission.mjs";
37
38
  import { spawnSync } from "node:child_process";
38
39
  import { createHash } from "node:crypto";
39
40
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
@@ -792,7 +793,7 @@ function retainFired(ts) {
792
793
  /** Run a child `oats` in the deployment: COMMAND_TIMEOUT_MS and SIGTERM unless `timeoutMs` and
793
794
  * `killSignal` say otherwise; `env` adds to the child's environment. */
794
795
  function runOats(ws, argv, io, { timeoutMs = io?.commandTimeoutMs || COMMAND_TIMEOUT_MS, killSignal = "SIGTERM", env = {} } = {}) {
795
- const r = spawnSync(process.execPath, [io?.oatsBin || OATS_BIN, ...argv], { cwd: ws, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], timeout: timeoutMs, killSignal, maxBuffer: 16 * 1024 * 1024, env: { ...childEnv(), ...env } });
796
+ const r = spawnSync(process.execPath, hostRunChildArgs(io?.oatsBin || OATS_BIN, argv), { cwd: ws, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], timeout: timeoutMs, killSignal, maxBuffer: 16 * 1024 * 1024, env: { ...childEnv(), ...env } });
796
797
  const timedOut = r.error?.code === "ETIMEDOUT" || (r.status === null && r.signal === killSignal);
797
798
  return { envelope: parseEnvelopeText(r.stdout), timedOut, status: r.status, stderr: String(r.stderr || "") };
798
799
  }
@@ -901,6 +902,7 @@ function firePending(ws, def, work, queue, { now, io, dryRun, host, rec }) {
901
902
  const live = liveTriggerInstances(ws, def.qid ?? def.id);
902
903
  let pv = null;
903
904
  for (const ev of queue) {
905
+ if (!dryRun && !hostRunAdmissionOpen()) break;
904
906
  const held = heldBy(def, ev, live) ?? (host.cap && host.live >= host.cap ? `host triggersMaxConcurrent ${host.cap} reached (${host.live} live)` : null);
905
907
  if (held) { rec("held", { key: ev.key, reason: held }); continue; }
906
908
  pv ??= previewSoul(ws, def, io);
package/lib/worktree.mjs CHANGED
@@ -506,6 +506,9 @@ export async function worktreeAdd(homeArg, o = {}) {
506
506
  const hooks = worktreeHooksOf(meta.capabilityRuntime);
507
507
  const want = { clone, branch, base };
508
508
  const unknownAdder = (found, reason) => unknownAdderRefusal({ purpose, tree, recPath, rec: found, reason });
509
+ // E_BRANCH_EXISTS's remedy and details, one construction for the precheck and the race path (#1865).
510
+ const remedy = `${meta.instance ?? basename(home)}/${branch}`;
511
+ const branchExists = (why) => ({ message: `${why}; a tree never reuses or resets a branch — name another, e.g. ${remedy}`, details: { branch, clone, remedy } });
509
512
  // What the record says, read under the claim when this add acts on it (the preview only reads).
510
513
  const decide = () => {
511
514
  const found = readRecord(recPath);
@@ -532,7 +535,7 @@ export async function worktreeAdd(homeArg, o = {}) {
532
535
  ? `${tree} exists and is ${st.isSymbolicLink() ? "a symbolic link" : "not a directory"}; it is never followed or replaced — use another --purpose`
533
536
  : `${tree} exists and no oats worktree add made it (no record); use another --purpose, or remove that tree yourself (git worktree remove ${tree})`), { details: { purpose, path: tree } });
534
537
  const exists = git(["-C", clone, "rev-parse", "--verify", "--quiet", "--end-of-options", `refs/heads/${branch}`]);
535
- if (exists.ok) throw Object.assign(oatsError("E_BRANCH_EXISTS", `branch ${branch} already exists in ${clone}; a tree never reuses or resets a branch — name another, e.g. ${meta.instance ?? basename(home)}/${branch}`), { details: { branch, clone, remedy: `${meta.instance ?? basename(home)}/${branch}` } });
538
+ if (exists.ok) { const r = branchExists(`branch ${branch} already exists in ${clone}`); throw Object.assign(oatsError("E_BRANCH_EXISTS", r.message), { details: r.details }); }
536
539
  };
537
540
 
538
541
  if (o.preview) {
@@ -594,7 +597,7 @@ export async function worktreeAdd(homeArg, o = {}) {
594
597
  if (!sw.ok) {
595
598
  // Another add created the branch first (the precheck passed for both): that is E_BRANCH_EXISTS; any other failure is git's.
596
599
  const taken = git(["-C", clone, "rev-parse", "--verify", "--quiet", "--end-of-options", `refs/heads/${branch}`]).ok;
597
- if (taken) throw await fail("E_BRANCH_EXISTS", `git switch -c ${branch} failed: ${firstLine(sw.err)}`, { branch });
600
+ if (taken) { const r = branchExists(`git switch -c ${branch} failed: ${firstLine(sw.err)}`); throw await fail("E_BRANCH_EXISTS", r.message, r.details); }
598
601
  throw await fail("E_GIT_FAILED", `git switch failed in ${tree}: ${firstLine(sw.err) || "unknown error"}`, { branch });
599
602
  }
600
603
  rec = { ...rec, branchCreated: true };
@@ -3,12 +3,12 @@
3
3
  "packages": {
4
4
  "oats.okf": {
5
5
  "url": "https://github.com/awebai/oats-okf.git",
6
- "ref": "v6.0.1",
6
+ "ref": "v6.0.3",
7
7
  "path": "oats-package"
8
8
  },
9
9
  "oats.aweb": {
10
10
  "url": "https://github.com/awebai/oats-aweb.git",
11
- "ref": "v1.39.0",
11
+ "ref": "v1.41.0",
12
12
  "path": "oats-package"
13
13
  },
14
14
  "oats.jira": {
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "oats.framework": {
50
50
  "url": "https://github.com/awebai/oats.git",
51
- "ref": "oats-framework/v1.24.0",
51
+ "ref": "oats-framework/v1.25.0",
52
52
  "path": "oats-package"
53
53
  }
54
54
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awebai/oats",
3
- "version": "0.69.16",
3
+ "version": "0.69.18",
4
4
  "description": "OATS (Open Agent Team Specification) — durable souls, disposable instances, targetable capability packages, and the runtime-neutral oats CLI/kernel.",
5
5
  "keywords": [
6
6
  "agents",
@@ -52,7 +52,6 @@
52
52
  "packages/tui/package.json"
53
53
  ],
54
54
  "dependencies": {
55
- "@awebai/pi": "^0.2.1",
56
55
  "croner": "10.0.1",
57
56
  "yaml": "2.9.1"
58
57
  },
@@ -60,6 +59,7 @@
60
59
  "oats": "./bin/oats.mjs"
61
60
  },
62
61
  "devDependencies": {
62
+ "@earendil-works/pi-coding-agent": "0.80.3",
63
63
  "ajv": "8.17.1"
64
64
  }
65
65
  }
@@ -0,0 +1,30 @@
1
+ /* The one sentence a client says when its oats CLI is above its tested bound (oats-project/oats#1879,
2
+ option 3): why, what is held back, and which Desktop to install. Every place that shows the notice or
3
+ refuses a held-back operation builds its words here, so they cannot drift apart.
4
+
5
+ The kernel cannot import this module (lib/ never imports packages/): `oats update` writes the same core
6
+ sentence itself (lib/pi-bridge.mjs `desktopFirstLine`), and test/above-tested-wording.test.mjs holds
7
+ the two equal for the same version.
8
+
9
+ Pure data and strings; no node: imports, so the renderer shares it with the server. */
10
+
11
+ /** The held-back core, verbatim as decided on #1879: the Desktop to install is the installed CLI's own
12
+ * version, since Desktop and kernel are released together from one tag. */
13
+ export function heldBackSentence(cliVersion) {
14
+ return `Stop, Remove, schedules, triggers and every other change except Spawn, Start, Restart, colour and background are off until you install OATS Desktop ${cliVersion}.`;
15
+ }
16
+
17
+ /** The why, before the core: the tested bound ("X.Y") and the installed CLI's version. */
18
+ export function testedWhySentence(testedThrough, cliVersion) {
19
+ return `This Desktop was tested with oats CLIs up to ${testedThrough}; the installed CLI is ${cliVersion}.`;
20
+ }
21
+
22
+ /** The notice: one line, the why then the core. */
23
+ export function aboveTestedNotice({ cliVersion, testedThrough }) {
24
+ return `${testedWhySentence(testedThrough, cliVersion)} ${heldBackSentence(cliVersion)}`;
25
+ }
26
+
27
+ /** The GitHub Release whose assets are the Desktop of that version (docs/desktop.md, "Install"). */
28
+ export function desktopReleaseUrl(version) {
29
+ return `https://github.com/oats-project/oats/releases/tag/v${version}`;
30
+ }