@gwdn/nexus-mcp 0.8.11 → 0.10.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/LICENSE +190 -0
- package/README.md +85 -34
- package/dist/server.d.ts +2 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +24 -8
- package/dist/server.js.map +1 -1
- package/dist/tools/delete-task.d.ts +31 -0
- package/dist/tools/delete-task.d.ts.map +1 -0
- package/dist/tools/delete-task.js +36 -0
- package/dist/tools/delete-task.js.map +1 -0
- package/dist/tools/dispatches.d.ts +276 -0
- package/dist/tools/dispatches.d.ts.map +1 -0
- package/dist/tools/dispatches.js +290 -0
- package/dist/tools/dispatches.js.map +1 -0
- package/dist/tools/letters.d.ts +3 -3
- package/dist/tools/update-task-status.d.ts +9 -4
- package/dist/tools/update-task-status.d.ts.map +1 -1
- package/dist/tools/update-task-status.js +17 -2
- package/dist/tools/update-task-status.js.map +1 -1
- package/package.json +20 -2
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nexus Dispatch Tools — ADR-0052
|
|
3
|
+
*
|
|
4
|
+
* dispatch_create, dispatch_reply, dispatch_inbox, dispatch_outbox,
|
|
5
|
+
* dispatch_ack, dispatch_assign, dispatch_forward, dispatch_resolve,
|
|
6
|
+
* dispatch_close, dispatch_sweep, dispatch_get, dispatch_related
|
|
7
|
+
*
|
|
8
|
+
* Legacy vl_* tools are thin wrappers at the bottom of this file.
|
|
9
|
+
* All tools delegate to POST /api/mcp/dispatches.
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
export declare const dispatchCreateSchema: {
|
|
13
|
+
project_id: z.ZodString;
|
|
14
|
+
to_project_id: z.ZodOptional<z.ZodString>;
|
|
15
|
+
to_actor: z.ZodOptional<z.ZodString>;
|
|
16
|
+
title: z.ZodString;
|
|
17
|
+
body: z.ZodString;
|
|
18
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
19
|
+
question: "question";
|
|
20
|
+
bug_report: "bug_report";
|
|
21
|
+
implementation_request: "implementation_request";
|
|
22
|
+
review_request: "review_request";
|
|
23
|
+
decision_notice: "decision_notice";
|
|
24
|
+
blocker: "blocker";
|
|
25
|
+
status_update: "status_update";
|
|
26
|
+
handover: "handover";
|
|
27
|
+
}>>;
|
|
28
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
29
|
+
low: "low";
|
|
30
|
+
high: "high";
|
|
31
|
+
urgent: "urgent";
|
|
32
|
+
normal: "normal";
|
|
33
|
+
}>>;
|
|
34
|
+
blocking: z.ZodDefault<z.ZodBoolean>;
|
|
35
|
+
due_at: z.ZodOptional<z.ZodString>;
|
|
36
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
37
|
+
};
|
|
38
|
+
export declare function dispatchCreate(args: any): Promise<{
|
|
39
|
+
content: {
|
|
40
|
+
type: "text";
|
|
41
|
+
text: string;
|
|
42
|
+
}[];
|
|
43
|
+
}>;
|
|
44
|
+
export declare const dispatchReplySchema: {
|
|
45
|
+
dispatch_id: z.ZodString;
|
|
46
|
+
body: z.ZodString;
|
|
47
|
+
message_type: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
blocker: "blocker";
|
|
49
|
+
reply: "reply";
|
|
50
|
+
clarification: "clarification";
|
|
51
|
+
progress: "progress";
|
|
52
|
+
resolution: "resolution";
|
|
53
|
+
review_note: "review_note";
|
|
54
|
+
context: "context";
|
|
55
|
+
system_note: "system_note";
|
|
56
|
+
}>>;
|
|
57
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
open: "open";
|
|
59
|
+
in_progress: "in_progress";
|
|
60
|
+
blocked: "blocked";
|
|
61
|
+
cancelled: "cancelled";
|
|
62
|
+
acknowledged: "acknowledged";
|
|
63
|
+
waiting_for_requester: "waiting_for_requester";
|
|
64
|
+
needs_review: "needs_review";
|
|
65
|
+
resolved: "resolved";
|
|
66
|
+
closed: "closed";
|
|
67
|
+
}>>;
|
|
68
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
69
|
+
};
|
|
70
|
+
export declare function dispatchReply(args: any): Promise<{
|
|
71
|
+
content: {
|
|
72
|
+
type: "text";
|
|
73
|
+
text: string;
|
|
74
|
+
}[];
|
|
75
|
+
}>;
|
|
76
|
+
export declare const dispatchInboxSchema: {
|
|
77
|
+
project_id: z.ZodString;
|
|
78
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
project: "project";
|
|
80
|
+
blocking: "blocking";
|
|
81
|
+
waiting_on_me: "waiting_on_me";
|
|
82
|
+
cross_project: "cross_project";
|
|
83
|
+
watching: "watching";
|
|
84
|
+
}>>;
|
|
85
|
+
status_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
86
|
+
include_closed: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
};
|
|
89
|
+
export declare function dispatchInbox(args: any): Promise<{
|
|
90
|
+
content: {
|
|
91
|
+
type: "text";
|
|
92
|
+
text: string;
|
|
93
|
+
}[];
|
|
94
|
+
}>;
|
|
95
|
+
export declare const dispatchOutboxSchema: {
|
|
96
|
+
project_id: z.ZodString;
|
|
97
|
+
status_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
98
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
};
|
|
100
|
+
export declare function dispatchOutbox(args: any): Promise<{
|
|
101
|
+
content: {
|
|
102
|
+
type: "text";
|
|
103
|
+
text: string;
|
|
104
|
+
}[];
|
|
105
|
+
}>;
|
|
106
|
+
export declare const dispatchAckSchema: {
|
|
107
|
+
dispatch_id: z.ZodString;
|
|
108
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
109
|
+
};
|
|
110
|
+
export declare function dispatchAck(args: any): Promise<{
|
|
111
|
+
content: {
|
|
112
|
+
type: "text";
|
|
113
|
+
text: string;
|
|
114
|
+
}[];
|
|
115
|
+
}>;
|
|
116
|
+
export declare const dispatchAssignSchema: {
|
|
117
|
+
dispatch_id: z.ZodString;
|
|
118
|
+
to_actor: z.ZodString;
|
|
119
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
120
|
+
};
|
|
121
|
+
export declare function dispatchAssign(args: any): Promise<{
|
|
122
|
+
content: {
|
|
123
|
+
type: "text";
|
|
124
|
+
text: string;
|
|
125
|
+
}[];
|
|
126
|
+
}>;
|
|
127
|
+
export declare const dispatchForwardSchema: {
|
|
128
|
+
dispatch_id: z.ZodString;
|
|
129
|
+
to_project_id: z.ZodString;
|
|
130
|
+
to_actor: z.ZodOptional<z.ZodString>;
|
|
131
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
132
|
+
};
|
|
133
|
+
export declare function dispatchForward(args: any): Promise<{
|
|
134
|
+
content: {
|
|
135
|
+
type: "text";
|
|
136
|
+
text: string;
|
|
137
|
+
}[];
|
|
138
|
+
}>;
|
|
139
|
+
export declare const dispatchResolveSchema: {
|
|
140
|
+
dispatch_id: z.ZodString;
|
|
141
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
142
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
143
|
+
};
|
|
144
|
+
export declare function dispatchResolve(args: any): Promise<{
|
|
145
|
+
content: {
|
|
146
|
+
type: "text";
|
|
147
|
+
text: string;
|
|
148
|
+
}[];
|
|
149
|
+
}>;
|
|
150
|
+
export declare const dispatchCloseSchema: {
|
|
151
|
+
dispatch_id: z.ZodString;
|
|
152
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
153
|
+
};
|
|
154
|
+
export declare function dispatchClose(args: any): Promise<{
|
|
155
|
+
content: {
|
|
156
|
+
type: "text";
|
|
157
|
+
text: string;
|
|
158
|
+
}[];
|
|
159
|
+
}>;
|
|
160
|
+
export declare const dispatchGetSchema: {
|
|
161
|
+
dispatch_id: z.ZodString;
|
|
162
|
+
};
|
|
163
|
+
export declare function dispatchGet(args: any): Promise<{
|
|
164
|
+
content: {
|
|
165
|
+
type: "text";
|
|
166
|
+
text: string;
|
|
167
|
+
}[];
|
|
168
|
+
}>;
|
|
169
|
+
export declare const dispatchSweepSchema: {
|
|
170
|
+
project_id: z.ZodString;
|
|
171
|
+
include_blocking: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
include_overdue: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
include_waiting_on_me: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
include_recent_updates: z.ZodOptional<z.ZodBoolean>;
|
|
175
|
+
acknowledge_non_blocking: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
};
|
|
178
|
+
export declare function dispatchSweep(args: any): Promise<{
|
|
179
|
+
content: {
|
|
180
|
+
type: "text";
|
|
181
|
+
text: string;
|
|
182
|
+
}[];
|
|
183
|
+
}>;
|
|
184
|
+
export declare const dispatchRelatedSchema: {
|
|
185
|
+
dispatch_id: z.ZodOptional<z.ZodString>;
|
|
186
|
+
project_id: z.ZodOptional<z.ZodString>;
|
|
187
|
+
include_closed: z.ZodOptional<z.ZodBoolean>;
|
|
188
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
};
|
|
190
|
+
export declare function dispatchRelated(args: any): Promise<{
|
|
191
|
+
content: {
|
|
192
|
+
type: "text";
|
|
193
|
+
text: string;
|
|
194
|
+
}[];
|
|
195
|
+
}>;
|
|
196
|
+
export declare const createLetterSchema: {
|
|
197
|
+
project_id: z.ZodString;
|
|
198
|
+
from_project_id: z.ZodOptional<z.ZodString>;
|
|
199
|
+
from_actor: z.ZodString;
|
|
200
|
+
to_actor: z.ZodString;
|
|
201
|
+
subject: z.ZodString;
|
|
202
|
+
body: z.ZodString;
|
|
203
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
204
|
+
low: "low";
|
|
205
|
+
high: "high";
|
|
206
|
+
urgent: "urgent";
|
|
207
|
+
normal: "normal";
|
|
208
|
+
}>>;
|
|
209
|
+
blocking: z.ZodDefault<z.ZodBoolean>;
|
|
210
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
211
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
212
|
+
};
|
|
213
|
+
export declare function createLetter(args: any): Promise<{
|
|
214
|
+
content: {
|
|
215
|
+
type: "text";
|
|
216
|
+
text: string;
|
|
217
|
+
}[];
|
|
218
|
+
}>;
|
|
219
|
+
export declare const replyLetterSchema: {
|
|
220
|
+
letter_id: z.ZodString;
|
|
221
|
+
body: z.ZodString;
|
|
222
|
+
message_type: z.ZodOptional<z.ZodEnum<{
|
|
223
|
+
clarification: "clarification";
|
|
224
|
+
review_note: "review_note";
|
|
225
|
+
context: "context";
|
|
226
|
+
response: "response";
|
|
227
|
+
follow_up: "follow_up";
|
|
228
|
+
}>>;
|
|
229
|
+
new_status: z.ZodOptional<z.ZodEnum<{
|
|
230
|
+
in_progress: "in_progress";
|
|
231
|
+
blocked: "blocked";
|
|
232
|
+
acknowledged: "acknowledged";
|
|
233
|
+
needs_review: "needs_review";
|
|
234
|
+
closed: "closed";
|
|
235
|
+
answered: "answered";
|
|
236
|
+
}>>;
|
|
237
|
+
agent_id: z.ZodOptional<z.ZodString>;
|
|
238
|
+
};
|
|
239
|
+
export declare function replyLetter(args: any): Promise<{
|
|
240
|
+
content: {
|
|
241
|
+
type: "text";
|
|
242
|
+
text: string;
|
|
243
|
+
}[];
|
|
244
|
+
}>;
|
|
245
|
+
export declare const letterInboxSchema: {
|
|
246
|
+
project_id: z.ZodString;
|
|
247
|
+
status_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
248
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
249
|
+
};
|
|
250
|
+
export declare function letterInbox(args: any): Promise<{
|
|
251
|
+
content: {
|
|
252
|
+
type: "text";
|
|
253
|
+
text: string;
|
|
254
|
+
}[];
|
|
255
|
+
}>;
|
|
256
|
+
export declare const letterOutboxSchema: {
|
|
257
|
+
project_id: z.ZodString;
|
|
258
|
+
status_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
};
|
|
261
|
+
export declare function letterOutbox(args: any): Promise<{
|
|
262
|
+
content: {
|
|
263
|
+
type: "text";
|
|
264
|
+
text: string;
|
|
265
|
+
}[];
|
|
266
|
+
}>;
|
|
267
|
+
export declare const ackLetterSchema: {
|
|
268
|
+
letter_id: z.ZodString;
|
|
269
|
+
};
|
|
270
|
+
export declare function ackLetter(args: any): Promise<{
|
|
271
|
+
content: {
|
|
272
|
+
type: "text";
|
|
273
|
+
text: string;
|
|
274
|
+
}[];
|
|
275
|
+
}>;
|
|
276
|
+
//# sourceMappingURL=dispatches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatches.d.ts","sourceRoot":"","sources":["../../src/tools/dispatches.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA8BvB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;CAqBhC,CAAA;AAGD,wBAAsB,cAAc,CAAC,IAAI,EAAE,GAAG;;;;;GAE7C;AAID,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;CAW/B,CAAA;AAGD,wBAAsB,aAAa,CAAC,IAAI,EAAE,GAAG;;;;;GAE5C;AAID,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CAW/B,CAAA;AAGD,wBAAsB,aAAa,CAAC,IAAI,EAAE,GAAG;;;;;GAE5C;AAID,eAAO,MAAM,oBAAoB;;;;CAOhC,CAAA;AAGD,wBAAsB,cAAc,CAAC,IAAI,EAAE,GAAG;;;;;GAE7C;AAID,eAAO,MAAM,iBAAiB;;;CAK7B,CAAA;AAGD,wBAAsB,WAAW,CAAC,IAAI,EAAE,GAAG;;;;;GAE1C;AAID,eAAO,MAAM,oBAAo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/**
|
|
2
|
+
* Nexus Dispatch Tools — ADR-0052
|
|
3
|
+
*
|
|
4
|
+
* dispatch_create, dispatch_reply, dispatch_inbox, dispatch_outbox,
|
|
5
|
+
* dispatch_ack, dispatch_assign, dispatch_forward, dispatch_resolve,
|
|
6
|
+
* dispatch_close, dispatch_sweep, dispatch_get, dispatch_related
|
|
7
|
+
*
|
|
8
|
+
* Legacy vl_* tools are thin wrappers at the bottom of this file.
|
|
9
|
+
* All tools delegate to POST /api/mcp/dispatches.
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
import { nexusPost } from '../nexus-api.js';
|
|
13
|
+
// ── Shared schemas ────────────────────────────────────────────────────────────
|
|
14
|
+
const DISPATCH_TYPES = ['question', 'bug_report', 'implementation_request',
|
|
15
|
+
'review_request', 'decision_notice', 'blocker', 'status_update', 'handover'];
|
|
16
|
+
const DISPATCH_STATUSES = ['open', 'acknowledged', 'in_progress', 'waiting_for_requester',
|
|
17
|
+
'blocked', 'needs_review', 'resolved', 'closed', 'cancelled'];
|
|
18
|
+
const DISPATCH_MESSAGE_TYPES = ['reply', 'clarification', 'progress', 'resolution',
|
|
19
|
+
'blocker', 'review_note', 'context', 'system_note'];
|
|
20
|
+
function ok(data) {
|
|
21
|
+
return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
|
|
22
|
+
}
|
|
23
|
+
function err(error) {
|
|
24
|
+
return { content: [{ type: 'text', text: JSON.stringify({ error }, null, 2) }], isError: true };
|
|
25
|
+
}
|
|
26
|
+
async function dispatch(action, args) {
|
|
27
|
+
const result = await nexusPost('/api/mcp/dispatches', { action, ...args });
|
|
28
|
+
if (!result.ok)
|
|
29
|
+
return err(result.error);
|
|
30
|
+
return ok(result.data);
|
|
31
|
+
}
|
|
32
|
+
// ── dispatch_create ───────────────────────────────────────────────────────────
|
|
33
|
+
export const dispatchCreateSchema = {
|
|
34
|
+
project_id: z.string().uuid()
|
|
35
|
+
.describe('Sender project UUID — the project the calling agent belongs to'),
|
|
36
|
+
to_project_id: z.string().uuid().optional()
|
|
37
|
+
.describe('Target/recipient project UUID (optional — can be resolved from to_actor)'),
|
|
38
|
+
to_actor: z.string().max(200).optional()
|
|
39
|
+
.describe('Recipient actor slug or UUID'),
|
|
40
|
+
title: z.string().max(500)
|
|
41
|
+
.describe('Dispatch title — short, actionable description of the request'),
|
|
42
|
+
body: z.string().max(100_000)
|
|
43
|
+
.describe('Initial message body (Markdown supported)'),
|
|
44
|
+
type: z.enum(DISPATCH_TYPES).default('question')
|
|
45
|
+
.describe('Dispatch type'),
|
|
46
|
+
priority: z.enum(['low', 'normal', 'high', 'urgent']).default('normal')
|
|
47
|
+
.describe('Priority'),
|
|
48
|
+
blocking: z.boolean().default(false)
|
|
49
|
+
.describe('Whether this Dispatch blocks the sender'),
|
|
50
|
+
due_at: z.string().optional()
|
|
51
|
+
.describe('Optional due date (ISO 8601)'),
|
|
52
|
+
agent_id: z.string().max(200).optional()
|
|
53
|
+
.describe('Agent identifier of the calling agent'),
|
|
54
|
+
};
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
|
+
export async function dispatchCreate(args) {
|
|
57
|
+
return dispatch('dispatch_create', args);
|
|
58
|
+
}
|
|
59
|
+
// ── dispatch_reply ────────────────────────────────────────────────────────────
|
|
60
|
+
export const dispatchReplySchema = {
|
|
61
|
+
dispatch_id: z.string().uuid()
|
|
62
|
+
.describe('Dispatch UUID to reply to'),
|
|
63
|
+
body: z.string().max(100_000)
|
|
64
|
+
.describe('Reply body (Markdown supported)'),
|
|
65
|
+
message_type: z.enum(DISPATCH_MESSAGE_TYPES).optional()
|
|
66
|
+
.describe('Type of message being appended'),
|
|
67
|
+
status: z.enum(DISPATCH_STATUSES).optional()
|
|
68
|
+
.describe('Optionally update the Dispatch status (must follow allowed transitions)'),
|
|
69
|
+
agent_id: z.string().max(200).optional()
|
|
70
|
+
.describe('Agent identifier of the replying agent'),
|
|
71
|
+
};
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
+
export async function dispatchReply(args) {
|
|
74
|
+
return dispatch('dispatch_reply', args);
|
|
75
|
+
}
|
|
76
|
+
// ── dispatch_inbox ────────────────────────────────────────────────────────────
|
|
77
|
+
export const dispatchInboxSchema = {
|
|
78
|
+
project_id: z.string().uuid()
|
|
79
|
+
.describe('Project UUID — returns Dispatches addressed to this project'),
|
|
80
|
+
scope: z.enum(['project', 'blocking', 'waiting_on_me', 'cross_project', 'watching']).optional()
|
|
81
|
+
.describe('Filter scope (default: project)'),
|
|
82
|
+
status_filter: z.array(z.string()).optional()
|
|
83
|
+
.describe('Filter by status (default: open, acknowledged, in_progress, waiting_for_requester, blocked, needs_review)'),
|
|
84
|
+
include_closed: z.boolean().optional()
|
|
85
|
+
.describe('Include closed/cancelled Dispatches (default: false)'),
|
|
86
|
+
limit: z.number().int().min(1).max(50).optional()
|
|
87
|
+
.describe('Max results (default: 20)'),
|
|
88
|
+
};
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
90
|
+
export async function dispatchInbox(args) {
|
|
91
|
+
return dispatch('dispatch_inbox', args);
|
|
92
|
+
}
|
|
93
|
+
// ── dispatch_outbox ───────────────────────────────────────────────────────────
|
|
94
|
+
export const dispatchOutboxSchema = {
|
|
95
|
+
project_id: z.string().uuid()
|
|
96
|
+
.describe('Project UUID — returns Dispatches created by this project'),
|
|
97
|
+
status_filter: z.array(z.string()).optional()
|
|
98
|
+
.describe('Filter by status (default: all non-closed)'),
|
|
99
|
+
limit: z.number().int().min(1).max(50).optional()
|
|
100
|
+
.describe('Max results (default: 20)'),
|
|
101
|
+
};
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
103
|
+
export async function dispatchOutbox(args) {
|
|
104
|
+
return dispatch('dispatch_outbox', args);
|
|
105
|
+
}
|
|
106
|
+
// ── dispatch_ack ──────────────────────────────────────────────────────────────
|
|
107
|
+
export const dispatchAckSchema = {
|
|
108
|
+
dispatch_id: z.string().uuid()
|
|
109
|
+
.describe('Dispatch UUID to acknowledge (must be in open status)'),
|
|
110
|
+
agent_id: z.string().max(200).optional()
|
|
111
|
+
.describe('Agent identifier'),
|
|
112
|
+
};
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
114
|
+
export async function dispatchAck(args) {
|
|
115
|
+
return dispatch('dispatch_ack', args);
|
|
116
|
+
}
|
|
117
|
+
// ── dispatch_assign ───────────────────────────────────────────────────────────
|
|
118
|
+
export const dispatchAssignSchema = {
|
|
119
|
+
dispatch_id: z.string().uuid()
|
|
120
|
+
.describe('Dispatch UUID to (re-)assign'),
|
|
121
|
+
to_actor: z.string().max(200)
|
|
122
|
+
.describe('Target actor slug or UUID'),
|
|
123
|
+
agent_id: z.string().max(200).optional()
|
|
124
|
+
.describe('Agent identifier of the assigning agent'),
|
|
125
|
+
};
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
127
|
+
export async function dispatchAssign(args) {
|
|
128
|
+
return dispatch('dispatch_assign', args);
|
|
129
|
+
}
|
|
130
|
+
// ── dispatch_forward ──────────────────────────────────────────────────────────
|
|
131
|
+
export const dispatchForwardSchema = {
|
|
132
|
+
dispatch_id: z.string().uuid()
|
|
133
|
+
.describe('Dispatch UUID to forward'),
|
|
134
|
+
to_project_id: z.string().uuid()
|
|
135
|
+
.describe('Target project UUID (must be linked to the source project)'),
|
|
136
|
+
to_actor: z.string().max(200).optional()
|
|
137
|
+
.describe('Optional new assignee actor in the target project'),
|
|
138
|
+
agent_id: z.string().max(200).optional()
|
|
139
|
+
.describe('Agent identifier of the forwarding agent'),
|
|
140
|
+
};
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
|
+
export async function dispatchForward(args) {
|
|
143
|
+
return dispatch('dispatch_forward', args);
|
|
144
|
+
}
|
|
145
|
+
// ── dispatch_resolve ──────────────────────────────────────────────────────────
|
|
146
|
+
export const dispatchResolveSchema = {
|
|
147
|
+
dispatch_id: z.string().uuid()
|
|
148
|
+
.describe('Dispatch UUID to mark as resolved'),
|
|
149
|
+
resolution: z.string().max(10_000).optional()
|
|
150
|
+
.describe('Resolution note — what was done, what was the outcome, any follow-up'),
|
|
151
|
+
agent_id: z.string().max(200).optional()
|
|
152
|
+
.describe('Agent identifier'),
|
|
153
|
+
};
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
155
|
+
export async function dispatchResolve(args) {
|
|
156
|
+
return dispatch('dispatch_resolve', args);
|
|
157
|
+
}
|
|
158
|
+
// ── dispatch_close ────────────────────────────────────────────────────────────
|
|
159
|
+
export const dispatchCloseSchema = {
|
|
160
|
+
dispatch_id: z.string().uuid()
|
|
161
|
+
.describe('Dispatch UUID to close (must be in resolved or needs_review status)'),
|
|
162
|
+
agent_id: z.string().max(200).optional()
|
|
163
|
+
.describe('Agent identifier'),
|
|
164
|
+
};
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
166
|
+
export async function dispatchClose(args) {
|
|
167
|
+
return dispatch('dispatch_close', args);
|
|
168
|
+
}
|
|
169
|
+
// ── dispatch_get ──────────────────────────────────────────────────────────────
|
|
170
|
+
export const dispatchGetSchema = {
|
|
171
|
+
dispatch_id: z.string().uuid()
|
|
172
|
+
.describe('Dispatch UUID — returns full Dispatch with messages and participants'),
|
|
173
|
+
};
|
|
174
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
175
|
+
export async function dispatchGet(args) {
|
|
176
|
+
return dispatch('dispatch_get', args);
|
|
177
|
+
}
|
|
178
|
+
// ── dispatch_sweep ────────────────────────────────────────────────────────────
|
|
179
|
+
export const dispatchSweepSchema = {
|
|
180
|
+
project_id: z.string().uuid()
|
|
181
|
+
.describe('Project UUID — returns prioritized session-start overview of relevant Dispatches'),
|
|
182
|
+
include_blocking: z.boolean().optional()
|
|
183
|
+
.describe('Include blocking Dispatches (default: true)'),
|
|
184
|
+
include_overdue: z.boolean().optional()
|
|
185
|
+
.describe('Include overdue Dispatches (default: true)'),
|
|
186
|
+
include_waiting_on_me: z.boolean().optional()
|
|
187
|
+
.describe('Include Dispatches waiting on this actor/project (default: true)'),
|
|
188
|
+
include_recent_updates: z.boolean().optional()
|
|
189
|
+
.describe('Include recently updated Dispatches (default: true)'),
|
|
190
|
+
acknowledge_non_blocking: z.boolean().optional()
|
|
191
|
+
.describe('Auto-acknowledge all non-blocking open Dispatches (default: false)'),
|
|
192
|
+
limit: z.number().int().min(1).max(25).optional()
|
|
193
|
+
.describe('Max results per category (default: 10)'),
|
|
194
|
+
};
|
|
195
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
196
|
+
export async function dispatchSweep(args) {
|
|
197
|
+
return dispatch('dispatch_sweep', args);
|
|
198
|
+
}
|
|
199
|
+
// ── dispatch_related ──────────────────────────────────────────────────────────
|
|
200
|
+
export const dispatchRelatedSchema = {
|
|
201
|
+
dispatch_id: z.string().uuid().optional()
|
|
202
|
+
.describe('Dispatch UUID — find structurally related Dispatches'),
|
|
203
|
+
project_id: z.string().uuid().optional()
|
|
204
|
+
.describe('Project UUID — find related Dispatches within the project'),
|
|
205
|
+
include_closed: z.boolean().optional()
|
|
206
|
+
.describe('Include closed/cancelled Dispatches (default: true — useful for loop prevention)'),
|
|
207
|
+
limit: z.number().int().min(1).max(20).optional()
|
|
208
|
+
.describe('Max results (default: 5)'),
|
|
209
|
+
};
|
|
210
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
211
|
+
export async function dispatchRelated(args) {
|
|
212
|
+
return dispatch('dispatch_related', args);
|
|
213
|
+
}
|
|
214
|
+
// ── Legacy vl_* compat wrappers ───────────────────────────────────────────────
|
|
215
|
+
// These delegate to the dispatch_* functions via the alias mapping in the API.
|
|
216
|
+
export const createLetterSchema = {
|
|
217
|
+
project_id: z.string().uuid().describe('Recipient project UUID'),
|
|
218
|
+
from_project_id: z.string().uuid().optional().describe('Sender project UUID'),
|
|
219
|
+
from_actor: z.string().max(200).describe('Sender actor identifier'),
|
|
220
|
+
to_actor: z.string().max(200).describe('Recipient actor identifier'),
|
|
221
|
+
subject: z.string().max(500).describe('Letter subject (used as Dispatch title)'),
|
|
222
|
+
body: z.string().max(100_000).describe('Initial message body'),
|
|
223
|
+
priority: z.enum(['low', 'normal', 'high', 'urgent']).default('normal').describe('Priority'),
|
|
224
|
+
blocking: z.boolean().default(false).describe('Whether this letter blocks the sender'),
|
|
225
|
+
thread_id: z.string().uuid().optional().describe('Optional thread UUID'),
|
|
226
|
+
agent_id: z.string().max(200).optional().describe('Agent identifier'),
|
|
227
|
+
};
|
|
228
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
229
|
+
export async function createLetter(args) {
|
|
230
|
+
// Map legacy vl_create → dispatch_create
|
|
231
|
+
return dispatch('dispatch_create', {
|
|
232
|
+
project_id: args.from_project_id ?? args.project_id,
|
|
233
|
+
to_project_id: args.project_id,
|
|
234
|
+
to_actor: args.to_actor,
|
|
235
|
+
title: args.subject,
|
|
236
|
+
body: args.body,
|
|
237
|
+
type: 'question',
|
|
238
|
+
priority: args.priority ?? 'normal',
|
|
239
|
+
blocking: args.blocking ?? false,
|
|
240
|
+
agent_id: args.agent_id,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
export const replyLetterSchema = {
|
|
244
|
+
letter_id: z.string().uuid().describe('Dispatch/Letter UUID to reply to'),
|
|
245
|
+
body: z.string().max(100_000).describe('Reply body'),
|
|
246
|
+
message_type: z.enum(['response', 'clarification', 'review_note', 'follow_up', 'context']).optional()
|
|
247
|
+
.describe('Message type'),
|
|
248
|
+
new_status: z.enum(['acknowledged', 'in_progress', 'answered', 'blocked', 'needs_review', 'closed']).optional()
|
|
249
|
+
.describe('Optional status update'),
|
|
250
|
+
agent_id: z.string().max(200).optional().describe('Agent identifier'),
|
|
251
|
+
};
|
|
252
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
253
|
+
export async function replyLetter(args) {
|
|
254
|
+
// Map legacy status values
|
|
255
|
+
const statusMap = { answered: 'resolved' };
|
|
256
|
+
const newStatus = args.new_status ? (statusMap[args.new_status] ?? args.new_status) : undefined;
|
|
257
|
+
return dispatch('dispatch_reply', {
|
|
258
|
+
dispatch_id: args.letter_id,
|
|
259
|
+
body: args.body,
|
|
260
|
+
message_type: args.message_type === 'response' ? 'reply' : (args.message_type ?? 'reply'),
|
|
261
|
+
status: newStatus,
|
|
262
|
+
agent_id: args.agent_id,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
export const letterInboxSchema = {
|
|
266
|
+
project_id: z.string().uuid().describe('Project UUID'),
|
|
267
|
+
status_filter: z.array(z.string()).optional().describe('Filter by status'),
|
|
268
|
+
limit: z.number().int().min(1).max(50).optional().describe('Max results (default: 20)'),
|
|
269
|
+
};
|
|
270
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
271
|
+
export async function letterInbox(args) {
|
|
272
|
+
return dispatch('dispatch_inbox', args);
|
|
273
|
+
}
|
|
274
|
+
export const letterOutboxSchema = {
|
|
275
|
+
project_id: z.string().uuid().describe('Project UUID'),
|
|
276
|
+
status_filter: z.array(z.string()).optional().describe('Filter by status'),
|
|
277
|
+
limit: z.number().int().min(1).max(50).optional().describe('Max results (default: 20)'),
|
|
278
|
+
};
|
|
279
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
280
|
+
export async function letterOutbox(args) {
|
|
281
|
+
return dispatch('dispatch_outbox', args);
|
|
282
|
+
}
|
|
283
|
+
export const ackLetterSchema = {
|
|
284
|
+
letter_id: z.string().uuid().describe('Letter/Dispatch UUID to acknowledge'),
|
|
285
|
+
};
|
|
286
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
287
|
+
export async function ackLetter(args) {
|
|
288
|
+
return dispatch('dispatch_ack', { dispatch_id: args.letter_id });
|
|
289
|
+
}
|
|
290
|
+
//# sourceMappingURL=disp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AG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;CACxF,CAAA;AAED,8DAA8D;AAC9D,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAS;IAC1C,OAAO,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;CAC7E,CAAA;AAED,8DAA8D;AAC9D,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAS;IACvC,OAAO,QAAQ,CAAC,cAAc,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAA;AAClE,CAAC"}
|
package/dist/tools/letters.d.ts
CHANGED
|
@@ -52,20 +52,20 @@ export declare const replyLetterSchema: {
|
|
|
52
52
|
letter_id: z.ZodString;
|
|
53
53
|
body: z.ZodString;
|
|
54
54
|
message_type: z.ZodDefault<z.ZodEnum<{
|
|
55
|
-
response: "response";
|
|
56
55
|
clarification: "clarification";
|
|
57
56
|
review_note: "review_note";
|
|
58
|
-
follow_up: "follow_up";
|
|
59
57
|
context: "context";
|
|
58
|
+
response: "response";
|
|
59
|
+
follow_up: "follow_up";
|
|
60
60
|
}>>;
|
|
61
61
|
agent_id: z.ZodOptional<z.ZodString>;
|
|
62
62
|
new_status: z.ZodOptional<z.ZodEnum<{
|
|
63
63
|
in_progress: "in_progress";
|
|
64
64
|
blocked: "blocked";
|
|
65
65
|
acknowledged: "acknowledged";
|
|
66
|
-
answered: "answered";
|
|
67
66
|
needs_review: "needs_review";
|
|
68
67
|
closed: "closed";
|
|
68
|
+
answered: "answered";
|
|
69
69
|
}>>;
|
|
70
70
|
};
|
|
71
71
|
type ReplyLetterArgs = {
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* task_update -- Layer 2 Coordination
|
|
3
3
|
*
|
|
4
|
-
* Updates
|
|
4
|
+
* Updates a task's status, priority, assignee, title, or description.
|
|
5
|
+
* All fields except task_id are optional — at least one must be provided.
|
|
5
6
|
* Delegates to POST /api/mcp/tasks (action: task_update).
|
|
6
7
|
*/
|
|
7
8
|
import { z } from 'zod';
|
|
8
9
|
export declare const updateTaskStatusSchema: {
|
|
9
10
|
task_id: z.ZodString;
|
|
10
|
-
status: z.ZodEnum<{
|
|
11
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
11
12
|
open: "open";
|
|
12
13
|
in_progress: "in_progress";
|
|
13
14
|
blocked: "blocked";
|
|
14
15
|
done: "done";
|
|
15
16
|
cancelled: "cancelled";
|
|
16
|
-
}
|
|
17
|
+
}>>;
|
|
17
18
|
priority: z.ZodOptional<z.ZodEnum<{
|
|
18
19
|
low: "low";
|
|
19
20
|
medium: "medium";
|
|
@@ -21,13 +22,17 @@ export declare const updateTaskStatusSchema: {
|
|
|
21
22
|
urgent: "urgent";
|
|
22
23
|
}>>;
|
|
23
24
|
assignee: z.ZodOptional<z.ZodString>;
|
|
25
|
+
title: z.ZodOptional<z.ZodString>;
|
|
26
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
27
|
agent_id: z.ZodOptional<z.ZodString>;
|
|
25
28
|
};
|
|
26
29
|
type UpdateTaskStatusArgs = {
|
|
27
30
|
task_id: string;
|
|
28
|
-
status
|
|
31
|
+
status?: string;
|
|
29
32
|
priority?: string;
|
|
30
33
|
assignee?: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
description?: string | null;
|
|
31
36
|
user_id: string;
|
|
32
37
|
agent_id?: string;
|
|
33
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-task-status.d.ts","sourceRoot":"","sources":["../../src/tools/update-task-status.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"update-task-status.d.ts","sourceRoot":"","sources":["../../src/tools/update-task-status.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;CA2BlC,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB;;;;;;;;;;;;GA6BhE"}
|