@intentfi/agent-sdk 0.1.0

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/client.js ADDED
@@ -0,0 +1,322 @@
1
+ const MCP_PROTOCOL_VERSION = "2025-11-25";
2
+ export class IntentFiClient {
3
+ baseUrl;
4
+ apiKey;
5
+ transport;
6
+ fetchImpl;
7
+ mcpSessionId;
8
+ constructor(options = {}) {
9
+ this.baseUrl = (options.baseUrl ?? process.env.INTENTFI_BASE_URL ?? "https://agentic.intentfi.io").replace(/\/+$/, "");
10
+ this.apiKey = options.apiKey ?? process.env.INTENTFI_API_KEY;
11
+ this.transport = resolveTransportMode(options.transport ?? process.env.INTENTFI_TRANSPORT);
12
+ this.fetchImpl = options.fetchImpl ?? fetch;
13
+ }
14
+ async requestSiweChallenge(args) {
15
+ const response = await this.fetchJson("/agent/v1/auth/siwe/challenge", {
16
+ method: "POST",
17
+ headers: { "content-type": "application/json" },
18
+ body: JSON.stringify({
19
+ address: args.address,
20
+ walletType: args.walletType ?? "eoa",
21
+ chainId: args.chainId ?? 8453,
22
+ }),
23
+ });
24
+ return response;
25
+ }
26
+ async mintApiKeyWithSiwe(args) {
27
+ return await this.fetchJson("/agent/v1/auth/siwe/mint-key", {
28
+ method: "POST",
29
+ headers: { "content-type": "application/json" },
30
+ body: JSON.stringify(args),
31
+ });
32
+ }
33
+ async createWorkflow(args) {
34
+ this.assertApiKey("createWorkflow");
35
+ if (this.transport === "mcp") {
36
+ return await this.mcpToolCall("intentfi.create_workflow", args);
37
+ }
38
+ return await this.createWorkflowRest(args);
39
+ }
40
+ async getWorkflow(args) {
41
+ this.assertApiKey("getWorkflow");
42
+ if (this.transport === "mcp") {
43
+ const result = await this.mcpToolCall("intentfi.get_workflow", args, { stream: (args.waitMs ?? 0) > 0 });
44
+ const workflow = (result.workflow ??
45
+ result);
46
+ const waitKind = result.wait?.kind;
47
+ const retryAfterMs = toOptionalRetryAfterMs(result.wait?.retryAfterMs);
48
+ return {
49
+ workflow,
50
+ status: waitKind === "timeout" ? 202 : 200,
51
+ ...(retryAfterMs !== undefined ? { retryAfterMs } : {}),
52
+ };
53
+ }
54
+ return await this.getWorkflowRest(args);
55
+ }
56
+ async prepareActive(args) {
57
+ this.assertApiKey("prepareActive");
58
+ if (this.transport === "mcp") {
59
+ const result = await this.mcpToolCall("intentfi.prepare_active", args, { stream: (args.waitMs ?? 0) > 0 });
60
+ return {
61
+ result,
62
+ status: result.kind === "pending" ? 202 : 200,
63
+ };
64
+ }
65
+ return await this.prepareActiveRest(args);
66
+ }
67
+ async getActiveSubmissionContext(args) {
68
+ this.assertApiKey("getActiveSubmissionContext");
69
+ if (this.transport === "mcp") {
70
+ return await this.mcpToolCall("intentfi.get_active_submission_context", args);
71
+ }
72
+ return await this.fetchJson(`/agent/v1/workflows/${args.workflowId}/active-submission-context`, {
73
+ headers: this.withApiKey(),
74
+ });
75
+ }
76
+ async submitActiveTransactions(args) {
77
+ this.assertApiKey("submitActiveTransactions");
78
+ if (this.transport === "mcp") {
79
+ const result = await this.mcpToolCall("intentfi.submit_active_transactions", args, { stream: (args.waitMs ?? 0) > 0 });
80
+ const waitKind = result.wait?.kind;
81
+ return {
82
+ result,
83
+ status: waitKind === "timeout" ? 202 : 200,
84
+ };
85
+ }
86
+ return await this.submitActiveTransactionsRest(args);
87
+ }
88
+ async submitActiveSendCalls(args) {
89
+ this.assertApiKey("submitActiveSendCalls");
90
+ if (this.transport === "mcp") {
91
+ const result = await this.mcpToolCall("intentfi.submit_active_sendcalls", args, { stream: (args.waitMs ?? 0) > 0 });
92
+ const waitKind = result.wait?.kind;
93
+ return {
94
+ result,
95
+ status: waitKind === "timeout" ? 202 : 200,
96
+ };
97
+ }
98
+ return await this.submitActiveSendCallsRest(args);
99
+ }
100
+ async createWorkflowRest(args) {
101
+ return await this.fetchJson("/agent/v1/workflows", {
102
+ method: "POST",
103
+ headers: this.withApiKey({
104
+ "content-type": "application/json",
105
+ }),
106
+ body: JSON.stringify(args),
107
+ });
108
+ }
109
+ async getWorkflowRest(args) {
110
+ const query = args.waitMs !== undefined ? `?waitMs=${args.waitMs}` : "";
111
+ const response = await this.fetchEnvelope(`/agent/v1/workflows/${args.workflowId}${query}`, {
112
+ headers: this.withApiKey(),
113
+ });
114
+ return {
115
+ workflow: response.data,
116
+ status: response.status,
117
+ ...(parseRetryAfterHeader(response.headers.get("retry-after")) !== undefined
118
+ ? { retryAfterMs: parseRetryAfterHeader(response.headers.get("retry-after")) }
119
+ : {}),
120
+ };
121
+ }
122
+ async prepareActiveRest(args) {
123
+ const response = await this.fetchEnvelope(`/agent/v1/workflows/${args.workflowId}/prepare`, {
124
+ method: "POST",
125
+ headers: this.withApiKey({ "content-type": "application/json" }),
126
+ body: JSON.stringify({
127
+ requestId: args.requestId,
128
+ ...(args.waitMs !== undefined ? { waitMs: args.waitMs } : {}),
129
+ }),
130
+ });
131
+ return { result: response.data, status: response.status };
132
+ }
133
+ async submitActiveTransactionsRest(args) {
134
+ const response = await this.fetchEnvelope(`/agent/v1/workflows/${args.workflowId}/submit-transactions`, {
135
+ method: "POST",
136
+ headers: this.withApiKey({ "content-type": "application/json" }),
137
+ body: JSON.stringify(args),
138
+ });
139
+ return { result: response.data, status: response.status };
140
+ }
141
+ async submitActiveSendCallsRest(args) {
142
+ const response = await this.fetchEnvelope(`/agent/v1/workflows/${args.workflowId}/submit-sendcalls`, {
143
+ method: "POST",
144
+ headers: this.withApiKey({ "content-type": "application/json" }),
145
+ body: JSON.stringify(args),
146
+ });
147
+ return { result: response.data, status: response.status };
148
+ }
149
+ async mcpInitialize() {
150
+ const response = await this.fetchImpl(`${this.baseUrl}/mcp`, {
151
+ method: "POST",
152
+ headers: {
153
+ "content-type": "application/json",
154
+ "MCP-Protocol-Version": MCP_PROTOCOL_VERSION,
155
+ },
156
+ body: JSON.stringify({
157
+ jsonrpc: "2.0",
158
+ id: 1,
159
+ method: "initialize",
160
+ params: {},
161
+ }),
162
+ });
163
+ const body = (await response.json());
164
+ if (!response.ok || !body.result?.protocolVersion) {
165
+ throw new Error("MCP initialize failed");
166
+ }
167
+ const sessionId = response.headers.get("MCP-Session-Id");
168
+ if (!sessionId) {
169
+ throw new Error("MCP initialize did not return MCP-Session-Id");
170
+ }
171
+ this.mcpSessionId = sessionId;
172
+ const notification = await this.fetchImpl(`${this.baseUrl}/mcp`, {
173
+ method: "POST",
174
+ headers: {
175
+ "content-type": "application/json",
176
+ "MCP-Protocol-Version": MCP_PROTOCOL_VERSION,
177
+ "MCP-Session-Id": this.mcpSessionId,
178
+ },
179
+ body: JSON.stringify({
180
+ jsonrpc: "2.0",
181
+ method: "notifications/initialized",
182
+ }),
183
+ });
184
+ if (notification.status !== 202) {
185
+ throw new Error(`MCP initialized notification failed (${notification.status})`);
186
+ }
187
+ }
188
+ async mcpToolCall(name, args, options, attempt = 0) {
189
+ if (!this.mcpSessionId) {
190
+ await this.mcpInitialize();
191
+ }
192
+ const response = await this.fetchImpl(`${this.baseUrl}/mcp`, {
193
+ method: "POST",
194
+ headers: {
195
+ "content-type": "application/json",
196
+ accept: options?.stream ? "application/json, text/event-stream" : "application/json",
197
+ "MCP-Protocol-Version": MCP_PROTOCOL_VERSION,
198
+ "MCP-Session-Id": String(this.mcpSessionId),
199
+ ...this.withApiKey(),
200
+ },
201
+ body: JSON.stringify({
202
+ jsonrpc: "2.0",
203
+ id: Date.now(),
204
+ method: "tools/call",
205
+ params: {
206
+ name,
207
+ arguments: args,
208
+ },
209
+ }),
210
+ });
211
+ const returnedSessionId = response.headers.get("MCP-Session-Id");
212
+ if (returnedSessionId) {
213
+ this.mcpSessionId = returnedSessionId;
214
+ }
215
+ const contentType = (response.headers.get("content-type") ?? "").toLowerCase();
216
+ if (contentType.includes("text/event-stream")) {
217
+ const text = await response.text();
218
+ const messages = text
219
+ .split("\n\n")
220
+ .map((chunk) => chunk.trim())
221
+ .filter((chunk) => chunk.startsWith("data:"))
222
+ .map((chunk) => chunk.slice(5).trim())
223
+ .map((chunk) => JSON.parse(chunk));
224
+ const final = messages.reverse().find((entry) => entry.result !== undefined || entry.error !== undefined);
225
+ if (!final) {
226
+ throw new Error("MCP stream response did not contain a final message");
227
+ }
228
+ if (final.error) {
229
+ if (final.error.data?.code === "MCP_SESSION_REQUIRED" && attempt === 0) {
230
+ await this.mcpInitialize();
231
+ return await this.mcpToolCall(name, args, options, attempt + 1);
232
+ }
233
+ throw createClientError(final.error.message ?? "MCP tool call failed", final.error.data?.code, response.status);
234
+ }
235
+ return final.result;
236
+ }
237
+ const text = await response.text();
238
+ let body;
239
+ try {
240
+ body = JSON.parse(text);
241
+ }
242
+ catch {
243
+ throw new Error(`MCP tool call failed (${response.status})`);
244
+ }
245
+ if (body.error?.data?.code === "MCP_SESSION_REQUIRED" && attempt === 0) {
246
+ await this.mcpInitialize();
247
+ return await this.mcpToolCall(name, args, options, attempt + 1);
248
+ }
249
+ if (!response.ok || body.error) {
250
+ throw createClientError(body.error?.message ?? `MCP tool call failed (${response.status})`, body.error?.data?.code, response.status);
251
+ }
252
+ return body.result;
253
+ }
254
+ withApiKey(headers = {}) {
255
+ if (!this.apiKey) {
256
+ return headers;
257
+ }
258
+ return {
259
+ ...headers,
260
+ "x-api-key": this.apiKey,
261
+ };
262
+ }
263
+ assertApiKey(operation) {
264
+ if (!this.apiKey) {
265
+ throw new Error(`INTENTFI_API_KEY is required for ${operation}. Set apiKey in IntentFiClient options or INTENTFI_API_KEY in the environment.`);
266
+ }
267
+ }
268
+ async fetchJson(path, init) {
269
+ const result = await this.fetchEnvelope(path, init);
270
+ return result.data;
271
+ }
272
+ async fetchEnvelope(path, init) {
273
+ const response = await this.fetchImpl(`${this.baseUrl}${path}`, init);
274
+ const body = (await response.json());
275
+ if (!response.ok || body.ok === false) {
276
+ const errorCode = body.ok === false ? body.error.code : "HTTP_ERROR";
277
+ const errorMessage = body.ok === false ? body.error.message : `HTTP ${response.status}`;
278
+ throw createClientError(`${errorCode}: ${errorMessage}`, errorCode, response.status);
279
+ }
280
+ return {
281
+ data: body.data,
282
+ status: response.status,
283
+ headers: response.headers,
284
+ };
285
+ }
286
+ }
287
+ function createClientError(message, code, status) {
288
+ const error = new Error(message);
289
+ if (code) {
290
+ error.code = code;
291
+ }
292
+ if (status !== undefined) {
293
+ error.status = status;
294
+ }
295
+ return error;
296
+ }
297
+ function parseRetryAfterHeader(value) {
298
+ if (!value) {
299
+ return undefined;
300
+ }
301
+ const numeric = Number(value);
302
+ if (Number.isFinite(numeric) && numeric > 0) {
303
+ return Math.round(numeric * 1000);
304
+ }
305
+ return undefined;
306
+ }
307
+ function toOptionalRetryAfterMs(value) {
308
+ if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
309
+ return undefined;
310
+ }
311
+ return Math.round(value);
312
+ }
313
+ function resolveTransportMode(raw) {
314
+ if (!raw) {
315
+ return "rest";
316
+ }
317
+ const normalized = raw.trim().toLowerCase();
318
+ if (normalized === "rest" || normalized === "mcp") {
319
+ return normalized;
320
+ }
321
+ throw new Error("transport must be 'rest' or 'mcp'.");
322
+ }
@@ -0,0 +1,3 @@
1
+ export { IntentFiClient } from "./client";
2
+ export type { ActiveSubmissionContext, ExecutionArtifactInput, Envelope, GatewayWalletType, PrepareActiveResult, SubmittedTransaction, TransportMode, WorkflowDetail, } from "./types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,cAAc,GACf,MAAM,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { IntentFiClient } from "./client";
@@ -0,0 +1,111 @@
1
+ export type Envelope<T> = {
2
+ ok: true;
3
+ data: T;
4
+ traceId: string;
5
+ } | {
6
+ ok: false;
7
+ error: {
8
+ code: string;
9
+ message: string;
10
+ category?: string;
11
+ retryable?: boolean;
12
+ details?: Record<string, unknown>;
13
+ };
14
+ traceId: string;
15
+ };
16
+ export type TransportMode = "rest" | "mcp";
17
+ export type WorkflowDetail = {
18
+ _id: string;
19
+ status: string;
20
+ nextAction?: {
21
+ type?: string;
22
+ batchIndex?: number;
23
+ [key: string]: unknown;
24
+ } | null;
25
+ batchesTotal?: number;
26
+ batchesConfirmed?: number;
27
+ currentBatchIndex?: number;
28
+ [key: string]: unknown;
29
+ };
30
+ export type PrepareActiveResult = {
31
+ kind: "pending";
32
+ retryAfterMs: number;
33
+ reason: "WORKFLOW_PLANNING" | "BATCH_PREPARING";
34
+ } | {
35
+ kind: "ready";
36
+ batchId: string;
37
+ manifestHash: string;
38
+ manifestVersion: number;
39
+ validUntilMs: number;
40
+ callCount: number;
41
+ manifest: {
42
+ version: number;
43
+ chainId: number;
44
+ calls: Array<{
45
+ to: string;
46
+ data: string;
47
+ value?: string;
48
+ gasLimit?: string | number;
49
+ stepId?: string;
50
+ }>;
51
+ };
52
+ };
53
+ export type ActiveSubmissionContext = {
54
+ workflowId: string;
55
+ batchId: string;
56
+ batchIndex: number;
57
+ batchStatus: string;
58
+ manifestHash: string;
59
+ manifestVersion: number;
60
+ validUntilMs: number;
61
+ callCount: number;
62
+ manifest: {
63
+ version: number;
64
+ chainId: number;
65
+ calls: Array<{
66
+ to: string;
67
+ data: string;
68
+ value?: string;
69
+ gasLimit?: string | number;
70
+ stepId?: string;
71
+ }>;
72
+ };
73
+ };
74
+ export type GatewayWalletType = "porto" | "base" | "eoa";
75
+ export type ExecutionCallInput = {
76
+ executionCallIndex: number;
77
+ type: "manifest" | "wallet-preCall" | "wallet-postCall" | "wallet-internal";
78
+ manifestCallIndex?: number;
79
+ stepId?: string;
80
+ request: {
81
+ to: string;
82
+ data: string;
83
+ value?: string;
84
+ chainId?: number;
85
+ gasLimit?: string | number;
86
+ };
87
+ metadata?: unknown;
88
+ };
89
+ export type ExecutionArtifactInput = {
90
+ manifestVersion: number;
91
+ manifestHash: string;
92
+ manifestSize: number;
93
+ capturedAtIso: string;
94
+ bundle: {
95
+ id: string;
96
+ chainId?: number;
97
+ walletType: GatewayWalletType;
98
+ walletProvider: "porto" | "coinbase";
99
+ };
100
+ calls: ExecutionCallInput[];
101
+ checksum?: {
102
+ manifestCallIndices: number[];
103
+ executionCallIndices: number[];
104
+ };
105
+ notes?: unknown;
106
+ };
107
+ export type SubmittedTransaction = {
108
+ manifestCallIndex: number;
109
+ txHash: string;
110
+ };
111
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAClB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACtC;IACE,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,KAAK,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAA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F,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@intentfi/agent-sdk",
3
+ "version": "0.1.0",
4
+ "description": "TypeScript SDK and CLI for the IntentFi agentic DeFi gateway — create, monitor, and execute intent-based workflows via REST or MCP",
5
+ "type": "module",
6
+ "license": "Apache-2.0",
7
+ "author": "IntentFi",
8
+ "homepage": "https://intentfi.io",
9
+ "bugs": {
10
+ "url": "https://intentfi.io"
11
+ },
12
+ "keywords": [
13
+ "defi",
14
+ "intent",
15
+ "agent",
16
+ "sdk",
17
+ "mcp",
18
+ "ethereum",
19
+ "web3",
20
+ "intentfi"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
+ "files": [
28
+ "dist",
29
+ "LICENSE",
30
+ "README.md"
31
+ ],
32
+ "bin": {
33
+ "intentfi": "./dist/cli.js"
34
+ },
35
+ "scripts": {
36
+ "build": "tsc -p tsconfig.build.json",
37
+ "prepublishOnly": "npm run build",
38
+ "typecheck": "tsc --noEmit"
39
+ },
40
+ "dependencies": {
41
+ "viem": "^2.45.1"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^24.10.10",
45
+ "typescript": "^5.9.3"
46
+ }
47
+ }