agents 0.0.0-dfa677f → 0.0.0-e2d7b5c
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 +22 -3
- package/dist/ai-chat-agent.js +94 -27
- package/dist/ai-chat-agent.js.map +1 -1
- package/dist/ai-react.js +38 -22
- package/dist/ai-react.js.map +1 -1
- package/dist/ai-types.d.ts +5 -0
- package/dist/{chunk-KRBQHBPA.js → chunk-HD4VEHBA.js} +28 -19
- package/dist/chunk-HD4VEHBA.js.map +1 -0
- package/dist/chunk-Q5ZBHY4Z.js +456 -0
- package/dist/chunk-Q5ZBHY4Z.js.map +1 -0
- package/dist/client.js +16 -23
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +18 -13
- package/dist/index.js +6 -7
- package/dist/mcp/client.d.ts +777 -0
- package/dist/mcp/client.js +10 -0
- package/dist/mcp/client.js.map +1 -0
- package/dist/mcp/do-oauth-client-provider.d.ts +41 -0
- package/dist/mcp/do-oauth-client-provider.js +107 -0
- package/dist/mcp/do-oauth-client-provider.js.map +1 -0
- package/dist/mcp/index.d.ts +74 -0
- package/dist/mcp/index.js +810 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/react.js +34 -27
- package/dist/react.js.map +1 -1
- package/package.json +34 -8
- package/src/index.ts +38 -21
- package/dist/chunk-KRBQHBPA.js.map +0 -1
- package/dist/mcp.d.ts +0 -58
- package/dist/mcp.js +0 -945
- package/dist/mcp.js.map +0 -1
package/dist/mcp.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { DurableObject } from "cloudflare:workers";
|
|
2
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
-
import { Connection } from "partyserver";
|
|
4
|
-
|
|
5
|
-
interface CORSOptions {
|
|
6
|
-
origin?: string;
|
|
7
|
-
methods?: string;
|
|
8
|
-
headers?: string;
|
|
9
|
-
maxAge?: number;
|
|
10
|
-
}
|
|
11
|
-
declare abstract class McpAgent<
|
|
12
|
-
Env = unknown,
|
|
13
|
-
State = unknown,
|
|
14
|
-
Props extends Record<string, unknown> = Record<string, unknown>,
|
|
15
|
-
> extends DurableObject<Env> {
|
|
16
|
-
#private;
|
|
17
|
-
protected constructor(ctx: DurableObjectState, env: Env);
|
|
18
|
-
/**
|
|
19
|
-
* Agents API allowlist
|
|
20
|
-
*/
|
|
21
|
-
initialState: State;
|
|
22
|
-
get state(): State;
|
|
23
|
-
sql<T = Record<string, string | number | boolean | null>>(
|
|
24
|
-
strings: TemplateStringsArray,
|
|
25
|
-
...values: (string | number | boolean | null)[]
|
|
26
|
-
): T[];
|
|
27
|
-
setState(state: State): void;
|
|
28
|
-
onStateUpdate(state: State | undefined, source: Connection | "server"): void;
|
|
29
|
-
/**
|
|
30
|
-
* McpAgent API
|
|
31
|
-
*/
|
|
32
|
-
abstract server: McpServer;
|
|
33
|
-
private transport;
|
|
34
|
-
props: Props;
|
|
35
|
-
initRun: boolean;
|
|
36
|
-
abstract init(): Promise<void>;
|
|
37
|
-
_init(props: Props): Promise<void>;
|
|
38
|
-
onSSE(path: string): Promise<Response>;
|
|
39
|
-
onMCPMessage(request: Request): Promise<Response>;
|
|
40
|
-
static mount(
|
|
41
|
-
path: string,
|
|
42
|
-
{
|
|
43
|
-
binding,
|
|
44
|
-
corsOptions,
|
|
45
|
-
}?: {
|
|
46
|
-
binding?: string;
|
|
47
|
-
corsOptions?: CORSOptions;
|
|
48
|
-
}
|
|
49
|
-
): {
|
|
50
|
-
fetch: (
|
|
51
|
-
request: Request,
|
|
52
|
-
env: Record<string, DurableObjectNamespace<McpAgent>>,
|
|
53
|
-
ctx: ExecutionContext
|
|
54
|
-
) => Promise<Response>;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { McpAgent };
|