agents 0.0.0-eb6827a → 0.0.0-eeb70e2

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 (45) 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 +13 -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-OYJXQRRH.js +465 -0
  11. package/dist/chunk-OYJXQRRH.js.map +1 -0
  12. package/dist/chunk-P3RZJ72N.js +783 -0
  13. package/dist/chunk-P3RZJ72N.js.map +1 -0
  14. package/dist/chunk-VCSB47AK.js +116 -0
  15. package/dist/chunk-VCSB47AK.js.map +1 -0
  16. package/dist/client.d.ts +15 -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 +782 -0
  28. package/dist/mcp/index.js.map +1 -0
  29. package/dist/react.d.ts +85 -5
  30. package/dist/react.js +48 -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/dist/serializable.d.ts +32 -0
  35. package/dist/serializable.js +1 -0
  36. package/dist/serializable.js.map +1 -0
  37. package/package.json +36 -8
  38. package/src/index.ts +490 -126
  39. package/dist/chunk-HMLY7DHA.js +0 -16
  40. package/dist/chunk-X6BBKLSC.js +0 -568
  41. package/dist/chunk-X6BBKLSC.js.map +0 -1
  42. package/dist/mcp.d.ts +0 -58
  43. package/dist/mcp.js +0 -945
  44. package/dist/mcp.js.map +0 -1
  45. /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 {
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 };