jg-agent-hq 13.1.5 → 13.2.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 +11 -0
- package/README.md +3 -1
- package/api/README.md +41 -33
- package/dist/actions/admission/admission.js +4 -4
- package/dist/actions/dispatch/dispatch.js +6 -2
- package/dist/actions/events/events.js +8 -0
- package/dist/actions/live/live.js +4 -0
- package/dist/contracts/actions/types.d.ts +22 -0
- package/dist/contracts/actions/types.js +7 -2
- package/dist/contracts/browser/types.d.ts +22 -0
- package/dist/contracts/types.d.ts +22 -0
- package/dist/providers/claude/adapter.js +13 -3
- package/dist/providers/claude/control/constants.d.ts +1 -0
- package/dist/providers/claude/control/constants.js +8 -0
- package/dist/providers/claude/control/control.d.ts +4 -2
- package/dist/providers/claude/control/control.js +72 -27
- package/dist/providers/claude/control/index.d.ts +1 -0
- package/dist/providers/claude/control/index.js +2 -0
- package/dist/providers/claude/control/stream.d.ts +1 -1
- package/dist/providers/claude/control/stream.js +3 -2
- package/dist/providers/claude/control/types.d.ts +4 -1
- package/dist/providers/claude/history/history.model.js +1 -1
- package/dist/providers/claude/history/types.d.ts +5 -2
- package/dist/providers/claude/history/types.js +5 -2
- package/dist/providers/claude/history/utilities.d.ts +6 -0
- package/dist/providers/claude/history/utilities.js +40 -14
- package/dist/providers/codex/adapter.js +5 -4
- package/dist/providers/codex/codex.js +16 -12
- package/dist/providers/codex/constants.d.ts +1 -0
- package/dist/providers/codex/constants.js +7 -0
- package/dist/providers/codex/types.d.ts +2 -1
- package/dist/providers/registry/registry.js +1 -1
- package/dist/providers/types.d.ts +12 -2
- package/dist/providers/utilities.d.ts +4 -3
- package/dist/providers/utilities.js +4 -3
- package/dist/runtime/runtime.js +4 -1
- package/dist/sessions/evidence/origins.d.ts +7 -2
- package/dist/sessions/evidence/origins.js +15 -4
- package/dist/sessions/sessions.d.ts +1 -1
- package/dist/sessions/sessions.js +5 -2
- package/dist/store/control/outcomes/outcomes.model.d.ts +9 -0
- package/dist/store/control/outcomes/outcomes.model.js +27 -0
- package/dist/store/control/reads/reads.model.d.ts +1 -1
- package/dist/store/control/reads/reads.model.js +14 -3
- package/docs/recovery.md +2 -0
- package/errors/README.md +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 13.2.1
|
|
4
|
+
|
|
5
|
+
- Confirm a submitted or uncertain Claude steer from saved native input when its exact action UUID, session, workspace, turn and original-text fingerprint match. History, details, evidence and the existing turn-completion flush can resolve delivery even when Claude never echoes a live user-message replay, including after runtime restart.
|
|
6
|
+
- Wake receipt waits and refresh live provenance after confirmation. Preserve control ownership, completion, queued work, storage schema and action keys; no input is resent.
|
|
7
|
+
|
|
8
|
+
## 13.2.0
|
|
9
|
+
|
|
10
|
+
- Allow an exact-turn `steer` to carry optional workspace files through the existing file integrity and size checks. Codex reuses its turn-start encoding; Claude sends text files as labeled text blocks and images as native image blocks. Claude rejects PDF steers before writing; ordinary PDF and text-document turn starts retain their encoding.
|
|
11
|
+
- Publish provider and session `inputSchema.steerMediaTypes` alongside general attachment support so consumers can determine eligibility before canceling queued work.
|
|
12
|
+
- Preserve Claude steer action UUIDs and extend 13.1.5's queued-prompt reader with exact original-text and source-UUID checks across history, evidence, details and images. Keep its record-before-parent behavior and original running turn. Projection version 12 rebuilds cached version-10/11 entries without a storage migration; exact acknowledged ledger and browser identity checks apply to live, saved and restarted reads.
|
|
13
|
+
|
|
3
14
|
## 13.1.5
|
|
4
15
|
|
|
5
16
|
- Show a message Claude Code takes into a running turn, such as a steer at a tool boundary, in that turn's saved history. Claude Code saves it as a `queued_command` attachment rather than a user record, so it was missing from history and its live row never flushed. It reads as a `user-message` whose `provenance.nativeInputId` is the input the attachment names; background task notifications stay hidden. The reader's projection revision changes, so existing transcripts are indexed again on their next read.
|
package/README.md
CHANGED
|
@@ -67,6 +67,8 @@ Use `--provider claude` for Claude history and usage; the default is `codex`, wh
|
|
|
67
67
|
|
|
68
68
|
Explicit actions create, name, adopt, resume, close and delete threads; send idle messages; steer an exact running turn; queue the next message; interrupt; and answer native questions, permissions or MCP elicitation. A create can carry the session's first message and a close can interrupt a running turn first, each as one action. `thread-delete` deletes a session no process runs from its CLI's storage, and the runtime's records of it, within its request. Actions have stable UUIDs and durable receipts, and the `actions` page carries each queued input's text. `action-wait` returns a receipt once it has its native thread ID or settles, woken by the runtime's own changes rather than polling, or as it stands when its timeout of at most 30 seconds passes. Repeating the same request returns its receipt; changing that UUID's payload conflicts. A lost acknowledgement stays uncertain until the exact native response arrives or the operator makes an explicit recovery choice. The runtime never resends uncertain input.
|
|
69
69
|
|
|
70
|
+
Claude can save a steer as a queued-command attachment without echoing a live user message. Reading that saved input through history, details or evidence confirms a submitted or uncertain delivery when its exact action, session, workspace, turn and original-text fingerprint match. The existing turn-completion history flush performs the same check. This also resolves receipts from an earlier runtime without restoring control or resending input.
|
|
71
|
+
|
|
70
72
|
Use `models --provider <id>` for native model and effort choices, and `configuration --provider <id> --workspace-root <path> [--thread-id <id>]` for known effective settings and paged native agent/profile metadata. Creation and explicit resume accept typed startup settings; messages can select a model and effort for the next turn. Startup instructions, native Claude agents and permission settings require an idle session restart. Capability schemas describe supported selections and change modes. Unknown settings remain explicit, and native configuration files stay with each CLI. See the [configuration contract](api/README.md#native-configuration).
|
|
71
73
|
|
|
72
74
|
Native execution settings, instructions, skills and tool permissions remain with each CLI. Claude uses an owned structured process per controlled session, closes it after 60 idle minutes and reopens it for the next input, and steers its active turn with a structured user message. Close other CLI controllers before confirming adoption, resume or recovery. The runtime coordinates sessions sharing one state directory; it cannot lock independently running native CLIs. Integrating browser hosts can use durable host-action admission and operator-scoped reconciliation through the programmatic API; see the [browser host contract](api/README.md#browser-host-integration). The standalone CLI advertises only commands it implements.
|
|
@@ -75,7 +77,7 @@ Approval reads return indexed, cursor-paginated pending, answered and expired me
|
|
|
75
77
|
|
|
76
78
|
Durable state includes `action.key`, which must stay private and accompany its SQLite database. Queued undelivered inputs and complete bounded final results are saved; ordinary input bodies and question answers are not.
|
|
77
79
|
|
|
78
|
-
Text and skill inputs can attach up to 8 workspace files by path and media type, 16 MiB in all and 256 KiB per text file. The runtime verifies their content hashes again before queued delivery. Output schemas use native Codex turn parameters or Claude's structured-session flag; complete validated results and known token usage remain available on selected receipts after reconnect. Live previews stay bounded and explicitly mark truncation. See [file inputs and complete results](api/README.md#file-inputs-and-complete-results).
|
|
80
|
+
Text and skill inputs, and steers, can attach up to 8 workspace files by path and media type, 16 MiB in all and 256 KiB per text file. The runtime verifies their content hashes again before queued delivery or steering. Capabilities publish `inputSchema.steerMediaTypes` separately from general attachment support: Claude steers accept images and labeled UTF-8 text, but reject PDFs before writing. Ordinary Claude turn-start document encoding is unchanged. Output schemas use native Codex turn parameters or Claude's structured-session flag; complete validated results and known token usage remain available on selected receipts after reconnect. Live previews stay bounded and explicitly mark truncation. See [file inputs and complete results](api/README.md#file-inputs-and-complete-results).
|
|
79
81
|
|
|
80
82
|
Use `suggest-thread-name --topic "Build usage" --state-root <directory>` for an editable label of up to 64 characters. Creation adds an ordinal suffix when a name is occupied, keeping the complete label within that limit. `MAX_THREAD_NAME_LENGTH` from `jg-agent-hq/contracts` is the public limit. Actions and relationships retain immutable IDs.
|
|
81
83
|
|
package/api/README.md
CHANGED
|
@@ -121,19 +121,19 @@ An adapter reports normalized observations, items, deltas, prompts, outcomes, ob
|
|
|
121
121
|
|
|
122
122
|
The current built-in surfaces map to these native entry points:
|
|
123
123
|
|
|
124
|
-
| jg-agent-hq surface | Codex | Claude
|
|
125
|
-
| ------------------- | ------------------------------------------------------------------------ |
|
|
126
|
-
| Create/adopt/resume | `thread/start`, `thread/read`, `thread/resume` | Structured session creation/resume and idle/session-ID fences
|
|
127
|
-
| Rename | `thread/name/set` | `rename_session` control request
|
|
128
|
-
| Message/queue | `turn/start` with explicit native input | Structured user messages with matching acknowledgements
|
|
129
|
-
| Steer | `turn/steer` for the exact active turn | A structured user message into the exact active turn,
|
|
130
|
-
| Interrupt | `turn/interrupt` | `interrupt` control request; completion remains separate
|
|
131
|
-
| Close/recover | Native background-terminal cleanup/verification and `thread/unsubscribe` | Confirmed process-group shutdown and explicit session release/resume
|
|
132
|
-
| Runtime restart | Sessions keep running, and the next runtime rejoins them | Turns stop with the runtime; sessions wait inactive for an explicit resume
|
|
133
|
-
| History | `thread/list`, `thread/read`, `thread/turns/list`, `thread/items/list` | Bounded worker-owned indexing of native transcripts
|
|
134
|
-
| Skills | `skills/list` and native skill input | Initialization command metadata and native invocation text
|
|
135
|
-
| Models/settings | `model/list`, `config/read`, native startup and next-turn parameters | `list_models`, `get_settings`, native startup flags and `apply_flag_settings`
|
|
136
|
-
| Usage | `account/rateLimits/read` | `get_usage` control request, with explicit unavailable observations
|
|
124
|
+
| jg-agent-hq surface | Codex | Claude |
|
|
125
|
+
| ------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
|
126
|
+
| Create/adopt/resume | `thread/start`, `thread/read`, `thread/resume` | Structured session creation/resume and idle/session-ID fences |
|
|
127
|
+
| Rename | `thread/name/set` | `rename_session` control request |
|
|
128
|
+
| Message/queue | `turn/start` with explicit native input | Structured user messages with matching acknowledgements |
|
|
129
|
+
| Steer | `turn/steer` for the exact active turn | A structured user message into the exact active turn, confirmed by its replay or matching saved input |
|
|
130
|
+
| Interrupt | `turn/interrupt` | `interrupt` control request; completion remains separate |
|
|
131
|
+
| Close/recover | Native background-terminal cleanup/verification and `thread/unsubscribe` | Confirmed process-group shutdown and explicit session release/resume |
|
|
132
|
+
| Runtime restart | Sessions keep running, and the next runtime rejoins them | Turns stop with the runtime; sessions wait inactive for an explicit resume |
|
|
133
|
+
| History | `thread/list`, `thread/read`, `thread/turns/list`, `thread/items/list` | Bounded worker-owned indexing of native transcripts |
|
|
134
|
+
| Skills | `skills/list` and native skill input | Initialization command metadata and native invocation text |
|
|
135
|
+
| Models/settings | `model/list`, `config/read`, native startup and next-turn parameters | `list_models`, `get_settings`, native startup flags and `apply_flag_settings` |
|
|
136
|
+
| Usage | `account/rateLimits/read` | `get_usage` control request, with explicit unavailable observations |
|
|
137
137
|
|
|
138
138
|
Availability depends on the selected native connection and, for session metadata, that session's initialization. Native settings, hooks, plugins and authentication remain with the harness. Codex protocol details are in the [official app-server reference](https://learn.chatgpt.com/docs/app-server); Claude flags and programmatic behavior are in the [CLI reference](https://code.claude.com/docs/en/cli-reference) and [programmatic guide](https://code.claude.com/docs/en/headless). Public-API integration tests exercise both native boundaries through the runtime's real persistence and IPC, including compatible version labels and missing-provider isolation.
|
|
139
139
|
|
|
@@ -220,7 +220,7 @@ Text and native skill inputs accept optional `files: [{ path, mediaType }]`. Pat
|
|
|
220
220
|
|
|
221
221
|
The fixed limits are 8 references, 16,777,216 aggregate file bytes and 262,144 bytes per UTF-8 text file. Empty files, NUL-containing or invalid UTF-8 text, wrong signatures, unsupported media and oversized input are rejected. The 32,768-byte action envelope contains references, never base64. File bytes are encoded only inside the native 32 MiB frame; the file limits leave room even for worst-case JSON escaping.
|
|
222
222
|
|
|
223
|
-
Codex supports PNG, JPEG, WebP and UTF-8 text. Images use native `image` data inputs; text files become complete text inputs labeled with their canonical path and hash. Claude supports those formats plus GIF and PDF, using native image/document blocks. Media signatures establish the declared format, not complete image/PDF validity; native decoder or model rejection remains a provider failure. `capabilities.inputSchema` includes `supportedMediaTypes`, `maxFiles`, `maxFileBytes` and `maxTextFileBytes`. Native model-specific media limitations remain native errors.
|
|
223
|
+
Codex supports PNG, JPEG, WebP and UTF-8 text. Images use native `image` data inputs; text files become complete text inputs labeled with their canonical path and hash. Claude supports those formats plus GIF and PDF at turn start, using native image/document blocks. Media signatures establish the declared format, not complete image/PDF validity; native decoder or model rejection remains a provider failure. `capabilities.inputSchema` includes `supportedMediaTypes`, `steerMediaTypes`, `maxFiles`, `maxFileBytes` and `maxTextFileBytes`. Native model-specific media limitations remain native errors.
|
|
224
224
|
|
|
225
225
|
Select a bounded JSON `outputSchema` in session settings or, for Codex, on a message/queue entry. Schemas are limited to 8,192 serialized UTF-8 bytes, 16 levels and 1,024 visited nodes, and must be supported by the installed Zod JSON Schema validator. External references are rejected and no remote schema is retrieved. Codex sends the selected schema as `turn/start.outputSchema`. Claude starts its owned structured process with `--json-schema`; a different schema requires close and explicit resume of the same native session. Its capability descriptor marks this as `idle-restart`.
|
|
226
226
|
|
|
@@ -230,8 +230,12 @@ Selected action receipts expose nullable `result: { state, format, text, structu
|
|
|
230
230
|
|
|
231
231
|
`usage` is nullable and contains known `inputTokens`, `outputTokens`, `cachedInputTokens` and accounting `scope`. Built-in adapters expose per-turn observations, not billable counters; missing or malformed optional usage is unavailable without invalidating essential completion evidence. Native MCP/dynamic tool calls and Claude tool blocks appear as bounded `tool` items. Truncation and live gaps remain explicit. Complete final results are authoritative retained records, not a parallel conversation cache.
|
|
232
232
|
|
|
233
|
+
Steer file eligibility comes from the additive `inputSchema.steerMediaTypes` array on provider and session capabilities, a subset of general `supportedMediaTypes`. An empty list permits no files; consumers must treat absent or malformed metadata as unknown before canceling queued work. Codex lists PNG, JPEG, WebP and UTF-8 text, and reuses its turn-start input items. Claude lists PNG, JPEG, WebP, GIF and UTF-8 text. Its steers encode text files as `File <path> (SHA-256 <hash>):` followed by a newline and content, alongside native image blocks; PDF steers are rejected as a whole before writing. Claude's ordinary text/PDF document blocks at turn start are unchanged. File count, individual/aggregate bytes, workspace/link restrictions, hash binding and identical replay semantics match message and queue inputs. No attachment bytes are reread on an already admitted identical replay.
|
|
234
|
+
|
|
233
235
|
## Claude history
|
|
234
236
|
|
|
237
|
+
Visible Claude queued prompts (`attachment.type: queued_command`, `commandMode: prompt`) appear as user-message items; hidden meta records retain their exclusion. The graph UUID remains the history address; the validated `source_uuid` names the input for provenance, and its original first text block supplies `nativeInputSha256`. They inherit the running turn. New Claude steers use the exact action UUID as their wire UUID; exact acknowledged provider/session/hash/target matches can establish host or browser provenance, including a late ordinary-user replay whose own UUID becomes its turn. Legacy unrelated UUIDs remain unknown. Projection version 12 rebuilds cached version-10/11 indexes within the same budgets, preserving 13.1.5 queued-record-before-parent handling; no storage migration or transcript rewrite is required. Saved queued messages reconcile their live replay only when source UUID, hash, turn and normalized body match.
|
|
238
|
+
|
|
235
239
|
Claude connects as the runtime starts through `claude --print --input-format stream-json --output-format stream-json --verbose`. No user prompt, bare mode, permission bypass or SDK dependency is used. Runtime status reports this adapter as `idle`, `ready` or `unavailable`, with its observed CLI version. History reads need this process only until it has once started and initialized, which the runtime's start-time warm-up does: the runtime keeps that check, so history reads use the transcripts alone, while usage, models and other reads that use the connection still open it. This session-less process closes after 5 minutes without a read and opens again on the next read that needs it; while it is closed, status reports `idle` with the last observed version. An unavailable native lane requires restarting the host after resolving the native problem.
|
|
236
240
|
|
|
237
241
|
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. An indexing batch that ends between the two leaves the hidden record to the next batch, so they stay in one turn; one whose parent the transcript doesn't hold yet, or that a whole batch from it 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 32 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.
|
|
@@ -250,24 +254,24 @@ File timestamps and records do not prove that a native process is idle or a turn
|
|
|
250
254
|
|
|
251
255
|
Send `{ kind: 'action', action: { id, runtimeEpoch, command } }`. Generate one UUID per user intent, take the epoch from `status` or the runtime's `runtimeEpoch`, and retain the complete envelope until its receipt can be read. The validated envelope is limited to `MAX_ACTION_BYTES`, 32,768 UTF-8 bytes of its JSON, which `jg-agent-hq/contracts` exports. It is recorded before native writes. Reusing the UUID with the identical envelope returns the saved receipt without dispatch; a changed envelope conflicts. This check also works for an original request read after restart. A new UUID with an expired epoch cannot execute.
|
|
252
256
|
|
|
253
|
-
| Action | Fields and behavior
|
|
254
|
-
| ---------------- |
|
|
255
|
-
| `thread-create` | `provider` (a registered provider ID), `workspaceRoot`, `name`, optional `input`. Creates an empty native thread and sets its readable name before reporting acknowledgement. With `input`, the same action then sends it as the session's first message, see [first input](#first-input).
|
|
256
|
-
| `thread-adopt` | The same fields plus `nativeId`, `operatorConfirmation`. Explicitly records an external thread as managed. Codex accepts it unloaded or idle, between turns of a terminal that still holds it, and resumes it with optional `settings`, which it refuses while another client holds the thread; Claude requires qualified workspace history and the native idle/session-identity checks, and refuses while a terminal runs it.
|
|
257
|
-
| `thread-resume` | `threadId`, `operatorConfirmation`. Resumes an inactive managed thread; the runtime does not fetch its complete conversation bodies.
|
|
258
|
-
| `thread-recover` | `threadId`, `operatorConfirmation`, `recovery`. The recovery is `{ kind: 'resume' }` for a known native identity, `{ kind: 'attach', nativeId }` for an inspected identity after uncertain creation, or `{ kind: 'create' }` to explicitly create a fresh empty thread when no native identity was recorded. The latter can leave an empty orphan from the uncertain creation; it never repeats a message.
|
|
259
|
-
| `thread-rename` | `threadId`, `name`. Changes the name only after the matching native acknowledgement.
|
|
260
|
-
| `thread-close` | `threadId`, optional `interrupt`. Requires an idle thread and pauses its queue. Codex cleans and verifies its native terminal list before unsubscribe. Claude closes the owned CLI and proves process-group exit before releasing control. With `interrupt: true`, a thread whose turn runs is interrupted first, by the same action: its `phase` is `interrupt` until the turn ends, then `clean` and `close`; an idle thread closes as without it.
|
|
261
|
-
| `thread-delete` | `provider`, `workspaceRoot`, `nativeId`. Deletes a session no process runs from its provider's storage, with the runtime's records of it, and runs within its request; see [thread deletion](#thread-deletion).
|
|
262
|
-
| `message` | `threadId`, `input`. Starts a turn only while idle.
|
|
263
|
-
| `steer` | `threadId`, `expectedTurnId`, `text
|
|
264
|
-
| `queue` | `threadId`, `expectedTurnId`, `input`. Saves an explicit next-turn message or skill invocation, never a permission or question answer.
|
|
265
|
-
| `queue-send` | `queuedActionId`. Explicitly authorizes a still-undelivered queue entry, including a queue paused by restart or interruption.
|
|
266
|
-
| `queue-cancel` | `queuedActionId`. Cancels only an undelivered queue entry and clears its saved body.
|
|
267
|
-
| `interrupt` | `threadId`, `expectedTurnId`. A native request acknowledgement leaves the thread stopping until native completion evidence arrives.
|
|
268
|
-
| `native-reply` | `threadId`, `expectedTurnId`, `approvalId`, `response`. Answers one exact current native request; cannot consume queue text.
|
|
269
|
-
|
|
270
|
-
Message and queue input is a closed union: `{ kind: 'text', text }` or `{ kind: 'skill', skillId, arguments }`. Text is nonempty and at most 65,536 characters; skill arguments may be empty and cap at 16,384 characters. The envelope's UTF-8 limit still applies. A selected skill is resolved through the target thread's current native catalog before admission. Unavailable, missing or disabled selections cannot dispatch. Normal text needs no catalog read. Steering retains its `text` field and exact active-turn target.
|
|
257
|
+
| Action | Fields and behavior |
|
|
258
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
259
|
+
| `thread-create` | `provider` (a registered provider ID), `workspaceRoot`, `name`, optional `input`. Creates an empty native thread and sets its readable name before reporting acknowledgement. With `input`, the same action then sends it as the session's first message, see [first input](#first-input). |
|
|
260
|
+
| `thread-adopt` | The same fields plus `nativeId`, `operatorConfirmation`. Explicitly records an external thread as managed. Codex accepts it unloaded or idle, between turns of a terminal that still holds it, and resumes it with optional `settings`, which it refuses while another client holds the thread; Claude requires qualified workspace history and the native idle/session-identity checks, and refuses while a terminal runs it. |
|
|
261
|
+
| `thread-resume` | `threadId`, `operatorConfirmation`. Resumes an inactive managed thread; the runtime does not fetch its complete conversation bodies. |
|
|
262
|
+
| `thread-recover` | `threadId`, `operatorConfirmation`, `recovery`. The recovery is `{ kind: 'resume' }` for a known native identity, `{ kind: 'attach', nativeId }` for an inspected identity after uncertain creation, or `{ kind: 'create' }` to explicitly create a fresh empty thread when no native identity was recorded. The latter can leave an empty orphan from the uncertain creation; it never repeats a message. |
|
|
263
|
+
| `thread-rename` | `threadId`, `name`. Changes the name only after the matching native acknowledgement. |
|
|
264
|
+
| `thread-close` | `threadId`, optional `interrupt`. Requires an idle thread and pauses its queue. Codex cleans and verifies its native terminal list before unsubscribe. Claude closes the owned CLI and proves process-group exit before releasing control. With `interrupt: true`, a thread whose turn runs is interrupted first, by the same action: its `phase` is `interrupt` until the turn ends, then `clean` and `close`; an idle thread closes as without it. |
|
|
265
|
+
| `thread-delete` | `provider`, `workspaceRoot`, `nativeId`. Deletes a session no process runs from its provider's storage, with the runtime's records of it, and runs within its request; see [thread deletion](#thread-deletion). |
|
|
266
|
+
| `message` | `threadId`, `input`. Starts a turn only while idle. |
|
|
267
|
+
| `steer` | `threadId`, `expectedTurnId`, `text`, optional top-level `files` (`InputFileSchema[]`). Codex uses native `turn/steer`. Claude writes text and qualified files as a user message into the exact active turn, never interrupting it, and acknowledges it when Claude replays it: at the turn's next tool boundary, where the turn takes it in and ends with one result, or, for text written while the turn's final answer streams, after the turn's result, where it runs as the session's next turn under its own UUID. Either replay acknowledges the steer against the turn it named. A Claude steer never replayed fails 30 seconds after that turn ends, and one pending when the process stops fails at once. Otherwise a finished or changed turn cannot become a new turn. Unlisted media types reject the complete input before native writing. No skills or settings are accepted. |
|
|
268
|
+
| `queue` | `threadId`, `expectedTurnId`, `input`. Saves an explicit next-turn message or skill invocation, never a permission or question answer. |
|
|
269
|
+
| `queue-send` | `queuedActionId`. Explicitly authorizes a still-undelivered queue entry, including a queue paused by restart or interruption. |
|
|
270
|
+
| `queue-cancel` | `queuedActionId`. Cancels only an undelivered queue entry and clears its saved body. |
|
|
271
|
+
| `interrupt` | `threadId`, `expectedTurnId`. A native request acknowledgement leaves the thread stopping until native completion evidence arrives. |
|
|
272
|
+
| `native-reply` | `threadId`, `expectedTurnId`, `approvalId`, `response`. Answers one exact current native request; cannot consume queue text. |
|
|
273
|
+
|
|
274
|
+
Message and queue input is a closed union: `{ kind: 'text', text }` or `{ kind: 'skill', skillId, arguments }`. Text is nonempty and at most 65,536 characters; skill arguments may be empty and cap at 16,384 characters. The envelope's UTF-8 limit still applies. A selected skill is resolved through the target thread's current native catalog before admission. Unavailable, missing or disabled selections cannot dispatch. Normal text needs no catalog read. Steering retains its `text` field and exact active-turn target, adding only optional top-level `files`. Text-only steers remain unchanged; skills and turn settings cannot be steered.
|
|
271
275
|
|
|
272
276
|
Names use lowercase ASCII letters, digits and hyphens, start with a letter or digit, and have at most 64 characters, the public `MAX_THREAD_NAME_LENGTH` from `jg-agent-hq/contracts`. The same bound applies to create, adopt, rename and managed-thread responses. Names are unique without regard to case in one state directory. Creation and adoption resolve collisions atomically with ordinal suffixes such as `build-usage-2`, truncating the base to keep the complete name within 64 characters. Explicit rename rejects an occupied or pending name. Provider/native-session pairs remain unique. At most 32 native sessions are controlled concurrently; close idle sessions to release capacity. Native discovery remains independent of that limit. Confirm that other native CLI controllers are closed before adoption, resume or recovery. An unloaded native status cannot prove another CLI has stopped. The runtime provides exclusive coordination within one canonical state directory; it does not impose a global lock on independent CLIs. Recovery is permitted only after the producing runtime has stopped and its ownership evidence has been inspected.
|
|
273
277
|
|
|
@@ -281,7 +285,9 @@ Receipts separate `delivery` (`queued`, `submitted`, `acknowledged`, `uncertain`
|
|
|
281
285
|
|
|
282
286
|
A missing acknowledgement never triggers an automatic resend. Exact late responses reconcile delivery, including completion that arrived first. Native output loss marks the affected provider controls and submitted work uncertain. A Claude process failure affects its own session; a Codex transport failure affects its Codex cohort. Restart quarantines controls from an interrupted runtime, except the Codex sessions the next runtime rejoins; explicit recovery preserves the managed identity and name. Successful shutdown proves native process-group exit before marking Claude controls inactive. Unknown creation without a native identity remains uncertain.
|
|
283
287
|
|
|
284
|
-
|
|
288
|
+
Saved Claude input can acknowledge a submitted or uncertain steer without a live replay, including after restart. Authorized `items`, `item-detail` and `session-evidence` reads and the existing bounded turn-completion history flush match the exact source/action UUID, provider, native session, workspace, original target turn (or the steer's own follow-up turn) and full original-text SHA-256. Failed/canceled actions, mismatches and live-only presentation never establish this confirmation. Confirmation wakes receipt waits and refreshes live provenance; it changes neither control ownership nor completion, dispatches no work and restores no queued readiness. It reuses selected history pages and indexed action lookups without new scans, caches, storage or polling.
|
|
289
|
+
|
|
290
|
+
Normal native turn completion may advance ready queued entries once, in creation/UUID order. Failure, interruption, explicit interrupt admission or restart pauses the queue. A rejoined Codex session's queue advances again once the turn it waits on completes. Permission prompts do not advance it. An unacknowledged start or metadata change blocks dependent starts until its outcome is reconciled or the stopped runtime is recovered explicitly. A turn's completion alone does not settle an unresolved steering receipt.
|
|
285
291
|
|
|
286
292
|
Native replies use one of these closed response forms:
|
|
287
293
|
|
|
@@ -461,6 +467,8 @@ Live reads accept `afterRevision`. A matching revision returns `unchanged: true`
|
|
|
461
467
|
|
|
462
468
|
The operation matrix describes the implemented native interfaces and their explicit unavailable surfaces. Executed qualification is narrower than every possible model, configuration and account state. Native versions below are observations, never admission rules.
|
|
463
469
|
|
|
470
|
+
On 2026-11-07, Codex 0.167.0 consumed image and labeled text input through `turn/steer` in the running turn. Claude Code 2.1.319 with claude-opus-5-5 and normal `auto` permissions consumed text/PDF document blocks at turn start, and image plus labeled text blocks in the original running turn. A native PDF steer was dropped, so it is excluded from Claude's steer media list. The repaired runtime journey verified exact browser/action/source identity, original first-text hash, separate persisted prompt blocks, unchanged saved image bytes, live/history reconciliation, and provenance after restart without resending. The queued prompt's graph UUID differs from its input's source UUID. Its projection rebuild was also checked against the retained real transcript and an older cached index. These checks establish the observed native shapes and provider versions, without using an origin override or changing turn-start encoding.
|
|
471
|
+
|
|
464
472
|
| Area | Executed evidence | Boundary |
|
|
465
473
|
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
466
474
|
| Provider integration | Public contract tests isolate an unavailable provider and tolerate additive fields and future version labels. Native lifecycle, configuration and file checks are listed in their sections above. | Other CLI versions need their own native qualification. |
|
|
@@ -224,16 +224,16 @@ export const createAdmission = (context, dispatcher) => {
|
|
|
224
224
|
conflict();
|
|
225
225
|
prompt.native.validate(command.response);
|
|
226
226
|
}
|
|
227
|
-
if (command.kind === 'message' || command.kind === 'queue') {
|
|
227
|
+
if (command.kind === 'message' || command.kind === 'queue' || command.kind === 'steer') {
|
|
228
228
|
const thread = await store.call('reads', 'getThread', command.threadId);
|
|
229
229
|
if (!thread?.nativeId)
|
|
230
230
|
conflict();
|
|
231
231
|
// a terminal that resumed a Claude session HQ runs has it now, so HQ sends nothing
|
|
232
232
|
if (thread.provider === 'claude' && claudeTerminalOf(thread.nativeId))
|
|
233
233
|
conflict();
|
|
234
|
-
input = await prepareInput(command.
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
input = await prepareInput(command.kind === 'steer'
|
|
235
|
+
? { kind: 'text', text: command.text, files: command.files }
|
|
236
|
+
: command.input, command.kind === 'steer' ? {} : (command.settings ?? {}), thread.workspaceRoot, { threadId: command.threadId });
|
|
237
237
|
await control.validateInput(thread.nativeId, input);
|
|
238
238
|
prepared.input = input;
|
|
239
239
|
}
|
|
@@ -224,9 +224,13 @@ export const createDispatch = (context) => {
|
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
226
|
else if (phase === 'steer') {
|
|
227
|
-
if (!nativeId || command?.kind !== 'steer')
|
|
227
|
+
if (!thread || !nativeId || command?.kind !== 'steer' || !input)
|
|
228
228
|
conflict();
|
|
229
|
-
|
|
229
|
+
hasDispatched = false;
|
|
230
|
+
const files = await readInputFiles(input.files, thread.workspaceRoot, roots);
|
|
231
|
+
await control.validateInput(nativeId, input);
|
|
232
|
+
hasDispatched = true;
|
|
233
|
+
const nativeTurnId = await control.steer(requestId, nativeId, command.expectedTurnId, command.text, files);
|
|
230
234
|
next = await apply({ kind: 'steer-accepted', actionId: receipt.id, phase, nativeTurnId });
|
|
231
235
|
}
|
|
232
236
|
else if (phase === 'interrupt') {
|
|
@@ -5,6 +5,7 @@ import { delay } from 'jg-utilities';
|
|
|
5
5
|
import { MAX_ITEM_TEXT_LENGTH, MAX_PAGE_SIZE } from '../../contracts/index.js';
|
|
6
6
|
import { HQ_ERRORS, getErrorKind } from '../../errors/index.js';
|
|
7
7
|
import { capabilityUnavailable } from '../../providers/registry/index.js';
|
|
8
|
+
import { correlateEvidenceOrigins } from '../../sessions/index.js';
|
|
8
9
|
import { RESYNC_REREAD_DELAY_SECONDS, Resyncs, decideResync, } from '../resync/index.js';
|
|
9
10
|
import { agentUnavailable, keepsSessions } from '../utilities.js';
|
|
10
11
|
import { TURN_FLUSH_PAGES } from './constants.js';
|
|
@@ -165,6 +166,13 @@ export const createEvents = (context, dispatcher, reconnect) => {
|
|
|
165
166
|
});
|
|
166
167
|
if (response.kind !== 'items')
|
|
167
168
|
return;
|
|
169
|
+
await correlateEvidenceOrigins(response.result.data, provider, nativeId, store, {
|
|
170
|
+
workspaceRoot,
|
|
171
|
+
onAcknowledged: (threadId) => {
|
|
172
|
+
waits.notifyThread(threadId);
|
|
173
|
+
live.invalidateProvenance(liveKey);
|
|
174
|
+
},
|
|
175
|
+
});
|
|
168
176
|
live.reconcile(liveKey, response.result.data);
|
|
169
177
|
if (response.result.nextCursor === null)
|
|
170
178
|
break;
|
|
@@ -175,6 +175,10 @@ export class LiveItems {
|
|
|
175
175
|
const key = JSON.stringify([item.turnId, liveId]);
|
|
176
176
|
const entry = thread.items.get(key);
|
|
177
177
|
if (entry?.isComplete &&
|
|
178
|
+
(liveId === item.nativeId ||
|
|
179
|
+
(item.provenance.nativeInputSha256 !== null &&
|
|
180
|
+
entry.item.provenance.nativeInputId === nativeInputId &&
|
|
181
|
+
entry.item.provenance.nativeInputSha256 === item.provenance.nativeInputSha256)) &&
|
|
178
182
|
entry.item.nativeType === item.nativeType &&
|
|
179
183
|
entry.item.kind === item.kind &&
|
|
180
184
|
((entry.item.text === item.text && entry.item.isTruncated === item.isTruncated) ||
|
|
@@ -180,6 +180,17 @@ export declare const ActionCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
180
180
|
}, z.core.$strict>>;
|
|
181
181
|
}, z.core.$strict>, z.ZodObject<{
|
|
182
182
|
text: z.ZodString;
|
|
183
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
184
|
+
path: z.ZodString;
|
|
185
|
+
mediaType: z.ZodEnum<{
|
|
186
|
+
"image/png": "image/png";
|
|
187
|
+
"image/jpeg": "image/jpeg";
|
|
188
|
+
"image/webp": "image/webp";
|
|
189
|
+
"image/gif": "image/gif";
|
|
190
|
+
"application/pdf": "application/pdf";
|
|
191
|
+
"text/plain": "text/plain";
|
|
192
|
+
}>;
|
|
193
|
+
}, z.core.$strict>>>;
|
|
183
194
|
threadId: z.ZodUUID;
|
|
184
195
|
expectedTurnId: z.ZodString;
|
|
185
196
|
kind: z.ZodLiteral<"steer">;
|
|
@@ -429,6 +440,17 @@ export declare const ActionEnvelopeSchema: z.ZodObject<{
|
|
|
429
440
|
}, z.core.$strict>>;
|
|
430
441
|
}, z.core.$strict>, z.ZodObject<{
|
|
431
442
|
text: z.ZodString;
|
|
443
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
444
|
+
path: z.ZodString;
|
|
445
|
+
mediaType: z.ZodEnum<{
|
|
446
|
+
"image/png": "image/png";
|
|
447
|
+
"image/jpeg": "image/jpeg";
|
|
448
|
+
"image/webp": "image/webp";
|
|
449
|
+
"image/gif": "image/gif";
|
|
450
|
+
"application/pdf": "application/pdf";
|
|
451
|
+
"text/plain": "text/plain";
|
|
452
|
+
}>;
|
|
453
|
+
}, z.core.$strict>>>;
|
|
432
454
|
threadId: z.ZodUUID;
|
|
433
455
|
expectedTurnId: z.ZodString;
|
|
434
456
|
kind: z.ZodLiteral<"steer">;
|
|
@@ -4,7 +4,7 @@ import { ProviderIdSchema } from '../providers/index.js';
|
|
|
4
4
|
import { SessionSettingsSchema, TurnSettingsSchema } from '../configuration/index.js';
|
|
5
5
|
import { MessageInputSchema, NativeSkillInputSchema } from '../skills/index.js';
|
|
6
6
|
import { NativeIdSchema, NativeLineageSchema } from '../identities/index.js';
|
|
7
|
-
import { BoundInputFileSchema, MAX_INPUT_FILES } from '../inputs/index.js';
|
|
7
|
+
import { BoundInputFileSchema, InputFileSchema, MAX_INPUT_FILES } from '../inputs/index.js';
|
|
8
8
|
import { TurnResultSchema, OutputSchemaSchema } from '../results/index.js';
|
|
9
9
|
// queue payloads preserve the exact native selection, content hashes and turn options
|
|
10
10
|
export const PreparedInputSchema = z.object({
|
|
@@ -76,7 +76,12 @@ export const ActionCommandSchema = z.discriminatedUnion('kind', [
|
|
|
76
76
|
input: MessageInputSchema,
|
|
77
77
|
settings: TurnSettingsSchema.optional(),
|
|
78
78
|
}),
|
|
79
|
-
z.strictObject({
|
|
79
|
+
z.strictObject({
|
|
80
|
+
kind: z.literal('steer'),
|
|
81
|
+
...ActiveTargetFields,
|
|
82
|
+
text: TextSchema,
|
|
83
|
+
files: z.array(InputFileSchema).max(MAX_INPUT_FILES).optional(),
|
|
84
|
+
}),
|
|
80
85
|
z.strictObject({
|
|
81
86
|
kind: z.literal('queue'),
|
|
82
87
|
...ActiveTargetFields,
|
|
@@ -158,6 +158,17 @@ export declare const BrowserCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
158
158
|
}, z.core.$strict>>;
|
|
159
159
|
}, z.core.$strict>, z.ZodObject<{
|
|
160
160
|
text: z.ZodString;
|
|
161
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
162
|
+
path: z.ZodString;
|
|
163
|
+
mediaType: z.ZodEnum<{
|
|
164
|
+
"image/png": "image/png";
|
|
165
|
+
"image/jpeg": "image/jpeg";
|
|
166
|
+
"image/webp": "image/webp";
|
|
167
|
+
"image/gif": "image/gif";
|
|
168
|
+
"application/pdf": "application/pdf";
|
|
169
|
+
"text/plain": "text/plain";
|
|
170
|
+
}>;
|
|
171
|
+
}, z.core.$strict>>>;
|
|
161
172
|
threadId: z.ZodUUID;
|
|
162
173
|
expectedTurnId: z.ZodString;
|
|
163
174
|
kind: z.ZodLiteral<"steer">;
|
|
@@ -413,6 +424,17 @@ export declare const BrowserActionSchema: z.ZodObject<{
|
|
|
413
424
|
}, z.core.$strict>>;
|
|
414
425
|
}, z.core.$strict>, z.ZodObject<{
|
|
415
426
|
text: z.ZodString;
|
|
427
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
428
|
+
path: z.ZodString;
|
|
429
|
+
mediaType: z.ZodEnum<{
|
|
430
|
+
"image/png": "image/png";
|
|
431
|
+
"image/jpeg": "image/jpeg";
|
|
432
|
+
"image/webp": "image/webp";
|
|
433
|
+
"image/gif": "image/gif";
|
|
434
|
+
"application/pdf": "application/pdf";
|
|
435
|
+
"text/plain": "text/plain";
|
|
436
|
+
}>;
|
|
437
|
+
}, z.core.$strict>>>;
|
|
416
438
|
threadId: z.ZodUUID;
|
|
417
439
|
expectedTurnId: z.ZodString;
|
|
418
440
|
kind: z.ZodLiteral<"steer">;
|
|
@@ -278,6 +278,17 @@ export declare const HqRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
278
278
|
}, z.core.$strict>>;
|
|
279
279
|
}, z.core.$strict>, z.ZodObject<{
|
|
280
280
|
text: z.ZodString;
|
|
281
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
282
|
+
path: z.ZodString;
|
|
283
|
+
mediaType: z.ZodEnum<{
|
|
284
|
+
"image/png": "image/png";
|
|
285
|
+
"image/jpeg": "image/jpeg";
|
|
286
|
+
"image/webp": "image/webp";
|
|
287
|
+
"image/gif": "image/gif";
|
|
288
|
+
"application/pdf": "application/pdf";
|
|
289
|
+
"text/plain": "text/plain";
|
|
290
|
+
}>;
|
|
291
|
+
}, z.core.$strict>>>;
|
|
281
292
|
threadId: z.ZodUUID;
|
|
282
293
|
expectedTurnId: z.ZodString;
|
|
283
294
|
kind: z.ZodLiteral<"steer">;
|
|
@@ -2774,6 +2785,17 @@ export declare const IpcRequestSchema: z.ZodObject<{
|
|
|
2774
2785
|
}, z.core.$strict>>;
|
|
2775
2786
|
}, z.core.$strict>, z.ZodObject<{
|
|
2776
2787
|
text: z.ZodString;
|
|
2788
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2789
|
+
path: z.ZodString;
|
|
2790
|
+
mediaType: z.ZodEnum<{
|
|
2791
|
+
"image/png": "image/png";
|
|
2792
|
+
"image/jpeg": "image/jpeg";
|
|
2793
|
+
"image/webp": "image/webp";
|
|
2794
|
+
"image/gif": "image/gif";
|
|
2795
|
+
"application/pdf": "application/pdf";
|
|
2796
|
+
"text/plain": "text/plain";
|
|
2797
|
+
}>;
|
|
2798
|
+
}, z.core.$strict>>>;
|
|
2777
2799
|
threadId: z.ZodUUID;
|
|
2778
2800
|
expectedTurnId: z.ZodString;
|
|
2779
2801
|
kind: z.ZodLiteral<"steer">;
|
|
@@ -4,7 +4,7 @@ import { SessionSettingsSchema, TurnSettingsSchema, } from '../../contracts/inde
|
|
|
4
4
|
import { buildProviderCapabilities, MODEL_CATALOG_UNAVAILABLE, SUPPORTED_PROVIDER_OPERATION, } from '../index.js';
|
|
5
5
|
import { HQ_ERRORS } from '../../errors/index.js';
|
|
6
6
|
import { createClaudeProvider } from './claude.js';
|
|
7
|
-
import { createClaudeControl } from './control/index.js';
|
|
7
|
+
import { CLAUDE_STEER_MEDIA_TYPES, createClaudeControl } from './control/index.js';
|
|
8
8
|
import { deleteTranscript } from './history/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* Combines native Claude reads and persistent controls behind the provider boundary.
|
|
@@ -66,6 +66,7 @@ export const createClaudeProviderFactory = (store, additionalDirectories) => ({
|
|
|
66
66
|
'application/pdf',
|
|
67
67
|
'text/plain',
|
|
68
68
|
],
|
|
69
|
+
steerMediaTypes: CLAUDE_STEER_MEDIA_TYPES,
|
|
69
70
|
configurationSchema: {
|
|
70
71
|
session: z.json().parse(z.toJSONSchema(SessionSettingsSchema.omit({ sandbox: true }))),
|
|
71
72
|
turn: z.json().parse(z.toJSONSchema(TurnSettingsSchema.omit({ outputSchema: true }))),
|
|
@@ -84,7 +85,16 @@ export const createClaudeProviderFactory = (store, additionalDirectories) => ({
|
|
|
84
85
|
});
|
|
85
86
|
},
|
|
86
87
|
listThreads: (workspaceRoot, page, call) => reader.listThreads(workspaceRoot, page, call.signal),
|
|
87
|
-
readHistory
|
|
88
|
+
async readHistory(command) {
|
|
89
|
+
const response = await reader.readHistory(command);
|
|
90
|
+
const items = response.kind === 'items' || response.kind === 'session-evidence'
|
|
91
|
+
? response.result.data
|
|
92
|
+
: response.kind === 'item-detail' && response.result
|
|
93
|
+
? [response.result.item]
|
|
94
|
+
: [];
|
|
95
|
+
control.confirmSavedSteers(command.nativeId, command.workspaceRoot, items);
|
|
96
|
+
return response;
|
|
97
|
+
},
|
|
88
98
|
readModels: (command) => reader.readModels(command),
|
|
89
99
|
readConfiguration: (command, nativeId, call) => nativeId
|
|
90
100
|
? control.readConfiguration(command, nativeId)
|
|
@@ -131,7 +141,7 @@ export const createClaudeProviderFactory = (store, additionalDirectories) => ({
|
|
|
131
141
|
control.validateInput(nativeId, input.settings);
|
|
132
142
|
},
|
|
133
143
|
startTurn: (requestId, nativeId, text, _skill, settings, files, call) => control.startTurn(requestId, nativeId, text, settings, call.signal, files),
|
|
134
|
-
steer: (requestId, nativeId, expectedTurnId, text) => control.steer(requestId, nativeId, expectedTurnId, text),
|
|
144
|
+
steer: (requestId, nativeId, expectedTurnId, text, files) => control.steer(requestId, nativeId, expectedTurnId, text, files),
|
|
135
145
|
interrupt: (requestId, nativeId, nativeTurnId) => control.interrupt(requestId, nativeId, nativeTurnId),
|
|
136
146
|
cleanThread: (requestId, nativeId) => control.stopSession(requestId, nativeId),
|
|
137
147
|
releaseThread: (requestId, nativeId) => control.releaseSession(requestId, nativeId),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLAUDE_STEER_MEDIA_TYPES: readonly string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IConfigurationRequest, ISessionSettings, ITurnSettings } from '../../../contracts/index.js';
|
|
2
2
|
import type { IProviderInputFile } from '../../inputs/index.js';
|
|
3
|
-
import type { IClaudeControlEvents } from './types.js';
|
|
3
|
+
import type { IClaudeControlEvents, IClaudeSavedInput } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Owns one persistent native CLI per explicitly controlled Claude session.
|
|
6
6
|
* @returns Controls whose processes outlive client connections and stop at runtime shutdown.
|
|
@@ -13,6 +13,8 @@ export declare const createClaudeControl: (additionalDirectories?: string[]) =>
|
|
|
13
13
|
* Installs the runtime-owned evidence channel.
|
|
14
14
|
*/
|
|
15
15
|
setEvents(handlers: IClaudeControlEvents): void;
|
|
16
|
+
/** Settles pending native waits from exact saved input without starting another turn. */
|
|
17
|
+
confirmSavedSteers(nativeId: string, workspaceRoot: string, items: IClaudeSavedInput[]): void;
|
|
16
18
|
/**
|
|
17
19
|
* Starts an idle native session with normal local instructions and settings.
|
|
18
20
|
* @returns The exact native session identity and workspace.
|
|
@@ -147,7 +149,7 @@ export declare const createClaudeControl: (additionalDirectories?: string[]) =>
|
|
|
147
149
|
* - JG_AGENT_HQ_CLAUDE_FAILED: The Claude integration failed
|
|
148
150
|
* - JG_AGENT_HQ_TRANSPORT_FAILED: The HQ transport failed
|
|
149
151
|
*/
|
|
150
|
-
steer(
|
|
152
|
+
steer(requestId: string, nativeId: string, turnId: string, text: string, files?: IProviderInputFile[]): Promise<string>;
|
|
151
153
|
/**
|
|
152
154
|
* Requests interruption of the exact active turn, HQ input's or one Claude started; completion
|
|
153
155
|
* arrives separately.
|