@chronary/toolkit 0.1.3 → 1.1.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/ai-sdk.cjs +590 -117
- 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 +590 -117
- 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 +644 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +339 -252
- package/dist/index.d.ts +339 -252
- package/dist/index.js +644 -123
- package/dist/index.js.map +1 -1
- package/dist/langchain.cjs +590 -117
- 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 +590 -117
- package/dist/langchain.js.map +1 -1
- package/dist/mastra.cjs +590 -117
- 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 +590 -117
- package/dist/mastra.js.map +1 -1
- package/dist/mcp.cjs +592 -119
- 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 +592 -119
- package/dist/mcp.js.map +1 -1
- package/dist/openai.cjs +593 -120
- 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 +593 -120
- package/dist/openai.js.map +1 -1
- package/package.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -41,166 +41,372 @@ var TOOL_NAMES = [
|
|
|
41
41
|
"get_event",
|
|
42
42
|
"create_event",
|
|
43
43
|
"update_event",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"cancel_event",
|
|
45
|
+
"confirm_event",
|
|
46
|
+
"release_event",
|
|
47
|
+
"create_agent",
|
|
48
|
+
"list_agents",
|
|
49
|
+
"get_agent",
|
|
50
|
+
"update_agent",
|
|
51
|
+
"delete_agent",
|
|
52
|
+
"get_availability",
|
|
53
|
+
"find_meeting_time",
|
|
54
|
+
"get_calendar_context",
|
|
55
|
+
"create_proposal",
|
|
56
|
+
"list_proposals",
|
|
57
|
+
"get_proposal",
|
|
58
|
+
"respond_to_proposal",
|
|
59
|
+
"resolve_proposal",
|
|
60
|
+
"cancel_proposal",
|
|
61
|
+
"set_availability_rules",
|
|
62
|
+
"get_availability_rules",
|
|
63
|
+
"clear_availability_rules",
|
|
46
64
|
"list_webhooks",
|
|
47
65
|
"get_webhook",
|
|
48
66
|
"create_webhook",
|
|
49
67
|
"update_webhook",
|
|
50
68
|
"delete_webhook",
|
|
69
|
+
"list_webhook_deliveries",
|
|
51
70
|
"list_ical_subscriptions",
|
|
52
71
|
"get_ical_subscription",
|
|
53
|
-
"
|
|
72
|
+
"subscribe_ical",
|
|
54
73
|
"update_ical_subscription",
|
|
55
74
|
"delete_ical_subscription",
|
|
56
75
|
"sync_ical_subscription",
|
|
76
|
+
"create_scoped_key",
|
|
77
|
+
"list_scoped_keys",
|
|
78
|
+
"revoke_scoped_key",
|
|
79
|
+
"get_audit_log",
|
|
80
|
+
"accept_terms",
|
|
57
81
|
"get_usage"
|
|
58
82
|
];
|
|
59
83
|
|
|
60
84
|
// src/schemas.ts
|
|
61
85
|
var schemas_exports = {};
|
|
62
86
|
__export(schemas_exports, {
|
|
63
|
-
|
|
87
|
+
AcceptTermsSchema: () => AcceptTermsSchema,
|
|
88
|
+
CancelEventSchema: () => CancelEventSchema,
|
|
89
|
+
CancelProposalSchema: () => CancelProposalSchema,
|
|
90
|
+
ClearAvailabilityRulesSchema: () => ClearAvailabilityRulesSchema,
|
|
91
|
+
ConfirmEventSchema: () => ConfirmEventSchema,
|
|
92
|
+
CreateAgentSchema: () => CreateAgentSchema,
|
|
64
93
|
CreateCalendarSchema: () => CreateCalendarSchema,
|
|
65
94
|
CreateEventSchema: () => CreateEventSchema,
|
|
66
|
-
|
|
95
|
+
CreateProposalSchema: () => CreateProposalSchema,
|
|
96
|
+
CreateScopedKeySchema: () => CreateScopedKeySchema,
|
|
67
97
|
CreateWebhookSchema: () => CreateWebhookSchema,
|
|
98
|
+
DeleteAgentSchema: () => DeleteAgentSchema,
|
|
68
99
|
DeleteCalendarSchema: () => DeleteCalendarSchema,
|
|
69
|
-
DeleteEventSchema: () => DeleteEventSchema,
|
|
70
100
|
DeleteICalSubscriptionSchema: () => DeleteICalSubscriptionSchema,
|
|
71
101
|
DeleteWebhookSchema: () => DeleteWebhookSchema,
|
|
102
|
+
FindMeetingTimeSchema: () => FindMeetingTimeSchema,
|
|
103
|
+
GetAgentSchema: () => GetAgentSchema,
|
|
104
|
+
GetAuditLogSchema: () => GetAuditLogSchema,
|
|
105
|
+
GetAvailabilityRulesSchema: () => GetAvailabilityRulesSchema,
|
|
106
|
+
GetAvailabilitySchema: () => GetAvailabilitySchema,
|
|
107
|
+
GetCalendarContextSchema: () => GetCalendarContextSchema,
|
|
72
108
|
GetCalendarSchema: () => GetCalendarSchema,
|
|
73
109
|
GetEventSchema: () => GetEventSchema,
|
|
74
110
|
GetICalSubscriptionSchema: () => GetICalSubscriptionSchema,
|
|
111
|
+
GetProposalSchema: () => GetProposalSchema,
|
|
75
112
|
GetUsageSchema: () => GetUsageSchema,
|
|
76
113
|
GetWebhookSchema: () => GetWebhookSchema,
|
|
114
|
+
ListAgentsSchema: () => ListAgentsSchema,
|
|
77
115
|
ListCalendarsSchema: () => ListCalendarsSchema,
|
|
78
116
|
ListEventsSchema: () => ListEventsSchema,
|
|
79
117
|
ListICalSubscriptionsSchema: () => ListICalSubscriptionsSchema,
|
|
118
|
+
ListProposalsSchema: () => ListProposalsSchema,
|
|
119
|
+
ListScopedKeysSchema: () => ListScopedKeysSchema,
|
|
120
|
+
ListWebhookDeliveriesSchema: () => ListWebhookDeliveriesSchema,
|
|
80
121
|
ListWebhooksSchema: () => ListWebhooksSchema,
|
|
122
|
+
ReleaseEventSchema: () => ReleaseEventSchema,
|
|
123
|
+
ResolveProposalSchema: () => ResolveProposalSchema,
|
|
124
|
+
RespondToProposalSchema: () => RespondToProposalSchema,
|
|
125
|
+
RevokeScopedKeySchema: () => RevokeScopedKeySchema,
|
|
126
|
+
SetAvailabilityRulesSchema: () => SetAvailabilityRulesSchema,
|
|
127
|
+
SubscribeICalSchema: () => SubscribeICalSchema,
|
|
81
128
|
SyncICalSubscriptionSchema: () => SyncICalSubscriptionSchema,
|
|
129
|
+
UpdateAgentSchema: () => UpdateAgentSchema,
|
|
82
130
|
UpdateCalendarSchema: () => UpdateCalendarSchema,
|
|
83
131
|
UpdateEventSchema: () => UpdateEventSchema,
|
|
84
132
|
UpdateICalSubscriptionSchema: () => UpdateICalSubscriptionSchema,
|
|
85
133
|
UpdateWebhookSchema: () => UpdateWebhookSchema
|
|
86
134
|
});
|
|
87
135
|
var import_zod = require("zod");
|
|
136
|
+
var WEBHOOK_EVENT_TYPES = [
|
|
137
|
+
"agent.created",
|
|
138
|
+
"agent.updated",
|
|
139
|
+
"event.created",
|
|
140
|
+
"event.updated",
|
|
141
|
+
"event.deleted",
|
|
142
|
+
"event.started",
|
|
143
|
+
"event.ended",
|
|
144
|
+
"event.reminder",
|
|
145
|
+
"event.hold_created",
|
|
146
|
+
"event.hold_expired",
|
|
147
|
+
"event.hold_released",
|
|
148
|
+
"event.hold_confirmed",
|
|
149
|
+
"proposal.created",
|
|
150
|
+
"proposal.responded",
|
|
151
|
+
"proposal.confirmed",
|
|
152
|
+
"proposal.expired",
|
|
153
|
+
"proposal.cancelled",
|
|
154
|
+
"webhook.deactivated"
|
|
155
|
+
];
|
|
156
|
+
var WEBHOOK_DELIVERY_STATUSES = ["pending", "delivered", "failed"];
|
|
88
157
|
var ListCalendarsSchema = import_zod.z.object({
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
offset: import_zod.z.number().int().min(0).optional().describe("Pagination offset (default 0)")
|
|
158
|
+
include: import_zod.z.enum(["all"]).optional().describe('Pass "all" to include calendars across all agents (org keys only)'),
|
|
159
|
+
limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
160
|
+
offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
|
|
93
161
|
});
|
|
94
162
|
var GetCalendarSchema = import_zod.z.object({
|
|
95
|
-
calendar_id: import_zod.z.string().describe("
|
|
163
|
+
calendar_id: import_zod.z.string().describe("Calendar ID to fetch")
|
|
96
164
|
});
|
|
97
165
|
var CreateCalendarSchema = import_zod.z.object({
|
|
98
|
-
name: import_zod.z.string().describe("Calendar name"),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
166
|
+
name: import_zod.z.string().min(1).max(255).describe("Calendar name"),
|
|
167
|
+
agent_id: import_zod.z.string().optional().describe("Agent ID to own this calendar (omit for org-level)"),
|
|
168
|
+
timezone: import_zod.z.string().min(1).describe("IANA timezone (e.g. America/New_York)"),
|
|
169
|
+
default_reminders: import_zod.z.array(import_zod.z.number().int().min(1).max(40320)).max(5).nullable().optional().describe("Default reminder offsets in minutes before start, inherited by events on this calendar that don't set their own. Omit or null to use the system default (10 min); [] for no reminders.")
|
|
102
170
|
});
|
|
103
171
|
var UpdateCalendarSchema = import_zod.z.object({
|
|
104
|
-
calendar_id: import_zod.z.string().describe("
|
|
105
|
-
name: import_zod.z.string().optional().describe("New calendar name"),
|
|
106
|
-
timezone: import_zod.z.string().optional().describe("New IANA timezone"),
|
|
107
|
-
|
|
172
|
+
calendar_id: import_zod.z.string().describe("Calendar ID to update"),
|
|
173
|
+
name: import_zod.z.string().min(1).max(255).optional().describe("New calendar name"),
|
|
174
|
+
timezone: import_zod.z.string().min(1).optional().describe("New IANA timezone (e.g. America/New_York)"),
|
|
175
|
+
agent_status: import_zod.z.enum(["idle", "working", "waiting", "error"]).optional().describe("Owning agent's status"),
|
|
176
|
+
default_reminders: import_zod.z.array(import_zod.z.number().int().min(1).max(40320)).max(5).nullable().optional().describe("Default reminder offsets in minutes; null for system default, [] for none"),
|
|
177
|
+
metadata: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Arbitrary metadata (max 16KB)")
|
|
108
178
|
});
|
|
109
179
|
var DeleteCalendarSchema = import_zod.z.object({
|
|
110
|
-
calendar_id: import_zod.z.string().describe("
|
|
180
|
+
calendar_id: import_zod.z.string().describe("Calendar ID to delete")
|
|
111
181
|
});
|
|
112
182
|
var ListEventsSchema = import_zod.z.object({
|
|
113
|
-
calendar_id: import_zod.z.string().
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
source: import_zod.z.enum(["internal", "external_ical"]).optional().describe("Filter by event source"),
|
|
119
|
-
limit: import_zod.z.number().int().min(1).max(200).optional().describe("Max results per page (default 50)"),
|
|
120
|
-
offset: import_zod.z.number().int().min(0).optional().describe("Pagination offset (default 0)")
|
|
183
|
+
calendar_id: import_zod.z.string().describe("Calendar ID to list events from"),
|
|
184
|
+
start_after: import_zod.z.string().datetime().optional().describe("Filter events starting after this time"),
|
|
185
|
+
start_before: import_zod.z.string().datetime().optional().describe("Filter events starting before this time"),
|
|
186
|
+
limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
187
|
+
offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
|
|
121
188
|
});
|
|
122
189
|
var GetEventSchema = import_zod.z.object({
|
|
123
|
-
|
|
124
|
-
|
|
190
|
+
event_id: import_zod.z.string().describe("Event ID to retrieve"),
|
|
191
|
+
calendar_id: import_zod.z.string().describe("Calendar ID that owns the event. Required \u2014 the SDK is calendar-scoped (unlike the hosted MCP, which can resolve the calendar from event_id).")
|
|
125
192
|
});
|
|
126
193
|
var CreateEventSchema = import_zod.z.object({
|
|
127
|
-
calendar_id: import_zod.z.string().describe("Calendar ID to
|
|
128
|
-
title: import_zod.z.string().describe("Event title"),
|
|
129
|
-
start_time: import_zod.z.string().describe("Start time
|
|
130
|
-
end_time: import_zod.z.string().describe("End time
|
|
131
|
-
description: import_zod.z.string().optional().describe("
|
|
132
|
-
all_day: import_zod.z.boolean().
|
|
133
|
-
status: import_zod.z.enum(["confirmed", "tentative", "
|
|
134
|
-
|
|
194
|
+
calendar_id: import_zod.z.string().describe("Calendar ID to add the event to"),
|
|
195
|
+
title: import_zod.z.string().min(1).max(500).describe("Event title"),
|
|
196
|
+
start_time: import_zod.z.string().datetime().describe("Start time (ISO 8601)"),
|
|
197
|
+
end_time: import_zod.z.string().datetime().describe("End time (ISO 8601)"),
|
|
198
|
+
description: import_zod.z.string().optional().describe("Optional event description"),
|
|
199
|
+
all_day: import_zod.z.boolean().default(false).describe("Whether this is an all-day event"),
|
|
200
|
+
status: import_zod.z.enum(["confirmed", "tentative", "hold"]).optional().describe('Event status. "hold" creates a tentative reservation that auto-expires at hold_expires_at. Defaults to "confirmed".'),
|
|
201
|
+
reminders: import_zod.z.array(import_zod.z.number().int().min(1).max(40320)).max(5).nullable().optional().describe("Reminder offsets in minutes before start_time (e.g. [10, 1440]). Each fires an event.reminder webhook and shows as an alarm in the iCal feed. Omit or null to inherit the calendar default (then the system default of 10 min); [] for no reminders."),
|
|
202
|
+
hold_expires_at: import_zod.z.string().datetime().optional().describe('Required when status="hold". ISO 8601 timestamp 30s-15min in the future. Auto-releases the hold when reached.'),
|
|
203
|
+
hold_priority: import_zod.z.number().int().min(0).max(100).optional().describe('Only valid with status="hold". Higher-priority overlapping holds pre-empt lower-priority ones. Defaults to 0.')
|
|
135
204
|
});
|
|
136
205
|
var UpdateEventSchema = import_zod.z.object({
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
title: import_zod.z.string().optional().describe("New event title"),
|
|
140
|
-
description: import_zod.z.string().nullable().optional().describe("New description
|
|
141
|
-
start_time: import_zod.z.string().optional().describe("New start time
|
|
142
|
-
end_time: import_zod.z.string().optional().describe("New end time
|
|
206
|
+
event_id: import_zod.z.string().describe("Event ID to update"),
|
|
207
|
+
calendar_id: import_zod.z.string().describe("Calendar ID that owns the event. Required \u2014 the SDK is calendar-scoped (unlike the hosted MCP, which can resolve the calendar from event_id)."),
|
|
208
|
+
title: import_zod.z.string().min(1).max(500).optional().describe("New event title"),
|
|
209
|
+
description: import_zod.z.string().nullable().optional().describe("New description, or null to clear it"),
|
|
210
|
+
start_time: import_zod.z.string().datetime().optional().describe("New start time (ISO 8601)"),
|
|
211
|
+
end_time: import_zod.z.string().datetime().optional().describe("New end time (ISO 8601)"),
|
|
143
212
|
all_day: import_zod.z.boolean().optional().describe("Whether this is an all-day event"),
|
|
144
213
|
status: import_zod.z.enum(["confirmed", "tentative", "cancelled"]).optional().describe("New event status"),
|
|
145
|
-
metadata: import_zod.z.record(import_zod.z.unknown()).optional().describe("
|
|
214
|
+
metadata: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Replacement metadata object"),
|
|
215
|
+
reminders: import_zod.z.array(import_zod.z.number().int().min(1).max(40320)).max(5).nullable().optional().describe("Reminder offsets in minutes before start_time. Omit to leave unchanged, null to inherit the calendar default, [] for no reminders.")
|
|
146
216
|
});
|
|
147
|
-
var
|
|
148
|
-
|
|
149
|
-
|
|
217
|
+
var CancelEventSchema = import_zod.z.object({
|
|
218
|
+
event_id: import_zod.z.string().describe("Event ID to cancel"),
|
|
219
|
+
calendar_id: import_zod.z.string().describe("Calendar ID that owns the event. Required \u2014 the SDK is calendar-scoped (unlike the hosted MCP, which can resolve the calendar from event_id).")
|
|
150
220
|
});
|
|
151
|
-
var
|
|
152
|
-
|
|
153
|
-
start: import_zod.z.string().describe("Start of time range in ISO 8601 format"),
|
|
154
|
-
end: import_zod.z.string().describe("End of time range in ISO 8601 format"),
|
|
155
|
-
slot_duration: import_zod.z.enum(["15m", "30m", "45m", "1h", "2h"]).optional().describe('Duration of availability slots (default "30m")'),
|
|
156
|
-
calendars: import_zod.z.array(import_zod.z.string()).optional().describe("Specific calendar IDs to check (default: all agent calendars)"),
|
|
157
|
-
include_busy: import_zod.z.boolean().optional().describe("Include busy blocks in response")
|
|
221
|
+
var ConfirmEventSchema = import_zod.z.object({
|
|
222
|
+
event_id: import_zod.z.string().describe("Event ID of the hold to confirm")
|
|
158
223
|
});
|
|
159
|
-
var
|
|
160
|
-
|
|
224
|
+
var ReleaseEventSchema = import_zod.z.object({
|
|
225
|
+
event_id: import_zod.z.string().describe("Event ID of the hold to release")
|
|
226
|
+
});
|
|
227
|
+
var CreateAgentSchema = import_zod.z.object({
|
|
228
|
+
name: import_zod.z.string().min(1).max(255).describe("Display name for the agent"),
|
|
229
|
+
type: import_zod.z.enum(["ai", "human", "resource"]).describe("Agent type"),
|
|
230
|
+
description: import_zod.z.string().optional().describe("Optional description")
|
|
231
|
+
});
|
|
232
|
+
var ListAgentsSchema = import_zod.z.object({
|
|
233
|
+
type: import_zod.z.enum(["ai", "human", "resource"]).optional().describe("Filter by agent type"),
|
|
234
|
+
status: import_zod.z.enum(["active", "paused", "decommissioned"]).optional().describe("Filter by status"),
|
|
235
|
+
limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
236
|
+
offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
|
|
237
|
+
});
|
|
238
|
+
var GetAgentSchema = import_zod.z.object({
|
|
239
|
+
agent_id: import_zod.z.string().describe("Agent ID to fetch")
|
|
240
|
+
});
|
|
241
|
+
var UpdateAgentSchema = import_zod.z.object({
|
|
242
|
+
agent_id: import_zod.z.string().describe("Agent ID to update"),
|
|
243
|
+
name: import_zod.z.string().min(1).max(255).optional().describe("New display name"),
|
|
244
|
+
description: import_zod.z.string().nullable().optional().describe("New description (null to clear)"),
|
|
245
|
+
metadata: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Arbitrary metadata (max 16KB)"),
|
|
246
|
+
status: import_zod.z.enum(["active", "paused"]).optional().describe("Operational status")
|
|
247
|
+
});
|
|
248
|
+
var DeleteAgentSchema = import_zod.z.object({
|
|
249
|
+
agent_id: import_zod.z.string().describe("Agent ID to decommission")
|
|
250
|
+
});
|
|
251
|
+
var GetAvailabilitySchema = import_zod.z.object({
|
|
252
|
+
agent_id: import_zod.z.string().describe("Agent ID to check availability for"),
|
|
253
|
+
start: import_zod.z.string().datetime().optional().describe("Range start (ISO 8601). Alias: start_time."),
|
|
254
|
+
end: import_zod.z.string().datetime().optional().describe("Range end (ISO 8601). Alias: end_time."),
|
|
255
|
+
start_time: import_zod.z.string().datetime().optional().describe("Alias for `start` (matches REST events naming)."),
|
|
256
|
+
end_time: import_zod.z.string().datetime().optional().describe("Alias for `end` (matches REST events naming)."),
|
|
257
|
+
slot_duration: import_zod.z.enum(["15m", "30m", "45m", "1h", "2h"]).default("30m").describe("Minimum slot duration required \u2014 only free blocks at least this long are returned"),
|
|
258
|
+
include_busy: import_zod.z.boolean().default(false).describe("Include busy blocks in response")
|
|
259
|
+
});
|
|
260
|
+
var FindMeetingTimeSchema = import_zod.z.object({
|
|
261
|
+
agents: import_zod.z.array(import_zod.z.string()).min(1).optional().describe("Array of agent IDs to find common free time for. All agents must be free during the returned slots. Alias: agent_ids."),
|
|
262
|
+
agent_ids: import_zod.z.array(import_zod.z.string()).min(1).optional().describe("Alias for `agents` (matches REST/scheduling-proposal naming)."),
|
|
263
|
+
start: import_zod.z.string().datetime().optional().describe("Search range start (ISO 8601). Alias: start_time."),
|
|
264
|
+
end: import_zod.z.string().datetime().optional().describe("Search range end (ISO 8601). Alias: end_time."),
|
|
265
|
+
start_time: import_zod.z.string().datetime().optional().describe("Alias for `start` (matches REST events naming)."),
|
|
266
|
+
end_time: import_zod.z.string().datetime().optional().describe("Alias for `end` (matches REST events naming)."),
|
|
267
|
+
slot_duration: import_zod.z.enum(["15m", "30m", "45m", "1h", "2h"]).default("30m").describe("Minimum slot duration required \u2014 only free blocks at least this long are returned"),
|
|
268
|
+
calendars: import_zod.z.array(import_zod.z.string()).optional().describe("Additional shared calendar IDs to treat as busy"),
|
|
269
|
+
include_busy: import_zod.z.boolean().default(false).describe("Include per-agent busy blocks in response")
|
|
270
|
+
});
|
|
271
|
+
var GetCalendarContextSchema = import_zod.z.object({
|
|
272
|
+
calendar_id: import_zod.z.string().describe("Calendar ID")
|
|
273
|
+
});
|
|
274
|
+
var proposalSlotSchema = import_zod.z.object({
|
|
275
|
+
start_time: import_zod.z.string().datetime(),
|
|
276
|
+
end_time: import_zod.z.string().datetime(),
|
|
277
|
+
weight: import_zod.z.number().min(0).max(10).default(1).optional(),
|
|
278
|
+
calendar_id: import_zod.z.string().optional()
|
|
279
|
+
});
|
|
280
|
+
var CreateProposalSchema = import_zod.z.object({
|
|
281
|
+
title: import_zod.z.string().min(1).max(500).describe("Short description of what the meeting is about"),
|
|
282
|
+
description: import_zod.z.string().max(5e3).optional().describe("Longer context/agenda"),
|
|
283
|
+
organizer_agent_id: import_zod.z.string().describe("Agent ID proposing the meeting"),
|
|
284
|
+
participant_agent_ids: import_zod.z.array(import_zod.z.string()).min(1).max(50).describe("Agent IDs invited to respond"),
|
|
285
|
+
calendar_id: import_zod.z.string().describe("Calendar the resolved event will be created on"),
|
|
286
|
+
slots: import_zod.z.array(proposalSlotSchema).min(1).max(20).describe("Candidate time slots (up to 20)"),
|
|
287
|
+
expires_at: import_zod.z.string().datetime().optional().describe("Auto-cancel cutoff if unresolved")
|
|
288
|
+
});
|
|
289
|
+
var ListProposalsSchema = import_zod.z.object({
|
|
290
|
+
status: import_zod.z.enum(["pending", "confirmed", "expired", "cancelled"]).optional().describe("Filter by proposal status"),
|
|
291
|
+
organizer_agent_id: import_zod.z.string().optional().describe("Filter by organizer agent"),
|
|
292
|
+
limit: import_zod.z.number().int().min(1).max(200).optional().describe("Max results (default 50)"),
|
|
161
293
|
offset: import_zod.z.number().int().min(0).optional().describe("Pagination offset (default 0)")
|
|
162
294
|
});
|
|
295
|
+
var GetProposalSchema = import_zod.z.object({
|
|
296
|
+
proposal_id: import_zod.z.string().describe("Proposal to fetch")
|
|
297
|
+
});
|
|
298
|
+
var RespondToProposalSchema = import_zod.z.object({
|
|
299
|
+
proposal_id: import_zod.z.string().describe("Proposal to respond to"),
|
|
300
|
+
agent_id: import_zod.z.string().describe("Participant agent responding"),
|
|
301
|
+
response: import_zod.z.enum(["accept", "decline", "counter"]).describe("Decision from this agent"),
|
|
302
|
+
selected_slot_id: import_zod.z.string().optional().describe('Required when response is "accept"'),
|
|
303
|
+
counter_slots: import_zod.z.array(proposalSlotSchema).max(20).optional().describe('Alternative slots when response is "counter"'),
|
|
304
|
+
message: import_zod.z.string().max(2e3).optional().describe("Optional note for the organizer")
|
|
305
|
+
});
|
|
306
|
+
var ResolveProposalSchema = import_zod.z.object({
|
|
307
|
+
proposal_id: import_zod.z.string().describe("Proposal to resolve")
|
|
308
|
+
});
|
|
309
|
+
var CancelProposalSchema = import_zod.z.object({
|
|
310
|
+
proposal_id: import_zod.z.string().describe("Proposal to cancel")
|
|
311
|
+
});
|
|
312
|
+
var timeOfDay = import_zod.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "must be HH:MM in 24-hour time");
|
|
313
|
+
var workingHoursDaySchema = import_zod.z.object({
|
|
314
|
+
start: timeOfDay,
|
|
315
|
+
end: timeOfDay
|
|
316
|
+
});
|
|
317
|
+
var workingHoursSchema = import_zod.z.object({
|
|
318
|
+
mon: workingHoursDaySchema.optional(),
|
|
319
|
+
tue: workingHoursDaySchema.optional(),
|
|
320
|
+
wed: workingHoursDaySchema.optional(),
|
|
321
|
+
thu: workingHoursDaySchema.optional(),
|
|
322
|
+
fri: workingHoursDaySchema.optional(),
|
|
323
|
+
sat: workingHoursDaySchema.optional(),
|
|
324
|
+
sun: workingHoursDaySchema.optional()
|
|
325
|
+
}).nullable();
|
|
326
|
+
var SetAvailabilityRulesSchema = import_zod.z.object({
|
|
327
|
+
calendar_id: import_zod.z.string().describe("Calendar to configure"),
|
|
328
|
+
buffer_before_minutes: import_zod.z.number().int().min(0).max(120).default(0).describe("Minutes of buffer before each event (0\u2013120)"),
|
|
329
|
+
buffer_after_minutes: import_zod.z.number().int().min(0).max(120).default(0).describe("Minutes of buffer after each event (0\u2013120)"),
|
|
330
|
+
working_hours: workingHoursSchema.default(null).describe("Per-day working hours map in the calendar's timezone; omit keys for off-days. Pass null to remove any working-hours constraint."),
|
|
331
|
+
timezone: import_zod.z.string().min(1).max(64).default("UTC").describe("IANA timezone used to interpret working_hours (e.g. America/New_York)")
|
|
332
|
+
});
|
|
333
|
+
var GetAvailabilityRulesSchema = import_zod.z.object({
|
|
334
|
+
calendar_id: import_zod.z.string().describe("Calendar to read")
|
|
335
|
+
});
|
|
336
|
+
var ClearAvailabilityRulesSchema = import_zod.z.object({
|
|
337
|
+
calendar_id: import_zod.z.string().describe("Calendar whose rules should be cleared")
|
|
338
|
+
});
|
|
339
|
+
var CreateScopedKeySchema = import_zod.z.object({
|
|
340
|
+
agent_id: import_zod.z.string().regex(/^agt_/).describe("Agent ID this key is scoped to"),
|
|
341
|
+
label: import_zod.z.string().min(1).max(100).optional().describe("Human-readable label for the key")
|
|
342
|
+
});
|
|
343
|
+
var ListScopedKeysSchema = import_zod.z.object({});
|
|
344
|
+
var RevokeScopedKeySchema = import_zod.z.object({
|
|
345
|
+
key_id: import_zod.z.string().describe("ID of the scoped key to revoke")
|
|
346
|
+
});
|
|
347
|
+
var GetAuditLogSchema = import_zod.z.object({
|
|
348
|
+
from: import_zod.z.string().datetime({ offset: true }).optional().describe("Start of the window (ISO 8601). Silently clamped to the plan retention window if older."),
|
|
349
|
+
to: import_zod.z.string().datetime({ offset: true }).optional().describe("End of the window (ISO 8601)"),
|
|
350
|
+
action: import_zod.z.string().min(1).max(64).optional().describe("Filter by action name (e.g. event.created)"),
|
|
351
|
+
actor_key_prefix: import_zod.z.string().min(1).max(32).optional().describe("Filter by the API key prefix that performed the action"),
|
|
352
|
+
cursor: import_zod.z.string().min(1).max(256).optional().describe("Opaque pagination cursor from a previous response"),
|
|
353
|
+
limit: import_zod.z.number().int().min(1).max(200).optional().describe("Max results to return (default 50)")
|
|
354
|
+
});
|
|
355
|
+
var AcceptTermsSchema = import_zod.z.object({
|
|
356
|
+
tos_version: import_zod.z.string().min(1).describe("The terms-of-service version to accept; must match the current version")
|
|
357
|
+
});
|
|
358
|
+
var ListWebhooksSchema = import_zod.z.object({
|
|
359
|
+
limit: import_zod.z.number().int().min(1).max(100).default(20).describe("Max results to return"),
|
|
360
|
+
offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
|
|
361
|
+
});
|
|
163
362
|
var GetWebhookSchema = import_zod.z.object({
|
|
164
|
-
webhook_id: import_zod.z.string().describe("
|
|
363
|
+
webhook_id: import_zod.z.string().describe("Webhook subscription to fetch")
|
|
165
364
|
});
|
|
166
365
|
var CreateWebhookSchema = import_zod.z.object({
|
|
167
|
-
url: import_zod.z.string().describe("HTTPS
|
|
168
|
-
events: import_zod.z.array(import_zod.z.
|
|
366
|
+
url: import_zod.z.string().url().describe("HTTPS endpoint that will receive event deliveries"),
|
|
367
|
+
events: import_zod.z.array(import_zod.z.enum(WEBHOOK_EVENT_TYPES)).min(1).describe("Event types to subscribe to")
|
|
169
368
|
});
|
|
170
369
|
var UpdateWebhookSchema = import_zod.z.object({
|
|
171
|
-
webhook_id: import_zod.z.string().describe("
|
|
172
|
-
url: import_zod.z.string().optional().describe("New
|
|
173
|
-
events: import_zod.z.array(import_zod.z.
|
|
174
|
-
active: import_zod.z.boolean().optional().describe("
|
|
370
|
+
webhook_id: import_zod.z.string().describe("Webhook subscription to update"),
|
|
371
|
+
url: import_zod.z.string().url().optional().describe("New HTTPS delivery endpoint"),
|
|
372
|
+
events: import_zod.z.array(import_zod.z.enum(WEBHOOK_EVENT_TYPES)).min(1).optional().describe("Replacement set of event types to subscribe to"),
|
|
373
|
+
active: import_zod.z.boolean().optional().describe("Set false to pause deliveries, true to resume")
|
|
175
374
|
});
|
|
176
375
|
var DeleteWebhookSchema = import_zod.z.object({
|
|
177
|
-
webhook_id: import_zod.z.string().describe("
|
|
376
|
+
webhook_id: import_zod.z.string().describe("Webhook subscription to delete")
|
|
377
|
+
});
|
|
378
|
+
var ListWebhookDeliveriesSchema = import_zod.z.object({
|
|
379
|
+
webhook_id: import_zod.z.string().describe("Webhook subscription whose deliveries to list"),
|
|
380
|
+
limit: import_zod.z.number().int().min(1).max(100).default(20).describe("Max results to return"),
|
|
381
|
+
offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset"),
|
|
382
|
+
status: import_zod.z.enum(WEBHOOK_DELIVERY_STATUSES).optional().describe("Filter to a single delivery status"),
|
|
383
|
+
include_payload: import_zod.z.boolean().optional().describe("Include the full event payload sent on each delivery")
|
|
178
384
|
});
|
|
179
385
|
var ListICalSubscriptionsSchema = import_zod.z.object({
|
|
180
|
-
agent_id: import_zod.z.string().describe("Agent ID
|
|
386
|
+
agent_id: import_zod.z.string().describe("Agent ID whose iCal subscriptions to list"),
|
|
181
387
|
status: import_zod.z.enum(["active", "error", "paused"]).optional().describe("Filter by subscription status"),
|
|
182
|
-
limit: import_zod.z.number().int().min(1).max(200).
|
|
183
|
-
offset: import_zod.z.number().int().min(0).
|
|
388
|
+
limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
389
|
+
offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset")
|
|
184
390
|
});
|
|
185
391
|
var GetICalSubscriptionSchema = import_zod.z.object({
|
|
186
|
-
subscription_id: import_zod.z.string().describe("
|
|
392
|
+
subscription_id: import_zod.z.string().describe("iCal subscription ID to fetch")
|
|
187
393
|
});
|
|
188
|
-
var
|
|
189
|
-
agent_id: import_zod.z.string().describe("Agent ID
|
|
190
|
-
calendar_id: import_zod.z.string().describe("Calendar ID to
|
|
191
|
-
url: import_zod.z.string().describe("HTTPS URL of the iCal feed to subscribe to"),
|
|
192
|
-
label: import_zod.z.string().optional().describe("
|
|
394
|
+
var SubscribeICalSchema = import_zod.z.object({
|
|
395
|
+
agent_id: import_zod.z.string().describe("Agent ID that will own this subscription"),
|
|
396
|
+
calendar_id: import_zod.z.string().describe("Calendar ID to sync external events into"),
|
|
397
|
+
url: import_zod.z.string().url().describe("HTTPS URL of the iCal feed (.ics) to subscribe to"),
|
|
398
|
+
label: import_zod.z.string().optional().describe("Optional label for this subscription")
|
|
193
399
|
});
|
|
194
400
|
var UpdateICalSubscriptionSchema = import_zod.z.object({
|
|
195
|
-
subscription_id: import_zod.z.string().describe("
|
|
196
|
-
label: import_zod.z.string().optional().describe("New label"),
|
|
197
|
-
url: import_zod.z.string().optional().describe("New iCal feed
|
|
401
|
+
subscription_id: import_zod.z.string().describe("iCal subscription ID to update"),
|
|
402
|
+
label: import_zod.z.string().min(1).max(255).optional().describe("New label for this subscription"),
|
|
403
|
+
url: import_zod.z.string().url().startsWith("https://", "URL must use HTTPS").optional().describe("New HTTPS URL of the iCal feed (.ics)")
|
|
198
404
|
});
|
|
199
405
|
var DeleteICalSubscriptionSchema = import_zod.z.object({
|
|
200
|
-
subscription_id: import_zod.z.string().describe("
|
|
406
|
+
subscription_id: import_zod.z.string().describe("iCal subscription ID to delete")
|
|
201
407
|
});
|
|
202
408
|
var SyncICalSubscriptionSchema = import_zod.z.object({
|
|
203
|
-
subscription_id: import_zod.z.string().describe("
|
|
409
|
+
subscription_id: import_zod.z.string().describe("iCal subscription ID to sync")
|
|
204
410
|
});
|
|
205
411
|
var GetUsageSchema = import_zod.z.object({});
|
|
206
412
|
|
|
@@ -230,7 +436,7 @@ async function fetchPage(iterator, offset, limit) {
|
|
|
230
436
|
}
|
|
231
437
|
var listCalendars = safeFunc(async (ctx) => {
|
|
232
438
|
const { client, params } = ctx;
|
|
233
|
-
const iter = client.calendars.list({
|
|
439
|
+
const iter = client.calendars.list({ include: params.include, limit: params.limit });
|
|
234
440
|
return fetchPage(iter, params.offset, params.limit);
|
|
235
441
|
});
|
|
236
442
|
var getCalendar = safeFunc(async (ctx) => {
|
|
@@ -242,6 +448,7 @@ var createCalendar = safeFunc(async (ctx) => {
|
|
|
242
448
|
name: params.name,
|
|
243
449
|
timezone: params.timezone,
|
|
244
450
|
agentId: params.agent_id,
|
|
451
|
+
default_reminders: params.default_reminders,
|
|
245
452
|
metadata: params.metadata
|
|
246
453
|
});
|
|
247
454
|
});
|
|
@@ -258,11 +465,8 @@ var listEvents = safeFunc(async (ctx) => {
|
|
|
258
465
|
const { client, params } = ctx;
|
|
259
466
|
const iter = client.events.list({
|
|
260
467
|
calendarId: params.calendar_id,
|
|
261
|
-
agentId: params.agent_id,
|
|
262
468
|
start_after: params.start_after,
|
|
263
469
|
start_before: params.start_before,
|
|
264
|
-
status: params.status,
|
|
265
|
-
source: params.source,
|
|
266
470
|
limit: params.limit
|
|
267
471
|
});
|
|
268
472
|
return fetchPage(iter, params.offset, params.limit);
|
|
@@ -280,12 +484,117 @@ var updateEvent = safeFunc(async (ctx) => {
|
|
|
280
484
|
const { calendar_id, event_id, ...updates } = params;
|
|
281
485
|
return client.events.update(calendar_id, event_id, updates);
|
|
282
486
|
});
|
|
283
|
-
var
|
|
487
|
+
var cancelEvent = safeFunc(async (ctx) => {
|
|
284
488
|
await ctx.client.events.delete(ctx.params.calendar_id, ctx.params.event_id);
|
|
285
489
|
return void 0;
|
|
286
490
|
});
|
|
287
|
-
var
|
|
288
|
-
return ctx.client.
|
|
491
|
+
var confirmEvent = safeFunc(async (ctx) => {
|
|
492
|
+
return ctx.client.events.confirm(ctx.params.event_id);
|
|
493
|
+
});
|
|
494
|
+
var releaseEvent = safeFunc(async (ctx) => {
|
|
495
|
+
return ctx.client.events.release(ctx.params.event_id);
|
|
496
|
+
});
|
|
497
|
+
var createAgent = safeFunc(async (ctx) => {
|
|
498
|
+
return ctx.client.agents.create(ctx.params);
|
|
499
|
+
});
|
|
500
|
+
var listAgents = safeFunc(async (ctx) => {
|
|
501
|
+
const { client, params } = ctx;
|
|
502
|
+
const iter = client.agents.list({ type: params.type, status: params.status, limit: params.limit });
|
|
503
|
+
return fetchPage(iter, params.offset, params.limit);
|
|
504
|
+
});
|
|
505
|
+
var getAgent = safeFunc(async (ctx) => {
|
|
506
|
+
return ctx.client.agents.get(ctx.params.agent_id);
|
|
507
|
+
});
|
|
508
|
+
var updateAgent = safeFunc(async (ctx) => {
|
|
509
|
+
const { client, params } = ctx;
|
|
510
|
+
const { agent_id, ...updates } = params;
|
|
511
|
+
return client.agents.update(agent_id, updates);
|
|
512
|
+
});
|
|
513
|
+
var deleteAgent = safeFunc(async (ctx) => {
|
|
514
|
+
await ctx.client.agents.delete(ctx.params.agent_id);
|
|
515
|
+
return void 0;
|
|
516
|
+
});
|
|
517
|
+
var getAvailability = safeFunc(async (ctx) => {
|
|
518
|
+
const { client, params } = ctx;
|
|
519
|
+
const start = params.start ?? params.start_time;
|
|
520
|
+
const end = params.end ?? params.end_time;
|
|
521
|
+
if (!start || !end) {
|
|
522
|
+
throw new Error("start (or start_time) and end (or end_time) are required");
|
|
523
|
+
}
|
|
524
|
+
return client.availability.forAgent(params.agent_id, {
|
|
525
|
+
start,
|
|
526
|
+
end,
|
|
527
|
+
slot_duration: params.slot_duration,
|
|
528
|
+
include_busy: params.include_busy
|
|
529
|
+
});
|
|
530
|
+
});
|
|
531
|
+
var findMeetingTime = safeFunc(async (ctx) => {
|
|
532
|
+
const { client, params } = ctx;
|
|
533
|
+
const agents = params.agents ?? params.agent_ids;
|
|
534
|
+
const start = params.start ?? params.start_time;
|
|
535
|
+
const end = params.end ?? params.end_time;
|
|
536
|
+
if (!agents || !start || !end) {
|
|
537
|
+
throw new Error("agents (or agent_ids), start (or start_time), and end (or end_time) are required");
|
|
538
|
+
}
|
|
539
|
+
return client.availability.check({
|
|
540
|
+
agents,
|
|
541
|
+
start,
|
|
542
|
+
end,
|
|
543
|
+
slot_duration: params.slot_duration,
|
|
544
|
+
calendars: params.calendars,
|
|
545
|
+
include_busy: params.include_busy
|
|
546
|
+
});
|
|
547
|
+
});
|
|
548
|
+
var getCalendarContext = safeFunc(async (ctx) => {
|
|
549
|
+
return ctx.client.calendars.getContext(ctx.params.calendar_id);
|
|
550
|
+
});
|
|
551
|
+
var createProposal = safeFunc(async (ctx) => {
|
|
552
|
+
return ctx.client.scheduling.create(ctx.params);
|
|
553
|
+
});
|
|
554
|
+
var listProposals = safeFunc(async (ctx) => {
|
|
555
|
+
const { client, params } = ctx;
|
|
556
|
+
const iter = client.scheduling.list({
|
|
557
|
+
status: params.status,
|
|
558
|
+
organizer_agent_id: params.organizer_agent_id,
|
|
559
|
+
limit: params.limit
|
|
560
|
+
});
|
|
561
|
+
return fetchPage(iter, params.offset, params.limit);
|
|
562
|
+
});
|
|
563
|
+
var getProposal = safeFunc(async (ctx) => {
|
|
564
|
+
return ctx.client.scheduling.get(ctx.params.proposal_id);
|
|
565
|
+
});
|
|
566
|
+
var respondToProposal = safeFunc(async (ctx) => {
|
|
567
|
+
const { client, params } = ctx;
|
|
568
|
+
const { proposal_id, ...body } = params;
|
|
569
|
+
return client.scheduling.respond(proposal_id, body);
|
|
570
|
+
});
|
|
571
|
+
var resolveProposal = safeFunc(async (ctx) => {
|
|
572
|
+
return ctx.client.scheduling.resolve(ctx.params.proposal_id);
|
|
573
|
+
});
|
|
574
|
+
var cancelProposal = safeFunc(async (ctx) => {
|
|
575
|
+
return ctx.client.scheduling.cancel(ctx.params.proposal_id);
|
|
576
|
+
});
|
|
577
|
+
var setAvailabilityRules = safeFunc(async (ctx) => {
|
|
578
|
+
const { client, params } = ctx;
|
|
579
|
+
const { calendar_id, ...rules } = params;
|
|
580
|
+
return client.calendars.setAvailabilityRules(calendar_id, rules);
|
|
581
|
+
});
|
|
582
|
+
var getAvailabilityRules = safeFunc(async (ctx) => {
|
|
583
|
+
return ctx.client.calendars.getAvailabilityRules(ctx.params.calendar_id);
|
|
584
|
+
});
|
|
585
|
+
var clearAvailabilityRules = safeFunc(async (ctx) => {
|
|
586
|
+
await ctx.client.calendars.deleteAvailabilityRules(ctx.params.calendar_id);
|
|
587
|
+
return void 0;
|
|
588
|
+
});
|
|
589
|
+
var createScopedKey = safeFunc(async (ctx) => {
|
|
590
|
+
return ctx.client.keys.create(ctx.params);
|
|
591
|
+
});
|
|
592
|
+
var listScopedKeys = safeFunc(async (ctx) => {
|
|
593
|
+
return ctx.client.keys.list();
|
|
594
|
+
});
|
|
595
|
+
var revokeScopedKey = safeFunc(async (ctx) => {
|
|
596
|
+
await ctx.client.keys.delete(ctx.params.key_id);
|
|
597
|
+
return void 0;
|
|
289
598
|
});
|
|
290
599
|
var listWebhooks = safeFunc(async (ctx) => {
|
|
291
600
|
const { client, params } = ctx;
|
|
@@ -307,6 +616,17 @@ var deleteWebhook = safeFunc(async (ctx) => {
|
|
|
307
616
|
await ctx.client.webhooks.delete(ctx.params.webhook_id);
|
|
308
617
|
return void 0;
|
|
309
618
|
});
|
|
619
|
+
var listWebhookDeliveries = safeFunc(async (ctx) => {
|
|
620
|
+
const { client, params } = ctx;
|
|
621
|
+
const { webhook_id, ...query } = params;
|
|
622
|
+
return client.webhooks.listDeliveries(webhook_id, query);
|
|
623
|
+
});
|
|
624
|
+
var getAuditLog = safeFunc(async (ctx) => {
|
|
625
|
+
return ctx.client.auditLog.list(ctx.params);
|
|
626
|
+
});
|
|
627
|
+
var acceptTerms = safeFunc(async (ctx) => {
|
|
628
|
+
return ctx.client.terms.accept(ctx.params);
|
|
629
|
+
});
|
|
310
630
|
var listICalSubscriptions = safeFunc(async (ctx) => {
|
|
311
631
|
const { client, params } = ctx;
|
|
312
632
|
const iter = client.icalSubscriptions.list({
|
|
@@ -319,7 +639,7 @@ var listICalSubscriptions = safeFunc(async (ctx) => {
|
|
|
319
639
|
var getICalSubscription = safeFunc(async (ctx) => {
|
|
320
640
|
return ctx.client.icalSubscriptions.get(ctx.params.subscription_id);
|
|
321
641
|
});
|
|
322
|
-
var
|
|
642
|
+
var subscribeICal = safeFunc(async (ctx) => {
|
|
323
643
|
const { client, params } = ctx;
|
|
324
644
|
const { agent_id, ...subParams } = params;
|
|
325
645
|
return client.icalSubscriptions.create(agent_id, subParams);
|
|
@@ -350,12 +670,19 @@ var HOSTED_API_MCP_TOOL_NAMES = [
|
|
|
350
670
|
"create_calendar",
|
|
351
671
|
"create_event",
|
|
352
672
|
"list_events",
|
|
673
|
+
"get_event",
|
|
674
|
+
"update_event",
|
|
353
675
|
"get_availability",
|
|
354
676
|
"find_meeting_time",
|
|
355
677
|
"cancel_event",
|
|
356
678
|
"confirm_event",
|
|
357
679
|
"release_event",
|
|
358
680
|
"subscribe_ical",
|
|
681
|
+
"list_ical_subscriptions",
|
|
682
|
+
"get_ical_subscription",
|
|
683
|
+
"update_ical_subscription",
|
|
684
|
+
"delete_ical_subscription",
|
|
685
|
+
"sync_ical_subscription",
|
|
359
686
|
"get_calendar_context",
|
|
360
687
|
"create_proposal",
|
|
361
688
|
"list_proposals",
|
|
@@ -365,41 +692,60 @@ var HOSTED_API_MCP_TOOL_NAMES = [
|
|
|
365
692
|
"cancel_proposal",
|
|
366
693
|
"set_availability_rules",
|
|
367
694
|
"get_availability_rules",
|
|
368
|
-
"clear_availability_rules"
|
|
695
|
+
"clear_availability_rules",
|
|
696
|
+
"create_scoped_key",
|
|
697
|
+
"list_scoped_keys",
|
|
698
|
+
"revoke_scoped_key",
|
|
699
|
+
"create_webhook",
|
|
700
|
+
"list_webhooks",
|
|
701
|
+
"get_webhook",
|
|
702
|
+
"update_webhook",
|
|
703
|
+
"delete_webhook",
|
|
704
|
+
"list_webhook_deliveries",
|
|
705
|
+
"get_agent",
|
|
706
|
+
"update_agent",
|
|
707
|
+
"delete_agent",
|
|
708
|
+
"list_calendars",
|
|
709
|
+
"get_calendar",
|
|
710
|
+
"update_calendar",
|
|
711
|
+
"delete_calendar",
|
|
712
|
+
"get_usage",
|
|
713
|
+
"get_audit_log",
|
|
714
|
+
"accept_terms"
|
|
369
715
|
];
|
|
370
716
|
var TOOL_DEFINITIONS = [
|
|
371
717
|
// ── Calendars ──────────────────────────────────────────────────
|
|
372
718
|
{
|
|
373
719
|
name: "list_calendars",
|
|
374
|
-
description: "List calendars
|
|
720
|
+
description: "List calendars in the org. Org-level API keys see every calendar (agent-owned and shared); agent-scoped keys see only their own agent's calendars. Use this to discover calendar IDs before creating or listing events.",
|
|
375
721
|
schema: ListCalendarsSchema,
|
|
376
722
|
annotations: { title: "List Calendars", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
377
723
|
execute: createExecutor(listCalendars)
|
|
378
724
|
},
|
|
379
725
|
{
|
|
380
726
|
name: "get_calendar",
|
|
381
|
-
description: "
|
|
727
|
+
description: "Fetch a single calendar by ID, including its name, timezone, agent status, and default reminders. Agent-scoped keys may only read calendars owned by their agent.",
|
|
382
728
|
schema: GetCalendarSchema,
|
|
383
729
|
annotations: { title: "Get Calendar", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
384
730
|
execute: createExecutor(getCalendar)
|
|
385
731
|
},
|
|
386
732
|
{
|
|
387
733
|
name: "create_calendar",
|
|
388
|
-
description:
|
|
734
|
+
description: 'Create a calendar to hold events and track availability. Calendars are required before creating events \u2014 call this first when setting up a new agent. An agent can have multiple calendars (e.g. "Work", "Personal"). Org-level calendars (no agent_id) can be used as shared resources like meeting rooms.',
|
|
389
735
|
schema: CreateCalendarSchema,
|
|
390
736
|
annotations: { title: "Create Calendar", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
391
737
|
execute: createExecutor(createCalendar)
|
|
392
738
|
},
|
|
393
739
|
{
|
|
394
740
|
name: "update_calendar",
|
|
395
|
-
description: "Update a calendar's name, timezone, or metadata.",
|
|
741
|
+
description: "Update a calendar's name, timezone, agent status, default reminders, or metadata. Agent-scoped keys may only update calendars owned by their agent.",
|
|
396
742
|
schema: UpdateCalendarSchema,
|
|
397
743
|
annotations: { title: "Update Calendar", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
398
744
|
execute: createExecutor(updateCalendar)
|
|
399
745
|
},
|
|
400
746
|
{
|
|
401
747
|
name: "delete_calendar",
|
|
402
|
-
description: "
|
|
748
|
+
description: "Delete a calendar (soft delete). Its events are no longer returned and it stops contributing to availability. Agent-scoped keys may only delete calendars owned by their agent.",
|
|
403
749
|
schema: DeleteCalendarSchema,
|
|
404
750
|
annotations: { title: "Delete Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
405
751
|
execute: createExecutor(deleteCalendar)
|
|
@@ -407,130 +753,305 @@ var TOOL_DEFINITIONS = [
|
|
|
407
753
|
// ── Events ─────────────────────────────────────────────────────
|
|
408
754
|
{
|
|
409
755
|
name: "list_events",
|
|
410
|
-
description: "List events on a calendar
|
|
756
|
+
description: "List all events on a calendar, including internally created events and externally synced events from iCal subscriptions (e.g. Google Calendar, Outlook). Use start_after and start_before to query a specific time window.",
|
|
411
757
|
schema: ListEventsSchema,
|
|
412
758
|
annotations: { title: "List Events", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
413
759
|
execute: createExecutor(listEvents)
|
|
414
760
|
},
|
|
415
761
|
{
|
|
416
762
|
name: "get_event",
|
|
417
|
-
description: "
|
|
763
|
+
description: "Retrieve a single event by ID, including its title, times, status, location, reminders, and metadata. Works for both internally created events and externally synced iCal events. `calendar_id` is optional \u2014 if omitted the calendar is resolved from the event. Provide `calendar_id` to fail fast on cross-calendar typos.",
|
|
418
764
|
schema: GetEventSchema,
|
|
419
765
|
annotations: { title: "Get Event", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
420
766
|
execute: createExecutor(getEvent)
|
|
421
767
|
},
|
|
422
768
|
{
|
|
423
769
|
name: "create_event",
|
|
424
|
-
description:
|
|
770
|
+
description: `Create a booking, appointment, meeting, hold, or any scheduled event on a calendar. The calendar_id comes from create_calendar or list_events. Once created, this event blocks the agent's availability during that time and appears in availability queries. Use status="hold" with hold_expires_at to tentatively reserve a slot that auto-releases on TTL.`,
|
|
425
771
|
schema: CreateEventSchema,
|
|
426
772
|
annotations: { title: "Create Event", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
427
773
|
execute: createExecutor(createEvent)
|
|
428
774
|
},
|
|
429
775
|
{
|
|
430
776
|
name: "update_event",
|
|
431
|
-
description: "
|
|
777
|
+
description: "Reschedule or edit an event \u2014 change its title, description, start/end times, location, status, reminders, or metadata. Use this to move an appointment to a new time or update its details. Provide only the fields you want to change. Holds cannot be edited via this tool (use confirm_event / release_event). External iCal events are read-only. `calendar_id` is optional \u2014 if omitted it is resolved from the event.",
|
|
432
778
|
schema: UpdateEventSchema,
|
|
433
779
|
annotations: { title: "Update Event", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
434
780
|
execute: createExecutor(updateEvent)
|
|
435
781
|
},
|
|
436
782
|
{
|
|
437
|
-
name: "
|
|
438
|
-
description: "Delete an event from a calendar.
|
|
439
|
-
schema:
|
|
440
|
-
annotations: { title: "
|
|
441
|
-
execute: createExecutor(
|
|
783
|
+
name: "cancel_event",
|
|
784
|
+
description: "Delete or cancel an event from a calendar. Use this to remove, cancel, or delete any scheduled event or appointment. The event is marked cancelled and excluded from future availability calculations. `calendar_id` is optional \u2014 if omitted the calendar is looked up from the event. Provide `calendar_id` to fail fast on cross-calendar typos.",
|
|
785
|
+
schema: CancelEventSchema,
|
|
786
|
+
annotations: { title: "Cancel Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
787
|
+
execute: createExecutor(cancelEvent)
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
name: "confirm_event",
|
|
791
|
+
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. After confirmation, event.started and event.ended lifecycle webhooks fire at the scheduled times.',
|
|
792
|
+
schema: ConfirmEventSchema,
|
|
793
|
+
annotations: { title: "Confirm Event", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
794
|
+
execute: createExecutor(confirmEvent)
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
name: "release_event",
|
|
798
|
+
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.',
|
|
799
|
+
schema: ReleaseEventSchema,
|
|
800
|
+
annotations: { title: "Release Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
801
|
+
execute: createExecutor(releaseEvent)
|
|
802
|
+
},
|
|
803
|
+
// ── Agents ─────────────────────────────────────────────────────
|
|
804
|
+
{
|
|
805
|
+
name: "create_agent",
|
|
806
|
+
description: "Register your agent (AI assistant, human participant, or resource) with Chronary so it can own calendars, events, and webhooks.",
|
|
807
|
+
schema: CreateAgentSchema,
|
|
808
|
+
annotations: { title: "Create Agent", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
809
|
+
execute: createExecutor(createAgent)
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
name: "list_agents",
|
|
813
|
+
description: "List all agents in your organization",
|
|
814
|
+
schema: ListAgentsSchema,
|
|
815
|
+
annotations: { title: "List Agents", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
816
|
+
execute: createExecutor(listAgents)
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
name: "get_agent",
|
|
820
|
+
description: "Fetch a single agent by ID. An agent represents an AI assistant, human, or shared resource (e.g. a meeting room). Agent-scoped API keys may only read their own agent.",
|
|
821
|
+
schema: GetAgentSchema,
|
|
822
|
+
annotations: { title: "Get Agent", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
823
|
+
execute: createExecutor(getAgent)
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
name: "update_agent",
|
|
827
|
+
description: "Update an agent's name, description, metadata, or status (active/paused). Requires an org-level API key \u2014 agent-scoped keys cannot mutate agents.",
|
|
828
|
+
schema: UpdateAgentSchema,
|
|
829
|
+
annotations: { title: "Update Agent", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
830
|
+
execute: createExecutor(updateAgent)
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
name: "delete_agent",
|
|
834
|
+
description: "Decommission an agent. This marks the agent as decommissioned and revokes all of its scoped API keys. Requires an org-level API key \u2014 agent-scoped keys cannot delete agents.",
|
|
835
|
+
schema: DeleteAgentSchema,
|
|
836
|
+
annotations: { title: "Delete Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
837
|
+
execute: createExecutor(deleteAgent)
|
|
442
838
|
},
|
|
443
839
|
// ── Availability ───────────────────────────────────────────────
|
|
444
840
|
{
|
|
445
|
-
name: "
|
|
446
|
-
description: "Check
|
|
447
|
-
schema:
|
|
448
|
-
annotations: { title: "
|
|
449
|
-
execute: createExecutor(
|
|
841
|
+
name: "get_availability",
|
|
842
|
+
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).",
|
|
843
|
+
schema: GetAvailabilitySchema,
|
|
844
|
+
annotations: { title: "Get Availability", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
845
|
+
execute: createExecutor(getAvailability)
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
name: "find_meeting_time",
|
|
849
|
+
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).",
|
|
850
|
+
schema: FindMeetingTimeSchema,
|
|
851
|
+
annotations: { title: "Find Meeting Time", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
852
|
+
execute: createExecutor(findMeetingTime)
|
|
853
|
+
},
|
|
854
|
+
// ── Calendar context ───────────────────────────────────────────
|
|
855
|
+
{
|
|
856
|
+
name: "get_calendar_context",
|
|
857
|
+
description: `Get a calendar's temporal context in a single call: the current event (if one is happening now), the next upcoming event, recent past events, a short upcoming window, and the owning agent's status (idle/working/waiting/error). Use this to answer "what is this agent doing right now?" without issuing multiple list_events queries.`,
|
|
858
|
+
schema: GetCalendarContextSchema,
|
|
859
|
+
annotations: { title: "Get Calendar Context", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
860
|
+
execute: createExecutor(getCalendarContext)
|
|
861
|
+
},
|
|
862
|
+
// ── Scheduling proposals ───────────────────────────────────────
|
|
863
|
+
{
|
|
864
|
+
name: "create_proposal",
|
|
865
|
+
description: "Create a scheduling proposal \u2014 send a set of candidate time slots to one or more participant agents so they can accept, decline, or counter-propose. The organizer agent owns the proposal; once every participant responds, the system auto-resolves to the highest-scoring slot (or cancels if all decline). Requires an org-level API key. Pro plan only.",
|
|
866
|
+
schema: CreateProposalSchema,
|
|
867
|
+
annotations: { title: "Create Proposal", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
868
|
+
execute: createExecutor(createProposal)
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
name: "list_proposals",
|
|
872
|
+
description: "List scheduling proposals for the org. Filter by status (pending|confirmed|expired|cancelled) or organizer_agent_id. Requires an org-level API key.",
|
|
873
|
+
schema: ListProposalsSchema,
|
|
874
|
+
annotations: { title: "List Proposals", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
875
|
+
execute: createExecutor(listProposals)
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
name: "get_proposal",
|
|
879
|
+
description: "Get a scheduling proposal by id, including its slots and per-participant responses. Requires an org-level API key.",
|
|
880
|
+
schema: GetProposalSchema,
|
|
881
|
+
annotations: { title: "Get Proposal", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
882
|
+
execute: createExecutor(getProposal)
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
name: "respond_to_proposal",
|
|
886
|
+
description: 'Submit a response (accept / decline / counter) on behalf of one participant agent to an open proposal. An "accept" requires the slot id from the proposal; a "counter" can suggest alternative slots. When all participants have responded the proposal auto-resolves \u2014 no separate resolve call needed in the normal flow. Requires an org-level API key. Pro plan only.',
|
|
887
|
+
schema: RespondToProposalSchema,
|
|
888
|
+
annotations: { title: "Respond To Proposal", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
889
|
+
execute: createExecutor(respondToProposal)
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
name: "resolve_proposal",
|
|
893
|
+
description: 'Force-resolve an open proposal using responses collected so far. Picks the highest-scoring slot among those accepted by the most participants and creates a confirmed calendar event. If every response was "decline", the proposal is cancelled instead. Use when you want to close out a proposal without waiting for every participant. Requires an org-level API key. Pro plan only.',
|
|
894
|
+
schema: ResolveProposalSchema,
|
|
895
|
+
annotations: { title: "Resolve Proposal", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
896
|
+
execute: createExecutor(resolveProposal)
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
name: "cancel_proposal",
|
|
900
|
+
description: 'Cancel an open proposal. Fires a proposal.cancelled webhook with reason="organizer_cancelled". Requires an org-level API key. Pro plan only.',
|
|
901
|
+
schema: CancelProposalSchema,
|
|
902
|
+
annotations: { title: "Cancel Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
903
|
+
execute: createExecutor(cancelProposal)
|
|
904
|
+
},
|
|
905
|
+
// ── Availability rules ─────────────────────────────────────────
|
|
906
|
+
{
|
|
907
|
+
name: "set_availability_rules",
|
|
908
|
+
description: "Set or replace the availability rules on a calendar \u2014 buffer times before/after events and optional per-day working hours. When these rules are set, every availability query on this calendar automatically applies them (busy-block expansion for buffers, masking outside working hours). Upsert: overwrites any existing rules.",
|
|
909
|
+
schema: SetAvailabilityRulesSchema,
|
|
910
|
+
annotations: { title: "Set Availability Rules", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
911
|
+
execute: createExecutor(setAvailabilityRules)
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
name: "get_availability_rules",
|
|
915
|
+
description: "Read the buffer times and working-hours rules configured on a calendar. Returns the rules row, or an error if none are set.",
|
|
916
|
+
schema: GetAvailabilityRulesSchema,
|
|
917
|
+
annotations: { title: "Get Availability Rules", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
918
|
+
execute: createExecutor(getAvailabilityRules)
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
name: "clear_availability_rules",
|
|
922
|
+
description: "Remove the availability rules from a calendar, reverting to the default (no buffers, no working-hours mask). Returns the deleted row, or an error if none were set.",
|
|
923
|
+
schema: ClearAvailabilityRulesSchema,
|
|
924
|
+
annotations: { title: "Clear Availability Rules", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
925
|
+
execute: createExecutor(clearAvailabilityRules)
|
|
450
926
|
},
|
|
451
927
|
// ── Webhooks ───────────────────────────────────────────────────
|
|
452
928
|
{
|
|
453
929
|
name: "list_webhooks",
|
|
454
|
-
description: "List
|
|
930
|
+
description: "List the org's webhook subscriptions with their subscribed event types and active state. Signing secrets are never returned. Requires an org-level API key.",
|
|
455
931
|
schema: ListWebhooksSchema,
|
|
456
932
|
annotations: { title: "List Webhooks", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
457
933
|
execute: createExecutor(listWebhooks)
|
|
458
934
|
},
|
|
459
935
|
{
|
|
460
936
|
name: "get_webhook",
|
|
461
|
-
description: "Get a webhook subscription by its
|
|
937
|
+
description: "Get a single webhook subscription by id, including its subscribed event types and active state. The signing secret is never returned. Requires an org-level API key.",
|
|
462
938
|
schema: GetWebhookSchema,
|
|
463
939
|
annotations: { title: "Get Webhook", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
464
940
|
execute: createExecutor(getWebhook)
|
|
465
941
|
},
|
|
466
942
|
{
|
|
467
943
|
name: "create_webhook",
|
|
468
|
-
description: "Create a webhook subscription
|
|
944
|
+
description: "Create a webhook subscription so the org receives HTTP POST notifications when events occur (e.g. event.created, proposal.confirmed). The signing secret is returned ONCE in this response \u2014 store it to verify the HMAC-SHA256 signature on delivered payloads. Requires an org-level API key.",
|
|
469
945
|
schema: CreateWebhookSchema,
|
|
470
946
|
annotations: { title: "Create Webhook", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
471
947
|
execute: createExecutor(createWebhook)
|
|
472
948
|
},
|
|
473
949
|
{
|
|
474
950
|
name: "update_webhook",
|
|
475
|
-
description: "Update a webhook
|
|
951
|
+
description: "Update a webhook subscription \u2014 change its delivery URL, the set of subscribed event types, or pause/resume it via active. At least one field must be supplied. Requires an org-level API key.",
|
|
476
952
|
schema: UpdateWebhookSchema,
|
|
477
953
|
annotations: { title: "Update Webhook", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
478
954
|
execute: createExecutor(updateWebhook)
|
|
479
955
|
},
|
|
480
956
|
{
|
|
481
957
|
name: "delete_webhook",
|
|
482
|
-
description: "
|
|
958
|
+
description: "Permanently delete a webhook subscription. This frees its endpoint slot against the per-plan cap. Requires an org-level API key.",
|
|
483
959
|
schema: DeleteWebhookSchema,
|
|
484
960
|
annotations: { title: "Delete Webhook", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
485
961
|
execute: createExecutor(deleteWebhook)
|
|
486
962
|
},
|
|
963
|
+
{
|
|
964
|
+
name: "list_webhook_deliveries",
|
|
965
|
+
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.",
|
|
966
|
+
schema: ListWebhookDeliveriesSchema,
|
|
967
|
+
annotations: { title: "List Webhook Deliveries", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
968
|
+
execute: createExecutor(listWebhookDeliveries)
|
|
969
|
+
},
|
|
487
970
|
// ── iCal Subscriptions ─────────────────────────────────────────
|
|
488
971
|
{
|
|
489
972
|
name: "list_ical_subscriptions",
|
|
490
|
-
description: "List external
|
|
973
|
+
description: "List an agent's external iCal feed subscriptions (e.g. linked Google Calendar / Outlook feeds), including their sync status and last sync time.",
|
|
491
974
|
schema: ListICalSubscriptionsSchema,
|
|
492
975
|
annotations: { title: "List iCal Subscriptions", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
493
976
|
execute: createExecutor(listICalSubscriptions)
|
|
494
977
|
},
|
|
495
978
|
{
|
|
496
979
|
name: "get_ical_subscription",
|
|
497
|
-
description: "Get
|
|
980
|
+
description: "Get a single external iCal feed subscription by id, including its sync status, last sync time, and last error.",
|
|
498
981
|
schema: GetICalSubscriptionSchema,
|
|
499
982
|
annotations: { title: "Get iCal Subscription", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
500
983
|
execute: createExecutor(getICalSubscription)
|
|
501
984
|
},
|
|
502
985
|
{
|
|
503
|
-
name: "
|
|
504
|
-
description: "
|
|
505
|
-
schema:
|
|
506
|
-
annotations: { title: "
|
|
507
|
-
execute: createExecutor(
|
|
986
|
+
name: "subscribe_ical",
|
|
987
|
+
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. The target calendar must be owned by the specified agent \u2014 create the calendar with that agent_id first (org-level calendars without an agent_id cannot host external iCal subscriptions; create a dedicated per-agent calendar for sync targets).",
|
|
988
|
+
schema: SubscribeICalSchema,
|
|
989
|
+
annotations: { title: "Subscribe iCal", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
990
|
+
execute: createExecutor(subscribeICal)
|
|
508
991
|
},
|
|
509
992
|
{
|
|
510
993
|
name: "update_ical_subscription",
|
|
511
|
-
description: "Update an iCal subscription
|
|
994
|
+
description: "Update an external iCal feed subscription \u2014 change its label or its feed URL. Changing the URL forces a full re-sync on the next poll.",
|
|
512
995
|
schema: UpdateICalSubscriptionSchema,
|
|
513
996
|
annotations: { title: "Update iCal Subscription", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
514
997
|
execute: createExecutor(updateICalSubscription)
|
|
515
998
|
},
|
|
516
999
|
{
|
|
517
1000
|
name: "delete_ical_subscription",
|
|
518
|
-
description: "
|
|
1001
|
+
description: "Delete an external iCal feed subscription. Events previously synced from the feed are no longer refreshed.",
|
|
519
1002
|
schema: DeleteICalSubscriptionSchema,
|
|
520
1003
|
annotations: { title: "Delete iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
521
1004
|
execute: createExecutor(deleteICalSubscription)
|
|
522
1005
|
},
|
|
523
1006
|
{
|
|
524
1007
|
name: "sync_ical_subscription",
|
|
525
|
-
description: "Trigger an immediate sync of an iCal subscription instead of waiting for the next
|
|
1008
|
+
description: "Trigger an immediate sync of an external iCal feed subscription instead of waiting for the next scheduled poll. Returns once the sync has been queued.",
|
|
526
1009
|
schema: SyncICalSubscriptionSchema,
|
|
527
1010
|
annotations: { title: "Sync iCal Subscription", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
528
1011
|
execute: createExecutor(syncICalSubscription)
|
|
529
1012
|
},
|
|
1013
|
+
// ── Scoped keys ────────────────────────────────────────────────
|
|
1014
|
+
{
|
|
1015
|
+
name: "create_scoped_key",
|
|
1016
|
+
description: "Create an agent-scoped API key (chr_ak_*) that can only act on behalf of a single agent. Use this to self-provision or rotate per-agent credentials. The plaintext key is returned exactly once in the response \u2014 store it immediately, it cannot be retrieved later. Requires an org-level API key.",
|
|
1017
|
+
schema: CreateScopedKeySchema,
|
|
1018
|
+
annotations: { title: "Create Scoped Key", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
1019
|
+
execute: createExecutor(createScopedKey)
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
name: "list_scoped_keys",
|
|
1023
|
+
description: "List all live (non-revoked) agent-scoped API keys for this org. Returns key metadata only (id, prefix, agent_id, label, created_at) \u2014 never the plaintext secret. Requires an org-level API key.",
|
|
1024
|
+
schema: ListScopedKeysSchema,
|
|
1025
|
+
annotations: { title: "List Scoped Keys", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1026
|
+
execute: createExecutor(listScopedKeys)
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
name: "revoke_scoped_key",
|
|
1030
|
+
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.",
|
|
1031
|
+
schema: RevokeScopedKeySchema,
|
|
1032
|
+
annotations: { title: "Revoke Scoped Key", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1033
|
+
execute: createExecutor(revokeScopedKey)
|
|
1034
|
+
},
|
|
1035
|
+
// ── Audit log ──────────────────────────────────────────────────
|
|
1036
|
+
{
|
|
1037
|
+
name: "get_audit_log",
|
|
1038
|
+
description: "List audit-log entries for the calling org \u2014 mutating operations and auth-lifecycle events, newest first. Results are clamped to the plan's retention window. Requires an org-level API key (chr_sk_*); agent-scoped keys cannot read the org-wide audit log.",
|
|
1039
|
+
schema: GetAuditLogSchema,
|
|
1040
|
+
annotations: { title: "Get Audit Log", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1041
|
+
execute: createExecutor(getAuditLog)
|
|
1042
|
+
},
|
|
1043
|
+
// ── Terms ──────────────────────────────────────────────────────
|
|
1044
|
+
{
|
|
1045
|
+
name: "accept_terms",
|
|
1046
|
+
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 \u2014 a material ToS bump otherwise leaves MCP-only agents stuck without a console session. Pass the current tos_version (read it from GET /v1/auth/terms/current). Requires an org-level API key (chr_sk_*); agent-scoped keys cannot accept org-wide terms.",
|
|
1047
|
+
schema: AcceptTermsSchema,
|
|
1048
|
+
annotations: { title: "Accept Terms", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1049
|
+
execute: createExecutor(acceptTerms)
|
|
1050
|
+
},
|
|
530
1051
|
// ── Usage ──────────────────────────────────────────────────────
|
|
531
1052
|
{
|
|
532
1053
|
name: "get_usage",
|
|
533
|
-
description: "Get
|
|
1054
|
+
description: "Get the calling org's current-period usage and plan limits (agents, calendars, events, API calls, webhooks, availability queries, iCal subscriptions, proposals, scoped keys, holds, cross-calendar queries). Requires an org-level API key (chr_sk_*); agent-scoped keys cannot read org-wide usage.",
|
|
534
1055
|
schema: GetUsageSchema,
|
|
535
1056
|
annotations: { title: "Get Usage", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
536
1057
|
execute: createExecutor(getUsage)
|