@nordhavnhq/runner 0.104.0 → 0.105.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 (47) hide show
  1. package/dist/runtime/up.js +27 -8
  2. package/dist/tools/console.js +1 -1
  3. package/dist/tools/http.js +4 -4
  4. package/dist/version.json +3 -3
  5. package/node_modules/@nordhavnhq/runner-browser/dist/show.js +1 -1
  6. package/node_modules/@nordhavnhq/runner-browser/package.json +1 -1
  7. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/batch.d.ts +7 -7
  8. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/batch.js +16 -15
  9. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/calls.d.ts +2 -2
  10. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/calls.js +4 -3
  11. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/loop.d.ts +17 -17
  12. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/loop.js +35 -34
  13. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/phases.d.ts +12 -12
  14. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/phases.js +14 -13
  15. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/pins.d.ts +3 -3
  16. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/pins.js +9 -9
  17. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/tool-names.d.ts +24 -5
  18. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/tool-names.js +36 -9
  19. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/version.d.ts +1 -1
  20. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/version.js +1 -1
  21. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/wire.d.ts +16 -8
  22. package/node_modules/@nordhavnhq/runner-runtime/dist/contract/wire.js +8 -0
  23. package/node_modules/@nordhavnhq/runner-runtime/dist/index.d.ts +1 -0
  24. package/node_modules/@nordhavnhq/runner-runtime/dist/index.js +1 -0
  25. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/auto-load.d.ts +3 -3
  26. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/auto-load.js +5 -4
  27. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/extract-json.d.ts +1 -1
  28. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/extract-json.js +1 -1
  29. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/handle-chat.js +6 -6
  30. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/handle-task.js +14 -14
  31. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/loop.d.ts +6 -6
  32. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/loop.js +12 -11
  33. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/phased-loop.js +2 -1
  34. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/run-tools.d.ts +1 -1
  35. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/run-tools.js +1 -1
  36. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/scratch-prompt.js +1 -1
  37. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/task-validation.d.ts +2 -2
  38. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/task-validation.js +2 -2
  39. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/unload-toolset.d.ts +5 -5
  40. package/node_modules/@nordhavnhq/runner-runtime/dist/runtime/unload-toolset.js +18 -17
  41. package/node_modules/@nordhavnhq/runner-runtime/dist/tools/delegate.d.ts +2 -2
  42. package/node_modules/@nordhavnhq/runner-runtime/dist/tools/delegate.js +3 -3
  43. package/node_modules/@nordhavnhq/runner-runtime/dist/tools/index.d.ts +3 -3
  44. package/node_modules/@nordhavnhq/runner-runtime/dist/tools/mcp.d.ts +1 -1
  45. package/node_modules/@nordhavnhq/runner-runtime/dist/tools/mcp.js +5 -4
  46. package/node_modules/@nordhavnhq/runner-runtime/package.json +1 -1
  47. package/package.json +3 -3
@@ -3,7 +3,7 @@ import { existsSync, mkdirSync, realpathSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import { rename } from 'node:fs/promises';
5
5
  import { connectWebSocket, sendWsPing, sendWsConfig, releaseQueuedFrames, supersedeChatRun, checkWsAlive, wsLifecycle, sendWsChatTitle, sendWsFsResult, sendWsProcState, sendWsProcOutput, sendWsProcSync, sendWsPreviewRequest, sendWsBrowser, } from '@nordhavnhq/runner-runtime';
6
- import { RECONNECT_BASE_DELAY_MS, RECONNECT_MAX_DELAY_MS, CLOSE_SERVICE_RESTART, RESTART_RECONNECT_BASE_DELAY_MS, RESTART_RECONNECT_MAX_DELAY_MS, RESTART_FAST_ATTEMPTS, FATAL_CLOSE_CODES, fatalCloseHint, } from '@nordhavnhq/runner-runtime';
6
+ import { RECONNECT_BASE_DELAY_MS, RECONNECT_MAX_DELAY_MS, CLOSE_SERVICE_RESTART, RESTART_RECONNECT_BASE_DELAY_MS, RESTART_RECONNECT_MAX_DELAY_MS, RESTART_FAST_ATTEMPTS, FATAL_CLOSE_CODES, fatalCloseHint, CLOSE_RUNNER_TOO_OLD, } from '@nordhavnhq/runner-runtime';
7
7
  import { RUNTIME_HANDLED_TOOLS } from '@nordhavnhq/runner-runtime';
8
8
  import { createHandleChat } from '@nordhavnhq/runner-runtime';
9
9
  import { createHandleTask } from '@nordhavnhq/runner-runtime';
@@ -636,6 +636,8 @@ export async function up(opts) {
636
636
  // kept until the agent is connected again: the attempts in between fail
637
637
  // with other codes and must stay on the fast schedule.
638
638
  let studioRestarting = false;
639
+ // A `CLOSE_RUNNER_TOO_OLD` refusal is logged once, not on every retry.
640
+ let tooOldNoticeShown = false;
639
641
  // Every (host token, agent token) pair this agent has already presented.
640
642
  // `recoverOrStop` retries a fatal close only with a pair that is genuinely
641
643
  // new, which is what keeps "the operator repaired the pairing" apart from
@@ -676,16 +678,20 @@ export async function up(opts) {
676
678
  // stop is what was holding the banner back.
677
679
  maybeShowWelcome();
678
680
  };
679
- const scheduleReconnect = (cfg, reason) => {
681
+ // `slow` waits the longest backoff at once: for a refusal that a retry
682
+ // only resolves once the runner has updated itself.
683
+ const scheduleReconnect = (cfg, reason, slow = false) => {
680
684
  if (reconnectTimer)
681
685
  clearTimeout(reconnectTimer);
682
686
  setStatus(ref, { status: 'reconnecting' });
683
687
  const attempt = (reconnectAttempts.get(ref) ?? 0) + 1;
684
688
  reconnectAttempts.set(ref, attempt);
685
- const fast = studioRestarting && attempt <= RESTART_FAST_ATTEMPTS;
686
- const delay = fast
687
- ? Math.min(RESTART_RECONNECT_MAX_DELAY_MS, RESTART_RECONNECT_BASE_DELAY_MS * 2 ** (attempt - 1))
688
- : Math.min(RECONNECT_MAX_DELAY_MS, RECONNECT_BASE_DELAY_MS * 2 ** (attempt - 1));
689
+ const fast = !slow && studioRestarting && attempt <= RESTART_FAST_ATTEMPTS;
690
+ const delay = slow
691
+ ? RECONNECT_MAX_DELAY_MS
692
+ : fast
693
+ ? Math.min(RESTART_RECONNECT_MAX_DELAY_MS, RESTART_RECONNECT_BASE_DELAY_MS * 2 ** (attempt - 1))
694
+ : Math.min(RECONNECT_MAX_DELAY_MS, RECONNECT_BASE_DELAY_MS * 2 ** (attempt - 1));
689
695
  const jitter = Math.round(delay * (0.8 + Math.random() * 0.4));
690
696
  log('↻', ref, `reconnecting in ${jitter}ms (attempt ${attempt})`);
691
697
  emitEvent({ kind: 'ws.reconnect', agentSlug: agent.slug, attempt, delayMs: jitter, reason });
@@ -1121,6 +1127,19 @@ export async function up(opts) {
1121
1127
  void recoverOrStop(cfg, code, reason);
1122
1128
  return;
1123
1129
  }
1130
+ // The studio needs a newer runner. Not fatal: the `connected` frame
1131
+ // before the close announced the latest release, so a release
1132
+ // install updates itself and restarts. Every attempt connects first
1133
+ // (which resets the backoff), so retry at the slowest pace instead
1134
+ // of a tight loop, and say once what the operator has to do.
1135
+ if (code === CLOSE_RUNNER_TOO_OLD) {
1136
+ if (!tooOldNoticeShown) {
1137
+ tooOldNoticeShown = true;
1138
+ log('✗', ref, `${red('refused')} - ${reason || 'this runner is too old for the studio: run `nordhavn update`'}`);
1139
+ }
1140
+ scheduleReconnect(cfg, `runner too old (${code})`, true);
1141
+ return;
1142
+ }
1124
1143
  if (code === CLOSE_SERVICE_RESTART)
1125
1144
  studioRestarting = true;
1126
1145
  scheduleReconnect(cfg, `socket closed (${code})`);
@@ -1272,8 +1291,8 @@ async function warnOnToolMismatch(config, ref, token, debug) {
1272
1291
  // need no local registration).
1273
1292
  //
1274
1293
  // `RUNTIME_HANDLED_TOOLS` comes off that set first. Those are executed by the
1275
- // runtime itself rather than by a registered local tool - `studio_pin` inside
1276
- // the loop, `studio_unload_toolset` in the dispatch handlers - so they never
1294
+ // runtime itself rather than by a registered local tool - `os_pin` inside
1295
+ // the loop, `os_unload_toolset` in the dispatch handlers - so they never
1277
1296
  // appear in `listExecutorNames()` and would be reported as missing on every
1278
1297
  // start. A warning that always cries about the same two names is one nobody
1279
1298
  // reads any more, and the point of this check is the name you have not seen
@@ -278,7 +278,7 @@ const SECRET_EXFIL_PATTERNS = [
278
278
  function detectSecretExfil(command) {
279
279
  for (const pattern of SECRET_EXFIL_PATTERNS) {
280
280
  if (pattern.test(command)) {
281
- return `Blocked: this looks like an attempt to read or decrypt secret material via the shell. Secret values never live on this machine (they are encrypted server-side) and must never be fetched, printed, or decrypted by hand. To USE a secret, embed the placeholder \${secret:KEY} inside another tool's argument - e.g. an studio_mcp_call / studio_http_request header - and the studio resolves it server-side just before the call. If the secret you need does not exist, say so instead of working around it.`;
281
+ return `Blocked: this looks like an attempt to read or decrypt secret material via the shell. Secret values never live on this machine (they are encrypted server-side) and must never be fetched, printed, or decrypted by hand. To USE a secret, embed the placeholder \${secret:KEY} inside another tool's argument - e.g. an os_mcp_call / os_http_request header - and the studio resolves it server-side just before the call. If the secret you need does not exist, say so instead of working around it.`;
282
282
  }
283
283
  }
284
284
  return null;
@@ -1,11 +1,11 @@
1
1
  // ─── HTTP Request Tool (runs on the runner machine) ──
2
2
  //
3
- // The server-side `studio_http_request` runs on the studio and is SSRF-guarded,
3
+ // The server-side `os_http_request` runs on the studio and is SSRF-guarded,
4
4
  // so it refuses localhost / private / loopback addresses and can never reach a
5
5
  // dev server the agent started here. This tool makes the request FROM the runner
6
6
  // machine, so `http://localhost:4321` and any private-network address the
7
7
  // machine can see are reachable. Public/external URLs should still go through
8
- // studio_http_request (secret placeholders, WAF-safe). No SSRF guard here on
8
+ // os_http_request (secret placeholders, WAF-safe). No SSRF guard here on
9
9
  // purpose - reaching local/private hosts is the whole point.
10
10
  const MAX_CHARS = 60_000;
11
11
  const TRUNCATION_MARKER = '\n…[truncated]';
@@ -14,7 +14,7 @@ const BODY_METHODS = ['POST', 'PUT', 'PATCH'];
14
14
  const DEFAULT_TIMEOUT_MS = 30_000;
15
15
  const httpRequestDefinition = {
16
16
  name: 'runner_http_request',
17
- description: 'Make an HTTP request (GET/POST/PUT/PATCH/DELETE) from the runner machine. Use this for localhost / private / dev-server URLs (e.g. http://localhost:4321) - it runs on this machine and reaches them directly. For public/external URLs use studio_http_request instead. Secret placeholders (${secret:KEY}, secretRef) are NOT resolved here: a request that needs a secret goes through studio_http_request.',
17
+ description: 'Make an HTTP request (GET/POST/PUT/PATCH/DELETE) from the runner machine. Use this for localhost / private / dev-server URLs (e.g. http://localhost:4321) - it runs on this machine and reaches them directly. For public/external URLs use os_http_request instead. Secret placeholders (${secret:KEY}, secretRef) are NOT resolved here: a request that needs a secret goes through os_http_request.',
18
18
  parameters: {
19
19
  type: 'object',
20
20
  properties: {
@@ -67,7 +67,7 @@ async function executeHttpRequest(params, context) {
67
67
  const requestBody = typeof params.body === 'string' ? params.body : undefined;
68
68
  const secretAt = secretPlaceholderIn(params);
69
69
  if (secretAt) {
70
- return `Error: there is a secret placeholder in the ${secretAt}, and runner_http_request does not resolve secrets (the value never reaches this machine). Make this request with studio_http_request, which resolves \${secret:KEY} on the server. A host only this machine reaches cannot take a secret this way: say so instead of working around it.`;
70
+ return `Error: there is a secret placeholder in the ${secretAt}, and runner_http_request does not resolve secrets (the value never reaches this machine). Make this request with os_http_request, which resolves \${secret:KEY} on the server. A host only this machine reaches cannot take a secret this way: say so instead of working around it.`;
71
71
  }
72
72
  if (context?.signal?.aborted)
73
73
  return 'Cancelled before execution.';
package/dist/version.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.104.0",
3
- "tag": "v0.104.0",
4
- "packageVersion": "0.104.0"
2
+ "version": "0.105.0",
3
+ "tag": "v0.105.0",
4
+ "packageVersion": "0.105.0"
5
5
  }
@@ -21,7 +21,7 @@ const showDefinition = {
21
21
  name: 'runner_browser_show',
22
22
  description: 'Show a person something in the live browser: a page (url), a local file (path) or HTML you write (html); without them, the page open now. ' +
23
23
  'They watch while you keep working (not a handoff). `marks` point at elements with numbered labels; `marks: []` clears them. ' +
24
- 'The way a person sees your browser: never studio_open_page or `headed`. Several stops: runner_browser_tour.',
24
+ 'The way a person sees your browser: never os_open_page or `headed`. Several stops: runner_browser_tour.',
25
25
  parameters: {
26
26
  type: 'object',
27
27
  properties: {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordhavnhq/runner-browser",
3
- "version": "0.104.0",
3
+ "version": "0.105.0",
4
4
  "description": "Nordhavn OS agent browser: Playwright sessions, the browser tools, the confirm-first guard and the live view, for the runner and the browser host",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -6,7 +6,7 @@
6
6
  * an internal agent and an external one run the SAME code here. Keep it free
7
7
  * of dependencies and of imports outside this folder.
8
8
  *
9
- * Every `studio_*` tool accepts `{ batch: [args, ...] }`. The runtime that
9
+ * Every `os_*` tool accepts `{ batch: [args, ...] }`. The runtime that
10
10
  * executes the tool fans it out into N parallel single calls and answers
11
11
  * `{ results: [{ ok: true, data } | { ok: false, error, statusCode? }, ...] }`,
12
12
  * in order, one failure never stopping the others. What a single call IS
@@ -18,26 +18,26 @@
18
18
  export declare const MCP_BATCH_MAX = 100;
19
19
  /** Tools that must never fan out.
20
20
  *
21
- * `studio_load_toolset`'s response is consumed by the runtime itself rather
21
+ * `os_load_toolset`'s response is consumed by the runtime itself rather
22
22
  * than by the model, so a `{ results: [] }` wrapper would break that consumer.
23
- * `studio_route_meeting_turn` is different: its response is ordinary, but the
23
+ * `os_route_meeting_turn` is different: its response is ordinary, but the
24
24
  * fan-out is parallel, and handing the floor to N agents at once in one room
25
25
  * is precisely the thing a chair exists to prevent.
26
26
  *
27
- * `studio_start_timer` and `studio_stop_timer` are the same class of problem
27
+ * `os_start_timer` and `os_stop_timer` are the same class of problem
28
28
  * as the meeting floor: a person has exactly ONE running clock, and starting
29
29
  * one stops the previous one. Fanned out in parallel, N starts race to stop
30
30
  * each other and the surviving clock is whichever write happened to land last.
31
- * `studio_log_time` is deliberately NOT here: settled entries do not interact,
31
+ * `os_log_time` is deliberately NOT here: settled entries do not interact,
32
32
  * and "log my forgotten week" is exactly what batch is for.
33
33
  *
34
- * `studio_ask` ends the agent's turn once its question is on screen (a chat)
34
+ * `os_ask` ends the agent's turn once its question is on screen (a chat)
35
35
  * or a blocking decision is open (a task), and both loops read that off the
36
36
  * single-call result. */
37
37
  export declare const MCP_BATCH_DENYLIST: ReadonlySet<string>;
38
38
  /** Tools whose batch runs item by item, in order, instead of in parallel.
39
39
  *
40
- * `studio_speak`: every item is a clip its receivers hear in turn. In
40
+ * `os_speak`: every item is a clip its receivers hear in turn. In
41
41
  * parallel the clips are made (and announced) in whatever order the provider
42
42
  * answers, so a sentence split over three items is heard shuffled. */
43
43
  export declare const MCP_BATCH_SEQUENTIAL: ReadonlySet<string>;
@@ -6,53 +6,54 @@
6
6
  * an internal agent and an external one run the SAME code here. Keep it free
7
7
  * of dependencies and of imports outside this folder.
8
8
  *
9
- * Every `studio_*` tool accepts `{ batch: [args, ...] }`. The runtime that
9
+ * Every `os_*` tool accepts `{ batch: [args, ...] }`. The runtime that
10
10
  * executes the tool fans it out into N parallel single calls and answers
11
11
  * `{ results: [{ ok: true, data } | { ok: false, error, statusCode? }, ...] }`,
12
12
  * in order, one failure never stopping the others. What a single call IS
13
13
  * differs per runtime (a Nitro `$fetch` loopback in the studio, an HTTP call
14
14
  * from the runner), so that part is handed in as `runOne`.
15
15
  */
16
+ import { osTool } from './tool-names.js';
16
17
  /** Cap on items per `{ batch: [...] }` call. Each item runs the full route
17
18
  * chain (auth, validation, broadcasts), so it stays conservative. */
18
19
  export const MCP_BATCH_MAX = 100;
19
20
  /** Tools that must never fan out.
20
21
  *
21
- * `studio_load_toolset`'s response is consumed by the runtime itself rather
22
+ * `os_load_toolset`'s response is consumed by the runtime itself rather
22
23
  * than by the model, so a `{ results: [] }` wrapper would break that consumer.
23
- * `studio_route_meeting_turn` is different: its response is ordinary, but the
24
+ * `os_route_meeting_turn` is different: its response is ordinary, but the
24
25
  * fan-out is parallel, and handing the floor to N agents at once in one room
25
26
  * is precisely the thing a chair exists to prevent.
26
27
  *
27
- * `studio_start_timer` and `studio_stop_timer` are the same class of problem
28
+ * `os_start_timer` and `os_stop_timer` are the same class of problem
28
29
  * as the meeting floor: a person has exactly ONE running clock, and starting
29
30
  * one stops the previous one. Fanned out in parallel, N starts race to stop
30
31
  * each other and the surviving clock is whichever write happened to land last.
31
- * `studio_log_time` is deliberately NOT here: settled entries do not interact,
32
+ * `os_log_time` is deliberately NOT here: settled entries do not interact,
32
33
  * and "log my forgotten week" is exactly what batch is for.
33
34
  *
34
- * `studio_ask` ends the agent's turn once its question is on screen (a chat)
35
+ * `os_ask` ends the agent's turn once its question is on screen (a chat)
35
36
  * or a blocking decision is open (a task), and both loops read that off the
36
37
  * single-call result. */
37
38
  export const MCP_BATCH_DENYLIST = new Set([
38
- 'studio_load_toolset',
39
- 'studio_route_meeting_turn',
40
- 'studio_start_timer',
41
- 'studio_stop_timer',
39
+ osTool('load_toolset'),
40
+ osTool('route_meeting_turn'),
41
+ osTool('start_timer'),
42
+ osTool('stop_timer'),
42
43
  // One question per decision, and a blocking one ends the run: never fanned out.
43
- 'studio_ask',
44
+ osTool('ask'),
44
45
  // The phase tools of a run that plans first (phases.ts): one plan, one
45
46
  // escalation, each read by the loop itself.
46
- 'studio_submit_plan',
47
- 'studio_escalate',
47
+ osTool('submit_plan'),
48
+ osTool('escalate'),
48
49
  ]);
49
50
  /** Tools whose batch runs item by item, in order, instead of in parallel.
50
51
  *
51
- * `studio_speak`: every item is a clip its receivers hear in turn. In
52
+ * `os_speak`: every item is a clip its receivers hear in turn. In
52
53
  * parallel the clips are made (and announced) in whatever order the provider
53
54
  * answers, so a sentence split over three items is heard shuffled. */
54
55
  export const MCP_BATCH_SEQUENTIAL = new Set([
55
- 'studio_speak',
56
+ osTool('speak'),
56
57
  ]);
57
58
  const BATCH_HINT = 'Pass `batch` as an actual array of arg objects: { batch: [{ ...args }, ...] }.';
58
59
  /** Detect the `batch` envelope in args, tolerating the common LLM mistake of
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `studio_call_agent`: what both runtimes must agree on.
2
+ * `os_call_agent`: what both runtimes must agree on.
3
3
  *
4
4
  * Part of the agent contract (see `version.ts`), copied verbatim into the
5
5
  * runner. The studio owns everything that keeps a call from hanging (fail-fast,
@@ -11,7 +11,7 @@
11
11
  * `delegate:request` frame from the runner) and stays with each runtime.
12
12
  */
13
13
  /** The tool's name, for the loops that give its result a budget of its own. */
14
- export declare const CALL_TOOL = "studio_call_agent";
14
+ export declare const CALL_TOOL: "os_call_agent";
15
15
  /** How long a call may run when neither the agent nor the caller's own turn
16
16
  * says otherwise (a caller without a turn clock, such as a task run on a
17
17
  * runner). */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `studio_call_agent`: what both runtimes must agree on.
2
+ * `os_call_agent`: what both runtimes must agree on.
3
3
  *
4
4
  * Part of the agent contract (see `version.ts`), copied verbatim into the
5
5
  * runner. The studio owns everything that keeps a call from hanging (fail-fast,
@@ -11,8 +11,9 @@
11
11
  * `delegate:request` frame from the runner) and stays with each runtime.
12
12
  */
13
13
  import { TOOL_RESULT_MAX_CHARS, truncateToolResult } from './loop.js';
14
+ import { osTool } from './tool-names.js';
14
15
  /** The tool's name, for the loops that give its result a budget of its own. */
15
- export const CALL_TOOL = 'studio_call_agent';
16
+ export const CALL_TOOL = osTool('call_agent');
16
17
  /** How long a call may run when neither the agent nor the caller's own turn
17
18
  * says otherwise (a caller without a turn clock, such as a task run on a
18
19
  * runner). */
@@ -42,7 +43,7 @@ export function parseCallArgs(raw) {
42
43
  const agent = typeof args.agent === 'string' ? args.agent.trim() : '';
43
44
  const task = typeof args.task === 'string' ? args.task.trim() : '';
44
45
  if (!agent || !task)
45
- return 'studio_call_agent requires both "agent" (target slug) and "task" (instruction) string fields.';
46
+ return 'os_call_agent requires both "agent" (target slug) and "task" (instruction) string fields.';
46
47
  const context = typeof args.context === 'string' && args.context.trim() ? args.context : undefined;
47
48
  if (args.tier == null || args.tier === '')
48
49
  return { agent, task, context };
@@ -29,20 +29,20 @@ export declare function budgetStopOf(err: unknown): string | null;
29
29
  export declare const HANDOFF_CALL_PURPOSE = "handoff";
30
30
  /** The tool that puts a plan to the person in a code session and ends the
31
31
  * turn the same way: the plan waits in the chat for their approval. */
32
- export declare const PROPOSE_PLAN_TOOL = "studio_propose_plan";
32
+ export declare const PROPOSE_PLAN_TOOL: "os_propose_plan";
33
33
  /** The tool that decides a waiting plan on the person's word in the chat
34
34
  * ("go ahead", "drop it"). A decision that went through ends the turn and
35
35
  * says so with this prefix: the session's tools change with it (an approved
36
36
  * plan runs on Auto), so the work goes on in a new turn the studio starts. */
37
- export declare const APPROVE_PLAN_TOOL = "studio_approve_plan";
37
+ export declare const APPROVE_PLAN_TOOL: "os_approve_plan";
38
38
  export declare const PLAN_DECIDED_PREFIX = "Plan decided; your turn ends here. ";
39
39
  /** The one tool an agent asks a person with. In a task or mission run it opens
40
40
  * a decision, and only a BLOCKING one ends the run, its result saying so with
41
41
  * this prefix. In a chat the question goes on the person's screen and the
42
42
  * turn always ends (`ASKED_IN_CHAT_PREFIX`). */
43
- export declare const ASK_TOOL = "studio_ask";
43
+ export declare const ASK_TOOL: "os_ask";
44
44
  export declare const BLOCKING_DECISION_PREFIX = "Asked; your run ends here. ";
45
- /** The result of a `studio_ask` in a chat: the question card is on the
45
+ /** The result of a `os_ask` in a chat: the question card is on the
46
46
  * person's screen and already is the agent's message there, so the turn ends
47
47
  * with no reply. It starts with `BLOCKING_DECISION_PREFIX` so a runner on the
48
48
  * older contract still stops on it. */
@@ -50,9 +50,9 @@ export declare const ASKED_IN_CHAT_PREFIX: string;
50
50
  export declare function isAskedInChat(result: string): boolean;
51
51
  /** The tools whose result can open a blocking decision. */
52
52
  export declare const BLOCKING_DECISION_TOOLS: ReadonlySet<string>;
53
- /** A `studio_ask` in a chat that put its question on screen, a plan put to
54
- * the person (`studio_propose_plan`), a plan decided on their word
55
- * (`studio_approve_plan`), or a call that opened a blocking decision. A
53
+ /** A `os_ask` in a chat that put its question on screen, a plan put to
54
+ * the person (`os_propose_plan`), a plan decided on their word
55
+ * (`os_approve_plan`), or a call that opened a blocking decision. A
56
56
  * refusal comes back as an error or an `Error:` text, so the text decides,
57
57
  * not only the flag. */
58
58
  export declare function isQuestionAsked(toolName: string, outcome: {
@@ -60,15 +60,15 @@ export declare function isQuestionAsked(toolName: string, outcome: {
60
60
  isError: boolean;
61
61
  }): boolean;
62
62
  /** What a run that stopped on a question leaves as its reply. A chat's
63
- * question (`studio_ask` answered with `ASKED_IN_CHAT_PREFIX`) already is the
63
+ * question (`os_ask` answered with `ASKED_IN_CHAT_PREFIX`) already is the
64
64
  * agent's message there: nothing. A plan card likewise: nothing.
65
- * A task's blocking `studio_ask` has no card where its work is followed (the
65
+ * A task's blocking `os_ask` has no card where its work is followed (the
66
66
  * task's timeline, the chat or channel it came from), so the agent speaks
67
67
  * there in its own words: what it wrote beside the call, else the question
68
68
  * itself. Never a canned line: that is English, the people reading it may not
69
69
  * be, and in a channel it reads as a robot talking. */
70
70
  export declare function askedRunReply(toolName: string, args: unknown, narration: string | null | undefined, result?: string): string;
71
- /** The statuses an agent may set on its OWN running task (`studio_update_task`)
71
+ /** The statuses an agent may set on its OWN running task (`os_update_task`)
72
72
  * that end the run. `in_review` and `waiting` end it like `done`: the work is
73
73
  * delivered, and what is left (a sign-off, an answer from outside) is not
74
74
  * another round of the loop. */
@@ -102,7 +102,7 @@ export declare function repeatGuardKey(toolName: string, args: unknown): string;
102
102
  */
103
103
  export declare const LOOP_CLOSING_TOOLS: ReadonlySet<string>;
104
104
  export declare function loopClosingMessage(reason: string): string;
105
- export declare const LOOP_CLOSING_REFUSAL = "Not run: in your closing round only studio_ask and studio_update_task work.";
105
+ export declare const LOOP_CLOSING_REFUSAL = "Not run: in your closing round only os_ask and os_update_task work.";
106
106
  /**
107
107
  * A steer (a message the person sends while the run is busy) cuts the round
108
108
  * short at the next tool call: the calls left in it are not run but answered
@@ -249,7 +249,7 @@ export declare function foldTranscript(opts: {
249
249
  separateModel: boolean;
250
250
  summarize: SummarizeCall;
251
251
  }): Promise<LoopMessage | null>;
252
- /** Handle an in-loop `studio_compact` call for a task run. A task has no
252
+ /** Handle an in-loop `os_compact` call for a task run. A task has no
253
253
  * persisted conversation to archive (its working context is the loop's
254
254
  * in-memory transcript), so the call schedules a fold of that transcript
255
255
  * before the next round; folding right here would cut the tool round the call
@@ -305,8 +305,8 @@ export declare const READ_ONLY_STUDIO_TOOLS: readonly string[];
305
305
  * True when a tool only reads, so the loop may run it beside the other reads
306
306
  * of the same round: a model that asks for six files at once gets them at
307
307
  * once, like a person opening six tabs. A studio tool behind a GET route
308
- * reads by definition. Never `studio_load_toolset` (it changes the tool list)
309
- * nor the tools the loop handles itself (`studio_pin`, `studio_compact`).
308
+ * reads by definition. Never `os_load_toolset` (it changes the tool list)
309
+ * nor the tools the loop handles itself (`os_pin`, `os_compact`).
310
310
  */
311
311
  export declare function isReadOnlyTool(tool: {
312
312
  name: string;
@@ -331,8 +331,8 @@ export declare const PIN_NUDGE_AFTER_READS = 8;
331
331
  /** A step that reads the checkout or a page: what the nudge counts. */
332
332
  export declare function isReadStep(name: string): boolean;
333
333
  /** Appended once to a read's result in a task run that read a lot and pinned nothing. */
334
- export declare const PIN_NUDGE_NOTE = "\n\n[Studio] You have read a lot without pinning anything. Pin what you established so far with studio_pin (path, function, what you found): pins survive a fold into a summary and carry over to the next run of this task, so nothing has to be read twice.";
335
- /** Tool calls since the last `studio_manage_todos` after which a run with open todos is reminded. */
334
+ export declare const PIN_NUDGE_NOTE = "\n\n[Studio] You have read a lot without pinning anything. Pin what you established so far with os_pin (path, function, what you found): pins survive a fold into a summary and carry over to the next run of this task, so nothing has to be read twice.";
335
+ /** Tool calls since the last `os_manage_todos` after which a run with open todos is reminded. */
336
336
  export declare const TODO_NUDGE_AFTER_CALLS = 6;
337
337
  /** Reminders per run at most: a run that ignores them is not kept busy with them. */
338
338
  export declare const MAX_TODO_NUDGES = 3;
@@ -342,7 +342,7 @@ interface TodoLike {
342
342
  title?: unknown;
343
343
  status?: unknown;
344
344
  }
345
- /** The todos passed to a `studio_manage_todos` call, or null when the arguments hold none. */
345
+ /** The todos passed to a `os_manage_todos` call, or null when the arguments hold none. */
346
346
  export declare function todosFromArgs(args: unknown): TodoLike[] | null;
347
347
  /**
348
348
  * The note appended to a tool result when the run's todo list still has open
@@ -9,6 +9,7 @@
9
9
  * they speak different message shapes and host different tools. What has to
10
10
  * behave the same in both lives here, so it cannot drift.
11
11
  */
12
+ import { isOsTool, osTool } from './tool-names.js';
12
13
  // ─── Run stopped by the studio ───────────────────────────────────────────────
13
14
  /** Marks a tool result that means the studio ended the run (a 410 or 402 from
14
15
  * an MCP route). Both loops read it and stop with reason `stopped`. */
@@ -48,20 +49,20 @@ export const HANDOFF_CALL_PURPOSE = 'handoff';
48
49
  // ─── Asking the user ends the turn ───────────────────────────────────────────
49
50
  /** The tool that puts a plan to the person in a code session and ends the
50
51
  * turn the same way: the plan waits in the chat for their approval. */
51
- export const PROPOSE_PLAN_TOOL = 'studio_propose_plan';
52
+ export const PROPOSE_PLAN_TOOL = osTool('propose_plan');
52
53
  /** The tool that decides a waiting plan on the person's word in the chat
53
54
  * ("go ahead", "drop it"). A decision that went through ends the turn and
54
55
  * says so with this prefix: the session's tools change with it (an approved
55
56
  * plan runs on Auto), so the work goes on in a new turn the studio starts. */
56
- export const APPROVE_PLAN_TOOL = 'studio_approve_plan';
57
+ export const APPROVE_PLAN_TOOL = osTool('approve_plan');
57
58
  export const PLAN_DECIDED_PREFIX = 'Plan decided; your turn ends here. ';
58
59
  /** The one tool an agent asks a person with. In a task or mission run it opens
59
60
  * a decision, and only a BLOCKING one ends the run, its result saying so with
60
61
  * this prefix. In a chat the question goes on the person's screen and the
61
62
  * turn always ends (`ASKED_IN_CHAT_PREFIX`). */
62
- export const ASK_TOOL = 'studio_ask';
63
+ export const ASK_TOOL = osTool('ask');
63
64
  export const BLOCKING_DECISION_PREFIX = 'Asked; your run ends here. ';
64
- /** The result of a `studio_ask` in a chat: the question card is on the
65
+ /** The result of a `os_ask` in a chat: the question card is on the
65
66
  * person's screen and already is the agent's message there, so the turn ends
66
67
  * with no reply. It starts with `BLOCKING_DECISION_PREFIX` so a runner on the
67
68
  * older contract still stops on it. */
@@ -71,9 +72,9 @@ export function isAskedInChat(result) {
71
72
  }
72
73
  /** The tools whose result can open a blocking decision. */
73
74
  export const BLOCKING_DECISION_TOOLS = new Set([ASK_TOOL]);
74
- /** A `studio_ask` in a chat that put its question on screen, a plan put to
75
- * the person (`studio_propose_plan`), a plan decided on their word
76
- * (`studio_approve_plan`), or a call that opened a blocking decision. A
75
+ /** A `os_ask` in a chat that put its question on screen, a plan put to
76
+ * the person (`os_propose_plan`), a plan decided on their word
77
+ * (`os_approve_plan`), or a call that opened a blocking decision. A
77
78
  * refusal comes back as an error or an `Error:` text, so the text decides,
78
79
  * not only the flag. */
79
80
  export function isQuestionAsked(toolName, outcome) {
@@ -83,13 +84,13 @@ export function isQuestionAsked(toolName, outcome) {
83
84
  return true;
84
85
  if (toolName === APPROVE_PLAN_TOOL)
85
86
  return outcome.result.startsWith(PLAN_DECIDED_PREFIX);
86
- // Covers a chat's `studio_ask` too: `ASKED_IN_CHAT_PREFIX` starts with it.
87
+ // Covers a chat's `os_ask` too: `ASKED_IN_CHAT_PREFIX` starts with it.
87
88
  return BLOCKING_DECISION_TOOLS.has(toolName) && outcome.result.startsWith(BLOCKING_DECISION_PREFIX);
88
89
  }
89
90
  /** What a run that stopped on a question leaves as its reply. A chat's
90
- * question (`studio_ask` answered with `ASKED_IN_CHAT_PREFIX`) already is the
91
+ * question (`os_ask` answered with `ASKED_IN_CHAT_PREFIX`) already is the
91
92
  * agent's message there: nothing. A plan card likewise: nothing.
92
- * A task's blocking `studio_ask` has no card where its work is followed (the
93
+ * A task's blocking `os_ask` has no card where its work is followed (the
93
94
  * task's timeline, the chat or channel it came from), so the agent speaks
94
95
  * there in its own words: what it wrote beside the call, else the question
95
96
  * itself. Never a canned line: that is English, the people reading it may not
@@ -106,7 +107,7 @@ export function askedRunReply(toolName, args, narration, result) {
106
107
  return typeof question === 'string' ? question.trim() : '';
107
108
  }
108
109
  // ─── A task run ended from inside ────────────────────────────────────────────
109
- /** The statuses an agent may set on its OWN running task (`studio_update_task`)
110
+ /** The statuses an agent may set on its OWN running task (`os_update_task`)
110
111
  * that end the run. `in_review` and `waiting` end it like `done`: the work is
111
112
  * delivered, and what is left (a sign-off, an answer from outside) is not
112
113
  * another round of the loop. */
@@ -159,11 +160,11 @@ export function repeatGuardKey(toolName, args) {
159
160
  * any other call is answered with a refusal. Without a blocker of its own the
160
161
  * studio opens one when the run ends (stop reason `loop`).
161
162
  */
162
- export const LOOP_CLOSING_TOOLS = new Set([ASK_TOOL, 'studio_update_task']);
163
+ export const LOOP_CLOSING_TOOLS = new Set([ASK_TOOL, osTool('update_task')]);
163
164
  export function loopClosingMessage(reason) {
164
- return `You are going in circles: ${reason}. This is your LAST round, and only studio_ask and studio_update_task work in it. Either finish now: write what you have as your final reply (and studio_update_task if your task asks for it). Or, when only a person can unblock you, open a blocker: studio_ask({ type: "blocker", blocking: true, question: "...", why: "..." }), in plain words for somebody who was not there, with the technical details in context.`;
165
+ return `You are going in circles: ${reason}. This is your LAST round, and only os_ask and os_update_task work in it. Either finish now: write what you have as your final reply (and os_update_task if your task asks for it). Or, when only a person can unblock you, open a blocker: os_ask({ type: "blocker", blocking: true, question: "...", why: "..." }), in plain words for somebody who was not there, with the technical details in context.`;
165
166
  }
166
- export const LOOP_CLOSING_REFUSAL = 'Not run: in your closing round only studio_ask and studio_update_task work.';
167
+ export const LOOP_CLOSING_REFUSAL = 'Not run: in your closing round only os_ask and os_update_task work.';
167
168
  /**
168
169
  * A steer (a message the person sends while the run is busy) cuts the round
169
170
  * short at the next tool call: the calls left in it are not run but answered
@@ -186,7 +187,7 @@ export function roundCutResult(kind) {
186
187
  return `Not run: ${why}, so the rest of this round was left out.`;
187
188
  }
188
189
  export function repeatGuardMessage(toolName, count) {
189
- return `[repeat-call guard] You have already called ${toolName} with these exact args ${count} times this run, so it was not executed again. Its earlier results are still in your context above: read them there. When a result came back cut, fetch only the part you need (offset/limit, a filter, a narrower query, or the saved full output the note names). Pin the key facts with studio_pin, then continue assembling your deliverable from what you already have.`;
190
+ return `[repeat-call guard] You have already called ${toolName} with these exact args ${count} times this run, so it was not executed again. Its earlier results are still in your context above: read them there. When a result came back cut, fetch only the part you need (offset/limit, a filter, a narrower query, or the saved full output the note names). Pin the key facts with os_pin, then continue assembling your deliverable from what you already have.`;
190
191
  }
191
192
  // ─── Forced synthesis ────────────────────────────────────────────────────────
192
193
  /** Corrective user message for the forced-synthesis retry: when a round ends
@@ -492,7 +493,7 @@ export async function foldTranscript(opts) {
492
493
  return { role: 'user', content: [...ask.content, { type: 'text', text: block }] };
493
494
  return { role: 'user', content: `${typeof ask.content === 'string' ? ask.content : ''}\n\n${block}` };
494
495
  }
495
- /** Handle an in-loop `studio_compact` call for a task run. A task has no
496
+ /** Handle an in-loop `os_compact` call for a task run. A task has no
496
497
  * persisted conversation to archive (its working context is the loop's
497
498
  * in-memory transcript), so the call schedules a fold of that transcript
498
499
  * before the next round; folding right here would cut the tool round the call
@@ -501,7 +502,7 @@ export function scheduleInMemoryCompaction(messages) {
501
502
  if (roundsInChain(messages) < COMPACTION_MIN_ROUNDS) {
502
503
  return { scheduled: false, reply: 'Nothing to compact yet: the transcript is still short. A long run is folded into a summary on its own once its context gets large, so you can keep working.' };
503
504
  }
504
- return { scheduled: true, reply: 'Your working context will be folded into a summary before your next step: after that you have the system prompt (with your Task context and pins), the request and that summary, and none of the earlier turns. Pin anything you must keep word for word with studio_pin in this same step.' };
505
+ return { scheduled: true, reply: 'Your working context will be folded into a summary before your next step: after that you have the system prompt (with your Task context and pins), the request and that summary, and none of the earlier turns. Pin anything you must keep word for word with os_pin in this same step.' };
505
506
  }
506
507
  // ─── Handing a run over ──────────────────────────────────────────────────────
507
508
  /** Ends after which the task is not done and the next run would start over
@@ -576,26 +577,26 @@ export const READ_ONLY_RUNNER_TOOLS = [
576
577
  ];
577
578
  /** Studio tools that only read although their route is not a GET. */
578
579
  export const READ_ONLY_STUDIO_TOOLS = [
579
- 'studio_context',
580
- 'studio_web_search',
581
- 'studio_fetch_webpage',
582
- 'studio_read_attachment',
583
- 'studio_view_image',
584
- 'studio_image_info',
580
+ osTool('context'),
581
+ osTool('web_search'),
582
+ osTool('fetch_webpage'),
583
+ osTool('read_attachment'),
584
+ osTool('view_image'),
585
+ osTool('image_info'),
585
586
  ];
586
587
  /**
587
588
  * True when a tool only reads, so the loop may run it beside the other reads
588
589
  * of the same round: a model that asks for six files at once gets them at
589
590
  * once, like a person opening six tabs. A studio tool behind a GET route
590
- * reads by definition. Never `studio_load_toolset` (it changes the tool list)
591
- * nor the tools the loop handles itself (`studio_pin`, `studio_compact`).
591
+ * reads by definition. Never `os_load_toolset` (it changes the tool list)
592
+ * nor the tools the loop handles itself (`os_pin`, `os_compact`).
592
593
  */
593
594
  export function isReadOnlyTool(tool) {
594
595
  if (tool.name.startsWith('runner_'))
595
596
  return READ_ONLY_RUNNER_TOOLS.includes(tool.name);
596
597
  if (READ_ONLY_STUDIO_TOOLS.includes(tool.name))
597
598
  return true;
598
- return tool.name.startsWith('studio_') && tool.name !== 'studio_load_toolset' && tool.mcpMethod?.toUpperCase() === 'GET';
599
+ return isOsTool(tool.name) && tool.name !== osTool('load_toolset') && tool.mcpMethod?.toUpperCase() === 'GET';
599
600
  }
600
601
  /**
601
602
  * Which calls of a round start at once, side by side: the read-only calls
@@ -609,7 +610,7 @@ export function earlyReadIndexes(calls, lookup, priorCounts, stopAt = calls.leng
609
610
  const counts = new Map(priorCounts);
610
611
  for (let i = 0; i < Math.min(calls.length, stopAt); i++) {
611
612
  const call = calls[i];
612
- if (call.name === 'studio_pin' || call.name === 'studio_compact')
613
+ if (call.name === osTool('pin') || call.name === osTool('compact'))
613
614
  continue;
614
615
  const def = lookup(call.name);
615
616
  if (!def || !isReadOnlyTool(def))
@@ -627,20 +628,20 @@ export function earlyReadIndexes(calls, lookup, priorCounts, stopAt = calls.leng
627
628
  export const PIN_NUDGE_AFTER_READS = 8;
628
629
  /** A step that reads the checkout or a page: what the nudge counts. */
629
630
  export function isReadStep(name) {
630
- return READ_ONLY_RUNNER_TOOLS.includes(name) || name === 'studio_fetch_webpage' || name === 'studio_read_attachment';
631
+ return READ_ONLY_RUNNER_TOOLS.includes(name) || name === osTool('fetch_webpage') || name === osTool('read_attachment');
631
632
  }
632
633
  /** Appended once to a read's result in a task run that read a lot and pinned nothing. */
633
- export const PIN_NUDGE_NOTE = '\n\n[Studio] You have read a lot without pinning anything. Pin what you established so far with studio_pin (path, function, what you found): pins survive a fold into a summary and carry over to the next run of this task, so nothing has to be read twice.';
634
+ export const PIN_NUDGE_NOTE = '\n\n[Studio] You have read a lot without pinning anything. Pin what you established so far with os_pin (path, function, what you found): pins survive a fold into a summary and carry over to the next run of this task, so nothing has to be read twice.';
634
635
  // ─── Keeping the todo list current ───────────────────────────────────────────
635
- /** Tool calls since the last `studio_manage_todos` after which a run with open todos is reminded. */
636
+ /** Tool calls since the last `os_manage_todos` after which a run with open todos is reminded. */
636
637
  export const TODO_NUDGE_AFTER_CALLS = 6;
637
638
  /** Reminders per run at most: a run that ignores them is not kept busy with them. */
638
639
  export const MAX_TODO_NUDGES = 3;
639
640
  /** Calls that do not count as work towards the todo reminder. */
640
641
  export function countsForTodoNudge(name) {
641
- return name !== 'studio_manage_todos' && name !== 'studio_pin' && name !== 'studio_compact';
642
+ return name !== osTool('manage_todos') && name !== osTool('pin') && name !== osTool('compact');
642
643
  }
643
- /** The todos passed to a `studio_manage_todos` call, or null when the arguments hold none. */
644
+ /** The todos passed to a `os_manage_todos` call, or null when the arguments hold none. */
644
645
  export function todosFromArgs(args) {
645
646
  const todos = args?.todos;
646
647
  return Array.isArray(todos) ? todos.filter((t) => !!t && typeof t === 'object') : null;
@@ -659,7 +660,7 @@ export function todoNudgeNote(todos) {
659
660
  const head = title
660
661
  ? `Your todo list still shows "${title}" in progress (${open.length} of ${todos.length} open)`
661
662
  : `Your todo list has ${open.length} of ${todos.length} items open and none in progress`;
662
- return `\n\n[Studio] ${head} and has not changed for a while. Update it with studio_manage_todos in this round: tick off what is done, set the next item in progress.`;
663
+ return `\n\n[Studio] ${head} and has not changed for a while. Update it with os_manage_todos in this round: tick off what is done, set the next item in progress.`;
663
664
  }
664
665
  /**
665
666
  * The note that holds back a run closing (a final reply, or a task set to
@@ -674,7 +675,7 @@ export function openTodosAtEndNote(todos) {
674
675
  const titles = open.slice(0, 8).map(t => `- ${typeof t.title === 'string' ? t.title.slice(0, 80) : '(untitled)'}`);
675
676
  if (open.length > 8)
676
677
  titles.push(`- ... and ${open.length - 8} more`);
677
- return `[Studio] You are closing while your todo list still has ${open.length} of ${todos.length} items open:\n${titles.join('\n')}\nReview them before you close. Is one of them still work to do? Do it now. Is it done, or no longer needed? Update the list with studio_manage_todos (tick off what is done, remove what was dropped), then close again.`;
678
+ return `[Studio] You are closing while your todo list still has ${open.length} of ${todos.length} items open:\n${titles.join('\n')}\nReview them before you close. Is one of them still work to do? Do it now. Is it done, or no longer needed? Update the list with os_manage_todos (tick off what is done, remove what was dropped), then close again.`;
678
679
  }
679
680
  /**
680
681
  * A reply that ends by announcing a step it did not take ("Commit toch.",