agents 0.0.0-f973b54 → 0.0.0-fac1fe8

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 (56) hide show
  1. package/README.md +157 -27
  2. package/dist/ai-chat-agent.d.ts +40 -10
  3. package/dist/ai-chat-agent.js +268 -143
  4. package/dist/ai-chat-agent.js.map +1 -1
  5. package/dist/ai-chat-v5-migration.d.ts +152 -0
  6. package/dist/ai-chat-v5-migration.js +19 -0
  7. package/dist/ai-react.d.ts +71 -67
  8. package/dist/ai-react.js +160 -54
  9. package/dist/ai-react.js.map +1 -1
  10. package/dist/ai-types.d.ts +36 -19
  11. package/dist/ai-types.js +6 -0
  12. package/dist/chunk-AVYJQSLW.js +17 -0
  13. package/dist/chunk-AVYJQSLW.js.map +1 -0
  14. package/dist/chunk-LL2AFX7V.js +109 -0
  15. package/dist/chunk-LL2AFX7V.js.map +1 -0
  16. package/dist/{chunk-Q5ZBHY4Z.js → chunk-MH46VMM4.js} +209 -53
  17. package/dist/chunk-MH46VMM4.js.map +1 -0
  18. package/dist/chunk-QEVM4BVL.js +116 -0
  19. package/dist/chunk-QEVM4BVL.js.map +1 -0
  20. package/dist/chunk-UJVEAURM.js +150 -0
  21. package/dist/chunk-UJVEAURM.js.map +1 -0
  22. package/dist/chunk-YDUDMOL6.js +1296 -0
  23. package/dist/chunk-YDUDMOL6.js.map +1 -0
  24. package/dist/client-CvaJdLQA.d.ts +5015 -0
  25. package/dist/client.d.ts +16 -2
  26. package/dist/client.js +7 -126
  27. package/dist/client.js.map +1 -1
  28. package/dist/index.d.ts +275 -25
  29. package/dist/index.js +13 -3
  30. package/dist/mcp/client.d.ts +9 -775
  31. package/dist/mcp/client.js +1 -2
  32. package/dist/mcp/do-oauth-client-provider.d.ts +4 -3
  33. package/dist/mcp/do-oauth-client-provider.js +3 -103
  34. package/dist/mcp/do-oauth-client-provider.js.map +1 -1
  35. package/dist/mcp/index.d.ts +73 -50
  36. package/dist/mcp/index.js +878 -661
  37. package/dist/mcp/index.js.map +1 -1
  38. package/dist/observability/index.d.ts +46 -0
  39. package/dist/observability/index.js +11 -0
  40. package/dist/observability/index.js.map +1 -0
  41. package/dist/react.d.ts +89 -5
  42. package/dist/react.js +23 -9
  43. package/dist/react.js.map +1 -1
  44. package/dist/schedule.d.ts +81 -7
  45. package/dist/schedule.js +19 -8
  46. package/dist/schedule.js.map +1 -1
  47. package/dist/serializable.d.ts +32 -0
  48. package/dist/serializable.js +1 -0
  49. package/dist/serializable.js.map +1 -0
  50. package/package.json +86 -67
  51. package/src/index.ts +1164 -157
  52. package/dist/chunk-HMLY7DHA.js +0 -16
  53. package/dist/chunk-HN5JVKAZ.js +0 -606
  54. package/dist/chunk-HN5JVKAZ.js.map +0 -1
  55. package/dist/chunk-Q5ZBHY4Z.js.map +0 -1
  56. /package/dist/{chunk-HMLY7DHA.js.map → ai-chat-v5-migration.js.map} +0 -0
@@ -1,30 +1,43 @@
1
1
  import { z } from "zod";
2
2
 
3
- type Schedule = z.infer<typeof unstable_scheduleSchema>;
3
+ /**
4
+ * Get the schedule prompt for a given event
5
+ * @param event - The event to get the schedule prompt for
6
+ * @returns The schedule prompt
7
+ */
8
+ declare function getSchedulePrompt(event: { date: Date }): string;
9
+ /**
10
+ * @deprecated this has been renamed to getSchedulePrompt, and unstable_getSchedulePrompt will be removed in the next major version
11
+ * @param event - The event to get the schedule prompt for
12
+ * @returns The schedule prompt
13
+ */
4
14
  declare function unstable_getSchedulePrompt(event: { date: Date }): string;
5
- declare const unstable_scheduleSchema: z.ZodObject<
15
+ /**
16
+ * The schema for the schedule prompt
17
+ */
18
+ declare const scheduleSchema: z.ZodObject<
6
19
  {
7
20
  description: z.ZodString;
8
21
  when: z.ZodObject<
9
22
  {
10
- type: z.ZodEnum<["scheduled", "delayed", "cron", "no-schedule"]>;
23
+ cron: z.ZodOptional<z.ZodString>;
11
24
  date: z.ZodOptional<z.ZodDate>;
12
25
  delayInSeconds: z.ZodOptional<z.ZodNumber>;
13
- cron: z.ZodOptional<z.ZodString>;
26
+ type: z.ZodEnum<["scheduled", "delayed", "cron", "no-schedule"]>;
14
27
  },
15
28
  "strip",
16
29
  z.ZodTypeAny,
17
30
  {
18
31
  type: "scheduled" | "delayed" | "cron" | "no-schedule";
32
+ date?: Date | undefined;
19
33
  cron?: string | undefined;
20
34
  delayInSeconds?: number | undefined;
21
- date?: Date | undefined;
22
35
  },
23
36
  {
24
37
  type: "scheduled" | "delayed" | "cron" | "no-schedule";
38
+ date?: Date | undefined;
25
39
  cron?: string | undefined;
26
40
  delayInSeconds?: number | undefined;
27
- date?: Date | undefined;
28
41
  }
29
42
  >;
30
43
  },
@@ -34,20 +47,81 @@ declare const unstable_scheduleSchema: z.ZodObject<
34
47
  description: string;
35
48
  when: {
36
49
  type: "scheduled" | "delayed" | "cron" | "no-schedule";
50
+ date?: Date | undefined;
37
51
  cron?: string | undefined;
38
52
  delayInSeconds?: number | undefined;
53
+ };
54
+ },
55
+ {
56
+ description: string;
57
+ when: {
58
+ type: "scheduled" | "delayed" | "cron" | "no-schedule";
39
59
  date?: Date | undefined;
60
+ cron?: string | undefined;
61
+ delayInSeconds?: number | undefined;
40
62
  };
63
+ }
64
+ >;
65
+ /**
66
+ * The type for the schedule prompt
67
+ */
68
+ type Schedule = z.infer<typeof scheduleSchema>;
69
+ /**
70
+ * @deprecated this has been renamed to scheduleSchema, and unstable_scheduleSchema will be removed in the next major version
71
+ * @returns The schedule schema
72
+ */
73
+ declare const unstable_scheduleSchema: z.ZodObject<
74
+ {
75
+ description: z.ZodString;
76
+ when: z.ZodObject<
77
+ {
78
+ cron: z.ZodOptional<z.ZodString>;
79
+ date: z.ZodOptional<z.ZodDate>;
80
+ delayInSeconds: z.ZodOptional<z.ZodNumber>;
81
+ type: z.ZodEnum<["scheduled", "delayed", "cron", "no-schedule"]>;
82
+ },
83
+ "strip",
84
+ z.ZodTypeAny,
85
+ {
86
+ type: "scheduled" | "delayed" | "cron" | "no-schedule";
87
+ date?: Date | undefined;
88
+ cron?: string | undefined;
89
+ delayInSeconds?: number | undefined;
90
+ },
91
+ {
92
+ type: "scheduled" | "delayed" | "cron" | "no-schedule";
93
+ date?: Date | undefined;
94
+ cron?: string | undefined;
95
+ delayInSeconds?: number | undefined;
96
+ }
97
+ >;
41
98
  },
99
+ "strip",
100
+ z.ZodTypeAny,
42
101
  {
43
102
  description: string;
44
103
  when: {
45
104
  type: "scheduled" | "delayed" | "cron" | "no-schedule";
105
+ date?: Date | undefined;
46
106
  cron?: string | undefined;
47
107
  delayInSeconds?: number | undefined;
108
+ };
109
+ },
110
+ {
111
+ description: string;
112
+ when: {
113
+ type: "scheduled" | "delayed" | "cron" | "no-schedule";
48
114
  date?: Date | undefined;
115
+ cron?: string | undefined;
116
+ delayInSeconds?: number | undefined;
49
117
  };
50
118
  }
51
119
  >;
52
120
 
53
- export { type Schedule, unstable_getSchedulePrompt, unstable_scheduleSchema };
121
+ export {
122
+ type Schedule,
123
+ getSchedulePrompt,
124
+ scheduleSchema,
125
+ unstable_getSchedulePrompt,
126
+ unstable_scheduleSchema
127
+ };
package/dist/schedule.js CHANGED
@@ -1,8 +1,6 @@
1
- import "./chunk-HMLY7DHA.js";
2
-
3
1
  // src/schedule.ts
4
2
  import { z } from "zod";
5
- function unstable_getSchedulePrompt(event) {
3
+ function getSchedulePrompt(event) {
6
4
  return `
7
5
  [Schedule Parser Component]
8
6
 
@@ -51,22 +49,35 @@ Example outputs:
51
49
  [End Schedule Parser Component]
52
50
  `;
53
51
  }
54
- var unstable_scheduleSchema = z.object({
52
+ var didWarnAboutUnstableGetSchedulePrompt = false;
53
+ function unstable_getSchedulePrompt(event) {
54
+ if (!didWarnAboutUnstableGetSchedulePrompt) {
55
+ didWarnAboutUnstableGetSchedulePrompt = true;
56
+ console.warn(
57
+ "unstable_getSchedulePrompt is deprecated, use getSchedulePrompt instead. unstable_getSchedulePrompt will be removed in the next major version."
58
+ );
59
+ }
60
+ return getSchedulePrompt(event);
61
+ }
62
+ var scheduleSchema = z.object({
55
63
  description: z.string().describe("A description of the task"),
56
64
  when: z.object({
57
- type: z.enum(["scheduled", "delayed", "cron", "no-schedule"]).describe("The type of scheduling details"),
65
+ cron: z.string().optional().describe(
66
+ "execute task on a recurring interval specified as cron syntax (only use if the type is cron)"
67
+ ),
58
68
  date: z.coerce.date().optional().describe(
59
69
  "execute task at the specified date and time (only use if the type is scheduled)"
60
70
  ),
61
71
  delayInSeconds: z.number().optional().describe(
62
72
  "execute task after a delay in seconds (only use if the type is delayed)"
63
73
  ),
64
- cron: z.string().optional().describe(
65
- "execute task on a recurring interval specified as cron syntax (only use if the type is cron)"
66
- )
74
+ type: z.enum(["scheduled", "delayed", "cron", "no-schedule"]).describe("The type of scheduling details")
67
75
  })
68
76
  });
77
+ var unstable_scheduleSchema = scheduleSchema;
69
78
  export {
79
+ getSchedulePrompt,
80
+ scheduleSchema,
70
81
  unstable_getSchedulePrompt,
71
82
  unstable_scheduleSchema
72
83
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/schedule.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport type Schedule = z.infer<typeof unstable_scheduleSchema>;\n\nexport function unstable_getSchedulePrompt(event: { date: Date }) {\n return `\n[Schedule Parser Component]\n\nCurrent time: ${event.date.toUTCString()}\n\nThis component parses natural language scheduling requests into a structured format. It extracts:\n1. A clean task description (without timing information)\n2. Scheduling details in one of these formats:\n - scheduled: Specific date/time events\n - delayed: Relative time delays (in seconds)\n - cron: Recurring patterns\n - no-schedule: Tasks without timing\n\nRules:\n- Task descriptions should be clean and focused on the action\n- Use numbers (0-6) for days in cron patterns (0=Sunday)\n- For recurring tasks, use standard cron syntax\n- For relative times, convert to seconds\n- For specific dates, use the current time as reference\n\nExample outputs:\n{\n \"description\": \"meeting with team\",\n \"when\": {\n \"type\": \"scheduled\",\n \"date\": \"tomorrow at 14:00\"\n }\n}\n\n{\n \"description\": \"backup database\",\n \"when\": {\n \"type\": \"cron\",\n \"cron\": \"0 0 * * *\"\n }\n}\n\n{\n \"description\": \"send report\",\n \"when\": {\n \"type\": \"delayed\",\n \"delayInSeconds\": 1800\n }\n}\n\n[End Schedule Parser Component]\n`;\n}\n\nexport const unstable_scheduleSchema = z.object({\n description: z.string().describe(\"A description of the task\"),\n when: z.object({\n type: z\n .enum([\"scheduled\", \"delayed\", \"cron\", \"no-schedule\"])\n .describe(\"The type of scheduling details\"),\n date: z.coerce\n .date()\n .optional()\n .describe(\n \"execute task at the specified date and time (only use if the type is scheduled)\"\n ),\n delayInSeconds: z\n .number()\n .optional()\n .describe(\n \"execute task after a delay in seconds (only use if the type is delayed)\"\n ),\n cron: z\n .string()\n .optional()\n .describe(\n \"execute task on a recurring interval specified as cron syntax (only use if the type is cron)\"\n ),\n }),\n});\n"],"mappings":";;;AAAA,SAAS,SAAS;AAIX,SAAS,2BAA2B,OAAuB;AAChE,SAAO;AAAA;AAAA;AAAA,gBAGO,MAAM,KAAK,YAAY,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CxC;AAEO,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,aAAa,EAAE,OAAO,EAAE,SAAS,2BAA2B;AAAA,EAC5D,MAAM,EAAE,OAAO;AAAA,IACb,MAAM,EACH,KAAK,CAAC,aAAa,WAAW,QAAQ,aAAa,CAAC,EACpD,SAAS,gCAAgC;AAAA,IAC5C,MAAM,EAAE,OACL,KAAK,EACL,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,IACF,gBAAgB,EACb,OAAO,EACP,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,IACF,MAAM,EACH,OAAO,EACP,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,EACJ,CAAC;AACH,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/schedule.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Get the schedule prompt for a given event\n * @param event - The event to get the schedule prompt for\n * @returns The schedule prompt\n */\nexport function getSchedulePrompt(event: { date: Date }) {\n return `\n[Schedule Parser Component]\n\nCurrent time: ${event.date.toUTCString()}\n\nThis component parses natural language scheduling requests into a structured format. It extracts:\n1. A clean task description (without timing information)\n2. Scheduling details in one of these formats:\n - scheduled: Specific date/time events\n - delayed: Relative time delays (in seconds)\n - cron: Recurring patterns\n - no-schedule: Tasks without timing\n\nRules:\n- Task descriptions should be clean and focused on the action\n- Use numbers (0-6) for days in cron patterns (0=Sunday)\n- For recurring tasks, use standard cron syntax\n- For relative times, convert to seconds\n- For specific dates, use the current time as reference\n\nExample outputs:\n{\n \"description\": \"meeting with team\",\n \"when\": {\n \"type\": \"scheduled\",\n \"date\": \"tomorrow at 14:00\"\n }\n}\n\n{\n \"description\": \"backup database\",\n \"when\": {\n \"type\": \"cron\",\n \"cron\": \"0 0 * * *\"\n }\n}\n\n{\n \"description\": \"send report\",\n \"when\": {\n \"type\": \"delayed\",\n \"delayInSeconds\": 1800\n }\n}\n\n[End Schedule Parser Component]\n`;\n}\n\nlet didWarnAboutUnstableGetSchedulePrompt = false;\n\n/**\n * @deprecated this has been renamed to getSchedulePrompt, and unstable_getSchedulePrompt will be removed in the next major version\n * @param event - The event to get the schedule prompt for\n * @returns The schedule prompt\n */\nexport function unstable_getSchedulePrompt(event: { date: Date }) {\n if (!didWarnAboutUnstableGetSchedulePrompt) {\n didWarnAboutUnstableGetSchedulePrompt = true;\n console.warn(\n \"unstable_getSchedulePrompt is deprecated, use getSchedulePrompt instead. unstable_getSchedulePrompt will be removed in the next major version.\"\n );\n }\n return getSchedulePrompt(event);\n}\n\n/**\n * The schema for the schedule prompt\n */\nexport const scheduleSchema = z.object({\n description: z.string().describe(\"A description of the task\"),\n when: z.object({\n cron: z\n .string()\n .optional()\n .describe(\n \"execute task on a recurring interval specified as cron syntax (only use if the type is cron)\"\n ),\n date: z.coerce\n .date()\n .optional()\n .describe(\n \"execute task at the specified date and time (only use if the type is scheduled)\"\n ),\n delayInSeconds: z\n .number()\n .optional()\n .describe(\n \"execute task after a delay in seconds (only use if the type is delayed)\"\n ),\n type: z\n .enum([\"scheduled\", \"delayed\", \"cron\", \"no-schedule\"])\n .describe(\"The type of scheduling details\")\n })\n});\n\n/**\n * The type for the schedule prompt\n */\nexport type Schedule = z.infer<typeof scheduleSchema>;\n\n/**\n * @deprecated this has been renamed to scheduleSchema, and unstable_scheduleSchema will be removed in the next major version\n * @returns The schedule schema\n */\nexport const unstable_scheduleSchema = scheduleSchema;\n"],"mappings":";AAAA,SAAS,SAAS;AAOX,SAAS,kBAAkB,OAAuB;AACvD,SAAO;AAAA;AAAA;AAAA,gBAGO,MAAM,KAAK,YAAY,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CxC;AAEA,IAAI,wCAAwC;AAOrC,SAAS,2BAA2B,OAAuB;AAChE,MAAI,CAAC,uCAAuC;AAC1C,4CAAwC;AACxC,YAAQ;AAAA,MACN;AAAA,IACF;AAAA,EACF;AACA,SAAO,kBAAkB,KAAK;AAChC;AAKO,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,aAAa,EAAE,OAAO,EAAE,SAAS,2BAA2B;AAAA,EAC5D,MAAM,EAAE,OAAO;AAAA,IACb,MAAM,EACH,OAAO,EACP,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,IACF,MAAM,EAAE,OACL,KAAK,EACL,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,IACF,gBAAgB,EACb,OAAO,EACP,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,IACF,MAAM,EACH,KAAK,CAAC,aAAa,WAAW,QAAQ,aAAa,CAAC,EACpD,SAAS,gCAAgC;AAAA,EAC9C,CAAC;AACH,CAAC;AAWM,IAAM,0BAA0B;","names":[]}
@@ -0,0 +1,32 @@
1
+ type SerializableValue =
2
+ | undefined
3
+ | null
4
+ | string
5
+ | number
6
+ | boolean
7
+ | {
8
+ [key: string]: SerializableValue;
9
+ }
10
+ | SerializableValue[];
11
+ type SerializableReturnValue =
12
+ | SerializableValue
13
+ | void
14
+ | Promise<SerializableValue>
15
+ | Promise<void>;
16
+ type AllSerializableValues<A> = A extends [infer First, ...infer Rest]
17
+ ? First extends SerializableValue
18
+ ? AllSerializableValues<Rest>
19
+ : false
20
+ : true;
21
+ type Method = (...args: any[]) => any;
22
+ type RPCMethod<T = Method> = T extends Method
23
+ ? T extends (...arg: infer A) => infer R
24
+ ? AllSerializableValues<A> extends true
25
+ ? R extends SerializableReturnValue
26
+ ? T
27
+ : never
28
+ : never
29
+ : never
30
+ : never;
31
+
32
+ export type { Method, RPCMethod, SerializableReturnValue, SerializableValue };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=serializable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,98 +1,117 @@
1
1
  {
2
- "name": "agents",
3
- "version": "0.0.0-f973b54",
4
- "main": "src/index.ts",
5
- "type": "module",
6
- "scripts": {
7
- "check:test": "npm run check:test:workers && npm run check:test:react",
8
- "check:test:workers": "vitest -r src/tests --watch false",
9
- "check:test:react": "vitest -r src/react-tests --watch false",
10
- "test": "vitest -r src/tests",
11
- "test:react": "vitest -r src/react-tests",
12
- "evals": "(cd evals; evalite)",
13
- "build": "tsx ./scripts/build.ts"
2
+ "author": "Cloudflare Inc.",
3
+ "bugs": {
4
+ "url": "https://github.com/cloudflare/agents/issues"
5
+ },
6
+ "dependencies": {
7
+ "@modelcontextprotocol/sdk": "^1.18.0",
8
+ "ai": "5.0.39",
9
+ "cron-schedule": "^5.0.4",
10
+ "mimetext": "^3.0.27",
11
+ "nanoid": "^5.1.5",
12
+ "partyserver": "^0.0.73",
13
+ "partysocket": "1.1.5",
14
+ "zod": "^3.25.76"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "description": "A home for your AI agents",
20
+ "devDependencies": {
21
+ "@cloudflare/workers-oauth-provider": "^0.0.6",
22
+ "alchemy": "^0.62.3",
23
+ "react": "*",
24
+ "vitest-browser-react": "^1.0.1"
14
25
  },
15
- "files": [
16
- "dist",
17
- "README.md"
18
- ],
19
26
  "exports": {
20
27
  ".": {
21
28
  "types": "./dist/index.d.ts",
22
- "require": "./dist/index.js",
23
- "import": "./dist/index.js"
29
+ "import": "./dist/index.js",
30
+ "require": "./dist/index.js"
24
31
  },
25
- "./client": {
26
- "types": "./dist/client.d.ts",
27
- "require": "./dist/client.js",
28
- "import": "./dist/client.js"
32
+ "./ai-chat-agent": {
33
+ "types": "./dist/ai-chat-agent.d.ts",
34
+ "import": "./dist/ai-chat-agent.js",
35
+ "require": "./dist/ai-chat-agent.js"
29
36
  },
30
- "./react": {
31
- "types": "./dist/react.d.ts",
32
- "require": "./dist/react.js",
33
- "import": "./dist/react.js"
37
+ "./ai-chat-v5-migration": {
38
+ "types": "./dist/ai-chat-v5-migration.d.ts",
39
+ "import": "./dist/ai-chat-v5-migration.js",
40
+ "require": "./dist/ai-chat-v5-migration.js"
34
41
  },
35
42
  "./ai-react": {
36
43
  "types": "./dist/ai-react.d.ts",
37
- "require": "./dist/ai-react.js",
38
- "import": "./dist/ai-react.js"
39
- },
40
- "./ai-chat-agent": {
41
- "types": "./dist/ai-chat-agent.d.ts",
42
- "require": "./dist/ai-chat-agent.js",
43
- "import": "./dist/ai-chat-agent.js"
44
+ "import": "./dist/ai-react.js",
45
+ "require": "./dist/ai-react.js"
44
46
  },
45
47
  "./ai-types": {
46
48
  "types": "./dist/ai-types.d.ts",
47
- "require": "./dist/ai-types.js",
48
- "import": "./dist/ai-types.js"
49
+ "import": "./dist/ai-types.js",
50
+ "require": "./dist/ai-types.js"
49
51
  },
50
- "./schedule": {
51
- "types": "./dist/schedule.d.ts",
52
- "require": "./dist/schedule.js",
53
- "import": "./dist/schedule.js"
52
+ "./client": {
53
+ "types": "./dist/client.d.ts",
54
+ "import": "./dist/client.js",
55
+ "require": "./dist/client.js"
54
56
  },
55
57
  "./mcp": {
56
58
  "types": "./dist/mcp/index.d.ts",
57
- "require": "./dist/mcp/index.js",
58
- "import": "./dist/mcp/index.js"
59
+ "import": "./dist/mcp/index.js",
60
+ "require": "./dist/mcp/index.js"
59
61
  },
60
62
  "./mcp/client": {
61
63
  "types": "./dist/mcp/client.d.ts",
62
- "require": "./dist/mcp/client.js",
63
- "import": "./dist/mcp/client.js"
64
+ "import": "./dist/mcp/client.js",
65
+ "require": "./dist/mcp/client.js"
64
66
  },
65
67
  "./mcp/do-oauth-client-provider": {
66
68
  "types": "./dist/mcp/do-oauth-client-provider.d.ts",
67
- "require": "./dist/mcp/do-oauth-client-provider.js",
68
- "import": "./dist/mcp/do-oauth-client-provider.js"
69
+ "import": "./dist/mcp/do-oauth-client-provider.js",
70
+ "require": "./dist/mcp/do-oauth-client-provider.js"
71
+ },
72
+ "./observability": {
73
+ "types": "./dist/observability/index.d.ts",
74
+ "import": "./dist/observability/index.js",
75
+ "require": "./dist/observability/index.js"
76
+ },
77
+ "./react": {
78
+ "types": "./dist/react.d.ts",
79
+ "import": "./dist/react.js",
80
+ "require": "./dist/react.js"
81
+ },
82
+ "./schedule": {
83
+ "types": "./dist/schedule.d.ts",
84
+ "import": "./dist/schedule.js",
85
+ "require": "./dist/schedule.js"
69
86
  }
70
87
  },
88
+ "files": [
89
+ "dist",
90
+ "README.md"
91
+ ],
71
92
  "keywords": [],
72
- "repository": {
73
- "type": "git",
74
- "url": "git+https://github.com/cloudflare/agents.git",
75
- "directory": "packages/agents"
76
- },
77
- "bugs": {
78
- "url": "https://github.com/cloudflare/agents/issues"
79
- },
80
- "author": "Cloudflare Inc.",
81
93
  "license": "MIT",
82
- "description": "A home for your AI agents",
83
- "dependencies": {
84
- "@modelcontextprotocol/sdk": "^1.10.2",
85
- "ai": "^4.3.9",
86
- "cron-schedule": "^5.0.4",
87
- "nanoid": "^5.1.5",
88
- "partyserver": "^0.0.67",
89
- "partysocket": "1.1.3",
90
- "zod": "^3.24.3"
91
- },
94
+ "main": "src/index.ts",
95
+ "name": "agents",
92
96
  "peerDependencies": {
93
97
  "react": "*"
94
98
  },
95
- "devDependencies": {
96
- "react": "*"
97
- }
99
+ "repository": {
100
+ "directory": "packages/agents",
101
+ "type": "git",
102
+ "url": "git+https://github.com/cloudflare/agents.git"
103
+ },
104
+ "scripts": {
105
+ "build": "tsx ./scripts/build.ts",
106
+ "check:test": "npm run check:test:workers && npm run check:test:react",
107
+ "check:test:react": "vitest -r src/react-tests --watch false",
108
+ "check:test:workers": "vitest -r src/tests --watch false",
109
+ "evals": "(cd evals; evalite)",
110
+ "test": "vitest -r src/tests",
111
+ "test:react": "vitest -r src/react-tests",
112
+ "test:e2e": "vitest run src/e2e/e2e.test.ts --sequence.concurrent"
113
+ },
114
+ "type": "module",
115
+ "types": "dist/index.d.ts",
116
+ "version": "0.0.0-fac1fe8"
98
117
  }