@jskit-ai/agent-docs 0.1.165 → 0.1.167
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 +176 -6
- package/guide/agent/app-extras/assistant.md +93 -9
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/example/package.json +4 -4
- package/patterns/shell-foundation/example/package.json +5 -5
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/reference/autogen/PATTERN_INDEX.md +36 -36
- package/reference/autogen/packages/assistant-core.md +134 -5
- package/reference/autogen/packages/assistant-runtime.md +8 -4
- package/skills/jskit/references/pattern-index.md +36 -36
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +5 -5
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
- package/skills/jskit/references/patterns/assistant/assistant-surface/PATTERN.md +24 -4
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/config/server.js +1 -1
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/integrations.json +17 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/src/ApplicationAiFeature.js +20 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +2 -2
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +1 -1
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +1 -1
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +3 -3
|
@@ -16,7 +16,7 @@ Both integrations render the same `AssistantConversationElement`. Choose one tra
|
|
|
16
16
|
|
|
17
17
|
| JSKIT owns | The application supplies |
|
|
18
18
|
| --- | --- |
|
|
19
|
-
| Bubbles, rich text, reasoning groups, long-message expansion, scroll following, composer, delivery controls | Conversation selection, labels, loading/errors, current draft and action implementations |
|
|
19
|
+
| Bubbles, rich text, reasoning groups, long-message expansion, scroll following, composer, delivery controls, working status, suggestions, model and goal controls, file and question UI | Conversation selection, labels, loading/errors, current draft and action implementations |
|
|
20
20
|
| Turn grouping, message deduplication, final-answer replacement and history pagination | Storage adapter, authorized scope, transaction/locking implementation, retention, migrations and attachment bytes |
|
|
21
21
|
| Codex JSON-RPC and notification classification, detached-turn completion/recovery, OpenCode HTTP/SSE | Provider process/connection, account credentials, execution environment, permissions, tools, model policy and reconnect ownership |
|
|
22
22
|
| Display of supplied configuration and optional editing controls | Authoritative configuration, permitted changes and server validation |
|
|
@@ -33,7 +33,7 @@ import { AssistantConversationElement } from "@jskit-ai/assistant-core/client/co
|
|
|
33
33
|
|
|
34
34
|
const adapter = reactive({
|
|
35
35
|
conversation: {
|
|
36
|
-
turns, visible: true, loading, error, scrollKey: conversationId,
|
|
36
|
+
turns, working, visible: true, loading, error, scrollKey: conversationId,
|
|
37
37
|
assistantLabel: "Assistant", hasMoreBefore, loadingMore, loadMoreError
|
|
38
38
|
},
|
|
39
39
|
composer: {
|
|
@@ -56,7 +56,7 @@ composer is present, and `stop` when `canStop` can become true.
|
|
|
56
56
|
| Action | Arguments and responsibility |
|
|
57
57
|
| --- | --- |
|
|
58
58
|
| `setDraft(text)` | Update the application draft synchronously. |
|
|
59
|
-
| `submit({ configuration })` | Send or steer through the app's normal admission, attachment and delivery path. Own pending state, accepted-draft clearing and visible failures. The element checks `canSend` before calling. |
|
|
59
|
+
| `submit({ configuration, attachments })` | Send or steer through the app's normal admission, attachment and delivery path. Own pending state, accepted-draft clearing and visible failures. The element checks `canSend` before calling. |
|
|
60
60
|
| `stop()` | Request cancellation through the backend owner. Report pending state, errors, and what actually stopped; the element checks stop availability. |
|
|
61
61
|
| `loadMore({ complete })` | Prepend older turns, then call `complete({ changed })` after updating reactive state. Call it on failures too; this releases the scroll anchor. |
|
|
62
62
|
| `reload()` | Refresh authoritative history. |
|
|
@@ -89,6 +89,18 @@ updates and pagination. The UI never uses provider-internal turn IDs to decide
|
|
|
89
89
|
application ownership. An optimistic turn can carry
|
|
90
90
|
`optimistic: { id, status: "failed", error }`.
|
|
91
91
|
|
|
92
|
+
Reasoning is grouped by adjacency in the displayed message sequence, across
|
|
93
|
+
storage rows. A user message, commentary, answer or system message separates
|
|
94
|
+
groups. Provider turn and conversation IDs do not define progress groups.
|
|
95
|
+
This also groups older saved history without rewriting it.
|
|
96
|
+
|
|
97
|
+
Supply `conversation.working` from the application's current execution state,
|
|
98
|
+
including assistant-only continuation. While working, the trailing reasoning
|
|
99
|
+
group previews its latest two summaries (`progressPreviewLimit` changes this).
|
|
100
|
+
Other groups start collapsed. Explicit expansion survives new summaries and
|
|
101
|
+
history loading; changing `scrollKey` resets it. When `working` is omitted, the
|
|
102
|
+
element uses `composer.canStop` or a turn's `pending` for existing adapters.
|
|
103
|
+
|
|
92
104
|
For an existing flat history, import `conversationTurnsFromMessages` from
|
|
93
105
|
`@jskit-ai/assistant-core/shared/conversation`. It groups ordered messages,
|
|
94
106
|
retains application fields, converts `progressUpdates` into reasoning, and
|
|
@@ -121,7 +133,8 @@ Other slots:
|
|
|
121
133
|
| `attachments` | `{ items, message }`; app-owned downloads/previews and access checks |
|
|
122
134
|
| `message-actions` | `{ message, turn }`; integration approvals, SQL actions or other app behavior |
|
|
123
135
|
| `system-message` | `{ message }`; status/repair actions |
|
|
124
|
-
| `
|
|
136
|
+
| `activity` | `{ activity }`; replace the working indicator; accessible status text stays available |
|
|
137
|
+
| `hints` | `{ adapter }`; replace the entire support row, including default working status and suggestions |
|
|
125
138
|
| `composer` | `{ adapter }`; replace the composer while keeping the shared transcript |
|
|
126
139
|
| `input-start`, `composer-tools` | `{ adapter }`; app-owned input adornments and tools |
|
|
127
140
|
| `composer-feedback` | `{ adapter }`; action feedback after Send/Stop, wrapping below the controls in a narrow pane |
|
|
@@ -147,6 +160,163 @@ and an `attachments` slot; it never uploads or deletes files. Its exposed method
|
|
|
147
160
|
are `focus()`, `preserveHeightForNextModelValue()` and `queueResizeTextarea()`;
|
|
148
161
|
`inputElement` exposes the textarea for app-owned editing operations.
|
|
149
162
|
|
|
163
|
+
## Optional shared capabilities
|
|
164
|
+
|
|
165
|
+
All capabilities below are optional. Omit their adapter field to leave them off.
|
|
166
|
+
They work in the aggregate element and as separately exported components; Vibe64
|
|
167
|
+
uses the same components with its native transport and project policy.
|
|
168
|
+
Configuration UI never grants backend permissions.
|
|
169
|
+
|
|
170
|
+
### Working status and suggestions
|
|
171
|
+
|
|
172
|
+
The default support row immediately shows “Assistant is working…” when
|
|
173
|
+
`conversation.working` is true (or the fallback above), “Sending to assistant…” during
|
|
174
|
+
admission, and “Stopping…” while `stopPending`. Supply
|
|
175
|
+
`adapter.activity = { label, animated: true }` to choose the text, or use the
|
|
176
|
+
`activity` slot to replace its visual content. An empty label suppresses it.
|
|
177
|
+
`AssistantComposerSupport` is the standalone presentation component. It keeps
|
|
178
|
+
its status row stable and honors reduced-motion preferences.
|
|
179
|
+
|
|
180
|
+
```js
|
|
181
|
+
import { useAssistantSuggestions } from "@jskit-ai/assistant-core/client/conversation-suggestions";
|
|
182
|
+
const suggestions = reactive(useAssistantSuggestions({
|
|
183
|
+
active: () => !busy.value,
|
|
184
|
+
requestKey: () => conversationId.value,
|
|
185
|
+
draft,
|
|
186
|
+
configuration: () => ({ integrationId: "suggestions", style: suggestionStyle.value }),
|
|
187
|
+
generate: ({ draft, configuration, signal }) => app.suggest({ draft, configuration, signal }),
|
|
188
|
+
onSelect: prompt => { draft.value = prompt; },
|
|
189
|
+
debounceMs: 750
|
|
190
|
+
}));
|
|
191
|
+
adapter.suggestions = suggestions;
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
`generate` returns `[{ label, prompt }]`; count is application-defined. It may
|
|
195
|
+
use a different agent, model, prompt and tools from chat. Configuration must be
|
|
196
|
+
JSON-compatible and contain no secrets. The server authorizes and validates it.
|
|
197
|
+
Changing scope, draft, configuration or eligibility aborts and invalidates old
|
|
198
|
+
requests. Disposal cancels requests; late results are ignored. `items`, `loading`,
|
|
199
|
+
`preview`, `visible`, `error`, and `composerFocused` are reactive. `focus`, `blur`,
|
|
200
|
+
`previewSuggestion`, `select`, and `dismiss` drive the shared interaction.
|
|
201
|
+
Selection edits the draft; submission remains explicit. The standalone example
|
|
202
|
+
includes a separate suggestion integration and server prompt.
|
|
203
|
+
|
|
204
|
+
### Models and application configuration
|
|
205
|
+
|
|
206
|
+
Use `adapter.models` for `AssistantModelControl`:
|
|
207
|
+
|
|
208
|
+
```js
|
|
209
|
+
{
|
|
210
|
+
enabled: true,
|
|
211
|
+
providerRows: [{ id: "application", label: "Application AI" }],
|
|
212
|
+
modelProviderId: "application",
|
|
213
|
+
modelRows: [{ id: "quick", label: "Quick answers" }], modelId: "quick",
|
|
214
|
+
variantRows: [], variantId: "", // optional thinking/effort choices
|
|
215
|
+
selectionSummary: "Quick answers", buttonTitle: "Choose AI",
|
|
216
|
+
changesDisabled: false, saving: false, canSave: true,
|
|
217
|
+
catalogLoading: false, catalogError: "",
|
|
218
|
+
selectProvider(id), selectModel(id), selectVariant(id), apply(), reload()
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Selections edit application draft configuration. `apply()` saves it and closes
|
|
223
|
+
the chooser unless it resolves `false`. The app handles errors and sets `saving`
|
|
224
|
+
and `changesDisabled`. More than six model choices get searchable selection.
|
|
225
|
+
The standalone component additionally provides `before-choices`, `model-note`,
|
|
226
|
+
`provider-controls`, and `footer` slots for account-specific controls. The
|
|
227
|
+
aggregate's `configurationMode` applies to its separate custom configuration
|
|
228
|
+
fields; disable or omit `models` independently when supplying fixed agent settings.
|
|
229
|
+
|
|
230
|
+
### Goals
|
|
231
|
+
|
|
232
|
+
`adapter.goal` uses this contract:
|
|
233
|
+
|
|
234
|
+
```js
|
|
235
|
+
{
|
|
236
|
+
enabled: true, pending: false, error: "",
|
|
237
|
+
goal: { objective: "Finish the report", status: "active",
|
|
238
|
+
elapsedSeconds: 120, sampledAt: Date.now() },
|
|
239
|
+
set({ objective, tokenBudget }), pause(), resume()
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
`goal` is null before creation. `set` receives an optional positive integer token
|
|
244
|
+
budget only when supplied by the user. Callbacks update authoritative state and
|
|
245
|
+
surface failures in `error`; return `false` on unsuccessful creation. The shared
|
|
246
|
+
`AssistantGoalControl` owns the form and presentation, not a scheduler or goal
|
|
247
|
+
storage. Supported statuses are `active`, `paused`, `blocked`, `usageLimited`,
|
|
248
|
+
`budgetLimited`, and `complete`. The UI offers creation only without an unfinished
|
|
249
|
+
goal and offers Pause/Resume only for their applicable statuses.
|
|
250
|
+
|
|
251
|
+
An active goal flashes red; a paused goal stays orange. `elapsedSeconds` is the
|
|
252
|
+
accumulated **active running time**, and `sampledAt` is its sample time in epoch
|
|
253
|
+
**milliseconds**. The UI adds time only while active. Omit elapsed time if the
|
|
254
|
+
backend cannot supply it truthfully. The clock hides in a narrow conversation
|
|
255
|
+
pane; the light stays visible and details retain the time. Reduced motion uses
|
|
256
|
+
a steady red light. Pausing prevents future automatic turns and does not interrupt
|
|
257
|
+
the current turn; Stop is separate. Omit `goal` or use `enabled: false` for agents
|
|
258
|
+
without goals, including OpenCode.
|
|
259
|
+
|
|
260
|
+
### Files
|
|
261
|
+
|
|
262
|
+
```js
|
|
263
|
+
import { useAssistantAttachments } from "@jskit-ai/assistant-core/client/conversation-attachments";
|
|
264
|
+
adapter.attachments = reactive(useAssistantAttachments({
|
|
265
|
+
sessionId: () => uploadScope.value,
|
|
266
|
+
maxBytes: 100_000_000, maxItems: 10, uploadConcurrency: 2,
|
|
267
|
+
uploadAttachment: (scope, file, { signal, onProgress }) => app.upload(scope, file, { signal, onProgress }),
|
|
268
|
+
deleteAttachment: (scope, attachmentId) => app.deleteUpload(scope, attachmentId)
|
|
269
|
+
}));
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
`sessionId` is an opaque application upload scope, such as a conversation or
|
|
273
|
+
session identifier. It does not require Vibe64. The application owns routes,
|
|
274
|
+
authentication, storage, limits, inspection, retention and provider file access.
|
|
275
|
+
An upload returns `{ attachmentId, fileName, size }` with optional `reference` and
|
|
276
|
+
application fields. Progress reports use `{ loaded, total }`. The controller
|
|
277
|
+
owns queueing, concurrent uploads, cancellation, retries, stale-response cleanup,
|
|
278
|
+
drag/drop/paste and scope disposal. `queueItems`, `attachments`, `canSubmit`,
|
|
279
|
+
`canAddFiles`, `dragActive`, and `status` feed the aggregate. Uploads block Send
|
|
280
|
+
until resolved; typing stays available. The UI defaults to ten files and 100 MB
|
|
281
|
+
per file; the server must enforce its own limits.
|
|
282
|
+
|
|
283
|
+
After acknowledged delivery, call
|
|
284
|
+
`clearAttachments({ accepted: true, attachmentIds })` with that submission's
|
|
285
|
+
IDs. It removes only those queue entries and preserves accepted files. To abandon
|
|
286
|
+
uploads, use `accepted: false`. Scope changes/disposal abandon unsent uploads;
|
|
287
|
+
the app's deletion endpoint must preserve files already accepted by a message,
|
|
288
|
+
including when a browser loses the acknowledgement. Never infer acceptance from
|
|
289
|
+
an HTTP request merely starting.
|
|
290
|
+
|
|
291
|
+
The shared `AssistantAttachmentQueue`, `AssistantMessageAttachments` and
|
|
292
|
+
`AssistantAttachmentPreview` provide queue, sent-file list and preview UI.
|
|
293
|
+
Set `adapter.attachments.open(receipt)` for queue preview. Sent-file rendering
|
|
294
|
+
is available by default; use the `attachments` slot with
|
|
295
|
+
`AssistantMessageAttachments :preview-enabled="true" @preview="openFile"`
|
|
296
|
+
to enable your authorized download flow. `AssistantAttachmentPreview` receives
|
|
297
|
+
`attachment`, an authorized `downloadUrl`, optional image `previewUrl`, and emits
|
|
298
|
+
`close`. It never invents URLs or grants access to a path. A favourite-files
|
|
299
|
+
picker, screenshot producer or project file browser remains an application tool.
|
|
300
|
+
|
|
301
|
+
### Questions
|
|
302
|
+
|
|
303
|
+
`AssistantQuestionInputs` renders numbered question fields and suggested-answer
|
|
304
|
+
chips. Pass `questions`, optional `selectItems` keyed by question name, `choices`,
|
|
305
|
+
`v-model:answers`, and `v-model:choice`; handle `dismiss`. Questions contain
|
|
306
|
+
`{ name, number, label, choices }`; choices use `{ value, label, selectLabel }`.
|
|
307
|
+
The aggregate accepts the same fields under `adapter.questions`, with
|
|
308
|
+
`setAnswers`, `setChoice`, and `dismiss` callbacks. Existing question parsers and
|
|
309
|
+
submission formatters are exported from `/shared/conversation`. The app decides
|
|
310
|
+
which message is awaiting a reply and submits answers through its normal action.
|
|
311
|
+
|
|
312
|
+
### Incremental answers
|
|
313
|
+
|
|
314
|
+
Replace the same message's `text` as chunks arrive, keeping its identity stable
|
|
315
|
+
and the turn pending until completion. The shared renderer follows new output
|
|
316
|
+
only when the user is already following the latest message; it preserves typing,
|
|
317
|
+
selection and a reader's position in older history. Final text replaces the
|
|
318
|
+
provisional answer. The ready-made runtime performs this mapping automatically.
|
|
319
|
+
|
|
150
320
|
## Backend storage contract
|
|
151
321
|
|
|
152
322
|
```js
|
|
@@ -231,7 +401,7 @@ multi-process writes, failed commits and attachment cleanup.
|
|
|
231
401
|
|
|
232
402
|
## Provider contract
|
|
233
403
|
|
|
234
|
-
API-model apps can use `createAiClient` and the
|
|
404
|
+
API-model apps can use `createAiConnectionClient` with an authorized AI integration resolver (see [Assistant](./assistant.md)), or `createAiClient` for existing environment-based configurations, and the tool-catalog helpers
|
|
235
405
|
from `@jskit-ai/assistant-core/server`, or the complete assistant runtime.
|
|
236
406
|
Native-agent hosts can import:
|
|
237
407
|
|
|
@@ -289,7 +459,7 @@ changes, including switching away and back to the same retained conversation.
|
|
|
289
459
|
The published package contains `examples/conversation`, a standalone Vue app
|
|
290
460
|
with a Node backend and no editor dependency. Copy it as an application template
|
|
291
461
|
or use the component directly. It runs without credentials using a labelled demo
|
|
292
|
-
provider;
|
|
462
|
+
provider; an explicit integration configuration enables real AI inference.
|
|
293
463
|
Its backend validates configuration independently of the UI and accepts a
|
|
294
464
|
replacement storage module. See its README for commands and scope limits.
|
|
295
465
|
|
|
@@ -27,8 +27,9 @@ Choose:
|
|
|
27
27
|
- provider and model policy;
|
|
28
28
|
- whether the assistant begins disabled until credentials exist.
|
|
29
29
|
|
|
30
|
-
The application
|
|
31
|
-
|
|
30
|
+
The application selects an AI integration ID in server configuration. Credentials
|
|
31
|
+
come from that integration's authorized shared or per-user account. Existing
|
|
32
|
+
environment-prefix configurations remain supported.
|
|
32
33
|
|
|
33
34
|
## Composition
|
|
34
35
|
|
|
@@ -41,6 +42,85 @@ Workspace scope is valid only when both the runtime and its settings surface
|
|
|
41
42
|
are workspace-aware. Requests must retain the selected workspace through the
|
|
42
43
|
server action boundary.
|
|
43
44
|
|
|
45
|
+
## AI integration: the short setup path
|
|
46
|
+
|
|
47
|
+
1. Configure an `ai` integration using JSKIT's existing integration editor or
|
|
48
|
+
portable `integrations.json`. Its provider/model, account mode and credential
|
|
49
|
+
reference have one owner: the AI integration.
|
|
50
|
+
2. Publish a server capability named `integrations.ai` whose value is
|
|
51
|
+
`createAiConnectionResolver({ configuration, authorize, resolveReference })`
|
|
52
|
+
from `@jskit-ai/connectors-catalog/server/ai`. `authorize` derives the trusted
|
|
53
|
+
`{ applicationId, subjectId }` from the authenticated request. Use the normal
|
|
54
|
+
environment reference resolver for shared keys and your account resolver for
|
|
55
|
+
per-user keys. Never return credentials to the browser.
|
|
56
|
+
3. Select it in server config:
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
assistantServer: {
|
|
60
|
+
admin: { aiIntegrationId: "assistant", aiIntegrationIds: ["quick", "detailed"] }
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`aiIntegrationId` is the default. `aiIntegrationIds` is an optional allowlist for
|
|
65
|
+
user selection. For a fixed agent, omit that list and hide its model control.
|
|
66
|
+
For selection, pass allowed `{ id, label }` choices to the client. Client values
|
|
67
|
+
never extend the server allowlist. Resolution runs for each request, so account
|
|
68
|
+
isolation, key rotation and disconnect remain the existing resolver's job.
|
|
69
|
+
|
|
70
|
+
The runtime uses `createAiConnectionClient` from `@jskit-ai/assistant-core/server`
|
|
71
|
+
with the authorized resolver result. JSKIT installs the direct-provider SDK
|
|
72
|
+
adapters and preserves their actual protocols, including Responses, Messages,
|
|
73
|
+
Chat Completions and generateContent. It does not run an OpenCode/Codex coding
|
|
74
|
+
subscription, dynamically install packages, or fall back to a paid model.
|
|
75
|
+
The ordinary action-tool loop stays the runtime's owner; the SDK does not execute
|
|
76
|
+
application tools. Provider availability and account entitlement still come from
|
|
77
|
+
the provider. Existing `aiConfigPrefix` environment configuration is supported
|
|
78
|
+
when no integration is selected; that path rejects client integration overrides.
|
|
79
|
+
|
|
80
|
+
The `assistant/assistant-surface` pattern includes a concrete AI capability and
|
|
81
|
+
integration file. The published `assistant-core/examples/conversation` template
|
|
82
|
+
also uses this connection path, with an offline demo mode for local exploration.
|
|
83
|
+
|
|
84
|
+
### Optional files, suggestions and goals
|
|
85
|
+
|
|
86
|
+
The surface accepts `attachments`, `suggestions`, `goal` and `activity` using the
|
|
87
|
+
[shared capability contracts](./assistant-conversation.md#optional-shared-capabilities).
|
|
88
|
+
The `activity` slot replaces the working visual. Goals are off by default: API
|
|
89
|
+
model providers have no native goal scheduler. Supply one only when your backend
|
|
90
|
+
actually supports it. Suggestions use an independent app-authorized generator;
|
|
91
|
+
selecting a chat model does not silently change the suggestion agent.
|
|
92
|
+
|
|
93
|
+
For files, supply the shared upload controller to `attachments` and a server
|
|
94
|
+
capability named `assistant.attachments`:
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
{
|
|
98
|
+
async resolve({ attachmentIds, context, workspace, conversation }) {
|
|
99
|
+
// Authenticate every ID for this actor and conversation, then read bytes.
|
|
100
|
+
return {
|
|
101
|
+
attachments: [{ attachmentId, fileName, size }], // safe transcript receipts
|
|
102
|
+
content: [{ type: "text", text: extractedText }]
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`content` contains AI SDK user-content parts: text, image bytes with `mediaType`,
|
|
109
|
+
or file bytes with `mediaType` and optional `filename`. The selected model must
|
|
110
|
+
support those inputs. Use authorized bytes rather than user-supplied remote
|
|
111
|
+
URLs. This feature requires the AI integration client; legacy environment model
|
|
112
|
+
clients reject attachments explicitly. Up to ten IDs are accepted per message.
|
|
113
|
+
Current and historical attachment IDs are resolved again on each request.
|
|
114
|
+
Access denial prevents model invocation. The runtime stores only safe receipts
|
|
115
|
+
in message metadata and restores them with history. Upload/download/delete routes,
|
|
116
|
+
bytes, ownership and retention belong to the app. Preserve accepted files when
|
|
117
|
+
an upload-cleanup request arrives after a lost acknowledgement.
|
|
118
|
+
|
|
119
|
+
The client clears only acknowledged attachment IDs, after the server's `meta`
|
|
120
|
+
event. It retains failed uploads and permits typing while uploads are pending.
|
|
121
|
+
Supply the controller with an upload scope that changes with user, workspace and
|
|
122
|
+
conversation ownership. The server must enforce those boundaries independently.
|
|
123
|
+
|
|
44
124
|
## Action tools
|
|
45
125
|
|
|
46
126
|
The assistant reads automation-capable actions from `runtime.actions`. It keeps
|
|
@@ -196,10 +276,12 @@ lookup before discovery-mode execution.
|
|
|
196
276
|
|
|
197
277
|
## Conversation lifecycle
|
|
198
278
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
279
|
+
The client receives answer text incrementally and shows working status before
|
|
280
|
+
text arrives. Tool calls produce timeline events. Internal reasoning tags and raw
|
|
281
|
+
tool arguments do not become visible answer text. A tool/recovery round replaces
|
|
282
|
+
its provisional answer; only the completed answer is persisted. Progress-only
|
|
283
|
+
responses such as “Let me query…” may appear provisionally while streaming but
|
|
284
|
+
are retried internally and never stored or replayed as final chat history.
|
|
203
285
|
|
|
204
286
|
The runtime permits up to 16 bounded tool rounds so catalog search, contract
|
|
205
287
|
lookup, and execution can complete in one turn. If ordinary tool-failure
|
|
@@ -291,9 +373,11 @@ Typing during a restore is retained.
|
|
|
291
373
|
|
|
292
374
|
`surfaceId` selects an existing configured assistant surface. The presentation
|
|
293
375
|
props are `layout` (`page` or `compact`), `assistantLabel`, `welcomeMessage`,
|
|
294
|
-
`placeholder`, and `showToolActivity`.
|
|
295
|
-
application's
|
|
296
|
-
|
|
376
|
+
`placeholder`, and `showToolActivity`. System-prompt settings remain on the
|
|
377
|
+
application's settings route. Optional `connections` and `v-model:integration-id`
|
|
378
|
+
show the shared model chooser; `configuration-mode` is `editable`, `readonly`,
|
|
379
|
+
or `hidden`. Each connection is a safe `{ id, label }` entry, never credentials.
|
|
380
|
+
The server independently validates each selected integration ID.
|
|
297
381
|
|
|
298
382
|
Conversation selection, Refresh, Start new conversation and loading older
|
|
299
383
|
conversations are available through the Conversations dialog at every width.
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@local/main": "0.1.0",
|
|
36
36
|
"@fastify/static": "^10.1.3",
|
|
37
|
-
"@jskit-ai/kernel": "0.1.
|
|
37
|
+
"@jskit-ai/kernel": "0.1.195",
|
|
38
38
|
"@tanstack/vue-query": "^5.101.0",
|
|
39
39
|
"fastify": "^5.8.5",
|
|
40
40
|
"json-rest-schema": "^1.0.17",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"vue": "^3.5.38",
|
|
43
43
|
"vue-router": "^5.1.0",
|
|
44
44
|
"vuetify": "^4.1.2",
|
|
45
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
45
|
+
"@jskit-ai/http-runtime": "0.1.193",
|
|
46
46
|
"@fastify/fast-json-stringify-compiler": "^5.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@jskit-ai/config-eslint": "0.1.
|
|
50
|
-
"@jskit-ai/jskit-catalog": "0.1.
|
|
49
|
+
"@jskit-ai/config-eslint": "0.1.192",
|
|
50
|
+
"@jskit-ai/jskit-catalog": "0.1.220",
|
|
51
51
|
"@playwright/test": "1.61.1",
|
|
52
52
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
53
53
|
"eslint": "^10.8.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@local/main": "0.1.0",
|
|
36
36
|
"@fastify/static": "^10.1.3",
|
|
37
|
-
"@jskit-ai/kernel": "0.1.
|
|
37
|
+
"@jskit-ai/kernel": "0.1.195",
|
|
38
38
|
"@tanstack/vue-query": "^5.101.0",
|
|
39
39
|
"fastify": "^5.8.5",
|
|
40
40
|
"json-rest-schema": "^1.0.17",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"vue": "^3.5.38",
|
|
43
43
|
"vue-router": "^5.1.0",
|
|
44
44
|
"vuetify": "^4.1.2",
|
|
45
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
45
|
+
"@jskit-ai/http-runtime": "0.1.193",
|
|
46
46
|
"@mdi/js": "^7.4.47",
|
|
47
|
-
"@jskit-ai/shell-web": "0.1.
|
|
47
|
+
"@jskit-ai/shell-web": "0.1.199",
|
|
48
48
|
"@fastify/fast-json-stringify-compiler": "^5.1.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@jskit-ai/config-eslint": "0.1.
|
|
52
|
-
"@jskit-ai/jskit-catalog": "0.1.
|
|
51
|
+
"@jskit-ai/config-eslint": "0.1.192",
|
|
52
|
+
"@jskit-ai/jskit-catalog": "0.1.220",
|
|
53
53
|
"@playwright/test": "1.61.1",
|
|
54
54
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
55
55
|
"eslint": "^10.8.0",
|