@chronary/toolkit 1.6.3 → 1.7.1

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/index.cjs CHANGED
@@ -201,7 +201,7 @@ var ListCalendarsSchema = import_zod.z.object({
201
201
  agent_id: import_zod.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."),
202
202
  include: import_zod.z.enum(["all"]).optional().describe('Pass "all" to include calendars across all agents (Organization keys only)'),
203
203
  limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
204
- offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
204
+ offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
205
205
  });
206
206
  var GetCalendarSchema = import_zod.z.object({
207
207
  calendar_id: import_zod.z.string().describe("Calendar ID to fetch")
@@ -225,7 +225,7 @@ var DeleteCalendarSchema = import_zod.z.object({
225
225
  });
226
226
  var ListBookingPagesSchema = import_zod.z.object({
227
227
  limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
228
- offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
228
+ offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
229
229
  });
230
230
  var GetBookingPageSchema = import_zod.z.object({
231
231
  booking_page_id: import_zod.z.string().describe("Booking page ID to fetch (bkp_...)")
@@ -253,7 +253,7 @@ var ListEventsSchema = import_zod.z.object({
253
253
  status: import_zod.z.enum(["confirmed", "tentative", "cancelled", "hold"]).optional().describe("Filter by event status"),
254
254
  source: import_zod.z.enum(["internal", "external_ical"]).optional().describe('Filter by source: "internal" (created via the API) or "external_ical" (synced from an iCal subscription)'),
255
255
  limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
256
- offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset"),
256
+ offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset, at most 10000"),
257
257
  expand: import_zod.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.")
258
258
  });
259
259
  var ListOrgEventsSchema = import_zod.z.object({
@@ -266,7 +266,7 @@ var ListOrgEventsSchema = import_zod.z.object({
266
266
  q: import_zod.z.string().optional().describe("Case-insensitive title search. Requires start_after and start_before at most 31 days apart"),
267
267
  expand: import_zod.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)."),
268
268
  limit: import_zod.z.number().int().min(1).max(100).default(50).describe("Max results to return (1-100)"),
269
- offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
269
+ offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
270
270
  });
271
271
  var GetEventSchema = import_zod.z.object({
272
272
  event_id: import_zod.z.string().describe("Event ID to retrieve"),
@@ -283,7 +283,8 @@ var CreateEventSchema = import_zod.z.object({
283
283
  reminders: import_zod.z.array(import_zod.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."),
284
284
  hold_expires_at: import_zod.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.'),
285
285
  hold_priority: import_zod.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.'),
286
- recurrence_rule: import_zod.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.')
286
+ recurrence_rule: import_zod.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.'),
287
+ timezone: import_zod.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.')
287
288
  });
288
289
  var UpdateEventSchema = import_zod.z.object({
289
290
  event_id: import_zod.z.string().describe("Event ID to update"),
@@ -296,7 +297,8 @@ var UpdateEventSchema = import_zod.z.object({
296
297
  status: import_zod.z.enum(["confirmed", "tentative", "cancelled"]).optional().describe("New event status"),
297
298
  metadata: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Replacement metadata object"),
298
299
  reminders: import_zod.z.array(import_zod.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."),
299
- recurrence_rule: import_zod.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.")
300
+ recurrence_rule: import_zod.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."),
301
+ timezone: import_zod.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).')
300
302
  });
301
303
  var CancelEventSchema = import_zod.z.object({
302
304
  event_id: import_zod.z.string().describe("Event ID to cancel"),
@@ -318,7 +320,7 @@ var ListAgentsSchema = import_zod.z.object({
318
320
  type: import_zod.z.enum(["ai", "human", "resource"]).optional().describe("Filter by agent type"),
319
321
  status: import_zod.z.enum(["active", "paused", "decommissioned"]).optional().describe("Filter by status"),
320
322
  limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
321
- offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
323
+ offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
322
324
  });
323
325
  var GetAgentSchema = import_zod.z.object({
324
326
  agent_id: import_zod.z.string().describe("Agent ID to fetch")
@@ -386,7 +388,7 @@ var ListProposalsSchema = import_zod.z.object({
386
388
  status: import_zod.z.enum(["pending", "resolving", "confirmed", "expired", "cancelled"]).optional().describe("Filter by proposal status"),
387
389
  organizer_agent_id: import_zod.z.string().optional().describe("Filter by organizer agent"),
388
390
  limit: import_zod.z.number().int().min(1).max(200).optional().describe("Max results (default 50)"),
389
- offset: import_zod.z.number().int().min(0).optional().describe("Pagination offset (default 0)")
391
+ offset: import_zod.z.number().int().min(0).optional().describe("Pagination offset, at most 10000 (default 0)")
390
392
  });
391
393
  var GetProposalSchema = import_zod.z.object({
392
394
  proposal_id: import_zod.z.string().describe("Proposal to fetch")
@@ -460,7 +462,7 @@ var AcceptTermsSchema = import_zod.z.object({
460
462
  });
461
463
  var ListWebhooksSchema = import_zod.z.object({
462
464
  limit: import_zod.z.number().int().min(1).max(100).default(20).describe("Max results to return"),
463
- offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
465
+ offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
464
466
  });
465
467
  var GetWebhookSchema = import_zod.z.object({
466
468
  webhook_id: import_zod.z.string().describe("Webhook subscription to fetch")
@@ -481,7 +483,7 @@ var DeleteWebhookSchema = import_zod.z.object({
481
483
  var ListWebhookDeliveriesSchema = import_zod.z.object({
482
484
  webhook_id: import_zod.z.string().describe("Webhook subscription whose deliveries to list"),
483
485
  limit: import_zod.z.number().int().min(1).max(100).default(20).describe("Max results to return"),
484
- offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset. Cannot be combined with cursor"),
486
+ offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset, at most 10000. Cannot be combined with cursor"),
485
487
  status: import_zod.z.enum(WEBHOOK_DELIVERY_STATUSES).optional().describe("Filter to a single delivery status"),
486
488
  include_payload: import_zod.z.boolean().optional().describe("Include the full event payload sent on each delivery"),
487
489
  event_type: import_zod.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"),
@@ -507,7 +509,7 @@ var ListICalSubscriptionsSchema = import_zod.z.object({
507
509
  agent_id: import_zod.z.string().describe("Agent ID whose iCal subscriptions to list"),
508
510
  status: import_zod.z.enum(["active", "error", "paused"]).optional().describe("Filter by subscription status"),
509
511
  limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
510
- offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
512
+ offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
511
513
  });
512
514
  var GetICalSubscriptionSchema = import_zod.z.object({
513
515
  subscription_id: import_zod.z.string().describe("iCal subscription ID to fetch")
@@ -1210,7 +1212,7 @@ var RAW_TOOL_DEFINITIONS = [
1210
1212
  // ── Scheduling proposals ───────────────────────────────────────
1211
1213
  {
1212
1214
  name: "create_proposal",
1213
- description: "Create a scheduling proposal \u2014 send a set of candidate time slots to one or more participant agents so they can accept, decline, or counter-propose. The organizer agent owns the proposal; once every participant responds, the system auto-resolves to the highest-scoring slot (or cancels if all decline). Requires an Organization key. Pro plan only.",
1215
+ description: "Create a scheduling proposal \u2014 send a set of candidate time slots to one or more participant agents so they can accept, decline, or counter-propose. The organizer agent owns the proposal; once every participant responds, the system auto-resolves to the highest-scoring slot (or cancels if all decline). Requires an Organization key and a Developer or Pro plan.",
1214
1216
  schema: CreateProposalSchema,
1215
1217
  annotations: { title: "Create Proposal", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1216
1218
  execute: createExecutor(createProposal)
@@ -1231,21 +1233,21 @@ var RAW_TOOL_DEFINITIONS = [
1231
1233
  },
1232
1234
  {
1233
1235
  name: "respond_to_proposal",
1234
- description: 'Submit a response (accept / decline / counter) on behalf of one participant agent to an open proposal. An "accept" requires the slot id from the proposal; a "counter" can suggest alternative slots. When all participants have responded the proposal auto-resolves \u2014 no separate resolve call needed in the normal flow. Requires an Organization key. Pro plan only.',
1236
+ description: 'Submit a response (accept / decline / counter) on behalf of one participant agent to an open proposal. An "accept" requires the slot id from the proposal; a "counter" can suggest alternative slots. When all participants have responded the proposal auto-resolves \u2014 no separate resolve call needed in the normal flow. Requires an Organization key and a Developer or Pro plan.',
1235
1237
  schema: RespondToProposalSchema,
1236
1238
  annotations: { title: "Respond To Proposal", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1237
1239
  execute: createExecutor(respondToProposal)
1238
1240
  },
1239
1241
  {
1240
1242
  name: "resolve_proposal",
1241
- description: 'Force-resolve an open proposal using responses collected so far. Picks the highest-scoring slot among those accepted by the most participants and creates a confirmed calendar event. If every response was "decline", the proposal is cancelled instead. Use when you want to close out a proposal without waiting for every participant. Requires an Organization key. Pro plan only.',
1243
+ description: 'Force-resolve an open proposal using responses collected so far. Picks the highest-scoring slot among those accepted by the most participants and creates a confirmed calendar event. If every response was "decline", the proposal is cancelled instead. Use when you want to close out a proposal without waiting for every participant. Requires an Organization key and a Developer or Pro plan.',
1242
1244
  schema: ResolveProposalSchema,
1243
1245
  annotations: { title: "Resolve Proposal", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1244
1246
  execute: createExecutor(resolveProposal)
1245
1247
  },
1246
1248
  {
1247
1249
  name: "cancel_proposal",
1248
- description: 'Cancel an open proposal. Fires a proposal.cancelled webhook with reason="organizer_cancelled". Requires an Organization key. Pro plan only.',
1250
+ description: 'Cancel an open proposal. Fires a proposal.cancelled webhook with reason="organizer_cancelled". Requires an Organization key. Works on every plan, so an org that dropped to Free can still cancel proposals it made on a paid plan.',
1249
1251
  schema: CancelProposalSchema,
1250
1252
  annotations: { title: "Cancel Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1251
1253
  execute: createExecutor(cancelProposal)
@@ -1494,7 +1496,7 @@ Typical flow: create_agent -> create_calendar -> create_event / get_availability
1494
1496
 
1495
1497
  When checking availability, always inspect availability_state and warnings before treating returned slots as complete. Human-calendar setup requires a human to open setup_url and consent; agents never receive provider credentials or calendar contents.
1496
1498
 
1497
- Organization keys (chr_sk_) can use every tool; Agent keys (chr_ak_) are limited to their own agent and cannot use org-only tools such as create_agent or find_meeting_time. Scoped keys, cross-agent availability, webhook delivery replay and secret rotation require a Developer or Pro plan; scheduling proposals and temporal holds require Pro.
1499
+ Organization keys (chr_sk_) can use every tool; Agent keys (chr_ak_) are limited to their own agent and cannot use org-only tools such as create_agent or find_meeting_time. Scoped keys, cross-agent availability, scheduling proposals, temporal holds, webhook delivery replay and secret rotation require a Developer or Pro plan.
1498
1500
 
1499
1501
  If you hit a plan limit, don't retry in a loop: call get_billing, then request_upgrade, and give approval_url to your human. Agents cannot pay; a human completes checkout.
1500
1502