agents 0.20.1 → 0.22.0

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 (169) hide show
  1. package/README.md +51 -12
  2. package/dist/{agent-tool-types-BC-WFlsz.d.ts → agent-routing-CnkaHb-v.d.ts} +3305 -3138
  3. package/dist/agent-routing.d.ts +14 -0
  4. package/dist/agent-routing.js +187 -0
  5. package/dist/agent-routing.js.map +1 -0
  6. package/dist/agent-tool-types.d.ts +26 -26
  7. package/dist/{agent-tools-DeHe9Xov.d.ts → agent-tools-C0XJqWzB.d.ts} +7 -7
  8. package/dist/agent-tools.d.ts +44 -28
  9. package/dist/agent-tools.js +16 -7
  10. package/dist/agent-tools.js.map +1 -1
  11. package/dist/browser/ai.d.ts +5 -3
  12. package/dist/browser/ai.js +88 -8
  13. package/dist/browser/ai.js.map +1 -1
  14. package/dist/browser/index.d.ts +1 -1
  15. package/dist/browser/index.js +1 -1
  16. package/dist/browser/tanstack-ai.js +13 -1
  17. package/dist/browser/tanstack-ai.js.map +1 -1
  18. package/dist/capability-BjSKYpzg.js +42 -0
  19. package/dist/capability-BjSKYpzg.js.map +1 -0
  20. package/dist/capability-runner-CvHGZqUu.d.ts +150 -0
  21. package/dist/chat/index.d.ts +51 -15
  22. package/dist/chat/index.js +59 -4
  23. package/dist/chat/index.js.map +1 -1
  24. package/dist/chat/react.d.ts +19 -180
  25. package/dist/chat/react.js +93 -600
  26. package/dist/chat/react.js.map +1 -1
  27. package/dist/chat/transport.d.ts +10 -0
  28. package/dist/chat/transport.js +2 -0
  29. package/dist/chat-sdk/index.d.ts +4 -4
  30. package/dist/chat-sdk/index.js +1 -1
  31. package/dist/{client-zqKcsyFa.js → client-jagG8a9_.js} +129 -37
  32. package/dist/client-jagG8a9_.js.map +1 -0
  33. package/dist/client.d.ts +1 -1
  34. package/dist/client.js +1 -1
  35. package/dist/{cloudflare-BduZwmYK.js → cloudflare-Dzvc7V2N.js} +10 -3
  36. package/dist/{cloudflare-BduZwmYK.js.map → cloudflare-Dzvc7V2N.js.map} +1 -1
  37. package/dist/{connector-v2M1zlZp.d.ts → connector-CkQD4MK3.d.ts} +20 -3
  38. package/dist/{connector-KEJnl6e5.js → connector-CptFKzRh.js} +158 -40
  39. package/dist/connector-CptFKzRh.js.map +1 -0
  40. package/dist/current-agent-CuMErtly.d.ts +283 -0
  41. package/dist/current-agent-DhoDkSnH.js +51 -0
  42. package/dist/current-agent-DhoDkSnH.js.map +1 -0
  43. package/dist/diagnostics-CaBjfz4J.js +41 -0
  44. package/dist/diagnostics-CaBjfz4J.js.map +1 -0
  45. package/dist/{do-oauth-client-provider-VTZj2VtM.d.ts → do-oauth-client-provider-Tmf1vgKz.d.ts} +2 -2
  46. package/dist/durable-object-lifecycle-D6nNQJJd.js +862 -0
  47. package/dist/durable-object-lifecycle-D6nNQJJd.js.map +1 -0
  48. package/dist/{email-CL27preh.d.ts → email-7TatiTnl.d.ts} +38 -9
  49. package/dist/email-send.d.ts +15 -0
  50. package/dist/email-send.js +32 -0
  51. package/dist/email-send.js.map +1 -0
  52. package/dist/email.d.ts +14 -10
  53. package/dist/email.js.map +1 -1
  54. package/dist/experimental/memory/session/index.d.ts +3 -2
  55. package/dist/experimental/memory/session/index.js +15 -10
  56. package/dist/experimental/memory/session/index.js.map +1 -1
  57. package/dist/{handler-stateless-C_bo-Ytq.d.ts → handler-stateless-DxYpJ_XF.d.ts} +3 -3
  58. package/dist/{handler-stateless-CIkKPETH.js → handler-stateless-VvrWSAVA.js} +5 -5
  59. package/dist/handler-stateless-VvrWSAVA.js.map +1 -0
  60. package/dist/{index-BRnybD6X.d.ts → index-DcSAZKsB.d.ts} +19 -31
  61. package/dist/index.d.ts +102 -91
  62. package/dist/index.js +12 -7235
  63. package/dist/internal_context-BlxFEWfn.d.ts +19 -0
  64. package/dist/internal_context.d.ts +10 -4
  65. package/dist/internal_context.js +1 -10
  66. package/dist/{client-invoker-BNSZxAkv.d.ts → invoker-CG0_p_Wq.d.ts} +2 -2
  67. package/dist/{client-invoker-VNZ7X0nn.js → invoker-CHMnoxIA.js} +2 -2
  68. package/dist/invoker-CHMnoxIA.js.map +1 -0
  69. package/dist/lifecycle/index.d.ts +48 -0
  70. package/dist/lifecycle/index.js +4 -0
  71. package/dist/mcp/{do-oauth-client-provider.d.ts → client/do-oauth-client-provider.d.ts} +1 -1
  72. package/dist/mcp/{do-oauth-client-provider.js → client/do-oauth-client-provider.js} +1 -1
  73. package/dist/mcp/client/do-oauth-client-provider.js.map +1 -0
  74. package/dist/mcp/client/index.d.ts +42 -0
  75. package/dist/mcp/{client.js → client/index.js} +1 -1
  76. package/dist/mcp/{x402.d.ts → client/x402.d.ts} +2 -2
  77. package/dist/mcp/{x402.js → client/x402.js} +2 -2
  78. package/dist/mcp/client/x402.js.map +1 -0
  79. package/dist/mcp/index.d.ts +36 -36
  80. package/dist/mcp/index.js +14 -16
  81. package/dist/mcp/index.js.map +1 -1
  82. package/dist/mcp/{server.d.ts → server/index.d.ts} +1 -1
  83. package/dist/mcp/{server.js → server/index.js} +1 -1
  84. package/dist/observability/ai/index.d.ts +1 -130
  85. package/dist/observability/ai/index.js +88 -433
  86. package/dist/observability/ai/index.js.map +1 -1
  87. package/dist/observability/index.d.ts +4 -4
  88. package/dist/observability/index.js +3 -50
  89. package/dist/observability/index.js.map +1 -1
  90. package/dist/{wire-types-CU9rLoeS.js → protocol-B0nh6KNf.js} +20 -66
  91. package/dist/protocol-B0nh6KNf.js.map +1 -0
  92. package/dist/react.d.ts +4 -4
  93. package/dist/react.js +6 -9
  94. package/dist/react.js.map +1 -1
  95. package/dist/schedule.d.ts +25 -94
  96. package/dist/schedule.js +1 -98
  97. package/dist/schedule.js.map +1 -1
  98. package/dist/scheduler-CR9RHGos.js +857 -0
  99. package/dist/scheduler-CR9RHGos.js.map +1 -0
  100. package/dist/scheduler-DQoTGoAW.d.ts +224 -0
  101. package/dist/schedules/index.d.ts +22 -0
  102. package/dist/schedules/index.js +2 -0
  103. package/dist/schedules/parser.d.ts +79 -0
  104. package/dist/schedules/parser.js +103 -0
  105. package/dist/schedules/parser.js.map +1 -0
  106. package/dist/serializable.d.ts +1 -1
  107. package/dist/sql-error-CPY-GXyI.d.ts +12 -0
  108. package/dist/sql-error.d.ts +2 -0
  109. package/dist/sql-error.js +16 -0
  110. package/dist/sql-error.js.map +1 -0
  111. package/dist/src-5W6JNKVb.js +6613 -0
  112. package/dist/src-5W6JNKVb.js.map +1 -0
  113. package/dist/sub-routing.d.ts +18 -6
  114. package/dist/sub-routing.js +92 -2
  115. package/dist/sub-routing.js.map +1 -1
  116. package/dist/wire-types-CnMt6_HR.js +47 -0
  117. package/dist/wire-types-CnMt6_HR.js.map +1 -0
  118. package/dist/workflow-types.d.ts +25 -25
  119. package/dist/workflow-types.js.map +1 -1
  120. package/dist/workflows.d.ts +22 -22
  121. package/dist/workflows.js +2 -1
  122. package/dist/workflows.js.map +1 -1
  123. package/dist/ws-chat-transport-UNRIS2xl.d.ts +184 -0
  124. package/dist/ws-chat-transport-rWwta645.js +698 -0
  125. package/dist/ws-chat-transport-rWwta645.js.map +1 -0
  126. package/docs/adding-to-existing-project.md +4 -2
  127. package/docs/agent-class.md +29 -87
  128. package/docs/agent-tools.md +29 -0
  129. package/docs/browse-the-web.md +16 -1
  130. package/docs/chat-agents.md +16 -13
  131. package/docs/client-sdk.md +12 -8
  132. package/docs/configuration.md +7 -1
  133. package/docs/cross-domain-authentication.md +7 -35
  134. package/docs/durable-execution.md +1 -1
  135. package/docs/email.md +2 -13
  136. package/docs/http-websockets.md +1 -11
  137. package/docs/human-in-the-loop.md +16 -13
  138. package/docs/index.md +1 -0
  139. package/docs/lifecycle.md +323 -0
  140. package/docs/long-running-agents.md +13 -15
  141. package/docs/mcp-client.md +55 -0
  142. package/docs/mcp-servers.md +6 -0
  143. package/docs/mcp-transports.md +18 -12
  144. package/docs/migration-to-ai-sdk-v5.md +2 -2
  145. package/docs/migration-to-ai-sdk-v6.md +5 -1
  146. package/docs/observability.md +33 -77
  147. package/docs/resumable-streaming.md +1 -1
  148. package/docs/routing.md +27 -0
  149. package/docs/scheduling.md +175 -15
  150. package/docs/server-driven-messages.md +1 -1
  151. package/docs/sub-agents.md +47 -2
  152. package/docs/webhooks.md +109 -136
  153. package/docs/workflows.md +9 -1
  154. package/package.json +41 -23
  155. package/dist/cli/index.d.ts +0 -1
  156. package/dist/cli/index.js +0 -26
  157. package/dist/cli/index.js.map +0 -1
  158. package/dist/client-invoker-VNZ7X0nn.js.map +0 -1
  159. package/dist/client-zqKcsyFa.js.map +0 -1
  160. package/dist/connector-KEJnl6e5.js.map +0 -1
  161. package/dist/handler-stateless-CIkKPETH.js.map +0 -1
  162. package/dist/index.js.map +0 -1
  163. package/dist/internal_context-Dg4Cgjcu.d.ts +0 -37
  164. package/dist/internal_context.js.map +0 -1
  165. package/dist/mcp/client.d.ts +0 -42
  166. package/dist/mcp/do-oauth-client-provider.js.map +0 -1
  167. package/dist/mcp/x402.js.map +0 -1
  168. package/dist/wire-types-CU9rLoeS.js.map +0 -1
  169. package/dist/workflow-types-Baz_PO5v.d.ts +0 -280
@@ -1,130 +1,61 @@
1
- import { z } from "zod";
1
+ import {
2
+ ParsedSchedule,
3
+ getSchedulePrompt,
4
+ scheduleSchema
5
+ } from "./schedules/parser.js";
2
6
 
3
7
  //#region src/schedule.d.ts
4
- /**
5
- * Get the schedule prompt for a given event
6
- * @param event - The event to get the schedule prompt for
7
- * @returns The schedule prompt
8
- */
9
- declare function getSchedulePrompt(event: { date: Date }): string;
10
8
  /**
11
9
  * @deprecated this has been renamed to getSchedulePrompt, and unstable_getSchedulePrompt will be removed in the next major version
12
10
  * @param event - The event to get the schedule prompt for
13
11
  * @returns The schedule prompt
14
12
  */
15
13
  declare function unstable_getSchedulePrompt(event: { date: Date }): string;
16
- /**
17
- * The schema for parsing natural language scheduling requests.
18
- *
19
- * @example
20
- * ```typescript
21
- * import { generateObject } from "ai";
22
- * import { scheduleSchema, getSchedulePrompt } from "agents/schedule";
23
- *
24
- * const result = await generateObject({
25
- * model,
26
- * prompt: `${getSchedulePrompt({ date: new Date() })} Input: "${userInput}"`,
27
- * schema: scheduleSchema,
28
- * // Required for OpenAI to avoid strict JSON schema validation errors
29
- * providerOptions: {
30
- * openai: { strictJsonSchema: false }
31
- * }
32
- * });
33
- * ```
34
- *
35
- * @remarks
36
- * When using this schema with OpenAI models via the AI SDK, you must pass
37
- * `providerOptions: { openai: { strictJsonSchema: false } }` to `generateObject`.
38
- * This is because the schema uses a discriminated union which is not compatible
39
- * with OpenAI's strict structured outputs mode.
40
- */
41
- declare const scheduleSchema: z.ZodObject<
42
- {
43
- description: z.ZodString;
44
- when: z.ZodDiscriminatedUnion<
45
- [
46
- z.ZodObject<
47
- {
48
- type: z.ZodLiteral<"scheduled">;
49
- date: z.ZodString;
50
- },
51
- z.core.$strip
52
- >,
53
- z.ZodObject<
54
- {
55
- type: z.ZodLiteral<"delayed">;
56
- delayInSeconds: z.ZodNumber;
57
- },
58
- z.core.$strip
59
- >,
60
- z.ZodObject<
61
- {
62
- type: z.ZodLiteral<"cron">;
63
- cron: z.ZodString;
64
- },
65
- z.core.$strip
66
- >,
67
- z.ZodObject<
68
- {
69
- type: z.ZodLiteral<"no-schedule">;
70
- },
71
- z.core.$strip
72
- >
73
- ],
74
- "type"
75
- >;
76
- },
77
- z.core.$strip
78
- >;
79
- /**
80
- * The type for the schedule prompt
81
- */
82
- type Schedule = z.infer<typeof scheduleSchema>;
83
14
  /**
84
15
  * @deprecated this has been renamed to scheduleSchema, and unstable_scheduleSchema will be removed in the next major version
85
16
  * @returns The schedule schema
86
17
  */
87
- declare const unstable_scheduleSchema: z.ZodObject<
18
+ declare const unstable_scheduleSchema: import("zod").ZodObject<
88
19
  {
89
- description: z.ZodString;
90
- when: z.ZodDiscriminatedUnion<
20
+ description: import("zod").ZodString;
21
+ when: import("zod").ZodDiscriminatedUnion<
91
22
  [
92
- z.ZodObject<
23
+ import("zod").ZodObject<
93
24
  {
94
- type: z.ZodLiteral<"scheduled">;
95
- date: z.ZodString;
25
+ type: import("zod").ZodLiteral<"scheduled">;
26
+ date: import("zod").ZodString;
96
27
  },
97
- z.core.$strip
28
+ import("zod/v4/core").$strip
98
29
  >,
99
- z.ZodObject<
30
+ import("zod").ZodObject<
100
31
  {
101
- type: z.ZodLiteral<"delayed">;
102
- delayInSeconds: z.ZodNumber;
32
+ type: import("zod").ZodLiteral<"delayed">;
33
+ delayInSeconds: import("zod").ZodNumber;
103
34
  },
104
- z.core.$strip
35
+ import("zod/v4/core").$strip
105
36
  >,
106
- z.ZodObject<
37
+ import("zod").ZodObject<
107
38
  {
108
- type: z.ZodLiteral<"cron">;
109
- cron: z.ZodString;
39
+ type: import("zod").ZodLiteral<"cron">;
40
+ cron: import("zod").ZodString;
110
41
  },
111
- z.core.$strip
42
+ import("zod/v4/core").$strip
112
43
  >,
113
- z.ZodObject<
44
+ import("zod").ZodObject<
114
45
  {
115
- type: z.ZodLiteral<"no-schedule">;
46
+ type: import("zod").ZodLiteral<"no-schedule">;
116
47
  },
117
- z.core.$strip
48
+ import("zod/v4/core").$strip
118
49
  >
119
50
  ],
120
51
  "type"
121
52
  >;
122
53
  },
123
- z.core.$strip
54
+ import("zod/v4/core").$strip
124
55
  >;
125
56
  //#endregion
126
57
  export {
127
- Schedule,
58
+ type ParsedSchedule as Schedule,
128
59
  getSchedulePrompt,
129
60
  scheduleSchema,
130
61
  unstable_getSchedulePrompt,
package/dist/schedule.js CHANGED
@@ -1,59 +1,5 @@
1
- import { z } from "zod";
1
+ import { getSchedulePrompt, scheduleSchema } from "./schedules/parser.js";
2
2
  //#region src/schedule.ts
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
- function getSchedulePrompt(event) {
9
- return `
10
- [Schedule Parser Component]
11
-
12
- Current time: ${event.date.toUTCString()}
13
-
14
- This component parses natural language scheduling requests into a structured format. It extracts:
15
- 1. A clean task description (without timing information)
16
- 2. Scheduling details in one of these formats:
17
- - scheduled: Specific date/time events
18
- - delayed: Relative time delays (in seconds)
19
- - cron: Recurring patterns
20
- - no-schedule: Tasks without timing
21
-
22
- Rules:
23
- - Task descriptions should be clean and focused on the action
24
- - Use numbers (0-6) for days in cron patterns (0=Sunday)
25
- - For recurring tasks, use standard cron syntax
26
- - For relative times, convert to seconds
27
- - For specific dates, use the current time as reference
28
-
29
- Example outputs:
30
- {
31
- "description": "meeting with team",
32
- "when": {
33
- "type": "scheduled",
34
- "date": "tomorrow at 14:00"
35
- }
36
- }
37
-
38
- {
39
- "description": "backup database",
40
- "when": {
41
- "type": "cron",
42
- "cron": "0 0 * * *"
43
- }
44
- }
45
-
46
- {
47
- "description": "send report",
48
- "when": {
49
- "type": "delayed",
50
- "delayInSeconds": 1800
51
- }
52
- }
53
-
54
- [End Schedule Parser Component]
55
- `;
56
- }
57
3
  let didWarnAboutUnstableGetSchedulePrompt = false;
58
4
  /**
59
5
  * @deprecated this has been renamed to getSchedulePrompt, and unstable_getSchedulePrompt will be removed in the next major version
@@ -68,49 +14,6 @@ function unstable_getSchedulePrompt(event) {
68
14
  return getSchedulePrompt(event);
69
15
  }
70
16
  /**
71
- * The schema for parsing natural language scheduling requests.
72
- *
73
- * @example
74
- * ```typescript
75
- * import { generateObject } from "ai";
76
- * import { scheduleSchema, getSchedulePrompt } from "agents/schedule";
77
- *
78
- * const result = await generateObject({
79
- * model,
80
- * prompt: `${getSchedulePrompt({ date: new Date() })} Input: "${userInput}"`,
81
- * schema: scheduleSchema,
82
- * // Required for OpenAI to avoid strict JSON schema validation errors
83
- * providerOptions: {
84
- * openai: { strictJsonSchema: false }
85
- * }
86
- * });
87
- * ```
88
- *
89
- * @remarks
90
- * When using this schema with OpenAI models via the AI SDK, you must pass
91
- * `providerOptions: { openai: { strictJsonSchema: false } }` to `generateObject`.
92
- * This is because the schema uses a discriminated union which is not compatible
93
- * with OpenAI's strict structured outputs mode.
94
- */
95
- const scheduleSchema = z.object({
96
- description: z.string().describe("A description of the task"),
97
- when: z.discriminatedUnion("type", [
98
- z.object({
99
- type: z.literal("scheduled"),
100
- date: z.string().describe("Execute task at the specified date and time in ISO 8601 format")
101
- }),
102
- z.object({
103
- type: z.literal("delayed"),
104
- delayInSeconds: z.number().describe("Execute task after a delay in seconds")
105
- }),
106
- z.object({
107
- type: z.literal("cron"),
108
- cron: z.string().describe("Execute task on a recurring interval specified as cron syntax")
109
- }),
110
- z.object({ type: z.literal("no-schedule") })
111
- ])
112
- });
113
- /**
114
17
  * @deprecated this has been renamed to scheduleSchema, and unstable_scheduleSchema will be removed in the next major version
115
18
  * @returns The schedule schema
116
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"schedule.js","names":[],"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 parsing natural language scheduling requests.\n *\n * @example\n * ```typescript\n * import { generateObject } from \"ai\";\n * import { scheduleSchema, getSchedulePrompt } from \"agents/schedule\";\n *\n * const result = await generateObject({\n * model,\n * prompt: `${getSchedulePrompt({ date: new Date() })} Input: \"${userInput}\"`,\n * schema: scheduleSchema,\n * // Required for OpenAI to avoid strict JSON schema validation errors\n * providerOptions: {\n * openai: { strictJsonSchema: false }\n * }\n * });\n * ```\n *\n * @remarks\n * When using this schema with OpenAI models via the AI SDK, you must pass\n * `providerOptions: { openai: { strictJsonSchema: false } }` to `generateObject`.\n * This is because the schema uses a discriminated union which is not compatible\n * with OpenAI's strict structured outputs mode.\n */\nexport const scheduleSchema = z.object({\n description: z.string().describe(\"A description of the task\"),\n when: z.discriminatedUnion(\"type\", [\n z.object({\n type: z.literal(\"scheduled\"),\n date: z\n .string()\n .describe(\n \"Execute task at the specified date and time in ISO 8601 format\"\n )\n }),\n z.object({\n type: z.literal(\"delayed\"),\n delayInSeconds: z\n .number()\n .describe(\"Execute task after a delay in seconds\")\n }),\n z.object({\n type: z.literal(\"cron\"),\n cron: z\n .string()\n .describe(\n \"Execute task on a recurring interval specified as cron syntax\"\n )\n }),\n z.object({\n type: z.literal(\"no-schedule\")\n })\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":";;;;;;;AAOA,SAAgB,kBAAkB,OAAuB;CACvD,OAAO;;;gBAGO,MAAM,KAAK,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CzC;AAEA,IAAI,wCAAwC;;;;;;AAO5C,SAAgB,2BAA2B,OAAuB;CAChE,IAAI,CAAC,uCAAuC;EAC1C,wCAAwC;EACxC,QAAQ,KACN,gJACF;CACF;CACA,OAAO,kBAAkB,KAAK;AAChC;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAa,iBAAiB,EAAE,OAAO;CACrC,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B;CAC5D,MAAM,EAAE,mBAAmB,QAAQ;EACjC,EAAE,OAAO;GACP,MAAM,EAAE,QAAQ,WAAW;GAC3B,MAAM,EACH,OAAO,CAAC,CACR,SACC,gEACF;EACJ,CAAC;EACD,EAAE,OAAO;GACP,MAAM,EAAE,QAAQ,SAAS;GACzB,gBAAgB,EACb,OAAO,CAAC,CACR,SAAS,uCAAuC;EACrD,CAAC;EACD,EAAE,OAAO;GACP,MAAM,EAAE,QAAQ,MAAM;GACtB,MAAM,EACH,OAAO,CAAC,CACR,SACC,+DACF;EACJ,CAAC;EACD,EAAE,OAAO,EACP,MAAM,EAAE,QAAQ,aAAa,EAC/B,CAAC;CACH,CAAC;AACH,CAAC;;;;;AAWD,MAAa,0BAA0B"}
1
+ {"version":3,"file":"schedule.js","names":[],"sources":["../src/schedule.ts"],"sourcesContent":["/**\n * @deprecated Import schedule parsing helpers from `agents/schedules/parser`.\n * This compatibility entry point will be removed in a future major release.\n */\nexport { getSchedulePrompt, scheduleSchema } from \"./schedules/parser\";\n/**\n * @deprecated Import `ParsedSchedule` from `agents/schedules/parser`.\n */\nexport type { ParsedSchedule as Schedule } from \"./schedules/parser\";\n\nimport { getSchedulePrompt, scheduleSchema } from \"./schedules/parser\";\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 * @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":";;AAYA,IAAI,wCAAwC;;;;;;AAO5C,SAAgB,2BAA2B,OAAuB;CAChE,IAAI,CAAC,uCAAuC;EAC1C,wCAAwC;EACxC,QAAQ,KACN,gJACF;CACF;CACA,OAAO,kBAAkB,KAAK;AAChC;;;;;AAMA,MAAa,0BAA0B"}