@chronary/toolkit 0.1.3 → 1.0.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/dist/ai-sdk.cjs +472 -38
- package/dist/ai-sdk.cjs.map +1 -1
- package/dist/ai-sdk.d.cts +5 -6
- package/dist/ai-sdk.d.ts +5 -6
- package/dist/ai-sdk.js +472 -38
- package/dist/ai-sdk.js.map +1 -1
- package/dist/{base-CUC_3BPj.d.cts → base-C6QWbxc1.d.cts} +3 -3
- package/dist/{base-CUC_3BPj.d.ts → base-C6QWbxc1.d.ts} +3 -3
- package/dist/index.cjs +526 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +283 -233
- package/dist/index.d.ts +283 -233
- package/dist/index.js +526 -44
- package/dist/index.js.map +1 -1
- package/dist/langchain.cjs +472 -38
- 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 +472 -38
- package/dist/langchain.js.map +1 -1
- package/dist/mastra.cjs +472 -38
- 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 +472 -38
- package/dist/mastra.js.map +1 -1
- package/dist/mcp.cjs +474 -40
- 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 +474 -40
- package/dist/mcp.js.map +1 -1
- package/dist/openai.cjs +475 -41
- 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 +475 -41
- package/dist/openai.js.map +1 -1
- package/package.json +10 -10
package/dist/mastra.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/adapters/mastra.ts","../src/base.ts","../src/schemas.ts","../src/safe.ts","../src/functions.ts","../src/definitions.ts"],"sourcesContent":["import { MapToolkit } from '../base';\nimport type { ToolDefinition, ChronaryToolkitConfig } from '../types';\n\nexport interface MastraTool {\n id: string;\n description: string;\n inputSchema: ToolDefinition['schema'];\n execute: (context: { context: Record<string, unknown> }) => Promise<unknown>;\n}\n\n/**\n * Mastra adapter.\n *\n * Returns tools compatible with Mastra's tool format.\n *\n * @example\n * ```ts\n * import { ChronaryToolkit } from '@chronary/toolkit/mastra';\n *\n * const toolkit = new ChronaryToolkit({ apiKey: process.env.CHRONARY_API_KEY });\n * const tools = toolkit.getTools();\n * ```\n */\nexport class ChronaryToolkit extends MapToolkit<MastraTool> {\n constructor(config: ChronaryToolkitConfig) {\n super(config);\n }\n\n protected buildTool(def: ToolDefinition): MastraTool {\n const client = this.client;\n return {\n id: def.name,\n description: def.description,\n inputSchema: def.schema,\n execute: async ({ context }: { context: Record<string, unknown> }) => {\n const result = await def.execute(client, context);\n if (result.isError) throw new Error(result.result as string);\n return result.result;\n },\n };\n }\n}\n","import { Chronary } from '@chronary/sdk';\nimport type { ToolDefinition, ToolName, ChronaryToolkitConfig } from './types';\nimport { TOOL_DEFINITIONS } from './definitions';\n\nfunction resolveClient(config: ChronaryToolkitConfig): Chronary {\n if ('client' in config && config.client) return config.client;\n const { tools: _tools, ...sdkConfig } = config as {\n apiKey?: string;\n baseUrl?: string;\n tools?: ToolName[];\n extraHeaders?: Record<string, string>;\n };\n return new Chronary(sdkConfig);\n}\n\nexport abstract class BaseToolkit<T> {\n protected readonly client: Chronary;\n protected readonly definitions: ToolDefinition[];\n\n constructor(config: ChronaryToolkitConfig) {\n this.client = resolveClient(config);\n this.definitions = config.tools\n ? TOOL_DEFINITIONS.filter((d) => (config.tools as ToolName[]).includes(d.name))\n : [...TOOL_DEFINITIONS];\n }\n\n /** Convert a framework-agnostic ToolDefinition into the adapter's native format */\n protected abstract buildTool(def: ToolDefinition): T;\n\n abstract getTools(): T[] | Record<string, T>;\n}\n\nexport abstract class ListToolkit<T> extends BaseToolkit<T> {\n getTools(): T[] {\n return this.definitions.map((def) => this.buildTool(def));\n }\n}\n\nexport abstract class MapToolkit<T> extends BaseToolkit<T> {\n getTools(): Record<string, T> {\n const map: Record<string, T> = {};\n for (const def of this.definitions) {\n map[def.name] = this.buildTool(def);\n }\n return map;\n }\n}\n","import { z } from 'zod';\n\n// ── Calendars ──────────────────────────────────────────────────\n\nexport const ListCalendarsSchema = z.object({\n agent_id: z.string().optional().describe('Filter calendars by agent ID'),\n include: z.enum(['all']).optional().describe('Set to \"all\" to include soft-deleted calendars'),\n limit: z.number().int().min(1).max(200).optional().describe('Max results per page (default 50)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetCalendarSchema = z.object({\n calendar_id: z.string().describe('The calendar ID to retrieve'),\n});\n\nexport const CreateCalendarSchema = z.object({\n name: z.string().describe('Calendar name'),\n timezone: z.string().describe('IANA timezone (e.g., \"America/New_York\")'),\n agent_id: z.string().optional().describe('Agent ID to associate the calendar with'),\n metadata: z.record(z.unknown()).optional().describe('Arbitrary key-value metadata'),\n});\n\nexport const UpdateCalendarSchema = z.object({\n calendar_id: z.string().describe('The calendar ID to update'),\n name: z.string().optional().describe('New calendar name'),\n timezone: z.string().optional().describe('New IANA timezone'),\n metadata: z.record(z.unknown()).optional().describe('Updated metadata'),\n});\n\nexport const DeleteCalendarSchema = z.object({\n calendar_id: z.string().describe('The calendar ID to delete'),\n});\n\n// ── Events ─────────────────────────────────────────────────────\n\nexport const ListEventsSchema = z.object({\n calendar_id: z.string().optional().describe('Calendar ID to list events from (provide this or agent_id)'),\n agent_id: z.string().optional().describe('Agent ID to list events for (provide this or calendar_id)'),\n start_after: z.string().optional().describe('Only events starting after this ISO 8601 datetime'),\n start_before: z.string().optional().describe('Only events starting before this ISO 8601 datetime'),\n status: z.enum(['confirmed', 'tentative', 'cancelled']).optional().describe('Filter by event status'),\n source: z.enum(['internal', 'external_ical']).optional().describe('Filter by event source'),\n limit: z.number().int().min(1).max(200).optional().describe('Max results per page (default 50)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetEventSchema = z.object({\n calendar_id: z.string().describe('Calendar ID the event belongs to'),\n event_id: z.string().describe('The event ID to retrieve'),\n});\n\nexport const CreateEventSchema = z.object({\n calendar_id: z.string().describe('Calendar ID to create the event on'),\n title: z.string().describe('Event title'),\n start_time: z.string().describe('Start time in ISO 8601 format'),\n end_time: z.string().describe('End time in ISO 8601 format'),\n description: z.string().optional().describe('Event description'),\n all_day: z.boolean().optional().describe('Whether this is an all-day event'),\n status: z.enum(['confirmed', 'tentative', 'cancelled']).optional().describe('Event status (default \"confirmed\")'),\n metadata: z.record(z.unknown()).optional().describe('Arbitrary key-value metadata'),\n});\n\nexport const UpdateEventSchema = z.object({\n calendar_id: z.string().describe('Calendar ID the event belongs to'),\n event_id: z.string().describe('The event ID to update'),\n title: z.string().optional().describe('New event title'),\n description: z.string().nullable().optional().describe('New description (null to clear)'),\n start_time: z.string().optional().describe('New start time in ISO 8601 format'),\n end_time: z.string().optional().describe('New end time in ISO 8601 format'),\n all_day: z.boolean().optional().describe('Whether this is an all-day event'),\n status: z.enum(['confirmed', 'tentative', 'cancelled']).optional().describe('New event status'),\n metadata: z.record(z.unknown()).optional().describe('Updated metadata'),\n});\n\nexport const DeleteEventSchema = z.object({\n calendar_id: z.string().describe('Calendar ID the event belongs to'),\n event_id: z.string().describe('The event ID to delete'),\n});\n\n// ── Availability ───────────────────────────────────────────────\n\nexport const CheckAvailabilitySchema = z.object({\n agents: z.array(z.string()).min(1).describe('Agent IDs to check availability for'),\n start: z.string().describe('Start of time range in ISO 8601 format'),\n end: z.string().describe('End of time range in ISO 8601 format'),\n slot_duration: z.enum(['15m', '30m', '45m', '1h', '2h']).optional().describe('Duration of availability slots (default \"30m\")'),\n calendars: z.array(z.string()).optional().describe('Specific calendar IDs to check (default: all agent calendars)'),\n include_busy: z.boolean().optional().describe('Include busy blocks in response'),\n});\n\n// ── Webhooks ───────────────────────────────────────────────────\n\nexport const ListWebhooksSchema = z.object({\n limit: z.number().int().min(1).max(100).optional().describe('Max results per page (default 20)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetWebhookSchema = z.object({\n webhook_id: z.string().describe('The webhook ID to retrieve'),\n});\n\nexport const CreateWebhookSchema = z.object({\n url: z.string().describe('HTTPS URL to receive webhook payloads'),\n events: z.array(z.string()).describe('Event types to subscribe to (e.g., [\"event.created\", \"event.updated\"])'),\n});\n\nexport const UpdateWebhookSchema = z.object({\n webhook_id: z.string().describe('The webhook ID to update'),\n url: z.string().optional().describe('New webhook URL'),\n events: z.array(z.string()).optional().describe('New event type subscriptions'),\n active: z.boolean().optional().describe('Enable or disable the webhook'),\n});\n\nexport const DeleteWebhookSchema = z.object({\n webhook_id: z.string().describe('The webhook ID to delete'),\n});\n\n// ── iCal Subscriptions ─────────────────────────────────────────\n\nexport const ListICalSubscriptionsSchema = z.object({\n agent_id: z.string().describe('Agent ID to list subscriptions for'),\n status: z.enum(['active', 'error', 'paused']).optional().describe('Filter by subscription status'),\n limit: z.number().int().min(1).max(200).optional().describe('Max results per page (default 50)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetICalSubscriptionSchema = z.object({\n subscription_id: z.string().describe('The iCal subscription ID to retrieve'),\n});\n\nexport const CreateICalSubscriptionSchema = z.object({\n agent_id: z.string().describe('Agent ID to create the subscription for'),\n calendar_id: z.string().describe('Calendar ID to import events into'),\n url: z.string().describe('HTTPS URL of the iCal feed to subscribe to'),\n label: z.string().optional().describe('Human-readable label for the subscription'),\n});\n\nexport const UpdateICalSubscriptionSchema = z.object({\n subscription_id: z.string().describe('The iCal subscription ID to update'),\n label: z.string().optional().describe('New label'),\n url: z.string().optional().describe('New iCal feed URL'),\n});\n\nexport const DeleteICalSubscriptionSchema = z.object({\n subscription_id: z.string().describe('The iCal subscription ID to delete'),\n});\n\nexport const SyncICalSubscriptionSchema = z.object({\n subscription_id: z.string().describe('The iCal subscription ID to sync immediately'),\n});\n\n// ── Usage ──────────────────────────────────────────────────────\n\nexport const GetUsageSchema = z.object({});\n","import { ChronaryError } from '@chronary/sdk';\nimport type { ToolResult } from './types';\n\n/**\n * Wraps an async function so SDK errors become structured ToolResult objects\n * instead of thrown exceptions. LLMs see error messages, never stack traces.\n */\nexport function safeFunc<TParams>(\n fn: (params: TParams) => Promise<unknown>,\n): (params: TParams) => Promise<ToolResult> {\n return async (params: TParams): Promise<ToolResult> => {\n try {\n const result = await fn(params);\n return { result: result ?? { success: true }, isError: false };\n } catch (err) {\n if (err instanceof ChronaryError) {\n return { result: `${err.name}: ${err.message}`, isError: true };\n }\n return {\n result: `Error: ${err instanceof Error ? err.message : String(err)}`,\n isError: true,\n };\n }\n };\n}\n","import type { Chronary } from '@chronary/sdk';\nimport { safeFunc } from './safe';\nimport type { ToolResult } from './types';\n\ninterface Ctx<P = Record<string, unknown>> {\n client: Chronary;\n params: P;\n}\n\n// Helper to consume a PageIterator's first page\nasync function fetchPage(\n iterator: AsyncIterable<unknown> & { getPage(offset?: number, limit?: number): Promise<{ data: unknown[]; total: number; hasMore: boolean }> },\n offset?: number,\n limit?: number,\n) {\n const page = await iterator.getPage(offset ?? 0, limit);\n return { data: page.data, total: page.total, has_more: page.hasMore };\n}\n\n// ── Calendars ──────────────────────────────────────────────────\n\nexport const listCalendars = safeFunc(async (ctx: Ctx<{\n agent_id?: string; include?: 'all'; limit?: number; offset?: number;\n}>) => {\n const { client, params } = ctx;\n const iter = client.calendars.list({ agentId: params.agent_id, include: params.include, limit: params.limit });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getCalendar = safeFunc(async (ctx: Ctx<{ calendar_id: string }>) => {\n return ctx.client.calendars.get(ctx.params.calendar_id);\n});\n\nexport const createCalendar = safeFunc(async (ctx: Ctx<{\n name: string; timezone: string; agent_id?: string; metadata?: Record<string, unknown>;\n}>) => {\n const { client, params } = ctx;\n return client.calendars.create({\n name: params.name,\n timezone: params.timezone,\n agentId: params.agent_id,\n metadata: params.metadata,\n });\n});\n\nexport const updateCalendar = safeFunc(async (ctx: Ctx<{\n calendar_id: string; name?: string; timezone?: string; metadata?: Record<string, unknown>;\n}>) => {\n const { client, params } = ctx;\n const { calendar_id, ...updates } = params;\n return client.calendars.update(calendar_id, updates);\n});\n\nexport const deleteCalendar = safeFunc(async (ctx: Ctx<{ calendar_id: string }>) => {\n await ctx.client.calendars.delete(ctx.params.calendar_id);\n return undefined; // safeFunc normalizes to { success: true }\n});\n\n// ── Events ─────────────────────────────────────────────────────\n\nexport const listEvents = safeFunc(async (ctx: Ctx<{\n calendar_id?: string; agent_id?: string; start_after?: string; start_before?: string;\n status?: 'confirmed' | 'tentative' | 'cancelled'; source?: 'internal' | 'external_ical';\n limit?: number; offset?: number;\n}>) => {\n const { client, params } = ctx;\n const iter = client.events.list({\n calendarId: params.calendar_id,\n agentId: params.agent_id,\n start_after: params.start_after,\n start_before: params.start_before,\n status: params.status,\n source: params.source,\n limit: params.limit,\n });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getEvent = safeFunc(async (ctx: Ctx<{ calendar_id: string; event_id: string }>) => {\n return ctx.client.events.get(ctx.params.calendar_id, ctx.params.event_id);\n});\n\nexport const createEvent = safeFunc(async (ctx: Ctx<{\n calendar_id: string; title: string; start_time: string; end_time: string;\n description?: string; all_day?: boolean;\n status?: 'confirmed' | 'tentative' | 'cancelled'; metadata?: Record<string, unknown>;\n}>) => {\n const { client, params } = ctx;\n const { calendar_id, ...eventParams } = params;\n return client.events.create(calendar_id, eventParams);\n});\n\nexport const updateEvent = safeFunc(async (ctx: Ctx<{\n calendar_id: string; event_id: string; title?: string; description?: string | null;\n start_time?: string; end_time?: string; all_day?: boolean;\n status?: 'confirmed' | 'tentative' | 'cancelled'; metadata?: Record<string, unknown>;\n}>) => {\n const { client, params } = ctx;\n const { calendar_id, event_id, ...updates } = params;\n return client.events.update(calendar_id, event_id, updates);\n});\n\nexport const deleteEvent = safeFunc(async (ctx: Ctx<{ calendar_id: string; event_id: string }>) => {\n await ctx.client.events.delete(ctx.params.calendar_id, ctx.params.event_id);\n return undefined;\n});\n\n// ── Availability ───────────────────────────────────────────────\n\nexport const checkAvailability = safeFunc(async (ctx: Ctx<{\n agents: string[]; start: string; end: string;\n slot_duration?: '15m' | '30m' | '45m' | '1h' | '2h';\n calendars?: string[]; include_busy?: boolean;\n}>) => {\n return ctx.client.availability.check(ctx.params);\n});\n\n// ── Webhooks ───────────────────────────────────────────────────\n\nexport const listWebhooks = safeFunc(async (ctx: Ctx<{ limit?: number; offset?: number }>) => {\n const { client, params } = ctx;\n const iter = client.webhooks.list({ limit: params.limit });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getWebhook = safeFunc(async (ctx: Ctx<{ webhook_id: string }>) => {\n return ctx.client.webhooks.get(ctx.params.webhook_id);\n});\n\nexport const createWebhook = safeFunc(async (ctx: Ctx<{ url: string; events: string[] }>) => {\n return ctx.client.webhooks.create(ctx.params);\n});\n\nexport const updateWebhook = safeFunc(async (ctx: Ctx<{\n webhook_id: string; url?: string; events?: string[]; active?: boolean;\n}>) => {\n const { client, params } = ctx;\n const { webhook_id, ...updates } = params;\n return client.webhooks.update(webhook_id, updates);\n});\n\nexport const deleteWebhook = safeFunc(async (ctx: Ctx<{ webhook_id: string }>) => {\n await ctx.client.webhooks.delete(ctx.params.webhook_id);\n return undefined;\n});\n\n// ── iCal Subscriptions ─────────────────────────────────────────\n\nexport const listICalSubscriptions = safeFunc(async (ctx: Ctx<{\n agent_id: string; status?: 'active' | 'error' | 'paused'; limit?: number; offset?: number;\n}>) => {\n const { client, params } = ctx;\n const iter = client.icalSubscriptions.list({\n agentId: params.agent_id,\n status: params.status,\n limit: params.limit,\n });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getICalSubscription = safeFunc(async (ctx: Ctx<{ subscription_id: string }>) => {\n return ctx.client.icalSubscriptions.get(ctx.params.subscription_id);\n});\n\nexport const createICalSubscription = safeFunc(async (ctx: Ctx<{\n agent_id: string; calendar_id: string; url: string; label?: string;\n}>) => {\n const { client, params } = ctx;\n const { agent_id, ...subParams } = params;\n return client.icalSubscriptions.create(agent_id, subParams);\n});\n\nexport const updateICalSubscription = safeFunc(async (ctx: Ctx<{\n subscription_id: string; label?: string; url?: string;\n}>) => {\n const { client, params } = ctx;\n const { subscription_id, ...updates } = params;\n return client.icalSubscriptions.update(subscription_id, updates);\n});\n\nexport const deleteICalSubscription = safeFunc(async (ctx: Ctx<{ subscription_id: string }>) => {\n await ctx.client.icalSubscriptions.delete(ctx.params.subscription_id);\n return undefined;\n});\n\nexport const syncICalSubscription = safeFunc(async (ctx: Ctx<{ subscription_id: string }>) => {\n return ctx.client.icalSubscriptions.sync(ctx.params.subscription_id);\n});\n\n// ── Usage ──────────────────────────────────────────────────────\n\nexport const getUsage = safeFunc(async (ctx: Ctx) => {\n return ctx.client.usage.get();\n});\n\n// ── Factory ────────────────────────────────────────────────────\n\n/** Map of tool name → executor function. Used by definitions.ts to wire up execute(). */\nexport function createExecutor(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fn: (ctx: { client: Chronary; params: any }) => Promise<ToolResult>,\n): (client: Chronary, params: Record<string, unknown>) => Promise<ToolResult> {\n return (client, params) => fn({ client, params });\n}\n","import type { ToolDefinition } from './types';\nimport * as schemas from './schemas';\nimport * as fns from './functions';\nimport { createExecutor } from './functions';\n\nexport const HOSTED_API_MCP_TOOL_NAMES = [\n 'create_agent',\n 'list_agents',\n 'create_calendar',\n 'create_event',\n 'list_events',\n 'get_availability',\n 'find_meeting_time',\n 'cancel_event',\n 'confirm_event',\n 'release_event',\n 'subscribe_ical',\n 'get_calendar_context',\n 'create_proposal',\n 'list_proposals',\n 'get_proposal',\n 'respond_to_proposal',\n 'resolve_proposal',\n 'cancel_proposal',\n 'set_availability_rules',\n 'get_availability_rules',\n 'clear_availability_rules',\n] as const;\n\nexport const TOOL_DEFINITIONS: ToolDefinition[] = [\n // ── Calendars ──────────────────────────────────────────────────\n {\n name: 'list_calendars',\n description: 'List calendars, optionally filtered by agent. Returns paginated results.',\n schema: schemas.ListCalendarsSchema,\n annotations: { title: 'List Calendars', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listCalendars),\n },\n {\n name: 'get_calendar',\n description: 'Get a calendar by its ID, including its name, timezone, and iCal feed URL.',\n schema: schemas.GetCalendarSchema,\n annotations: { title: 'Get Calendar', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getCalendar),\n },\n {\n name: 'create_calendar',\n description: 'Create a new calendar. Specify a name and IANA timezone. Optionally scope it to an agent.',\n schema: schemas.CreateCalendarSchema,\n annotations: { title: 'Create Calendar', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.createCalendar),\n },\n {\n name: 'update_calendar',\n description: 'Update a calendar\\'s name, timezone, or metadata.',\n schema: schemas.UpdateCalendarSchema,\n annotations: { title: 'Update Calendar', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.updateCalendar),\n },\n {\n name: 'delete_calendar',\n description: 'Permanently delete a calendar and all its events.',\n schema: schemas.DeleteCalendarSchema,\n annotations: { title: 'Delete Calendar', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.deleteCalendar),\n },\n\n // ── Events ─────────────────────────────────────────────────────\n {\n name: 'list_events',\n description: 'List events on a calendar or for an agent. Supports date range and status filters. Provide calendar_id or agent_id.',\n schema: schemas.ListEventsSchema,\n annotations: { title: 'List Events', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listEvents),\n },\n {\n name: 'get_event',\n description: 'Get a specific event by its calendar ID and event ID.',\n schema: schemas.GetEventSchema,\n annotations: { title: 'Get Event', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getEvent),\n },\n {\n name: 'create_event',\n description: 'Create a new event on a calendar. The event blocks the agent\\'s availability during the specified time window and appears in availability queries.',\n schema: schemas.CreateEventSchema,\n annotations: { title: 'Create Event', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.createEvent),\n },\n {\n name: 'update_event',\n description: 'Update an existing event\\'s title, times, status, or other properties.',\n schema: schemas.UpdateEventSchema,\n annotations: { title: 'Update Event', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.updateEvent),\n },\n {\n name: 'delete_event',\n description: 'Delete an event from a calendar. This frees the agent\\'s availability during that time.',\n schema: schemas.DeleteEventSchema,\n annotations: { title: 'Delete Event', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.deleteEvent),\n },\n\n // ── Availability ───────────────────────────────────────────────\n {\n name: 'check_availability',\n description: 'Check free/busy availability across one or more agents within a time range. Returns available time slots and optionally busy blocks.',\n schema: schemas.CheckAvailabilitySchema,\n annotations: { title: 'Check Availability', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.checkAvailability),\n },\n\n // ── Webhooks ───────────────────────────────────────────────────\n {\n name: 'list_webhooks',\n description: 'List all webhook subscriptions for the organization.',\n schema: schemas.ListWebhooksSchema,\n annotations: { title: 'List Webhooks', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listWebhooks),\n },\n {\n name: 'get_webhook',\n description: 'Get a webhook subscription by its ID.',\n schema: schemas.GetWebhookSchema,\n annotations: { title: 'Get Webhook', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getWebhook),\n },\n {\n name: 'create_webhook',\n description: 'Create a webhook subscription to receive event notifications at a URL. Payloads are signed with HMAC-SHA256.',\n schema: schemas.CreateWebhookSchema,\n annotations: { title: 'Create Webhook', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.createWebhook),\n },\n {\n name: 'update_webhook',\n description: 'Update a webhook\\'s URL, subscribed events, or active status.',\n schema: schemas.UpdateWebhookSchema,\n annotations: { title: 'Update Webhook', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.updateWebhook),\n },\n {\n name: 'delete_webhook',\n description: 'Delete a webhook subscription. No further events will be delivered to this URL.',\n schema: schemas.DeleteWebhookSchema,\n annotations: { title: 'Delete Webhook', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.deleteWebhook),\n },\n\n // ── iCal Subscriptions ─────────────────────────────────────────\n {\n name: 'list_ical_subscriptions',\n description: 'List external calendar imports (iCal subscriptions) for an agent.',\n schema: schemas.ListICalSubscriptionsSchema,\n annotations: { title: 'List iCal Subscriptions', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listICalSubscriptions),\n },\n {\n name: 'get_ical_subscription',\n description: 'Get an iCal subscription by its ID, including sync status and last error.',\n schema: schemas.GetICalSubscriptionSchema,\n annotations: { title: 'Get iCal Subscription', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getICalSubscription),\n },\n {\n name: 'create_ical_subscription',\n description: 'Import an external calendar by subscribing to an iCal feed URL. Events are synced every 30 minutes.',\n schema: schemas.CreateICalSubscriptionSchema,\n annotations: { title: 'Create iCal Subscription', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },\n execute: createExecutor(fns.createICalSubscription),\n },\n {\n name: 'update_ical_subscription',\n description: 'Update an iCal subscription\\'s label or feed URL.',\n schema: schemas.UpdateICalSubscriptionSchema,\n annotations: { title: 'Update iCal Subscription', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.updateICalSubscription),\n },\n {\n name: 'delete_ical_subscription',\n description: 'Remove an external calendar import. Previously synced events remain on the calendar.',\n schema: schemas.DeleteICalSubscriptionSchema,\n annotations: { title: 'Delete iCal Subscription', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.deleteICalSubscription),\n },\n {\n name: 'sync_ical_subscription',\n description: 'Trigger an immediate sync of an iCal subscription instead of waiting for the next 30-minute poll.',\n schema: schemas.SyncICalSubscriptionSchema,\n annotations: { title: 'Sync iCal Subscription', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },\n execute: createExecutor(fns.syncICalSubscription),\n },\n\n // ── Usage ──────────────────────────────────────────────────────\n {\n name: 'get_usage',\n description: 'Get quota and usage statistics for the current billing period.',\n schema: schemas.GetUsageSchema,\n annotations: { title: 'Get Usage', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getUsage),\n },\n];\n\nconst toolkitToolNames = new Set<string>(TOOL_DEFINITIONS.map((tool) => tool.name));\nconst hostedToolNames = new Set<string>(HOSTED_API_MCP_TOOL_NAMES);\n\nexport const TOOLKIT_MCP_PARITY = {\n hostedToolNames: HOSTED_API_MCP_TOOL_NAMES,\n missingHostedTools: HOSTED_API_MCP_TOOL_NAMES.filter((name) => !toolkitToolNames.has(name)),\n toolkitOnlyTools: TOOL_DEFINITIONS.map((tool) => tool.name).filter((name) => !hostedToolNames.has(name)),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,cAAyB;;;ACAzB,iBAAkB;AAIX,IAAM,sBAAsB,aAAE,OAAO;AAAA,EAC1C,UAAU,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,8BAA8B;AAAA,EACvE,SAAS,aAAE,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,SAAS,gDAAgD;AAAA,EAC7F,OAAO,aAAE,OAAO,EAAE,IAAI,EAAE,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ACpC;AACA,WAAO;AAAA,EACT;AACF;;;ADvBO,IAAM,kBAAN,cAA8B,WAAuB;AAAA,EAC1D,YAAY,QAA+B;AACzC,UAAM,MAAM;AAAA,EACd;AAAA,EAEU,UAAU,KAAiC;AACnD,UAAM,SAAS,KAAK;AACpB,WAAO;AAAA,MACL,IAAI,IAAI;AAAA,MACR,aAAa,IAAI;AAAA,MACjB,aAAa,IAAI;AAAA,MACjB,SAAS,OAAO,EAAE,QAAQ,MAA4C;AACpE,cAAM,SAAS,MAAM,IAAI,QAAQ,QAAQ,OAAO;AAChD,YAAI,OAAO,QAAS,OAAM,IAAI,MAAM,OAAO,MAAgB;AAC3D,eAAO,OAAO;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AACF;","names":["import_sdk"]}
|
|
1
|
+
{"version":3,"sources":["../src/adapters/mastra.ts","../src/base.ts","../src/schemas.ts","../src/safe.ts","../src/functions.ts","../src/definitions.ts"],"sourcesContent":["import { MapToolkit } from '../base';\nimport type { ToolDefinition, ChronaryToolkitConfig } from '../types';\n\nexport interface MastraTool {\n id: string;\n description: string;\n inputSchema: ToolDefinition['schema'];\n execute: (context: { context: Record<string, unknown> }) => Promise<unknown>;\n}\n\n/**\n * Mastra adapter.\n *\n * Returns tools compatible with Mastra's tool format.\n *\n * @example\n * ```ts\n * import { ChronaryToolkit } from '@chronary/toolkit/mastra';\n *\n * const toolkit = new ChronaryToolkit({ apiKey: process.env.CHRONARY_API_KEY });\n * const tools = toolkit.getTools();\n * ```\n */\nexport class ChronaryToolkit extends MapToolkit<MastraTool> {\n constructor(config: ChronaryToolkitConfig) {\n super(config);\n }\n\n protected buildTool(def: ToolDefinition): MastraTool {\n const client = this.client;\n return {\n id: def.name,\n description: def.description,\n inputSchema: def.schema,\n execute: async ({ context }: { context: Record<string, unknown> }) => {\n const result = await def.execute(client, context);\n if (result.isError) throw new Error(result.result as string);\n return result.result;\n },\n };\n }\n}\n","import { Chronary } from '@chronary/sdk';\nimport type { ToolDefinition, ToolName, ChronaryToolkitConfig } from './types';\nimport { TOOL_DEFINITIONS } from './definitions';\n\nfunction resolveClient(config: ChronaryToolkitConfig): Chronary {\n if ('client' in config && config.client) return config.client;\n const { tools: _tools, ...sdkConfig } = config as {\n apiKey?: string;\n baseUrl?: string;\n tools?: ToolName[];\n extraHeaders?: Record<string, string>;\n };\n return new Chronary(sdkConfig);\n}\n\nexport abstract class BaseToolkit<T> {\n protected readonly client: Chronary;\n protected readonly definitions: ToolDefinition[];\n\n constructor(config: ChronaryToolkitConfig) {\n this.client = resolveClient(config);\n this.definitions = config.tools\n ? TOOL_DEFINITIONS.filter((d) => (config.tools as ToolName[]).includes(d.name))\n : [...TOOL_DEFINITIONS];\n }\n\n /** Convert a framework-agnostic ToolDefinition into the adapter's native format */\n protected abstract buildTool(def: ToolDefinition): T;\n\n abstract getTools(): T[] | Record<string, T>;\n}\n\nexport abstract class ListToolkit<T> extends BaseToolkit<T> {\n getTools(): T[] {\n return this.definitions.map((def) => this.buildTool(def));\n }\n}\n\nexport abstract class MapToolkit<T> extends BaseToolkit<T> {\n getTools(): Record<string, T> {\n const map: Record<string, T> = {};\n for (const def of this.definitions) {\n map[def.name] = this.buildTool(def);\n }\n return map;\n }\n}\n","import { z } from 'zod';\n\n// ── Calendars ──────────────────────────────────────────────────\n\nexport const ListCalendarsSchema = z.object({\n agent_id: z.string().optional().describe('Filter calendars by agent ID'),\n include: z.enum(['all']).optional().describe('Set to \"all\" to include soft-deleted calendars'),\n limit: z.number().int().min(1).max(200).optional().describe('Max results per page (default 50)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetCalendarSchema = z.object({\n calendar_id: z.string().describe('The calendar ID to retrieve'),\n});\n\nexport const CreateCalendarSchema = z.object({\n name: z.string().describe('Calendar name'),\n timezone: z.string().describe('IANA timezone (e.g., \"America/New_York\")'),\n agent_id: z.string().optional().describe('Agent ID to associate the calendar with'),\n default_reminders: z.array(z.number().int().min(1).max(40320)).max(5).nullable().optional().describe('Default reminder offsets in minutes before start, inherited by events that don\\'t set their own (e.g. [10, 1440]). null/omit = system default (10 min); [] = no reminders. Max 5, each 1–40320.'),\n metadata: z.record(z.string(), z.unknown()).optional().describe('Arbitrary key-value metadata'),\n});\n\nexport const UpdateCalendarSchema = z.object({\n calendar_id: z.string().describe('The calendar ID to update'),\n name: z.string().optional().describe('New calendar name'),\n timezone: z.string().optional().describe('New IANA timezone'),\n default_reminders: z.array(z.number().int().min(1).max(40320)).max(5).nullable().optional().describe('New default reminder offsets in minutes before start. null = system default (10 min); [] = no reminders. Max 5, each 1–40320.'),\n metadata: z.record(z.string(), z.unknown()).optional().describe('Updated metadata'),\n});\n\nexport const DeleteCalendarSchema = z.object({\n calendar_id: z.string().describe('The calendar ID to delete'),\n});\n\n// ── Events ─────────────────────────────────────────────────────\n\nexport const ListEventsSchema = z.object({\n calendar_id: z.string().optional().describe('Calendar ID to list events from (provide this or agent_id)'),\n agent_id: z.string().optional().describe('Agent ID to list events for (provide this or calendar_id)'),\n start_after: z.string().optional().describe('Only events starting after this ISO 8601 datetime'),\n start_before: z.string().optional().describe('Only events starting before this ISO 8601 datetime'),\n status: z.enum(['confirmed', 'tentative', 'cancelled']).optional().describe('Filter by event status'),\n source: z.enum(['internal', 'external_ical']).optional().describe('Filter by event source'),\n limit: z.number().int().min(1).max(200).optional().describe('Max results per page (default 50)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetEventSchema = z.object({\n calendar_id: z.string().describe('Calendar ID the event belongs to'),\n event_id: z.string().describe('The event ID to retrieve'),\n});\n\nexport const CreateEventSchema = z.object({\n calendar_id: z.string().describe('Calendar ID to create the event on'),\n title: z.string().describe('Event title'),\n start_time: z.string().describe('Start time in ISO 8601 format'),\n end_time: z.string().describe('End time in ISO 8601 format'),\n description: z.string().optional().describe('Event description'),\n all_day: z.boolean().optional().describe('Whether this is an all-day event'),\n status: z.enum(['confirmed', 'tentative', 'cancelled']).optional().describe('Event status (default \"confirmed\")'),\n reminders: z.array(z.number().int().min(1).max(40320)).max(5).nullable().optional().describe('Reminder offsets in minutes before start (e.g. [10, 1440]). Each fires an event.reminder webhook. null/omit = inherit calendar default (then 10 min); [] = no reminders. Max 5, each 1–40320.'),\n metadata: z.record(z.string(), z.unknown()).optional().describe('Arbitrary key-value metadata'),\n});\n\nexport const UpdateEventSchema = z.object({\n calendar_id: z.string().describe('Calendar ID the event belongs to'),\n event_id: z.string().describe('The event ID to update'),\n title: z.string().optional().describe('New event title'),\n description: z.string().nullable().optional().describe('New description (null to clear)'),\n start_time: z.string().optional().describe('New start time in ISO 8601 format'),\n end_time: z.string().optional().describe('New end time in ISO 8601 format'),\n all_day: z.boolean().optional().describe('Whether this is an all-day event'),\n status: z.enum(['confirmed', 'tentative', 'cancelled']).optional().describe('New event status'),\n reminders: z.array(z.number().int().min(1).max(40320)).max(5).nullable().optional().describe('New reminder offsets in minutes before start. null = inherit calendar default; [] = no reminders. Max 5, each 1–40320.'),\n metadata: z.record(z.string(), z.unknown()).optional().describe('Updated metadata'),\n});\n\nexport const CancelEventSchema = z.object({\n calendar_id: z.string().describe('Calendar ID that owns the event'),\n event_id: z.string().describe('Event ID to cancel'),\n});\n\nexport const ConfirmEventSchema = z.object({\n event_id: z.string().describe('Event ID of the hold to confirm'),\n});\n\nexport const ReleaseEventSchema = z.object({\n event_id: z.string().describe('Event ID of the hold to release'),\n});\n\n// ── Agents ─────────────────────────────────────────────────────\n\nexport const CreateAgentSchema = z.object({\n name: z.string().min(1).max(255).describe('Display name for the agent'),\n type: z.enum(['ai', 'human', 'resource']).describe('Agent type'),\n description: z.string().optional().describe('Optional description'),\n metadata: z.record(z.string(), z.unknown()).optional().describe('Arbitrary key-value metadata'),\n});\n\nexport const ListAgentsSchema = z.object({\n type: z.enum(['ai', 'human', 'resource']).optional().describe('Filter by agent type'),\n status: z.enum(['active', 'paused', 'decommissioned']).optional().describe('Filter by status'),\n limit: z.number().int().min(1).max(200).optional().describe('Max results per page (default 50)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetAgentSchema = z.object({\n agent_id: z.string().describe('Agent ID to fetch'),\n});\n\nexport const UpdateAgentSchema = z.object({\n agent_id: z.string().describe('Agent ID to update'),\n name: z.string().min(1).max(255).optional().describe('New display name'),\n description: z.string().nullable().optional().describe('New description (null to clear)'),\n metadata: z.record(z.string(), z.unknown()).optional().describe('Arbitrary metadata (max 16KB)'),\n status: z.enum(['active', 'paused']).optional().describe('Operational status'),\n});\n\nexport const DeleteAgentSchema = z.object({\n agent_id: z.string().describe('Agent ID to decommission'),\n});\n\n// ── Availability ───────────────────────────────────────────────\n\nexport const GetAvailabilitySchema = z.object({\n agent_id: z.string().describe('Agent ID to check availability for'),\n start: z.string().describe('Range start (ISO 8601)'),\n end: z.string().describe('Range end (ISO 8601)'),\n slot_duration: z.enum(['15m', '30m', '45m', '1h', '2h']).optional().describe('Minimum slot duration required (default \"30m\")'),\n include_busy: z.boolean().optional().describe('Include busy blocks in response'),\n});\n\nexport const FindMeetingTimeSchema = z.object({\n agents: z.array(z.string()).min(1).describe('Array of agent IDs to find common free time for. All agents must be free during the returned slots.'),\n start: z.string().describe('Search range start (ISO 8601)'),\n end: z.string().describe('Search range end (ISO 8601)'),\n slot_duration: z.enum(['15m', '30m', '45m', '1h', '2h']).optional().describe('Minimum slot duration required (default \"30m\")'),\n calendars: z.array(z.string()).optional().describe('Additional shared calendar IDs to treat as busy'),\n include_busy: z.boolean().optional().describe('Include per-agent busy blocks in response'),\n});\n\n// ── Calendar context ───────────────────────────────────────────\n\nexport const GetCalendarContextSchema = z.object({\n calendar_id: z.string().describe('Calendar ID'),\n});\n\n// ── Scheduling proposals ───────────────────────────────────────\n\nconst proposalSlotSchema = z.object({\n start_time: z.string().describe('Slot start (ISO 8601)'),\n end_time: z.string().describe('Slot end (ISO 8601)'),\n weight: z.number().min(0).max(10).optional().describe('Preference weight (default 1.0)'),\n calendar_id: z.string().optional().describe('Override calendar for this slot'),\n});\n\nexport const CreateProposalSchema = z.object({\n title: z.string().min(1).max(500).describe('Short description of what the meeting is about'),\n description: z.string().max(5000).optional().describe('Longer context/agenda'),\n organizer_agent_id: z.string().describe('Agent ID proposing the meeting'),\n participant_agent_ids: z.array(z.string()).min(1).max(50).describe('Agent IDs invited to respond'),\n calendar_id: z.string().describe('Calendar the resolved event will be created on'),\n slots: z.array(proposalSlotSchema).min(1).max(20).describe('Candidate time slots (up to 20)'),\n expires_at: z.string().optional().describe('Auto-cancel cutoff if unresolved (ISO 8601)'),\n});\n\nexport const ListProposalsSchema = z.object({\n status: z.enum(['pending', 'confirmed', 'expired', 'cancelled']).optional().describe('Filter by proposal status'),\n organizer_agent_id: z.string().optional().describe('Filter by organizer agent'),\n limit: z.number().int().min(1).max(200).optional().describe('Max results (default 50)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetProposalSchema = z.object({\n proposal_id: z.string().describe('Proposal to fetch'),\n});\n\nexport const RespondToProposalSchema = z.object({\n proposal_id: z.string().describe('Proposal to respond to'),\n agent_id: z.string().describe('Participant agent responding'),\n response: z.enum(['accept', 'decline', 'counter']).describe('Decision from this agent'),\n selected_slot_id: z.string().optional().describe('Required when response is \"accept\"'),\n counter_slots: z.array(proposalSlotSchema).max(20).optional().describe('Alternative slots when response is \"counter\"'),\n message: z.string().max(2000).optional().describe('Optional note for the organizer'),\n});\n\nexport const ResolveProposalSchema = z.object({\n proposal_id: z.string().describe('Proposal to resolve'),\n});\n\nexport const CancelProposalSchema = z.object({\n proposal_id: z.string().describe('Proposal to cancel'),\n});\n\n// ── Availability rules ─────────────────────────────────────────\n\nconst workingHoursDaySchema = z.object({\n start: z.string().regex(/^([01]\\d|2[0-3]):[0-5]\\d$/, 'must be HH:MM in 24-hour time'),\n end: z.string().regex(/^([01]\\d|2[0-3]):[0-5]\\d$/, 'must be HH:MM in 24-hour time'),\n});\n\nconst workingHoursSchema = z.object({\n mon: workingHoursDaySchema.optional(),\n tue: workingHoursDaySchema.optional(),\n wed: workingHoursDaySchema.optional(),\n thu: workingHoursDaySchema.optional(),\n fri: workingHoursDaySchema.optional(),\n sat: workingHoursDaySchema.optional(),\n sun: workingHoursDaySchema.optional(),\n}).nullable();\n\nexport const SetAvailabilityRulesSchema = z.object({\n calendar_id: z.string().describe('Calendar to configure'),\n buffer_before_minutes: z.number().int().min(0).max(120).optional().describe('Minutes of buffer before each event (0–120)'),\n buffer_after_minutes: z.number().int().min(0).max(120).optional().describe('Minutes of buffer after each event (0–120)'),\n working_hours: workingHoursSchema.optional().describe('Per-day working hours map in the calendar\\'s timezone; omit keys for off-days. Pass null to remove any working-hours constraint.'),\n timezone: z.string().min(1).max(64).optional().describe('IANA timezone used to interpret working_hours (e.g. America/New_York)'),\n});\n\nexport const GetAvailabilityRulesSchema = z.object({\n calendar_id: z.string().describe('Calendar to read'),\n});\n\nexport const ClearAvailabilityRulesSchema = z.object({\n calendar_id: z.string().describe('Calendar whose rules should be cleared'),\n});\n\n// ── Scoped keys ────────────────────────────────────────────────\n\nexport const CreateScopedKeySchema = z.object({\n agent_id: z.string().regex(/^agt_/).describe('Agent ID this key is scoped to'),\n label: z.string().min(1).max(100).optional().describe('Human-readable label for the key'),\n});\n\nexport const ListScopedKeysSchema = z.object({});\n\nexport const RevokeScopedKeySchema = z.object({\n key_id: z.string().describe('ID of the scoped key to revoke'),\n});\n\n// ── Audit log ──────────────────────────────────────────────────\n\nexport const GetAuditLogSchema = z.object({\n from: z.string().optional().describe('Start of the window (ISO 8601). Silently clamped to the plan retention window if older.'),\n to: z.string().optional().describe('End of the window (ISO 8601)'),\n action: z.string().min(1).max(64).optional().describe('Filter by action name (e.g. event.created)'),\n actor_key_prefix: z.string().min(1).max(32).optional().describe('Filter by the API key prefix that performed the action'),\n cursor: z.string().min(1).max(256).optional().describe('Opaque pagination cursor from a previous response'),\n limit: z.number().int().min(1).max(200).optional().describe('Max results to return (default 50)'),\n});\n\n// ── Terms ──────────────────────────────────────────────────────\n\nexport const AcceptTermsSchema = z.object({\n tos_version: z.string().min(1).describe('The terms-of-service version to accept; must match the current version'),\n});\n\n// ── Webhooks ───────────────────────────────────────────────────\n\nexport const ListWebhooksSchema = z.object({\n limit: z.number().int().min(1).max(100).optional().describe('Max results per page (default 20)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetWebhookSchema = z.object({\n webhook_id: z.string().describe('The webhook ID to retrieve'),\n});\n\nexport const CreateWebhookSchema = z.object({\n url: z.string().describe('HTTPS URL to receive webhook payloads'),\n events: z.array(z.string()).describe('Event types to subscribe to (e.g., [\"event.created\", \"event.updated\"])'),\n});\n\nexport const UpdateWebhookSchema = z.object({\n webhook_id: z.string().describe('The webhook ID to update'),\n url: z.string().optional().describe('New webhook URL'),\n events: z.array(z.string()).optional().describe('New event type subscriptions'),\n active: z.boolean().optional().describe('Enable or disable the webhook'),\n});\n\nexport const DeleteWebhookSchema = z.object({\n webhook_id: z.string().describe('The webhook ID to delete'),\n});\n\n// ── iCal Subscriptions ─────────────────────────────────────────\n\nexport const ListICalSubscriptionsSchema = z.object({\n agent_id: z.string().describe('Agent ID to list subscriptions for'),\n status: z.enum(['active', 'error', 'paused']).optional().describe('Filter by subscription status'),\n limit: z.number().int().min(1).max(200).optional().describe('Max results per page (default 50)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n});\n\nexport const GetICalSubscriptionSchema = z.object({\n subscription_id: z.string().describe('The iCal subscription ID to retrieve'),\n});\n\nexport const SubscribeICalSchema = z.object({\n agent_id: z.string().describe('Agent ID that will own this subscription'),\n calendar_id: z.string().describe('Calendar ID to sync external events into'),\n url: z.string().url().describe('HTTPS URL of the iCal feed (.ics) to subscribe to'),\n label: z.string().optional().describe('Optional label for this subscription'),\n});\n\nexport const ListWebhookDeliveriesSchema = z.object({\n webhook_id: z.string().describe('Webhook subscription whose deliveries to list'),\n limit: z.number().int().min(1).max(100).optional().describe('Max results to return (default 20)'),\n offset: z.number().int().min(0).optional().describe('Pagination offset (default 0)'),\n status: z.enum(['pending', 'delivered', 'failed']).optional().describe('Filter to a single delivery status'),\n include_payload: z.boolean().optional().describe('Include the full event payload sent on each delivery'),\n});\n\nexport const UpdateICalSubscriptionSchema = z.object({\n subscription_id: z.string().describe('The iCal subscription ID to update'),\n label: z.string().optional().describe('New label'),\n url: z.string().optional().describe('New iCal feed URL'),\n});\n\nexport const DeleteICalSubscriptionSchema = z.object({\n subscription_id: z.string().describe('The iCal subscription ID to delete'),\n});\n\nexport const SyncICalSubscriptionSchema = z.object({\n subscription_id: z.string().describe('The iCal subscription ID to sync immediately'),\n});\n\n// ── Usage ──────────────────────────────────────────────────────\n\nexport const GetUsageSchema = z.object({});\n","import { ChronaryError } from '@chronary/sdk';\nimport type { ToolResult } from './types';\n\n/**\n * Wraps an async function so SDK errors become structured ToolResult objects\n * instead of thrown exceptions. LLMs see error messages, never stack traces.\n */\nexport function safeFunc<TParams>(\n fn: (params: TParams) => Promise<unknown>,\n): (params: TParams) => Promise<ToolResult> {\n return async (params: TParams): Promise<ToolResult> => {\n try {\n const result = await fn(params);\n return { result: result ?? { success: true }, isError: false };\n } catch (err) {\n if (err instanceof ChronaryError) {\n return { result: `${err.name}: ${err.message}`, isError: true };\n }\n return {\n result: `Error: ${err instanceof Error ? err.message : String(err)}`,\n isError: true,\n };\n }\n };\n}\n","import type { Chronary } from '@chronary/sdk';\nimport { safeFunc } from './safe';\nimport type { ToolResult } from './types';\n\ninterface Ctx<P = Record<string, unknown>> {\n client: Chronary;\n params: P;\n}\n\n// Helper to consume a PageIterator's first page\nasync function fetchPage(\n iterator: AsyncIterable<unknown> & { getPage(offset?: number, limit?: number): Promise<{ data: unknown[]; total: number; hasMore: boolean }> },\n offset?: number,\n limit?: number,\n) {\n const page = await iterator.getPage(offset ?? 0, limit);\n return { data: page.data, total: page.total, has_more: page.hasMore };\n}\n\n// ── Calendars ──────────────────────────────────────────────────\n\nexport const listCalendars = safeFunc(async (ctx: Ctx<{\n agent_id?: string; include?: 'all'; limit?: number; offset?: number;\n}>) => {\n const { client, params } = ctx;\n const iter = client.calendars.list({ agentId: params.agent_id, include: params.include, limit: params.limit });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getCalendar = safeFunc(async (ctx: Ctx<{ calendar_id: string }>) => {\n return ctx.client.calendars.get(ctx.params.calendar_id);\n});\n\nexport const createCalendar = safeFunc(async (ctx: Ctx<{\n name: string; timezone: string; agent_id?: string; default_reminders?: number[] | null; metadata?: Record<string, unknown>;\n}>) => {\n const { client, params } = ctx;\n return client.calendars.create({\n name: params.name,\n timezone: params.timezone,\n agentId: params.agent_id,\n default_reminders: params.default_reminders,\n metadata: params.metadata,\n });\n});\n\nexport const updateCalendar = safeFunc(async (ctx: Ctx<{\n calendar_id: string; name?: string; timezone?: string; default_reminders?: number[] | null; metadata?: Record<string, unknown>;\n}>) => {\n const { client, params } = ctx;\n const { calendar_id, ...updates } = params;\n return client.calendars.update(calendar_id, updates);\n});\n\nexport const deleteCalendar = safeFunc(async (ctx: Ctx<{ calendar_id: string }>) => {\n await ctx.client.calendars.delete(ctx.params.calendar_id);\n return undefined; // safeFunc normalizes to { success: true }\n});\n\n// ── Events ─────────────────────────────────────────────────────\n\nexport const listEvents = safeFunc(async (ctx: Ctx<{\n calendar_id?: string; agent_id?: string; start_after?: string; start_before?: string;\n status?: 'confirmed' | 'tentative' | 'cancelled'; source?: 'internal' | 'external_ical';\n limit?: number; offset?: number;\n}>) => {\n const { client, params } = ctx;\n const iter = client.events.list({\n calendarId: params.calendar_id,\n agentId: params.agent_id,\n start_after: params.start_after,\n start_before: params.start_before,\n status: params.status,\n source: params.source,\n limit: params.limit,\n });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getEvent = safeFunc(async (ctx: Ctx<{ calendar_id: string; event_id: string }>) => {\n return ctx.client.events.get(ctx.params.calendar_id, ctx.params.event_id);\n});\n\nexport const createEvent = safeFunc(async (ctx: Ctx<{\n calendar_id: string; title: string; start_time: string; end_time: string;\n description?: string; all_day?: boolean;\n status?: 'confirmed' | 'tentative' | 'cancelled'; reminders?: number[] | null; metadata?: Record<string, unknown>;\n}>) => {\n const { client, params } = ctx;\n const { calendar_id, ...eventParams } = params;\n return client.events.create(calendar_id, eventParams);\n});\n\nexport const updateEvent = safeFunc(async (ctx: Ctx<{\n calendar_id: string; event_id: string; title?: string; description?: string | null;\n start_time?: string; end_time?: string; all_day?: boolean;\n status?: 'confirmed' | 'tentative' | 'cancelled'; reminders?: number[] | null; metadata?: Record<string, unknown>;\n}>) => {\n const { client, params } = ctx;\n const { calendar_id, event_id, ...updates } = params;\n return client.events.update(calendar_id, event_id, updates);\n});\n\nexport const cancelEvent = safeFunc(async (ctx: Ctx<{ calendar_id: string; event_id: string }>) => {\n await ctx.client.events.delete(ctx.params.calendar_id, ctx.params.event_id);\n return undefined;\n});\n\nexport const confirmEvent = safeFunc(async (ctx: Ctx<{ event_id: string }>) => {\n return ctx.client.events.confirm(ctx.params.event_id);\n});\n\nexport const releaseEvent = safeFunc(async (ctx: Ctx<{ event_id: string }>) => {\n return ctx.client.events.release(ctx.params.event_id);\n});\n\n// ── Agents ─────────────────────────────────────────────────────\n\nexport const createAgent = safeFunc(async (ctx: Ctx<{\n name: string; type: 'ai' | 'human' | 'resource'; description?: string; metadata?: Record<string, unknown>;\n}>) => {\n return ctx.client.agents.create(ctx.params);\n});\n\nexport const listAgents = safeFunc(async (ctx: Ctx<{\n type?: 'ai' | 'human' | 'resource'; status?: 'active' | 'paused' | 'decommissioned'; limit?: number; offset?: number;\n}>) => {\n const { client, params } = ctx;\n const iter = client.agents.list({ type: params.type, status: params.status, limit: params.limit });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getAgent = safeFunc(async (ctx: Ctx<{ agent_id: string }>) => {\n return ctx.client.agents.get(ctx.params.agent_id);\n});\n\nexport const updateAgent = safeFunc(async (ctx: Ctx<{\n agent_id: string; name?: string; description?: string | null; metadata?: Record<string, unknown>; status?: 'active' | 'paused';\n}>) => {\n const { client, params } = ctx;\n const { agent_id, ...updates } = params;\n return client.agents.update(agent_id, updates);\n});\n\nexport const deleteAgent = safeFunc(async (ctx: Ctx<{ agent_id: string }>) => {\n await ctx.client.agents.delete(ctx.params.agent_id);\n return undefined;\n});\n\n// ── Availability ───────────────────────────────────────────────\n\nexport const getAvailability = safeFunc(async (ctx: Ctx<{\n agent_id: string; start: string; end: string;\n slot_duration?: '15m' | '30m' | '45m' | '1h' | '2h'; include_busy?: boolean;\n}>) => {\n const { client, params } = ctx;\n return client.availability.forAgent(params.agent_id, {\n start: params.start,\n end: params.end,\n slot_duration: params.slot_duration,\n include_busy: params.include_busy,\n });\n});\n\nexport const findMeetingTime = safeFunc(async (ctx: Ctx<{\n agents: string[]; start: string; end: string;\n slot_duration?: '15m' | '30m' | '45m' | '1h' | '2h';\n calendars?: string[]; include_busy?: boolean;\n}>) => {\n return ctx.client.availability.check(ctx.params);\n});\n\n// ── Calendar context ───────────────────────────────────────────\n\nexport const getCalendarContext = safeFunc(async (ctx: Ctx<{ calendar_id: string }>) => {\n return ctx.client.calendars.getContext(ctx.params.calendar_id);\n});\n\n// ── Scheduling proposals ───────────────────────────────────────\n\ninterface ProposalSlotInput {\n start_time: string;\n end_time: string;\n weight?: number;\n calendar_id?: string;\n}\n\nexport const createProposal = safeFunc(async (ctx: Ctx<{\n title: string; description?: string; organizer_agent_id: string;\n participant_agent_ids: string[]; calendar_id: string;\n slots: ProposalSlotInput[]; expires_at?: string;\n}>) => {\n return ctx.client.scheduling.create(ctx.params);\n});\n\nexport const listProposals = safeFunc(async (ctx: Ctx<{\n status?: 'pending' | 'confirmed' | 'expired' | 'cancelled'; organizer_agent_id?: string; limit?: number; offset?: number;\n}>) => {\n const { client, params } = ctx;\n const iter = client.scheduling.list({\n status: params.status,\n organizer_agent_id: params.organizer_agent_id,\n limit: params.limit,\n });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getProposal = safeFunc(async (ctx: Ctx<{ proposal_id: string }>) => {\n return ctx.client.scheduling.get(ctx.params.proposal_id);\n});\n\nexport const respondToProposal = safeFunc(async (ctx: Ctx<{\n proposal_id: string; agent_id: string; response: 'accept' | 'decline' | 'counter';\n selected_slot_id?: string; counter_slots?: ProposalSlotInput[]; message?: string;\n}>) => {\n const { client, params } = ctx;\n const { proposal_id, ...body } = params;\n return client.scheduling.respond(proposal_id, body);\n});\n\nexport const resolveProposal = safeFunc(async (ctx: Ctx<{ proposal_id: string }>) => {\n return ctx.client.scheduling.resolve(ctx.params.proposal_id);\n});\n\nexport const cancelProposal = safeFunc(async (ctx: Ctx<{ proposal_id: string }>) => {\n return ctx.client.scheduling.cancel(ctx.params.proposal_id);\n});\n\n// ── Availability rules ─────────────────────────────────────────\n\ninterface WorkingHoursDayInput { start: string; end: string; }\ntype WorkingHoursInput = {\n mon?: WorkingHoursDayInput; tue?: WorkingHoursDayInput; wed?: WorkingHoursDayInput;\n thu?: WorkingHoursDayInput; fri?: WorkingHoursDayInput; sat?: WorkingHoursDayInput; sun?: WorkingHoursDayInput;\n} | null;\n\nexport const setAvailabilityRules = safeFunc(async (ctx: Ctx<{\n calendar_id: string; buffer_before_minutes?: number; buffer_after_minutes?: number;\n working_hours?: WorkingHoursInput; timezone?: string;\n}>) => {\n const { client, params } = ctx;\n const { calendar_id, ...rules } = params;\n return client.calendars.setAvailabilityRules(calendar_id, rules);\n});\n\nexport const getAvailabilityRules = safeFunc(async (ctx: Ctx<{ calendar_id: string }>) => {\n return ctx.client.calendars.getAvailabilityRules(ctx.params.calendar_id);\n});\n\nexport const clearAvailabilityRules = safeFunc(async (ctx: Ctx<{ calendar_id: string }>) => {\n await ctx.client.calendars.deleteAvailabilityRules(ctx.params.calendar_id);\n return undefined;\n});\n\n// ── Scoped keys ────────────────────────────────────────────────\n\nexport const createScopedKey = safeFunc(async (ctx: Ctx<{ agent_id: string; label?: string }>) => {\n return ctx.client.keys.create(ctx.params);\n});\n\nexport const listScopedKeys = safeFunc(async (ctx: Ctx) => {\n return ctx.client.keys.list();\n});\n\nexport const revokeScopedKey = safeFunc(async (ctx: Ctx<{ key_id: string }>) => {\n await ctx.client.keys.delete(ctx.params.key_id);\n return undefined;\n});\n\n// ── Webhooks ───────────────────────────────────────────────────\n\nexport const listWebhooks = safeFunc(async (ctx: Ctx<{ limit?: number; offset?: number }>) => {\n const { client, params } = ctx;\n const iter = client.webhooks.list({ limit: params.limit });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getWebhook = safeFunc(async (ctx: Ctx<{ webhook_id: string }>) => {\n return ctx.client.webhooks.get(ctx.params.webhook_id);\n});\n\nexport const createWebhook = safeFunc(async (ctx: Ctx<{ url: string; events: string[] }>) => {\n return ctx.client.webhooks.create(ctx.params);\n});\n\nexport const updateWebhook = safeFunc(async (ctx: Ctx<{\n webhook_id: string; url?: string; events?: string[]; active?: boolean;\n}>) => {\n const { client, params } = ctx;\n const { webhook_id, ...updates } = params;\n return client.webhooks.update(webhook_id, updates);\n});\n\nexport const deleteWebhook = safeFunc(async (ctx: Ctx<{ webhook_id: string }>) => {\n await ctx.client.webhooks.delete(ctx.params.webhook_id);\n return undefined;\n});\n\nexport const listWebhookDeliveries = safeFunc(async (ctx: Ctx<{\n webhook_id: string; limit?: number; offset?: number;\n status?: 'pending' | 'delivered' | 'failed'; include_payload?: boolean;\n}>) => {\n const { client, params } = ctx;\n const { webhook_id, ...query } = params;\n return client.webhooks.listDeliveries(webhook_id, query);\n});\n\n// ── Audit log ──────────────────────────────────────────────────\n\nexport const getAuditLog = safeFunc(async (ctx: Ctx<{\n from?: string; to?: string; action?: string; actor_key_prefix?: string; cursor?: string; limit?: number;\n}>) => {\n return ctx.client.auditLog.list(ctx.params);\n});\n\n// ── Terms ──────────────────────────────────────────────────────\n\nexport const acceptTerms = safeFunc(async (ctx: Ctx<{ tos_version: string }>) => {\n return ctx.client.terms.accept(ctx.params);\n});\n\n// ── iCal Subscriptions ─────────────────────────────────────────\n\nexport const listICalSubscriptions = safeFunc(async (ctx: Ctx<{\n agent_id: string; status?: 'active' | 'error' | 'paused'; limit?: number; offset?: number;\n}>) => {\n const { client, params } = ctx;\n const iter = client.icalSubscriptions.list({\n agentId: params.agent_id,\n status: params.status,\n limit: params.limit,\n });\n return fetchPage(iter, params.offset, params.limit);\n});\n\nexport const getICalSubscription = safeFunc(async (ctx: Ctx<{ subscription_id: string }>) => {\n return ctx.client.icalSubscriptions.get(ctx.params.subscription_id);\n});\n\nexport const subscribeICal = safeFunc(async (ctx: Ctx<{\n agent_id: string; calendar_id: string; url: string; label?: string;\n}>) => {\n const { client, params } = ctx;\n const { agent_id, ...subParams } = params;\n return client.icalSubscriptions.create(agent_id, subParams);\n});\n\nexport const updateICalSubscription = safeFunc(async (ctx: Ctx<{\n subscription_id: string; label?: string; url?: string;\n}>) => {\n const { client, params } = ctx;\n const { subscription_id, ...updates } = params;\n return client.icalSubscriptions.update(subscription_id, updates);\n});\n\nexport const deleteICalSubscription = safeFunc(async (ctx: Ctx<{ subscription_id: string }>) => {\n await ctx.client.icalSubscriptions.delete(ctx.params.subscription_id);\n return undefined;\n});\n\nexport const syncICalSubscription = safeFunc(async (ctx: Ctx<{ subscription_id: string }>) => {\n return ctx.client.icalSubscriptions.sync(ctx.params.subscription_id);\n});\n\n// ── Usage ──────────────────────────────────────────────────────\n\nexport const getUsage = safeFunc(async (ctx: Ctx) => {\n return ctx.client.usage.get();\n});\n\n// ── Factory ────────────────────────────────────────────────────\n\n/** Map of tool name → executor function. Used by definitions.ts to wire up execute(). */\nexport function createExecutor(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fn: (ctx: { client: Chronary; params: any }) => Promise<ToolResult>,\n): (client: Chronary, params: Record<string, unknown>) => Promise<ToolResult> {\n return (client, params) => fn({ client, params });\n}\n","import type { ToolDefinition } from './types';\nimport * as schemas from './schemas';\nimport * as fns from './functions';\nimport { createExecutor } from './functions';\n\nexport const HOSTED_API_MCP_TOOL_NAMES = [\n 'create_agent',\n 'list_agents',\n 'create_calendar',\n 'create_event',\n 'list_events',\n 'get_event',\n 'update_event',\n 'get_availability',\n 'find_meeting_time',\n 'cancel_event',\n 'confirm_event',\n 'release_event',\n 'subscribe_ical',\n 'list_ical_subscriptions',\n 'get_ical_subscription',\n 'update_ical_subscription',\n 'delete_ical_subscription',\n 'sync_ical_subscription',\n 'get_calendar_context',\n 'create_proposal',\n 'list_proposals',\n 'get_proposal',\n 'respond_to_proposal',\n 'resolve_proposal',\n 'cancel_proposal',\n 'set_availability_rules',\n 'get_availability_rules',\n 'clear_availability_rules',\n 'create_scoped_key',\n 'list_scoped_keys',\n 'revoke_scoped_key',\n 'create_webhook',\n 'list_webhooks',\n 'get_webhook',\n 'update_webhook',\n 'delete_webhook',\n 'list_webhook_deliveries',\n 'get_agent',\n 'update_agent',\n 'delete_agent',\n 'list_calendars',\n 'get_calendar',\n 'update_calendar',\n 'delete_calendar',\n 'get_usage',\n 'get_audit_log',\n 'accept_terms',\n] as const;\n\nexport const TOOL_DEFINITIONS: ToolDefinition[] = [\n // ── Calendars ──────────────────────────────────────────────────\n {\n name: 'list_calendars',\n description: 'List calendars, optionally filtered by agent. Returns paginated results.',\n schema: schemas.ListCalendarsSchema,\n annotations: { title: 'List Calendars', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listCalendars),\n },\n {\n name: 'get_calendar',\n description: 'Get a calendar by its ID, including its name, timezone, and iCal feed URL.',\n schema: schemas.GetCalendarSchema,\n annotations: { title: 'Get Calendar', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getCalendar),\n },\n {\n name: 'create_calendar',\n description: 'Create a new calendar. Specify a name and IANA timezone. Optionally scope it to an agent.',\n schema: schemas.CreateCalendarSchema,\n annotations: { title: 'Create Calendar', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.createCalendar),\n },\n {\n name: 'update_calendar',\n description: 'Update a calendar\\'s name, timezone, or metadata.',\n schema: schemas.UpdateCalendarSchema,\n annotations: { title: 'Update Calendar', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.updateCalendar),\n },\n {\n name: 'delete_calendar',\n description: 'Permanently delete a calendar and all its events.',\n schema: schemas.DeleteCalendarSchema,\n annotations: { title: 'Delete Calendar', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.deleteCalendar),\n },\n\n // ── Events ─────────────────────────────────────────────────────\n {\n name: 'list_events',\n description: 'List events on a calendar or for an agent. Supports date range and status filters. Provide calendar_id or agent_id.',\n schema: schemas.ListEventsSchema,\n annotations: { title: 'List Events', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listEvents),\n },\n {\n name: 'get_event',\n description: 'Get a specific event by its calendar ID and event ID.',\n schema: schemas.GetEventSchema,\n annotations: { title: 'Get Event', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getEvent),\n },\n {\n name: 'create_event',\n description: 'Create a new event on a calendar. The event blocks the agent\\'s availability during the specified time window and appears in availability queries.',\n schema: schemas.CreateEventSchema,\n annotations: { title: 'Create Event', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.createEvent),\n },\n {\n name: 'update_event',\n description: 'Update an existing event\\'s title, times, status, or other properties.',\n schema: schemas.UpdateEventSchema,\n annotations: { title: 'Update Event', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.updateEvent),\n },\n {\n name: 'cancel_event',\n description: 'Delete or cancel an event from a calendar. The event is marked cancelled and excluded from future availability calculations.',\n schema: schemas.CancelEventSchema,\n annotations: { title: 'Cancel Event', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.cancelEvent),\n },\n {\n name: 'confirm_event',\n description: 'Promote a held event to a confirmed booking. The event must currently have status=\"hold\" and its hold_expires_at must not have passed.',\n schema: schemas.ConfirmEventSchema,\n annotations: { title: 'Confirm Event', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.confirmEvent),\n },\n {\n name: 'release_event',\n description: 'Manually release a held event before its hold_expires_at. The event must currently have status=\"hold\". Frees the slot for other agents to book.',\n schema: schemas.ReleaseEventSchema,\n annotations: { title: 'Release Event', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.releaseEvent),\n },\n\n // ── Agents ─────────────────────────────────────────────────────\n {\n name: 'create_agent',\n description: 'Register your agent (AI assistant, human participant, or resource) with Chronary so it can own calendars, events, and webhooks.',\n schema: schemas.CreateAgentSchema,\n annotations: { title: 'Create Agent', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.createAgent),\n },\n {\n name: 'list_agents',\n description: 'List all agents in your organization. Returns paginated results.',\n schema: schemas.ListAgentsSchema,\n annotations: { title: 'List Agents', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listAgents),\n },\n {\n name: 'get_agent',\n description: 'Fetch a single agent by ID. An agent represents an AI assistant, human, or shared resource (e.g. a meeting room).',\n schema: schemas.GetAgentSchema,\n annotations: { title: 'Get Agent', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getAgent),\n },\n {\n name: 'update_agent',\n description: 'Update an agent\\'s name, description, metadata, or status (active/paused). Requires an org-level API key.',\n schema: schemas.UpdateAgentSchema,\n annotations: { title: 'Update Agent', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.updateAgent),\n },\n {\n name: 'delete_agent',\n description: 'Decommission an agent. This marks the agent as decommissioned and revokes all of its scoped API keys. Requires an org-level API key.',\n schema: schemas.DeleteAgentSchema,\n annotations: { title: 'Delete Agent', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.deleteAgent),\n },\n\n // ── Availability ───────────────────────────────────────────────\n {\n name: 'get_availability',\n description: 'Check when a single agent is free within a time range. Returns available time slots and optionally busy blocks.',\n schema: schemas.GetAvailabilitySchema,\n annotations: { title: 'Get Availability', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getAvailability),\n },\n {\n name: 'find_meeting_time',\n description: 'Find time slots when multiple agents are all free simultaneously. All agents must be free during the returned slots.',\n schema: schemas.FindMeetingTimeSchema,\n annotations: { title: 'Find Meeting Time', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.findMeetingTime),\n },\n\n // ── Calendar context ───────────────────────────────────────────\n {\n name: 'get_calendar_context',\n description: 'Get a calendar\\'s temporal context in a single call: the current event, the next upcoming event, recent past events, a short upcoming window, and the owning agent\\'s status.',\n schema: schemas.GetCalendarContextSchema,\n annotations: { title: 'Get Calendar Context', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getCalendarContext),\n },\n\n // ── Scheduling proposals ───────────────────────────────────────\n {\n name: 'create_proposal',\n description: 'Create a scheduling proposal — send candidate time slots to one or more participant agents so they can accept, decline, or counter-propose. Requires an org-level API key. Pro plan only.',\n schema: schemas.CreateProposalSchema,\n annotations: { title: 'Create Proposal', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.createProposal),\n },\n {\n name: 'list_proposals',\n description: 'List scheduling proposals for the org. Filter by status or organizer_agent_id. Requires an org-level API key.',\n schema: schemas.ListProposalsSchema,\n annotations: { title: 'List Proposals', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listProposals),\n },\n {\n name: 'get_proposal',\n description: 'Get a scheduling proposal by id, including its slots and per-participant responses. Requires an org-level API key.',\n schema: schemas.GetProposalSchema,\n annotations: { title: 'Get Proposal', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getProposal),\n },\n {\n name: 'respond_to_proposal',\n description: 'Submit a response (accept / decline / counter) on behalf of one participant agent to an open proposal. Requires an org-level API key. Pro plan only.',\n schema: schemas.RespondToProposalSchema,\n annotations: { title: 'Respond To Proposal', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.respondToProposal),\n },\n {\n name: 'resolve_proposal',\n description: 'Force-resolve an open proposal using responses collected so far. Picks the highest-scoring slot and creates a confirmed calendar event. Requires an org-level API key. Pro plan only.',\n schema: schemas.ResolveProposalSchema,\n annotations: { title: 'Resolve Proposal', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.resolveProposal),\n },\n {\n name: 'cancel_proposal',\n description: 'Cancel an open proposal. Fires a proposal.cancelled webhook with reason=\"organizer_cancelled\". Requires an org-level API key. Pro plan only.',\n schema: schemas.CancelProposalSchema,\n annotations: { title: 'Cancel Proposal', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.cancelProposal),\n },\n\n // ── Availability rules ─────────────────────────────────────────\n {\n name: 'set_availability_rules',\n description: 'Set or replace the availability rules on a calendar — buffer times before/after events and optional per-day working hours. Upsert: overwrites any existing rules.',\n schema: schemas.SetAvailabilityRulesSchema,\n annotations: { title: 'Set Availability Rules', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.setAvailabilityRules),\n },\n {\n name: 'get_availability_rules',\n description: 'Read the buffer times and working-hours rules configured on a calendar. Returns the rules row, or an error if none are set.',\n schema: schemas.GetAvailabilityRulesSchema,\n annotations: { title: 'Get Availability Rules', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getAvailabilityRules),\n },\n {\n name: 'clear_availability_rules',\n description: 'Remove the availability rules from a calendar, reverting to the default (no buffers, no working-hours mask).',\n schema: schemas.ClearAvailabilityRulesSchema,\n annotations: { title: 'Clear Availability Rules', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.clearAvailabilityRules),\n },\n\n // ── Webhooks ───────────────────────────────────────────────────\n {\n name: 'list_webhooks',\n description: 'List all webhook subscriptions for the organization.',\n schema: schemas.ListWebhooksSchema,\n annotations: { title: 'List Webhooks', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listWebhooks),\n },\n {\n name: 'get_webhook',\n description: 'Get a webhook subscription by its ID.',\n schema: schemas.GetWebhookSchema,\n annotations: { title: 'Get Webhook', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getWebhook),\n },\n {\n name: 'create_webhook',\n description: 'Create a webhook subscription to receive event notifications at a URL. Payloads are signed with HMAC-SHA256.',\n schema: schemas.CreateWebhookSchema,\n annotations: { title: 'Create Webhook', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.createWebhook),\n },\n {\n name: 'update_webhook',\n description: 'Update a webhook\\'s URL, subscribed events, or active status.',\n schema: schemas.UpdateWebhookSchema,\n annotations: { title: 'Update Webhook', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.updateWebhook),\n },\n {\n name: 'delete_webhook',\n description: 'Delete a webhook subscription. No further events will be delivered to this URL.',\n schema: schemas.DeleteWebhookSchema,\n annotations: { title: 'Delete Webhook', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.deleteWebhook),\n },\n {\n name: 'list_webhook_deliveries',\n description: 'List delivery attempts for a webhook subscription, with per-status counts (pending/delivered/failed). Use this to debug failing deliveries. Requires an org-level API key.',\n schema: schemas.ListWebhookDeliveriesSchema,\n annotations: { title: 'List Webhook Deliveries', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listWebhookDeliveries),\n },\n\n // ── iCal Subscriptions ─────────────────────────────────────────\n {\n name: 'list_ical_subscriptions',\n description: 'List external calendar imports (iCal subscriptions) for an agent.',\n schema: schemas.ListICalSubscriptionsSchema,\n annotations: { title: 'List iCal Subscriptions', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listICalSubscriptions),\n },\n {\n name: 'get_ical_subscription',\n description: 'Get an iCal subscription by its ID, including sync status and last error.',\n schema: schemas.GetICalSubscriptionSchema,\n annotations: { title: 'Get iCal Subscription', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getICalSubscription),\n },\n {\n name: 'subscribe_ical',\n description: 'Link an external iCal feed (e.g. a human\\'s Google Calendar) to an agent\\'s calendar so external events appear in availability calculations. Events are synced every 30 minutes.',\n schema: schemas.SubscribeICalSchema,\n annotations: { title: 'Subscribe iCal', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },\n execute: createExecutor(fns.subscribeICal),\n },\n {\n name: 'update_ical_subscription',\n description: 'Update an iCal subscription\\'s label or feed URL.',\n schema: schemas.UpdateICalSubscriptionSchema,\n annotations: { title: 'Update iCal Subscription', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.updateICalSubscription),\n },\n {\n name: 'delete_ical_subscription',\n description: 'Remove an external calendar import. Previously synced events remain on the calendar.',\n schema: schemas.DeleteICalSubscriptionSchema,\n annotations: { title: 'Delete iCal Subscription', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.deleteICalSubscription),\n },\n {\n name: 'sync_ical_subscription',\n description: 'Trigger an immediate sync of an iCal subscription instead of waiting for the next 30-minute poll.',\n schema: schemas.SyncICalSubscriptionSchema,\n annotations: { title: 'Sync iCal Subscription', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },\n execute: createExecutor(fns.syncICalSubscription),\n },\n\n // ── Scoped keys ────────────────────────────────────────────────\n {\n name: 'create_scoped_key',\n description: 'Create an agent-scoped API key (chr_ak_*) that can only act on behalf of a single agent. The plaintext key is returned exactly once. Requires an org-level API key.',\n schema: schemas.CreateScopedKeySchema,\n annotations: { title: 'Create Scoped Key', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },\n execute: createExecutor(fns.createScopedKey),\n },\n {\n name: 'list_scoped_keys',\n description: 'List all live (non-revoked) agent-scoped API keys for this org. Returns key metadata only — never the plaintext secret. Requires an org-level API key.',\n schema: schemas.ListScopedKeysSchema,\n annotations: { title: 'List Scoped Keys', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.listScopedKeys),\n },\n {\n name: 'revoke_scoped_key',\n description: 'Revoke an agent-scoped API key by ID. The key stops authenticating immediately and cannot be un-revoked. Requires an org-level API key.',\n schema: schemas.RevokeScopedKeySchema,\n annotations: { title: 'Revoke Scoped Key', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.revokeScopedKey),\n },\n\n // ── Audit log ──────────────────────────────────────────────────\n {\n name: 'get_audit_log',\n description: 'List audit-log entries for the calling org — mutating operations and auth-lifecycle events, newest first. Results are clamped to the plan\\'s retention window. Requires an org-level API key.',\n schema: schemas.GetAuditLogSchema,\n annotations: { title: 'Get Audit Log', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getAuditLog),\n },\n\n // ── Terms ──────────────────────────────────────────────────────\n {\n name: 'accept_terms',\n description: 'Re-accept the current Chronary terms of service on behalf of the calling org. Use this when responses carry the Chronary-Terms-Upgrade-Required header. Requires an org-level API key.',\n schema: schemas.AcceptTermsSchema,\n annotations: { title: 'Accept Terms', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.acceptTerms),\n },\n\n // ── Usage ──────────────────────────────────────────────────────\n {\n name: 'get_usage',\n description: 'Get quota and usage statistics for the current billing period.',\n schema: schemas.GetUsageSchema,\n annotations: { title: 'Get Usage', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n execute: createExecutor(fns.getUsage),\n },\n];\n\nconst toolkitToolNames = new Set<string>(TOOL_DEFINITIONS.map((tool) => tool.name));\nconst hostedToolNames = new Set<string>(HOSTED_API_MCP_TOOL_NAMES);\n\nexport const TOOLKIT_MCP_PARITY = {\n hostedToolNames: HOSTED_API_MCP_TOOL_NAMES,\n missingHostedTools: HOSTED_API_MCP_TOOL_NAMES.filter((name) => !toolkitToolNames.has(name)),\n toolkitOnlyTools: TOOL_DEFINITIONS.map((tool) => tool.name).filter((name) => !hostedToolNames.has(name)),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,cAAyB;;;ACAzB,iBAAkB;AAIX,IAAM,sBAAsB,aAAE,OAAO;AAAA,EAC1C,UAAU,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,8BAA8B;AAAA,EACvE,SAAS,aAAE,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,SAAS,gDAAgD;AAAA,EAC7F,OAAO,aAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS,mCAAmC;AAAA,EAC/F,QAAQ,aAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,+BAA+B;AACrF,CAAC;AAEM,IAAM,oBAAoB,aAAE,OAAO;AAAA,EACxC,aAAa,aAAE,OAAO,EAAE,SAAS,6BAA6B;AAChE,CAAC;AAEM,IAAM,uBAAuB,aAAE,OAAO;AAAA,EAC3C,MAAM,aAAE,OAAO,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