@wrongstack/kanban-mcp 0.313.0 → 0.316.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/dist/adapter.d.ts CHANGED
@@ -12,6 +12,14 @@ export interface KanbanMcpDependencies {
12
12
  }
13
13
  export interface KanbanMcpToolHostOptions extends KanbanMcpPolicyOptions {
14
14
  actor?: string | undefined;
15
+ /**
16
+ * Session that owns every board mutation this host performs. An external MCP
17
+ * client has no WrongStack session of its own, so it supplies a stable
18
+ * connection-scoped id here — the durable events it writes are attributed to
19
+ * it, and "whose work is this?" has an answer. Defaults to a `system:` id
20
+ * derived from the actor when the caller names none.
21
+ */
22
+ sessionId?: string | undefined;
15
23
  dependencies?: KanbanMcpDependencies | undefined;
16
24
  }
17
25
  export declare function createKanbanMcpToolHost(projectRoot: string, opts?: KanbanMcpToolHostOptions): MCPServerToolHost;
package/dist/cli.js CHANGED
@@ -13,6 +13,7 @@ import { getKanbanServerConnection } from "@wrongstack/kanban";
13
13
  import {
14
14
  MCPServer
15
15
  } from "@wrongstack/mcp";
16
+ import { systemSessionId } from "@wrongstack/primitives";
16
17
  import { kanbanTool } from "@wrongstack/tools/kanban";
17
18
 
18
19
  // src/policy.ts
@@ -166,7 +167,7 @@ function toolDescriptor(name, actions) {
166
167
  inputSchema: actions ? actionSchema(actions) : WATCH_SCHEMA
167
168
  };
168
169
  }
169
- function createContext(projectRoot, actor) {
170
+ function createContext(projectRoot, actor, sessionId) {
170
171
  return {
171
172
  systemPrompt: [],
172
173
  cwd: projectRoot,
@@ -176,7 +177,10 @@ function createContext(projectRoot, actor) {
176
177
  tools: [],
177
178
  meta: { source: "kanban-mcp" },
178
179
  agentId: actor,
179
- agentName: actor
180
+ agentName: actor,
181
+ // The kanban tool stamps every board event with this. A fake context that
182
+ // omitted it made each mutation throw at the event-creation boundary.
183
+ eventSessionId: () => sessionId
180
184
  };
181
185
  }
182
186
  function normalizeTimeout(value) {
@@ -227,7 +231,8 @@ function createKanbanMcpToolHost(projectRoot, opts = {}) {
227
231
  const policy = selectKanbanMcpTools(opts);
228
232
  const allowed = new Map(policy.map((entry) => [entry.name, entry.actions]));
229
233
  const actor = opts.actor?.trim() || "external-kanban-mcp";
230
- const context = createContext(projectRoot, actor);
234
+ const sessionId = opts.sessionId?.trim() || systemSessionId(`kanban-mcp:${actor}`);
235
+ const context = createContext(projectRoot, actor, sessionId);
231
236
  const executeKanban = opts.dependencies?.executeKanban ?? (async (args, ctx, signal) => await kanbanTool.execute(args, ctx, { signal }));
232
237
  const getConnection = opts.dependencies?.getConnection ?? getKanbanServerConnection;
233
238
  return {
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import { getKanbanServerConnection } from "@wrongstack/kanban";
3
3
  import {
4
4
  MCPServer
5
5
  } from "@wrongstack/mcp";
6
+ import { systemSessionId } from "@wrongstack/primitives";
6
7
  import { kanbanTool } from "@wrongstack/tools/kanban";
7
8
 
8
9
  // src/policy.ts
@@ -156,7 +157,7 @@ function toolDescriptor(name, actions) {
156
157
  inputSchema: actions ? actionSchema(actions) : WATCH_SCHEMA
157
158
  };
158
159
  }
159
- function createContext(projectRoot, actor) {
160
+ function createContext(projectRoot, actor, sessionId) {
160
161
  return {
161
162
  systemPrompt: [],
162
163
  cwd: projectRoot,
@@ -166,7 +167,10 @@ function createContext(projectRoot, actor) {
166
167
  tools: [],
167
168
  meta: { source: "kanban-mcp" },
168
169
  agentId: actor,
169
- agentName: actor
170
+ agentName: actor,
171
+ // The kanban tool stamps every board event with this. A fake context that
172
+ // omitted it made each mutation throw at the event-creation boundary.
173
+ eventSessionId: () => sessionId
170
174
  };
171
175
  }
172
176
  function normalizeTimeout(value) {
@@ -217,7 +221,8 @@ function createKanbanMcpToolHost(projectRoot, opts = {}) {
217
221
  const policy = selectKanbanMcpTools(opts);
218
222
  const allowed = new Map(policy.map((entry) => [entry.name, entry.actions]));
219
223
  const actor = opts.actor?.trim() || "external-kanban-mcp";
220
- const context = createContext(projectRoot, actor);
224
+ const sessionId = opts.sessionId?.trim() || systemSessionId(`kanban-mcp:${actor}`);
225
+ const context = createContext(projectRoot, actor, sessionId);
221
226
  const executeKanban = opts.dependencies?.executeKanban ?? (async (args, ctx, signal) => await kanbanTool.execute(args, ctx, { signal }));
222
227
  const getConnection = opts.dependencies?.getConnection ?? getKanbanServerConnection;
223
228
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/kanban-mcp",
3
- "version": "0.313.0",
3
+ "version": "0.316.1",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack Kanban as a project-scoped MCP server with read-only, writable, destructive, and live-watch capability tiers.",
6
6
  "repository": {
@@ -32,10 +32,11 @@
32
32
  "README.md"
33
33
  ],
34
34
  "dependencies": {
35
- "@wrongstack/tools": "0.313.0",
36
- "@wrongstack/core": "0.313.0",
37
- "@wrongstack/mcp": "0.313.0",
38
- "@wrongstack/kanban": "0.313.0"
35
+ "@wrongstack/core": "0.316.1",
36
+ "@wrongstack/kanban": "0.316.1",
37
+ "@wrongstack/primitives": "0.316.1",
38
+ "@wrongstack/mcp": "0.316.1",
39
+ "@wrongstack/tools": "0.316.1"
39
40
  },
40
41
  "devDependencies": {
41
42
  "@types/node": "^26.2.0",