@agentskit/chat-protocol 0.1.0
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/LICENSE +22 -0
- package/README.md +16 -0
- package/dist/fixtures.cjs +384 -0
- package/dist/fixtures.d.cts +884 -0
- package/dist/fixtures.d.ts +884 -0
- package/dist/fixtures.js +346 -0
- package/dist/index.cjs +902 -0
- package/dist/index.d.cts +697 -0
- package/dist/index.d.ts +697 -0
- package/dist/index.js +809 -0
- package/package.json +54 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,697 @@
|
|
|
1
|
+
import { Message, TokenUsage, MemoryRecord } from '@agentskit/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const ASK_EVENT_MAX_BYTES = 1048576;
|
|
5
|
+
declare const ASK_EVENT_MAX_RECORDS = 4096;
|
|
6
|
+
declare const ASK_SERVICE_PROTOCOL_VERSION: 1;
|
|
7
|
+
declare const AskEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8
|
+
type: z.ZodLiteral<"text">;
|
|
9
|
+
delta: z.ZodString;
|
|
10
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
11
|
+
type: z.ZodLiteral<"tool">;
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
15
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
16
|
+
type: z.ZodLiteral<"done">;
|
|
17
|
+
model: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<"error">;
|
|
20
|
+
message: z.ZodString;
|
|
21
|
+
}, z.core.$strict>], "type">;
|
|
22
|
+
type AskEvent = z.infer<typeof AskEventSchema>;
|
|
23
|
+
type AskToolEvent = Extract<AskEvent, {
|
|
24
|
+
readonly type: 'tool';
|
|
25
|
+
}>;
|
|
26
|
+
interface AskEventDecodeResult {
|
|
27
|
+
readonly events: readonly AskEvent[];
|
|
28
|
+
readonly rest: string;
|
|
29
|
+
readonly discardedPartial: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Decodes bounded complete v1 Ask NDJSON records and retains one bounded partial line. */
|
|
32
|
+
declare function decodeAskEvents(buffer: string): AskEventDecodeResult;
|
|
33
|
+
|
|
34
|
+
declare const DETERMINISTIC_SITE_PROTOCOL: "agentskit.chat.site";
|
|
35
|
+
declare const DETERMINISTIC_SITE_PROTOCOL_VERSION: 1;
|
|
36
|
+
declare const DETERMINISTIC_KNOWLEDGE_PROTOCOL: "agentskit.chat.knowledge";
|
|
37
|
+
declare const DETERMINISTIC_KNOWLEDGE_PROTOCOL_VERSION: 1;
|
|
38
|
+
declare const ANSWER_PROTOCOL: "agentskit.chat.answer";
|
|
39
|
+
declare const ANSWER_PROTOCOL_VERSION: 1;
|
|
40
|
+
declare const DETERMINISTIC_ARTIFACT_MAX_BYTES = 524288;
|
|
41
|
+
declare const DETERMINISTIC_ARTIFACT_MAX_ENTRIES = 1024;
|
|
42
|
+
declare const DETERMINISTIC_MATCH_MAX_VALUES = 16;
|
|
43
|
+
declare const DETERMINISTIC_QUERY_MAX_CHARS = 512;
|
|
44
|
+
declare const ANSWER_MAX_CITATIONS = 8;
|
|
45
|
+
declare const ANSWER_MAX_SUGGESTIONS = 8;
|
|
46
|
+
/** The canonical equality rule used by artifact producers and deterministic clients. */
|
|
47
|
+
declare const normalizeKnowledgeKey: (value: string) => string;
|
|
48
|
+
declare const DeterministicSiteConfigSchema: z.ZodReadonly<z.ZodObject<{
|
|
49
|
+
protocol: z.ZodLiteral<"agentskit.chat.site">;
|
|
50
|
+
version: z.ZodLiteral<1>;
|
|
51
|
+
siteId: z.ZodString;
|
|
52
|
+
artifact: z.ZodReadonly<z.ZodObject<{
|
|
53
|
+
href: z.ZodString;
|
|
54
|
+
contentHash: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
fallback: z.ZodReadonly<z.ZodObject<{
|
|
57
|
+
mode: z.ZodEnum<{
|
|
58
|
+
backend: "backend";
|
|
59
|
+
disabled: "disabled";
|
|
60
|
+
}>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
declare const AnswerCitationSchema: z.ZodReadonly<z.ZodObject<{
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
title: z.ZodString;
|
|
66
|
+
href: z.ZodString;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
declare const DeterministicKnowledgeEntrySchema: z.ZodReadonly<z.ZodObject<{
|
|
69
|
+
id: z.ZodString;
|
|
70
|
+
kind: z.ZodEnum<{
|
|
71
|
+
command: "command";
|
|
72
|
+
package: "package";
|
|
73
|
+
navigation: "navigation";
|
|
74
|
+
contribution: "contribution";
|
|
75
|
+
ecosystem: "ecosystem";
|
|
76
|
+
"restricted-faq": "restricted-faq";
|
|
77
|
+
document: "document";
|
|
78
|
+
}>;
|
|
79
|
+
label: z.ZodString;
|
|
80
|
+
match: z.ZodReadonly<z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<"exact">;
|
|
82
|
+
values: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
answer: z.ZodReadonly<z.ZodObject<{
|
|
85
|
+
markdown: z.ZodString;
|
|
86
|
+
citations: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
title: z.ZodString;
|
|
89
|
+
href: z.ZodString;
|
|
90
|
+
}, z.core.$strip>>>>;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
declare const LocalKnowledgeArtifactSchema: z.ZodReadonly<z.ZodObject<{
|
|
94
|
+
protocol: z.ZodLiteral<"agentskit.chat.knowledge">;
|
|
95
|
+
version: z.ZodLiteral<1>;
|
|
96
|
+
artifactId: z.ZodString;
|
|
97
|
+
siteId: z.ZodString;
|
|
98
|
+
contentHash: z.ZodString;
|
|
99
|
+
generatedAt: z.ZodString;
|
|
100
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
101
|
+
entries: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
102
|
+
id: z.ZodString;
|
|
103
|
+
kind: z.ZodEnum<{
|
|
104
|
+
command: "command";
|
|
105
|
+
package: "package";
|
|
106
|
+
navigation: "navigation";
|
|
107
|
+
contribution: "contribution";
|
|
108
|
+
ecosystem: "ecosystem";
|
|
109
|
+
"restricted-faq": "restricted-faq";
|
|
110
|
+
document: "document";
|
|
111
|
+
}>;
|
|
112
|
+
label: z.ZodString;
|
|
113
|
+
match: z.ZodReadonly<z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"exact">;
|
|
115
|
+
values: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
answer: z.ZodReadonly<z.ZodObject<{
|
|
118
|
+
markdown: z.ZodString;
|
|
119
|
+
citations: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
title: z.ZodString;
|
|
122
|
+
href: z.ZodString;
|
|
123
|
+
}, z.core.$strip>>>>;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
}, z.core.$strip>>>>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
declare const AnswerConfidenceSchema: z.ZodReadonly<z.ZodObject<{
|
|
128
|
+
level: z.ZodEnum<{
|
|
129
|
+
high: "high";
|
|
130
|
+
medium: "medium";
|
|
131
|
+
low: "low";
|
|
132
|
+
}>;
|
|
133
|
+
basis: z.ZodEnum<{
|
|
134
|
+
exact: "exact";
|
|
135
|
+
backend: "backend";
|
|
136
|
+
ambiguous: "ambiguous";
|
|
137
|
+
miss: "miss";
|
|
138
|
+
stale: "stale";
|
|
139
|
+
corrupt: "corrupt";
|
|
140
|
+
offline: "offline";
|
|
141
|
+
}>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
declare const AnswerSuggestionSchema: z.ZodReadonly<z.ZodObject<{
|
|
144
|
+
id: z.ZodString;
|
|
145
|
+
label: z.ZodString;
|
|
146
|
+
value: z.ZodString;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
declare const AnswerResponseSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
149
|
+
protocol: z.ZodLiteral<"agentskit.chat.answer">;
|
|
150
|
+
version: z.ZodLiteral<1>;
|
|
151
|
+
outcome: z.ZodLiteral<"answer">;
|
|
152
|
+
query: z.ZodString;
|
|
153
|
+
normalizedQuery: z.ZodString;
|
|
154
|
+
answer: z.ZodReadonly<z.ZodObject<{
|
|
155
|
+
markdown: z.ZodString;
|
|
156
|
+
citations: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
title: z.ZodString;
|
|
159
|
+
href: z.ZodString;
|
|
160
|
+
}, z.core.$strip>>>>;
|
|
161
|
+
}, z.core.$strip>>;
|
|
162
|
+
provenance: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
163
|
+
source: z.ZodLiteral<"local">;
|
|
164
|
+
artifactId: z.ZodString;
|
|
165
|
+
contentHash: z.ZodString;
|
|
166
|
+
entryIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
167
|
+
}, z.core.$strip>>, z.ZodReadonly<z.ZodObject<{
|
|
168
|
+
source: z.ZodLiteral<"backend">;
|
|
169
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
170
|
+
model: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, z.core.$strip>>]>;
|
|
172
|
+
confidence: z.ZodReadonly<z.ZodObject<{
|
|
173
|
+
level: z.ZodEnum<{
|
|
174
|
+
high: "high";
|
|
175
|
+
medium: "medium";
|
|
176
|
+
low: "low";
|
|
177
|
+
}>;
|
|
178
|
+
basis: z.ZodEnum<{
|
|
179
|
+
exact: "exact";
|
|
180
|
+
backend: "backend";
|
|
181
|
+
ambiguous: "ambiguous";
|
|
182
|
+
miss: "miss";
|
|
183
|
+
stale: "stale";
|
|
184
|
+
corrupt: "corrupt";
|
|
185
|
+
offline: "offline";
|
|
186
|
+
}>;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
}, z.core.$strip>>, z.ZodReadonly<z.ZodObject<{
|
|
189
|
+
protocol: z.ZodLiteral<"agentskit.chat.answer">;
|
|
190
|
+
version: z.ZodLiteral<1>;
|
|
191
|
+
outcome: z.ZodLiteral<"choices">;
|
|
192
|
+
query: z.ZodString;
|
|
193
|
+
normalizedQuery: z.ZodString;
|
|
194
|
+
message: z.ZodString;
|
|
195
|
+
suggestions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
196
|
+
id: z.ZodString;
|
|
197
|
+
label: z.ZodString;
|
|
198
|
+
value: z.ZodString;
|
|
199
|
+
}, z.core.$strip>>>>;
|
|
200
|
+
provenance: z.ZodReadonly<z.ZodObject<{
|
|
201
|
+
source: z.ZodLiteral<"local">;
|
|
202
|
+
artifactId: z.ZodString;
|
|
203
|
+
contentHash: z.ZodString;
|
|
204
|
+
entryIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
205
|
+
}, z.core.$strip>>;
|
|
206
|
+
confidence: z.ZodReadonly<z.ZodObject<{
|
|
207
|
+
level: z.ZodEnum<{
|
|
208
|
+
high: "high";
|
|
209
|
+
medium: "medium";
|
|
210
|
+
low: "low";
|
|
211
|
+
}>;
|
|
212
|
+
basis: z.ZodEnum<{
|
|
213
|
+
exact: "exact";
|
|
214
|
+
backend: "backend";
|
|
215
|
+
ambiguous: "ambiguous";
|
|
216
|
+
miss: "miss";
|
|
217
|
+
stale: "stale";
|
|
218
|
+
corrupt: "corrupt";
|
|
219
|
+
offline: "offline";
|
|
220
|
+
}>;
|
|
221
|
+
}, z.core.$strip>>;
|
|
222
|
+
}, z.core.$strip>>, z.ZodReadonly<z.ZodObject<{
|
|
223
|
+
protocol: z.ZodLiteral<"agentskit.chat.answer">;
|
|
224
|
+
version: z.ZodLiteral<1>;
|
|
225
|
+
outcome: z.ZodLiteral<"escalation">;
|
|
226
|
+
query: z.ZodString;
|
|
227
|
+
normalizedQuery: z.ZodString;
|
|
228
|
+
message: z.ZodString;
|
|
229
|
+
reason: z.ZodEnum<{
|
|
230
|
+
miss: "miss";
|
|
231
|
+
stale: "stale";
|
|
232
|
+
corrupt: "corrupt";
|
|
233
|
+
offline: "offline";
|
|
234
|
+
}>;
|
|
235
|
+
candidateEntryIds: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
236
|
+
confidence: z.ZodReadonly<z.ZodObject<{
|
|
237
|
+
level: z.ZodEnum<{
|
|
238
|
+
high: "high";
|
|
239
|
+
medium: "medium";
|
|
240
|
+
low: "low";
|
|
241
|
+
}>;
|
|
242
|
+
basis: z.ZodEnum<{
|
|
243
|
+
exact: "exact";
|
|
244
|
+
backend: "backend";
|
|
245
|
+
ambiguous: "ambiguous";
|
|
246
|
+
miss: "miss";
|
|
247
|
+
stale: "stale";
|
|
248
|
+
corrupt: "corrupt";
|
|
249
|
+
offline: "offline";
|
|
250
|
+
}>;
|
|
251
|
+
}, z.core.$strip>>;
|
|
252
|
+
}, z.core.$strip>>], "outcome">;
|
|
253
|
+
type DeterministicSiteConfig = z.infer<typeof DeterministicSiteConfigSchema>;
|
|
254
|
+
type DeterministicKnowledgeEntry = z.infer<typeof DeterministicKnowledgeEntrySchema>;
|
|
255
|
+
type LocalKnowledgeArtifact = z.infer<typeof LocalKnowledgeArtifactSchema>;
|
|
256
|
+
type AnswerCitation = z.infer<typeof AnswerCitationSchema>;
|
|
257
|
+
type AnswerResponse = z.infer<typeof AnswerResponseSchema>;
|
|
258
|
+
type DeterministicDecodeCode = 'DETERMINISTIC_INVALID_PAYLOAD' | 'DETERMINISTIC_UNSUPPORTED_VERSION' | 'DETERMINISTIC_LIMIT_EXCEEDED' | 'DETERMINISTIC_HASH_MISMATCH';
|
|
259
|
+
type DeterministicDecodeResult<T> = {
|
|
260
|
+
readonly ok: true;
|
|
261
|
+
readonly value: T;
|
|
262
|
+
} | {
|
|
263
|
+
readonly ok: false;
|
|
264
|
+
readonly diagnostic: {
|
|
265
|
+
readonly code: DeterministicDecodeCode;
|
|
266
|
+
readonly message: string;
|
|
267
|
+
readonly retryable: false;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
declare const decodeDeterministicSiteConfig: (input: unknown) => DeterministicDecodeResult<DeterministicSiteConfig>;
|
|
271
|
+
interface DecodeLocalKnowledgeArtifactOptions {
|
|
272
|
+
readonly expectedContentHash?: string;
|
|
273
|
+
readonly expectedSiteId?: string;
|
|
274
|
+
}
|
|
275
|
+
declare const decodeLocalKnowledgeArtifact: (input: unknown, options?: DecodeLocalKnowledgeArtifactOptions) => DeterministicDecodeResult<LocalKnowledgeArtifact>;
|
|
276
|
+
declare const verifiedArtifact: unique symbol;
|
|
277
|
+
type VerifiedLocalKnowledgeArtifact = LocalKnowledgeArtifact & {
|
|
278
|
+
readonly [verifiedArtifact]: true;
|
|
279
|
+
};
|
|
280
|
+
type LocalKnowledgeArtifactHashInput = Omit<LocalKnowledgeArtifact, 'contentHash'> & {
|
|
281
|
+
readonly contentHash?: string;
|
|
282
|
+
};
|
|
283
|
+
/** Serializes the accepted v1 fields in a fixed order; contentHash is excluded to avoid self-reference. */
|
|
284
|
+
declare const canonicalizeLocalKnowledgeArtifact: (artifact: LocalKnowledgeArtifactHashInput) => string;
|
|
285
|
+
declare const computeLocalKnowledgeArtifactContentHash: (artifactInput: LocalKnowledgeArtifactHashInput) => Promise<string>;
|
|
286
|
+
interface VerifyLocalKnowledgeArtifactOptions extends DecodeLocalKnowledgeArtifactOptions {
|
|
287
|
+
readonly expectedContentHash: string;
|
|
288
|
+
readonly expectedSiteId: string;
|
|
289
|
+
}
|
|
290
|
+
declare const verifyLocalKnowledgeArtifactSync: (input: unknown, options: VerifyLocalKnowledgeArtifactOptions) => DeterministicDecodeResult<VerifiedLocalKnowledgeArtifact>;
|
|
291
|
+
/** Validates bounds/schema/site and verifies both trusted and self-declared SHA-256 values. */
|
|
292
|
+
declare const verifyLocalKnowledgeArtifact: (input: unknown, options: VerifyLocalKnowledgeArtifactOptions) => Promise<DeterministicDecodeResult<VerifiedLocalKnowledgeArtifact>>;
|
|
293
|
+
declare const decodeAnswerResponse: (input: unknown) => DeterministicDecodeResult<AnswerResponse>;
|
|
294
|
+
|
|
295
|
+
declare const TURN_PROTOCOL: "agentskit.chat.turn";
|
|
296
|
+
declare const TURN_PROTOCOL_VERSION: 1;
|
|
297
|
+
declare const COMPONENT_PROTOCOL: "agentskit.chat.component";
|
|
298
|
+
declare const COMPONENT_PROTOCOL_VERSION: 1;
|
|
299
|
+
declare const ASSISTANT_CONTENT_PROTOCOL: "agentskit.chat.content";
|
|
300
|
+
declare const ASSISTANT_CONTENT_PROTOCOL_VERSION: 1;
|
|
301
|
+
declare const ASSISTANT_CONTENT_PREFIX: "\u001Eagentskit.chat.content/1\n";
|
|
302
|
+
declare const ASSISTANT_CONTENT_MAX_BYTES = 262144;
|
|
303
|
+
declare const ASSISTANT_CONTENT_MAX_RECORDS = 512;
|
|
304
|
+
declare const ComponentKeySchema: z.ZodString;
|
|
305
|
+
declare const ComponentFallbackSchema: z.ZodReadonly<z.ZodObject<{
|
|
306
|
+
kind: z.ZodString;
|
|
307
|
+
summary: z.ZodString;
|
|
308
|
+
}, z.core.$strip>>;
|
|
309
|
+
declare const ComponentRenderFrameSchema: z.ZodReadonly<z.ZodObject<{
|
|
310
|
+
protocol: z.ZodLiteral<"agentskit.chat.component">;
|
|
311
|
+
version: z.ZodLiteral<1>;
|
|
312
|
+
type: z.ZodLiteral<"render">;
|
|
313
|
+
componentKey: z.ZodString;
|
|
314
|
+
instanceId: z.ZodString;
|
|
315
|
+
props: z.ZodUnknown;
|
|
316
|
+
fallback: z.ZodReadonly<z.ZodObject<{
|
|
317
|
+
kind: z.ZodString;
|
|
318
|
+
summary: z.ZodString;
|
|
319
|
+
}, z.core.$strip>>;
|
|
320
|
+
}, z.core.$strip>>;
|
|
321
|
+
declare const ComponentSelectionEventSchema: z.ZodReadonly<z.ZodObject<{
|
|
322
|
+
protocol: z.ZodLiteral<"agentskit.chat.component">;
|
|
323
|
+
version: z.ZodLiteral<1>;
|
|
324
|
+
type: z.ZodLiteral<"select">;
|
|
325
|
+
componentKey: z.ZodString;
|
|
326
|
+
instanceId: z.ZodString;
|
|
327
|
+
choiceId: z.ZodString;
|
|
328
|
+
}, z.core.$strip>>;
|
|
329
|
+
declare const ComponentInteractionEventSchema: z.ZodReadonly<z.ZodObject<{
|
|
330
|
+
protocol: z.ZodLiteral<"agentskit.chat.component">;
|
|
331
|
+
version: z.ZodLiteral<1>;
|
|
332
|
+
type: z.ZodLiteral<"interact">;
|
|
333
|
+
componentKey: z.ZodString;
|
|
334
|
+
instanceId: z.ZodString;
|
|
335
|
+
event: z.ZodString;
|
|
336
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
337
|
+
}, z.core.$strip>>;
|
|
338
|
+
type ComponentFallback = z.infer<typeof ComponentFallbackSchema>;
|
|
339
|
+
type ComponentRenderFrame = z.infer<typeof ComponentRenderFrameSchema>;
|
|
340
|
+
type ComponentSelectionEvent = z.infer<typeof ComponentSelectionEventSchema>;
|
|
341
|
+
type ComponentInteractionEvent = z.infer<typeof ComponentInteractionEventSchema>;
|
|
342
|
+
declare const AssistantTextPartSchema: z.ZodReadonly<z.ZodObject<{
|
|
343
|
+
kind: z.ZodLiteral<"text">;
|
|
344
|
+
text: z.ZodString;
|
|
345
|
+
}, z.core.$strip>>;
|
|
346
|
+
declare const AssistantComponentPartSchema: z.ZodReadonly<z.ZodObject<{
|
|
347
|
+
kind: z.ZodLiteral<"component">;
|
|
348
|
+
frame: z.ZodReadonly<z.ZodObject<{
|
|
349
|
+
protocol: z.ZodLiteral<"agentskit.chat.component">;
|
|
350
|
+
version: z.ZodLiteral<1>;
|
|
351
|
+
type: z.ZodLiteral<"render">;
|
|
352
|
+
componentKey: z.ZodString;
|
|
353
|
+
instanceId: z.ZodString;
|
|
354
|
+
props: z.ZodUnknown;
|
|
355
|
+
fallback: z.ZodReadonly<z.ZodObject<{
|
|
356
|
+
kind: z.ZodString;
|
|
357
|
+
summary: z.ZodString;
|
|
358
|
+
}, z.core.$strip>>;
|
|
359
|
+
}, z.core.$strip>>;
|
|
360
|
+
}, z.core.$strip>>;
|
|
361
|
+
declare const AssistantContentPartSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
|
|
362
|
+
kind: z.ZodLiteral<"text">;
|
|
363
|
+
text: z.ZodString;
|
|
364
|
+
}, z.core.$strip>>, z.ZodReadonly<z.ZodObject<{
|
|
365
|
+
kind: z.ZodLiteral<"component">;
|
|
366
|
+
frame: z.ZodReadonly<z.ZodObject<{
|
|
367
|
+
protocol: z.ZodLiteral<"agentskit.chat.component">;
|
|
368
|
+
version: z.ZodLiteral<1>;
|
|
369
|
+
type: z.ZodLiteral<"render">;
|
|
370
|
+
componentKey: z.ZodString;
|
|
371
|
+
instanceId: z.ZodString;
|
|
372
|
+
props: z.ZodUnknown;
|
|
373
|
+
fallback: z.ZodReadonly<z.ZodObject<{
|
|
374
|
+
kind: z.ZodString;
|
|
375
|
+
summary: z.ZodString;
|
|
376
|
+
}, z.core.$strip>>;
|
|
377
|
+
}, z.core.$strip>>;
|
|
378
|
+
}, z.core.$strip>>], "kind">;
|
|
379
|
+
type AssistantTextPart = z.infer<typeof AssistantTextPartSchema>;
|
|
380
|
+
type AssistantComponentPart = z.infer<typeof AssistantComponentPartSchema>;
|
|
381
|
+
type AssistantContentPart = z.infer<typeof AssistantContentPartSchema>;
|
|
382
|
+
interface AssistantContentEncoder {
|
|
383
|
+
readonly encode: (part: AssistantContentPart) => string;
|
|
384
|
+
}
|
|
385
|
+
declare const createAssistantContentEncoder: () => AssistantContentEncoder;
|
|
386
|
+
type AssistantContentDecodeCode = 'ASSISTANT_CONTENT_UNSUPPORTED_VERSION' | 'ASSISTANT_CONTENT_INVALID_RECORD' | 'ASSISTANT_CONTENT_LIMIT_EXCEEDED';
|
|
387
|
+
type DecodeAssistantContentResult = {
|
|
388
|
+
readonly ok: true;
|
|
389
|
+
readonly parts: readonly AssistantContentPart[];
|
|
390
|
+
readonly complete: boolean;
|
|
391
|
+
} | {
|
|
392
|
+
readonly ok: false;
|
|
393
|
+
readonly diagnostic: {
|
|
394
|
+
readonly code: AssistantContentDecodeCode;
|
|
395
|
+
readonly message: string;
|
|
396
|
+
readonly retryable: false;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
declare const isAssistantContentCandidate: (input: unknown) => input is string;
|
|
400
|
+
declare const decodeAssistantContent: (input: unknown) => DecodeAssistantContentResult;
|
|
401
|
+
type ComponentDecodeCode = 'COMPONENT_UNSUPPORTED_VERSION' | 'COMPONENT_UNKNOWN_TYPE' | 'COMPONENT_INVALID_FRAME';
|
|
402
|
+
type DecodeComponentFrameResult = {
|
|
403
|
+
readonly ok: true;
|
|
404
|
+
readonly frame: ComponentRenderFrame;
|
|
405
|
+
} | {
|
|
406
|
+
readonly ok: false;
|
|
407
|
+
readonly diagnostic: {
|
|
408
|
+
readonly code: ComponentDecodeCode;
|
|
409
|
+
readonly message: string;
|
|
410
|
+
readonly retryable: false;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
declare const decodeComponentFrame: (input: unknown) => DecodeComponentFrameResult;
|
|
414
|
+
declare const isComponentFrameCandidate: (input: unknown) => boolean;
|
|
415
|
+
declare const createSelectionEvent: (frame: ComponentRenderFrame, choiceId: string) => ComponentSelectionEvent;
|
|
416
|
+
declare const createInteractionEvent: (frame: ComponentRenderFrame, event: string, value?: unknown) => ComponentInteractionEvent;
|
|
417
|
+
declare const TokenUsageSchema: z.ZodObject<{
|
|
418
|
+
promptTokens: z.ZodNumber;
|
|
419
|
+
completionTokens: z.ZodNumber;
|
|
420
|
+
totalTokens: z.ZodNumber;
|
|
421
|
+
}, z.core.$strip>;
|
|
422
|
+
declare const TurnDiagnosticSchema: z.ZodObject<{
|
|
423
|
+
version: z.ZodLiteral<1>;
|
|
424
|
+
code: z.ZodString;
|
|
425
|
+
message: z.ZodString;
|
|
426
|
+
retryable: z.ZodBoolean;
|
|
427
|
+
}, z.core.$strip>;
|
|
428
|
+
type TurnDiagnostic = z.infer<typeof TurnDiagnosticSchema>;
|
|
429
|
+
declare const SubmitEventSchema: z.ZodObject<{
|
|
430
|
+
event: z.ZodLiteral<"client.turn.submit">;
|
|
431
|
+
payload: z.ZodObject<{
|
|
432
|
+
input: z.ZodString;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
protocol: z.ZodLiteral<"agentskit.chat.turn">;
|
|
435
|
+
version: z.ZodLiteral<1>;
|
|
436
|
+
eventId: z.ZodString;
|
|
437
|
+
sessionId: z.ZodString;
|
|
438
|
+
turnId: z.ZodString;
|
|
439
|
+
sequence: z.ZodNumber;
|
|
440
|
+
emittedAt: z.ZodString;
|
|
441
|
+
}, z.core.$strip>;
|
|
442
|
+
declare const SnapshotEventSchema: z.ZodObject<{
|
|
443
|
+
event: z.ZodLiteral<"server.turn.snapshot">;
|
|
444
|
+
payload: z.ZodObject<{
|
|
445
|
+
messages: z.ZodPipe<z.ZodArray<z.ZodUnknown>, z.ZodTransform<(Omit<Message, "createdAt"> & {
|
|
446
|
+
createdAt: string;
|
|
447
|
+
})[], unknown[]>>;
|
|
448
|
+
status: z.ZodEnum<{
|
|
449
|
+
error: "error";
|
|
450
|
+
idle: "idle";
|
|
451
|
+
streaming: "streaming";
|
|
452
|
+
complete: "complete";
|
|
453
|
+
}>;
|
|
454
|
+
usage: z.ZodObject<{
|
|
455
|
+
promptTokens: z.ZodNumber;
|
|
456
|
+
completionTokens: z.ZodNumber;
|
|
457
|
+
totalTokens: z.ZodNumber;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
460
|
+
version: z.ZodLiteral<1>;
|
|
461
|
+
code: z.ZodString;
|
|
462
|
+
message: z.ZodString;
|
|
463
|
+
retryable: z.ZodBoolean;
|
|
464
|
+
}, z.core.$strip>>;
|
|
465
|
+
lineage: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
466
|
+
operation: z.ZodLiteral<"submit">;
|
|
467
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
468
|
+
operation: z.ZodEnum<{
|
|
469
|
+
retry: "retry";
|
|
470
|
+
edit: "edit";
|
|
471
|
+
regenerate: "regenerate";
|
|
472
|
+
}>;
|
|
473
|
+
parentTurnId: z.ZodString;
|
|
474
|
+
sourceMessageId: z.ZodString;
|
|
475
|
+
}, z.core.$strip>], "operation">>;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
protocol: z.ZodLiteral<"agentskit.chat.turn">;
|
|
478
|
+
version: z.ZodLiteral<1>;
|
|
479
|
+
eventId: z.ZodString;
|
|
480
|
+
sessionId: z.ZodString;
|
|
481
|
+
turnId: z.ZodString;
|
|
482
|
+
sequence: z.ZodNumber;
|
|
483
|
+
emittedAt: z.ZodString;
|
|
484
|
+
}, z.core.$strip>;
|
|
485
|
+
declare const DiagnosticEventSchema: z.ZodObject<{
|
|
486
|
+
event: z.ZodLiteral<"server.turn.diagnostic">;
|
|
487
|
+
payload: z.ZodObject<{
|
|
488
|
+
version: z.ZodLiteral<1>;
|
|
489
|
+
code: z.ZodString;
|
|
490
|
+
message: z.ZodString;
|
|
491
|
+
retryable: z.ZodBoolean;
|
|
492
|
+
}, z.core.$strip>;
|
|
493
|
+
protocol: z.ZodLiteral<"agentskit.chat.turn">;
|
|
494
|
+
version: z.ZodLiteral<1>;
|
|
495
|
+
eventId: z.ZodString;
|
|
496
|
+
sessionId: z.ZodString;
|
|
497
|
+
turnId: z.ZodString;
|
|
498
|
+
sequence: z.ZodNumber;
|
|
499
|
+
emittedAt: z.ZodString;
|
|
500
|
+
}, z.core.$strip>;
|
|
501
|
+
declare const TurnEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
502
|
+
event: z.ZodLiteral<"client.turn.submit">;
|
|
503
|
+
payload: z.ZodObject<{
|
|
504
|
+
input: z.ZodString;
|
|
505
|
+
}, z.core.$strip>;
|
|
506
|
+
protocol: z.ZodLiteral<"agentskit.chat.turn">;
|
|
507
|
+
version: z.ZodLiteral<1>;
|
|
508
|
+
eventId: z.ZodString;
|
|
509
|
+
sessionId: z.ZodString;
|
|
510
|
+
turnId: z.ZodString;
|
|
511
|
+
sequence: z.ZodNumber;
|
|
512
|
+
emittedAt: z.ZodString;
|
|
513
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
514
|
+
event: z.ZodLiteral<"server.turn.snapshot">;
|
|
515
|
+
payload: z.ZodObject<{
|
|
516
|
+
messages: z.ZodPipe<z.ZodArray<z.ZodUnknown>, z.ZodTransform<(Omit<Message, "createdAt"> & {
|
|
517
|
+
createdAt: string;
|
|
518
|
+
})[], unknown[]>>;
|
|
519
|
+
status: z.ZodEnum<{
|
|
520
|
+
error: "error";
|
|
521
|
+
idle: "idle";
|
|
522
|
+
streaming: "streaming";
|
|
523
|
+
complete: "complete";
|
|
524
|
+
}>;
|
|
525
|
+
usage: z.ZodObject<{
|
|
526
|
+
promptTokens: z.ZodNumber;
|
|
527
|
+
completionTokens: z.ZodNumber;
|
|
528
|
+
totalTokens: z.ZodNumber;
|
|
529
|
+
}, z.core.$strip>;
|
|
530
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
531
|
+
version: z.ZodLiteral<1>;
|
|
532
|
+
code: z.ZodString;
|
|
533
|
+
message: z.ZodString;
|
|
534
|
+
retryable: z.ZodBoolean;
|
|
535
|
+
}, z.core.$strip>>;
|
|
536
|
+
lineage: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
537
|
+
operation: z.ZodLiteral<"submit">;
|
|
538
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
539
|
+
operation: z.ZodEnum<{
|
|
540
|
+
retry: "retry";
|
|
541
|
+
edit: "edit";
|
|
542
|
+
regenerate: "regenerate";
|
|
543
|
+
}>;
|
|
544
|
+
parentTurnId: z.ZodString;
|
|
545
|
+
sourceMessageId: z.ZodString;
|
|
546
|
+
}, z.core.$strip>], "operation">>;
|
|
547
|
+
}, z.core.$strip>;
|
|
548
|
+
protocol: z.ZodLiteral<"agentskit.chat.turn">;
|
|
549
|
+
version: z.ZodLiteral<1>;
|
|
550
|
+
eventId: z.ZodString;
|
|
551
|
+
sessionId: z.ZodString;
|
|
552
|
+
turnId: z.ZodString;
|
|
553
|
+
sequence: z.ZodNumber;
|
|
554
|
+
emittedAt: z.ZodString;
|
|
555
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
556
|
+
event: z.ZodLiteral<"server.turn.diagnostic">;
|
|
557
|
+
payload: z.ZodObject<{
|
|
558
|
+
version: z.ZodLiteral<1>;
|
|
559
|
+
code: z.ZodString;
|
|
560
|
+
message: z.ZodString;
|
|
561
|
+
retryable: z.ZodBoolean;
|
|
562
|
+
}, z.core.$strip>;
|
|
563
|
+
protocol: z.ZodLiteral<"agentskit.chat.turn">;
|
|
564
|
+
version: z.ZodLiteral<1>;
|
|
565
|
+
eventId: z.ZodString;
|
|
566
|
+
sessionId: z.ZodString;
|
|
567
|
+
turnId: z.ZodString;
|
|
568
|
+
sequence: z.ZodNumber;
|
|
569
|
+
emittedAt: z.ZodString;
|
|
570
|
+
}, z.core.$strip>], "event">;
|
|
571
|
+
type TurnEvent = z.infer<typeof TurnEventSchema>;
|
|
572
|
+
type WireMessage = MemoryRecord['messages'][number];
|
|
573
|
+
type SubmitTurnEvent = z.infer<typeof SubmitEventSchema>;
|
|
574
|
+
type SnapshotTurnEvent = z.infer<typeof SnapshotEventSchema>;
|
|
575
|
+
type DiagnosticTurnEvent = z.infer<typeof DiagnosticEventSchema>;
|
|
576
|
+
type TurnLineage = NonNullable<SnapshotTurnEvent['payload']['lineage']>;
|
|
577
|
+
interface TurnSnapshotCursor {
|
|
578
|
+
readonly apply: (event: unknown) => boolean;
|
|
579
|
+
readonly getSnapshot: () => SnapshotTurnEvent | undefined;
|
|
580
|
+
}
|
|
581
|
+
interface CreateSnapshotEventOptions {
|
|
582
|
+
readonly eventId: string;
|
|
583
|
+
readonly sessionId: string;
|
|
584
|
+
readonly turnId: string;
|
|
585
|
+
readonly sequence: number;
|
|
586
|
+
readonly emittedAt: string;
|
|
587
|
+
readonly messages: readonly Message[];
|
|
588
|
+
readonly status: SnapshotTurnEvent['payload']['status'];
|
|
589
|
+
readonly usage: TokenUsage;
|
|
590
|
+
readonly lineage?: TurnLineage;
|
|
591
|
+
readonly error?: TurnDiagnostic;
|
|
592
|
+
}
|
|
593
|
+
declare const createSnapshotEvent: (options: CreateSnapshotEventOptions) => SnapshotTurnEvent;
|
|
594
|
+
declare const createTurnSnapshotCursor: (sessionId: string) => TurnSnapshotCursor;
|
|
595
|
+
type ProtocolDecodeCode = 'PROTOCOL_UNSUPPORTED_VERSION' | 'PROTOCOL_UNKNOWN_EVENT' | 'PROTOCOL_INVALID_PAYLOAD';
|
|
596
|
+
interface ProtocolDecodeDiagnostic {
|
|
597
|
+
readonly code: ProtocolDecodeCode;
|
|
598
|
+
readonly message: string;
|
|
599
|
+
readonly retryable: false;
|
|
600
|
+
readonly eventId?: string;
|
|
601
|
+
}
|
|
602
|
+
type DecodeTurnEventResult = {
|
|
603
|
+
readonly ok: true;
|
|
604
|
+
readonly event: TurnEvent;
|
|
605
|
+
} | {
|
|
606
|
+
readonly ok: false;
|
|
607
|
+
readonly diagnostic: ProtocolDecodeDiagnostic;
|
|
608
|
+
};
|
|
609
|
+
declare const decodeTurnEvent: (input: unknown) => DecodeTurnEventResult;
|
|
610
|
+
declare const encodeTurnEvent: (event: TurnEvent) => string;
|
|
611
|
+
declare const snapshotMessages: (event: unknown) => Message[];
|
|
612
|
+
declare const SESSION_PROTOCOL: "agentskit.chat.session";
|
|
613
|
+
declare const SESSION_PROTOCOL_VERSION: 1;
|
|
614
|
+
declare const SessionConfirmationSchema: z.ZodReadonly<z.ZodObject<{
|
|
615
|
+
token: z.ZodString;
|
|
616
|
+
action: z.ZodString;
|
|
617
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
618
|
+
toolCallId: z.ZodString;
|
|
619
|
+
expiresAt: z.ZodNumber;
|
|
620
|
+
status: z.ZodEnum<{
|
|
621
|
+
pending: "pending";
|
|
622
|
+
approving: "approving";
|
|
623
|
+
rejecting: "rejecting";
|
|
624
|
+
expiring: "expiring";
|
|
625
|
+
approved: "approved";
|
|
626
|
+
rejected: "rejected";
|
|
627
|
+
expired: "expired";
|
|
628
|
+
}>;
|
|
629
|
+
}, z.core.$strip>>;
|
|
630
|
+
declare const SessionSnapshotSchema: z.ZodReadonly<z.ZodObject<{
|
|
631
|
+
protocol: z.ZodLiteral<"agentskit.chat.session">;
|
|
632
|
+
version: z.ZodLiteral<1>;
|
|
633
|
+
sessionId: z.ZodString;
|
|
634
|
+
definitionId: z.ZodString;
|
|
635
|
+
definitionRevision: z.ZodNumber;
|
|
636
|
+
updatedAt: z.ZodString;
|
|
637
|
+
cursor: z.ZodNumber;
|
|
638
|
+
activeTurn: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
639
|
+
turnId: z.ZodString;
|
|
640
|
+
expiresAt: z.ZodNumber;
|
|
641
|
+
}, z.core.$strip>>>;
|
|
642
|
+
terminalTurns: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
643
|
+
turnId: z.ZodString;
|
|
644
|
+
outcome: z.ZodEnum<{
|
|
645
|
+
completed: "completed";
|
|
646
|
+
indeterminate: "indeterminate";
|
|
647
|
+
}>;
|
|
648
|
+
}, z.core.$strip>>>>>;
|
|
649
|
+
conversation: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
650
|
+
state: z.ZodString;
|
|
651
|
+
decisions: z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
652
|
+
messageId: z.ZodString;
|
|
653
|
+
input: z.ZodString;
|
|
654
|
+
routeId: z.ZodString;
|
|
655
|
+
kind: z.ZodEnum<{
|
|
656
|
+
fallback: "fallback";
|
|
657
|
+
deterministic: "deterministic";
|
|
658
|
+
repaired: "repaired";
|
|
659
|
+
}>;
|
|
660
|
+
content: z.ZodString;
|
|
661
|
+
fromState: z.ZodString;
|
|
662
|
+
toState: z.ZodString;
|
|
663
|
+
}, z.core.$strip>>>;
|
|
664
|
+
}, z.core.$strip>>>;
|
|
665
|
+
confirmations: z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
666
|
+
token: z.ZodString;
|
|
667
|
+
action: z.ZodString;
|
|
668
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
669
|
+
toolCallId: z.ZodString;
|
|
670
|
+
expiresAt: z.ZodNumber;
|
|
671
|
+
status: z.ZodEnum<{
|
|
672
|
+
pending: "pending";
|
|
673
|
+
approving: "approving";
|
|
674
|
+
rejecting: "rejecting";
|
|
675
|
+
expiring: "expiring";
|
|
676
|
+
approved: "approved";
|
|
677
|
+
rejected: "rejected";
|
|
678
|
+
expired: "expired";
|
|
679
|
+
}>;
|
|
680
|
+
}, z.core.$strip>>>;
|
|
681
|
+
}, z.core.$strip>>;
|
|
682
|
+
type SessionSnapshot = z.infer<typeof SessionSnapshotSchema>;
|
|
683
|
+
type SessionConfirmation = z.infer<typeof SessionConfirmationSchema>;
|
|
684
|
+
type DecodeSessionSnapshotResult = {
|
|
685
|
+
readonly ok: true;
|
|
686
|
+
readonly snapshot: SessionSnapshot;
|
|
687
|
+
} | {
|
|
688
|
+
readonly ok: false;
|
|
689
|
+
readonly diagnostic: {
|
|
690
|
+
readonly code: 'SESSION_INVALID_SNAPSHOT' | 'SESSION_UNSUPPORTED_VERSION';
|
|
691
|
+
readonly message: string;
|
|
692
|
+
readonly retryable: false;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
declare const decodeSessionSnapshot: (input: unknown) => DecodeSessionSnapshotResult;
|
|
696
|
+
|
|
697
|
+
export { ANSWER_MAX_CITATIONS, ANSWER_MAX_SUGGESTIONS, ANSWER_PROTOCOL, ANSWER_PROTOCOL_VERSION, ASK_EVENT_MAX_BYTES, ASK_EVENT_MAX_RECORDS, ASK_SERVICE_PROTOCOL_VERSION, ASSISTANT_CONTENT_MAX_BYTES, ASSISTANT_CONTENT_MAX_RECORDS, ASSISTANT_CONTENT_PREFIX, ASSISTANT_CONTENT_PROTOCOL, ASSISTANT_CONTENT_PROTOCOL_VERSION, type AnswerCitation, AnswerCitationSchema, AnswerConfidenceSchema, type AnswerResponse, AnswerResponseSchema, AnswerSuggestionSchema, type AskEvent, type AskEventDecodeResult, AskEventSchema, type AskToolEvent, type AssistantComponentPart, AssistantComponentPartSchema, type AssistantContentDecodeCode, type AssistantContentEncoder, type AssistantContentPart, AssistantContentPartSchema, type AssistantTextPart, AssistantTextPartSchema, COMPONENT_PROTOCOL, COMPONENT_PROTOCOL_VERSION, type ComponentDecodeCode, type ComponentFallback, ComponentFallbackSchema, type ComponentInteractionEvent, ComponentInteractionEventSchema, ComponentKeySchema, type ComponentRenderFrame, ComponentRenderFrameSchema, type ComponentSelectionEvent, ComponentSelectionEventSchema, type CreateSnapshotEventOptions, DETERMINISTIC_ARTIFACT_MAX_BYTES, DETERMINISTIC_ARTIFACT_MAX_ENTRIES, DETERMINISTIC_KNOWLEDGE_PROTOCOL, DETERMINISTIC_KNOWLEDGE_PROTOCOL_VERSION, DETERMINISTIC_MATCH_MAX_VALUES, DETERMINISTIC_QUERY_MAX_CHARS, DETERMINISTIC_SITE_PROTOCOL, DETERMINISTIC_SITE_PROTOCOL_VERSION, type DecodeAssistantContentResult, type DecodeComponentFrameResult, type DecodeLocalKnowledgeArtifactOptions, type DecodeSessionSnapshotResult, type DecodeTurnEventResult, type DeterministicDecodeCode, type DeterministicDecodeResult, type DeterministicKnowledgeEntry, DeterministicKnowledgeEntrySchema, type DeterministicSiteConfig, DeterministicSiteConfigSchema, type DiagnosticTurnEvent, type LocalKnowledgeArtifact, type LocalKnowledgeArtifactHashInput, LocalKnowledgeArtifactSchema, type ProtocolDecodeCode, type ProtocolDecodeDiagnostic, SESSION_PROTOCOL, SESSION_PROTOCOL_VERSION, type SessionConfirmation, SessionConfirmationSchema, type SessionSnapshot, SessionSnapshotSchema, type SnapshotTurnEvent, type SubmitTurnEvent, TURN_PROTOCOL, TURN_PROTOCOL_VERSION, TokenUsageSchema, type TurnDiagnostic, TurnDiagnosticSchema, type TurnEvent, TurnEventSchema, type TurnLineage, type TurnSnapshotCursor, type VerifiedLocalKnowledgeArtifact, type VerifyLocalKnowledgeArtifactOptions, type WireMessage, canonicalizeLocalKnowledgeArtifact, computeLocalKnowledgeArtifactContentHash, createAssistantContentEncoder, createInteractionEvent, createSelectionEvent, createSnapshotEvent, createTurnSnapshotCursor, decodeAnswerResponse, decodeAskEvents, decodeAssistantContent, decodeComponentFrame, decodeDeterministicSiteConfig, decodeLocalKnowledgeArtifact, decodeSessionSnapshot, decodeTurnEvent, encodeTurnEvent, isAssistantContentCandidate, isComponentFrameCandidate, normalizeKnowledgeKey, snapshotMessages, verifyLocalKnowledgeArtifact, verifyLocalKnowledgeArtifactSync };
|