@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.
@@ -0,0 +1,884 @@
1
+ import { ProtocolDecodeCode, TurnEvent } from './index.cjs';
2
+ import '@agentskit/core';
3
+ import 'zod';
4
+
5
+ interface TurnEventFixture {
6
+ readonly name: string;
7
+ readonly event: TurnEvent;
8
+ }
9
+ interface InvalidTurnEventFixture {
10
+ readonly name: string;
11
+ readonly event: unknown;
12
+ readonly code: ProtocolDecodeCode;
13
+ }
14
+ declare const validTurnEventFixtures: readonly [{
15
+ readonly name: "submit";
16
+ readonly event: {
17
+ readonly eventId: "event-submit";
18
+ readonly sequence: 0;
19
+ readonly event: "client.turn.submit";
20
+ readonly payload: {
21
+ readonly input: "hello";
22
+ };
23
+ readonly protocol: "agentskit.chat.turn";
24
+ readonly version: 1;
25
+ readonly sessionId: "session-conformance";
26
+ readonly turnId: "turn-conformance";
27
+ readonly emittedAt: "2026-07-11T03:00:00.000Z";
28
+ };
29
+ }, {
30
+ readonly name: "idle snapshot";
31
+ readonly event: {
32
+ readonly eventId: "event-idle";
33
+ readonly sequence: 1;
34
+ readonly event: "server.turn.snapshot";
35
+ readonly payload: {
36
+ readonly status: "idle";
37
+ readonly usage: {
38
+ readonly promptTokens: 0;
39
+ readonly completionTokens: 0;
40
+ readonly totalTokens: 0;
41
+ };
42
+ readonly messages: [];
43
+ };
44
+ readonly protocol: "agentskit.chat.turn";
45
+ readonly version: 1;
46
+ readonly sessionId: "session-conformance";
47
+ readonly turnId: "turn-conformance";
48
+ readonly emittedAt: "2026-07-11T03:00:00.000Z";
49
+ };
50
+ }, {
51
+ readonly name: "streaming snapshot";
52
+ readonly event: {
53
+ readonly eventId: "event-streaming";
54
+ readonly sequence: 2;
55
+ readonly event: "server.turn.snapshot";
56
+ readonly payload: {
57
+ readonly status: "streaming";
58
+ readonly lineage: {
59
+ readonly operation: "submit";
60
+ };
61
+ readonly usage: {
62
+ readonly promptTokens: 2;
63
+ readonly completionTokens: 1;
64
+ readonly totalTokens: 3;
65
+ };
66
+ readonly messages: [{
67
+ readonly id: "message-assistant";
68
+ readonly role: "assistant";
69
+ readonly content: "AgentsKit";
70
+ readonly status: "streaming";
71
+ readonly createdAt: "2026-07-11T03:00:00.000Z";
72
+ }];
73
+ };
74
+ readonly protocol: "agentskit.chat.turn";
75
+ readonly version: 1;
76
+ readonly sessionId: "session-conformance";
77
+ readonly turnId: "turn-conformance";
78
+ readonly emittedAt: "2026-07-11T03:00:00.000Z";
79
+ };
80
+ }, {
81
+ readonly name: "complete snapshot with tool call";
82
+ readonly event: {
83
+ readonly eventId: "event-complete";
84
+ readonly sequence: 3;
85
+ readonly event: "server.turn.snapshot";
86
+ readonly payload: {
87
+ readonly status: "complete";
88
+ readonly lineage: {
89
+ readonly operation: "regenerate";
90
+ readonly parentTurnId: "turn-previous";
91
+ readonly sourceMessageId: "message-assistant";
92
+ };
93
+ readonly usage: {
94
+ readonly promptTokens: 2;
95
+ readonly completionTokens: 3;
96
+ readonly totalTokens: 5;
97
+ };
98
+ readonly messages: [{
99
+ readonly id: "message-assistant";
100
+ readonly role: "assistant";
101
+ readonly content: "AgentsKit received: hello";
102
+ readonly status: "complete";
103
+ readonly toolCalls: [{
104
+ readonly id: "tool-call-1";
105
+ readonly name: "lookup";
106
+ readonly args: {
107
+ readonly query: "hello";
108
+ };
109
+ readonly result: "found";
110
+ readonly status: "complete";
111
+ }];
112
+ readonly createdAt: "2026-07-11T03:00:01.000Z";
113
+ }];
114
+ };
115
+ readonly protocol: "agentskit.chat.turn";
116
+ readonly version: 1;
117
+ readonly sessionId: "session-conformance";
118
+ readonly turnId: "turn-conformance";
119
+ readonly emittedAt: "2026-07-11T03:00:00.000Z";
120
+ };
121
+ }, {
122
+ readonly name: "diagnostic";
123
+ readonly event: {
124
+ readonly eventId: "event-diagnostic";
125
+ readonly sequence: 4;
126
+ readonly event: "server.turn.diagnostic";
127
+ readonly payload: {
128
+ readonly version: 1;
129
+ readonly code: "ADAPTER_FAILED";
130
+ readonly message: "The adapter failed.";
131
+ readonly retryable: false;
132
+ };
133
+ readonly protocol: "agentskit.chat.turn";
134
+ readonly version: 1;
135
+ readonly sessionId: "session-conformance";
136
+ readonly turnId: "turn-conformance";
137
+ readonly emittedAt: "2026-07-11T03:00:00.000Z";
138
+ };
139
+ }, {
140
+ readonly name: "error snapshot";
141
+ readonly event: {
142
+ readonly eventId: "event-error";
143
+ readonly sequence: 5;
144
+ readonly event: "server.turn.snapshot";
145
+ readonly payload: {
146
+ readonly status: "error";
147
+ readonly usage: {
148
+ readonly promptTokens: 2;
149
+ readonly completionTokens: 0;
150
+ readonly totalTokens: 2;
151
+ };
152
+ readonly messages: [];
153
+ readonly error: {
154
+ readonly version: 1;
155
+ readonly code: "ADAPTER_FAILED";
156
+ readonly message: "The adapter failed.";
157
+ readonly retryable: false;
158
+ };
159
+ };
160
+ readonly protocol: "agentskit.chat.turn";
161
+ readonly version: 1;
162
+ readonly sessionId: "session-conformance";
163
+ readonly turnId: "turn-conformance";
164
+ readonly emittedAt: "2026-07-11T03:00:00.000Z";
165
+ };
166
+ }];
167
+ declare const invalidTurnEventFixtures: readonly [{
168
+ readonly name: "invalid payload";
169
+ readonly event: null;
170
+ readonly code: "PROTOCOL_INVALID_PAYLOAD";
171
+ }, {
172
+ readonly name: "unknown version";
173
+ readonly event: {
174
+ readonly eventId: "future";
175
+ readonly version: 2;
176
+ readonly sequence: 0;
177
+ readonly event: "client.turn.submit";
178
+ readonly payload: {
179
+ readonly input: "hello";
180
+ };
181
+ readonly protocol: "agentskit.chat.turn";
182
+ readonly sessionId: "session-conformance";
183
+ readonly turnId: "turn-conformance";
184
+ readonly emittedAt: "2026-07-11T03:00:00.000Z";
185
+ };
186
+ readonly code: "PROTOCOL_UNSUPPORTED_VERSION";
187
+ }, {
188
+ readonly name: "unknown event";
189
+ readonly event: {
190
+ readonly eventId: "unknown";
191
+ readonly sequence: 0;
192
+ readonly event: "server.turn.future";
193
+ readonly payload: {};
194
+ readonly protocol: "agentskit.chat.turn";
195
+ readonly version: 1;
196
+ readonly sessionId: "session-conformance";
197
+ readonly turnId: "turn-conformance";
198
+ readonly emittedAt: "2026-07-11T03:00:00.000Z";
199
+ };
200
+ readonly code: "PROTOCOL_UNKNOWN_EVENT";
201
+ }, {
202
+ readonly name: "blank input";
203
+ readonly event: {
204
+ readonly eventId: "blank";
205
+ readonly sequence: 0;
206
+ readonly event: "client.turn.submit";
207
+ readonly payload: {
208
+ readonly input: " ";
209
+ };
210
+ readonly protocol: "agentskit.chat.turn";
211
+ readonly version: 1;
212
+ readonly sessionId: "session-conformance";
213
+ readonly turnId: "turn-conformance";
214
+ readonly emittedAt: "2026-07-11T03:00:00.000Z";
215
+ };
216
+ readonly code: "PROTOCOL_INVALID_PAYLOAD";
217
+ }];
218
+ declare const validChoiceListFrame: {
219
+ readonly protocol: "agentskit.chat.component";
220
+ readonly version: 1;
221
+ readonly type: "render";
222
+ readonly componentKey: "choice-list";
223
+ readonly instanceId: "destination-choice";
224
+ readonly props: {
225
+ readonly prompt: "Where should we go?";
226
+ readonly choices: readonly [{
227
+ readonly id: "docs";
228
+ readonly label: "Documentation";
229
+ readonly description: "Read the component guide.";
230
+ }, {
231
+ readonly id: "demo";
232
+ readonly label: "Demo";
233
+ }];
234
+ };
235
+ readonly fallback: {
236
+ readonly kind: "choice-list";
237
+ readonly summary: "Choose Documentation or Demo.";
238
+ };
239
+ };
240
+ declare const standardComponentFrameFixtures: readonly [Readonly<{
241
+ protocol: "agentskit.chat.component";
242
+ version: 1;
243
+ type: "render";
244
+ componentKey: string;
245
+ instanceId: string;
246
+ props: unknown;
247
+ fallback: Readonly<{
248
+ kind: string;
249
+ summary: string;
250
+ }>;
251
+ }>, {
252
+ readonly protocol: "agentskit.chat.component";
253
+ readonly version: 1;
254
+ readonly type: "render";
255
+ readonly componentKey: "choice-list";
256
+ readonly instanceId: "destination-choice";
257
+ readonly props: {
258
+ readonly prompt: "Where should we go?";
259
+ readonly choices: readonly [{
260
+ readonly id: "docs";
261
+ readonly label: "Documentation";
262
+ readonly description: "Read the component guide.";
263
+ }, {
264
+ readonly id: "demo";
265
+ readonly label: "Demo";
266
+ }];
267
+ };
268
+ readonly fallback: {
269
+ readonly kind: "choice-list";
270
+ readonly summary: "Choose Documentation or Demo.";
271
+ };
272
+ }, Readonly<{
273
+ protocol: "agentskit.chat.component";
274
+ version: 1;
275
+ type: "render";
276
+ componentKey: string;
277
+ instanceId: string;
278
+ props: unknown;
279
+ fallback: Readonly<{
280
+ kind: string;
281
+ summary: string;
282
+ }>;
283
+ }>, Readonly<{
284
+ protocol: "agentskit.chat.component";
285
+ version: 1;
286
+ type: "render";
287
+ componentKey: string;
288
+ instanceId: string;
289
+ props: unknown;
290
+ fallback: Readonly<{
291
+ kind: string;
292
+ summary: string;
293
+ }>;
294
+ }>, Readonly<{
295
+ protocol: "agentskit.chat.component";
296
+ version: 1;
297
+ type: "render";
298
+ componentKey: string;
299
+ instanceId: string;
300
+ props: unknown;
301
+ fallback: Readonly<{
302
+ kind: string;
303
+ summary: string;
304
+ }>;
305
+ }>, Readonly<{
306
+ protocol: "agentskit.chat.component";
307
+ version: 1;
308
+ type: "render";
309
+ componentKey: string;
310
+ instanceId: string;
311
+ props: unknown;
312
+ fallback: Readonly<{
313
+ kind: string;
314
+ summary: string;
315
+ }>;
316
+ }>, Readonly<{
317
+ protocol: "agentskit.chat.component";
318
+ version: 1;
319
+ type: "render";
320
+ componentKey: string;
321
+ instanceId: string;
322
+ props: unknown;
323
+ fallback: Readonly<{
324
+ kind: string;
325
+ summary: string;
326
+ }>;
327
+ }>, Readonly<{
328
+ protocol: "agentskit.chat.component";
329
+ version: 1;
330
+ type: "render";
331
+ componentKey: string;
332
+ instanceId: string;
333
+ props: unknown;
334
+ fallback: Readonly<{
335
+ kind: string;
336
+ summary: string;
337
+ }>;
338
+ }>, Readonly<{
339
+ protocol: "agentskit.chat.component";
340
+ version: 1;
341
+ type: "render";
342
+ componentKey: string;
343
+ instanceId: string;
344
+ props: unknown;
345
+ fallback: Readonly<{
346
+ kind: string;
347
+ summary: string;
348
+ }>;
349
+ }>, Readonly<{
350
+ protocol: "agentskit.chat.component";
351
+ version: 1;
352
+ type: "render";
353
+ componentKey: string;
354
+ instanceId: string;
355
+ props: unknown;
356
+ fallback: Readonly<{
357
+ kind: string;
358
+ summary: string;
359
+ }>;
360
+ }>, Readonly<{
361
+ protocol: "agentskit.chat.component";
362
+ version: 1;
363
+ type: "render";
364
+ componentKey: string;
365
+ instanceId: string;
366
+ props: unknown;
367
+ fallback: Readonly<{
368
+ kind: string;
369
+ summary: string;
370
+ }>;
371
+ }>, Readonly<{
372
+ protocol: "agentskit.chat.component";
373
+ version: 1;
374
+ type: "render";
375
+ componentKey: string;
376
+ instanceId: string;
377
+ props: unknown;
378
+ fallback: Readonly<{
379
+ kind: string;
380
+ summary: string;
381
+ }>;
382
+ }>];
383
+ declare const invalidChoiceListPropsFrame: {
384
+ readonly props: {
385
+ readonly prompt: "";
386
+ readonly choices: readonly [];
387
+ };
388
+ readonly protocol: "agentskit.chat.component";
389
+ readonly version: 1;
390
+ readonly type: "render";
391
+ readonly componentKey: "choice-list";
392
+ readonly instanceId: "destination-choice";
393
+ readonly fallback: {
394
+ readonly kind: "choice-list";
395
+ readonly summary: "Choose Documentation or Demo.";
396
+ };
397
+ };
398
+ declare const unknownComponentFrame: {
399
+ readonly componentKey: "future-component";
400
+ readonly protocol: "agentskit.chat.component";
401
+ readonly version: 1;
402
+ readonly type: "render";
403
+ readonly instanceId: "destination-choice";
404
+ readonly props: {
405
+ readonly prompt: "Where should we go?";
406
+ readonly choices: readonly [{
407
+ readonly id: "docs";
408
+ readonly label: "Documentation";
409
+ readonly description: "Read the component guide.";
410
+ }, {
411
+ readonly id: "demo";
412
+ readonly label: "Demo";
413
+ }];
414
+ };
415
+ readonly fallback: {
416
+ readonly kind: "choice-list";
417
+ readonly summary: "Choose Documentation or Demo.";
418
+ };
419
+ };
420
+ declare const invalidComponentFrameFixtures: readonly [{
421
+ readonly name: "invalid frame";
422
+ readonly frame: null;
423
+ readonly code: "COMPONENT_INVALID_FRAME";
424
+ }, {
425
+ readonly name: "unsupported version";
426
+ readonly frame: {
427
+ readonly version: 2;
428
+ readonly protocol: "agentskit.chat.component";
429
+ readonly type: "render";
430
+ readonly componentKey: "choice-list";
431
+ readonly instanceId: "destination-choice";
432
+ readonly props: {
433
+ readonly prompt: "Where should we go?";
434
+ readonly choices: readonly [{
435
+ readonly id: "docs";
436
+ readonly label: "Documentation";
437
+ readonly description: "Read the component guide.";
438
+ }, {
439
+ readonly id: "demo";
440
+ readonly label: "Demo";
441
+ }];
442
+ };
443
+ readonly fallback: {
444
+ readonly kind: "choice-list";
445
+ readonly summary: "Choose Documentation or Demo.";
446
+ };
447
+ };
448
+ readonly code: "COMPONENT_UNSUPPORTED_VERSION";
449
+ }, {
450
+ readonly name: "unknown type";
451
+ readonly frame: {
452
+ readonly type: "future";
453
+ readonly protocol: "agentskit.chat.component";
454
+ readonly version: 1;
455
+ readonly componentKey: "choice-list";
456
+ readonly instanceId: "destination-choice";
457
+ readonly props: {
458
+ readonly prompt: "Where should we go?";
459
+ readonly choices: readonly [{
460
+ readonly id: "docs";
461
+ readonly label: "Documentation";
462
+ readonly description: "Read the component guide.";
463
+ }, {
464
+ readonly id: "demo";
465
+ readonly label: "Demo";
466
+ }];
467
+ };
468
+ readonly fallback: {
469
+ readonly kind: "choice-list";
470
+ readonly summary: "Choose Documentation or Demo.";
471
+ };
472
+ };
473
+ readonly code: "COMPONENT_UNKNOWN_TYPE";
474
+ }];
475
+ declare const persistentSessionFixture: {
476
+ readonly protocol: "agentskit.chat.session";
477
+ readonly version: 1;
478
+ readonly sessionId: "cross-client";
479
+ readonly definitionId: "protocol-session";
480
+ readonly definitionRevision: 1;
481
+ readonly updatedAt: "2026-07-11T00:00:00.000Z";
482
+ readonly cursor: 1;
483
+ readonly conversation: {
484
+ readonly state: "complete";
485
+ readonly decisions: [];
486
+ };
487
+ readonly confirmations: [];
488
+ };
489
+ declare const deterministicContentHashFixture: "sha256:d1b98e69dcb00985dc5fdad4a8475f926168e6485e85716758ad5e0f35cd4906";
490
+ declare const deterministicSiteConfigFixture: {
491
+ readonly protocol: "agentskit.chat.site";
492
+ readonly version: 1;
493
+ readonly siteId: "agentskit-docs";
494
+ readonly artifact: {
495
+ readonly href: "/agentskit-chat.knowledge.json";
496
+ readonly contentHash: "sha256:d1b98e69dcb00985dc5fdad4a8475f926168e6485e85716758ad5e0f35cd4906";
497
+ };
498
+ readonly fallback: {
499
+ readonly mode: "backend";
500
+ };
501
+ };
502
+ declare const localKnowledgeArtifactFixture: {
503
+ readonly protocol: "agentskit.chat.knowledge";
504
+ readonly version: 1;
505
+ readonly artifactId: "agentskit-docs-2026-07-13";
506
+ readonly siteId: "agentskit-docs";
507
+ readonly contentHash: "sha256:d1b98e69dcb00985dc5fdad4a8475f926168e6485e85716758ad5e0f35cd4906";
508
+ readonly generatedAt: "2026-07-13T00:00:00.000Z";
509
+ readonly expiresAt: "2026-07-14T00:00:00.000Z";
510
+ readonly entries: readonly [{
511
+ readonly id: "install-cli";
512
+ readonly kind: "command";
513
+ readonly label: "Install the CLI";
514
+ readonly match: {
515
+ readonly type: "exact";
516
+ readonly values: readonly ["install cli", "npm install agentskit"];
517
+ };
518
+ readonly answer: {
519
+ readonly markdown: "Run `npm install agentskit`.";
520
+ readonly citations: readonly [{
521
+ readonly id: "quickstart";
522
+ readonly title: "Quickstart";
523
+ readonly href: "/docs/quickstart";
524
+ }];
525
+ };
526
+ }, {
527
+ readonly id: "docs-agentskit";
528
+ readonly kind: "document";
529
+ readonly label: "AgentsKit documentation";
530
+ readonly match: {
531
+ readonly type: "exact";
532
+ readonly values: readonly ["docs", "agentskit docs"];
533
+ };
534
+ readonly answer: {
535
+ readonly markdown: "Open the AgentsKit documentation.";
536
+ readonly citations: readonly [{
537
+ readonly id: "agentskit-docs";
538
+ readonly title: "AgentsKit docs";
539
+ readonly href: "https://agentskit.io/docs";
540
+ }];
541
+ };
542
+ }, {
543
+ readonly id: "docs-registry";
544
+ readonly kind: "document";
545
+ readonly label: "Registry documentation";
546
+ readonly match: {
547
+ readonly type: "exact";
548
+ readonly values: readonly ["docs", "registry docs"];
549
+ };
550
+ readonly answer: {
551
+ readonly markdown: "Open the Registry documentation.";
552
+ readonly citations: readonly [{
553
+ readonly id: "registry-docs";
554
+ readonly title: "Registry docs";
555
+ readonly href: "https://registry.agentskit.io";
556
+ }];
557
+ };
558
+ }];
559
+ };
560
+ declare const staleLocalKnowledgeArtifactFixture: {
561
+ readonly artifactId: "agentskit-docs-stale";
562
+ readonly contentHash: "sha256:c48a310e9497d1588e408bf7eb72ca64c04f25431ef8d17cd351b1d3bab3a3e9";
563
+ readonly generatedAt: "2026-07-11T00:00:00.000Z";
564
+ readonly expiresAt: "2026-07-12T00:00:00.000Z";
565
+ readonly protocol: "agentskit.chat.knowledge";
566
+ readonly version: 1;
567
+ readonly siteId: "agentskit-docs";
568
+ readonly entries: readonly [{
569
+ readonly id: "install-cli";
570
+ readonly kind: "command";
571
+ readonly label: "Install the CLI";
572
+ readonly match: {
573
+ readonly type: "exact";
574
+ readonly values: readonly ["install cli", "npm install agentskit"];
575
+ };
576
+ readonly answer: {
577
+ readonly markdown: "Run `npm install agentskit`.";
578
+ readonly citations: readonly [{
579
+ readonly id: "quickstart";
580
+ readonly title: "Quickstart";
581
+ readonly href: "/docs/quickstart";
582
+ }];
583
+ };
584
+ }, {
585
+ readonly id: "docs-agentskit";
586
+ readonly kind: "document";
587
+ readonly label: "AgentsKit documentation";
588
+ readonly match: {
589
+ readonly type: "exact";
590
+ readonly values: readonly ["docs", "agentskit docs"];
591
+ };
592
+ readonly answer: {
593
+ readonly markdown: "Open the AgentsKit documentation.";
594
+ readonly citations: readonly [{
595
+ readonly id: "agentskit-docs";
596
+ readonly title: "AgentsKit docs";
597
+ readonly href: "https://agentskit.io/docs";
598
+ }];
599
+ };
600
+ }, {
601
+ readonly id: "docs-registry";
602
+ readonly kind: "document";
603
+ readonly label: "Registry documentation";
604
+ readonly match: {
605
+ readonly type: "exact";
606
+ readonly values: readonly ["docs", "registry docs"];
607
+ };
608
+ readonly answer: {
609
+ readonly markdown: "Open the Registry documentation.";
610
+ readonly citations: readonly [{
611
+ readonly id: "registry-docs";
612
+ readonly title: "Registry docs";
613
+ readonly href: "https://registry.agentskit.io";
614
+ }];
615
+ };
616
+ }];
617
+ };
618
+ declare const deterministicAnswerFixtures: {
619
+ readonly local: {
620
+ readonly protocol: "agentskit.chat.answer";
621
+ readonly version: 1;
622
+ readonly outcome: "answer";
623
+ readonly query: "Install CLI";
624
+ readonly normalizedQuery: "install cli";
625
+ readonly answer: {
626
+ readonly markdown: "Run `npm install agentskit`.";
627
+ readonly citations: readonly [{
628
+ readonly id: "quickstart";
629
+ readonly title: "Quickstart";
630
+ readonly href: "/docs/quickstart";
631
+ }];
632
+ };
633
+ readonly provenance: {
634
+ readonly source: "local";
635
+ readonly artifactId: "agentskit-docs-2026-07-13";
636
+ readonly contentHash: "sha256:d1b98e69dcb00985dc5fdad4a8475f926168e6485e85716758ad5e0f35cd4906";
637
+ readonly entryIds: readonly ["install-cli"];
638
+ };
639
+ readonly confidence: {
640
+ readonly level: "high";
641
+ readonly basis: "exact";
642
+ };
643
+ };
644
+ readonly backend: {
645
+ readonly protocol: "agentskit.chat.answer";
646
+ readonly version: 1;
647
+ readonly outcome: "answer";
648
+ readonly query: "Compare runtimes";
649
+ readonly normalizedQuery: "compare runtimes";
650
+ readonly answer: {
651
+ readonly markdown: "The backend can answer open-ended comparisons.";
652
+ readonly citations: readonly [];
653
+ };
654
+ readonly provenance: {
655
+ readonly source: "backend";
656
+ readonly provider: "ask";
657
+ readonly model: "configured-by-host";
658
+ };
659
+ readonly confidence: {
660
+ readonly level: "high";
661
+ readonly basis: "backend";
662
+ };
663
+ };
664
+ readonly ambiguous: {
665
+ readonly protocol: "agentskit.chat.answer";
666
+ readonly version: 1;
667
+ readonly outcome: "choices";
668
+ readonly query: "docs";
669
+ readonly normalizedQuery: "docs";
670
+ readonly message: "More than one exact local answer matches. Choose one to continue.";
671
+ readonly suggestions: readonly [{
672
+ readonly id: "docs-agentskit";
673
+ readonly label: "AgentsKit documentation";
674
+ readonly value: "agentskit docs";
675
+ }, {
676
+ readonly id: "docs-registry";
677
+ readonly label: "Registry documentation";
678
+ readonly value: "registry docs";
679
+ }];
680
+ readonly provenance: {
681
+ readonly source: "local";
682
+ readonly artifactId: "agentskit-docs-2026-07-13";
683
+ readonly contentHash: "sha256:d1b98e69dcb00985dc5fdad4a8475f926168e6485e85716758ad5e0f35cd4906";
684
+ readonly entryIds: readonly ["docs-agentskit", "docs-registry"];
685
+ };
686
+ readonly confidence: {
687
+ readonly level: "medium";
688
+ readonly basis: "ambiguous";
689
+ };
690
+ };
691
+ readonly miss: {
692
+ readonly protocol: "agentskit.chat.answer";
693
+ readonly version: 1;
694
+ readonly outcome: "escalation";
695
+ readonly query: "Why?";
696
+ readonly normalizedQuery: "why?";
697
+ readonly message: "No exact local answer was found. A backend answer is required.";
698
+ readonly reason: "miss";
699
+ readonly confidence: {
700
+ readonly level: "low";
701
+ readonly basis: "miss";
702
+ };
703
+ };
704
+ readonly stale: {
705
+ readonly protocol: "agentskit.chat.answer";
706
+ readonly version: 1;
707
+ readonly outcome: "escalation";
708
+ readonly query: "install cli";
709
+ readonly normalizedQuery: "install cli";
710
+ readonly message: "Local knowledge is stale. A backend answer is required.";
711
+ readonly reason: "stale";
712
+ readonly confidence: {
713
+ readonly level: "low";
714
+ readonly basis: "stale";
715
+ };
716
+ };
717
+ readonly corrupt: {
718
+ readonly protocol: "agentskit.chat.answer";
719
+ readonly version: 1;
720
+ readonly outcome: "escalation";
721
+ readonly query: "install cli";
722
+ readonly normalizedQuery: "install cli";
723
+ readonly message: "Local knowledge is corrupt. A backend answer is required.";
724
+ readonly reason: "corrupt";
725
+ readonly confidence: {
726
+ readonly level: "low";
727
+ readonly basis: "corrupt";
728
+ };
729
+ };
730
+ readonly offline: {
731
+ readonly protocol: "agentskit.chat.answer";
732
+ readonly version: 1;
733
+ readonly outcome: "escalation";
734
+ readonly query: "Why?";
735
+ readonly normalizedQuery: "why?";
736
+ readonly message: "This question needs the backend, which is not available.";
737
+ readonly reason: "offline";
738
+ readonly confidence: {
739
+ readonly level: "low";
740
+ readonly basis: "offline";
741
+ };
742
+ };
743
+ };
744
+ declare const invalidDeterministicArtifactFixtures: readonly [{
745
+ readonly name: "unsupported version";
746
+ readonly artifact: {
747
+ readonly version: 2;
748
+ readonly protocol: "agentskit.chat.knowledge";
749
+ readonly artifactId: "agentskit-docs-2026-07-13";
750
+ readonly siteId: "agentskit-docs";
751
+ readonly contentHash: "sha256:d1b98e69dcb00985dc5fdad4a8475f926168e6485e85716758ad5e0f35cd4906";
752
+ readonly generatedAt: "2026-07-13T00:00:00.000Z";
753
+ readonly expiresAt: "2026-07-14T00:00:00.000Z";
754
+ readonly entries: readonly [{
755
+ readonly id: "install-cli";
756
+ readonly kind: "command";
757
+ readonly label: "Install the CLI";
758
+ readonly match: {
759
+ readonly type: "exact";
760
+ readonly values: readonly ["install cli", "npm install agentskit"];
761
+ };
762
+ readonly answer: {
763
+ readonly markdown: "Run `npm install agentskit`.";
764
+ readonly citations: readonly [{
765
+ readonly id: "quickstart";
766
+ readonly title: "Quickstart";
767
+ readonly href: "/docs/quickstart";
768
+ }];
769
+ };
770
+ }, {
771
+ readonly id: "docs-agentskit";
772
+ readonly kind: "document";
773
+ readonly label: "AgentsKit documentation";
774
+ readonly match: {
775
+ readonly type: "exact";
776
+ readonly values: readonly ["docs", "agentskit docs"];
777
+ };
778
+ readonly answer: {
779
+ readonly markdown: "Open the AgentsKit documentation.";
780
+ readonly citations: readonly [{
781
+ readonly id: "agentskit-docs";
782
+ readonly title: "AgentsKit docs";
783
+ readonly href: "https://agentskit.io/docs";
784
+ }];
785
+ };
786
+ }, {
787
+ readonly id: "docs-registry";
788
+ readonly kind: "document";
789
+ readonly label: "Registry documentation";
790
+ readonly match: {
791
+ readonly type: "exact";
792
+ readonly values: readonly ["docs", "registry docs"];
793
+ };
794
+ readonly answer: {
795
+ readonly markdown: "Open the Registry documentation.";
796
+ readonly citations: readonly [{
797
+ readonly id: "registry-docs";
798
+ readonly title: "Registry docs";
799
+ readonly href: "https://registry.agentskit.io";
800
+ }];
801
+ };
802
+ }];
803
+ };
804
+ readonly code: "DETERMINISTIC_UNSUPPORTED_VERSION";
805
+ }, {
806
+ readonly name: "corrupt artifact";
807
+ readonly artifact: {
808
+ readonly entries: readonly [{
809
+ readonly unexpected: true;
810
+ }];
811
+ readonly protocol: "agentskit.chat.knowledge";
812
+ readonly version: 1;
813
+ readonly artifactId: "agentskit-docs-2026-07-13";
814
+ readonly siteId: "agentskit-docs";
815
+ readonly contentHash: "sha256:d1b98e69dcb00985dc5fdad4a8475f926168e6485e85716758ad5e0f35cd4906";
816
+ readonly generatedAt: "2026-07-13T00:00:00.000Z";
817
+ readonly expiresAt: "2026-07-14T00:00:00.000Z";
818
+ };
819
+ readonly code: "DETERMINISTIC_INVALID_PAYLOAD";
820
+ }, {
821
+ readonly name: "hash mismatch";
822
+ readonly artifact: {
823
+ readonly protocol: "agentskit.chat.knowledge";
824
+ readonly version: 1;
825
+ readonly artifactId: "agentskit-docs-2026-07-13";
826
+ readonly siteId: "agentskit-docs";
827
+ readonly contentHash: "sha256:d1b98e69dcb00985dc5fdad4a8475f926168e6485e85716758ad5e0f35cd4906";
828
+ readonly generatedAt: "2026-07-13T00:00:00.000Z";
829
+ readonly expiresAt: "2026-07-14T00:00:00.000Z";
830
+ readonly entries: readonly [{
831
+ readonly id: "install-cli";
832
+ readonly kind: "command";
833
+ readonly label: "Install the CLI";
834
+ readonly match: {
835
+ readonly type: "exact";
836
+ readonly values: readonly ["install cli", "npm install agentskit"];
837
+ };
838
+ readonly answer: {
839
+ readonly markdown: "Run `npm install agentskit`.";
840
+ readonly citations: readonly [{
841
+ readonly id: "quickstart";
842
+ readonly title: "Quickstart";
843
+ readonly href: "/docs/quickstart";
844
+ }];
845
+ };
846
+ }, {
847
+ readonly id: "docs-agentskit";
848
+ readonly kind: "document";
849
+ readonly label: "AgentsKit documentation";
850
+ readonly match: {
851
+ readonly type: "exact";
852
+ readonly values: readonly ["docs", "agentskit docs"];
853
+ };
854
+ readonly answer: {
855
+ readonly markdown: "Open the AgentsKit documentation.";
856
+ readonly citations: readonly [{
857
+ readonly id: "agentskit-docs";
858
+ readonly title: "AgentsKit docs";
859
+ readonly href: "https://agentskit.io/docs";
860
+ }];
861
+ };
862
+ }, {
863
+ readonly id: "docs-registry";
864
+ readonly kind: "document";
865
+ readonly label: "Registry documentation";
866
+ readonly match: {
867
+ readonly type: "exact";
868
+ readonly values: readonly ["docs", "registry docs"];
869
+ };
870
+ readonly answer: {
871
+ readonly markdown: "Open the Registry documentation.";
872
+ readonly citations: readonly [{
873
+ readonly id: "registry-docs";
874
+ readonly title: "Registry docs";
875
+ readonly href: "https://registry.agentskit.io";
876
+ }];
877
+ };
878
+ }];
879
+ };
880
+ readonly expectedContentHash: `sha256:${string}`;
881
+ readonly code: "DETERMINISTIC_HASH_MISMATCH";
882
+ }];
883
+
884
+ export { type InvalidTurnEventFixture, type TurnEventFixture, deterministicAnswerFixtures, deterministicContentHashFixture, deterministicSiteConfigFixture, invalidChoiceListPropsFrame, invalidComponentFrameFixtures, invalidDeterministicArtifactFixtures, invalidTurnEventFixtures, localKnowledgeArtifactFixture, persistentSessionFixture, staleLocalKnowledgeArtifactFixture, standardComponentFrameFixtures, unknownComponentFrame, validChoiceListFrame, validTurnEventFixtures };