@kawacode/mcp 5.1.1 → 5.2.2
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/CLAUDE.md.example +101 -36
- package/README.md +3 -1
- package/build/index.js +24 -5
- package/build/index.js.map +1 -1
- package/build/prompts/intent-first-workflow.js +7 -8
- package/build/prompts/intent-first-workflow.js.map +1 -1
- package/build/resources/active-intent.js +2 -2
- package/build/resources/active-intent.js.map +1 -1
- package/build/services/muninn-ipc.d.ts +12 -5
- package/build/services/muninn-ipc.js +47 -12
- package/build/services/muninn-ipc.js.map +1 -1
- package/build/tools/activate-intent.d.ts +40 -0
- package/build/tools/activate-intent.js +52 -0
- package/build/tools/activate-intent.js.map +1 -0
- package/build/tools/check-active-intent.d.ts +0 -1
- package/build/tools/check-active-intent.js +3 -4
- package/build/tools/check-active-intent.js.map +1 -1
- package/build/tools/complete-intent.d.ts +18 -6
- package/build/tools/complete-intent.js +31 -2
- package/build/tools/complete-intent.js.map +1 -1
- package/build/tools/create-intent.d.ts +23 -1
- package/build/tools/create-intent.js +58 -5
- package/build/tools/create-intent.js.map +1 -1
- package/build/tools/detect-intent-conflicts.d.ts +22 -322
- package/build/tools/detect-intent-conflicts.js +35 -60
- package/build/tools/detect-intent-conflicts.js.map +1 -1
- package/build/tools/edit-session-decision.d.ts +4 -4
- package/build/tools/get-intents-for-file.js +1 -1
- package/build/tools/get-intents-for-file.js.map +1 -1
- package/build/tools/get-intents-for-lines.js +1 -1
- package/build/tools/get-intents-for-lines.js.map +1 -1
- package/build/tools/get-project-decisions.d.ts +1 -0
- package/build/tools/get-project-decisions.js +3 -2
- package/build/tools/get-project-decisions.js.map +1 -1
- package/build/tools/get-relevant-context.d.ts +1 -0
- package/build/tools/get-relevant-context.js +2 -1
- package/build/tools/get-relevant-context.js.map +1 -1
- package/build/tools/get-session-decisions.d.ts +1 -0
- package/build/tools/get-session-decisions.js +1 -0
- package/build/tools/get-session-decisions.js.map +1 -1
- package/build/tools/index.d.ts +51 -198
- package/build/tools/index.js +3 -3
- package/build/tools/index.js.map +1 -1
- package/build/tools/infer-history.d.ts +11 -10
- package/build/tools/infer-history.js +49 -26
- package/build/tools/infer-history.js.map +1 -1
- package/build/tools/list-team-intents.d.ts +30 -0
- package/build/tools/list-team-intents.js +39 -16
- package/build/tools/list-team-intents.js.map +1 -1
- package/build/tools/log-work.js +1 -1
- package/build/tools/log-work.js.map +1 -1
- package/build/tools/update-intent.d.ts +95 -0
- package/build/tools/update-intent.js +94 -0
- package/build/tools/update-intent.js.map +1 -0
- package/package.json +1 -1
- package/build/tools/assign-blocks.d.ts +0 -87
- package/build/tools/assign-blocks.js +0 -49
- package/build/tools/assign-blocks.js.map +0 -1
|
@@ -3,194 +3,39 @@ export declare const detectIntentConflictsSchema: z.ZodObject<{
|
|
|
3
3
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
4
4
|
repoPath: z.ZodString;
|
|
5
5
|
intentId: z.ZodString;
|
|
6
|
-
|
|
7
|
-
decision: z.ZodObject<{
|
|
8
|
-
id: z.ZodString;
|
|
9
|
-
timestamp: z.ZodString;
|
|
10
|
-
type: z.ZodString;
|
|
11
|
-
summary: z.ZodString;
|
|
12
|
-
rationale: z.ZodString;
|
|
13
|
-
context: z.ZodOptional<z.ZodString>;
|
|
14
|
-
alternatives: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
-
consequences: z.ZodOptional<z.ZodString>;
|
|
16
|
-
relatedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
17
|
-
constraintsChecked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18
|
-
constraintViolations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
19
|
-
alternative: z.ZodString;
|
|
20
|
-
constraint: z.ZodString;
|
|
21
|
-
reason: z.ZodString;
|
|
22
|
-
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
alternative: string;
|
|
24
|
-
constraint: string;
|
|
25
|
-
reason: string;
|
|
26
|
-
}, {
|
|
27
|
-
alternative: string;
|
|
28
|
-
constraint: string;
|
|
29
|
-
reason: string;
|
|
30
|
-
}>, "many">>;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
id: string;
|
|
33
|
-
type: string;
|
|
34
|
-
summary: string;
|
|
35
|
-
rationale: string;
|
|
36
|
-
timestamp: string;
|
|
37
|
-
context?: string | undefined;
|
|
38
|
-
alternatives?: string[] | undefined;
|
|
39
|
-
consequences?: string | undefined;
|
|
40
|
-
relatedFiles?: string[] | undefined;
|
|
41
|
-
constraintsChecked?: string[] | undefined;
|
|
42
|
-
constraintViolations?: {
|
|
43
|
-
alternative: string;
|
|
44
|
-
constraint: string;
|
|
45
|
-
reason: string;
|
|
46
|
-
}[] | undefined;
|
|
47
|
-
}, {
|
|
48
|
-
id: string;
|
|
49
|
-
type: string;
|
|
50
|
-
summary: string;
|
|
51
|
-
rationale: string;
|
|
52
|
-
timestamp: string;
|
|
53
|
-
context?: string | undefined;
|
|
54
|
-
alternatives?: string[] | undefined;
|
|
55
|
-
consequences?: string | undefined;
|
|
56
|
-
relatedFiles?: string[] | undefined;
|
|
57
|
-
constraintsChecked?: string[] | undefined;
|
|
58
|
-
constraintViolations?: {
|
|
59
|
-
alternative: string;
|
|
60
|
-
constraint: string;
|
|
61
|
-
reason: string;
|
|
62
|
-
}[] | undefined;
|
|
63
|
-
}>;
|
|
64
|
-
intentId: z.ZodString;
|
|
65
|
-
authorId: z.ZodString;
|
|
66
|
-
authorName: z.ZodString;
|
|
67
|
-
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
decision: {
|
|
69
|
-
id: string;
|
|
70
|
-
type: string;
|
|
71
|
-
summary: string;
|
|
72
|
-
rationale: string;
|
|
73
|
-
timestamp: string;
|
|
74
|
-
context?: string | undefined;
|
|
75
|
-
alternatives?: string[] | undefined;
|
|
76
|
-
consequences?: string | undefined;
|
|
77
|
-
relatedFiles?: string[] | undefined;
|
|
78
|
-
constraintsChecked?: string[] | undefined;
|
|
79
|
-
constraintViolations?: {
|
|
80
|
-
alternative: string;
|
|
81
|
-
constraint: string;
|
|
82
|
-
reason: string;
|
|
83
|
-
}[] | undefined;
|
|
84
|
-
};
|
|
85
|
-
intentId: string;
|
|
86
|
-
authorId: string;
|
|
87
|
-
authorName: string;
|
|
88
|
-
}, {
|
|
89
|
-
decision: {
|
|
90
|
-
id: string;
|
|
91
|
-
type: string;
|
|
92
|
-
summary: string;
|
|
93
|
-
rationale: string;
|
|
94
|
-
timestamp: string;
|
|
95
|
-
context?: string | undefined;
|
|
96
|
-
alternatives?: string[] | undefined;
|
|
97
|
-
consequences?: string | undefined;
|
|
98
|
-
relatedFiles?: string[] | undefined;
|
|
99
|
-
constraintsChecked?: string[] | undefined;
|
|
100
|
-
constraintViolations?: {
|
|
101
|
-
alternative: string;
|
|
102
|
-
constraint: string;
|
|
103
|
-
reason: string;
|
|
104
|
-
}[] | undefined;
|
|
105
|
-
};
|
|
106
|
-
intentId: string;
|
|
107
|
-
authorId: string;
|
|
108
|
-
authorName: string;
|
|
109
|
-
}>, "many">;
|
|
6
|
+
minScore: z.ZodOptional<z.ZodNumber>;
|
|
110
7
|
}, "strip", z.ZodTypeAny, {
|
|
111
8
|
repoPath: string;
|
|
112
9
|
intentId: string;
|
|
113
|
-
teamDecisions: {
|
|
114
|
-
decision: {
|
|
115
|
-
id: string;
|
|
116
|
-
type: string;
|
|
117
|
-
summary: string;
|
|
118
|
-
rationale: string;
|
|
119
|
-
timestamp: string;
|
|
120
|
-
context?: string | undefined;
|
|
121
|
-
alternatives?: string[] | undefined;
|
|
122
|
-
consequences?: string | undefined;
|
|
123
|
-
relatedFiles?: string[] | undefined;
|
|
124
|
-
constraintsChecked?: string[] | undefined;
|
|
125
|
-
constraintViolations?: {
|
|
126
|
-
alternative: string;
|
|
127
|
-
constraint: string;
|
|
128
|
-
reason: string;
|
|
129
|
-
}[] | undefined;
|
|
130
|
-
};
|
|
131
|
-
intentId: string;
|
|
132
|
-
authorId: string;
|
|
133
|
-
authorName: string;
|
|
134
|
-
}[];
|
|
135
10
|
repoOrigin?: string | undefined;
|
|
11
|
+
minScore?: number | undefined;
|
|
136
12
|
}, {
|
|
137
13
|
repoPath: string;
|
|
138
14
|
intentId: string;
|
|
139
|
-
teamDecisions: {
|
|
140
|
-
decision: {
|
|
141
|
-
id: string;
|
|
142
|
-
type: string;
|
|
143
|
-
summary: string;
|
|
144
|
-
rationale: string;
|
|
145
|
-
timestamp: string;
|
|
146
|
-
context?: string | undefined;
|
|
147
|
-
alternatives?: string[] | undefined;
|
|
148
|
-
consequences?: string | undefined;
|
|
149
|
-
relatedFiles?: string[] | undefined;
|
|
150
|
-
constraintsChecked?: string[] | undefined;
|
|
151
|
-
constraintViolations?: {
|
|
152
|
-
alternative: string;
|
|
153
|
-
constraint: string;
|
|
154
|
-
reason: string;
|
|
155
|
-
}[] | undefined;
|
|
156
|
-
};
|
|
157
|
-
intentId: string;
|
|
158
|
-
authorId: string;
|
|
159
|
-
authorName: string;
|
|
160
|
-
}[];
|
|
161
15
|
repoOrigin?: string | undefined;
|
|
16
|
+
minScore?: number | undefined;
|
|
162
17
|
}>;
|
|
163
18
|
export type DetectIntentConflictsInput = z.infer<typeof detectIntentConflictsSchema>;
|
|
164
|
-
export interface
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
19
|
+
export interface ConflictCandidate {
|
|
20
|
+
intentId: string;
|
|
21
|
+
title: string;
|
|
22
|
+
description: string;
|
|
23
|
+
author: string;
|
|
24
|
+
authorId: string;
|
|
25
|
+
score: number;
|
|
169
26
|
overlappingFiles: string[];
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
context?: string;
|
|
178
|
-
alternatives?: string[];
|
|
179
|
-
consequences?: string;
|
|
180
|
-
relatedFiles?: string[];
|
|
181
|
-
constraintsChecked?: string[];
|
|
182
|
-
constraintViolations?: Array<{
|
|
183
|
-
alternative: string;
|
|
184
|
-
constraint: string;
|
|
185
|
-
reason: string;
|
|
186
|
-
}>;
|
|
27
|
+
decisions: {
|
|
28
|
+
decisionId: string;
|
|
29
|
+
summary: string;
|
|
30
|
+
rationale: string;
|
|
31
|
+
type: string;
|
|
32
|
+
relatedFiles: string[];
|
|
33
|
+
}[];
|
|
187
34
|
}
|
|
188
35
|
export interface DetectIntentConflictsResponse {
|
|
189
36
|
hasConflicts: boolean;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
conflicts: ConflictInfo[];
|
|
193
|
-
overlappingFiles: string[];
|
|
37
|
+
conflicts: ConflictCandidate[];
|
|
38
|
+
count: number;
|
|
194
39
|
}
|
|
195
40
|
export declare function detectIntentConflicts(input: DetectIntentConflictsInput): Promise<DetectIntentConflictsResponse>;
|
|
196
41
|
export declare const detectIntentConflictsTool: {
|
|
@@ -200,162 +45,17 @@ export declare const detectIntentConflictsTool: {
|
|
|
200
45
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
201
46
|
repoPath: z.ZodString;
|
|
202
47
|
intentId: z.ZodString;
|
|
203
|
-
|
|
204
|
-
decision: z.ZodObject<{
|
|
205
|
-
id: z.ZodString;
|
|
206
|
-
timestamp: z.ZodString;
|
|
207
|
-
type: z.ZodString;
|
|
208
|
-
summary: z.ZodString;
|
|
209
|
-
rationale: z.ZodString;
|
|
210
|
-
context: z.ZodOptional<z.ZodString>;
|
|
211
|
-
alternatives: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
212
|
-
consequences: z.ZodOptional<z.ZodString>;
|
|
213
|
-
relatedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
214
|
-
constraintsChecked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
215
|
-
constraintViolations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
216
|
-
alternative: z.ZodString;
|
|
217
|
-
constraint: z.ZodString;
|
|
218
|
-
reason: z.ZodString;
|
|
219
|
-
}, "strip", z.ZodTypeAny, {
|
|
220
|
-
alternative: string;
|
|
221
|
-
constraint: string;
|
|
222
|
-
reason: string;
|
|
223
|
-
}, {
|
|
224
|
-
alternative: string;
|
|
225
|
-
constraint: string;
|
|
226
|
-
reason: string;
|
|
227
|
-
}>, "many">>;
|
|
228
|
-
}, "strip", z.ZodTypeAny, {
|
|
229
|
-
id: string;
|
|
230
|
-
type: string;
|
|
231
|
-
summary: string;
|
|
232
|
-
rationale: string;
|
|
233
|
-
timestamp: string;
|
|
234
|
-
context?: string | undefined;
|
|
235
|
-
alternatives?: string[] | undefined;
|
|
236
|
-
consequences?: string | undefined;
|
|
237
|
-
relatedFiles?: string[] | undefined;
|
|
238
|
-
constraintsChecked?: string[] | undefined;
|
|
239
|
-
constraintViolations?: {
|
|
240
|
-
alternative: string;
|
|
241
|
-
constraint: string;
|
|
242
|
-
reason: string;
|
|
243
|
-
}[] | undefined;
|
|
244
|
-
}, {
|
|
245
|
-
id: string;
|
|
246
|
-
type: string;
|
|
247
|
-
summary: string;
|
|
248
|
-
rationale: string;
|
|
249
|
-
timestamp: string;
|
|
250
|
-
context?: string | undefined;
|
|
251
|
-
alternatives?: string[] | undefined;
|
|
252
|
-
consequences?: string | undefined;
|
|
253
|
-
relatedFiles?: string[] | undefined;
|
|
254
|
-
constraintsChecked?: string[] | undefined;
|
|
255
|
-
constraintViolations?: {
|
|
256
|
-
alternative: string;
|
|
257
|
-
constraint: string;
|
|
258
|
-
reason: string;
|
|
259
|
-
}[] | undefined;
|
|
260
|
-
}>;
|
|
261
|
-
intentId: z.ZodString;
|
|
262
|
-
authorId: z.ZodString;
|
|
263
|
-
authorName: z.ZodString;
|
|
264
|
-
}, "strip", z.ZodTypeAny, {
|
|
265
|
-
decision: {
|
|
266
|
-
id: string;
|
|
267
|
-
type: string;
|
|
268
|
-
summary: string;
|
|
269
|
-
rationale: string;
|
|
270
|
-
timestamp: string;
|
|
271
|
-
context?: string | undefined;
|
|
272
|
-
alternatives?: string[] | undefined;
|
|
273
|
-
consequences?: string | undefined;
|
|
274
|
-
relatedFiles?: string[] | undefined;
|
|
275
|
-
constraintsChecked?: string[] | undefined;
|
|
276
|
-
constraintViolations?: {
|
|
277
|
-
alternative: string;
|
|
278
|
-
constraint: string;
|
|
279
|
-
reason: string;
|
|
280
|
-
}[] | undefined;
|
|
281
|
-
};
|
|
282
|
-
intentId: string;
|
|
283
|
-
authorId: string;
|
|
284
|
-
authorName: string;
|
|
285
|
-
}, {
|
|
286
|
-
decision: {
|
|
287
|
-
id: string;
|
|
288
|
-
type: string;
|
|
289
|
-
summary: string;
|
|
290
|
-
rationale: string;
|
|
291
|
-
timestamp: string;
|
|
292
|
-
context?: string | undefined;
|
|
293
|
-
alternatives?: string[] | undefined;
|
|
294
|
-
consequences?: string | undefined;
|
|
295
|
-
relatedFiles?: string[] | undefined;
|
|
296
|
-
constraintsChecked?: string[] | undefined;
|
|
297
|
-
constraintViolations?: {
|
|
298
|
-
alternative: string;
|
|
299
|
-
constraint: string;
|
|
300
|
-
reason: string;
|
|
301
|
-
}[] | undefined;
|
|
302
|
-
};
|
|
303
|
-
intentId: string;
|
|
304
|
-
authorId: string;
|
|
305
|
-
authorName: string;
|
|
306
|
-
}>, "many">;
|
|
48
|
+
minScore: z.ZodOptional<z.ZodNumber>;
|
|
307
49
|
}, "strip", z.ZodTypeAny, {
|
|
308
50
|
repoPath: string;
|
|
309
51
|
intentId: string;
|
|
310
|
-
teamDecisions: {
|
|
311
|
-
decision: {
|
|
312
|
-
id: string;
|
|
313
|
-
type: string;
|
|
314
|
-
summary: string;
|
|
315
|
-
rationale: string;
|
|
316
|
-
timestamp: string;
|
|
317
|
-
context?: string | undefined;
|
|
318
|
-
alternatives?: string[] | undefined;
|
|
319
|
-
consequences?: string | undefined;
|
|
320
|
-
relatedFiles?: string[] | undefined;
|
|
321
|
-
constraintsChecked?: string[] | undefined;
|
|
322
|
-
constraintViolations?: {
|
|
323
|
-
alternative: string;
|
|
324
|
-
constraint: string;
|
|
325
|
-
reason: string;
|
|
326
|
-
}[] | undefined;
|
|
327
|
-
};
|
|
328
|
-
intentId: string;
|
|
329
|
-
authorId: string;
|
|
330
|
-
authorName: string;
|
|
331
|
-
}[];
|
|
332
52
|
repoOrigin?: string | undefined;
|
|
53
|
+
minScore?: number | undefined;
|
|
333
54
|
}, {
|
|
334
55
|
repoPath: string;
|
|
335
56
|
intentId: string;
|
|
336
|
-
teamDecisions: {
|
|
337
|
-
decision: {
|
|
338
|
-
id: string;
|
|
339
|
-
type: string;
|
|
340
|
-
summary: string;
|
|
341
|
-
rationale: string;
|
|
342
|
-
timestamp: string;
|
|
343
|
-
context?: string | undefined;
|
|
344
|
-
alternatives?: string[] | undefined;
|
|
345
|
-
consequences?: string | undefined;
|
|
346
|
-
relatedFiles?: string[] | undefined;
|
|
347
|
-
constraintsChecked?: string[] | undefined;
|
|
348
|
-
constraintViolations?: {
|
|
349
|
-
alternative: string;
|
|
350
|
-
constraint: string;
|
|
351
|
-
reason: string;
|
|
352
|
-
}[] | undefined;
|
|
353
|
-
};
|
|
354
|
-
intentId: string;
|
|
355
|
-
authorId: string;
|
|
356
|
-
authorName: string;
|
|
357
|
-
}[];
|
|
358
57
|
repoOrigin?: string | undefined;
|
|
58
|
+
minScore?: number | undefined;
|
|
359
59
|
}>;
|
|
360
60
|
handler: typeof detectIntentConflicts;
|
|
361
61
|
};
|
|
@@ -1,90 +1,65 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
|
-
const constraintViolationSchema = z.object({
|
|
5
|
-
alternative: z.string().describe('The alternative that was rejected'),
|
|
6
|
-
constraint: z.string().describe('The constraint ID that was violated'),
|
|
7
|
-
reason: z.string().describe('Why the alternative violates the constraint')
|
|
8
|
-
});
|
|
9
|
-
const teamDecisionSchema = z.object({
|
|
10
|
-
decision: z.object({
|
|
11
|
-
id: z.string(),
|
|
12
|
-
timestamp: z.string(),
|
|
13
|
-
type: z.string(),
|
|
14
|
-
summary: z.string(),
|
|
15
|
-
rationale: z.string(),
|
|
16
|
-
context: z.string().optional(),
|
|
17
|
-
alternatives: z.array(z.string()).optional(),
|
|
18
|
-
consequences: z.string().optional(),
|
|
19
|
-
relatedFiles: z.array(z.string()).optional(),
|
|
20
|
-
constraintsChecked: z.array(z.string()).optional(),
|
|
21
|
-
constraintViolations: z.array(constraintViolationSchema).optional()
|
|
22
|
-
}),
|
|
23
|
-
intentId: z.string().describe('Intent ID this decision belongs to'),
|
|
24
|
-
authorId: z.string().describe('Author user ID'),
|
|
25
|
-
authorName: z.string().describe('Author display name')
|
|
26
|
-
});
|
|
27
4
|
export const detectIntentConflictsSchema = z.object({
|
|
28
5
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
29
6
|
repoPath: z.string().describe('Local path to the repository root'),
|
|
30
7
|
intentId: z.string().describe('The active intent ID'),
|
|
31
|
-
|
|
8
|
+
minScore: z.number().optional().describe('Minimum similarity score threshold (default: 0.5)'),
|
|
32
9
|
});
|
|
33
10
|
export async function detectIntentConflicts(input) {
|
|
34
11
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
35
12
|
const res = await request('decision', 'detect-conflicts', {
|
|
36
13
|
repoOrigin: actualOrigin,
|
|
37
14
|
intentId: input.intentId,
|
|
38
|
-
|
|
15
|
+
minScore: input.minScore,
|
|
39
16
|
});
|
|
17
|
+
if (res.error) {
|
|
18
|
+
return {
|
|
19
|
+
hasConflicts: false,
|
|
20
|
+
conflicts: [],
|
|
21
|
+
count: 0,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
40
24
|
const conflicts = (res.conflicts || []).map((c) => ({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
type:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
relatedFiles: c.remote_decision?.related_files || c.remoteDecision?.relatedFiles,
|
|
56
|
-
},
|
|
57
|
-
remoteAuthor: c.remote_author || c.remoteAuthor || '',
|
|
58
|
-
conflictType: c.conflict_type || c.conflictType || 'overlapping_code',
|
|
59
|
-
overlappingFiles: c.overlapping_files || c.overlappingFiles || []
|
|
25
|
+
intentId: c.intentId || '',
|
|
26
|
+
title: c.title || '',
|
|
27
|
+
description: c.description || '',
|
|
28
|
+
author: c.author || '',
|
|
29
|
+
authorId: c.authorId || '',
|
|
30
|
+
score: c.score || 0,
|
|
31
|
+
overlappingFiles: c.overlappingFiles || [],
|
|
32
|
+
decisions: (c.decisions || []).map((d) => ({
|
|
33
|
+
decisionId: d.decisionId || '',
|
|
34
|
+
summary: d.summary || '',
|
|
35
|
+
rationale: d.rationale || '',
|
|
36
|
+
type: d.type || '',
|
|
37
|
+
relatedFiles: d.relatedFiles || [],
|
|
38
|
+
})),
|
|
60
39
|
}));
|
|
61
|
-
const hasCriticalConflicts = conflicts.some(c => c.conflictType === 'constraint_mismatch');
|
|
62
40
|
return {
|
|
63
41
|
hasConflicts: conflicts.length > 0,
|
|
64
|
-
conflictCount: conflicts.length,
|
|
65
|
-
hasCriticalConflicts,
|
|
66
42
|
conflicts,
|
|
67
|
-
|
|
43
|
+
count: conflicts.length,
|
|
68
44
|
};
|
|
69
45
|
}
|
|
70
46
|
export const detectIntentConflictsTool = {
|
|
71
47
|
name: 'detect_intent_conflicts',
|
|
72
|
-
description: `Detect
|
|
48
|
+
description: `Detect intents from team members that potentially conflict with your active intent.
|
|
73
49
|
|
|
74
|
-
|
|
50
|
+
Uses server-side embedding similarity search to find other team members' intents
|
|
51
|
+
that overlap with yours in scope, files, or architectural decisions.
|
|
75
52
|
|
|
76
|
-
|
|
77
|
-
1. **Overlapping code**: Decisions affecting the same files
|
|
78
|
-
2. **Contradictory rationale**: Decisions with opposing reasoning
|
|
79
|
-
3. **Constraint mismatch**: Decisions applying different constraints
|
|
53
|
+
Call this before committing to check for potential conflicts.
|
|
80
54
|
|
|
81
|
-
Returns:
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
55
|
+
Returns scored conflict candidates with:
|
|
56
|
+
- score: Similarity score (higher = more likely conflict)
|
|
57
|
+
- overlappingFiles: Files affected by both intents
|
|
58
|
+
- decisions: Architectural decisions attached to the conflicting intent
|
|
59
|
+
- author: Who is working on the conflicting intent
|
|
86
60
|
|
|
87
|
-
|
|
61
|
+
The conflict list is informational — review the candidates and their decisions
|
|
62
|
+
to determine if coordination is needed.`,
|
|
88
63
|
inputSchema: detectIntentConflictsSchema,
|
|
89
64
|
handler: detectIntentConflicts
|
|
90
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect-intent-conflicts.js","sourceRoot":"","sources":["../../src/tools/detect-intent-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,
|
|
1
|
+
{"version":3,"file":"detect-intent-conflicts.js","sourceRoot":"","sources":["../../src/tools/detect-intent-conflicts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,C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C,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC;YAC9C,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,EAAE;YAC9B,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,EAAE;YACxB,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,EAAE;YAC5B,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE;YAClB,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,EAAE;SACnC,CAAC,CAAC;KACJ,CAAC,CAAC,CAAA;IAEH,OAAO;QACL,YAAY,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC;QAClC,SAAS;QACT,KAAK,EAAE,SAAS,CAAC,MAAM;KACxB,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE;;;;;;;;;;;;;;wCAcyB;IACtC,WAAW,EAAE,2BAA2B;IACxC,OAAO,EAAE,qBAAqB;CAC/B,CAAA"}
|
|
@@ -56,8 +56,8 @@ export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
57
|
repoPath: string;
|
|
58
58
|
intentId: string;
|
|
59
|
-
decisionId: string;
|
|
60
59
|
action: "update" | "delete";
|
|
60
|
+
decisionId: string;
|
|
61
61
|
repoOrigin?: string | undefined;
|
|
62
62
|
updates?: {
|
|
63
63
|
context?: string | undefined;
|
|
@@ -76,8 +76,8 @@ export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
|
76
76
|
}, {
|
|
77
77
|
repoPath: string;
|
|
78
78
|
intentId: string;
|
|
79
|
-
decisionId: string;
|
|
80
79
|
action: "update" | "delete";
|
|
80
|
+
decisionId: string;
|
|
81
81
|
repoOrigin?: string | undefined;
|
|
82
82
|
updates?: {
|
|
83
83
|
context?: string | undefined;
|
|
@@ -159,8 +159,8 @@ export declare const editSessionDecisionTool: {
|
|
|
159
159
|
}, "strip", z.ZodTypeAny, {
|
|
160
160
|
repoPath: string;
|
|
161
161
|
intentId: string;
|
|
162
|
-
decisionId: string;
|
|
163
162
|
action: "update" | "delete";
|
|
163
|
+
decisionId: string;
|
|
164
164
|
repoOrigin?: string | undefined;
|
|
165
165
|
updates?: {
|
|
166
166
|
context?: string | undefined;
|
|
@@ -179,8 +179,8 @@ export declare const editSessionDecisionTool: {
|
|
|
179
179
|
}, {
|
|
180
180
|
repoPath: string;
|
|
181
181
|
intentId: string;
|
|
182
|
-
decisionId: string;
|
|
183
182
|
action: "update" | "delete";
|
|
183
|
+
decisionId: string;
|
|
184
184
|
repoOrigin?: string | undefined;
|
|
185
185
|
updates?: {
|
|
186
186
|
context?: string | undefined;
|
|
@@ -13,7 +13,7 @@ export async function getIntentsForFile(input) {
|
|
|
13
13
|
filePath: input.filePath,
|
|
14
14
|
});
|
|
15
15
|
const intents = (res.intents || []).map((intent) => ({
|
|
16
|
-
intentId: intent.
|
|
16
|
+
intentId: intent.intentId || intent.id || '',
|
|
17
17
|
title: intent.title || 'Unknown Intent',
|
|
18
18
|
author: intent.author || intent.author_name || intent.authorName,
|
|
19
19
|
status: intent.status || 'active',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-intents-for-file.js","sourceRoot":"","sources":["../../src/tools/get-intents-for-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,C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M,CAAC,SAAS,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;SACnG,CAAC,CAAC;KACJ,CAAC,CAAC,CAAA;IAEH,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAA;IAEvC,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,KAAK,CAAC;QAClC,CAAC,CAAC,gCAAgC;QAClC,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YACpB,CAAC,CAAC,cAAc,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG;YAC1D,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,+BAA+B,YAAY,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;IAEpG,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,OAAO;QACP,YAAY;QACZ,OAAO;KACR,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE;;;;;;;2EAO4D;IACzE,WAAW,EAAE,uBAAuB;IACpC,OAAO,EAAE,iBAAiB;CAC3B,CAAA"}
|
|
@@ -17,7 +17,7 @@ export async function getIntentsForLines(input) {
|
|
|
17
17
|
endLine: input.endLine,
|
|
18
18
|
});
|
|
19
19
|
const overlappingIntents = (res.intents || []).map((intent) => ({
|
|
20
|
-
intentId: intent.
|
|
20
|
+
intentId: intent.intentId || intent.id || '',
|
|
21
21
|
title: intent.title || 'Unknown Intent',
|
|
22
22
|
author: intent.author || intent.author_name || intent.authorName,
|
|
23
23
|
status: intent.status || 'active',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-intents-for-lines.js","sourceRoot":"","sources":["../../src/tools/get-intents-for-lines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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AC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;YAC9E,OAAO,GAAG,SAAS,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,OAAO,iCAAiC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,cAAc,EAAE,CAAA;QAC5H,CAAC;IACH,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,UAAU,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;QAClE,OAAO,EAAE,kBAAkB;QAC3B,UAAU;QACV,OAAO;KACR,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE;;;;;;;gFAOiE;IAC9E,WAAW,EAAE,wBAAwB;IACrC,OAAO,EAAE,kBAAkB;CAC5B,CAAA"}
|
|
@@ -11,7 +11,8 @@ export async function getProjectDecisions(input) {
|
|
|
11
11
|
repoOrigin: actualOrigin,
|
|
12
12
|
});
|
|
13
13
|
const decisions = (res.decisions || []).map((d) => ({
|
|
14
|
-
intentId: d.intent_id || d.intentId || '',
|
|
14
|
+
intentId: d.intent_id || d.intentId || d.intent_ids?.[0] || d.intentIds?.[0] || '',
|
|
15
|
+
intentIds: d.intent_ids || d.intentIds || (d.intent_id || d.intentId ? [d.intent_id || d.intentId] : []),
|
|
15
16
|
id: d.decision_id || d.decisionId || d._id || d.id || '',
|
|
16
17
|
timestamp: d.timestamp || d.created_at || d.createdAt || '',
|
|
17
18
|
type: d.decision_type || d.decisionType || d.type,
|
|
@@ -44,7 +45,7 @@ Returns:
|
|
|
44
45
|
- count: Total number of decisions
|
|
45
46
|
|
|
46
47
|
Each decision includes:
|
|
47
|
-
-
|
|
48
|
+
- intentIds: The intents this decision belongs to (array — a decision can span multiple intents)
|
|
48
49
|
- type: fork, abandoned, discovery, constraint, tradeoff, or dependency
|
|
49
50
|
- summary: Brief description of the decision
|
|
50
51
|
- rationale: Why this decision was made
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-project-decisions.js","sourceRoot":"","sources":["../../src/tools/get-project-decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;CACnE,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"get-project-decisions.js","sourceRoot":"","sources":["../../src/tools/get-project-decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;CACnE,CAAC,CAAA;AA+BF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAA+B;IACvE,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IACpE,MAAM,G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