jg-agent-hq 10.4.1 → 10.5.1
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.
- package/CHANGELOG.md +10 -0
- package/api/README.md +8 -8
- package/dist/actions/live/live.d.ts +3 -2
- package/dist/actions/live/live.js +19 -9
- package/dist/contracts/actions/types.d.ts +13 -0
- package/dist/contracts/browser/types.d.ts +11 -0
- package/dist/contracts/configuration/types.d.ts +4 -0
- package/dist/contracts/configuration/types.js +5 -0
- package/dist/contracts/models/types.d.ts +2 -0
- package/dist/contracts/models/types.js +1 -0
- package/dist/contracts/types.d.ts +22 -0
- package/dist/providers/claude/claude.d.ts +2 -0
- package/dist/providers/claude/claude.js +1 -1
- package/dist/providers/claude/configuration/configuration.d.ts +3 -1
- package/dist/providers/claude/configuration/configuration.js +12 -1
- package/dist/providers/claude/control/control.d.ts +2 -0
- package/dist/providers/claude/control/control.js +6 -2
- package/dist/providers/claude/control/index.d.ts +1 -1
- package/dist/providers/claude/control/stream.js +16 -0
- package/dist/providers/claude/control/types.d.ts +5 -0
- package/dist/providers/claude/history/history.model.js +24 -19
- package/dist/providers/claude/history/types.d.ts +8 -0
- package/dist/providers/claude/history/types.js +4 -0
- package/dist/providers/claude/history/utilities.d.ts +18 -0
- package/dist/providers/claude/history/utilities.js +41 -2
- package/dist/providers/claude/models/models.js +1 -0
- package/dist/providers/claude/models/types.d.ts +1 -0
- package/dist/providers/claude/models/types.js +1 -0
- package/dist/providers/codex/codex.js +9 -2
- package/dist/providers/codex/configuration/configuration.d.ts +8 -0
- package/dist/providers/codex/configuration/configuration.js +18 -0
- package/dist/providers/codex/configuration/index.d.ts +1 -1
- package/dist/providers/codex/configuration/index.js +1 -1
- package/dist/providers/codex/constants.d.ts +2 -0
- package/dist/providers/codex/constants.js +3 -0
- package/dist/providers/codex/events.js +9 -0
- package/dist/providers/codex/models/models.js +2 -0
- package/dist/providers/codex/models/types.d.ts +3 -0
- package/dist/providers/codex/models/types.js +5 -0
- package/dist/providers/codex/types.d.ts +2 -0
- package/dist/store/control/types.d.ts +9 -0
- package/dist/store/types.d.ts +32 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 10.5.1
|
|
4
|
+
|
|
5
|
+
- Read a compacted Claude session to the start of its conversation. A compaction starts a new chain whose boundary has no parent and names the record before it as its logical parent, and history used to stop there. Every indexed transcript is indexed again after the upgrade.
|
|
6
|
+
- Drop a live item that was still streaming when its turn ended, such as a message a Codex steer or an interrupt cut, once a native history page holds an item of that turn. Codex never saves a message a steer cut, so it stayed `awaiting-flush` until the window evicted it.
|
|
7
|
+
|
|
8
|
+
## 10.5.0
|
|
9
|
+
|
|
10
|
+
- 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.
|
|
11
|
+
- 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.
|
|
12
|
+
|
|
3
13
|
## 10.4.1
|
|
4
14
|
|
|
5
15
|
- 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.
|
package/api/README.md
CHANGED
|
@@ -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
|
|
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
|
|
|
@@ -243,7 +243,7 @@ Current-chain membership and turn starts are indexed as metadata. Ordinary item
|
|
|
243
243
|
|
|
244
244
|
Selected history reads refresh only that file, retain incomplete tails, and detect truncation or replaced identity. Changed branch/file revisions invalidate item and turn continuations. Only the current parent-linked conversation chain is returned. Text is reread from the native file for the selected page and normalized as plain text. Thinking blocks are left out, and a record holding only thinking is hidden, as are `<task-notification>` records. Compaction summaries, `<local-command-stdout>` output and interruption markers are `notice` items, and a slash command is a `user-message` reading `/name args`. A `!` shell input and its output are `command` items, the output's `callId` being the input's UUID. A tool call shows its native name and input, with the block's ID as `callId`, which is null for a record calling several tools; its result is a `tool` item carrying that ID, `failed` when it has `is_error` and `succeeded` otherwise. An Edit or Write result whose metadata has a `filePath` and a `structuredPatch` is a `file-change` item reading the path and its patch lines, or a created file's content, every line of which counts as added. A result Claude Code saved to a file reads `Output too large (<size>), saved to a file` followed by its preview, without the file's path. Other non-text content has explicit native block labels. The index stores each entry's presented kind and visibility, so evidence kind filters match `items` and hidden records never shorten a page. An unknown record containing content is returned as an `unsupported` item when its identity and chain are trustworthy; it cannot imply an agent response, idle state or completion. Each selected page reads at most 4 MiB of record bytes beyond its first record and returns at most 4 MiB of serialized item presentation, so a large-text page can contain fewer rows than its requested limit.
|
|
245
245
|
|
|
246
|
-
File timestamps and records do not prove that a native process is idle or a turn completed. Claude file-backed thread and turn states are therefore `unknown`, with no invented completion timestamp. Explicit native custom titles are preserved; a missing title remains null. A turn starts at a message the operator sends, including a slash command; task notifications, compaction summaries, local command output, interruption markers and `!` shell records belong to the turn before them. Grouping follows parent links and is not an authoritative execution boundary.
|
|
246
|
+
File timestamps and records do not prove that a native process is idle or a turn completed. Claude file-backed thread and turn states are therefore `unknown`, with no invented completion timestamp. Explicit native custom titles are preserved; a missing title remains null. A turn starts at a message the operator sends, including a slash command; task notifications, compaction summaries, local command output, interruption markers and `!` shell records belong to the turn before them. Grouping follows parent links and is not an authoritative execution boundary. A compaction starts a new chain whose first record names the record before it, so history reads on past the compaction to the start of the conversation.
|
|
247
247
|
|
|
248
248
|
## Thread control and live input
|
|
249
249
|
|
|
@@ -346,7 +346,7 @@ The installed CLI exposes `managed-thread-name --name <name>` and `suggest-threa
|
|
|
346
346
|
|
|
347
347
|
Control pages default to 32 and cap at 128. Seek cursors are bound to their complete query and ordering. Reads recheck allowed workspaces. Rejected controls retain their known thread association, and native availability failures appear in each affected thread's replay. Lifecycle replay contains metadata, not token or tool output. Each provider has a bounded native lifecycle backlog; overflow stops that source and marks its state uncertain rather than losing events silently. Other providers retain their independent connection and admission state.
|
|
348
348
|
|
|
349
|
-
Live item presentation is bounded to 128 items per cached thread, 32 windows and 4 MiB of serialized presentation across the runtime, including escaped text and identifiers. This leaves room inside the IPC response limit. Display text uses the same truncation contract as native history. Eviction, an unavailable window or missing chunks sets `hasGap`. Completed items remain `awaiting-flush` after thread closure until a native history page holds the same item, with exactly matching normalized content or, for an item with an outcome, the same final outcome, or the bounded cache evicts them. The outcome is enough because Codex shortens long command output when it saves it. Read persisted history and the live window together after reconnect; a process restart cannot reconstruct unflushed in-memory content.
|
|
349
|
+
Live item presentation is bounded to 128 items per cached thread, 32 windows and 4 MiB of serialized presentation across the runtime, including escaped text and identifiers. This leaves room inside the IPC response limit. Display text uses the same truncation contract as native history. Eviction, an unavailable window or missing chunks sets `hasGap`. Completed items remain `awaiting-flush` after thread closure until a native history page holds the same item, with exactly matching normalized content or, for an item with an outcome, the same final outcome, or the bounded cache evicts them. The outcome is enough because Codex shortens long command output when it saves it. An item still streaming when its turn ended, such as a message an interrupt or a Codex steer cut, stays `awaiting-flush` until a native history page holds an item of that turn, since the provider may never save it; the history then shows what was saved of it. Read persisted history and the live window together after reconnect; a process restart cannot reconstruct unflushed in-memory content.
|
|
350
350
|
|
|
351
351
|
Items expose only normalized presentation fields, and one mapping per provider presents `items`, live items and `session-evidence` alike, as the provider's CLI shows them. Kinds are `user-message`, `agent-message`, `command`, `tool`, `file-change`, `notice` and `unsupported`. `callId` pairs a tool call with its result, or is null. `outcome` is `succeeded`, `failed`, or null when unknown or still running. `files` lists each file a file change touched, at most 128, with its added and removed lines, and is empty on other items. `outcome` and `files` come from the full native record, so `textLimit` never changes them. Unknown native kinds report `unsupported` without copying arbitrary payloads. Display text is bounded to 65,536 UTF-16 code units without splitting a surrogate pair; `isTruncated` reports omissions. An unsupported or oversized native transport frame fails explicitly. `createdAt` is the item's time in Unix milliseconds, or null when the provider records none. A Claude item takes its record's `timestamp`, and a live one the time its frame arrived. A Codex item takes its turn's times, which Codex records across all of its history: an operator message takes its turn's start and every other item its turn's end, or its start while the turn runs. A Codex history page reads the turns of its items newest first, 128 at a time and at most 8 times, so a recent page takes one read and an item whose turn lies further back has no time. A live Codex item takes its running turn's start.
|
|
352
352
|
|
|
@@ -28,10 +28,11 @@ export declare class LiveItems {
|
|
|
28
28
|
/**
|
|
29
29
|
* Drops completed items once persisted history holds them: with exactly matching normalized
|
|
30
30
|
* content, or, for an item with an outcome, the same final outcome, since a provider can shorten
|
|
31
|
-
* long output when it saves it, as Codex does.
|
|
31
|
+
* long output when it saves it, as Codex does. An item its turn ended before the provider
|
|
32
|
+
* finished goes once persisted history holds that turn, which then shows what was saved of it.
|
|
32
33
|
*/
|
|
33
34
|
reconcile(nativeId: string, persisted: IHistoryItem[]): void;
|
|
34
|
-
/** Keeps
|
|
35
|
+
/** Keeps a turn's partial items available until native history holds the turn. */
|
|
35
36
|
completeTurn(nativeId: string, turnId: string): void;
|
|
36
37
|
/** Releases one cached window when the bounded window collection must evict it. */
|
|
37
38
|
private __remove;
|
|
@@ -28,7 +28,7 @@ export class LiveItems {
|
|
|
28
28
|
if (previous)
|
|
29
29
|
this.__bytes -= previous.bytes;
|
|
30
30
|
const bytes = Buffer.byteLength(JSON.stringify({ ...item, state: 'awaiting-flush' }));
|
|
31
|
-
thread.items.set(key, { item, isComplete, bytes });
|
|
31
|
+
thread.items.set(key, { item, isComplete, isUnfinished: false, bytes });
|
|
32
32
|
this.__bytes += bytes;
|
|
33
33
|
while (thread.items.size > 128)
|
|
34
34
|
this.__drop(thread, thread.items.keys().next().value);
|
|
@@ -106,12 +106,20 @@ export class LiveItems {
|
|
|
106
106
|
/**
|
|
107
107
|
* Drops completed items once persisted history holds them: with exactly matching normalized
|
|
108
108
|
* content, or, for an item with an outcome, the same final outcome, since a provider can shorten
|
|
109
|
-
* long output when it saves it, as Codex does.
|
|
109
|
+
* long output when it saves it, as Codex does. An item its turn ended before the provider
|
|
110
|
+
* finished goes once persisted history holds that turn, which then shows what was saved of it.
|
|
110
111
|
*/
|
|
111
112
|
reconcile(nativeId, persisted) {
|
|
112
113
|
const thread = this.__threads.get(nativeId);
|
|
113
114
|
if (!thread)
|
|
114
115
|
return;
|
|
116
|
+
const turns = new Set(persisted.map((item) => item.turnId));
|
|
117
|
+
for (const [key, entry] of thread.items)
|
|
118
|
+
if (entry.isUnfinished && turns.has(entry.item.turnId)) {
|
|
119
|
+
this.__bytes -= entry.bytes;
|
|
120
|
+
thread.items.delete(key);
|
|
121
|
+
thread.revision = ++this.__revision;
|
|
122
|
+
}
|
|
115
123
|
for (const item of persisted) {
|
|
116
124
|
const key = JSON.stringify([item.turnId, item.nativeId]);
|
|
117
125
|
const entry = thread.items.get(key);
|
|
@@ -126,15 +134,17 @@ export class LiveItems {
|
|
|
126
134
|
}
|
|
127
135
|
}
|
|
128
136
|
}
|
|
129
|
-
/** Keeps
|
|
137
|
+
/** Keeps a turn's partial items available until native history holds the turn. */
|
|
130
138
|
completeTurn(nativeId, turnId) {
|
|
131
139
|
const thread = this.__threads.get(nativeId);
|
|
132
|
-
if (thread)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
if (!thread)
|
|
141
|
+
return;
|
|
142
|
+
thread.revision = ++this.__revision;
|
|
143
|
+
for (const entry of thread.items.values())
|
|
144
|
+
if (entry.item.turnId === turnId && !entry.isComplete) {
|
|
145
|
+
entry.isComplete = true;
|
|
146
|
+
entry.isUnfinished = true;
|
|
147
|
+
}
|
|
138
148
|
}
|
|
139
149
|
/** Releases one cached window when the bounded window collection must evict it. */
|
|
140
150
|
__remove(nativeId) {
|
|
@@ -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>>;
|
|
@@ -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.
|