@aifinpay/mcp 0.1.0-alpha.6 → 1.0.1
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/README.md +26 -7
- package/bin/aifinpay-mcp.js +1 -1
- package/dist/directory.d.ts +55 -0
- package/dist/directory.d.ts.map +1 -0
- package/dist/directory.js +56 -0
- package/dist/directory.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +12 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/agent-address.d.ts +27 -0
- package/dist/tools/agent-address.d.ts.map +1 -1
- package/dist/tools/agent-address.js +12 -0
- package/dist/tools/agent-address.js.map +1 -1
- package/dist/tools/agent-call.d.ts +8 -0
- package/dist/tools/agent-call.d.ts.map +1 -1
- package/dist/tools/agent-call.js +32 -11
- package/dist/tools/agent-call.js.map +1 -1
- package/dist/tools/agent-claim-self.d.ts +10 -2
- package/dist/tools/agent-claim-self.d.ts.map +1 -1
- package/dist/tools/agent-claim-self.js +49 -12
- package/dist/tools/agent-claim-self.js.map +1 -1
- package/dist/tools/agent-quote.d.ts +8 -0
- package/dist/tools/agent-quote.d.ts.map +1 -1
- package/dist/tools/agent-quote.js +3 -0
- package/dist/tools/agent-quote.js.map +1 -1
- package/dist/tools/directory.d.ts +275 -0
- package/dist/tools/directory.d.ts.map +1 -0
- package/dist/tools/directory.js +254 -0
- package/dist/tools/directory.js.map +1 -0
- package/dist/tools/pay-with-split.d.ts +18 -0
- package/dist/tools/pay-with-split.d.ts.map +1 -1
- package/dist/tools/pay-with-split.js +7 -0
- package/dist/tools/pay-with-split.js.map +1 -1
- package/dist/tools/payable-fetch.d.ts +8 -0
- package/dist/tools/payable-fetch.d.ts.map +1 -1
- package/dist/tools/payable-fetch.js +16 -5
- package/dist/tools/payable-fetch.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-claim-self.js","sourceRoot":"","sources":["../../src/tools/agent-claim-self.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,+DAA+D;YAC/D,6DAA6D;YAC7D,
|
|
1
|
+
{"version":3,"file":"agent-claim-self.js","sourceRoot":"","sources":["../../src/tools/agent-claim-self.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,+DAA+D;YAC/D,6DAA6D;YAC7D,2DAA2D;YAC3D,kEAAkE;YAClE,mEAAmE;YACnE,iEAAiE;YACjE,sDAAsD;QACxD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,6DAA6D;wBAC7D,0DAA0D;wBAC1D,iDAAiD;iBACpD;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6DAA6D;iBAC3E;aACF;YACD,QAAQ,EAAE,CAAC,gBAAgB,CAAC;SAC7B;QACD,4EAA4E;QAC5E,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;QAClF,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KACjC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,GAAgB,EAChB,IAA6B;IAE7B,MAAM,YAAY,GAAG,OAAO,IAAI,CAAC,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EA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AAI,IAAI;wBACpB,GAAG,aAAa;wBAChB,IAAI,EAAE,SAAS,cAAc,WAAW,OAAO,sBAAsB,cAAc,WAAW,OAAO,8BAA8B,OAAO,MAAM;qBACjJ,EAAE,IAAI,EAAE,CAAC,CAAC;iBACZ;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAuB,CAAW,CAAC,OAAO,EAAE,EAAE,CAAC;SAChF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -17,6 +17,14 @@ export declare function agentQuoteTool(): {
|
|
|
17
17
|
};
|
|
18
18
|
required: string[];
|
|
19
19
|
};
|
|
20
|
+
annotations: {
|
|
21
|
+
readOnlyHint: boolean;
|
|
22
|
+
openWorldHint: boolean;
|
|
23
|
+
destructiveHint: boolean;
|
|
24
|
+
};
|
|
25
|
+
outputSchema: {
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
20
28
|
};
|
|
21
29
|
export declare function runAgentQuote(ctx: ToolContext, args: Record<string, unknown>): Promise<{
|
|
22
30
|
isError: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-quote.d.ts","sourceRoot":"","sources":["../../src/tools/agent-quote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,cAAc
|
|
1
|
+
{"version":3,"file":"agent-quote.d.ts","sourceRoot":"","sources":["../../src/tools/agent-quote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;EAuB7B;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;GA2D9B"}
|
|
@@ -17,6 +17,9 @@ export function agentQuoteTool() {
|
|
|
17
17
|
},
|
|
18
18
|
required: ["url"],
|
|
19
19
|
},
|
|
20
|
+
// Read-only probe, but reaches arbitrary external URLs → openWorldHint true.
|
|
21
|
+
annotations: { readOnlyHint: true, openWorldHint: true, destructiveHint: false },
|
|
22
|
+
outputSchema: { type: "object" },
|
|
20
23
|
};
|
|
21
24
|
}
|
|
22
25
|
export async function runAgentQuote(ctx, args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-quote.js","sourceRoot":"","sources":["../../src/tools/agent-quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,UAAU,cAAc;IAC5B,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,yEAAyE;YACzE,qEAAqE;YACrE,oEAAoE;QACtE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE;gBAC3D,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;oBACrB,OAAO,EAAE,KAAK;iBACf;aACF;YACD,QAAQ,EAAE,CAAC,KAAK,CAAC;SAClB;
|
|
1
|
+
{"version":3,"file":"agent-quote.js","sourceRoot":"","sources":["../../src/tools/agent-quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,UAAU,cAAc;IAC5B,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,yEAAyE;YACzE,qEAAqE;YACrE,oEAAoE;QACtE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,EAAE,E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C;IAED,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,WAAW,GAAY,IAAI,CAAC;QAChC,IAAI,CAAC;YACH,WAAW,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;QAC1C,CAAC;QAAC,MAAM,CAAC;YACP,WAAW,GAAG,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,WAAW,EAAE,WAAW,CAAC,IAAI;wBAC7B,MAAM,EAAE,GAAG;wBACX,IAAI,EACF,qEAAqE;4BACrE,oDAAoD;wBACtD,cAAc,EAAE,WAAW;qBAC5B,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,GAAG,GAAG,CAAU,CAAC;QACvB,OAAO,WAAW,CAAC,iCAAiC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,GAAG,KAAe;IACrC,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;KAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Directory tools — the READ-ONLY surface submitted to the OpenAI ChatGPT App
|
|
3
|
+
* Directory. Every tool here is a thin wrapper over a public `api.aifinpay.io`
|
|
4
|
+
* GET endpoint: no agent identity, no keys, no money movement, no auth. This is
|
|
5
|
+
* what makes the directory app reviewable (OpenAI prohibits payment/crypto
|
|
6
|
+
* EXECUTION in directory apps — see Obsidian/32). Execution tools live only on
|
|
7
|
+
* the full BYO-MCP connector (`server.ts`), never here.
|
|
8
|
+
*
|
|
9
|
+
* Each tool declares `readOnlyHint: true`, an `outputSchema`, and ALWAYS returns
|
|
10
|
+
* `structuredContent` matching it (the audit found 4 connector tools that declare
|
|
11
|
+
* outputSchema but return only text — Apps SDK validation may reject that; we
|
|
12
|
+
* don't repeat it).
|
|
13
|
+
*/
|
|
14
|
+
/** Public API base. Defaults to production; override with AIFINPAY_API_BASE. */
|
|
15
|
+
export declare const DIRECTORY_API_BASE: string;
|
|
16
|
+
export interface DirectoryContext {
|
|
17
|
+
apiBase: string;
|
|
18
|
+
timeoutMs: number;
|
|
19
|
+
log: (level: "info" | "warn" | "error", msg: string) => void;
|
|
20
|
+
}
|
|
21
|
+
type ToolResult = {
|
|
22
|
+
content: {
|
|
23
|
+
type: "text";
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
26
|
+
structuredContent?: Record<string, unknown>;
|
|
27
|
+
isError?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare function directoryTools(): ({
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: string;
|
|
34
|
+
properties: {
|
|
35
|
+
name?: undefined;
|
|
36
|
+
chain?: undefined;
|
|
37
|
+
amount?: undefined;
|
|
38
|
+
asset?: undefined;
|
|
39
|
+
pubkey?: undefined;
|
|
40
|
+
address?: undefined;
|
|
41
|
+
};
|
|
42
|
+
required?: undefined;
|
|
43
|
+
};
|
|
44
|
+
annotations: {
|
|
45
|
+
readOnlyHint: boolean;
|
|
46
|
+
openWorldHint: boolean;
|
|
47
|
+
destructiveHint: boolean;
|
|
48
|
+
};
|
|
49
|
+
outputSchema: {
|
|
50
|
+
type: string;
|
|
51
|
+
properties: {
|
|
52
|
+
providers: {
|
|
53
|
+
type: string;
|
|
54
|
+
items: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
covered?: undefined;
|
|
59
|
+
total_seats?: undefined;
|
|
60
|
+
leaderboard?: undefined;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
} | {
|
|
64
|
+
name: string;
|
|
65
|
+
description: string;
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: string;
|
|
68
|
+
properties: {
|
|
69
|
+
name: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
chain?: undefined;
|
|
74
|
+
amount?: undefined;
|
|
75
|
+
asset?: undefined;
|
|
76
|
+
pubkey?: undefined;
|
|
77
|
+
address?: undefined;
|
|
78
|
+
};
|
|
79
|
+
required: string[];
|
|
80
|
+
};
|
|
81
|
+
annotations: {
|
|
82
|
+
readOnlyHint: boolean;
|
|
83
|
+
openWorldHint: boolean;
|
|
84
|
+
destructiveHint: boolean;
|
|
85
|
+
};
|
|
86
|
+
outputSchema: {
|
|
87
|
+
type: string;
|
|
88
|
+
properties?: undefined;
|
|
89
|
+
};
|
|
90
|
+
} | {
|
|
91
|
+
name: string;
|
|
92
|
+
description: string;
|
|
93
|
+
inputSchema: {
|
|
94
|
+
type: string;
|
|
95
|
+
properties: {
|
|
96
|
+
name?: undefined;
|
|
97
|
+
chain?: undefined;
|
|
98
|
+
amount?: undefined;
|
|
99
|
+
asset?: undefined;
|
|
100
|
+
pubkey?: undefined;
|
|
101
|
+
address?: undefined;
|
|
102
|
+
};
|
|
103
|
+
required?: undefined;
|
|
104
|
+
};
|
|
105
|
+
annotations: {
|
|
106
|
+
readOnlyHint: boolean;
|
|
107
|
+
openWorldHint: boolean;
|
|
108
|
+
destructiveHint: boolean;
|
|
109
|
+
};
|
|
110
|
+
outputSchema: {
|
|
111
|
+
type: string;
|
|
112
|
+
properties?: undefined;
|
|
113
|
+
};
|
|
114
|
+
} | {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
inputSchema: {
|
|
118
|
+
type: string;
|
|
119
|
+
properties: {
|
|
120
|
+
name?: undefined;
|
|
121
|
+
chain?: undefined;
|
|
122
|
+
amount?: undefined;
|
|
123
|
+
asset?: undefined;
|
|
124
|
+
pubkey?: undefined;
|
|
125
|
+
address?: undefined;
|
|
126
|
+
};
|
|
127
|
+
required?: undefined;
|
|
128
|
+
};
|
|
129
|
+
annotations: {
|
|
130
|
+
readOnlyHint: boolean;
|
|
131
|
+
openWorldHint: boolean;
|
|
132
|
+
destructiveHint: boolean;
|
|
133
|
+
};
|
|
134
|
+
outputSchema: {
|
|
135
|
+
type: string;
|
|
136
|
+
properties: {
|
|
137
|
+
covered: {
|
|
138
|
+
type: string;
|
|
139
|
+
items: {
|
|
140
|
+
type: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
providers?: undefined;
|
|
144
|
+
total_seats?: undefined;
|
|
145
|
+
leaderboard?: undefined;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
} | {
|
|
149
|
+
name: string;
|
|
150
|
+
description: string;
|
|
151
|
+
inputSchema: {
|
|
152
|
+
type: string;
|
|
153
|
+
properties: {
|
|
154
|
+
name?: undefined;
|
|
155
|
+
chain?: undefined;
|
|
156
|
+
amount?: undefined;
|
|
157
|
+
asset?: undefined;
|
|
158
|
+
pubkey?: undefined;
|
|
159
|
+
address?: undefined;
|
|
160
|
+
};
|
|
161
|
+
required?: undefined;
|
|
162
|
+
};
|
|
163
|
+
annotations: {
|
|
164
|
+
readOnlyHint: boolean;
|
|
165
|
+
openWorldHint: boolean;
|
|
166
|
+
destructiveHint: boolean;
|
|
167
|
+
};
|
|
168
|
+
outputSchema: {
|
|
169
|
+
type: string;
|
|
170
|
+
properties: {
|
|
171
|
+
total_seats: {
|
|
172
|
+
type: string;
|
|
173
|
+
};
|
|
174
|
+
leaderboard: {
|
|
175
|
+
type: string;
|
|
176
|
+
items: {
|
|
177
|
+
type: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
providers?: undefined;
|
|
181
|
+
covered?: undefined;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
} | {
|
|
185
|
+
name: string;
|
|
186
|
+
description: string;
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: string;
|
|
189
|
+
properties: {
|
|
190
|
+
chain: {
|
|
191
|
+
type: string;
|
|
192
|
+
enum: string[];
|
|
193
|
+
};
|
|
194
|
+
amount: {
|
|
195
|
+
type: string;
|
|
196
|
+
description: string;
|
|
197
|
+
};
|
|
198
|
+
asset: {
|
|
199
|
+
type: string;
|
|
200
|
+
enum: string[];
|
|
201
|
+
description: string;
|
|
202
|
+
};
|
|
203
|
+
name?: undefined;
|
|
204
|
+
pubkey?: undefined;
|
|
205
|
+
address?: undefined;
|
|
206
|
+
};
|
|
207
|
+
required: string[];
|
|
208
|
+
};
|
|
209
|
+
annotations: {
|
|
210
|
+
readOnlyHint: boolean;
|
|
211
|
+
openWorldHint: boolean;
|
|
212
|
+
destructiveHint: boolean;
|
|
213
|
+
};
|
|
214
|
+
outputSchema: {
|
|
215
|
+
type: string;
|
|
216
|
+
properties?: undefined;
|
|
217
|
+
};
|
|
218
|
+
} | {
|
|
219
|
+
name: string;
|
|
220
|
+
description: string;
|
|
221
|
+
inputSchema: {
|
|
222
|
+
type: string;
|
|
223
|
+
properties: {
|
|
224
|
+
pubkey: {
|
|
225
|
+
type: string;
|
|
226
|
+
description: string;
|
|
227
|
+
};
|
|
228
|
+
name?: undefined;
|
|
229
|
+
chain?: undefined;
|
|
230
|
+
amount?: undefined;
|
|
231
|
+
asset?: undefined;
|
|
232
|
+
address?: undefined;
|
|
233
|
+
};
|
|
234
|
+
required: string[];
|
|
235
|
+
};
|
|
236
|
+
annotations: {
|
|
237
|
+
readOnlyHint: boolean;
|
|
238
|
+
openWorldHint: boolean;
|
|
239
|
+
destructiveHint: boolean;
|
|
240
|
+
};
|
|
241
|
+
outputSchema: {
|
|
242
|
+
type: string;
|
|
243
|
+
properties?: undefined;
|
|
244
|
+
};
|
|
245
|
+
} | {
|
|
246
|
+
name: string;
|
|
247
|
+
description: string;
|
|
248
|
+
inputSchema: {
|
|
249
|
+
type: string;
|
|
250
|
+
properties: {
|
|
251
|
+
address: {
|
|
252
|
+
type: string;
|
|
253
|
+
description: string;
|
|
254
|
+
};
|
|
255
|
+
name?: undefined;
|
|
256
|
+
chain?: undefined;
|
|
257
|
+
amount?: undefined;
|
|
258
|
+
asset?: undefined;
|
|
259
|
+
pubkey?: undefined;
|
|
260
|
+
};
|
|
261
|
+
required: string[];
|
|
262
|
+
};
|
|
263
|
+
annotations: {
|
|
264
|
+
readOnlyHint: boolean;
|
|
265
|
+
openWorldHint: boolean;
|
|
266
|
+
destructiveHint: boolean;
|
|
267
|
+
};
|
|
268
|
+
outputSchema: {
|
|
269
|
+
type: string;
|
|
270
|
+
properties?: undefined;
|
|
271
|
+
};
|
|
272
|
+
})[];
|
|
273
|
+
export declare function runDirectoryTool(ctx: DirectoryContext, name: string, args: Record<string, unknown>): Promise<ToolResult>;
|
|
274
|
+
export {};
|
|
275
|
+
//# sourceMappingURL=directory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../../src/tools/directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,QAEX,CAAC;AAErB,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9D;AAED,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA2CF,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwJ7B;AAID,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,UAAU,CAAC,CAmDrB"}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Directory tools — the READ-ONLY surface submitted to the OpenAI ChatGPT App
|
|
3
|
+
* Directory. Every tool here is a thin wrapper over a public `api.aifinpay.io`
|
|
4
|
+
* GET endpoint: no agent identity, no keys, no money movement, no auth. This is
|
|
5
|
+
* what makes the directory app reviewable (OpenAI prohibits payment/crypto
|
|
6
|
+
* EXECUTION in directory apps — see Obsidian/32). Execution tools live only on
|
|
7
|
+
* the full BYO-MCP connector (`server.ts`), never here.
|
|
8
|
+
*
|
|
9
|
+
* Each tool declares `readOnlyHint: true`, an `outputSchema`, and ALWAYS returns
|
|
10
|
+
* `structuredContent` matching it (the audit found 4 connector tools that declare
|
|
11
|
+
* outputSchema but return only text — Apps SDK validation may reject that; we
|
|
12
|
+
* don't repeat it).
|
|
13
|
+
*/
|
|
14
|
+
/** Public API base. Defaults to production; override with AIFINPAY_API_BASE. */
|
|
15
|
+
export const DIRECTORY_API_BASE = (process.env.AIFINPAY_API_BASE || "https://api.aifinpay.io").replace(/\/$/, "");
|
|
16
|
+
function ok(data) {
|
|
17
|
+
// structuredContent must be an object; wrap bare arrays/primitives.
|
|
18
|
+
const structured = data && typeof data === "object" && !Array.isArray(data)
|
|
19
|
+
? data
|
|
20
|
+
: { result: data };
|
|
21
|
+
return {
|
|
22
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
23
|
+
structuredContent: structured,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function fail(msg) {
|
|
27
|
+
return { isError: true, content: [{ type: "text", text: msg }] };
|
|
28
|
+
}
|
|
29
|
+
async function apiGet(ctx, path) {
|
|
30
|
+
const url = `${ctx.apiBase}${path}`;
|
|
31
|
+
const ctrl = new AbortController();
|
|
32
|
+
const t = setTimeout(() => ctrl.abort(), ctx.timeoutMs);
|
|
33
|
+
try {
|
|
34
|
+
const resp = await fetch(url, {
|
|
35
|
+
headers: { accept: "application/json" },
|
|
36
|
+
signal: ctrl.signal,
|
|
37
|
+
});
|
|
38
|
+
if (!resp.ok) {
|
|
39
|
+
return fail(`upstream ${resp.status} for ${path}`);
|
|
40
|
+
}
|
|
41
|
+
const data = await resp.json();
|
|
42
|
+
return ok(data);
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
return fail(`request failed for ${path}: ${e.message}`);
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
clearTimeout(t);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const RO = { readOnlyHint: true, openWorldHint: false, destructiveHint: false };
|
|
52
|
+
// ── Tool definitions ───────────────────────────────────────────────────────
|
|
53
|
+
export function directoryTools() {
|
|
54
|
+
return [
|
|
55
|
+
{
|
|
56
|
+
name: "list_providers",
|
|
57
|
+
description: "List the AI services available through AiFinPay (e.g. web search, " +
|
|
58
|
+
"image generation, LLM inference) with their per-call price and " +
|
|
59
|
+
"supported networks. Read-only; returns the public provider catalog.",
|
|
60
|
+
inputSchema: { type: "object", properties: {} },
|
|
61
|
+
annotations: RO,
|
|
62
|
+
// Permissive: the upstream provider catalog is the source of truth and its
|
|
63
|
+
// leaf field types vary (e.g. price_usd may be a number or a string for
|
|
64
|
+
// range/tier pricing). The MCP client validates structuredContent against
|
|
65
|
+
// this schema strictly, so we only assert the top-level shape.
|
|
66
|
+
outputSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
providers: { type: "array", items: { type: "object" } },
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "provider_info",
|
|
75
|
+
description: "Get the details of one AiFinPay provider by name (price, supported " +
|
|
76
|
+
"networks, service type, homepage). Read-only.",
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
name: {
|
|
81
|
+
type: "string",
|
|
82
|
+
description: "Provider name, e.g. 'exa', 'venice', 'io-net'.",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
required: ["name"],
|
|
86
|
+
},
|
|
87
|
+
annotations: RO,
|
|
88
|
+
outputSchema: { type: "object" },
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "provider_status",
|
|
92
|
+
description: "Report which AiFinPay provider bridges are currently reachable " +
|
|
93
|
+
"(up/down). Read-only health view.",
|
|
94
|
+
inputSchema: { type: "object", properties: {} },
|
|
95
|
+
annotations: RO,
|
|
96
|
+
outputSchema: { type: "object" },
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "service_coverage",
|
|
100
|
+
description: "Show which categories of AI service (search, compute, …) AiFinPay " +
|
|
101
|
+
"currently covers and the providers in each. Read-only.",
|
|
102
|
+
inputSchema: { type: "object", properties: {} },
|
|
103
|
+
annotations: RO,
|
|
104
|
+
outputSchema: {
|
|
105
|
+
type: "object",
|
|
106
|
+
properties: {
|
|
107
|
+
covered: { type: "array", items: { type: "object" } },
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "network_stats",
|
|
113
|
+
description: "Return public protocol statistics: supported networks, number of " +
|
|
114
|
+
"active agents, total settled volume, and active providers. Read-only.",
|
|
115
|
+
inputSchema: { type: "object", properties: {} },
|
|
116
|
+
annotations: RO,
|
|
117
|
+
outputSchema: { type: "object" },
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "leaderboard",
|
|
121
|
+
description: "Return the public on-chain leaderboard of AiFinPay agents ranked by " +
|
|
122
|
+
"settled volume. Read-only.",
|
|
123
|
+
inputSchema: { type: "object", properties: {} },
|
|
124
|
+
annotations: RO,
|
|
125
|
+
outputSchema: {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: {
|
|
128
|
+
total_seats: { type: "number" },
|
|
129
|
+
leaderboard: { type: "array", items: { type: "object" } },
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "quote_cost",
|
|
135
|
+
description: "Preview the fee-on-top breakdown (merchant amount + protocol fee + " +
|
|
136
|
+
"creator fee + total) for a given price, WITHOUT making any payment. " +
|
|
137
|
+
"Read-only price calculator.",
|
|
138
|
+
inputSchema: {
|
|
139
|
+
type: "object",
|
|
140
|
+
properties: {
|
|
141
|
+
chain: { type: "string", enum: ["solana", "polygon"] },
|
|
142
|
+
amount: {
|
|
143
|
+
type: "string",
|
|
144
|
+
description: "Merchant's quoted price in base units: lamports (Solana SOL), " +
|
|
145
|
+
"wei (Polygon POL), or 6-decimal units (Polygon USDC/USDT).",
|
|
146
|
+
},
|
|
147
|
+
asset: {
|
|
148
|
+
type: "string",
|
|
149
|
+
enum: ["SOL", "POL", "USDC", "USDT"],
|
|
150
|
+
description: "Settlement asset. Defaults to SOL on Solana, POL on Polygon. " +
|
|
151
|
+
"Use USDC/USDT for Polygon stablecoin quotes.",
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
required: ["chain", "amount"],
|
|
155
|
+
},
|
|
156
|
+
annotations: RO,
|
|
157
|
+
outputSchema: { type: "object" },
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "verify_passport",
|
|
161
|
+
description: "Check whether an agent public key holds an AiFinPay AgentPassport and " +
|
|
162
|
+
"return its on-chain status. Read-only.",
|
|
163
|
+
inputSchema: {
|
|
164
|
+
type: "object",
|
|
165
|
+
properties: {
|
|
166
|
+
pubkey: {
|
|
167
|
+
type: "string",
|
|
168
|
+
description: "Agent public key (Solana base58 or EVM address).",
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
required: ["pubkey"],
|
|
172
|
+
},
|
|
173
|
+
annotations: RO,
|
|
174
|
+
outputSchema: { type: "object" },
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: "agent_profile",
|
|
178
|
+
description: "Return the public profile and activity summary for an AiFinPay agent " +
|
|
179
|
+
"by its address. Read-only.",
|
|
180
|
+
inputSchema: {
|
|
181
|
+
type: "object",
|
|
182
|
+
properties: {
|
|
183
|
+
address: {
|
|
184
|
+
type: "string",
|
|
185
|
+
description: "Agent address (EVM 0x… or Solana base58).",
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
required: ["address"],
|
|
189
|
+
},
|
|
190
|
+
annotations: RO,
|
|
191
|
+
outputSchema: { type: "object" },
|
|
192
|
+
},
|
|
193
|
+
];
|
|
194
|
+
}
|
|
195
|
+
// ── Dispatch ────────────────────────────────────────────────────────────────
|
|
196
|
+
export async function runDirectoryTool(ctx, name, args) {
|
|
197
|
+
switch (name) {
|
|
198
|
+
case "list_providers":
|
|
199
|
+
return apiGet(ctx, "/providers");
|
|
200
|
+
case "provider_info": {
|
|
201
|
+
const n = String(args.name ?? "").trim();
|
|
202
|
+
if (!n)
|
|
203
|
+
return fail("missing required arg: name");
|
|
204
|
+
return apiGet(ctx, `/providers/${encodeURIComponent(n)}`);
|
|
205
|
+
}
|
|
206
|
+
case "provider_status":
|
|
207
|
+
return apiGet(ctx, "/providers/status");
|
|
208
|
+
case "service_coverage":
|
|
209
|
+
return apiGet(ctx, "/registry/coverage");
|
|
210
|
+
case "network_stats":
|
|
211
|
+
return apiGet(ctx, "/network-stats");
|
|
212
|
+
case "leaderboard":
|
|
213
|
+
return apiGet(ctx, "/leaderboard");
|
|
214
|
+
case "quote_cost": {
|
|
215
|
+
const chain = String(args.chain ?? "").trim().toLowerCase();
|
|
216
|
+
const amount = String(args.amount ?? "").trim();
|
|
217
|
+
const asset = String(args.asset ?? "").trim().toUpperCase();
|
|
218
|
+
if (!chain || !amount)
|
|
219
|
+
return fail("missing required args: chain, amount");
|
|
220
|
+
const qs = new URLSearchParams();
|
|
221
|
+
if (chain === "solana") {
|
|
222
|
+
qs.set("merchant_amount_lamports", amount);
|
|
223
|
+
}
|
|
224
|
+
else if (chain === "polygon") {
|
|
225
|
+
if (asset === "USDC" || asset === "USDT") {
|
|
226
|
+
qs.set("merchant_amount_units", amount);
|
|
227
|
+
qs.set("asset", asset);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
qs.set("merchant_amount_wei", amount);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
return fail("chain must be 'solana' or 'polygon'");
|
|
235
|
+
}
|
|
236
|
+
return apiGet(ctx, `/b2b/quote-split?${qs.toString()}`);
|
|
237
|
+
}
|
|
238
|
+
case "verify_passport": {
|
|
239
|
+
const pk = String(args.pubkey ?? "").trim();
|
|
240
|
+
if (!pk)
|
|
241
|
+
return fail("missing required arg: pubkey");
|
|
242
|
+
return apiGet(ctx, `/passport/${encodeURIComponent(pk)}`);
|
|
243
|
+
}
|
|
244
|
+
case "agent_profile": {
|
|
245
|
+
const addr = String(args.address ?? "").trim();
|
|
246
|
+
if (!addr)
|
|
247
|
+
return fail("missing required arg: address");
|
|
248
|
+
return apiGet(ctx, `/network/agents/${encodeURIComponent(addr)}`);
|
|
249
|
+
}
|
|
250
|
+
default:
|
|
251
|
+
return fail(`unknown directory tool: ${name}`);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
//# sourceMappingURL=directory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory.js","sourceRoot":"","sources":["../../src/tools/directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,yBAAyB,CAC3D,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAcrB,SAAS,EAAE,CAAC,IAAa;IACvB,oEAAoE;IACpE,MAAM,UAAU,GACd,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QACtD,CAAC,CAAE,IAAgC;QACnC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QAChE,iBAAiB,EAAE,UAAU;KAC9B,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,GAAW;IACvB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AACnE,CAAC;AAED,KAAK,UAAU,MAAM,CAAC,GAAqB,EAAE,IAAY;IACvD,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;IACpC,MAAM,IAAI,GAAG,IAAI,eAAe,EAAE,CAAC;IACnC,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,E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CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAC5C,IAAI,CAAC,EAAE;gBAAE,OAAO,IAAI,CAAC,8BAA8B,CAAC,CAAC;YACrD,OAAO,MAAM,CAAC,GAAG,EAAE,aAAa,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC5D,CAAC;QACD,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAC/C,IAAI,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC,+BAA+B,CAAC,CAAC;YACxD,OAAO,MAAM,CAAC,GAAG,EAAE,mBAAmB,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpE,CAAC;QACD;YACE,OAAO,IAAI,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC"}
|
|
@@ -29,6 +29,14 @@ export declare function payWithSplitTool(): {
|
|
|
29
29
|
};
|
|
30
30
|
required: string[];
|
|
31
31
|
};
|
|
32
|
+
annotations: {
|
|
33
|
+
readOnlyHint: boolean;
|
|
34
|
+
openWorldHint: boolean;
|
|
35
|
+
destructiveHint: boolean;
|
|
36
|
+
};
|
|
37
|
+
outputSchema: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
32
40
|
};
|
|
33
41
|
export declare function runPayWithSplit(ctx: ToolContext, args: Record<string, unknown>): Promise<{
|
|
34
42
|
isError: boolean;
|
|
@@ -41,6 +49,7 @@ export declare function runPayWithSplit(ctx: ToolContext, args: Record<string, u
|
|
|
41
49
|
type: string;
|
|
42
50
|
text: string;
|
|
43
51
|
}[];
|
|
52
|
+
structuredContent: Record<string, unknown>;
|
|
44
53
|
}>;
|
|
45
54
|
export declare function quoteSplitTool(): {
|
|
46
55
|
name: string;
|
|
@@ -59,6 +68,14 @@ export declare function quoteSplitTool(): {
|
|
|
59
68
|
};
|
|
60
69
|
required: string[];
|
|
61
70
|
};
|
|
71
|
+
annotations: {
|
|
72
|
+
readOnlyHint: boolean;
|
|
73
|
+
openWorldHint: boolean;
|
|
74
|
+
destructiveHint: boolean;
|
|
75
|
+
};
|
|
76
|
+
outputSchema: {
|
|
77
|
+
type: string;
|
|
78
|
+
};
|
|
62
79
|
};
|
|
63
80
|
export declare function runQuoteSplit(ctx: ToolContext, args: Record<string, unknown>): Promise<{
|
|
64
81
|
isError: boolean;
|
|
@@ -71,5 +88,6 @@ export declare function runQuoteSplit(ctx: ToolContext, args: Record<string, unk
|
|
|
71
88
|
type: string;
|
|
72
89
|
text: string;
|
|
73
90
|
}[];
|
|
91
|
+
structuredContent: Record<string, unknown>;
|
|
74
92
|
}>;
|
|
75
93
|
//# sourceMappingURL=pay-with-split.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay-with-split.d.ts","sourceRoot":"","sources":["../../src/tools/pay-with-split.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,gBAAgB
|
|
1
|
+
{"version":3,"file":"pay-with-split.d.ts","sourceRoot":"","sources":["../../src/tools/pay-with-split.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C/B;AAED,wBAAsB,eAAe,CACnC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;GAmC9B;AAED,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;EAuB7B;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;GAmB9B"}
|