@kawacode/mcp 8.1.3 → 10.1.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.
@@ -4,11 +4,17 @@ import { resolveOrigin } from './resolve-origin.js';
4
4
  export const getProjectDecisionsSchema = z.object({
5
5
  repoOrigin: z.string().optional().describe('Git remote origin URL. Auto-detected from repoPath via git if not provided.'),
6
6
  repoPath: z.string().describe('Local path to the repository root'),
7
+ limit: z.number().optional().describe('Rows per page, 1-100 (default 100).'),
8
+ offset: z.number().optional().describe('Rows to skip (default 0).'),
7
9
  });
8
10
  export async function getProjectDecisions(input) {
9
11
  const actualOrigin = resolveOrigin(input.repoOrigin, input.repoPath);
12
+ // limit/offset are forwarded only when given — Muninn and the API own the
13
+ // bounds, so there is no second source of truth here.
10
14
  const res = await request('decision', 'project-list', {
11
15
  repoOrigin: actualOrigin,
16
+ ...(input.limit !== undefined ? { limit: input.limit } : {}),
17
+ ...(input.offset !== undefined ? { offset: input.offset } : {}),
12
18
  });
13
19
  const decisions = (res.decisions || []).map((d) => ({
14
20
  intentId: d.intent_id || d.intentId || d.intent_ids?.[0] || d.intentIds?.[0] || '',
@@ -24,31 +30,29 @@ export async function getProjectDecisions(input) {
24
30
  constraintsChecked: d.constraints_checked || d.constraintsChecked || [],
25
31
  constraintViolations: d.constraint_violations || d.constraintViolations || []
26
32
  }));
33
+ const offset = input.offset ?? 0;
34
+ const totalCount = typeof res.totalCount === 'number' ? res.totalCount : decisions.length;
27
35
  return {
28
36
  decisions,
29
- count: decisions.length
37
+ count: decisions.length,
38
+ totalCount,
39
+ hasMore: offset + decisions.length < totalCount
30
40
  };
31
41
  }
32
42
  export const getProjectDecisionsTool = {
33
43
  name: 'get_project_decisions',
34
- description: `Get all decisions recorded for a project across all intents.
44
+ description: `ONE PAGE of the project's decisions across all intents, newest first — architectural choices, trade-offs, and the constraints they respected.
35
45
 
36
- Use this to review the project's decision history:
37
- - See what architectural decisions have been made
38
- - Understand past trade-offs and their rationale
39
- - Find decisions affecting specific files
40
- - Review constraint violations that were avoided
46
+ Max 100 rows. If \`hasMore\`, you are holding a prefix, not the history: walk it with
47
+ \`offset\`, or better, use get_relevant_context for the decisions that bear on your
48
+ task. For the whole corpus (export, audit), use Kawa Code, not this tool.
41
49
 
42
- Returns:
43
- - decisions: Array of decisions with their intent context
44
- - count: Total number of decisions
50
+ Returns: decisions (this page, with intent context), count / totalCount / hasMore.
45
51
 
46
- Each decision includes (summary-only, to keep context lean — call get_decision_detail(decisionId) for full rationale/context/consequences/alternatives):
47
- - intentIds: The intents this decision belongs to (array — a decision can span multiple intents)
52
+ Each decision is summary-only — call get_decision_detail(decisionId) for rationale/context/consequences/alternatives:
53
+ - intentIds: owning intents (a decision can span several)
48
54
  - type: fork, abandoned, discovery, constraint, tradeoff, or dependency
49
- - summary: Brief description of the decision
50
- - relatedFiles: Files affected by this decision
51
- - constraintViolations: Options that were rejected due to constraints`,
55
+ - summary, relatedFiles, constraintViolations`,
52
56
  inputSchema: getProjectDecisionsSchema,
53
57
  handler: getProjectDecisions
54
58
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-project-decisions.js","sourceRoot":"","sources":["../../src/tools/get-project-decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6EAA6E,CAAC;IACzH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;CACnE,CAAC,CAAA;AA2BF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAA+B;IACv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CAAC,OAAO,IAAI,EAAE;QACxB,6EAA6E;QAC7E,6EAA6E;QAC7E,qEAAqE;QACrE,YAAY,EAAE,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,YAAY,IAAI,EAAE;QACrD,kBAAkB,EAAE,CAAC,CAAC,mBAAmB,IAAI,CAAC,CAAC,kBAAkB,IAAI,EAAE;QACvE,oBAAoB,EAAE,CAAC,CAAC,qBAAqB,IAAI,CAAC,CAAC,oBAAoB,IAAI,EAAE;KAC9E,CAAC,CAAC,CAAA;IAEH,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,CAAA;IAChC,MAAM,UAAU,GAAG,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAA;IACzF,OAAO;QACL,SAAS;QACT,KAAK,EAAE,SAAS,CAAC,MAAM;QACvB,UAAU;QACV,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC,MAAM,GAAG,UAAU;KAChD,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE;;;;;;;;;;;8CAW+B;IAC5C,WAAW,EAAE,yBAAyB;IACtC,OAAO,EAAE,mBAAmB;CAC7B,CAAA"}
@@ -72,15 +72,15 @@ export declare const allTools: ({
72
72
  description: import("zod").ZodString;
73
73
  templateType: import("zod").ZodDefault<import("zod").ZodEnum<["feature", "refactor", "exploration"]>>;
74
74
  constraints: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
75
- force: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
75
+ pendingId: import("zod").ZodOptional<import("zod").ZodString>;
76
76
  }, "strip", import("zod").ZodTypeAny, {
77
77
  repoPath: string;
78
78
  title: string;
79
79
  description: string;
80
80
  templateType: "feature" | "refactor" | "exploration";
81
- force: boolean;
82
81
  repoOrigin?: string | undefined;
83
82
  constraints?: string[] | undefined;
83
+ pendingId?: string | undefined;
84
84
  }, {
85
85
  repoPath: string;
86
86
  title: string;
@@ -88,7 +88,7 @@ export declare const allTools: ({
88
88
  repoOrigin?: string | undefined;
89
89
  templateType?: "feature" | "refactor" | "exploration" | undefined;
90
90
  constraints?: string[] | undefined;
91
- force?: boolean | undefined;
91
+ pendingId?: string | undefined;
92
92
  }>;
93
93
  handler: typeof createAndActivateIntent;
94
94
  } | {
@@ -114,12 +114,18 @@ export declare const allTools: ({
114
114
  inputSchema: import("zod").ZodObject<{
115
115
  repoOrigin: import("zod").ZodOptional<import("zod").ZodString>;
116
116
  repoPath: import("zod").ZodString;
117
+ limit: import("zod").ZodOptional<import("zod").ZodNumber>;
118
+ offset: import("zod").ZodOptional<import("zod").ZodNumber>;
117
119
  }, "strip", import("zod").ZodTypeAny, {
118
120
  repoPath: string;
119
121
  repoOrigin?: string | undefined;
122
+ limit?: number | undefined;
123
+ offset?: number | undefined;
120
124
  }, {
121
125
  repoPath: string;
122
126
  repoOrigin?: string | undefined;
127
+ limit?: number | undefined;
128
+ offset?: number | undefined;
123
129
  }>;
124
130
  handler: typeof getProjectDecisions;
125
131
  } | {
@@ -187,11 +193,11 @@ export declare const allTools: ({
187
193
  repoPath: string;
188
194
  repoOrigin?: string | undefined;
189
195
  status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
196
+ limit?: number | undefined;
197
+ offset?: number | undefined;
190
198
  author?: string | undefined;
191
199
  since?: string | undefined;
192
200
  until?: string | undefined;
193
- limit?: number | undefined;
194
- offset?: number | undefined;
195
201
  }>;
196
202
  handler: typeof listTeamIntents;
197
203
  } | {
@@ -588,17 +594,16 @@ export declare const allTools: ({
588
594
  force: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
589
595
  }, "strip", import("zod").ZodTypeAny, {
590
596
  repoPath: string;
591
- force: boolean;
592
597
  contextIssues: boolean;
593
598
  model: string;
594
599
  maxStories: number;
595
600
  allowCommitSplitting: boolean;
596
601
  estimateOnly: boolean;
602
+ force: boolean;
597
603
  commits?: number | undefined;
598
604
  commitRange?: string | undefined;
599
605
  }, {
600
606
  repoPath: string;
601
- force?: boolean | undefined;
602
607
  commits?: number | undefined;
603
608
  commitRange?: string | undefined;
604
609
  contextIssues?: boolean | undefined;
@@ -606,6 +611,7 @@ export declare const allTools: ({
606
611
  maxStories?: number | undefined;
607
612
  allowCommitSplitting?: boolean | undefined;
608
613
  estimateOnly?: boolean | undefined;
614
+ force?: boolean | undefined;
609
615
  }>;
610
616
  handler: typeof inferHistory;
611
617
  } | {
@@ -11,17 +11,16 @@ export declare const inferHistorySchema: z.ZodObject<{
11
11
  force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
12
12
  }, "strip", z.ZodTypeAny, {
13
13
  repoPath: string;
14
- force: boolean;
15
14
  contextIssues: boolean;
16
15
  model: string;
17
16
  maxStories: number;
18
17
  allowCommitSplitting: boolean;
19
18
  estimateOnly: boolean;
19
+ force: boolean;
20
20
  commits?: number | undefined;
21
21
  commitRange?: string | undefined;
22
22
  }, {
23
23
  repoPath: string;
24
- force?: boolean | undefined;
25
24
  commits?: number | undefined;
26
25
  commitRange?: string | undefined;
27
26
  contextIssues?: boolean | undefined;
@@ -29,6 +28,7 @@ export declare const inferHistorySchema: z.ZodObject<{
29
28
  maxStories?: number | undefined;
30
29
  allowCommitSplitting?: boolean | undefined;
31
30
  estimateOnly?: boolean | undefined;
31
+ force?: boolean | undefined;
32
32
  }>;
33
33
  export type InferHistoryInput = z.infer<typeof inferHistorySchema>;
34
34
  export type AutoMode = 'first-run' | 'resume' | 'head-equals-last' | 'fallback-rewritten' | 'fallback-no-remote' | 'fallback-error';
@@ -81,17 +81,16 @@ export declare const inferHistoryTool: {
81
81
  force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
82
82
  }, "strip", z.ZodTypeAny, {
83
83
  repoPath: string;
84
- force: boolean;
85
84
  contextIssues: boolean;
86
85
  model: string;
87
86
  maxStories: number;
88
87
  allowCommitSplitting: boolean;
89
88
  estimateOnly: boolean;
89
+ force: boolean;
90
90
  commits?: number | undefined;
91
91
  commitRange?: string | undefined;
92
92
  }, {
93
93
  repoPath: string;
94
- force?: boolean | undefined;
95
94
  commits?: number | undefined;
96
95
  commitRange?: string | undefined;
97
96
  contextIssues?: boolean | undefined;
@@ -99,6 +98,7 @@ export declare const inferHistoryTool: {
99
98
  maxStories?: number | undefined;
100
99
  allowCommitSplitting?: boolean | undefined;
101
100
  estimateOnly?: boolean | undefined;
101
+ force?: boolean | undefined;
102
102
  }>;
103
103
  handler: typeof inferHistory;
104
104
  };
@@ -21,11 +21,11 @@ export declare const listTeamIntentsSchema: z.ZodObject<{
21
21
  repoPath: string;
22
22
  repoOrigin?: string | undefined;
23
23
  status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
24
+ limit?: number | undefined;
25
+ offset?: number | undefined;
24
26
  author?: string | undefined;
25
27
  since?: string | undefined;
26
28
  until?: string | undefined;
27
- limit?: number | undefined;
28
- offset?: number | undefined;
29
29
  }>;
30
30
  export type ListTeamIntentsInput = z.infer<typeof listTeamIntentsSchema>;
31
31
  export interface TeamIntent {
@@ -71,11 +71,11 @@ export declare const listTeamIntentsTool: {
71
71
  repoPath: string;
72
72
  repoOrigin?: string | undefined;
73
73
  status?: "done" | "active" | "abandoned" | "committed" | "pushed" | undefined;
74
+ limit?: number | undefined;
75
+ offset?: number | undefined;
74
76
  author?: string | undefined;
75
77
  since?: string | undefined;
76
78
  until?: string | undefined;
77
- limit?: number | undefined;
78
- offset?: number | undefined;
79
79
  }>;
80
80
  handler: typeof listTeamIntents;
81
81
  };
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@kawacode/mcp",
3
- "version": "8.1.3",
3
+ "version": "10.1.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": {
7
7
  "mcp": "build/index.js",
8
8
  "kawacode-mcp": "build/index.js",
9
9
  "kawacode-on-stop": "build/kawacode-on-stop.js",
10
+ "kawacode-on-session-end": "build/kawacode-on-session-end.js",
10
11
  "kawacode-on-pre-edit": "build/kawacode-on-pre-edit.js"
11
12
  },
12
13
  "type": "module",