@chronary/toolkit 1.6.2 → 1.7.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.
package/dist/ai-sdk.d.cts CHANGED
@@ -1,46 +1,51 @@
1
- import * as zod from 'zod';
2
- import * as zod_v4_core from 'zod/v4/core';
3
- import { MapToolkit, ToolDefinition, ChronaryToolkitConfig } from './index.cjs';
1
+ import { ToolDefinition, MapToolkit, ChronaryToolkitConfig } from './index.cjs';
4
2
  import '@chronary/sdk';
3
+ import 'zod';
5
4
 
6
5
  /**
7
- * Vercel AI SDK 6.x adapter.
6
+ * One Chronary tool in the Vercel AI SDK tool shape.
8
7
  *
9
- * Returns tools as `Record<string, Tool>` compatible with `generateText({ tools })`.
10
- * Zod schemas are passed directly via `parameters` (AI SDK accepts Zod natively).
8
+ * The Zod input schema is set under both field names the AI SDK has used:
9
+ * `inputSchema` (AI SDK 5 and 6) and `parameters` (AI SDK 4). Each version
10
+ * reads its own field and ignores the other, so the same object works with
11
+ * `ai` 4, 5 and 6 without importing `ai` at runtime.
12
+ */
13
+ interface AISDKTool {
14
+ description: string;
15
+ /** Tool input schema read by AI SDK 5 and 6. */
16
+ inputSchema: ToolDefinition['schema'];
17
+ /** Tool input schema read by AI SDK 4 (the same Zod object as `inputSchema`). */
18
+ parameters: ToolDefinition['schema'];
19
+ execute: (params: Record<string, unknown>) => Promise<unknown>;
20
+ }
21
+ /**
22
+ * Vercel AI SDK adapter (AI SDK 4, 5 and 6).
23
+ *
24
+ * Returns tools as a `Record<string, Tool>` that you pass straight to
25
+ * `generateText({ tools })` or `streamText({ tools })`. The Zod schemas are
26
+ * passed as-is (the AI SDK accepts Zod natively) under `inputSchema` and
27
+ * `parameters`, see {@link AISDKTool}. A failed tool call throws an `Error`
28
+ * whose message is the structured error as JSON.
11
29
  *
12
30
  * @example
13
31
  * ```ts
14
- * import { ChronaryToolkit } from '@chronary/toolkit/ai-sdk';
15
- * import { generateText } from 'ai';
32
+ * import { chronaryTools } from '@chronary/toolkit/ai-sdk';
33
+ * import { generateText, stepCountIs } from 'ai';
16
34
  *
17
- * const toolkit = new ChronaryToolkit({ apiKey: process.env.CHRONARY_API_KEY });
18
35
  * const result = await generateText({
19
36
  * model: openai('gpt-4o'),
20
- * tools: toolkit.getTools(),
37
+ * tools: chronaryTools({ apiKey: process.env.CHRONARY_API_KEY! }),
38
+ * stopWhen: stepCountIs(5),
21
39
  * prompt: 'Schedule a meeting tomorrow at 2pm',
22
40
  * });
23
41
  * ```
24
42
  */
25
- declare class ChronaryToolkit extends MapToolkit<{
26
- description: string;
27
- parameters: ToolDefinition['schema'];
28
- execute: (params: Record<string, unknown>) => Promise<unknown>;
29
- }> {
43
+ declare class ChronaryToolkit extends MapToolkit<AISDKTool> {
30
44
  constructor(config: ChronaryToolkitConfig);
31
- protected buildTool(def: ToolDefinition): {
32
- description: string;
33
- parameters: zod.ZodObject<Readonly<{
34
- [k: string]: zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>;
35
- }>, zod_v4_core.$strip>;
36
- execute: (params: Record<string, unknown>) => Promise<unknown>;
37
- };
45
+ protected buildTool(def: ToolDefinition): AISDKTool;
38
46
  }
39
47
  /** Convenience function that returns the tools map directly */
40
- declare function chronaryTools(config: ChronaryToolkitConfig): Record<string, {
41
- description: string;
42
- parameters: ToolDefinition["schema"];
43
- execute: (params: Record<string, unknown>) => Promise<unknown>;
44
- }>;
48
+ declare function chronaryTools(config: ChronaryToolkitConfig): Record<string, AISDKTool>;
45
49
 
46
50
  export { ChronaryToolkit, chronaryTools };
51
+ export type { AISDKTool };
package/dist/ai-sdk.d.ts CHANGED
@@ -1,46 +1,51 @@
1
- import * as zod from 'zod';
2
- import * as zod_v4_core from 'zod/v4/core';
3
- import { MapToolkit, ToolDefinition, ChronaryToolkitConfig } from './index.js';
1
+ import { ToolDefinition, MapToolkit, ChronaryToolkitConfig } from './index.js';
4
2
  import '@chronary/sdk';
3
+ import 'zod';
5
4
 
6
5
  /**
7
- * Vercel AI SDK 6.x adapter.
6
+ * One Chronary tool in the Vercel AI SDK tool shape.
8
7
  *
9
- * Returns tools as `Record<string, Tool>` compatible with `generateText({ tools })`.
10
- * Zod schemas are passed directly via `parameters` (AI SDK accepts Zod natively).
8
+ * The Zod input schema is set under both field names the AI SDK has used:
9
+ * `inputSchema` (AI SDK 5 and 6) and `parameters` (AI SDK 4). Each version
10
+ * reads its own field and ignores the other, so the same object works with
11
+ * `ai` 4, 5 and 6 without importing `ai` at runtime.
12
+ */
13
+ interface AISDKTool {
14
+ description: string;
15
+ /** Tool input schema read by AI SDK 5 and 6. */
16
+ inputSchema: ToolDefinition['schema'];
17
+ /** Tool input schema read by AI SDK 4 (the same Zod object as `inputSchema`). */
18
+ parameters: ToolDefinition['schema'];
19
+ execute: (params: Record<string, unknown>) => Promise<unknown>;
20
+ }
21
+ /**
22
+ * Vercel AI SDK adapter (AI SDK 4, 5 and 6).
23
+ *
24
+ * Returns tools as a `Record<string, Tool>` that you pass straight to
25
+ * `generateText({ tools })` or `streamText({ tools })`. The Zod schemas are
26
+ * passed as-is (the AI SDK accepts Zod natively) under `inputSchema` and
27
+ * `parameters`, see {@link AISDKTool}. A failed tool call throws an `Error`
28
+ * whose message is the structured error as JSON.
11
29
  *
12
30
  * @example
13
31
  * ```ts
14
- * import { ChronaryToolkit } from '@chronary/toolkit/ai-sdk';
15
- * import { generateText } from 'ai';
32
+ * import { chronaryTools } from '@chronary/toolkit/ai-sdk';
33
+ * import { generateText, stepCountIs } from 'ai';
16
34
  *
17
- * const toolkit = new ChronaryToolkit({ apiKey: process.env.CHRONARY_API_KEY });
18
35
  * const result = await generateText({
19
36
  * model: openai('gpt-4o'),
20
- * tools: toolkit.getTools(),
37
+ * tools: chronaryTools({ apiKey: process.env.CHRONARY_API_KEY! }),
38
+ * stopWhen: stepCountIs(5),
21
39
  * prompt: 'Schedule a meeting tomorrow at 2pm',
22
40
  * });
23
41
  * ```
24
42
  */
25
- declare class ChronaryToolkit extends MapToolkit<{
26
- description: string;
27
- parameters: ToolDefinition['schema'];
28
- execute: (params: Record<string, unknown>) => Promise<unknown>;
29
- }> {
43
+ declare class ChronaryToolkit extends MapToolkit<AISDKTool> {
30
44
  constructor(config: ChronaryToolkitConfig);
31
- protected buildTool(def: ToolDefinition): {
32
- description: string;
33
- parameters: zod.ZodObject<Readonly<{
34
- [k: string]: zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>;
35
- }>, zod_v4_core.$strip>;
36
- execute: (params: Record<string, unknown>) => Promise<unknown>;
37
- };
45
+ protected buildTool(def: ToolDefinition): AISDKTool;
38
46
  }
39
47
  /** Convenience function that returns the tools map directly */
40
- declare function chronaryTools(config: ChronaryToolkitConfig): Record<string, {
41
- description: string;
42
- parameters: ToolDefinition["schema"];
43
- execute: (params: Record<string, unknown>) => Promise<unknown>;
44
- }>;
48
+ declare function chronaryTools(config: ChronaryToolkitConfig): Record<string, AISDKTool>;
45
49
 
46
50
  export { ChronaryToolkit, chronaryTools };
51
+ export type { AISDKTool };
package/dist/ai-sdk.js CHANGED
@@ -31,7 +31,7 @@ var ListCalendarsSchema = z.object({
31
31
  agent_id: z.string().optional().describe("Filter to calendars owned by this agent. Organization keys only \u2014 Agent keys are always limited to their own agent and ignore this."),
32
32
  include: z.enum(["all"]).optional().describe('Pass "all" to include calendars across all agents (Organization keys only)'),
33
33
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
34
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
34
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
35
35
  });
36
36
  var GetCalendarSchema = z.object({
37
37
  calendar_id: z.string().describe("Calendar ID to fetch")
@@ -55,7 +55,7 @@ var DeleteCalendarSchema = z.object({
55
55
  });
56
56
  var ListBookingPagesSchema = z.object({
57
57
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
58
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
58
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
59
59
  });
60
60
  var GetBookingPageSchema = z.object({
61
61
  booking_page_id: z.string().describe("Booking page ID to fetch (bkp_...)")
@@ -78,25 +78,25 @@ var DeleteBookingPageSchema = z.object({
78
78
  var ListEventsSchema = z.object({
79
79
  calendar_id: z.string().optional().describe("Calendar ID to list events from. Provide this or agent_id."),
80
80
  agent_id: z.string().optional().describe("Agent ID to list events for across all of the agent's calendars. Provide this or calendar_id."),
81
- start_after: z.string().datetime().optional().describe("Only events starting after this ISO 8601 time"),
82
- start_before: z.string().datetime().optional().describe("Only events starting before this ISO 8601 time"),
81
+ start_after: z.string().datetime({ offset: true }).optional().describe("Only events starting after this ISO 8601 time"),
82
+ start_before: z.string().datetime({ offset: true }).optional().describe("Only events starting before this ISO 8601 time"),
83
83
  status: z.enum(["confirmed", "tentative", "cancelled", "hold"]).optional().describe("Filter by event status"),
84
84
  source: z.enum(["internal", "external_ical"]).optional().describe('Filter by source: "internal" (created via the API) or "external_ical" (synced from an iCal subscription)'),
85
85
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
86
- offset: z.number().int().min(0).default(0).describe("Pagination offset"),
86
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000"),
87
87
  expand: z.boolean().default(false).describe("Expand recurring series into individual occurrence instances within the window. Requires both start_after and start_before (max 366 days apart). Instances carry recurringEventId + originalStartTime.")
88
88
  });
89
89
  var ListOrgEventsSchema = z.object({
90
90
  calendar_ids: z.array(z.string()).max(50).optional().describe("Only these calendar IDs (at most 50)"),
91
91
  agent_id: z.string().optional().describe("Only this agent's calendars"),
92
- start_after: z.string().datetime().optional().describe("Only events starting at or after this ISO 8601 time"),
93
- start_before: z.string().datetime().optional().describe("Only events starting at or before this ISO 8601 time"),
92
+ start_after: z.string().datetime({ offset: true }).optional().describe("Only events starting at or after this ISO 8601 time"),
93
+ start_before: z.string().datetime({ offset: true }).optional().describe("Only events starting at or before this ISO 8601 time"),
94
94
  status: z.enum(["confirmed", "tentative", "cancelled", "hold"]).optional().describe("Filter by event status"),
95
95
  source: z.enum(["internal", "external_ical"]).optional().describe('Filter by source: "internal" (created via the API) or "external_ical" (synced from an iCal subscription)'),
96
96
  q: z.string().optional().describe("Case-insensitive title search. Requires start_after and start_before at most 31 days apart"),
97
97
  expand: z.boolean().default(false).describe("Expand recurring series into individual occurrences within the window. Requires both start_after and start_before (max 366 days apart)."),
98
98
  limit: z.number().int().min(1).max(100).default(50).describe("Max results to return (1-100)"),
99
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
99
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
100
100
  });
101
101
  var GetEventSchema = z.object({
102
102
  event_id: z.string().describe("Event ID to retrieve"),
@@ -105,33 +105,35 @@ var GetEventSchema = z.object({
105
105
  var CreateEventSchema = z.object({
106
106
  calendar_id: z.string().describe("Calendar ID to add the event to"),
107
107
  title: z.string().min(1).max(500).describe("Event title"),
108
- start_time: z.string().datetime().describe("Start time (ISO 8601)"),
109
- end_time: z.string().datetime().describe("End time (ISO 8601)"),
108
+ start_time: z.string().datetime({ offset: true }).describe("Start time (ISO 8601)"),
109
+ end_time: z.string().datetime({ offset: true }).describe("End time (ISO 8601)"),
110
110
  description: z.string().max(1e4).optional().describe("Optional event description"),
111
111
  all_day: z.boolean().default(false).describe("Whether this is an all-day event"),
112
112
  status: z.enum(["confirmed", "tentative", "hold"]).optional().describe('Event status. "hold" creates a tentative reservation that auto-expires at hold_expires_at. Defaults to "confirmed".'),
113
113
  reminders: z.array(z.number().int().min(1).max(40320)).max(5).nullable().optional().describe("Reminder offsets in minutes before start_time (e.g. [10, 1440]). Each fires an event.reminder webhook and shows as an alarm in the iCal feed. Omit or null to inherit the calendar default (then the system default of 10 min); [] for no reminders."),
114
- hold_expires_at: z.string().datetime().optional().describe('Required when status="hold". ISO 8601 timestamp 30s-15min in the future. Auto-releases the hold when reached.'),
114
+ hold_expires_at: z.string().datetime({ offset: true }).optional().describe('Required when status="hold". ISO 8601 timestamp 30s-15min in the future. Auto-releases the hold when reached.'),
115
115
  hold_priority: z.number().int().min(0).max(100).optional().describe('Only valid with status="hold". Higher-priority overlapping holds pre-empt lower-priority ones. Defaults to 0.'),
116
- recurrence_rule: z.string().max(256).optional().describe('Make this a recurring series (RFC 5545 RRULE subset, no "RRULE:" prefix), e.g. "FREQ=WEEKLY;BYDAY=MO,WE;COUNT=12". Supports FREQ=DAILY/WEEKLY/MONTHLY/YEARLY, INTERVAL, COUNT (max 730) or UNTIL, BYDAY (weekly list or monthly ordinal like 2TU/-1FR), BYMONTHDAY (1-28 or -1). start_time must match the rule pattern; expansion is UTC-only. Not allowed with status="hold". Free plan: 1 recurring series, must end within 90 days.')
116
+ recurrence_rule: z.string().max(256).optional().describe('Make this a recurring series (RFC 5545 RRULE subset, no "RRULE:" prefix), e.g. "FREQ=WEEKLY;BYDAY=MO,WE;COUNT=12". Supports FREQ=DAILY/WEEKLY/MONTHLY/YEARLY, INTERVAL, COUNT (max 730) or UNTIL, BYDAY (weekly list or monthly ordinal like 2TU/-1FR), BYMONTHDAY (1-28 or -1). start_time must match the rule pattern (in timezone when set, else UTC). Not allowed with status="hold". Free plan: 1 recurring series, must end within 90 days.'),
117
+ timezone: z.string().max(64).optional().describe('IANA time zone the recurring series repeats in, e.g. "America/Los_Angeles". A weekly 16:00 then stays 16:00 local across daylight-saving changes; BYDAY and a date-only UNTIL are read in this zone. Omit for UTC.')
117
118
  });
118
119
  var UpdateEventSchema = z.object({
119
120
  event_id: z.string().describe("Event ID to update"),
120
121
  calendar_id: z.string().optional().describe("Calendar ID that owns the event. Optional \u2014 if omitted the calendar is resolved from the event."),
121
122
  title: z.string().min(1).max(500).optional().describe("New event title"),
122
123
  description: z.string().max(1e4).nullable().optional().describe("New description, or null to clear it"),
123
- start_time: z.string().datetime().optional().describe("New start time (ISO 8601)"),
124
- end_time: z.string().datetime().optional().describe("New end time (ISO 8601)"),
124
+ start_time: z.string().datetime({ offset: true }).optional().describe("New start time (ISO 8601)"),
125
+ end_time: z.string().datetime({ offset: true }).optional().describe("New end time (ISO 8601)"),
125
126
  all_day: z.boolean().optional().describe("Whether this is an all-day event"),
126
127
  status: z.enum(["confirmed", "tentative", "cancelled"]).optional().describe("New event status"),
127
128
  metadata: z.record(z.string(), z.unknown()).optional().describe("Replacement metadata object"),
128
129
  reminders: z.array(z.number().int().min(1).max(40320)).max(5).nullable().optional().describe("Reminder offsets in minutes before start_time. Omit to leave unchanged, null to inherit the calendar default, [] for no reminders."),
129
- recurrence_rule: z.string().max(256).nullable().optional().describe("Set/change the recurring series rule (RFC 5545 RRULE subset, full-series semantics), or null to make the event a one-off. Changing the rule or start_time resets cancelled occurrences.")
130
+ recurrence_rule: z.string().max(256).nullable().optional().describe("Set/change the recurring series rule (RFC 5545 RRULE subset, full-series semantics), or null to make the event a one-off. Changing the rule, start_time or timezone keeps each cancelled occurrence on its local date; the response lists any that no longer match in droppedExdates."),
131
+ timezone: z.string().max(64).nullable().optional().describe('Set or change the IANA time zone the series repeats in (e.g. "America/Los_Angeles"), or null for UTC. Validated together with recurrence_rule and start_time, so a UTC-stored series can move to local time in one call (e.g. timezone + BYDAY=TU).')
130
132
  });
131
133
  var CancelEventSchema = z.object({
132
134
  event_id: z.string().describe("Event ID to cancel"),
133
135
  calendar_id: z.string().optional().describe("Calendar ID that owns the event. Optional \u2014 if omitted the calendar is resolved from the event. Matches the asymmetry with confirm_event / release_event which never required this arg."),
134
- occurrence_start: z.string().datetime().optional().describe("For recurring events only: ISO 8601 start of the single occurrence to cancel. The rest of the series is unaffected.")
136
+ occurrence_start: z.string().datetime({ offset: true }).optional().describe("For recurring events only: ISO 8601 start of the single occurrence to cancel. The rest of the series is unaffected.")
135
137
  });
136
138
  var ConfirmEventSchema = z.object({
137
139
  event_id: z.string().describe("Event ID of the hold to confirm")
@@ -148,7 +150,7 @@ var ListAgentsSchema = z.object({
148
150
  type: z.enum(["ai", "human", "resource"]).optional().describe("Filter by agent type"),
149
151
  status: z.enum(["active", "paused", "decommissioned"]).optional().describe("Filter by status"),
150
152
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
151
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
153
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
152
154
  });
153
155
  var GetAgentSchema = z.object({
154
156
  agent_id: z.string().describe("Agent ID to fetch")
@@ -165,10 +167,10 @@ var DeleteAgentSchema = z.object({
165
167
  });
166
168
  var GetAvailabilitySchema = z.object({
167
169
  agent_id: z.string().describe("Agent ID to check availability for"),
168
- start: z.string().datetime().optional().describe("Range start (ISO 8601). Alias: start_time."),
169
- end: z.string().datetime().optional().describe("Range end (ISO 8601). Alias: end_time."),
170
- start_time: z.string().datetime().optional().describe("Alias for `start` (matches REST events naming)."),
171
- end_time: z.string().datetime().optional().describe("Alias for `end` (matches REST events naming)."),
170
+ start: z.string().datetime({ offset: true }).optional().describe("Range start (ISO 8601). Alias: start_time."),
171
+ end: z.string().datetime({ offset: true }).optional().describe("Range end (ISO 8601). Alias: end_time."),
172
+ start_time: z.string().datetime({ offset: true }).optional().describe("Alias for `start` (matches REST events naming)."),
173
+ end_time: z.string().datetime({ offset: true }).optional().describe("Alias for `end` (matches REST events naming)."),
172
174
  duration: z.enum(["15m", "30m", "45m", "1h", "2h"]).optional().describe("Requested slot length (15m/30m/45m/1h/2h). Preferred over the deprecated slot_duration. Defaults to 30m."),
173
175
  slot_duration: z.enum(["15m", "30m", "45m", "1h", "2h"]).optional().describe("Deprecated alias for `duration` \u2014 minimum slot length. Prefer `duration`."),
174
176
  include_busy: z.boolean().default(false).describe("Include busy blocks in response")
@@ -176,10 +178,10 @@ var GetAvailabilitySchema = z.object({
176
178
  var FindMeetingTimeSchema = z.object({
177
179
  agents: z.array(z.string()).min(1).optional().describe("Array of agent IDs to find common free time for. All agents must be free during the returned slots. Alias: agent_ids."),
178
180
  agent_ids: z.array(z.string()).min(1).optional().describe("Alias for `agents` (matches REST/scheduling-proposal naming)."),
179
- start: z.string().datetime().optional().describe("Search range start (ISO 8601). Alias: start_time."),
180
- end: z.string().datetime().optional().describe("Search range end (ISO 8601). Alias: end_time."),
181
- start_time: z.string().datetime().optional().describe("Alias for `start` (matches REST events naming)."),
182
- end_time: z.string().datetime().optional().describe("Alias for `end` (matches REST events naming)."),
181
+ start: z.string().datetime({ offset: true }).optional().describe("Search range start (ISO 8601). Alias: start_time."),
182
+ end: z.string().datetime({ offset: true }).optional().describe("Search range end (ISO 8601). Alias: end_time."),
183
+ start_time: z.string().datetime({ offset: true }).optional().describe("Alias for `start` (matches REST events naming)."),
184
+ end_time: z.string().datetime({ offset: true }).optional().describe("Alias for `end` (matches REST events naming)."),
183
185
  duration: z.enum(["15m", "30m", "45m", "1h", "2h"]).optional().describe("Requested slot length (15m/30m/45m/1h/2h). Preferred over the deprecated slot_duration. Defaults to 30m."),
184
186
  slot_duration: z.enum(["15m", "30m", "45m", "1h", "2h"]).optional().describe("Deprecated alias for `duration` \u2014 minimum slot length. Prefer `duration`."),
185
187
  calendars: z.array(z.string()).optional().describe("Additional shared calendar IDs to treat as busy"),
@@ -198,8 +200,8 @@ var GetCalendarContextSchema = z.object({
198
200
  calendar_id: z.string().describe("Calendar ID")
199
201
  });
200
202
  var proposalSlotSchema = z.object({
201
- start_time: z.string().datetime().describe("Slot start time (ISO 8601)"),
202
- end_time: z.string().datetime().describe("Slot end time (ISO 8601), after start_time"),
203
+ start_time: z.string().datetime({ offset: true }).describe("Slot start time (ISO 8601)"),
204
+ end_time: z.string().datetime({ offset: true }).describe("Slot end time (ISO 8601), after start_time"),
203
205
  weight: z.number().min(0).max(10).default(1).optional().describe("Preference for this slot, 0\u201310 (higher = more preferred). Used to rank candidate slots when the proposal is resolved. Defaults to 1."),
204
206
  calendar_id: z.string().optional().describe("Calendar to create the event on if this slot is chosen. Defaults to the proposal's top-level calendar_id.")
205
207
  });
@@ -210,13 +212,13 @@ var CreateProposalSchema = z.object({
210
212
  participant_agent_ids: z.array(z.string()).min(1).max(50).describe("Agent IDs invited to respond"),
211
213
  calendar_id: z.string().describe("Calendar the resolved event will be created on"),
212
214
  slots: z.array(proposalSlotSchema).min(1).max(20).describe("Candidate time slots (up to 20)"),
213
- expires_at: z.string().datetime().optional().describe("Auto-cancel cutoff if unresolved")
215
+ expires_at: z.string().datetime({ offset: true }).optional().describe("Auto-cancel cutoff if unresolved")
214
216
  });
215
217
  var ListProposalsSchema = z.object({
216
218
  status: z.enum(["pending", "resolving", "confirmed", "expired", "cancelled"]).optional().describe("Filter by proposal status"),
217
219
  organizer_agent_id: z.string().optional().describe("Filter by organizer agent"),
218
220
  limit: z.number().int().min(1).max(200).optional().describe("Max results (default 50)"),
219
- offset: z.number().int().min(0).optional().describe("Pagination offset (default 0)")
221
+ offset: z.number().int().min(0).optional().describe("Pagination offset, at most 10000 (default 0)")
220
222
  });
221
223
  var GetProposalSchema = z.object({
222
224
  proposal_id: z.string().describe("Proposal to fetch")
@@ -290,7 +292,7 @@ var AcceptTermsSchema = z.object({
290
292
  });
291
293
  var ListWebhooksSchema = z.object({
292
294
  limit: z.number().int().min(1).max(100).default(20).describe("Max results to return"),
293
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
295
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
294
296
  });
295
297
  var GetWebhookSchema = z.object({
296
298
  webhook_id: z.string().describe("Webhook subscription to fetch")
@@ -311,12 +313,12 @@ var DeleteWebhookSchema = z.object({
311
313
  var ListWebhookDeliveriesSchema = z.object({
312
314
  webhook_id: z.string().describe("Webhook subscription whose deliveries to list"),
313
315
  limit: z.number().int().min(1).max(100).default(20).describe("Max results to return"),
314
- offset: z.number().int().min(0).default(0).describe("Pagination offset. Cannot be combined with cursor"),
316
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000. Cannot be combined with cursor"),
315
317
  status: z.enum(WEBHOOK_DELIVERY_STATUSES).optional().describe("Filter to a single delivery status"),
316
318
  include_payload: z.boolean().optional().describe("Include the full event payload sent on each delivery"),
317
319
  event_type: z.string().max(100).regex(/^[a-z_]+\.(?:[a-z_]+)?$/).optional().describe("An exact event type (event.created), or a prefix ending in a dot (event.) for a whole group"),
318
- created_after: z.string().datetime().optional().describe("Only deliveries created at or after this time (ISO 8601, UTC)"),
319
- created_before: z.string().datetime().optional().describe("Only deliveries created before this time (ISO 8601, UTC)"),
320
+ created_after: z.string().datetime({ offset: true }).optional().describe("Only deliveries created at or after this time (ISO 8601)"),
321
+ created_before: z.string().datetime({ offset: true }).optional().describe("Only deliveries created before this time (ISO 8601)"),
320
322
  delivery_id: z.string().max(100).regex(/^whd_[A-Za-z0-9_-]+$/).optional().describe("Only the delivery with this id"),
321
323
  is_test: z.boolean().optional().describe("true for test events only, false to leave them out"),
322
324
  cursor: z.string().min(1).max(1024).optional().describe("The next_cursor from the previous page")
@@ -337,7 +339,7 @@ var ListICalSubscriptionsSchema = z.object({
337
339
  agent_id: z.string().describe("Agent ID whose iCal subscriptions to list"),
338
340
  status: z.enum(["active", "error", "paused"]).optional().describe("Filter by subscription status"),
339
341
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
340
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
342
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
341
343
  });
342
344
  var GetICalSubscriptionSchema = z.object({
343
345
  subscription_id: z.string().describe("iCal subscription ID to fetch")
@@ -1350,6 +1352,7 @@ var ChronaryToolkit = class extends MapToolkit {
1350
1352
  const client = this.client;
1351
1353
  return {
1352
1354
  description: def.description,
1355
+ inputSchema: def.schema,
1353
1356
  parameters: def.schema,
1354
1357
  execute: async (params) => {
1355
1358
  const result = await def.execute(client, params);