agents 0.0.0-316f98c → 0.0.0-328cf82

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 (69) hide show
  1. package/README.md +255 -27
  2. package/dist/ai-chat-agent.d.ts +59 -11
  3. package/dist/ai-chat-agent.js +532 -160
  4. package/dist/ai-chat-agent.js.map +1 -1
  5. package/dist/ai-chat-v5-migration-gdyLiTd8.js +155 -0
  6. package/dist/ai-chat-v5-migration-gdyLiTd8.js.map +1 -0
  7. package/dist/ai-chat-v5-migration.d.ts +155 -0
  8. package/dist/ai-chat-v5-migration.js +3 -0
  9. package/dist/ai-react.d.ts +73 -72
  10. package/dist/ai-react.js +261 -192
  11. package/dist/ai-react.js.map +1 -1
  12. package/dist/ai-types-BWW4umHY.d.ts +95 -0
  13. package/dist/ai-types-UZlfLOYP.js +20 -0
  14. package/dist/ai-types-UZlfLOYP.js.map +1 -0
  15. package/dist/ai-types.d.ts +6 -69
  16. package/dist/ai-types.js +3 -1
  17. package/dist/client-CZBVDDoO.js +786 -0
  18. package/dist/client-CZBVDDoO.js.map +1 -0
  19. package/dist/client-CmMi85Sj.d.ts +104 -0
  20. package/dist/client-CrWcaPgn.d.ts +5313 -0
  21. package/dist/client-DjR-lC16.js +117 -0
  22. package/dist/client-DjR-lC16.js.map +1 -0
  23. package/dist/client.d.ts +12 -79
  24. package/dist/client.js +3 -130
  25. package/dist/codemode/ai.d.ts +27 -0
  26. package/dist/codemode/ai.js +151 -0
  27. package/dist/codemode/ai.js.map +1 -0
  28. package/dist/do-oauth-client-provider-B2jr6UNq.js +93 -0
  29. package/dist/do-oauth-client-provider-B2jr6UNq.js.map +1 -0
  30. package/dist/do-oauth-client-provider-CCwGwnrA.d.ts +55 -0
  31. package/dist/index-C8tKy5Ek.d.ts +736 -0
  32. package/dist/index-W4JUkafc.d.ts +54 -0
  33. package/dist/index.d.ts +77 -301
  34. package/dist/index.js +7 -22
  35. package/dist/mcp/client.d.ts +4 -675
  36. package/dist/mcp/client.js +2 -267
  37. package/dist/mcp/do-oauth-client-provider.d.ts +2 -0
  38. package/dist/mcp/do-oauth-client-provider.js +3 -0
  39. package/dist/mcp/index.d.ts +7 -45
  40. package/dist/mcp/index.js +6 -342
  41. package/dist/mcp/x402.d.ts +34 -0
  42. package/dist/mcp/x402.js +194 -0
  43. package/dist/mcp/x402.js.map +1 -0
  44. package/dist/mcp-BEwaCsxO.d.ts +61 -0
  45. package/dist/observability/index.d.ts +3 -0
  46. package/dist/observability/index.js +7 -0
  47. package/dist/react-CY7QkxbG.d.ts +113 -0
  48. package/dist/react.d.ts +10 -39
  49. package/dist/react.js +183 -98
  50. package/dist/react.js.map +1 -1
  51. package/dist/schedule.d.ts +89 -12
  52. package/dist/schedule.js +46 -23
  53. package/dist/schedule.js.map +1 -1
  54. package/dist/serializable-gtr9YMhp.d.ts +34 -0
  55. package/dist/serializable.d.ts +7 -0
  56. package/dist/serializable.js +1 -0
  57. package/dist/src-tpG9NtHy.js +2457 -0
  58. package/dist/src-tpG9NtHy.js.map +1 -0
  59. package/package.json +114 -50
  60. package/dist/ai-types.js.map +0 -1
  61. package/dist/chunk-HMLY7DHA.js +0 -16
  62. package/dist/chunk-HMLY7DHA.js.map +0 -1
  63. package/dist/chunk-YMUU7QHV.js +0 -595
  64. package/dist/chunk-YMUU7QHV.js.map +0 -1
  65. package/dist/client.js.map +0 -1
  66. package/dist/index.js.map +0 -1
  67. package/dist/mcp/client.js.map +0 -1
  68. package/dist/mcp/index.js.map +0 -1
  69. package/src/index.ts +0 -919
@@ -0,0 +1,55 @@
1
+ import { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
2
+ import {
3
+ OAuthClientInformation,
4
+ OAuthClientInformationFull,
5
+ OAuthClientMetadata,
6
+ OAuthTokens
7
+ } from "@modelcontextprotocol/sdk/shared/auth.js";
8
+
9
+ //#region src/mcp/do-oauth-client-provider.d.ts
10
+ interface AgentsOAuthProvider extends OAuthClientProvider {
11
+ authUrl: string | undefined;
12
+ clientId: string | undefined;
13
+ serverId: string | undefined;
14
+ }
15
+ declare class DurableObjectOAuthClientProvider implements AgentsOAuthProvider {
16
+ storage: DurableObjectStorage;
17
+ clientName: string;
18
+ baseRedirectUrl: string;
19
+ private _authUrl_;
20
+ private _serverId_;
21
+ private _clientId_;
22
+ constructor(
23
+ storage: DurableObjectStorage,
24
+ clientName: string,
25
+ baseRedirectUrl: string
26
+ );
27
+ get clientMetadata(): OAuthClientMetadata;
28
+ get clientUri(): string;
29
+ get redirectUrl(): string;
30
+ get clientId(): string;
31
+ set clientId(clientId_: string);
32
+ get serverId(): string;
33
+ set serverId(serverId_: string);
34
+ keyPrefix(clientId: string): string;
35
+ clientInfoKey(clientId: string): string;
36
+ clientInformation(): Promise<OAuthClientInformation | undefined>;
37
+ saveClientInformation(
38
+ clientInformation: OAuthClientInformationFull
39
+ ): Promise<void>;
40
+ tokenKey(clientId: string): string;
41
+ tokens(): Promise<OAuthTokens | undefined>;
42
+ saveTokens(tokens: OAuthTokens): Promise<void>;
43
+ get authUrl(): string | undefined;
44
+ /**
45
+ * Because this operates on the server side (but we need browser auth), we send this url back to the user
46
+ * and require user interact to initiate the redirect flow
47
+ */
48
+ redirectToAuthorization(authUrl: URL): Promise<void>;
49
+ codeVerifierKey(clientId: string): string;
50
+ saveCodeVerifier(verifier: string): Promise<void>;
51
+ codeVerifier(): Promise<string>;
52
+ }
53
+ //#endregion
54
+ export { AgentsOAuthProvider, DurableObjectOAuthClientProvider };
55
+ //# sourceMappingURL=do-oauth-client-provider-CCwGwnrA.d.ts.map