@chronary/toolkit 1.3.1 → 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 CHANGED
@@ -2,18 +2,27 @@
2
2
 
3
3
  All notable changes to `@chronary/toolkit` will be documented in this file starting with the soft-launch release.
4
4
 
5
+ ## 1.5.0 — 2026-07-14
6
+
7
+ - Add `create_booking_page`, `list_booking_pages`, `get_booking_page`, and `delete_booking_page` for agent-created public scheduling links — full 54-tool hosted-MCP parity (#1036).
8
+
9
+ ## 1.4.0 — 2026-07-12
10
+
11
+ - Add `create_connection_link`, `get_connection_link`, and `cancel_connection_link` for provider-neutral, human-approved Google Calendar and Microsoft Outlook setup.
12
+ - Availability tool guidance now requires agents to inspect fail-closed `availability_state` and `warnings`. The toolkit has full 50-tool hosted-MCP parity.
13
+
5
14
  ## 1.3.0 — 2026-07-10
6
15
 
7
16
  - Recurring events (#996), in parity with the hosted MCP server and REST API:
8
17
  - `create_event` gains optional `recurrence_rule` (RFC 5545 RRULE subset, no `RRULE:` prefix) to create a recurring series.
9
18
  - `update_event` gains `recurrence_rule` (string to set/change the series rule — full-series semantics — or `null` to make the event a one-off).
10
19
  - `list_events` gains `expand` — expands recurring series into individual occurrence instances within the `start_after`/`start_before` window (both required when `expand=true`, max 366 days apart). Instances carry `recurringEventId` + `originalStartTime`.
11
- - `cancel_event` gains optional `occurrence_start` — cancels just that one occurrence of a recurring series (the series continues) and returns the updated series master; omit it to cancel the whole series. No new tool: the tool count stays 47.
20
+ - `cancel_event` gains optional `occurrence_start` — cancels just that one occurrence of a recurring series (the series continues) and returns the updated series master; omit it to cancel the whole series. No new tool was added in that release.
12
21
  - Requires `@chronary/sdk` >= 0.5.0 (the release that adds `recurrence_rule` / `expand` / `occurrence_start`); the workspace dependency resolves this automatically at publish time.
13
22
 
14
23
  ## 1.2.4 — 2026-07-09
15
24
 
16
- - Docs/metadata: correct the README tool count (the adapters expose **47** calendar tools, not 23 — the toolkit was expanded to full parity with the hosted MCP surface). No code or behavioral change; version bump exists to publish the corrected README to npm + the mirror.
25
+ - Docs/metadata: correct the then-current README tool count after the toolkit expanded to full hosted-MCP parity. No code or behavioral change; version bump exists to publish the corrected README to npm + the mirror.
17
26
 
18
27
  ## 1.2.3 — 2026-07-07
19
28
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @chronary/toolkit
2
2
 
3
- AI-agent framework adapters for [Chronary](https://chronary.ai) — 47 calendar tools usable directly by Vercel AI SDK, LangChain, Mastra, OpenAI function calling, and MCP clients.
3
+ AI-agent framework adapters for [Chronary](https://chronary.ai) — 50 calendar tools usable directly by Vercel AI SDK, LangChain, Mastra, OpenAI function calling, and MCP clients.
4
4
 
5
5
  ## Installation
6
6
 
@@ -101,7 +101,7 @@ your agent code
101
101
  api.chronary.ai (REST)
102
102
  ```
103
103
 
104
- Every adapter produces the same 47 calendar tools in the format the target framework expects. Tool definitions live in [`src/definitions.ts`](./src/definitions.ts); Zod schemas are in [`src/schemas.ts`](./src/schemas.ts).
104
+ Every adapter produces the same 50 calendar tools in the format the target framework expects. Tool definitions live in [`src/definitions.ts`](./src/definitions.ts); Zod schemas are in [`src/schemas.ts`](./src/schemas.ts).
105
105
 
106
106
  ## Documentation
107
107
 
package/dist/ai-sdk.cjs CHANGED
@@ -77,6 +77,28 @@ var UpdateCalendarSchema = import_zod.z.object({
77
77
  var DeleteCalendarSchema = import_zod.z.object({
78
78
  calendar_id: import_zod.z.string().describe("Calendar ID to delete")
79
79
  });
80
+ var ListBookingPagesSchema = import_zod.z.object({
81
+ limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
82
+ offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
83
+ });
84
+ var GetBookingPageSchema = import_zod.z.object({
85
+ booking_page_id: import_zod.z.string().describe("Booking page ID to fetch (bkp_...)")
86
+ });
87
+ var CreateBookingPageSchema = import_zod.z.object({
88
+ calendar_id: import_zod.z.string().describe("Calendar a booking resolves to (from create_calendar/list_calendars)."),
89
+ title: import_zod.z.string().min(1).max(200).describe("Meeting title shown on the page."),
90
+ description: import_zod.z.string().max(2e3).optional().describe("Optional description shown to the booker."),
91
+ duration_minutes: import_zod.z.number().int().min(5).max(480).optional().describe("Slot length in minutes (default 30)."),
92
+ buffer_minutes: import_zod.z.number().int().min(0).max(120).optional().describe("Padding before/after existing events (default 0)."),
93
+ window_days: import_zod.z.number().int().min(1).max(365).optional().describe("How far ahead bookings are allowed (default 14)."),
94
+ min_notice_minutes: import_zod.z.number().int().min(0).max(40320).optional().describe("Minimum lead time before a bookable slot (default 0)."),
95
+ timezone: import_zod.z.string().min(1).max(64).optional().describe("IANA timezone for display + working hours (default UTC)."),
96
+ 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.'),
97
+ active: import_zod.z.boolean().optional().describe("Whether the page accepts bookings (default true).")
98
+ });
99
+ var DeleteBookingPageSchema = import_zod.z.object({
100
+ booking_page_id: import_zod.z.string().describe("Booking page ID to delete (bkp_...)")
101
+ });
80
102
  var ListEventsSchema = import_zod.z.object({
81
103
  calendar_id: import_zod.z.string().optional().describe("Calendar ID to list events from. Provide this or agent_id."),
82
104
  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."),
@@ -175,6 +197,15 @@ var FindMeetingTimeSchema = import_zod.z.object({
175
197
  calendars: import_zod.z.array(import_zod.z.string()).optional().describe("Additional shared calendar IDs to treat as busy"),
176
198
  include_busy: import_zod.z.boolean().default(false).describe("Include per-agent busy blocks in response")
177
199
  });
200
+ var CreateConnectionLinkSchema = import_zod.z.object({
201
+ calendar_id: import_zod.z.string().startsWith("cal_").describe("Chronary calendar whose owning agent will receive authorized availability"),
202
+ capabilities: import_zod.z.array(import_zod.z.enum(["availability", "publishing"])).min(1).max(2).default(["availability"]).describe("Request opaque availability and optional publishing permission"),
203
+ publication_policy: import_zod.z.enum(["none", "confirmed", "confirmed_tentative"]).default("none").describe("Desired event publishing policy; a human still selects the destination")
204
+ });
205
+ var GetConnectionLinkSchema = import_zod.z.object({
206
+ connection_link_id: import_zod.z.string().startsWith("csl_").describe("Connection setup link ID")
207
+ });
208
+ var CancelConnectionLinkSchema = GetConnectionLinkSchema;
178
209
  var GetCalendarContextSchema = import_zod.z.object({
179
210
  calendar_id: import_zod.z.string().describe("Calendar ID")
180
211
  });
@@ -368,6 +399,33 @@ var deleteCalendar = safeFunc(async (ctx) => {
368
399
  await ctx.client.calendars.delete(ctx.params.calendar_id);
369
400
  return void 0;
370
401
  });
402
+ var listBookingPages = safeFunc(async (ctx) => {
403
+ const { client, params } = ctx;
404
+ const iter = client.bookingPages.list({ limit: params.limit });
405
+ return fetchPage(iter, params.offset, params.limit);
406
+ });
407
+ var getBookingPage = safeFunc(async (ctx) => {
408
+ return ctx.client.bookingPages.get(ctx.params.booking_page_id);
409
+ });
410
+ var createBookingPage = safeFunc(async (ctx) => {
411
+ const { client, params } = ctx;
412
+ return client.bookingPages.create({
413
+ calendar_id: params.calendar_id,
414
+ title: params.title,
415
+ description: params.description,
416
+ duration_minutes: params.duration_minutes,
417
+ buffer_minutes: params.buffer_minutes,
418
+ window_days: params.window_days,
419
+ min_notice_minutes: params.min_notice_minutes,
420
+ timezone: params.timezone,
421
+ availability_constraints: params.availability_constraints,
422
+ active: params.active
423
+ });
424
+ });
425
+ var deleteBookingPage = safeFunc(async (ctx) => {
426
+ await ctx.client.bookingPages.delete(ctx.params.booking_page_id);
427
+ return void 0;
428
+ });
371
429
  var listEvents = safeFunc(async (ctx) => {
372
430
  const { client, params } = ctx;
373
431
  if (!params.calendar_id && !params.agent_id) {
@@ -471,6 +529,15 @@ var findMeetingTime = safeFunc(async (ctx) => {
471
529
  include_busy: params.include_busy
472
530
  });
473
531
  });
532
+ var createConnectionLink = safeFunc(async (ctx) => {
533
+ const { calendar_id, ...params } = ctx.params;
534
+ return ctx.client.connectionLinks.create(calendar_id, params);
535
+ });
536
+ var getConnectionLink = safeFunc(async (ctx) => ctx.client.connectionLinks.get(ctx.params.connection_link_id));
537
+ var cancelConnectionLink = safeFunc(async (ctx) => {
538
+ await ctx.client.connectionLinks.cancel(ctx.params.connection_link_id);
539
+ return { cancelled: true, id: ctx.params.connection_link_id };
540
+ });
474
541
  var getCalendarContext = safeFunc(async (ctx) => {
475
542
  return ctx.client.calendars.getContext(ctx.params.calendar_id);
476
543
  });
@@ -600,6 +667,9 @@ var HOSTED_API_MCP_TOOL_NAMES = [
600
667
  "update_event",
601
668
  "get_availability",
602
669
  "find_meeting_time",
670
+ "create_connection_link",
671
+ "get_connection_link",
672
+ "cancel_connection_link",
603
673
  "cancel_event",
604
674
  "confirm_event",
605
675
  "release_event",
@@ -635,6 +705,10 @@ var HOSTED_API_MCP_TOOL_NAMES = [
635
705
  "get_calendar",
636
706
  "update_calendar",
637
707
  "delete_calendar",
708
+ "create_booking_page",
709
+ "list_booking_pages",
710
+ "get_booking_page",
711
+ "delete_booking_page",
638
712
  "get_usage",
639
713
  "get_audit_log",
640
714
  "accept_terms"
@@ -676,6 +750,35 @@ var TOOL_DEFINITIONS = [
676
750
  annotations: { title: "Delete Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
677
751
  execute: createExecutor(deleteCalendar)
678
752
  },
753
+ // ── Booking pages ──────────────────────────────────────────────
754
+ {
755
+ name: "create_booking_page",
756
+ 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.",
757
+ schema: CreateBookingPageSchema,
758
+ annotations: { title: "Create Booking Page", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
759
+ execute: createExecutor(createBookingPage)
760
+ },
761
+ {
762
+ name: "list_booking_pages",
763
+ description: "List booking pages in the org. Agent-scoped keys see only pages on their own agent's calendars.",
764
+ schema: ListBookingPagesSchema,
765
+ annotations: { title: "List Booking Pages", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
766
+ execute: createExecutor(listBookingPages)
767
+ },
768
+ {
769
+ name: "get_booking_page",
770
+ description: "Fetch a single booking page by ID, including its public booking_url and settings.",
771
+ schema: GetBookingPageSchema,
772
+ annotations: { title: "Get Booking Page", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
773
+ execute: createExecutor(getBookingPage)
774
+ },
775
+ {
776
+ name: "delete_booking_page",
777
+ description: "Delete (deactivate) a booking page. Its hosted URL stops resolving; already-booked events are unaffected.",
778
+ schema: DeleteBookingPageSchema,
779
+ annotations: { title: "Delete Booking Page", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
780
+ execute: createExecutor(deleteBookingPage)
781
+ },
679
782
  // ── Events ─────────────────────────────────────────────────────
680
783
  {
681
784
  name: "list_events",
@@ -765,18 +868,39 @@ var TOOL_DEFINITIONS = [
765
868
  // ── Availability ───────────────────────────────────────────────
766
869
  {
767
870
  name: "get_availability",
768
- description: "Check when a single agent is free within a time range. Accepts `start`/`end` (preferred \u2014 matches the underlying availability service) or `start_time`/`end_time` (aliases that match the REST events schema).",
871
+ description: "Check when a single agent is free across Chronary and authorized human calendars. This tool is fail-closed: always inspect availability_state and warnings before using slots.",
769
872
  schema: GetAvailabilitySchema,
770
873
  annotations: { title: "Get Availability", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
771
874
  execute: createExecutor(getAvailability)
772
875
  },
773
876
  {
774
877
  name: "find_meeting_time",
775
- description: "Find time slots when multiple agents are all free simultaneously. Accepts `agents`/`start`/`end` (preferred \u2014 matches the availability service) or `agent_ids`/`start_time`/`end_time` (aliases that match the REST/scheduling-proposal naming).",
878
+ description: "Find time when multiple agents are free across Chronary and their authorized human calendars. This tool is fail-closed: always inspect availability_state and warnings before using slots.",
776
879
  schema: FindMeetingTimeSchema,
777
880
  annotations: { title: "Find Meeting Time", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
778
881
  execute: createExecutor(findMeetingTime)
779
882
  },
883
+ {
884
+ name: "create_connection_link",
885
+ description: "Request human setup of Google Calendar or Microsoft Outlook for a Chronary calendar. Give setup_url to a human; agents never receive provider credentials or event data. The secret URL is returned only once.",
886
+ schema: CreateConnectionLinkSchema,
887
+ annotations: { title: "Create Human Calendar Setup Link", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
888
+ execute: createExecutor(createConnectionLink)
889
+ },
890
+ {
891
+ name: "get_connection_link",
892
+ description: "Poll provider-neutral human-calendar setup status. The bearer setup URL and provider data are never returned by polling.",
893
+ schema: GetConnectionLinkSchema,
894
+ annotations: { title: "Get Human Calendar Setup Status", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
895
+ execute: createExecutor(getConnectionLink)
896
+ },
897
+ {
898
+ name: "cancel_connection_link",
899
+ description: "Cancel a pending human-calendar setup request and invalidate its setup URL.",
900
+ schema: CancelConnectionLinkSchema,
901
+ annotations: { title: "Cancel Human Calendar Setup Link", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
902
+ execute: createExecutor(cancelConnectionLink)
903
+ },
780
904
  // ── Calendar context ───────────────────────────────────────────
781
905
  {
782
906
  name: "get_calendar_context",