@illalabs/sdk 0.1.0 → 0.3.0-canary.eb4a29bf

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 (66) hide show
  1. package/README.md +258 -0
  2. package/dist/src/chat/Chat.d.ts +2 -0
  3. package/dist/src/chat/Chat.d.ts.map +1 -1
  4. package/dist/src/chat/Chat.js +11 -2
  5. package/dist/src/chat/Chat.js.map +1 -1
  6. package/dist/src/chat/errors/UserContextMissing.d.ts +10 -0
  7. package/dist/src/chat/errors/UserContextMissing.d.ts.map +1 -0
  8. package/dist/src/chat/errors/UserContextMissing.js +13 -0
  9. package/dist/src/chat/errors/UserContextMissing.js.map +1 -0
  10. package/dist/src/chat/errors/index.d.ts +1 -0
  11. package/dist/src/chat/errors/index.d.ts.map +1 -1
  12. package/dist/src/chat/errors/index.js +1 -0
  13. package/dist/src/chat/errors/index.js.map +1 -1
  14. package/dist/src/external.d.ts +2 -9
  15. package/dist/src/external.d.ts.map +1 -1
  16. package/dist/src/external.js +2 -8
  17. package/dist/src/external.js.map +1 -1
  18. package/dist/src/interfaces/chat.interface.d.ts +8 -2
  19. package/dist/src/interfaces/chat.interface.d.ts.map +1 -1
  20. package/dist/src/interfaces/coreApiProvider.interface.d.ts +7 -1
  21. package/dist/src/interfaces/coreApiProvider.interface.d.ts.map +1 -1
  22. package/dist/src/internal.d.ts +2 -1
  23. package/dist/src/internal.d.ts.map +1 -1
  24. package/dist/src/internal.js +2 -1
  25. package/dist/src/internal.js.map +1 -1
  26. package/dist/src/providers/coreApiProvider/CoreApiErrorHandler.d.ts +13 -0
  27. package/dist/src/providers/coreApiProvider/CoreApiErrorHandler.d.ts.map +1 -0
  28. package/dist/src/providers/coreApiProvider/CoreApiErrorHandler.js +67 -0
  29. package/dist/src/providers/coreApiProvider/CoreApiErrorHandler.js.map +1 -0
  30. package/dist/src/providers/coreApiProvider/CoreApiProvider.d.ts +9 -2
  31. package/dist/src/providers/coreApiProvider/CoreApiProvider.d.ts.map +1 -1
  32. package/dist/src/providers/coreApiProvider/CoreApiProvider.js +40 -36
  33. package/dist/src/providers/coreApiProvider/CoreApiProvider.js.map +1 -1
  34. package/dist/src/providers/coreApiProvider/errors/CoreApiAuthenticationMissing.d.ts +2 -4
  35. package/dist/src/providers/coreApiProvider/errors/CoreApiAuthenticationMissing.d.ts.map +1 -1
  36. package/dist/src/providers/coreApiProvider/errors/CoreApiAuthenticationMissing.js +7 -6
  37. package/dist/src/providers/coreApiProvider/errors/CoreApiAuthenticationMissing.js.map +1 -1
  38. package/dist/src/providers/coreApiProvider/index.d.ts +2 -3
  39. package/dist/src/providers/coreApiProvider/index.d.ts.map +1 -1
  40. package/dist/src/providers/coreApiProvider/index.js.map +1 -1
  41. package/dist/src/providers/coreApiProvider/{CoreApiProviderConfig.d.ts → interfaces/CoreApiProviderConfig.interface.d.ts} +7 -2
  42. package/dist/src/providers/coreApiProvider/interfaces/CoreApiProviderConfig.interface.d.ts.map +1 -0
  43. package/dist/src/providers/coreApiProvider/interfaces/CoreApiProviderConfig.interface.js +2 -0
  44. package/dist/src/providers/coreApiProvider/interfaces/CoreApiProviderConfig.interface.js.map +1 -0
  45. package/dist/src/providers/coreApiProvider/interfaces/CoreApiProviderRoutes.interface.d.ts +14 -0
  46. package/dist/src/providers/coreApiProvider/interfaces/CoreApiProviderRoutes.interface.d.ts.map +1 -0
  47. package/dist/src/providers/coreApiProvider/interfaces/CoreApiProviderRoutes.interface.js +2 -0
  48. package/dist/src/providers/coreApiProvider/interfaces/CoreApiProviderRoutes.interface.js.map +1 -0
  49. package/dist/src/providers/coreApiProvider/interfaces/index.d.ts +3 -0
  50. package/dist/src/providers/coreApiProvider/interfaces/index.d.ts.map +1 -0
  51. package/dist/src/providers/coreApiProvider/interfaces/index.js +2 -0
  52. package/dist/src/providers/coreApiProvider/interfaces/index.js.map +1 -0
  53. package/dist/src/providers/coreApiProvider/types.d.ts +9 -0
  54. package/dist/src/providers/coreApiProvider/types.d.ts.map +1 -1
  55. package/dist/src/sdk.d.ts +288 -0
  56. package/dist/src/sdk.d.ts.map +1 -0
  57. package/dist/src/sdk.js +287 -0
  58. package/dist/src/sdk.js.map +1 -0
  59. package/package.json +9 -3
  60. package/dist/src/providers/coreApiProvider/CoreApiProviderConfig.d.ts.map +0 -1
  61. package/dist/src/providers/coreApiProvider/CoreApiProviderConfig.js +0 -2
  62. package/dist/src/providers/coreApiProvider/CoreApiProviderConfig.js.map +0 -1
  63. package/dist/src/providers/coreApiProvider/RequestOptions.d.ts +0 -10
  64. package/dist/src/providers/coreApiProvider/RequestOptions.d.ts.map +0 -1
  65. package/dist/src/providers/coreApiProvider/RequestOptions.js +0 -2
  66. package/dist/src/providers/coreApiProvider/RequestOptions.js.map +0 -1
@@ -0,0 +1,287 @@
1
+ import { AsyncToolChecker, Chat, ContextManager, CoreApiProvider, InMemoryCache, Prompt, UserContextMissing, } from "./internal.js";
2
+ /**
3
+ * Error raised when attempting to interact with a chat that doesn't exist.
4
+ *
5
+ * This typically occurs when using an invalid or expired chat ID with methods
6
+ * like {@link IllaSDK.sendToolResult}.
7
+ */
8
+ class ChatNotFound extends Error {
9
+ /**
10
+ * The ID of the chat that was not found.
11
+ */
12
+ chatId;
13
+ /**
14
+ * Creates a new {@link ChatNotFound} instance.
15
+ *
16
+ * @param chatId The ID of the chat that was not found.
17
+ * @param options Error options for error chaining.
18
+ */
19
+ constructor(chatId, options) {
20
+ super(`Chat with ID ${chatId} not found`, options);
21
+ this.name = "ChatNotFound";
22
+ this.chatId = chatId;
23
+ }
24
+ }
25
+ /**
26
+ * The main entry point for interacting with the ILLA AI SDK.
27
+ * This class provides methods for creating and managing chat sessions,
28
+ * sending messages, handling tool results, and configuring async tool checkers.
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * import { IllaSDK } from '@illalabs/sdk';
33
+ *
34
+ * const sdk = new IllaSDK({
35
+ * apiKey: 'your-api-key'
36
+ * });
37
+ *
38
+ * // Start a conversation
39
+ * const result = await sdk.sendMessage(
40
+ * "What can you help me with?",
41
+ * { userContext: { address: "0x1234..." } }
42
+ * );
43
+ *
44
+ * console.log(result.response.text);
45
+ * ```
46
+ */
47
+ class IllaSDK {
48
+ coreApiProvider;
49
+ contextManager;
50
+ chats = new Map();
51
+ /**
52
+ * Creates a new instance of the IllaSDK.
53
+ *
54
+ * @param config - Configuration object containing API key and optional base URL
55
+ * @param options - Optional configuration for cache and context manager
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * // Basic initialization
60
+ * const sdk = new IllaSDK({ apiKey: 'your-api-key' });
61
+ *
62
+ * // With custom cache
63
+ * const cache = new InMemoryCache();
64
+ * const sdk = new IllaSDK(
65
+ * { apiKey: 'your-api-key' },
66
+ * { cache }
67
+ * );
68
+ *
69
+ * // With custom context manager
70
+ * const contextManager = new ContextManager(cache, { defaultToolsConfig: { autoRouter: { swapOrBridge: 'lifi' } } });
71
+ * const sdk = new IllaSDK(
72
+ * { apiKey: 'your-api-key' },
73
+ * { contextManager }
74
+ * );
75
+ * ```
76
+ */
77
+ constructor(config, options) {
78
+ this.coreApiProvider = new CoreApiProvider({
79
+ baseURL: config.baseURL,
80
+ headers: {
81
+ "x-api-key": config.apiKey,
82
+ },
83
+ });
84
+ if (options && options.contextManager) {
85
+ this.contextManager = options.contextManager;
86
+ }
87
+ else {
88
+ this.contextManager = new ContextManager(options?.cache ?? new InMemoryCache(), options?.contextManagerOptions ?? {});
89
+ }
90
+ }
91
+ /**
92
+ * Gets an array of all active chat IDs managed by this SDK instance.
93
+ *
94
+ * @returns {string[]} Array of chat IDs
95
+ *
96
+ * @example
97
+ * ```typescript
98
+ * const sdk = new IllaSDK({ apiKey: 'your-api-key' });
99
+ *
100
+ * await sdk.sendMessage("Hello", { userContext: { address: "0x123" } });
101
+ * await sdk.sendMessage("Hi", { userContext: { address: "0x456" } });
102
+ *
103
+ * const chatIds = sdk.chatIds;
104
+ * console.log(chatIds); // ['chat-id-1', 'chat-id-2']
105
+ * ```
106
+ */
107
+ get chatIds() {
108
+ return Array.from(this.chats.keys());
109
+ }
110
+ /**
111
+ * Creates a new ContextManager instance. This is a factory method for creating
112
+ * context managers with custom configurations.
113
+ *
114
+ * @param cache - The cache implementation to use for storing context
115
+ * @param options - Configuration options for the context manager
116
+ * @returns {ContextManager} A new ContextManager instance
117
+ *
118
+ * @example
119
+ * ```typescript
120
+ * const cache = new InMemoryCache();
121
+ * const contextManager = IllaSDK.createNewContextManager(cache, {
122
+ * defaultToolsConfig: {
123
+ * autoRouter: { swapOrBridge: 'lifi' }
124
+ * }
125
+ * });
126
+ *
127
+ * const sdk = new IllaSDK(
128
+ * { apiKey: 'your-api-key' },
129
+ * { contextManager }
130
+ * );
131
+ * ```
132
+ */
133
+ static createNewContextManager(cache, options) {
134
+ return new ContextManager(cache, options);
135
+ }
136
+ /**
137
+ * Creates a new Chat instance with the specified options.
138
+ * The chat is automatically registered with this SDK instance.
139
+ *
140
+ * @param options - Options for creating the chat, including user context and optional ID
141
+ * @param contextManager - Optional custom context manager for this chat. If not provided, uses the SDK's default
142
+ * @returns {Chat} A new Chat instance
143
+ *
144
+ * @example
145
+ * ```typescript
146
+ * const sdk = new IllaSDK({ apiKey: 'your-api-key' });
147
+ *
148
+ * // Create a new chat
149
+ * const chat = sdk.createChat({
150
+ * userContext: { address: "0x1234..." }
151
+ * });
152
+ *
153
+ * // Send messages directly through the chat instance
154
+ * const result = await chat.sendMessage(new Prompt({ text: "Hello!" }));
155
+ * ```
156
+ */
157
+ createChat(options, contextManager) {
158
+ const chat = new Chat({
159
+ coreApiProvider: this.coreApiProvider,
160
+ contextManager: contextManager ?? this.contextManager,
161
+ userContext: options.userContext,
162
+ id: options.id,
163
+ asyncToolChecker: new AsyncToolChecker({
164
+ coreApiProvider: this.coreApiProvider,
165
+ }),
166
+ });
167
+ this.chats.set(chat.getId(), chat);
168
+ return chat;
169
+ }
170
+ /**
171
+ * Sends a message to a chat session. This is the primary method for interacting with the AI.
172
+ * If a chatId is provided, the message will be sent to the existing chat.
173
+ * If a chatId is not provided, a new chat will be created with the provided userContext.
174
+ *
175
+ * @param msg - The message text to send
176
+ * @param context - Context containing either chatId for existing chat or userContext for new chat
177
+ * @returns {Promise<SendMessageResult>} The AI's response including chat ID, response text, and any pending tools
178
+ *
179
+ * @example
180
+ * ```typescript
181
+ * const sdk = new IllaSDK({ apiKey: 'your-api-key' });
182
+ *
183
+ * // Start a new conversation
184
+ * const result1 = await sdk.sendMessage(
185
+ * "What can you help me with?",
186
+ * { userContext: { address: "0x1234..." } }
187
+ * );
188
+ * console.log(result1.response.text);
189
+ * console.log("Chat ID:", result1.chatId);
190
+ *
191
+ * // Continue the conversation using the chat ID
192
+ * const result2 = await sdk.sendMessage(
193
+ * "I want to swap 1 ETH for USDC on Base",
194
+ * { chatId: result1.chatId }
195
+ * );
196
+ *
197
+ * // Check if there are tools to execute
198
+ * if (result2.response.pendingTools && result2.response.pendingTools.length > 0) {
199
+ * console.log("Tool to execute:", result2.response.pendingTools[0]);
200
+ * }
201
+ * ```
202
+ */
203
+ sendMessage(msg, context) {
204
+ if (context.chatId && this.chats.get(context.chatId) !== undefined) {
205
+ return this.chats.get(context.chatId).sendMessage(new Prompt({ text: msg }));
206
+ }
207
+ if (!context.userContext) {
208
+ throw new UserContextMissing();
209
+ }
210
+ const chat = this.createChat({ userContext: context.userContext });
211
+ this.chats.set(chat.getId(), chat);
212
+ return chat.sendMessage(new Prompt({ text: msg }));
213
+ }
214
+ /**
215
+ * Sends the result of a tool execution back to the AI. This method is used to complete
216
+ * the tool execution loop when the AI requests a tool to be executed.
217
+ *
218
+ * @param chatId - The ID of the chat to send the tool result to
219
+ * @param toolResult - The result of the tool execution
220
+ * @returns {Promise<SendMessageResult>} The AI's response after processing the tool result
221
+ * @throws {Error} If the chat with the specified chatId is not found
222
+ *
223
+ * @example
224
+ * ```typescript
225
+ * const sdk = new IllaSDK({ apiKey: 'your-api-key' });
226
+ *
227
+ * // Start a conversation that will request a tool execution
228
+ * const result1 = await sdk.sendMessage(
229
+ * "Swap 1 ETH for USDC on Base",
230
+ * { userContext: { address: "0x1234..." } }
231
+ * );
232
+ *
233
+ * // Check if there are pending tools to execute
234
+ * if (result1.response.pendingTools && result1.response.pendingTools.length > 0) {
235
+ * const tool = result1.response.pendingTools[0];
236
+ *
237
+ * // Execute the tool (e.g., send a transaction)
238
+ * const executionResult = await executeTool(tool);
239
+ *
240
+ * // Send the result back to the ILLA
241
+ * const toolResult: ToolResultType = {
242
+ * toolCallId: tool.toolCallId,
243
+ * toolName: tool.toolName,
244
+ * result?: executionResult,
245
+ * error?: executionResult.error,
246
+ * };
247
+ *
248
+ * const result2 = await sdk.sendToolResult(result1.chatId, toolResult);
249
+ * console.log(result2.response.text); // ILLA's response after processing the tool result
250
+ * }
251
+ * ```
252
+ */
253
+ async sendToolResult(chatId, toolResult) {
254
+ if (this.chats.get(chatId) === undefined) {
255
+ throw new ChatNotFound(chatId);
256
+ }
257
+ return await this.chats.get(chatId).sendMessage(new Prompt({ toolResult }));
258
+ }
259
+ /**
260
+ * Gets the messages for a given chat ID.
261
+ *
262
+ * @param chatId - The ID of the chat to get the messages for
263
+ * @returns {Promise<MessageHistoryType>} The messages for the chat
264
+ * @throws {ChatNotFound} If the chat with the specified chatId is not found
265
+ */
266
+ async getMessages(chatId) {
267
+ const chat = this.chats.get(chatId);
268
+ if (!chat) {
269
+ throw new ChatNotFound(chatId);
270
+ }
271
+ return chat.messages;
272
+ }
273
+ }
274
+ /**
275
+ * Exports the public API of the SDK.
276
+ * A user could import IllaSDK as a single entry point to the SDK.
277
+ * Or they could import the individual components of the SDK for advanced usage.
278
+ */
279
+ export { IllaSDK, ChatNotFound };
280
+ export { InMemoryCache } from "./caching/index.js";
281
+ export { Prompt } from "./prompt/index.js";
282
+ export { Chat } from "./chat/index.js";
283
+ export { ContextManager } from "./context/index.js";
284
+ export { AsyncToolChecker } from "./asyncToolChecker/index.js";
285
+ export { CoreApiProvider } from "./providers/index.js";
286
+ export { UserContextMissing } from "./chat/errors/index.js";
287
+ //# sourceMappingURL=sdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAUA,OAAO,EACH,gBAAgB,EAChB,IAAI,EACJ,cAAc,EACd,eAAe,EACf,aAAa,EACb,MAAM,EACN,kBAAkB,GACrB,MAAM,eAAe,CAAC;AAwDvB;;;;;GAKG;AACH,MAAM,YAAa,SAAQ,KAAK;IAC5B;;OAEG;IACa,MAAM,CAAS;IAE/B;;;;;OAKG;IACH,YAAmB,MAAc,EAAE,OAAsB;QACrD,KAAK,CAAC,gBAAgB,MAAM,YAAY,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;CACJ;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO;IACD,eAAe,CAAkB;IACjC,cAAc,CAAkB;IAEhC,KAAK,GAAsB,IAAI,GAAG,EAAE,CAAC;IAE7C;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,YAAY,MAAqB,EAAE,OAAwB;QACvD,IAAI,CAAC,eAAe,GAAG,IAAI,eAAe,CAAC;YACvC,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,OAAO,EAAE;gBACL,WAAW,EAAE,MAAM,CAAC,MAAM;aAC7B;SACJ,CAAC,CAAC;QAEH,IAAI,OAAO,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;YACpC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;QACjD,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CACpC,OAAO,EAAE,KAAK,IAAI,IAAI,aAAa,EAAE,EACrC,OAAO,EAAE,qBAAqB,IAAI,EAAE,CACvC,CAAC;QACN,CAAC;IACL,CAAC;IAED;;;;;;;;;;;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AO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@illalabs/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.3.0-canary.eb4a29bf",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK for interacting with Illa's Core API",
6
6
  "license": "MIT",
@@ -23,12 +23,16 @@
23
23
  "axios": "1.12.2",
24
24
  "uuid": "13.0.0",
25
25
  "viem": "2.37.13",
26
- "@illalabs/interfaces": "0.1.0"
26
+ "@illalabs/interfaces": "0.2.0-canary.eb4a29bf"
27
+ },
28
+ "devDependencies": {
29
+ "zod": "4.1.12"
27
30
  },
28
31
  "publishConfig": {
29
32
  "access": "public"
30
33
  },
31
34
  "scripts": {
35
+ "anvil": "./scripts/start-anvil.sh",
32
36
  "build": "tsc -p tsconfig.build.json",
33
37
  "check-types": "tsc --noEmit -p tsconfig.json",
34
38
  "clean": "rm -rf dist",
@@ -37,6 +41,8 @@
37
41
  "lint": "eslint \"{src,test}/**/*.{ts,js,json}\"",
38
42
  "lint:fix": "pnpm lint --fix",
39
43
  "test": "vitest run --config vitest.config.ts --passWithNoTests",
40
- "test:cov": "vitest run --config vitest.config.ts --coverage"
44
+ "test:cov": "vitest run --config vitest.config.ts --coverage",
45
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
46
+ "test:e2e:anvil": "./scripts/test-with-anvil.sh"
41
47
  }
42
48
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreApiProviderConfig.d.ts","sourceRoot":"","sources":["../../../../src/providers/coreApiProvider/CoreApiProviderConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CAClD"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=CoreApiProviderConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CoreApiProviderConfig.js","sourceRoot":"","sources":["../../../../src/providers/coreApiProvider/CoreApiProviderConfig.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- /**
2
- * Options for Core API requests
3
- */
4
- export interface RequestOptions {
5
- /**
6
- * Abort signal used to cancel the request
7
- */
8
- readonly signal?: AbortSignal;
9
- }
10
- //# sourceMappingURL=RequestOptions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RequestOptions.d.ts","sourceRoot":"","sources":["../../../../src/providers/coreApiProvider/RequestOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CACjC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=RequestOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RequestOptions.js","sourceRoot":"","sources":["../../../../src/providers/coreApiProvider/RequestOptions.ts"],"names":[],"mappings":""}