@jskit-ai/agent-docs 0.1.220 → 0.1.222
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/guide/agent/app-extras/assistant-conversation.md +281 -9
- package/guide/agent/app-extras/assistant-voice.md +4 -2
- package/package.json +1 -1
- package/patterns/minimal-foundation/example/package.json +1 -1
- package/patterns/shell-foundation/example/package.json +1 -1
- package/reference/autogen/PATTERN_INDEX.md +4 -4
- package/reference/autogen/packages/assistant-core.md +6 -3
- package/reference/autogen/packages/assistant-runtime.md +1 -1
- package/skills/jskit/references/pattern-index.md +4 -4
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +1 -1
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +1 -1
|
@@ -17,6 +17,10 @@ Choose one transcript owner for a conversation. The [ordinary API](./assistant.m
|
|
|
17
17
|
is the starting point; [advanced hosts](#advanced-host-facilities) and
|
|
18
18
|
[testing](#testing-entrypoints) are separate reference areas.
|
|
19
19
|
|
|
20
|
+
The shared transcript renders pipe tables with a valid separator row even when
|
|
21
|
+
all header cells are blank. Empty headers do not flatten the body into prose;
|
|
22
|
+
code fences and text without a table separator retain their ordinary treatment.
|
|
23
|
+
|
|
20
24
|
### Prepare an offline development copy
|
|
21
25
|
|
|
22
26
|
Advanced hosts that copy a stopped conversation store can call
|
|
@@ -359,6 +363,14 @@ turn eligibility when its product state also includes non-native work such as
|
|
|
359
363
|
routing. The binding captures Send or Steer before preparation; retry keeps that
|
|
360
364
|
choice and the original message identity, text, settings and files.
|
|
361
365
|
|
|
366
|
+
Explicit `queueWhileSending: true` also serializes prepared submissions. A
|
|
367
|
+
follower is visible immediately but its preparation waits for the previous
|
|
368
|
+
receipt. Stop or retirement cancels it through the existing pending-message
|
|
369
|
+
owner. A definite `conversation_steer_turn_finished` rejection can become one
|
|
370
|
+
ordinary Send with the same identity, without repeating preparation; unknown
|
|
371
|
+
delivery never permits replay. Without explicit opt-in, prepared submissions
|
|
372
|
+
retain their non-queueing behavior.
|
|
373
|
+
|
|
362
374
|
`prepare(captured, { signal })` performs only the application's existing save,
|
|
363
375
|
creation and authorization prerequisites, then returns its canonical request or
|
|
364
376
|
`false` to cancel before dispatch. The optimistic entry exists before those awaits.
|
|
@@ -1187,13 +1199,24 @@ callbacks from runtime capabilities; applications using it need no custom goal
|
|
|
1187
1199
|
adapter. For a low-level adapter, omit `goal` or use `enabled: false` when goals
|
|
1188
1200
|
are unsupported. The supplied binding hides unsupported controls automatically.
|
|
1189
1201
|
|
|
1202
|
+
Claude Pause retains the objective and native identity in the existing conversation
|
|
1203
|
+
binding before interrupting execution. When another message starts a process, the
|
|
1204
|
+
native owner clears the restored checker with Claude's local command and requires
|
|
1205
|
+
its exact successful receipt before admitting user input. Ordinary messages and
|
|
1206
|
+
process restart keep the goal paused. Explicit Resume reinstalls the objective;
|
|
1207
|
+
Cancel removes the retained goal. A failed native clear leaves the new message
|
|
1208
|
+
unsent and retains Pause for recovery. Hosts supplying their own Claude store must
|
|
1209
|
+
round-trip the optional `pausedGoal` field with the existing conversation state.
|
|
1210
|
+
|
|
1190
1211
|
The supplied binding owns goal reads, command state and message receipts. It
|
|
1191
1212
|
refreshes on goal events and reconnect, with a 30-second passive
|
|
1192
1213
|
read deadline and no goal poll. Passive failures remain local to the control.
|
|
1193
1214
|
An explicit `goal: true` option also enables reads when an application's retained
|
|
1194
1215
|
goal may belong to a different target from its visible conversation. Such an
|
|
1195
1216
|
authorized facade can return `{ status, goal, target: { segmentId, capabilities },
|
|
1196
|
-
routing? }` from its existing goal read.
|
|
1217
|
+
routing?, error? }` from its existing goal read. An optional `error` explains a
|
|
1218
|
+
recoverable host condition while the available goal and its controls remain
|
|
1219
|
+
usable; a subsequent successful read clears that message when the host clears it. The target and declared goal capabilities
|
|
1197
1220
|
must come from that same native read; the client does not infer an engine or
|
|
1198
1221
|
reconstruct native expectations. Standalone goal reads still return a goal or
|
|
1199
1222
|
null. An object-valued `goal` presentation adapter remains supported.
|
|
@@ -1202,7 +1225,9 @@ Custom product presentation can use the retained runtime's `goalView`,
|
|
|
1202
1225
|
`goalState`, `goalLoadError`, `changeGoal` and `refreshGoal` instead of creating
|
|
1203
1226
|
another remote resource. New commands capture that view's target and goal ID.
|
|
1204
1227
|
A failed message command keeps its original UUID and request for explicit retry;
|
|
1205
|
-
unknown delivery is inspected, never automatically resent.
|
|
1228
|
+
unknown delivery is inspected, never automatically resent. When inspection confirms
|
|
1229
|
+
the same goal request was accepted, its stale command error clears without
|
|
1230
|
+
creating another goal. Unknown delivery keeps its recovery error.
|
|
1206
1231
|
|
|
1207
1232
|
### Files
|
|
1208
1233
|
|
|
@@ -1225,7 +1250,8 @@ owns queueing, concurrent uploads, cancellation, retries, stale-response cleanup
|
|
|
1225
1250
|
drag/drop/paste and scope disposal. `queueItems`, `attachments`, `canSubmit`,
|
|
1226
1251
|
`canAddFiles`, `dragActive`, and `status` feed the aggregate. Uploads block Send
|
|
1227
1252
|
until resolved; typing stays available. The UI defaults to ten files and 100 MB
|
|
1228
|
-
per file; the server must enforce its own limits.
|
|
1253
|
+
per file; the server must enforce its own limits. Configured limits that are exact
|
|
1254
|
+
multiples of 1 MiB display in MiB; other limits display in decimal MB.
|
|
1229
1255
|
|
|
1230
1256
|
After acknowledged delivery, call
|
|
1231
1257
|
`clearAttachments({ accepted: true, attachmentIds })` with that submission's
|
|
@@ -1671,6 +1697,16 @@ Applications still supply exact action authorization, native instruction/account
|
|
|
1671
1697
|
configuration and checkpoints. Source/component proofs do not establish a host's
|
|
1672
1698
|
installed or real CLI/application acceptance.
|
|
1673
1699
|
|
|
1700
|
+
If an opted-in host starts Claude for a native goal before an authored turn,
|
|
1701
|
+
`process.configure` must already declare `applicationTools: true` and retain the
|
|
1702
|
+
same discovery schemas for subsequent turns. The retained owner installs the
|
|
1703
|
+
existing SDK control handler at that startup. Discovery can be served before a
|
|
1704
|
+
turn; execution still requires the exact admitted top-level native tool use.
|
|
1705
|
+
An admitted application action can call the existing native goal Pause owner:
|
|
1706
|
+
its process cleanup does not wait on the enclosing tool call, and the common
|
|
1707
|
+
runtime saves the action result before releasing that turn. Applications own
|
|
1708
|
+
explicit pause authorization and persisted continuation intent.
|
|
1709
|
+
|
|
1674
1710
|
Such a server integration may open a handle with `representation: "native"` when
|
|
1675
1711
|
its existing command contract requires the original result. The option belongs
|
|
1676
1712
|
to that handle and each invocation, not the cached conversation or saved state.
|
|
@@ -1741,6 +1777,13 @@ remain in force; no message is resent. A host-supplied owner retains its own
|
|
|
1741
1777
|
policy. This is a server coordination option, not a client field or recording
|
|
1742
1778
|
limit.
|
|
1743
1779
|
|
|
1780
|
+
When Codex confirms a provider failure, recovering saved assistant output does
|
|
1781
|
+
not replace that failure with successful completion. The run owner preserves
|
|
1782
|
+
the output, publishes the provider detail through the existing outcome notice,
|
|
1783
|
+
and settles once with the failed outcome. Usage-limit details remain available
|
|
1784
|
+
even when the same turn already contains an answer. Repeated terminal events
|
|
1785
|
+
do not duplicate the notice or checkpoint.
|
|
1786
|
+
|
|
1744
1787
|
Claude uses its native schema flag and restarts the owned process when the schema
|
|
1745
1788
|
changes, retaining the conversation. Codex uses its native turn schema setting.
|
|
1746
1789
|
OpenCode uses the existing schema instruction and removes a single JSON fence
|
|
@@ -1793,6 +1836,64 @@ truncate a returning engine's missed/edited messages. Attachment references and
|
|
|
1793
1836
|
removed-message identities retain their existing delivery ownership. The direct
|
|
1794
1837
|
API's initial continuity policy is separate and is unchanged by these limits.
|
|
1795
1838
|
|
|
1839
|
+
The lower-level `createConversationChangeover()` owner additionally accepts
|
|
1840
|
+
`maximumHistoryBytes`, a positive UTF-8 byte limit on the quoted history JSON.
|
|
1841
|
+
This includes message metadata, escaped text, attachment references and removed
|
|
1842
|
+
message IDs. It bounds both initial history and returning missed/corrected
|
|
1843
|
+
messages, dropping complete oldest messages until the remainder fits. Set
|
|
1844
|
+
`maximumInitialMessages: Infinity` together with a finite byte budget to select
|
|
1845
|
+
the entire available history instead of a fixed message window. Saved transcript
|
|
1846
|
+
text is never changed and no summary is generated. Removed message IDs are
|
|
1847
|
+
retained; if even that envelope exceeds the budget, delivery fails before a
|
|
1848
|
+
pending request is written or sent.
|
|
1849
|
+
|
|
1850
|
+
The caller must derive this byte allowance from the selected destination's
|
|
1851
|
+
available normal context, reserving room for its retained history, instructions,
|
|
1852
|
+
tools, the current request and further work. Byte counts are not token counts;
|
|
1853
|
+
this option does not select a model or enable an extended context window. A
|
|
1854
|
+
retained pending prompt keeps its exact original contents on retry even if the
|
|
1855
|
+
budget or source transcript later changes. The existing delivery cursor records
|
|
1856
|
+
the source snapshot, including older rows omitted by the bounded transfer, so
|
|
1857
|
+
subsequent unchanged requests do not repeatedly inject the discarded history.
|
|
1858
|
+
This lower-level option does not change the runtime's default 30-message seed.
|
|
1859
|
+
|
|
1860
|
+
`maximumHistoryBytes` can also be an async server-owned resolver receiving
|
|
1861
|
+
`{ engineId, returning, input, handover }`. It must return a finite positive
|
|
1862
|
+
integer. The owner calls it only when preparing new quoted history, after
|
|
1863
|
+
checking existing delivery evidence. Ordinary input needing no catch-up, exact
|
|
1864
|
+
pending retries and receipt recovery do not invoke it. This lets the caller
|
|
1865
|
+
inspect the selected native conversation's current budget without preparing
|
|
1866
|
+
another runtime during recovery. An unavailable or invalid budget prevents
|
|
1867
|
+
dispatch; it does not silently substitute an unlimited allowance.
|
|
1868
|
+
|
|
1869
|
+
A supplied native conversation can expose the same `maximumHistoryBytes`
|
|
1870
|
+
resolver on its binding. The common runtime adds the current authorized
|
|
1871
|
+
`context` and active execution `signal` to its arguments. When no explicit
|
|
1872
|
+
`maxInitialNativeHistoryMessages` is configured, this opts that binding into
|
|
1873
|
+
whole-history selection up to the returned byte budget. The host owns the budget
|
|
1874
|
+
policy and usage source. The common runtime reauthorizes and checks cancellation
|
|
1875
|
+
before the lookup, then checks cancellation again before retaining the result.
|
|
1876
|
+
No resolver means the existing initial message limit remains in effect.
|
|
1877
|
+
|
|
1878
|
+
The existing Claude conversation owner exposes
|
|
1879
|
+
`readContextUsage(entry, { signal, ...input })` for an already acquired native
|
|
1880
|
+
entry. It uses the original account/configuration/process preparation and sends
|
|
1881
|
+
only `get_context_usage` with `detail: "summary"`; it does not submit an inference
|
|
1882
|
+
request. The result is `{ model, usedTokens, windowTokens }`. When auto-compaction
|
|
1883
|
+
is enabled, the window is bounded by its reported threshold. Invalid native
|
|
1884
|
+
usage fails instead of guessing a limit. Call this with the same prepared tool
|
|
1885
|
+
configuration as the eventual request; it is not a separate provider lifecycle.
|
|
1886
|
+
|
|
1887
|
+
For a prepared Codex runtime, the existing `server/codex-configuration` entry
|
|
1888
|
+
exports `readCodexModelContextWindow({ runtimeDir, model })`. Supply the exact
|
|
1889
|
+
runtime directory and selected catalogue model ID. It reads that runtime's
|
|
1890
|
+
`models.json`, returning `windowTokens` from the normal `context_window` and
|
|
1891
|
+
`effectiveWindowTokens` after the catalogue's effective-context percentage.
|
|
1892
|
+
It never substitutes `max_context_window`, changes model settings or launches
|
|
1893
|
+
a process. Missing, ambiguous or invalid normal limits fail without exposing
|
|
1894
|
+
catalogue contents. This read establishes the limit only; the caller must still
|
|
1895
|
+
account for usage belonging to the destination thread and reserve working space.
|
|
1896
|
+
|
|
1796
1897
|
An application whose established selection policy creates a fresh native
|
|
1797
1898
|
conversation can pass `retireNative: true` to `select()`. This uses the same
|
|
1798
1899
|
selection transaction and allocates a new binding even for a compatible model
|
|
@@ -1900,6 +2001,13 @@ different IDs. `message-complete` retires the temporary block. The runtime's
|
|
|
1900
2001
|
messages. Do not save temporary blocks or assume that every answer in a turn
|
|
1901
2002
|
has the same ID. Native snapshot identities match recovered history.
|
|
1902
2003
|
|
|
2004
|
+
The transient stream owner can retain host-provided message `metadata`, such as
|
|
2005
|
+
recorded model attribution. It captures the first supplied metadata for that
|
|
2006
|
+
message, preserves it across text deltas, and returns independent copies on read.
|
|
2007
|
+
Only supply safe presentation data already authorized for that conversation;
|
|
2008
|
+
never put credentials, native custody details or hidden instructions there.
|
|
2009
|
+
This does not add a persisted field or replace saved transcript metadata.
|
|
2010
|
+
|
|
1903
2011
|
All engines accept the same configuration fields: required `systemPrompt`, plus
|
|
1904
2012
|
optional `integrationId`, `model` and `effort`. API and OpenCode require an
|
|
1905
2013
|
authorized integration; Claude and Codex can instead use their native login.
|
|
@@ -2115,6 +2223,12 @@ This operation does not supply product queue policy or the browser observation
|
|
|
2115
2223
|
adapter. Complete those application owners before enabling it in a consumer;
|
|
2116
2224
|
never manufacture historical markers or completion receipts.
|
|
2117
2225
|
|
|
2226
|
+
A retained native reservation whose dispatch was never attempted is ready after
|
|
2227
|
+
reopening, with no pending delivery or interruption banner. Its frozen request
|
|
2228
|
+
stays stored for an explicit retry; opening or reading does not replay it.
|
|
2229
|
+
Attempted requests and inspection-only upgrade records still report uncertain
|
|
2230
|
+
delivery and require receipt inspection before any resend.
|
|
2231
|
+
|
|
2118
2232
|
Saved turns distinguish complete, failed, cancelled and interrupted work. Error
|
|
2119
2233
|
messages are not assistant replies. After restart, accepted work is marked
|
|
2120
2234
|
interrupted and is never replayed. API reservations interrupted before admission
|
|
@@ -2455,6 +2569,14 @@ retryable through `cancel()`. These commands accept neither attachments nor a to
|
|
|
2455
2569
|
budget. After replacement or engine change, an ordinary Send must deliver the
|
|
2456
2570
|
pending continuity briefing before a goal can start.
|
|
2457
2571
|
|
|
2572
|
+
Claude's goal validation runs before native interruption or Send. Rejected
|
|
2573
|
+
conditions, including reserved commands such as `clear`, return
|
|
2574
|
+
`conversation_invalid_goal` (HTTP 400, `delivery: "not-sent"`). The shared
|
|
2575
|
+
delivery binding retains a failed attempt for correction or dismissal rather
|
|
2576
|
+
than presenting an uncertain receipt. Errors from native execution, storage or
|
|
2577
|
+
acknowledgement remain separate; this validation result never licenses replay
|
|
2578
|
+
after a transport failure.
|
|
2579
|
+
|
|
2458
2580
|
Codex uses native goal controls and may attach a goal to ordinary active work.
|
|
2459
2581
|
Starting another goal after completion requires the completed goal's ID. These
|
|
2460
2582
|
controls accept neither attachments nor authored message receipts. They return
|
|
@@ -2464,7 +2586,12 @@ automatic continuations but does not interrupt an already running turn;
|
|
|
2464
2586
|
|
|
2465
2587
|
Claude Set, Resume and Clear return the same admission receipt as `send()`.
|
|
2466
2588
|
Reusing an accepted command's `messageId` returns its receipt without executing
|
|
2467
|
-
it again.
|
|
2589
|
+
it again. If a bound native turn finishes during Set or Resume preparation and
|
|
2590
|
+
returns `conversation_steer_turn_finished` with `delivery: "not-sent"`, the runtime
|
|
2591
|
+
waits for that dispatch's cleanup and final save, then tries the same goal command
|
|
2592
|
+
once through normal admission. It rechecks access, cancellation and goal identity;
|
|
2593
|
+
a repeated rejection or uncertain delivery remains an error.
|
|
2594
|
+
A lost acknowledgement stays uncertain until `inspectDelivery()` finds
|
|
2468
2595
|
native proof. Codex controls use the existing native goal identity checks;
|
|
2469
2596
|
refresh `readGoal()` after a failed control before choosing another action.
|
|
2470
2597
|
Older Codex goal-message records remain inspection-only and require offline
|
|
@@ -2586,7 +2713,12 @@ await runtime.close();
|
|
|
2586
2713
|
The native identity, working directory and credential-home binding remain in
|
|
2587
2714
|
server-side runtime metadata. Prompt changes replace the process while preserving
|
|
2588
2715
|
native history; compatible model/effort changes use native controls. Account changes
|
|
2589
|
-
|
|
2716
|
+
are rejected by default. An application that owns its conversations and authorizes
|
|
2717
|
+
the current workspace account may opt into `host.allowAccountChange: true`. The
|
|
2718
|
+
existing account guard confirms the old process has stopped before saving the new
|
|
2719
|
+
identity and resuming the same native history. Failed cleanup blocks adoption
|
|
2720
|
+
until the existing Stop recovery succeeds. Completed response receipts still
|
|
2721
|
+
require their original saved account; this option cannot rebind past effects. Application access
|
|
2590
2722
|
is checked again after native preparation and before dispatch. Built-in tools are
|
|
2591
2723
|
disabled unless the server grants `host.nativeTools`. Optional application `actions` use the shared
|
|
2592
2724
|
executor and authorized attachments use the common resolver above. Steering uses
|
|
@@ -2600,8 +2732,8 @@ credential-file metadata is unchanged. File changes invalidate the result,
|
|
|
2600
2732
|
failed reads are retryable, and signed-out JSON is distinct from a failed query.
|
|
2601
2733
|
On macOS, only concurrent reads are shared because native credentials may live
|
|
2602
2734
|
in the keychain. JSKIT does not parse credential contents for this cache.
|
|
2603
|
-
|
|
2604
|
-
from resuming owned history. Authorized external-provider connections can rotate
|
|
2735
|
+
Without the explicit host opt-in, the extracted native account guard prevents a
|
|
2736
|
+
different signed-in Claude account from resuming owned history. Authorized external-provider connections can rotate
|
|
2605
2737
|
their API keys while retaining the native conversation; application authorization
|
|
2606
2738
|
still decides which connection the caller may use.
|
|
2607
2739
|
Compatible connection/key changes use the production flag-then-model control
|
|
@@ -3544,8 +3676,10 @@ Hosts without this optional receipt retain the original protocol EOF path. The e
|
|
|
3544
3676
|
`processExit` and the acquired execution identity before the original exact-owner
|
|
3545
3677
|
cleanup. Exit does not prove scope cleanup: a successful stop must still return
|
|
3546
3678
|
`{ scopeEmpty: true }`. Engine flags, environment normalization and the JSON
|
|
3547
|
-
initialization handshake stay inside JSKIT.
|
|
3548
|
-
|
|
3679
|
+
initialization handshake stay inside JSKIT. A host may supply
|
|
3680
|
+
`initializationTimeoutMs` for cold startup (default 30 seconds); ordinary controls
|
|
3681
|
+
retain their separate 30-second deadline. Expired startup still performs verified
|
|
3682
|
+
cleanup. Normal EOF event-draining order is unchanged.
|
|
3549
3683
|
|
|
3550
3684
|
Without a replacement execution facility, Claude startup uses the supplied local
|
|
3551
3685
|
POSIX process-group implementation. This is a trusted single-user host, not a
|
|
@@ -4239,3 +4373,141 @@ leaves account authorization and historical-conversion policy to the host.
|
|
|
4239
4373
|
provider/configuration/endpoint/key digest already used by the live driver;
|
|
4240
4374
|
hosts may translate a verified historical pin without changing its caller or
|
|
4241
4375
|
copying credentials. These functions do not authorize native continuation.
|
|
4376
|
+
|
|
4377
|
+
A Claude turn that ends before the native sender writes the prompt is a definite
|
|
4378
|
+
rejection. The sender reports `delivery: "not-sent"`, and the common runtime
|
|
4379
|
+
notifies the bound host through its existing `onPromptRejected` callback. The
|
|
4380
|
+
host can clear its dispatch marker and offer Retry. A pipe write without native
|
|
4381
|
+
acknowledgement remains uncertain; never use absence from history alone to resend.
|
|
4382
|
+
|
|
4383
|
+
Subscription failures and terminal outcomes taking at least five seconds are
|
|
4384
|
+
logged at warning level with the last stage and elapsed duration. Normal stage
|
|
4385
|
+
diagnostics remain at info; no transcript or unvalidated client identity is logged.
|
|
4386
|
+
|
|
4387
|
+
A retained user steering request can race with native turn completion. The server's
|
|
4388
|
+
`conversation_steer_turn_finished` conflict is a specific pre-admission rejection,
|
|
4389
|
+
not a generic steering/transport failure. The conversation binding retries that
|
|
4390
|
+
queued request once as ordinary Send with the same message ID, authored content,
|
|
4391
|
+
attachments and application data, retaining Send intent if it later fails. It
|
|
4392
|
+
never converts goals or prepared application submissions, never retries accepted
|
|
4393
|
+
or uncertain delivery, and checks that the original actor/conversation remains
|
|
4394
|
+
current. Other `conversation_not_steerable` refusals retain their existing policy.
|
|
4395
|
+
Claude also classifies this race before native interruption, but only a completed
|
|
4396
|
+
result qualifies; idle state, Stop, cancellation and another interrupt do not.
|
|
4397
|
+
The scoped retained-conversation owner restores the prior admitted identity on
|
|
4398
|
+
definite rejection before reading late output, and anchors the first answer to
|
|
4399
|
+
the original unanswered authored turn. Further native messages retain the
|
|
4400
|
+
ordinary multi-message projection. Every newly outgoing input reserves the
|
|
4401
|
+
existing continuity pending record, including ordinary same-model sends: bare
|
|
4402
|
+
authored text stays unchanged when no catch-up is needed. Only the matching
|
|
4403
|
+
pending record with `attempted: false` permits retry after definite rejection,
|
|
4404
|
+
including after reload. Missing evidence remains inspection-only. Rejected rows
|
|
4405
|
+
remain intact; no historical rows or pending records are rewritten.
|
|
4406
|
+
|
|
4407
|
+
Accepted Claude steering also preserves output ownership. Scoped reads pass the
|
|
4408
|
+
saved authored `requestMessageIds` to the native read operation. The Claude owner
|
|
4409
|
+
retains the native input `userId` on live blocks and restored history, and resolves
|
|
4410
|
+
it to `requestMessageId` using those known IDs. The scoped transcript writer uses
|
|
4411
|
+
that exact authored turn for partial output and final replies; an identified
|
|
4412
|
+
output without a matching authored turn is left in native history for a later
|
|
4413
|
+
read, never assigned to the latest request. Providers without this identity
|
|
4414
|
+
continue using their existing projection. This is read-time routing into the
|
|
4415
|
+
existing transcript format, not a historical repair or a new persisted field.
|
|
4416
|
+
After verified Claude Stop, buffered and already displayed partial text remains
|
|
4417
|
+
readable as interrupted commentary with its original input/output identity. The
|
|
4418
|
+
scoped reader saves it through the same transcript writer before retiring live
|
|
4419
|
+
state. It is not a completed-answer receipt, and unconfirmed process cleanup
|
|
4420
|
+
does not finalize a still-running stream.
|
|
4421
|
+
|
|
4422
|
+
When Stop races with native history persistence, Claude's explicit API block
|
|
4423
|
+
identity reconciles the saved frame and live fragment before transcript admission.
|
|
4424
|
+
The existing output ID also prevents a later native-history read from appending
|
|
4425
|
+
the interrupted output again under another frame UUID. This does not promote an
|
|
4426
|
+
interruption to a completed-answer receipt or rewrite earlier saved transcripts.
|
|
4427
|
+
|
|
4428
|
+
Claude's internal task notifications do not become user requests. Their command
|
|
4429
|
+
lifecycle events must not leave a completed user request busy or replace its
|
|
4430
|
+
receipt identity. The shared native owner clears completed commands while still
|
|
4431
|
+
waiting for the generation result and any remaining background work. Hosts should
|
|
4432
|
+
keep using the shared owner for steering and goal admission.
|
|
4433
|
+
|
|
4434
|
+
For Claude versions advertising `interrupt_send_now_v1` on the native
|
|
4435
|
+
`system/init` event, steering and active-turn goal Set/Resume use targeted **Send
|
|
4436
|
+
now**: write the new user message first, then send the control with that message's
|
|
4437
|
+
UUID. Native background workers continue; foreground generation or foreground
|
|
4438
|
+
tools may be interrupted to consume the instruction. The ordinary receipt and
|
|
4439
|
+
task-completion owners still determine admission and completion. Explicit **Stop**
|
|
4440
|
+
uses the cancellation control. Versions without this capability keep the existing
|
|
4441
|
+
interrupt behavior; the client never sends an unsupported Send now control that
|
|
4442
|
+
an older CLI could interpret as Stop.
|
|
4443
|
+
|
|
4444
|
+
Native Claude `system/local_command_output` messages retain their origin in
|
|
4445
|
+
`data.native` (`engineId`, `type`, `subtype`). Transcript writers preserve supplied
|
|
4446
|
+
message data for agent messages as well as user messages. A consuming application
|
|
4447
|
+
can distinguish command confirmations from ordinary assistant prose without
|
|
4448
|
+
altering native history or treating matching text alone as protocol evidence.
|
|
4449
|
+
Claude also emits local-command confirmations as synthetic assistant frames.
|
|
4450
|
+
When `local_command_run.command` and `local_command_source` identify their origin,
|
|
4451
|
+
`data.native` carries `engineId: "claude"`, `type: "assistant"`, `command`, and
|
|
4452
|
+
`output: "stdout"` or `"stderr"`. Successful result-only confirmations with
|
|
4453
|
+
`local_command` use `type: "result"` and `output: "stdout"`. Ordinary replies do
|
|
4454
|
+
not acquire this metadata because of their wording or model name. Applications
|
|
4455
|
+
can hide successful management output while retaining command errors. This
|
|
4456
|
+
applies to newly written messages; it does not enrich older stored records.
|
|
4457
|
+
|
|
4458
|
+
For a host-owned goal admission, the conversation context may carry an `AbortSignal`
|
|
4459
|
+
as `signal`. Abort it when the person cancels that admission while authorization or
|
|
4460
|
+
native preparation is still pending. The native goal dispatch checks cancellation
|
|
4461
|
+
before writing; a command already acknowledged keeps its receipt. Continue to use
|
|
4462
|
+
the ordinary Stop/Pause operation to stop work that has already reached the provider.
|
|
4463
|
+
|
|
4464
|
+
Connection warnings render a compact full-width row with Reload on the left and
|
|
4465
|
+
wrapped status text on the right. The avatar stays over the transcript below
|
|
4466
|
+
that row; its selected size cannot push recovery controls down. Reload preserves
|
|
4467
|
+
loaded messages and drafts, and its disabled pending state remains visible.
|
|
4468
|
+
|
|
4469
|
+
Status/history reads and reconciliation do not stop a Claude process while its
|
|
4470
|
+
current runtime still owns the pending initialization cleanup lease. The lease
|
|
4471
|
+
is transient and tied to the exact execution ID; after initialization fails,
|
|
4472
|
+
ordinary cleanup/reconciliation applies again. Explicit Stop can always use that
|
|
4473
|
+
lease to stop startup. A restored execution has no pending lease and still needs
|
|
4474
|
+
verified cleanup before reuse.
|
|
4475
|
+
|
|
4476
|
+
For a bound Claude goal, command admission can precede its native goal attachment.
|
|
4477
|
+
The retained goal owner waits up to 30 seconds for the attachment linked to that
|
|
4478
|
+
exact native command UUID before returning the goal result; it does not await the
|
|
4479
|
+
model's whole turn. An attachment timeout reports accepted delivery and leaves the
|
|
4480
|
+
original receipt authoritative. Native goal reads expose `goalCommandId` as derived
|
|
4481
|
+
history evidence for a host recovering that same pending command. A goal with the
|
|
4482
|
+
same condition but a different command is not proof of that command's goal.
|
|
4483
|
+
|
|
4484
|
+
Offline native-history inspection may set `includeCommandMessages: true` on
|
|
4485
|
+
`readClaudeHistory`. Its separate `commandMessages` list contains exact native
|
|
4486
|
+
IDs, unwrapped text and `data.native` for `system/local_command` records with
|
|
4487
|
+
explicit command identity and matching stdout/stderr wrappers. Ordinary history
|
|
4488
|
+
projection is unchanged. Sidechain, nested and meta records are excluded, and
|
|
4489
|
+
existing rewind branch selection still applies. Use `allowIncompleteTail: false`
|
|
4490
|
+
with stopped writers when these records prove a historical application repair.
|
|
4491
|
+
The native reader writes nothing; the application owns its repair and backups.
|
|
4492
|
+
|
|
4493
|
+
Claude native goal reads preserve `blocked` when the main history records a
|
|
4494
|
+
structured `goal_status` evaluation with `met: false, failed: true`, or the
|
|
4495
|
+
explicit informational event terminating repeated stop-hook attempts. The failed
|
|
4496
|
+
evaluation means the native evaluator found the goal impossible and removed its
|
|
4497
|
+
Stop hook; it is not an active goal or a user Pause. The same
|
|
4498
|
+
goal identity and last evaluator reason remain available across process shutdown.
|
|
4499
|
+
Quoted assistant text and nested tool events are not evidence of blocking. A
|
|
4500
|
+
later native goal attachment supersedes the block; a completed goal is not reopened
|
|
4501
|
+
by a hook notice. Hosts must not automatically resume this blocked state on
|
|
4502
|
+
restart. This projection records the native termination; it does not prevent
|
|
4503
|
+
Claude's preceding retry loop or turn an assistant's “paused” reply into a control
|
|
4504
|
+
operation.
|
|
4505
|
+
|
|
4506
|
+
The same Claude goal owner accepts an admitted native `block` control with the
|
|
4507
|
+
exact goal identity and a nonempty reason of at most 1,000 characters. It stores
|
|
4508
|
+
`blockedGoal` alongside the existing optional `pausedGoal` (never both), stops
|
|
4509
|
+
native execution and disarms the checker before ordinary input. Hosts must
|
|
4510
|
+
round-trip both optional fields. Resume and Cancel clear retained state only
|
|
4511
|
+
after their exact native command receipt. Host application tools decide who may
|
|
4512
|
+
report an external blocker; this owner does not interpret message prose or
|
|
4513
|
+
schedule retries. Blocked status and reason survive owner recreation.
|
|
@@ -495,8 +495,10 @@ characters; a larger single burst can lose its remaining tail. With thinking sou
|
|
|
495
495
|
selected, an idle working conversation may say “Hmm...” after 20 seconds; it does
|
|
496
496
|
not overlap existing audio.
|
|
497
497
|
|
|
498
|
-
Optional activity
|
|
499
|
-
|
|
498
|
+
Optional activity and canonical answers join the original speech queue in arrival
|
|
499
|
+
order. A new message never cancels an earlier message being read. Repeated updates
|
|
500
|
+
to an observed message do not restart it. Only the optional “Hmm...” filler yields
|
|
501
|
+
to an answer. Canonical answers keep their existing output IDs and playback callbacks. Activity and thinking
|
|
500
502
|
sounds have no canonical output identity and emit no `onPlayback` receipt; they
|
|
501
503
|
cannot satisfy lesson audio completion. Optional speech yields to microphone
|
|
502
504
|
startup, capture and transcription. Canonical answers retain full duplex playback.
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ A concrete Fastify, Vue, and JSKIT application foundation for products that do n
|
|
|
15
15
|
|
|
16
16
|
- Id: `app/minimal-foundation`
|
|
17
17
|
- Keywords: `app`, `fastify`, `foundation`, `minimal`, `server`, `vite`, `vue`
|
|
18
|
-
- Owner: `@jskit-ai/agent-docs@0.1.
|
|
18
|
+
- Owner: `@jskit-ai/agent-docs@0.1.222`
|
|
19
19
|
- Read: [PATTERN.md](../../skills/jskit/references/patterns/app/minimal-foundation/PATTERN.md)
|
|
20
20
|
- Examples: [example/](../../skills/jskit/references/patterns/app/minimal-foundation/example/)
|
|
21
21
|
- Requires: `@jskit-ai/http-runtime`, `@jskit-ai/kernel`
|
|
@@ -26,7 +26,7 @@ A concrete JSKIT web application foundation with responsive shell navigation, se
|
|
|
26
26
|
|
|
27
27
|
- Id: `app/shell-foundation`
|
|
28
28
|
- Keywords: `app`, `foundation`, `material`, `navigation`, `placements`, `shell`, `vite`, `vue`
|
|
29
|
-
- Owner: `@jskit-ai/agent-docs@0.1.
|
|
29
|
+
- Owner: `@jskit-ai/agent-docs@0.1.222`
|
|
30
30
|
- Read: [PATTERN.md](../../skills/jskit/references/patterns/app/shell-foundation/PATTERN.md)
|
|
31
31
|
- Examples: [example/](../../skills/jskit/references/patterns/app/shell-foundation/example/)
|
|
32
32
|
- Requires: `@jskit-ai/http-runtime`, `@jskit-ai/kernel`, `@jskit-ai/shell-web`
|
|
@@ -37,7 +37,7 @@ Configure an assistant runtime for one application surface and expose its chat a
|
|
|
37
37
|
|
|
38
38
|
- Id: `assistant/assistant-surface`
|
|
39
39
|
- Keywords: `ai`, `assistant`, `chat`, `config`, `environment`, `page`, `placement`, `settings`, `surface`
|
|
40
|
-
- Owner: `@jskit-ai/assistant-runtime@0.1.
|
|
40
|
+
- Owner: `@jskit-ai/assistant-runtime@0.1.221`
|
|
41
41
|
- Read: [PATTERN.md](../../skills/jskit/references/patterns/assistant/assistant-surface/PATTERN.md)
|
|
42
42
|
- Examples: [example/](../../skills/jskit/references/patterns/assistant/assistant-surface/example/)
|
|
43
43
|
- Requires: `@jskit-ai/assistant-runtime`, `@jskit-ai/connectors-catalog`, `@jskit-ai/connectors-core`, `@jskit-ai/shell-web`
|
|
@@ -323,7 +323,7 @@ Define a server feature through explicit capabilities and first-class actions, a
|
|
|
323
323
|
|
|
324
324
|
- Id: `server/feature-package`
|
|
325
325
|
- Keywords: `actions`, `feature`, `json-rest`, `knex`, `orchestration`, `package`, `provider`, `repository`, `routes`, `server`
|
|
326
|
-
- Owner: `@jskit-ai/agent-docs@0.1.
|
|
326
|
+
- Owner: `@jskit-ai/agent-docs@0.1.222`
|
|
327
327
|
- Read: [PATTERN.md](../../skills/jskit/references/patterns/server/feature-package/PATTERN.md)
|
|
328
328
|
- Examples: [example/](../../skills/jskit/references/patterns/server/feature-package/example/)
|
|
329
329
|
- Requires: `@jskit-ai/kernel`
|
|
@@ -326,7 +326,7 @@ Exports
|
|
|
326
326
|
- `claudePlanUsage(value)`
|
|
327
327
|
- `claudeCatalogueModels(initialization)`
|
|
328
328
|
- `createClaudeAccountQueries({ createProcess, accountIdentity, processes = () => [], isClosing = () => false })`
|
|
329
|
-
- `createClaudeCodeProcess({ command = "claude", execution = createLocalConversationExecution(), env = process.env, workdir, onEvent, onControlRequest, onFailure, onStarted, executionLimits, signal, commandWrapper, ...options } = {})`
|
|
329
|
+
- `createClaudeCodeProcess({ command = "claude", execution = createLocalConversationExecution(), env = process.env, workdir, onEvent, onControlRequest, onFailure, onStarted, executionLimits, signal, commandWrapper, initializationTimeoutMs = 30_000, onInitializationProgress, ...options } = {})`
|
|
330
330
|
Local functions
|
|
331
331
|
- `readNativeClaudeCodeAuthStatus({ env, credentialHome, command, commandRunner, signal })`
|
|
332
332
|
|
|
@@ -340,13 +340,14 @@ Exports
|
|
|
340
340
|
- `claudeNativeMessageId(id)`
|
|
341
341
|
- `waitForClaudeConversationTurn(conversation, input = {}, { signal, defaultTimeoutMs = 180_000, maximumTimeoutMs = Infinity, createError = failure, interruptedMessage = "Claude was interrupted when the application disconnected." } = {})`
|
|
342
342
|
- `runClaudeRenewalTurn(conversation, { clientMessageId, prompt, outputSchema, expectedThreadId, forbiddenThreadId, requireFreshHistory = false, timeoutMs = 180_000 }, { createError = failure, unreadableCode = "assistant_claude_turn_unreadable", failedCode = "assistant_claude_turn_failed", acceptedField = "inputAccepted" } = {})`
|
|
343
|
-
- `createClaudeConversationGoals({ conversationId, readHistory, readState, interrupt, send })`
|
|
343
|
+
- `createClaudeConversationGoals({ conversationId, readHistory, readState, interrupt, send, readRetainedGoal, saveRetainedGoal })`
|
|
344
344
|
- `createClaudeConversationOwner({ configRoot, store, preparation, process, onEvent, createError = failure, disconnectedMessage = "Claude was interrupted when the application disconnected." })`
|
|
345
345
|
- `createClaudeConversationTurn({ conversationId, onEvent = async () => {}, process, entry } = {})`
|
|
346
346
|
Local functions
|
|
347
347
|
- `failure(message, code = "assistant_claude_turn_failed")`
|
|
348
348
|
- `text(value)`
|
|
349
349
|
- `now()`
|
|
350
|
+
- `hasPendingClaudeStartup(entry)`
|
|
350
351
|
|
|
351
352
|
### `src/server/conversation/codexClient.js`
|
|
352
353
|
Exports
|
|
@@ -367,6 +368,7 @@ Exports
|
|
|
367
368
|
- `codexInteractiveArguments({ command, threadId = "", remoteEndpoint = "", model, effort, disableStartupUpdates = false, bypassApprovalsAndSandbox = false, bypassHookTrust = false } = {})`
|
|
368
369
|
- `codexAppServerProjectHookTrustConfig(provider, cwd = "", { persist = false } = {})`
|
|
369
370
|
- `prepareCodexModelCatalog({ command, runtimeDir, bundled = false, signal, additionalModels = [] })`
|
|
371
|
+
- `readCodexModelContextWindow({ runtimeDir, model } = {})`
|
|
370
372
|
- `codexAppServerTextHasControlCharacters(value = "")`
|
|
371
373
|
- `createCodexAppServerIsolation({ clientName = "jskit", minimumVersion = "0.151.0", disabledFeatures = DISABLED_FEATURES, limits: { userAgentMaxLength = 512, mcpServerMaxCount = 128, mcpServerNameMaxLength = 256, configResponseMaxBytes = 256 * 1024, hookMaxCount = 256, hookErrorMaxCount = 256, hookFieldMaxLength = 2048, hookFingerprintMaxLength = 256 * 1024, hookResponseMaxBytes = 512 * 1024 } = {}, createError = codexAppServerIsolationPolicyError } = {})`
|
|
372
374
|
- `codexToolFreeConfiguration(options)`
|
|
@@ -802,7 +804,7 @@ Exports
|
|
|
802
804
|
Exports
|
|
803
805
|
- `conversationMessageIdentity(turnId, message)`
|
|
804
806
|
- `conversationMessageVersion(message, { includeData = false } = {})`
|
|
805
|
-
- `createConversationChangeover({ state, transcript, agent, identity, presentation = {}, log = () => {}, captureContext = false, applicationMessages = false, maximumInitialMessages = 30, maximumInitialMessageCharacters = Infinity })`
|
|
807
|
+
- `createConversationChangeover({ state, transcript, agent, identity, presentation = {}, log = () => {}, captureContext = false, applicationMessages = false, maximumInitialMessages = 30, maximumInitialMessageCharacters = Infinity, maximumHistoryBytes = Infinity })`
|
|
806
808
|
- `conversationHistoryVersions(history)`
|
|
807
809
|
- `conversationRequestText({ text, origin, data })`
|
|
808
810
|
- `conversationContinuity({ history, briefing = "", maximumCharacters = 128_000 })`
|
|
@@ -1161,6 +1163,7 @@ Exports
|
|
|
1161
1163
|
- `codexCatalogReasoningEfforts`
|
|
1162
1164
|
- `codexCatalogModels`
|
|
1163
1165
|
- `codexConfiguredModelCatalog`
|
|
1166
|
+
- `readCodexModelContextWindow`
|
|
1164
1167
|
- `createCodexAccountReader`
|
|
1165
1168
|
- `createCodexAppServerIsolation`
|
|
1166
1169
|
- `readCodexToolFreeConfiguration`
|
|
@@ -159,7 +159,7 @@ Exports
|
|
|
159
159
|
|
|
160
160
|
### `src/server/registerConversationSubscriptions.js`
|
|
161
161
|
Exports
|
|
162
|
-
- `registerConversationSubscriptions({ realtime, events, actions, config = {}, logger = null, workspaceScopeSupport = null, subscribeActionId = actionIds.conversationSubscribe, requestPolicy = "authenticated" } = {})`
|
|
162
|
+
- `registerConversationSubscriptions({ realtime, events, actions, config = {}, logger = null, workspaceScopeSupport = null, subscribeActionId = actionIds.conversationSubscribe, requestPolicy = "authenticated", diagnostics = false } = {})`
|
|
163
163
|
Local functions
|
|
164
164
|
- `requireSubscriptionId(input)`
|
|
165
165
|
- `subscriptionError(error)`
|
|
@@ -15,7 +15,7 @@ A concrete Fastify, Vue, and JSKIT application foundation for products that do n
|
|
|
15
15
|
|
|
16
16
|
- Id: `app/minimal-foundation`
|
|
17
17
|
- Keywords: `app`, `fastify`, `foundation`, `minimal`, `server`, `vite`, `vue`
|
|
18
|
-
- Owner: `@jskit-ai/agent-docs@0.1.
|
|
18
|
+
- Owner: `@jskit-ai/agent-docs@0.1.222`
|
|
19
19
|
- Read: [PATTERN.md](patterns/app/minimal-foundation/PATTERN.md)
|
|
20
20
|
- Examples: [example/](patterns/app/minimal-foundation/example/)
|
|
21
21
|
- Requires: `@jskit-ai/http-runtime`, `@jskit-ai/kernel`
|
|
@@ -26,7 +26,7 @@ A concrete JSKIT web application foundation with responsive shell navigation, se
|
|
|
26
26
|
|
|
27
27
|
- Id: `app/shell-foundation`
|
|
28
28
|
- Keywords: `app`, `foundation`, `material`, `navigation`, `placements`, `shell`, `vite`, `vue`
|
|
29
|
-
- Owner: `@jskit-ai/agent-docs@0.1.
|
|
29
|
+
- Owner: `@jskit-ai/agent-docs@0.1.222`
|
|
30
30
|
- Read: [PATTERN.md](patterns/app/shell-foundation/PATTERN.md)
|
|
31
31
|
- Examples: [example/](patterns/app/shell-foundation/example/)
|
|
32
32
|
- Requires: `@jskit-ai/http-runtime`, `@jskit-ai/kernel`, `@jskit-ai/shell-web`
|
|
@@ -37,7 +37,7 @@ Configure an assistant runtime for one application surface and expose its chat a
|
|
|
37
37
|
|
|
38
38
|
- Id: `assistant/assistant-surface`
|
|
39
39
|
- Keywords: `ai`, `assistant`, `chat`, `config`, `environment`, `page`, `placement`, `settings`, `surface`
|
|
40
|
-
- Owner: `@jskit-ai/assistant-runtime@0.1.
|
|
40
|
+
- Owner: `@jskit-ai/assistant-runtime@0.1.221`
|
|
41
41
|
- Read: [PATTERN.md](patterns/assistant/assistant-surface/PATTERN.md)
|
|
42
42
|
- Examples: [example/](patterns/assistant/assistant-surface/example/)
|
|
43
43
|
- Requires: `@jskit-ai/assistant-runtime`, `@jskit-ai/connectors-catalog`, `@jskit-ai/connectors-core`, `@jskit-ai/shell-web`
|
|
@@ -323,7 +323,7 @@ Define a server feature through explicit capabilities and first-class actions, a
|
|
|
323
323
|
|
|
324
324
|
- Id: `server/feature-package`
|
|
325
325
|
- Keywords: `actions`, `feature`, `json-rest`, `knex`, `orchestration`, `package`, `provider`, `repository`, `routes`, `server`
|
|
326
|
-
- Owner: `@jskit-ai/agent-docs@0.1.
|
|
326
|
+
- Owner: `@jskit-ai/agent-docs@0.1.222`
|
|
327
327
|
- Read: [PATTERN.md](patterns/server/feature-package/PATTERN.md)
|
|
328
328
|
- Examples: [example/](patterns/server/feature-package/example/)
|
|
329
329
|
- Requires: `@jskit-ai/kernel`
|