@illalabs/interfaces 0.2.1 → 0.3.0-canary-beta-08a68673
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 +95 -592
- package/dist/schemas/chatContext.d.ts.map +1 -1
- package/dist/schemas/chatRequestBody.d.ts +292 -1962
- package/dist/schemas/chatRequestBody.d.ts.map +1 -1
- package/dist/schemas/chatRequestBody.js +6 -4
- package/dist/schemas/chatRequestBody.js.map +1 -1
- package/dist/schemas/executionCheckerQueryParams.d.ts +5 -5
- 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 +3 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/messages.d.ts +566 -928
- package/dist/schemas/messages.d.ts.map +1 -1
- package/dist/schemas/messages.js +74 -113
- package/dist/schemas/messages.js.map +1 -1
- package/dist/schemas/modelContext.d.ts +23 -0
- package/dist/schemas/modelContext.d.ts.map +1 -0
- package/dist/schemas/modelContext.js +13 -0
- package/dist/schemas/modelContext.js.map +1 -0
- package/dist/schemas/telemetryEvents.d.ts +2417 -0
- package/dist/schemas/telemetryEvents.d.ts.map +1 -0
- package/dist/schemas/telemetryEvents.js +236 -0
- package/dist/schemas/telemetryEvents.js.map +1 -0
- package/dist/schemas/toolAutorouter.d.ts +9 -9
- package/dist/schemas/toolAutorouter.d.ts.map +1 -1
- package/dist/schemas/userContext.d.ts +3 -0
- package/dist/schemas/userContext.d.ts.map +1 -1
- package/dist/schemas/userContext.js +4 -0
- package/dist/schemas/userContext.js.map +1 -1
- package/dist/tools/IllaToolError.d.ts +117 -0
- package/dist/tools/IllaToolError.d.ts.map +1 -0
- package/dist/tools/IllaToolError.js +147 -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/inputs.d.ts +8 -3
- package/dist/types/actions/inputs.d.ts.map +1 -1
- package/dist/types/actions/outputs.d.ts +19 -1
- package/dist/types/actions/outputs.d.ts.map +1 -1
- package/dist/types/actions/tools/{swapBridgeAction.d.ts → bridgeAction.d.ts} +4 -4
- package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -0
- package/dist/types/actions/tools/bridgeAction.js +2 -0
- package/dist/types/actions/tools/bridgeAction.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 +4 -3
- 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/index.d.ts +18 -3
- package/dist/types/actions/tools/index.d.ts.map +1 -1
- package/dist/types/actions/tools/polymarketPostOrderAction.d.ts +83 -0
- package/dist/types/actions/tools/polymarketPostOrderAction.d.ts.map +1 -0
- package/dist/types/actions/tools/polymarketPostOrderAction.js +2 -0
- package/dist/types/actions/tools/polymarketPostOrderAction.js.map +1 -0
- package/dist/types/actions/tools/predictionMarketsBetAction.d.ts +19 -0
- package/dist/types/actions/tools/predictionMarketsBetAction.d.ts.map +1 -0
- package/dist/types/actions/tools/predictionMarketsBetAction.js +2 -0
- package/dist/types/actions/tools/predictionMarketsBetAction.js.map +1 -0
- package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
- package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
- package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
- package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
- package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts +25 -0
- package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts.map +1 -0
- package/dist/types/actions/tools/predictionMarketsPositionsAction.js +2 -0
- package/dist/types/actions/tools/predictionMarketsPositionsAction.js.map +1 -0
- package/dist/types/actions/tools/swapAction.d.ts +16 -0
- package/dist/types/actions/tools/swapAction.d.ts.map +1 -0
- package/dist/types/actions/tools/swapAction.js +2 -0
- package/dist/types/actions/tools/swapAction.js.map +1 -0
- 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/dist/utils/constants.d.ts +8 -6
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +23 -5
- package/dist/utils/constants.js.map +1 -1
- package/package.json +4 -4
- package/dist/types/actions/tools/swapBridgeAction.d.ts.map +0 -1
- package/dist/types/actions/tools/swapBridgeAction.js +0 -2
- package/dist/types/actions/tools/swapBridgeAction.js.map +0 -1
|
@@ -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,11 +1,16 @@
|
|
|
1
1
|
import type { SupportedAction } from "../../../utils/constants.js";
|
|
2
|
+
import type { BridgeActionInputSchema } from "./bridgeAction.js";
|
|
2
3
|
import type { DefiFetchListingsActionInputSchema } from "./defiFetchListingsAction.js";
|
|
3
4
|
import type { DefiPositionsActionInputSchema } from "./defiPositionsAction.js";
|
|
4
5
|
import type { DefiSupplyActionInputSchema } from "./defiSupplyAction.js";
|
|
5
6
|
import type { DefiWithdrawActionInputSchema } from "./defiWithdrawAction.js";
|
|
6
7
|
import type { ExchangeRateActionInputSchema } from "./exchangeRateAction.js";
|
|
7
8
|
import type { GetWalletBalanceActionInputSchema } from "./getWalletBalanceAction.js";
|
|
8
|
-
import type {
|
|
9
|
+
import type { PolymarketPostOrderActionInputSchema } from "./polymarketPostOrderAction.js";
|
|
10
|
+
import type { PredictionMarketsBetActionInputSchema } from "./predictionMarketsBetAction.js";
|
|
11
|
+
import type { PredictionMarketsFetchActionInputSchema } from "./predictionMarketsFetchAction.js";
|
|
12
|
+
import type { PredictionMarketsPositionsActionInputSchema } from "./predictionMarketsPositionsAction.js";
|
|
13
|
+
import type { SwapActionInputSchema } from "./swapAction.js";
|
|
9
14
|
import type { TokenTransferActionInputSchema } from "./tokenTransferAction.js";
|
|
10
15
|
/**
|
|
11
16
|
* Type-level mapping that explicitly links each SupportedAction with its corresponding Zod schema type
|
|
@@ -13,13 +18,18 @@ import type { TokenTransferActionInputSchema } from "./tokenTransferAction.js";
|
|
|
13
18
|
*/
|
|
14
19
|
export type ActionSchemaMapping = {
|
|
15
20
|
readonly tokenTransfer: TokenTransferActionInputSchema;
|
|
16
|
-
readonly swapOrBridge: SwapBridgeActionInputSchema;
|
|
17
21
|
readonly exchangeRate: ExchangeRateActionInputSchema;
|
|
18
22
|
readonly getWalletBalance: GetWalletBalanceActionInputSchema;
|
|
19
23
|
readonly defiFetchListings: DefiFetchListingsActionInputSchema;
|
|
20
24
|
readonly defiPositions: DefiPositionsActionInputSchema;
|
|
21
25
|
readonly defiSupply: DefiSupplyActionInputSchema;
|
|
22
26
|
readonly defiWithdraw: DefiWithdrawActionInputSchema;
|
|
27
|
+
readonly swap: SwapActionInputSchema;
|
|
28
|
+
readonly bridge: BridgeActionInputSchema;
|
|
29
|
+
readonly predictionMarketsFetch: PredictionMarketsFetchActionInputSchema;
|
|
30
|
+
readonly predictionMarketsBet: PredictionMarketsBetActionInputSchema;
|
|
31
|
+
readonly predictionMarketsPositions: PredictionMarketsPositionsActionInputSchema;
|
|
32
|
+
readonly polymarketPostOrder: PolymarketPostOrderActionInputSchema;
|
|
23
33
|
};
|
|
24
34
|
/**
|
|
25
35
|
* Utility type to get the schema type for a specific action
|
|
@@ -32,6 +42,11 @@ export type * from "./defiSupplyAction.js";
|
|
|
32
42
|
export type * from "./defiWithdrawAction.js";
|
|
33
43
|
export type * from "./exchangeRateAction.js";
|
|
34
44
|
export type * from "./getWalletBalanceAction.js";
|
|
35
|
-
export type * from "./
|
|
45
|
+
export type * from "./polymarketPostOrderAction.js";
|
|
46
|
+
export type * from "./predictionMarketsBetAction.js";
|
|
47
|
+
export type * from "./predictionMarketsFetchAction.js";
|
|
48
|
+
export type * from "./predictionMarketsPositionsAction.js";
|
|
49
|
+
export type * from "./swapAction.js";
|
|
50
|
+
export type * from "./bridgeAction.js";
|
|
36
51
|
export type * from "./tokenTransferAction.js";
|
|
37
52
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,C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
|
5
|
+
* All values are strings as they come from EIP-712 typed data
|
|
6
|
+
*/
|
|
7
|
+
export type SignedOrderSchema = z.ZodObject<{
|
|
8
|
+
salt: z.ZodString;
|
|
9
|
+
maker: z.ZodString;
|
|
10
|
+
signer: z.ZodString;
|
|
11
|
+
taker: z.ZodString;
|
|
12
|
+
tokenId: z.ZodString;
|
|
13
|
+
makerAmount: z.ZodString;
|
|
14
|
+
takerAmount: z.ZodString;
|
|
15
|
+
expiration: z.ZodString;
|
|
16
|
+
nonce: z.ZodString;
|
|
17
|
+
feeRateBps: z.ZodString;
|
|
18
|
+
side: z.ZodString;
|
|
19
|
+
signatureType: z.ZodString;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Schema for auth data needed to derive API credentials
|
|
23
|
+
*/
|
|
24
|
+
export type AuthDataSchema = z.ZodObject<{
|
|
25
|
+
signature: z.ZodString;
|
|
26
|
+
timestamp: z.ZodString;
|
|
27
|
+
nonce: z.ZodString;
|
|
28
|
+
address: z.ZodString;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Schema for SAFE_CREATE operation metadata
|
|
32
|
+
*/
|
|
33
|
+
export type SafeCreateMetadataSchema = z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<"SAFE_CREATE">;
|
|
35
|
+
safeAddress: z.ZodString;
|
|
36
|
+
eoaAddress: z.ZodString;
|
|
37
|
+
safeFactory: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Schema for SAFE_EXECUTE operation metadata
|
|
41
|
+
*/
|
|
42
|
+
export type SafeExecuteMetadataSchema = z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<"SAFE_EXECUTE">;
|
|
44
|
+
safeAddress: z.ZodString;
|
|
45
|
+
eoaAddress: z.ZodString;
|
|
46
|
+
nonce: z.ZodString;
|
|
47
|
+
to: z.ZodString;
|
|
48
|
+
data: z.ZodString;
|
|
49
|
+
operation: z.ZodNumber;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Union schema for operation metadata
|
|
53
|
+
*/
|
|
54
|
+
export type OperationMetadataSchema = z.ZodUnion<[
|
|
55
|
+
SafeCreateMetadataSchema,
|
|
56
|
+
SafeExecuteMetadataSchema
|
|
57
|
+
]>;
|
|
58
|
+
/**
|
|
59
|
+
* Schema for additional signed operations (Safe deploy/approvals)
|
|
60
|
+
*/
|
|
61
|
+
export type SignedOperationSchema = z.ZodObject<{
|
|
62
|
+
id: z.ZodString;
|
|
63
|
+
signature: z.ZodString;
|
|
64
|
+
metadata: OperationMetadataSchema;
|
|
65
|
+
}>;
|
|
66
|
+
/**
|
|
67
|
+
* Input schema for posting a signed order to Polymarket CLOB API
|
|
68
|
+
*/
|
|
69
|
+
export type PolymarketPostOrderActionInputSchema = z.ZodObject<{
|
|
70
|
+
chain: z.ZodEnum<[string, ...string[]]>;
|
|
71
|
+
order: SignedOrderSchema;
|
|
72
|
+
signature: z.ZodString;
|
|
73
|
+
authData: AuthDataSchema;
|
|
74
|
+
signerWallet: z.ZodOptional<z.ZodString>;
|
|
75
|
+
additionalSignatures: z.ZodOptional<z.ZodArray<SignedOperationSchema>>;
|
|
76
|
+
orderType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["GTC", "GTD", "FOK"]>>>;
|
|
77
|
+
provider: z.ZodLiteral<"polymarket">;
|
|
78
|
+
transactionsSucceeded: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
missingParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
|
+
humanFriendlyMessage: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}>;
|
|
82
|
+
export type PolymarketPostOrderActionInput = TypeOf<PolymarketPostOrderActionInputSchema>;
|
|
83
|
+
//# sourceMappingURL=polymarketPostOrderAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polymarketPostOrderAction.d.ts","sourceRoot":"","sources":["../../../../src/types/act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SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IACrC,qBAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACnD,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,8BAA8B,GAAG,MAAM,CAAC,oCAAoC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polymarketPostOrderAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/polymarketPostOrderAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TypeOf } from "zod";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export type PredictionMarketsBetActionInputSchema = z.ZodObject<{
|
|
4
|
+
chain: z.ZodEnum<[string, ...string[]]>;
|
|
5
|
+
fromAddress: z.ZodString;
|
|
6
|
+
signerWallet: z.ZodOptional<z.ZodString>;
|
|
7
|
+
marketId: z.ZodString;
|
|
8
|
+
outcome: z.ZodString;
|
|
9
|
+
orderType: z.ZodEnum<["market", "limit"]>;
|
|
10
|
+
price: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
amountType: z.ZodEnum<["usd", "shares"]>;
|
|
12
|
+
amount: z.ZodNumber;
|
|
13
|
+
side: z.ZodDefault<z.ZodEnum<["BUY", "SELL"]>>;
|
|
14
|
+
negRisk: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
missingParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16
|
+
humanFriendlyMessage: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}>;
|
|
18
|
+
export type PredictionMarketsBetActionInput = TypeOf<PredictionMarketsBetActionInputSchema>;
|
|
19
|
+
//# sourceMappingURL=predictionMarketsBetAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predictionMarketsBetAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/predictionMarketsBetAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,SAAS,CAAC;IAC5D,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;IACxC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,YAAY,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;IACrB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1C,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC;IACpB,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/C,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACrC,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,+BAA+B,GAAG,MAAM,CAAC,qCAAqC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predictionMarketsBetAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/predictionMarketsBetAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TypeOf } from "zod";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { SupportedPredictionMarketProvider } from "../../../internal.js";
|
|
4
|
+
export type PredictionMarketsFetchActionInputSchema = z.ZodObject<{
|
|
5
|
+
chain: z.ZodEnum<[string, ...string[]]>;
|
|
6
|
+
query: z.ZodOptional<z.ZodString>;
|
|
7
|
+
category: z.ZodOptional<z.ZodString>;
|
|
8
|
+
status: z.ZodDefault<z.ZodEnum<["active", "closed", "resolved"]>>;
|
|
9
|
+
sortBy: z.ZodOptional<z.ZodEnum<["volume", "liquidity", "endDate", "startDate"]>>;
|
|
10
|
+
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
provider: z.ZodEnum<[
|
|
14
|
+
SupportedPredictionMarketProvider,
|
|
15
|
+
...SupportedPredictionMarketProvider[]
|
|
16
|
+
]>;
|
|
17
|
+
missingParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
|
+
humanFriendlyMessage: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}>;
|
|
20
|
+
export type PredictionMarketsFetchActionInput = TypeOf<PredictionMarketsFetchActionInputSchema>;
|
|
21
|
+
//# sourceMappingURL=predictionMarketsFetchAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predictionMarketsFetchAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/predictionMarketsFetchAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AAE9E,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,SAAS,CAAC;IAC9D,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;IACxC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACrC,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAClE,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAClF,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACvC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,OAAO,CACf;QAAC,iCAAiC;QAAE,GAAG,iCAAiC,EAAE;KAAC,CAC9E,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,iCAAiC,GAAG,MAAM,CAAC,uCAAuC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predictionMarketsFetchAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/predictionMarketsFetchAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TypeOf } from "zod";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { SupportedPredictionMarketProvider } from "../../../internal.js";
|
|
4
|
+
export type PredictionMarketsPositionsActionInputSchema = z.ZodObject<{
|
|
5
|
+
chain: z.ZodEnum<[string, ...string[]]>;
|
|
6
|
+
userAddress: z.ZodString;
|
|
7
|
+
signerWallet: z.ZodOptional<z.ZodString>;
|
|
8
|
+
marketIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
eventIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
10
|
+
sizeThreshold: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
showRedeemable: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
showMergeable: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
sortBy: z.ZodOptional<z.ZodEnum<["value", "pnl", "size", "title"]>>;
|
|
16
|
+
sortDirection: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
17
|
+
provider: z.ZodEnum<[
|
|
18
|
+
SupportedPredictionMarketProvider,
|
|
19
|
+
...SupportedPredictionMarketProvider[]
|
|
20
|
+
]>;
|
|
21
|
+
missingParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
+
humanFriendlyMessage: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}>;
|
|
24
|
+
export type PredictionMarketsPositionsActionInput = TypeOf<PredictionMarketsPositionsActionInputSchema>;
|
|
25
|
+
//# sourceMappingURL=predictionMarketsPositionsAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predictionMarketsPositionsAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/predictionMarketsPositionsAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AAE9E,MAAM,MAAM,2CAA2C,GAAG,CAAC,CAAC,SAAS,CAAC;IAClE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;IACxC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,YAAY,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACzC,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAClD,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,aAAa,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1C,cAAc,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC5C,aAAa,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACnC,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpE,aAAa,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACzD,QAAQ,EAAE,CAAC,CAAC,OAAO,CACf;QAAC,iCAAiC;QAAE,GAAG,iCAAiC,EAAE;KAAC,CAC9E,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,qCAAqC,GAC7C,MAAM,CAAC,2CAA2C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predictionMarketsPositionsAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/predictionMarketsPositionsAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TypeOf, z } from "zod";
|
|
2
|
+
import type { SupportedChain, SupportedSwapBridgeProvider } from "../../../utils/constants.js";
|
|
3
|
+
export type SwapActionInputSchema = z.ZodObject<{
|
|
4
|
+
fromAddress: z.ZodString;
|
|
5
|
+
chain: z.ZodEnum<[SupportedChain, ...SupportedChain[]]>;
|
|
6
|
+
fromToken: z.ZodString;
|
|
7
|
+
fromAmount: z.ZodString;
|
|
8
|
+
toToken: z.ZodOptional<z.ZodString>;
|
|
9
|
+
toAddress: z.ZodOptional<z.ZodString>;
|
|
10
|
+
toAmount: z.ZodOptional<z.ZodString>;
|
|
11
|
+
protocol: z.ZodEnum<[SupportedSwapBridgeProvider, ...SupportedSwapBridgeProvider[]]>;
|
|
12
|
+
missingParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
|
+
humanFriendlyMessage: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}>;
|
|
15
|
+
export type SwapActionInput = TypeOf<SwapActionInputSchema>;
|
|
16
|
+
//# sourceMappingURL=swapAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swapAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/swapAction.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,qBAAqB,GAAG,CAAC,CAAC,SAAS,CAAC;IAC5C,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC;IACxD,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC;IACxB,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACpC,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACrC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,2BAA2B,EAAE,GAAG,2BAA2B,EAAE,CAAC,CAAC,CAAC;IACrF,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,eAAe,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swapAction.js","sourceRoot":"","sources":["../../../../src/types/actions/tools/swapAction.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":""}
|
|
@@ -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
|