@thehammer/danx-dashboard-mcp 0.1.236 → 0.1.238

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.
@@ -125,8 +125,11 @@ export class DashboardHttpClient {
125
125
  // JSON. Arrays are `typeof "object"` too, so the array check must
126
126
  // come BEFORE the plain-object branch. A plain scalar stringifies
127
127
  // as before.
128
+ // DX-4405 — an array holding an object (the list `sort`) is the one array the server parses as JSON.
128
129
  params.set(k, Array.isArray(v)
129
- ? v.map((item) => String(item)).join(",")
130
+ ? v.some((item) => typeof item === "object")
131
+ ? JSON.stringify(v)
132
+ : v.map((item) => String(item)).join(",")
130
133
  : typeof v === "object"
131
134
  ? JSON.stringify(v)
132
135
  : String(v));
package/dist/index.js CHANGED
@@ -288,8 +288,9 @@ Conventions for every \`danxbot_api\` call. Find a route with \`danxbot_api_list
288
288
 
289
289
  RESOURCES. Most collections take GET (list) and POST (create); a single resource (\`<collection>/<id>\`) takes
290
290
  GET, PATCH or PUT (send only the fields you change) and DELETE. A card is edited at
291
- \`PATCH /api/issues/<id>/edit\`. A list or get answers scalars only: name each relation or heavy field you need in
292
- the \`fields\` query tree. \`GET /api/resources/<resource>/fields\` lists the names.
291
+ \`PATCH /api/issues/<id>/edit\`. A card get answers the compact row; the card list answers a compact row per card, one page of 50 with
292
+ \`total\` (page with \`limit\` and \`offset\`). Name each other field or relation you need in the \`fields\` query
293
+ tree. \`GET /api/resources/<resource>/fields\` lists the names.
293
294
 
294
295
  STALE HASH. A write to contested text (a card's title, description or checklists, a plan record, a problem) sends
295
296
  back the \`content_hash\` or \`base_hash\` you read from that resource. A stale hash is refused 409 with the current
@@ -431,13 +432,12 @@ strictTool("danxbot_api",
431
432
  .describe('Full path starting with "/api/" — never a route template.'),
432
433
  // DX-3465 — a query value may be a scalar, a field TREE (a plain
433
434
  // object, e.g. `{"description":true,"comments":{"limit":20}}` — see
434
- // SERVER_INSTRUCTIONS above and the OpenAPI spec's `fields` schema), or
435
- // an array of scalars (e.g. `ids` on the batch-get route).
436
- // `DashboardHttpClient#buildUrl` JSON-encodes a plain object but
437
- // comma-joins an array, matching the two shapes the server actually
438
- // parses (a JSON field tree vs. a comma-separated list param) — so array
439
- // elements are restricted to scalars, the only thing a comma-join can
440
- // represent losslessly.
435
+ // SERVER_INSTRUCTIONS above and the OpenAPI spec's `fields` schema), an
436
+ // array of scalars (e.g. `ids` on the batch-get route) or, DX-4405, an
437
+ // array of objects (a list's `sort`, `[{column, order}]`).
438
+ // `DashboardHttpClient#buildUrl` JSON-encodes a plain object and an array
439
+ // of objects but comma-joins an array of scalars, matching the shapes the
440
+ // server actually parses (a JSON tree or sort vs. a comma-separated list param).
441
441
  query: queryValueSchema.optional(),
442
442
  // DX-3685 — was `z.unknown()` (JSON Schema `{}`), which gave the model
443
443
  // no structural hint that a body must be an OBJECT, so it sometimes
@@ -8,6 +8,7 @@
8
8
  export const GET_ROUTE_BOARD_SCOPE = [
9
9
  ["/api/access-requests", false],
10
10
  ["/api/account/sessions", false],
11
+ ["/api/agents/:agentId/halt-history", false],
11
12
  ["/api/audit-events", false],
12
13
  ["/api/boards", false],
13
14
  ["/api/boards/:boardId", false],
@@ -18,6 +19,7 @@ export const GET_ROUTE_BOARD_SCOPE = [
18
19
  ["/api/dispatches/:dispatchId/usage-events", false],
19
20
  ["/api/dispatches/dead-letter-ids", false],
20
21
  ["/api/docs/:repo/changes", false],
22
+ ["/api/docs/:repo/progress/:pathId", false],
21
23
  ["/api/failure-categories", false],
22
24
  ["/api/failure-categories/ambiguous", false],
23
25
  ["/api/failure-categories/uncategorized", false],
@@ -46,5 +48,10 @@ export const GET_ROUTE_BOARD_SCOPE = [
46
48
  ["/api/team/members", false],
47
49
  ["/api/team/roles", false],
48
50
  ["/api/users", false],
51
+ ["/api/worker/catalog-mcp-servers", false],
52
+ ["/api/worker/dispatches/:dispatchId", true],
53
+ ["/api/worker/dispatches/:dispatchId/usage-predecessor", false],
54
+ ["/api/worker/dispatches/non-terminal", false],
55
+ ["/api/worker/dispatches/recent-signal-failures", false],
49
56
  ["/api/workers", false],
50
57
  ];
package/dist/types.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import { z } from "zod";
2
2
  /**
3
3
  * The zod schema for `danxbot_api`'s `query` argument, matching the
4
- * `QueryValue` type above — a scalar, a field-tree object, or an array
5
- * whose elements are themselves scalars (never objects; a comma-join
6
- * cannot represent one losslessly). Exported so it can be exercised
4
+ * `QueryValue` type above — a scalar, a field-tree object, or an array of
5
+ * scalars (comma-joined) or objects (JSON-encoded, the list `sort`). Exported so it can be exercised
7
6
  * directly in tests without going through the MCP tool-call machinery.
8
7
  */
9
8
  export const queryValueSchema = z.record(z.union([
@@ -12,7 +11,7 @@ export const queryValueSchema = z.record(z.union([
12
11
  z.boolean(),
13
12
  z.null(),
14
13
  z.record(z.unknown()),
15
- z.array(z.union([z.string(), z.number(), z.boolean()])),
14
+ z.array(z.union([z.string(), z.number(), z.boolean(), z.record(z.unknown())])),
16
15
  ]));
17
16
  /**
18
17
  * DX-3685 — the zod schema for `danxbot_api`'s `body` argument. Every
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.236",
3
+ "version": "0.1.238",
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",