@kawacode/mcp 6.6.1 → 6.8.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 +21 -0
- package/README.md +16 -0
- package/build/kawacode-on-pre-edit.js +33 -4
- package/build/kawacode-on-pre-edit.js.map +1 -1
- package/build/kawacode-on-stop.d.ts +9 -5
- package/build/kawacode-on-stop.js +125 -26
- package/build/kawacode-on-stop.js.map +1 -1
- package/build/services/muninn-ipc.d.ts +13 -6
- package/build/services/muninn-ipc.js +35 -14
- package/build/services/muninn-ipc.js.map +1 -1
- package/build/stop/uncompleted-commit.d.ts +60 -7
- package/build/stop/uncompleted-commit.js +132 -23
- package/build/stop/uncompleted-commit.js.map +1 -1
- package/build/stop/uncompleted-commit.test.js +100 -1
- package/build/stop/uncompleted-commit.test.js.map +1 -1
- package/build/telemetry.d.ts +65 -0
- package/build/telemetry.js +99 -0
- package/build/telemetry.js.map +1 -0
- package/build/tools/check-active-intent.js +30 -16
- package/build/tools/check-active-intent.js.map +1 -1
- package/build/tools/complete-intent.d.ts +14 -10
- package/build/tools/complete-intent.js +26 -57
- package/build/tools/complete-intent.js.map +1 -1
- package/build/tools/get-relevant-context.js +14 -1
- package/build/tools/get-relevant-context.js.map +1 -1
- package/build/tools/index.d.ts +6 -0
- package/build/tools/pre-edit-acknowledge.d.ts +12 -0
- package/build/tools/pre-edit-acknowledge.js +21 -0
- package/build/tools/pre-edit-acknowledge.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context-injection telemetry (VALUE_METRICS.md Phase 2, Track B).
|
|
3
|
+
*
|
|
4
|
+
* At each of the 5 injection points where Kawa adds context to an agent's turn,
|
|
5
|
+
* we SIZE the payload we're about to inject (≈ chars/4 tokens) and emit a
|
|
6
|
+
* fire-and-forget IPC to Muninn, which forwards it to kawa.api. This is the COST
|
|
7
|
+
* side of the headline ratio ("Kawa adds ≈N tokens/turn"), paired with an
|
|
8
|
+
* "acted on" signal for the benefit side.
|
|
9
|
+
*
|
|
10
|
+
* Keep-mcp-thin: this module ONLY sizes + hashes + forwards. No storage, no API
|
|
11
|
+
* client, no business logic — Muninn owns the forward and the API owns the
|
|
12
|
+
* store. Every emit is fire-and-forget and swallows its own errors, so telemetry
|
|
13
|
+
* can never block or fail a tool call or a hook.
|
|
14
|
+
*
|
|
15
|
+
* Zero-knowledge: we emit token COUNTS, item COUNTS, and opaque decision ids
|
|
16
|
+
* only — never the strings measured. The repo origin is HASHED here before it
|
|
17
|
+
* leaves the process (`hashOrigin`, byte-identical to
|
|
18
|
+
* kawa.api/scripts/value-report.ts so `--repo` filtering matches).
|
|
19
|
+
*/
|
|
20
|
+
import * as crypto from 'node:crypto';
|
|
21
|
+
import { request, SESSION_ID } from './services/muninn-ipc.js';
|
|
22
|
+
/** Coarse char→token approximation; deterministic, no tokenizer dep. Matches
|
|
23
|
+
* CHARS_PER_TOKEN in kawacode-on-pre-edit.ts and the "≈ chars/4" method the
|
|
24
|
+
* value-report publishes. */
|
|
25
|
+
const CHARS_PER_TOKEN = 4;
|
|
26
|
+
/** ≈ tokens for a string payload (chars/4, rounded up). Labelled "≈" wherever published. */
|
|
27
|
+
export function estimateTokens(s) {
|
|
28
|
+
return Math.ceil((s ? s.length : 0) / CHARS_PER_TOKEN);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Hash a repo origin for the zero-knowledge aggregate. MUST stay byte-identical
|
|
32
|
+
* to `hashOrigin` in kawa.api/scripts/value-report.ts (which hashes the
|
|
33
|
+
* lowercased origin) so a `--repo <origin>` filter matches these rows. Callers
|
|
34
|
+
* pass the lowercased origin.
|
|
35
|
+
*/
|
|
36
|
+
export function hashOrigin(origin) {
|
|
37
|
+
return 'sha256:' + crypto.createHash('sha256').update(origin || '').digest('hex').slice(0, 16);
|
|
38
|
+
}
|
|
39
|
+
function enabled() {
|
|
40
|
+
return process.env.KAWA_VALUE_TELEMETRY !== 'off';
|
|
41
|
+
}
|
|
42
|
+
/** ISO timestamp (informational; the API windows on its own _c). */
|
|
43
|
+
function nowIso() {
|
|
44
|
+
return new Date().toISOString();
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Emit one context-injection sizing. Fire-and-forget: returns a resolved
|
|
48
|
+
* promise even on failure. Callers in the long-lived server may ignore the
|
|
49
|
+
* result; hook callers should include it in their pre-disconnect await set so
|
|
50
|
+
* the socket write flushes before the process exits.
|
|
51
|
+
*/
|
|
52
|
+
export function emitInjection(args) {
|
|
53
|
+
if (!enabled())
|
|
54
|
+
return Promise.resolve();
|
|
55
|
+
const data = {
|
|
56
|
+
type: args.type,
|
|
57
|
+
tokensEst: args.tokensEst,
|
|
58
|
+
itemCount: args.itemCount,
|
|
59
|
+
sessionId: SESSION_ID,
|
|
60
|
+
repoOriginHash: hashOrigin((args.repoOrigin || '').toLowerCase()),
|
|
61
|
+
ts: nowIso(),
|
|
62
|
+
};
|
|
63
|
+
if (args.decisionIds && args.decisionIds.length)
|
|
64
|
+
data.decisionIds = args.decisionIds;
|
|
65
|
+
return request('telemetry', 'record', data).then(() => { }).catch(() => { });
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Emit one "acted on" signal (R2 acted-on rate; V8 gate-saves when
|
|
69
|
+
* type='stop_gate'). Fire-and-forget.
|
|
70
|
+
*/
|
|
71
|
+
export function emitActedOn(args) {
|
|
72
|
+
if (!enabled())
|
|
73
|
+
return Promise.resolve();
|
|
74
|
+
const data = {
|
|
75
|
+
type: args.type,
|
|
76
|
+
sessionId: SESSION_ID,
|
|
77
|
+
repoOriginHash: hashOrigin((args.repoOrigin || '').toLowerCase()),
|
|
78
|
+
ts: nowIso(),
|
|
79
|
+
};
|
|
80
|
+
if (args.refId)
|
|
81
|
+
data.refId = args.refId;
|
|
82
|
+
return request('telemetry', 'acted_on', data).then(() => { }).catch(() => { });
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Close the telemetry turn for this session (Stop hook). Muninn OWNS turnSeq and
|
|
86
|
+
* stamps the real turnId on injections; this signal just tells it the turn ended
|
|
87
|
+
* so the NEXT injection opens a fresh turnId. Keep-mcp-thin: no seq/state here.
|
|
88
|
+
*
|
|
89
|
+
* MUST be sent AFTER this turn's stop_gate/stop_collision injections have flushed
|
|
90
|
+
* so they attribute to the closing turn — the Stop hook awaits those emits first.
|
|
91
|
+
* No body needed: muninn-ipc stamps `_agentId = SESSION_ID`, which Muninn resolves
|
|
92
|
+
* to the same session key the injections used. Fire-and-forget.
|
|
93
|
+
*/
|
|
94
|
+
export function emitTurnEnd() {
|
|
95
|
+
if (!enabled())
|
|
96
|
+
return Promise.resolve();
|
|
97
|
+
return request('telemetry', 'turn_end', {}).then(() => { }).catch(() => { });
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE9D;;8BAE8B;AAC9B,MAAM,eAAe,GAAG,CAAC,CAAA;AAIzB,4FAA4F;AAC5F,MAAM,UAAU,cAAc,CAAC,CAA4B;IACzD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAA;AACxD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC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CAAC,CAAC,WAAW,EAAE,CAAC;QACjE,EAAE,EAAE,MAAM,EAAE;KACb,CAAA;IACD,IAAI,IAAI,CAAC,KAAK;QAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IACvC,OAAO,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;AAC9E,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW;IACzB,IAAI,CAAC,OAAO,EAAE;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IACxC,OAAO,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;AAC5E,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
4
|
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
5
|
+
import { emitInjection, estimateTokens } from '../telemetry.js';
|
|
5
6
|
export const checkActiveIntentSchema = z.object({
|
|
6
7
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
7
8
|
repoPath: z.string().describe('Local path to the repository root'),
|
|
@@ -25,24 +26,37 @@ export async function checkActiveIntent(input) {
|
|
|
25
26
|
}))
|
|
26
27
|
: [];
|
|
27
28
|
const intent = res.intent;
|
|
29
|
+
let response;
|
|
28
30
|
if (!intent) {
|
|
29
|
-
|
|
31
|
+
response = { hasActiveIntent: false, activeIntents };
|
|
30
32
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
else {
|
|
34
|
+
response = {
|
|
35
|
+
hasActiveIntent: true,
|
|
36
|
+
activeIntents,
|
|
37
|
+
intent: {
|
|
38
|
+
id: intent.id || res.intentId || '',
|
|
39
|
+
title: intent.title || '',
|
|
40
|
+
description: intent.description || '',
|
|
41
|
+
templateType: (intent.templateType || 'feature'),
|
|
42
|
+
constraints: intent.constraints || [],
|
|
43
|
+
status: intent.status || 'active',
|
|
44
|
+
branch: intent.branch || '',
|
|
45
|
+
forkedFrom: intent.forkedFrom,
|
|
46
|
+
blocks: [] // Blocks are tracked separately by intent-block service
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
// Track-B injection telemetry (VALUE_METRICS Phase 2): size the serialized
|
|
51
|
+
// result (≈ chars/4); itemCount = active-set size + 1 if this session has a
|
|
52
|
+
// current intent. Fire-and-forget — never blocks the tool result.
|
|
53
|
+
void emitInjection({
|
|
54
|
+
type: 'check_active',
|
|
55
|
+
tokensEst: estimateTokens(JSON.stringify(response)),
|
|
56
|
+
itemCount: activeIntents.length + (intent ? 1 : 0),
|
|
57
|
+
repoOrigin: actualOrigin,
|
|
58
|
+
});
|
|
59
|
+
return response;
|
|
46
60
|
}
|
|
47
61
|
export const checkActiveIntentTool = {
|
|
48
62
|
name: 'check_active_intent',
|
|
@@ -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,iB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Aa,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,UAAU,EAAE,YAAY;KACzB,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAA;AACjB,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"}
|
|
@@ -54,9 +54,14 @@ export type CompleteIntentInput = z.infer<typeof completeIntentSchema>;
|
|
|
54
54
|
/**
|
|
55
55
|
* One contradiction between a distilled proposed decision and an existing
|
|
56
56
|
* standard decision in the repo. Surfaced when distillation produces decisions
|
|
57
|
-
* that conflict with previously-recorded ones
|
|
57
|
+
* that conflict with previously-recorded ones. Since COMPLETION_CONFLICT_DECOUPLE.md
|
|
58
|
+
* these no longer block completion — the commit (status + blocks) already landed;
|
|
59
|
+
* each conflicting decision is *parked* for an async disposition in the
|
|
60
|
+
* Orchestration panel (supersede / keep-both / reject).
|
|
58
61
|
*/
|
|
59
62
|
export interface ConflictMatch {
|
|
63
|
+
/** Stable distillation id of the proposed decision; the panel keys the disposition on it. */
|
|
64
|
+
proposedDecisionId?: string;
|
|
60
65
|
proposedDecisionSummary: string;
|
|
61
66
|
proposedDecisionRationale: string;
|
|
62
67
|
conflictsWith: {
|
|
@@ -107,20 +112,19 @@ export interface CompleteIntentResponse {
|
|
|
107
112
|
*/
|
|
108
113
|
committedDecisionCount?: number;
|
|
109
114
|
/**
|
|
110
|
-
* Non-empty when
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
+
* Non-empty when distillation produced decisions that contradict existing
|
|
116
|
+
* standards. Since COMPLETION_CONFLICT_DECOUPLE.md the completion still
|
|
117
|
+
* SUCCEEDED (success=true, status flipped, blocks captured) — these decisions
|
|
118
|
+
* are *deferred*: parked for an async disposition in the Orchestration panel
|
|
119
|
+
* (supersede / keep-both / reject). There is nothing to retry.
|
|
115
120
|
*/
|
|
116
|
-
|
|
121
|
+
deferredConflicts?: ConflictMatch[];
|
|
117
122
|
/**
|
|
118
|
-
* Set when success=false to discriminate
|
|
119
|
-
* - "conflicts" → see `conflicts[]`
|
|
123
|
+
* Set when success=false to discriminate the failure mode:
|
|
120
124
|
* - "transient-failure" → distiller LLM call or /check-conflicts API errored;
|
|
121
125
|
* `failedStage` and `error` carry diagnostics, the user retries.
|
|
122
126
|
*/
|
|
123
|
-
reason?: '
|
|
127
|
+
reason?: 'transient-failure';
|
|
124
128
|
failedStage?: string;
|
|
125
129
|
error?: string;
|
|
126
130
|
/**
|
|
@@ -42,45 +42,16 @@ export async function completeIntent(input) {
|
|
|
42
42
|
const intentTitle = res.intentTitle || 'Intent';
|
|
43
43
|
const previousStatus = res.previousStatus || 'active';
|
|
44
44
|
const success = res.success !== false;
|
|
45
|
-
const
|
|
45
|
+
const deferredConflicts = Array.isArray(res.deferredConflicts) ? res.deferredConflicts : [];
|
|
46
46
|
const committedDecisionCount = typeof res.committedDecisionCount === 'number' ? res.committedDecisionCount : undefined;
|
|
47
|
-
const reason = res.reason === '
|
|
47
|
+
const reason = res.reason === 'transient-failure' ? res.reason : undefined;
|
|
48
48
|
const apiSyncDeferred = res.apiSyncDeferred === true;
|
|
49
49
|
const completionCollisions = Array.isArray(res.collisions) ? res.collisions : [];
|
|
50
|
-
// Branch on the
|
|
51
|
-
//
|
|
50
|
+
// Branch on the outcome shape — pick the message that tells the agent exactly
|
|
51
|
+
// what to surface to the user.
|
|
52
52
|
let newStatus;
|
|
53
53
|
let message;
|
|
54
|
-
if (!success && reason === '
|
|
55
|
-
// PRD §5.2 step 5b — distilled decisions contradicted standards. No write,
|
|
56
|
-
// no transition, bucket preserved. The agent's job is to surface each
|
|
57
|
-
// conflict to the user and ask how to resolve.
|
|
58
|
-
newStatus = res.status || 'active';
|
|
59
|
-
const lines = [
|
|
60
|
-
`Cannot complete: ${conflicts.length} conflict(s) between proposed decisions and existing standards.`,
|
|
61
|
-
'',
|
|
62
|
-
'For each conflict below, surface BOTH sides side-by-side to the user and ask how to resolve.',
|
|
63
|
-
'Common resolution paths:',
|
|
64
|
-
' (A) Record a superseding decision: record_decision(type="fork", supersedes=["<existing-decision-id>"], rationale=...). Then retry complete_intent.',
|
|
65
|
-
' (B) Abandon the intent: complete_intent(status="abandoned"). Decisions are soft-deleted but recoverable via activate_intent.',
|
|
66
|
-
' (C) Keep the intent active and continue working.',
|
|
67
|
-
'',
|
|
68
|
-
'DO NOT silently retry — every retry runs the distiller again and produces the same conflicts.',
|
|
69
|
-
'',
|
|
70
|
-
];
|
|
71
|
-
conflicts.forEach((c, i) => {
|
|
72
|
-
lines.push(`[${i + 1}] Proposed: ${c.proposedDecisionSummary}`);
|
|
73
|
-
const cw = c.conflictsWith || {};
|
|
74
|
-
const author = cw.author ? ` by ${cw.author}` : '';
|
|
75
|
-
const intentPart = cw.intentTitle ? ` (intent: "${cw.intentTitle}")` : '';
|
|
76
|
-
lines.push(` Conflicts with: ${cw.summary || cw.decisionId || '(unknown)'}${intentPart}${author}`);
|
|
77
|
-
if (c.description)
|
|
78
|
-
lines.push(` ${c.description}`);
|
|
79
|
-
lines.push('');
|
|
80
|
-
});
|
|
81
|
-
message = lines.join('\n');
|
|
82
|
-
}
|
|
83
|
-
else if (!success && reason === 'transient-failure') {
|
|
54
|
+
if (!success && reason === 'transient-failure') {
|
|
84
55
|
// Distiller LLM error or /check-conflicts API error. Bucket re-populated,
|
|
85
56
|
// intent stays active. User decides whether to wait + retry or abandon.
|
|
86
57
|
newStatus = res.status || 'active';
|
|
@@ -123,7 +94,13 @@ export async function completeIntent(input) {
|
|
|
123
94
|
.map(c => `${c.label}${c.isAgent ? ' (agent)' : ''} on ${c.files.map(f => f.fpath).join(', ')}`)
|
|
124
95
|
.join('; ')
|
|
125
96
|
: '';
|
|
126
|
-
|
|
97
|
+
// COMPLETION_CONFLICT_DECOUPLE.md: distilled decisions that conflicted with
|
|
98
|
+
// standards did NOT block the completion — they're parked for a disposition
|
|
99
|
+
// in the Orchestration panel. Surface the count; there is nothing to retry.
|
|
100
|
+
const deferredConflictPart = deferredConflicts.length > 0
|
|
101
|
+
? ` — ${deferredConflicts.length} distilled decision(s) need a disposition in the Orchestration panel (supersede / keep-both / reject)`
|
|
102
|
+
: '';
|
|
103
|
+
message = statusMsg + shaPart + distilledPart + deferredPart + collisionPart + deferredConflictPart;
|
|
127
104
|
}
|
|
128
105
|
return {
|
|
129
106
|
success,
|
|
@@ -133,7 +110,7 @@ export async function completeIntent(input) {
|
|
|
133
110
|
commitSha: input.commitSha,
|
|
134
111
|
message,
|
|
135
112
|
committedDecisionCount,
|
|
136
|
-
|
|
113
|
+
deferredConflicts: deferredConflicts.length > 0 ? deferredConflicts : undefined,
|
|
137
114
|
reason,
|
|
138
115
|
failedStage: res.failedStage,
|
|
139
116
|
error: res.error,
|
|
@@ -159,7 +136,7 @@ Status values:
|
|
|
159
136
|
- "done": Work is fully complete
|
|
160
137
|
- "abandoned": Work was discarded without committing
|
|
161
138
|
|
|
162
|
-
REQUIRED: Inspect the response after calling this tool.
|
|
139
|
+
REQUIRED: Inspect the response after calling this tool. Three outcomes:
|
|
163
140
|
|
|
164
141
|
1. response.success === true:
|
|
165
142
|
The task is complete. Briefly acknowledge the commit and — if
|
|
@@ -173,33 +150,25 @@ REQUIRED: Inspect the response after calling this tool. Four outcomes:
|
|
|
173
150
|
in-progress edits overlap the work you just completed — surface it as a
|
|
174
151
|
coordination heads-up (who, and which files), naming response.collisions[].label
|
|
175
152
|
and the files. It's advisory, not a failure; the completion still succeeded.
|
|
153
|
+
If response.deferredConflicts is non-empty, the distillation produced N
|
|
154
|
+
decisions that conflict with existing standards — the completion STILL
|
|
155
|
+
SUCCEEDED (the commit landed: status flipped, code blocks captured). Those
|
|
156
|
+
decisions are deferred: parked for a disposition in the Orchestration panel,
|
|
157
|
+
where the user picks per decision: supersede the standard, keep both (records
|
|
158
|
+
a "contradicts" edge for a deliberate divergence / false positive), or reject
|
|
159
|
+
the distilled decision. Tell the user "N decision(s) need a disposition in
|
|
160
|
+
the panel." There is NOTHING to retry — do NOT re-run complete_intent.
|
|
176
161
|
|
|
177
|
-
2. response.success === false AND response.
|
|
178
|
-
The distillation produced decisions that contradict existing standards in
|
|
179
|
-
this repo. Status stays "active" and NO decisions were written.
|
|
180
|
-
Surface EACH conflict to the user with the proposed decision and the
|
|
181
|
-
conflicting standard decision side-by-side. Then ask the user how to
|
|
182
|
-
resolve. Common options to suggest:
|
|
183
|
-
(A) Record a superseding decision via record_decision(type="fork",
|
|
184
|
-
supersedes=["<existing-decision-id>"], rationale=...). Then retry
|
|
185
|
-
complete_intent — the distiller may now find the new superseding
|
|
186
|
-
decision in recall and the conflict resolves.
|
|
187
|
-
(B) Abandon the intent: complete_intent(status="abandoned"). Decisions
|
|
188
|
-
are soft-deleted but recoverable via activate_intent if the user
|
|
189
|
-
changes their mind.
|
|
190
|
-
(C) Keep the intent active and continue working.
|
|
191
|
-
DO NOT silently retry — every retry runs the distiller (and the per-pair
|
|
192
|
-
judge) again. Wait for the user's decision.
|
|
193
|
-
|
|
194
|
-
3. response.success === false AND response.reason === "transient-failure":
|
|
162
|
+
2. response.success === false AND response.reason === "transient-failure":
|
|
195
163
|
The distiller LLM call or the conflict-check API call errored. The
|
|
196
164
|
ephemerals are preserved (the bucket is intact), and the intent stays
|
|
197
165
|
"active". Tell the user the failure stage (response.failedStage) and the
|
|
198
166
|
underlying error, then suggest retrying once the issue clears, or
|
|
199
167
|
abandoning if the failure persists.
|
|
200
168
|
|
|
201
|
-
|
|
202
|
-
|
|
169
|
+
3. In a non-interactive (autonomous) session: if response.deferredConflicts is
|
|
170
|
+
non-empty, log it at INFO and continue — the commit already landed and the
|
|
171
|
+
decisions await disposition in the panel. There is no blocking state.`,
|
|
203
172
|
inputSchema: completeIntentSchema,
|
|
204
173
|
handler: completeIntent
|
|
205
174
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complete-intent.js","sourceRoot":"","sources":["../../src/tools/complete-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,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2VAA2V,CAAC;IACrY,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;IACpH,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;SAC5F,QAAQ,CAAC,4KAA4K,CAAC;IACzL,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2EAA2E,CAAC;IACzH,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qRAAqR,CAAC;IACrU,GAAG,oBAAoB;CACxB,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"complete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6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { request } from '../services/muninn-ipc.js';
|
|
3
3
|
import { resolveOrigin } from './resolve-origin.js';
|
|
4
4
|
import { forkFieldsExtensions, extractForkFields } from './_fork-fields.js';
|
|
5
|
+
import { emitInjection, estimateTokens } from '../telemetry.js';
|
|
5
6
|
export const getRelevantContextSchema = z.object({
|
|
6
7
|
repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
|
|
7
8
|
repoPath: z.string().describe('Local path to the repository root'),
|
|
@@ -42,7 +43,7 @@ export async function getRelevantContext(input) {
|
|
|
42
43
|
const msg = err?.message || String(err);
|
|
43
44
|
return { ...EMPTY_RESPONSE(actualOrigin, input.repoPath), error: `Muninn unavailable: ${msg}` };
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
const response = {
|
|
46
47
|
projectOrigin: actualOrigin,
|
|
47
48
|
projectPath: input.repoPath,
|
|
48
49
|
relevantIntents: (res.intents || []).map((i) => ({
|
|
@@ -74,6 +75,18 @@ export async function getRelevantContext(input) {
|
|
|
74
75
|
decisionsReturned: (res.decisions || []).length,
|
|
75
76
|
}
|
|
76
77
|
};
|
|
78
|
+
// Track-B injection telemetry (VALUE_METRICS Phase 2): size the serialized
|
|
79
|
+
// recall payload (≈ chars/4), itemCount = intents + decisions, and carry the
|
|
80
|
+
// surfaced decision ids for the read-side recall→supersedes "acted on" join.
|
|
81
|
+
// Fire-and-forget — never blocks the tool result.
|
|
82
|
+
void emitInjection({
|
|
83
|
+
type: 'recall',
|
|
84
|
+
tokensEst: estimateTokens(JSON.stringify(response)),
|
|
85
|
+
itemCount: response.relevantIntents.length + response.relevantDecisions.length,
|
|
86
|
+
repoOrigin: actualOrigin,
|
|
87
|
+
decisionIds: response.relevantDecisions.map(d => d.id).filter(Boolean),
|
|
88
|
+
});
|
|
89
|
+
return response;
|
|
77
90
|
}
|
|
78
91
|
export const getRelevantContextTool = {
|
|
79
92
|
name: 'get_relevant_context',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-relevant-context.js","sourceRoot":"","sources":["../../src/tools/get-relevant-context.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;
|
|
1
|
+
{"version":3,"file":"get-relevant-context.js","sourceRoot":"","sources":["../../src/tools/get-relevant-context.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;AAC3E,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAE/D,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,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IAC5E,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;IAC1G,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,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AAE,YAAY;QACxB,WAAW,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;KACvE,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE;;;;;;;;;;;;;;;;;;wFAkByE;IACtF,WAAW,EAAE,wBAAwB;IACrC,OAAO,EAAE,kBAAkB;CAC5B,CAAA"}
|
package/build/tools/index.d.ts
CHANGED
|
@@ -1193,8 +1193,12 @@ export declare const allTools: ({
|
|
|
1193
1193
|
workspaceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1194
1194
|
decisionIds: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
1195
1195
|
sessionToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1196
|
+
repoOrigin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1197
|
+
repoPath: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1196
1198
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1197
1199
|
decisionIds: string[];
|
|
1200
|
+
repoOrigin?: string | undefined;
|
|
1201
|
+
repoPath?: string | undefined;
|
|
1198
1202
|
forkAuthor?: {
|
|
1199
1203
|
platform: "github" | "gitlab";
|
|
1200
1204
|
user: string;
|
|
@@ -1204,6 +1208,8 @@ export declare const allTools: ({
|
|
|
1204
1208
|
sessionToken?: string | undefined;
|
|
1205
1209
|
}, {
|
|
1206
1210
|
decisionIds: string[];
|
|
1211
|
+
repoOrigin?: string | undefined;
|
|
1212
|
+
repoPath?: string | undefined;
|
|
1207
1213
|
forkAuthor?: {
|
|
1208
1214
|
platform: "github" | "gitlab";
|
|
1209
1215
|
user: string;
|
|
@@ -24,8 +24,12 @@ export declare const preEditAcknowledgeSchema: z.ZodObject<{
|
|
|
24
24
|
workspaceId: z.ZodOptional<z.ZodString>;
|
|
25
25
|
decisionIds: z.ZodArray<z.ZodString, "many">;
|
|
26
26
|
sessionToken: z.ZodOptional<z.ZodString>;
|
|
27
|
+
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
28
|
+
repoPath: z.ZodOptional<z.ZodString>;
|
|
27
29
|
}, "strip", z.ZodTypeAny, {
|
|
28
30
|
decisionIds: string[];
|
|
31
|
+
repoOrigin?: string | undefined;
|
|
32
|
+
repoPath?: string | undefined;
|
|
29
33
|
forkAuthor?: {
|
|
30
34
|
platform: "github" | "gitlab";
|
|
31
35
|
user: string;
|
|
@@ -35,6 +39,8 @@ export declare const preEditAcknowledgeSchema: z.ZodObject<{
|
|
|
35
39
|
sessionToken?: string | undefined;
|
|
36
40
|
}, {
|
|
37
41
|
decisionIds: string[];
|
|
42
|
+
repoOrigin?: string | undefined;
|
|
43
|
+
repoPath?: string | undefined;
|
|
38
44
|
forkAuthor?: {
|
|
39
45
|
platform: "github" | "gitlab";
|
|
40
46
|
user: string;
|
|
@@ -69,8 +75,12 @@ export declare const preEditAcknowledgeTool: {
|
|
|
69
75
|
workspaceId: z.ZodOptional<z.ZodString>;
|
|
70
76
|
decisionIds: z.ZodArray<z.ZodString, "many">;
|
|
71
77
|
sessionToken: z.ZodOptional<z.ZodString>;
|
|
78
|
+
repoOrigin: z.ZodOptional<z.ZodString>;
|
|
79
|
+
repoPath: z.ZodOptional<z.ZodString>;
|
|
72
80
|
}, "strip", z.ZodTypeAny, {
|
|
73
81
|
decisionIds: string[];
|
|
82
|
+
repoOrigin?: string | undefined;
|
|
83
|
+
repoPath?: string | undefined;
|
|
74
84
|
forkAuthor?: {
|
|
75
85
|
platform: "github" | "gitlab";
|
|
76
86
|
user: string;
|
|
@@ -80,6 +90,8 @@ export declare const preEditAcknowledgeTool: {
|
|
|
80
90
|
sessionToken?: string | undefined;
|
|
81
91
|
}, {
|
|
82
92
|
decisionIds: string[];
|
|
93
|
+
repoOrigin?: string | undefined;
|
|
94
|
+
repoPath?: string | undefined;
|
|
83
95
|
forkAuthor?: {
|
|
84
96
|
platform: "github" | "gitlab";
|
|
85
97
|
user: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { request, SESSION_ID } from '../services/muninn-ipc.js';
|
|
3
3
|
import { forkFieldsExtensions } from './_fork-fields.js';
|
|
4
|
+
import { resolveOrigin } from './resolve-origin.js';
|
|
5
|
+
import { emitActedOn } from '../telemetry.js';
|
|
4
6
|
/**
|
|
5
7
|
* Thin proxy to Muninn's `pre-edit-cache:add` handler.
|
|
6
8
|
*
|
|
@@ -18,6 +20,14 @@ export const preEditAcknowledgeSchema = z.object({
|
|
|
18
20
|
.string()
|
|
19
21
|
.optional()
|
|
20
22
|
.describe('Session scope for the force-override cache. Should match the sessionToken passed to pre_edit_decision_check. Defaults to the MCP server\'s SESSION_ID.'),
|
|
23
|
+
repoOrigin: z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('Git remote origin URL. Auto-detected from repoPath via git if not provided. Used only to attribute the acted-on value-metric to a repo.'),
|
|
27
|
+
repoPath: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('Local path to the repository root. Enables repo attribution of the acted-on value-metric.'),
|
|
21
31
|
...forkFieldsExtensions,
|
|
22
32
|
});
|
|
23
33
|
export async function preEditAcknowledge(input) {
|
|
@@ -26,6 +36,17 @@ export async function preEditAcknowledge(input) {
|
|
|
26
36
|
sessionToken,
|
|
27
37
|
decisionIds: input.decisionIds,
|
|
28
38
|
});
|
|
39
|
+
// Track-B acted-on (VALUE_METRICS Phase 2): an explicit acknowledge IS the
|
|
40
|
+
// agent acting on the surfaced pre_edit reasoning — one signal per decision
|
|
41
|
+
// id. Only attributable to a repo when an origin can be resolved (this tool
|
|
42
|
+
// is repo-agnostic by default); fire-and-forget, never blocks the result.
|
|
43
|
+
if (input.repoOrigin || input.repoPath) {
|
|
44
|
+
try {
|
|
45
|
+
const origin = resolveOrigin(input.repoOrigin, input.repoPath);
|
|
46
|
+
void Promise.allSettled(input.decisionIds.map(id => emitActedOn({ type: 'pre_edit', refId: id, repoOrigin: origin })));
|
|
47
|
+
}
|
|
48
|
+
catch { /* origin unresolvable — skip attribution */ }
|
|
49
|
+
}
|
|
29
50
|
return {
|
|
30
51
|
acknowledged: typeof res?.added === 'number' ? res.added : 0,
|
|
31
52
|
cacheSize: typeof res?.total === 'number' ? res.total : 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pre-edit-acknowledge.js","sourceRoot":"","sources":["../../src/tools/pre-edit-acknowledge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"pre-edit-acknowledge.js","sourceRoot":"","sources":["../../src/tools/pre-edit-acknowledge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,WAAW,EAAE,CAAC;SACX,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACxB,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,+EAA+E,CAAC;IAC5F,YAAY,EA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KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAC1D,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE;;;;;;;;+DAQgD;IAC7D,WAAW,EAAE,wBAAwB;IACrC,OAAO,EAAE,kBAAkB;CAC5B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kawacode/mcp",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.1",
|
|
4
4
|
"description": "Team-aware memory for Claude Code, Cursor, and other AI coding assistants — intent tracking, decision history, real-time team conflict detection.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"bin": {
|