@thehammer/danx-dashboard-mcp 0.1.72 → 0.1.74

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/README.md CHANGED
@@ -31,6 +31,7 @@ All exposed as `mcp__danx-dashboard__<name>` once wired through the workspace `m
31
31
  | `issue_triage` | `POST /api/issues/:id/triage` | Send `{confidence, reason}` — an integer 0-5 score; the server computes the verdict (approve/cancel/keep/defer) against the board's configured thresholds (DX-2086). `keep`/`defer` now block the card. None of these are a cross-card ordering gate; use `issue_dependency` to sequence cards |
32
32
  | `issue_comment` | `POST/PATCH/DELETE /api/issues/:id/comments[/:cid]` | Author server-stamped, soft-delete preserved |
33
33
  | `issue_dependency` | `POST/DELETE /api/issues/:id/dependencies[/:did]` | `depends_on` cycle-checked; remove hardcodes `reason: "recorded_in_error"`. The only mechanism the dispatch picker enforces to sequence one card after another — status alone is not a substitute |
34
+ | `issue_retire_branch` | `POST /api/issues/:id/card-branch-retire` | Mark this card's own `card/<id>` branch RETIRED (unsafe to merge) — `{reason}`, `by` server-stamped. NO status/terminal gate (DX-2845): settable the instant an audit/split judges the branch unsafe, whatever the card's status. The dispatched worker reads this at its next bootstrap and forces `origin/main` instead of re-attaching to the retired content |
34
35
  | `issue_retro` | `PUT /api/issues/:id/retro` | Requires terminal card; replace semantics |
35
36
 
36
37
  ## `plan_get` — cheap by default, opt-in for the rest (DX-2727)
package/dist/handlers.js CHANGED
@@ -445,6 +445,24 @@ export async function issueDependency(client, args) {
445
445
  board,
446
446
  });
447
447
  }
448
+ /**
449
+ * DX-2845 — mark a card's own `card/<id>` branch RETIRED (unsafe to merge)
450
+ * via POST /api/issues/:id/card-branch-retire {reason}. NO status/terminal
451
+ * gate on the server side — settable the moment a branch is judged unsafe,
452
+ * whether the card is ToDo, In Progress, or anything else (see
453
+ * `retireCardBranch`'s doc comment, `src/issues/write/card-branch-retire.ts`).
454
+ * `by` is server-stamped from the resolved writing identity, never
455
+ * client-supplied. Idempotent: retiring an already-retired branch just
456
+ * re-stamps reason/actor/timestamp.
457
+ */
458
+ export async function issueRetireBranch(client, args) {
459
+ return client.request({
460
+ method: "POST",
461
+ path: `/${encodeURIComponent(args.id)}/card-branch-retire`,
462
+ body: { reason: args.reason },
463
+ board: args.board,
464
+ });
465
+ }
448
466
  /**
449
467
  * DX-1362 — targeted checklist CUD. Action-dispatched onto the
450
468
  * `/api/issues/:id/checklists[/:cid[/items[/:iid]]]` route family so an agent
package/dist/index.js CHANGED
@@ -22,6 +22,7 @@
22
22
  * - issue_problem GET/POST/PATCH/DELETE /api/issues/:id/problems[/:pid] (DX-2735)
23
23
  * - issue_solution POST/PATCH/DELETE /api/issues/:id/problems/:pid/solutions[/:sid] (DX-2735)
24
24
  * - issue_dependency POST/DELETE /api/issues/:id/dependencies[/:did]
25
+ * - issue_retire_branch POST /api/issues/:id/card-branch-retire (DX-2845)
25
26
  * - issue_quality_gate POST /api/issues/:id/quality-gates/:gate
26
27
  * - issue_quality_gate_verdict
27
28
  * PATCH /api/issues/:id/quality-gates/:gate
@@ -89,7 +90,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
89
90
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
90
91
  import { z } from "zod";
91
92
  import { DashboardHttpClient } from "./http-client.js";
92
- import { issueAttach, issueChecklist, issueComment, issueCreate, issueDependency, issueEdit, issueGet, issueList, issueProblem, issueQualityGate, issueQualityGateVerdict, issueRetro, issueSolution, issueTransition, issueTriage, briefGetPage, briefList, briefSetPage, failureCategoryCreate, failureCategoryList, failureCategoryUpdate, planAddArchitectureSection, planAddCard, planAddRecord, planConnect, planCreate, planDeleteArchitectureSection, planDeleteRecord, planGet, PLAN_FIELD_GROUPS, PLAN_STATUSES, ISSUE_BATCH_GET_MAX, LIST_PAGE_MAX_LIMIT, PLAN_GET_CARDS_DEFAULT_LIMIT, planGetArchitectureSection, planGetRecord, planList, planRemoveCard, planRename, planReorderArchitectureSection, planUpdateArchitectureSection, planUpdateRecord, repoKnowledgeGet, repoKnowledgeSet, } from "./handlers.js";
93
+ import { issueAttach, issueChecklist, issueComment, issueCreate, issueDependency, issueEdit, issueGet, issueList, issueProblem, issueQualityGate, issueQualityGateVerdict, issueRetireBranch, issueRetro, issueSolution, issueTransition, issueTriage, briefGetPage, briefList, briefSetPage, failureCategoryCreate, failureCategoryList, failureCategoryUpdate, planAddArchitectureSection, planAddCard, planAddRecord, planConnect, planCreate, planDeleteArchitectureSection, planDeleteRecord, planGet, PLAN_FIELD_GROUPS, PLAN_STATUSES, ISSUE_BATCH_GET_MAX, LIST_PAGE_MAX_LIMIT, PLAN_GET_CARDS_DEFAULT_LIMIT, planGetArchitectureSection, planGetRecord, planList, planRemoveCard, planRename, planReorderArchitectureSection, planUpdateArchitectureSection, planUpdateRecord, repoKnowledgeGet, repoKnowledgeSet, } from "./handlers.js";
93
94
  import { PRIORITY_TIER_WORDS } from "./priority.js";
94
95
  function readEnvOrDie(name) {
95
96
  const v = process.env[name];
@@ -539,6 +540,12 @@ server.tool("issue_dependency", 'Dependency CRUD via /api/issues/:id/dependencie
539
540
  dependency_id: z.number().int().positive().optional(),
540
541
  ...boardField,
541
542
  }, async (args) => jsonResult(await issueDependency(client, args)));
543
+ // ---------------- issue_retire_branch ----------------
544
+ server.tool("issue_retire_branch", "Mark a card's own `card/<id>` branch RETIRED (unsafe to merge) via POST /api/issues/:id/card-branch-retire {reason} (DX-2845). NO status/terminal gate — settable the moment a branch is judged unsafe (an audit rejected it, the card was split into fresh slices, ...), whether the card is ToDo, In Progress, or anything else; this is deliberately NOT the same as captureAndDeleteCardBranch, which only fires once the card itself reaches Done/Cancelled. `by` is server-stamped from the resolved writing identity, never client-supplied. The dispatched worker reads this at its next bootstrap and forces `origin/main` as the checkout start point instead of re-attaching to the retired content — the origin `card/<id>` ref itself is separately backed up then deleted by the worker as a lazy hygiene step. Idempotent: retiring an already-retired branch just re-stamps reason/actor/timestamp.", {
545
+ id: z.string().min(1),
546
+ reason: z.string().min(1),
547
+ ...boardField,
548
+ }, async (args) => jsonResult(await issueRetireBranch(client, args)));
542
549
  // ---------------- issue_quality_gate ----------------
543
550
  server.tool("issue_quality_gate", "Set one card's per-gate `required` flag via POST /api/issues/:id/quality-gates/:gate {required} — the only post-create way (issue_create takes gate_decisions; issue_edit refuses gate keys). PRE `plan-*` gates run before the work dispatch; POST `code-*` gates block complete. Unknown gate → 400. The board state per gate is tri-state: `required` always runs, `optional` runs WHEN this flag is true (optional is NOT off), `disabled` never runs. Optional `effort_level` overrides a `plan-*` gate's reviewer rung (null clears it). The write always succeeds and returns `{issue, applied: true, effective, reason}` — read `effective` (does the gate now run) and `reason` (why the board overrode your value), not just the 200. Board-scoped; see `board`.", {
544
551
  id: z.string().min(1),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.72",
3
+ "version": "0.1.74",
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",