@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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* kawacode-on-stop — Claude Code Stop hook dispatcher.
|
|
4
|
+
*
|
|
5
|
+
* Reads the Stop hook payload from stdin (session_id, transcript_path, cwd)
|
|
6
|
+
* and sends two short IPCs to Muninn:
|
|
7
|
+
*
|
|
8
|
+
* 1. capture-thoughts:capture { sessionId, transcriptPath, cwd }
|
|
9
|
+
* → Muninn reads the transcript, filters thinking blocks, appends
|
|
10
|
+
* JSONL to ~/.kawa-code/thoughts/active/session-{id}.jsonl
|
|
11
|
+
* 2. extractor:trigger { session_id, cwd }
|
|
12
|
+
* → Muninn wakes the (debounced) extractor service which reads the
|
|
13
|
+
* fresh JSONL and emits ephemeral decisions.
|
|
14
|
+
*
|
|
15
|
+
* Replaces the legacy kawacode-capture-thoughts (Node CLI that did the file
|
|
16
|
+
* I/O itself, never merged to main) AND kawacode-extract-trigger (separate
|
|
17
|
+
* Node CLI that did the second IPC). The whole capture pipeline now lives
|
|
18
|
+
* in Muninn — this dispatcher's only job is to fire the two pings.
|
|
19
|
+
*
|
|
20
|
+
* Failure discipline: every error path exits 0. Claude Code's Stop hook
|
|
21
|
+
* must never block the turn loop on capture failure. This is the ONLY
|
|
22
|
+
* place fail-soft is allowed under the no-Muninn-independence rule —
|
|
23
|
+
* because the hook script is the boundary between the harness (which
|
|
24
|
+
* can't recover) and Muninn (which can re-derive missing captures from
|
|
25
|
+
* the transcript on the next Stop).
|
|
26
|
+
*
|
|
27
|
+
* Opt out with KAWA_THOUGHT_CAPTURE=off.
|
|
28
|
+
*/
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* kawacode-on-stop — Claude Code Stop hook dispatcher.
|
|
4
|
+
*
|
|
5
|
+
* Reads the Stop hook payload from stdin (session_id, transcript_path, cwd)
|
|
6
|
+
* and sends two short IPCs to Muninn:
|
|
7
|
+
*
|
|
8
|
+
* 1. capture-thoughts:capture { sessionId, transcriptPath, cwd }
|
|
9
|
+
* → Muninn reads the transcript, filters thinking blocks, appends
|
|
10
|
+
* JSONL to ~/.kawa-code/thoughts/active/session-{id}.jsonl
|
|
11
|
+
* 2. extractor:trigger { session_id, cwd }
|
|
12
|
+
* → Muninn wakes the (debounced) extractor service which reads the
|
|
13
|
+
* fresh JSONL and emits ephemeral decisions.
|
|
14
|
+
*
|
|
15
|
+
* Replaces the legacy kawacode-capture-thoughts (Node CLI that did the file
|
|
16
|
+
* I/O itself, never merged to main) AND kawacode-extract-trigger (separate
|
|
17
|
+
* Node CLI that did the second IPC). The whole capture pipeline now lives
|
|
18
|
+
* in Muninn — this dispatcher's only job is to fire the two pings.
|
|
19
|
+
*
|
|
20
|
+
* Failure discipline: every error path exits 0. Claude Code's Stop hook
|
|
21
|
+
* must never block the turn loop on capture failure. This is the ONLY
|
|
22
|
+
* place fail-soft is allowed under the no-Muninn-independence rule —
|
|
23
|
+
* because the hook script is the boundary between the harness (which
|
|
24
|
+
* can't recover) and Muninn (which can re-derive missing captures from
|
|
25
|
+
* the transcript on the next Stop).
|
|
26
|
+
*
|
|
27
|
+
* Opt out with KAWA_THOUGHT_CAPTURE=off.
|
|
28
|
+
*/
|
|
29
|
+
import { readFileSync } from 'node:fs';
|
|
30
|
+
import { connectToMuninn, request, disconnect } from './services/muninn-ipc.js';
|
|
31
|
+
function readStdin() {
|
|
32
|
+
try {
|
|
33
|
+
return readFileSync(0, 'utf8');
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return '';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function main() {
|
|
40
|
+
if (process.env.KAWA_THOUGHT_CAPTURE === 'off') {
|
|
41
|
+
process.exit(0);
|
|
42
|
+
}
|
|
43
|
+
const raw = readStdin();
|
|
44
|
+
if (!raw)
|
|
45
|
+
process.exit(0);
|
|
46
|
+
let payload;
|
|
47
|
+
try {
|
|
48
|
+
payload = JSON.parse(raw);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
process.exit(0);
|
|
52
|
+
}
|
|
53
|
+
const sessionId = payload.session_id;
|
|
54
|
+
const transcriptPath = payload.transcript_path;
|
|
55
|
+
const cwd = payload.cwd;
|
|
56
|
+
if (!sessionId || !transcriptPath)
|
|
57
|
+
process.exit(0);
|
|
58
|
+
try {
|
|
59
|
+
await connectToMuninn();
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// Muninn down. Capture happens whenever Muninn is next up — the
|
|
63
|
+
// extractor's checkpoint advances on the next successful capture.
|
|
64
|
+
process.exit(0);
|
|
65
|
+
}
|
|
66
|
+
// Fire both IPCs in parallel; each is independent and tolerant of the
|
|
67
|
+
// other's failure. allSettled because we never want one to short-circuit
|
|
68
|
+
// the other on transient failure.
|
|
69
|
+
await Promise.allSettled([
|
|
70
|
+
request('capture-thoughts', 'capture', {
|
|
71
|
+
sessionId,
|
|
72
|
+
transcriptPath,
|
|
73
|
+
cwd: cwd ?? null,
|
|
74
|
+
}),
|
|
75
|
+
request('extractor', 'trigger', {
|
|
76
|
+
session_id: sessionId,
|
|
77
|
+
cwd: cwd ?? '',
|
|
78
|
+
}),
|
|
79
|
+
]);
|
|
80
|
+
disconnect();
|
|
81
|
+
process.exit(0);
|
|
82
|
+
}
|
|
83
|
+
main().catch(() => process.exit(0));
|
|
84
|
+
//# sourceMappingURL=kawacode-on-stop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kawacode-on-stop.js","sourceRoot":"","sources":["../src/kawacode-on-stop.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAS/E,SAAS,SAAS;IAChB,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IAChC,CAAC;I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AAC,CAAA;IAEF,UAAU,EAAE,CAAA;IACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -37,7 +37,7 @@ Before using MCP tools, assess the task complexity. Match your workflow to the t
|
|
|
37
37
|
| **Before coding** | Check/create intent | \`check_active_intent\`, \`create_and_activate_intent\` |
|
|
38
38
|
| **On "done"/"commit"/"worked"/etc.** | Verify diff → Git commit → Complete | \`get_intent_changes\`, \`complete_intent\` |
|
|
39
39
|
|
|
40
|
-
> **Note**: Code blocks are attached to the intent automatically when you call \`complete_intent\` with a commit SHA.
|
|
40
|
+
> **Note**: Code blocks are attached to the intent automatically when you call \`complete_intent\` with a commit SHA. There is no manual "assign blocks" step.
|
|
41
41
|
|
|
42
42
|
**Trigger phrases for commit flow**: "this worked", "let's commit", "done", "close this", "ship it", "looks good"
|
|
43
43
|
|
|
@@ -124,7 +124,7 @@ When the user chooses to commit (or explicitly requests it):
|
|
|
124
124
|
Intent-ID: <intent-id>
|
|
125
125
|
Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
126
126
|
\`\`\`
|
|
127
|
-
6. **Complete intent**: Call \`complete_intent\` with the commit SHA and status='committed'.
|
|
127
|
+
6. **Complete intent**: Call \`complete_intent\` with the commit SHA and status='committed'. The modified code blocks are auto-captured and attached to the intent as part of the same call.
|
|
128
128
|
7. **Report**: Tell the user the commit SHA and that the intent is complete
|
|
129
129
|
|
|
130
130
|
- If user had a new request that triggered the commit, proceed to create a new intent for it
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Modeled after kawa.i18n/src/ipc/muninn-socket.ts but simplified:
|
|
8
8
|
* - No UI bundle or manifest (MCP has no UI)
|
|
9
9
|
* - Request/response correlation via _msgId
|
|
10
|
-
* - 30s timeout per request
|
|
10
|
+
* - 30s default timeout per request, overridable per call
|
|
11
11
|
*/
|
|
12
12
|
/** Stable session ID for this MCP process. Identifies this agent in intent attribution. */
|
|
13
13
|
export declare const SESSION_ID: string;
|
|
@@ -21,12 +21,17 @@ export declare function connectToMuninn(socketPath?: string): Promise<void>;
|
|
|
21
21
|
/**
|
|
22
22
|
* Send an IPC request to Muninn and await the correlated response.
|
|
23
23
|
*
|
|
24
|
-
* @param domain
|
|
25
|
-
* @param action
|
|
26
|
-
* @param data
|
|
24
|
+
* @param domain - Handler domain (e.g., 'intent', 'decision')
|
|
25
|
+
* @param action - Handler action (e.g., 'create', 'get-active')
|
|
26
|
+
* @param data - Request payload
|
|
27
|
+
* @param timeoutMs - Per-call timeout override. Defaults to 30s, which is the
|
|
28
|
+
* right fast-fail ceiling for synchronous handlers. A few
|
|
29
|
+
* synchronous endpoints (e.g., inference:estimate on deep
|
|
30
|
+
* repos) legitimately run longer — callers raise it
|
|
31
|
+
* explicitly rather than relaxing the global default.
|
|
27
32
|
* @returns The response data from Muninn
|
|
28
33
|
*/
|
|
29
|
-
export declare function request(domain: string, action: string, data?: any): Promise<any>;
|
|
34
|
+
export declare function request(domain: string, action: string, data?: any, timeoutMs?: number): Promise<any>;
|
|
30
35
|
/**
|
|
31
36
|
* Ensure a repository path is registered with Muninn as a project.
|
|
32
37
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Modeled after kawa.i18n/src/ipc/muninn-socket.ts but simplified:
|
|
8
8
|
* - No UI bundle or manifest (MCP has no UI)
|
|
9
9
|
* - Request/response correlation via _msgId
|
|
10
|
-
* - 30s timeout per request
|
|
10
|
+
* - 30s default timeout per request, overridable per call
|
|
11
11
|
*/
|
|
12
12
|
import * as net from 'net';
|
|
13
13
|
import * as fs from 'fs';
|
|
@@ -18,7 +18,7 @@ const EXTENSION_ID = 'mcp';
|
|
|
18
18
|
const EXTENSION_DOMAINS = ['intent', 'intent-block', 'decision', 'claude-code', 'code', 'inference'];
|
|
19
19
|
/** Stable session ID for this MCP process. Identifies this agent in intent attribution. */
|
|
20
20
|
export const SESSION_ID = `mcp-${crypto.randomBytes(4).toString('hex')}`;
|
|
21
|
-
const
|
|
21
|
+
const DEFAULT_REQUEST_TIMEOUT_MS = 30_000;
|
|
22
22
|
const HANDSHAKE_TIMEOUT_MS = 10_000;
|
|
23
23
|
/**
|
|
24
24
|
* Muninn's Tauri bundle identifier.
|
|
@@ -232,12 +232,17 @@ function routeResponse(msg) {
|
|
|
232
232
|
/**
|
|
233
233
|
* Send an IPC request to Muninn and await the correlated response.
|
|
234
234
|
*
|
|
235
|
-
* @param domain
|
|
236
|
-
* @param action
|
|
237
|
-
* @param data
|
|
235
|
+
* @param domain - Handler domain (e.g., 'intent', 'decision')
|
|
236
|
+
* @param action - Handler action (e.g., 'create', 'get-active')
|
|
237
|
+
* @param data - Request payload
|
|
238
|
+
* @param timeoutMs - Per-call timeout override. Defaults to 30s, which is the
|
|
239
|
+
* right fast-fail ceiling for synchronous handlers. A few
|
|
240
|
+
* synchronous endpoints (e.g., inference:estimate on deep
|
|
241
|
+
* repos) legitimately run longer — callers raise it
|
|
242
|
+
* explicitly rather than relaxing the global default.
|
|
238
243
|
* @returns The response data from Muninn
|
|
239
244
|
*/
|
|
240
|
-
export async function request(domain, action, data = {}) {
|
|
245
|
+
export async function request(domain, action, data = {}, timeoutMs = DEFAULT_REQUEST_TIMEOUT_MS) {
|
|
241
246
|
if (!socket || !connected) {
|
|
242
247
|
await connectToMuninn();
|
|
243
248
|
}
|
|
@@ -245,8 +250,8 @@ export async function request(domain, action, data = {}) {
|
|
|
245
250
|
return new Promise((resolve, reject) => {
|
|
246
251
|
const timer = setTimeout(() => {
|
|
247
252
|
pendingRequests.delete(msgId);
|
|
248
|
-
reject(new Error(`Muninn request timeout (${
|
|
249
|
-
},
|
|
253
|
+
reject(new Error(`Muninn request timeout (${timeoutMs / 1000}s): ${domain}:${action}`));
|
|
254
|
+
}, timeoutMs);
|
|
250
255
|
pendingRequests.set(msgId, { resolve, reject, timer });
|
|
251
256
|
const message = JSON.stringify({
|
|
252
257
|
flow: 'req',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"muninn-ipc.js","sourceRoot":"","sources":["../../src/services/muninn-ipc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAEhC,MAAM,YAAY,GAAG,KAAK,CAAA;AAC1B,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,CAAC,CAAA;AAEpG,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAA;AACxE,MAAM,
|
|
1
|
+
{"version":3,"file":"muninn-ipc.js","sourceRoot":"","sources":["../../src/services/muninn-ipc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAEhC,MAAM,YAAY,GAAG,KAAK,CAAA;AAC1B,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,CAAC,CAAA;AAEpG,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,OA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AACX,CAAC;AAED,SAAS,OAAO;IACd,SAAS,GAAG,KAAK,CAAA;IACjB,MAAM,GAAG,IAAI,CAAA;IACb,iBAAiB,GAAG,IAAI,CAAA;IAExB,8BAA8B;IAC9B,KAAK,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,eAAe,EAAE,CAAC;QAC5C,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAC3B,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAA;IACvD,CAAC;IACD,eAAe,CAAC,KAAK,EAAE,CAAA;AACzB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Zod schema fragment for the forkAuthor + workspaceId attribution
|
|
3
|
+
* fields added in REPO_FORKS_IMPLEMENTATION_PLAN_PHASE_1.md §5.
|
|
4
|
+
*
|
|
5
|
+
* Every MCP tool that accepts `repoOrigin` spreads `forkFieldsExtensions`
|
|
6
|
+
* into its Zod input schema and forwards `extractForkFields(input)` to the
|
|
7
|
+
* IPC payload. Both fields are OPTIONAL — Muninn resolves them
|
|
8
|
+
* automatically from `repoPath` (fork detection + workspace registry, §4.2 +
|
|
9
|
+
* §4.3). Callers only need to pass them in advanced override / testing
|
|
10
|
+
* scenarios where the desktop app's auto-resolution should be bypassed.
|
|
11
|
+
*
|
|
12
|
+
* Keep the field shape in lockstep with:
|
|
13
|
+
* - kawa.api/src/models/intents.model.ts / decisions.model.ts
|
|
14
|
+
* - kawa.muninn/src-tauri/src/gardener/handlers/intent.rs (OutboundIdentity)
|
|
15
|
+
*
|
|
16
|
+
* Drift across repos will cause silent rejection (Yup validators strip
|
|
17
|
+
* unknown fields on the API side) or runtime errors on the Muninn side.
|
|
18
|
+
*/
|
|
19
|
+
import { z } from 'zod';
|
|
20
|
+
/**
|
|
21
|
+
* Fork attribution payload. Optional in its entirety; when present, all
|
|
22
|
+
* three subfields are required (so the API can persist a coherent record).
|
|
23
|
+
*/
|
|
24
|
+
export declare const forkAuthorSchema: z.ZodObject<{
|
|
25
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
26
|
+
user: z.ZodString;
|
|
27
|
+
forkOrigin: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
platform: "github" | "gitlab";
|
|
30
|
+
user: string;
|
|
31
|
+
forkOrigin: string;
|
|
32
|
+
}, {
|
|
33
|
+
platform: "github" | "gitlab";
|
|
34
|
+
user: string;
|
|
35
|
+
forkOrigin: string;
|
|
36
|
+
}>;
|
|
37
|
+
export type ForkAuthor = z.infer<typeof forkAuthorSchema>;
|
|
38
|
+
/**
|
|
39
|
+
* Spread into each tool's Zod input schema. The two fields are independent —
|
|
40
|
+
* a tool can accept `workspaceId` alone (override for the override target)
|
|
41
|
+
* without `forkAuthor` (canonical clone) and vice versa.
|
|
42
|
+
*/
|
|
43
|
+
export declare const forkFieldsExtensions: {
|
|
44
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
46
|
+
user: z.ZodString;
|
|
47
|
+
forkOrigin: z.ZodString;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
platform: "github" | "gitlab";
|
|
50
|
+
user: string;
|
|
51
|
+
forkOrigin: string;
|
|
52
|
+
}, {
|
|
53
|
+
platform: "github" | "gitlab";
|
|
54
|
+
user: string;
|
|
55
|
+
forkOrigin: string;
|
|
56
|
+
}>>;
|
|
57
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Subset of a tool input shape carrying just the §5 fields.
|
|
61
|
+
*
|
|
62
|
+
* Tools have many other fields; this is the narrow type the
|
|
63
|
+
* `extractForkFields` helper accepts so it stays usable across all 20 tools
|
|
64
|
+
* without each one importing a full input type.
|
|
65
|
+
*/
|
|
66
|
+
export interface ForkFieldsInput {
|
|
67
|
+
forkAuthor?: ForkAuthor;
|
|
68
|
+
workspaceId?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Pluck the §5 fields off a tool input for IPC payload forwarding.
|
|
72
|
+
*
|
|
73
|
+
* Returns an object suitable for spreading into the `request(...)` call:
|
|
74
|
+
*
|
|
75
|
+
* await request('intent', 'create', {
|
|
76
|
+
* repoOrigin: actualOrigin,
|
|
77
|
+
* ...extractForkFields(input),
|
|
78
|
+
* ...
|
|
79
|
+
* })
|
|
80
|
+
*
|
|
81
|
+
* Fields are only included when defined, so canonical-clone callers don't
|
|
82
|
+
* spam Muninn with explicit nulls.
|
|
83
|
+
*/
|
|
84
|
+
export declare function extractForkFields(input: ForkFieldsInput): ForkFieldsInput;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Zod schema fragment for the forkAuthor + workspaceId attribution
|
|
3
|
+
* fields added in REPO_FORKS_IMPLEMENTATION_PLAN_PHASE_1.md §5.
|
|
4
|
+
*
|
|
5
|
+
* Every MCP tool that accepts `repoOrigin` spreads `forkFieldsExtensions`
|
|
6
|
+
* into its Zod input schema and forwards `extractForkFields(input)` to the
|
|
7
|
+
* IPC payload. Both fields are OPTIONAL — Muninn resolves them
|
|
8
|
+
* automatically from `repoPath` (fork detection + workspace registry, §4.2 +
|
|
9
|
+
* §4.3). Callers only need to pass them in advanced override / testing
|
|
10
|
+
* scenarios where the desktop app's auto-resolution should be bypassed.
|
|
11
|
+
*
|
|
12
|
+
* Keep the field shape in lockstep with:
|
|
13
|
+
* - kawa.api/src/models/intents.model.ts / decisions.model.ts
|
|
14
|
+
* - kawa.muninn/src-tauri/src/gardener/handlers/intent.rs (OutboundIdentity)
|
|
15
|
+
*
|
|
16
|
+
* Drift across repos will cause silent rejection (Yup validators strip
|
|
17
|
+
* unknown fields on the API side) or runtime errors on the Muninn side.
|
|
18
|
+
*/
|
|
19
|
+
import { z } from 'zod';
|
|
20
|
+
/**
|
|
21
|
+
* Fork attribution payload. Optional in its entirety; when present, all
|
|
22
|
+
* three subfields are required (so the API can persist a coherent record).
|
|
23
|
+
*/
|
|
24
|
+
export const forkAuthorSchema = z
|
|
25
|
+
.object({
|
|
26
|
+
platform: z.enum(['github', 'gitlab']),
|
|
27
|
+
user: z.string(),
|
|
28
|
+
forkOrigin: z.string(),
|
|
29
|
+
})
|
|
30
|
+
.describe('Fork attribution; usually resolved by Muninn automatically — pass only for override / testing.');
|
|
31
|
+
/**
|
|
32
|
+
* Spread into each tool's Zod input schema. The two fields are independent —
|
|
33
|
+
* a tool can accept `workspaceId` alone (override for the override target)
|
|
34
|
+
* without `forkAuthor` (canonical clone) and vice versa.
|
|
35
|
+
*/
|
|
36
|
+
export const forkFieldsExtensions = {
|
|
37
|
+
forkAuthor: forkAuthorSchema.optional(),
|
|
38
|
+
workspaceId: z
|
|
39
|
+
.string()
|
|
40
|
+
.optional()
|
|
41
|
+
.describe('Workspace identifier; usually resolved by Muninn automatically — pass only for override / testing.'),
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Pluck the §5 fields off a tool input for IPC payload forwarding.
|
|
45
|
+
*
|
|
46
|
+
* Returns an object suitable for spreading into the `request(...)` call:
|
|
47
|
+
*
|
|
48
|
+
* await request('intent', 'create', {
|
|
49
|
+
* repoOrigin: actualOrigin,
|
|
50
|
+
* ...extractForkFields(input),
|
|
51
|
+
* ...
|
|
52
|
+
* })
|
|
53
|
+
*
|
|
54
|
+
* Fields are only included when defined, so canonical-clone callers don't
|
|
55
|
+
* spam Muninn with explicit nulls.
|
|
56
|
+
*/
|
|
57
|
+
export function extractForkFields(input) {
|
|
58
|
+
const out = {};
|
|
59
|
+
if (input.forkAuthor !== undefined)
|
|
60
|
+
out.forkAuthor = input.forkAuthor;
|
|
61
|
+
if (input.workspaceId !== undefined)
|
|
62
|
+
out.workspaceId = input.workspaceId;
|
|
63
|
+
return out;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=_fork-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_fork-fields.js","sourceRoot":"","sources":["../../src/tools/_fork-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC;KACD,QAAQ,CACP,gGAAgG,CACjG,CAAA;AAIH;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,UAAU,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACvC,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,oGAAoG,CACrG;CACJ,CAAA;AAcD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAsB;IACtD,MAAM,GAAG,GAAoB,EAAE,CAAA;IAC/B,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS;QAAE,GAAG,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;IACrE,IAAI,KAAK,CAAC,WAAW,KAAK,SAAS;QAAE,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;IACxE,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -1,40 +1,106 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const activateIntentSchema: z.ZodObject<{
|
|
3
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
4
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
5
|
+
user: z.ZodString;
|
|
6
|
+
forkOrigin: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
platform: "github" | "gitlab";
|
|
9
|
+
user: string;
|
|
10
|
+
forkOrigin: string;
|
|
11
|
+
}, {
|
|
12
|
+
platform: "github" | "gitlab";
|
|
13
|
+
user: string;
|
|
14
|
+
forkOrigin: string;
|
|
15
|
+
}>>;
|
|
16
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
3
17
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
4
18
|
repoPath: z.ZodString;
|
|
5
19
|
intentId: z.ZodString;
|
|
20
|
+
force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
6
21
|
}, "strip", z.ZodTypeAny, {
|
|
7
22
|
repoPath: string;
|
|
23
|
+
force: boolean;
|
|
8
24
|
intentId: string;
|
|
9
25
|
repoOrigin?: string | undefined;
|
|
26
|
+
forkAuthor?: {
|
|
27
|
+
platform: "github" | "gitlab";
|
|
28
|
+
user: string;
|
|
29
|
+
forkOrigin: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
workspaceId?: string | undefined;
|
|
10
32
|
}, {
|
|
11
33
|
repoPath: string;
|
|
12
34
|
intentId: string;
|
|
13
35
|
repoOrigin?: string | undefined;
|
|
36
|
+
forkAuthor?: {
|
|
37
|
+
platform: "github" | "gitlab";
|
|
38
|
+
user: string;
|
|
39
|
+
forkOrigin: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
workspaceId?: string | undefined;
|
|
42
|
+
force?: boolean | undefined;
|
|
14
43
|
}>;
|
|
15
44
|
export type ActivateIntentInput = z.infer<typeof activateIntentSchema>;
|
|
45
|
+
export interface ActiveIntentLockConflict {
|
|
46
|
+
existingIntentId: string;
|
|
47
|
+
title?: string;
|
|
48
|
+
createdBy?: string;
|
|
49
|
+
author?: string;
|
|
50
|
+
}
|
|
16
51
|
export interface ActivateIntentResponse {
|
|
17
52
|
success: boolean;
|
|
18
53
|
intentId: string;
|
|
54
|
+
action?: 'activated' | 'already_active' | 'conflict';
|
|
19
55
|
previousActiveId?: string;
|
|
20
56
|
message: string;
|
|
57
|
+
lockConflict?: ActiveIntentLockConflict;
|
|
21
58
|
}
|
|
22
59
|
export declare function activateIntent(input: ActivateIntentInput): Promise<ActivateIntentResponse>;
|
|
23
60
|
export declare const activateIntentTool: {
|
|
24
61
|
name: string;
|
|
25
62
|
description: string;
|
|
26
63
|
inputSchema: z.ZodObject<{
|
|
64
|
+
forkAuthor: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
platform: z.ZodEnum<["github", "gitlab"]>;
|
|
66
|
+
user: z.ZodString;
|
|
67
|
+
forkOrigin: z.ZodString;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
platform: "github" | "gitlab";
|
|
70
|
+
user: string;
|
|
71
|
+
forkOrigin: string;
|
|
72
|
+
}, {
|
|
73
|
+
platform: "github" | "gitlab";
|
|
74
|
+
user: string;
|
|
75
|
+
forkOrigin: string;
|
|
76
|
+
}>>;
|
|
77
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
27
78
|
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
28
79
|
repoPath: z.ZodString;
|
|
29
80
|
intentId: z.ZodString;
|
|
81
|
+
force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
30
82
|
}, "strip", z.ZodTypeAny, {
|
|
31
83
|
repoPath: string;
|
|
84
|
+
force: boolean;
|
|
32
85
|
intentId: string;
|
|
33
86
|
repoOrigin?: string | undefined;
|
|
87
|
+
forkAuthor?: {
|
|
88
|
+
platform: "github" | "gitlab";
|
|
89
|
+
user: string;
|
|
90
|
+
forkOrigin: string;
|
|
91
|
+
} | undefined;
|
|
92
|
+
workspaceId?: string | undefined;
|
|
34
93
|
}, {
|
|
35
94
|
repoPath: string;
|
|
36
95
|
intentId: string;
|
|
37
96
|
repoOrigin?: string | undefined;
|
|
97
|
+
forkAuthor?: {
|
|
98
|
+
platform: "github" | "gitlab";
|
|
99
|
+
user: string;
|
|
100
|
+
forkOrigin: string;
|
|
101
|
+
} | undefined;
|
|
102
|
+
workspaceId?: string | undefined;
|
|
103
|
+
force?: boolean | undefined;
|
|
38
104
|
}>;
|
|
39
105
|
handler: typeof activateIntent;
|
|
40
106
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
|
+
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
4
5
|
export const activateIntentSchema = z.object({
|
|
5
6
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
6
7
|
repoPath: z.string().describe('Local path to the repository root'),
|
|
7
8
|
intentId: z.string().describe('The cloud ID (preferred) or local UUID of the existing intent to activate.'),
|
|
9
|
+
force: z.boolean().optional().default(false).describe('Bypass the per-repo active-intent lock. Set to true after the user has reviewed the lock conflict and chosen to take over.'),
|
|
10
|
+
...forkFieldsExtensions,
|
|
8
11
|
});
|
|
9
12
|
export async function activateIntent(input) {
|
|
10
13
|
const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
@@ -15,24 +18,61 @@ export async function activateIntent(input) {
|
|
|
15
18
|
return {
|
|
16
19
|
success: true,
|
|
17
20
|
intentId: input.intentId,
|
|
21
|
+
action: 'already_active',
|
|
18
22
|
previousActiveId,
|
|
19
23
|
message: `Intent ${input.intentId.substring(0, 8)} is already active`,
|
|
20
24
|
};
|
|
21
25
|
}
|
|
22
26
|
// Set the intent as active
|
|
23
|
-
await request('intent', 'set-active', {
|
|
27
|
+
const setRes = await request('intent', 'set-active', {
|
|
24
28
|
repoOrigin: actualOrigin,
|
|
25
29
|
intentId: input.intentId,
|
|
30
|
+
force: input.force || false,
|
|
31
|
+
...extractForkFields(input),
|
|
26
32
|
});
|
|
33
|
+
if (setRes.conflict === true && setRes.conflictType === 'active_intent_lock') {
|
|
34
|
+
const lockConflict = await buildLockConflictDetails(actualOrigin, setRes.existingIntentId);
|
|
35
|
+
const idShort = setRes.existingIntentId.substring(0, 8);
|
|
36
|
+
const who = lockConflict.author ? ` by ${lockConflict.author}` : '';
|
|
37
|
+
const titlePart = lockConflict.title ? ` "${lockConflict.title}"` : '';
|
|
38
|
+
return {
|
|
39
|
+
success: false,
|
|
40
|
+
intentId: input.intentId,
|
|
41
|
+
action: 'conflict',
|
|
42
|
+
lockConflict,
|
|
43
|
+
message: `Active-intent lock: repo already owns intent ${idShort}${titlePart}${who}. ` +
|
|
44
|
+
`Call activate_intent again with force=true to take over, complete_intent on ${idShort} first, ` +
|
|
45
|
+
`or choose a different intent.`,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
27
48
|
return {
|
|
28
49
|
success: true,
|
|
29
50
|
intentId: input.intentId,
|
|
51
|
+
action: 'activated',
|
|
30
52
|
previousActiveId: previousActiveId || undefined,
|
|
31
53
|
message: previousActiveId
|
|
32
54
|
? `Activated intent ${input.intentId.substring(0, 8)} (was: ${previousActiveId.substring(0, 8)})`
|
|
33
55
|
: `Activated intent ${input.intentId.substring(0, 8)}`,
|
|
34
56
|
};
|
|
35
57
|
}
|
|
58
|
+
async function buildLockConflictDetails(repoOrigin, existingIntentId) {
|
|
59
|
+
try {
|
|
60
|
+
const res = await request('intent', 'get-active', { repoOrigin });
|
|
61
|
+
const intent = res.intent;
|
|
62
|
+
if (intent && intent.id === existingIntentId) {
|
|
63
|
+
return {
|
|
64
|
+
existingIntentId,
|
|
65
|
+
title: intent.title,
|
|
66
|
+
createdBy: intent.createdBy,
|
|
67
|
+
author: intent.authorInfo?.name || intent.author,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// Fall through to ID-only response
|
|
73
|
+
}
|
|
74
|
+
return { existingIntentId };
|
|
75
|
+
}
|
|
36
76
|
export const activateIntentTool = {
|
|
37
77
|
name: 'activate_intent',
|
|
38
78
|
description: `Activate an existing intent by ID without creating a new one.
|
|
@@ -41,11 +81,27 @@ Use this to:
|
|
|
41
81
|
- Switch to a different intent found via list_team_intents or get_relevant_context
|
|
42
82
|
- Re-activate an intent that was deactivated (e.g., to complete it)
|
|
43
83
|
- Resume work on a previously created intent
|
|
84
|
+
- Resume an "abandoned" or "pending" intent (see below)
|
|
44
85
|
|
|
45
86
|
Accepts both cloud IDs (from get_relevant_context / API) and local UUIDs (from list_team_intents).
|
|
46
87
|
|
|
47
|
-
|
|
48
|
-
|
|
88
|
+
Resuming abandoned / pending intents:
|
|
89
|
+
- Abandoned intents have their decisions soft-deleted (invisible to recall and
|
|
90
|
+
get_relevant_context). Activating one transparently restores them — single-intent
|
|
91
|
+
decisions for this intent get their soft-delete cleared so the prior reasoning
|
|
92
|
+
becomes visible again. Multi-intent decisions stay visible throughout (they were
|
|
93
|
+
never soft-deleted).
|
|
94
|
+
- Pending intents are intents auto-finalized by the orphan-recovery sweeper (24h
|
|
95
|
+
inactivity) — possibly with conflicts blocking the finalization. Their decisions
|
|
96
|
+
were never soft-deleted, so activating one is a clean resume; new ephemerals
|
|
97
|
+
accumulate in a fresh bucket and the next complete_intent distills only the new work.
|
|
98
|
+
|
|
99
|
+
Per-repo active-intent lock: if another session already has a different intent active on
|
|
100
|
+
this repo, the tool returns action="conflict" with lockConflict details. Present the
|
|
101
|
+
conflict to the user and choose one of:
|
|
102
|
+
- Take over: retry with force=true (displaces the other session's active intent).
|
|
103
|
+
- Complete first: call complete_intent on the existing intent, then retry.
|
|
104
|
+
- Cancel: choose a different intent or stop.`,
|
|
49
105
|
inputSchema: activateIntentSchema,
|
|
50
106
|
handler: activateIntent,
|
|
51
107
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activate-intent.js","sourceRoot":"","sources":["../../src/tools/activate-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,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