@chronary/toolkit 1.4.0 → 1.5.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 +4 -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/ai-sdk.js
CHANGED
|
@@ -50,6 +50,28 @@ var UpdateCalendarSchema = z.object({
|
|
|
50
50
|
var DeleteCalendarSchema = z.object({
|
|
51
51
|
calendar_id: z.string().describe("Calendar ID to delete")
|
|
52
52
|
});
|
|
53
|
+
var ListBookingPagesSchema = z.object({
|
|
54
|
+
limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
55
|
+
offset: z.number().int().min(0).default(0).describe("Pagination offset")
|
|
56
|
+
});
|
|
57
|
+
var GetBookingPageSchema = z.object({
|
|
58
|
+
booking_page_id: z.string().describe("Booking page ID to fetch (bkp_...)")
|
|
59
|
+
});
|
|
60
|
+
var CreateBookingPageSchema = z.object({
|
|
61
|
+
calendar_id: z.string().describe("Calendar a booking resolves to (from create_calendar/list_calendars)."),
|
|
62
|
+
title: z.string().min(1).max(200).describe("Meeting title shown on the page."),
|
|
63
|
+
description: z.string().max(2e3).optional().describe("Optional description shown to the booker."),
|
|
64
|
+
duration_minutes: z.number().int().min(5).max(480).optional().describe("Slot length in minutes (default 30)."),
|
|
65
|
+
buffer_minutes: z.number().int().min(0).max(120).optional().describe("Padding before/after existing events (default 0)."),
|
|
66
|
+
window_days: z.number().int().min(1).max(365).optional().describe("How far ahead bookings are allowed (default 14)."),
|
|
67
|
+
min_notice_minutes: z.number().int().min(0).max(40320).optional().describe("Minimum lead time before a bookable slot (default 0)."),
|
|
68
|
+
timezone: z.string().min(1).max(64).optional().describe("IANA timezone for display + working hours (default UTC)."),
|
|
69
|
+
availability_constraints: z.record(z.string(), z.object({ start: z.string(), end: 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.'),
|
|
70
|
+
active: z.boolean().optional().describe("Whether the page accepts bookings (default true).")
|
|
71
|
+
});
|
|
72
|
+
var DeleteBookingPageSchema = z.object({
|
|
73
|
+
booking_page_id: z.string().describe("Booking page ID to delete (bkp_...)")
|
|
74
|
+
});
|
|
53
75
|
var ListEventsSchema = z.object({
|
|
54
76
|
calendar_id: z.string().optional().describe("Calendar ID to list events from. Provide this or agent_id."),
|
|
55
77
|
agent_id: z.string().optional().describe("Agent ID to list events for across all of the agent's calendars. Provide this or calendar_id."),
|
|
@@ -350,6 +372,33 @@ var deleteCalendar = safeFunc(async (ctx) => {
|
|
|
350
372
|
await ctx.client.calendars.delete(ctx.params.calendar_id);
|
|
351
373
|
return void 0;
|
|
352
374
|
});
|
|
375
|
+
var listBookingPages = safeFunc(async (ctx) => {
|
|
376
|
+
const { client, params } = ctx;
|
|
377
|
+
const iter = client.bookingPages.list({ limit: params.limit });
|
|
378
|
+
return fetchPage(iter, params.offset, params.limit);
|
|
379
|
+
});
|
|
380
|
+
var getBookingPage = safeFunc(async (ctx) => {
|
|
381
|
+
return ctx.client.bookingPages.get(ctx.params.booking_page_id);
|
|
382
|
+
});
|
|
383
|
+
var createBookingPage = safeFunc(async (ctx) => {
|
|
384
|
+
const { client, params } = ctx;
|
|
385
|
+
return client.bookingPages.create({
|
|
386
|
+
calendar_id: params.calendar_id,
|
|
387
|
+
title: params.title,
|
|
388
|
+
description: params.description,
|
|
389
|
+
duration_minutes: params.duration_minutes,
|
|
390
|
+
buffer_minutes: params.buffer_minutes,
|
|
391
|
+
window_days: params.window_days,
|
|
392
|
+
min_notice_minutes: params.min_notice_minutes,
|
|
393
|
+
timezone: params.timezone,
|
|
394
|
+
availability_constraints: params.availability_constraints,
|
|
395
|
+
active: params.active
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
var deleteBookingPage = safeFunc(async (ctx) => {
|
|
399
|
+
await ctx.client.bookingPages.delete(ctx.params.booking_page_id);
|
|
400
|
+
return void 0;
|
|
401
|
+
});
|
|
353
402
|
var listEvents = safeFunc(async (ctx) => {
|
|
354
403
|
const { client, params } = ctx;
|
|
355
404
|
if (!params.calendar_id && !params.agent_id) {
|
|
@@ -629,6 +678,10 @@ var HOSTED_API_MCP_TOOL_NAMES = [
|
|
|
629
678
|
"get_calendar",
|
|
630
679
|
"update_calendar",
|
|
631
680
|
"delete_calendar",
|
|
681
|
+
"create_booking_page",
|
|
682
|
+
"list_booking_pages",
|
|
683
|
+
"get_booking_page",
|
|
684
|
+
"delete_booking_page",
|
|
632
685
|
"get_usage",
|
|
633
686
|
"get_audit_log",
|
|
634
687
|
"accept_terms"
|
|
@@ -670,6 +723,35 @@ var TOOL_DEFINITIONS = [
|
|
|
670
723
|
annotations: { title: "Delete Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
671
724
|
execute: createExecutor(deleteCalendar)
|
|
672
725
|
},
|
|
726
|
+
// ── Booking pages ──────────────────────────────────────────────
|
|
727
|
+
{
|
|
728
|
+
name: "create_booking_page",
|
|
729
|
+
description: "Create a public booking page (Calendly-style 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.",
|
|
730
|
+
schema: CreateBookingPageSchema,
|
|
731
|
+
annotations: { title: "Create Booking Page", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
732
|
+
execute: createExecutor(createBookingPage)
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
name: "list_booking_pages",
|
|
736
|
+
description: "List booking pages in the org. Agent-scoped keys see only pages on their own agent's calendars.",
|
|
737
|
+
schema: ListBookingPagesSchema,
|
|
738
|
+
annotations: { title: "List Booking Pages", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
739
|
+
execute: createExecutor(listBookingPages)
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: "get_booking_page",
|
|
743
|
+
description: "Fetch a single booking page by ID, including its public booking_url and settings.",
|
|
744
|
+
schema: GetBookingPageSchema,
|
|
745
|
+
annotations: { title: "Get Booking Page", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
746
|
+
execute: createExecutor(getBookingPage)
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: "delete_booking_page",
|
|
750
|
+
description: "Delete (deactivate) a booking page. Its hosted URL stops resolving; already-booked events are unaffected.",
|
|
751
|
+
schema: DeleteBookingPageSchema,
|
|
752
|
+
annotations: { title: "Delete Booking Page", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
753
|
+
execute: createExecutor(deleteBookingPage)
|
|
754
|
+
},
|
|
673
755
|
// ── Events ─────────────────────────────────────────────────────
|
|
674
756
|
{
|
|
675
757
|
name: "list_events",
|