@kawacode/mcp 5.2.2 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md.example +11 -3
- 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 +201 -0
- package/build/kawacode-on-pre-edit.js.map +1 -0
- package/build/kawacode-on-stop.d.ts +33 -0
- package/build/kawacode-on-stop.js +88 -0
- package/build/kawacode-on-stop.js.map +1 -0
- package/build/pre-edit/path-resolve.d.ts +32 -0
- package/build/pre-edit/path-resolve.js +52 -0
- package/build/pre-edit/path-resolve.js.map +1 -0
- package/build/pre-edit/path-resolve.test.d.ts +1 -0
- package/build/pre-edit/path-resolve.test.js +105 -0
- package/build/pre-edit/path-resolve.test.js.map +1 -0
- package/build/prompts/intent-first-workflow.js +2 -2
- package/build/services/muninn-ipc.js +11 -3
- package/build/services/muninn-ipc.js.map +1 -1
- 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 +138 -12
- 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 +76 -12
- package/build/tools/edit-session-decision.js +11 -2
- 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 +54 -0
- package/build/tools/get-relevant-context.js +19 -24
- package/build/tools/get-relevant-context.js.map +1 -1
- package/build/tools/get-session-decisions.d.ts +53 -0
- package/build/tools/get-session-decisions.js +6 -2
- package/build/tools/get-session-decisions.js.map +1 -1
- package/build/tools/index.d.ts +628 -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 +94 -12
- package/build/tools/record-decision.js +18 -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
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Thin proxy to Muninn's `pre-edit-check:evaluate` handler.
|
|
4
|
+
*
|
|
5
|
+
* The entire evaluator + supersedes + telemetry + 4-way data fan-out used
|
|
6
|
+
* to live in this file (~280 LOC pre-thinning). Phase 2 of the kawa.mcp →
|
|
7
|
+
* kawa.muninn migration moved all that logic into Muninn's
|
|
8
|
+
* `services/pre_edit_check/` module. This tool's only remaining job is
|
|
9
|
+
* Zod-schema validation, origin resolution, and forwarding the request.
|
|
10
|
+
*/
|
|
11
|
+
export declare const preEditDecisionCheckSchema: z.ZodObject<{
|
|
12
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
14
|
+
user: z.ZodString;
|
|
15
|
+
forkOrigin: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
platform: "github" | "gitlab";
|
|
18
|
+
user: string;
|
|
19
|
+
forkOrigin: string;
|
|
20
|
+
}, {
|
|
21
|
+
platform: "github" | "gitlab";
|
|
22
|
+
user: string;
|
|
23
|
+
forkOrigin: string;
|
|
24
|
+
}>>;
|
|
25
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
27
|
+
repoPath: z.ZodString;
|
|
28
|
+
filePath: z.ZodString;
|
|
29
|
+
startLine: z.ZodNumber;
|
|
30
|
+
endLine: z.ZodNumber;
|
|
31
|
+
intentId: z.ZodOptional<z.ZodString>;
|
|
32
|
+
sessionToken: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
repoPath: string;
|
|
35
|
+
filePath: string;
|
|
36
|
+
startLine: number;
|
|
37
|
+
endLine: number;
|
|
38
|
+
repoOrigin?: string | undefined;
|
|
39
|
+
forkAuthor?: {
|
|
40
|
+
platform: "github" | "gitlab";
|
|
41
|
+
user: string;
|
|
42
|
+
forkOrigin: string;
|
|
43
|
+
} | undefined;
|
|
44
|
+
workspaceId?: string | undefined;
|
|
45
|
+
intentId?: string | undefined;
|
|
46
|
+
sessionToken?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
repoPath: string;
|
|
49
|
+
filePath: string;
|
|
50
|
+
startLine: number;
|
|
51
|
+
endLine: number;
|
|
52
|
+
repoOrigin?: string | undefined;
|
|
53
|
+
forkAuthor?: {
|
|
54
|
+
platform: "github" | "gitlab";
|
|
55
|
+
user: string;
|
|
56
|
+
forkOrigin: string;
|
|
57
|
+
} | undefined;
|
|
58
|
+
workspaceId?: string | undefined;
|
|
59
|
+
intentId?: string | undefined;
|
|
60
|
+
sessionToken?: string | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
export type PreEditDecisionCheckInput = z.infer<typeof preEditDecisionCheckSchema>;
|
|
63
|
+
export interface EnclosingSymbol {
|
|
64
|
+
name: string;
|
|
65
|
+
fullyQualifiedName: string;
|
|
66
|
+
kind: string;
|
|
67
|
+
startLine: number;
|
|
68
|
+
endLine: number;
|
|
69
|
+
signature: string;
|
|
70
|
+
}
|
|
71
|
+
export interface PreEditDecisionCheckResponse {
|
|
72
|
+
triggered: boolean;
|
|
73
|
+
tier: '1a' | '1b' | null;
|
|
74
|
+
intents?: any[];
|
|
75
|
+
decisions?: any[];
|
|
76
|
+
filtered: {
|
|
77
|
+
activeIntentSupersedes: string[];
|
|
78
|
+
repoScopedSupersedes: string[];
|
|
79
|
+
sessionForceOverrides: string[];
|
|
80
|
+
};
|
|
81
|
+
recommendation: 'proceed' | 'review' | 'investigate-upstream';
|
|
82
|
+
enclosingSymbol: EnclosingSymbol | null;
|
|
83
|
+
language?: string;
|
|
84
|
+
}
|
|
85
|
+
export declare function preEditDecisionCheck(input: PreEditDecisionCheckInput): Promise<PreEditDecisionCheckResponse>;
|
|
86
|
+
export declare const preEditDecisionCheckTool: {
|
|
87
|
+
name: string;
|
|
88
|
+
description: string;
|
|
89
|
+
inputSchema: z.ZodObject<{
|
|
90
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
92
|
+
user: z.ZodString;
|
|
93
|
+
forkOrigin: z.ZodString;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
platform: "github" | "gitlab";
|
|
96
|
+
user: string;
|
|
97
|
+
forkOrigin: string;
|
|
98
|
+
}, {
|
|
99
|
+
platform: "github" | "gitlab";
|
|
100
|
+
user: string;
|
|
101
|
+
forkOrigin: string;
|
|
102
|
+
}>>;
|
|
103
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
104
|
+
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
105
|
+
repoPath: z.ZodString;
|
|
106
|
+
filePath: z.ZodString;
|
|
107
|
+
startLine: z.ZodNumber;
|
|
108
|
+
endLine: z.ZodNumber;
|
|
109
|
+
intentId: z.ZodOptional<z.ZodString>;
|
|
110
|
+
sessionToken: z.ZodOptional<z.ZodString>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
repoPath: string;
|
|
113
|
+
filePath: string;
|
|
114
|
+
startLine: number;
|
|
115
|
+
endLine: number;
|
|
116
|
+
repoOrigin?: string | undefined;
|
|
117
|
+
forkAuthor?: {
|
|
118
|
+
platform: "github" | "gitlab";
|
|
119
|
+
user: string;
|
|
120
|
+
forkOrigin: string;
|
|
121
|
+
} | undefined;
|
|
122
|
+
workspaceId?: string | undefined;
|
|
123
|
+
intentId?: string | undefined;
|
|
124
|
+
sessionToken?: string | undefined;
|
|
125
|
+
}, {
|
|
126
|
+
repoPath: string;
|
|
127
|
+
filePath: string;
|
|
128
|
+
startLine: number;
|
|
129
|
+
endLine: number;
|
|
130
|
+
repoOrigin?: string | undefined;
|
|
131
|
+
forkAuthor?: {
|
|
132
|
+
platform: "github" | "gitlab";
|
|
133
|
+
user: string;
|
|
134
|
+
forkOrigin: string;
|
|
135
|
+
} | undefined;
|
|
136
|
+
workspaceId?: string | undefined;
|
|
137
|
+
intentId?: string | undefined;
|
|
138
|
+
sessionToken?: string | undefined;
|
|
139
|
+
}>;
|
|
140
|
+
handler: typeof preEditDecisionCheck;
|
|
141
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { request } from '../services/muninn-ipc.js';
|
|
3
|
+
import { resolveOrigin } from './resolve-origin.js';
|
|
4
|
+
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
5
|
+
/**
|
|
6
|
+
* Thin proxy to Muninn's `pre-edit-check:evaluate` handler.
|
|
7
|
+
*
|
|
8
|
+
* The entire evaluator + supersedes + telemetry + 4-way data fan-out used
|
|
9
|
+
* to live in this file (~280 LOC pre-thinning). Phase 2 of the kawa.mcp →
|
|
10
|
+
* kawa.muninn migration moved all that logic into Muninn's
|
|
11
|
+
* `services/pre_edit_check/` module. This tool's only remaining job is
|
|
12
|
+
* Zod-schema validation, origin resolution, and forwarding the request.
|
|
13
|
+
*/
|
|
14
|
+
export const preEditDecisionCheckSchema = z.object({
|
|
15
|
+
repoOrigin: z
|
|
16
|
+
.string()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
19
|
+
repoPath: z
|
|
20
|
+
.string()
|
|
21
|
+
.describe('Local path to the repository root (also used to read the file for AST symbol detection)'),
|
|
22
|
+
filePath: z
|
|
23
|
+
.string()
|
|
24
|
+
.describe('Path to the file being edited (relative to repoPath)'),
|
|
25
|
+
startLine: z
|
|
26
|
+
.number()
|
|
27
|
+
.min(1)
|
|
28
|
+
.describe('Start line of the touched range (1-based, inclusive)'),
|
|
29
|
+
endLine: z
|
|
30
|
+
.number()
|
|
31
|
+
.min(1)
|
|
32
|
+
.describe('End line of the touched range (1-based, inclusive)'),
|
|
33
|
+
intentId: z
|
|
34
|
+
.string()
|
|
35
|
+
.optional()
|
|
36
|
+
.describe('Active intent ID for supersedes scoping. Auto-detected by Muninn when omitted.'),
|
|
37
|
+
sessionToken: z
|
|
38
|
+
.string()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('Session scope for the force-override cache. Defaults to the MCP server\'s SESSION_ID; PreToolUse hook callers should pass Claude Code\'s session_id so writes from one process are visible to the other.'),
|
|
41
|
+
...forkFieldsExtensions,
|
|
42
|
+
});
|
|
43
|
+
export async function preEditDecisionCheck(input) {
|
|
44
|
+
const repoOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
45
|
+
const forkFields = extractForkFields(input);
|
|
46
|
+
const res = await request('pre-edit-check', 'evaluate', {
|
|
47
|
+
repoOrigin,
|
|
48
|
+
repoPath: input.repoPath,
|
|
49
|
+
filePath: input.filePath,
|
|
50
|
+
startLine: input.startLine,
|
|
51
|
+
endLine: input.endLine,
|
|
52
|
+
intentId: input.intentId,
|
|
53
|
+
sessionToken: input.sessionToken,
|
|
54
|
+
...forkFields,
|
|
55
|
+
});
|
|
56
|
+
return res;
|
|
57
|
+
}
|
|
58
|
+
export const preEditDecisionCheckTool = {
|
|
59
|
+
name: 'pre_edit_decision_check',
|
|
60
|
+
description: `Check whether the line range about to be edited has prior recorded reasoning attached.
|
|
61
|
+
|
|
62
|
+
Call this BEFORE editing code in a kawa-indexed repo. Surfaces:
|
|
63
|
+
- Tier 1a — overlapping intents whose blocks cover these lines (line-precise team coordination + intent-scoped decisions)
|
|
64
|
+
- Tier 1b — repo decisions whose relatedFiles include this file (file-coarse, catches infer_history-extracted constraints)
|
|
65
|
+
|
|
66
|
+
Decisions already overridden via record_decision(supersedes=...) are filtered out automatically.
|
|
67
|
+
|
|
68
|
+
Recommendation maps to action:
|
|
69
|
+
- "proceed" — nothing relevant; safe to edit
|
|
70
|
+
- "review" — surfaced context worth inspecting before editing
|
|
71
|
+
- "investigate-upstream" — prior constraint or abandoned approach matches; don't proceed without reading the rationale and either revising the change or recording a new fork decision that supersedes the old one
|
|
72
|
+
|
|
73
|
+
Also returns the smallest enclosing function/method symbol via tree-sitter (Rust/TS/JS/Python only; null for other languages) for warning readability.`,
|
|
74
|
+
inputSchema: preEditDecisionCheckSchema,
|
|
75
|
+
handler: preEditDecisionCheck,
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=pre-edit-decision-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pre-edit-decision-check.js","sourceRoot":"","sources":["../../src/tools/pre-edit-decision-check.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;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,6EAA6E,CAAC;IAC1F,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CAAC,yFAAyF,CAAC;IACtG,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CAAC,sDAAsD,CAAC;IACnE,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,sDAAsD,CAAC;IACnE,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,oDAAoD,CAAC;IACjE,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gFAAgF,CAAC;IAC7F,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,0MAA0M,CAAC;IACvN,GAAG,oBAAoB;CACxB,CAAC,CAAA;AA4BF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,KAAgC;IAEhC,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IAClE,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;IAE3C,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,gBAAgB,EAAE,UAAU,EAAE;QACtD,UAAU;QACV,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,GAAG,UAAU;KACd,CAAC,CAAA;IAEF,OAAO,GAAmC,CAAA;AAC5C,CAAC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE;;;;;;;;;;;;;uJAawI;IACrJ,WAAW,EAAE,0BAA0B;IACvC,OAAO,EAAE,oBAAoB;CAC9B,CAAA"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const recordDecisionSchema: 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.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -11,56 +25,83 @@ export declare const recordDecisionSchema: z.ZodObject<{
|
|
|
11
25
|
consequences: z.ZodOptional<z.ZodString>;
|
|
12
26
|
symptom: z.ZodOptional<z.ZodString>;
|
|
13
27
|
relatedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
28
|
+
supersedes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
29
|
constraintsChecked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
30
|
constraintViolations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
31
|
alternative: z.ZodString;
|
|
17
32
|
constraint: z.ZodString;
|
|
18
33
|
reason: z.ZodString;
|
|
19
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
reason: string;
|
|
20
36
|
alternative: string;
|
|
21
37
|
constraint: string;
|
|
22
|
-
reason: string;
|
|
23
38
|
}, {
|
|
39
|
+
reason: string;
|
|
24
40
|
alternative: string;
|
|
25
41
|
constraint: string;
|
|
26
|
-
reason: string;
|
|
27
42
|
}>, "many">>;
|
|
43
|
+
source: z.ZodDefault<z.ZodOptional<z.ZodEnum<["user", "agent", "extractor", "infer_history"]>>>;
|
|
44
|
+
confidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
45
|
+
sourceThoughtIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
46
|
+
appliesWhen: z.ZodOptional<z.ZodString>;
|
|
28
47
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
repoPath: string;
|
|
30
48
|
type: "abandoned" | "constraint" | "fork" | "discovery" | "tradeoff" | "dependency";
|
|
49
|
+
repoPath: string;
|
|
31
50
|
summary: string;
|
|
32
51
|
intentId: string;
|
|
33
52
|
rationale: string;
|
|
53
|
+
source: "user" | "agent" | "extractor" | "infer_history";
|
|
34
54
|
repoOrigin?: string | undefined;
|
|
55
|
+
forkAuthor?: {
|
|
56
|
+
platform: "github" | "gitlab";
|
|
57
|
+
user: string;
|
|
58
|
+
forkOrigin: string;
|
|
59
|
+
} | undefined;
|
|
60
|
+
workspaceId?: string | undefined;
|
|
35
61
|
context?: string | undefined;
|
|
36
62
|
alternatives?: string[] | undefined;
|
|
37
63
|
consequences?: string | undefined;
|
|
38
64
|
symptom?: string | undefined;
|
|
39
65
|
relatedFiles?: string[] | undefined;
|
|
66
|
+
supersedes?: string[] | undefined;
|
|
40
67
|
constraintsChecked?: string[] | undefined;
|
|
41
68
|
constraintViolations?: {
|
|
69
|
+
reason: string;
|
|
42
70
|
alternative: string;
|
|
43
71
|
constraint: string;
|
|
44
|
-
reason: string;
|
|
45
72
|
}[] | undefined;
|
|
73
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
74
|
+
sourceThoughtIds?: string[] | undefined;
|
|
75
|
+
appliesWhen?: string | undefined;
|
|
46
76
|
}, {
|
|
47
|
-
repoPath: string;
|
|
48
77
|
type: "abandoned" | "constraint" | "fork" | "discovery" | "tradeoff" | "dependency";
|
|
78
|
+
repoPath: string;
|
|
49
79
|
summary: string;
|
|
50
80
|
rationale: string;
|
|
51
81
|
repoOrigin?: string | undefined;
|
|
82
|
+
forkAuthor?: {
|
|
83
|
+
platform: "github" | "gitlab";
|
|
84
|
+
user: string;
|
|
85
|
+
forkOrigin: string;
|
|
86
|
+
} | undefined;
|
|
87
|
+
workspaceId?: string | undefined;
|
|
52
88
|
context?: string | undefined;
|
|
53
89
|
intentId?: string | undefined;
|
|
54
90
|
alternatives?: string[] | undefined;
|
|
55
91
|
consequences?: string | undefined;
|
|
56
92
|
symptom?: string | undefined;
|
|
57
93
|
relatedFiles?: string[] | undefined;
|
|
94
|
+
supersedes?: string[] | undefined;
|
|
58
95
|
constraintsChecked?: string[] | undefined;
|
|
59
96
|
constraintViolations?: {
|
|
97
|
+
reason: string;
|
|
60
98
|
alternative: string;
|
|
61
99
|
constraint: string;
|
|
62
|
-
reason: string;
|
|
63
100
|
}[] | undefined;
|
|
101
|
+
source?: "user" | "agent" | "extractor" | "infer_history" | undefined;
|
|
102
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
103
|
+
sourceThoughtIds?: string[] | undefined;
|
|
104
|
+
appliesWhen?: string | undefined;
|
|
64
105
|
}>;
|
|
65
106
|
export type RecordDecisionInput = z.infer<typeof recordDecisionSchema>;
|
|
66
107
|
export interface RecordDecisionResponse {
|
|
@@ -72,6 +113,20 @@ export declare const recordDecisionTool: {
|
|
|
72
113
|
name: string;
|
|
73
114
|
description: string;
|
|
74
115
|
inputSchema: z.ZodObject<{
|
|
116
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
117
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
118
|
+
user: z.ZodString;
|
|
119
|
+
forkOrigin: z.ZodString;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
platform: "github" | "gitlab";
|
|
122
|
+
user: string;
|
|
123
|
+
forkOrigin: string;
|
|
124
|
+
}, {
|
|
125
|
+
platform: "github" | "gitlab";
|
|
126
|
+
user: string;
|
|
127
|
+
forkOrigin: string;
|
|
128
|
+
}>>;
|
|
129
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
75
130
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
76
131
|
repoPath: z.ZodString;
|
|
77
132
|
intentId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -83,56 +138,83 @@ export declare const recordDecisionTool: {
|
|
|
83
138
|
consequences: z.ZodOptional<z.ZodString>;
|
|
84
139
|
symptom: z.ZodOptional<z.ZodString>;
|
|
85
140
|
relatedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
141
|
+
supersedes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
86
142
|
constraintsChecked: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
87
143
|
constraintViolations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
88
144
|
alternative: z.ZodString;
|
|
89
145
|
constraint: z.ZodString;
|
|
90
146
|
reason: z.ZodString;
|
|
91
147
|
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
reason: string;
|
|
92
149
|
alternative: string;
|
|
93
150
|
constraint: string;
|
|
94
|
-
reason: string;
|
|
95
151
|
}, {
|
|
152
|
+
reason: string;
|
|
96
153
|
alternative: string;
|
|
97
154
|
constraint: string;
|
|
98
|
-
reason: string;
|
|
99
155
|
}>, "many">>;
|
|
156
|
+
source: z.ZodDefault<z.ZodOptional<z.ZodEnum<["user", "agent", "extractor", "infer_history"]>>>;
|
|
157
|
+
confidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
158
|
+
sourceThoughtIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
159
|
+
appliesWhen: z.ZodOptional<z.ZodString>;
|
|
100
160
|
}, "strip", z.ZodTypeAny, {
|
|
101
|
-
repoPath: string;
|
|
102
161
|
type: "abandoned" | "constraint" | "fork" | "discovery" | "tradeoff" | "dependency";
|
|
162
|
+
repoPath: string;
|
|
103
163
|
summary: string;
|
|
104
164
|
intentId: string;
|
|
105
165
|
rationale: string;
|
|
166
|
+
source: "user" | "agent" | "extractor" | "infer_history";
|
|
106
167
|
repoOrigin?: string | undefined;
|
|
168
|
+
forkAuthor?: {
|
|
169
|
+
platform: "github" | "gitlab";
|
|
170
|
+
user: string;
|
|
171
|
+
forkOrigin: string;
|
|
172
|
+
} | undefined;
|
|
173
|
+
workspaceId?: string | undefined;
|
|
107
174
|
context?: string | undefined;
|
|
108
175
|
alternatives?: string[] | undefined;
|
|
109
176
|
consequences?: string | undefined;
|
|
110
177
|
symptom?: string | undefined;
|
|
111
178
|
relatedFiles?: string[] | undefined;
|
|
179
|
+
supersedes?: string[] | undefined;
|
|
112
180
|
constraintsChecked?: string[] | undefined;
|
|
113
181
|
constraintViolations?: {
|
|
182
|
+
reason: string;
|
|
114
183
|
alternative: string;
|
|
115
184
|
constraint: string;
|
|
116
|
-
reason: string;
|
|
117
185
|
}[] | undefined;
|
|
186
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
187
|
+
sourceThoughtIds?: string[] | undefined;
|
|
188
|
+
appliesWhen?: string | undefined;
|
|
118
189
|
}, {
|
|
119
|
-
repoPath: string;
|
|
120
190
|
type: "abandoned" | "constraint" | "fork" | "discovery" | "tradeoff" | "dependency";
|
|
191
|
+
repoPath: string;
|
|
121
192
|
summary: string;
|
|
122
193
|
rationale: string;
|
|
123
194
|
repoOrigin?: string | undefined;
|
|
195
|
+
forkAuthor?: {
|
|
196
|
+
platform: "github" | "gitlab";
|
|
197
|
+
user: string;
|
|
198
|
+
forkOrigin: string;
|
|
199
|
+
} | undefined;
|
|
200
|
+
workspaceId?: string | undefined;
|
|
124
201
|
context?: string | undefined;
|
|
125
202
|
intentId?: string | undefined;
|
|
126
203
|
alternatives?: string[] | undefined;
|
|
127
204
|
consequences?: string | undefined;
|
|
128
205
|
symptom?: string | undefined;
|
|
129
206
|
relatedFiles?: string[] | undefined;
|
|
207
|
+
supersedes?: string[] | undefined;
|
|
130
208
|
constraintsChecked?: string[] | undefined;
|
|
131
209
|
constraintViolations?: {
|
|
210
|
+
reason: string;
|
|
132
211
|
alternative: string;
|
|
133
212
|
constraint: string;
|
|
134
|
-
reason: string;
|
|
135
213
|
}[] | undefined;
|
|
214
|
+
source?: "user" | "agent" | "extractor" | "infer_history" | undefined;
|
|
215
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
216
|
+
sourceThoughtIds?: string[] | undefined;
|
|
217
|
+
appliesWhen?: string | undefined;
|
|
136
218
|
}>;
|
|
137
219
|
handler: typeof recordDecision;
|
|
138
220
|
};
|
|
@@ -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().describe('The alternative that was rejected'),
|
|
6
7
|
constraint: z.string().describe('The constraint ID that was violated (e.g., "zero-knowledge")'),
|
|
@@ -19,9 +20,19 @@ export const recordDecisionSchema = z.object({
|
|
|
19
20
|
consequences: z.string().optional().describe('Downstream implications of this decision'),
|
|
20
21
|
symptom: z.string().optional().describe('Observable symptom that indicates this decision is relevant (e.g., error messages, runtime panics, unexpected behavior). Useful for discovery and constraint decisions.'),
|
|
21
22
|
relatedFiles: z.array(z.string()).optional().describe('File paths affected by this decision'),
|
|
23
|
+
supersedes: z.array(z.string()).optional().describe('Decision IDs that this one replaces. When a later decision supersedes an earlier one, pass the earlier decisionId(s) here so the evolve pipeline can track the lineage.'),
|
|
22
24
|
constraintsChecked: z.array(z.string()).optional().describe('Which architectural constraints were verified before this decision'),
|
|
23
25
|
constraintViolations: z.array(constraintViolationSchema).optional()
|
|
24
|
-
.describe('Alternatives that were rejected due to constraint violations')
|
|
26
|
+
.describe('Alternatives that were rejected due to constraint violations'),
|
|
27
|
+
source: z.enum(['user', 'agent', 'extractor', 'infer_history']).optional().default('agent')
|
|
28
|
+
.describe('Provenance: user (human-recorded), agent (AI deliberately recorded via this tool — the default), extractor (from thought-chain extraction), infer_history (from commit-history extraction). Most callers leave this as the default.'),
|
|
29
|
+
confidence: z.enum(['high', 'medium', 'low']).optional()
|
|
30
|
+
.describe('Self-rated confidence in the decision. Meaningful only for extractor and infer_history sources — leave null for deliberate recordings.'),
|
|
31
|
+
sourceThoughtIds: z.array(z.string()).optional()
|
|
32
|
+
.describe('Thought-chain entry IDs this record was extracted from. Only set by the extractor path.'),
|
|
33
|
+
appliesWhen: z.string().optional()
|
|
34
|
+
.describe('Trigger condition / "How to apply" — populate ONLY when the decision is plainly conditional (e.g. "language is Go", "when running in production", "when working in module X", "when the error is ECONNRESET"). Skip when the rule has no clean activation condition or when the rationale already implies universality. Treat applies_when as load-bearing context the LLM uses at recall time to decide whether the decision is relevant — not a soft hint. Strong-signal-only.'),
|
|
35
|
+
...forkFieldsExtensions,
|
|
25
36
|
});
|
|
26
37
|
export async function recordDecision(input) {
|
|
27
38
|
const origin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
@@ -36,8 +47,14 @@ export async function recordDecision(input) {
|
|
|
36
47
|
consequences: input.consequences,
|
|
37
48
|
symptom: input.symptom,
|
|
38
49
|
relatedFiles: input.relatedFiles || [],
|
|
50
|
+
supersedes: input.supersedes || [],
|
|
39
51
|
constraintsChecked: input.constraintsChecked || [],
|
|
40
52
|
constraintViolations: input.constraintViolations || [],
|
|
53
|
+
source: input.source,
|
|
54
|
+
confidence: input.confidence,
|
|
55
|
+
sourceThoughtIds: input.sourceThoughtIds || [],
|
|
56
|
+
appliesWhen: input.appliesWhen,
|
|
57
|
+
...extractForkFields(input),
|
|
41
58
|
});
|
|
42
59
|
return {
|
|
43
60
|
recorded: res.success !== false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-decision.js","sourceRoot":"","sources":["../../src/tools/record-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":"record-decision.js","sourceRoot":"","sources":["../../src/tools/record-decision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC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KAAK,KAAK;QAC/B,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE;KACjC,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;;;;;;;;;;;;;;;yGAe0F;IACvG,WAAW,EAAE,oBAAoB;IACjC,OAAO,EAAE,cAAc;CACxB,CAAA"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const updateIntentSchema: 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.ZodOptional<z.ZodString>;
|
|
@@ -10,32 +24,44 @@ export declare const updateIntentSchema: z.ZodObject<{
|
|
|
10
24
|
type: z.ZodEnum<["repo", "folder", "files"]>;
|
|
11
25
|
paths: z.ZodArray<z.ZodString, "many">;
|
|
12
26
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
type: "repo" | "
|
|
27
|
+
type: "repo" | "folder" | "files";
|
|
14
28
|
paths: string[];
|
|
15
29
|
}, {
|
|
16
|
-
type: "repo" | "
|
|
30
|
+
type: "repo" | "folder" | "files";
|
|
17
31
|
paths: string[];
|
|
18
32
|
}>>;
|
|
19
33
|
}, "strip", z.ZodTypeAny, {
|
|
20
34
|
repoPath: string;
|
|
21
35
|
repoOrigin?: string | undefined;
|
|
36
|
+
forkAuthor?: {
|
|
37
|
+
platform: "github" | "gitlab";
|
|
38
|
+
user: string;
|
|
39
|
+
forkOrigin: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
workspaceId?: string | undefined;
|
|
22
42
|
title?: string | undefined;
|
|
23
43
|
description?: string | undefined;
|
|
24
44
|
constraints?: string[] | undefined;
|
|
25
45
|
intentId?: string | undefined;
|
|
26
46
|
scope?: {
|
|
27
|
-
type: "repo" | "
|
|
47
|
+
type: "repo" | "folder" | "files";
|
|
28
48
|
paths: string[];
|
|
29
49
|
} | undefined;
|
|
30
50
|
}, {
|
|
31
51
|
repoPath: string;
|
|
32
52
|
repoOrigin?: string | undefined;
|
|
53
|
+
forkAuthor?: {
|
|
54
|
+
platform: "github" | "gitlab";
|
|
55
|
+
user: string;
|
|
56
|
+
forkOrigin: string;
|
|
57
|
+
} | undefined;
|
|
58
|
+
workspaceId?: string | undefined;
|
|
33
59
|
title?: string | undefined;
|
|
34
60
|
description?: string | undefined;
|
|
35
61
|
constraints?: string[] | undefined;
|
|
36
62
|
intentId?: string | undefined;
|
|
37
63
|
scope?: {
|
|
38
|
-
type: "repo" | "
|
|
64
|
+
type: "repo" | "folder" | "files";
|
|
39
65
|
paths: string[];
|
|
40
66
|
} | undefined;
|
|
41
67
|
}>;
|
|
@@ -52,6 +78,20 @@ export declare const updateIntentTool: {
|
|
|
52
78
|
name: string;
|
|
53
79
|
description: string;
|
|
54
80
|
inputSchema: z.ZodObject<{
|
|
81
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
83
|
+
user: z.ZodString;
|
|
84
|
+
forkOrigin: z.ZodString;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
platform: "github" | "gitlab";
|
|
87
|
+
user: string;
|
|
88
|
+
forkOrigin: string;
|
|
89
|
+
}, {
|
|
90
|
+
platform: "github" | "gitlab";
|
|
91
|
+
user: string;
|
|
92
|
+
forkOrigin: string;
|
|
93
|
+
}>>;
|
|
94
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
55
95
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
56
96
|
repoPath: z.ZodString;
|
|
57
97
|
intentId: z.ZodOptional<z.ZodString>;
|
|
@@ -62,32 +102,44 @@ export declare const updateIntentTool: {
|
|
|
62
102
|
type: z.ZodEnum<["repo", "folder", "files"]>;
|
|
63
103
|
paths: z.ZodArray<z.ZodString, "many">;
|
|
64
104
|
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
type: "repo" | "
|
|
105
|
+
type: "repo" | "folder" | "files";
|
|
66
106
|
paths: string[];
|
|
67
107
|
}, {
|
|
68
|
-
type: "repo" | "
|
|
108
|
+
type: "repo" | "folder" | "files";
|
|
69
109
|
paths: string[];
|
|
70
110
|
}>>;
|
|
71
111
|
}, "strip", z.ZodTypeAny, {
|
|
72
112
|
repoPath: string;
|
|
73
113
|
repoOrigin?: string | undefined;
|
|
114
|
+
forkAuthor?: {
|
|
115
|
+
platform: "github" | "gitlab";
|
|
116
|
+
user: string;
|
|
117
|
+
forkOrigin: string;
|
|
118
|
+
} | undefined;
|
|
119
|
+
workspaceId?: string | undefined;
|
|
74
120
|
title?: string | undefined;
|
|
75
121
|
description?: string | undefined;
|
|
76
122
|
constraints?: string[] | undefined;
|
|
77
123
|
intentId?: string | undefined;
|
|
78
124
|
scope?: {
|
|
79
|
-
type: "repo" | "
|
|
125
|
+
type: "repo" | "folder" | "files";
|
|
80
126
|
paths: string[];
|
|
81
127
|
} | undefined;
|
|
82
128
|
}, {
|
|
83
129
|
repoPath: string;
|
|
84
130
|
repoOrigin?: string | undefined;
|
|
131
|
+
forkAuthor?: {
|
|
132
|
+
platform: "github" | "gitlab";
|
|
133
|
+
user: string;
|
|
134
|
+
forkOrigin: string;
|
|
135
|
+
} | undefined;
|
|
136
|
+
workspaceId?: string | undefined;
|
|
85
137
|
title?: string | undefined;
|
|
86
138
|
description?: string | undefined;
|
|
87
139
|
constraints?: string[] | undefined;
|
|
88
140
|
intentId?: string | undefined;
|
|
89
141
|
scope?: {
|
|
90
|
-
type: "repo" | "
|
|
142
|
+
type: "repo" | "folder" | "files";
|
|
91
143
|
paths: string[];
|
|
92
144
|
} | undefined;
|
|
93
145
|
}>;
|