@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/openai.js CHANGED
@@ -34,7 +34,7 @@ var ListCalendarsSchema = z.object({
34
34
  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."),
35
35
  include: z.enum(["all"]).optional().describe('Pass "all" to include calendars across all agents (Organization keys only)'),
36
36
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
37
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
37
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
38
38
  });
39
39
  var GetCalendarSchema = z.object({
40
40
  calendar_id: z.string().describe("Calendar ID to fetch")
@@ -58,7 +58,7 @@ var DeleteCalendarSchema = z.object({
58
58
  });
59
59
  var ListBookingPagesSchema = z.object({
60
60
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
61
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
61
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
62
62
  });
63
63
  var GetBookingPageSchema = z.object({
64
64
  booking_page_id: z.string().describe("Booking page ID to fetch (bkp_...)")
@@ -81,25 +81,25 @@ var DeleteBookingPageSchema = z.object({
81
81
  var ListEventsSchema = z.object({
82
82
  calendar_id: z.string().optional().describe("Calendar ID to list events from. Provide this or agent_id."),
83
83
  agent_id: z.string().optional().describe("Agent ID to list events for across all of the agent's calendars. Provide this or calendar_id."),
84
- start_after: z.string().datetime().optional().describe("Only events starting after this ISO 8601 time"),
85
- start_before: z.string().datetime().optional().describe("Only events starting before this ISO 8601 time"),
84
+ start_after: z.string().datetime({ offset: true }).optional().describe("Only events starting after this ISO 8601 time"),
85
+ start_before: z.string().datetime({ offset: true }).optional().describe("Only events starting before this ISO 8601 time"),
86
86
  status: z.enum(["confirmed", "tentative", "cancelled", "hold"]).optional().describe("Filter by event status"),
87
87
  source: z.enum(["internal", "external_ical"]).optional().describe('Filter by source: "internal" (created via the API) or "external_ical" (synced from an iCal subscription)'),
88
88
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
89
- offset: z.number().int().min(0).default(0).describe("Pagination offset"),
89
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000"),
90
90
  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.")
91
91
  });
92
92
  var ListOrgEventsSchema = z.object({
93
93
  calendar_ids: z.array(z.string()).max(50).optional().describe("Only these calendar IDs (at most 50)"),
94
94
  agent_id: z.string().optional().describe("Only this agent's calendars"),
95
- start_after: z.string().datetime().optional().describe("Only events starting at or after this ISO 8601 time"),
96
- start_before: z.string().datetime().optional().describe("Only events starting at or before this ISO 8601 time"),
95
+ start_after: z.string().datetime({ offset: true }).optional().describe("Only events starting at or after this ISO 8601 time"),
96
+ start_before: z.string().datetime({ offset: true }).optional().describe("Only events starting at or before this ISO 8601 time"),
97
97
  status: z.enum(["confirmed", "tentative", "cancelled", "hold"]).optional().describe("Filter by event status"),
98
98
  source: z.enum(["internal", "external_ical"]).optional().describe('Filter by source: "internal" (created via the API) or "external_ical" (synced from an iCal subscription)'),
99
99
  q: z.string().optional().describe("Case-insensitive title search. Requires start_after and start_before at most 31 days apart"),
100
100
  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)."),
101
101
  limit: z.number().int().min(1).max(100).default(50).describe("Max results to return (1-100)"),
102
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
102
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
103
103
  });
104
104
  var GetEventSchema = z.object({
105
105
  event_id: z.string().describe("Event ID to retrieve"),
@@ -108,33 +108,35 @@ var GetEventSchema = z.object({
108
108
  var CreateEventSchema = z.object({
109
109
  calendar_id: z.string().describe("Calendar ID to add the event to"),
110
110
  title: z.string().min(1).max(500).describe("Event title"),
111
- start_time: z.string().datetime().describe("Start time (ISO 8601)"),
112
- end_time: z.string().datetime().describe("End time (ISO 8601)"),
111
+ start_time: z.string().datetime({ offset: true }).describe("Start time (ISO 8601)"),
112
+ end_time: z.string().datetime({ offset: true }).describe("End time (ISO 8601)"),
113
113
  description: z.string().max(1e4).optional().describe("Optional event description"),
114
114
  all_day: z.boolean().default(false).describe("Whether this is an all-day event"),
115
115
  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".'),
116
116
  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."),
117
- 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.'),
117
+ 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.'),
118
118
  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.'),
119
- 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.')
119
+ 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.'),
120
+ 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.')
120
121
  });
121
122
  var UpdateEventSchema = z.object({
122
123
  event_id: z.string().describe("Event ID to update"),
123
124
  calendar_id: z.string().optional().describe("Calendar ID that owns the event. Optional \u2014 if omitted the calendar is resolved from the event."),
124
125
  title: z.string().min(1).max(500).optional().describe("New event title"),
125
126
  description: z.string().max(1e4).nullable().optional().describe("New description, or null to clear it"),
126
- start_time: z.string().datetime().optional().describe("New start time (ISO 8601)"),
127
- end_time: z.string().datetime().optional().describe("New end time (ISO 8601)"),
127
+ start_time: z.string().datetime({ offset: true }).optional().describe("New start time (ISO 8601)"),
128
+ end_time: z.string().datetime({ offset: true }).optional().describe("New end time (ISO 8601)"),
128
129
  all_day: z.boolean().optional().describe("Whether this is an all-day event"),
129
130
  status: z.enum(["confirmed", "tentative", "cancelled"]).optional().describe("New event status"),
130
131
  metadata: z.record(z.string(), z.unknown()).optional().describe("Replacement metadata object"),
131
132
  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."),
132
- 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.")
133
+ 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."),
134
+ 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).')
133
135
  });
134
136
  var CancelEventSchema = z.object({
135
137
  event_id: z.string().describe("Event ID to cancel"),
136
138
  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."),
137
- 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.")
139
+ 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.")
138
140
  });
139
141
  var ConfirmEventSchema = z.object({
140
142
  event_id: z.string().describe("Event ID of the hold to confirm")
@@ -151,7 +153,7 @@ var ListAgentsSchema = z.object({
151
153
  type: z.enum(["ai", "human", "resource"]).optional().describe("Filter by agent type"),
152
154
  status: z.enum(["active", "paused", "decommissioned"]).optional().describe("Filter by status"),
153
155
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
154
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
156
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
155
157
  });
156
158
  var GetAgentSchema = z.object({
157
159
  agent_id: z.string().describe("Agent ID to fetch")
@@ -168,10 +170,10 @@ var DeleteAgentSchema = z.object({
168
170
  });
169
171
  var GetAvailabilitySchema = z.object({
170
172
  agent_id: z.string().describe("Agent ID to check availability for"),
171
- start: z.string().datetime().optional().describe("Range start (ISO 8601). Alias: start_time."),
172
- end: z.string().datetime().optional().describe("Range end (ISO 8601). Alias: end_time."),
173
- start_time: z.string().datetime().optional().describe("Alias for `start` (matches REST events naming)."),
174
- end_time: z.string().datetime().optional().describe("Alias for `end` (matches REST events naming)."),
173
+ start: z.string().datetime({ offset: true }).optional().describe("Range start (ISO 8601). Alias: start_time."),
174
+ end: z.string().datetime({ offset: true }).optional().describe("Range end (ISO 8601). Alias: end_time."),
175
+ start_time: z.string().datetime({ offset: true }).optional().describe("Alias for `start` (matches REST events naming)."),
176
+ end_time: z.string().datetime({ offset: true }).optional().describe("Alias for `end` (matches REST events naming)."),
175
177
  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."),
176
178
  slot_duration: z.enum(["15m", "30m", "45m", "1h", "2h"]).optional().describe("Deprecated alias for `duration` \u2014 minimum slot length. Prefer `duration`."),
177
179
  include_busy: z.boolean().default(false).describe("Include busy blocks in response")
@@ -179,10 +181,10 @@ var GetAvailabilitySchema = z.object({
179
181
  var FindMeetingTimeSchema = z.object({
180
182
  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."),
181
183
  agent_ids: z.array(z.string()).min(1).optional().describe("Alias for `agents` (matches REST/scheduling-proposal naming)."),
182
- start: z.string().datetime().optional().describe("Search range start (ISO 8601). Alias: start_time."),
183
- end: z.string().datetime().optional().describe("Search range end (ISO 8601). Alias: end_time."),
184
- start_time: z.string().datetime().optional().describe("Alias for `start` (matches REST events naming)."),
185
- end_time: z.string().datetime().optional().describe("Alias for `end` (matches REST events naming)."),
184
+ start: z.string().datetime({ offset: true }).optional().describe("Search range start (ISO 8601). Alias: start_time."),
185
+ end: z.string().datetime({ offset: true }).optional().describe("Search range end (ISO 8601). Alias: end_time."),
186
+ start_time: z.string().datetime({ offset: true }).optional().describe("Alias for `start` (matches REST events naming)."),
187
+ end_time: z.string().datetime({ offset: true }).optional().describe("Alias for `end` (matches REST events naming)."),
186
188
  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."),
187
189
  slot_duration: z.enum(["15m", "30m", "45m", "1h", "2h"]).optional().describe("Deprecated alias for `duration` \u2014 minimum slot length. Prefer `duration`."),
188
190
  calendars: z.array(z.string()).optional().describe("Additional shared calendar IDs to treat as busy"),
@@ -201,8 +203,8 @@ var GetCalendarContextSchema = z.object({
201
203
  calendar_id: z.string().describe("Calendar ID")
202
204
  });
203
205
  var proposalSlotSchema = z.object({
204
- start_time: z.string().datetime().describe("Slot start time (ISO 8601)"),
205
- end_time: z.string().datetime().describe("Slot end time (ISO 8601), after start_time"),
206
+ start_time: z.string().datetime({ offset: true }).describe("Slot start time (ISO 8601)"),
207
+ end_time: z.string().datetime({ offset: true }).describe("Slot end time (ISO 8601), after start_time"),
206
208
  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."),
207
209
  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.")
208
210
  });
@@ -213,13 +215,13 @@ var CreateProposalSchema = z.object({
213
215
  participant_agent_ids: z.array(z.string()).min(1).max(50).describe("Agent IDs invited to respond"),
214
216
  calendar_id: z.string().describe("Calendar the resolved event will be created on"),
215
217
  slots: z.array(proposalSlotSchema).min(1).max(20).describe("Candidate time slots (up to 20)"),
216
- expires_at: z.string().datetime().optional().describe("Auto-cancel cutoff if unresolved")
218
+ expires_at: z.string().datetime({ offset: true }).optional().describe("Auto-cancel cutoff if unresolved")
217
219
  });
218
220
  var ListProposalsSchema = z.object({
219
221
  status: z.enum(["pending", "resolving", "confirmed", "expired", "cancelled"]).optional().describe("Filter by proposal status"),
220
222
  organizer_agent_id: z.string().optional().describe("Filter by organizer agent"),
221
223
  limit: z.number().int().min(1).max(200).optional().describe("Max results (default 50)"),
222
- offset: z.number().int().min(0).optional().describe("Pagination offset (default 0)")
224
+ offset: z.number().int().min(0).optional().describe("Pagination offset, at most 10000 (default 0)")
223
225
  });
224
226
  var GetProposalSchema = z.object({
225
227
  proposal_id: z.string().describe("Proposal to fetch")
@@ -293,7 +295,7 @@ var AcceptTermsSchema = z.object({
293
295
  });
294
296
  var ListWebhooksSchema = z.object({
295
297
  limit: z.number().int().min(1).max(100).default(20).describe("Max results to return"),
296
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
298
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
297
299
  });
298
300
  var GetWebhookSchema = z.object({
299
301
  webhook_id: z.string().describe("Webhook subscription to fetch")
@@ -314,12 +316,12 @@ var DeleteWebhookSchema = z.object({
314
316
  var ListWebhookDeliveriesSchema = z.object({
315
317
  webhook_id: z.string().describe("Webhook subscription whose deliveries to list"),
316
318
  limit: z.number().int().min(1).max(100).default(20).describe("Max results to return"),
317
- offset: z.number().int().min(0).default(0).describe("Pagination offset. Cannot be combined with cursor"),
319
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000. Cannot be combined with cursor"),
318
320
  status: z.enum(WEBHOOK_DELIVERY_STATUSES).optional().describe("Filter to a single delivery status"),
319
321
  include_payload: z.boolean().optional().describe("Include the full event payload sent on each delivery"),
320
322
  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"),
321
- created_after: z.string().datetime().optional().describe("Only deliveries created at or after this time (ISO 8601, UTC)"),
322
- created_before: z.string().datetime().optional().describe("Only deliveries created before this time (ISO 8601, UTC)"),
323
+ created_after: z.string().datetime({ offset: true }).optional().describe("Only deliveries created at or after this time (ISO 8601)"),
324
+ created_before: z.string().datetime({ offset: true }).optional().describe("Only deliveries created before this time (ISO 8601)"),
323
325
  delivery_id: z.string().max(100).regex(/^whd_[A-Za-z0-9_-]+$/).optional().describe("Only the delivery with this id"),
324
326
  is_test: z.boolean().optional().describe("true for test events only, false to leave them out"),
325
327
  cursor: z.string().min(1).max(1024).optional().describe("The next_cursor from the previous page")
@@ -340,7 +342,7 @@ var ListICalSubscriptionsSchema = z.object({
340
342
  agent_id: z.string().describe("Agent ID whose iCal subscriptions to list"),
341
343
  status: z.enum(["active", "error", "paused"]).optional().describe("Filter by subscription status"),
342
344
  limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
343
- offset: z.number().int().min(0).default(0).describe("Pagination offset")
345
+ offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
344
346
  });
345
347
  var GetICalSubscriptionSchema = z.object({
346
348
  subscription_id: z.string().describe("iCal subscription ID to fetch")