@kawacode/mcp 5.1.1 → 5.2.0
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 +2 -0
- package/build/services/muninn-ipc.js +34 -4
- 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 +45 -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
package/build/tools/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { checkActiveIntentTool, checkActiveIntent, checkActiveIntentSchema } from './check-active-intent.js';
|
|
2
2
|
import { getRelevantContextTool, getRelevantContext, getRelevantContextSchema } from './get-relevant-context.js';
|
|
3
3
|
import { createAndActivateIntentTool, createAndActivateIntent, createAndActivateIntentSchema } from './create-intent.js';
|
|
4
|
+
import { activateIntentTool, activateIntent, activateIntentSchema } from './activate-intent.js';
|
|
4
5
|
import { getIntentsForFileTool, getIntentsForFile, getIntentsForFileSchema } from './get-intents-for-file.js';
|
|
5
6
|
import { getIntentsForLinesTool, getIntentsForLines, getIntentsForLinesSchema } from './get-intents-for-lines.js';
|
|
6
|
-
import { assignBlocksToIntentTool, assignBlocksToIntent, assignBlocksSchema } from './assign-blocks.js';
|
|
7
7
|
import { listTeamIntentsTool, listTeamIntents, listTeamIntentsSchema } from './list-team-intents.js';
|
|
8
8
|
import { getIntentChangesTool, getIntentChanges, getIntentChangesSchema } from './get-intent-changes.js';
|
|
9
9
|
import { completeIntentTool, completeIntent, completeIntentSchema } from './complete-intent.js';
|
|
@@ -15,7 +15,7 @@ import { editSessionDecisionTool, editSessionDecision, editSessionDecisionSchema
|
|
|
15
15
|
import { detectIntentConflictsTool, detectIntentConflicts, detectIntentConflictsSchema } from './detect-intent-conflicts.js';
|
|
16
16
|
import { inferHistoryTool, inferHistory, inferHistorySchema } from './infer-history.js';
|
|
17
17
|
import { evolveDecisionsTool, evolveDecisions, evolveDecisionsSchema } from './evolve-decisions.js';
|
|
18
|
-
export { getRelevantContextTool, getRelevantContext, getRelevantContextSchema, checkActiveIntentTool, checkActiveIntent, checkActiveIntentSchema, createAndActivateIntentTool, createAndActivateIntent, createAndActivateIntentSchema, getIntentsForFileTool, getIntentsForFile, getIntentsForFileSchema, getIntentsForLinesTool, getIntentsForLines, getIntentsForLinesSchema,
|
|
18
|
+
export { getRelevantContextTool, getRelevantContext, getRelevantContextSchema, checkActiveIntentTool, checkActiveIntent, checkActiveIntentSchema, createAndActivateIntentTool, createAndActivateIntent, createAndActivateIntentSchema, activateIntentTool, activateIntent, activateIntentSchema, getIntentsForFileTool, getIntentsForFile, getIntentsForFileSchema, getIntentsForLinesTool, getIntentsForLines, getIntentsForLinesSchema, listTeamIntentsTool, listTeamIntents, listTeamIntentsSchema, getIntentChangesTool, getIntentChanges, getIntentChangesSchema, completeIntentTool, completeIntent, completeIntentSchema, logWorkTool, logWork, logWorkSchema, recordDecisionTool, recordDecision, recordDecisionSchema, getSessionDecisionsTool, getSessionDecisions, getSessionDecisionsSchema, getProjectDecisionsTool, getProjectDecisions, getProjectDecisionsSchema, editSessionDecisionTool, editSessionDecision, editSessionDecisionSchema, detectIntentConflictsTool, detectIntentConflicts, detectIntentConflictsSchema, inferHistoryTool, inferHistory, inferHistorySchema, evolveDecisionsTool, evolveDecisions, evolveDecisionsSchema };
|
|
19
19
|
export declare const allTools: ({
|
|
20
20
|
name: string;
|
|
21
21
|
description: string;
|
|
@@ -69,11 +69,13 @@ export declare const allTools: ({
|
|
|
69
69
|
description: import("zod").ZodString;
|
|
70
70
|
templateType: import("zod").ZodDefault<import("zod").ZodEnum<["feature", "refactor", "exploration"]>>;
|
|
71
71
|
constraints: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
72
|
+
force: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
72
73
|
}, "strip", import("zod").ZodTypeAny, {
|
|
73
74
|
repoPath: string;
|
|
74
75
|
title: string;
|
|
75
76
|
description: string;
|
|
76
77
|
templateType: "feature" | "refactor" | "exploration";
|
|
78
|
+
force: boolean;
|
|
77
79
|
repoOrigin?: string | undefined;
|
|
78
80
|
constraints?: string[] | undefined;
|
|
79
81
|
}, {
|
|
@@ -83,6 +85,7 @@ export declare const allTools: ({
|
|
|
83
85
|
repoOrigin?: string | undefined;
|
|
84
86
|
templateType?: "feature" | "refactor" | "exploration" | undefined;
|
|
85
87
|
constraints?: string[] | undefined;
|
|
88
|
+
force?: boolean | undefined;
|
|
86
89
|
}>;
|
|
87
90
|
handler: typeof createAndActivateIntent;
|
|
88
91
|
} | {
|
|
@@ -91,17 +94,17 @@ export declare const allTools: ({
|
|
|
91
94
|
inputSchema: import("zod").ZodObject<{
|
|
92
95
|
repoOrigin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
93
96
|
repoPath: import("zod").ZodString;
|
|
94
|
-
|
|
97
|
+
intentId: import("zod").ZodString;
|
|
95
98
|
}, "strip", import("zod").ZodTypeAny, {
|
|
96
99
|
repoPath: string;
|
|
97
|
-
|
|
100
|
+
intentId: string;
|
|
98
101
|
repoOrigin?: string | undefined;
|
|
99
102
|
}, {
|
|
100
103
|
repoPath: string;
|
|
101
|
-
|
|
104
|
+
intentId: string;
|
|
102
105
|
repoOrigin?: string | undefined;
|
|
103
106
|
}>;
|
|
104
|
-
handler: typeof
|
|
107
|
+
handler: typeof activateIntent;
|
|
105
108
|
} | {
|
|
106
109
|
name: string;
|
|
107
110
|
description: string;
|
|
@@ -109,62 +112,39 @@ export declare const allTools: ({
|
|
|
109
112
|
repoOrigin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
110
113
|
repoPath: import("zod").ZodString;
|
|
111
114
|
filePath: import("zod").ZodString;
|
|
112
|
-
startLine: import("zod").ZodNumber;
|
|
113
|
-
endLine: import("zod").ZodNumber;
|
|
114
115
|
}, "strip", import("zod").ZodTypeAny, {
|
|
115
116
|
repoPath: string;
|
|
116
117
|
filePath: string;
|
|
117
|
-
startLine: number;
|
|
118
|
-
endLine: number;
|
|
119
118
|
repoOrigin?: string | undefined;
|
|
120
119
|
}, {
|
|
121
120
|
repoPath: string;
|
|
122
121
|
filePath: string;
|
|
123
|
-
startLine: number;
|
|
124
|
-
endLine: number;
|
|
125
122
|
repoOrigin?: string | undefined;
|
|
126
123
|
}>;
|
|
127
|
-
handler: typeof
|
|
124
|
+
handler: typeof getIntentsForFile;
|
|
128
125
|
} | {
|
|
129
126
|
name: string;
|
|
130
127
|
description: string;
|
|
131
128
|
inputSchema: import("zod").ZodObject<{
|
|
132
129
|
repoOrigin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
133
130
|
repoPath: import("zod").ZodString;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
startLine: import("zod").ZodNumber;
|
|
138
|
-
endLine: import("zod").ZodNumber;
|
|
139
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
140
|
-
filePath: string;
|
|
141
|
-
startLine: number;
|
|
142
|
-
endLine: number;
|
|
143
|
-
}, {
|
|
144
|
-
filePath: string;
|
|
145
|
-
startLine: number;
|
|
146
|
-
endLine: number;
|
|
147
|
-
}>, "many">;
|
|
131
|
+
filePath: import("zod").ZodString;
|
|
132
|
+
startLine: import("zod").ZodNumber;
|
|
133
|
+
endLine: import("zod").ZodNumber;
|
|
148
134
|
}, "strip", import("zod").ZodTypeAny, {
|
|
149
135
|
repoPath: string;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
startLine: number;
|
|
154
|
-
endLine: number;
|
|
155
|
-
}[];
|
|
136
|
+
filePath: string;
|
|
137
|
+
startLine: number;
|
|
138
|
+
endLine: number;
|
|
156
139
|
repoOrigin?: string | undefined;
|
|
157
140
|
}, {
|
|
158
141
|
repoPath: string;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
startLine: number;
|
|
163
|
-
endLine: number;
|
|
164
|
-
}[];
|
|
142
|
+
filePath: string;
|
|
143
|
+
startLine: number;
|
|
144
|
+
endLine: number;
|
|
165
145
|
repoOrigin?: string | undefined;
|
|
166
146
|
}>;
|
|
167
|
-
handler: typeof
|
|
147
|
+
handler: typeof getIntentsForLines;
|
|
168
148
|
} | {
|
|
169
149
|
name: string;
|
|
170
150
|
description: string;
|
|
@@ -172,14 +152,29 @@ export declare const allTools: ({
|
|
|
172
152
|
repoOrigin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
173
153
|
repoPath: import("zod").ZodString;
|
|
174
154
|
status: import("zod").ZodOptional<import("zod").ZodEnum<["active", "committed", "pushed", "done", "abandoned"]>>;
|
|
155
|
+
author: import("zod").ZodOptional<import("zod").ZodString>;
|
|
156
|
+
since: import("zod").ZodOptional<import("zod").ZodString>;
|
|
157
|
+
until: import("zod").ZodOptional<import("zod").ZodString>;
|
|
158
|
+
limit: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
159
|
+
offset: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
175
160
|
}, "strip", import("zod").ZodTypeAny, {
|
|
176
161
|
repoPath: string;
|
|
162
|
+
limit: number;
|
|
163
|
+
offset: number;
|
|
177
164
|
repoOrigin?: string | undefined;
|
|
178
165
|
status?: "active" | "committed" | "pushed" | "done" | "abandoned" | undefined;
|
|
166
|
+
author?: string | undefined;
|
|
167
|
+
since?: string | undefined;
|
|
168
|
+
until?: string | undefined;
|
|
179
169
|
}, {
|
|
180
170
|
repoPath: string;
|
|
181
171
|
repoOrigin?: string | undefined;
|
|
182
172
|
status?: "active" | "committed" | "pushed" | "done" | "abandoned" | undefined;
|
|
173
|
+
author?: string | undefined;
|
|
174
|
+
since?: string | undefined;
|
|
175
|
+
until?: string | undefined;
|
|
176
|
+
limit?: number | undefined;
|
|
177
|
+
offset?: number | undefined;
|
|
183
178
|
}>;
|
|
184
179
|
handler: typeof listTeamIntents;
|
|
185
180
|
} | {
|
|
@@ -202,18 +197,24 @@ export declare const allTools: ({
|
|
|
202
197
|
inputSchema: import("zod").ZodObject<{
|
|
203
198
|
repoOrigin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
204
199
|
repoPath: import("zod").ZodString;
|
|
200
|
+
intentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
205
201
|
commitSha: import("zod").ZodOptional<import("zod").ZodString>;
|
|
206
|
-
status: import("zod").ZodDefault<import("zod").ZodEnum<["committed", "pushed", "done", "abandoned"]>>;
|
|
202
|
+
status: import("zod").ZodDefault<import("zod").ZodEnum<["committed", "pushed", "done", "abandoned", "superseded"]>>;
|
|
203
|
+
supersededBy: import("zod").ZodOptional<import("zod").ZodString>;
|
|
207
204
|
}, "strip", import("zod").ZodTypeAny, {
|
|
208
205
|
repoPath: string;
|
|
209
|
-
status: "committed" | "pushed" | "done" | "abandoned";
|
|
206
|
+
status: "committed" | "pushed" | "done" | "abandoned" | "superseded";
|
|
210
207
|
repoOrigin?: string | undefined;
|
|
208
|
+
intentId?: string | undefined;
|
|
211
209
|
commitSha?: string | undefined;
|
|
210
|
+
supersededBy?: string | undefined;
|
|
212
211
|
}, {
|
|
213
212
|
repoPath: string;
|
|
214
213
|
repoOrigin?: string | undefined;
|
|
215
|
-
status?: "committed" | "pushed" | "done" | "abandoned" | undefined;
|
|
214
|
+
status?: "committed" | "pushed" | "done" | "abandoned" | "superseded" | undefined;
|
|
215
|
+
intentId?: string | undefined;
|
|
216
216
|
commitSha?: string | undefined;
|
|
217
|
+
supersededBy?: string | undefined;
|
|
217
218
|
}>;
|
|
218
219
|
handler: typeof completeIntent;
|
|
219
220
|
} | {
|
|
@@ -394,8 +395,8 @@ export declare const allTools: ({
|
|
|
394
395
|
}, "strip", import("zod").ZodTypeAny, {
|
|
395
396
|
repoPath: string;
|
|
396
397
|
intentId: string;
|
|
397
|
-
decisionId: string;
|
|
398
398
|
action: "update" | "delete";
|
|
399
|
+
decisionId: string;
|
|
399
400
|
repoOrigin?: string | undefined;
|
|
400
401
|
updates?: {
|
|
401
402
|
context?: string | undefined;
|
|
@@ -414,8 +415,8 @@ export declare const allTools: ({
|
|
|
414
415
|
}, {
|
|
415
416
|
repoPath: string;
|
|
416
417
|
intentId: string;
|
|
417
|
-
decisionId: string;
|
|
418
418
|
action: "update" | "delete";
|
|
419
|
+
decisionId: string;
|
|
419
420
|
repoOrigin?: string | undefined;
|
|
420
421
|
updates?: {
|
|
421
422
|
context?: string | undefined;
|
|
@@ -440,162 +441,17 @@ export declare const allTools: ({
|
|
|
440
441
|
repoOrigin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
441
442
|
repoPath: import("zod").ZodString;
|
|
442
443
|
intentId: import("zod").ZodString;
|
|
443
|
-
|
|
444
|
-
decision: import("zod").ZodObject<{
|
|
445
|
-
id: import("zod").ZodString;
|
|
446
|
-
timestamp: import("zod").ZodString;
|
|
447
|
-
type: import("zod").ZodString;
|
|
448
|
-
summary: import("zod").ZodString;
|
|
449
|
-
rationale: import("zod").ZodString;
|
|
450
|
-
context: import("zod").ZodOptional<import("zod").ZodString>;
|
|
451
|
-
alternatives: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
452
|
-
consequences: import("zod").ZodOptional<import("zod").ZodString>;
|
|
453
|
-
relatedFiles: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
454
|
-
constraintsChecked: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
455
|
-
constraintViolations: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
456
|
-
alternative: import("zod").ZodString;
|
|
457
|
-
constraint: import("zod").ZodString;
|
|
458
|
-
reason: import("zod").ZodString;
|
|
459
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
460
|
-
alternative: string;
|
|
461
|
-
constraint: string;
|
|
462
|
-
reason: string;
|
|
463
|
-
}, {
|
|
464
|
-
alternative: string;
|
|
465
|
-
constraint: string;
|
|
466
|
-
reason: string;
|
|
467
|
-
}>, "many">>;
|
|
468
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
469
|
-
id: string;
|
|
470
|
-
type: string;
|
|
471
|
-
summary: string;
|
|
472
|
-
rationale: string;
|
|
473
|
-
timestamp: string;
|
|
474
|
-
context?: string | undefined;
|
|
475
|
-
alternatives?: string[] | undefined;
|
|
476
|
-
consequences?: string | undefined;
|
|
477
|
-
relatedFiles?: string[] | undefined;
|
|
478
|
-
constraintsChecked?: string[] | undefined;
|
|
479
|
-
constraintViolations?: {
|
|
480
|
-
alternative: string;
|
|
481
|
-
constraint: string;
|
|
482
|
-
reason: string;
|
|
483
|
-
}[] | undefined;
|
|
484
|
-
}, {
|
|
485
|
-
id: string;
|
|
486
|
-
type: string;
|
|
487
|
-
summary: string;
|
|
488
|
-
rationale: string;
|
|
489
|
-
timestamp: string;
|
|
490
|
-
context?: string | undefined;
|
|
491
|
-
alternatives?: string[] | undefined;
|
|
492
|
-
consequences?: string | undefined;
|
|
493
|
-
relatedFiles?: string[] | undefined;
|
|
494
|
-
constraintsChecked?: string[] | undefined;
|
|
495
|
-
constraintViolations?: {
|
|
496
|
-
alternative: string;
|
|
497
|
-
constraint: string;
|
|
498
|
-
reason: string;
|
|
499
|
-
}[] | undefined;
|
|
500
|
-
}>;
|
|
501
|
-
intentId: import("zod").ZodString;
|
|
502
|
-
authorId: import("zod").ZodString;
|
|
503
|
-
authorName: import("zod").ZodString;
|
|
504
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
505
|
-
decision: {
|
|
506
|
-
id: string;
|
|
507
|
-
type: string;
|
|
508
|
-
summary: string;
|
|
509
|
-
rationale: string;
|
|
510
|
-
timestamp: string;
|
|
511
|
-
context?: string | undefined;
|
|
512
|
-
alternatives?: string[] | undefined;
|
|
513
|
-
consequences?: string | undefined;
|
|
514
|
-
relatedFiles?: string[] | undefined;
|
|
515
|
-
constraintsChecked?: string[] | undefined;
|
|
516
|
-
constraintViolations?: {
|
|
517
|
-
alternative: string;
|
|
518
|
-
constraint: string;
|
|
519
|
-
reason: string;
|
|
520
|
-
}[] | undefined;
|
|
521
|
-
};
|
|
522
|
-
intentId: string;
|
|
523
|
-
authorId: string;
|
|
524
|
-
authorName: string;
|
|
525
|
-
}, {
|
|
526
|
-
decision: {
|
|
527
|
-
id: string;
|
|
528
|
-
type: string;
|
|
529
|
-
summary: string;
|
|
530
|
-
rationale: string;
|
|
531
|
-
timestamp: string;
|
|
532
|
-
context?: string | undefined;
|
|
533
|
-
alternatives?: string[] | undefined;
|
|
534
|
-
consequences?: string | undefined;
|
|
535
|
-
relatedFiles?: string[] | undefined;
|
|
536
|
-
constraintsChecked?: string[] | undefined;
|
|
537
|
-
constraintViolations?: {
|
|
538
|
-
alternative: string;
|
|
539
|
-
constraint: string;
|
|
540
|
-
reason: string;
|
|
541
|
-
}[] | undefined;
|
|
542
|
-
};
|
|
543
|
-
intentId: string;
|
|
544
|
-
authorId: string;
|
|
545
|
-
authorName: string;
|
|
546
|
-
}>, "many">;
|
|
444
|
+
minScore: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
547
445
|
}, "strip", import("zod").ZodTypeAny, {
|
|
548
446
|
repoPath: string;
|
|
549
447
|
intentId: string;
|
|
550
|
-
teamDecisions: {
|
|
551
|
-
decision: {
|
|
552
|
-
id: string;
|
|
553
|
-
type: string;
|
|
554
|
-
summary: string;
|
|
555
|
-
rationale: string;
|
|
556
|
-
timestamp: string;
|
|
557
|
-
context?: string | undefined;
|
|
558
|
-
alternatives?: string[] | undefined;
|
|
559
|
-
consequences?: string | undefined;
|
|
560
|
-
relatedFiles?: string[] | undefined;
|
|
561
|
-
constraintsChecked?: string[] | undefined;
|
|
562
|
-
constraintViolations?: {
|
|
563
|
-
alternative: string;
|
|
564
|
-
constraint: string;
|
|
565
|
-
reason: string;
|
|
566
|
-
}[] | undefined;
|
|
567
|
-
};
|
|
568
|
-
intentId: string;
|
|
569
|
-
authorId: string;
|
|
570
|
-
authorName: string;
|
|
571
|
-
}[];
|
|
572
448
|
repoOrigin?: string | undefined;
|
|
449
|
+
minScore?: number | undefined;
|
|
573
450
|
}, {
|
|
574
451
|
repoPath: string;
|
|
575
452
|
intentId: string;
|
|
576
|
-
teamDecisions: {
|
|
577
|
-
decision: {
|
|
578
|
-
id: string;
|
|
579
|
-
type: string;
|
|
580
|
-
summary: string;
|
|
581
|
-
rationale: string;
|
|
582
|
-
timestamp: string;
|
|
583
|
-
context?: string | undefined;
|
|
584
|
-
alternatives?: string[] | undefined;
|
|
585
|
-
consequences?: string | undefined;
|
|
586
|
-
relatedFiles?: string[] | undefined;
|
|
587
|
-
constraintsChecked?: string[] | undefined;
|
|
588
|
-
constraintViolations?: {
|
|
589
|
-
alternative: string;
|
|
590
|
-
constraint: string;
|
|
591
|
-
reason: string;
|
|
592
|
-
}[] | undefined;
|
|
593
|
-
};
|
|
594
|
-
intentId: string;
|
|
595
|
-
authorId: string;
|
|
596
|
-
authorName: string;
|
|
597
|
-
}[];
|
|
598
453
|
repoOrigin?: string | undefined;
|
|
454
|
+
minScore?: number | undefined;
|
|
599
455
|
}>;
|
|
600
456
|
handler: typeof detectIntentConflicts;
|
|
601
457
|
} | {
|
|
@@ -603,8 +459,7 @@ export declare const allTools: ({
|
|
|
603
459
|
description: string;
|
|
604
460
|
inputSchema: import("zod").ZodObject<{
|
|
605
461
|
repoPath: import("zod").ZodString;
|
|
606
|
-
commits: import("zod").
|
|
607
|
-
tier: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
462
|
+
commits: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
608
463
|
contextIssues: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
609
464
|
model: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
610
465
|
maxStories: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
@@ -612,17 +467,15 @@ export declare const allTools: ({
|
|
|
612
467
|
estimateOnly: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
613
468
|
}, "strip", import("zod").ZodTypeAny, {
|
|
614
469
|
repoPath: string;
|
|
615
|
-
commits: number;
|
|
616
|
-
tier: number;
|
|
617
470
|
contextIssues: boolean;
|
|
618
471
|
model: string;
|
|
619
472
|
maxStories: number;
|
|
620
473
|
allowCommitSplitting: boolean;
|
|
621
474
|
estimateOnly: boolean;
|
|
475
|
+
commits?: number | undefined;
|
|
622
476
|
}, {
|
|
623
477
|
repoPath: string;
|
|
624
478
|
commits?: number | undefined;
|
|
625
|
-
tier?: number | undefined;
|
|
626
479
|
contextIssues?: boolean | undefined;
|
|
627
480
|
model?: string | undefined;
|
|
628
481
|
maxStories?: number | undefined;
|
package/build/tools/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { checkActiveIntentTool, checkActiveIntent, checkActiveIntentSchema } from './check-active-intent.js';
|
|
2
2
|
import { getRelevantContextTool, getRelevantContext, getRelevantContextSchema } from './get-relevant-context.js';
|
|
3
3
|
import { createAndActivateIntentTool, createAndActivateIntent, createAndActivateIntentSchema } from './create-intent.js';
|
|
4
|
+
import { activateIntentTool, activateIntent, activateIntentSchema } from './activate-intent.js';
|
|
4
5
|
import { getIntentsForFileTool, getIntentsForFile, getIntentsForFileSchema } from './get-intents-for-file.js';
|
|
5
6
|
import { getIntentsForLinesTool, getIntentsForLines, getIntentsForLinesSchema } from './get-intents-for-lines.js';
|
|
6
|
-
import { assignBlocksToIntentTool, assignBlocksToIntent, assignBlocksSchema } from './assign-blocks.js';
|
|
7
7
|
import { listTeamIntentsTool, listTeamIntents, listTeamIntentsSchema } from './list-team-intents.js';
|
|
8
8
|
import { getIntentChangesTool, getIntentChanges, getIntentChangesSchema } from './get-intent-changes.js';
|
|
9
9
|
import { completeIntentTool, completeIntent, completeIntentSchema } from './complete-intent.js';
|
|
@@ -20,7 +20,7 @@ export {
|
|
|
20
20
|
// Relevance-based context (call per request)
|
|
21
21
|
getRelevantContextTool, getRelevantContext, getRelevantContextSchema,
|
|
22
22
|
// Intent tools
|
|
23
|
-
checkActiveIntentTool, checkActiveIntent, checkActiveIntentSchema, createAndActivateIntentTool, createAndActivateIntent, createAndActivateIntentSchema, getIntentsForFileTool, getIntentsForFile, getIntentsForFileSchema, getIntentsForLinesTool, getIntentsForLines, getIntentsForLinesSchema,
|
|
23
|
+
checkActiveIntentTool, checkActiveIntent, checkActiveIntentSchema, createAndActivateIntentTool, createAndActivateIntent, createAndActivateIntentSchema, activateIntentTool, activateIntent, activateIntentSchema, getIntentsForFileTool, getIntentsForFile, getIntentsForFileSchema, getIntentsForLinesTool, getIntentsForLines, getIntentsForLinesSchema, listTeamIntentsTool, listTeamIntents, listTeamIntentsSchema, getIntentChangesTool, getIntentChanges, getIntentChangesSchema, completeIntentTool, completeIntent, completeIntentSchema,
|
|
24
24
|
// Lightweight logging
|
|
25
25
|
logWorkTool, logWork, logWorkSchema,
|
|
26
26
|
// Decision recording tools
|
|
@@ -35,9 +35,9 @@ export const allTools = [
|
|
|
35
35
|
// Intent tools
|
|
36
36
|
checkActiveIntentTool,
|
|
37
37
|
createAndActivateIntentTool,
|
|
38
|
+
activateIntentTool,
|
|
38
39
|
getIntentsForFileTool,
|
|
39
40
|
getIntentsForLinesTool,
|
|
40
|
-
assignBlocksToIntentTool,
|
|
41
41
|
listTeamIntentsTool,
|
|
42
42
|
getIntentChangesTool,
|
|
43
43
|
completeIntentTool,
|
package/build/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAC5G,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAChH,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AACxH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const inferHistorySchema: z.ZodObject<{
|
|
3
3
|
repoPath: z.ZodString;
|
|
4
|
-
commits: z.
|
|
5
|
-
tier: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
4
|
+
commits: z.ZodOptional<z.ZodNumber>;
|
|
6
5
|
contextIssues: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
6
|
model: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
8
7
|
maxStories: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -10,17 +9,15 @@ export declare const inferHistorySchema: z.ZodObject<{
|
|
|
10
9
|
estimateOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
11
10
|
}, "strip", z.ZodTypeAny, {
|
|
12
11
|
repoPath: string;
|
|
13
|
-
commits: number;
|
|
14
|
-
tier: number;
|
|
15
12
|
contextIssues: boolean;
|
|
16
13
|
model: string;
|
|
17
14
|
maxStories: number;
|
|
18
15
|
allowCommitSplitting: boolean;
|
|
19
16
|
estimateOnly: boolean;
|
|
17
|
+
commits?: number | undefined;
|
|
20
18
|
}, {
|
|
21
19
|
repoPath: string;
|
|
22
20
|
commits?: number | undefined;
|
|
23
|
-
tier?: number | undefined;
|
|
24
21
|
contextIssues?: boolean | undefined;
|
|
25
22
|
model?: string | undefined;
|
|
26
23
|
maxStories?: number | undefined;
|
|
@@ -28,6 +25,12 @@ export declare const inferHistorySchema: z.ZodObject<{
|
|
|
28
25
|
estimateOnly?: boolean | undefined;
|
|
29
26
|
}>;
|
|
30
27
|
export type InferHistoryInput = z.infer<typeof inferHistorySchema>;
|
|
28
|
+
export type AutoMode = 'first-run' | 'resume' | 'head-equals-last' | 'fallback-rewritten' | 'fallback-no-remote' | 'fallback-error';
|
|
29
|
+
export interface AutoModeResolution {
|
|
30
|
+
commits: number;
|
|
31
|
+
mode: AutoMode;
|
|
32
|
+
lastSha?: string;
|
|
33
|
+
}
|
|
31
34
|
export interface InferHistoryResponse {
|
|
32
35
|
started?: boolean;
|
|
33
36
|
estimate?: {
|
|
@@ -43,6 +46,7 @@ export interface InferHistoryResponse {
|
|
|
43
46
|
forge?: string;
|
|
44
47
|
forge_cli_available?: boolean;
|
|
45
48
|
commit_count?: number;
|
|
49
|
+
autoMode?: AutoModeResolution;
|
|
46
50
|
message: string;
|
|
47
51
|
}
|
|
48
52
|
export declare function inferHistory(input: InferHistoryInput): Promise<InferHistoryResponse>;
|
|
@@ -51,8 +55,7 @@ export declare const inferHistoryTool: {
|
|
|
51
55
|
description: string;
|
|
52
56
|
inputSchema: z.ZodObject<{
|
|
53
57
|
repoPath: z.ZodString;
|
|
54
|
-
commits: z.
|
|
55
|
-
tier: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
58
|
+
commits: z.ZodOptional<z.ZodNumber>;
|
|
56
59
|
contextIssues: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
57
60
|
model: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
58
61
|
maxStories: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -60,17 +63,15 @@ export declare const inferHistoryTool: {
|
|
|
60
63
|
estimateOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
61
64
|
}, "strip", z.ZodTypeAny, {
|
|
62
65
|
repoPath: string;
|
|
63
|
-
commits: number;
|
|
64
|
-
tier: number;
|
|
65
66
|
contextIssues: boolean;
|
|
66
67
|
model: string;
|
|
67
68
|
maxStories: number;
|
|
68
69
|
allowCommitSplitting: boolean;
|
|
69
70
|
estimateOnly: boolean;
|
|
71
|
+
commits?: number | undefined;
|
|
70
72
|
}, {
|
|
71
73
|
repoPath: string;
|
|
72
74
|
commits?: number | undefined;
|
|
73
|
-
tier?: number | undefined;
|
|
74
75
|
contextIssues?: boolean | undefined;
|
|
75
76
|
model?: string | undefined;
|
|
76
77
|
maxStories?: number | undefined;
|
|
@@ -2,56 +2,80 @@ import { z } from 'zod';
|
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
export const inferHistorySchema = z.object({
|
|
4
4
|
repoPath: z.string().describe('Local path to the repository root'),
|
|
5
|
-
commits: z.number().optional().
|
|
6
|
-
|
|
7
|
-
contextIssues: z.boolean().optional().default(false).describe('Include context issues from commit date range (Tier 4 only)'),
|
|
5
|
+
commits: z.number().optional().describe('Number of recent commits to analyze. If omitted, the server resumes from the last commit infer_history processed for this repo (or falls back to 50 on first run).'),
|
|
6
|
+
contextIssues: z.boolean().optional().default(false).describe('Include context issues from commit date range (requires gh/glab CLI)'),
|
|
8
7
|
model: z.string().optional().default('claude-sonnet-4-20250514').describe('Anthropic model to use (default: claude-sonnet-4-20250514)'),
|
|
9
8
|
maxStories: z.number().optional().default(0).describe('Maximum stories to analyze in Pass 2 (0 = unlimited)'),
|
|
10
9
|
allowCommitSplitting: z.boolean().optional().default(false).describe('Allow splitting a single commit into multiple stories when it contains unrelated changes (recommended for repos with messy commit history)'),
|
|
11
10
|
estimateOnly: z.boolean().optional().default(true).describe('If true (default), only estimate token cost without running the pipeline. Set to false to run the full pipeline.'),
|
|
12
11
|
});
|
|
12
|
+
function describeAutoMode(am) {
|
|
13
|
+
const sha = am.lastSha ? ` (last_inferred_sha=${am.lastSha.slice(0, 7)})` : '';
|
|
14
|
+
switch (am.mode) {
|
|
15
|
+
case 'first-run':
|
|
16
|
+
return `\nℹ Auto-mode: first run for this repo — analyzing fallback of ${am.commits} most recent commits.`;
|
|
17
|
+
case 'resume':
|
|
18
|
+
return `\nℹ Auto-mode: resumed${sha} — ${am.commits} commits since last run.`;
|
|
19
|
+
case 'head-equals-last':
|
|
20
|
+
return `\nℹ Auto-mode: HEAD already matches last_inferred_sha${sha} — nothing new to analyze.`;
|
|
21
|
+
case 'fallback-rewritten':
|
|
22
|
+
return `\n⚠ Auto-mode: stored last_inferred_sha${sha} is no longer reachable (rebase/GC/branch switch). Falling back to ${am.commits} most recent commits.`;
|
|
23
|
+
case 'fallback-no-remote':
|
|
24
|
+
return `\n⚠ Auto-mode: no git remote 'origin' — cannot key resume state. Falling back to ${am.commits} most recent commits.`;
|
|
25
|
+
case 'fallback-error':
|
|
26
|
+
return `\n⚠ Auto-mode: failed to resolve resume state (see Muninn logs). Falling back to ${am.commits} most recent commits.`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
13
29
|
export async function inferHistory(input) {
|
|
30
|
+
// Only forward `commits` when the caller explicitly provided one, so the
|
|
31
|
+
// server can fall back to last_inferred_sha tracking otherwise.
|
|
32
|
+
const inferencePayload = {
|
|
33
|
+
repoPath: input.repoPath,
|
|
34
|
+
contextIssues: input.contextIssues,
|
|
35
|
+
model: input.model,
|
|
36
|
+
};
|
|
37
|
+
if (input.commits !== undefined)
|
|
38
|
+
inferencePayload.commits = input.commits;
|
|
14
39
|
if (input.estimateOnly) {
|
|
15
|
-
const res = await request('inference', 'estimate',
|
|
16
|
-
repoPath: input.repoPath,
|
|
17
|
-
commits: input.commits,
|
|
18
|
-
tier: input.tier,
|
|
19
|
-
contextIssues: input.contextIssues,
|
|
20
|
-
model: input.model,
|
|
21
|
-
});
|
|
40
|
+
const res = await request('inference', 'estimate', inferencePayload);
|
|
22
41
|
let forgeWarning = '';
|
|
23
|
-
if (
|
|
42
|
+
if (!res.forge_cli_available) {
|
|
24
43
|
const forge = res.forge ?? 'Unknown';
|
|
25
44
|
if (forge === 'Unknown') {
|
|
26
|
-
forgeWarning = '\n⚠ Unrecognized git hosting platform.
|
|
45
|
+
forgeWarning = '\n⚠ Unrecognized git hosting platform. PR/MR descriptions and issue discussions will be skipped.';
|
|
27
46
|
}
|
|
28
47
|
else if (forge === 'GitHub') {
|
|
29
|
-
forgeWarning = '\n⚠ GitHub CLI (gh) not found or not authenticated.
|
|
48
|
+
forgeWarning = '\n⚠ GitHub CLI (gh) not found or not authenticated. PR descriptions and issue discussions will be skipped. Run `gh auth login` to include them.';
|
|
30
49
|
}
|
|
31
50
|
else if (forge === 'GitLab') {
|
|
32
|
-
forgeWarning = '\n⚠ GitLab CLI (glab) not found or not authenticated.
|
|
51
|
+
forgeWarning = '\n⚠ GitLab CLI (glab) not found or not authenticated. MR descriptions and issue discussions will be skipped. Run `glab auth login` to include them.';
|
|
33
52
|
}
|
|
34
53
|
}
|
|
54
|
+
const autoModeNote = res.autoMode ? describeAutoMode(res.autoMode) : '';
|
|
35
55
|
return {
|
|
36
56
|
estimate: res.estimate,
|
|
37
57
|
forge: res.forge,
|
|
38
58
|
forge_cli_available: res.forge_cli_available,
|
|
39
59
|
commit_count: res.commit_count,
|
|
40
|
-
|
|
60
|
+
autoMode: res.autoMode,
|
|
61
|
+
message: `Estimated cost: $${res.estimate?.cost_usd ?? '?'} for ~${res.estimate?.est_stories ?? '?'} stories from ${res.commit_count ?? '?'} commits${autoModeNote}${forgeWarning}`
|
|
41
62
|
};
|
|
42
63
|
}
|
|
43
|
-
const
|
|
64
|
+
const runPayload = {
|
|
44
65
|
repoPath: input.repoPath,
|
|
45
|
-
commits: input.commits,
|
|
46
|
-
tier: input.tier,
|
|
47
66
|
contextIssues: input.contextIssues,
|
|
48
67
|
model: input.model,
|
|
49
68
|
maxStories: input.maxStories,
|
|
50
69
|
allowCommitSplitting: input.allowCommitSplitting,
|
|
51
|
-
}
|
|
70
|
+
};
|
|
71
|
+
if (input.commits !== undefined)
|
|
72
|
+
runPayload.commits = input.commits;
|
|
73
|
+
const res = await request('inference', 'run', runPayload);
|
|
74
|
+
const autoModeNote = res.autoMode ? describeAutoMode(res.autoMode) : '';
|
|
52
75
|
return {
|
|
53
76
|
started: res.started,
|
|
54
|
-
|
|
77
|
+
autoMode: res.autoMode,
|
|
78
|
+
message: (res.message || 'Inference pipeline started. Progress updates will be sent as the pipeline runs.') + autoModeNote
|
|
55
79
|
};
|
|
56
80
|
}
|
|
57
81
|
export const inferHistoryTool = {
|
|
@@ -69,12 +93,7 @@ Use \`estimateOnly: true\` first to preview token cost before running the full p
|
|
|
69
93
|
|
|
70
94
|
The pipeline supports checkpointing — if interrupted, re-running resumes from where it left off.
|
|
71
95
|
|
|
72
|
-
|
|
73
|
-
- Tier 1: Git log only (fastest, cheapest)
|
|
74
|
-
- Tier 2: + PR/MR descriptions and review comments (requires forge CLI: gh or glab)
|
|
75
|
-
- Tier 3: + Diffs for revert commits
|
|
76
|
-
- Tier 4: + Issue discussions with decision-level content (requires forge CLI)
|
|
77
|
-
- Tier 5: + Full diffs and code annotation extraction (most expensive)
|
|
96
|
+
Extraction includes: git log, file diffs, code annotations, revert detection, and optionally PR/MR descriptions + issue discussions (requires gh or glab CLI, auto-skipped if unavailable).
|
|
78
97
|
|
|
79
98
|
Supports GitHub (gh CLI) and GitLab (glab CLI). Forge is auto-detected from the remote origin.`,
|
|
80
99
|
inputSchema: inferHistorySchema,
|