agents 0.2.10 → 0.2.11
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 +15 -18
- package/dist/ai-chat-agent.js +542 -673
- package/dist/ai-chat-agent.js.map +1 -1
- package/dist/ai-chat-v5-migration-gdyLiTd8.js +155 -0
- package/dist/ai-chat-v5-migration-gdyLiTd8.js.map +1 -0
- package/dist/ai-chat-v5-migration.d.ts +7 -4
- package/dist/ai-chat-v5-migration.js +3 -20
- package/dist/ai-react.d.ts +14 -24
- package/dist/ai-react.js +257 -343
- package/dist/ai-react.js.map +1 -1
- package/dist/ai-types-B0GBFDwi.js +20 -0
- package/dist/ai-types-B0GBFDwi.js.map +1 -0
- package/dist/ai-types-BWW4umHY.d.ts +95 -0
- package/dist/ai-types.d.ts +6 -92
- package/dist/ai-types.js +3 -8
- package/dist/client-C-u-lCFT.d.ts +5311 -0
- package/dist/client-CmMi85Sj.d.ts +104 -0
- package/dist/client-WbaRgKYN.js +788 -0
- package/dist/client-WbaRgKYN.js.map +1 -0
- package/dist/client-zS-OCVJA.js +117 -0
- package/dist/client-zS-OCVJA.js.map +1 -0
- package/dist/client.d.ts +11 -92
- package/dist/client.js +4 -13
- package/dist/codemode/ai.d.ts +19 -17
- package/dist/codemode/ai.js +90 -5139
- package/dist/codemode/ai.js.map +1 -1
- package/dist/do-oauth-client-provider-B2jr6UNq.js +93 -0
- package/dist/do-oauth-client-provider-B2jr6UNq.js.map +1 -0
- package/dist/do-oauth-client-provider-CCwGwnrA.d.ts +55 -0
- package/dist/index-DWcUTPtX.d.ts +558 -0
- package/dist/index-W4JUkafc.d.ts +54 -0
- package/dist/index.d.ts +55 -542
- package/dist/index.js +7 -32
- package/dist/mcp/client.d.ts +4 -12
- package/dist/mcp/client.js +3 -10
- package/dist/mcp/do-oauth-client-provider.d.ts +2 -42
- package/dist/mcp/do-oauth-client-provider.js +3 -8
- package/dist/mcp/index.d.ts +72 -76
- package/dist/mcp/index.js +830 -1098
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/x402.d.ts +22 -27
- package/dist/mcp/x402.js +186 -3187
- package/dist/mcp/x402.js.map +1 -1
- package/dist/{mcp-BH1fJeiU.d.ts → mcp-BEwaCsxO.d.ts} +6 -3
- package/dist/observability/index.d.ts +3 -34
- package/dist/observability/index.js +7 -12
- package/dist/react-B8BT6PYZ.d.ts +113 -0
- package/dist/react.d.ts +10 -127
- package/dist/react.js +173 -200
- package/dist/react.js.map +1 -1
- package/dist/schedule.d.ts +13 -10
- package/dist/schedule.js +43 -33
- package/dist/schedule.js.map +1 -1
- package/dist/serializable-gtr9YMhp.d.ts +34 -0
- package/dist/serializable.d.ts +7 -32
- package/dist/serializable.js +1 -1
- package/dist/src-C9xZ0CrH.js +1179 -0
- package/dist/src-C9xZ0CrH.js.map +1 -0
- package/package.json +9 -3
- package/dist/_esm-LV5FJ3HK.js +0 -3922
- package/dist/_esm-LV5FJ3HK.js.map +0 -1
- package/dist/ai-chat-v5-migration.js.map +0 -1
- package/dist/ai-types.js.map +0 -1
- package/dist/ccip-CMBYN64O.js +0 -15
- package/dist/ccip-CMBYN64O.js.map +0 -1
- package/dist/chunk-2Y6KNRNP.js +0 -1343
- package/dist/chunk-2Y6KNRNP.js.map +0 -1
- package/dist/chunk-5Y6BEZDY.js +0 -276
- package/dist/chunk-5Y6BEZDY.js.map +0 -1
- package/dist/chunk-BER7KXUJ.js +0 -18
- package/dist/chunk-BER7KXUJ.js.map +0 -1
- package/dist/chunk-C2OEBJZ2.js +0 -113
- package/dist/chunk-C2OEBJZ2.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-QEVM4BVL.js +0 -116
- package/dist/chunk-QEVM4BVL.js.map +0 -1
- package/dist/chunk-QUOGV3WN.js +0 -949
- package/dist/chunk-QUOGV3WN.js.map +0 -1
- package/dist/chunk-TYAY6AU6.js +0 -159
- package/dist/chunk-TYAY6AU6.js.map +0 -1
- package/dist/chunk-UJVEAURM.js +0 -150
- package/dist/chunk-UJVEAURM.js.map +0 -1
- package/dist/client-C8tswVoM.d.ts +0 -5248
- package/dist/client.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mcp/client.js.map +0 -1
- package/dist/mcp/do-oauth-client-provider.js.map +0 -1
- package/dist/observability/index.js.map +0 -1
- package/dist/secp256k1-M22GZP2U.js +0 -2193
- package/dist/secp256k1-M22GZP2U.js.map +0 -1
- package/dist/serializable.js.map +0 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SerializableReturnValue,
|
|
3
|
+
SerializableValue
|
|
4
|
+
} from "./serializable-gtr9YMhp.js";
|
|
5
|
+
import {
|
|
6
|
+
PartyFetchOptions,
|
|
7
|
+
PartySocket,
|
|
8
|
+
PartySocketOptions
|
|
9
|
+
} from "partysocket";
|
|
10
|
+
|
|
11
|
+
//#region src/client.d.ts
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Options for creating an AgentClient
|
|
15
|
+
*/
|
|
16
|
+
type AgentClientOptions<State = unknown> = Omit<
|
|
17
|
+
PartySocketOptions,
|
|
18
|
+
"party" | "room"
|
|
19
|
+
> & {
|
|
20
|
+
/** Name of the agent to connect to */
|
|
21
|
+
agent: string;
|
|
22
|
+
/** Name of the specific Agent instance */
|
|
23
|
+
name?: string;
|
|
24
|
+
/** Called when the Agent's state is updated */
|
|
25
|
+
onStateUpdate?: (state: State, source: "server" | "client") => void;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Options for streaming RPC calls
|
|
29
|
+
*/
|
|
30
|
+
type StreamOptions = {
|
|
31
|
+
/** Called when a chunk of data is received */
|
|
32
|
+
onChunk?: (chunk: unknown) => void;
|
|
33
|
+
/** Called when the stream ends */
|
|
34
|
+
onDone?: (finalChunk: unknown) => void;
|
|
35
|
+
/** Called when an error occurs */
|
|
36
|
+
onError?: (error: string) => void;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Options for the agentFetch function
|
|
40
|
+
*/
|
|
41
|
+
type AgentClientFetchOptions = Omit<PartyFetchOptions, "party" | "room"> & {
|
|
42
|
+
/** Name of the agent to connect to */
|
|
43
|
+
agent: string;
|
|
44
|
+
/** Name of the specific Agent instance */
|
|
45
|
+
name?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Convert a camelCase string to a kebab-case string
|
|
49
|
+
* @param str The string to convert
|
|
50
|
+
* @returns The kebab-case string
|
|
51
|
+
*/
|
|
52
|
+
declare function camelCaseToKebabCase(str: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* WebSocket client for connecting to an Agent
|
|
55
|
+
*/
|
|
56
|
+
declare class AgentClient<State = unknown> extends PartySocket {
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated Use agentFetch instead
|
|
59
|
+
*/
|
|
60
|
+
static fetch(_opts: PartyFetchOptions): Promise<Response>;
|
|
61
|
+
agent: string;
|
|
62
|
+
name: string;
|
|
63
|
+
private options;
|
|
64
|
+
private _pendingCalls;
|
|
65
|
+
constructor(options: AgentClientOptions<State>);
|
|
66
|
+
setState(state: State): void;
|
|
67
|
+
/**
|
|
68
|
+
* Call a method on the Agent
|
|
69
|
+
* @param method Name of the method to call
|
|
70
|
+
* @param args Arguments to pass to the method
|
|
71
|
+
* @param streamOptions Options for handling streaming responses
|
|
72
|
+
* @returns Promise that resolves with the method's return value
|
|
73
|
+
*/
|
|
74
|
+
call<T extends SerializableReturnValue>(
|
|
75
|
+
method: string,
|
|
76
|
+
args?: SerializableValue[],
|
|
77
|
+
streamOptions?: StreamOptions
|
|
78
|
+
): Promise<T>;
|
|
79
|
+
call<T = unknown>(
|
|
80
|
+
method: string,
|
|
81
|
+
args?: unknown[],
|
|
82
|
+
streamOptions?: StreamOptions
|
|
83
|
+
): Promise<T>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Make an HTTP request to an Agent
|
|
87
|
+
* @param opts Connection options
|
|
88
|
+
* @param init Request initialization options
|
|
89
|
+
* @returns Promise resolving to a Response
|
|
90
|
+
*/
|
|
91
|
+
declare function agentFetch(
|
|
92
|
+
opts: AgentClientFetchOptions,
|
|
93
|
+
init?: RequestInit
|
|
94
|
+
): Promise<Response>;
|
|
95
|
+
//#endregion
|
|
96
|
+
export {
|
|
97
|
+
AgentClient,
|
|
98
|
+
AgentClientFetchOptions,
|
|
99
|
+
AgentClientOptions,
|
|
100
|
+
StreamOptions,
|
|
101
|
+
agentFetch,
|
|
102
|
+
camelCaseToKebabCase
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=client-CmMi85Sj.d.ts.map
|