@illalabs/interfaces 0.3.0-canary.361ed2fa → 0.3.0-canary.4647332c

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 (63) hide show
  1. package/dist/errors/endpoints/chat/ChatBaseError.d.ts +16 -5
  2. package/dist/errors/endpoints/chat/ChatBaseError.d.ts.map +1 -1
  3. package/dist/interfaces/chat/response.d.ts +2 -0
  4. package/dist/interfaces/chat/response.d.ts.map +1 -1
  5. package/dist/schemas/chatContext.d.ts +22 -6
  6. package/dist/schemas/chatContext.d.ts.map +1 -1
  7. package/dist/schemas/chatRequestBody.d.ts +82 -24
  8. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  9. package/dist/schemas/chatRequestBody.js +2 -0
  10. package/dist/schemas/chatRequestBody.js.map +1 -1
  11. package/dist/schemas/index.d.ts +1 -0
  12. package/dist/schemas/index.d.ts.map +1 -1
  13. package/dist/schemas/index.js +1 -0
  14. package/dist/schemas/index.js.map +1 -1
  15. package/dist/schemas/messages.d.ts +33 -1
  16. package/dist/schemas/messages.d.ts.map +1 -1
  17. package/dist/schemas/messages.js +14 -1
  18. package/dist/schemas/messages.js.map +1 -1
  19. package/dist/schemas/telemetryEvents.d.ts +1159 -0
  20. package/dist/schemas/telemetryEvents.d.ts.map +1 -0
  21. package/dist/schemas/telemetryEvents.js +250 -0
  22. package/dist/schemas/telemetryEvents.js.map +1 -0
  23. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  24. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  25. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  26. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  27. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  28. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  29. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  30. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  31. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  32. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  33. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  34. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  35. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  36. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  37. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  38. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  39. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  40. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  41. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  42. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  43. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +2 -2
  44. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  45. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  46. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  47. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  48. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  49. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  50. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  51. package/dist/types/index.d.ts +2 -0
  52. package/dist/types/index.d.ts.map +1 -1
  53. package/dist/types/index.js +2 -0
  54. package/dist/types/index.js.map +1 -1
  55. package/dist/types/streaming.d.ts +81 -0
  56. package/dist/types/streaming.d.ts.map +1 -0
  57. package/dist/types/streaming.js +2 -0
  58. package/dist/types/streaming.js.map +1 -0
  59. package/dist/types/telemetry.d.ts +139 -0
  60. package/dist/types/telemetry.d.ts.map +1 -0
  61. package/dist/types/telemetry.js +7 -0
  62. package/dist/types/telemetry.js.map +1 -0
  63. package/package.json +3 -3
@@ -1,8 +1,19 @@
1
+ /**
2
+ * Base error type for chat endpoint errors with context.
3
+ * Used for structured error responses from the API.
4
+ */
1
5
  export type ChatBaseWithContextError = {
2
- name: string;
3
- message: string;
4
- statusCode: number;
5
- details?: unknown;
6
- ctx?: unknown;
6
+ /** Error name/identifier */
7
+ readonly name: string;
8
+ /** Human-readable error message */
9
+ readonly message: string;
10
+ /** HTTP status code */
11
+ readonly statusCode: number;
12
+ /** Unique request identifier for tracing */
13
+ readonly requestId?: string;
14
+ /** Additional error details */
15
+ readonly details?: unknown;
16
+ /** Error context */
17
+ readonly ctx?: unknown;
7
18
  };
8
19
  //# sourceMappingURL=ChatBaseError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatBaseError.d.ts","sourceRoot":"","sources":["../../../../src/errors/endpoints/chat/ChatBaseError.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC"}
1
+ {"version":3,"file":"ChatBaseError.d.ts","sourceRoot":"","sources":["../../../../src/errors/endpoints/chat/ChatBaseError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,uBAAuB;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB;IACpB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC"}
@@ -10,6 +10,8 @@ export interface CoreApiChatSuccessResponse extends BaseApiSuccessResponse {
10
10
  readonly text: string;
11
11
  readonly pendingTools?: ReadonlyArray<PendingToolCallType>;
12
12
  readonly toolErrors?: ReadonlyArray<IllaToolErrorJSON>;
13
+ /** Request ID for subscribing to telemetry events */
14
+ readonly requestId?: string;
13
15
  }
14
16
  /**
15
17
  * Union type of all possible chat error responses
@@ -1 +1 @@
1
- {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/interfaces/chat/response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACtE,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC1D;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,0BAA0B,GAAG,wBAAwB,CAAC"}
1
+ {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/interfaces/chat/response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACtE,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvD,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,0BAA0B,GAAG,wBAAwB,CAAC"}
@@ -87,14 +87,29 @@ export declare const ChatContextSchema: z.ZodObject<Pick<{
87
87
  address: string;
88
88
  }>;
89
89
  prompt: z.ZodOptional<z.ZodObject<{
90
- type: z.ZodLiteral<"text">;
91
- text: z.ZodString;
90
+ role: z.ZodLiteral<"user">;
91
+ content: z.ZodArray<z.ZodObject<{
92
+ type: z.ZodLiteral<"text">;
93
+ text: z.ZodString;
94
+ }, "strict", z.ZodTypeAny, {
95
+ type: "text";
96
+ text: string;
97
+ }, {
98
+ type: "text";
99
+ text: string;
100
+ }>, "many">;
92
101
  }, "strict", z.ZodTypeAny, {
93
- type: "text";
94
- text: string;
102
+ role: "user";
103
+ content: {
104
+ type: "text";
105
+ text: string;
106
+ }[];
95
107
  }, {
96
- type: "text";
97
- text: string;
108
+ role: "user";
109
+ content: {
110
+ type: "text";
111
+ text: string;
112
+ }[];
98
113
  }>>;
99
114
  toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
100
115
  id: z.ZodString;
@@ -176,6 +191,7 @@ export declare const ChatContextSchema: z.ZodObject<Pick<{
176
191
  }, {
177
192
  channel: "text" | "voice";
178
193
  }>>>;
194
+ requestId: z.ZodOptional<z.ZodString>;
179
195
  }, "messages"> & {
180
196
  toolsConfig: z.ZodObject<{
181
197
  autoRouter: z.ZodOptional<z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"chatContext.d.ts","sourceRoot":"","sources":["../../src/schemas/chatContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI7B,CAAC"}
1
+ {"version":3,"file":"chatContext.d.ts","sourceRoot":"","sources":["../../src/schemas/chatContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI7B,CAAC"}
@@ -87,14 +87,29 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
87
87
  address: string;
88
88
  }>;
89
89
  prompt: z.ZodOptional<z.ZodObject<{
90
- type: z.ZodLiteral<"text">;
91
- text: z.ZodString;
90
+ role: z.ZodLiteral<"user">;
91
+ content: z.ZodArray<z.ZodObject<{
92
+ type: z.ZodLiteral<"text">;
93
+ text: z.ZodString;
94
+ }, "strict", z.ZodTypeAny, {
95
+ type: "text";
96
+ text: string;
97
+ }, {
98
+ type: "text";
99
+ text: string;
100
+ }>, "many">;
92
101
  }, "strict", z.ZodTypeAny, {
93
- type: "text";
94
- text: string;
102
+ role: "user";
103
+ content: {
104
+ type: "text";
105
+ text: string;
106
+ }[];
95
107
  }, {
96
- type: "text";
97
- text: string;
108
+ role: "user";
109
+ content: {
110
+ type: "text";
111
+ text: string;
112
+ }[];
98
113
  }>>;
99
114
  toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
100
115
  id: z.ZodString;
@@ -176,6 +191,8 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
176
191
  }, {
177
192
  channel: "text" | "voice";
178
193
  }>>>;
194
+ /** Client-generated request ID for telemetry subscription */
195
+ requestId: z.ZodOptional<z.ZodString>;
179
196
  }, "strict", z.ZodTypeAny, {
180
197
  toolsConfig: {
181
198
  autoRouter?: {
@@ -200,8 +217,11 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
200
217
  channel: "text" | "voice";
201
218
  };
202
219
  prompt?: {
203
- type: "text";
204
- text: string;
220
+ role: "user";
221
+ content: {
222
+ type: "text";
223
+ text: string;
224
+ }[];
205
225
  } | undefined;
206
226
  toolResults?: {
207
227
  id: string;
@@ -219,6 +239,7 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
219
239
  details?: unknown;
220
240
  } | undefined;
221
241
  }[] | undefined;
242
+ requestId?: string | undefined;
222
243
  }, {
223
244
  toolsConfig: {
224
245
  autoRouter?: {
@@ -240,8 +261,11 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
240
261
  };
241
262
  languageModel: string;
242
263
  prompt?: {
243
- type: "text";
244
- text: string;
264
+ role: "user";
265
+ content: {
266
+ type: "text";
267
+ text: string;
268
+ }[];
245
269
  } | undefined;
246
270
  toolResults?: {
247
271
  id: string;
@@ -262,6 +286,7 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
262
286
  personalityContext?: {
263
287
  channel: "text" | "voice";
264
288
  } | undefined;
289
+ requestId?: string | undefined;
265
290
  }>;
266
291
  export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
267
292
  toolsConfig: z.ZodObject<{
@@ -351,14 +376,29 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
351
376
  address: string;
352
377
  }>;
353
378
  prompt: z.ZodOptional<z.ZodObject<{
354
- type: z.ZodLiteral<"text">;
355
- text: z.ZodString;
379
+ role: z.ZodLiteral<"user">;
380
+ content: z.ZodArray<z.ZodObject<{
381
+ type: z.ZodLiteral<"text">;
382
+ text: z.ZodString;
383
+ }, "strict", z.ZodTypeAny, {
384
+ type: "text";
385
+ text: string;
386
+ }, {
387
+ type: "text";
388
+ text: string;
389
+ }>, "many">;
356
390
  }, "strict", z.ZodTypeAny, {
357
- type: "text";
358
- text: string;
391
+ role: "user";
392
+ content: {
393
+ type: "text";
394
+ text: string;
395
+ }[];
359
396
  }, {
360
- type: "text";
361
- text: string;
397
+ role: "user";
398
+ content: {
399
+ type: "text";
400
+ text: string;
401
+ }[];
362
402
  }>>;
363
403
  toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
364
404
  id: z.ZodString;
@@ -440,6 +480,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
440
480
  }, {
441
481
  channel: "text" | "voice";
442
482
  }>>>;
483
+ /** Client-generated request ID for telemetry subscription */
484
+ requestId: z.ZodOptional<z.ZodString>;
443
485
  }, "strict", z.ZodTypeAny, {
444
486
  toolsConfig: {
445
487
  autoRouter?: {
@@ -464,8 +506,11 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
464
506
  channel: "text" | "voice";
465
507
  };
466
508
  prompt?: {
467
- type: "text";
468
- text: string;
509
+ role: "user";
510
+ content: {
511
+ type: "text";
512
+ text: string;
513
+ }[];
469
514
  } | undefined;
470
515
  toolResults?: {
471
516
  id: string;
@@ -483,6 +528,7 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
483
528
  details?: unknown;
484
529
  } | undefined;
485
530
  }[] | undefined;
531
+ requestId?: string | undefined;
486
532
  }, {
487
533
  toolsConfig: {
488
534
  autoRouter?: {
@@ -504,8 +550,11 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
504
550
  };
505
551
  languageModel: string;
506
552
  prompt?: {
507
- type: "text";
508
- text: string;
553
+ role: "user";
554
+ content: {
555
+ type: "text";
556
+ text: string;
557
+ }[];
509
558
  } | undefined;
510
559
  toolResults?: {
511
560
  id: string;
@@ -526,6 +575,7 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
526
575
  personalityContext?: {
527
576
  channel: "text" | "voice";
528
577
  } | undefined;
578
+ requestId?: string | undefined;
529
579
  }>, {
530
580
  toolsConfig: {
531
581
  autoRouter?: {
@@ -550,8 +600,11 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
550
600
  channel: "text" | "voice";
551
601
  };
552
602
  prompt?: {
553
- type: "text";
554
- text: string;
603
+ role: "user";
604
+ content: {
605
+ type: "text";
606
+ text: string;
607
+ }[];
555
608
  } | undefined;
556
609
  toolResults?: {
557
610
  id: string;
@@ -569,6 +622,7 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
569
622
  details?: unknown;
570
623
  } | undefined;
571
624
  }[] | undefined;
625
+ requestId?: string | undefined;
572
626
  }, {
573
627
  toolsConfig: {
574
628
  autoRouter?: {
@@ -590,8 +644,11 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
590
644
  };
591
645
  languageModel: string;
592
646
  prompt?: {
593
- type: "text";
594
- text: string;
647
+ role: "user";
648
+ content: {
649
+ type: "text";
650
+ text: string;
651
+ }[];
595
652
  } | undefined;
596
653
  toolResults?: {
597
654
  id: string;
@@ -612,5 +669,6 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
612
669
  personalityContext?: {
613
670
  channel: "text" | "voice";
614
671
  } | undefined;
672
+ requestId?: string | undefined;
615
673
  }>;
616
674
  //# sourceMappingURL=chatRequestBody.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chatRequestBody.d.ts","sourceRoot":"","sources":["../../src/schemas/chatRequestBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEd,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E,CAAC"}
@@ -12,6 +12,8 @@ export const CoreApiChatBodyRequestBaseSchema = z
12
12
  toolResults: ToolOutcomesSchema.optional(),
13
13
  languageModel: z.string(),
14
14
  personalityContext: PersonalityContextSchema,
15
+ /** Client-generated request ID for telemetry subscription */
16
+ requestId: z.string().uuid().optional(),
15
17
  })
16
18
  .strict();
17
19
  export const CoreApiChatBodyRequestSchema = CoreApiChatBodyRequestBaseSchema.refine((data) => data.prompt !== undefined ||
@@ -1 +1 @@
1
- {"version":3,"file":"chatRequestBody.js","sourceRoot":"","sources":["../../src/schemas/chatRequestBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC5C,MAAM,CAAC;IACJ,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,iBAAiB;IAC9B,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC/B,WAAW,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IAC1C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,kBAAkB,EAAE,wBAAwB;CAC/C,CAAC;KACD,MAAM,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,4BAA4B,GAAG,gCAAgC,CAAC,MAAM,CAC/E,CAAC,IAAI,EAAE,EAAE,CACL,IAAI,CAAC,MAAM,KAAK,SAAS;IACzB,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,EACnE;IACI,OAAO,EAAE,mDAAmD;CAC/D,CACJ,CAAC"}
1
+ {"version":3,"file":"chatRequestBody.js","sourceRoot":"","sources":["../../src/schemas/chatRequestBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC5C,MAAM,CAAC;IACJ,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,iBAAiB;IAC9B,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC/B,WAAW,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IAC1C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,kBAAkB,EAAE,wBAAwB;IAC5C,6DAA6D;IAC7D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC1C,CAAC;KACD,MAAM,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,4BAA4B,GAAG,gCAAgC,CAAC,MAAM,CAC/E,CAAC,IAAI,EAAE,EAAE,CACL,IAAI,CAAC,MAAM,KAAK,SAAS;IACzB,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,EACnE;IACI,OAAO,EAAE,mDAAmD;CAC/D,CACJ,CAAC"}
@@ -8,4 +8,5 @@ export * from "./toolAutorouter.js";
8
8
  export * from "./userContext.js";
9
9
  export * from "./personalityContext.js";
10
10
  export * from "./modelContext.js";
11
+ export * from "./telemetryEvents.js";
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
@@ -8,4 +8,5 @@ export * from "./toolAutorouter.js";
8
8
  export * from "./userContext.js";
9
9
  export * from "./personalityContext.js";
10
10
  export * from "./modelContext.js";
11
+ export * from "./telemetryEvents.js";
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
@@ -143,7 +143,10 @@ export declare const PendingToolCallSchema: z.ZodObject<{
143
143
  toolCallId: string;
144
144
  toolName: string;
145
145
  }>;
146
- export declare const PromptSchema: z.ZodObject<{
146
+ /**
147
+ * Text content part schema for prompt messages.
148
+ */
149
+ export declare const TextPartSchema: z.ZodObject<{
147
150
  type: z.ZodLiteral<"text">;
148
151
  text: z.ZodString;
149
152
  }, "strict", z.ZodTypeAny, {
@@ -153,6 +156,35 @@ export declare const PromptSchema: z.ZodObject<{
153
156
  type: "text";
154
157
  text: string;
155
158
  }>;
159
+ /**
160
+ * Prompt schema matching the API's CoreMessageSchema format.
161
+ * Used for sending user prompts to the API.
162
+ */
163
+ export declare const PromptSchema: z.ZodObject<{
164
+ role: z.ZodLiteral<"user">;
165
+ content: z.ZodArray<z.ZodObject<{
166
+ type: z.ZodLiteral<"text">;
167
+ text: z.ZodString;
168
+ }, "strict", z.ZodTypeAny, {
169
+ type: "text";
170
+ text: string;
171
+ }, {
172
+ type: "text";
173
+ text: string;
174
+ }>, "many">;
175
+ }, "strict", z.ZodTypeAny, {
176
+ role: "user";
177
+ content: {
178
+ type: "text";
179
+ text: string;
180
+ }[];
181
+ }, {
182
+ role: "user";
183
+ content: {
184
+ type: "text";
185
+ text: string;
186
+ }[];
187
+ }>;
156
188
  export declare const ToolOutcomesSchema: z.ZodArray<z.ZodObject<{
157
189
  id: z.ZodString;
158
190
  name: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/schemas/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qBAAqB;;;;;;;yBAUkB,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAalD,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWjF,CAAC;AAEd,eAAO,MAAM,YAAY;;;;;;;;;EAKZ,CAAC;AAEd,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAiC,CAAC;AAEjE,eAAO,MAAM,aAAa,yEAAoC,CAAC"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/schemas/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qBAAqB;;;;;;;yBAUkB,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAalD,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWjF,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;EAKd,CAAC;AAEd;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;EAKZ,CAAC;AAEd,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAiC,CAAC;AAEjE,eAAO,MAAM,aAAa,yEAAoC,CAAC"}
@@ -33,12 +33,25 @@ export const PendingToolCallSchema = z
33
33
  ]),
34
34
  })
35
35
  .strict();
36
- export const PromptSchema = z
36
+ /**
37
+ * Text content part schema for prompt messages.
38
+ */
39
+ export const TextPartSchema = z
37
40
  .object({
38
41
  type: z.literal("text"),
39
42
  text: z.string(),
40
43
  })
41
44
  .strict();
45
+ /**
46
+ * Prompt schema matching the API's CoreMessageSchema format.
47
+ * Used for sending user prompts to the API.
48
+ */
49
+ export const PromptSchema = z
50
+ .object({
51
+ role: z.literal("user"),
52
+ content: z.array(TextPartSchema),
53
+ })
54
+ .strict();
42
55
  export const ToolOutcomesSchema = z.array(IllaToolOutcomeSchema);
43
56
  export const HistorySchema = z.array(z.custom());
44
57
  //# sourceMappingURL=messages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/schemas/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACjC,MAAM,CAAC;IACJ,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACt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