@compilr-dev/agents 0.3.13 → 0.3.14
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/mcp/client.js
CHANGED
|
@@ -20,15 +20,17 @@ async function getMCPSDK() {
|
|
|
20
20
|
return sdkCache;
|
|
21
21
|
try {
|
|
22
22
|
// Dynamic imports to keep SDK optional
|
|
23
|
-
const [clientModule, stdioModule, httpModule] = await Promise.all([
|
|
23
|
+
const [clientModule, stdioModule, httpModule, typesModule] = await Promise.all([
|
|
24
24
|
import('@modelcontextprotocol/sdk/client/index.js'),
|
|
25
25
|
import('@modelcontextprotocol/sdk/client/stdio.js'),
|
|
26
26
|
import('@modelcontextprotocol/sdk/client/streamableHttp.js'),
|
|
27
|
+
import('@modelcontextprotocol/sdk/types.js'),
|
|
27
28
|
]);
|
|
28
29
|
sdkCache = {
|
|
29
30
|
Client: clientModule.Client,
|
|
30
31
|
StdioClientTransport: stdioModule.StdioClientTransport,
|
|
31
32
|
StreamableHTTPClientTransport: httpModule.StreamableHTTPClientTransport,
|
|
33
|
+
ToolListChangedNotificationSchema: typesModule.ToolListChangedNotificationSchema,
|
|
32
34
|
};
|
|
33
35
|
// Non-null assertion safe: we just assigned sdkCache above
|
|
34
36
|
return sdkCache;
|
|
@@ -112,6 +114,7 @@ export class MCPClient {
|
|
|
112
114
|
args: this.config.stdio.args,
|
|
113
115
|
env: this.config.stdio.env,
|
|
114
116
|
cwd: this.config.stdio.cwd,
|
|
117
|
+
stderr: 'pipe', // Capture stderr to prevent bleeding into host terminal
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
120
|
else if (this.config.transport === 'http' && this.config.http) {
|
|
@@ -123,7 +126,8 @@ export class MCPClient {
|
|
|
123
126
|
version: this.config.clientVersion ?? '1.0.0',
|
|
124
127
|
});
|
|
125
128
|
// Set up notification handler for tools changed
|
|
126
|
-
|
|
129
|
+
// SDK 1.26+ requires Zod schema instead of string for notification handlers
|
|
130
|
+
this.client.setNotificationHandler(sdk.ToolListChangedNotificationSchema, () => {
|
|
127
131
|
this.cachedTools = null; // Invalidate cache
|
|
128
132
|
this.emit({ type: 'tools_changed', serverName: this.name });
|
|
129
133
|
});
|
|
@@ -38,6 +38,11 @@ export interface TodoItem {
|
|
|
38
38
|
* If undefined/null, the task is unassigned
|
|
39
39
|
*/
|
|
40
40
|
owner?: string;
|
|
41
|
+
/**
|
|
42
|
+
* 1-based task numbers this task is blocked by.
|
|
43
|
+
* References positions in the todo array.
|
|
44
|
+
*/
|
|
45
|
+
blockedBy?: number[];
|
|
41
46
|
/**
|
|
42
47
|
* Creation timestamp
|
|
43
48
|
*/
|
|
@@ -60,6 +65,7 @@ export interface TodoWriteInput {
|
|
|
60
65
|
activeForm?: string;
|
|
61
66
|
priority?: number;
|
|
62
67
|
owner?: string;
|
|
68
|
+
blockedBy?: number[];
|
|
63
69
|
}>;
|
|
64
70
|
}
|
|
65
71
|
/**
|
|
@@ -110,6 +116,7 @@ export declare class TodoStore {
|
|
|
110
116
|
activeForm?: string;
|
|
111
117
|
priority?: number;
|
|
112
118
|
owner?: string;
|
|
119
|
+
blockedBy?: number[];
|
|
113
120
|
}>): void;
|
|
114
121
|
/**
|
|
115
122
|
* Add a single todo
|
|
@@ -120,6 +127,7 @@ export declare class TodoStore {
|
|
|
120
127
|
activeForm?: string;
|
|
121
128
|
priority?: number;
|
|
122
129
|
owner?: string;
|
|
130
|
+
blockedBy?: number[];
|
|
123
131
|
}): TodoItem;
|
|
124
132
|
/**
|
|
125
133
|
* Update a todo by ID
|
|
@@ -64,6 +64,7 @@ export class TodoStore {
|
|
|
64
64
|
activeForm: todo.activeForm,
|
|
65
65
|
priority: todo.priority,
|
|
66
66
|
owner: todo.owner,
|
|
67
|
+
blockedBy: todo.blockedBy,
|
|
67
68
|
createdAt: now,
|
|
68
69
|
updatedAt: now,
|
|
69
70
|
});
|
|
@@ -82,6 +83,7 @@ export class TodoStore {
|
|
|
82
83
|
activeForm: todo.activeForm,
|
|
83
84
|
priority: todo.priority,
|
|
84
85
|
owner: todo.owner,
|
|
86
|
+
blockedBy: todo.blockedBy,
|
|
85
87
|
createdAt: now,
|
|
86
88
|
updatedAt: now,
|
|
87
89
|
};
|
|
@@ -158,7 +160,8 @@ export const todoWriteTool = defineTool({
|
|
|
158
160
|
name: 'todo_write',
|
|
159
161
|
description: 'Update the SESSION todo list (shown in CLI footer). These are ephemeral tasks for the current session only - ' +
|
|
160
162
|
'NOT persistent backlog items. For persistent project backlog, use workitem_* tools. ' +
|
|
161
|
-
'Provide the complete list to replace current todos.'
|
|
163
|
+
'Provide the complete list to replace current todos. ' +
|
|
164
|
+
'Use blockedBy to declare task dependencies (1-based positions in the array).',
|
|
162
165
|
inputSchema: {
|
|
163
166
|
type: 'object',
|
|
164
167
|
properties: {
|
|
@@ -189,6 +192,11 @@ export const todoWriteTool = defineTool({
|
|
|
189
192
|
type: 'string',
|
|
190
193
|
description: 'Owner agent ID (e.g., "dev", "pm", "arch"). Omit for unassigned tasks.',
|
|
191
194
|
},
|
|
195
|
+
blockedBy: {
|
|
196
|
+
type: 'array',
|
|
197
|
+
items: { type: 'number' },
|
|
198
|
+
description: 'Array of 1-based task numbers this task depends on (e.g., [3, 4] means blocked by task #3 and #4)',
|
|
199
|
+
},
|
|
192
200
|
},
|
|
193
201
|
required: ['content', 'status'],
|
|
194
202
|
},
|
|
@@ -268,6 +276,7 @@ export const todoReadTool = defineTool({
|
|
|
268
276
|
activeForm: t.activeForm,
|
|
269
277
|
priority: t.priority,
|
|
270
278
|
owner: t.owner,
|
|
279
|
+
blockedBy: t.blockedBy,
|
|
271
280
|
})),
|
|
272
281
|
counts,
|
|
273
282
|
total: todos.length,
|
|
@@ -282,7 +291,8 @@ export function createTodoTools(store) {
|
|
|
282
291
|
const todoWrite = defineTool({
|
|
283
292
|
name: 'todo_write',
|
|
284
293
|
description: 'Update the SESSION todo list (shown in CLI footer). These are ephemeral tasks for the current session only - ' +
|
|
285
|
-
'NOT persistent backlog items. For persistent project backlog, use workitem_* tools.'
|
|
294
|
+
'NOT persistent backlog items. For persistent project backlog, use workitem_* tools. ' +
|
|
295
|
+
'Use blockedBy to declare task dependencies (1-based positions in the array).',
|
|
286
296
|
inputSchema: {
|
|
287
297
|
type: 'object',
|
|
288
298
|
properties: {
|
|
@@ -297,6 +307,11 @@ export function createTodoTools(store) {
|
|
|
297
307
|
activeForm: { type: 'string' },
|
|
298
308
|
priority: { type: 'number' },
|
|
299
309
|
owner: { type: 'string' },
|
|
310
|
+
blockedBy: {
|
|
311
|
+
type: 'array',
|
|
312
|
+
items: { type: 'number' },
|
|
313
|
+
description: '1-based task numbers this task depends on',
|
|
314
|
+
},
|
|
300
315
|
},
|
|
301
316
|
required: ['content', 'status'],
|
|
302
317
|
},
|
|
@@ -368,6 +383,7 @@ export function createTodoTools(store) {
|
|
|
368
383
|
activeForm: t.activeForm,
|
|
369
384
|
priority: t.priority,
|
|
370
385
|
owner: t.owner,
|
|
386
|
+
blockedBy: t.blockedBy,
|
|
371
387
|
})),
|
|
372
388
|
counts,
|
|
373
389
|
total: todos.length,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilr-dev/agents",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "Lightweight multi-LLM agent library for building CLI AI assistants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -77,10 +77,12 @@
|
|
|
77
77
|
"vitest": "^4.0.18"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@google/genai": "^1.
|
|
80
|
+
"@google/genai": "^1.42.0",
|
|
81
81
|
"js-tiktoken": "^1.0.21"
|
|
82
82
|
},
|
|
83
83
|
"overrides": {
|
|
84
|
-
"hono": "^4.11.
|
|
84
|
+
"hono": "^4.11.10",
|
|
85
|
+
"minimatch": ">=10.2.1",
|
|
86
|
+
"glob": ">=11.0.0"
|
|
85
87
|
}
|
|
86
88
|
}
|