@thehammer/danx-dashboard-mcp 0.1.264 → 0.1.265

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
@@ -12,7 +12,7 @@ Stdio MCP server fronting danxbot's dashboard HTTP API. Since DX-3465 it exposes
12
12
  | `DANX_DASHBOARD_CREDENTIAL` | A DISPATCH's credential: the bearer verbatim, substituted into the materialized `.mcp.json` from its overlay (DX-2862, `src/credential.ts`). Authoritative when set; it never signs out. An operator session sets nothing: with no credential the server boots SIGNED OUT, every tool except `plan_connect` returns one "not signed in" halt, and `plan_connect` requests access (below). The same resolver serves the `bridge` subcommand, so a session's tools and its event stream can never sign in as two different identities |
13
13
  | `DANXBOT_TEAM` | OPTIONAL, non-secret (DX-4446): the team slug (or id) whose approvers see this session's access request in their danxbot site. Set it in the repo's `.mcp.json` env block or the shell. Unset, the request is answered by link only. A value that is not a team slug fails at boot; a team the dashboard does not know makes `plan_connect` answer `unknown_team` (fix `DANXBOT_TEAM`), never a silent link fallback |
14
14
  | `DANX_REPO_NAME` | OPTIONAL (DX-4555): repo half of the qualified board id; sent as the access request's repo label |
15
- | `DANXBOT_BOARD_NAME` | OPTIONAL (DX-4555; needs `DANX_REPO_NAME`): board-slug half of the qualified board id (the dispatch injects `board.slug` here). With neither variable set (the danxbot plugin's own server) the server has no default board: a board-scoped call must carry its `board` argument or it fails loud |
15
+ | `DANXBOT_BOARD_NAME` | OPTIONAL (DX-4555; needs `DANX_REPO_NAME`): board-slug half of the qualified board id (the dispatch injects `board.slug` here). With neither variable set (the danxbot plugin's own server) the server has no default board: a call that needs a board must carry its `board` argument or the dashboard answers 400 (plan and plan-session routes take their boards from the plan and need none) |
16
16
 
17
17
  BOARD-ONLY (DX-1171): board is the first-level concept; repo is DERIVED from board server-side, never passed. At boot the package composes the dispatch's qualified board id `<repo>:<slug>` from `DANX_REPO_NAME` + `DANXBOT_BOARD_NAME` and appends it as `?board=<id>` (and `body.board` on create) to every `/api/issues/*` request, except `GET /api/issues` (the list), whose board is OPTIONAL (DX-4542): there it sends a board only when the caller names one, because no board is the team's whole list across every board. Each tool exposes an optional `board` arg — a FULL qualified id `<repo>:<slug>` (e.g. `platform:the-supply-operations-hub`) — that overrides it per-call for cross-board reads/writes (unknown board → 404). The dashboard owns board→repo resolution; this package never sends `repo`.
18
18
 
package/dist/handlers.js CHANGED
@@ -11,7 +11,7 @@
11
11
  * set, it overrides the dispatch's configured board for that single call
12
12
  * (forwarded as `?board=<board>` — and into `body.board` for create — so
13
13
  * an agent can target any board). Omitted → falls back to the dispatch's
14
- * env-derived board. The dashboard route validates the board (owning
14
+ * env-derived board, if any (a board-less server stamps none). The dashboard route validates the board (owning
15
15
  * board→repo) and 404s on unknown; the MCP forwards the refusal envelope
16
16
  * verbatim, never duplicates validation.
17
17
  *
@@ -115,11 +115,12 @@ export class DashboardHttpClient {
115
115
  const stamp = boardStampOf(method, `${basePath}${cleanPath}`);
116
116
  if (stamp === "stamp") {
117
117
  const board = boardOverride ?? this.config.board;
118
- // DX-4555: a board-less server (the danxbot plugin's, no DANX_REPO_NAME/DANXBOT_BOARD_NAME) has no board to stamp.
119
- if (board === undefined) {
120
- throw new Error(`[danx-dashboard-mcp] ${method} ${basePath}${cleanPath} is board-scoped and this server has no configured board: pass the \`board\` argument (a qualified id, <repo>:<slug>)`);
121
- }
122
- params.set("board", board);
118
+ // DX-4592: a board-less server (the danxbot plugin's, no DANX_REPO_NAME/DANXBOT_BOARD_NAME) stamps nothing when the call names no
119
+ // board. Whether the route NEEDS one is the dashboard's to say: a route that does (issue create/import, quality-gate and settings
120
+ // routes, the dispatch verbs) answers 400 naming `board`, while a card-id, plan or plan-session route takes its board from the card
121
+ // or the plan. Refusing here (DX-4555) wrongly stopped every plan route, `plan_connect` first.
122
+ if (board !== undefined)
123
+ params.set("board", board);
123
124
  }
124
125
  else if (stamp === "named" && boardOverride !== undefined) {
125
126
  params.set("board", boardOverride);
package/dist/index.js CHANGED
@@ -172,8 +172,8 @@ let permissionWatch;
172
172
  * halves the worker injects and build the HTTP client. DANXBOT_BOARD_NAME
173
173
  * already carries the board SLUG at the spawn site (src/dispatch/core.ts sets it
174
174
  * from `board.slug`), so a plain join yields the canonical id — no transform.
175
- * Both unset (DX-4555) leaves the server board-less: a board-scoped call must then carry its own `board`
176
- * argument (`DashboardHttpClient.buildUrl` refuses otherwise). A slug without its repo fails loud.
175
+ * Both unset (DX-4555) leaves the server board-less: a call that needs a board must then carry its own `board`
176
+ * argument, or the dashboard answers 400 (DX-4592: the client no longer refuses on its behalf). A slug without its repo fails loud.
177
177
  */
178
178
  function boot() {
179
179
  const dashboardUrl = readEnvOrDie("DANXBOT_DASHBOARD_URL");
@@ -495,7 +495,7 @@ const boardField = {
495
495
  .string()
496
496
  .min(1)
497
497
  .optional()
498
- .describe("Board id `<repo>:<slug>`; omit for this dispatch's board, except on `GET /api/issues`, where omitting it lists the whole team across every board. Unknown → 404."),
498
+ .describe("Board id `<repo>:<slug>`; omit for this dispatch's board (none when this server has no default board), except on `GET /api/issues`, where omitting it lists the whole team across every board. Unknown → 404."),
499
499
  };
500
500
  // DX-3465 (code-architecture gate finding, at 275f82c0d) — `resource_fields`
501
501
  // (DX-3426) was deleted from here: it was a dedicated wrapper around a plain
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DX-4303 / DX-4542 - what the client does with a `?board=` query key on the dashboard route a request reaches: `stamp` it (the route
3
- * takes it, so the dispatch's board is filled in), `refuse` it (the server 400s it) or `named` (the board is optional and no board is the
3
+ * takes it, so the dispatch's board is filled in when the server has one), `refuse` it (the server 400s it) or `named` (the board is optional and no board is the
4
4
  * whole team: sent only when the caller names one).
5
5
  *
6
6
  * The answer comes from the dashboard's own route table, shipped in this package as `route-board-scope.generated.ts` (generated by
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.264",
3
+ "version": "0.1.265",
4
4
  "description": "Stdio MCP server fronting danxbot's dashboard API for agents (operator sessions and dispatched workers alike): the generic danxbot_api/danxbot_api_list/danxbot_api_spec tools reach any route the caller's credential may call, plus dedicated agent-specific tools (plan_connect, danxbot_complete, and other per-dispatch lifecycle callbacks) (DX-3465, PLN-11 R-25).",
5
5
  "license": "MIT",
6
6
  "type": "module",