@kawacode/mcp 5.2.2 → 6.0.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 +1 -1
- package/README.md +54 -198
- package/build/index.js +10 -1
- package/build/index.js.map +1 -1
- package/build/kawacode-on-pre-edit.d.ts +27 -0
- package/build/kawacode-on-pre-edit.js +205 -0
- package/build/kawacode-on-pre-edit.js.map +1 -0
- package/build/kawacode-on-stop.d.ts +29 -0
- package/build/kawacode-on-stop.js +84 -0
- package/build/kawacode-on-stop.js.map +1 -0
- package/build/prompts/intent-first-workflow.js +2 -2
- package/build/tools/_fork-fields.d.ts +84 -0
- package/build/tools/_fork-fields.js +65 -0
- package/build/tools/_fork-fields.js.map +1 -0
- package/build/tools/activate-intent.d.ts +66 -0
- package/build/tools/activate-intent.js +59 -3
- package/build/tools/activate-intent.js.map +1 -1
- package/build/tools/check-active-intent.d.ts +64 -0
- package/build/tools/check-active-intent.js +16 -2
- package/build/tools/check-active-intent.js.map +1 -1
- package/build/tools/complete-intent.d.ts +115 -4
- package/build/tools/complete-intent.js +130 -11
- package/build/tools/complete-intent.js.map +1 -1
- package/build/tools/create-intent.d.ts +73 -1
- package/build/tools/create-intent.js +105 -7
- package/build/tools/create-intent.js.map +1 -1
- package/build/tools/detect-intent-conflicts.d.ts +52 -0
- package/build/tools/detect-intent-conflicts.js +14 -10
- package/build/tools/detect-intent-conflicts.js.map +1 -1
- package/build/tools/edit-session-decision.d.ts +64 -12
- package/build/tools/edit-session-decision.js +4 -1
- package/build/tools/edit-session-decision.js.map +1 -1
- package/build/tools/evolve-decisions.d.ts +52 -0
- package/build/tools/evolve-decisions.js +14 -15
- package/build/tools/evolve-decisions.js.map +1 -1
- package/build/tools/get-intent-changes.d.ts +52 -0
- package/build/tools/get-intent-changes.js +4 -1
- package/build/tools/get-intent-changes.js.map +1 -1
- package/build/tools/get-intents-for-file.d.ts +52 -0
- package/build/tools/get-intents-for-file.js +4 -1
- package/build/tools/get-intents-for-file.js.map +1 -1
- package/build/tools/get-intents-for-lines.d.ts +52 -0
- package/build/tools/get-intents-for-lines.js +4 -1
- package/build/tools/get-intents-for-lines.js.map +1 -1
- package/build/tools/get-project-decisions.d.ts +52 -0
- package/build/tools/get-project-decisions.js +4 -1
- package/build/tools/get-project-decisions.js.map +1 -1
- package/build/tools/get-relevant-context.d.ts +52 -0
- package/build/tools/get-relevant-context.js +18 -24
- package/build/tools/get-relevant-context.js.map +1 -1
- package/build/tools/get-session-decisions.d.ts +52 -0
- package/build/tools/get-session-decisions.js +4 -1
- package/build/tools/get-session-decisions.js.map +1 -1
- package/build/tools/index.d.ts +620 -18
- package/build/tools/index.js +12 -3
- package/build/tools/index.js.map +1 -1
- package/build/tools/infer-history.d.ts +6 -0
- package/build/tools/infer-history.js +28 -15
- package/build/tools/infer-history.js.map +1 -1
- package/build/tools/list-team-intents.d.ts +58 -6
- package/build/tools/list-team-intents.js +5 -2
- package/build/tools/list-team-intents.js.map +1 -1
- package/build/tools/log-work.d.ts +52 -0
- package/build/tools/log-work.js +4 -1
- package/build/tools/log-work.js.map +1 -1
- package/build/tools/pre-edit-acknowledge.d.ts +92 -0
- package/build/tools/pre-edit-acknowledge.js +48 -0
- package/build/tools/pre-edit-acknowledge.js.map +1 -0
- package/build/tools/pre-edit-decision-check.d.ts +141 -0
- package/build/tools/pre-edit-decision-check.js +77 -0
- package/build/tools/pre-edit-decision-check.js.map +1 -0
- package/build/tools/record-decision.d.ts +88 -12
- package/build/tools/record-decision.js +15 -1
- package/build/tools/record-decision.js.map +1 -1
- package/build/tools/update-intent.d.ts +60 -8
- package/build/tools/update-intent.js +6 -1
- package/build/tools/update-intent.js.map +1 -1
- package/package.json +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-intent.js","sourceRoot":"","sources":["../../src/tools/create-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACv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AC,MAAM,2BAA2B,GAAG;IACzC,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAgCyC;IACtD,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,uBAAuB;CACjC,CAAA"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const detectIntentConflictsSchema: z.ZodObject<{
|
|
3
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
4
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
5
|
+
user: z.ZodString;
|
|
6
|
+
forkOrigin: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
platform: "github" | "gitlab";
|
|
9
|
+
user: string;
|
|
10
|
+
forkOrigin: string;
|
|
11
|
+
}, {
|
|
12
|
+
platform: "github" | "gitlab";
|
|
13
|
+
user: string;
|
|
14
|
+
forkOrigin: string;
|
|
15
|
+
}>>;
|
|
16
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
3
17
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
4
18
|
repoPath: z.ZodString;
|
|
5
19
|
intentId: z.ZodString;
|
|
@@ -8,11 +22,23 @@ export declare const detectIntentConflictsSchema: z.ZodObject<{
|
|
|
8
22
|
repoPath: string;
|
|
9
23
|
intentId: string;
|
|
10
24
|
repoOrigin?: string | undefined;
|
|
25
|
+
forkAuthor?: {
|
|
26
|
+
platform: "github" | "gitlab";
|
|
27
|
+
user: string;
|
|
28
|
+
forkOrigin: string;
|
|
29
|
+
} | undefined;
|
|
30
|
+
workspaceId?: string | undefined;
|
|
11
31
|
minScore?: number | undefined;
|
|
12
32
|
}, {
|
|
13
33
|
repoPath: string;
|
|
14
34
|
intentId: string;
|
|
15
35
|
repoOrigin?: string | undefined;
|
|
36
|
+
forkAuthor?: {
|
|
37
|
+
platform: "github" | "gitlab";
|
|
38
|
+
user: string;
|
|
39
|
+
forkOrigin: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
workspaceId?: string | undefined;
|
|
16
42
|
minScore?: number | undefined;
|
|
17
43
|
}>;
|
|
18
44
|
export type DetectIntentConflictsInput = z.infer<typeof detectIntentConflictsSchema>;
|
|
@@ -42,6 +68,20 @@ export declare const detectIntentConflictsTool: {
|
|
|
42
68
|
name: string;
|
|
43
69
|
description: string;
|
|
44
70
|
inputSchema: z.ZodObject<{
|
|
71
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
73
|
+
user: z.ZodString;
|
|
74
|
+
forkOrigin: z.ZodString;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
platform: "github" | "gitlab";
|
|
77
|
+
user: string;
|
|
78
|
+
forkOrigin: string;
|
|
79
|
+
}, {
|
|
80
|
+
platform: "github" | "gitlab";
|
|
81
|
+
user: string;
|
|
82
|
+
forkOrigin: string;
|
|
83
|
+
}>>;
|
|
84
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
45
85
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
46
86
|
repoPath: z.ZodString;
|
|
47
87
|
intentId: z.ZodString;
|
|
@@ -50,11 +90,23 @@ export declare const detectIntentConflictsTool: {
|
|
|
50
90
|
repoPath: string;
|
|
51
91
|
intentId: string;
|
|
52
92
|
repoOrigin?: string | undefined;
|
|
93
|
+
forkAuthor?: {
|
|
94
|
+
platform: "github" | "gitlab";
|
|
95
|
+
user: string;
|
|
96
|
+
forkOrigin: string;
|
|
97
|
+
} | undefined;
|
|
98
|
+
workspaceId?: string | undefined;
|
|
53
99
|
minScore?: number | undefined;
|
|
54
100
|
}, {
|
|
55
101
|
repoPath: string;
|
|
56
102
|
intentId: string;
|
|
57
103
|
repoOrigin?: string | undefined;
|
|
104
|
+
forkAuthor?: {
|
|
105
|
+
platform: "github" | "gitlab";
|
|
106
|
+
user: string;
|
|
107
|
+
forkOrigin: string;
|
|
108
|
+
} | undefined;
|
|
109
|
+
workspaceId?: string | undefined;
|
|
58
110
|
minScore?: number | undefined;
|
|
59
111
|
}>;
|
|
60
112
|
handler: typeof detectIntentConflicts;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
|
+
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
4
5
|
export const detectIntentConflictsSchema = z.object({
|
|
5
6
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
6
7
|
repoPath: z.string().describe('Local path to the repository root'),
|
|
7
8
|
intentId: z.string().describe('The active intent ID'),
|
|
8
9
|
minScore: z.number().optional().describe('Minimum similarity score threshold (default: 0.5)'),
|
|
10
|
+
...forkFieldsExtensions,
|
|
9
11
|
});
|
|
10
12
|
export async function detectIntentConflicts(input) {
|
|
11
13
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
@@ -13,6 +15,7 @@ export async function detectIntentConflicts(input) {
|
|
|
13
15
|
repoOrigin: actualOrigin,
|
|
14
16
|
intentId: input.intentId,
|
|
15
17
|
minScore: input.minScore,
|
|
18
|
+
...extractForkFields(input),
|
|
16
19
|
});
|
|
17
20
|
if (res.error) {
|
|
18
21
|
return {
|
|
@@ -45,21 +48,22 @@ export async function detectIntentConflicts(input) {
|
|
|
45
48
|
}
|
|
46
49
|
export const detectIntentConflictsTool = {
|
|
47
50
|
name: 'detect_intent_conflicts',
|
|
48
|
-
description: `
|
|
51
|
+
description: `Find intents from other team members that potentially conflict with the active intent.
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
When to use:
|
|
54
|
+
- Before committing, to surface overlapping team work so the user can coordinate before merging.
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
Inputs of note:
|
|
57
|
+
- \`intentId\`: the active intent to check against.
|
|
58
|
+
- \`minScore\` (optional): minimum match score to include in results.
|
|
54
59
|
|
|
55
60
|
Returns scored conflict candidates with:
|
|
56
|
-
- score
|
|
57
|
-
- overlappingFiles
|
|
58
|
-
- decisions
|
|
59
|
-
- author
|
|
61
|
+
- \`score\`: how strongly the candidate matches (higher = more likely conflict).
|
|
62
|
+
- \`overlappingFiles\`: files affected by both intents.
|
|
63
|
+
- \`decisions\`: decisions attached to the conflicting intent.
|
|
64
|
+
- \`author\`: who is working on the conflicting intent.
|
|
60
65
|
|
|
61
|
-
The
|
|
62
|
-
to determine if coordination is needed.`,
|
|
66
|
+
The list is informational — review candidates and their decisions to decide whether coordination is needed.`,
|
|
63
67
|
inputSchema: detectIntentConflictsSchema,
|
|
64
68
|
handler: detectIntentConflicts
|
|
65
69
|
};
|
|
@@ -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;
|
|
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;AACnD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE3E,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ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K,IAAI,CAAC;QACnB,gBAAgB,EAAE,CAAC,CAAC,gBAAgB,IAAI,EAAE;QAC1C,SAAS,EAAE,CAAC,CAAC,CAAC,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;;;;;;;;;;;;;;;4GAe6F;IAC1G,WAAW,EAAE,2BAA2B;IACxC,OAAO,EAAE,qBAAqB;CAC/B,CAAA"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
3
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
4
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
5
|
+
user: z.ZodString;
|
|
6
|
+
forkOrigin: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
platform: "github" | "gitlab";
|
|
9
|
+
user: string;
|
|
10
|
+
forkOrigin: string;
|
|
11
|
+
}, {
|
|
12
|
+
platform: "github" | "gitlab";
|
|
13
|
+
user: string;
|
|
14
|
+
forkOrigin: string;
|
|
15
|
+
}>>;
|
|
16
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
3
17
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
4
18
|
repoPath: z.ZodString;
|
|
5
19
|
intentId: z.ZodString;
|
|
@@ -18,13 +32,13 @@ export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
|
18
32
|
constraint: z.ZodString;
|
|
19
33
|
reason: z.ZodString;
|
|
20
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
reason: string;
|
|
21
36
|
alternative: string;
|
|
22
37
|
constraint: string;
|
|
23
|
-
reason: string;
|
|
24
38
|
}, {
|
|
39
|
+
reason: string;
|
|
25
40
|
alternative: string;
|
|
26
41
|
constraint: string;
|
|
27
|
-
reason: string;
|
|
28
42
|
}>, "many">>;
|
|
29
43
|
}, "strip", z.ZodTypeAny, {
|
|
30
44
|
context?: string | undefined;
|
|
@@ -35,9 +49,9 @@ export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
|
35
49
|
relatedFiles?: string[] | undefined;
|
|
36
50
|
constraintsChecked?: string[] | undefined;
|
|
37
51
|
constraintViolations?: {
|
|
52
|
+
reason: string;
|
|
38
53
|
alternative: string;
|
|
39
54
|
constraint: string;
|
|
40
|
-
reason: string;
|
|
41
55
|
}[] | undefined;
|
|
42
56
|
}, {
|
|
43
57
|
context?: string | undefined;
|
|
@@ -48,9 +62,9 @@ export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
|
48
62
|
relatedFiles?: string[] | undefined;
|
|
49
63
|
constraintsChecked?: string[] | undefined;
|
|
50
64
|
constraintViolations?: {
|
|
65
|
+
reason: string;
|
|
51
66
|
alternative: string;
|
|
52
67
|
constraint: string;
|
|
53
|
-
reason: string;
|
|
54
68
|
}[] | undefined;
|
|
55
69
|
}>>;
|
|
56
70
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -59,6 +73,12 @@ export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
|
59
73
|
action: "update" | "delete";
|
|
60
74
|
decisionId: string;
|
|
61
75
|
repoOrigin?: string | undefined;
|
|
76
|
+
forkAuthor?: {
|
|
77
|
+
platform: "github" | "gitlab";
|
|
78
|
+
user: string;
|
|
79
|
+
forkOrigin: string;
|
|
80
|
+
} | undefined;
|
|
81
|
+
workspaceId?: string | undefined;
|
|
62
82
|
updates?: {
|
|
63
83
|
context?: string | undefined;
|
|
64
84
|
summary?: string | undefined;
|
|
@@ -68,9 +88,9 @@ export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
|
68
88
|
relatedFiles?: string[] | undefined;
|
|
69
89
|
constraintsChecked?: string[] | undefined;
|
|
70
90
|
constraintViolations?: {
|
|
91
|
+
reason: string;
|
|
71
92
|
alternative: string;
|
|
72
93
|
constraint: string;
|
|
73
|
-
reason: string;
|
|
74
94
|
}[] | undefined;
|
|
75
95
|
} | undefined;
|
|
76
96
|
}, {
|
|
@@ -79,6 +99,12 @@ export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
|
79
99
|
action: "update" | "delete";
|
|
80
100
|
decisionId: string;
|
|
81
101
|
repoOrigin?: string | undefined;
|
|
102
|
+
forkAuthor?: {
|
|
103
|
+
platform: "github" | "gitlab";
|
|
104
|
+
user: string;
|
|
105
|
+
forkOrigin: string;
|
|
106
|
+
} | undefined;
|
|
107
|
+
workspaceId?: string | undefined;
|
|
82
108
|
updates?: {
|
|
83
109
|
context?: string | undefined;
|
|
84
110
|
summary?: string | undefined;
|
|
@@ -88,9 +114,9 @@ export declare const editSessionDecisionSchema: z.ZodObject<{
|
|
|
88
114
|
relatedFiles?: string[] | undefined;
|
|
89
115
|
constraintsChecked?: string[] | undefined;
|
|
90
116
|
constraintViolations?: {
|
|
117
|
+
reason: string;
|
|
91
118
|
alternative: string;
|
|
92
119
|
constraint: string;
|
|
93
|
-
reason: string;
|
|
94
120
|
}[] | undefined;
|
|
95
121
|
} | undefined;
|
|
96
122
|
}>;
|
|
@@ -103,6 +129,20 @@ export declare const editSessionDecisionTool: {
|
|
|
103
129
|
name: string;
|
|
104
130
|
description: string;
|
|
105
131
|
inputSchema: z.ZodObject<{
|
|
132
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
133
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
134
|
+
user: z.ZodString;
|
|
135
|
+
forkOrigin: z.ZodString;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
platform: "github" | "gitlab";
|
|
138
|
+
user: string;
|
|
139
|
+
forkOrigin: string;
|
|
140
|
+
}, {
|
|
141
|
+
platform: "github" | "gitlab";
|
|
142
|
+
user: string;
|
|
143
|
+
forkOrigin: string;
|
|
144
|
+
}>>;
|
|
145
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
106
146
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
107
147
|
repoPath: z.ZodString;
|
|
108
148
|
intentId: z.ZodString;
|
|
@@ -121,13 +161,13 @@ export declare const editSessionDecisionTool: {
|
|
|
121
161
|
constraint: z.ZodString;
|
|
122
162
|
reason: z.ZodString;
|
|
123
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
|
+
reason: string;
|
|
124
165
|
alternative: string;
|
|
125
166
|
constraint: string;
|
|
126
|
-
reason: string;
|
|
127
167
|
}, {
|
|
168
|
+
reason: string;
|
|
128
169
|
alternative: string;
|
|
129
170
|
constraint: string;
|
|
130
|
-
reason: string;
|
|
131
171
|
}>, "many">>;
|
|
132
172
|
}, "strip", z.ZodTypeAny, {
|
|
133
173
|
context?: string | undefined;
|
|
@@ -138,9 +178,9 @@ export declare const editSessionDecisionTool: {
|
|
|
138
178
|
relatedFiles?: string[] | undefined;
|
|
139
179
|
constraintsChecked?: string[] | undefined;
|
|
140
180
|
constraintViolations?: {
|
|
181
|
+
reason: string;
|
|
141
182
|
alternative: string;
|
|
142
183
|
constraint: string;
|
|
143
|
-
reason: string;
|
|
144
184
|
}[] | undefined;
|
|
145
185
|
}, {
|
|
146
186
|
context?: string | undefined;
|
|
@@ -151,9 +191,9 @@ export declare const editSessionDecisionTool: {
|
|
|
151
191
|
relatedFiles?: string[] | undefined;
|
|
152
192
|
constraintsChecked?: string[] | undefined;
|
|
153
193
|
constraintViolations?: {
|
|
194
|
+
reason: string;
|
|
154
195
|
alternative: string;
|
|
155
196
|
constraint: string;
|
|
156
|
-
reason: string;
|
|
157
197
|
}[] | undefined;
|
|
158
198
|
}>>;
|
|
159
199
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -162,6 +202,12 @@ export declare const editSessionDecisionTool: {
|
|
|
162
202
|
action: "update" | "delete";
|
|
163
203
|
decisionId: string;
|
|
164
204
|
repoOrigin?: string | undefined;
|
|
205
|
+
forkAuthor?: {
|
|
206
|
+
platform: "github" | "gitlab";
|
|
207
|
+
user: string;
|
|
208
|
+
forkOrigin: string;
|
|
209
|
+
} | undefined;
|
|
210
|
+
workspaceId?: string | undefined;
|
|
165
211
|
updates?: {
|
|
166
212
|
context?: string | undefined;
|
|
167
213
|
summary?: string | undefined;
|
|
@@ -171,9 +217,9 @@ export declare const editSessionDecisionTool: {
|
|
|
171
217
|
relatedFiles?: string[] | undefined;
|
|
172
218
|
constraintsChecked?: string[] | undefined;
|
|
173
219
|
constraintViolations?: {
|
|
220
|
+
reason: string;
|
|
174
221
|
alternative: string;
|
|
175
222
|
constraint: string;
|
|
176
|
-
reason: string;
|
|
177
223
|
}[] | undefined;
|
|
178
224
|
} | undefined;
|
|
179
225
|
}, {
|
|
@@ -182,6 +228,12 @@ export declare const editSessionDecisionTool: {
|
|
|
182
228
|
action: "update" | "delete";
|
|
183
229
|
decisionId: string;
|
|
184
230
|
repoOrigin?: string | undefined;
|
|
231
|
+
forkAuthor?: {
|
|
232
|
+
platform: "github" | "gitlab";
|
|
233
|
+
user: string;
|
|
234
|
+
forkOrigin: string;
|
|
235
|
+
} | undefined;
|
|
236
|
+
workspaceId?: string | undefined;
|
|
185
237
|
updates?: {
|
|
186
238
|
context?: string | undefined;
|
|
187
239
|
summary?: string | undefined;
|
|
@@ -191,9 +243,9 @@ export declare const editSessionDecisionTool: {
|
|
|
191
243
|
relatedFiles?: string[] | undefined;
|
|
192
244
|
constraintsChecked?: string[] | undefined;
|
|
193
245
|
constraintViolations?: {
|
|
246
|
+
reason: string;
|
|
194
247
|
alternative: string;
|
|
195
248
|
constraint: string;
|
|
196
|
-
reason: string;
|
|
197
249
|
}[] | undefined;
|
|
198
250
|
} | undefined;
|
|
199
251
|
}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
|
+
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
4
5
|
const constraintViolationSchema = z.object({
|
|
5
6
|
alternative: z.string(),
|
|
6
7
|
constraint: z.string(),
|
|
@@ -22,7 +23,8 @@ export const editSessionDecisionSchema = z.object({
|
|
|
22
23
|
intentId: z.string().describe('The intent ID the decision belongs to'),
|
|
23
24
|
decisionId: z.string().describe('The decision ID to edit or delete'),
|
|
24
25
|
action: z.enum(['update', 'delete']).describe('Action to perform: update modifies the decision, delete removes it'),
|
|
25
|
-
updates: decisionUpdatesSchema.optional().describe('Partial fields to update (only for action=update)')
|
|
26
|
+
updates: decisionUpdatesSchema.optional().describe('Partial fields to update (only for action=update)'),
|
|
27
|
+
...forkFieldsExtensions,
|
|
26
28
|
});
|
|
27
29
|
export async function editSessionDecision(input) {
|
|
28
30
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
@@ -32,6 +34,7 @@ export async function editSessionDecision(input) {
|
|
|
32
34
|
decisionId: input.decisionId,
|
|
33
35
|
action: input.action,
|
|
34
36
|
updates: input.updates,
|
|
37
|
+
...extractForkFields(input),
|
|
35
38
|
});
|
|
36
39
|
return { success: res.success !== false };
|
|
37
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-session-decision.js","sourceRoot":"","sources":["../../src/tools/edit-session-decision.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;
|
|
1
|
+
{"version":3,"file":"edit-session-decision.js","sourceRoot":"","sources":["../../src/tools/edit-session-decision.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;AACnD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE3E,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAA;AAEF,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAA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KAAK,EAAE,CAAA;AAC3C,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE;;;;;;0EAM2D;IACxE,WAAW,EAAE,yBAAyB;IACtC,OAAO,EAAE,mBAAmB;CAC7B,CAAA"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const evolveDecisionsSchema: z.ZodObject<{
|
|
3
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
4
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
5
|
+
user: z.ZodString;
|
|
6
|
+
forkOrigin: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
platform: "github" | "gitlab";
|
|
9
|
+
user: string;
|
|
10
|
+
forkOrigin: string;
|
|
11
|
+
}, {
|
|
12
|
+
platform: "github" | "gitlab";
|
|
13
|
+
user: string;
|
|
14
|
+
forkOrigin: string;
|
|
15
|
+
}>>;
|
|
16
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
3
17
|
stories: z.ZodArray<z.ZodAny, "many">;
|
|
4
18
|
model: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
5
19
|
repoPath: z.ZodOptional<z.ZodString>;
|
|
@@ -9,10 +23,22 @@ export declare const evolveDecisionsSchema: z.ZodObject<{
|
|
|
9
23
|
stories: any[];
|
|
10
24
|
repoOrigin?: string | undefined;
|
|
11
25
|
repoPath?: string | undefined;
|
|
26
|
+
forkAuthor?: {
|
|
27
|
+
platform: "github" | "gitlab";
|
|
28
|
+
user: string;
|
|
29
|
+
forkOrigin: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
workspaceId?: string | undefined;
|
|
12
32
|
}, {
|
|
13
33
|
stories: any[];
|
|
14
34
|
repoOrigin?: string | undefined;
|
|
15
35
|
repoPath?: string | undefined;
|
|
36
|
+
forkAuthor?: {
|
|
37
|
+
platform: "github" | "gitlab";
|
|
38
|
+
user: string;
|
|
39
|
+
forkOrigin: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
workspaceId?: string | undefined;
|
|
16
42
|
model?: string | undefined;
|
|
17
43
|
}>;
|
|
18
44
|
export type EvolveDecisionsInput = z.infer<typeof evolveDecisionsSchema>;
|
|
@@ -25,6 +51,20 @@ export declare const evolveDecisionsTool: {
|
|
|
25
51
|
name: string;
|
|
26
52
|
description: string;
|
|
27
53
|
inputSchema: z.ZodObject<{
|
|
54
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
56
|
+
user: z.ZodString;
|
|
57
|
+
forkOrigin: z.ZodString;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
platform: "github" | "gitlab";
|
|
60
|
+
user: string;
|
|
61
|
+
forkOrigin: string;
|
|
62
|
+
}, {
|
|
63
|
+
platform: "github" | "gitlab";
|
|
64
|
+
user: string;
|
|
65
|
+
forkOrigin: string;
|
|
66
|
+
}>>;
|
|
67
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
28
68
|
stories: z.ZodArray<z.ZodAny, "many">;
|
|
29
69
|
model: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
30
70
|
repoPath: z.ZodOptional<z.ZodString>;
|
|
@@ -34,10 +74,22 @@ export declare const evolveDecisionsTool: {
|
|
|
34
74
|
stories: any[];
|
|
35
75
|
repoOrigin?: string | undefined;
|
|
36
76
|
repoPath?: string | undefined;
|
|
77
|
+
forkAuthor?: {
|
|
78
|
+
platform: "github" | "gitlab";
|
|
79
|
+
user: string;
|
|
80
|
+
forkOrigin: string;
|
|
81
|
+
} | undefined;
|
|
82
|
+
workspaceId?: string | undefined;
|
|
37
83
|
}, {
|
|
38
84
|
stories: any[];
|
|
39
85
|
repoOrigin?: string | undefined;
|
|
40
86
|
repoPath?: string | undefined;
|
|
87
|
+
forkAuthor?: {
|
|
88
|
+
platform: "github" | "gitlab";
|
|
89
|
+
user: string;
|
|
90
|
+
forkOrigin: string;
|
|
91
|
+
} | undefined;
|
|
92
|
+
workspaceId?: string | undefined;
|
|
41
93
|
model?: string | undefined;
|
|
42
94
|
}>;
|
|
43
95
|
handler: typeof evolveDecisions;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
|
+
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
3
4
|
export const evolveDecisionsSchema = z.object({
|
|
4
5
|
stories: z.array(z.any()).describe('Array of story objects from a previous infer_history run'),
|
|
5
|
-
model: z.string().optional().default('claude-haiku-4-5-20251001').describe('Anthropic model for
|
|
6
|
+
model: z.string().optional().default('claude-haiku-4-5-20251001').describe('Anthropic model used for the curation pass (default: claude-haiku-4-5-20251001).'),
|
|
6
7
|
repoPath: z.string().optional().describe('Local path to the repository root (required for auto-persist after evolution)'),
|
|
7
8
|
repoOrigin: z.string().optional().describe('Git remote origin URL (auto-detected from repoPath if not provided)'),
|
|
9
|
+
...forkFieldsExtensions,
|
|
8
10
|
});
|
|
9
11
|
export async function evolveDecisions(input) {
|
|
10
12
|
const res = await request('inference', 'evolve', {
|
|
@@ -12,6 +14,7 @@ export async function evolveDecisions(input) {
|
|
|
12
14
|
model: input.model,
|
|
13
15
|
repoPath: input.repoPath,
|
|
14
16
|
repoOrigin: input.repoOrigin,
|
|
17
|
+
...extractForkFields(input),
|
|
15
18
|
});
|
|
16
19
|
return {
|
|
17
20
|
started: res.started,
|
|
@@ -20,23 +23,19 @@ export async function evolveDecisions(input) {
|
|
|
20
23
|
}
|
|
21
24
|
export const evolveDecisionsTool = {
|
|
22
25
|
name: 'evolve_decisions',
|
|
23
|
-
description: `
|
|
26
|
+
description: `Curate a set of previously extracted stories so that only the decisions still worth keeping are persisted.
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- supersedes: Later decision replaces earlier (earlier is outdated)
|
|
29
|
-
- reinforces: Later decision confirms earlier still holds
|
|
30
|
-
- contradicts: Later decision reverses earlier
|
|
31
|
-
- specializes: Later decision adds specificity (both remain valid)
|
|
32
|
-
3. **Annotation**: Labels each decision as stable, orphan, evolved, or abandoned
|
|
33
|
-
4. **Curation**: Keeps stable + orphan decisions, drops evolved + abandoned
|
|
28
|
+
When to use:
|
|
29
|
+
- After running \`infer_history\` in story-only mode (rare — \`infer_history\` already chains this step automatically).
|
|
30
|
+
- When you have a pre-existing set of stories you want to re-curate without re-running history extraction.
|
|
34
31
|
|
|
35
|
-
|
|
32
|
+
Inputs:
|
|
33
|
+
- \`stories\`: array of story objects from a previous \`infer_history\` run.
|
|
34
|
+
- \`repoPath\` (optional): when provided, curated results are persisted as intents and decisions for the repo after curation finishes.
|
|
35
|
+
- \`model\` (optional): Anthropic model used for the curation pass.
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
The pipeline runs asynchronously — returns immediately. Uses a cheaper model (haiku) by default since edge classification requires less reasoning than story analysis.`,
|
|
37
|
+
Behavior:
|
|
38
|
+
- Runs asynchronously — returns immediately with a started/pending status while progress is reported separately.`,
|
|
40
39
|
inputSchema: evolveDecisionsSchema,
|
|
41
40
|
handler: evolveDecisions
|
|
42
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evolve-decisions.js","sourceRoot":"","sources":["../../src/tools/evolve-decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"evolve-decisions.js","sourceRoot":"","sources":["../../src/tools/evolve-decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAA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
|
import { z } from 'zod';
|
|
2
2
|
export declare const getIntentChangesSchema: z.ZodObject<{
|
|
3
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
4
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
5
|
+
user: z.ZodString;
|
|
6
|
+
forkOrigin: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
platform: "github" | "gitlab";
|
|
9
|
+
user: string;
|
|
10
|
+
forkOrigin: string;
|
|
11
|
+
}, {
|
|
12
|
+
platform: "github" | "gitlab";
|
|
13
|
+
user: string;
|
|
14
|
+
forkOrigin: string;
|
|
15
|
+
}>>;
|
|
16
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
3
17
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
4
18
|
repoPath: z.ZodString;
|
|
5
19
|
}, "strip", z.ZodTypeAny, {
|
|
6
20
|
repoPath: string;
|
|
7
21
|
repoOrigin?: string | undefined;
|
|
22
|
+
forkAuthor?: {
|
|
23
|
+
platform: "github" | "gitlab";
|
|
24
|
+
user: string;
|
|
25
|
+
forkOrigin: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
workspaceId?: string | undefined;
|
|
8
28
|
}, {
|
|
9
29
|
repoPath: string;
|
|
10
30
|
repoOrigin?: string | undefined;
|
|
31
|
+
forkAuthor?: {
|
|
32
|
+
platform: "github" | "gitlab";
|
|
33
|
+
user: string;
|
|
34
|
+
forkOrigin: string;
|
|
35
|
+
} | undefined;
|
|
36
|
+
workspaceId?: string | undefined;
|
|
11
37
|
}>;
|
|
12
38
|
export type GetIntentChangesInput = z.infer<typeof getIntentChangesSchema>;
|
|
13
39
|
export interface FileChange {
|
|
@@ -36,14 +62,40 @@ export declare const getIntentChangesTool: {
|
|
|
36
62
|
name: string;
|
|
37
63
|
description: string;
|
|
38
64
|
inputSchema: z.ZodObject<{
|
|
65
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
66
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
67
|
+
user: z.ZodString;
|
|
68
|
+
forkOrigin: z.ZodString;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
platform: "github" | "gitlab";
|
|
71
|
+
user: string;
|
|
72
|
+
forkOrigin: string;
|
|
73
|
+
}, {
|
|
74
|
+
platform: "github" | "gitlab";
|
|
75
|
+
user: string;
|
|
76
|
+
forkOrigin: string;
|
|
77
|
+
}>>;
|
|
78
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
39
79
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
40
80
|
repoPath: z.ZodString;
|
|
41
81
|
}, "strip", z.ZodTypeAny, {
|
|
42
82
|
repoPath: string;
|
|
43
83
|
repoOrigin?: string | undefined;
|
|
84
|
+
forkAuthor?: {
|
|
85
|
+
platform: "github" | "gitlab";
|
|
86
|
+
user: string;
|
|
87
|
+
forkOrigin: string;
|
|
88
|
+
} | undefined;
|
|
89
|
+
workspaceId?: string | undefined;
|
|
44
90
|
}, {
|
|
45
91
|
repoPath: string;
|
|
46
92
|
repoOrigin?: string | undefined;
|
|
93
|
+
forkAuthor?: {
|
|
94
|
+
platform: "github" | "gitlab";
|
|
95
|
+
user: string;
|
|
96
|
+
forkOrigin: string;
|
|
97
|
+
} | undefined;
|
|
98
|
+
workspaceId?: string | undefined;
|
|
47
99
|
}>;
|
|
48
100
|
handler: typeof getIntentChanges;
|
|
49
101
|
};
|