aiquila-mcp 0.4.7 → 0.4.9
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/README.md +1 -1
- package/dist/client/ocs.js +4 -6
- package/dist/tools/apps/talk.js +9 -4
- package/package.json +13 -9
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ See the [Docker setup guide](https://github.com/elgorro/aiquila/blob/main/docs/m
|
|
|
98
98
|
|
|
99
99
|
## Requirements
|
|
100
100
|
|
|
101
|
-
- Node.js
|
|
101
|
+
- Node.js 26+
|
|
102
102
|
- A Nextcloud instance with an App Password
|
|
103
103
|
|
|
104
104
|
Optional Nextcloud apps unlock additional tool categories: Tasks, Calendar, Contacts, Notes, Cookbook, Deck, Bookmarks, Mail, Maps, Photos, Talk, Circles, and more.
|
package/dist/client/ocs.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
import { getNextcloudConfig } from '../tools/types.js';
|
|
3
3
|
import { logger } from '../logger.js';
|
|
4
|
-
/**
|
|
5
|
-
* Make an authenticated request to the Nextcloud OCS API.
|
|
6
|
-
*
|
|
7
|
-
* Handles Basic Auth, required OCS headers, URL-encoded bodies,
|
|
8
|
-
* query parameters, and dual error checking (HTTP + OCS status).
|
|
9
|
-
*/
|
|
10
4
|
export async function fetchOCS(path, options = {}) {
|
|
11
5
|
const config = getNextcloudConfig();
|
|
12
6
|
const auth = Buffer.from(`${config.user}:${config.password}`).toString('base64');
|
|
@@ -46,6 +40,10 @@ export async function fetchOCS(path, options = {}) {
|
|
|
46
40
|
});
|
|
47
41
|
logger.trace({ method: options.method || 'GET', url, status: response.status, ms: Date.now() - t0 }, '[nc] HTTP');
|
|
48
42
|
if (!response.ok) {
|
|
43
|
+
if (response.status === 304 && options.allowNotModified) {
|
|
44
|
+
// 304 carries an empty body; the caller asked to read it as "no data".
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
49
47
|
if (response.status === 403) {
|
|
50
48
|
throw new Error('Permission denied. This operation requires admin or sub-admin privileges. ' +
|
|
51
49
|
'Ensure the configured Nextcloud user has sufficient permissions.');
|
package/dist/tools/apps/talk.js
CHANGED
|
@@ -136,8 +136,13 @@ export const listMessagesTool = {
|
|
|
136
136
|
if (args.lastKnownMessageId) {
|
|
137
137
|
queryParams.lastKnownMessageId = String(args.lastKnownMessageId);
|
|
138
138
|
}
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
// Talk answers 304 Not Modified when no further messages are available,
|
|
140
|
+
// which is a normal end-of-pagination result rather than a failure.
|
|
141
|
+
const data = await fetchOCS(`${API_V1}/chat/${args.token}`, {
|
|
142
|
+
queryParams,
|
|
143
|
+
allowNotModified: true,
|
|
144
|
+
});
|
|
145
|
+
let messages = data?.ocs.data ?? [];
|
|
141
146
|
if (!args.includeSystemMessages) {
|
|
142
147
|
messages = messages.filter((m) => !m.systemMessage);
|
|
143
148
|
}
|
|
@@ -184,7 +189,7 @@ export const sendMessageTool = {
|
|
|
184
189
|
body.replyTo = String(args.replyTo);
|
|
185
190
|
if (args.silent)
|
|
186
191
|
body.silent = 'true';
|
|
187
|
-
const data = await fetchOCS(`${
|
|
192
|
+
const data = await fetchOCS(`${API_V1}/chat/${args.token}`, {
|
|
188
193
|
method: 'POST',
|
|
189
194
|
body,
|
|
190
195
|
});
|
|
@@ -364,7 +369,7 @@ export const deleteMessageTool = {
|
|
|
364
369
|
}),
|
|
365
370
|
handler: async (args) => {
|
|
366
371
|
try {
|
|
367
|
-
await fetchOCS(`${
|
|
372
|
+
await fetchOCS(`${API_V1}/chat/${args.token}/${args.messageId}`, {
|
|
368
373
|
method: 'DELETE',
|
|
369
374
|
});
|
|
370
375
|
return text(`Message ${args.messageId} deleted from conversation ${args.token}.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiquila-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Nextcloud MCP server — files, calendar, contacts, mail, maps, notes, tasks & 120+ more tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
"carddav",
|
|
32
32
|
"self-hosted"
|
|
33
33
|
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=26.0.0",
|
|
36
|
+
"npm": ">=11.0.0"
|
|
37
|
+
},
|
|
34
38
|
"author": "sirgorro",
|
|
35
39
|
"license": "MIT",
|
|
36
40
|
"repository": {
|
|
@@ -44,23 +48,23 @@
|
|
|
44
48
|
"overrides": {
|
|
45
49
|
"brace-expansion": "^2.0.3",
|
|
46
50
|
"esbuild": ">=0.28.1",
|
|
47
|
-
"hono": "^4.
|
|
51
|
+
"hono": "^4.13.7"
|
|
48
52
|
},
|
|
49
53
|
"dependencies": {
|
|
50
54
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
51
|
-
"jose": "^6.2.
|
|
55
|
+
"jose": "^6.2.12",
|
|
52
56
|
"pino": "^10.3.1",
|
|
53
57
|
"webdav": "^5.10.0",
|
|
54
|
-
"zod": "^4.
|
|
58
|
+
"zod": "^4.6.2"
|
|
55
59
|
},
|
|
56
60
|
"devDependencies": {
|
|
57
61
|
"@eslint/js": "^10.0.1",
|
|
58
|
-
"@types/node": "^26.
|
|
59
|
-
"eslint": "^10.
|
|
62
|
+
"@types/node": "^26.5.1",
|
|
63
|
+
"eslint": "^10.10.0",
|
|
60
64
|
"prettier": "^3.9.6",
|
|
61
|
-
"tsx": "^4.23.
|
|
65
|
+
"tsx": "^4.23.13",
|
|
62
66
|
"typescript": "^5.9.3",
|
|
63
|
-
"typescript-eslint": "^8.
|
|
64
|
-
"vitest": "^
|
|
67
|
+
"typescript-eslint": "^8.70.0",
|
|
68
|
+
"vitest": "^5.0.0"
|
|
65
69
|
}
|
|
66
70
|
}
|