jg-agent-hq 10.1.0 → 10.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +10 -0
  3. package/api/README.md +28 -24
  4. package/dist/actions/actions.d.ts +2 -1
  5. package/dist/actions/actions.js +83 -4
  6. package/dist/contracts/actions/types.d.ts +20 -0
  7. package/dist/contracts/actions/types.js +1 -0
  8. package/dist/contracts/browser/types.d.ts +20 -0
  9. package/dist/contracts/types.d.ts +20 -0
  10. package/dist/index.d.ts +1 -1
  11. package/dist/providers/claude/control/stream.js +13 -8
  12. package/dist/providers/codex/adapter.js +24 -0
  13. package/dist/providers/codex/codex.js +3 -0
  14. package/dist/providers/codex/types.d.ts +2 -0
  15. package/dist/providers/index.d.ts +2 -2
  16. package/dist/providers/index.js +1 -1
  17. package/dist/providers/registry/registry.d.ts +2 -0
  18. package/dist/providers/registry/registry.js +19 -1
  19. package/dist/providers/registry/types.d.ts +1 -0
  20. package/dist/providers/types.d.ts +40 -0
  21. package/dist/providers/types.js +11 -0
  22. package/dist/runtime/runtime.js +8 -5
  23. package/dist/store/control/constants.d.ts +1 -0
  24. package/dist/store/control/constants.js +7 -0
  25. package/dist/store/control/control.model.d.ts +28 -4
  26. package/dist/store/control/control.model.js +92 -8
  27. package/dist/store/control/index.d.ts +2 -2
  28. package/dist/store/control/index.js +1 -1
  29. package/dist/store/control/types.d.ts +23 -0
  30. package/dist/store/control/types.js +10 -0
  31. package/dist/store/store.d.ts +1 -1
  32. package/dist/store/store.js +7 -2
  33. package/dist/store/store.worker.js +10 -1
  34. package/dist/store/types.d.ts +122 -1
  35. package/dist/store/types.js +7 -2
  36. package/package.json +6 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 10.3.0
4
+
5
+ - Keep Codex sessions running when the runtime stops. Shutdown no longer interrupts their turns, cleans their background terminals or declines a request still waiting on an answer, and leaves their records bound to the stopped runtime. At startup, the next runtime rejoins each one that had no action in flight: it reads the session's state and latest turn from Codex's daemon, records the turn still running or completes the one that finished meanwhile, delivers the queued input waiting on it, and joins with `thread/resume` without settings, which makes the daemon send a still-waiting request again. A session another client moved past HQ's last turn, or one HQ can't read or join, is marked uncertain instead. Claude sessions still stop with the runtime.
6
+ - Add the optional `readReattachment` and `reattachThread` to `IAgentProvider`, and `IProviderReattachment`, which the built-in Codex adapter implements. Registered provider factories don't keep sessions across restarts, so the runtime never calls them on theirs.
7
+
8
+ ## 10.2.0
9
+
10
+ - `thread-adopt` accepts optional `settings`, as `thread-resume` does, and applies them to the resume it runs, so a host can adopt a session in a chosen permission mode. Codex refuses them for a thread another client still holds, as it does on resume.
11
+ - Leave the text Claude adds to a turn itself, such as a loaded skill's, out of live items. Claude streams it as a user message marked `isSynthetic`, so a host showed it as the operator's message while the turn ran, although history, which skips the transcript's matching `isMeta` records, never lists it.
12
+
3
13
  ## 10.1.0
4
14
 
5
15
  - Add `codexDaemonLauncher` to `createAgentHq`: a command and its arguments that run `codex app-server daemon start`, such as `systemd-run --user --scope`. On Linux, Codex's shared daemon stays in the cgroup of whatever started it, so a host running as a systemd service that started it took it down, with the work of every terminal session on it, whenever the service stopped. Without the option, the start runs directly as before.
package/README.md CHANGED
@@ -25,6 +25,16 @@ Use pnpm 12.4.0. Run `pnpm install`, then `pnpm check:package` to build, exercis
25
25
 
26
26
  Work on `development`; reviewed changes reach `main` through a pull request. After both Node checks pass on `main`, `check.yml` publishes the exact consumer-tested tarball through npm's configured trusted publisher, then deploys the website. No local npm login or token is needed. An identical published version is skipped; changed contents require a new version.
27
27
 
28
+ [testing-commands:start]: #
29
+
30
+ ## Testing
31
+
32
+ `pnpm test`, `pnpm check:package`, and `pnpm check` run essential coverage. Their `:full` counterparts retain complete package or package/website checks. Granular and focused commands remain complete by default. Full runs locally only on explicit request; see the [testing policy](https://github.com/jesusgraterol/jg-agent-hq/blob/main/docs/testing.md) for classification and affected-consumer checks.
33
+
34
+ Testing maintenance can reuse an existing version when only these six aggregate scripts and this marked testing-command block differ. All runtime files, dependencies, exports, installation scripts, other documentation, and file permissions remain protected by the release check. This narrow exception to the general version rule above skips publication; it does not change the installed package.
35
+
36
+ [testing-commands:end]: #
37
+
28
38
  ## Lock ownership
29
39
 
30
40
  Callers supply a trusted state root. Locks live in its private `.runtime/hq.lock`. A holder records its process ID, nonce, safe operation label and creation time. Live holders are awaited. Dead, incomplete or unverifiable owners require inspection and are never automatically reclaimed, because child processes may remain alive.
package/api/README.md CHANGED
@@ -66,7 +66,9 @@ Native snapshot qualification on 2026-10-23 used Codex 0.164.0 (gpt-6.1-sol) and
66
66
 
67
67
  `createAgentHq({ stateRoot, allowedRoots })` starts one controller and returns `IAgentHq`: its canonical `stateRoot`, a `closed` lifetime promise, `request(command)`, idempotent `close()`, a trusted Node-only `storage` descriptor and `withStorageMaintenance(callback)`. Paths must be absolute. Allowed roots must exist and are canonicalized at startup. A client-selected workspace must resolve inside an allowed root. State is a real directory owned by the current OS user with no group/other access. The controller creates it privately when absent.
68
68
 
69
- The controller exclusively creates `hq-owner.json`. A live, inactive, incomplete or unverifiable existing owner prevents another controller from starting. There is no automatic takeover. Before deliberate recovery, establish that the inspected host, its worker and native process group have stopped. Runtime shutdown sends interruption requests across the bounded session cohort concurrently, then closes IPC connections, SQLite and owned native processes before removing the exact owner. Failed cleanup preserves ownership evidence. A new runtime receives a new epoch.
69
+ The controller exclusively creates `hq-owner.json`. A live, inactive, incomplete or unverifiable existing owner prevents another controller from starting. There is no automatic takeover. Before deliberate recovery, establish that the inspected host, its worker and native process group have stopped. Runtime shutdown sends interruption requests across the bounded Claude session cohort concurrently, then closes IPC connections, SQLite and owned native processes before removing the exact owner. Failed cleanup preserves ownership evidence. A new runtime receives a new epoch.
70
+
71
+ Codex sessions outlive the runtime, because they run in Codex's shared app-server daemon. Shutdown leaves them running: it doesn't interrupt their turns, clean their background terminals or answer a request still waiting on one, and their managed records stay bound to the stopped runtime. At startup, the next runtime rejoins each one that had no action in flight, one at a time in the background. It reads the session's state and latest turn from the daemon, binds the record to its own epoch, then joins with `thread/resume` without settings. A turn still running stays the session's active turn. A turn that finished meanwhile completes its action's receipt, without a `result`, and lets a queued entry waiting on it advance. The daemon sends a still-waiting request again on joining, and it opens as a new approval in the new epoch. A session whose latest turn isn't the one HQ recorded, because another client ran one, or that can't be read or joined, has its ownership marked uncertain for explicit recovery. A crash leaves the same bound records, so those sessions are rejoined too. A restored snapshot marks every session uncertain, so it never rejoins one. Claude sessions are processes the runtime owns: their turns stop with it, and they wait inactive for an explicit resume.
70
72
 
71
73
  `requestAgentHq(stateRoot, command, signal?)` is a one-command IPC client. It verifies the private owner and socket, binds the command to the runtime epoch and checks the matching response. Cancellation closes that client's socket and reports transport failure; it never undoes an admitted action. Closing a client does not close the host. `stop` accepts a shutdown request; the SDK caller must await `runtime.closed` when it owns the runtime. The CLI confirms owner removal before reporting `state: stopped`.
72
74
 
@@ -92,6 +94,7 @@ The current built-in surfaces map to these native entry points:
92
94
  | Steer | `turn/steer` for the exact active turn | Explicitly unsupported by the structured interface |
93
95
  | Interrupt | `turn/interrupt` | `interrupt` control request; completion remains separate |
94
96
  | Close/recover | Native background-terminal cleanup/verification and `thread/unsubscribe` | Confirmed process-group shutdown and explicit session release/resume |
97
+ | Runtime restart | Sessions keep running, and the next runtime rejoins them | Turns stop with the runtime; sessions wait inactive for an explicit resume |
95
98
  | History | `thread/list`, `thread/read`, `thread/turns/list`, `thread/items/list` | Bounded worker-owned indexing of native transcripts |
96
99
  | Skills | `skills/list` and native skill input | Initialization command metadata and native invocation text |
97
100
  | Fork | `thread/fork` with verified source lineage | Native `--resume`, `--fork-session` and distinct `--session-id` |
@@ -192,7 +195,7 @@ Native qualification on 2026-10-23 used Codex 0.163.0 and Claude Code 2.1.309. B
192
195
 
193
196
  `configuration` accepts `provider`, authorized `workspaceRoot`, optional managed `threadId`, `limit` and `cursor`. Session selection must match both provider and workspace. The result includes `nativeId`, `workingDirectory`, known `effective` settings, bounded `instructionSources` with `isComplete`, and one page of native `choices` (`agent` or `profile`). Null means unknown or unavailable, never a fabricated default. A null `choices` value means the optional native inventory is unavailable; an empty array means a known empty inventory. Effective settings remain readable when Claude omits its optional agent catalog. Native inventory is bounded to 4096 entries; choice continuation binds the query and inventory revision. Instruction source paths are metadata only; HQ does not load those files through this operation. Claude uses an owned session's settings or a disposable workspace-scoped read process with no user prompt. At most four workspace read processes run concurrently; cancellation and runtime shutdown confirm their exit, including reads still initializing. Unconfirmed cleanup retains runtime ownership. Whole configuration documents, source layers and credentials are not returned.
194
197
 
195
- `thread-create` and `thread-resume` accept optional `settings`: `model`, `effort`, `outputSchema`, `permissionMode`, `systemInstructions`, `developerInstructions`, plus Codex `sandbox` or Claude `nativeAgent`. The workspace is the native working directory. Codex system/developer instructions map to native base/developer overrides. Claude system instructions use `--system-prompt`, and developer instructions use `--append-system-prompt`. Omitted fields keep native defaults. These are explicit native settings, separate from native tool approvals. The action envelope byte limit still applies.
198
+ `thread-create`, `thread-resume` and `thread-adopt`, for the resume it runs, accept optional `settings`: `model`, `effort`, `outputSchema`, `permissionMode`, `systemInstructions`, `developerInstructions`, plus Codex `sandbox` or Claude `nativeAgent`. The workspace is the native working directory. Codex system/developer instructions map to native base/developer overrides. Claude system instructions use `--system-prompt`, and developer instructions use `--append-system-prompt`. Omitted fields keep native defaults. These are explicit native settings, separate from native tool approvals. The action envelope byte limit still applies.
196
199
 
197
200
  Startup settings require an idle restart, using close followed by explicit resume; they cannot be attached to active input. Codex may retain a loaded idle thread after unsubscribe and ignores resume overrides there. HQ rejects startup overrides on such a thread; restart the HQ runtime's native connection before applying them. It never acknowledges an ignored model change. Claude opens a new native process for explicit resume, preserving the exact native session ID. Native profile selection and Codex native agent selection are not exposed as startup overrides; discovery does not imply a supported setting change.
198
201
 
@@ -236,26 +239,26 @@ File timestamps and records do not prove that a native process is idle or a turn
236
239
 
237
240
  Send `{ kind: 'action', action: { id, runtimeEpoch, command } }`. Generate one UUID per user intent, take the epoch from `status`, and retain the complete envelope until its receipt can be read. The validated envelope is limited to 32,768 UTF-8 bytes. It is recorded before native writes. Reusing the UUID with the identical envelope returns the saved receipt without dispatch; a changed envelope conflicts. This check also works for an original request read after restart. A new UUID with an expired epoch cannot execute.
238
241
 
239
- | Action | Fields and behavior |
240
- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
241
- | `thread-fork` | Source `threadId`, child `name`. Requires an idle owned source or an inactive managed source. Creates a distinct native session and retains `forkedFromThreadId` and exact native lineage. |
242
- | `thread-archive` | Idle owned `threadId`. Confirms native background cleanup, archives natively and releases control. |
243
- | `thread-unarchive` | Inactive archived `threadId`. Unarchives the exact native session and leaves it inactive. |
244
- | `thread-compact` | Idle owned `threadId`. Records native admission separately from its correlated turn completion. Clears the live presentation and requires a fresh history read. |
245
- | `thread-revert` | Idle owned `threadId`, exact `beforeTurnId`. Removes that native turn and later history; files and historical HQ receipts remain unchanged. Clears the live presentation and requires a fresh history read. |
246
- | `thread-create` | `provider` (a registered provider ID), `workspaceRoot`, `name`. Creates an empty native thread and sets its readable name before reporting acknowledgement. |
247
- | `thread-adopt` | The same fields plus `nativeId`, `operatorConfirmation`. Explicitly records an external thread as managed. Codex accepts it unloaded or idle, between turns of a terminal that still holds it, and resumes it without settings overrides; Claude requires qualified workspace history and the native idle/session-identity checks, and refuses while a terminal runs it. |
248
- | `thread-resume` | `threadId`, `operatorConfirmation`. Resumes an inactive managed thread; HQ does not fetch its complete conversation bodies. |
249
- | `thread-recover` | `threadId`, `operatorConfirmation`, `recovery`. The recovery is `{ kind: 'resume' }` for a known native identity, `{ kind: 'attach', nativeId }` for an inspected identity after uncertain creation, or `{ kind: 'create' }` to explicitly create a fresh empty thread when no native identity was recorded. The latter can leave an empty orphan from the uncertain creation; it never repeats a message. |
250
- | `thread-rename` | `threadId`, `name`. Changes the name only after the matching native acknowledgement. |
251
- | `thread-close` | `threadId`. Requires an idle thread and pauses its queue. Codex cleans and verifies its native terminal list before unsubscribe. Claude closes the owned CLI and proves process-group exit before releasing control. |
252
- | `message` | `threadId`, `input`. Starts a turn only while idle. |
253
- | `steer` | `threadId`, `expectedTurnId`, `text`. Codex uses native `turn/steer`. Claude rejects this operation; it never substitutes interruption. A finished or changed turn cannot become a new turn. |
254
- | `queue` | `threadId`, `expectedTurnId`, `input`. Saves an explicit next-turn message or skill invocation, never a permission or question answer. |
255
- | `queue-send` | `queuedActionId`. Explicitly authorizes a still-undelivered queue entry, including a queue paused by restart or interruption. |
256
- | `queue-cancel` | `queuedActionId`. Cancels only an undelivered queue entry and clears its saved body. |
257
- | `interrupt` | `threadId`, `expectedTurnId`. A native request acknowledgement leaves the thread stopping until native completion evidence arrives. |
258
- | `native-reply` | `threadId`, `expectedTurnId`, `approvalId`, `response`. Answers one exact current native request; cannot consume queue text. |
242
+ | Action | Fields and behavior |
243
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
244
+ | `thread-fork` | Source `threadId`, child `name`. Requires an idle owned source or an inactive managed source. Creates a distinct native session and retains `forkedFromThreadId` and exact native lineage. |
245
+ | `thread-archive` | Idle owned `threadId`. Confirms native background cleanup, archives natively and releases control. |
246
+ | `thread-unarchive` | Inactive archived `threadId`. Unarchives the exact native session and leaves it inactive. |
247
+ | `thread-compact` | Idle owned `threadId`. Records native admission separately from its correlated turn completion. Clears the live presentation and requires a fresh history read. |
248
+ | `thread-revert` | Idle owned `threadId`, exact `beforeTurnId`. Removes that native turn and later history; files and historical HQ receipts remain unchanged. Clears the live presentation and requires a fresh history read. |
249
+ | `thread-create` | `provider` (a registered provider ID), `workspaceRoot`, `name`. Creates an empty native thread and sets its readable name before reporting acknowledgement. |
250
+ | `thread-adopt` | The same fields plus `nativeId`, `operatorConfirmation`. Explicitly records an external thread as managed. Codex accepts it unloaded or idle, between turns of a terminal that still holds it, and resumes it with optional `settings`, which it refuses while another client holds the thread; Claude requires qualified workspace history and the native idle/session-identity checks, and refuses while a terminal runs it. |
251
+ | `thread-resume` | `threadId`, `operatorConfirmation`. Resumes an inactive managed thread; HQ does not fetch its complete conversation bodies. |
252
+ | `thread-recover` | `threadId`, `operatorConfirmation`, `recovery`. The recovery is `{ kind: 'resume' }` for a known native identity, `{ kind: 'attach', nativeId }` for an inspected identity after uncertain creation, or `{ kind: 'create' }` to explicitly create a fresh empty thread when no native identity was recorded. The latter can leave an empty orphan from the uncertain creation; it never repeats a message. |
253
+ | `thread-rename` | `threadId`, `name`. Changes the name only after the matching native acknowledgement. |
254
+ | `thread-close` | `threadId`. Requires an idle thread and pauses its queue. Codex cleans and verifies its native terminal list before unsubscribe. Claude closes the owned CLI and proves process-group exit before releasing control. |
255
+ | `message` | `threadId`, `input`. Starts a turn only while idle. |
256
+ | `steer` | `threadId`, `expectedTurnId`, `text`. Codex uses native `turn/steer`. Claude rejects this operation; it never substitutes interruption. A finished or changed turn cannot become a new turn. |
257
+ | `queue` | `threadId`, `expectedTurnId`, `input`. Saves an explicit next-turn message or skill invocation, never a permission or question answer. |
258
+ | `queue-send` | `queuedActionId`. Explicitly authorizes a still-undelivered queue entry, including a queue paused by restart or interruption. |
259
+ | `queue-cancel` | `queuedActionId`. Cancels only an undelivered queue entry and clears its saved body. |
260
+ | `interrupt` | `threadId`, `expectedTurnId`. A native request acknowledgement leaves the thread stopping until native completion evidence arrives. |
261
+ | `native-reply` | `threadId`, `expectedTurnId`, `approvalId`, `response`. Answers one exact current native request; cannot consume queue text. |
259
262
 
260
263
  Message and queue input is a closed union: `{ kind: 'text', text }` or `{ kind: 'skill', skillId, arguments }`. Text is nonempty and at most 65,536 characters; skill arguments may be empty and cap at 16,384 characters. The envelope's UTF-8 limit still applies. A selected skill is resolved through the target thread's current native catalog before admission. Unavailable, missing or disabled selections cannot dispatch. Normal text needs no catalog read. Steering retains its `text` field and exact active-turn target.
261
264
 
@@ -265,9 +268,9 @@ Codex may keep an idle native thread loaded after `thread/unsubscribe`, as when
265
268
 
266
269
  Receipts separate `delivery` (`queued`, `submitted`, `acknowledged`, `uncertain`, `failed`, `canceled`) from nullable native turn `completion` (`completed`, `failed`, `interrupted`). Acknowledgement means the exact native request was accepted, not that the turn or tool completed. Permission replies remain submitted after a pipe write and become acknowledged only when Codex resolves the exact native request or Claude returns a tool-result block for the exact tool-use identity. Claude cancellation expires the prompt and leaves an unacknowledged written reply uncertain. Resolution does not prove a tool ran. The receipt includes HQ/native identity, request phase, digest, timestamps, safe failure classification and optional related action. Only selected receipts expose `nativeThreadId`, the native session of the action's thread once HQ records it, undelivered `queuedInput` and the nullable complete native `result`; collection reads omit all three. Queued input retains prepared text, native skill identity, content-bound file references and explicit turn settings, never file bytes or skill content. It is cleared after delivery acknowledgement or cancellation.
267
270
 
268
- A missing acknowledgement never triggers an automatic resend. Exact late responses reconcile delivery, including completion that arrived first. Native output loss marks the affected provider controls and submitted work uncertain. A Claude process failure affects its own session; a Codex transport failure affects its Codex cohort. Restart quarantines controls from an interrupted runtime; explicit recovery preserves the HQ identity and name. Successful shutdown proves native process-group exit before marking controls inactive. Unknown creation without a native identity remains uncertain.
271
+ A missing acknowledgement never triggers an automatic resend. Exact late responses reconcile delivery, including completion that arrived first. Native output loss marks the affected provider controls and submitted work uncertain. A Claude process failure affects its own session; a Codex transport failure affects its Codex cohort. Restart quarantines controls from an interrupted runtime, except the Codex sessions the next runtime rejoins; explicit recovery preserves the HQ identity and name. Successful shutdown proves native process-group exit before marking Claude controls inactive. Unknown creation without a native identity remains uncertain.
269
272
 
270
- Normal native turn completion may advance ready queued entries once, in creation/UUID order. Failure, interruption, explicit interrupt admission or restart pauses the queue. Permission prompts do not advance it. An unacknowledged start or metadata change blocks dependent starts until its outcome is reconciled or the stopped runtime is recovered explicitly. A turn's completion does not settle an unresolved steering receipt.
273
+ Normal native turn completion may advance ready queued entries once, in creation/UUID order. Failure, interruption, explicit interrupt admission or restart pauses the queue. A rejoined Codex session's queue advances again once the turn it waits on completes. Permission prompts do not advance it. An unacknowledged start or metadata change blocks dependent starts until its outcome is reconciled or the stopped runtime is recovered explicitly. A turn's completion does not settle an unresolved steering receipt.
271
274
 
272
275
  Native replies use one of these closed response forms:
273
276
 
@@ -421,6 +424,7 @@ The operation matrix describes the implemented native interfaces and their expli
421
424
  | Identity and native interaction | Both providers retained managed/native identities after compaction and reconnect with a fresh runtime epoch. Codex interruption and continuation passed. Claude AskUserQuestion and scoped MCP permission replies used exact native identities. | A timed-out compaction retained uncertain delivery even when completion later arrived; it was not resent. Explicit resume followed confirmed controller shutdown. |
422
425
  | Recovery | After removing all eight qualification transcripts, offline recovery retained the host preference and providers stayed idle. | Native transcripts, repository files and authentication remain separate recovery responsibilities. |
423
426
  | Shared Codex daemon | Codex 0.164.0: a terminal `codex` session ran on the shared daemon and appeared in `thread/list`. Without subscribing, HQ saw its `thread/status/changed`; after rejoining with `thread/resume`, HQ received the terminal's live turn and item notifications. A thread HQ created appeared in the terminal's `codex resume` picker, and closing HQ's connection left the daemon and the terminal session running. The daemon confirmed HQ's interrupt and close. Per-thread skill roots and output schemas worked on HQ threads, while another client's catalog and thread never saw the roots. Sessions read their own thread ID from `CODEX_THREAD_ID`. | A terminal started with `-c` overrides runs its thread in its own process (`source: cli`): it is listed, but a second writer is refused, so it cannot be followed live. The restart check ran against a separate app-server on its own socket rather than the shared daemon, which was serving other work: within one keepalive interval the session became uncertain and nothing was resent. A session Codex reloads from disk loses its capability roots. |
427
+ | Codex across restarts | Codex 0.166.0 on 2026-11-01: a turn whose client closed its connection mid-turn ran to completion in the daemon, which kept the session loaded and idle. A command approval that arrived before the connection closed stayed pending, with the session `waitingOnApproval`; after a new connection joined with `thread/resume`, the daemon sent it again under the same request ID, and answering it completed the turn. |
424
428
  | Claude active sessions | Claude Code 2.1.310 answered `claude agents --json` in 0.16 s. Interactive entries carry `status` (`busy`, `waiting`, `idle`) and `pid`; background entries carry `id` and `state` (`blocked`). Sessions HQ starts in structured mode are listed as interactive under their HQ name and disappear after close. | The list describes running processes only; history still comes from transcripts. |
425
429
  | Host coverage | Linux x86_64 package checks passed on Node 24.15.0 and 24.22.1. Identity, native interaction and recovery ran on the floor and on 24.22.1. | No macOS host was available for this run. Windows is outside the declared host contract. |
426
430
 
@@ -44,7 +44,8 @@ export declare const createActions: (registry: ReturnType<typeof createProviderR
44
44
  /** Attaches sensitive presentation only to the exact current native request. */
45
45
  approvalPresentation(approval: INativeApprovalSummary): INativeApproval;
46
46
  /**
47
- * Stops admission, interrupts active work, cleans native terminals and confirms shutdown.
47
+ * Stops admission, interrupts active work, cleans native terminals and confirms shutdown. A
48
+ * session that outlives the runtime keeps running, with its terminals, for the next runtime.
48
49
  * @returns A promise resolved after native exit and release of durable control ownership.
49
50
  * @throws
50
51
  * - JG_AGENT_HQ_PROVIDER_FAILED: The HQ provider integration failed
@@ -346,7 +346,9 @@ export const createActions = (registry, store, roots, epoch, actionKey, skills,
346
346
  if (!nativeId)
347
347
  conflict();
348
348
  own(thread.provider, nativeId);
349
- const resumed = await verifyThread(thread, await control.resumeThread(requestId, nativeId, thread.workspaceRoot, thread.name, command.kind === 'thread-resume' ? (command.settings ?? {}) : {}));
349
+ const resumed = await verifyThread(thread, await control.resumeThread(requestId, nativeId, thread.workspaceRoot, thread.name, command.kind === 'thread-resume' || command.kind === 'thread-adopt'
350
+ ? (command.settings ?? {})
351
+ : {}));
350
352
  await apply({
351
353
  kind: 'resumed',
352
354
  actionId: receipt.id,
@@ -502,6 +504,9 @@ export const createActions = (registry, store, roots, epoch, actionKey, skills,
502
504
  live.append(key(provider, nativeId), turnId, itemId, text);
503
505
  },
504
506
  prompt(provider, prompt) {
507
+ // a session that outlives the runtime keeps its request for the next runtime to answer
508
+ if (closing && registry.keepsSessions(provider))
509
+ return;
505
510
  if (!controlled.has(key(provider, prompt.nativeThreadId)) || prompts.size >= 32 || closing) {
506
511
  runNativeOwned(provider, prompt.nativeThreadId, prompt.reject);
507
512
  return;
@@ -847,6 +852,78 @@ export const createActions = (registry, store, roots, epoch, actionKey, skills,
847
852
  }
848
853
  return admitted.receipt;
849
854
  };
855
+ /**
856
+ * Rejoins one session the previous runtime left running in a native process that outlives it.
857
+ * The session is bound to this runtime as that process reports it before joining, so a request
858
+ * the process sends again on joining finds its turn, and a turn that finished between the two
859
+ * reads then completes. A session that can't be rejoined has its ownership marked uncertain.
860
+ * @returns A promise resolved once the session is rejoined or marked uncertain.
861
+ * @throws
862
+ * - JG_AGENT_HQ_STORE_FAILED: The HQ store failed
863
+ */
864
+ const reattachThread = async (thread) => {
865
+ const nativeId = thread.nativeId;
866
+ let isOwned = false;
867
+ try {
868
+ const control = await registry.get(thread.provider);
869
+ if (!control.readReattachment || !control.reattachThread)
870
+ capabilityUnavailable();
871
+ await validateRoot(thread);
872
+ const read = await control.readReattachment(nativeId, thread.workspaceRoot);
873
+ if (read.thread.nativeState === 'systemError')
874
+ agentUnavailable();
875
+ const bound = await store.reattach({
876
+ threadId: thread.id,
877
+ latestTurn: read.latestTurn && {
878
+ nativeTurnId: read.latestTurn.nativeId,
879
+ state: read.latestTurn.state,
880
+ },
881
+ });
882
+ waits.notifyThread(thread.id);
883
+ if (bound?.thread?.ownership !== 'managed' || bound.thread.runtimeEpoch !== epoch)
884
+ return;
885
+ own(thread.provider, nativeId);
886
+ isOwned = true;
887
+ const joined = await control.reattachThread(`${randomUUID()}:reattach`, nativeId, thread.workspaceRoot);
888
+ const turnId = bound.thread.activeTurnId;
889
+ const latest = joined.latestTurn;
890
+ if (turnId && latest?.nativeId === turnId && latest.state !== 'running') {
891
+ const { state } = latest;
892
+ live.completeTurn(key(thread.provider, nativeId), turnId);
893
+ enqueue(thread.provider, () => observe({
894
+ kind: 'turn-completed',
895
+ provider: thread.provider,
896
+ nativeThreadId: nativeId,
897
+ nativeTurnId: turnId,
898
+ state,
899
+ }));
900
+ }
901
+ if (bound.canDispatchQueued)
902
+ advanceQueue(thread.id, thread.provider);
903
+ }
904
+ catch {
905
+ if (isOwned)
906
+ await recordObservation({
907
+ kind: 'native-unavailable',
908
+ provider: thread.provider,
909
+ nativeThreadId: nativeId,
910
+ });
911
+ else
912
+ await store.quarantineThread(thread.id);
913
+ waits.notifyThread(thread.id);
914
+ }
915
+ };
916
+ /** Rejoins, one at a time, every session the previous runtime left running. */
917
+ const reattach = async () => {
918
+ let batch = await store.listReattachable();
919
+ while (batch.length > 0 && !closing) {
920
+ for (const thread of batch)
921
+ if (!closing)
922
+ await reattachThread(thread);
923
+ batch = await store.listReattachable();
924
+ }
925
+ };
926
+ runOwned(reattach);
850
927
  return {
851
928
  /**
852
929
  * Reads live native authentication presentation without replaying an interrupted action.
@@ -934,7 +1011,8 @@ export const createActions = (registry, store, roots, epoch, actionKey, skills,
934
1011
  };
935
1012
  },
936
1013
  /**
937
- * Stops admission, interrupts active work, cleans native terminals and confirms shutdown.
1014
+ * Stops admission, interrupts active work, cleans native terminals and confirms shutdown. A
1015
+ * session that outlives the runtime keeps running, with its terminals, for the next runtime.
938
1016
  * @returns A promise resolved after native exit and release of durable control ownership.
939
1017
  * @throws
940
1018
  * - JG_AGENT_HQ_PROVIDER_FAILED: The HQ provider integration failed
@@ -949,8 +1027,9 @@ export const createActions = (registry, store, roots, epoch, actionKey, skills,
949
1027
  let cleanupFailure;
950
1028
  try {
951
1029
  await Promise.allSettled([...admissions]);
1030
+ const stopped = [...controlled.values()].filter(({ provider }) => !registry.keepsSessions(provider));
952
1031
  // Active turn IDs come from ordered native evidence, never from an interrupt acknowledgement.
953
- await Promise.all([...controlled.values()].map(async ({ provider, nativeId }) => {
1032
+ await Promise.all(stopped.map(async ({ provider, nativeId }) => {
954
1033
  const thread = await store.getThreadByNativeId(provider, nativeId);
955
1034
  if (thread?.activeTurnId) {
956
1035
  try {
@@ -966,7 +1045,7 @@ export const createActions = (registry, store, roots, epoch, actionKey, skills,
966
1045
  await Promise.allSettled([...tasks]);
967
1046
  await lane.catch(() => undefined);
968
1047
  const providerStates = new Map(registry.statuses().map((status) => [status.provider, status.state]));
969
- for (const { provider, nativeId } of controlled.values()) {
1048
+ for (const { provider, nativeId } of stopped) {
970
1049
  if (providerStates.get(provider) === 'unavailable')
971
1050
  continue;
972
1051
  const control = await registry.get(provider);
@@ -82,6 +82,16 @@ export declare const ActionCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
82
82
  nativeId: z.ZodString;
83
83
  name: z.ZodString;
84
84
  operatorConfirmation: z.ZodString;
85
+ settings: z.ZodOptional<z.ZodObject<{
86
+ model: z.ZodOptional<z.ZodString>;
87
+ effort: z.ZodOptional<z.ZodString>;
88
+ outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
89
+ nativeAgent: z.ZodOptional<z.ZodString>;
90
+ permissionMode: z.ZodOptional<z.ZodString>;
91
+ sandbox: z.ZodOptional<z.ZodString>;
92
+ systemInstructions: z.ZodOptional<z.ZodString>;
93
+ developerInstructions: z.ZodOptional<z.ZodString>;
94
+ }, z.core.$strict>>;
85
95
  }, z.core.$strict>, z.ZodObject<{
86
96
  kind: z.ZodLiteral<"thread-resume">;
87
97
  threadId: z.ZodUUID;
@@ -323,6 +333,16 @@ export declare const ActionEnvelopeSchema: z.ZodObject<{
323
333
  nativeId: z.ZodString;
324
334
  name: z.ZodString;
325
335
  operatorConfirmation: z.ZodString;
336
+ settings: z.ZodOptional<z.ZodObject<{
337
+ model: z.ZodOptional<z.ZodString>;
338
+ effort: z.ZodOptional<z.ZodString>;
339
+ outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
340
+ nativeAgent: z.ZodOptional<z.ZodString>;
341
+ permissionMode: z.ZodOptional<z.ZodString>;
342
+ sandbox: z.ZodOptional<z.ZodString>;
343
+ systemInstructions: z.ZodOptional<z.ZodString>;
344
+ developerInstructions: z.ZodOptional<z.ZodString>;
345
+ }, z.core.$strict>>;
326
346
  }, z.core.$strict>, z.ZodObject<{
327
347
  kind: z.ZodLiteral<"thread-resume">;
328
348
  threadId: z.ZodUUID;
@@ -36,6 +36,7 @@ export const ActionCommandSchema = z.discriminatedUnion('kind', [
36
36
  nativeId: NativeIdSchema,
37
37
  name: NameSchema,
38
38
  operatorConfirmation: z.string().min(1).max(1024),
39
+ settings: SessionSettingsSchema.optional(),
39
40
  }),
40
41
  z.strictObject({
41
42
  kind: z.literal('thread-resume'),
@@ -61,6 +61,16 @@ export declare const BrowserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
61
61
  nativeId: z.ZodString;
62
62
  name: z.ZodString;
63
63
  operatorConfirmation: z.ZodString;
64
+ settings: z.ZodOptional<z.ZodObject<{
65
+ model: z.ZodOptional<z.ZodString>;
66
+ effort: z.ZodOptional<z.ZodString>;
67
+ outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
68
+ nativeAgent: z.ZodOptional<z.ZodString>;
69
+ permissionMode: z.ZodOptional<z.ZodString>;
70
+ sandbox: z.ZodOptional<z.ZodString>;
71
+ systemInstructions: z.ZodOptional<z.ZodString>;
72
+ developerInstructions: z.ZodOptional<z.ZodString>;
73
+ }, z.core.$strict>>;
64
74
  }, z.core.$strict>, z.ZodObject<{
65
75
  kind: z.ZodLiteral<"thread-resume">;
66
76
  threadId: z.ZodUUID;
@@ -308,6 +318,16 @@ export declare const BrowserActionSchema: z.ZodObject<{
308
318
  nativeId: z.ZodString;
309
319
  name: z.ZodString;
310
320
  operatorConfirmation: z.ZodString;
321
+ settings: z.ZodOptional<z.ZodObject<{
322
+ model: z.ZodOptional<z.ZodString>;
323
+ effort: z.ZodOptional<z.ZodString>;
324
+ outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
325
+ nativeAgent: z.ZodOptional<z.ZodString>;
326
+ permissionMode: z.ZodOptional<z.ZodString>;
327
+ sandbox: z.ZodOptional<z.ZodString>;
328
+ systemInstructions: z.ZodOptional<z.ZodString>;
329
+ developerInstructions: z.ZodOptional<z.ZodString>;
330
+ }, z.core.$strict>>;
311
331
  }, z.core.$strict>, z.ZodObject<{
312
332
  kind: z.ZodLiteral<"thread-resume">;
313
333
  threadId: z.ZodUUID;
@@ -184,6 +184,16 @@ export declare const HqRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
184
184
  nativeId: z.ZodString;
185
185
  name: z.ZodString;
186
186
  operatorConfirmation: z.ZodString;
187
+ settings: z.ZodOptional<z.ZodObject<{
188
+ model: z.ZodOptional<z.ZodString>;
189
+ effort: z.ZodOptional<z.ZodString>;
190
+ outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
191
+ nativeAgent: z.ZodOptional<z.ZodString>;
192
+ permissionMode: z.ZodOptional<z.ZodString>;
193
+ sandbox: z.ZodOptional<z.ZodString>;
194
+ systemInstructions: z.ZodOptional<z.ZodString>;
195
+ developerInstructions: z.ZodOptional<z.ZodString>;
196
+ }, z.core.$strict>>;
187
197
  }, z.core.$strict>, z.ZodObject<{
188
198
  kind: z.ZodLiteral<"thread-resume">;
189
199
  threadId: z.ZodUUID;
@@ -3352,6 +3362,16 @@ export declare const IpcRequestSchema: z.ZodObject<{
3352
3362
  nativeId: z.ZodString;
3353
3363
  name: z.ZodString;
3354
3364
  operatorConfirmation: z.ZodString;
3365
+ settings: z.ZodOptional<z.ZodObject<{
3366
+ model: z.ZodOptional<z.ZodString>;
3367
+ effort: z.ZodOptional<z.ZodString>;
3368
+ outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
3369
+ nativeAgent: z.ZodOptional<z.ZodString>;
3370
+ permissionMode: z.ZodOptional<z.ZodString>;
3371
+ sandbox: z.ZodOptional<z.ZodString>;
3372
+ systemInstructions: z.ZodOptional<z.ZodString>;
3373
+ developerInstructions: z.ZodOptional<z.ZodString>;
3374
+ }, z.core.$strict>>;
3355
3375
  }, z.core.$strict>, z.ZodObject<{
3356
3376
  kind: z.ZodLiteral<"thread-resume">;
3357
3377
  threadId: z.ZodUUID;
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export { type IHqLockOwner, type IOwnerLiveness, type IHqLockOptions, type IHqLo
2
2
  export { createAgentHq } from './runtime/index.js';
3
3
  export type { IAgentHq, IAgentHqOptions } from './runtime/index.js';
4
4
  export { requestAgentHq } from './ipc/index.js';
5
- export type { IAgentProvider, IAgentProviderFactory, IAgentProviderContext, IAgentProviderEvents, IAgentProviderOutcome, INativePrompt, IProviderCall, IProviderThread, IProviderInspection, IProviderSkills, IProviderMcpServerPage, IProviderMcpTools, IProviderMcpResources, } from './providers/index.js';
5
+ export type { IAgentProvider, IAgentProviderFactory, IAgentProviderContext, IAgentProviderEvents, IAgentProviderOutcome, INativePrompt, IProviderCall, IProviderThread, IProviderInspection, IProviderReattachment, IProviderSkills, IProviderMcpServerPage, IProviderMcpTools, IProviderMcpResources, } from './providers/index.js';
6
6
  export type { IProviderId, IProviderCapability, IProviderCapabilitySet, IProviderCapabilities, IProviderStatus, } from './contracts/providers/index.js';
7
7
  export type { IProviderModel, IProviderModelPage, IProviderModelsRequest, } from './contracts/models/index.js';
8
8
  export type { ITurnSettings, ISessionSettings, IConfigurationRequest, IConfigurationChoice, ISessionConfiguration, } from './contracts/configuration/index.js';
@@ -9,6 +9,8 @@ const MessageSchema = z.object({
9
9
  uuid: z.string().min(1).max(4096),
10
10
  message: z.object({ role: z.string(), content: z.unknown() }),
11
11
  tool_use_result: z.unknown().optional(),
12
+ // text Claude adds to a turn itself, such as a loaded skill's, which its transcript marks isMeta
13
+ isSynthetic: z.boolean().optional(),
12
14
  });
13
15
  const ResultSchema = z.object({
14
16
  subtype: z.string(),
@@ -103,14 +105,17 @@ export const receiveClaudeMessage = (session, raw, events) => {
103
105
  input.interruptRequested &&
104
106
  isClaudeInterruptionMarker(message.message.content))
105
107
  return;
106
- const item = toClaudeItem(RecordSchema.parse({
107
- type: frame.type,
108
- uuid: message.uuid,
109
- message: message.message,
110
- toolUseResult: message.tool_use_result,
111
- // a live item is timed when its frame arrives
112
- timestamp: new Date().toISOString(),
113
- }), input.id);
108
+ // like history, which skips the transcript's isMeta records, live items leave synthetic text out
109
+ const item = message.isSynthetic
110
+ ? null
111
+ : toClaudeItem(RecordSchema.parse({
112
+ type: frame.type,
113
+ uuid: message.uuid,
114
+ message: message.message,
115
+ toolUseResult: message.tool_use_result,
116
+ // a live item is timed when its frame arrives
117
+ timestamp: new Date().toISOString(),
118
+ }), input.id);
114
119
  // final wrappers may share an API message ID while containing different content blocks
115
120
  const content = z
116
121
  .object({ message: z.object({ id: z.string().optional(), content: z.unknown() }) })
@@ -76,6 +76,19 @@ export const createCodexProviderFactory = (extraSkillRoots, daemonLauncher) => (
76
76
  data: { kind: 'access-denied' },
77
77
  });
78
78
  };
79
+ // a session's latest turn, which runs only while the daemon reports the session active
80
+ const readLatestTurn = async (thread) => {
81
+ const [turn] = (await native.listTurns(thread.nativeId, 1)).data;
82
+ if (!turn)
83
+ return null;
84
+ if (turn.state !== 'inProgress' && turn.state !== 'unknown')
85
+ return { nativeId: turn.nativeId, state: turn.state };
86
+ // a turn cut short when the daemon stopped stays in progress in its saved history
87
+ return {
88
+ nativeId: turn.nativeId,
89
+ state: thread.nativeState === 'active' ? 'running' : 'interrupted',
90
+ };
91
+ };
79
92
  const readHistory = async (command) => {
80
93
  const position = command.kind === 'session-evidence' ? evidencePosition(command) : undefined;
81
94
  const { cursor, ...filters } = {
@@ -318,6 +331,17 @@ export const createCodexProviderFactory = (extraSkillRoots, daemonLauncher) => (
318
331
  canResume: thread.nativeState === 'idle',
319
332
  };
320
333
  },
334
+ async readReattachment(nativeId, workspaceRoot) {
335
+ const thread = toProviderThread(await native.readNativeThread(nativeId));
336
+ await verifyRoot(thread.workspaceRoot, workspaceRoot);
337
+ return { thread, latestTurn: await readLatestTurn(thread) };
338
+ },
339
+ async reattachThread(requestId, nativeId, workspaceRoot, call) {
340
+ // without settings, Codex joins a session it has loaded rather than refusing it
341
+ const thread = toProviderThread(await native.resumeThread(requestId, nativeId, {}, call.signal));
342
+ await verifyRoot(thread.workspaceRoot, workspaceRoot);
343
+ return { thread, latestTurn: await readLatestTurn(thread) };
344
+ },
321
345
  readUsage: () => native.readUsage(),
322
346
  readAccount: () => native.readAccount(),
323
347
  readLogin: (requestId) => native.readLogin(requestId),
@@ -325,6 +325,9 @@ export const createCodexProvider = async (extraSkillRoots = [], daemonLauncher =
325
325
  thread: NativeThreadSchema.refine((thread) => thread.id === nativeId && thread.status.type === 'idle'),
326
326
  }), await connection.request('thread/revert', { threadId: nativeId, beforeTurnId }, requestId)).thread;
327
327
  },
328
+ async readNativeThread(nativeId) {
329
+ return parseNative(z.object({ thread: NativeThreadSchema.refine((thread) => thread.id === nativeId) }), await connection.request('thread/read', { threadId: nativeId, includeTurns: false })).thread;
330
+ },
328
331
  async readThread(nativeId) {
329
332
  const result = parseNative(z.object({ thread: NativeThreadSchema.refine((thread) => thread.id === nativeId) }), await connection.request('thread/read', { threadId: nativeId, includeTurns: false }));
330
333
  return toThreadSummary(result.thread);
@@ -192,6 +192,8 @@ export type ICodexProvider = {
192
192
  readonly isAvailable: boolean;
193
193
  listThreads(workspaceRoot: string, limit: number, cursor?: string, search?: string): Promise<INativePage<IThreadSummary>>;
194
194
  readThread(nativeId: string): Promise<IThreadSummary>;
195
+ /** @returns A session's native metadata and status, without joining it. */
196
+ readNativeThread(nativeId: string): Promise<INativeThread>;
195
197
  /** @returns A session's summary, with its workspace, and whether Codex doesn't save it. */
196
198
  readObservedThread(nativeId: string): Promise<{
197
199
  thread: IThreadSummary;
@@ -1,6 +1,6 @@
1
1
  export { retainNativeLineage } from './lineage/index.js';
2
- export type { IProviderProcess, IProviderFraming, INativePrompt, IProviderSkills, IProviderCall, IProviderThread, IProviderInspection, IAgentProvider, IAgentProviderFactory, IAgentProviderContext, IAgentProviderEvents, IAgentProviderOutcome, } from './types.js';
3
- export { ProviderThreadSchema, ProviderInspectionSchema, ProviderSkillsSchema } from './types.js';
2
+ export type { IProviderProcess, IProviderFraming, INativePrompt, IProviderSkills, IProviderCall, IProviderThread, IProviderInspection, IProviderReattachment, IAgentProvider, IAgentProviderFactory, IAgentProviderContext, IAgentProviderEvents, IAgentProviderOutcome, } from './types.js';
3
+ export { ProviderThreadSchema, ProviderInspectionSchema, ProviderReattachmentSchema, ProviderSkillsSchema, } from './types.js';
4
4
  export { PROVIDER_INPUT_SCHEMA, SUPPORTED_PROVIDER_OPERATION } from './constants.js';
5
5
  export { createProviderProcess, isOwnedProcess } from './process.js';
6
6
  export { createCodexProvider, createCodexProviderFactory, NativeThreadSchema, NativeTurnSchema, NativeItemSchema, toHistoryItem, parseNative, parseCodexPrompt, buildCodexReply, toApprovalPresentation, } from './codex/index.js';
@@ -1,6 +1,6 @@
1
1
  // transport
2
2
  export { retainNativeLineage } from './lineage/index.js';
3
- export { ProviderThreadSchema, ProviderInspectionSchema, ProviderSkillsSchema } from './types.js';
3
+ export { ProviderThreadSchema, ProviderInspectionSchema, ProviderReattachmentSchema, ProviderSkillsSchema, } from './types.js';
4
4
  export { PROVIDER_INPUT_SCHEMA, SUPPORTED_PROVIDER_OPERATION } from './constants.js';
5
5
  export { createProviderProcess, isOwnedProcess } from './process.js';
6
6
  // Codex
@@ -8,6 +8,8 @@ import type { IBoundAgentProvider, IProviderRegistration, IProviderRegistryEvent
8
8
  */
9
9
  export declare const createProviderRegistry: (registrations: IProviderRegistration[], allowedRoots: string[], runtimeEpoch: string) => {
10
10
  get: (provider: IProviderId) => Promise<IBoundAgentProvider>;
11
+ /** @returns Whether the provider's sessions outlive the runtime, which rejoins them. */
12
+ keepsSessions: (provider: IProviderId) => boolean;
11
13
  /** Quarantines one provider after a source-specific lifecycle gap or invalid control response. */
12
14
  quarantine(provider: IProviderId, cause: unknown): void;
13
15
  /** Installs runtime-owned callbacks without constructing any adapter. */