@thehammer/danx-dashboard-mcp 0.1.39 → 0.1.41

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/handlers.js CHANGED
@@ -156,9 +156,6 @@ export async function issueEdit(client, args) {
156
156
  });
157
157
  }
158
158
  export async function issueTransition(client, args) {
159
- if (args.action === "pickup" && args.manual && !args.assigned_agent) {
160
- throw new Error("issue_transition({action:'pickup', manual:true}) requires assigned_agent — DX-2282: pass the resolved agent/profile name claiming this card.");
161
- }
162
159
  const { id, board, ...body } = args;
163
160
  return client.request({
164
161
  method: "POST",
package/dist/index.js CHANGED
@@ -127,8 +127,15 @@ const EFFORT_VALUES = [
127
127
  "very_high",
128
128
  "max",
129
129
  ];
130
- const ISSUE_TYPES = ["Epic", "Bug", "Feature", "Story", "Chore"];
131
- const NON_EPIC_TYPES = ["Bug", "Feature", "Story", "Chore"];
130
+ // DX-2479 `Task` is a planning record: a leaf card the dispatcher can never
131
+ // pick up. Convert it to a Story/Bug/Chore with the raw route
132
+ // `PATCH /api/issues/:id/edit {"type":"Story"}` — the MCP `issue_edit` tool has
133
+ // NO `type` parameter today, so an `issue_edit({type:"Story"})` call is silently
134
+ // stripped by Zod and 400s as an empty patch. Adding `type` to that tool is
135
+ // tracked as DX-2484. Accepted everywhere a type is, so a planning card can
136
+ // still be CREATED through this MCP.
137
+ const ISSUE_TYPES = ["Epic", "Bug", "Feature", "Story", "Chore", "Task"];
138
+ const NON_EPIC_TYPES = ["Bug", "Feature", "Story", "Chore", "Task"];
132
139
  // DX-935 / DX-937 — field-group taxonomy for the nested read envelope,
133
140
  // hand-copied from `src/issues/read/field-groups.ts` (LIST_GROUPS / GET_GROUPS
134
141
  // — this package cannot import server source). Drift surfaces at runtime as a
@@ -307,18 +314,13 @@ server.tool("issue_edit", 'Patch prose + structured fields via PATCH /api/issues
307
314
  ...boardField,
308
315
  }, async (args) => jsonResult(await issueEdit(client, args)));
309
316
  // ---------------- issue_transition ----------------
310
- server.tool("issue_transition", "Stamp a lifecycle transition via POST /api/issues/:id/transition. **THIS IS THE ONLY WAY TO MOVE A CARD'S LIFECYCLE STATE** — DX-835 separated card lifecycle (this tool) from dispatch finalization (`mcp__danxbot__danxbot_complete`). The worker no longer infers card moves from `danxbot_complete.status`; agents that want the card to move MUST call this tool BEFORE calling `danxbot_complete`. Actions: ready (Review→ToDo), pickup (ToDo→In Progress — server checks every dispatch gate: ready_at, blocked_at, requires_human_reason, depends_on partners terminal, conflict_on partners idle; refuses 409 with failed_gate naming the cause; pass manual:true for OPERATOR-SESSION self-pickup — stamps dispatch_kind 'manual', bypasses every card-flow gate except terminal/deleted/already-dispatched, and the worker NEVER auto-transitions the card: no orphan-heal rollback, no Epic auto-rollup — use this whenever the work happens in YOUR current session rather than a worker dispatch, DX-946), rollback_pickup, **complete** (stamps completed_at — moves card to Done; this is YOUR explicit decision, not a side effect of danxbot_complete; REFUSES 409 on Epic if any phase child non-terminal — see non_terminal_phases[]; ALSO refuses 409 with failed_gate 'quality_gate_post' + failed_post_gates[] while any required POST quality gate row != pass — DX-1177), cancel (stamps cancelled_at — terminal), **block** (requires non-empty reason — stamps blocked_at + blocked_reason + clears dispatch; USE THIS when the CARD itself cannot proceed without human intervention; distinct from env-fault dispatch failures which use `danxbot_complete({status:'failed'})`), unblock, archive (parks to Backlog, clears ready_at), reopen (terminal→active, clears completed_at/cancelled_at/archived_at). Terminal cards refuse every action except reopen. Ladder timestamps preserved — forward stamps never clear earlier ones (CLAUDE.md Core Principle 2). **DX-2282 — `assigned_agent` is REQUIRED on every `manual:true` pickup call from a dispatched agent**: the server resolves your MCP-tool bearer to the single synthetic identity shared by EVERY dispatch, which cannot stand in as 'who claimed this' — pass the resolved agent/profile name explicitly (never omit it, never pass the generic dispatch identity itself) or the call is refused 409.", {
317
+ server.tool("issue_transition", "Stamp a lifecycle transition via POST /api/issues/:id/transition. **THIS IS THE ONLY WAY TO MOVE A CARD'S LIFECYCLE STATE** — DX-835 separated card lifecycle (this tool) from dispatch finalization (`mcp__danxbot__danxbot_complete`). The worker no longer infers card moves from `danxbot_complete.status`; agents that want the card to move MUST call this tool BEFORE calling `danxbot_complete`. Actions: ready (Review→ToDo), pickup (ToDo→In Progress — server checks every dispatch gate: ready_at, blocked_at, requires_human_reason, depends_on partners terminal, conflict_on partners idle; refuses 409 with failed_gate naming the cause; pass manual:true for OPERATOR-SESSION self-pickup — stamps dispatch_kind 'manual', bypasses every card-flow gate except terminal/deleted/already-dispatched, and the worker NEVER auto-transitions the card: no orphan-heal rollback, no Epic auto-rollup — use this whenever the work happens in YOUR current session rather than a worker dispatch, DX-946), rollback_pickup, **complete** (stamps completed_at — moves card to Done; this is YOUR explicit decision, not a side effect of danxbot_complete; REFUSES 409 on Epic if any phase child non-terminal — see non_terminal_phases[]; ALSO refuses 409 with failed_gate 'quality_gate_post' + failed_post_gates[] while any required POST quality gate row != pass — DX-1177), cancel (stamps cancelled_at — terminal), **block** (requires non-empty reason — stamps blocked_at + blocked_reason + clears dispatch; USE THIS when the CARD itself cannot proceed without human intervention; distinct from env-fault dispatch failures which use `danxbot_complete({status:'failed'})`), unblock, archive (parks to Backlog, clears ready_at), reopen (terminal→active, clears completed_at/cancelled_at/archived_at). Terminal cards refuse every action except reopen. Ladder timestamps preserved — forward stamps never clear earlier ones (CLAUDE.md Core Principle 2).", {
311
318
  id: z.string().min(1),
312
319
  action: z.enum(TRANSITION_ACTIONS),
313
320
  reason: z.string().optional(),
314
321
  summary: z.string().optional(),
315
322
  dispatch_id: z.string().min(1).optional(),
316
323
  manual: z.boolean().optional(),
317
- assigned_agent: z
318
- .string()
319
- .min(1)
320
- .optional()
321
- .describe("DX-2282 — REQUIRED when manual:true (operator/dispatched-agent self-pickup): the resolved agent/profile name claiming this card. Must be an explicit, distinguishing identity — never omitted, never the generic shared dispatch-token identity — or the pickup is refused 409."),
322
324
  ...boardField,
323
325
  }, async (args) => jsonResult(await issueTransition(client, args)));
324
326
  // ---------------- issue_triage ----------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "Stdio MCP server wrapping danxbot's dashboard /api/issues/* normalized DB-backed HTTP routes for dispatched agents (DX-704 Phase 2).",
5
5
  "license": "MIT",
6
6
  "type": "module",