@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.
package/dist/mcp.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ZodRawShape } from 'zod';
2
- import { L as ListToolkit, a as ToolAnnotations, C as ChronaryToolkitConfig, T as ToolDefinition } from './base-C6QWbxc1.js';
2
+ import { L as ListToolkit, a as ToolAnnotations, C as ChronaryToolkitConfig, T as ToolDefinition } from './base-BM5HxeCZ.js';
3
3
  import '@chronary/sdk';
4
4
 
5
5
  interface McpToolDefinition {
package/dist/mcp.js CHANGED
@@ -151,6 +151,15 @@ var FindMeetingTimeSchema = z.object({
151
151
  calendars: z.array(z.string()).optional().describe("Additional shared calendar IDs to treat as busy"),
152
152
  include_busy: z.boolean().default(false).describe("Include per-agent busy blocks in response")
153
153
  });
154
+ var CreateConnectionLinkSchema = z.object({
155
+ calendar_id: z.string().startsWith("cal_").describe("Chronary calendar whose owning agent will receive authorized availability"),
156
+ capabilities: z.array(z.enum(["availability", "publishing"])).min(1).max(2).default(["availability"]).describe("Request opaque availability and optional publishing permission"),
157
+ publication_policy: z.enum(["none", "confirmed", "confirmed_tentative"]).default("none").describe("Desired event publishing policy; a human still selects the destination")
158
+ });
159
+ var GetConnectionLinkSchema = z.object({
160
+ connection_link_id: z.string().startsWith("csl_").describe("Connection setup link ID")
161
+ });
162
+ var CancelConnectionLinkSchema = GetConnectionLinkSchema;
154
163
  var GetCalendarContextSchema = z.object({
155
164
  calendar_id: z.string().describe("Calendar ID")
156
165
  });
@@ -447,6 +456,15 @@ var findMeetingTime = safeFunc(async (ctx) => {
447
456
  include_busy: params.include_busy
448
457
  });
449
458
  });
459
+ var createConnectionLink = safeFunc(async (ctx) => {
460
+ const { calendar_id, ...params } = ctx.params;
461
+ return ctx.client.connectionLinks.create(calendar_id, params);
462
+ });
463
+ var getConnectionLink = safeFunc(async (ctx) => ctx.client.connectionLinks.get(ctx.params.connection_link_id));
464
+ var cancelConnectionLink = safeFunc(async (ctx) => {
465
+ await ctx.client.connectionLinks.cancel(ctx.params.connection_link_id);
466
+ return { cancelled: true, id: ctx.params.connection_link_id };
467
+ });
450
468
  var getCalendarContext = safeFunc(async (ctx) => {
451
469
  return ctx.client.calendars.getContext(ctx.params.calendar_id);
452
470
  });
@@ -576,6 +594,9 @@ var HOSTED_API_MCP_TOOL_NAMES = [
576
594
  "update_event",
577
595
  "get_availability",
578
596
  "find_meeting_time",
597
+ "create_connection_link",
598
+ "get_connection_link",
599
+ "cancel_connection_link",
579
600
  "cancel_event",
580
601
  "confirm_event",
581
602
  "release_event",
@@ -741,18 +762,39 @@ var TOOL_DEFINITIONS = [
741
762
  // ── Availability ───────────────────────────────────────────────
742
763
  {
743
764
  name: "get_availability",
744
- 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).",
765
+ 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.",
745
766
  schema: GetAvailabilitySchema,
746
767
  annotations: { title: "Get Availability", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
747
768
  execute: createExecutor(getAvailability)
748
769
  },
749
770
  {
750
771
  name: "find_meeting_time",
751
- 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).",
772
+ 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.",
752
773
  schema: FindMeetingTimeSchema,
753
774
  annotations: { title: "Find Meeting Time", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
754
775
  execute: createExecutor(findMeetingTime)
755
776
  },
777
+ {
778
+ name: "create_connection_link",
779
+ 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.",
780
+ schema: CreateConnectionLinkSchema,
781
+ annotations: { title: "Create Human Calendar Setup Link", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
782
+ execute: createExecutor(createConnectionLink)
783
+ },
784
+ {
785
+ name: "get_connection_link",
786
+ description: "Poll provider-neutral human-calendar setup status. The bearer setup URL and provider data are never returned by polling.",
787
+ schema: GetConnectionLinkSchema,
788
+ annotations: { title: "Get Human Calendar Setup Status", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
789
+ execute: createExecutor(getConnectionLink)
790
+ },
791
+ {
792
+ name: "cancel_connection_link",
793
+ description: "Cancel a pending human-calendar setup request and invalidate its setup URL.",
794
+ schema: CancelConnectionLinkSchema,
795
+ annotations: { title: "Cancel Human Calendar Setup Link", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
796
+ execute: createExecutor(cancelConnectionLink)
797
+ },
756
798
  // ── Calendar context ───────────────────────────────────────────
757
799
  {
758
800
  name: "get_calendar_context",