@jskit-ai/agent-docs 0.1.376 → 0.1.377
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 +39 -3
- package/guide/agent/app-setup/authentication.md +4 -1
- package/guide/agent/framework/typed-features.md +2 -1
- 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 +15 -1
- package/reference/autogen/tooling/jskit-catalog.md +8 -0
- 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
- package/skills/jskit/references/typed-features.md +2 -1
|
@@ -1552,6 +1552,8 @@ transcript service. All the others are mandatory for `createConversationRuntime(
|
|
|
1552
1552
|
| `writeMetadata(value)` | Replace conversation metadata within this transaction, committing atomically with its turn/message changes. |
|
|
1553
1553
|
| `updateTurnMetadata(turnId, patch)` | Shallow-merge a detached patch into an existing turn's metadata; preserve unrelated keys and reject absent turns. |
|
|
1554
1554
|
| `readTurnsAfter(turnId)` | Detached snapshots of the turns after that turn, oldest first, as `readTurn` returns them; `""` reads every turn. Reject an absent turn. |
|
|
1555
|
+
| `readRevision()` | Optional, with `readChangesAfter`. The conversation's revision: a whole number that each write changing a turn raises by one, a write's own changes included. |
|
|
1556
|
+
| `readChangesAfter(revision)` | Optional, with `readRevision`. `{ revision, turns }`: the revision now and the turns a write changed after `revision` (`-1` is every turn), in `listTurnIds()` order, with their revision stamps (below). With both, a native engine's send reads only what changed since its last delivery; without them, each send reads the whole transcript. |
|
|
1555
1557
|
| `readSummary()` | The API compaction summary `{ text, throughTurnId }` (the last turn it covers), detached, or null. |
|
|
1556
1558
|
| `writeSummary({ text, throughTurnId })` | Replace that summary within this transaction; reject empty text or an absent turn. Messages are never deleted. |
|
|
1557
1559
|
|
|
@@ -1569,6 +1571,17 @@ an in-process promise queue alone does not provide that guarantee.
|
|
|
1569
1571
|
`readConversationLog(scope, { afterTurnId })` reads only the turns after that turn,
|
|
1570
1572
|
through the transaction's `readTurnsAfter`.
|
|
1571
1573
|
|
|
1574
|
+
`createConversationStorage()` keeps the revisions, so the memory, file and
|
|
1575
|
+
assistant-runtime SQL storages have both reads. Its stamps live in the saved
|
|
1576
|
+
record: a message a write adds or changes keeps `transcriptRevision: { added,
|
|
1577
|
+
changed }`, a turn whose metadata it changes keeps `metadata.transcriptRevision`,
|
|
1578
|
+
and the replies `replaceAssistant` drops are kept as `transcriptRemovals` on the
|
|
1579
|
+
reply that stays. An adapter saves them as it saves a message's other fields and a
|
|
1580
|
+
turn's metadata, and `readTurn` returns none of them. A message written to the
|
|
1581
|
+
backing store around the storage, such as a row inserted directly, has no stamps:
|
|
1582
|
+
it counts as written before every delivery, so an engine returning to the
|
|
1583
|
+
conversation is not told of it.
|
|
1584
|
+
|
|
1572
1585
|
The service exposes `readConversationLog`, `readConversationLogPage`,
|
|
1573
1586
|
`conversationMessageIdExists`, `writeConversationUserMessage`,
|
|
1574
1587
|
`writeConversationAssistantMessage`, `writeConversationThinkingMessage`,
|
|
@@ -1600,7 +1613,11 @@ await verifyConversationStorageContract(storage, { runtime: true });
|
|
|
1600
1613
|
Those checks cover scoped isolation, concurrent duplicate writes, stable
|
|
1601
1614
|
ordering, pagination, final replacement, attachments and detached reads, and,
|
|
1602
1615
|
for a transaction that offers `listTurnFacts()`, that its facts agree with
|
|
1603
|
-
`readTurn` for every turn, inside a rolled-back write too when `runtime: true`.
|
|
1616
|
+
`readTurn` for every turn, inside a rolled-back write too when `runtime: true`.
|
|
1617
|
+
With `runtime: true`, a storage that keeps revisions is checked too: a write
|
|
1618
|
+
that changes a turn takes the next revision, one that changes nothing or fails
|
|
1619
|
+
keeps it, inside the write as after it, and `readChangesAfter` returns exactly
|
|
1620
|
+
the changed turns with the stamps saved. An
|
|
1604
1621
|
adapter selected with `runtime: true` also checks all metadata operations, scope
|
|
1605
1622
|
isolation, patch preservation, combined transcript/metadata rollback, reading the
|
|
1606
1623
|
turns after a turn and the saved, scoped and rolled-back compaction summary. Use a
|
|
@@ -1965,7 +1982,23 @@ history. Returning to OpenCode restores only a binding for that integration; an
|
|
|
1965
1982
|
unselected account change still fails its identity guard. Selection never submits
|
|
1966
1983
|
a prompt or replays a retained failed or uncertain request. Before
|
|
1967
1984
|
the next request, JSKIT supplies missed messages, corrections and removed message
|
|
1968
|
-
identities as quoted history. Unchanged messages are not injected again.
|
|
1985
|
+
identities as quoted history. Unchanged messages are not injected again.
|
|
1986
|
+
|
|
1987
|
+
Each engine's delivery record is a cursor, `seenThrough`: the storage revision its
|
|
1988
|
+
last delivery covered, with the versions of its own replies written since. A send
|
|
1989
|
+
reads only the turns changed after it (`readChangesAfter`) and saves one number,
|
|
1990
|
+
so what it reads and writes does not grow with the conversation. A record an
|
|
1991
|
+
earlier release saved, the version of every message delivered, is compared with
|
|
1992
|
+
the whole transcript once, at that engine's next send (the API engine's when the
|
|
1993
|
+
conversation opens), and then becomes a cursor. Two cases are delivered once that
|
|
1994
|
+
the list of versions did not deliver: an edit changed back to its earlier text
|
|
1995
|
+
before the next delivery is sent as a correction, since the cursor sees that the
|
|
1996
|
+
message changed, not that it changed back; and the messages of a turn the
|
|
1997
|
+
application hid (`metadata.runtime.supersededBy`) before a delivery are reported
|
|
1998
|
+
removed again if that turn changes later. A storage without the revision reads,
|
|
1999
|
+
and a bound conversation whose transcript does not offer the changeover's
|
|
2000
|
+
`readChangesAfter`, `readRecentMessages` and `readMessage`, keep the list of
|
|
2001
|
+
versions and read the whole history at each send, as before. All
|
|
1969
2002
|
corrections are included, even outside the recent-history window; if they exceed
|
|
1970
2003
|
`maxContinuityCharacters`, delivery fails with an instruction to renew the context
|
|
1971
2004
|
with a briefing. Nothing is silently dropped. The application remains responsible
|
|
@@ -2380,7 +2413,10 @@ delivery and require receipt inspection before any resend.
|
|
|
2380
2413
|
|
|
2381
2414
|
Saved turns distinguish complete, failed, cancelled and interrupted work. Error
|
|
2382
2415
|
messages are not assistant replies. After restart, accepted work is marked
|
|
2383
|
-
interrupted and is never replayed.
|
|
2416
|
+
interrupted and is never replayed. Opening the conversation finds that work
|
|
2417
|
+
among the turns changed since the last open looked (`openedThrough`, a storage
|
|
2418
|
+
revision, when the storage keeps them), so an open reads every turn only the
|
|
2419
|
+
first time, or always on a storage without revisions. API reservations interrupted before admission
|
|
2384
2420
|
were never dispatched; only another explicit send can start them. Storage failure
|
|
2385
2421
|
retains unsaved output in the current handle and prevents new submissions through
|
|
2386
2422
|
that handle. Repair storage and call `retrySave()` to save the retained result;
|
|
@@ -136,7 +136,10 @@ comes from the proxy, so all clients would share one count. The app's
|
|
|
136
136
|
`@jskit-ai/kernel/server/http`), which names the proxies in front of the
|
|
137
137
|
server. Only those proxies' `X-Forwarded-For` (and `-Host` and `-Proto`) is
|
|
138
138
|
believed, so each client behind them has its own count and a client that sends
|
|
139
|
-
the header itself changes nothing.
|
|
139
|
+
the header itself changes nothing. Plain `jskit check` fails a `server.js` that
|
|
140
|
+
creates Fastify without a `trustProxy` option (`server/trust-proxy`), as an
|
|
141
|
+
application started before this setup does; a `trustProxy` the application sets
|
|
142
|
+
itself is its own choice.
|
|
140
143
|
|
|
141
144
|
- **On mobilynet, nothing needs setting.** mobilynet gives every app it runs
|
|
142
145
|
`MOBILYNET_EDGE_ADDRESSES`: the addresses its edge connects to the app's
|
|
@@ -1384,7 +1384,8 @@ Why: a comment that narrates history is wrong the day after it is written.
|
|
|
1384
1384
|
`npm run lint` runs ESLint with `@jskit-ai/config-eslint`, and `npm run
|
|
1385
1385
|
verify` is the whole suite, each section once: `jskit check` (the package
|
|
1386
1386
|
graph, navigation, [data access](/guide/framework/data-access#exceptions),
|
|
1387
|
-
[test runs](#test-run-rules)
|
|
1387
|
+
[test runs](#test-run-rules), [package manifests](#package-manifest) and the
|
|
1388
|
+
server's [trusted proxies](/guide/app-setup/authentication#sign-in-protection)),
|
|
1388
1389
|
lint, the Node tests (`npm test`), the client tests (`npm run test:client`)
|
|
1389
1390
|
and the browser suite (`npm run test:e2e`), which builds the production
|
|
1390
1391
|
frontend it serves, so no separate build runs. Each section takes its
|
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.377`
|
|
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.377`
|
|
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.2.
|
|
40
|
+
- Owner: `@jskit-ai/assistant-runtime@0.2.111`
|
|
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`
|
|
@@ -367,7 +367,7 @@ Define a server feature through explicit capabilities and first-class actions, a
|
|
|
367
367
|
|
|
368
368
|
- Id: `server/feature-package`
|
|
369
369
|
- Keywords: `actions`, `aggregate`, `feature`, `handle`, `orchestration`, `owns`, `package`, `provider`, `repository`, `routes`, `server`, `table resource`
|
|
370
|
-
- Owner: `@jskit-ai/agent-docs@0.1.
|
|
370
|
+
- Owner: `@jskit-ai/agent-docs@0.1.377`
|
|
371
371
|
- Read: [PATTERN.md](../../skills/jskit/references/patterns/server/feature-package/PATTERN.md)
|
|
372
372
|
- Examples: [example/](../../skills/jskit/references/patterns/server/feature-package/example/)
|
|
373
373
|
- Requires: `@jskit-ai/kernel`
|
|
@@ -1241,6 +1241,8 @@ Exports
|
|
|
1241
1241
|
- `createCompletedResponses({ storage, transcript, events, catalog, isClosed, completedEnvelope, maximumToolCalls })`
|
|
1242
1242
|
- `type ConversationEntry`
|
|
1243
1243
|
- `type CompletedResponses`
|
|
1244
|
+
Local functions
|
|
1245
|
+
- `seenReplyVersion(transaction, runtime, assistantId, current)`
|
|
1244
1246
|
|
|
1245
1247
|
### `src/server/conversation/configuration.js`
|
|
1246
1248
|
Exports
|
|
@@ -1253,10 +1255,13 @@ Exports
|
|
|
1253
1255
|
- `conversationMessageIdentity(turnId, message)`
|
|
1254
1256
|
- `conversationMessageVersion(message, { includeData = false } = {})`
|
|
1255
1257
|
- `createConversationChangeover({ state, transcript, agent, identity, presentation = {}, log = logNothing, captureContext = false, applicationMessages = false, maximumInitialMessages = 30, maximumInitialMessageCharacters = Infinity, maximumHistoryBytes = Infinity })`
|
|
1258
|
+
- `storedConversationHistory(read, shown = () => true)`
|
|
1259
|
+
- `keepsConversationRevisions(transaction)`
|
|
1256
1260
|
- `conversationHistoryVersions(history)`
|
|
1257
1261
|
- `conversationRequestText({ text, origin, data })`
|
|
1258
1262
|
- `conversationContinuity({ history, briefing = "", maximumCharacters = 128_000 })`
|
|
1259
1263
|
- `conversationNativeMessages(history)`
|
|
1264
|
+
- `type ConversationHistoryReader`
|
|
1260
1265
|
Local functions
|
|
1261
1266
|
- `distinctMessages(messages)`
|
|
1262
1267
|
- `logNothing()`
|
|
@@ -1316,6 +1321,7 @@ Exports
|
|
|
1316
1321
|
- `type ConversationReads`
|
|
1317
1322
|
Local functions
|
|
1318
1323
|
- `offersPages(entry)`
|
|
1324
|
+
- `readsChanges(transcript)`
|
|
1319
1325
|
|
|
1320
1326
|
### `src/server/conversation/conversationRefusals.js`
|
|
1321
1327
|
Exports
|
|
@@ -1401,6 +1407,7 @@ Exports
|
|
|
1401
1407
|
- `conversationHistoryVersions`
|
|
1402
1408
|
- `createConversationChangeover`
|
|
1403
1409
|
- `conversationRequestText`
|
|
1410
|
+
- `storedConversationHistory`
|
|
1404
1411
|
- `createMemoryConversationStorage`
|
|
1405
1412
|
- `createConversationStorage`
|
|
1406
1413
|
- `createReentrantConversationStorage`
|
|
@@ -1740,7 +1747,7 @@ Exports
|
|
|
1740
1747
|
- `hasUnfinishedConversationRewind(runtime)`
|
|
1741
1748
|
- `conversationNativeIdentity(segment)`
|
|
1742
1749
|
- `conversationNativeBinding(engine, id)`
|
|
1743
|
-
- `createConversationRuntimeReplacement({ request, engine, configuration, reason, segmentId, continuity, seen, destination })`
|
|
1750
|
+
- `createConversationRuntimeReplacement({ request, engine, configuration, reason, segmentId, continuity, seen, seenThrough, destination })`
|
|
1744
1751
|
- `releaseConversationRuntimeBinding(state, pending, request, engine)`
|
|
1745
1752
|
- `finishConversationRuntimeReplacement(state, { engine, selection, retireNative, pending, value })`
|
|
1746
1753
|
- `createInertCodexConversationBinding({ workdir, configRoot })`
|
|
@@ -1748,6 +1755,8 @@ Exports
|
|
|
1748
1755
|
- `prepareConversationRuntimeCopy(transaction, { at })`
|
|
1749
1756
|
Local functions
|
|
1750
1757
|
- `object(value)`
|
|
1758
|
+
- `badCursor(value)`
|
|
1759
|
+
- `cursorOf(value)`
|
|
1751
1760
|
- `invalid(message)`
|
|
1752
1761
|
- `validateSegment(segment)`
|
|
1753
1762
|
- `nativeIdentityField(engine)`
|
|
@@ -1765,6 +1774,10 @@ Exports
|
|
|
1765
1774
|
Local functions
|
|
1766
1775
|
- `conversationMessageStorageKey({ role, at, messageId } = {})`
|
|
1767
1776
|
- `conversationMessageIndex(record)`
|
|
1777
|
+
- `unstampedMessage(message)`
|
|
1778
|
+
- `turnRevision(turn)`
|
|
1779
|
+
- `recordRevision(record)`
|
|
1780
|
+
- `orderedReplies(turn)`
|
|
1768
1781
|
- `savedTurnFacts(turnId, turn)`
|
|
1769
1782
|
|
|
1770
1783
|
### `src/server/conversation/streams.js`
|
|
@@ -2430,6 +2443,7 @@ Exports
|
|
|
2430
2443
|
- `verifyConversationStorageContract(storage, { runtime = false } = {})`
|
|
2431
2444
|
Local functions
|
|
2432
2445
|
- `turnFactsAndReads(transaction)`
|
|
2446
|
+
- `verifyRevisions(storage, scope)`
|
|
2433
2447
|
|
|
2434
2448
|
### `src/testing/nativeCodex.js`
|
|
2435
2449
|
Exports
|
|
@@ -430,6 +430,14 @@ Local functions
|
|
|
430
430
|
- `findImports(root, packageIds)`
|
|
431
431
|
- `approveInstallScripts(manifest, declared)`
|
|
432
432
|
|
|
433
|
+
### `scripts/server-setup.mjs`
|
|
434
|
+
Exports
|
|
435
|
+
- `checkServerSetup({ projectRoot })`
|
|
436
|
+
- `formatServerSetupReport(result)`
|
|
437
|
+
Local functions
|
|
438
|
+
- `fastifyNames(code)`
|
|
439
|
+
- `fastifyCalls({ code, masked, position })`
|
|
440
|
+
|
|
433
441
|
### `scripts/testing/budget.mjs`
|
|
434
442
|
Exports
|
|
435
443
|
- `BUDGET_VARIABLE`
|
|
@@ -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.377`
|
|
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.377`
|
|
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.2.
|
|
40
|
+
- Owner: `@jskit-ai/assistant-runtime@0.2.111`
|
|
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`
|
|
@@ -367,7 +367,7 @@ Define a server feature through explicit capabilities and first-class actions, a
|
|
|
367
367
|
|
|
368
368
|
- Id: `server/feature-package`
|
|
369
369
|
- Keywords: `actions`, `aggregate`, `feature`, `handle`, `orchestration`, `owns`, `package`, `provider`, `repository`, `routes`, `server`, `table resource`
|
|
370
|
-
- Owner: `@jskit-ai/agent-docs@0.1.
|
|
370
|
+
- Owner: `@jskit-ai/agent-docs@0.1.377`
|
|
371
371
|
- Read: [PATTERN.md](patterns/server/feature-package/PATTERN.md)
|
|
372
372
|
- Examples: [example/](patterns/server/feature-package/example/)
|
|
373
373
|
- Requires: `@jskit-ai/kernel`
|
|
@@ -1379,7 +1379,8 @@ Why: a comment that narrates history is wrong the day after it is written.
|
|
|
1379
1379
|
`npm run lint` runs ESLint with `@jskit-ai/config-eslint`, and `npm run
|
|
1380
1380
|
verify` is the whole suite, each section once: `jskit check` (the package
|
|
1381
1381
|
graph, navigation, [data access](data-access.md#exceptions),
|
|
1382
|
-
[test runs](#test-run-rules)
|
|
1382
|
+
[test runs](#test-run-rules), [package manifests](#package-manifest) and the
|
|
1383
|
+
server's [trusted proxies](/guide/app-setup/authentication#sign-in-protection)),
|
|
1383
1384
|
lint, the Node tests (`npm test`), the client tests (`npm run test:client`)
|
|
1384
1385
|
and the browser suite (`npm run test:e2e`), which builds the production
|
|
1385
1386
|
frontend it serves, so no separate build runs. Each section takes its
|