agents 0.0.0-ed3f94d → 0.0.0-edd3357
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/ai-chat-agent.d.ts +1 -2
- package/dist/ai-chat-agent.js +57 -350
- package/dist/ai-chat-agent.js.map +1 -1
- package/dist/ai-chat-v5-migration.js +0 -1
- package/dist/ai-react.d.ts +1 -8
- package/dist/ai-react.js +111 -157
- package/dist/ai-react.js.map +1 -1
- package/dist/ai-types.d.ts +0 -1
- package/dist/ai-types.js +1 -2
- package/dist/{chunk-BER7KXUJ.js → chunk-AVYJQSLW.js} +1 -2
- package/dist/chunk-AVYJQSLW.js.map +1 -0
- package/dist/{chunk-Z44WASMA.js → chunk-LL2AFX7V.js} +2 -7
- package/dist/{chunk-Z44WASMA.js.map → chunk-LL2AFX7V.js.map} +1 -1
- package/dist/{chunk-3OT2NNEW.js → chunk-MH46VMM4.js} +67 -396
- package/dist/chunk-MH46VMM4.js.map +1 -0
- package/dist/{chunk-254F4GDT.js → chunk-YDUDMOL6.js} +50 -97
- package/dist/chunk-YDUDMOL6.js.map +1 -0
- package/dist/{client-DVoPb3-C.d.ts → client-CvaJdLQA.d.ts} +26 -131
- package/dist/client.js +1 -2
- package/dist/index.d.ts +32 -25
- package/dist/index.js +4 -5
- package/dist/mcp/client.d.ts +1 -2
- package/dist/mcp/client.js +1 -2
- package/dist/mcp/do-oauth-client-provider.js +1 -2
- package/dist/mcp/index.d.ts +31 -13
- package/dist/mcp/index.js +163 -233
- package/dist/mcp/index.js.map +1 -1
- package/dist/observability/index.d.ts +24 -12
- package/dist/observability/index.js +4 -5
- package/dist/react.d.ts +6 -10
- package/dist/react.js +3 -101
- package/dist/react.js.map +1 -1
- package/dist/schedule.js +0 -2
- package/dist/schedule.js.map +1 -1
- package/package.json +6 -19
- package/src/index.ts +57 -141
- package/dist/_esm-LV5FJ3HK.js +0 -3922
- package/dist/_esm-LV5FJ3HK.js.map +0 -1
- package/dist/ccip-CMBYN64O.js +0 -15
- package/dist/ccip-CMBYN64O.js.map +0 -1
- package/dist/chunk-254F4GDT.js.map +0 -1
- package/dist/chunk-3OT2NNEW.js.map +0 -1
- package/dist/chunk-5Y6BEZDY.js +0 -276
- package/dist/chunk-5Y6BEZDY.js.map +0 -1
- package/dist/chunk-BER7KXUJ.js.map +0 -1
- package/dist/chunk-JJBFIGUC.js +0 -5202
- package/dist/chunk-JJBFIGUC.js.map +0 -1
- package/dist/chunk-PR4QN5HX.js +0 -43
- package/dist/chunk-PR4QN5HX.js.map +0 -1
- package/dist/chunk-TYAY6AU6.js +0 -159
- package/dist/chunk-TYAY6AU6.js.map +0 -1
- package/dist/codemode/ai.d.ts +0 -25
- package/dist/codemode/ai.js +0 -5112
- package/dist/codemode/ai.js.map +0 -1
- package/dist/mcp/x402.d.ts +0 -39
- package/dist/mcp/x402.js +0 -3195
- package/dist/mcp/x402.js.map +0 -1
- package/dist/mcp-BH1fJeiU.d.ts +0 -58
- package/dist/secp256k1-M22GZP2U.js +0 -2193
- package/dist/secp256k1-M22GZP2U.js.map +0 -1
package/dist/mcp/x402.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ToolCallback, RegisteredTool, McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
|
-
import { ToolAnnotations, CallToolRequest, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import { ZodRawShape } from 'zod';
|
|
5
|
-
import { Network, FacilitatorConfig, PaymentRequirements } from 'x402/types';
|
|
6
|
-
import { RequestOptions } from '@modelcontextprotocol/sdk/shared/protocol.js';
|
|
7
|
-
import { Account } from 'viem';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* X402 MCP Integration
|
|
11
|
-
*
|
|
12
|
-
* Based on:
|
|
13
|
-
* - Coinbase's x402 (Apache 2.0): https://github.com/coinbase/x402
|
|
14
|
-
* - @ethanniser and his work at https://github.com/ethanniser/x402-mcp
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
type X402Config = {
|
|
18
|
-
network: Network;
|
|
19
|
-
recipient: `0x${string}`;
|
|
20
|
-
facilitator: FacilitatorConfig;
|
|
21
|
-
version?: number;
|
|
22
|
-
};
|
|
23
|
-
interface X402AugmentedServer {
|
|
24
|
-
paidTool<Args extends ZodRawShape>(name: string, description: string, priceUSD: number, paramsSchema: Args, annotations: ToolAnnotations, cb: ToolCallback<Args>): RegisteredTool;
|
|
25
|
-
}
|
|
26
|
-
declare function withX402<T extends McpServer>(server: McpServer, cfg: X402Config): T & X402AugmentedServer;
|
|
27
|
-
interface X402AugmentedClient {
|
|
28
|
-
callTool(x402ConfirmationCallback: ((payment: PaymentRequirements[]) => Promise<boolean>) | null, params: CallToolRequest["params"], resultSchema?: typeof CallToolResultSchema | typeof CompatibilityCallToolResultSchema, options?: RequestOptions): Promise<CallToolResult>;
|
|
29
|
-
}
|
|
30
|
-
type X402ClientConfig = {
|
|
31
|
-
network: Network;
|
|
32
|
-
account: Account;
|
|
33
|
-
maxPaymentValue?: bigint;
|
|
34
|
-
version?: number;
|
|
35
|
-
confirmationCallback?: (payment: PaymentRequirements[]) => Promise<boolean>;
|
|
36
|
-
};
|
|
37
|
-
declare function withX402Client<T extends Client>(client: T, x402Config: X402ClientConfig): X402AugmentedClient & T;
|
|
38
|
-
|
|
39
|
-
export { type X402AugmentedClient, type X402AugmentedServer, type X402ClientConfig, type X402Config, withX402, withX402Client };
|