@chronary/toolkit 1.3.1 → 1.4.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.
@@ -174,6 +174,15 @@ var FindMeetingTimeSchema = import_zod.z.object({
174
174
  calendars: import_zod.z.array(import_zod.z.string()).optional().describe("Additional shared calendar IDs to treat as busy"),
175
175
  include_busy: import_zod.z.boolean().default(false).describe("Include per-agent busy blocks in response")
176
176
  });
177
+ var CreateConnectionLinkSchema = import_zod.z.object({
178
+ calendar_id: import_zod.z.string().startsWith("cal_").describe("Chronary calendar whose owning agent will receive authorized availability"),
179
+ 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"),
180
+ publication_policy: import_zod.z.enum(["none", "confirmed", "confirmed_tentative"]).default("none").describe("Desired event publishing policy; a human still selects the destination")
181
+ });
182
+ var GetConnectionLinkSchema = import_zod.z.object({
183
+ connection_link_id: import_zod.z.string().startsWith("csl_").describe("Connection setup link ID")
184
+ });
185
+ var CancelConnectionLinkSchema = GetConnectionLinkSchema;
177
186
  var GetCalendarContextSchema = import_zod.z.object({
178
187
  calendar_id: import_zod.z.string().describe("Calendar ID")
179
188
  });
@@ -470,6 +479,15 @@ var findMeetingTime = safeFunc(async (ctx) => {
470
479
  include_busy: params.include_busy
471
480
  });
472
481
  });
482
+ var createConnectionLink = safeFunc(async (ctx) => {
483
+ const { calendar_id, ...params } = ctx.params;
484
+ return ctx.client.connectionLinks.create(calendar_id, params);
485
+ });
486
+ var getConnectionLink = safeFunc(async (ctx) => ctx.client.connectionLinks.get(ctx.params.connection_link_id));
487
+ var cancelConnectionLink = safeFunc(async (ctx) => {
488
+ await ctx.client.connectionLinks.cancel(ctx.params.connection_link_id);
489
+ return { cancelled: true, id: ctx.params.connection_link_id };
490
+ });
473
491
  var getCalendarContext = safeFunc(async (ctx) => {
474
492
  return ctx.client.calendars.getContext(ctx.params.calendar_id);
475
493
  });
@@ -599,6 +617,9 @@ var HOSTED_API_MCP_TOOL_NAMES = [
599
617
  "update_event",
600
618
  "get_availability",
601
619
  "find_meeting_time",
620
+ "create_connection_link",
621
+ "get_connection_link",
622
+ "cancel_connection_link",
602
623
  "cancel_event",
603
624
  "confirm_event",
604
625
  "release_event",
@@ -764,18 +785,39 @@ var TOOL_DEFINITIONS = [
764
785
  // ── Availability ───────────────────────────────────────────────
765
786
  {
766
787
  name: "get_availability",
767
- 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).",
788
+ 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.",
768
789
  schema: GetAvailabilitySchema,
769
790
  annotations: { title: "Get Availability", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
770
791
  execute: createExecutor(getAvailability)
771
792
  },
772
793
  {
773
794
  name: "find_meeting_time",
774
- 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).",
795
+ 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.",
775
796
  schema: FindMeetingTimeSchema,
776
797
  annotations: { title: "Find Meeting Time", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
777
798
  execute: createExecutor(findMeetingTime)
778
799
  },
800
+ {
801
+ name: "create_connection_link",
802
+ 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.",
803
+ schema: CreateConnectionLinkSchema,
804
+ annotations: { title: "Create Human Calendar Setup Link", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
805
+ execute: createExecutor(createConnectionLink)
806
+ },
807
+ {
808
+ name: "get_connection_link",
809
+ description: "Poll provider-neutral human-calendar setup status. The bearer setup URL and provider data are never returned by polling.",
810
+ schema: GetConnectionLinkSchema,
811
+ annotations: { title: "Get Human Calendar Setup Status", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
812
+ execute: createExecutor(getConnectionLink)
813
+ },
814
+ {
815
+ name: "cancel_connection_link",
816
+ description: "Cancel a pending human-calendar setup request and invalidate its setup URL.",
817
+ schema: CancelConnectionLinkSchema,
818
+ annotations: { title: "Cancel Human Calendar Setup Link", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
819
+ execute: createExecutor(cancelConnectionLink)
820
+ },
779
821
  // ── Calendar context ───────────────────────────────────────────
780
822
  {
781
823
  name: "get_calendar_context",