@chronary/toolkit 1.4.0 → 1.5.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/CHANGELOG.md +8 -0
- package/dist/ai-sdk.cjs +82 -0
- package/dist/ai-sdk.cjs.map +1 -1
- package/dist/ai-sdk.d.cts +1 -1
- package/dist/ai-sdk.d.ts +1 -1
- package/dist/ai-sdk.js +82 -0
- package/dist/ai-sdk.js.map +1 -1
- package/dist/{base-BM5HxeCZ.d.cts → base-DuHHyh4Q.d.cts} +2 -2
- package/dist/{base-BM5HxeCZ.d.ts → base-DuHHyh4Q.d.ts} +2 -2
- package/dist/index.cjs +90 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -3
- package/dist/index.d.ts +32 -3
- package/dist/index.js +90 -0
- package/dist/index.js.map +1 -1
- package/dist/langchain.cjs +82 -0
- package/dist/langchain.cjs.map +1 -1
- package/dist/langchain.d.cts +1 -1
- package/dist/langchain.d.ts +1 -1
- package/dist/langchain.js +82 -0
- package/dist/langchain.js.map +1 -1
- package/dist/mastra.cjs +82 -0
- package/dist/mastra.cjs.map +1 -1
- package/dist/mastra.d.cts +1 -1
- package/dist/mastra.d.ts +1 -1
- package/dist/mastra.js +82 -0
- package/dist/mastra.js.map +1 -1
- package/dist/mcp.cjs +82 -0
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.d.cts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +82 -0
- package/dist/mcp.js.map +1 -1
- package/dist/openai.cjs +82 -0
- package/dist/openai.cjs.map +1 -1
- package/dist/openai.d.cts +1 -1
- package/dist/openai.d.ts +1 -1
- package/dist/openai.js +82 -0
- package/dist/openai.js.map +1 -1
- package/package.json +2 -2
package/dist/mastra.cjs
CHANGED
|
@@ -76,6 +76,28 @@ var UpdateCalendarSchema = import_zod.z.object({
|
|
|
76
76
|
var DeleteCalendarSchema = import_zod.z.object({
|
|
77
77
|
calendar_id: import_zod.z.string().describe("Calendar ID to delete")
|
|
78
78
|
});
|
|
79
|
+
var ListBookingPagesSchema = import_zod.z.object({
|
|
80
|
+
limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
81
|
+
offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
|
|
82
|
+
});
|
|
83
|
+
var GetBookingPageSchema = import_zod.z.object({
|
|
84
|
+
booking_page_id: import_zod.z.string().describe("Booking page ID to fetch (bkp_...)")
|
|
85
|
+
});
|
|
86
|
+
var CreateBookingPageSchema = import_zod.z.object({
|
|
87
|
+
calendar_id: import_zod.z.string().describe("Calendar a booking resolves to (from create_calendar/list_calendars)."),
|
|
88
|
+
title: import_zod.z.string().min(1).max(200).describe("Meeting title shown on the page."),
|
|
89
|
+
description: import_zod.z.string().max(2e3).optional().describe("Optional description shown to the booker."),
|
|
90
|
+
duration_minutes: import_zod.z.number().int().min(5).max(480).optional().describe("Slot length in minutes (default 30)."),
|
|
91
|
+
buffer_minutes: import_zod.z.number().int().min(0).max(120).optional().describe("Padding before/after existing events (default 0)."),
|
|
92
|
+
window_days: import_zod.z.number().int().min(1).max(365).optional().describe("How far ahead bookings are allowed (default 14)."),
|
|
93
|
+
min_notice_minutes: import_zod.z.number().int().min(0).max(40320).optional().describe("Minimum lead time before a bookable slot (default 0)."),
|
|
94
|
+
timezone: import_zod.z.string().min(1).max(64).optional().describe("IANA timezone for display + working hours (default UTC)."),
|
|
95
|
+
availability_constraints: import_zod.z.record(import_zod.z.string(), import_zod.z.object({ start: import_zod.z.string(), end: import_zod.z.string() })).nullable().optional().describe('Weekly working hours, e.g. {"mon":{"start":"09:00","end":"17:00"}}. Omit/null for any time in the window.'),
|
|
96
|
+
active: import_zod.z.boolean().optional().describe("Whether the page accepts bookings (default true).")
|
|
97
|
+
});
|
|
98
|
+
var DeleteBookingPageSchema = import_zod.z.object({
|
|
99
|
+
booking_page_id: import_zod.z.string().describe("Booking page ID to delete (bkp_...)")
|
|
100
|
+
});
|
|
79
101
|
var ListEventsSchema = import_zod.z.object({
|
|
80
102
|
calendar_id: import_zod.z.string().optional().describe("Calendar ID to list events from. Provide this or agent_id."),
|
|
81
103
|
agent_id: import_zod.z.string().optional().describe("Agent ID to list events for across all of the agent's calendars. Provide this or calendar_id."),
|
|
@@ -376,6 +398,33 @@ var deleteCalendar = safeFunc(async (ctx) => {
|
|
|
376
398
|
await ctx.client.calendars.delete(ctx.params.calendar_id);
|
|
377
399
|
return void 0;
|
|
378
400
|
});
|
|
401
|
+
var listBookingPages = safeFunc(async (ctx) => {
|
|
402
|
+
const { client, params } = ctx;
|
|
403
|
+
const iter = client.bookingPages.list({ limit: params.limit });
|
|
404
|
+
return fetchPage(iter, params.offset, params.limit);
|
|
405
|
+
});
|
|
406
|
+
var getBookingPage = safeFunc(async (ctx) => {
|
|
407
|
+
return ctx.client.bookingPages.get(ctx.params.booking_page_id);
|
|
408
|
+
});
|
|
409
|
+
var createBookingPage = safeFunc(async (ctx) => {
|
|
410
|
+
const { client, params } = ctx;
|
|
411
|
+
return client.bookingPages.create({
|
|
412
|
+
calendar_id: params.calendar_id,
|
|
413
|
+
title: params.title,
|
|
414
|
+
description: params.description,
|
|
415
|
+
duration_minutes: params.duration_minutes,
|
|
416
|
+
buffer_minutes: params.buffer_minutes,
|
|
417
|
+
window_days: params.window_days,
|
|
418
|
+
min_notice_minutes: params.min_notice_minutes,
|
|
419
|
+
timezone: params.timezone,
|
|
420
|
+
availability_constraints: params.availability_constraints,
|
|
421
|
+
active: params.active
|
|
422
|
+
});
|
|
423
|
+
});
|
|
424
|
+
var deleteBookingPage = safeFunc(async (ctx) => {
|
|
425
|
+
await ctx.client.bookingPages.delete(ctx.params.booking_page_id);
|
|
426
|
+
return void 0;
|
|
427
|
+
});
|
|
379
428
|
var listEvents = safeFunc(async (ctx) => {
|
|
380
429
|
const { client, params } = ctx;
|
|
381
430
|
if (!params.calendar_id && !params.agent_id) {
|
|
@@ -655,6 +704,10 @@ var HOSTED_API_MCP_TOOL_NAMES = [
|
|
|
655
704
|
"get_calendar",
|
|
656
705
|
"update_calendar",
|
|
657
706
|
"delete_calendar",
|
|
707
|
+
"create_booking_page",
|
|
708
|
+
"list_booking_pages",
|
|
709
|
+
"get_booking_page",
|
|
710
|
+
"delete_booking_page",
|
|
658
711
|
"get_usage",
|
|
659
712
|
"get_audit_log",
|
|
660
713
|
"accept_terms"
|
|
@@ -696,6 +749,35 @@ var TOOL_DEFINITIONS = [
|
|
|
696
749
|
annotations: { title: "Delete Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
697
750
|
execute: createExecutor(deleteCalendar)
|
|
698
751
|
},
|
|
752
|
+
// ── Booking pages ──────────────────────────────────────────────
|
|
753
|
+
{
|
|
754
|
+
name: "create_booking_page",
|
|
755
|
+
description: "Create a public booking page (a hosted scheduling link) for a calendar. Returns a booking_url to send to a human; when they pick a slot, a confirmed event is created on the calendar and an event.created webhook fires with a booking_page_id field. Set availability_constraints to restrict to weekly working hours; existing calendar events always block slots.",
|
|
756
|
+
schema: CreateBookingPageSchema,
|
|
757
|
+
annotations: { title: "Create Booking Page", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
758
|
+
execute: createExecutor(createBookingPage)
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
name: "list_booking_pages",
|
|
762
|
+
description: "List booking pages in the org. Agent-scoped keys see only pages on their own agent's calendars.",
|
|
763
|
+
schema: ListBookingPagesSchema,
|
|
764
|
+
annotations: { title: "List Booking Pages", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
765
|
+
execute: createExecutor(listBookingPages)
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
name: "get_booking_page",
|
|
769
|
+
description: "Fetch a single booking page by ID, including its public booking_url and settings.",
|
|
770
|
+
schema: GetBookingPageSchema,
|
|
771
|
+
annotations: { title: "Get Booking Page", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
772
|
+
execute: createExecutor(getBookingPage)
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
name: "delete_booking_page",
|
|
776
|
+
description: "Delete (deactivate) a booking page. Its hosted URL stops resolving; already-booked events are unaffected.",
|
|
777
|
+
schema: DeleteBookingPageSchema,
|
|
778
|
+
annotations: { title: "Delete Booking Page", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
779
|
+
execute: createExecutor(deleteBookingPage)
|
|
780
|
+
},
|
|
699
781
|
// ── Events ─────────────────────────────────────────────────────
|
|
700
782
|
{
|
|
701
783
|
name: "list_events",
|