agents 0.0.0-d127c8f → 0.0.0-d2e8c0e

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.
Files changed (42) hide show
  1. package/dist/ai-chat-agent.d.ts +49 -3
  2. package/dist/ai-chat-agent.js +129 -66
  3. package/dist/ai-chat-agent.js.map +1 -1
  4. package/dist/ai-react.d.ts +12 -0
  5. package/dist/ai-react.js +38 -24
  6. package/dist/ai-react.js.map +1 -1
  7. package/dist/ai-types.d.ts +5 -0
  8. package/dist/chunk-BZXOAZUX.js +106 -0
  9. package/dist/chunk-BZXOAZUX.js.map +1 -0
  10. package/dist/chunk-J6T74FUS.js +783 -0
  11. package/dist/chunk-J6T74FUS.js.map +1 -0
  12. package/dist/chunk-QSGN3REV.js +123 -0
  13. package/dist/chunk-QSGN3REV.js.map +1 -0
  14. package/dist/chunk-Y67CHZBI.js +464 -0
  15. package/dist/chunk-Y67CHZBI.js.map +1 -0
  16. package/dist/client.d.ts +9 -1
  17. package/dist/client.js +6 -133
  18. package/dist/client.js.map +1 -1
  19. package/dist/index.d.ts +122 -13
  20. package/dist/index.js +6 -4
  21. package/dist/mcp/client.d.ts +783 -0
  22. package/dist/mcp/client.js +9 -0
  23. package/dist/mcp/do-oauth-client-provider.d.ts +41 -0
  24. package/dist/mcp/do-oauth-client-provider.js +7 -0
  25. package/dist/mcp/do-oauth-client-provider.js.map +1 -0
  26. package/dist/mcp/index.d.ts +84 -0
  27. package/dist/mcp/index.js +779 -0
  28. package/dist/mcp/index.js.map +1 -0
  29. package/dist/react.d.ts +65 -0
  30. package/dist/react.js +38 -29
  31. package/dist/react.js.map +1 -1
  32. package/dist/schedule.js +0 -2
  33. package/dist/schedule.js.map +1 -1
  34. package/package.json +37 -8
  35. package/src/index.ts +486 -124
  36. package/dist/chunk-HMLY7DHA.js +0 -16
  37. package/dist/chunk-X6BBKLSC.js +0 -568
  38. package/dist/chunk-X6BBKLSC.js.map +0 -1
  39. package/dist/mcp.d.ts +0 -58
  40. package/dist/mcp.js +0 -945
  41. package/dist/mcp.js.map +0 -1
  42. /package/dist/{chunk-HMLY7DHA.js.map → mcp/client.js.map} +0 -0
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 };