jg-agent-hq 10.4.0 → 10.5.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 (50) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/api/README.md +7 -7
  3. package/dist/actions/actions.js +2 -1
  4. package/dist/contracts/actions/types.d.ts +13 -0
  5. package/dist/contracts/browser/types.d.ts +11 -0
  6. package/dist/contracts/configuration/types.d.ts +4 -0
  7. package/dist/contracts/configuration/types.js +5 -0
  8. package/dist/contracts/models/types.d.ts +2 -0
  9. package/dist/contracts/models/types.js +1 -0
  10. package/dist/contracts/types.d.ts +22 -0
  11. package/dist/locks/locks.js +10 -4
  12. package/dist/providers/claude/claude.d.ts +2 -0
  13. package/dist/providers/claude/claude.js +1 -1
  14. package/dist/providers/claude/configuration/configuration.d.ts +3 -1
  15. package/dist/providers/claude/configuration/configuration.js +12 -1
  16. package/dist/providers/claude/control/control.d.ts +2 -0
  17. package/dist/providers/claude/control/control.js +19 -10
  18. package/dist/providers/claude/control/index.d.ts +1 -1
  19. package/dist/providers/claude/control/stream.js +16 -0
  20. package/dist/providers/claude/control/types.d.ts +5 -0
  21. package/dist/providers/claude/history/history.model.js +15 -9
  22. package/dist/providers/claude/history/types.d.ts +6 -0
  23. package/dist/providers/claude/history/types.js +1 -0
  24. package/dist/providers/claude/history/utilities.d.ts +7 -0
  25. package/dist/providers/claude/history/utilities.js +27 -2
  26. package/dist/providers/claude/models/models.js +1 -0
  27. package/dist/providers/claude/models/types.d.ts +1 -0
  28. package/dist/providers/claude/models/types.js +1 -0
  29. package/dist/providers/codex/codex.js +9 -2
  30. package/dist/providers/codex/configuration/configuration.d.ts +8 -0
  31. package/dist/providers/codex/configuration/configuration.js +18 -0
  32. package/dist/providers/codex/configuration/index.d.ts +1 -1
  33. package/dist/providers/codex/configuration/index.js +1 -1
  34. package/dist/providers/codex/constants.d.ts +3 -0
  35. package/dist/providers/codex/constants.js +5 -0
  36. package/dist/providers/codex/events.js +34 -3
  37. package/dist/providers/codex/models/models.js +2 -0
  38. package/dist/providers/codex/models/types.d.ts +3 -0
  39. package/dist/providers/codex/models/types.js +5 -0
  40. package/dist/providers/codex/transformers.d.ts +3 -0
  41. package/dist/providers/codex/transformers.js +4 -1
  42. package/dist/providers/codex/types.d.ts +9 -17
  43. package/dist/providers/codex/types.js +6 -9
  44. package/dist/providers/types.d.ts +2 -0
  45. package/dist/providers/types.js +3 -1
  46. package/dist/store/control/control.model.js +10 -1
  47. package/dist/store/control/types.d.ts +10 -0
  48. package/dist/store/control/types.js +1 -1
  49. package/dist/store/types.d.ts +34 -0
  50. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 10.5.0
4
+
5
+ - Add per-session fast mode: `fast` in session and turn settings, `effective.fast` and `effective.fastUnavailableReason` in `configuration`, and `supportsFast` in `models`. Codex sends it as the `priority` service tier, or `default` to turn it off, and reads it back from the session's start, resume and settings updates. Claude sends `fastMode` as a flag setting at startup and before input, keeps it when a parked session reopens, and reads it back from `fast_mode_state`, with the reason Claude gives when fast mode can't serve the session.
6
+ - Read a Claude session that worked in another folder for part of its life, such as a task worktree it moved into and back out of. A transcript belongs to a workspace once one of its records ran there, and its records from other folders are listed and read with the rest. One record outside the workspace used to make the whole history unavailable for good. A record with another session's ID, or a folder with an excluded segment, still makes it unavailable, and a transcript with no record inside the workspace stays out until one is written. Every indexed transcript is indexed again after the upgrade.
7
+
8
+ ## 10.4.1
9
+
10
+ - Keep the Codex provider working when a turn's end arrives twice: once read back from Codex after a lost or skipped message, and once as the turn's own `turn/completed`. In either order, the first recorded stands and the other only fills in a result the first lacked. The two used to differ when the notification carried the turn's result, which failed every managed Codex session.
11
+ - Keep HQ's own Codex turn going when its `turn/started` fails validation while the input that started it is still in flight. The session is watched instead of marked uncertain, and the turn keeps its result.
12
+ - Keep a Codex session's next turn that HQ didn't prepare, such as a compaction, working after a turn's end failed validation. An earlier turn's end no longer drops the result capture of the turn HQ prepared next.
13
+ - Read a Codex session whose status is newer than HQ knows as `nativeState: 'unknown'` in lists, reads, resumes and rejoins, instead of failing them. `IProviderThread`'s `nativeState` gains `unknown`.
14
+ - Keep a Claude session's process when Claude starts a turn of its own, or a call or background command begins, while HQ parks the session.
15
+ - Leave a state-root lock in place when it changes or can't be removed while startup reclaims it, instead of failing startup with an uncoded error.
16
+
3
17
  ## 10.4.0
4
18
 
5
19
  - Accept Claude permission requests that carry fields HQ doesn't list. Claude adds fields between releases, such as `decision_reason_code` and `tool_kind`, and HQ refused every such request before the operator saw it. Known fields keep their validation, the rest are dropped, and the reply still holds only the displayed input.
package/api/README.md CHANGED
@@ -78,7 +78,7 @@ One Codex connection carries every managed Codex session, so a message HQ can't
78
78
  - an idle session whose latest turn is the one HQ recorded, or that has no turns, is left alone;
79
79
  - anything else, such as a newer turn, a failed read or a lost approval resolution, marks the session uncertain: its submitted deliveries become uncertain and its pending approvals expire.
80
80
 
81
- A session with an action in flight when a message is skipped isn't read, since its newest turn may not be recorded yet; it is watched instead. The original notification arriving late leaves the session as reconciled. A response to HQ's own request that fails validation, a message that is neither a request, a notification nor a response, and other invalid framing still fail the connection.
81
+ A session with an action in flight when a message is skipped, or when its turn start is lost, isn't read, since its newest turn may not be recorded yet; it is watched instead. When a turn's end is both read back and received as its own notification, in either order, the first recorded stands, and the other only fills in a result the first lacked. A session status newer than HQ knows reads as `nativeState: 'unknown'` in lists and reads. A response to HQ's own request that fails validation, a message that is neither a request, a notification nor a response, and other invalid framing still fail the connection.
82
82
 
83
83
  `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`.
84
84
 
@@ -133,7 +133,7 @@ Import `HqRequestSchema`, `HqResponseSchema` and their inferred types from `jg-a
133
133
  | ----------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
134
134
  | `status` | None | Runtime epoch, host PID, start time, worker availability and native transport availability |
135
135
  | `capabilities` | `provider`; optional managed `threadId` | Provider/session-scoped support, input/configuration schemas and unavailable reasons |
136
- | `models` | `provider` | Paged native model identities, effort choices and defaults when observed |
136
+ | `models` | `provider` | Paged native model identities, effort choices, fast support and defaults when observed |
137
137
  | `configuration` | `provider`, `workspaceRoot`; optional managed `threadId` | Known effective native settings and paged agent/profile choices |
138
138
  | `stop` | None | Accepted shutdown and runtime epoch |
139
139
  | `threads` | `provider`, `workspaceRoot` | Paged native discovery; optional `search` |
@@ -201,15 +201,15 @@ Native qualification on 2026-10-23 used Codex 0.163.0 and Claude Code 2.1.309. B
201
201
 
202
202
  ## Native configuration
203
203
 
204
- `models` returns native model IDs, display metadata, nullable effort choices/defaults and bounded continuation. Model/effort names are not fixed to a CLI release. Codex retains its native cursor; Claude uses an inventory revision and stable model key. Changed catalogs invalidate continuation.
204
+ `models` returns native model IDs, display metadata, nullable effort choices/defaults, a nullable `supportsFast` and bounded continuation. Codex reports fast support when a model lists the `priority` service tier, and Claude when the model's `supportsFastMode` is true; null means the catalog doesn't say. Model/effort names are not fixed to a CLI release. Codex retains its native cursor; Claude uses an inventory revision and stable model key. Changed catalogs invalidate continuation.
205
205
 
206
- `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. Claude records a conversation's instructions once (`--system-prompt-snapshot`, on by default) and reuses them on resume, so `systemInstructions` and `developerInstructions` are reported only for a session whose current process started its conversation, and are null for one that resumed it. 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.
206
+ `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. Claude records a conversation's instructions once (`--system-prompt-snapshot`, on by default) and reuses them on resume, so `systemInstructions` and `developerInstructions` are reported only for a session whose current process started its conversation, and are null for one that resumed it. `effective.fast` is whether the session uses fast mode. Codex reads it from the service tier its start, resume and later `thread/settings/updated` report. Claude reads it from the `fast_mode_state` of its latest start or turn result, counting `cooldown` after a rate limit as on, and before any from its settings read. `effective.fastUnavailableReason` is Claude's `fast_mode_disabled_reason`, such as `extra_usage_disabled`, while fast mode can't serve the session, and null otherwise. It leaves out `sdk_opt_in_required`, which Claude reports while fast mode is simply off, since turning it on is that opt-in. 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.
207
207
 
208
- `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.
208
+ `thread-create`, `thread-resume` and `thread-adopt`, for the resume it runs, accept optional `settings`: `model`, `effort`, `fast`, `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.
209
209
 
210
210
  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.
211
211
 
212
- A `message` or `queue` accepts optional `settings: { model?, effort?, outputSchema? }`, applied at delivery. Codex accepts an output schema per turn; Claude requires it to match the process schema, except that HQ can install its shared directed-request envelope through an idle restart of the same native session. Codex uses native turn parameters; Claude acknowledges a native flag-layer update before sending that input. Startup instructions, permission settings and agent selection are excluded from this live path. Queue entries retain explicit settings; omitted options inherit native settings at delivery. Native rejection, partial control failure or lost acknowledgement never causes automatic input replay. Ordinary settings are not written to native configuration files. Confirmed startup instruction selections stay in the owned controller's memory; settings unavailable from native observation after reconnect are null.
212
+ A `message` or `queue` accepts optional `settings: { model?, effort?, fast?, outputSchema? }`, applied at delivery. `fast` selects the provider's fast mode, and `false` turns it off. Codex sends it as the `priority` service tier, or `default` for off, on `thread/start`, `thread/resume` and `turn/start`, where it also applies to later turns. Claude sends `fastMode` through `--settings` at startup and through a flag-layer update before input, and a parked session reopens with it; this flag setting is also the opt-in Claude requires before fast mode serves an SDK client. Fast mode can cost more usage, and Claude offers it only on some models and plans. Codex accepts an output schema per turn; Claude requires it to match the process schema, except that HQ can install its shared directed-request envelope through an idle restart of the same native session. Codex uses native turn parameters; Claude acknowledges a native flag-layer update before sending that input. Startup instructions, permission settings and agent selection are excluded from this live path. Queue entries retain explicit settings; omitted options inherit native settings at delivery. Native rejection, partial control failure or lost acknowledgement never causes automatic input replay. Ordinary settings are not written to native configuration files. Confirmed startup instruction selections stay in the owned controller's memory; settings unavailable from native observation after reconnect are null.
213
213
 
214
214
  Managed threads expose `nativeLineage: { sessionId, parentThreadId, forkedFromId } | null`, nullable `forkedFromThreadId`, and `isArchived`. Native IDs are kept exactly as observed; a session ID can differ from the thread ID. Unknown later fields never erase confirmed immutable lineage. A contradiction uses JG_AGENT_HQ_PROVIDER_FAILED. Native Claude history omits the fork source, so confirmed HQ fork metadata enriches that read. A fork whose creation is uncertain is never automatically created again; explicit replacement recovery uses the recorded source. Attaching an uncertain fork requires native evidence of its source relationship.
215
215
 
@@ -235,7 +235,7 @@ Claude connects on its first read through `claude --print --input-format stream-
235
235
 
236
236
  The structured CLI interface has no session-history listing operation. The Claude-owned reader therefore uses direct UUID JSONL files in the native project's directory beneath `CLAUDE_CONFIG_DIR`, or the normal `.claude` directory. CLI and transcript version labels do not gate reads. Required session identity, workspace, parent links, timestamps and message roles are validated, while additive fields and mixed version labels are tolerated. Claude Code can write a hidden record, such as an attachment or a scheduled-task event, a few lines before the record it follows; the reader holds it back until that parent is indexed, and one whose parent the read doesn't reach starts a turn of its own. A message whose parent is unknown is never accepted. Encoded project keys longer than 200 characters, directory/file links, malformed required fields and records larger than 8 MiB report unavailable. Discovery never recurses into subdirectories, including excluded directories. Unsupported discovered sessions have `historyState: unavailable`; they do not prevent supported sessions from being listed.
237
237
 
238
- Discovery verifies the workspace recorded inside each transcript before returning its identity or title. A matching native directory name alone is insufficient because punctuation replacement can produce colliding directory keys. Native working directories may be the selected workspace or its subdirectories, including removed subdirectories. The nearest existing path ancestor must resolve inside the workspace without excluded segments; sibling paths and symlink escapes are rejected. Foreign workspaces are omitted. If a file's workspace cannot be established, discovery reports unavailable rather than inventing an empty result.
238
+ Discovery verifies the workspace recorded inside each transcript before returning its identity or title. A matching native directory name alone is insufficient because punctuation replacement can produce colliding directory keys, so a transcript belongs to the selected workspace once one of its records ran there: in the workspace or a subdirectory, including a removed one, whose nearest existing path ancestor resolves inside the workspace without excluded segments. A symlink escape doesn't count as inside. The session's other records may name any other folder, such as a sibling task worktree it moved into, and are listed and read with the rest. Every record must carry the session's own ID, and no record's folder, nor its nearest existing ancestor's real path, may have an excluded segment; otherwise the history is unavailable. A transcript with no record inside the workspace is omitted until one is written. If a file's workspace cannot be established, discovery reports unavailable rather than inventing an empty result.
239
239
 
240
240
  The existing SQLite worker incrementally records file identity, complete-line offsets, message identities and parent links. It does not save message bodies. File identity includes the current reader projection revision and a native prefix hash, so source changes invalidate the derived projection. Each worker batch inspects at most 128 directory entries and reads at most 16 MiB of new transcript bytes, one file at a time, which fits the largest record. The adapter continues batches with a host-event-loop yield between them, within a 30-second operation budget. If that budget is reached, the read reports unavailable and subsequent reads continue indexing. At most four incomplete discovery iterators remain open. Shutdown closes them. Discovery continuations use that projection without starting another directory scan; start a fresh first page to refresh discovery. A transcript whose identity, size and modification time match a projection that reached its end is neither read nor written again. Each directory scan keeps the transcripts it has seen in memory, and only a complete scan removes the others from the projection, so reads over unchanged transcripts write nothing to SQLite. No additional cache infrastructure or browser cache is used.
241
241
 
@@ -508,7 +508,8 @@ export const createActions = (registry, store, roots, epoch, actionKey, skills,
508
508
  if (!record)
509
509
  return;
510
510
  // an action in flight may have started a turn the record doesn't hold yet
511
- if (request.lost === 'unknown' && record.hasPendingAction) {
511
+ if ((request.lost === 'unknown' || request.lost === 'turn-started') &&
512
+ record.hasPendingAction) {
512
513
  watched.add(key(provider, nativeId));
513
514
  return;
514
515
  }
@@ -21,6 +21,7 @@ export declare const PreparedInputSchema: z.ZodObject<{
21
21
  settings: z.ZodObject<{
22
22
  model: z.ZodOptional<z.ZodString>;
23
23
  effort: z.ZodOptional<z.ZodString>;
24
+ fast: z.ZodOptional<z.ZodBoolean>;
24
25
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
25
26
  }, z.core.$strict>;
26
27
  }, z.core.$strip>;
@@ -68,6 +69,7 @@ export declare const ActionCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
68
69
  settings: z.ZodOptional<z.ZodObject<{
69
70
  model: z.ZodOptional<z.ZodString>;
70
71
  effort: z.ZodOptional<z.ZodString>;
72
+ fast: z.ZodOptional<z.ZodBoolean>;
71
73
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
72
74
  nativeAgent: z.ZodOptional<z.ZodString>;
73
75
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -85,6 +87,7 @@ export declare const ActionCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
85
87
  settings: z.ZodOptional<z.ZodObject<{
86
88
  model: z.ZodOptional<z.ZodString>;
87
89
  effort: z.ZodOptional<z.ZodString>;
90
+ fast: z.ZodOptional<z.ZodBoolean>;
88
91
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
89
92
  nativeAgent: z.ZodOptional<z.ZodString>;
90
93
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -99,6 +102,7 @@ export declare const ActionCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
99
102
  settings: z.ZodOptional<z.ZodObject<{
100
103
  model: z.ZodOptional<z.ZodString>;
101
104
  effort: z.ZodOptional<z.ZodString>;
105
+ fast: z.ZodOptional<z.ZodBoolean>;
102
106
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
103
107
  nativeAgent: z.ZodOptional<z.ZodString>;
104
108
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -178,6 +182,7 @@ export declare const ActionCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
178
182
  settings: z.ZodOptional<z.ZodObject<{
179
183
  model: z.ZodOptional<z.ZodString>;
180
184
  effort: z.ZodOptional<z.ZodString>;
185
+ fast: z.ZodOptional<z.ZodBoolean>;
181
186
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
182
187
  }, z.core.$strict>>;
183
188
  }, z.core.$strict>, z.ZodObject<{
@@ -219,6 +224,7 @@ export declare const ActionCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
219
224
  settings: z.ZodOptional<z.ZodObject<{
220
225
  model: z.ZodOptional<z.ZodString>;
221
226
  effort: z.ZodOptional<z.ZodString>;
227
+ fast: z.ZodOptional<z.ZodBoolean>;
222
228
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
223
229
  }, z.core.$strict>>;
224
230
  threadId: z.ZodUUID;
@@ -319,6 +325,7 @@ export declare const ActionEnvelopeSchema: z.ZodObject<{
319
325
  settings: z.ZodOptional<z.ZodObject<{
320
326
  model: z.ZodOptional<z.ZodString>;
321
327
  effort: z.ZodOptional<z.ZodString>;
328
+ fast: z.ZodOptional<z.ZodBoolean>;
322
329
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
323
330
  nativeAgent: z.ZodOptional<z.ZodString>;
324
331
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -336,6 +343,7 @@ export declare const ActionEnvelopeSchema: z.ZodObject<{
336
343
  settings: z.ZodOptional<z.ZodObject<{
337
344
  model: z.ZodOptional<z.ZodString>;
338
345
  effort: z.ZodOptional<z.ZodString>;
346
+ fast: z.ZodOptional<z.ZodBoolean>;
339
347
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
340
348
  nativeAgent: z.ZodOptional<z.ZodString>;
341
349
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -350,6 +358,7 @@ export declare const ActionEnvelopeSchema: z.ZodObject<{
350
358
  settings: z.ZodOptional<z.ZodObject<{
351
359
  model: z.ZodOptional<z.ZodString>;
352
360
  effort: z.ZodOptional<z.ZodString>;
361
+ fast: z.ZodOptional<z.ZodBoolean>;
353
362
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
354
363
  nativeAgent: z.ZodOptional<z.ZodString>;
355
364
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -429,6 +438,7 @@ export declare const ActionEnvelopeSchema: z.ZodObject<{
429
438
  settings: z.ZodOptional<z.ZodObject<{
430
439
  model: z.ZodOptional<z.ZodString>;
431
440
  effort: z.ZodOptional<z.ZodString>;
441
+ fast: z.ZodOptional<z.ZodBoolean>;
432
442
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
433
443
  }, z.core.$strict>>;
434
444
  }, z.core.$strict>, z.ZodObject<{
@@ -470,6 +480,7 @@ export declare const ActionEnvelopeSchema: z.ZodObject<{
470
480
  settings: z.ZodOptional<z.ZodObject<{
471
481
  model: z.ZodOptional<z.ZodString>;
472
482
  effort: z.ZodOptional<z.ZodString>;
483
+ fast: z.ZodOptional<z.ZodBoolean>;
473
484
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
474
485
  }, z.core.$strict>>;
475
486
  threadId: z.ZodUUID;
@@ -610,6 +621,7 @@ export declare const ActionReceiptSchema: z.ZodObject<{
610
621
  settings: z.ZodObject<{
611
622
  model: z.ZodOptional<z.ZodString>;
612
623
  effort: z.ZodOptional<z.ZodString>;
624
+ fast: z.ZodOptional<z.ZodBoolean>;
613
625
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
614
626
  }, z.core.$strict>;
615
627
  }, z.core.$strip>>;
@@ -798,6 +810,7 @@ export declare const ActionWaitSchema: z.ZodObject<{
798
810
  settings: z.ZodObject<{
799
811
  model: z.ZodOptional<z.ZodString>;
800
812
  effort: z.ZodOptional<z.ZodString>;
813
+ fast: z.ZodOptional<z.ZodBoolean>;
801
814
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
802
815
  }, z.core.$strict>;
803
816
  }, z.core.$strip>>;
@@ -47,6 +47,7 @@ export declare const BrowserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
47
47
  settings: z.ZodOptional<z.ZodObject<{
48
48
  model: z.ZodOptional<z.ZodString>;
49
49
  effort: z.ZodOptional<z.ZodString>;
50
+ fast: z.ZodOptional<z.ZodBoolean>;
50
51
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
51
52
  nativeAgent: z.ZodOptional<z.ZodString>;
52
53
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -64,6 +65,7 @@ export declare const BrowserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
64
65
  settings: z.ZodOptional<z.ZodObject<{
65
66
  model: z.ZodOptional<z.ZodString>;
66
67
  effort: z.ZodOptional<z.ZodString>;
68
+ fast: z.ZodOptional<z.ZodBoolean>;
67
69
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
68
70
  nativeAgent: z.ZodOptional<z.ZodString>;
69
71
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -78,6 +80,7 @@ export declare const BrowserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
78
80
  settings: z.ZodOptional<z.ZodObject<{
79
81
  model: z.ZodOptional<z.ZodString>;
80
82
  effort: z.ZodOptional<z.ZodString>;
83
+ fast: z.ZodOptional<z.ZodBoolean>;
81
84
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
82
85
  nativeAgent: z.ZodOptional<z.ZodString>;
83
86
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -157,6 +160,7 @@ export declare const BrowserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
157
160
  settings: z.ZodOptional<z.ZodObject<{
158
161
  model: z.ZodOptional<z.ZodString>;
159
162
  effort: z.ZodOptional<z.ZodString>;
163
+ fast: z.ZodOptional<z.ZodBoolean>;
160
164
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
161
165
  }, z.core.$strict>>;
162
166
  }, z.core.$strict>, z.ZodObject<{
@@ -198,6 +202,7 @@ export declare const BrowserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
198
202
  settings: z.ZodOptional<z.ZodObject<{
199
203
  model: z.ZodOptional<z.ZodString>;
200
204
  effort: z.ZodOptional<z.ZodString>;
205
+ fast: z.ZodOptional<z.ZodBoolean>;
201
206
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
202
207
  }, z.core.$strict>>;
203
208
  threadId: z.ZodUUID;
@@ -304,6 +309,7 @@ export declare const BrowserActionSchema: z.ZodObject<{
304
309
  settings: z.ZodOptional<z.ZodObject<{
305
310
  model: z.ZodOptional<z.ZodString>;
306
311
  effort: z.ZodOptional<z.ZodString>;
312
+ fast: z.ZodOptional<z.ZodBoolean>;
307
313
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
308
314
  nativeAgent: z.ZodOptional<z.ZodString>;
309
315
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -321,6 +327,7 @@ export declare const BrowserActionSchema: z.ZodObject<{
321
327
  settings: z.ZodOptional<z.ZodObject<{
322
328
  model: z.ZodOptional<z.ZodString>;
323
329
  effort: z.ZodOptional<z.ZodString>;
330
+ fast: z.ZodOptional<z.ZodBoolean>;
324
331
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
325
332
  nativeAgent: z.ZodOptional<z.ZodString>;
326
333
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -335,6 +342,7 @@ export declare const BrowserActionSchema: z.ZodObject<{
335
342
  settings: z.ZodOptional<z.ZodObject<{
336
343
  model: z.ZodOptional<z.ZodString>;
337
344
  effort: z.ZodOptional<z.ZodString>;
345
+ fast: z.ZodOptional<z.ZodBoolean>;
338
346
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
339
347
  nativeAgent: z.ZodOptional<z.ZodString>;
340
348
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -414,6 +422,7 @@ export declare const BrowserActionSchema: z.ZodObject<{
414
422
  settings: z.ZodOptional<z.ZodObject<{
415
423
  model: z.ZodOptional<z.ZodString>;
416
424
  effort: z.ZodOptional<z.ZodString>;
425
+ fast: z.ZodOptional<z.ZodBoolean>;
417
426
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
418
427
  }, z.core.$strict>>;
419
428
  }, z.core.$strict>, z.ZodObject<{
@@ -455,6 +464,7 @@ export declare const BrowserActionSchema: z.ZodObject<{
455
464
  settings: z.ZodOptional<z.ZodObject<{
456
465
  model: z.ZodOptional<z.ZodString>;
457
466
  effort: z.ZodOptional<z.ZodString>;
467
+ fast: z.ZodOptional<z.ZodBoolean>;
458
468
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
459
469
  }, z.core.$strict>>;
460
470
  threadId: z.ZodUUID;
@@ -611,6 +621,7 @@ export declare const BrowserReceiptSchema: z.ZodObject<{
611
621
  settings: z.ZodObject<{
612
622
  model: z.ZodOptional<z.ZodString>;
613
623
  effort: z.ZodOptional<z.ZodString>;
624
+ fast: z.ZodOptional<z.ZodBoolean>;
614
625
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
615
626
  }, z.core.$strict>;
616
627
  }, z.core.$strip>>;
@@ -2,12 +2,14 @@ import { z } from 'zod';
2
2
  export declare const TurnSettingsSchema: z.ZodObject<{
3
3
  model: z.ZodOptional<z.ZodString>;
4
4
  effort: z.ZodOptional<z.ZodString>;
5
+ fast: z.ZodOptional<z.ZodBoolean>;
5
6
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
6
7
  }, z.core.$strict>;
7
8
  export type ITurnSettings = z.infer<typeof TurnSettingsSchema>;
8
9
  export declare const SessionSettingsSchema: z.ZodObject<{
9
10
  model: z.ZodOptional<z.ZodString>;
10
11
  effort: z.ZodOptional<z.ZodString>;
12
+ fast: z.ZodOptional<z.ZodBoolean>;
11
13
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
12
14
  nativeAgent: z.ZodOptional<z.ZodString>;
13
15
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -42,6 +44,8 @@ export declare const SessionConfigurationSchema: z.ZodObject<{
42
44
  effective: z.ZodObject<{
43
45
  model: z.ZodNullable<z.ZodString>;
44
46
  effort: z.ZodNullable<z.ZodString>;
47
+ fast: z.ZodNullable<z.ZodBoolean>;
48
+ fastUnavailableReason: z.ZodNullable<z.ZodString>;
45
49
  nativeAgent: z.ZodNullable<z.ZodString>;
46
50
  nativeProfile: z.ZodNullable<z.ZodString>;
47
51
  permissionMode: z.ZodNullable<z.ZodString>;
@@ -7,6 +7,8 @@ const SelectionSchema = z.string().min(1).max(256);
7
7
  export const TurnSettingsSchema = z.strictObject({
8
8
  model: NativeIdSchema.optional(),
9
9
  effort: z.string().min(1).max(64).optional(),
10
+ // the provider's fast mode, which trades more usage for speed on models that support it
11
+ fast: z.boolean().optional(),
10
12
  outputSchema: OutputSchemaSchema.optional(),
11
13
  });
12
14
  export const SessionSettingsSchema = TurnSettingsSchema.extend({
@@ -38,6 +40,9 @@ export const SessionConfigurationSchema = z.object({
38
40
  effective: z.object({
39
41
  model: NativeIdSchema.nullable(),
40
42
  effort: z.string().min(1).max(64).nullable(),
43
+ fast: z.boolean().nullable(),
44
+ // the provider's reason fast mode can't serve the session, such as a plan without it
45
+ fastUnavailableReason: z.string().min(1).max(64).nullable(),
41
46
  nativeAgent: SelectionSchema.nullable(),
42
47
  nativeProfile: SelectionSchema.nullable(),
43
48
  permissionMode: SelectionSchema.nullable(),
@@ -7,6 +7,7 @@ export declare const ProviderModelSchema: z.ZodObject<{
7
7
  efforts: z.ZodNullable<z.ZodArray<z.ZodString>>;
8
8
  defaultEffort: z.ZodNullable<z.ZodString>;
9
9
  isDefault: z.ZodNullable<z.ZodBoolean>;
10
+ supportsFast: z.ZodNullable<z.ZodBoolean>;
10
11
  }, z.core.$strip>;
11
12
  export type IProviderModel = z.infer<typeof ProviderModelSchema>;
12
13
  export declare const ProviderModelsRequestSchema: z.ZodObject<{
@@ -26,6 +27,7 @@ export declare const ProviderModelPageSchema: z.ZodObject<{
26
27
  efforts: z.ZodNullable<z.ZodArray<z.ZodString>>;
27
28
  defaultEffort: z.ZodNullable<z.ZodString>;
28
29
  isDefault: z.ZodNullable<z.ZodBoolean>;
30
+ supportsFast: z.ZodNullable<z.ZodBoolean>;
29
31
  }, z.core.$strip>>;
30
32
  nextCursor: z.ZodNullable<z.ZodString>;
31
33
  source: z.ZodLiteral<"native">;
@@ -11,6 +11,7 @@ export const ProviderModelSchema = z.object({
11
11
  efforts: z.array(z.string().min(1).max(64)).max(32).nullable(),
12
12
  defaultEffort: z.string().min(1).max(64).nullable(),
13
13
  isDefault: z.boolean().nullable(),
14
+ supportsFast: z.boolean().nullable(),
14
15
  });
15
16
  // catalog reads bind continuation to the selected provider and page size
16
17
  export const ProviderModelsRequestSchema = z.strictObject({
@@ -170,6 +170,7 @@ export declare const HqRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
170
170
  settings: z.ZodOptional<z.ZodObject<{
171
171
  model: z.ZodOptional<z.ZodString>;
172
172
  effort: z.ZodOptional<z.ZodString>;
173
+ fast: z.ZodOptional<z.ZodBoolean>;
173
174
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
174
175
  nativeAgent: z.ZodOptional<z.ZodString>;
175
176
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -187,6 +188,7 @@ export declare const HqRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
187
188
  settings: z.ZodOptional<z.ZodObject<{
188
189
  model: z.ZodOptional<z.ZodString>;
189
190
  effort: z.ZodOptional<z.ZodString>;
191
+ fast: z.ZodOptional<z.ZodBoolean>;
190
192
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
191
193
  nativeAgent: z.ZodOptional<z.ZodString>;
192
194
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -201,6 +203,7 @@ export declare const HqRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
201
203
  settings: z.ZodOptional<z.ZodObject<{
202
204
  model: z.ZodOptional<z.ZodString>;
203
205
  effort: z.ZodOptional<z.ZodString>;
206
+ fast: z.ZodOptional<z.ZodBoolean>;
204
207
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
205
208
  nativeAgent: z.ZodOptional<z.ZodString>;
206
209
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -280,6 +283,7 @@ export declare const HqRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
280
283
  settings: z.ZodOptional<z.ZodObject<{
281
284
  model: z.ZodOptional<z.ZodString>;
282
285
  effort: z.ZodOptional<z.ZodString>;
286
+ fast: z.ZodOptional<z.ZodBoolean>;
283
287
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
284
288
  }, z.core.$strict>>;
285
289
  }, z.core.$strict>, z.ZodObject<{
@@ -321,6 +325,7 @@ export declare const HqRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
321
325
  settings: z.ZodOptional<z.ZodObject<{
322
326
  model: z.ZodOptional<z.ZodString>;
323
327
  effort: z.ZodOptional<z.ZodString>;
328
+ fast: z.ZodOptional<z.ZodBoolean>;
324
329
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
325
330
  }, z.core.$strict>>;
326
331
  threadId: z.ZodUUID;
@@ -1225,6 +1230,8 @@ export declare const HqResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1225
1230
  effective: z.ZodObject<{
1226
1231
  model: z.ZodNullable<z.ZodString>;
1227
1232
  effort: z.ZodNullable<z.ZodString>;
1233
+ fast: z.ZodNullable<z.ZodBoolean>;
1234
+ fastUnavailableReason: z.ZodNullable<z.ZodString>;
1228
1235
  nativeAgent: z.ZodNullable<z.ZodString>;
1229
1236
  nativeProfile: z.ZodNullable<z.ZodString>;
1230
1237
  permissionMode: z.ZodNullable<z.ZodString>;
@@ -1261,6 +1268,7 @@ export declare const HqResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1261
1268
  efforts: z.ZodNullable<z.ZodArray<z.ZodString>>;
1262
1269
  defaultEffort: z.ZodNullable<z.ZodString>;
1263
1270
  isDefault: z.ZodNullable<z.ZodBoolean>;
1271
+ supportsFast: z.ZodNullable<z.ZodBoolean>;
1264
1272
  }, z.core.$strip>>;
1265
1273
  nextCursor: z.ZodNullable<z.ZodString>;
1266
1274
  source: z.ZodLiteral<"native">;
@@ -2358,6 +2366,7 @@ export declare const HqResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2358
2366
  settings: z.ZodObject<{
2359
2367
  model: z.ZodOptional<z.ZodString>;
2360
2368
  effort: z.ZodOptional<z.ZodString>;
2369
+ fast: z.ZodOptional<z.ZodBoolean>;
2361
2370
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
2362
2371
  }, z.core.$strict>;
2363
2372
  }, z.core.$strip>>;
@@ -2480,6 +2489,7 @@ export declare const HqResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2480
2489
  settings: z.ZodObject<{
2481
2490
  model: z.ZodOptional<z.ZodString>;
2482
2491
  effort: z.ZodOptional<z.ZodString>;
2492
+ fast: z.ZodOptional<z.ZodBoolean>;
2483
2493
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
2484
2494
  }, z.core.$strict>;
2485
2495
  }, z.core.$strip>>;
@@ -2603,6 +2613,7 @@ export declare const HqResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2603
2613
  settings: z.ZodObject<{
2604
2614
  model: z.ZodOptional<z.ZodString>;
2605
2615
  effort: z.ZodOptional<z.ZodString>;
2616
+ fast: z.ZodOptional<z.ZodBoolean>;
2606
2617
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
2607
2618
  }, z.core.$strict>;
2608
2619
  }, z.core.$strip>>;
@@ -3348,6 +3359,7 @@ export declare const IpcRequestSchema: z.ZodObject<{
3348
3359
  settings: z.ZodOptional<z.ZodObject<{
3349
3360
  model: z.ZodOptional<z.ZodString>;
3350
3361
  effort: z.ZodOptional<z.ZodString>;
3362
+ fast: z.ZodOptional<z.ZodBoolean>;
3351
3363
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
3352
3364
  nativeAgent: z.ZodOptional<z.ZodString>;
3353
3365
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -3365,6 +3377,7 @@ export declare const IpcRequestSchema: z.ZodObject<{
3365
3377
  settings: z.ZodOptional<z.ZodObject<{
3366
3378
  model: z.ZodOptional<z.ZodString>;
3367
3379
  effort: z.ZodOptional<z.ZodString>;
3380
+ fast: z.ZodOptional<z.ZodBoolean>;
3368
3381
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
3369
3382
  nativeAgent: z.ZodOptional<z.ZodString>;
3370
3383
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -3379,6 +3392,7 @@ export declare const IpcRequestSchema: z.ZodObject<{
3379
3392
  settings: z.ZodOptional<z.ZodObject<{
3380
3393
  model: z.ZodOptional<z.ZodString>;
3381
3394
  effort: z.ZodOptional<z.ZodString>;
3395
+ fast: z.ZodOptional<z.ZodBoolean>;
3382
3396
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
3383
3397
  nativeAgent: z.ZodOptional<z.ZodString>;
3384
3398
  permissionMode: z.ZodOptional<z.ZodString>;
@@ -3458,6 +3472,7 @@ export declare const IpcRequestSchema: z.ZodObject<{
3458
3472
  settings: z.ZodOptional<z.ZodObject<{
3459
3473
  model: z.ZodOptional<z.ZodString>;
3460
3474
  effort: z.ZodOptional<z.ZodString>;
3475
+ fast: z.ZodOptional<z.ZodBoolean>;
3461
3476
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
3462
3477
  }, z.core.$strict>>;
3463
3478
  }, z.core.$strict>, z.ZodObject<{
@@ -3499,6 +3514,7 @@ export declare const IpcRequestSchema: z.ZodObject<{
3499
3514
  settings: z.ZodOptional<z.ZodObject<{
3500
3515
  model: z.ZodOptional<z.ZodString>;
3501
3516
  effort: z.ZodOptional<z.ZodString>;
3517
+ fast: z.ZodOptional<z.ZodBoolean>;
3502
3518
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
3503
3519
  }, z.core.$strict>>;
3504
3520
  threadId: z.ZodUUID;
@@ -3924,6 +3940,8 @@ export declare const IpcResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3924
3940
  effective: z.ZodObject<{
3925
3941
  model: z.ZodNullable<z.ZodString>;
3926
3942
  effort: z.ZodNullable<z.ZodString>;
3943
+ fast: z.ZodNullable<z.ZodBoolean>;
3944
+ fastUnavailableReason: z.ZodNullable<z.ZodString>;
3927
3945
  nativeAgent: z.ZodNullable<z.ZodString>;
3928
3946
  nativeProfile: z.ZodNullable<z.ZodString>;
3929
3947
  permissionMode: z.ZodNullable<z.ZodString>;
@@ -3960,6 +3978,7 @@ export declare const IpcResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3960
3978
  efforts: z.ZodNullable<z.ZodArray<z.ZodString>>;
3961
3979
  defaultEffort: z.ZodNullable<z.ZodString>;
3962
3980
  isDefault: z.ZodNullable<z.ZodBoolean>;
3981
+ supportsFast: z.ZodNullable<z.ZodBoolean>;
3963
3982
  }, z.core.$strip>>;
3964
3983
  nextCursor: z.ZodNullable<z.ZodString>;
3965
3984
  source: z.ZodLiteral<"native">;
@@ -5057,6 +5076,7 @@ export declare const IpcResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5057
5076
  settings: z.ZodObject<{
5058
5077
  model: z.ZodOptional<z.ZodString>;
5059
5078
  effort: z.ZodOptional<z.ZodString>;
5079
+ fast: z.ZodOptional<z.ZodBoolean>;
5060
5080
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
5061
5081
  }, z.core.$strict>;
5062
5082
  }, z.core.$strip>>;
@@ -5179,6 +5199,7 @@ export declare const IpcResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5179
5199
  settings: z.ZodObject<{
5180
5200
  model: z.ZodOptional<z.ZodString>;
5181
5201
  effort: z.ZodOptional<z.ZodString>;
5202
+ fast: z.ZodOptional<z.ZodBoolean>;
5182
5203
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
5183
5204
  }, z.core.$strict>;
5184
5205
  }, z.core.$strip>>;
@@ -5302,6 +5323,7 @@ export declare const IpcResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5302
5323
  settings: z.ZodObject<{
5303
5324
  model: z.ZodOptional<z.ZodString>;
5304
5325
  effort: z.ZodOptional<z.ZodString>;
5326
+ fast: z.ZodOptional<z.ZodBoolean>;
5305
5327
  outputSchema: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodJSONSchema>, unknown>>;
5306
5328
  }, z.core.$strict>;
5307
5329
  }, z.core.$strip>>;
@@ -366,11 +366,17 @@ export const removeStaleHqLock = async (root) => {
366
366
  }
367
367
  if (stored.kind !== 'owner' || getOwnerLiveness(stored.owner.pid) !== 'dead')
368
368
  return false;
369
- const current = await readStoredLock(path);
370
- if (current.kind !== 'owner' || current.content !== stored.content)
369
+ try {
370
+ const current = await readStoredLock(path);
371
+ if (current.kind !== 'owner' || current.content !== stored.content)
372
+ return false;
373
+ await rm(path);
374
+ return true;
375
+ }
376
+ catch {
377
+ // a lock that changed into something unreadable, or can't be removed, keeps its inspection
371
378
  return false;
372
- await rm(path);
373
- return true;
379
+ }
374
380
  };
375
381
  /**
376
382
  * Reports the HQ lock for status output without acquiring or changing it.
@@ -47,6 +47,8 @@ export declare const createClaudeProvider: (store: IStore) => {
47
47
  effective: {
48
48
  model: string | null;
49
49
  effort: string | null;
50
+ fast: boolean | null;
51
+ fastUnavailableReason: string | null;
50
52
  nativeAgent: string | null;
51
53
  nativeProfile: string | null;
52
54
  permissionMode: string | null;
@@ -210,7 +210,7 @@ export const createClaudeProvider = (store) => {
210
210
  * - JG_AGENT_HQ_TRANSPORT_FAILED: The HQ transport failed
211
211
  */
212
212
  async readConfiguration(command, signal) {
213
- return withReadConnection(command.workspaceRoot, signal, async (native) => toClaudeConfiguration(await native.requestControl({ subtype: 'get_settings' }), native.initialization.agents, native.initialization.current_permission_mode, undefined, false, {}, command));
213
+ return withReadConnection(command.workspaceRoot, signal, async (native) => toClaudeConfiguration(await native.requestControl({ subtype: 'get_settings' }), native.initialization.agents, native.initialization.current_permission_mode, undefined, false, undefined, {}, command));
214
214
  },
215
215
  /**
216
216
  * Reads fresh native account metadata in a disposable read lane.
@@ -1,4 +1,5 @@
1
1
  import type { IConfigurationRequest, ISessionConfiguration, ISessionSettings } from '../../../contracts/index.js';
2
+ import type { IClaudeFastMode } from '../control/index.js';
2
3
  /**
3
4
  * Selects documented native startup flags while retaining native settings and authentication.
4
5
  * @returns Typed flag arguments, never a settings document or global config mutation.
@@ -10,9 +11,10 @@ export declare const toClaudeSessionFlags: (settings: ISessionSettings) => strin
10
11
  * Reads known native settings without exposing sources, hooks, tokens or arbitrary configuration.
11
12
  * Instructions are reported only for a process that started its conversation: Claude records them
12
13
  * once per conversation (`--system-prompt-snapshot`, on by default) and reuses them on resume.
14
+ * Fast mode comes from what the session last reported, and before that from the settings read.
13
15
  * @returns Effective session settings and a bounded, query-bound native agent page.
14
16
  * @throws
15
17
  * - JG_AGENT_HQ_CLAUDE_FAILED: The Claude integration failed
16
18
  * - JG_AGENT_HQ_CURSOR_INVALID: The HQ cursor does not match this request
17
19
  */
18
- export declare const toClaudeConfiguration: (input: unknown, agentsInput: unknown, permissionMode: unknown, nativeId: string | undefined, isResumed: boolean, settings: ISessionSettings, command: IConfigurationRequest) => ISessionConfiguration;
20
+ export declare const toClaudeConfiguration: (input: unknown, agentsInput: unknown, permissionMode: unknown, nativeId: string | undefined, isResumed: boolean, fastMode: IClaudeFastMode | undefined, settings: ISessionSettings, command: IConfigurationRequest) => ISessionConfiguration;