@kawacode/mcp 6.1.2 → 6.6.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 +2 -0
- package/build/index.js +16 -1
- package/build/index.js.map +1 -1
- package/build/kawacode-on-pre-edit.d.ts +5 -0
- package/build/kawacode-on-pre-edit.js +45 -6
- package/build/kawacode-on-pre-edit.js.map +1 -1
- package/build/kawacode-on-stop.d.ts +49 -23
- package/build/kawacode-on-stop.js +233 -38
- package/build/kawacode-on-stop.js.map +1 -1
- package/build/services/muninn-ipc.d.ts +19 -1
- package/build/services/muninn-ipc.js +20 -2
- package/build/services/muninn-ipc.js.map +1 -1
- package/build/stop/uncompleted-commit.d.ts +45 -0
- package/build/stop/uncompleted-commit.js +117 -0
- package/build/stop/uncompleted-commit.js.map +1 -0
- package/build/stop/uncompleted-commit.test.d.ts +1 -0
- package/build/stop/uncompleted-commit.test.js +105 -0
- package/build/stop/uncompleted-commit.test.js.map +1 -0
- package/build/tools/activate-intent.d.ts +1 -14
- package/build/tools/activate-intent.js +17 -56
- package/build/tools/activate-intent.js.map +1 -1
- package/build/tools/arbiter-apply.d.ts +132 -0
- package/build/tools/arbiter-apply.js +59 -0
- package/build/tools/arbiter-apply.js.map +1 -0
- package/build/tools/arbiter-resolve.d.ts +132 -0
- package/build/tools/arbiter-resolve.js +58 -0
- package/build/tools/arbiter-resolve.js.map +1 -0
- package/build/tools/check-active-intent.d.ts +21 -12
- package/build/tools/check-active-intent.js +26 -13
- package/build/tools/check-active-intent.js.map +1 -1
- package/build/tools/complete-intent.d.ts +29 -0
- package/build/tools/complete-intent.js +26 -28
- package/build/tools/complete-intent.js.map +1 -1
- package/build/tools/create-intent.d.ts +1 -21
- package/build/tools/create-intent.js +18 -106
- package/build/tools/create-intent.js.map +1 -1
- package/build/tools/get-decision-detail.d.ts +109 -0
- package/build/tools/get-decision-detail.js +57 -0
- package/build/tools/get-decision-detail.js.map +1 -0
- package/build/tools/get-project-decisions.d.ts +0 -4
- package/build/tools/get-project-decisions.js +4 -6
- package/build/tools/get-project-decisions.js.map +1 -1
- package/build/tools/get-relevant-context.d.ts +0 -1
- package/build/tools/get-relevant-context.js +4 -2
- package/build/tools/get-relevant-context.js.map +1 -1
- package/build/tools/get-resolution-context.d.ts +154 -0
- package/build/tools/get-resolution-context.js +78 -0
- package/build/tools/get-resolution-context.js.map +1 -0
- package/build/tools/get-session-decisions.d.ts +0 -5
- package/build/tools/get-session-decisions.js +5 -5
- package/build/tools/get-session-decisions.js.map +1 -1
- package/build/tools/index.d.ts +225 -7
- package/build/tools/index.js +18 -3
- package/build/tools/index.js.map +1 -1
- package/build/tools/infer-history.d.ts +16 -0
- package/build/tools/infer-history.js +27 -0
- package/build/tools/infer-history.js.map +1 -1
- package/build/tools/list-team-intents.d.ts +6 -6
- package/build/tools/list-team-intents.js +21 -32
- package/build/tools/list-team-intents.js.map +1 -1
- package/build/tools/pre-edit-decision-check.js +2 -0
- package/build/tools/pre-edit-decision-check.js.map +1 -1
- package/build/tools/record-decision.d.ts +76 -0
- package/build/tools/record-decision.js +10 -0
- package/build/tools/record-decision.js.map +1 -1
- package/build/tools/update-features.d.ts +31 -0
- package/build/tools/update-features.js +51 -0
- package/build/tools/update-features.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const arbiterApplySchema: 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>;
|
|
17
|
+
repoPath: z.ZodString;
|
|
18
|
+
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
19
|
+
intentId: z.ZodOptional<z.ZodString>;
|
|
20
|
+
overlaps: z.ZodArray<z.ZodObject<{
|
|
21
|
+
peerUid: z.ZodString;
|
|
22
|
+
filePath: z.ZodString;
|
|
23
|
+
ranges: z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
filePath: string;
|
|
26
|
+
peerUid: string;
|
|
27
|
+
ranges: number[][];
|
|
28
|
+
}, {
|
|
29
|
+
filePath: string;
|
|
30
|
+
peerUid: string;
|
|
31
|
+
ranges: number[][];
|
|
32
|
+
}>, "many">;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
repoPath: string;
|
|
35
|
+
overlaps: {
|
|
36
|
+
filePath: string;
|
|
37
|
+
peerUid: string;
|
|
38
|
+
ranges: number[][];
|
|
39
|
+
}[];
|
|
40
|
+
repoOrigin?: string | undefined;
|
|
41
|
+
forkAuthor?: {
|
|
42
|
+
platform: "github" | "gitlab";
|
|
43
|
+
user: string;
|
|
44
|
+
forkOrigin: string;
|
|
45
|
+
} | undefined;
|
|
46
|
+
workspaceId?: string | undefined;
|
|
47
|
+
intentId?: string | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
repoPath: string;
|
|
50
|
+
overlaps: {
|
|
51
|
+
filePath: string;
|
|
52
|
+
peerUid: string;
|
|
53
|
+
ranges: number[][];
|
|
54
|
+
}[];
|
|
55
|
+
repoOrigin?: string | undefined;
|
|
56
|
+
forkAuthor?: {
|
|
57
|
+
platform: "github" | "gitlab";
|
|
58
|
+
user: string;
|
|
59
|
+
forkOrigin: string;
|
|
60
|
+
} | undefined;
|
|
61
|
+
workspaceId?: string | undefined;
|
|
62
|
+
intentId?: string | undefined;
|
|
63
|
+
}>;
|
|
64
|
+
export type ArbiterApplyInput = z.infer<typeof arbiterApplySchema>;
|
|
65
|
+
export declare function arbiterApply(input: ArbiterApplyInput): Promise<any>;
|
|
66
|
+
export declare const arbiterApplyTool: {
|
|
67
|
+
name: string;
|
|
68
|
+
description: string;
|
|
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>;
|
|
84
|
+
repoPath: z.ZodString;
|
|
85
|
+
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
86
|
+
intentId: z.ZodOptional<z.ZodString>;
|
|
87
|
+
overlaps: z.ZodArray<z.ZodObject<{
|
|
88
|
+
peerUid: z.ZodString;
|
|
89
|
+
filePath: z.ZodString;
|
|
90
|
+
ranges: z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
filePath: string;
|
|
93
|
+
peerUid: string;
|
|
94
|
+
ranges: number[][];
|
|
95
|
+
}, {
|
|
96
|
+
filePath: string;
|
|
97
|
+
peerUid: string;
|
|
98
|
+
ranges: number[][];
|
|
99
|
+
}>, "many">;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
repoPath: string;
|
|
102
|
+
overlaps: {
|
|
103
|
+
filePath: string;
|
|
104
|
+
peerUid: string;
|
|
105
|
+
ranges: number[][];
|
|
106
|
+
}[];
|
|
107
|
+
repoOrigin?: string | undefined;
|
|
108
|
+
forkAuthor?: {
|
|
109
|
+
platform: "github" | "gitlab";
|
|
110
|
+
user: string;
|
|
111
|
+
forkOrigin: string;
|
|
112
|
+
} | undefined;
|
|
113
|
+
workspaceId?: string | undefined;
|
|
114
|
+
intentId?: string | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
repoPath: string;
|
|
117
|
+
overlaps: {
|
|
118
|
+
filePath: string;
|
|
119
|
+
peerUid: string;
|
|
120
|
+
ranges: number[][];
|
|
121
|
+
}[];
|
|
122
|
+
repoOrigin?: string | undefined;
|
|
123
|
+
forkAuthor?: {
|
|
124
|
+
platform: "github" | "gitlab";
|
|
125
|
+
user: string;
|
|
126
|
+
forkOrigin: string;
|
|
127
|
+
} | undefined;
|
|
128
|
+
workspaceId?: string | undefined;
|
|
129
|
+
intentId?: string | undefined;
|
|
130
|
+
}>;
|
|
131
|
+
handler: typeof arbiterApply;
|
|
132
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* arbiter_apply — thin forwarder to Muninn `arbiter:apply` (Arbiter v2).
|
|
7
|
+
* Judges → adversarially verifies → auto-applies only the trivial tier, and ONLY
|
|
8
|
+
* in an agent-owned worktree. All judgment/verify/write/republish lives in Muninn;
|
|
9
|
+
* this is a stateless adapter.
|
|
10
|
+
*/
|
|
11
|
+
const overlapSchema = z.object({
|
|
12
|
+
peerUid: z
|
|
13
|
+
.string()
|
|
14
|
+
.describe('The peer HAI whose live edits overlap — a collision `uid` from the Stop report.'),
|
|
15
|
+
filePath: z.string().describe('File with the overlap, relative to repoPath.'),
|
|
16
|
+
ranges: z
|
|
17
|
+
.array(z.array(z.number()))
|
|
18
|
+
.describe('Overlapping [start, end] line ranges (cSHA line space) from the collision.'),
|
|
19
|
+
});
|
|
20
|
+
export const arbiterApplySchema = z.object({
|
|
21
|
+
repoPath: z.string().describe('Local path to the repository root'),
|
|
22
|
+
repoOrigin: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
26
|
+
intentId: z
|
|
27
|
+
.string()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('Active intent ID (advisory; the auto-resolution decision is recorded under it).'),
|
|
30
|
+
overlaps: z
|
|
31
|
+
.array(overlapSchema)
|
|
32
|
+
.describe('The overlaps to resolve — each { peerUid, filePath, ranges } from the Stop collision report.'),
|
|
33
|
+
...forkFieldsExtensions,
|
|
34
|
+
});
|
|
35
|
+
export async function arbiterApply(input) {
|
|
36
|
+
const repoOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
37
|
+
const res = await request('arbiter', 'apply', {
|
|
38
|
+
repoOrigin,
|
|
39
|
+
repoPath: input.repoPath,
|
|
40
|
+
intentId: input.intentId,
|
|
41
|
+
overlaps: input.overlaps,
|
|
42
|
+
...extractForkFields(input),
|
|
43
|
+
});
|
|
44
|
+
return res;
|
|
45
|
+
}
|
|
46
|
+
export const arbiterApplyTool = {
|
|
47
|
+
name: 'arbiter_apply',
|
|
48
|
+
description: 'Resolve live code overlaps and AUTO-APPLY the safe tier. Kawa judges → adversarially verifies → and, ' +
|
|
49
|
+
'for the trivial tier only (high-confidence single-range merge that passes verify), writes the merge to ' +
|
|
50
|
+
'your worktree, records a decision, and republishes. Writes happen ONLY in an agent-owned worktree (a ' +
|
|
51
|
+
'linked git worktree); on a human checkout — or when a peer holds the file-set lock — it behaves like ' +
|
|
52
|
+
'arbiter_resolve (suggest-only, no writes). Returns per-overlap outcomes { tier, applied, announcement, ' +
|
|
53
|
+
'verifyIssue?, verdict }. Call it when you are ready to incorporate the result, then RE-READ any file it ' +
|
|
54
|
+
'applied to (it changed on disk). For surfaced (not-applied) overlaps, use get_resolution_context to see ' +
|
|
55
|
+
'the peer code and resolve manually.',
|
|
56
|
+
inputSchema: arbiterApplySchema,
|
|
57
|
+
handler: arbiterApply,
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=arbiter-apply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arbiter-apply.js","sourceRoot":"","sources":["../../src/tools/arbiter-apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,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;;;;;GAKG;AACH,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,CAAC,iFAAiF,CAAC;IAC9F,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IAC7E,MAAM,EAAE,CAAC;SACN,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;SAC1B,QAAQ,CAAC,4EAA4E,CAAC;CAC1F,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClE,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,6EAA6E,CAAC;IAC1F,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,iFAAiF,CAAC;IAC9F,QAAQ,EAAE,CAAC;SACR,KAAK,CAAC,aAAa,CAAC;SACpB,QAAQ,CAAC,8FAA8F,CAAC;IAC3G,GAAG,oBAAoB;CACxB,CAAC,CAAA;AAIF,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,KAAwB;IACzD,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IAClE,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE;QAC5C,UAAU;QACV,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,GAAG,iBAAiB,CAAC,KAAK,CAAC;KAC5B,CAAC,CAAA;IACF,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,uGAAuG;QACvG,yGAAyG;QACzG,uGAAuG;QACvG,uGAAuG;QACvG,yGAAyG;QACzG,0GAA0G;QAC1G,0GAA0G;QAC1G,qCAAqC;IACvC,WAAW,EAAE,kBAAkB;IAC/B,OAAO,EAAE,YAAY;CACtB,CAAA"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const arbiterResolveSchema: 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>;
|
|
17
|
+
repoPath: z.ZodString;
|
|
18
|
+
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
19
|
+
intentId: z.ZodOptional<z.ZodString>;
|
|
20
|
+
overlaps: z.ZodArray<z.ZodObject<{
|
|
21
|
+
peerUid: z.ZodString;
|
|
22
|
+
filePath: z.ZodString;
|
|
23
|
+
ranges: z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
filePath: string;
|
|
26
|
+
peerUid: string;
|
|
27
|
+
ranges: number[][];
|
|
28
|
+
}, {
|
|
29
|
+
filePath: string;
|
|
30
|
+
peerUid: string;
|
|
31
|
+
ranges: number[][];
|
|
32
|
+
}>, "many">;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
repoPath: string;
|
|
35
|
+
overlaps: {
|
|
36
|
+
filePath: string;
|
|
37
|
+
peerUid: string;
|
|
38
|
+
ranges: number[][];
|
|
39
|
+
}[];
|
|
40
|
+
repoOrigin?: string | undefined;
|
|
41
|
+
forkAuthor?: {
|
|
42
|
+
platform: "github" | "gitlab";
|
|
43
|
+
user: string;
|
|
44
|
+
forkOrigin: string;
|
|
45
|
+
} | undefined;
|
|
46
|
+
workspaceId?: string | undefined;
|
|
47
|
+
intentId?: string | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
repoPath: string;
|
|
50
|
+
overlaps: {
|
|
51
|
+
filePath: string;
|
|
52
|
+
peerUid: string;
|
|
53
|
+
ranges: number[][];
|
|
54
|
+
}[];
|
|
55
|
+
repoOrigin?: string | undefined;
|
|
56
|
+
forkAuthor?: {
|
|
57
|
+
platform: "github" | "gitlab";
|
|
58
|
+
user: string;
|
|
59
|
+
forkOrigin: string;
|
|
60
|
+
} | undefined;
|
|
61
|
+
workspaceId?: string | undefined;
|
|
62
|
+
intentId?: string | undefined;
|
|
63
|
+
}>;
|
|
64
|
+
export type ArbiterResolveInput = z.infer<typeof arbiterResolveSchema>;
|
|
65
|
+
export declare function arbiterResolve(input: ArbiterResolveInput): Promise<any>;
|
|
66
|
+
export declare const arbiterResolveTool: {
|
|
67
|
+
name: string;
|
|
68
|
+
description: string;
|
|
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>;
|
|
84
|
+
repoPath: z.ZodString;
|
|
85
|
+
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
86
|
+
intentId: z.ZodOptional<z.ZodString>;
|
|
87
|
+
overlaps: z.ZodArray<z.ZodObject<{
|
|
88
|
+
peerUid: z.ZodString;
|
|
89
|
+
filePath: z.ZodString;
|
|
90
|
+
ranges: z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
filePath: string;
|
|
93
|
+
peerUid: string;
|
|
94
|
+
ranges: number[][];
|
|
95
|
+
}, {
|
|
96
|
+
filePath: string;
|
|
97
|
+
peerUid: string;
|
|
98
|
+
ranges: number[][];
|
|
99
|
+
}>, "many">;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
repoPath: string;
|
|
102
|
+
overlaps: {
|
|
103
|
+
filePath: string;
|
|
104
|
+
peerUid: string;
|
|
105
|
+
ranges: number[][];
|
|
106
|
+
}[];
|
|
107
|
+
repoOrigin?: string | undefined;
|
|
108
|
+
forkAuthor?: {
|
|
109
|
+
platform: "github" | "gitlab";
|
|
110
|
+
user: string;
|
|
111
|
+
forkOrigin: string;
|
|
112
|
+
} | undefined;
|
|
113
|
+
workspaceId?: string | undefined;
|
|
114
|
+
intentId?: string | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
repoPath: string;
|
|
117
|
+
overlaps: {
|
|
118
|
+
filePath: string;
|
|
119
|
+
peerUid: string;
|
|
120
|
+
ranges: number[][];
|
|
121
|
+
}[];
|
|
122
|
+
repoOrigin?: string | undefined;
|
|
123
|
+
forkAuthor?: {
|
|
124
|
+
platform: "github" | "gitlab";
|
|
125
|
+
user: string;
|
|
126
|
+
forkOrigin: string;
|
|
127
|
+
} | undefined;
|
|
128
|
+
workspaceId?: string | undefined;
|
|
129
|
+
intentId?: string | undefined;
|
|
130
|
+
}>;
|
|
131
|
+
handler: typeof arbiterResolve;
|
|
132
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
* arbiter_resolve — thin forwarder to Muninn `arbiter:resolve` (Arbiter v2).
|
|
7
|
+
* Suggest-only: judges live code overlaps with peers and returns verdicts; never
|
|
8
|
+
* writes. All decrypt + judgment lives in Muninn (zero-knowledge); this is a
|
|
9
|
+
* stateless adapter.
|
|
10
|
+
*/
|
|
11
|
+
const overlapSchema = z.object({
|
|
12
|
+
peerUid: z
|
|
13
|
+
.string()
|
|
14
|
+
.describe('The peer HAI whose live edits overlap — a collision `uid` from the Stop report.'),
|
|
15
|
+
filePath: z.string().describe('File with the overlap, relative to repoPath.'),
|
|
16
|
+
ranges: z
|
|
17
|
+
.array(z.array(z.number()))
|
|
18
|
+
.describe('Overlapping [start, end] line ranges (cSHA line space) from the collision.'),
|
|
19
|
+
});
|
|
20
|
+
export const arbiterResolveSchema = z.object({
|
|
21
|
+
repoPath: z.string().describe('Local path to the repository root'),
|
|
22
|
+
repoOrigin: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
26
|
+
intentId: z
|
|
27
|
+
.string()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('Active intent ID (advisory). Auto-detected by Kawa Code when omitted.'),
|
|
30
|
+
overlaps: z
|
|
31
|
+
.array(overlapSchema)
|
|
32
|
+
.describe('The overlaps to judge — each { peerUid, filePath, ranges } from the Stop collision report.'),
|
|
33
|
+
...forkFieldsExtensions,
|
|
34
|
+
});
|
|
35
|
+
export async function arbiterResolve(input) {
|
|
36
|
+
const repoOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
37
|
+
const res = await request('arbiter', 'resolve', {
|
|
38
|
+
repoOrigin,
|
|
39
|
+
repoPath: input.repoPath,
|
|
40
|
+
intentId: input.intentId,
|
|
41
|
+
overlaps: input.overlaps,
|
|
42
|
+
...extractForkFields(input),
|
|
43
|
+
});
|
|
44
|
+
return res;
|
|
45
|
+
}
|
|
46
|
+
export const arbiterResolveTool = {
|
|
47
|
+
name: 'arbiter_resolve',
|
|
48
|
+
description: 'Get Kawa Code\'s AI verdict for live code overlaps with peers — SUGGEST-ONLY, never writes. ' +
|
|
49
|
+
'For each overlap ({peerUid, filePath, ranges} from the Stop collision report), Kawa decrypts the ' +
|
|
50
|
+
"peer's version locally (zero-knowledge) and judges it compatible / auto_resolvable / conflict, with " +
|
|
51
|
+
'confidence, a perf/security risk read, and a tier (0 no-op · 1 trivially auto-appliable · 2 ' +
|
|
52
|
+
'draft-and-confirm · 3 conflict). Use it to understand a forming conflict before acting. For a ' +
|
|
53
|
+
'surfaced tier-2/3 overlap, call get_resolution_context to read the peer\'s actual code. To actually ' +
|
|
54
|
+
'apply the safe tier, use arbiter_apply.',
|
|
55
|
+
inputSchema: arbiterResolveSchema,
|
|
56
|
+
handler: arbiterResolve,
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=arbiter-resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arbiter-resolve.js","sourceRoot":"","sources":["../../src/tools/arbiter-resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,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;;;;;GAKG;AACH,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,CAAC,iFAAiF,CAAC;IAC9F,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IAC7E,MAAM,EAAE,CAAC;SACN,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;SAC1B,QAAQ,CAAC,4EAA4E,CAAC;CAC1F,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClE,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,6EAA6E,CAAC;IAC1F,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,uEAAuE,CAAC;IACpF,QAAQ,EAAE,CAAC;SACR,KAAK,CAAC,aAAa,CAAC;SACpB,QAAQ,CAAC,4FAA4F,CAAC;IACzG,GAAG,oBAAoB;CACxB,CAAC,CAAA;AAIF,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAA0B;IAC7D,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IAClE,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE;QAC9C,UAAU;QACV,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,GAAG,iBAAiB,CAAC,KAAK,CAAC;KAC5B,CAAC,CAAA;IACF,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,8FAA8F;QAC9F,mGAAmG;QACnG,sGAAsG;QACtG,8FAA8F;QAC9F,gGAAgG;QAChG,sGAAsG;QACtG,yCAAyC;IAC3C,WAAW,EAAE,oBAAoB;IACjC,OAAO,EAAE,cAAc;CACxB,CAAA"}
|
|
@@ -43,27 +43,36 @@ export interface IntentBlock {
|
|
|
43
43
|
endLine: number;
|
|
44
44
|
contentSnippet: string;
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* One entry in the repo's active set. Under the multi-active model many intents
|
|
48
|
+
* can be `status:active` at once (one focus per session/teammate); this is a
|
|
49
|
+
* lightweight summary for the orchestration view, distinct from the calling
|
|
50
|
+
* session's own `current` intent (the top-level `intent`).
|
|
51
|
+
*/
|
|
52
|
+
export interface ActiveIntentSummary {
|
|
53
|
+
id: string;
|
|
54
|
+
title: string;
|
|
55
|
+
status: string;
|
|
56
|
+
createdBy?: string;
|
|
57
|
+
author?: string;
|
|
58
|
+
}
|
|
46
59
|
export interface ActiveIntentResponse {
|
|
47
60
|
hasActiveIntent: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The repo's full active set — every session/teammate's currently-active
|
|
63
|
+
* intent — for orchestration/awareness. Independent of `hasActiveIntent`,
|
|
64
|
+
* which reports only whether THIS session has a current focus.
|
|
65
|
+
*/
|
|
66
|
+
activeIntents?: ActiveIntentSummary[];
|
|
48
67
|
intent?: {
|
|
49
68
|
id: string;
|
|
50
69
|
title: string;
|
|
51
70
|
description: string;
|
|
52
71
|
templateType: 'feature' | 'refactor' | 'exploration';
|
|
53
72
|
constraints: string[];
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* `pending` — auto-finalized by the sweeper or blocked at completion by
|
|
57
|
-
* conflicts; reportable as "live context" so the agent can prompt the
|
|
58
|
-
* user to resume via activate_intent or finalize via complete_intent.
|
|
59
|
-
*/
|
|
73
|
+
/** `active` — currently being worked on (default). Terminal states:
|
|
74
|
+
* committed/pushed/done/abandoned/superseded. */
|
|
60
75
|
status: string;
|
|
61
|
-
/**
|
|
62
|
-
* Set when status === 'pending'. One of `sweeper-auto-finalize` (24h
|
|
63
|
-
* inactivity, no conflicts) or `sweeper-blocked-conflicts` (24h
|
|
64
|
-
* inactivity, distilled decisions contradicted standards).
|
|
65
|
-
*/
|
|
66
|
-
pendingReason?: string;
|
|
67
76
|
branch: string;
|
|
68
77
|
forkedFrom?: string;
|
|
69
78
|
blocks: IntentBlock[];
|
|
@@ -13,13 +13,24 @@ export async function checkActiveIntent(input) {
|
|
|
13
13
|
repoOrigin: actualOrigin,
|
|
14
14
|
...extractForkFields(input),
|
|
15
15
|
});
|
|
16
|
-
// Muninn returns { hasActiveIntent, intentId, intent }
|
|
16
|
+
// Muninn returns { hasActiveIntent, intentId, intent, activeIntents }.
|
|
17
|
+
// The active set is present regardless of whether THIS session has a current.
|
|
18
|
+
const activeIntents = Array.isArray(res.activeIntents)
|
|
19
|
+
? res.activeIntents.map((it) => ({
|
|
20
|
+
id: it.id || it._id || '',
|
|
21
|
+
title: it.title || '',
|
|
22
|
+
status: it.status || 'active',
|
|
23
|
+
createdBy: it.createdBy || undefined,
|
|
24
|
+
author: it.authorInfo?.name || it.author || undefined,
|
|
25
|
+
}))
|
|
26
|
+
: [];
|
|
17
27
|
const intent = res.intent;
|
|
18
28
|
if (!intent) {
|
|
19
|
-
return { hasActiveIntent: false };
|
|
29
|
+
return { hasActiveIntent: false, activeIntents };
|
|
20
30
|
}
|
|
21
31
|
return {
|
|
22
32
|
hasActiveIntent: true,
|
|
33
|
+
activeIntents,
|
|
23
34
|
intent: {
|
|
24
35
|
id: intent.id || res.intentId || '',
|
|
25
36
|
title: intent.title || '',
|
|
@@ -27,7 +38,6 @@ export async function checkActiveIntent(input) {
|
|
|
27
38
|
templateType: (intent.templateType || 'feature'),
|
|
28
39
|
constraints: intent.constraints || [],
|
|
29
40
|
status: intent.status || 'active',
|
|
30
|
-
pendingReason: intent.pendingReason,
|
|
31
41
|
branch: intent.branch || '',
|
|
32
42
|
forkedFrom: intent.forkedFrom,
|
|
33
43
|
blocks: [] // Blocks are tracked separately by intent-block service
|
|
@@ -38,8 +48,16 @@ export const checkActiveIntentTool = {
|
|
|
38
48
|
name: 'check_active_intent',
|
|
39
49
|
description: `REQUIRED: Call this tool BEFORE writing any code.
|
|
40
50
|
|
|
41
|
-
Returns
|
|
42
|
-
|
|
51
|
+
Returns THIS session's current intent (\`intent\` / \`hasActiveIntent\`) if one is
|
|
52
|
+
set. If not, ask the user to confirm intent details and then call
|
|
53
|
+
create_and_activate_intent.
|
|
54
|
+
|
|
55
|
+
Multi-active model: the active intent is PER SESSION. Many intents can be active
|
|
56
|
+
on a repo at once — your current is independent of other sessions'/teammates'.
|
|
57
|
+
The response also includes \`activeIntents\`: the repo's full active set (every
|
|
58
|
+
session's current intent, with id/title/status/createdBy/author) for awareness
|
|
59
|
+
and orchestration. \`hasActiveIntent\` reflects only YOUR session; \`activeIntents\`
|
|
60
|
+
may be non-empty even when you have no current.
|
|
43
61
|
|
|
44
62
|
An active intent tracks what the user is working on, enabling:
|
|
45
63
|
- Better code context for AI-generated changes
|
|
@@ -47,14 +65,9 @@ An active intent tracks what the user is working on, enabling:
|
|
|
47
65
|
- Automatic assignment of code blocks to the intent
|
|
48
66
|
|
|
49
67
|
Status semantics:
|
|
50
|
-
- "active" — normal, in-progress.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
prompt the user to resume the work (activate_intent) or finalize it
|
|
54
|
-
(complete_intent) before starting new unrelated work. Inspect "pendingReason"
|
|
55
|
-
to tell the user WHY the intent went pending — "sweeper-auto-finalize"
|
|
56
|
-
(24h idle) or "sweeper-blocked-conflicts" (decisions contradicted standards
|
|
57
|
-
on the auto-finalize attempt).`,
|
|
68
|
+
- "active" — normal, in-progress. A stale intent simply stays "active"; the
|
|
69
|
+
sweeper preserves its work without any status transition.
|
|
70
|
+
- terminal states — committed / pushed / done / abandoned / superseded.`,
|
|
58
71
|
inputSchema: checkActiveIntentSchema,
|
|
59
72
|
handler: checkActiveIntent
|
|
60
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-active-intent.js","sourceRoot":"","sources":["../../src/tools/check-active-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,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,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;
|
|
1
|
+
{"version":3,"file":"check-active-intent.js","sourceRoot":"","sources":["../../src/tools/check-active-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,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,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;AAiDF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,KAA6B;IACnE,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IAEpE,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,YAAY,EAAE;QAChD,UAAU,EAAE,YAAY;QACxB,GAAG,iBAAiB,CAAC,KAAK,CAAC;KAC5B,CAAC,CAAA;IAEF,uEAAuE;IACvE,8EAA8E;IAC9E,MAAM,aAAa,GAA0B,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;QAC3E,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAO,EAAE,EAAE,CAAC,CAAC;YAClC,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE;YACzB,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE;YACrB,MAAM,EAAE,EAAE,CAAC,MAAM,IAAI,QAAQ;YAC7B,SAAS,EAAE,EAAE,CAAC,SAAS,IAAI,SAAS;YACpC,MAAM,EAAE,EAAE,CAAC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,MAAM,IAAI,SAAS;SACtD,CAAC,CAAC;QACL,CAAC,CAAC,EAAE,CAAA;IAEN,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;IACzB,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA;IAClD,CAAC;IAED,OAAO;QACL,eAAe,EAAE,IAAI;QACrB,aAAa;QACb,MAAM,EAAE;YACN,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,CAAC,QAAQ,IAAI,EAAE;YACnC,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE;YACzB,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,EAAE;YACrC,YAAY,EAAE,CAAC,MAAM,CAAC,YAAY,IAAI,SAAS,CAA2C;YAC1F,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,EAAE;YACrC,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,QAAQ;YACjC,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;YAC3B,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,MAAM,EAAE,EAAE,CAAC,wDAAwD;SACpE;KACF,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;wEAqByD;IACtE,WAAW,EAAE,uBAAuB;IACpC,OAAO,EAAE,iBAAiB;CAC3B,CAAA"}
|
|
@@ -20,6 +20,7 @@ export declare const completeIntentSchema: z.ZodObject<{
|
|
|
20
20
|
commitSha: z.ZodOptional<z.ZodString>;
|
|
21
21
|
status: z.ZodDefault<z.ZodEnum<["committed", "pushed", "done", "abandoned", "superseded"]>>;
|
|
22
22
|
supersededBy: z.ZodOptional<z.ZodString>;
|
|
23
|
+
humanApproved: z.ZodOptional<z.ZodBoolean>;
|
|
23
24
|
}, "strip", z.ZodTypeAny, {
|
|
24
25
|
status: "committed" | "pushed" | "done" | "abandoned" | "superseded";
|
|
25
26
|
repoPath: string;
|
|
@@ -33,6 +34,7 @@ export declare const completeIntentSchema: z.ZodObject<{
|
|
|
33
34
|
intentId?: string | undefined;
|
|
34
35
|
commitSha?: string | undefined;
|
|
35
36
|
supersededBy?: string | undefined;
|
|
37
|
+
humanApproved?: boolean | undefined;
|
|
36
38
|
}, {
|
|
37
39
|
repoPath: string;
|
|
38
40
|
status?: "committed" | "pushed" | "done" | "abandoned" | "superseded" | undefined;
|
|
@@ -46,6 +48,7 @@ export declare const completeIntentSchema: z.ZodObject<{
|
|
|
46
48
|
intentId?: string | undefined;
|
|
47
49
|
commitSha?: string | undefined;
|
|
48
50
|
supersededBy?: string | undefined;
|
|
51
|
+
humanApproved?: boolean | undefined;
|
|
49
52
|
}>;
|
|
50
53
|
export type CompleteIntentInput = z.infer<typeof completeIntentSchema>;
|
|
51
54
|
/**
|
|
@@ -65,6 +68,22 @@ export interface ConflictMatch {
|
|
|
65
68
|
sharedConcern?: string;
|
|
66
69
|
description?: string;
|
|
67
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* A live collaborator (HAI: teammate or AI agent) whose published in-progress
|
|
73
|
+
* diff overlaps the work just completed, grouped by HAI across all files
|
|
74
|
+
* (Layer C completion-time collision query). Advisory awareness only — it does
|
|
75
|
+
* not block completion; the overlap is exact (both sides are in the shared
|
|
76
|
+
* baseline / cSHA line-space).
|
|
77
|
+
*/
|
|
78
|
+
export interface CompletionCollision {
|
|
79
|
+
uid: string;
|
|
80
|
+
isAgent: boolean;
|
|
81
|
+
label: string;
|
|
82
|
+
files: {
|
|
83
|
+
fpath: string;
|
|
84
|
+
ranges: number[][];
|
|
85
|
+
}[];
|
|
86
|
+
}
|
|
68
87
|
export interface CompleteIntentResponse {
|
|
69
88
|
success: boolean;
|
|
70
89
|
intentId: string;
|
|
@@ -114,6 +133,13 @@ export interface CompleteIntentResponse {
|
|
|
114
133
|
deferredStages?: string[];
|
|
115
134
|
deferredDecisionCount?: number;
|
|
116
135
|
deferredError?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Layer C completion-time collision query: live HAIs whose published diffs
|
|
138
|
+
* overlap the work just completed (grouped by HAI). Present only on a
|
|
139
|
+
* successful completion when at least one overlap exists. Advisory — surface
|
|
140
|
+
* it to the user as a coordination heads-up; it does not affect success.
|
|
141
|
+
*/
|
|
142
|
+
collisions?: CompletionCollision[];
|
|
117
143
|
}
|
|
118
144
|
export declare function completeIntent(input: CompleteIntentInput): Promise<CompleteIntentResponse>;
|
|
119
145
|
export declare const completeIntentTool: {
|
|
@@ -140,6 +166,7 @@ export declare const completeIntentTool: {
|
|
|
140
166
|
commitSha: z.ZodOptional<z.ZodString>;
|
|
141
167
|
status: z.ZodDefault<z.ZodEnum<["committed", "pushed", "done", "abandoned", "superseded"]>>;
|
|
142
168
|
supersededBy: z.ZodOptional<z.ZodString>;
|
|
169
|
+
humanApproved: z.ZodOptional<z.ZodBoolean>;
|
|
143
170
|
}, "strip", z.ZodTypeAny, {
|
|
144
171
|
status: "committed" | "pushed" | "done" | "abandoned" | "superseded";
|
|
145
172
|
repoPath: string;
|
|
@@ -153,6 +180,7 @@ export declare const completeIntentTool: {
|
|
|
153
180
|
intentId?: string | undefined;
|
|
154
181
|
commitSha?: string | undefined;
|
|
155
182
|
supersededBy?: string | undefined;
|
|
183
|
+
humanApproved?: boolean | undefined;
|
|
156
184
|
}, {
|
|
157
185
|
repoPath: string;
|
|
158
186
|
status?: "committed" | "pushed" | "done" | "abandoned" | "superseded" | undefined;
|
|
@@ -166,6 +194,7 @@ export declare const completeIntentTool: {
|
|
|
166
194
|
intentId?: string | undefined;
|
|
167
195
|
commitSha?: string | undefined;
|
|
168
196
|
supersededBy?: string | undefined;
|
|
197
|
+
humanApproved?: boolean | undefined;
|
|
169
198
|
}>;
|
|
170
199
|
handler: typeof completeIntent;
|
|
171
200
|
};
|