@thehammer/danx-dashboard-mcp 0.1.212 → 0.1.213
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/http-client.js +30 -3
- package/package.json +1 -1
package/dist/http-client.js
CHANGED
|
@@ -12,8 +12,8 @@ import { assertVersionFloorSatisfied, MCP_MIN_VERSION_HEADER } from "./version-f
|
|
|
12
12
|
* `rejectUnknownParams(params, TOP_LEVEL_..._PARAM_KEYS)` allowlist
|
|
13
13
|
* (`src/issues/plans-routes.ts`, `src/dashboard/dispatches-routes.ts`,
|
|
14
14
|
* `src/issues/boards-routes.ts`) — none of those allowlists names `board`
|
|
15
|
-
* (DX-3725), so stamping it 400s. THIS
|
|
16
|
-
* is the one function that reads
|
|
15
|
+
* (DX-3725), so stamping it 400s. THIS list and `NON_BOARD_SCOPED_PATH_PATTERNS` below are the only
|
|
16
|
+
* classification; `isBoardScopedRoute` is the one function that reads them — no second, independently-drifting
|
|
17
17
|
* copy anywhere else in this package.
|
|
18
18
|
*
|
|
19
19
|
* Deliberately prefix-matched, not exact-matched: every sub-route of a
|
|
@@ -28,10 +28,37 @@ const NON_BOARD_SCOPED_PATH_PREFIXES = [
|
|
|
28
28
|
"/api/boards",
|
|
29
29
|
"/api/routes",
|
|
30
30
|
"/api/openapi",
|
|
31
|
+
// DX-4261: install- or team-global families, whose list reads declare no `board` (the engine 400s an unknown key).
|
|
32
|
+
"/api/team",
|
|
33
|
+
"/api/users",
|
|
34
|
+
"/api/account",
|
|
35
|
+
"/api/platform",
|
|
36
|
+
"/api/failure-categories",
|
|
37
|
+
"/api/failure-signatures",
|
|
38
|
+
"/api/notifications",
|
|
39
|
+
"/api/self-repair",
|
|
40
|
+
"/api/audit-events",
|
|
41
|
+
"/api/docs",
|
|
42
|
+
"/api/repos",
|
|
43
|
+
"/api/sync-root",
|
|
44
|
+
"/api/workers",
|
|
45
|
+
"/api/tasks",
|
|
46
|
+
"/api/reminders",
|
|
47
|
+
];
|
|
48
|
+
/**
|
|
49
|
+
* DX-4261: non-board-scoped routes a prefix cannot express, because their family root (`/api/issues`, `/api/catalog`) is board-scoped.
|
|
50
|
+
* `/api/agents` stays stamped: `?board=` there selects the roster read (DX-4220).
|
|
51
|
+
*/
|
|
52
|
+
const NON_BOARD_SCOPED_PATH_PATTERNS = [
|
|
53
|
+
/^\/api\/issues\/[^/]+\/(dispatches|problems)$/,
|
|
54
|
+
/^\/api\/catalog\/[^/]+$/,
|
|
55
|
+
// The LIST read only: `/api/plan-sessions/me/plan` reads the stamped board to pin the operator dispatch (DX-2954).
|
|
56
|
+
/^\/api\/plan-sessions$/,
|
|
31
57
|
];
|
|
32
58
|
/** DX-3750 — does `routePath` (`<basePath><path>`, no query string) take a `?board=` at all? See `NON_BOARD_SCOPED_PATH_PREFIXES`'s own doc. */
|
|
33
59
|
export function isBoardScopedRoute(routePath) {
|
|
34
|
-
return !NON_BOARD_SCOPED_PATH_PREFIXES.some((prefix) => routePath === prefix || routePath.startsWith(`${prefix}/`))
|
|
60
|
+
return !(NON_BOARD_SCOPED_PATH_PREFIXES.some((prefix) => routePath === prefix || routePath.startsWith(`${prefix}/`)) ||
|
|
61
|
+
NON_BOARD_SCOPED_PATH_PATTERNS.some((pattern) => pattern.test(routePath)));
|
|
35
62
|
}
|
|
36
63
|
export class DashboardHttpClient {
|
|
37
64
|
config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thehammer/danx-dashboard-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.213",
|
|
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",
|