@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.
Files changed (69) hide show
  1. package/CLAUDE.md.example +2 -0
  2. package/build/index.js +16 -1
  3. package/build/index.js.map +1 -1
  4. package/build/kawacode-on-pre-edit.d.ts +5 -0
  5. package/build/kawacode-on-pre-edit.js +45 -6
  6. package/build/kawacode-on-pre-edit.js.map +1 -1
  7. package/build/kawacode-on-stop.d.ts +49 -23
  8. package/build/kawacode-on-stop.js +233 -38
  9. package/build/kawacode-on-stop.js.map +1 -1
  10. package/build/services/muninn-ipc.d.ts +19 -1
  11. package/build/services/muninn-ipc.js +20 -2
  12. package/build/services/muninn-ipc.js.map +1 -1
  13. package/build/stop/uncompleted-commit.d.ts +45 -0
  14. package/build/stop/uncompleted-commit.js +117 -0
  15. package/build/stop/uncompleted-commit.js.map +1 -0
  16. package/build/stop/uncompleted-commit.test.d.ts +1 -0
  17. package/build/stop/uncompleted-commit.test.js +105 -0
  18. package/build/stop/uncompleted-commit.test.js.map +1 -0
  19. package/build/tools/activate-intent.d.ts +1 -14
  20. package/build/tools/activate-intent.js +17 -56
  21. package/build/tools/activate-intent.js.map +1 -1
  22. package/build/tools/arbiter-apply.d.ts +132 -0
  23. package/build/tools/arbiter-apply.js +59 -0
  24. package/build/tools/arbiter-apply.js.map +1 -0
  25. package/build/tools/arbiter-resolve.d.ts +132 -0
  26. package/build/tools/arbiter-resolve.js +58 -0
  27. package/build/tools/arbiter-resolve.js.map +1 -0
  28. package/build/tools/check-active-intent.d.ts +21 -12
  29. package/build/tools/check-active-intent.js +26 -13
  30. package/build/tools/check-active-intent.js.map +1 -1
  31. package/build/tools/complete-intent.d.ts +29 -0
  32. package/build/tools/complete-intent.js +26 -28
  33. package/build/tools/complete-intent.js.map +1 -1
  34. package/build/tools/create-intent.d.ts +1 -21
  35. package/build/tools/create-intent.js +18 -106
  36. package/build/tools/create-intent.js.map +1 -1
  37. package/build/tools/get-decision-detail.d.ts +109 -0
  38. package/build/tools/get-decision-detail.js +57 -0
  39. package/build/tools/get-decision-detail.js.map +1 -0
  40. package/build/tools/get-project-decisions.d.ts +0 -4
  41. package/build/tools/get-project-decisions.js +4 -6
  42. package/build/tools/get-project-decisions.js.map +1 -1
  43. package/build/tools/get-relevant-context.d.ts +0 -1
  44. package/build/tools/get-relevant-context.js +4 -2
  45. package/build/tools/get-relevant-context.js.map +1 -1
  46. package/build/tools/get-resolution-context.d.ts +154 -0
  47. package/build/tools/get-resolution-context.js +78 -0
  48. package/build/tools/get-resolution-context.js.map +1 -0
  49. package/build/tools/get-session-decisions.d.ts +0 -5
  50. package/build/tools/get-session-decisions.js +5 -5
  51. package/build/tools/get-session-decisions.js.map +1 -1
  52. package/build/tools/index.d.ts +225 -7
  53. package/build/tools/index.js +18 -3
  54. package/build/tools/index.js.map +1 -1
  55. package/build/tools/infer-history.d.ts +16 -0
  56. package/build/tools/infer-history.js +27 -0
  57. package/build/tools/infer-history.js.map +1 -1
  58. package/build/tools/list-team-intents.d.ts +6 -6
  59. package/build/tools/list-team-intents.js +21 -32
  60. package/build/tools/list-team-intents.js.map +1 -1
  61. package/build/tools/pre-edit-decision-check.js +2 -0
  62. package/build/tools/pre-edit-decision-check.js.map +1 -1
  63. package/build/tools/record-decision.d.ts +76 -0
  64. package/build/tools/record-decision.js +10 -0
  65. package/build/tools/record-decision.js.map +1 -1
  66. package/build/tools/update-features.d.ts +31 -0
  67. package/build/tools/update-features.js +51 -0
  68. package/build/tools/update-features.js.map +1 -0
  69. package/package.json +2 -2
@@ -0,0 +1,51 @@
1
+ import { z } from 'zod';
2
+ import { request } from '../services/muninn-ipc.js';
3
+ export const updateFeaturesSchema = z.object({
4
+ repoPath: z.string().describe('Local path to the repository root'),
5
+ });
6
+ export async function updateFeatures(input) {
7
+ // An extend is a single model call over the full feature catalog plus the
8
+ // unassigned intents, so it can take tens of seconds on a large catalog —
9
+ // use a generous timeout like the synchronous infer_history estimate path.
10
+ const UPDATE_TIMEOUT_MS = 180_000;
11
+ const res = await request('feature', 'update', { repoPath: input.repoPath }, UPDATE_TIMEOUT_MS);
12
+ if (res && res.success === false) {
13
+ const error = res.error ?? 'unknown error';
14
+ return { success: false, error, message: `Feature update failed: ${error}` };
15
+ }
16
+ const count = res?.count ?? 0;
17
+ const driftSpinoffs = res?.driftSpinoffs ?? 0;
18
+ const forcedFallback = res?.forcedFallback ?? 0;
19
+ const notes = [];
20
+ if (driftSpinoffs)
21
+ notes.push(`${driftSpinoffs} drift spin-off${driftSpinoffs === 1 ? '' : 's'}`);
22
+ if (forcedFallback)
23
+ notes.push(`${forcedFallback} unsorted`);
24
+ const suffix = notes.length ? ` (${notes.join(', ')})` : '';
25
+ return {
26
+ success: true,
27
+ count,
28
+ driftSpinoffs,
29
+ forcedFallback,
30
+ origin: res?.origin,
31
+ message: `Feature catalog updated: ${count} feature${count === 1 ? '' : 's'}${suffix}.`,
32
+ };
33
+ }
34
+ export const updateFeaturesTool = {
35
+ name: 'update_features',
36
+ description: `Update the project's feature catalog from its recorded intents.
37
+
38
+ Additively groups any intents that are not yet assigned to a feature into the running catalog (an incremental "extend"), without disturbing existing features. The feature catalog is the high-level "what does this project actually do?" view, derived from the repo's intents.
39
+
40
+ When to use:
41
+ - After recording or completing intents, to keep the feature list current.
42
+ - On demand, when you want the catalog refreshed with recent work.
43
+
44
+ Behavior:
45
+ - Additive only — never deletes or re-derives existing features.
46
+ - Intents already assigned to a feature are skipped; only unassigned ones are processed.
47
+ - Runs in the Kawa Code desktop app and returns the resulting feature count.`,
48
+ inputSchema: updateFeaturesSchema,
49
+ handler: updateFeatures,
50
+ };
51
+ //# sourceMappingURL=update-features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-features.js","sourceRoot":"","sources":["../../src/tools/update-features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,E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AAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;IAE3D,OAAO;QACL,OAAO,EAAE,IAAI;QACb,KAAK;QACL,aAAa;QACb,cAAc;QACd,MAAM,EAAE,GAAG,EAAE,MAAM;QACnB,OAAO,EAAE,4BAA4B,KAAK,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,GAAG;KACxF,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;;;;;;;;;;;6EAW8D;IAC3E,WAAW,EAAE,oBAAoB;IACjC,OAAO,EAAE,cAAc;CACxB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kawacode/mcp",
3
- "version": "6.1.2",
3
+ "version": "6.6.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": {
@@ -23,7 +23,7 @@
23
23
  "dev": "tsc --watch",
24
24
  "start": "node build/index.js",
25
25
  "clean": "rm -rf build",
26
- "test": "yarn build && node --test 'build/pre-edit/*.test.js'",
26
+ "test": "yarn build && node --test 'build/pre-edit/*.test.js' 'build/stop/*.test.js'",
27
27
  "prepublishOnly": "npm run build"
28
28
  },
29
29
  "dependencies": {