@delega-dev/mcp 1.0.2 → 1.0.4
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/index.js +13 -11
- package/package.json +8 -3
package/dist/index.js
CHANGED
|
@@ -10,9 +10,11 @@ var DEFAULT_BASE_URL = "http://127.0.0.1:18890";
|
|
|
10
10
|
var DelegaClient = class {
|
|
11
11
|
baseUrl;
|
|
12
12
|
agentKey;
|
|
13
|
+
pathPrefix;
|
|
13
14
|
constructor(baseUrl, agentKey) {
|
|
14
15
|
this.baseUrl = (baseUrl || DEFAULT_BASE_URL).replace(/\/+$/, "");
|
|
15
16
|
this.agentKey = agentKey;
|
|
17
|
+
this.pathPrefix = this.baseUrl.includes("api.delega.dev") ? "/v1" : "/api";
|
|
16
18
|
}
|
|
17
19
|
async request(method, path, body, query) {
|
|
18
20
|
const url = new URL(path, this.baseUrl);
|
|
@@ -52,45 +54,45 @@ var DelegaClient = class {
|
|
|
52
54
|
if (params.label !== void 0) query.label = params.label;
|
|
53
55
|
if (params.due !== void 0) query.due = params.due;
|
|
54
56
|
if (params.completed !== void 0) query.completed = String(params.completed);
|
|
55
|
-
return this.request("GET",
|
|
57
|
+
return this.request("GET", `${this.pathPrefix}/tasks`, void 0, query);
|
|
56
58
|
}
|
|
57
59
|
async getTask(taskId) {
|
|
58
|
-
return this.request("GET",
|
|
60
|
+
return this.request("GET", `${this.pathPrefix}/tasks/${taskId}`);
|
|
59
61
|
}
|
|
60
62
|
async createTask(data) {
|
|
61
|
-
return this.request("POST",
|
|
63
|
+
return this.request("POST", `${this.pathPrefix}/tasks`, data);
|
|
62
64
|
}
|
|
63
65
|
async updateTask(taskId, data) {
|
|
64
|
-
return this.request("PUT",
|
|
66
|
+
return this.request("PUT", `${this.pathPrefix}/tasks/${taskId}`, data);
|
|
65
67
|
}
|
|
66
68
|
async completeTask(taskId) {
|
|
67
|
-
return this.request("POST",
|
|
69
|
+
return this.request("POST", `${this.pathPrefix}/tasks/${taskId}/complete`);
|
|
68
70
|
}
|
|
69
71
|
async deleteTask(taskId) {
|
|
70
|
-
return this.request("DELETE",
|
|
72
|
+
return this.request("DELETE", `${this.pathPrefix}/tasks/${taskId}`);
|
|
71
73
|
}
|
|
72
74
|
// ── Comments ──
|
|
73
75
|
async addComment(taskId, data) {
|
|
74
76
|
return this.request(
|
|
75
77
|
"POST",
|
|
76
|
-
|
|
78
|
+
`${this.pathPrefix}/tasks/${taskId}/comments`,
|
|
77
79
|
data
|
|
78
80
|
);
|
|
79
81
|
}
|
|
80
82
|
// ── Projects ──
|
|
81
83
|
async listProjects() {
|
|
82
|
-
return this.request("GET",
|
|
84
|
+
return this.request("GET", `${this.pathPrefix}/projects`);
|
|
83
85
|
}
|
|
84
86
|
// ── Stats ──
|
|
85
87
|
async getStats() {
|
|
86
|
-
return this.request("GET",
|
|
88
|
+
return this.request("GET", `${this.pathPrefix}/stats`);
|
|
87
89
|
}
|
|
88
90
|
// ── Agents ──
|
|
89
91
|
async listAgents() {
|
|
90
|
-
return this.request("GET",
|
|
92
|
+
return this.request("GET", `${this.pathPrefix}/agents`);
|
|
91
93
|
}
|
|
92
94
|
async registerAgent(data) {
|
|
93
|
-
return this.request("POST",
|
|
95
|
+
return this.request("POST", `${this.pathPrefix}/agents`, data);
|
|
94
96
|
}
|
|
95
97
|
};
|
|
96
98
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delega-dev/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"mcpName": "io.github.delega-dev/delega",
|
|
5
|
-
"description": "MCP server for Delega
|
|
5
|
+
"description": "MCP server for Delega — task infrastructure for AI agents",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"delega-mcp": "dist/index.js"
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "tsup",
|
|
18
18
|
"dev": "tsx src/index.ts",
|
|
19
|
-
"
|
|
19
|
+
"prepublish-check": "bash scripts/prepublish-check.sh",
|
|
20
|
+
"prepublishOnly": "npm run prepublish-check && npm run build"
|
|
20
21
|
},
|
|
21
22
|
"keywords": [
|
|
22
23
|
"mcp",
|
|
@@ -43,11 +44,15 @@
|
|
|
43
44
|
"zod": "^3.24.2"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
47
|
+
"@types/node": "^25.5.0",
|
|
46
48
|
"tsup": "^8.4.0",
|
|
47
49
|
"tsx": "^4.19.3",
|
|
48
50
|
"typescript": "^5.7.3"
|
|
49
51
|
},
|
|
50
52
|
"publishConfig": {
|
|
51
53
|
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/delega-dev/delega-mcp/issues"
|
|
52
57
|
}
|
|
53
58
|
}
|