circal-mcp 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/circal-mcp.mjs +8 -2
- package/package.json +1 -1
package/dist/circal-mcp.mjs
CHANGED
|
@@ -5182,7 +5182,13 @@ function performQuickAdd(contents, text, date, pin) {
|
|
|
5182
5182
|
};
|
|
5183
5183
|
}
|
|
5184
5184
|
var KEYED_ID_PREFIX = "x-";
|
|
5185
|
+
var UPSERT_KEY_RE = /^[A-Za-z0-9._:-]{1,64}$/;
|
|
5185
5186
|
function keyedId(key) {
|
|
5187
|
+
if (!UPSERT_KEY_RE.test(key)) {
|
|
5188
|
+
throw new RefusalError(
|
|
5189
|
+
`"key" must be 1-64 characters of letters, digits and . _ : - \u2014 it becomes the record's id`
|
|
5190
|
+
);
|
|
5191
|
+
}
|
|
5186
5192
|
return `${KEYED_ID_PREFIX}${key}`;
|
|
5187
5193
|
}
|
|
5188
5194
|
function performCreateEvent(contents, input, key, pin) {
|
|
@@ -5569,8 +5575,8 @@ function eventFieldsShape() {
|
|
|
5569
5575
|
recurrence: recurrenceSchema.optional()
|
|
5570
5576
|
};
|
|
5571
5577
|
}
|
|
5572
|
-
var upsertKeySchema = z.string().regex(
|
|
5573
|
-
"Caller-chosen external key for idempotent upsert: the same key always names the same event, so re-running a mirror updates in place instead of duplicating. Omitted, every call creates a fresh event."
|
|
5578
|
+
var upsertKeySchema = z.string().regex(UPSERT_KEY_RE, "letters, digits, . _ : -, up to 64").describe(
|
|
5579
|
+
"Caller-chosen external key for idempotent upsert: the same key always names the same event, so re-running a mirror updates in place instead of duplicating. A keyed create also overrides a prior deletion \u2014 the source of truth re-asserts \u2014 so to drop a record for good, remove it from the source, not just the calendar. Omitted, every call creates a fresh event."
|
|
5574
5580
|
);
|
|
5575
5581
|
var createEventFieldsSchema = z.strictObject({
|
|
5576
5582
|
...eventFieldsShape(),
|
package/package.json
CHANGED