@chronary/toolkit 1.7.1 → 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 +12 -0
- package/dist/ai-sdk.cjs +60 -55
- package/dist/ai-sdk.cjs.map +1 -1
- package/dist/ai-sdk.js +60 -55
- package/dist/ai-sdk.js.map +1 -1
- package/dist/index.cjs +60 -55
- 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 +60 -55
- package/dist/index.js.map +1 -1
- package/dist/langchain.cjs +60 -55
- package/dist/langchain.cjs.map +1 -1
- package/dist/langchain.js +60 -55
- package/dist/langchain.js.map +1 -1
- package/dist/mastra.cjs +60 -55
- package/dist/mastra.cjs.map +1 -1
- package/dist/mastra.js +60 -55
- package/dist/mastra.js.map +1 -1
- package/dist/mcp.cjs +62 -57
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.js +62 -57
- package/dist/mcp.js.map +1 -1
- package/dist/openai.cjs +60 -55
- package/dist/openai.cjs.map +1 -1
- package/dist/openai.js +60 -55
- package/dist/openai.js.map +1 -1
- package/package.json +3 -3
package/dist/mcp.js
CHANGED
|
@@ -56,6 +56,20 @@ var UpdateCalendarSchema = z.object({
|
|
|
56
56
|
var DeleteCalendarSchema = z.object({
|
|
57
57
|
calendar_id: z.string().describe("Calendar ID to delete")
|
|
58
58
|
});
|
|
59
|
+
var timeOfDay = z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "must be HH:MM in 24-hour time");
|
|
60
|
+
var workingHoursDaySchema = z.object({
|
|
61
|
+
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")'),
|
|
62
|
+
end: timeOfDay.describe('End of the working window, HH:MM 24-hour, after start (e.g. "17:00")')
|
|
63
|
+
}).refine((v) => v.end > v.start, "end must be after start").describe("A single day's working hours window");
|
|
64
|
+
var workingHoursSchema = z.object({
|
|
65
|
+
mon: workingHoursDaySchema.optional(),
|
|
66
|
+
tue: workingHoursDaySchema.optional(),
|
|
67
|
+
wed: workingHoursDaySchema.optional(),
|
|
68
|
+
thu: workingHoursDaySchema.optional(),
|
|
69
|
+
fri: workingHoursDaySchema.optional(),
|
|
70
|
+
sat: workingHoursDaySchema.optional(),
|
|
71
|
+
sun: workingHoursDaySchema.optional()
|
|
72
|
+
}).refine((v) => Object.keys(v).length > 0, "at least one day must be specified").nullable();
|
|
59
73
|
var ListBookingPagesSchema = z.object({
|
|
60
74
|
limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
61
75
|
offset: z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
|
|
@@ -64,7 +78,7 @@ var GetBookingPageSchema = z.object({
|
|
|
64
78
|
booking_page_id: z.string().describe("Booking page ID to fetch (bkp_...)")
|
|
65
79
|
});
|
|
66
80
|
var CreateBookingPageSchema = z.object({
|
|
67
|
-
calendar_id: z.string().describe("Calendar a booking resolves to
|
|
81
|
+
calendar_id: z.string().describe("Calendar ID a booking resolves to."),
|
|
68
82
|
title: z.string().min(1).max(200).describe("Meeting title shown on the page."),
|
|
69
83
|
description: z.string().max(2e3).optional().describe("Optional description shown to the booker."),
|
|
70
84
|
duration_minutes: z.number().int().min(5).max(480).optional().describe("Slot length in minutes (default 30)."),
|
|
@@ -72,7 +86,8 @@ var CreateBookingPageSchema = z.object({
|
|
|
72
86
|
window_days: z.number().int().min(1).max(365).optional().describe("How far ahead bookings are allowed (default 14)."),
|
|
73
87
|
min_notice_minutes: z.number().int().min(0).max(40320).optional().describe("Minimum lead time before a bookable slot (default 0)."),
|
|
74
88
|
timezone: z.string().min(1).max(64).optional().describe("IANA timezone for display + working hours (default UTC)."),
|
|
75
|
-
|
|
89
|
+
// Same shape the hosted API validates (#2525).
|
|
90
|
+
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.'),
|
|
76
91
|
active: z.boolean().optional().describe("Whether the page accepts bookings (default true).")
|
|
77
92
|
});
|
|
78
93
|
var DeleteBookingPageSchema = z.object({
|
|
@@ -135,7 +150,7 @@ var UpdateEventSchema = z.object({
|
|
|
135
150
|
});
|
|
136
151
|
var CancelEventSchema = z.object({
|
|
137
152
|
event_id: z.string().describe("Event ID to cancel"),
|
|
138
|
-
calendar_id: z.string().optional().describe("Calendar ID that owns the event. Optional \u2014 if omitted the calendar is resolved from the event.
|
|
153
|
+
calendar_id: z.string().optional().describe("Calendar ID that owns the event. Optional \u2014 if omitted the calendar is resolved from the event."),
|
|
139
154
|
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.")
|
|
140
155
|
});
|
|
141
156
|
var ConfirmEventSchema = z.object({
|
|
@@ -207,7 +222,11 @@ var proposalSlotSchema = z.object({
|
|
|
207
222
|
end_time: z.string().datetime({ offset: true }).describe("Slot end time (ISO 8601), after start_time"),
|
|
208
223
|
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."),
|
|
209
224
|
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.")
|
|
210
|
-
})
|
|
225
|
+
}).refine(
|
|
226
|
+
// Same rule as the API (#2538): a slot must end after it starts.
|
|
227
|
+
(v) => new Date(v.end_time).getTime() > new Date(v.start_time).getTime(),
|
|
228
|
+
"end_time must be after start_time"
|
|
229
|
+
);
|
|
211
230
|
var CreateProposalSchema = z.object({
|
|
212
231
|
title: z.string().min(1).max(500).describe("Short description of what the meeting is about"),
|
|
213
232
|
description: z.string().max(5e3).optional().describe("Longer context/agenda"),
|
|
@@ -240,20 +259,6 @@ var ResolveProposalSchema = z.object({
|
|
|
240
259
|
var CancelProposalSchema = z.object({
|
|
241
260
|
proposal_id: z.string().describe("Proposal to cancel")
|
|
242
261
|
});
|
|
243
|
-
var timeOfDay = z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "must be HH:MM in 24-hour time");
|
|
244
|
-
var workingHoursDaySchema = z.object({
|
|
245
|
-
start: timeOfDay.describe('Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. "09:00")'),
|
|
246
|
-
end: timeOfDay.describe('End of the working window, HH:MM 24-hour, after start (e.g. "17:00")')
|
|
247
|
-
}).refine((v) => v.end > v.start, "end must be after start").describe("A single day's working hours window");
|
|
248
|
-
var workingHoursSchema = z.object({
|
|
249
|
-
mon: workingHoursDaySchema.optional(),
|
|
250
|
-
tue: workingHoursDaySchema.optional(),
|
|
251
|
-
wed: workingHoursDaySchema.optional(),
|
|
252
|
-
thu: workingHoursDaySchema.optional(),
|
|
253
|
-
fri: workingHoursDaySchema.optional(),
|
|
254
|
-
sat: workingHoursDaySchema.optional(),
|
|
255
|
-
sun: workingHoursDaySchema.optional()
|
|
256
|
-
}).refine((v) => Object.keys(v).length > 0, "at least one day must be specified").nullable();
|
|
257
262
|
var SetAvailabilityRulesSchema = z.object({
|
|
258
263
|
calendar_id: z.string().describe("Calendar to configure"),
|
|
259
264
|
buffer_before_minutes: z.number().int().min(0).max(120).default(0).describe("Minutes of buffer before each event (0\u2013120)"),
|
|
@@ -328,7 +333,7 @@ var ListWebhookDeliveriesSchema = z.object({
|
|
|
328
333
|
});
|
|
329
334
|
var GetWebhookDeliverySchema = z.object({
|
|
330
335
|
webhook_id: z.string().describe("Webhook subscription the delivery belongs to"),
|
|
331
|
-
delivery_id: z.string().describe("Delivery ID (whd_...)
|
|
336
|
+
delivery_id: z.string().describe("Delivery ID (whd_...)")
|
|
332
337
|
});
|
|
333
338
|
var SendTestWebhookSchema = z.object({
|
|
334
339
|
webhook_id: z.string().describe("Webhook subscription to send the test event to"),
|
|
@@ -852,14 +857,14 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
852
857
|
name: "create_calendar",
|
|
853
858
|
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.',
|
|
854
859
|
schema: CreateCalendarSchema,
|
|
855
|
-
annotations: { title: "Create Calendar", readOnlyHint: false, destructiveHint:
|
|
860
|
+
annotations: { title: "Create Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
856
861
|
execute: createExecutor(createCalendar)
|
|
857
862
|
},
|
|
858
863
|
{
|
|
859
864
|
name: "update_calendar",
|
|
860
865
|
description: "Update a calendar's name, timezone, agent status, default reminders, or metadata. Agent keys may only update calendars owned by their agent.",
|
|
861
866
|
schema: UpdateCalendarSchema,
|
|
862
|
-
annotations: { title: "Update Calendar", readOnlyHint: false, destructiveHint:
|
|
867
|
+
annotations: { title: "Update Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
863
868
|
execute: createExecutor(updateCalendar)
|
|
864
869
|
},
|
|
865
870
|
{
|
|
@@ -874,7 +879,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
874
879
|
name: "create_booking_page",
|
|
875
880
|
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.",
|
|
876
881
|
schema: CreateBookingPageSchema,
|
|
877
|
-
annotations: { title: "Create Booking Page", readOnlyHint: false, destructiveHint:
|
|
882
|
+
annotations: { title: "Create Booking Page", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
878
883
|
execute: createExecutor(createBookingPage)
|
|
879
884
|
},
|
|
880
885
|
{
|
|
@@ -909,7 +914,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
909
914
|
},
|
|
910
915
|
{
|
|
911
916
|
name: "list_org_events",
|
|
912
|
-
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.
|
|
917
|
+
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.",
|
|
913
918
|
schema: ListOrgEventsSchema,
|
|
914
919
|
annotations: { title: "List Organization Events", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
915
920
|
untrustedFields: EVENT_UNTRUSTED_FIELDS,
|
|
@@ -925,16 +930,16 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
925
930
|
},
|
|
926
931
|
{
|
|
927
932
|
name: "create_event",
|
|
928
|
-
description: `Create a booking, appointment, meeting, hold, or any scheduled event on a calendar.
|
|
933
|
+
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.`,
|
|
929
934
|
schema: CreateEventSchema,
|
|
930
|
-
annotations: { title: "Create Event", readOnlyHint: false, destructiveHint:
|
|
935
|
+
annotations: { title: "Create Event", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
931
936
|
execute: createExecutor(createEvent)
|
|
932
937
|
},
|
|
933
938
|
{
|
|
934
939
|
name: "update_event",
|
|
935
|
-
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
|
|
940
|
+
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.",
|
|
936
941
|
schema: UpdateEventSchema,
|
|
937
|
-
annotations: { title: "Update Event", readOnlyHint: false, destructiveHint:
|
|
942
|
+
annotations: { title: "Update Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
938
943
|
untrustedFields: EVENT_UNTRUSTED_FIELDS,
|
|
939
944
|
execute: createExecutor(updateEvent)
|
|
940
945
|
},
|
|
@@ -950,7 +955,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
950
955
|
name: "confirm_event",
|
|
951
956
|
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.',
|
|
952
957
|
schema: ConfirmEventSchema,
|
|
953
|
-
annotations: { title: "Confirm Event", readOnlyHint: false, destructiveHint:
|
|
958
|
+
annotations: { title: "Confirm Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
954
959
|
untrustedFields: EVENT_UNTRUSTED_FIELDS,
|
|
955
960
|
execute: createExecutor(confirmEvent)
|
|
956
961
|
},
|
|
@@ -966,7 +971,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
966
971
|
name: "create_agent",
|
|
967
972
|
description: "Register your agent (AI assistant, human participant, or resource) with Chronary so it can own calendars, events, and webhooks.",
|
|
968
973
|
schema: CreateAgentSchema,
|
|
969
|
-
annotations: { title: "Create Agent", readOnlyHint: false, destructiveHint:
|
|
974
|
+
annotations: { title: "Create Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
970
975
|
execute: createExecutor(createAgent)
|
|
971
976
|
},
|
|
972
977
|
{
|
|
@@ -985,14 +990,14 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
985
990
|
},
|
|
986
991
|
{
|
|
987
992
|
name: "update_agent",
|
|
988
|
-
description: "Update an agent's name, description, metadata, or status (active/paused). Requires an Organization key \u2014 Agent keys cannot mutate agents.",
|
|
993
|
+
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.",
|
|
989
994
|
schema: UpdateAgentSchema,
|
|
990
|
-
annotations: { title: "Update Agent", readOnlyHint: false, destructiveHint:
|
|
995
|
+
annotations: { title: "Update Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
991
996
|
execute: createExecutor(updateAgent)
|
|
992
997
|
},
|
|
993
998
|
{
|
|
994
999
|
name: "delete_agent",
|
|
995
|
-
description: "Decommission an agent. This marks the agent as decommissioned and revokes all of its Agent keys. Requires an Organization key \u2014 Agent keys cannot delete agents.",
|
|
1000
|
+
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.",
|
|
996
1001
|
schema: DeleteAgentSchema,
|
|
997
1002
|
annotations: { title: "Delete Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
998
1003
|
execute: createExecutor(deleteAgent)
|
|
@@ -1016,7 +1021,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1016
1021
|
name: "create_connection_link",
|
|
1017
1022
|
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.",
|
|
1018
1023
|
schema: CreateConnectionLinkSchema,
|
|
1019
|
-
annotations: { title: "Create Human Calendar Setup Link", readOnlyHint: false, destructiveHint:
|
|
1024
|
+
annotations: { title: "Create Human Calendar Setup Link", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1020
1025
|
execute: createExecutor(createConnectionLink)
|
|
1021
1026
|
},
|
|
1022
1027
|
{
|
|
@@ -1036,7 +1041,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1036
1041
|
// ── Calendar context ───────────────────────────────────────────
|
|
1037
1042
|
{
|
|
1038
1043
|
name: "get_calendar_context",
|
|
1039
|
-
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
|
|
1044
|
+
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.`,
|
|
1040
1045
|
schema: GetCalendarContextSchema,
|
|
1041
1046
|
annotations: { title: "Get Calendar Context", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1042
1047
|
untrustedFields: EVENT_UNTRUSTED_FIELDS,
|
|
@@ -1047,7 +1052,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1047
1052
|
name: "create_proposal",
|
|
1048
1053
|
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.",
|
|
1049
1054
|
schema: CreateProposalSchema,
|
|
1050
|
-
annotations: { title: "Create Proposal", readOnlyHint: false, destructiveHint:
|
|
1055
|
+
annotations: { title: "Create Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1051
1056
|
execute: createExecutor(createProposal)
|
|
1052
1057
|
},
|
|
1053
1058
|
{
|
|
@@ -1066,16 +1071,16 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1066
1071
|
},
|
|
1067
1072
|
{
|
|
1068
1073
|
name: "respond_to_proposal",
|
|
1069
|
-
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.',
|
|
1074
|
+
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.',
|
|
1070
1075
|
schema: RespondToProposalSchema,
|
|
1071
|
-
annotations: { title: "Respond To Proposal", readOnlyHint: false, destructiveHint:
|
|
1076
|
+
annotations: { title: "Respond To Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1072
1077
|
execute: createExecutor(respondToProposal)
|
|
1073
1078
|
},
|
|
1074
1079
|
{
|
|
1075
1080
|
name: "resolve_proposal",
|
|
1076
1081
|
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.',
|
|
1077
1082
|
schema: ResolveProposalSchema,
|
|
1078
|
-
annotations: { title: "Resolve Proposal", readOnlyHint: false, destructiveHint:
|
|
1083
|
+
annotations: { title: "Resolve Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1079
1084
|
execute: createExecutor(resolveProposal)
|
|
1080
1085
|
},
|
|
1081
1086
|
{
|
|
@@ -1090,7 +1095,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1090
1095
|
name: "set_availability_rules",
|
|
1091
1096
|
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.",
|
|
1092
1097
|
schema: SetAvailabilityRulesSchema,
|
|
1093
|
-
annotations: { title: "Set Availability Rules", readOnlyHint: false, destructiveHint:
|
|
1098
|
+
annotations: { title: "Set Availability Rules", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1094
1099
|
execute: createExecutor(setAvailabilityRules)
|
|
1095
1100
|
},
|
|
1096
1101
|
{
|
|
@@ -1126,7 +1131,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1126
1131
|
name: "create_webhook",
|
|
1127
1132
|
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.",
|
|
1128
1133
|
schema: CreateWebhookSchema,
|
|
1129
|
-
annotations: { title: "Create Webhook", readOnlyHint: false, destructiveHint:
|
|
1134
|
+
annotations: { title: "Create Webhook", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1130
1135
|
execute: createExecutor(createWebhook)
|
|
1131
1136
|
},
|
|
1132
1137
|
{
|
|
@@ -1161,16 +1166,16 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1161
1166
|
},
|
|
1162
1167
|
{
|
|
1163
1168
|
name: "send_test_webhook",
|
|
1164
|
-
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.
|
|
1169
|
+
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.",
|
|
1165
1170
|
schema: SendTestWebhookSchema,
|
|
1166
|
-
annotations: { title: "Send Test Webhook", readOnlyHint: false, destructiveHint:
|
|
1171
|
+
annotations: { title: "Send Test Webhook", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1167
1172
|
execute: createExecutor(sendTestWebhook)
|
|
1168
1173
|
},
|
|
1169
1174
|
{
|
|
1170
1175
|
name: "replay_webhook_delivery",
|
|
1171
|
-
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.
|
|
1176
|
+
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.",
|
|
1172
1177
|
schema: ReplayWebhookDeliverySchema,
|
|
1173
|
-
annotations: { title: "Replay Webhook Delivery", readOnlyHint: false, destructiveHint:
|
|
1178
|
+
annotations: { title: "Replay Webhook Delivery", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1174
1179
|
execute: createExecutor(replayWebhookDelivery)
|
|
1175
1180
|
},
|
|
1176
1181
|
// ── iCal Subscriptions ─────────────────────────────────────────
|
|
@@ -1192,14 +1197,14 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1192
1197
|
name: "subscribe_ical",
|
|
1193
1198
|
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).",
|
|
1194
1199
|
schema: SubscribeICalSchema,
|
|
1195
|
-
annotations: { title: "Subscribe iCal", readOnlyHint: false, destructiveHint:
|
|
1200
|
+
annotations: { title: "Subscribe iCal", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
1196
1201
|
execute: createExecutor(subscribeICal)
|
|
1197
1202
|
},
|
|
1198
1203
|
{
|
|
1199
1204
|
name: "update_ical_subscription",
|
|
1200
1205
|
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.",
|
|
1201
1206
|
schema: UpdateICalSubscriptionSchema,
|
|
1202
|
-
annotations: { title: "Update iCal Subscription", readOnlyHint: false, destructiveHint:
|
|
1207
|
+
annotations: { title: "Update iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
1203
1208
|
execute: createExecutor(updateICalSubscription)
|
|
1204
1209
|
},
|
|
1205
1210
|
{
|
|
@@ -1211,23 +1216,23 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1211
1216
|
},
|
|
1212
1217
|
{
|
|
1213
1218
|
name: "sync_ical_subscription",
|
|
1214
|
-
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;
|
|
1219
|
+
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.',
|
|
1215
1220
|
schema: SyncICalSubscriptionSchema,
|
|
1216
|
-
annotations: { title: "Sync iCal Subscription", readOnlyHint: false, destructiveHint:
|
|
1221
|
+
annotations: { title: "Sync iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
1217
1222
|
execute: createExecutor(syncICalSubscription)
|
|
1218
1223
|
},
|
|
1219
1224
|
{
|
|
1220
1225
|
name: "pause_ical_subscription",
|
|
1221
1226
|
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.",
|
|
1222
1227
|
schema: PauseICalSubscriptionSchema,
|
|
1223
|
-
annotations: { title: "Pause iCal Subscription", readOnlyHint: false, destructiveHint:
|
|
1228
|
+
annotations: { title: "Pause iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1224
1229
|
execute: createExecutor(pauseICalSubscription)
|
|
1225
1230
|
},
|
|
1226
1231
|
{
|
|
1227
1232
|
name: "resume_ical_subscription",
|
|
1228
1233
|
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.",
|
|
1229
1234
|
schema: ResumeICalSubscriptionSchema,
|
|
1230
|
-
annotations: { title: "Resume iCal Subscription", readOnlyHint: false, destructiveHint:
|
|
1235
|
+
annotations: { title: "Resume iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1231
1236
|
execute: createExecutor(resumeICalSubscription)
|
|
1232
1237
|
},
|
|
1233
1238
|
// ── Scoped keys ────────────────────────────────────────────────
|
|
@@ -1235,7 +1240,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1235
1240
|
name: "create_scoped_key",
|
|
1236
1241
|
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.",
|
|
1237
1242
|
schema: CreateScopedKeySchema,
|
|
1238
|
-
annotations: { title: "Create Scoped Key", readOnlyHint: false, destructiveHint:
|
|
1243
|
+
annotations: { title: "Create Scoped Key", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1239
1244
|
execute: createExecutor(createScopedKey)
|
|
1240
1245
|
},
|
|
1241
1246
|
{
|
|
@@ -1265,7 +1270,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1265
1270
|
name: "accept_terms",
|
|
1266
1271
|
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.",
|
|
1267
1272
|
schema: AcceptTermsSchema,
|
|
1268
|
-
annotations: { title: "Accept Terms", readOnlyHint: false, destructiveHint:
|
|
1273
|
+
annotations: { title: "Accept Terms", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1269
1274
|
execute: createExecutor(acceptTerms)
|
|
1270
1275
|
},
|
|
1271
1276
|
// ── Usage ──────────────────────────────────────────────────────
|
|
@@ -1293,9 +1298,9 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1293
1298
|
},
|
|
1294
1299
|
{
|
|
1295
1300
|
name: "request_upgrade",
|
|
1296
|
-
description: "Ask your human to upgrade this Chronary account to
|
|
1301
|
+
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.",
|
|
1297
1302
|
schema: RequestUpgradeSchema,
|
|
1298
|
-
annotations: { title: "Request Upgrade", readOnlyHint: false, destructiveHint:
|
|
1303
|
+
annotations: { title: "Request Upgrade", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1299
1304
|
execute: createExecutor(requestUpgrade)
|
|
1300
1305
|
},
|
|
1301
1306
|
{
|
|
@@ -1309,7 +1314,7 @@ var RAW_TOOL_DEFINITIONS = [
|
|
|
1309
1314
|
name: "cancel_upgrade_request",
|
|
1310
1315
|
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.",
|
|
1311
1316
|
schema: CancelUpgradeRequestSchema,
|
|
1312
|
-
annotations: { title: "Cancel Upgrade Request", readOnlyHint: false, destructiveHint:
|
|
1317
|
+
annotations: { title: "Cancel Upgrade Request", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
1313
1318
|
execute: createExecutor(cancelUpgradeRequest)
|
|
1314
1319
|
}
|
|
1315
1320
|
];
|
|
@@ -1423,7 +1428,7 @@ var ChronaryToolkit = class extends ListToolkit {
|
|
|
1423
1428
|
title: "Schedule an event",
|
|
1424
1429
|
description: "Create a calendar event on an agent's calendar at a specific time.",
|
|
1425
1430
|
argsSchema: {
|
|
1426
|
-
calendar_id: z2.string().describe("Target calendar ID (cal_...).
|
|
1431
|
+
calendar_id: z2.string().describe("Target calendar ID (cal_...)."),
|
|
1427
1432
|
title: z2.string().describe("Event title"),
|
|
1428
1433
|
start_time: z2.string().describe("Start time, ISO 8601 (e.g. 2026-07-10T15:00:00Z)"),
|
|
1429
1434
|
end_time: z2.string().describe("End time, ISO 8601")
|
|
@@ -1503,7 +1508,7 @@ var ChronaryToolkit = class extends ListToolkit {
|
|
|
1503
1508
|
role: "user",
|
|
1504
1509
|
content: {
|
|
1505
1510
|
type: "text",
|
|
1506
|
-
text: `Create a scheduling proposal "${title}" organized by ${organizer_agent_id} for participants ${participant_agent_ids}. First use get_availability / find_meeting_time to pick 2-3 candidate slots, then call create_proposal with those slots. Report the proposal ID. (Scheduling proposals require a Pro plan and an Organization key.)`
|
|
1511
|
+
text: `Create a scheduling proposal "${title}" organized by ${organizer_agent_id} for participants ${participant_agent_ids}. First use get_availability / find_meeting_time to pick 2-3 candidate slots, then call create_proposal with those slots. Report the proposal ID. (Scheduling proposals require a Developer or Pro plan and an Organization key.)`
|
|
1507
1512
|
}
|
|
1508
1513
|
}
|
|
1509
1514
|
]
|