@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.
- package/dist/errors/endpoints/chat/ChatBaseError.d.ts +16 -5
- package/dist/errors/endpoints/chat/ChatBaseError.d.ts.map +1 -1
- package/dist/interfaces/chat/response.d.ts +2 -0
- package/dist/interfaces/chat/response.d.ts.map +1 -1
- package/dist/schemas/chatContext.d.ts +22 -6
- package/dist/schemas/chatContext.d.ts.map +1 -1
- package/dist/schemas/chatRequestBody.d.ts +82 -24
- package/dist/schemas/chatRequestBody.d.ts.map +1 -1
- package/dist/schemas/chatRequestBody.js +2 -0
- package/dist/schemas/chatRequestBody.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/messages.d.ts +33 -1
- package/dist/schemas/messages.d.ts.map +1 -1
- package/dist/schemas/messages.js +14 -1
- package/dist/schemas/messages.js.map +1 -1
- package/dist/schemas/telemetryEvents.d.ts +1159 -0
- package/dist/schemas/telemetryEvents.d.ts.map +1 -0
- package/dist/schemas/telemetryEvents.js +250 -0
- package/dist/schemas/telemetryEvents.js.map +1 -0
- package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
- package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
- package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
- package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
- package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
- package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
- package/dist/types/actions/tools/defiPositionsAction.js +1 -1
- package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
- package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
- package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
- package/dist/types/actions/tools/defiSupplyAction.js +1 -1
- package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
- package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
- package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
- package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
- package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
- package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
- package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
- package/dist/types/actions/tools/exchangeRateAction.js +1 -1
- package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
- package/dist/types/actions/tools/getWalletBalanceAction.d.ts +2 -2
- package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
- package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
- package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
- package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
- package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
- package/dist/types/actions/tools/tokenTransferAction.js +1 -1
- package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/streaming.d.ts +81 -0
- package/dist/types/streaming.d.ts.map +1 -0
- package/dist/types/streaming.js +2 -0
- package/dist/types/streaming.js.map +1 -0
- package/dist/types/telemetry.d.ts +139 -0
- package/dist/types/telemetry.d.ts.map +1 -0
- package/dist/types/telemetry.js +7 -0
- package/dist/types/telemetry.js.map +1 -0
- package/package.json +3 -3
|
@@ -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,G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CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE7E;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@illalabs/interfaces",
|
|
3
|
-
"version": "0.3.0-canary.
|
|
3
|
+
"version": "0.3.0-canary.4647332c",
|
|
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.
|
|
27
|
+
"viem": "2.37.13"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"viem": "2.
|
|
30
|
+
"viem": "2.37.x"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|