@chronary/toolkit 1.2.4 → 1.3.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/CHANGELOG.md +9 -0
- package/dist/ai-sdk.cjs +15 -6
- package/dist/ai-sdk.cjs.map +1 -1
- package/dist/ai-sdk.js +15 -6
- package/dist/ai-sdk.js.map +1 -1
- package/dist/index.cjs +15 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/langchain.cjs +15 -6
- package/dist/langchain.cjs.map +1 -1
- package/dist/langchain.js +15 -6
- package/dist/langchain.js.map +1 -1
- package/dist/mastra.cjs +15 -6
- package/dist/mastra.cjs.map +1 -1
- package/dist/mastra.js +15 -6
- package/dist/mastra.js.map +1 -1
- package/dist/mcp.cjs +15 -6
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.js +15 -6
- package/dist/mcp.js.map +1 -1
- package/dist/openai.cjs +15 -6
- package/dist/openai.cjs.map +1 -1
- package/dist/openai.js +15 -6
- package/dist/openai.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -188,7 +188,8 @@ var ListEventsSchema = import_zod.z.object({
|
|
|
188
188
|
status: import_zod.z.enum(["confirmed", "tentative", "cancelled", "hold"]).optional().describe("Filter by event status"),
|
|
189
189
|
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)'),
|
|
190
190
|
limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
191
|
-
offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
|
|
191
|
+
offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset"),
|
|
192
|
+
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.")
|
|
192
193
|
});
|
|
193
194
|
var GetEventSchema = import_zod.z.object({
|
|
194
195
|
event_id: import_zod.z.string().describe("Event ID to retrieve"),
|
|
@@ -204,7 +205,8 @@ var CreateEventSchema = import_zod.z.object({
|
|
|
204
205
|
status: import_zod.z.enum(["confirmed", "tentative", "hold"]).optional().describe('Event status. "hold" creates a tentative reservation that auto-expires at hold_expires_at. Defaults to "confirmed".'),
|
|
205
206
|
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."),
|
|
206
207
|
hold_expires_at: import_zod.z.string().datetime().optional().describe('Required when status="hold". ISO 8601 timestamp 30s-15min in the future. Auto-releases the hold when reached.'),
|
|
207
|
-
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.')
|
|
208
|
+
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.'),
|
|
209
|
+
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: max 5 recurring events, series must end within 90 days.')
|
|
208
210
|
});
|
|
209
211
|
var UpdateEventSchema = import_zod.z.object({
|
|
210
212
|
event_id: import_zod.z.string().describe("Event ID to update"),
|
|
@@ -216,11 +218,13 @@ var UpdateEventSchema = import_zod.z.object({
|
|
|
216
218
|
all_day: import_zod.z.boolean().optional().describe("Whether this is an all-day event"),
|
|
217
219
|
status: import_zod.z.enum(["confirmed", "tentative", "cancelled"]).optional().describe("New event status"),
|
|
218
220
|
metadata: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Replacement metadata object"),
|
|
219
|
-
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.")
|
|
221
|
+
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."),
|
|
222
|
+
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.")
|
|
220
223
|
});
|
|
221
224
|
var CancelEventSchema = import_zod.z.object({
|
|
222
225
|
event_id: import_zod.z.string().describe("Event ID to cancel"),
|
|
223
|
-
calendar_id: import_zod.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.")
|
|
226
|
+
calendar_id: import_zod.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."),
|
|
227
|
+
occurrence_start: import_zod.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.")
|
|
224
228
|
});
|
|
225
229
|
var ConfirmEventSchema = import_zod.z.object({
|
|
226
230
|
event_id: import_zod.z.string().describe("Event ID of the hold to confirm")
|
|
@@ -479,6 +483,7 @@ var listEvents = safeFunc(async (ctx) => {
|
|
|
479
483
|
start_before: params.start_before,
|
|
480
484
|
status: params.status,
|
|
481
485
|
source: params.source,
|
|
486
|
+
expand: params.expand,
|
|
482
487
|
limit: params.limit
|
|
483
488
|
});
|
|
484
489
|
return fetchPage(iter, params.offset, params.limit);
|
|
@@ -498,7 +503,11 @@ var updateEvent = safeFunc(async (ctx) => {
|
|
|
498
503
|
return calendar_id ? client.events.update(calendar_id, event_id, updates) : client.events.updateById(event_id, updates);
|
|
499
504
|
});
|
|
500
505
|
var cancelEvent = safeFunc(async (ctx) => {
|
|
501
|
-
const { calendar_id, event_id } = ctx.params;
|
|
506
|
+
const { calendar_id, event_id, occurrence_start } = ctx.params;
|
|
507
|
+
if (occurrence_start) {
|
|
508
|
+
const event = calendar_id ? await ctx.client.events.delete(calendar_id, event_id, { occurrence_start }) : await ctx.client.events.deleteById(event_id, { occurrence_start });
|
|
509
|
+
return { occurrence_cancelled: true, id: event_id, occurrence_start, event };
|
|
510
|
+
}
|
|
502
511
|
if (calendar_id) {
|
|
503
512
|
await ctx.client.events.delete(calendar_id, event_id);
|
|
504
513
|
} else {
|
|
@@ -801,7 +810,7 @@ var TOOL_DEFINITIONS = [
|
|
|
801
810
|
},
|
|
802
811
|
{
|
|
803
812
|
name: "cancel_event",
|
|
804
|
-
description: "Delete or cancel an event from a calendar. Use this to remove, cancel, or delete any scheduled event or appointment. The event is marked cancelled and excluded from future availability calculations. `calendar_id` is optional \u2014 if omitted the calendar is looked up from the event. Provide `calendar_id` to fail fast on cross-calendar typos.",
|
|
813
|
+
description: "Delete or cancel an event from a calendar. Use this to remove, cancel, or delete any scheduled event or appointment. The event is marked cancelled and excluded from future availability calculations. For a recurring series, pass `occurrence_start` to cancel just that one occurrence (the series continues); omit it to cancel the whole series. `calendar_id` is optional \u2014 if omitted the calendar is looked up from the event. Provide `calendar_id` to fail fast on cross-calendar typos.",
|
|
805
814
|
schema: CancelEventSchema,
|
|
806
815
|
annotations: { title: "Cancel Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
807
816
|
execute: createExecutor(cancelEvent)
|