@illalabs/interfaces 0.3.0-canary.ae6ff112 → 0.3.0-canary.f3dad1f7
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/external.d.ts +1 -0
- package/dist/external.d.ts.map +1 -1
- package/dist/external.js +1 -0
- package/dist/external.js.map +1 -1
- package/dist/interfaces/chat/response.d.ts +5 -3
- package/dist/interfaces/chat/response.d.ts.map +1 -1
- package/dist/schemas/chatContext.d.ts +79 -648
- package/dist/schemas/chatContext.d.ts.map +1 -1
- package/dist/schemas/chatRequestBody.d.ts +256 -2172
- package/dist/schemas/chatRequestBody.d.ts.map +1 -1
- package/dist/schemas/chatRequestBody.js +5 -3
- package/dist/schemas/chatRequestBody.js.map +1 -1
- package/dist/schemas/executionCheckerQueryParams.d.ts +2 -2
- package/dist/schemas/illaTools.d.ts +266 -0
- package/dist/schemas/illaTools.d.ts.map +1 -0
- package/dist/schemas/illaTools.js +58 -0
- package/dist/schemas/illaTools.js.map +1 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/messages.d.ts +95 -1037
- package/dist/schemas/messages.d.ts.map +1 -1
- package/dist/schemas/messages.js +10 -121
- 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/tools/IllaToolError.d.ts +113 -0
- package/dist/tools/IllaToolError.d.ts.map +1 -0
- package/dist/tools/IllaToolError.js +143 -0
- package/dist/tools/IllaToolError.js.map +1 -0
- package/dist/tools/IllaToolOutcome.d.ts +131 -0
- package/dist/tools/IllaToolOutcome.d.ts.map +1 -0
- package/dist/tools/IllaToolOutcome.js +191 -0
- package/dist/tools/IllaToolOutcome.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types/actions/tools/bridgeAction.d.ts +1 -1
- package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -1
- 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 +1 -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/messages.d.ts +3 -6
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/messages.js +1 -1
- package/dist/types/messages.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 +4 -4
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { IllaToolOutcomeSchema } from "../internal.js";
|
|
2
|
+
import { IllaToolError } from "./IllaToolError.js";
|
|
3
|
+
/**
|
|
4
|
+
* Represents the outcome of a tool execution, which can be either a success or an error.
|
|
5
|
+
* This implements the Result/Either pattern for explicit error handling.
|
|
6
|
+
*
|
|
7
|
+
* @template T - The type of the successful result
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Create a successful outcome
|
|
12
|
+
* const success = IllaToolOutcome.success('call-123', 'tokenTransfer', { txHash: '0x...' });
|
|
13
|
+
*
|
|
14
|
+
* // Create an error outcome
|
|
15
|
+
* const error = IllaToolOutcome.error('call-123', 'tokenTransfer',
|
|
16
|
+
* IllaToolError.execution('call-123', 'tokenTransfer', 'Transaction failed')
|
|
17
|
+
* );
|
|
18
|
+
*
|
|
19
|
+
* // Handle the outcome
|
|
20
|
+
* if (outcome.isSuccess()) {
|
|
21
|
+
* console.log('Result:', outcome.getResult());
|
|
22
|
+
* } else {
|
|
23
|
+
* console.error('Error:', outcome.getError()?.getMessage());
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export class IllaToolOutcome {
|
|
28
|
+
id;
|
|
29
|
+
name;
|
|
30
|
+
_result;
|
|
31
|
+
_error;
|
|
32
|
+
_isError;
|
|
33
|
+
constructor(id, name, _result, _error, _isError = false) {
|
|
34
|
+
this.id = id;
|
|
35
|
+
this.name = name;
|
|
36
|
+
this._result = _result;
|
|
37
|
+
this._error = _error;
|
|
38
|
+
this._isError = _isError;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates a successful outcome
|
|
42
|
+
* @param id - The tool call ID
|
|
43
|
+
* @param name - The tool/action name
|
|
44
|
+
* @param result - The successful result value
|
|
45
|
+
* @returns A new IllaToolOutcome representing success
|
|
46
|
+
*/
|
|
47
|
+
static success(id, name, result) {
|
|
48
|
+
return new IllaToolOutcome(id, name, result, undefined, false);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Creates an error outcome
|
|
52
|
+
* @param id - The tool call ID
|
|
53
|
+
* @param name - The tool/action name
|
|
54
|
+
* @param error - The error that occurred
|
|
55
|
+
* @returns A new IllaToolOutcome representing failure
|
|
56
|
+
*/
|
|
57
|
+
static error(id, name, error) {
|
|
58
|
+
return new IllaToolOutcome(id, name, undefined, error, true);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Parses and validates unknown input to create an IllaToolOutcome instance.
|
|
62
|
+
* Expects an object with id, name, and either result or error properties.
|
|
63
|
+
*
|
|
64
|
+
* @template T - The expected type of the result (defaults to unknown)
|
|
65
|
+
* @param input - Unknown input to parse
|
|
66
|
+
* @returns A new IllaToolOutcome instance
|
|
67
|
+
* @throws ZodError if the input doesn't match the expected schema
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* // Parse a success outcome
|
|
72
|
+
* const success = IllaToolOutcome.parse<{ txHash: string }>({
|
|
73
|
+
* id: 'call-123',
|
|
74
|
+
* name: 'tokenTransfer',
|
|
75
|
+
* result: { txHash: '0x...' }
|
|
76
|
+
* });
|
|
77
|
+
*
|
|
78
|
+
* // Parse an error outcome
|
|
79
|
+
* const error = IllaToolOutcome.parse({
|
|
80
|
+
* id: 'call-456',
|
|
81
|
+
* name: 'swap',
|
|
82
|
+
* error: { type: 'execution', message: 'Failed' }
|
|
83
|
+
* });
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
static parse(input) {
|
|
87
|
+
const parsed = IllaToolOutcomeSchema.parse(input);
|
|
88
|
+
if (parsed.error !== undefined) {
|
|
89
|
+
const toolError = IllaToolError.parseData(parsed.id, parsed.name, parsed.error);
|
|
90
|
+
return IllaToolOutcome.error(parsed.id, parsed.name, toolError);
|
|
91
|
+
}
|
|
92
|
+
return IllaToolOutcome.success(parsed.id, parsed.name, parsed.result);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Check if this outcome represents a successful execution
|
|
96
|
+
*/
|
|
97
|
+
isSuccess() {
|
|
98
|
+
return !this._isError;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Check if this outcome represents an error
|
|
102
|
+
*/
|
|
103
|
+
isError() {
|
|
104
|
+
return this._isError;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Get the successful result value
|
|
108
|
+
* @returns The result value or undefined if this is an error outcome
|
|
109
|
+
*/
|
|
110
|
+
getResult() {
|
|
111
|
+
return this._result;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Get the error
|
|
115
|
+
* @returns The error or undefined if this is a success outcome
|
|
116
|
+
*/
|
|
117
|
+
getError() {
|
|
118
|
+
return this._error;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Get the result or throw if this is an error
|
|
122
|
+
* @returns The result value
|
|
123
|
+
* @throws Error if this is an error outcome
|
|
124
|
+
*/
|
|
125
|
+
getResultOrThrow() {
|
|
126
|
+
if (this._error) {
|
|
127
|
+
throw new Error(`Tool ${this.name} (${this.id}) failed: ${this._error.getMessage()}`);
|
|
128
|
+
}
|
|
129
|
+
if (this._result === undefined) {
|
|
130
|
+
throw new Error(`Tool ${this.name} (${this.id}) has no result`);
|
|
131
|
+
}
|
|
132
|
+
return this._result;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Map the result value to a new type
|
|
136
|
+
* @param fn - Function to transform the result
|
|
137
|
+
* @returns A new IllaToolOutcome with the transformed result, or the same error
|
|
138
|
+
*/
|
|
139
|
+
map(fn) {
|
|
140
|
+
if (this.isError()) {
|
|
141
|
+
return IllaToolOutcome.error(this.id, this.name, this._error);
|
|
142
|
+
}
|
|
143
|
+
return IllaToolOutcome.success(this.id, this.name, fn(this._result));
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Chain another operation that returns an IllaToolOutcome
|
|
147
|
+
* @param fn - Function that takes the result and returns a new IllaToolOutcome
|
|
148
|
+
* @returns The result of fn if successful, or the original error
|
|
149
|
+
*/
|
|
150
|
+
flatMap(fn) {
|
|
151
|
+
if (this.isError()) {
|
|
152
|
+
return IllaToolOutcome.error(this.id, this.name, this._error);
|
|
153
|
+
}
|
|
154
|
+
return fn(this._result);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Execute a function if this is a success
|
|
158
|
+
* @param fn - Function to execute with the result
|
|
159
|
+
* @returns This outcome (for chaining)
|
|
160
|
+
*/
|
|
161
|
+
onSuccess(fn) {
|
|
162
|
+
if (this.isSuccess() && this._result !== undefined) {
|
|
163
|
+
fn(this._result);
|
|
164
|
+
}
|
|
165
|
+
return this;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Execute a function if this is an error
|
|
169
|
+
* @param fn - Function to execute with the error
|
|
170
|
+
* @returns This outcome (for chaining)
|
|
171
|
+
*/
|
|
172
|
+
onError(fn) {
|
|
173
|
+
if (this.isError() && this._error !== undefined) {
|
|
174
|
+
fn(this._error);
|
|
175
|
+
}
|
|
176
|
+
return this;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Convert to a plain JSON object for serialization
|
|
180
|
+
* @returns An object with either result or error
|
|
181
|
+
*/
|
|
182
|
+
toJSON() {
|
|
183
|
+
return {
|
|
184
|
+
id: this.id,
|
|
185
|
+
name: this.name,
|
|
186
|
+
result: this._result,
|
|
187
|
+
error: this._error?.toJSON(),
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=IllaToolOutcome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IllaToolOutcome.js","sourceRoot":"","sources":["../../src/tools/IllaToolOutcome.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,eAAe;IAEJ;IACA;IACC;IACA;IACA;IALrB,YACoB,EAAU,EACV,IAAY,EACX,OAAW,EACX,MAAsB,EACtB,WAAoB,KAAK;QAJ1B,OAAE,GAAF,EAAE,CAAQ;QACV,SAAI,GAAJ,IAAI,CAAQ;QACX,YAAO,GAAP,OAAO,CAAI;QACX,WAAM,GAAN,MAAM,CAAgB;QACtB,aAAQ,GAAR,QAAQ,CAAiB;IAC3C,CAAC;IAEJ;;;;;;OAMG;IACI,MAAM,CAAC,OAAO,CAAI,EAAU,EAAE,IAAY,EAAE,MAAS;QACxD,OAAO,IAAI,eAAe,CAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,KAAK,CAAC,EAAU,EAAE,IAAY,EAAE,KAAoB;QAC9D,OAAO,IAAI,eAAe,CAAQ,EAAE,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MAAM;QACT,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,OAAO;YACpB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE;SAC/B,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
|
@@ -5,7 +5,7 @@ export type BridgeActionInputSchema = z.ZodObject<{
|
|
|
5
5
|
fromChain: z.ZodEnum<[SupportedChain, ...SupportedChain[]]>;
|
|
6
6
|
fromToken: z.ZodString;
|
|
7
7
|
fromAmount: z.ZodString;
|
|
8
|
-
toChain: z.
|
|
8
|
+
toChain: z.ZodEnum<[SupportedChain, ...SupportedChain[]]>;
|
|
9
9
|
toToken: z.ZodOptional<z.ZodString>;
|
|
10
10
|
toAddress: z.ZodOptional<z.ZodString>;
|
|
11
11
|
toAmount: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/bridgeAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE/F,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,SAAS,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,SAAS,CAA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SAAS,CAAC,CAAC,CAAC;IAC1D,oBAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { TypeOf } from "zod";
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import type { TypeOf, z } from "zod";
|
|
3
2
|
import type { SupportedChain, SupportedLendingProvider } from "../../../internal.js";
|
|
4
3
|
export type DefiFetchListingsActionInputSchema = z.ZodObject<{
|
|
5
4
|
chain: z.ZodEnum<[SupportedChain, ...SupportedChain[]]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiFetchListingsAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiFetchListingsAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"defiFetchListingsAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiFetchListingsAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,SAAS,CAAC;IACzD,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC;IACxD,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/C,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACvE,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB,EAAE,GAAG,wBAAwB,EAAE,CAAC,CAAC,CAAC;IAC/E,iBAAiB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1D,oBAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,kCAAkC,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=defiFetchListingsAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiFetchListingsAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiFetchListingsAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defiFetchListingsAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiFetchListingsAction.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { TypeOf } from "zod";
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import type { TypeOf, z } from "zod";
|
|
3
2
|
import type { SupportedChain, SupportedLendingProvider } from "../../../internal.js";
|
|
4
3
|
export type DefiPositionsActionInputSchema = z.ZodObject<{
|
|
5
4
|
userAddress: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiPositionsAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiPositionsAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"defiPositionsAction.d.ts","sourceRoot":"","sources":["../../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+
export {};
|
|
2
2
|
//# sourceMappingURL=defiPositionsAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiPositionsAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiPositionsAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defiPositionsAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiPositionsAction.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiSupplyAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiSupplyAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"defiSupplyAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiSupplyAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,SAAS,CAAC;IAClD,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;IACxC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB,EAAE,GAAG,wBAAwB,EAAE,CAAC,CAAC,CAAC;IAC/E,iBAAiB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1D,oBAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=defiSupplyAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiSupplyAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiSupplyAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defiSupplyAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiSupplyAction.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiWithdrawAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiWithdrawAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"defiWithdrawAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiWithdrawAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,SAAS,CAAC;IACpD,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;IACxC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB,EAAE,GAAG,wBAAwB,EAAE,CAAC,CAAC,CAAC;IAC/E,iBAAiB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1D,oBAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,6BAA6B,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=defiWithdrawAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiWithdrawAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiWithdrawAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defiWithdrawAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiWithdrawAction.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { TypeOf } from "zod";
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import type { TypeOf, z } from "zod";
|
|
3
2
|
import type { SupportedExchangeRateProvider } from "../../../internal.js";
|
|
4
3
|
export type ExchangeRateActionInputSchema = z.ZodObject<{
|
|
5
4
|
provider: z.ZodEnum<[SupportedExchangeRateProvider, ...SupportedExchangeRateProvider[]]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exchangeRateAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/exchangeRateAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"exchangeRateAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/exchangeRateAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1E,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,SAAS,CAAC;IACpD,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,6BAA6B,EAAE,GAAG,6BAA6B,EAAE,CAAC,CAAC,CAAC;IACzF,SAAS,EAAE,CAAC,CAAC,QAAQ,CACjB,CAAC,CAAC,SAAS,CAAC;QACR,YAAY,EAAE,CAAC,CAAC,SAAS,CAAC;QAC1B,aAAa,EAAE,CAAC,CAAC,SAAS,CAAC;QAC3B,UAAU,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QACvC,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;KAC3C,CAAC,EACF,MAAM,CACT,CAAC;IACF,iBAAiB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1D,oBAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,6BAA6B,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=exchangeRateAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exchangeRateAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/exchangeRateAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exchangeRateAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/exchangeRateAction.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWalletBalanceAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/getWalletBalanceAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"getWalletBalanceAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/getWalletBalanceAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAE3E,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,SAAS,CAAC;IACxD,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IACvD,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,8BAA8B,EAAE,GAAG,8BAA8B,EAAE,CAAC,CAAC,CAAC;IAC3F,iBAAiB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1D,oBAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=getWalletBalanceAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWalletBalanceAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/getWalletBalanceAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getWalletBalanceAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/getWalletBalanceAction.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenTransferAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/tokenTransferAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"tokenTransferAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/tokenTransferAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,SAAS,CAAC;IACrD,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC;IACnB,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;IACxC,iBAAiB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1D,oBAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,8BAA8B,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=tokenTransferAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenTransferAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/tokenTransferAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tokenTransferAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/tokenTransferAction.ts"],"names":[],"mappings":""}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
package/dist/types/index.js
CHANGED
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { TypeOf } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
export type
|
|
4
|
-
export type ToolIncompletePartType = TypeOf<typeof ToolIncompletePartSchema>;
|
|
5
|
-
export type ToolErrorPartType = TypeOf<typeof ToolErrorPartSchema>;
|
|
6
|
-
export type ToolResultType = TypeOf<typeof ToolResultSchema>;
|
|
2
|
+
import { HistorySchema, PendingToolCallSchema, PromptSchema, ToolOutcomesSchema } from "../internal.js";
|
|
3
|
+
export type ToolOutcomesType = TypeOf<typeof ToolOutcomesSchema>;
|
|
7
4
|
export type PendingToolCallType = TypeOf<typeof PendingToolCallSchema>;
|
|
8
5
|
export type MessageHistoryType = TypeOf<typeof HistorySchema>;
|
|
9
|
-
export type
|
|
6
|
+
export type PromptType = TypeOf<typeof PromptSchema>;
|
|
10
7
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/types/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/types/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC,OAAO,EACH,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EACrB,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEjE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEvE,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/types/messages.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HistorySchema, PendingToolCallSchema, PromptSchema, ToolOutcomesSchema, } from "../internal.js";
|
|
2
2
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/types/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/types/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,GACrB,MAAM,gBAAgB,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.js","sourceRoot":"","sources":["../../src/types/streaming.ts"],"names":[],"mappings":""}
|