aiquila-mcp 0.3.31 → 0.3.32
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/client/caldav.js
CHANGED
|
@@ -27,6 +27,20 @@ export function decodeXmlEntities(text) {
|
|
|
27
27
|
// ` ` rather than being decoded twice into a carriage return.
|
|
28
28
|
.replace(/&/g, '&'));
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Encode text for interpolation into an XML request body.
|
|
32
|
+
* Counterpart to decodeXmlEntities — used when building CalDAV/CardDAV REPORT
|
|
33
|
+
* filters from user-supplied values (GH #402).
|
|
34
|
+
*/
|
|
35
|
+
export function encodeXmlEntities(text) {
|
|
36
|
+
return (text
|
|
37
|
+
// `&` first, otherwise the ampersands introduced below get re-encoded.
|
|
38
|
+
.replace(/&/g, '&')
|
|
39
|
+
.replace(/</g, '<')
|
|
40
|
+
.replace(/>/g, '>')
|
|
41
|
+
.replace(/"/g, '"')
|
|
42
|
+
.replace(/'/g, '''));
|
|
43
|
+
}
|
|
30
44
|
/**
|
|
31
45
|
* Fetch data from CalDAV endpoint using basic authentication
|
|
32
46
|
*/
|
|
@@ -72,7 +72,7 @@ export const configureTool = {
|
|
|
72
72
|
model: z
|
|
73
73
|
.string()
|
|
74
74
|
.optional()
|
|
75
|
-
.describe("Claude model to use (e.g., 'claude-fable-5', 'claude-opus-
|
|
75
|
+
.describe("Claude model to use (e.g., 'claude-fable-5', 'claude-opus-5', 'claude-sonnet-5')"),
|
|
76
76
|
maxTokens: z.number().optional().describe('Maximum tokens for responses (default: 4096)'),
|
|
77
77
|
timeout: z.number().optional().describe('Request timeout in seconds (default: 60)'),
|
|
78
78
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { decodeXmlEntities, fetchCalDAV, nsTagContent } from '../../client/caldav.js';
|
|
3
|
+
import { decodeXmlEntities, encodeXmlEntities, fetchCalDAV, nsTagContent, } from '../../client/caldav.js';
|
|
4
4
|
import { escapeICalValue, unescapeICalValue } from '../dav-utils.js';
|
|
5
5
|
import { getNextcloudConfig } from '../types.js';
|
|
6
6
|
// ---------------------------------------------------------------------------
|
|
@@ -579,7 +579,7 @@ async function resolveEventByUid(calendarName, uid) {
|
|
|
579
579
|
<c:comp-filter name="VCALENDAR">
|
|
580
580
|
<c:comp-filter name="VEVENT">
|
|
581
581
|
<c:prop-filter name="UID">
|
|
582
|
-
<c:text-match collation="i;octet">${uid}</c:text-match>
|
|
582
|
+
<c:text-match collation="i;octet">${encodeXmlEntities(uid)}</c:text-match>
|
|
583
583
|
</c:prop-filter>
|
|
584
584
|
</c:comp-filter>
|
|
585
585
|
</c:comp-filter>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { decodeXmlEntities, fetchCalDAV, nsTagContent } from '../../client/caldav.js';
|
|
3
|
+
import { decodeXmlEntities, encodeXmlEntities, fetchCalDAV, nsTagContent, } from '../../client/caldav.js';
|
|
4
4
|
import { escapeVCardValue, sanitizeVCardUriValue, unescapeVCardValue } from '../dav-utils.js';
|
|
5
5
|
import { getParamValues, getProperty, parseVCard, property, replaceAll, serializeVCard, setProperty, } from '../vcard.js';
|
|
6
6
|
import { getNextcloudConfig } from '../types.js';
|
|
@@ -272,7 +272,7 @@ async function resolveContactByUid(addressBookName, uid) {
|
|
|
272
272
|
</d:prop>
|
|
273
273
|
<cr:filter>
|
|
274
274
|
<cr:prop-filter name="UID">
|
|
275
|
-
<cr:text-match collation="i;octet">${uid}</cr:text-match>
|
|
275
|
+
<cr:text-match collation="i;octet">${encodeXmlEntities(uid)}</cr:text-match>
|
|
276
276
|
</cr:prop-filter>
|
|
277
277
|
</cr:filter>
|
|
278
278
|
</cr:addressbook-query>`;
|
|
@@ -408,7 +408,7 @@ export const listContactsTool = {
|
|
|
408
408
|
filterXml = `
|
|
409
409
|
<cr:filter>
|
|
410
410
|
<cr:prop-filter name="FN">
|
|
411
|
-
<cr:text-match collation="i;unicode-casemap" match-type="contains">${args.search}</cr:text-match>
|
|
411
|
+
<cr:text-match collation="i;unicode-casemap" match-type="contains">${encodeXmlEntities(args.search)}</cr:text-match>
|
|
412
412
|
</cr:prop-filter>
|
|
413
413
|
</cr:filter>`;
|
|
414
414
|
}
|
package/dist/tools/apps/tasks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { decodeXmlEntities, fetchCalDAV, nsTagContent } from '../../client/caldav.js';
|
|
3
|
+
import { decodeXmlEntities, encodeXmlEntities, fetchCalDAV, nsTagContent, } from '../../client/caldav.js';
|
|
4
4
|
import { escapeICalValue } from '../dav-utils.js';
|
|
5
5
|
import { getNextcloudConfig } from '../types.js';
|
|
6
6
|
// ---------------------------------------------------------------------------
|
|
@@ -240,7 +240,7 @@ async function resolveTaskByUid(calendarName, uid) {
|
|
|
240
240
|
<c:comp-filter name="VCALENDAR">
|
|
241
241
|
<c:comp-filter name="VTODO">
|
|
242
242
|
<c:prop-filter name="UID">
|
|
243
|
-
<c:text-match collation="i;octet">${uid}</c:text-match>
|
|
243
|
+
<c:text-match collation="i;octet">${encodeXmlEntities(uid)}</c:text-match>
|
|
244
244
|
</c:prop-filter>
|
|
245
245
|
</c:comp-filter>
|
|
246
246
|
</c:comp-filter>
|