@codeworksh/plugin 0.0.1-dev.20260922103030

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.
Files changed (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -0
  3. package/error-ClDISWlT.d.mts +11 -0
  4. package/event-rIZpnOTo.d.mts +895 -0
  5. package/event.d.mts +2 -0
  6. package/event.mjs +125 -0
  7. package/event.mjs.map +1 -0
  8. package/filesystem-Cp-KapCE.d.mts +142 -0
  9. package/ids-CHjmAdTc.d.mts +43 -0
  10. package/ids.d.mts +2 -0
  11. package/ids.mjs +48 -0
  12. package/ids.mjs.map +1 -0
  13. package/index.d.mts +3 -0
  14. package/index.mjs +3 -0
  15. package/io-BYs7hbiY.d.mts +497 -0
  16. package/location-D4hAfuXF.d.mts +61 -0
  17. package/location.d.mts +2 -0
  18. package/location.mjs +48 -0
  19. package/location.mjs.map +1 -0
  20. package/package.json +200 -0
  21. package/plugin/prompt.d.mts +2 -0
  22. package/plugin/prompt.mjs +7 -0
  23. package/plugin/prompt.mjs.map +1 -0
  24. package/plugin/tool.d.mts +2 -0
  25. package/plugin/tool.mjs +29 -0
  26. package/plugin/tool.mjs.map +1 -0
  27. package/plugin-DbJEpY3M.d.mts +140 -0
  28. package/plugin-lorpq7Oi.mjs +41 -0
  29. package/plugin-lorpq7Oi.mjs.map +1 -0
  30. package/plugin.d.mts +4 -0
  31. package/plugin.mjs +4 -0
  32. package/posix.d.mts +6 -0
  33. package/posix.mjs +8 -0
  34. package/posix.mjs.map +1 -0
  35. package/project-CLGsIFD-.d.mts +21 -0
  36. package/project.d.mts +2 -0
  37. package/project.mjs +22 -0
  38. package/project.mjs.map +1 -0
  39. package/prompt-BcpagjGh.d.mts +10 -0
  40. package/repo.d.mts +42 -0
  41. package/repo.mjs +46 -0
  42. package/repo.mjs.map +1 -0
  43. package/rolldown-runtime-D7D4PA-g.mjs +13 -0
  44. package/sandbox/driver.d.mts +2 -0
  45. package/sandbox/driver.mjs +63 -0
  46. package/sandbox/driver.mjs.map +1 -0
  47. package/sandbox/error.d.mts +7 -0
  48. package/sandbox/error.mjs +15 -0
  49. package/sandbox/error.mjs.map +1 -0
  50. package/sandbox/errors.d.mts +2 -0
  51. package/sandbox/errors.mjs +160 -0
  52. package/sandbox/errors.mjs.map +1 -0
  53. package/sandbox/filesystem.d.mts +2 -0
  54. package/sandbox/filesystem.mjs +142 -0
  55. package/sandbox/filesystem.mjs.map +1 -0
  56. package/sandbox/instance.d.mts +2 -0
  57. package/sandbox/instance.mjs +144 -0
  58. package/sandbox/instance.mjs.map +1 -0
  59. package/sandbox/io.d.mts +2 -0
  60. package/sandbox/io.mjs +127 -0
  61. package/sandbox/io.mjs.map +1 -0
  62. package/sandbox/resource.d.mts +28 -0
  63. package/sandbox/resource.mjs +29 -0
  64. package/sandbox/resource.mjs.map +1 -0
  65. package/sandbox/shell.d.mts +2 -0
  66. package/sandbox/shell.mjs +93 -0
  67. package/sandbox/shell.mjs.map +1 -0
  68. package/sandbox.d.mts +17 -0
  69. package/sandbox.mjs +39 -0
  70. package/sandbox.mjs.map +1 -0
  71. package/schema.d.mts +91 -0
  72. package/schema.mjs +105 -0
  73. package/schema.mjs.map +1 -0
  74. package/settings-CYL6yyDD.d.mts +193 -0
  75. package/settings.d.mts +2 -0
  76. package/settings.mjs +102 -0
  77. package/settings.mjs.map +1 -0
  78. package/shell-CZ6Y4lNU.d.mts +109 -0
  79. package/space-CR-9UxdT.d.mts +25 -0
  80. package/space.d.mts +2 -0
  81. package/space.mjs +33 -0
  82. package/space.mjs.map +1 -0
  83. package/tool/error.d.mts +2 -0
  84. package/tool/error.mjs +11 -0
  85. package/tool/error.mjs.map +1 -0
  86. package/tool/progress.d.mts +2 -0
  87. package/tool/progress.mjs +11 -0
  88. package/tool/progress.mjs.map +1 -0
  89. package/tool-BoVqkYvL.d.mts +287 -0
  90. package/tool-DuYBgiJf.d.mts +142 -0
  91. package/tool.d.mts +2 -0
  92. package/tool.mjs +71 -0
  93. package/tool.mjs.map +1 -0
@@ -0,0 +1,895 @@
1
+ import { Schema } from "effect";
2
+ declare namespace event_d_exports {
3
+ export { AikitAssistantMessage, AikitToolCallTerminalPart, Data, Definition, event_d_exports as EventSchema, ID, Payload, PublishOptions, define, durable, inventory, latest, versionedType };
4
+ }
5
+ /**
6
+ * Effect Schema adapter for aikit's TypeBox assistant message. Durable LLM
7
+ * events use it to validate their payload and strip streaming-only fields.
8
+ */
9
+ declare const AikitAssistantMessage: Schema.decodeTo<Schema.declare<{
10
+ role: "assistant";
11
+ protocol: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
12
+ provider: {
13
+ id: string;
14
+ name: string;
15
+ source: "api" | "config" | "custom" | "env" | "unknown";
16
+ env: string[];
17
+ key?: string;
18
+ options?: Record<string, any>;
19
+ };
20
+ model: string;
21
+ usage: {
22
+ input: number;
23
+ output: number;
24
+ cacheRead: number;
25
+ cacheWrite: number;
26
+ cacheWrite1h?: number;
27
+ reasoning?: number;
28
+ totalTokens: number;
29
+ cost: {
30
+ input: number;
31
+ output: number;
32
+ cacheRead: number;
33
+ cacheWrite: number;
34
+ total: number;
35
+ };
36
+ };
37
+ stopReason: "aborted" | "error" | "length" | "stop" | "toolUse";
38
+ errorMessage?: string;
39
+ failure?: {
40
+ message: string;
41
+ retryable: boolean;
42
+ status?: number;
43
+ code?: string;
44
+ requestId?: string;
45
+ retryAfterMs?: number;
46
+ _tag: "Authentication";
47
+ reason: "expired" | "invalid" | "missing";
48
+ } | {
49
+ message: string;
50
+ retryable: boolean;
51
+ status?: number;
52
+ code?: string;
53
+ requestId?: string;
54
+ retryAfterMs?: number;
55
+ _tag: "Configuration";
56
+ } | {
57
+ message: string;
58
+ retryable: boolean;
59
+ status?: number;
60
+ code?: string;
61
+ requestId?: string;
62
+ retryAfterMs?: number;
63
+ _tag: "Authorization";
64
+ } | {
65
+ message: string;
66
+ retryable: boolean;
67
+ status?: number;
68
+ code?: string;
69
+ requestId?: string;
70
+ retryAfterMs?: number;
71
+ _tag: "ModelUnavailable";
72
+ } | {
73
+ message: string;
74
+ retryable: boolean;
75
+ status?: number;
76
+ code?: string;
77
+ requestId?: string;
78
+ retryAfterMs?: number;
79
+ _tag: "RateLimit";
80
+ } | {
81
+ message: string;
82
+ retryable: boolean;
83
+ status?: number;
84
+ code?: string;
85
+ requestId?: string;
86
+ retryAfterMs?: number;
87
+ _tag: "Quota";
88
+ } | {
89
+ message: string;
90
+ retryable: boolean;
91
+ status?: number;
92
+ code?: string;
93
+ requestId?: string;
94
+ retryAfterMs?: number;
95
+ _tag: "InvalidRequest";
96
+ } | {
97
+ message: string;
98
+ retryable: boolean;
99
+ status?: number;
100
+ code?: string;
101
+ requestId?: string;
102
+ retryAfterMs?: number;
103
+ _tag: "ContentPolicy";
104
+ } | {
105
+ message: string;
106
+ retryable: boolean;
107
+ status?: number;
108
+ code?: string;
109
+ requestId?: string;
110
+ retryAfterMs?: number;
111
+ _tag: "Timeout";
112
+ } | {
113
+ message: string;
114
+ retryable: boolean;
115
+ status?: number;
116
+ code?: string;
117
+ requestId?: string;
118
+ retryAfterMs?: number;
119
+ _tag: "Transport";
120
+ } | {
121
+ message: string;
122
+ retryable: boolean;
123
+ status?: number;
124
+ code?: string;
125
+ requestId?: string;
126
+ retryAfterMs?: number;
127
+ _tag: "Unavailable";
128
+ } | {
129
+ message: string;
130
+ retryable: boolean;
131
+ status?: number;
132
+ code?: string;
133
+ requestId?: string;
134
+ retryAfterMs?: number;
135
+ _tag: "InvalidResponse";
136
+ } | {
137
+ message: string;
138
+ retryable: boolean;
139
+ status?: number;
140
+ code?: string;
141
+ requestId?: string;
142
+ retryAfterMs?: number;
143
+ _tag: "Unknown";
144
+ };
145
+ time: {
146
+ created: number;
147
+ completed: number;
148
+ };
149
+ parts: ({
150
+ type: "text";
151
+ text: string;
152
+ textSignature?: string;
153
+ } | {
154
+ type: "image";
155
+ data: string;
156
+ mimeType: string;
157
+ } | {
158
+ type: "thinking";
159
+ thinking: string;
160
+ thinkingSignature?: string;
161
+ redacted?: boolean;
162
+ } | {
163
+ addedToolNames?: string[];
164
+ arguments: Record<string, any>;
165
+ callID: string;
166
+ name: string;
167
+ namespace?: string;
168
+ partial?: {
169
+ content?: ({
170
+ type: "text";
171
+ text: string;
172
+ textSignature?: string;
173
+ } | {
174
+ type: "image";
175
+ data: string;
176
+ mimeType: string;
177
+ })[];
178
+ details?: any;
179
+ };
180
+ status: "running";
181
+ thoughtSignature?: string;
182
+ time: {
183
+ start: number;
184
+ end: number;
185
+ };
186
+ type: "toolCall";
187
+ } | {
188
+ addedToolNames?: string[];
189
+ arguments: Record<string, any>;
190
+ callID: string;
191
+ name: string;
192
+ namespace?: string;
193
+ result: {
194
+ content: ({
195
+ type: "text";
196
+ text: string;
197
+ textSignature?: string;
198
+ } | {
199
+ type: "image";
200
+ data: string;
201
+ mimeType: string;
202
+ })[];
203
+ details?: any;
204
+ isError: false;
205
+ };
206
+ status: "completed";
207
+ thoughtSignature?: string;
208
+ time: {
209
+ start: number;
210
+ end: number;
211
+ };
212
+ type: "toolCall";
213
+ } | {
214
+ addedToolNames?: string[];
215
+ arguments: Record<string, any>;
216
+ callID: string;
217
+ name: string;
218
+ namespace?: string;
219
+ result: {
220
+ content: ({
221
+ type: "text";
222
+ text: string;
223
+ textSignature?: string;
224
+ } | {
225
+ type: "image";
226
+ data: string;
227
+ mimeType: string;
228
+ })[];
229
+ details?: any;
230
+ isError: true;
231
+ };
232
+ status: "error";
233
+ thoughtSignature?: string;
234
+ time: {
235
+ start: number;
236
+ end: number;
237
+ };
238
+ type: "toolCall";
239
+ } | {
240
+ addedToolNames?: string[];
241
+ arguments: Record<string, any>;
242
+ callID: string;
243
+ name: string;
244
+ namespace?: string;
245
+ result: {
246
+ content: ({
247
+ type: "text";
248
+ text: string;
249
+ textSignature?: string;
250
+ } | {
251
+ type: "image";
252
+ data: string;
253
+ mimeType: string;
254
+ })[];
255
+ details?: any;
256
+ isError: true;
257
+ };
258
+ status: "skipped";
259
+ thoughtSignature?: string;
260
+ time: {
261
+ start: number;
262
+ end: number;
263
+ };
264
+ type: "toolCall";
265
+ } | {
266
+ addedToolNames?: string[];
267
+ arguments: Record<string, any>;
268
+ callID: string;
269
+ name: string;
270
+ namespace?: string;
271
+ result: {
272
+ content: ({
273
+ type: "text";
274
+ text: string;
275
+ textSignature?: string;
276
+ } | {
277
+ type: "image";
278
+ data: string;
279
+ mimeType: string;
280
+ })[];
281
+ details?: any;
282
+ isError: true;
283
+ };
284
+ status: "aborted";
285
+ thoughtSignature?: string;
286
+ time: {
287
+ start: number;
288
+ end: number;
289
+ };
290
+ type: "toolCall";
291
+ } | ({
292
+ type: "toolCall";
293
+ callID: string;
294
+ name: string;
295
+ arguments: Record<string, any>;
296
+ thoughtSignature?: string;
297
+ namespace?: string;
298
+ addedToolNames?: string[];
299
+ time: {
300
+ start: number;
301
+ end: number;
302
+ };
303
+ } & {
304
+ status: "pending";
305
+ }))[];
306
+ responseId?: string;
307
+ responseModel?: string;
308
+ messageId: string;
309
+ }, {
310
+ role: "assistant";
311
+ protocol: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-codex" | "openai-compatible" | "openrouter" | "xai";
312
+ provider: {
313
+ id: string;
314
+ name: string;
315
+ source: "api" | "config" | "custom" | "env" | "unknown";
316
+ env: string[];
317
+ key?: string;
318
+ options?: Record<string, any>;
319
+ };
320
+ model: string;
321
+ usage: {
322
+ input: number;
323
+ output: number;
324
+ cacheRead: number;
325
+ cacheWrite: number;
326
+ cacheWrite1h?: number;
327
+ reasoning?: number;
328
+ totalTokens: number;
329
+ cost: {
330
+ input: number;
331
+ output: number;
332
+ cacheRead: number;
333
+ cacheWrite: number;
334
+ total: number;
335
+ };
336
+ };
337
+ stopReason: "aborted" | "error" | "length" | "stop" | "toolUse";
338
+ errorMessage?: string;
339
+ failure?: {
340
+ message: string;
341
+ retryable: boolean;
342
+ status?: number;
343
+ code?: string;
344
+ requestId?: string;
345
+ retryAfterMs?: number;
346
+ _tag: "Authentication";
347
+ reason: "expired" | "invalid" | "missing";
348
+ } | {
349
+ message: string;
350
+ retryable: boolean;
351
+ status?: number;
352
+ code?: string;
353
+ requestId?: string;
354
+ retryAfterMs?: number;
355
+ _tag: "Configuration";
356
+ } | {
357
+ message: string;
358
+ retryable: boolean;
359
+ status?: number;
360
+ code?: string;
361
+ requestId?: string;
362
+ retryAfterMs?: number;
363
+ _tag: "Authorization";
364
+ } | {
365
+ message: string;
366
+ retryable: boolean;
367
+ status?: number;
368
+ code?: string;
369
+ requestId?: string;
370
+ retryAfterMs?: number;
371
+ _tag: "ModelUnavailable";
372
+ } | {
373
+ message: string;
374
+ retryable: boolean;
375
+ status?: number;
376
+ code?: string;
377
+ requestId?: string;
378
+ retryAfterMs?: number;
379
+ _tag: "RateLimit";
380
+ } | {
381
+ message: string;
382
+ retryable: boolean;
383
+ status?: number;
384
+ code?: string;
385
+ requestId?: string;
386
+ retryAfterMs?: number;
387
+ _tag: "Quota";
388
+ } | {
389
+ message: string;
390
+ retryable: boolean;
391
+ status?: number;
392
+ code?: string;
393
+ requestId?: string;
394
+ retryAfterMs?: number;
395
+ _tag: "InvalidRequest";
396
+ } | {
397
+ message: string;
398
+ retryable: boolean;
399
+ status?: number;
400
+ code?: string;
401
+ requestId?: string;
402
+ retryAfterMs?: number;
403
+ _tag: "ContentPolicy";
404
+ } | {
405
+ message: string;
406
+ retryable: boolean;
407
+ status?: number;
408
+ code?: string;
409
+ requestId?: string;
410
+ retryAfterMs?: number;
411
+ _tag: "Timeout";
412
+ } | {
413
+ message: string;
414
+ retryable: boolean;
415
+ status?: number;
416
+ code?: string;
417
+ requestId?: string;
418
+ retryAfterMs?: number;
419
+ _tag: "Transport";
420
+ } | {
421
+ message: string;
422
+ retryable: boolean;
423
+ status?: number;
424
+ code?: string;
425
+ requestId?: string;
426
+ retryAfterMs?: number;
427
+ _tag: "Unavailable";
428
+ } | {
429
+ message: string;
430
+ retryable: boolean;
431
+ status?: number;
432
+ code?: string;
433
+ requestId?: string;
434
+ retryAfterMs?: number;
435
+ _tag: "InvalidResponse";
436
+ } | {
437
+ message: string;
438
+ retryable: boolean;
439
+ status?: number;
440
+ code?: string;
441
+ requestId?: string;
442
+ retryAfterMs?: number;
443
+ _tag: "Unknown";
444
+ };
445
+ time: {
446
+ created: number;
447
+ completed: number;
448
+ };
449
+ parts: ({
450
+ type: "text";
451
+ text: string;
452
+ textSignature?: string;
453
+ } | {
454
+ type: "image";
455
+ data: string;
456
+ mimeType: string;
457
+ } | {
458
+ type: "thinking";
459
+ thinking: string;
460
+ thinkingSignature?: string;
461
+ redacted?: boolean;
462
+ } | {
463
+ addedToolNames?: string[];
464
+ arguments: Record<string, any>;
465
+ callID: string;
466
+ name: string;
467
+ namespace?: string;
468
+ partial?: {
469
+ content?: ({
470
+ type: "text";
471
+ text: string;
472
+ textSignature?: string;
473
+ } | {
474
+ type: "image";
475
+ data: string;
476
+ mimeType: string;
477
+ })[];
478
+ details?: any;
479
+ };
480
+ status: "running";
481
+ thoughtSignature?: string;
482
+ time: {
483
+ start: number;
484
+ end: number;
485
+ };
486
+ type: "toolCall";
487
+ } | {
488
+ addedToolNames?: string[];
489
+ arguments: Record<string, any>;
490
+ callID: string;
491
+ name: string;
492
+ namespace?: string;
493
+ result: {
494
+ content: ({
495
+ type: "text";
496
+ text: string;
497
+ textSignature?: string;
498
+ } | {
499
+ type: "image";
500
+ data: string;
501
+ mimeType: string;
502
+ })[];
503
+ details?: any;
504
+ isError: false;
505
+ };
506
+ status: "completed";
507
+ thoughtSignature?: string;
508
+ time: {
509
+ start: number;
510
+ end: number;
511
+ };
512
+ type: "toolCall";
513
+ } | {
514
+ addedToolNames?: string[];
515
+ arguments: Record<string, any>;
516
+ callID: string;
517
+ name: string;
518
+ namespace?: string;
519
+ result: {
520
+ content: ({
521
+ type: "text";
522
+ text: string;
523
+ textSignature?: string;
524
+ } | {
525
+ type: "image";
526
+ data: string;
527
+ mimeType: string;
528
+ })[];
529
+ details?: any;
530
+ isError: true;
531
+ };
532
+ status: "error";
533
+ thoughtSignature?: string;
534
+ time: {
535
+ start: number;
536
+ end: number;
537
+ };
538
+ type: "toolCall";
539
+ } | {
540
+ addedToolNames?: string[];
541
+ arguments: Record<string, any>;
542
+ callID: string;
543
+ name: string;
544
+ namespace?: string;
545
+ result: {
546
+ content: ({
547
+ type: "text";
548
+ text: string;
549
+ textSignature?: string;
550
+ } | {
551
+ type: "image";
552
+ data: string;
553
+ mimeType: string;
554
+ })[];
555
+ details?: any;
556
+ isError: true;
557
+ };
558
+ status: "skipped";
559
+ thoughtSignature?: string;
560
+ time: {
561
+ start: number;
562
+ end: number;
563
+ };
564
+ type: "toolCall";
565
+ } | {
566
+ addedToolNames?: string[];
567
+ arguments: Record<string, any>;
568
+ callID: string;
569
+ name: string;
570
+ namespace?: string;
571
+ result: {
572
+ content: ({
573
+ type: "text";
574
+ text: string;
575
+ textSignature?: string;
576
+ } | {
577
+ type: "image";
578
+ data: string;
579
+ mimeType: string;
580
+ })[];
581
+ details?: any;
582
+ isError: true;
583
+ };
584
+ status: "aborted";
585
+ thoughtSignature?: string;
586
+ time: {
587
+ start: number;
588
+ end: number;
589
+ };
590
+ type: "toolCall";
591
+ } | ({
592
+ type: "toolCall";
593
+ callID: string;
594
+ name: string;
595
+ arguments: Record<string, any>;
596
+ thoughtSignature?: string;
597
+ namespace?: string;
598
+ addedToolNames?: string[];
599
+ time: {
600
+ start: number;
601
+ end: number;
602
+ };
603
+ } & {
604
+ status: "pending";
605
+ }))[];
606
+ responseId?: string;
607
+ responseModel?: string;
608
+ messageId: string;
609
+ }>, Schema.Unknown, never, never>;
610
+ type AikitAssistantMessage = typeof AikitAssistantMessage.Type;
611
+ declare const AikitToolCallTerminalPart: Schema.decodeTo<Schema.declare<{
612
+ addedToolNames?: string[];
613
+ arguments: Record<string, any>;
614
+ callID: string;
615
+ name: string;
616
+ namespace?: string;
617
+ result: {
618
+ content: ({
619
+ type: "text";
620
+ text: string;
621
+ textSignature?: string;
622
+ } | {
623
+ type: "image";
624
+ data: string;
625
+ mimeType: string;
626
+ })[];
627
+ details?: any;
628
+ isError: false;
629
+ };
630
+ status: "completed";
631
+ thoughtSignature?: string;
632
+ time: {
633
+ start: number;
634
+ end: number;
635
+ };
636
+ type: "toolCall";
637
+ } | {
638
+ addedToolNames?: string[];
639
+ arguments: Record<string, any>;
640
+ callID: string;
641
+ name: string;
642
+ namespace?: string;
643
+ result: {
644
+ content: ({
645
+ type: "text";
646
+ text: string;
647
+ textSignature?: string;
648
+ } | {
649
+ type: "image";
650
+ data: string;
651
+ mimeType: string;
652
+ })[];
653
+ details?: any;
654
+ isError: true;
655
+ };
656
+ status: "error";
657
+ thoughtSignature?: string;
658
+ time: {
659
+ start: number;
660
+ end: number;
661
+ };
662
+ type: "toolCall";
663
+ } | {
664
+ addedToolNames?: string[];
665
+ arguments: Record<string, any>;
666
+ callID: string;
667
+ name: string;
668
+ namespace?: string;
669
+ result: {
670
+ content: ({
671
+ type: "text";
672
+ text: string;
673
+ textSignature?: string;
674
+ } | {
675
+ type: "image";
676
+ data: string;
677
+ mimeType: string;
678
+ })[];
679
+ details?: any;
680
+ isError: true;
681
+ };
682
+ status: "skipped";
683
+ thoughtSignature?: string;
684
+ time: {
685
+ start: number;
686
+ end: number;
687
+ };
688
+ type: "toolCall";
689
+ } | {
690
+ addedToolNames?: string[];
691
+ arguments: Record<string, any>;
692
+ callID: string;
693
+ name: string;
694
+ namespace?: string;
695
+ result: {
696
+ content: ({
697
+ type: "text";
698
+ text: string;
699
+ textSignature?: string;
700
+ } | {
701
+ type: "image";
702
+ data: string;
703
+ mimeType: string;
704
+ })[];
705
+ details?: any;
706
+ isError: true;
707
+ };
708
+ status: "aborted";
709
+ thoughtSignature?: string;
710
+ time: {
711
+ start: number;
712
+ end: number;
713
+ };
714
+ type: "toolCall";
715
+ }, {
716
+ addedToolNames?: string[];
717
+ arguments: Record<string, any>;
718
+ callID: string;
719
+ name: string;
720
+ namespace?: string;
721
+ result: {
722
+ content: ({
723
+ type: "text";
724
+ text: string;
725
+ textSignature?: string;
726
+ } | {
727
+ type: "image";
728
+ data: string;
729
+ mimeType: string;
730
+ })[];
731
+ details?: any;
732
+ isError: false;
733
+ };
734
+ status: "completed";
735
+ thoughtSignature?: string;
736
+ time: {
737
+ start: number;
738
+ end: number;
739
+ };
740
+ type: "toolCall";
741
+ } | {
742
+ addedToolNames?: string[];
743
+ arguments: Record<string, any>;
744
+ callID: string;
745
+ name: string;
746
+ namespace?: string;
747
+ result: {
748
+ content: ({
749
+ type: "text";
750
+ text: string;
751
+ textSignature?: string;
752
+ } | {
753
+ type: "image";
754
+ data: string;
755
+ mimeType: string;
756
+ })[];
757
+ details?: any;
758
+ isError: true;
759
+ };
760
+ status: "error";
761
+ thoughtSignature?: string;
762
+ time: {
763
+ start: number;
764
+ end: number;
765
+ };
766
+ type: "toolCall";
767
+ } | {
768
+ addedToolNames?: string[];
769
+ arguments: Record<string, any>;
770
+ callID: string;
771
+ name: string;
772
+ namespace?: string;
773
+ result: {
774
+ content: ({
775
+ type: "text";
776
+ text: string;
777
+ textSignature?: string;
778
+ } | {
779
+ type: "image";
780
+ data: string;
781
+ mimeType: string;
782
+ })[];
783
+ details?: any;
784
+ isError: true;
785
+ };
786
+ status: "skipped";
787
+ thoughtSignature?: string;
788
+ time: {
789
+ start: number;
790
+ end: number;
791
+ };
792
+ type: "toolCall";
793
+ } | {
794
+ addedToolNames?: string[];
795
+ arguments: Record<string, any>;
796
+ callID: string;
797
+ name: string;
798
+ namespace?: string;
799
+ result: {
800
+ content: ({
801
+ type: "text";
802
+ text: string;
803
+ textSignature?: string;
804
+ } | {
805
+ type: "image";
806
+ data: string;
807
+ mimeType: string;
808
+ })[];
809
+ details?: any;
810
+ isError: true;
811
+ };
812
+ status: "aborted";
813
+ thoughtSignature?: string;
814
+ time: {
815
+ start: number;
816
+ end: number;
817
+ };
818
+ type: "toolCall";
819
+ }>, Schema.Unknown, never, never>;
820
+ type AikitToolCallTerminalPart = typeof AikitToolCallTerminalPart.Type;
821
+ declare const ID: Schema.brand<Schema.String, "Event.ID"> & {
822
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
823
+ };
824
+ type ID = typeof ID.Type;
825
+ type Definition<Type extends string = string, DataSchema extends Schema.Codec<unknown, unknown> = Schema.Codec<unknown, unknown>> = Schema.Top & {
826
+ readonly type: Type;
827
+ readonly durable?: {
828
+ readonly version: number;
829
+ readonly aggregate: string;
830
+ };
831
+ readonly data: DataSchema;
832
+ };
833
+ type Data<D extends Definition> = Schema.Schema.Type<D["data"]>;
834
+ /** Publish-time options. Lives beside the definition so the plugin-facing publisher can name it. */
835
+ interface PublishOptions {
836
+ /** Caller-supplied event ID. Publishing the same ID twice is a defect, not an upsert. */
837
+ readonly id?: ID;
838
+ /**
839
+ * Publish-time context — correlation, tracing — carried to projectors on the
840
+ * in-memory payload and deliberately not stored in the event row. A projector
841
+ * persists it into its own projection if it means something there; the log
842
+ * records what happened, not who asked. It therefore does not survive a
843
+ * durable reread or a rebuild, which `event.test.ts` pins explicitly.
844
+ */
845
+ readonly metadata?: Record<string, string>;
846
+ }
847
+ type Payload<D extends Definition = Definition> = {
848
+ readonly id: ID;
849
+ readonly type: D["type"];
850
+ readonly data: Data<D>;
851
+ readonly durable?: {
852
+ readonly aggregateId: string;
853
+ readonly seq: number;
854
+ readonly version: number;
855
+ };
856
+ readonly metadata?: Record<string, string>;
857
+ };
858
+ declare function define<const Type extends string, const Fields extends Readonly<Record<PropertyKey, Schema.Codec<unknown, unknown>>>>(input: {
859
+ readonly type: Type;
860
+ readonly durable?: {
861
+ readonly version: number;
862
+ readonly aggregate: string;
863
+ };
864
+ readonly schema: Fields;
865
+ }): Schema.Struct<{
866
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
867
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
868
+ };
869
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
870
+ readonly type: Schema.Literal<Type>;
871
+ readonly durable: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
872
+ readonly aggregateId: Schema.String;
873
+ readonly seq: Schema.Int;
874
+ readonly version: Schema.Int;
875
+ }>>>, Schema.optionalKey<Schema.Struct<{
876
+ readonly aggregateId: Schema.String;
877
+ readonly seq: Schema.Int;
878
+ readonly version: Schema.Int;
879
+ }>>, never, never>;
880
+ readonly data: Schema.Struct<Fields>;
881
+ }> & {
882
+ type: Type;
883
+ durable?: {
884
+ readonly version: number;
885
+ readonly aggregate: string;
886
+ };
887
+ data: Schema.Struct<Fields>;
888
+ };
889
+ declare function inventory<const Definitions extends ReadonlyArray<Definition>>(...definitions: Definitions): Readonly<Definitions>;
890
+ declare function versionedType(type: string, version: number): string;
891
+ declare function durable<const Definitions extends ReadonlyArray<Definition>>(definitions: Definitions): ReadonlyMap<string, Definitions[number]>;
892
+ declare function latest(definitions: ReadonlyArray<Definition>): ReadonlyMap<string, Definition<string, Schema.Codec<unknown, unknown, never, never>>>;
893
+ //#endregion
894
+ export { ID as a, define as c, inventory as d, latest as f, Definition as i, durable as l, AikitToolCallTerminalPart as n, Payload as o, versionedType as p, Data as r, PublishOptions as s, AikitAssistantMessage as t, event_d_exports as u };
895
+ //# sourceMappingURL=event-rIZpnOTo.d.mts.map