@happyvertical/smrt-chat 0.53.2 → 0.53.4

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.
@@ -74,6 +74,9 @@ export { default as AssistantComposer } from './components/assistant/AssistantCo
74
74
  export { default as AssistantDock } from './components/assistant/AssistantDock.svelte';
75
75
  export { default as AssistantThreadList } from './components/assistant/AssistantThreadList.svelte';
76
76
  export { ASSISTANT_CHOICE_MAX_OPTIONS, ASSISTANT_CHOICE_TOOL_PREFIX, AssistantChoices, choiceToolName, createAssistantChoiceSourceRegistry, normalizeChoiceOptions, safeChoiceImageUrl, } from './components/assistant/assistant-choices.svelte.js';
77
+ // HTTP client half of `@happyvertical/smrt-chat/sveltekit`'s
78
+ // `mountAssistantRoutes` (#3368).
79
+ export { AssistantHttpError, createAssistantHttpActionClient, createAssistantHttpTransport, } from './components/assistant/assistant-http-client.js';
77
80
  export { createInMemoryAssistantTransport, createSmrtAssistantTransport, readAssistantTurnResult, } from './components/assistant/assistant-transport.js';
78
81
  export { ASSISTANT_PROPOSE_ACTION_TOOL, declareClientTools, defaultClientToolPolicy, resolveClientToolPolicy, } from './components/assistant/client-tools.js';
79
82
  export { ASSISTANT_ACTION_UNKNOWN_OUTCOME_REASONS, createAssistantDockController, } from './components/assistant/create-assistant-dock-controller.svelte.js';
@@ -0,0 +1,270 @@
1
+ /**
2
+ * Mountable SvelteKit routes for the AssistantDock (#3368).
3
+ *
4
+ * One call serves everything the dock's HTTP transport
5
+ * (`createAssistantHttpTransport` / `createSmrtAssistantTransport`) and HTTP
6
+ * action client (`createAssistantHttpActionClient`) call:
7
+ *
8
+ * ```ts
9
+ * // src/routes/api/assistant/[...path]/+server.ts
10
+ * import { mountAssistantRoutes } from '@happyvertical/smrt-chat/sveltekit';
11
+ * import { getAssistantAI } from '$lib/server/ai';
12
+ * export const { GET, POST } = mountAssistantRoutes({ ai: getAssistantAI });
13
+ * ```
14
+ *
15
+ * GET threads member-scoped thread list
16
+ * POST threads { title } → { thread }
17
+ * GET threads/:id/messages member-scoped, chronological
18
+ * POST threads/:id/messages { content, clientRequestId, ... } → SSE turn
19
+ * POST threads/:id/resume { continuationId, results, ... } → SSE turn
20
+ * POST attachments multipart `file` (host storage only)
21
+ * POST actions/preview | actions/apply DataSurfaceActionWireRequest → { result }
22
+ *
23
+ * Trust boundary: the principal comes from SvelteKit `event.locals` (as
24
+ * populated by `createSessionHandler` from `@happyvertical/smrt-users/sveltekit`)
25
+ * or an injected resolver — never from a header, hostname or request body.
26
+ * Every actor gets ONE assistant `AgentSession` per tenant (keyed, so it never
27
+ * reuses another feature's session); threads are readable and writable only
28
+ * when they live in that session's room. Reads never create anything. Model
29
+ * tools run under `executeAsPrincipal` (inside `runToolLoop`) with a
30
+ * fail-closed allow-list: no `allowedTools` means no tools.
31
+ *
32
+ * Server-only: imports no Svelte or browser code.
33
+ *
34
+ * @packageDocumentation
35
+ */
36
+ import './__smrt-register__.js';
37
+ import type { AIInterface } from '@happyvertical/ai';
38
+ import type { PrincipalAuditSink, PrincipalTool } from '@happyvertical/smrt-agents';
39
+ import type { DataSurfaceActionAdapter } from '@happyvertical/smrt-agents/server';
40
+ import type { SmrtClassOptions } from '@happyvertical/smrt-core';
41
+ import { type AssistantContinuationStore, type AssistantTurnErrorLogger, type AuthoredToolReply } from './assistant-turn.js';
42
+ import type { AgentSession } from './models/AgentSession.js';
43
+ import type { ChatMessage } from './models/ChatMessage.js';
44
+ import type { ChatThread } from './models/ChatThread.js';
45
+ import { type ManifestTool, type ToolInvocation, type ToolLoopUsage } from './tool-loop.js';
46
+ /** The slice of a SvelteKit `RequestEvent` these handlers read. */
47
+ export interface AssistantRouteEvent {
48
+ request: Request;
49
+ url: URL;
50
+ params?: Partial<Record<string, string>>;
51
+ locals?: unknown;
52
+ }
53
+ /** A SvelteKit `+server.ts` handler with no `@sveltejs/kit` dependency. */
54
+ export type AssistantRouteHandler = (event: AssistantRouteEvent) => Promise<Response>;
55
+ /** The authenticated caller, resolved server-side. */
56
+ export interface AssistantPrincipal {
57
+ /** The user whose live permissions bound every tool call (`runAsUserId`). */
58
+ userId: string;
59
+ /** The user's Profile: the chat actor that owns the assistant session. */
60
+ profileId: string;
61
+ /** The active, session-authorized tenant. */
62
+ tenantId: string;
63
+ /** Optional permission snapshot; omitted resolves live permissions. */
64
+ permissions?: string[];
65
+ }
66
+ /**
67
+ * Resolves the caller. Return `null` for an unauthenticated request (401);
68
+ * throw {@link AssistantRouteError} for any other refusal.
69
+ */
70
+ export type AssistantPrincipalResolver = (event: AssistantRouteEvent) => AssistantPrincipal | null | undefined | Promise<AssistantPrincipal | null | undefined>;
71
+ /** What every per-request option callback receives. */
72
+ export interface AssistantRequestContext {
73
+ event: AssistantRouteEvent;
74
+ principal: AssistantPrincipal;
75
+ }
76
+ /** A value, or a per-request callback producing it. */
77
+ export type AssistantRouteValue<T> = T | ((context: AssistantRequestContext) => T | Promise<T>);
78
+ /** A stored attachment, as the host's storage reports it. */
79
+ export interface AssistantAttachmentRecord {
80
+ id: string;
81
+ name: string;
82
+ contentType: string;
83
+ size: number;
84
+ url?: string;
85
+ }
86
+ /**
87
+ * Host-owned attachment storage. Without it, uploads and sends with
88
+ * attachments are refused: the chat package stores no files.
89
+ */
90
+ export interface AssistantAttachmentStorage {
91
+ /** Store an upload for the principal and describe it. */
92
+ upload(file: File, context: AssistantRequestContext): Promise<AssistantAttachmentRecord>;
93
+ /**
94
+ * Check that the references a send names belong to the principal and
95
+ * return the records to store on the message, or `null` to refuse. The
96
+ * references are request input: never trust their `url`/`size` as given.
97
+ */
98
+ verify(references: unknown[], context: AssistantRequestContext): Promise<AssistantAttachmentRecord[] | null>;
99
+ /** Largest accepted upload, bytes. Default 10 MiB. */
100
+ maxBytes?: number;
101
+ }
102
+ /** The two adapter calls the action routes make. */
103
+ export type AssistantActionAdapter = Pick<DataSurfaceActionAdapter, 'preview' | 'apply'>;
104
+ /** Selectable model, the same shape the dock's `ModelPicker` uses. */
105
+ export interface AssistantRouteModel {
106
+ id: string;
107
+ label?: string;
108
+ }
109
+ /** Options for {@link mountAssistantRoutes}. */
110
+ export interface MountAssistantRoutesOptions {
111
+ /**
112
+ * The AI client, or a factory called once per turn. Required: these routes
113
+ * never read provider credentials from the environment. A factory that
114
+ * throws answers 503 before anything is written.
115
+ */
116
+ ai: AIInterface | ((context: AssistantRequestContext & {
117
+ model?: string;
118
+ }) => AIInterface | Promise<AIInterface>);
119
+ /** Database for chat persistence and the principal run. */
120
+ db?: SmrtClassOptions['db'];
121
+ /** Default: {@link resolveAssistantPrincipalFromLocals}. */
122
+ resolvePrincipal?: AssistantPrincipalResolver;
123
+ /** The assistant's agent id (its `bot` profile slug). Default `smrt-assistant`. */
124
+ agentId?: string;
125
+ systemPrompt?: AssistantRouteValue<string | undefined>;
126
+ /**
127
+ * Server tool allow-list, fail-closed: absent or empty offers NO tools.
128
+ * Gates `extraTools`, `tools` and the data-surface action adapter.
129
+ */
130
+ allowedTools?: AssistantRouteValue<readonly string[]>;
131
+ /** Server tools (e.g. `createDataSurfaceTools()`), narrowed by `allowedTools`. */
132
+ extraTools?: AssistantRouteValue<readonly PrincipalTool[]>;
133
+ /** Manifest tools (`buildManifestToolCatalog`), narrowed by `allowedTools`. */
134
+ tools?: AssistantRouteValue<readonly ManifestTool[]>;
135
+ /**
136
+ * Browser tools the page may declare (exact names or `prefix*`). Empty
137
+ * (the default) admits none.
138
+ */
139
+ clientToolAllowList?: readonly string[];
140
+ /**
141
+ * Where suspended turns wait. Default: the actor's assistant session
142
+ * context (`createSessionContinuationStore`), re-read before every write.
143
+ * A shared store must keep keys private to the session it is given.
144
+ */
145
+ continuations?: (context: AssistantRequestContext & {
146
+ session: AgentSession;
147
+ }) => AssistantContinuationStore;
148
+ /** When set, a requested model must be listed; otherwise it is ignored. */
149
+ models?: readonly AssistantRouteModel[];
150
+ /** Model used when the request names none. */
151
+ defaultModel?: string;
152
+ maxSteps?: number;
153
+ maxTurnTokens?: number;
154
+ maxTurnMs?: number;
155
+ maxTokens?: number;
156
+ temperature?: number;
157
+ /** Earlier messages sent with a new turn. Default 20. */
158
+ historyLimit?: number;
159
+ /**
160
+ * A stored send with no reply and no recorded outcome (e.g. its process
161
+ * died) counts as failed after this long. Default 15 minutes.
162
+ */
163
+ abandonedTurnMs?: number;
164
+ describeTool?: (name: string, args?: Record<string, unknown>) => string;
165
+ /**
166
+ * Persist a server tool invocation into the thread (default: none). Its
167
+ * tool name must be on `allowedTools`, which is mirrored onto the session.
168
+ */
169
+ authorInvocation?: (invocation: ToolInvocation) => AuthoredToolReply | null;
170
+ onUsage?: (usage: ToolLoopUsage, context: AssistantRequestContext) => void;
171
+ audit?: PrincipalAuditSink;
172
+ postgresRls?: boolean;
173
+ /** Host attachment storage; absent refuses attachments. */
174
+ attachments?: AssistantAttachmentStorage;
175
+ /** Data-surface action adapter; absent answers the action routes 404. */
176
+ actions?: {
177
+ adapter: AssistantRouteValue<AssistantActionAdapter>;
178
+ };
179
+ /**
180
+ * Refuse mutating requests whose `Origin` (or `Sec-Fetch-Site`/`Referer`)
181
+ * is not this origin. Default `true`.
182
+ */
183
+ checkOrigin?: boolean;
184
+ /** Extra origins accepted by the origin check (e.g. behind a proxy). */
185
+ trustedOrigins?: readonly string[];
186
+ /** Largest JSON body, bytes. Default 1 MiB. */
187
+ maxBodyBytes?: number;
188
+ /** Longest user message, characters. Default 12,000. */
189
+ maxContentLength?: number;
190
+ /** SSE keep-alive interval. */
191
+ heartbeatMs?: number;
192
+ /** Server-side log for failures withheld from the browser. */
193
+ onError?: AssistantTurnErrorLogger;
194
+ /** Rest parameter name of the mounting route. Default `path`. */
195
+ paramName?: string;
196
+ /** Used when the route has no rest parameter: the prefix to strip. */
197
+ basePath?: string;
198
+ }
199
+ /** The handlers {@link mountAssistantRoutes} returns. */
200
+ export interface AssistantRoutes {
201
+ GET: AssistantRouteHandler;
202
+ POST: AssistantRouteHandler;
203
+ /** Method-agnostic entry point (GET and POST both delegate here). */
204
+ handle: AssistantRouteHandler;
205
+ }
206
+ /** A refusal with an HTTP status and a stable, user-safe code. */
207
+ export declare class AssistantRouteError extends Error {
208
+ readonly status: number;
209
+ readonly code: string;
210
+ constructor(status: number, code: string, message: string);
211
+ }
212
+ /** Thread summary as the routes send it. */
213
+ export interface AssistantThreadWire {
214
+ id: string;
215
+ title: string;
216
+ isResolved: boolean;
217
+ messageCount: number;
218
+ lastMessageAt: string | null;
219
+ }
220
+ /** Message as the routes send it (chronological in lists). */
221
+ export interface AssistantMessageWire {
222
+ id: string;
223
+ threadId: string;
224
+ content: string;
225
+ role: 'user' | 'assistant' | 'system' | 'tool';
226
+ createdAt: string;
227
+ attachments?: AssistantAttachmentRecord[];
228
+ toolCallData?: Record<string, unknown>;
229
+ clientRequestId?: string;
230
+ }
231
+ /**
232
+ * JSON answer to a send whose `clientRequestId` is already stored for this
233
+ * thread and actor. `outcome`: `completed` (a reply follows), `cancelled`
234
+ * (stopped, no reply), or `in_progress` (still running, or waiting on
235
+ * browser tools). A failed or abandoned turn answers 409 `turn_failed`.
236
+ */
237
+ export interface AssistantDuplicateSendWire {
238
+ duplicate: true;
239
+ inProgress: boolean;
240
+ outcome: 'completed' | 'cancelled' | 'in_progress';
241
+ userMessage: AssistantMessageWire;
242
+ assistantMessage?: AssistantMessageWire;
243
+ messages: AssistantMessageWire[];
244
+ }
245
+ /** Default assistant agent id. */
246
+ export declare const DEFAULT_ASSISTANT_AGENT_ID = "smrt-assistant";
247
+ /** Session key isolating the dock's session from other uses of the agent id. */
248
+ export declare const ASSISTANT_DOCK_SESSION_KEY = "assistant-dock";
249
+ /** Default JSON body cap. */
250
+ export declare const DEFAULT_ASSISTANT_MAX_BODY_BYTES: number;
251
+ /** Default attachment cap. */
252
+ export declare const DEFAULT_ASSISTANT_MAX_ATTACHMENT_BYTES: number;
253
+ /** Default age after which an unanswered, unsettled send counts as failed. */
254
+ export declare const DEFAULT_ASSISTANT_ABANDONED_TURN_MS: number;
255
+ /**
256
+ * The default principal resolver: SvelteKit `event.locals` as populated by
257
+ * `createSessionHandler` (`user`, `tenantId`). No user → `null` (401); a user
258
+ * without a Profile or an active tenant is refused with 403.
259
+ */
260
+ export declare function resolveAssistantPrincipalFromLocals(locals: unknown): AssistantPrincipal | null;
261
+ /** Map a persisted thread to the wire. */
262
+ export declare function toAssistantThreadWire(thread: ChatThread): AssistantThreadWire;
263
+ /** Map a persisted message to the wire. */
264
+ export declare function toAssistantMessageWire(message: ChatMessage): AssistantMessageWire;
265
+ /**
266
+ * Build the AssistantDock's server routes for one SvelteKit rest route
267
+ * (e.g. `src/routes/api/assistant/[...path]/+server.ts`).
268
+ */
269
+ export declare function mountAssistantRoutes(options: MountAssistantRoutesOptions): AssistantRoutes;
270
+ //# sourceMappingURL=sveltekit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sveltekit.d.ts","sourceRoot":"","sources":["../src/sveltekit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAE7B,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAQzD,OAAO,EAIL,KAAK,YAAY,EAEjB,KAAK,cAAc,EACnB,KA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