counterparts 0.3.37 → 0.3.39

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 (129) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/README.md +2 -1
  3. package/docs/QUICKSTART.md +14 -8
  4. package/docs/module-map.md +4 -2
  5. package/package.json +9 -1
  6. package/src/adapters/claude-code/CONTRACT.md +26 -4
  7. package/src/adapters/claude-code/NOTES.md +116 -0
  8. package/src/adapters/claude-code/bin/hook.ts +70 -6
  9. package/src/adapters/claude-code/bin/nightly.ts +2 -0
  10. package/src/adapters/claude-code/bin/runner.ts +64 -2
  11. package/src/adapters/claude-code/child-error.ts +211 -0
  12. package/src/adapters/claude-code/child.ts +29 -10
  13. package/src/adapters/claude-code/doctor-checkout.ts +4 -2
  14. package/src/adapters/claude-code/doctor-host.ts +31 -0
  15. package/src/adapters/claude-code/doctor-meaning.ts +200 -0
  16. package/src/adapters/claude-code/doctor-modes.ts +115 -0
  17. package/src/adapters/claude-code/doctor-open.ts +12 -2
  18. package/src/adapters/claude-code/doctor-self-page.ts +2 -0
  19. package/src/adapters/claude-code/doctor-write-ups.ts +84 -19
  20. package/src/adapters/claude-code/doctor.ts +199 -23
  21. package/src/adapters/claude-code/hooks.ts +162 -11
  22. package/src/adapters/claude-code/index.ts +15 -0
  23. package/src/adapters/claude-code/night-catch-up.ts +25 -5
  24. package/src/adapters/claude-code/night-run.ts +86 -11
  25. package/src/adapters/claude-code/stale-windows.ts +160 -0
  26. package/src/adapters/claude-code/standdown.ts +70 -3
  27. package/src/adapters/cli/INTERFACE-GAPS.md +14 -0
  28. package/src/adapters/cli/NOTES.md +25 -0
  29. package/src/adapters/cli/bin/counterparts.ts +4 -2
  30. package/src/adapters/cli/commands-dashboard.ts +8 -5
  31. package/src/adapters/cli/commands-install.ts +12 -14
  32. package/src/adapters/cli/commands.ts +5 -2
  33. package/src/adapters/cli/coverage.ts +28 -6
  34. package/src/adapters/cli/help.ts +6 -1
  35. package/src/adapters/cli/index.ts +2 -0
  36. package/src/adapters/cli/install.ts +24 -1
  37. package/src/adapters/cli/mechanisms.ts +31 -8
  38. package/src/adapters/cli/rollback.ts +3 -3
  39. package/src/adapters/cli/snapshot.ts +4 -4
  40. package/src/adapters/cli/ui.ts +10 -0
  41. package/src/adapters/cli/uninstall.ts +16 -74
  42. package/src/adapters/cli/wire.ts +227 -33
  43. package/src/adapters/config.ts +23 -0
  44. package/src/adapters/dashboard/bin/dashboard.ts +2 -0
  45. package/src/adapters/dashboard/registries.ts +1 -1
  46. package/src/adapters/dashboard/web/mechanisms/index.js +2 -0
  47. package/src/adapters/dashboard/web/mechanisms/schema/index.js +9 -6
  48. package/src/adapters/dashboard/web/mechanisms/schema/panel.js +14 -0
  49. package/src/adapters/dashboard/web/narrate.ts +10 -3
  50. package/src/adapters/dashboard/web/views/mechanism-panel.ts +44 -0
  51. package/src/adapters/dashboard/web/views/mechanisms.ts +13 -1
  52. package/src/adapters/expansions.ts +4 -3
  53. package/src/adapters/fired.ts +29 -0
  54. package/src/adapters/host-wiring.ts +56 -1
  55. package/src/adapters/hosts.ts +51 -0
  56. package/src/adapters/lifecycle.ts +4 -2
  57. package/src/adapters/mcp/CONTRACT.md +26 -3
  58. package/src/adapters/mcp/INTERFACE-GAPS.md +11 -0
  59. package/src/adapters/mcp/NOTES.md +149 -0
  60. package/src/adapters/mcp/bin/serve.ts +83 -4
  61. package/src/adapters/mcp/chat-wake.ts +111 -0
  62. package/src/adapters/mcp/deliberate.ts +5 -2
  63. package/src/adapters/mcp/index.ts +3 -1
  64. package/src/adapters/mcp/nights.ts +434 -9
  65. package/src/adapters/mcp/protocol.ts +11 -2
  66. package/src/adapters/mcp/server-args.ts +6 -0
  67. package/src/adapters/mcp/server-options.ts +19 -2
  68. package/src/adapters/mcp/server-self-tools.ts +23 -8
  69. package/src/adapters/mcp/server-session-end.ts +5 -3
  70. package/src/adapters/mcp/server-words.ts +218 -4
  71. package/src/adapters/mcp/server.ts +524 -56
  72. package/src/adapters/mcp/tools.ts +266 -12
  73. package/src/adapters/mechanism-evidence.ts +90 -15
  74. package/src/adapters/owned-names.ts +105 -0
  75. package/src/adapters/plugin.ts +34 -7
  76. package/src/adapters/private-base.ts +175 -0
  77. package/src/adapters/private-umask.ts +71 -0
  78. package/src/adapters/remote/CONTRACT.md +75 -0
  79. package/src/adapters/remote/INTERFACE-GAPS.md +20 -0
  80. package/src/adapters/remote/NOTES.md +80 -0
  81. package/src/adapters/remote/bin/serve-http.ts +258 -0
  82. package/src/adapters/remote/call-log.ts +206 -0
  83. package/src/adapters/remote/http.ts +500 -0
  84. package/src/adapters/sessions.ts +121 -7
  85. package/src/adapters/snapshots.ts +3 -3
  86. package/src/adapters/spawn.ts +13 -6
  87. package/src/adapters/update-check.ts +870 -0
  88. package/src/adapters/update-words.ts +230 -0
  89. package/src/core/counterpart-deposit.ts +35 -2
  90. package/src/core/counterpart-sweep.ts +7 -1
  91. package/src/core/counterpart-types.ts +7 -0
  92. package/src/core/counterpart.ts +185 -23
  93. package/src/core/coverage/CONTRACT.md +12 -5
  94. package/src/core/coverage/NOTES.md +40 -1
  95. package/src/core/coverage/index.ts +73 -14
  96. package/src/core/coverage/tunables.ts +15 -1
  97. package/src/core/dream/CONTRACT.md +47 -9
  98. package/src/core/dream/NOTES.md +115 -0
  99. package/src/core/dream/index.ts +51 -6
  100. package/src/core/dream/recalled.ts +90 -0
  101. package/src/core/dream/reflect.ts +156 -25
  102. package/src/core/dream/tunables.ts +61 -0
  103. package/src/core/handoff/CONTRACT.md +8 -1
  104. package/src/core/handoff/NOTES.md +52 -0
  105. package/src/core/handoff/last-here.ts +52 -0
  106. package/src/core/mint.ts +8 -1
  107. package/src/core/onboarding.ts +35 -8
  108. package/src/core/recall/CONTRACT.md +11 -0
  109. package/src/core/reconsolidation.ts +2 -1
  110. package/src/core/remember/CONTRACT.md +2 -1
  111. package/src/core/remember/owes.ts +7 -1
  112. package/src/core/remember/proposals.ts +41 -1
  113. package/src/core/schemas/CONTRACT.md +4 -2
  114. package/src/core/self/INTERFACE-GAPS.md +20 -0
  115. package/src/core/self/briefing.ts +37 -1
  116. package/src/core/self/identity.ts +54 -4
  117. package/src/core/self/index.ts +69 -4
  118. package/src/core/self/work.ts +20 -0
  119. package/src/core/self/writer.ts +15 -1
  120. package/src/core/store/CONTRACT.md +28 -2
  121. package/src/core/store/NOTES.md +97 -2
  122. package/src/core/store/db.ts +24 -1
  123. package/src/core/store/index.ts +28 -2
  124. package/src/core/store/operational.ts +37 -1
  125. package/src/core/store/pre-migration.ts +6 -2
  126. package/src/core/store/private.ts +319 -0
  127. package/src/core/store/shapes.ts +6 -0
  128. package/src/core/types.ts +28 -0
  129. package/tools/install-loop/run.sh +3 -0
@@ -74,7 +74,6 @@ import {
74
74
  paths,
75
75
  } from "../../core/store/index.js";
76
76
  import { heldCorrections } from "../../core/reconsolidation.js";
77
- import { bundledModelDir } from "../runtime.js";
78
77
  import { CYCLE_LEASE_KEY, leaseStale, readLease, TUNABLES as SLEEP_TUNABLES, acceptsReflectedFeeling, laterFeelingWasAwake, laterFeelingWasReflections, selfRelevantFeeling } from "../../core/sleep/index.js";
79
78
  import { TUNABLES as ASSOCIATE_TUNABLES, isDead, pairKey } from "../../core/associate/index.js";
80
79
  import type { EventRow } from "../../core/store/index.js";
@@ -104,7 +103,7 @@ import {
104
103
  } from "../snapshots.js";
105
104
  import { TUNABLES, resolveEmbedder, retentionClocks, withEmbedderDefault } from "../config.js";
106
105
  import type { EmbedderSource } from "../config.js";
107
- import { MODEL_FILE, STATIC_WEIGHTS_ENV, STATIC_WEIGHTS_PACKAGE, resolveStaticWeights } from "../../core/embed/static.js";
106
+ import { STATIC_WEIGHTS_ENV, STATIC_WEIGHTS_PACKAGE } from "../../core/embed/static.js";
108
107
  import { DATABASE_FILE, heldExits, readRollbackHold, rollbackHeld, runningBuild } from "../../core/store/index.js";
109
108
  // Retention's own reading and its own week, so the Raw transcripts line cannot
110
109
  // promise a different number from the job that does the deleting. READ-ONLY:
@@ -114,15 +113,34 @@ import type { LedgerEntry } from "../../core/coverage/index.js";
114
113
  import { DESKTOP_HOST } from "../hosts.js";
115
114
  import type { PluginInstallRead } from "../host-wiring.js";
116
115
  import type { InstallRoute } from "../plugin.js";
116
+ import { recordedForThisCopy } from "../plugin.js";
117
117
  import { localStamp } from "../../core/time.js";
118
118
  import { CLAIMS_DIR, claimsSetAside } from "./claim.js";
119
119
  import type { AdapterConfig } from "../config.js";
120
120
  import { LOG_DAYS, logReading } from "../log/index.js";
121
121
  import { finding, tilde, payloadOf, str, num, off, newestRows, undetermined } from "./doctor-finding.js";
122
+ import { PLUGIN_TABLE_UPDATE, PLUGIN_UPDATE, RELOAD_STEP, byRoute, npmTableCommand, npmUpdateCommand, tableOnDisk } from "./doctor-meaning.js";
123
+ import { newerStoreWords } from "../update-words.js";
124
+ import { installedVersion } from "../sessions.js";
125
+ import { TRANSPILED } from "../runtime.js";
126
+ import {
127
+ NONESSENTIAL_TRAFFIC_ENV,
128
+ UPDATE_CHECK_ENV,
129
+ askedOff,
130
+ installedForRoute,
131
+ knownLatestFor,
132
+ pluginMarket,
133
+ readUpdateState,
134
+ updateSteps,
135
+ updateSwitch,
136
+ versionBelow,
137
+ } from "../update-check.js";
138
+ import type { UpdateSwitch } from "../update-check.js";
122
139
  import type { Finding } from "./doctor-finding.js";
123
140
  import { checkoutFindings } from "./doctor-checkout.js";
124
141
  import type { CheckoutReading } from "./doctor-checkout.js";
125
142
  import { openFindings, journalFindings, journalCopyFindings, chapterSummaryFindings } from "./doctor-open.js";
143
+ import { aheadWriter } from "./standdown.js";
126
144
  import type { OpenReading, MigrationReading } from "./doctor-open.js";
127
145
  import {
128
146
  metaJson,
@@ -143,9 +161,10 @@ import {
143
161
  dreamingFindings,
144
162
  nightRunFindings,
145
163
  } from "./doctor-self-page.js";
146
- import { hostFindings, runtimeFindings, desktopFindings } from "./doctor-host.js";
164
+ import { denyFindings, hostFindings, runtimeFindings, desktopFindings } from "./doctor-host.js";
165
+ import { modesFindings } from "./doctor-modes.js";
147
166
  import type { HostReading, DesktopReading } from "./doctor-host.js";
148
- import { readOwed, crashWriteUpFindings } from "./doctor-write-ups.js";
167
+ import { readOwed, crashWriteUpFindings, overdueWords } from "./doctor-write-ups.js";
149
168
  import type { OwedSource, OwedReading } from "./doctor-write-ups.js";
150
169
  import { worstFirst } from "./doctor-report.js";
151
170
  import { feedbackLoopFindings } from "./doctor-feedback.js";
@@ -197,6 +216,16 @@ export {
197
216
  noticeMessage,
198
217
  } from "./doctor-report.js";
199
218
  export type { GradeWord } from "./doctor-report.js";
219
+ export {
220
+ MEANING_FAILED_DATES,
221
+ MEANING_OFF_LEAD,
222
+ MEANING_OFF_WORDS,
223
+ MEANING_STOPPED_TOLD_KEY,
224
+ meaningOff,
225
+ npmTableCommand,
226
+ wakeMeaningLine,
227
+ } from "./doctor-meaning.js";
228
+ export type { MeaningOff, MeaningOffInput } from "./doctor-meaning.js";
200
229
 
201
230
  /**
202
231
  * How long the session-start reading may take before it stops and says so.
@@ -299,20 +328,45 @@ export interface DoctorInput {
299
328
  * its own environment. Absent: not known, and those lines name both routes.
300
329
  */
301
330
  readonly install?: InstallRoute;
331
+ /**
332
+ * What `/reload-plugins` would load for this copy
333
+ * (`plugin.ts#recordedForThisCopy`), asked only when the store is ahead of
334
+ * this build and the route is not npm (U1a). Injectable for a test;
335
+ * absent, read from this process's home and environment.
336
+ */
337
+ readonly pluginRecorded?: () => string | null;
302
338
  }
303
339
 
304
- /** The plugin's way to a newer or whole copy: Claude Code's plugin manager. */
305
- const PLUGIN_UPDATE = "in Claude Code, /plugin → Installed → counterparts → Update now (or uninstall it and install it again)";
306
-
307
340
  /**
308
341
  * A fix that installs something, in the words of the route this copy came
309
- * by: the npm command, the plugin's update, or — not known — both.
342
+ * by: the npm command, the plugin's update, or — not known — both. The rule
343
+ * lives in `doctor-meaning.ts#byRoute`, which the wake's meaning line uses too.
310
344
  */
311
345
  function byInstall(input: DoctorInput, npm: string, plugin: string = PLUGIN_UPDATE): string {
346
+ return byRoute(input.install, npm, plugin);
347
+ }
348
+
349
+ /**
350
+ * The Store open line's step for a store a newer copy upgraded, the hook's
351
+ * words (U1a). With the writer's version too (F1, after the review of #666):
352
+ * the wake's build stamp, read from the refused database on its own
353
+ * connection (`standdown.ts#aheadWriter`), so a plugin record newer than this
354
+ * copy but older than the writer says update, as the server does. Never throws.
355
+ */
356
+ function aheadFix(input: DoctorInput): string {
312
357
  const route = input.install ?? "either";
313
- if (route === "npm") return npm;
314
- if (route === "plugin") return plugin;
315
- return `npm: ${npm} · plugin: ${plugin}`;
358
+ const loaded = installedVersion();
359
+ let recorded: string | null = null;
360
+ let writer: string | null = null;
361
+ if (route !== "npm") {
362
+ try {
363
+ recorded = (input.pluginRecorded ?? (() => recordedForThisCopy({ home: homedir(), env: process.env, cwd: process.cwd() })))();
364
+ } catch {
365
+ recorded = null;
366
+ }
367
+ writer = aheadWriter(input.open?.path ?? join(input.dir, DATABASE_FILE), loaded);
368
+ }
369
+ return newerStoreWords({ route, who: "hook", loaded, recorded, writer });
316
370
  }
317
371
 
318
372
  // ── the groups ──────────────────────────────────────────────────────────────
@@ -715,7 +769,7 @@ function withdrawnFinding(input: DoctorInput): Finding | null {
715
769
  "amber",
716
770
  RECALL_TITLE,
717
771
  `off in this process — the store's cache was written by a newer Counterparts (cache v${v.found}; this build reads v${v.expected}). Recall still matches on words, but may miss words the newer build indexed in another form`,
718
- `Either install the newer build again (${byInstall(input, "bun add -g counterparts@latest", "in Claude Code, /plugin → Installed → counterparts → Update now")}), or, to stay on this one, delete ${tilde(input.dir)}/cache/cache.sqlite* (the search cache alone; no memory is kept there) and run \`counterparts verify --rebuild --keep-vectors --dir ${tilde(input.dir)}\` to rebuild its word index — then in Claude Code run /mcp → Reconnect so the server opens it.`,
772
+ `Either install the newer build again (${byInstall(input, npmUpdateCommand())}), or, to stay on this one, delete ${tilde(input.dir)}/cache/cache.sqlite* (the search cache alone; no memory is kept there) and run \`counterparts verify --rebuild --keep-vectors --dir ${tilde(input.dir)}\` to rebuild its word index — then in Claude Code ${byInstall(input, "run /mcp → Reconnect", RELOAD_STEP)} so the server opens it.`,
719
773
  { cacheAhead: true, found: v.found, expected: v.expected },
720
774
  );
721
775
  }
@@ -733,7 +787,7 @@ function withdrawnFinding(input: DoctorInput): Finding | null {
733
787
  * the first boundary will confirm it.
734
788
  */
735
789
  function staticFinding(input: DoctorInput, data: Record<string, string | number | boolean | null>): Finding {
736
- const install = `Install the table: ${byInstall(input, `bun add -g ${STATIC_WEIGHTS_PACKAGE}`, `${PLUGIN_UPDATE}; the plugin installs the table with npm, so with no npm on this computer install Node.js (https://nodejs.org) first`)} — or set ${STATIC_WEIGHTS_ENV} in the environment Claude Code starts hooks with`;
790
+ const install = `Install the table: ${byInstall(input, npmTableCommand(), PLUGIN_TABLE_UPDATE)} — or set ${STATIC_WEIGHTS_ENV} in the environment Claude Code starts hooks with`;
737
791
  const row = newestBackfill(input);
738
792
  if (row !== null && str(row, "reason") === "embedder-unavailable") {
739
793
  const code = str(row, "codes") ?? "NO_WEIGHTS";
@@ -742,7 +796,7 @@ function staticFinding(input: DoctorInput, data: Record<string, string | number
742
796
  "amber",
743
797
  RECALL_TITLE,
744
798
  `on (a local table), but the worker could not load its weights (${code}) — nothing is embedded; recall still matches on words`,
745
- code === "HASH_MISMATCH" ? `The table on disk is not the one its package declares. Reinstall it: ${byInstall(input, `bun add -g ${STATIC_WEIGHTS_PACKAGE}`)}` : install,
799
+ code === "HASH_MISMATCH" ? `The table on disk is not the one its package declares. Reinstall it: ${byInstall(input, npmTableCommand())}` : install,
746
800
  { ...data, kind: "static", code },
747
801
  );
748
802
  }
@@ -756,12 +810,12 @@ function staticFinding(input: DoctorInput, data: Record<string, string | number
756
810
  { ...data, kind: "static", weights: str(row, "weights") },
757
811
  );
758
812
  }
759
- const bundled = bundledModelDir();
760
- const found = resolveStaticWeights(bundled === undefined ? {} : { packageDir: bundled });
761
- // THE TABLE FILE, not just a folder: a `COUNTERPARTS_STATIC_WEIGHTS_DIR`
813
+ // THE TABLE'S FILES, not just a folder: a `COUNTERPARTS_STATIC_WEIGHTS_DIR`
762
814
  // naming an empty or wrong folder is found by name and holds nothing, and a
763
- // green here would last until the first worker row said NO_WEIGHTS.
764
- if (found === null || !existsSync(join(found.dir, MODEL_FILE))) {
815
+ // green here would last until the first worker row said NO_WEIGHTS. The
816
+ // same look the wake's meaning line takes (`doctor-meaning.ts#tableOnDisk`).
817
+ const { found, complete } = tableOnDisk();
818
+ if (found === null || !complete) {
765
819
  return finding(
766
820
  "embedder",
767
821
  "amber",
@@ -1270,7 +1324,7 @@ function drewOnWeek(store: Store, livedDay: number): { calls: number; named: num
1270
1324
  *
1271
1325
  * GREEN, with counts: cap refusals and the sweep's share are not losses, and
1272
1326
  * the one loss it could name — a session that owes a write-up
1273
- * (`core/coverage/`) from yesterday or earlier — is the `Write-ups` line's
1327
+ * (`core/coverage/`) the catch-up had its chance at — is the `Write-ups` line's
1274
1328
  * amber. This line carries that count as detail, or says "unknown"
1275
1329
  * when it could not be read. The session-start reading does not read the owed
1276
1330
  * sessions (it walks every scope's words), so there the line omits them.
@@ -1510,7 +1564,7 @@ function authorshipFindings(input: DoctorInput, store: Store, owedReading: OwedS
1510
1564
  : owed.waiting === 0
1511
1565
  ? ""
1512
1566
  : `; ${plural(owed.waiting, "session", "sessions")} awaiting catch-up` +
1513
- (owed.stale === 0 ? "" : `, ${String(owed.stale)} from yesterday or earlier`);
1567
+ (owed.stale === 0 ? "" : `, ${overdueWords(owed.stale)}`);
1514
1568
  const detail =
1515
1569
  `${windowPhrase(shown, input.today)}: invited to write ${plural(asked, "time", "times")}, ` +
1516
1570
  `${plural(paced, "Stop", "Stops")} paced out, ${String(capped)} over the day's allowance` +
@@ -3384,13 +3438,24 @@ export function doctorFindings(input: DoctorInput): Finding[] {
3384
3438
  ...(input.checkout === undefined ? [] : checkoutFindings(input.checkout)),
3385
3439
  // Read by the caller for the same reason, and answered beside the `Store`
3386
3440
  // line it qualifies: "there is a store here" and "it opens" are two facts.
3387
- ...(input.open === undefined ? [] : openFindings(input.open)),
3441
+ // A store a newer copy upgraded gets the hook's and the server's own step
3442
+ // (U1a, constitution 16). This console runs the code installed at its path;
3443
+ // the plugin record is read only for that line (review of #666).
3444
+ ...(input.open === undefined
3445
+ ? []
3446
+ : openFindings(
3447
+ input.open,
3448
+ input.open.code === "SCHEMA_AHEAD" ? { aheadFix: aheadFix(input) } : {},
3449
+ )),
3388
3450
  // A rollback's hold (2026-10-11): one file read, and only when it is there.
3389
3451
  ...rollbackFindings(input.dir),
3452
+ // Who can read the store (R1): a few stats, no store read.
3453
+ ...modesFindings(input.dir, process.platform, input.configPath),
3390
3454
  // DID THE HOST STEPS TAKE (finding 4). Also read by the caller — it is four
3391
3455
  // small file reads outside this store, and the hook does not pay for them.
3392
3456
  ...(input.host === undefined ? [] : hostFindings(input.host)),
3393
3457
  ...(input.host === undefined ? [] : runtimeFindings(input.host)),
3458
+ ...(input.host === undefined ? [] : denyFindings(input.host)),
3394
3459
  // CLAUDE DESKTOP (2026-09-30): its config entry, and when it last woke.
3395
3460
  ...(input.desktop === undefined ? [] : desktopFindings(input.desktop, input.store, input.dir)),
3396
3461
  ];
@@ -3403,7 +3468,7 @@ export function doctorFindings(input: DoctorInput): Finding[] {
3403
3468
  let owedCache: { value: OwedReading | "failed" } | null = null;
3404
3469
  const owedReading: OwedSource = () => {
3405
3470
  if (!owedAllowed) return null;
3406
- owedCache ??= { value: readOwed(store, input.today) };
3471
+ owedCache ??= { value: readOwed(store) };
3407
3472
  return owedCache.value;
3408
3473
  };
3409
3474
  const groups: (readonly [string, () => Finding[]])[] = [
@@ -3446,6 +3511,9 @@ export function doctorFindings(input: DoctorInput): Finding[] {
3446
3511
  ["dreaming", () => dreamingFindings(input, store)],
3447
3512
  // The headless nightly run (2026-09-29): one meta read.
3448
3513
  ["night-run", () => nightRunFindings(input, store)],
3514
+ // The daily update check (U1b): one small file beside the configuration
3515
+ // and one meta read. Never red, and makes no request: not at session start.
3516
+ ...(input.budgetMs !== undefined ? [] : [["updates", (): Finding[] => updateFindings(input, store)] as const]),
3449
3517
  // v9 (2026-09-27): what the upgrade carried, and the reflection.
3450
3518
  ["upgrade-v9", () => upgradeV9Findings(store)],
3451
3519
  ["reflection", () => reflectionFindings(input, store)],
@@ -3505,3 +3573,111 @@ export function doctorFindings(input: DoctorInput): Finding[] {
3505
3573
  }
3506
3574
  return worstFirst(out);
3507
3575
  }
3576
+
3577
+ // ── the daily update check (U1b, 2026-10-28) ───────────────────────────────
3578
+
3579
+ const UPDATES_TITLE = "Updates";
3580
+ const UPDATES_ABOUT =
3581
+ "Once a day Counterparts asks registry.npmjs.org for the newest version number; it sends nothing about you or your memory.";
3582
+
3583
+ /**
3584
+ * THE UPDATES LINE. Doctor makes no request: it reads what the worker last
3585
+ * recorded (`updates.json`, beside the configuration) and the person's own
3586
+ * switches. The configuration's `"updateCheck": false` and "you told your
3587
+ * Claude to stop" (the store's setting) are read here directly; an
3588
+ * environment switch only from the worker's record, because doctor in a
3589
+ * terminal does not share the environment the worker ran in (review of the U1
3590
+ * design, finding 9).
3591
+ */
3592
+ export function updateFindings(input: DoctorInput, store: Store): Finding[] {
3593
+ try {
3594
+ if (TRANSPILED) {
3595
+ return [
3596
+ finding(
3597
+ "updates",
3598
+ "green",
3599
+ UPDATES_TITLE,
3600
+ "This copy makes no update check and sends nothing anywhere; 30 days after its release, the wake says once that a newer one may be out.",
3601
+ "",
3602
+ { switch: "none", transpiled: true },
3603
+ ),
3604
+ ];
3605
+ }
3606
+ const state = readUpdateState(input.configPath);
3607
+ const here = updateSwitch({ config: input.config, asked: askedOff(store), env: {} });
3608
+ const recorded: UpdateSwitch = state?.switch === "env" || state?.switch === "nonessential" ? state.switch : "none";
3609
+ const sw = here !== "none" ? here : recorded;
3610
+ const path = tilde(input.configPath);
3611
+ if (sw !== "none") {
3612
+ const why: Record<Exclude<UpdateSwitch, "none">, readonly [string, string]> = {
3613
+ config: [
3614
+ `The update check is off ("updateCheck": false in ${path}): nothing is asked of npm, and no session mentions updates.`,
3615
+ `To turn it back on, remove "updateCheck": false from ${path}.`,
3616
+ ],
3617
+ asked: [
3618
+ "The update check is off: you asked your Claude to stop. Nothing is asked of npm, and no session mentions updates.",
3619
+ "To turn it back on, tell your Claude to check for updates again.",
3620
+ ],
3621
+ env: [
3622
+ `The update check is off (${UPDATE_CHECK_ENV}=off where Counterparts runs): nothing is asked of npm, and no session mentions updates.`,
3623
+ `To turn it back on, unset ${UPDATE_CHECK_ENV}.`,
3624
+ ],
3625
+ nonessential: [
3626
+ `The update check is off (Claude Code's ${NONESSENTIAL_TRAFFIC_ENV} is set). 30 days after this copy's release, the wake says once that a newer one may be out.`,
3627
+ `To turn it back on, unset ${NONESSENTIAL_TRAFFIC_ENV}.`,
3628
+ ],
3629
+ };
3630
+ const [detail, fix] = why[sw];
3631
+ return [off("updates", UPDATES_TITLE, detail, fix, { switch: sw })];
3632
+ }
3633
+ if (state?.autoUpdate === true) {
3634
+ return [finding("updates", "green", UPDATES_TITLE, "Claude Code keeps this plugin updated (auto-update is on). No check needed.", "", { switch: "none", autoUpdate: true })];
3635
+ }
3636
+ const route = input.install ?? "either";
3637
+ const installed = installedForRoute(route, installedVersion(), () =>
3638
+ (input.pluginRecorded ?? (() => recordedForThisCopy({ home: homedir(), env: process.env, cwd: process.cwd() })))(),
3639
+ );
3640
+ const latest = state?.latest ?? null;
3641
+ // The wake's own gate (`knownLatestFor`): a plugin install is not told of a
3642
+ // version before the day after npm showed it, nor of a held plugin release.
3643
+ const known = knownLatestFor(route, state, input.today);
3644
+ if (known !== null && installed !== null && versionBelow(installed, known.latest)) {
3645
+ const steps = updateSteps({ route, market: route === "npm" ? null : pluginMarket({ home: homedir(), env: process.env }) });
3646
+ return [
3647
+ finding("updates", "amber", UPDATES_TITLE, `${known.latest} is out (this is ${installed}).`, `To update: ${steps}.`, {
3648
+ switch: "none",
3649
+ latest: known.latest,
3650
+ installed,
3651
+ checked: state?.checkedDate ?? null,
3652
+ }),
3653
+ ];
3654
+ }
3655
+ // A day or two offline is nothing to say: amber only from the third failed
3656
+ // day in a row (one try a day, so three failed requests; a laptop on a
3657
+ // plane, or a week away, stays green).
3658
+ if (state !== null && (state.failures ?? 0) >= 3) {
3659
+ return [
3660
+ finding(
3661
+ "updates",
3662
+ "amber",
3663
+ UPDATES_TITLE,
3664
+ `No successful update check since ${state.failingSince ?? "?"} (${state.failCode ?? "unreachable"}). Nothing else is affected.`,
3665
+ "Counterparts can't reach registry.npmjs.org from here (a proxy or firewall?); nothing needs doing unless you want update notices.",
3666
+ { switch: "none", failCode: state.failCode ?? null, failingSince: state.failingSince ?? null, failures: state.failures ?? 0 },
3667
+ ),
3668
+ ];
3669
+ }
3670
+ if (state?.checkedDate === undefined) {
3671
+ return [finding("updates", "green", UPDATES_TITLE, `Not checked yet. ${UPDATES_ABOUT}`, "", { switch: "none" })];
3672
+ }
3673
+ return [
3674
+ finding("updates", "green", UPDATES_TITLE, `Checked ${state.checkedDate}: ${latest === null ? "nothing newer" : `${latest} is the newest`}. ${UPDATES_ABOUT}`, "", {
3675
+ switch: "none",
3676
+ latest,
3677
+ checked: state.checkedDate,
3678
+ }),
3679
+ ];
3680
+ } catch {
3681
+ return [];
3682
+ }
3683
+ }
@@ -50,6 +50,7 @@ import {
50
50
  } from "../../core/counterpart.js";
51
51
  import type { PlainReminder } from "../../core/counterpart.js";
52
52
  import { newNightRunId } from "../../core/dream/index.js";
53
+ import { DREAM_TUNABLES } from "../../core/dream/tunables.js";
53
54
  import { PRONOUN_RULE, coverFinish, meetingHold } from "../../core/onboarding.js";
54
55
  import type { DreamOffer } from "../../core/dream/index.js";
55
56
  import type { BoundaryKind } from "../../core/remember/index.js";
@@ -77,8 +78,11 @@ import { localDate } from "../../core/time.js";
77
78
  import { openThread } from "../../core/self/identity.js";
78
79
  import { TUNABLES } from "../config.js";
79
80
  import { TUNABLES as RECALL_TUNABLES } from "../../core/recall/tunables.js";
80
- import { SESSION_NOTICE_BUDGET_MS, checkoutIsGraded, doctorFindings, noticeMessage, readCheckout } from "./doctor.js";
81
+ import { SESSION_NOTICE_BUDGET_MS, checkoutIsGraded, doctorFindings, noticeMessage, readCheckout, wakeMeaningLine } from "./doctor.js";
81
82
  import type { CheckoutReading } from "./doctor.js";
83
+ import { staleWindowsLine as staleWindowsSaid } from "./stale-windows.js";
84
+ import { upperFirst, windowStep } from "../update-words.js";
85
+ import { UPDATE_ROOM_MARGIN, updateLineInputHere, updateNoticeLine, urgentUpdateLine } from "../update-check.js";
82
86
  import { nightRowTimeoutMs, planNightRunner } from "./night-run.js";
83
87
  import { NOTHING_OWED_BEFORE_KEY, catchUpOf, catchUpWords, owedBefore } from "./night-catch-up.js";
84
88
  import type { NightKind } from "./night-run.js";
@@ -525,8 +529,14 @@ export const RATE_CLAUSE = "`rated` 0–3 each footnote shown since you last wro
525
529
  /**
526
530
  * WHAT OPEN MEANS, IN THE ASK (2026-10-22, the open-threads brief): the same
527
531
  * narrowing as the `unresolved` field's own text (`mcp/tools.ts#UNRESOLVED_PROPERTY`).
532
+ *
533
+ * AND WHAT WOULD CLOSE IT (2026-10-27, F1 after S1): the Stop ask is the door
534
+ * most open items come through, so it invites `settlesWhen` beside them — "if
535
+ * you can", never demanded (`mcp/tools.ts#SETTLES_WHEN_PROPERTY` says the rest).
536
+ * Without it the nightly reflection is shown few items it could close.
528
537
  */
529
- export const OPEN_MEANS = "`unresolved` only when someone owes an answer (a question to them, a check with a date, a promise)";
538
+ export const OPEN_MEANS =
539
+ "`unresolved` only when someone owes an answer (a question to them, a check with a date, a promise), plus `settlesWhen` if you can name what closes it";
530
540
 
531
541
  /** How long one open item's title may run in the ask's last line (2026-10-22). */
532
542
  const OPEN_TITLE_CHARS = 60;
@@ -535,7 +545,7 @@ const OPEN_TITLE_CHARS = 60;
535
545
  * The most the ask's open line may run, whole (the review of #592, F5): a
536
546
  * title is clipped at `OPEN_TITLE_CHARS` and an id is 16 characters, so five
537
547
  * items fit; an item past it is left out, never cut. With the two lines'
538
- * own pin (720) the whole ask stays under ~1,250 characters.
548
+ * own pin (770) the whole ask stays under ~1,300 characters.
539
549
  */
540
550
  export const OPEN_LINE_MAX_CHARS = 520;
541
551
 
@@ -741,6 +751,41 @@ export class ClaudeCodeAdapter extends Lifecycle {
741
751
  // are Claude Desktop's server, which serves a call as this session only
742
752
  // when the call names it. A terminal session's wake is unchanged.
743
753
  const codeTab = codeTabSessionLine(input);
754
+ // SEARCH BY MEANING THAT CANNOT RUN (2026-10-27, W1): one line under the
755
+ // clock, beside the Code tab's, for the model to tell its person — with
756
+ // the fix for this install's route (`doctor-meaning.ts`). None on a
757
+ // resume (the replayed wake already holds it), and only where a person
758
+ // will see the reply (`watchedAtStart`: not the headless night, not
759
+ // `claude -p` or the SDK, not a compaction).
760
+ const meaning = resumed || !watched ? null : this.meaningLine(input);
761
+ // OLDER WINDOWS AFTER AN UPGRADE (2026-10-27, U1a): above W1's line, said
762
+ // once per store version by the first watched wake that finds older
763
+ // servers still running (`stale-windows.ts`), under the same rule.
764
+ const stale = resumed || !watched ? null : this.staleWindowsLine(input);
765
+ // UPDATES (2026-10-28, U1b), under the same rule, in the design's order
766
+ // (U1 note §3): older windows, then an URGENT update (short, above W1's
767
+ // line), then W1's, then ONE of tell/behind, the auto-update offer or the
768
+ // age line — at most three maintenance lines in a wake. A line past the
769
+ // cap is not composed, so not claimed: it waits for the next wake. When
770
+ // W1's step is the plugin's update, the fourth is skipped (doing W1's
771
+ // step updates).
772
+ //
773
+ // AND ONLY WHERE IT FITS (review of #672): lead lines are never deferred
774
+ // once composed, so a U1 line is composed only when the wake, the lines
775
+ // above it and itself stay `UPDATE_ROOM_MARGIN` under the host's ceiling
776
+ // (room left for the asks). One that does not fit is not claimed.
777
+ const fitsUnder = (above: readonly (string | null)[]) => (line: string): boolean => {
778
+ const lines = [codeTab, ...above, line].filter((l): l is string => l !== null);
779
+ const bytes = woke.bytes + Buffer.byteLength(`${this.nowLine()}\n${lines.join("\n")}\n${plain.context}`, "utf8");
780
+ return bytes <= TUNABLES.HOST_OUTPUT_CHARS - UPDATE_ROOM_MARGIN;
781
+ };
782
+ const urgent = resumed || !watched ? null : this.updateLine(input, "urgent", { fits: fitsUnder([stale, meaning]) });
783
+ const maintenance = [stale, urgent, meaning].filter((l) => l !== null).length;
784
+ const update =
785
+ resumed || !watched || maintenance >= 3 || (meaning !== null && this.install === "plugin")
786
+ ? null
787
+ : this.updateLine(input, "notice", { fits: fitsUnder([stale, urgent, meaning]), urgentSaid: urgent !== null });
788
+ const leadLines = [codeTab, stale, urgent, meaning, update].filter((l): l is string => l !== null);
744
789
  // THE FIRST MEETING'S MARKER (2026-10-11), on every session-start wake:
745
790
  // the state word only, for the mod, which cannot reach the dashboard
746
791
  // before somebody starts it. The store marker beside it (2026-10-12)
@@ -751,7 +796,7 @@ export class ClaudeCodeAdapter extends Lifecycle {
751
796
  // one tag of their own in front of a wake that has none (`tagLead`);
752
797
  // `ONE_TAG_LINE` off puts them back under the clock.
753
798
  const tags = tagLead(woke.tags ?? markers(), woke.text, woke.tagged === true);
754
- const lead = `${woke.text.length === 0 && plain.context.length === 0 && codeTab === null ? "" : `${this.nowLine()}\n`}${ONE_TAG_LINE ? "" : tags}${codeTab === null ? "" : `${codeTab}\n`}${plain.context}${ONE_TAG_LINE ? tags : ""}`;
799
+ const lead = `${woke.text.length === 0 && plain.context.length === 0 && leadLines.length === 0 ? "" : `${this.nowLine()}\n`}${ONE_TAG_LINE ? "" : tags}${leadLines.map((l) => `${l}\n`).join("")}${plain.context}${ONE_TAG_LINE ? tags : ""}`;
755
800
  const sent = woke.bytes + Buffer.byteLength(lead, "utf8");
756
801
  const rides =
757
802
  plain.due.length > 0 &&
@@ -1284,9 +1329,17 @@ export class ClaudeCodeAdapter extends Lifecycle {
1284
1329
  store.setMeta(NOTHING_OWED_BEFORE_KEY, input.at);
1285
1330
  return false;
1286
1331
  }
1287
- if (!dreams.claimOffer(offer)) return false;
1288
- const started = this.startNightRun(input, offer);
1289
- this.emit("adapter.night.catch-up-only", { started, owed, dream: offer.dreamSkipped ?? null });
1332
+ // OWED WRITE-UPS COUNT AS NEW (S2, 2026-10-26): the catch-up runs first
1333
+ // in the night, so with what it is about to write the queue reaches
1334
+ // `MIN_NEW`, and the night runs whole — not its catch-up alone. Each
1335
+ // owed session counts as one. A first day stays catch-up only.
1336
+ const whole =
1337
+ DREAM_TUNABLES.OWED_COUNTS_AS_NEW && offer.dreamSkipped === "too-little-new" && offer.fresh + owed >= DREAM_TUNABLES.MIN_NEW;
1338
+ const { dreamSkipped: _skipped, ...asWhole } = offer;
1339
+ const chosen: DreamOffer = whole ? asWhole : offer;
1340
+ if (!dreams.claimOffer(chosen)) return false;
1341
+ const started = this.startNightRun(input, chosen, whole);
1342
+ this.emit("adapter.night.catch-up-only", { started, owed, dream: chosen.dreamSkipped ?? null, ...(whole ? { owedAsNew: owed, fresh: offer.fresh } : {}) });
1290
1343
  return started;
1291
1344
  } catch {
1292
1345
  return false;
@@ -1320,16 +1373,20 @@ export class ClaudeCodeAdapter extends Lifecycle {
1320
1373
  * started; false — with a `could-not-start` row saying why — when it did
1321
1374
  * not, so the next offer asks instead. Never throws.
1322
1375
  */
1323
- private startNightRun(input: HookInput, offer: DreamOffer): boolean {
1376
+ private startNightRun(input: HookInput, offer: DreamOffer, owedAsNew = false): boolean {
1324
1377
  const dreams = this.counterpart.dreams;
1325
1378
  const store = this.counterpart.store;
1326
1379
  const run = newNightRunId();
1380
+ // `owedAsNew` (S2 review): made whole by owed write-ups counted as new —
1381
+ // the run reads the queue again after its catch-up (`night-run.ts`).
1327
1382
  const kind: NightKind =
1328
1383
  offer.reflects !== null
1329
1384
  ? { kind: "reflection", dream: offer.reflects }
1330
- : offer.dreamSkipped === undefined
1331
- ? { kind: "night" }
1332
- : { kind: "night", dreamSkipped: offer.dreamSkipped };
1385
+ : offer.dreamSkipped !== undefined
1386
+ ? { kind: "night", dreamSkipped: offer.dreamSkipped }
1387
+ : owedAsNew
1388
+ ? { kind: "night", owedAsNew: true }
1389
+ : { kind: "night" };
1333
1390
  const base = {
1334
1391
  run,
1335
1392
  date: offer.at,
@@ -1465,6 +1522,12 @@ export class ClaudeCodeAdapter extends Lifecycle {
1465
1522
  const decision = decideUpdateNotice(this.counterpart.store.dir, {
1466
1523
  sessionId: input.sessionId,
1467
1524
  installed: installedBuild(),
1525
+ // The route's step (U1a): Reconnect restarts a plugin's old folder.
1526
+ // The npm install keeps the words it has always had, and so does an
1527
+ // adapter told no route (a test, an embedder).
1528
+ ...(this.install === undefined || this.install === "npm"
1529
+ ? {}
1530
+ : { remedy: `${upperFirst(windowStep(this.install, input.entrypoint === CODE_TAB_ENTRYPOINT))}.` }),
1468
1531
  });
1469
1532
  // Ring rows only when there is something to say; `bin/hook.ts` copies
1470
1533
  // them to stderr, because this process lives for one hook.
@@ -1831,6 +1894,94 @@ export class ClaudeCodeAdapter extends Lifecycle {
1831
1894
  }
1832
1895
  }
1833
1896
 
1897
+ /**
1898
+ * THE WAKE'S LINE WHEN SEARCH BY MEANING IS ON AND CANNOT RUN (2026-10-27,
1899
+ * W1; `doctor-meaning.ts#wakeMeaningLine`), or null. For the model to tell
1900
+ * its person, so it rides in the injection — unlike `notice`, which is the
1901
+ * person's terminal and red only. An observer says nothing; a reading that
1902
+ * fails costs the line, never the wake, and leaves one ring row.
1903
+ */
1904
+ meaningLine(input: HookInput): string | null {
1905
+ if (this.observer) return null;
1906
+ try {
1907
+ const line = wakeMeaningLine({
1908
+ config: this.config,
1909
+ store: this.counterpart.store,
1910
+ // The day the `stopped` line is claimed for: said once a day at most.
1911
+ today: input.at ?? localDate(this.nowFn(), this.counterpart.store.zone()),
1912
+ ...(this.install === undefined ? {} : { install: this.install }),
1913
+ });
1914
+ if (line !== null) this.emit("adapter.meaning.off", {});
1915
+ return line;
1916
+ } catch (err) {
1917
+ this.emit("adapter.meaning.failed", { code: codeOf(err) });
1918
+ return null;
1919
+ }
1920
+ }
1921
+
1922
+ /**
1923
+ * AN UPDATE LINE (2026-10-28, U1b; `update-check.ts`), or null: `urgent`
1924
+ * for a release this copy is below the urgent floor of, `notice` for the
1925
+ * rest (tell, behind, the auto-update offer, the age line). Claimed when
1926
+ * composed. An observer says nothing; a person who said no — `"updateCheck":
1927
+ * false`, telling their Claude to stop, `COUNTERPARTS_UPDATE_CHECK=off` —
1928
+ * hears nothing. Reads the worker's small `updates.json` and two meta keys;
1929
+ * makes no request (a hook never does). Never throws.
1930
+ */
1931
+ updateLine(
1932
+ input: HookInput,
1933
+ which: "urgent" | "notice",
1934
+ opts: { readonly fits?: (line: string) => boolean; readonly urgentSaid?: boolean } = {},
1935
+ ): string | null {
1936
+ if (this.observer) return null;
1937
+ try {
1938
+ const here = updateLineInputHere({
1939
+ store: this.counterpart.store,
1940
+ configPath: this.configPath,
1941
+ config: this.config,
1942
+ route: this.install ?? "either",
1943
+ today: input.at ?? localDate(this.nowFn(), this.counterpart.store.zone()),
1944
+ home: homedir(),
1945
+ cwd: input.scope,
1946
+ codeTab: input.entrypoint === CODE_TAB_ENTRYPOINT,
1947
+ session: input.sessionId,
1948
+ });
1949
+ const lineInput = {
1950
+ ...here,
1951
+ ...(opts.fits === undefined ? {} : { fits: opts.fits }),
1952
+ ...(opts.urgentSaid === true ? { urgentSaid: true } : {}),
1953
+ };
1954
+ const line = which === "urgent" ? urgentUpdateLine(lineInput) : updateNoticeLine(lineInput);
1955
+ if (line !== null) this.emit("adapter.update.notice", { which });
1956
+ return line;
1957
+ } catch (err) {
1958
+ this.emit("adapter.update.failed", { code: codeOf(err) });
1959
+ return null;
1960
+ }
1961
+ }
1962
+
1963
+ /**
1964
+ * THE WAKE'S LINE ABOUT OLDER WINDOWS (2026-10-27, U1a;
1965
+ * `stale-windows.ts#staleWindowsLine`), or null: Claude Code windows still
1966
+ * running a Counterparts older than the memory, each with its own route's
1967
+ * step (this window's route and tab for a record that does not say). This
1968
+ * window's own host is left out: it is the one being told. Claimed when
1969
+ * composed, once per store version. An observer says nothing (and could
1970
+ * not claim it).
1971
+ */
1972
+ staleWindowsLine(input: HookInput): string | null {
1973
+ if (this.observer) return null;
1974
+ const said = staleWindowsSaid({
1975
+ store: this.counterpart.store,
1976
+ fallback: { route: this.install, codeTab: input.entrypoint === CODE_TAB_ENTRYPOINT },
1977
+ now: this.nowFn(),
1978
+ selfHostPid: process.ppid,
1979
+ });
1980
+ if (said === null) return null;
1981
+ this.emit("adapter.update.stale-windows", { windows: said.found.windows, desktop: said.found.desktop });
1982
+ return said.line;
1983
+ }
1984
+
1834
1985
  /**
1835
1986
  * THE ONE OR TWO LINES THE OWNER SEES AT SESSION START, or null.
1836
1987
  *
@@ -35,12 +35,21 @@ export {
35
35
  reportJson,
36
36
  reportLines,
37
37
  worstFirst,
38
+ MEANING_OFF_LEAD,
39
+ MEANING_OFF_WORDS,
40
+ MEANING_FAILED_DATES,
41
+ MEANING_STOPPED_TOLD_KEY,
42
+ npmTableCommand,
43
+ meaningOff,
44
+ wakeMeaningLine,
38
45
  } from "./doctor.js";
39
46
  export type {
40
47
  CheckoutReading,
41
48
  DoctorInput,
42
49
  Finding,
43
50
  GitRunner,
51
+ MeaningOff,
52
+ MeaningOffInput,
44
53
  OpenReading,
45
54
  Severity,
46
55
  } from "./doctor.js";
@@ -119,6 +128,12 @@ export {
119
128
  } from "./night-run.js";
120
129
  export type { ClaudeCodeAnswer, ClaudeCodeSeatInput, NightAnswer, NightChild, NightChildPlan, NightKind, NightRunInput, NightRunnerPlan, NightStarter } from "./night-run.js";
121
130
 
131
+ // THE MORNING CATCH-UP'S PLAN, read (2026-10-26, harness tier 0): what a night
132
+ // would write up — the sessions owed and their parts — decided, nothing written,
133
+ // and the row a run leaves. Public so an instrument reads it as the night does.
134
+ export { catchUpOf, planCatchUp, plannedParts } from "./night-catch-up.js";
135
+ export type { CatchUpPlan, CatchUpReport, CatchUpSubject } from "./night-catch-up.js";
136
+
122
137
  export { DATA_DIR_ENV, NIGHT_CHILD_ENV, SCOPE_ENV, SESSION_ENV, WATCHDOG_ENV, planSpawn, spawnDetached } from "../spawn.js";
123
138
  export type { PlanInput, SpawnOutcome, SpawnPlan, SpawnRefusal, Spawner } from "../spawn.js";
124
139