agents 0.0.0-ac0e999 → 0.0.0-ac74811

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 +13 -12
  2. package/dist/ai-chat-agent.js +94 -57
  3. package/dist/ai-chat-agent.js.map +1 -1
  4. package/dist/ai-react.d.ts +9 -8
  5. package/dist/ai-react.js +27 -29
  6. package/dist/ai-react.js.map +1 -1
  7. package/dist/{chunk-D6UOOELW.js → chunk-767EASBA.js} +15 -15
  8. package/dist/chunk-767EASBA.js.map +1 -0
  9. package/dist/{chunk-25YDMV4H.js → chunk-E3LCYPCB.js} +34 -29
  10. package/dist/chunk-E3LCYPCB.js.map +1 -0
  11. package/dist/{chunk-DMJ7L3FI.js → chunk-JFRK72K3.js} +305 -168
  12. package/dist/chunk-JFRK72K3.js.map +1 -0
  13. package/dist/{chunk-ZKIVUOTQ.js → chunk-NKZZ66QY.js} +14 -21
  14. package/dist/chunk-NKZZ66QY.js.map +1 -0
  15. package/dist/client.d.ts +7 -1
  16. package/dist/client.js +1 -2
  17. package/dist/index-CITGJflw.d.ts +486 -0
  18. package/dist/index.d.ts +25 -369
  19. package/dist/index.js +4 -5
  20. package/dist/mcp/client.d.ts +287 -15
  21. package/dist/mcp/client.js +1 -2
  22. package/dist/mcp/do-oauth-client-provider.d.ts +3 -3
  23. package/dist/mcp/do-oauth-client-provider.js +1 -2
  24. package/dist/mcp/index.d.ts +12 -12
  25. package/dist/mcp/index.js +124 -121
  26. package/dist/mcp/index.js.map +1 -1
  27. package/dist/observability/index.d.ts +12 -0
  28. package/dist/observability/index.js +10 -0
  29. package/dist/react.d.ts +76 -10
  30. package/dist/react.js +16 -8
  31. package/dist/react.js.map +1 -1
  32. package/dist/schedule.d.ts +6 -6
  33. package/dist/schedule.js +4 -6
  34. package/dist/schedule.js.map +1 -1
  35. package/dist/serializable.d.ts +32 -0
  36. package/dist/serializable.js +1 -0
  37. package/dist/serializable.js.map +1 -0
  38. package/package.json +75 -71
  39. package/src/index.ts +253 -131
  40. package/dist/chunk-25YDMV4H.js.map +0 -1
  41. package/dist/chunk-D6UOOELW.js.map +0 -1
  42. package/dist/chunk-DMJ7L3FI.js.map +0 -1
  43. package/dist/chunk-NOUFNU2O.js +0 -12
  44. package/dist/chunk-ZKIVUOTQ.js.map +0 -1
  45. /package/dist/{chunk-NOUFNU2O.js.map → observability/index.js.map} +0 -0
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  MCPClientManager,
3
3
  getNamespacedData
4
- } from "../chunk-25YDMV4H.js";
5
- import "../chunk-NOUFNU2O.js";
4
+ } from "../chunk-E3LCYPCB.js";
6
5
  export {
7
6
  MCPClientManager,
8
7
  getNamespacedData
@@ -10,9 +10,9 @@ declare class DurableObjectOAuthClientProvider implements AgentsOAuthProvider {
10
10
  storage: DurableObjectStorage;
11
11
  clientName: string;
12
12
  baseRedirectUrl: string;
13
- private authUrl_;
14
- private serverId_;
15
- private clientId_;
13
+ private _authUrl_;
14
+ private _serverId_;
15
+ private _clientId_;
16
16
  constructor(storage: DurableObjectStorage, clientName: string, baseRedirectUrl: string);
17
17
  get clientMetadata(): OAuthClientMetadata;
18
18
  get redirectUrl(): string;
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  DurableObjectOAuthClientProvider
3
- } from "../chunk-D6UOOELW.js";
4
- import "../chunk-NOUFNU2O.js";
3
+ } from "../chunk-767EASBA.js";
5
4
  export {
6
5
  DurableObjectOAuthClientProvider
7
6
  };
@@ -1,17 +1,17 @@
1
1
  import { MCPClientManager } from './client.js';
2
2
  import { DurableObject } from 'cloudflare:workers';
3
- import { Connection, WSMessage } from 'partyserver';
4
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
3
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
4
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
+ import { Connection, WSMessage } from 'partyserver';
6
6
  import 'zod';
7
- import '@modelcontextprotocol/sdk/types.js';
8
7
  import '@modelcontextprotocol/sdk/client/index.js';
9
8
  import '@modelcontextprotocol/sdk/client/sse.js';
9
+ import '@modelcontextprotocol/sdk/shared/protocol.js';
10
+ import '@modelcontextprotocol/sdk/types.js';
11
+ import 'ai';
10
12
  import './do-oauth-client-provider.js';
11
13
  import '@modelcontextprotocol/sdk/client/auth.js';
12
14
  import '@modelcontextprotocol/sdk/shared/auth.js';
13
- import '@modelcontextprotocol/sdk/shared/protocol.js';
14
- import 'ai';
15
15
 
16
16
  interface CORSOptions {
17
17
  origin?: string;
@@ -22,15 +22,15 @@ interface CORSOptions {
22
22
  }
23
23
  type MaybePromise<T> = T | Promise<T>;
24
24
  declare abstract class McpAgent<Env = unknown, State = unknown, Props extends Record<string, unknown> = Record<string, unknown>> extends DurableObject<Env> {
25
- private status;
26
- private transport?;
27
- private transportType;
28
- private requestIdToConnectionId;
25
+ private _status;
26
+ private _transport?;
27
+ private _transportType;
28
+ private _requestIdToConnectionId;
29
29
  /**
30
30
  * Since McpAgent's _aren't_ yet real "Agents", let's only expose a couple of the methods
31
31
  * to the outer class: initialState/state/setState/onStateUpdate/sql
32
32
  */
33
- private agent;
33
+ private _agent;
34
34
  get mcp(): MCPClientManager;
35
35
  protected constructor(ctx: DurableObjectState, env: Env);
36
36
  /**
@@ -52,12 +52,12 @@ declare abstract class McpAgent<Env = unknown, State = unknown, Props extends Re
52
52
  _init(props: Props): Promise<void>;
53
53
  setInitialized(): Promise<void>;
54
54
  isInitialized(): Promise<boolean>;
55
- private initialize;
55
+ private _initialize;
56
56
  fetch(request: Request): Promise<Response>;
57
57
  getWebSocket(): WebSocket | null;
58
58
  getWebSocketForResponseID(id: string): WebSocket | null;
59
59
  onMessage(connection: Connection, event: WSMessage): Promise<void>;
60
- onSSEMcpMessage(sessionId: string, request: Request): Promise<Error | null>;
60
+ onSSEMcpMessage(_sessionId: string, request: Request): Promise<Error | null>;
61
61
  webSocketMessage(ws: WebSocket, event: ArrayBuffer | string): Promise<void>;
62
62
  webSocketError(ws: WebSocket, error: unknown): Promise<void>;
63
63
  webSocketClose(ws: WebSocket, code: number, reason: string, wasClean: boolean): Promise<void>;