@illalabs/interfaces 0.3.0-canary.56299752 → 0.3.0-canary.76d235f0

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 (103) 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/external.d.ts +1 -0
  4. package/dist/external.d.ts.map +1 -1
  5. package/dist/external.js +1 -0
  6. package/dist/external.js.map +1 -1
  7. package/dist/interfaces/chat/response.d.ts +5 -3
  8. package/dist/interfaces/chat/response.d.ts.map +1 -1
  9. package/dist/schemas/chatContext.d.ts +76 -645
  10. package/dist/schemas/chatContext.d.ts.map +1 -1
  11. package/dist/schemas/chatRequestBody.d.ts +256 -2172
  12. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  13. package/dist/schemas/chatRequestBody.js +5 -3
  14. package/dist/schemas/chatRequestBody.js.map +1 -1
  15. package/dist/schemas/executionCheckerQueryParams.d.ts +2 -2
  16. package/dist/schemas/illaTools.d.ts +266 -0
  17. package/dist/schemas/illaTools.d.ts.map +1 -0
  18. package/dist/schemas/illaTools.js +58 -0
  19. package/dist/schemas/illaTools.js.map +1 -0
  20. package/dist/schemas/index.d.ts +2 -0
  21. package/dist/schemas/index.d.ts.map +1 -1
  22. package/dist/schemas/index.js +2 -0
  23. package/dist/schemas/index.js.map +1 -1
  24. package/dist/schemas/messages.d.ts +87 -1029
  25. package/dist/schemas/messages.d.ts.map +1 -1
  26. package/dist/schemas/messages.js +10 -121
  27. package/dist/schemas/messages.js.map +1 -1
  28. package/dist/schemas/modelContext.d.ts +3 -3
  29. package/dist/schemas/telemetryEvents.d.ts +1645 -0
  30. package/dist/schemas/telemetryEvents.d.ts.map +1 -0
  31. package/dist/schemas/telemetryEvents.js +236 -0
  32. package/dist/schemas/telemetryEvents.js.map +1 -0
  33. package/dist/tools/IllaToolError.d.ts +117 -0
  34. package/dist/tools/IllaToolError.d.ts.map +1 -0
  35. package/dist/tools/IllaToolError.js +147 -0
  36. package/dist/tools/IllaToolError.js.map +1 -0
  37. package/dist/tools/IllaToolOutcome.d.ts +131 -0
  38. package/dist/tools/IllaToolOutcome.d.ts.map +1 -0
  39. package/dist/tools/IllaToolOutcome.js +191 -0
  40. package/dist/tools/IllaToolOutcome.js.map +1 -0
  41. package/dist/tools/index.d.ts +3 -0
  42. package/dist/tools/index.d.ts.map +1 -0
  43. package/dist/tools/index.js +3 -0
  44. package/dist/tools/index.js.map +1 -0
  45. package/dist/types/actions/inputs.d.ts +3 -2
  46. package/dist/types/actions/inputs.d.ts.map +1 -1
  47. package/dist/types/actions/tools/bridgeAction.d.ts +1 -1
  48. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -1
  49. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  50. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  51. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  52. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  53. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  54. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  55. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  56. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  57. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  58. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  59. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  60. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  61. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  62. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  63. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  64. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  65. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  66. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  67. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  68. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  69. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +2 -2
  70. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  71. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  72. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  73. package/dist/types/actions/tools/index.d.ts +3 -0
  74. package/dist/types/actions/tools/index.d.ts.map +1 -1
  75. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  76. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  77. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  78. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  79. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  80. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  81. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  82. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  83. package/dist/types/index.d.ts +2 -0
  84. package/dist/types/index.d.ts.map +1 -1
  85. package/dist/types/index.js +2 -0
  86. package/dist/types/index.js.map +1 -1
  87. package/dist/types/messages.d.ts +3 -6
  88. package/dist/types/messages.d.ts.map +1 -1
  89. package/dist/types/messages.js +1 -1
  90. package/dist/types/messages.js.map +1 -1
  91. package/dist/types/streaming.d.ts +81 -0
  92. package/dist/types/streaming.d.ts.map +1 -0
  93. package/dist/types/streaming.js +2 -0
  94. package/dist/types/streaming.js.map +1 -0
  95. package/dist/types/telemetry.d.ts +139 -0
  96. package/dist/types/telemetry.d.ts.map +1 -0
  97. package/dist/types/telemetry.js +7 -0
  98. package/dist/types/telemetry.js.map +1 -0
  99. package/dist/utils/constants.d.ts +4 -2
  100. package/dist/utils/constants.d.ts.map +1 -1
  101. package/dist/utils/constants.js +7 -0
  102. package/dist/utils/constants.js.map +1 -1
  103. package/package.json +3 -3
@@ -0,0 +1,81 @@
1
+ import type { TelemetryEvent, ValidatedErrorEventData, ValidatedResultEventData, ValidatedStreamEndEventData } from "./telemetry.js";
2
+ /**
3
+ * Parsed SSE event types from the streaming chat endpoint
4
+ */
5
+ export type StreamEventType = "telemetry" | "result" | "error" | "stream_end";
6
+ /**
7
+ * A telemetry event received during streaming.
8
+ * Wraps the TelemetryEvent type for SSE transport.
9
+ */
10
+ export type TelemetryStreamEvent = {
11
+ readonly type: "telemetry";
12
+ readonly data: TelemetryEvent;
13
+ };
14
+ /**
15
+ * The final result event containing the chat response.
16
+ * Data type is inferred from resultEventDataSchema for type-safe validation.
17
+ */
18
+ export type ResultStreamEvent = {
19
+ readonly type: "result";
20
+ readonly data: ValidatedResultEventData;
21
+ };
22
+ /**
23
+ * Error event data structure from the streaming endpoint.
24
+ * Inferred from errorEventDataSchema for type-safe validation.
25
+ *
26
+ * Note: The `type` field here matches the SSE event type and is included
27
+ * because the API sends it as part of the JSON payload. This allows the
28
+ * schema to validate the complete response structure.
29
+ */
30
+ export type ErrorEventData = ValidatedErrorEventData;
31
+ /**
32
+ * An error event received during streaming.
33
+ * Wraps ErrorEventData for consistent event structure.
34
+ */
35
+ export type ErrorStreamEvent = {
36
+ readonly type: "error";
37
+ readonly data: ValidatedErrorEventData;
38
+ };
39
+ /**
40
+ * Stream end event data structure.
41
+ * Inferred from streamEndEventDataSchema for type-safe validation.
42
+ *
43
+ * Note: The `type` field here matches the SSE event type and is included
44
+ * because the API sends it as part of the JSON payload. This allows the
45
+ * schema to validate the complete response structure.
46
+ */
47
+ export type SSEStreamEndEventData = ValidatedStreamEndEventData;
48
+ /**
49
+ * Stream end event signaling the stream is closing.
50
+ * No more events will be sent after this.
51
+ */
52
+ export type SSEStreamEndEvent = {
53
+ readonly type: "stream_end";
54
+ readonly data: ValidatedStreamEndEventData;
55
+ };
56
+ /**
57
+ * Union of all possible stream events from the SSE endpoint.
58
+ * Use discriminated union pattern via the `type` field.
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * function handleEvent(event: SSEStreamEvent) {
63
+ * switch (event.type) {
64
+ * case "telemetry":
65
+ * console.log("Telemetry:", event.data.type);
66
+ * break;
67
+ * case "result":
68
+ * console.log("Result:", event.data.text);
69
+ * break;
70
+ * case "error":
71
+ * console.error("Error:", event.data.data.message);
72
+ * break;
73
+ * case "stream_end":
74
+ * console.log("Stream ended");
75
+ * break;
76
+ * }
77
+ * }
78
+ * ```
79
+ */
80
+ export type SSEStreamEvent = TelemetryStreamEvent | ResultStreamEvent | ErrorStreamEvent | SSEStreamEndEvent;
81
+ //# sourceMappingURL=streaming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../src/types/streaming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,cAAc,EACd,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC9B,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAE9E;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;CAC3C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,cAAc,GACpB,oBAAoB,GACpB,iBAAiB,GACjB,gBAAgB,GAChB,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=streaming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streaming.js","sourceRoot":"","sources":["../../src/types/streaming.ts"],"names":[],"mappings":""}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Telemetry event types for real-time orchestration monitoring.
3
+ * Event types are inferred from Zod schemas for type-safe runtime validation.
4
+ */
5
+ import { z } from "zod";
6
+ import { baseTelemetryEventSchema, connectedEventSchema, errorEventDataSchema, errorTelemetryEventSchema, finishEventSchema, iterationEndEventSchema, iterationStartEventSchema, llmEndEventSchema, llmStartEventSchema, resultEventDataSchema, scratchpadResetEventSchema, streamEndEventDataSchema, streamEndTelemetryEventSchema, streamEventDataSchema, telemetryEventSchema, telemetryEventTypes, textDeltaEventSchema, toolCallBatchEventSchema, toolResultEventSchema } from "../schemas/telemetryEvents.js";
7
+ /**
8
+ * Types of telemetry events that can be emitted during orchestration.
9
+ * Inferred from telemetryEventTypes schema constant.
10
+ */
11
+ export type TelemetryEventType = (typeof telemetryEventTypes)[number];
12
+ /**
13
+ * Base telemetry event structure.
14
+ * Inferred from baseTelemetryEventSchema.
15
+ */
16
+ export type BaseTelemetryEvent = z.infer<typeof baseTelemetryEventSchema>;
17
+ /**
18
+ * Event emitted when connected to telemetry stream.
19
+ * Inferred from connectedEventSchema.
20
+ */
21
+ export type ConnectedEvent = z.infer<typeof connectedEventSchema>;
22
+ /**
23
+ * Event emitted when stream ends.
24
+ * Inferred from streamEndTelemetryEventSchema.
25
+ */
26
+ export type StreamEndEvent = z.infer<typeof streamEndTelemetryEventSchema>;
27
+ /**
28
+ * Event emitted when an iteration starts.
29
+ * Inferred from iterationStartEventSchema.
30
+ */
31
+ export type IterationStartEvent = z.infer<typeof iterationStartEventSchema>;
32
+ /**
33
+ * Event emitted when an iteration ends.
34
+ * Inferred from iterationEndEventSchema.
35
+ */
36
+ export type IterationEndEvent = z.infer<typeof iterationEndEventSchema>;
37
+ /**
38
+ * Event emitted when tool calls are batched for execution.
39
+ * Inferred from toolCallBatchEventSchema.
40
+ */
41
+ export type ToolCallBatchEvent = z.infer<typeof toolCallBatchEventSchema>;
42
+ /**
43
+ * Status of a tool execution result.
44
+ * Inferred from toolResultEventSchema data discriminator.
45
+ */
46
+ export type ToolResultStatus = z.infer<typeof toolResultEventSchema>["data"]["status"];
47
+ /**
48
+ * Tool result data with discriminated status field.
49
+ * - "pending": Tool execution is waiting for user action (e.g., signature)
50
+ * - "success": Tool executed successfully
51
+ * - "failure": Tool execution failed, error field contains details
52
+ *
53
+ * Extracted from toolResultEventSchema data field.
54
+ */
55
+ export type ToolResultData = z.infer<typeof toolResultEventSchema>["data"];
56
+ /**
57
+ * Event emitted when a tool execution completes.
58
+ * Inferred from toolResultEventSchema.
59
+ */
60
+ export type ToolResultEvent = z.infer<typeof toolResultEventSchema>;
61
+ /**
62
+ * Event emitted when the scratchpad is reset.
63
+ * Inferred from scratchpadResetEventSchema.
64
+ */
65
+ export type ScratchpadResetEvent = z.infer<typeof scratchpadResetEventSchema>;
66
+ /**
67
+ * Event emitted when LLM generation starts.
68
+ * Inferred from llmStartEventSchema.
69
+ */
70
+ export type LLMStartEvent = z.infer<typeof llmStartEventSchema>;
71
+ /**
72
+ * Event emitted when LLM generation ends.
73
+ * Inferred from llmEndEventSchema.
74
+ */
75
+ export type LLMEndEvent = z.infer<typeof llmEndEventSchema>;
76
+ /**
77
+ * Event emitted when a text chunk is received from the LLM during streaming.
78
+ * Inferred from textDeltaEventSchema.
79
+ */
80
+ export type TextDeltaEvent = z.infer<typeof textDeltaEventSchema>;
81
+ /**
82
+ * Event emitted when orchestration finishes.
83
+ * Inferred from finishEventSchema.
84
+ */
85
+ export type FinishEvent = z.infer<typeof finishEventSchema>;
86
+ /**
87
+ * Event emitted when an error occurs.
88
+ * The data field is required and always contains error details.
89
+ * Inferred from errorTelemetryEventSchema.
90
+ */
91
+ export type ErrorEvent = z.infer<typeof errorTelemetryEventSchema>;
92
+ /**
93
+ * Union type of all telemetry events.
94
+ * Inferred from telemetryEventSchema discriminated union.
95
+ */
96
+ export type TelemetryEvent = z.infer<typeof telemetryEventSchema>;
97
+ /**
98
+ * Inferred type for result event data from Zod schema.
99
+ * Used by ResultStreamEvent for type-safe runtime validation.
100
+ */
101
+ export type ValidatedResultEventData = z.infer<typeof resultEventDataSchema>;
102
+ /**
103
+ * Inferred type for error event data from Zod schema.
104
+ * Used by ErrorStreamEvent for type-safe runtime validation.
105
+ */
106
+ export type ValidatedErrorEventData = z.infer<typeof errorEventDataSchema>;
107
+ /**
108
+ * Inferred type for stream_end event data from Zod schema.
109
+ * Used by StreamEndEvent for type-safe runtime validation.
110
+ */
111
+ export type ValidatedStreamEndEventData = z.infer<typeof streamEndEventDataSchema>;
112
+ /**
113
+ * Inferred union type for all stream event data.
114
+ */
115
+ export type ValidatedStreamEventData = z.infer<typeof streamEventDataSchema>;
116
+ /**
117
+ * Response type that includes requestId for telemetry subscription
118
+ */
119
+ export type TelemetryEnabledResponse = {
120
+ /** Request ID for subscribing to telemetry stream */
121
+ requestId: string;
122
+ };
123
+ /**
124
+ * Orchestrator phases for UI display
125
+ */
126
+ export type OrchestratorPhase = "idle" | "thinking" | "streaming" | "calling_tools" | "executing_tools" | "processing_results" | "complete" | "error";
127
+ /**
128
+ * Observer interface for receiving telemetry events from the orchestrator.
129
+ * Implement this interface to receive real-time events during orchestration.
130
+ */
131
+ export interface OrchestratorObserver {
132
+ /** Called when an event occurs */
133
+ onEvent(event: TelemetryEvent): void;
134
+ /** Called when orchestration completes */
135
+ onComplete(): void;
136
+ /** Called when an error occurs */
137
+ onError(error: Error): void;
138
+ }
139
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/types/telemetry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACH,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACxB,MAAM,+BAA+B,CAAC;AAEvC;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE3E;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;GAGG;AACH,MAAM,M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C,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE3E;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACvB,MAAM,GACN,UAAU,GACV,WAAW,GACX,eAAe,GACf,iBAAiB,GACjB,oBAAoB,GACpB,UAAU,GACV,OAAO,CAAC;AAEd;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACjC,kCAAkC;IAClC,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,0CAA0C;IAC1C,UAAU,IAAI,IAAI,CAAC;IACnB,kCAAkC;IAClC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC/B"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Telemetry event types for real-time orchestration monitoring.
3
+ * Event types are inferred from Zod schemas for type-safe runtime validation.
4
+ */
5
+ import { z } from "zod";
6
+ import { baseTelemetryEventSchema, connectedEventSchema, errorEventDataSchema, errorTelemetryEventSchema, finishEventSchema, iterationEndEventSchema, iterationStartEventSchema, llmEndEventSchema, llmStartEventSchema, resultEventDataSchema, scratchpadResetEventSchema, streamEndEventDataSchema, streamEndTelemetryEventSchema, streamEventDataSchema, telemetryEventSchema, telemetryEventTypes, textDeltaEventSchema, toolCallBatchEventSchema, toolResultEventSchema, } from "../schemas/telemetryEvents.js";
7
+ //# sourceMappingURL=telemetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/types/telemetry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACH,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,GACxB,MAAM,+BAA+B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export declare const LENDING_PROVIDERS: readonly ["aave"];
2
2
  export declare const SWAP_BRIDGE_PROVIDERS: readonly ["lifi"];
3
3
  export declare const EXCHANGE_RATE_PROVIDERS: readonly ["coinMarketCap"];
4
+ export declare const PREDICTION_MARKET_PROVIDERS: readonly ["polymarket"];
4
5
  /**
5
6
  * Canonical definition of chains with id and name.
6
7
  * We use `as const` to preserve literal types at the type level.
@@ -38,13 +39,14 @@ export declare const SUPPORTED_CHAINS: SupportedChain[];
38
39
  /**
39
40
  * Const list of all supported actions with their schemas
40
41
  */
41
- export declare const SUPPORTED_ACTIONS: readonly ["tokenTransfer", "exchangeRate", "getWalletBalance", "defiFetchListings", "defiPositions", "defiSupply", "defiWithdraw", "swap", "bridge"];
42
+ export declare const SUPPORTED_ACTIONS: readonly ["tokenTransfer", "exchangeRate", "getWalletBalance", "defiFetchListings", "defiPositions", "defiSupply", "defiWithdraw", "swap", "bridge", "predictionMarketsFetch"];
42
43
  export declare const SUPPORTED_WALLET_BALANCE_PROVIDERS: readonly ["moralis"];
43
44
  export type SupportedAction = (typeof SUPPORTED_ACTIONS)[number];
44
45
  export type SupportedLendingProvider = (typeof LENDING_PROVIDERS)[number];
45
46
  export type SupportedSwapBridgeProvider = (typeof SWAP_BRIDGE_PROVIDERS)[number];
46
47
  export type SupportedWalletBalanceProvider = (typeof SUPPORTED_WALLET_BALANCE_PROVIDERS)[number];
47
48
  export type SupportedExchangeRateProvider = (typeof EXCHANGE_RATE_PROVIDERS)[number];
49
+ export type SupportedPredictionMarketProvider = (typeof PREDICTION_MARKET_PROVIDERS)[number];
48
50
  export declare const CHECKABLE_ACTIONS: readonly ["swap", "bridge", "defiSupply", "defiWithdraw"];
49
51
  export type CheckableAction = (typeof CHECKABLE_ACTIONS)[number];
50
52
  /**
@@ -62,7 +64,7 @@ export type SupportedModelProvider = (typeof SUPPORTED_MODEL_PROVIDERS)[number];
62
64
  /**
63
65
  * Supported OpenRouter models
64
66
  */
65
- export declare const SUPPORTED_OPENROUTER_MODELS: readonly ["anthropic/claude-sonnet-4.5", "google/gemini-2.5-pro", "openai/gpt-5", "qwen/qwen3-vl-30b-a3b-thinking", "openai/gpt-5-mini"];
67
+ export declare const SUPPORTED_OPENROUTER_MODELS: readonly ["anthropic/claude-sonnet-4.5", "google/gemini-2.5-pro", "openai/gpt-5", "qwen/qwen3-vl-30b-a3b-thinking", "openai/gpt-5-mini", "moonshotai/kimi-k2-thinking", "google/gemini-3-flash-preview", "z-ai/glm-4.7-flash", "anthropic/claude-haiku-4.5", "deepseek/deepseek-v3.2"];
66
68
  /**
67
69
  * Type representing supported OpenRouter models
68
70
  */
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,mBAAmC,CAAC;AAElE,eAAO,MAAM,qBAAqB,mBAAmC,CAAC;AAEtE,eAAO,MAAM,uBAAuB,4BAA4C,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;EAQsB,CAAC;AAE7D,0BAA0B;AAC1B,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9E,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC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,MAAM,8BAA8B,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjG,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AACrF,MAAM,MAAM,iCAAiC,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7F,eAAO,MAAM,iBAAiB,2DAKnB,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAChC,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,GAClC,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,yBAAyB,mCAAoC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,2BAA2B,wRAW9B,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpF;;GAEG;AACH,eAAO,MAAM,uBAAuB,sEAK1B,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export const LENDING_PROVIDERS = Object.freeze(["aave"]);
2
2
  export const SWAP_BRIDGE_PROVIDERS = Object.freeze(["lifi"]);
3
3
  export const EXCHANGE_RATE_PROVIDERS = Object.freeze(["coinMarketCap"]);
4
+ export const PREDICTION_MARKET_PROVIDERS = Object.freeze(["polymarket"]);
4
5
  /**
5
6
  * Canonical definition of chains with id and name.
6
7
  * We use `as const` to preserve literal types at the type level.
@@ -31,6 +32,7 @@ export const SUPPORTED_ACTIONS = Object.freeze([
31
32
  "defiWithdraw",
32
33
  "swap",
33
34
  "bridge",
35
+ "predictionMarketsFetch",
34
36
  ]);
35
37
  export const SUPPORTED_WALLET_BALANCE_PROVIDERS = Object.freeze(["moralis"]);
36
38
  export const CHECKABLE_ACTIONS = Object.freeze([
@@ -52,6 +54,11 @@ export const SUPPORTED_OPENROUTER_MODELS = [
52
54
  "openai/gpt-5",
53
55
  "qwen/qwen3-vl-30b-a3b-thinking",
54
56
  "openai/gpt-5-mini",
57
+ "moonshotai/kimi-k2-thinking",
58
+ "google/gemini-3-flash-preview",
59
+ "z-ai/glm-4.7-flash",
60
+ "anthropic/claude-haiku-4.5",
61
+ "deepseek/deepseek-v3.2",
55
62
  ];
56
63
  /**
57
64
  * Supported OpenAI models
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAU,CAAC,CAAC;AAElE,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAU,CAAC,CAAC;AAEtE,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,CAAU,CAAC,CAAC;AAEjF;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE;IAC3B,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;IAC5B,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;IAC5B,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IAC1B,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE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e;IACf,cAAc;IACd,kBAAkB;IAClB,mBAAmB;IACnB,eAAe;IACf,YAAY;IACZ,cAAc;IACd,MAAM;IACN,QAAQ;IACR,wBAAwB;CAClB,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,kCAAkC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAU,CAAC,CAAC;AAUtF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,cAAc;CACR,CAAC,CAAC;AAWZ;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAU,CAAC;AAO3E;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,6BAA6B;IAC7B,uBAAuB;IACvB,cAAc;IACd,gCAAgC;IAChC,mBAAmB;IACnB,6BAA6B;IAC7B,+BAA+B;IAC/B,oBAAoB;IACpB,4BAA4B;IAC5B,wBAAwB;CAClB,CAAC;AAOX;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,QAAQ;IACR,aAAa;IACb,OAAO;IACP,uBAAuB;CACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@illalabs/interfaces",
3
- "version": "0.3.0-canary.56299752",
3
+ "version": "0.3.0-canary.76d235f0",
4
4
  "description": "ILLA interfaces and types",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "zod": "3.25.76"
25
25
  },
26
26
  "devDependencies": {
27
- "viem": "2.26.2"
27
+ "viem": "2.37.13"
28
28
  },
29
29
  "peerDependencies": {
30
- "viem": "2.26.x"
30
+ "viem": "2.37.x"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"