@kawacode/mcp 6.9.5 → 8.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 +23 -0
- package/README.md +93 -32
- package/build/index.js +20 -21
- package/build/index.js.map +1 -1
- package/build/prompts/intent-first-workflow.js +1 -2
- package/build/prompts/intent-first-workflow.js.map +1 -1
- package/build/tools/_mangled-args.d.ts +63 -0
- package/build/tools/_mangled-args.js +116 -0
- package/build/tools/_mangled-args.js.map +1 -0
- package/build/tools/_mangled-args.test.js +110 -0
- package/build/tools/_mangled-args.test.js.map +1 -0
- package/build/tools/activate-intent.d.ts +5 -52
- package/build/tools/activate-intent.js +14 -7
- package/build/tools/activate-intent.js.map +1 -1
- package/build/tools/arbiter-apply.d.ts +0 -52
- package/build/tools/arbiter-apply.js +0 -3
- package/build/tools/arbiter-apply.js.map +1 -1
- package/build/tools/arbiter-resolve.d.ts +0 -52
- package/build/tools/arbiter-resolve.js +0 -3
- package/build/tools/arbiter-resolve.js.map +1 -1
- package/build/tools/check-active-intent.d.ts +0 -52
- package/build/tools/check-active-intent.js +2 -24
- package/build/tools/check-active-intent.js.map +1 -1
- package/build/tools/complete-intent.d.ts +4 -56
- package/build/tools/complete-intent.js +15 -44
- package/build/tools/complete-intent.js.map +1 -1
- package/build/tools/create-intent.d.ts +0 -52
- package/build/tools/create-intent.js +0 -4
- package/build/tools/create-intent.js.map +1 -1
- package/build/tools/detect-intent-conflicts.d.ts +0 -52
- package/build/tools/detect-intent-conflicts.js +0 -3
- package/build/tools/detect-intent-conflicts.js.map +1 -1
- package/build/tools/edit-session-decision.d.ts +0 -52
- package/build/tools/edit-session-decision.js +0 -3
- package/build/tools/edit-session-decision.js.map +1 -1
- package/build/tools/get-decision-detail.d.ts +19 -55
- package/build/tools/get-decision-detail.js +12 -7
- package/build/tools/get-decision-detail.js.map +1 -1
- package/build/tools/get-intents-for-file.d.ts +35 -53
- package/build/tools/get-intents-for-file.js +61 -26
- package/build/tools/get-intents-for-file.js.map +1 -1
- package/build/tools/get-project-decisions.d.ts +0 -52
- package/build/tools/get-project-decisions.js +0 -3
- package/build/tools/get-project-decisions.js.map +1 -1
- package/build/tools/get-relevant-context.d.ts +0 -52
- package/build/tools/get-relevant-context.js +0 -3
- package/build/tools/get-relevant-context.js.map +1 -1
- package/build/tools/get-resolution-context.d.ts +0 -52
- package/build/tools/get-resolution-context.js +0 -4
- package/build/tools/get-resolution-context.js.map +1 -1
- package/build/tools/get-session-decisions.d.ts +10 -53
- package/build/tools/get-session-decisions.js +2 -4
- package/build/tools/get-session-decisions.js.map +1 -1
- package/build/tools/index.d.ts +11 -679
- package/build/tools/index.js +6 -15
- package/build/tools/index.js.map +1 -1
- package/build/tools/infer-history.js +4 -19
- package/build/tools/infer-history.js.map +1 -1
- package/build/tools/list-team-intents.d.ts +4 -56
- package/build/tools/list-team-intents.js +0 -3
- package/build/tools/list-team-intents.js.map +1 -1
- package/build/tools/log-work.d.ts +0 -52
- package/build/tools/log-work.js +0 -3
- package/build/tools/log-work.js.map +1 -1
- package/build/tools/pre-edit-acknowledge.d.ts +14 -52
- package/build/tools/pre-edit-acknowledge.js +14 -2
- package/build/tools/pre-edit-acknowledge.js.map +1 -1
- package/build/tools/pre-edit-decision-check.d.ts +14 -52
- package/build/tools/pre-edit-decision-check.js +14 -4
- package/build/tools/pre-edit-decision-check.js.map +1 -1
- package/build/tools/record-decision.d.ts +2 -52
- package/build/tools/record-decision.js +6 -5
- package/build/tools/record-decision.js.map +1 -1
- package/build/tools/resume-intent.d.ts +0 -52
- package/build/tools/resume-intent.js +6 -4
- package/build/tools/resume-intent.js.map +1 -1
- package/build/tools/update-intent.d.ts +0 -52
- package/build/tools/update-intent.js +1 -5
- package/build/tools/update-intent.js.map +1 -1
- package/build/types/refs.d.ts +73 -0
- package/build/types/refs.js +73 -0
- package/build/types/refs.js.map +1 -0
- package/package.json +1 -1
- package/build/tools/_fork-fields.d.ts +0 -84
- package/build/tools/_fork-fields.js +0 -65
- package/build/tools/_fork-fields.js.map +0 -1
- package/build/tools/_salvage-mangled-args.d.ts +0 -38
- package/build/tools/_salvage-mangled-args.js +0 -87
- package/build/tools/_salvage-mangled-args.js.map +0 -1
- package/build/tools/_salvage-mangled-args.test.js +0 -73
- package/build/tools/_salvage-mangled-args.test.js.map +0 -1
- package/build/tools/evolve-decisions.d.ts +0 -90
- package/build/tools/evolve-decisions.js +0 -40
- package/build/tools/evolve-decisions.js.map +0 -1
- package/build/tools/get-intents-for-lines.d.ts +0 -123
- package/build/tools/get-intents-for-lines.js +0 -67
- package/build/tools/get-intents-for-lines.js.map +0 -1
- package/build/tools/update-features.d.ts +0 -31
- package/build/tools/update-features.js +0 -51
- package/build/tools/update-features.js.map +0 -1
- /package/build/tools/{_salvage-mangled-args.test.d.ts → _mangled-args.test.d.ts} +0 -0
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️ UNREGISTERED 2026-08-14 — retained deliberately, NOT dead code.
|
|
3
|
+
*
|
|
4
|
+
* This tool is no longer in `allTools` or the `src/index.ts` dispatcher, so it
|
|
5
|
+
* is not exposed to any client. The `PreToolUse` hook that drove it is retired:
|
|
6
|
+
* Kawa Code no longer installs it and the README no longer documents wiring it
|
|
7
|
+
* up (see `INTENT_INTELLIGENCE.md` §13 for the measurements behind that call).
|
|
8
|
+
*
|
|
9
|
+
* The source stays so re-registering is a two-line change rather than a
|
|
10
|
+
* rewrite, and so the retirement stays legible. Do not delete it, and do not
|
|
11
|
+
* "clean up" the unused export. The same applies to `pre_edit_check/` in
|
|
12
|
+
* kawa.muninn and to `kawacode-on-pre-edit.ts` here — the hook binary still
|
|
13
|
+
* ships, so users who wired it up before the retirement keep working.
|
|
14
|
+
*/
|
|
1
15
|
import { z } from 'zod';
|
|
2
16
|
/**
|
|
3
17
|
* Thin proxy to Muninn's `pre-edit-check:evaluate` handler.
|
|
@@ -9,20 +23,6 @@ import { z } from 'zod';
|
|
|
9
23
|
* Zod-schema validation, origin resolution, and forwarding the request.
|
|
10
24
|
*/
|
|
11
25
|
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
26
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
27
27
|
repoPath: z.ZodString;
|
|
28
28
|
filePath: z.ZodString;
|
|
@@ -36,12 +36,6 @@ export declare const preEditDecisionCheckSchema: z.ZodObject<{
|
|
|
36
36
|
startLine: number;
|
|
37
37
|
endLine: number;
|
|
38
38
|
repoOrigin?: string | undefined;
|
|
39
|
-
forkAuthor?: {
|
|
40
|
-
platform: "github" | "gitlab";
|
|
41
|
-
user: string;
|
|
42
|
-
forkOrigin: string;
|
|
43
|
-
} | undefined;
|
|
44
|
-
workspaceId?: string | undefined;
|
|
45
39
|
intentId?: string | undefined;
|
|
46
40
|
sessionToken?: string | undefined;
|
|
47
41
|
}, {
|
|
@@ -50,12 +44,6 @@ export declare const preEditDecisionCheckSchema: z.ZodObject<{
|
|
|
50
44
|
startLine: number;
|
|
51
45
|
endLine: number;
|
|
52
46
|
repoOrigin?: string | undefined;
|
|
53
|
-
forkAuthor?: {
|
|
54
|
-
platform: "github" | "gitlab";
|
|
55
|
-
user: string;
|
|
56
|
-
forkOrigin: string;
|
|
57
|
-
} | undefined;
|
|
58
|
-
workspaceId?: string | undefined;
|
|
59
47
|
intentId?: string | undefined;
|
|
60
48
|
sessionToken?: string | undefined;
|
|
61
49
|
}>;
|
|
@@ -87,20 +75,6 @@ export declare const preEditDecisionCheckTool: {
|
|
|
87
75
|
name: string;
|
|
88
76
|
description: string;
|
|
89
77
|
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
78
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
105
79
|
repoPath: z.ZodString;
|
|
106
80
|
filePath: z.ZodString;
|
|
@@ -114,12 +88,6 @@ export declare const preEditDecisionCheckTool: {
|
|
|
114
88
|
startLine: number;
|
|
115
89
|
endLine: number;
|
|
116
90
|
repoOrigin?: string | undefined;
|
|
117
|
-
forkAuthor?: {
|
|
118
|
-
platform: "github" | "gitlab";
|
|
119
|
-
user: string;
|
|
120
|
-
forkOrigin: string;
|
|
121
|
-
} | undefined;
|
|
122
|
-
workspaceId?: string | undefined;
|
|
123
91
|
intentId?: string | undefined;
|
|
124
92
|
sessionToken?: string | undefined;
|
|
125
93
|
}, {
|
|
@@ -128,12 +96,6 @@ export declare const preEditDecisionCheckTool: {
|
|
|
128
96
|
startLine: number;
|
|
129
97
|
endLine: number;
|
|
130
98
|
repoOrigin?: string | undefined;
|
|
131
|
-
forkAuthor?: {
|
|
132
|
-
platform: "github" | "gitlab";
|
|
133
|
-
user: string;
|
|
134
|
-
forkOrigin: string;
|
|
135
|
-
} | undefined;
|
|
136
|
-
workspaceId?: string | undefined;
|
|
137
99
|
intentId?: string | undefined;
|
|
138
100
|
sessionToken?: string | undefined;
|
|
139
101
|
}>;
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️ UNREGISTERED 2026-08-14 — retained deliberately, NOT dead code.
|
|
3
|
+
*
|
|
4
|
+
* This tool is no longer in `allTools` or the `src/index.ts` dispatcher, so it
|
|
5
|
+
* is not exposed to any client. The `PreToolUse` hook that drove it is retired:
|
|
6
|
+
* Kawa Code no longer installs it and the README no longer documents wiring it
|
|
7
|
+
* up (see `INTENT_INTELLIGENCE.md` §13 for the measurements behind that call).
|
|
8
|
+
*
|
|
9
|
+
* The source stays so re-registering is a two-line change rather than a
|
|
10
|
+
* rewrite, and so the retirement stays legible. Do not delete it, and do not
|
|
11
|
+
* "clean up" the unused export. The same applies to `pre_edit_check/` in
|
|
12
|
+
* kawa.muninn and to `kawacode-on-pre-edit.ts` here — the hook binary still
|
|
13
|
+
* ships, so users who wired it up before the retirement keep working.
|
|
14
|
+
*/
|
|
1
15
|
import { z } from 'zod';
|
|
2
16
|
import { request } from '../services/muninn-ipc.js';
|
|
3
17
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
|
-
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
5
18
|
/**
|
|
6
19
|
* Thin proxy to Muninn's `pre-edit-check:evaluate` handler.
|
|
7
20
|
*
|
|
@@ -38,11 +51,9 @@ export const preEditDecisionCheckSchema = z.object({
|
|
|
38
51
|
.string()
|
|
39
52
|
.optional()
|
|
40
53
|
.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
54
|
});
|
|
43
55
|
export async function preEditDecisionCheck(input) {
|
|
44
56
|
const repoOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
45
|
-
const forkFields = extractForkFields(input);
|
|
46
57
|
const res = await request('pre-edit-check', 'evaluate', {
|
|
47
58
|
repoOrigin,
|
|
48
59
|
repoPath: input.repoPath,
|
|
@@ -51,7 +62,6 @@ export async function preEditDecisionCheck(input) {
|
|
|
51
62
|
endLine: input.endLine,
|
|
52
63
|
intentId: input.intentId,
|
|
53
64
|
sessionToken: input.sessionToken,
|
|
54
|
-
...forkFields,
|
|
55
65
|
});
|
|
56
66
|
return res;
|
|
57
67
|
}
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"pre-edit-decision-check.js","sourceRoot":"","sources":["../../src/tools/pre-edit-decision-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;;;;;;;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;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|
-
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>;
|
|
17
3
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
18
4
|
repoPath: z.ZodString;
|
|
19
5
|
intentId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -75,12 +61,6 @@ export declare const recordDecisionSchema: z.ZodObject<{
|
|
|
75
61
|
rationale: string;
|
|
76
62
|
source: "user" | "agent" | "extractor" | "infer_history";
|
|
77
63
|
repoOrigin?: string | undefined;
|
|
78
|
-
forkAuthor?: {
|
|
79
|
-
platform: "github" | "gitlab";
|
|
80
|
-
user: string;
|
|
81
|
-
forkOrigin: string;
|
|
82
|
-
} | undefined;
|
|
83
|
-
workspaceId?: string | undefined;
|
|
84
64
|
context?: string | undefined;
|
|
85
65
|
alternatives?: string[] | undefined;
|
|
86
66
|
consequences?: string | undefined;
|
|
@@ -111,12 +91,6 @@ export declare const recordDecisionSchema: z.ZodObject<{
|
|
|
111
91
|
summary: string;
|
|
112
92
|
rationale: string;
|
|
113
93
|
repoOrigin?: string | undefined;
|
|
114
|
-
forkAuthor?: {
|
|
115
|
-
platform: "github" | "gitlab";
|
|
116
|
-
user: string;
|
|
117
|
-
forkOrigin: string;
|
|
118
|
-
} | undefined;
|
|
119
|
-
workspaceId?: string | undefined;
|
|
120
94
|
context?: string | undefined;
|
|
121
95
|
intentId?: string | undefined;
|
|
122
96
|
alternatives?: string[] | undefined;
|
|
@@ -148,6 +122,8 @@ export type RecordDecisionInput = z.infer<typeof recordDecisionSchema>;
|
|
|
148
122
|
export interface RecordDecisionResponse {
|
|
149
123
|
recorded: boolean;
|
|
150
124
|
decisionId: string;
|
|
125
|
+
/** The summary as stored, so the caller can name the decision it recorded. */
|
|
126
|
+
summary?: string;
|
|
151
127
|
error?: string;
|
|
152
128
|
}
|
|
153
129
|
export declare function recordDecision(input: RecordDecisionInput): Promise<RecordDecisionResponse>;
|
|
@@ -155,20 +131,6 @@ export declare const recordDecisionTool: {
|
|
|
155
131
|
name: string;
|
|
156
132
|
description: string;
|
|
157
133
|
inputSchema: z.ZodObject<{
|
|
158
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
159
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
160
|
-
user: z.ZodString;
|
|
161
|
-
forkOrigin: z.ZodString;
|
|
162
|
-
}, "strip", z.ZodTypeAny, {
|
|
163
|
-
platform: "github" | "gitlab";
|
|
164
|
-
user: string;
|
|
165
|
-
forkOrigin: string;
|
|
166
|
-
}, {
|
|
167
|
-
platform: "github" | "gitlab";
|
|
168
|
-
user: string;
|
|
169
|
-
forkOrigin: string;
|
|
170
|
-
}>>;
|
|
171
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
172
134
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
173
135
|
repoPath: z.ZodString;
|
|
174
136
|
intentId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -230,12 +192,6 @@ export declare const recordDecisionTool: {
|
|
|
230
192
|
rationale: string;
|
|
231
193
|
source: "user" | "agent" | "extractor" | "infer_history";
|
|
232
194
|
repoOrigin?: string | undefined;
|
|
233
|
-
forkAuthor?: {
|
|
234
|
-
platform: "github" | "gitlab";
|
|
235
|
-
user: string;
|
|
236
|
-
forkOrigin: string;
|
|
237
|
-
} | undefined;
|
|
238
|
-
workspaceId?: string | undefined;
|
|
239
195
|
context?: string | undefined;
|
|
240
196
|
alternatives?: string[] | undefined;
|
|
241
197
|
consequences?: string | undefined;
|
|
@@ -266,12 +222,6 @@ export declare const recordDecisionTool: {
|
|
|
266
222
|
summary: string;
|
|
267
223
|
rationale: string;
|
|
268
224
|
repoOrigin?: string | undefined;
|
|
269
|
-
forkAuthor?: {
|
|
270
|
-
platform: "github" | "gitlab";
|
|
271
|
-
user: string;
|
|
272
|
-
forkOrigin: string;
|
|
273
|
-
} | undefined;
|
|
274
|
-
workspaceId?: string | undefined;
|
|
275
225
|
context?: string | undefined;
|
|
276
226
|
intentId?: string | undefined;
|
|
277
227
|
alternatives?: string[] | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
const constraintViolationSchema = z.object({
|
|
6
5
|
alternative: z.string().describe('The alternative that was rejected'),
|
|
7
6
|
constraint: z.string().describe('The constraint ID that was violated (e.g., "zero-knowledge")'),
|
|
@@ -20,7 +19,7 @@ export const recordDecisionSchema = z.object({
|
|
|
20
19
|
consequences: z.string().optional().describe('Downstream implications of this decision'),
|
|
21
20
|
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.'),
|
|
22
21
|
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
|
+
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. Pass FULL decision IDs (36-char UUIDs) — a truncated 8-char prefix is rejected, because resolving it back would mean guessing which decision you meant. If you only have a prefix (e.g. read from a doc), look it up with get_decision_detail first and use the id it returns.'),
|
|
24
23
|
constraintsChecked: z.array(z.string()).optional().describe('Which architectural constraints were verified before this decision'),
|
|
25
24
|
constraintViolations: z.array(constraintViolationSchema).optional()
|
|
26
25
|
.describe('Alternatives that were rejected due to constraint violations'),
|
|
@@ -43,7 +42,6 @@ export const recordDecisionSchema = z.object({
|
|
|
43
42
|
baselineSha: z.string().optional().describe('The cSHA baseline the ranges are expressed in.'),
|
|
44
43
|
}).optional()
|
|
45
44
|
.describe('Layer C audit — set ONLY when this decision records how you resolved a completion-time code collision (i.e. after complete_intent returned resolution_required). Links the decision to the live peer you yielded to or overrode.'),
|
|
46
|
-
...forkFieldsExtensions,
|
|
47
45
|
});
|
|
48
46
|
export async function recordDecision(input) {
|
|
49
47
|
const origin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
@@ -67,7 +65,6 @@ export async function recordDecision(input) {
|
|
|
67
65
|
appliesWhen: input.appliesWhen,
|
|
68
66
|
surface: input.surface,
|
|
69
67
|
resolvedCollision: input.resolvedCollision,
|
|
70
|
-
...extractForkFields(input),
|
|
71
68
|
});
|
|
72
69
|
// A persisted decision ALWAYS has an id. Anything else — an explicit
|
|
73
70
|
// failure, or a response that merely omits `decisionId` — means nothing was
|
|
@@ -77,6 +74,7 @@ export async function recordDecision(input) {
|
|
|
77
74
|
// `{recorded: true, decisionId: ''}` and the caller silently lost the
|
|
78
75
|
// decision. Capture failures must be loud, never inferred from absence.
|
|
79
76
|
const decisionId = typeof res.decisionId === 'string' ? res.decisionId : '';
|
|
77
|
+
const summary = typeof res.summary === 'string' ? res.summary : input.summary;
|
|
80
78
|
if (res.success === false || !decisionId) {
|
|
81
79
|
return {
|
|
82
80
|
recorded: false,
|
|
@@ -85,7 +83,10 @@ export async function recordDecision(input) {
|
|
|
85
83
|
'The decision was NOT saved (Kawa Code returned no decision id). Nothing has been persisted — re-send this decision, and if it fails again report the failure rather than assuming it was captured.',
|
|
86
84
|
};
|
|
87
85
|
}
|
|
88
|
-
|
|
86
|
+
// Echo the summary back beside the id so the caller can name what it just
|
|
87
|
+
// recorded — "«summary» (id)" — instead of printing a bare id. Costs nothing:
|
|
88
|
+
// the value was supplied by this same call.
|
|
89
|
+
return { recorded: true, decisionId, summary };
|
|
89
90
|
}
|
|
90
91
|
export const recordDecisionTool = {
|
|
91
92
|
name: 'record_decision',
|
|
@@ -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,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACrE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8DAA8D,CAAC;IAC/F,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;CAC3E,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;IACzF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CA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KAC3C,CAAC,CAAA;IAEF,qEAAqE;IACrE,4EAA4E;IAC5E,kEAAkE;IAClE,6EAA6E;IAC7E,wEAAwE;IACxE,sEAAsE;IACtE,wEAAwE;IACxE,MAAM,UAAU,GAAG,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAA;IAC3E,MAAM,OAAO,GAAG,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAA;IAC7E,IAAI,GAAG,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;QACzC,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,EAAE;YACd,KAAK,EACH,GAAG,CAAC,KAAK;gBACT,oMAAoM;SACvM,CAAA;IACH,CAAC;IAED,0EAA0E;IAC1E,8EAA8E;IAC9E,4CAA4C;IAC5C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,CAAA;AAChD,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"}
|
|
@@ -13,20 +13,6 @@ import { type ProjectDecision } from './get-project-decisions.js';
|
|
|
13
13
|
* the full project list, but that's an optimization, not a requirement.
|
|
14
14
|
*/
|
|
15
15
|
export declare const resumeIntentSchema: z.ZodObject<{
|
|
16
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
17
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
18
|
-
user: z.ZodString;
|
|
19
|
-
forkOrigin: z.ZodString;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
platform: "github" | "gitlab";
|
|
22
|
-
user: string;
|
|
23
|
-
forkOrigin: string;
|
|
24
|
-
}, {
|
|
25
|
-
platform: "github" | "gitlab";
|
|
26
|
-
user: string;
|
|
27
|
-
forkOrigin: string;
|
|
28
|
-
}>>;
|
|
29
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
30
16
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
31
17
|
repoPath: z.ZodString;
|
|
32
18
|
intentId: z.ZodString;
|
|
@@ -34,22 +20,10 @@ export declare const resumeIntentSchema: z.ZodObject<{
|
|
|
34
20
|
repoPath: string;
|
|
35
21
|
intentId: string;
|
|
36
22
|
repoOrigin?: string | undefined;
|
|
37
|
-
forkAuthor?: {
|
|
38
|
-
platform: "github" | "gitlab";
|
|
39
|
-
user: string;
|
|
40
|
-
forkOrigin: string;
|
|
41
|
-
} | undefined;
|
|
42
|
-
workspaceId?: string | undefined;
|
|
43
23
|
}, {
|
|
44
24
|
repoPath: string;
|
|
45
25
|
intentId: string;
|
|
46
26
|
repoOrigin?: string | undefined;
|
|
47
|
-
forkAuthor?: {
|
|
48
|
-
platform: "github" | "gitlab";
|
|
49
|
-
user: string;
|
|
50
|
-
forkOrigin: string;
|
|
51
|
-
} | undefined;
|
|
52
|
-
workspaceId?: string | undefined;
|
|
53
27
|
}>;
|
|
54
28
|
export type ResumeIntentInput = z.infer<typeof resumeIntentSchema>;
|
|
55
29
|
export interface ResumeIntentResponse {
|
|
@@ -71,20 +45,6 @@ export declare const resumeIntentTool: {
|
|
|
71
45
|
name: string;
|
|
72
46
|
description: string;
|
|
73
47
|
inputSchema: z.ZodObject<{
|
|
74
|
-
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
75
|
-
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
76
|
-
user: z.ZodString;
|
|
77
|
-
forkOrigin: z.ZodString;
|
|
78
|
-
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
platform: "github" | "gitlab";
|
|
80
|
-
user: string;
|
|
81
|
-
forkOrigin: string;
|
|
82
|
-
}, {
|
|
83
|
-
platform: "github" | "gitlab";
|
|
84
|
-
user: string;
|
|
85
|
-
forkOrigin: string;
|
|
86
|
-
}>>;
|
|
87
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
88
48
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
89
49
|
repoPath: z.ZodString;
|
|
90
50
|
intentId: z.ZodString;
|
|
@@ -92,22 +52,10 @@ export declare const resumeIntentTool: {
|
|
|
92
52
|
repoPath: string;
|
|
93
53
|
intentId: string;
|
|
94
54
|
repoOrigin?: string | undefined;
|
|
95
|
-
forkAuthor?: {
|
|
96
|
-
platform: "github" | "gitlab";
|
|
97
|
-
user: string;
|
|
98
|
-
forkOrigin: string;
|
|
99
|
-
} | undefined;
|
|
100
|
-
workspaceId?: string | undefined;
|
|
101
55
|
}, {
|
|
102
56
|
repoPath: string;
|
|
103
57
|
intentId: string;
|
|
104
58
|
repoOrigin?: string | undefined;
|
|
105
|
-
forkAuthor?: {
|
|
106
|
-
platform: "github" | "gitlab";
|
|
107
|
-
user: string;
|
|
108
|
-
forkOrigin: string;
|
|
109
|
-
} | undefined;
|
|
110
|
-
workspaceId?: string | undefined;
|
|
111
59
|
}>;
|
|
112
60
|
handler: typeof resumeIntent;
|
|
113
61
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
import { activateIntent } from './activate-intent.js';
|
|
6
5
|
import { getProjectDecisions } from './get-project-decisions.js';
|
|
7
6
|
/**
|
|
@@ -20,13 +19,12 @@ export const resumeIntentSchema = z.object({
|
|
|
20
19
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
21
20
|
repoPath: z.string().describe('Local path to the repository root'),
|
|
22
21
|
intentId: z.string().describe('The cloud ID (preferred) or local UUID of the intent to resume — e.g. the id from a "follow up on intent <id>" handoff.'),
|
|
23
|
-
...forkFieldsExtensions,
|
|
24
22
|
});
|
|
25
23
|
export async function resumeIntent(input) {
|
|
26
24
|
// Resolve the origin once and pass it down, so the three sub-calls don't each
|
|
27
25
|
// re-shell out to git.
|
|
28
26
|
const origin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
29
|
-
const base = { repoOrigin: origin, repoPath: input.repoPath
|
|
27
|
+
const base = { repoOrigin: origin, repoPath: input.repoPath };
|
|
30
28
|
// 1. Adopt the intent as THIS session's current focus (multi-active — never
|
|
31
29
|
// displaces another session's current). Fail loud if it can't be activated.
|
|
32
30
|
const activated = await activateIntent({ ...base, intentId: input.intentId });
|
|
@@ -82,7 +80,11 @@ export async function resumeIntent(input) {
|
|
|
82
80
|
count: decisions.length,
|
|
83
81
|
message: intent
|
|
84
82
|
? `Resumed "${intent.title}" (${intent.status}) — ${decisions.length} recorded decision(s) loaded. Call get_decision_detail(id) for the full rationale on any of them.`
|
|
85
|
-
|
|
83
|
+
// No title to lead with — `intent:get` returned nothing. Print the id in
|
|
84
|
+
// FULL: an intent id is a Mongo ObjectId whose leading bytes are a
|
|
85
|
+
// creation timestamp, so a truncated one does not resolve to a single
|
|
86
|
+
// intent and would leave the reader with nothing they can look up.
|
|
87
|
+
: `Resumed intent ${input.intentId} — ${decisions.length} recorded decision(s) loaded.`,
|
|
86
88
|
};
|
|
87
89
|
}
|
|
88
90
|
export const resumeIntentTool = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume-intent.js","sourceRoot":"","sources":["../../src/tools/resume-intent.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,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.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>;
|
|
17
3
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
18
4
|
repoPath: z.ZodString;
|
|
19
5
|
intentId: z.ZodOptional<z.ZodString>;
|
|
@@ -33,12 +19,6 @@ export declare const updateIntentSchema: z.ZodObject<{
|
|
|
33
19
|
}, "strip", z.ZodTypeAny, {
|
|
34
20
|
repoPath: string;
|
|
35
21
|
repoOrigin?: string | undefined;
|
|
36
|
-
forkAuthor?: {
|
|
37
|
-
platform: "github" | "gitlab";
|
|
38
|
-
user: string;
|
|
39
|
-
forkOrigin: string;
|
|
40
|
-
} | undefined;
|
|
41
|
-
workspaceId?: string | undefined;
|
|
42
22
|
title?: string | undefined;
|
|
43
23
|
description?: string | undefined;
|
|
44
24
|
constraints?: string[] | undefined;
|
|
@@ -50,12 +30,6 @@ export declare const updateIntentSchema: z.ZodObject<{
|
|
|
50
30
|
}, {
|
|
51
31
|
repoPath: string;
|
|
52
32
|
repoOrigin?: string | undefined;
|
|
53
|
-
forkAuthor?: {
|
|
54
|
-
platform: "github" | "gitlab";
|
|
55
|
-
user: string;
|
|
56
|
-
forkOrigin: string;
|
|
57
|
-
} | undefined;
|
|
58
|
-
workspaceId?: string | undefined;
|
|
59
33
|
title?: string | undefined;
|
|
60
34
|
description?: string | undefined;
|
|
61
35
|
constraints?: string[] | undefined;
|
|
@@ -78,20 +52,6 @@ export declare const updateIntentTool: {
|
|
|
78
52
|
name: string;
|
|
79
53
|
description: string;
|
|
80
54
|
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>;
|
|
95
55
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
96
56
|
repoPath: z.ZodString;
|
|
97
57
|
intentId: z.ZodOptional<z.ZodString>;
|
|
@@ -111,12 +71,6 @@ export declare const updateIntentTool: {
|
|
|
111
71
|
}, "strip", z.ZodTypeAny, {
|
|
112
72
|
repoPath: string;
|
|
113
73
|
repoOrigin?: string | undefined;
|
|
114
|
-
forkAuthor?: {
|
|
115
|
-
platform: "github" | "gitlab";
|
|
116
|
-
user: string;
|
|
117
|
-
forkOrigin: string;
|
|
118
|
-
} | undefined;
|
|
119
|
-
workspaceId?: string | undefined;
|
|
120
74
|
title?: string | undefined;
|
|
121
75
|
description?: string | undefined;
|
|
122
76
|
constraints?: string[] | undefined;
|
|
@@ -128,12 +82,6 @@ export declare const updateIntentTool: {
|
|
|
128
82
|
}, {
|
|
129
83
|
repoPath: string;
|
|
130
84
|
repoOrigin?: string | undefined;
|
|
131
|
-
forkAuthor?: {
|
|
132
|
-
platform: "github" | "gitlab";
|
|
133
|
-
user: string;
|
|
134
|
-
forkOrigin: string;
|
|
135
|
-
} | undefined;
|
|
136
|
-
workspaceId?: string | undefined;
|
|
137
85
|
title?: string | undefined;
|
|
138
86
|
description?: string | undefined;
|
|
139
87
|
constraints?: string[] | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
export const updateIntentSchema = z.object({
|
|
6
5
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
7
6
|
repoPath: z.string().describe('Local path to the repository root'),
|
|
@@ -13,15 +12,13 @@ export const updateIntentSchema = z.object({
|
|
|
13
12
|
type: z.enum(['repo', 'folder', 'files']),
|
|
14
13
|
paths: z.array(z.string())
|
|
15
14
|
}).optional().describe('Updated scope for the intent'),
|
|
16
|
-
...forkFieldsExtensions,
|
|
17
15
|
});
|
|
18
16
|
export async function updateIntent(input) {
|
|
19
17
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
20
|
-
const forkFields = extractForkFields(input);
|
|
21
18
|
// Resolve the intent ID: use provided intentId, or look up the active intent
|
|
22
19
|
let intentId = input.intentId;
|
|
23
20
|
if (!intentId) {
|
|
24
|
-
const activeRes = await request('intent', 'get-active', { repoOrigin: actualOrigin
|
|
21
|
+
const activeRes = await request('intent', 'get-active', { repoOrigin: actualOrigin });
|
|
25
22
|
intentId = activeRes.intentId || activeRes.intent?.id || '';
|
|
26
23
|
if (!intentId) {
|
|
27
24
|
return {
|
|
@@ -63,7 +60,6 @@ export async function updateIntent(input) {
|
|
|
63
60
|
id: intentId,
|
|
64
61
|
repoOrigin: actualOrigin,
|
|
65
62
|
updates,
|
|
66
|
-
...forkFields,
|
|
67
63
|
});
|
|
68
64
|
if (res.success === false) {
|
|
69
65
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-intent.js","sourceRoot":"","sources":["../../src/tools/update-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,E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