@chronary/toolkit 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/ai-sdk.cjs +59 -54
- package/dist/ai-sdk.cjs.map +1 -1
- package/dist/ai-sdk.js +59 -54
- package/dist/ai-sdk.js.map +1 -1
- package/dist/index.cjs +59 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -4
- package/dist/index.d.ts +30 -4
- package/dist/index.js +59 -54
- package/dist/index.js.map +1 -1
- package/dist/langchain.cjs +59 -54
- package/dist/langchain.cjs.map +1 -1
- package/dist/langchain.js +59 -54
- package/dist/langchain.js.map +1 -1
- package/dist/mastra.cjs +59 -54
- package/dist/mastra.cjs.map +1 -1
- package/dist/mastra.js +59 -54
- package/dist/mastra.js.map +1 -1
- package/dist/mcp.cjs +60 -55
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.js +60 -55
- package/dist/mcp.js.map +1 -1
- package/dist/openai.cjs +59 -54
- package/dist/openai.cjs.map +1 -1
- package/dist/openai.js +59 -54
- package/dist/openai.js.map +1 -1
- package/package.json +3 -3
package/dist/ai-sdk.js
CHANGED
|
@@ -53,6 +53,20 @@ var UpdateCalendarSchema = z.object({
|
|
|
53
53
|
var DeleteCalendarSchema = z.object({
|
|
54
54
|
calendar_id: z.string().describe("Calendar ID to delete")
|
|
55
55
|
});
|
|
56
|
+
var timeOfDay = z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "must be HH:MM in 24-hour time");
|
|
57
|
+
var workingHoursDaySchema = z.object({
|
|
58
|
+
start: timeOfDay.describe('Start of the working window, HH:MM 24-hour, in the timezone of the availability rules or booking page it belongs to (e.g. "09:00")'),
|
|
59
|
+
end: timeOfDay.describe('End of the working window, HH:MM 24-hour, after start (e.g. "17:00")')
|
|
60
|
+
}).refine((v) => v.end > v.start, "end must be after start").describe("A single day's working hours window");
|
|
61
|
+
var workingHoursSchema = z.object({
|
|
62
|
+
mon: workingHoursDaySchema.optional(),
|
|
63
|
+
tue: workingHoursDaySchema.optional(),
|
|
64
|
+
wed: workingHoursDaySchema.optional(),
|
|
65
|
+
thu: workingHoursDaySchema.optional(),
|
|
66
|
+
fri: workingHoursDaySchema.optional(),
|
|
67
|
+
sat: workingHoursDaySchema.optional(),
|
|
68
|
+
sun: workingHoursDaySchema.optional()
|
|
69
|
+
}).refine((v) => Object.keys(v).length > 0, "at least one day must be specified").nullable();
|
|
56
70
|
var ListBookingPagesSchema = z.object({
|
|
57
71
|
limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
58
72
|
offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
|
|
@@ -61,7 +75,7 @@ var GetBookingPageSchema = z.object({
|
|
|
61
75
|
booking_page_id: z.string().describe("Booking page ID to fetch (bkp_...)")
|
|
62
76
|
});
|
|
63
77
|
var CreateBookingPageSchema = z.object({
|
|
64
|
-
calendar_id: z.string().describe("Calendar a booking resolves to
|
|
78
|
+
calendar_id: z.string().describe("Calendar ID a booking resolves to."),
|
|
65
79
|
title: z.string().min(1).max(200).describe("Meeting title shown on the page."),
|
|
66
80
|
description: z.string().max(2e3).optional().describe("Optional description shown to the booker."),
|
|
67
81
|
duration_minutes: z.number().int().min(5).max(480).optional().describe("Slot length in minutes (default 30)."),
|
|
@@ -69,7 +83,8 @@ var CreateBookingPageSchema = z.object({
|
|
|
69
83
|
window_days: z.number().int().min(1).max(365).optional().describe("How far ahead bookings are allowed (default 14)."),
|
|
70
84
|
min_notice_minutes: z.number().int().min(0).max(40320).optional().describe("Minimum lead time before a bookable slot (default 0)."),
|
|
71
85
|
timezone: z.string().min(1).max(64).optional().describe("IANA timezone for display + working hours (default UTC)."),
|
|
72
|
-
|
|
86
|
+
// Same shape the hosted API validates (#2525).
|
|
87
|
+
availability_constraints: workingHoursSchema.optional().describe('Weekly working hours keyed by day (mon, tue, wed, thu, fri, sat, sun; a day left out takes no bookings), each {"start":"HH:MM","end":"HH:MM"} in 24-hour time with end after start, e.g. {"mon":{"start":"09:00","end":"17:00"}}. Omit/null for any time in the window.'),
|
|
73
88
|
active: z.boolean().optional().describe("Whether the page accepts bookings (default true).")
|
|
74
89
|
});
|
|
75
90
|
var DeleteBookingPageSchema = z.object({
|
|
@@ -132,7 +147,7 @@ var UpdateEventSchema = z.object({
|
|
|
132
147
|
});
|
|
133
148
|
var CancelEventSchema = z.object({
|
|
134
149
|
event_id: z.string().describe("Event ID to cancel"),
|
|
135
|
-
calendar_id: z.string().optional().describe("Calendar ID that owns the event. Optional \u2014 if omitted the calendar is resolved from the event.
|
|
150
|
+
calendar_id: z.string().optional().describe("Calendar ID that owns the event. Optional \u2014 if omitted the calendar is resolved from the event."),
|
|
136
151
|
occurrence_start: z.string().datetime({ offset: true }).optional().describe("For recurring events only: ISO 8601 start of the single occurrence to cancel. The rest of the series is unaffected.")
|
|
137
152
|
});
|
|
138
153
|
var ConfirmEventSchema = z.object({
|
|
@@ -204,7 +219,11 @@ var proposalSlotSchema = z.object({
|
|
|
204
219
|
end_time: z.string().datetime({ offset: true }).describe("Slot end time (ISO 8601), after start_time"),
|
|
205
220
|
weight: z.number().min(0).max(10).default(1).optional().describe("Preference for this slot, 0\u201310 (higher = more preferred). Used to rank candidate slots when the proposal is resolved. Defaults to 1."),
|
|
206
221
|
calendar_id: z.string().optional().describe("Calendar to create the event on if this slot is chosen. Defaults to the proposal's top-level calendar_id.")
|
|
207
|
-
})
|
|
222
|
+
}).refine(
|
|
223
|
+
// Same rule as the API (#2538): a slot must end after it starts.
|
|
224
|
+
(v) => new Date(v.end_time).getTime() > new Date(v.start_time).getTime(),
|
|
225
|
+
"end_time must be after start_time"
|
|
226
|
+
);
|
|
208
227
|
var CreateProposalSchema = z.object({
|
|
209
228
|
title: z.string().min(1).max(500).describe("Short description of what the meeting is about"),
|
|
210
229
|
description: z.string().max(5e3).optional().describe("Longer context/agenda"),
|
|
@@ -237,20 +256,6 @@ var ResolveProposalSchema = z.object({
|
|
|
237
256
|
var CancelProposalSchema = z.object({
|
|
238
257
|
proposal_id: z.string().describe("Proposal to cancel")
|
|
239
258
|
});
|
|
240
|
-
var timeOfDay = z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "must be HH:MM in 24-hour time");
|
|
241
|
-
var workingHoursDaySchema = z.object({
|
|
242
|
-
start: timeOfDay.describe('Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. "09:00")'),
|
|
243
|
-
end: timeOfDay.describe('End of the working window, HH:MM 24-hour, after start (e.g. "17:00")')
|
|
244
|
-
}).refine((v) => v.end > v.start, "end must be after start").describe("A single day's working hours window");
|
|
245
|
-
var workingHoursSchema = z.object({
|
|
246
|
-
mon: workingHoursDaySchema.optional(),
|
|
247
|
-
tue: workingHoursDaySchema.optional(),
|
|
248
|
-
wed: workingHoursDaySchema.optional(),
|
|
249
|
-
thu: workingHoursDaySchema.optional(),
|
|
250
|
-
fri: workingHoursDaySchema.optional(),
|
|
251
|
-
sat: workingHoursDaySchema.optional(),
|
|
252
|
-
sun: workingHoursDaySchema.optional()
|
|
253
|
-
}).refine((v) => Object.keys(v).length > 0, "at least one day must be specified").nullable();
|
|
254
259
|
var SetAvailabilityRulesSchema = z.object({
|
|
255
260
|
calendar_id: z.string().describe("Calendar to configure"),
|
|
256
261
|
buffer_before_minutes: z.number().int().min(0).max(120).default(0).describe("Minutes of buffer before each event (0\u2013120)"),
|
|
@@ -325,7 +330,7 @@ var ListWebhookDeliveriesSchema = z.object({
|
|
|
325
330
|
});
|
|
326
331
|
var GetWebhookDeliverySchema = z.object({
|
|
327
332
|
webhook_id: z.string().describe("Webhook subscription the delivery belongs to"),
|
|
328
|
-
delivery_id: z.string().describe("Delivery ID (whd_...)
|
|
333
|
+
delivery_id: z.string().describe("Delivery ID (whd_...)")
|
|
329
334
|
});
|
|
330
335
|
var SendTestWebhookSchema = z.object({
|
|
331
336
|
webhook_id: z.string().describe("Webhook subscription to send the test event to"),
|
|
@@ -849,14 +854,14 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
849
854
|
name: "create_calendar",
|
|
850
855
|
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.',
|
|
851
856
|
schema: CreateCalendarSchema,
|
|
852
|
-
annotations: { title: "Create Calendar", readOnlyHint: false, destructiveHint:
|
|
857
|
+
annotations: { title: "Create Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
853
858
|
execute: createExecutor(createCalendar)
|
|
854
859
|
},
|
|
855
860
|
{
|
|
856
861
|
name: "update_calendar",
|
|
857
862
|
description: "Update a calendar's name, timezone, agent status, default reminders, or metadata. Agent keys may only update calendars owned by their agent.",
|
|
858
863
|
schema: UpdateCalendarSchema,
|
|
859
|
-
annotations: { title: "Update Calendar", readOnlyHint: false, destructiveHint:
|
|
864
|
+
annotations: { title: "Update Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
860
865
|
execute: createExecutor(updateCalendar)
|
|
861
866
|
},
|
|
862
867
|
{
|
|
@@ -871,7 +876,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
871
876
|
name: "create_booking_page",
|
|
872
877
|
description: "Create a public booking page (a hosted scheduling link) for a calendar. Returns a booking_url to send to a human; when they pick a slot, a confirmed event is created on the calendar and an event.created webhook fires with a booking_page_id field. Set availability_constraints to restrict to weekly working hours; existing calendar events always block slots.",
|
|
873
878
|
schema: CreateBookingPageSchema,
|
|
874
|
-
annotations: { title: "Create Booking Page", readOnlyHint: false, destructiveHint:
|
|
879
|
+
annotations: { title: "Create Booking Page", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
875
880
|
execute: createExecutor(createBookingPage)
|
|
876
881
|
},
|
|
877
882
|
{
|
|
@@ -906,7 +911,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
906
911
|
},
|
|
907
912
|
{
|
|
908
913
|
name: "list_org_events",
|
|
909
|
-
description: "List events across all of the organization's calendars in one call, ordered by start time (an Agent key sees only its agent's calendars). Narrow with `calendar_ids`, `agent_id`, a `start_after`/`start_before` window, `status` and `source`. `q` searches titles (case-insensitive) and needs both window bounds at most 31 days apart.
|
|
914
|
+
description: "List events across all of the organization's calendars in one call, ordered by start time (an Agent key sees only its agent's calendars). Narrow with `calendar_ids`, `agent_id`, a `start_after`/`start_before` window, `status` and `source`. `q` searches titles (case-insensitive) and needs both window bounds at most 31 days apart. Page with the returned next_cursor.",
|
|
910
915
|
schema: ListOrgEventsSchema,
|
|
911
916
|
annotations: { title: "List Organization Events", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
912
917
|
untrustedFields: EVENT_UNTRUSTED_FIELDS,
|
|
@@ -922,16 +927,16 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
922
927
|
},
|
|
923
928
|
{
|
|
924
929
|
name: "create_event",
|
|
925
|
-
description: `Create a booking, appointment, meeting, hold, or any scheduled event on a calendar.
|
|
930
|
+
description: `Create a booking, appointment, meeting, hold, or any scheduled event on a calendar. 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.`,
|
|
926
931
|
schema: CreateEventSchema,
|
|
927
|
-
annotations: { title: "Create Event", readOnlyHint: false, destructiveHint:
|
|
932
|
+
annotations: { title: "Create Event", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
928
933
|
execute: createExecutor(createEvent)
|
|
929
934
|
},
|
|
930
935
|
{
|
|
931
936
|
name: "update_event",
|
|
932
|
-
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
|
|
937
|
+
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; confirm or release them instead. External iCal events are read-only. `calendar_id` is optional \u2014 if omitted it is resolved from the event.",
|
|
933
938
|
schema: UpdateEventSchema,
|
|
934
|
-
annotations: { title: "Update Event", readOnlyHint: false, destructiveHint:
|
|
939
|
+
annotations: { title: "Update Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
935
940
|
untrustedFields: EVENT_UNTRUSTED_FIELDS,
|
|
936
941
|
execute: createExecutor(updateEvent)
|
|
937
942
|
},
|
|
@@ -947,7 +952,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
947
952
|
name: "confirm_event",
|
|
948
953
|
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.',
|
|
949
954
|
schema: ConfirmEventSchema,
|
|
950
|
-
annotations: { title: "Confirm Event", readOnlyHint: false, destructiveHint:
|
|
955
|
+
annotations: { title: "Confirm Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
951
956
|
untrustedFields: EVENT_UNTRUSTED_FIELDS,
|
|
952
957
|
execute: createExecutor(confirmEvent)
|
|
953
958
|
},
|
|
@@ -963,7 +968,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
963
968
|
name: "create_agent",
|
|
964
969
|
description: "Register your agent (AI assistant, human participant, or resource) with Chronary so it can own calendars, events, and webhooks.",
|
|
965
970
|
schema: CreateAgentSchema,
|
|
966
|
-
annotations: { title: "Create Agent", readOnlyHint: false, destructiveHint:
|
|
971
|
+
annotations: { title: "Create Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
967
972
|
execute: createExecutor(createAgent)
|
|
968
973
|
},
|
|
969
974
|
{
|
|
@@ -984,12 +989,12 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
984
989
|
name: "update_agent",
|
|
985
990
|
description: "Update an agent's name, description, metadata, or status (active/paused). Setting status on a decommissioned agent restores it and makes its calendars writable again; that is refused with quota_exceeded when the agent, its calendars or their recurring series would put the organization over the plan's agent, calendar or recurring series limit. Requires an Organization key \u2014 Agent keys cannot mutate agents.",
|
|
986
991
|
schema: UpdateAgentSchema,
|
|
987
|
-
annotations: { title: "Update Agent", readOnlyHint: false, destructiveHint:
|
|
992
|
+
annotations: { title: "Update Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
988
993
|
execute: createExecutor(updateAgent)
|
|
989
994
|
},
|
|
990
995
|
{
|
|
991
996
|
name: "delete_agent",
|
|
992
|
-
description: "Decommission an agent. This marks the agent as decommissioned and revokes all of its Agent keys. Its calendars and events are kept but stop counting toward the plan's calendar limit, and they are read-only (writes return agent_inactive) until the agent is restored
|
|
997
|
+
description: "Decommission an agent. This marks the agent as decommissioned and revokes all of its Agent keys. Its calendars and events are kept but stop counting toward the plan's calendar limit, and they are read-only (writes return agent_inactive) until the agent is restored by setting its status again (active or paused). Requires an Organization key \u2014 Agent keys cannot delete agents.",
|
|
993
998
|
schema: DeleteAgentSchema,
|
|
994
999
|
annotations: { title: "Delete Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
995
1000
|
execute: createExecutor(deleteAgent)
|
|
@@ -1013,7 +1018,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1013
1018
|
name: "create_connection_link",
|
|
1014
1019
|
description: "Request human setup of Google Calendar or Microsoft Outlook for a Chronary calendar. Give setup_url to a human; the agent never receives OAuth credentials, provider calendar names, or event data. When the human finishes, the linked account becomes a Connection, listed under Human calendars in the Chronary console. The secret URL is returned only on first creation. If reused=true and setup_url is null, retain the original URL or cancel this link and create a replacement.",
|
|
1015
1020
|
schema: CreateConnectionLinkSchema,
|
|
1016
|
-
annotations: { title: "Create Human Calendar Setup Link", readOnlyHint: false, destructiveHint:
|
|
1021
|
+
annotations: { title: "Create Human Calendar Setup Link", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1017
1022
|
execute: createExecutor(createConnectionLink)
|
|
1018
1023
|
},
|
|
1019
1024
|
{
|
|
@@ -1033,7 +1038,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1033
1038
|
// ── Calendar context ───────────────────────────────────────────
|
|
1034
1039
|
{
|
|
1035
1040
|
name: "get_calendar_context",
|
|
1036
|
-
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
|
|
1041
|
+
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 listing events separately. Recurring series appear as their occurrences (with recurringEventId); when events overlap, the current event is the most recently started.`,
|
|
1037
1042
|
schema: GetCalendarContextSchema,
|
|
1038
1043
|
annotations: { title: "Get Calendar Context", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1039
1044
|
untrustedFields: EVENT_UNTRUSTED_FIELDS,
|
|
@@ -1044,7 +1049,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1044
1049
|
name: "create_proposal",
|
|
1045
1050
|
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 Organization key and a Developer or Pro plan.",
|
|
1046
1051
|
schema: CreateProposalSchema,
|
|
1047
|
-
annotations: { title: "Create Proposal", readOnlyHint: false, destructiveHint:
|
|
1052
|
+
annotations: { title: "Create Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1048
1053
|
execute: createExecutor(createProposal)
|
|
1049
1054
|
},
|
|
1050
1055
|
{
|
|
@@ -1063,16 +1068,16 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1063
1068
|
},
|
|
1064
1069
|
{
|
|
1065
1070
|
name: "respond_to_proposal",
|
|
1066
|
-
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 Organization key and a Developer or Pro plan.',
|
|
1071
|
+
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. The result is the saved response plus auto_resolved (confirmed / cancelled / null) and auto_resolve_error: if the auto-resolve fails, the response is still saved and auto_resolve_error says what to do next (usually: resolve the proposal once the cause is fixed). Do not respond again. Requires an Organization key and a Developer or Pro plan.',
|
|
1067
1072
|
schema: RespondToProposalSchema,
|
|
1068
|
-
annotations: { title: "Respond To Proposal", readOnlyHint: false, destructiveHint:
|
|
1073
|
+
annotations: { title: "Respond To Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1069
1074
|
execute: createExecutor(respondToProposal)
|
|
1070
1075
|
},
|
|
1071
1076
|
{
|
|
1072
1077
|
name: "resolve_proposal",
|
|
1073
1078
|
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 Organization key and a Developer or Pro plan.',
|
|
1074
1079
|
schema: ResolveProposalSchema,
|
|
1075
|
-
annotations: { title: "Resolve Proposal", readOnlyHint: false, destructiveHint:
|
|
1080
|
+
annotations: { title: "Resolve Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1076
1081
|
execute: createExecutor(resolveProposal)
|
|
1077
1082
|
},
|
|
1078
1083
|
{
|
|
@@ -1087,7 +1092,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1087
1092
|
name: "set_availability_rules",
|
|
1088
1093
|
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.",
|
|
1089
1094
|
schema: SetAvailabilityRulesSchema,
|
|
1090
|
-
annotations: { title: "Set Availability Rules", readOnlyHint: false, destructiveHint:
|
|
1095
|
+
annotations: { title: "Set Availability Rules", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1091
1096
|
execute: createExecutor(setAvailabilityRules)
|
|
1092
1097
|
},
|
|
1093
1098
|
{
|
|
@@ -1123,7 +1128,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1123
1128
|
name: "create_webhook",
|
|
1124
1129
|
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 Organization key.",
|
|
1125
1130
|
schema: CreateWebhookSchema,
|
|
1126
|
-
annotations: { title: "Create Webhook", readOnlyHint: false, destructiveHint:
|
|
1131
|
+
annotations: { title: "Create Webhook", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1127
1132
|
execute: createExecutor(createWebhook)
|
|
1128
1133
|
},
|
|
1129
1134
|
{
|
|
@@ -1158,16 +1163,16 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1158
1163
|
},
|
|
1159
1164
|
{
|
|
1160
1165
|
name: "send_test_webhook",
|
|
1161
|
-
description: "Send a signed sample payload of one event type to a webhook endpoint, to check that it receives and verifies deliveries. The delivery is marked is_test, carries the X-Chronary-Test: 1 header, makes one attempt, does not count toward the monthly delivery quota and is sent even when the endpoint is paused or disabled. The endpoint must subscribe to the event type.
|
|
1166
|
+
description: "Send a signed sample payload of one event type to a webhook endpoint, to check that it receives and verifies deliveries. The delivery is marked is_test, carries the X-Chronary-Test: 1 header, makes one attempt, does not count toward the monthly delivery quota and is sent even when the endpoint is paused or disabled. The endpoint must subscribe to the event type. The outcome is recorded on the returned delivery_id. Limited to 10 per minute. Requires an Organization key.",
|
|
1162
1167
|
schema: SendTestWebhookSchema,
|
|
1163
|
-
annotations: { title: "Send Test Webhook", readOnlyHint: false, destructiveHint:
|
|
1168
|
+
annotations: { title: "Send Test Webhook", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1164
1169
|
execute: createExecutor(sendTestWebhook)
|
|
1165
1170
|
},
|
|
1166
1171
|
{
|
|
1167
1172
|
name: "replay_webhook_delivery",
|
|
1168
|
-
description: "Send a failed or dropped webhook delivery again, as a new delivery with a new delivery_id. The stored payload goes out unchanged (same event id), signed with the endpoint's current secret, with an X-Chronary-Replay-Of header naming the original delivery. Only failed or dropped deliveries that are not test events can be replayed, the endpoint must be active, and the payload must still be stored (30 days). The replay follows the normal retry schedule and counts toward the monthly delivery quota.
|
|
1173
|
+
description: "Send a failed or dropped webhook delivery again, as a new delivery with a new delivery_id. The stored payload goes out unchanged (same event id), signed with the endpoint's current secret, with an X-Chronary-Replay-Of header naming the original delivery. Only failed or dropped deliveries that are not test events can be replayed, the endpoint must be active, and the payload must still be stored (30 days). The replay follows the normal retry schedule and counts toward the monthly delivery quota. The outcome is recorded on the returned delivery_id. Limited to 30 per minute. Requires a Developer or Pro plan and an Organization key.",
|
|
1169
1174
|
schema: ReplayWebhookDeliverySchema,
|
|
1170
|
-
annotations: { title: "Replay Webhook Delivery", readOnlyHint: false, destructiveHint:
|
|
1175
|
+
annotations: { title: "Replay Webhook Delivery", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1171
1176
|
execute: createExecutor(replayWebhookDelivery)
|
|
1172
1177
|
},
|
|
1173
1178
|
// ── iCal Subscriptions ─────────────────────────────────────────
|
|
@@ -1189,14 +1194,14 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1189
1194
|
name: "subscribe_ical",
|
|
1190
1195
|
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).",
|
|
1191
1196
|
schema: SubscribeICalSchema,
|
|
1192
|
-
annotations: { title: "Subscribe iCal", readOnlyHint: false, destructiveHint:
|
|
1197
|
+
annotations: { title: "Subscribe iCal", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1193
1198
|
execute: createExecutor(subscribeICal)
|
|
1194
1199
|
},
|
|
1195
1200
|
{
|
|
1196
1201
|
name: "update_ical_subscription",
|
|
1197
1202
|
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.",
|
|
1198
1203
|
schema: UpdateICalSubscriptionSchema,
|
|
1199
|
-
annotations: { title: "Update iCal Subscription", readOnlyHint: false, destructiveHint:
|
|
1204
|
+
annotations: { title: "Update iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
1200
1205
|
execute: createExecutor(updateICalSubscription)
|
|
1201
1206
|
},
|
|
1202
1207
|
{
|
|
@@ -1208,23 +1213,23 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1208
1213
|
},
|
|
1209
1214
|
{
|
|
1210
1215
|
name: "sync_ical_subscription",
|
|
1211
|
-
description: 'Start an immediate fetch of an external iCal feed instead of waiting for the next scheduled poll. Returns {"status":"syncing"} as soon as the fetch has started;
|
|
1216
|
+
description: 'Start an immediate fetch of an external iCal feed instead of waiting for the next scheduled poll. Returns {"status":"syncing"} as soon as the fetch has started; last_synced_at and last_error on the subscription update when the fetch finishes, usually within a few seconds. A paused feed must be resumed first; one manual sync per feed per minute on paid plans, per 15 minutes on Free.',
|
|
1212
1217
|
schema: SyncICalSubscriptionSchema,
|
|
1213
|
-
annotations: { title: "Sync iCal Subscription", readOnlyHint: false, destructiveHint:
|
|
1218
|
+
annotations: { title: "Sync iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
1214
1219
|
execute: createExecutor(syncICalSubscription)
|
|
1215
1220
|
},
|
|
1216
1221
|
{
|
|
1217
1222
|
name: "pause_ical_subscription",
|
|
1218
1223
|
description: "Pause an external iCal feed subscription: scheduled polls skip it and manual syncs are refused until it is resumed. Busy blocks already imported stay. Pausing a paused feed changes nothing. Returns the subscription.",
|
|
1219
1224
|
schema: PauseICalSubscriptionSchema,
|
|
1220
|
-
annotations: { title: "Pause iCal Subscription", readOnlyHint: false, destructiveHint:
|
|
1225
|
+
annotations: { title: "Pause iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1221
1226
|
execute: createExecutor(pauseICalSubscription)
|
|
1222
1227
|
},
|
|
1223
1228
|
{
|
|
1224
1229
|
name: "resume_ical_subscription",
|
|
1225
1230
|
description: "Resume a paused or failing external iCal feed subscription: it returns to scheduled polling and its last_error is cleared. Resuming an active feed changes nothing. Returns the subscription.",
|
|
1226
1231
|
schema: ResumeICalSubscriptionSchema,
|
|
1227
|
-
annotations: { title: "Resume iCal Subscription", readOnlyHint: false, destructiveHint:
|
|
1232
|
+
annotations: { title: "Resume iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1228
1233
|
execute: createExecutor(resumeICalSubscription)
|
|
1229
1234
|
},
|
|
1230
1235
|
// ── Scoped keys ────────────────────────────────────────────────
|
|
@@ -1232,7 +1237,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1232
1237
|
name: "create_scoped_key",
|
|
1233
1238
|
description: "Create an Agent 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 Organization key.",
|
|
1234
1239
|
schema: CreateScopedKeySchema,
|
|
1235
|
-
annotations: { title: "Create Scoped Key", readOnlyHint: false, destructiveHint:
|
|
1240
|
+
annotations: { title: "Create Scoped Key", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1236
1241
|
execute: createExecutor(createScopedKey)
|
|
1237
1242
|
},
|
|
1238
1243
|
{
|
|
@@ -1262,7 +1267,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1262
1267
|
name: "accept_terms",
|
|
1263
1268
|
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 Organization key (chr_sk_*); Agent keys cannot accept org-wide terms.",
|
|
1264
1269
|
schema: AcceptTermsSchema,
|
|
1265
|
-
annotations: { title: "Accept Terms", readOnlyHint: false, destructiveHint:
|
|
1270
|
+
annotations: { title: "Accept Terms", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1266
1271
|
execute: createExecutor(acceptTerms)
|
|
1267
1272
|
},
|
|
1268
1273
|
// ── Usage ──────────────────────────────────────────────────────
|
|
@@ -1290,9 +1295,9 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1290
1295
|
},
|
|
1291
1296
|
{
|
|
1292
1297
|
name: "request_upgrade",
|
|
1293
|
-
description: "Ask your human to upgrade this Chronary account to the next plan up
|
|
1298
|
+
description: "Ask your human to upgrade this Chronary account to the next plan up. Returns approval_url \u2014 give it to your human; only a human can pay. If reused=true a request is already pending \u2014 do not call again; check the status of the request at most once a minute. The link opens the Billing page in the Chronary console.",
|
|
1294
1299
|
schema: RequestUpgradeSchema,
|
|
1295
|
-
annotations: { title: "Request Upgrade", readOnlyHint: false, destructiveHint:
|
|
1300
|
+
annotations: { title: "Request Upgrade", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1296
1301
|
execute: createExecutor(requestUpgrade)
|
|
1297
1302
|
},
|
|
1298
1303
|
{
|
|
@@ -1306,7 +1311,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1306
1311
|
name: "cancel_upgrade_request",
|
|
1307
1312
|
description: "Withdraw a pending upgrade request (for example, the blocker went away). The approval URL stops working. Fails with upgrade_request_not_pending if the request is already completed, declined, canceled, or expired.",
|
|
1308
1313
|
schema: CancelUpgradeRequestSchema,
|
|
1309
|
-
annotations: { title: "Cancel Upgrade Request", readOnlyHint: false, destructiveHint:
|
|
1314
|
+
annotations: { title: "Cancel Upgrade Request", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1310
1315
|
execute: createExecutor(cancelUpgradeRequest)
|
|
1311
1316
|
}
|
|
1312
1317
|
];
|