@kawacode/mcp 5.2.0 → 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/services/muninn-ipc.d.ts +10 -5
- package/build/services/muninn-ipc.js +13 -8
- 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 +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 +33 -16
- 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,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,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,0DAA0D,CAAC;IAC9F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC,QAAQ,CAAC,kFAAkF,CAAC;IAC9J,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+EAA+E,CAAC;IACzH,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qEAAqE,CAAC;IACjH,GAAG,oBAAoB;CACxB,CAAC,CAAA;AASF,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,KAA2B;IAC/D,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE;QAC/C,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,GAAG,iBAAiB,CAAC,KAAK,CAAC;KAC5B,CAAC,CAAA;IAEF,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,iFAAiF;KAC1G,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE;;;;;;;;;;;;iHAYkG;IAC/G,WAAW,EAAE,qBAAqB;IAClC,OAAO,EAAE,eAAe;CACzB,CAAA"}
|
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
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
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
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 getIntentChangesSchema = z.object({
|
|
5
6
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
6
|
-
repoPath: z.string().describe('Local path to the repository root')
|
|
7
|
+
repoPath: z.string().describe('Local path to the repository root'),
|
|
8
|
+
...forkFieldsExtensions,
|
|
7
9
|
});
|
|
8
10
|
export async function getIntentChanges(input) {
|
|
9
11
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
10
12
|
const res = await request('intent', 'get-changes', {
|
|
11
13
|
repoOrigin: actualOrigin,
|
|
12
14
|
repoPath: input.repoPath,
|
|
15
|
+
...extractForkFields(input),
|
|
13
16
|
});
|
|
14
17
|
const modified = (res.changes?.modified || res.modified || []).map((f) => ({
|
|
15
18
|
filePath: f.filePath || f,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-intent-changes.js","sourceRoot":"","sources":["../../src/tools/get-intent-changes.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":"get-intent-changes.js","sourceRoot":"","sources":["../../src/tools/get-intent-changes.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,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClE,GAAG,oBAAoB;CACxB,CAAC,CAAA;AA2BF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,KAA4B;IACjE,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IAEpE,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,aAAa,EAAE;QACjD,UAAU,EAAE,YAAY;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,GAAG,iBAAiB,C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AE,GAAG,CAAC,MAAM,CAAC,UAAU,IAAI,GAAG,CAAC,MAAM,CAAC,SAAS;SACzD,CAAC,CAAC,CAAC,SAAS;QACb,OAAO,EAAE;YACP,QAAQ;YACR,SAAS;YACT,UAAU,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM;SAC/C;QACD,QAAQ;KACT,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;;;;qEAQsD;IACnE,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,gBAAgB;CAC1B,CAAA"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const getIntentsForFileSchema: 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
|
filePath: z.ZodString;
|
|
@@ -7,10 +21,22 @@ export declare const getIntentsForFileSchema: z.ZodObject<{
|
|
|
7
21
|
repoPath: string;
|
|
8
22
|
filePath: string;
|
|
9
23
|
repoOrigin?: string | undefined;
|
|
24
|
+
forkAuthor?: {
|
|
25
|
+
platform: "github" | "gitlab";
|
|
26
|
+
user: string;
|
|
27
|
+
forkOrigin: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
workspaceId?: string | undefined;
|
|
10
30
|
}, {
|
|
11
31
|
repoPath: string;
|
|
12
32
|
filePath: string;
|
|
13
33
|
repoOrigin?: string | undefined;
|
|
34
|
+
forkAuthor?: {
|
|
35
|
+
platform: "github" | "gitlab";
|
|
36
|
+
user: string;
|
|
37
|
+
forkOrigin: string;
|
|
38
|
+
} | undefined;
|
|
39
|
+
workspaceId?: string | undefined;
|
|
14
40
|
}>;
|
|
15
41
|
export type GetIntentsForFileInput = z.infer<typeof getIntentsForFileSchema>;
|
|
16
42
|
export interface FileIntentBlock {
|
|
@@ -41,6 +67,20 @@ export declare const getIntentsForFileTool: {
|
|
|
41
67
|
name: string;
|
|
42
68
|
description: string;
|
|
43
69
|
inputSchema: z.ZodObject<{
|
|
70
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
72
|
+
user: z.ZodString;
|
|
73
|
+
forkOrigin: z.ZodString;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
platform: "github" | "gitlab";
|
|
76
|
+
user: string;
|
|
77
|
+
forkOrigin: string;
|
|
78
|
+
}, {
|
|
79
|
+
platform: "github" | "gitlab";
|
|
80
|
+
user: string;
|
|
81
|
+
forkOrigin: string;
|
|
82
|
+
}>>;
|
|
83
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
44
84
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
45
85
|
repoPath: z.ZodString;
|
|
46
86
|
filePath: z.ZodString;
|
|
@@ -48,10 +88,22 @@ export declare const getIntentsForFileTool: {
|
|
|
48
88
|
repoPath: string;
|
|
49
89
|
filePath: string;
|
|
50
90
|
repoOrigin?: string | undefined;
|
|
91
|
+
forkAuthor?: {
|
|
92
|
+
platform: "github" | "gitlab";
|
|
93
|
+
user: string;
|
|
94
|
+
forkOrigin: string;
|
|
95
|
+
} | undefined;
|
|
96
|
+
workspaceId?: string | undefined;
|
|
51
97
|
}, {
|
|
52
98
|
repoPath: string;
|
|
53
99
|
filePath: string;
|
|
54
100
|
repoOrigin?: string | undefined;
|
|
101
|
+
forkAuthor?: {
|
|
102
|
+
platform: "github" | "gitlab";
|
|
103
|
+
user: string;
|
|
104
|
+
forkOrigin: string;
|
|
105
|
+
} | undefined;
|
|
106
|
+
workspaceId?: string | undefined;
|
|
55
107
|
}>;
|
|
56
108
|
handler: typeof getIntentsForFile;
|
|
57
109
|
};
|
|
@@ -1,16 +1,19 @@
|
|
|
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 getIntentsForFileSchema = 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
|
-
filePath: z.string().describe('Path to the file (relative to repo root)')
|
|
8
|
+
filePath: z.string().describe('Path to the file (relative to repo root)'),
|
|
9
|
+
...forkFieldsExtensions,
|
|
8
10
|
});
|
|
9
11
|
export async function getIntentsForFile(input) {
|
|
10
12
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
11
13
|
const res = await request('intent-block', 'get-for-file', {
|
|
12
14
|
repoOrigin: actualOrigin,
|
|
13
15
|
filePath: input.filePath,
|
|
16
|
+
...extractForkFields(input),
|
|
14
17
|
});
|
|
15
18
|
const intents = (res.intents || []).map((intent) => ({
|
|
16
19
|
intentId: intent.intentId || intent.id || '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-intents-for-file.js","sourceRoot":"","sources":["../../src/tools/get-intents-for-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,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O,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG;YAC1D,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,+BAA+B,YAAY,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;IAEpG,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,OAAO;QACP,YAAY;QACZ,OAAO;KACR,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE;;;;;;;2EAO4D;IACzE,WAAW,EAAE,uBAAuB;IACpC,OAAO,EAAE,iBAAiB;CAC3B,CAAA"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const getIntentsForLinesSchema: 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
|
filePath: z.ZodString;
|
|
@@ -11,12 +25,24 @@ export declare const getIntentsForLinesSchema: z.ZodObject<{
|
|
|
11
25
|
startLine: number;
|
|
12
26
|
endLine: number;
|
|
13
27
|
repoOrigin?: string | undefined;
|
|
28
|
+
forkAuthor?: {
|
|
29
|
+
platform: "github" | "gitlab";
|
|
30
|
+
user: string;
|
|
31
|
+
forkOrigin: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
workspaceId?: string | undefined;
|
|
14
34
|
}, {
|
|
15
35
|
repoPath: string;
|
|
16
36
|
filePath: string;
|
|
17
37
|
startLine: number;
|
|
18
38
|
endLine: number;
|
|
19
39
|
repoOrigin?: string | undefined;
|
|
40
|
+
forkAuthor?: {
|
|
41
|
+
platform: "github" | "gitlab";
|
|
42
|
+
user: string;
|
|
43
|
+
forkOrigin: string;
|
|
44
|
+
} | undefined;
|
|
45
|
+
workspaceId?: string | undefined;
|
|
20
46
|
}>;
|
|
21
47
|
export type GetIntentsForLinesInput = z.infer<typeof getIntentsForLinesSchema>;
|
|
22
48
|
export interface LineRangeIntent {
|
|
@@ -49,6 +75,20 @@ export declare const getIntentsForLinesTool: {
|
|
|
49
75
|
name: string;
|
|
50
76
|
description: string;
|
|
51
77
|
inputSchema: z.ZodObject<{
|
|
78
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
80
|
+
user: z.ZodString;
|
|
81
|
+
forkOrigin: z.ZodString;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
platform: "github" | "gitlab";
|
|
84
|
+
user: string;
|
|
85
|
+
forkOrigin: string;
|
|
86
|
+
}, {
|
|
87
|
+
platform: "github" | "gitlab";
|
|
88
|
+
user: string;
|
|
89
|
+
forkOrigin: string;
|
|
90
|
+
}>>;
|
|
91
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
52
92
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
53
93
|
repoPath: z.ZodString;
|
|
54
94
|
filePath: z.ZodString;
|
|
@@ -60,12 +100,24 @@ export declare const getIntentsForLinesTool: {
|
|
|
60
100
|
startLine: number;
|
|
61
101
|
endLine: number;
|
|
62
102
|
repoOrigin?: string | undefined;
|
|
103
|
+
forkAuthor?: {
|
|
104
|
+
platform: "github" | "gitlab";
|
|
105
|
+
user: string;
|
|
106
|
+
forkOrigin: string;
|
|
107
|
+
} | undefined;
|
|
108
|
+
workspaceId?: string | undefined;
|
|
63
109
|
}, {
|
|
64
110
|
repoPath: string;
|
|
65
111
|
filePath: string;
|
|
66
112
|
startLine: number;
|
|
67
113
|
endLine: number;
|
|
68
114
|
repoOrigin?: string | undefined;
|
|
115
|
+
forkAuthor?: {
|
|
116
|
+
platform: "github" | "gitlab";
|
|
117
|
+
user: string;
|
|
118
|
+
forkOrigin: string;
|
|
119
|
+
} | undefined;
|
|
120
|
+
workspaceId?: string | undefined;
|
|
69
121
|
}>;
|
|
70
122
|
handler: typeof getIntentsForLines;
|
|
71
123
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
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 getIntentsForLinesSchema = 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
|
filePath: z.string().describe('Path to the file (relative to repo root)'),
|
|
8
9
|
startLine: z.number().min(1).describe('Start line number (1-based)'),
|
|
9
|
-
endLine: z.number().min(1).describe('End line number (1-based, inclusive)')
|
|
10
|
+
endLine: z.number().min(1).describe('End line number (1-based, inclusive)'),
|
|
11
|
+
...forkFieldsExtensions,
|
|
10
12
|
});
|
|
11
13
|
export async function getIntentsForLines(input) {
|
|
12
14
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
@@ -15,6 +17,7 @@ export async function getIntentsForLines(input) {
|
|
|
15
17
|
filePath: input.filePath,
|
|
16
18
|
startLine: input.startLine,
|
|
17
19
|
endLine: input.endLine,
|
|
20
|
+
...extractForkFields(input),
|
|
18
21
|
});
|
|
19
22
|
const overlappingIntents = (res.intents || []).map((intent) => ({
|
|
20
23
|
intentId: intent.intentId || intent.id || '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-intents-for-lines.js","sourceRoot":"","sources":["../../src/tools/get-intents-for-lines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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":"get-intents-for-lines.js","sourceRoot":"","sources":["../../src/tools/get-intents-for-lines.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,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACzE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACpE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC3E,GAAG,oBAAoB;CACxB,CAAC,CAAA;AA4BF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAA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+
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 GetProjectDecisionsInput = z.infer<typeof getProjectDecisionsSchema>;
|
|
13
39
|
export interface ConstraintViolation {
|
|
@@ -39,14 +65,40 @@ export declare const getProjectDecisionsTool: {
|
|
|
39
65
|
name: string;
|
|
40
66
|
description: string;
|
|
41
67
|
inputSchema: z.ZodObject<{
|
|
68
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
70
|
+
user: z.ZodString;
|
|
71
|
+
forkOrigin: z.ZodString;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
platform: "github" | "gitlab";
|
|
74
|
+
user: string;
|
|
75
|
+
forkOrigin: string;
|
|
76
|
+
}, {
|
|
77
|
+
platform: "github" | "gitlab";
|
|
78
|
+
user: string;
|
|
79
|
+
forkOrigin: string;
|
|
80
|
+
}>>;
|
|
81
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
42
82
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
43
83
|
repoPath: z.ZodString;
|
|
44
84
|
}, "strip", z.ZodTypeAny, {
|
|
45
85
|
repoPath: string;
|
|
46
86
|
repoOrigin?: string | undefined;
|
|
87
|
+
forkAuthor?: {
|
|
88
|
+
platform: "github" | "gitlab";
|
|
89
|
+
user: string;
|
|
90
|
+
forkOrigin: string;
|
|
91
|
+
} | undefined;
|
|
92
|
+
workspaceId?: string | undefined;
|
|
47
93
|
}, {
|
|
48
94
|
repoPath: string;
|
|
49
95
|
repoOrigin?: string | undefined;
|
|
96
|
+
forkAuthor?: {
|
|
97
|
+
platform: "github" | "gitlab";
|
|
98
|
+
user: string;
|
|
99
|
+
forkOrigin: string;
|
|
100
|
+
} | undefined;
|
|
101
|
+
workspaceId?: string | undefined;
|
|
50
102
|
}>;
|
|
51
103
|
handler: typeof getProjectDecisions;
|
|
52
104
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
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 getProjectDecisionsSchema = z.object({
|
|
5
6
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
6
|
-
repoPath: z.string().describe('Local path to the repository root')
|
|
7
|
+
repoPath: z.string().describe('Local path to the repository root'),
|
|
8
|
+
...forkFieldsExtensions,
|
|
7
9
|
});
|
|
8
10
|
export async function getProjectDecisions(input) {
|
|
9
11
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
10
12
|
const res = await request('decision', 'project-list', {
|
|
11
13
|
repoOrigin: actualOrigin,
|
|
14
|
+
...extractForkFields(input),
|
|
12
15
|
});
|
|
13
16
|
const decisions = (res.decisions || []).map((d) => ({
|
|
14
17
|
intentId: d.intent_id || d.intentId || d.intent_ids?.[0] || d.intentIds?.[0] || '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-project-decisions.js","sourceRoot":"","sources":["../../src/tools/get-project-decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"get-project-decisions.js","sourceRoot":"","sources":["../../src/tools/get-project-decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE3E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClE,GAAG,oBAAoB;CACxB,CAAC,CAAA;AA+BF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAA+B;IACvE,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,Q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