agents 0.0.0-9069759 → 0.0.0-931d633

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 (50) hide show
  1. package/dist/ai-chat-agent.d.ts +51 -4
  2. package/dist/ai-chat-agent.js +179 -78
  3. package/dist/ai-chat-agent.js.map +1 -1
  4. package/dist/ai-react.d.ts +17 -4
  5. package/dist/ai-react.js +62 -48
  6. package/dist/ai-react.js.map +1 -1
  7. package/dist/ai-types.d.ts +5 -0
  8. package/dist/chunk-767EASBA.js +106 -0
  9. package/dist/chunk-767EASBA.js.map +1 -0
  10. package/dist/chunk-E3LCYPCB.js +469 -0
  11. package/dist/chunk-E3LCYPCB.js.map +1 -0
  12. package/dist/chunk-JFRK72K3.js +910 -0
  13. package/dist/chunk-JFRK72K3.js.map +1 -0
  14. package/dist/chunk-NKZZ66QY.js +116 -0
  15. package/dist/chunk-NKZZ66QY.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-CITGJflw.d.ts +486 -0
  20. package/dist/index.d.ts +29 -300
  21. package/dist/index.js +6 -4
  22. package/dist/mcp/client.d.ts +1055 -0
  23. package/dist/mcp/client.js +9 -0
  24. package/dist/mcp/do-oauth-client-provider.d.ts +41 -0
  25. package/dist/mcp/do-oauth-client-provider.js +7 -0
  26. package/dist/mcp/do-oauth-client-provider.js.map +1 -0
  27. package/dist/mcp/index.d.ts +84 -0
  28. package/dist/mcp/index.js +783 -0
  29. package/dist/mcp/index.js.map +1 -0
  30. package/dist/observability/index.d.ts +12 -0
  31. package/dist/observability/index.js +10 -0
  32. package/dist/observability/index.js.map +1 -0
  33. package/dist/react.d.ts +85 -5
  34. package/dist/react.js +50 -31
  35. package/dist/react.js.map +1 -1
  36. package/dist/schedule.d.ts +6 -6
  37. package/dist/schedule.js +4 -6
  38. package/dist/schedule.js.map +1 -1
  39. package/dist/serializable.d.ts +32 -0
  40. package/dist/serializable.js +1 -0
  41. package/dist/serializable.js.map +1 -0
  42. package/package.json +83 -51
  43. package/src/index.ts +631 -154
  44. package/dist/chunk-HMLY7DHA.js +0 -16
  45. package/dist/chunk-X6BBKLSC.js +0 -568
  46. package/dist/chunk-X6BBKLSC.js.map +0 -1
  47. package/dist/mcp.d.ts +0 -58
  48. package/dist/mcp.js +0 -945
  49. package/dist/mcp.js.map +0 -1
  50. /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 };