@thehammer/danx-dashboard-mcp 0.1.207 → 0.1.209
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/terms-halt.js +9 -5
- package/dist/version-floor.js +10 -6
- package/package.json +1 -1
package/dist/terms-halt.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
const TERMS_ACCEPTANCE_PATH = "/api/account/terms-acceptance";
|
|
2
2
|
// Mirrors `termsAcceptUrl("/")` in src/lib/terms-accept-path.ts (a published package cannot import it);
|
|
3
3
|
// terms-gate.integration.test.ts pins the server's link to the same literal. Only meaningful for an
|
|
4
|
-
// operator session: a dispatch's DANXBOT_DASHBOARD_URL is internal, and agent
|
|
4
|
+
// operator session: a dispatch's DANXBOT_DASHBOARD_URL is internal, and a dispatch's own agent credential is never terms-gated.
|
|
5
5
|
const ACCEPT_SCREEN_PATH = "/terms/accept?return=%2F";
|
|
6
6
|
/** Keep in step with `termsRefusalInstruction` in src/dashboard/route-policy.ts. */
|
|
7
|
-
export function haltText(acceptUrl) {
|
|
8
|
-
return ("STOP ALL WORK NOW. The dashboard refuses your access until
|
|
9
|
-
"
|
|
7
|
+
export function haltText(acceptUrl, owner) {
|
|
8
|
+
return ("STOP ALL WORK NOW. The dashboard refuses your access until " +
|
|
9
|
+
(owner === undefined ? "the person you act for" : `${owner}, the user you act for,`) +
|
|
10
|
+
" accepts the current Terms of Use.\n\n" +
|
|
10
11
|
`Give the person this link to accept them: ${acceptUrl}\n\n` +
|
|
11
12
|
"Do not retry, do not look for another route, and never accept the Terms yourself. " +
|
|
12
13
|
"A dispatched agent ends with danxbot_complete({status: \"failed\", summary}) naming this link, " +
|
|
@@ -22,7 +23,10 @@ export function termsHaltFor(result) {
|
|
|
22
23
|
if (typeof body.acceptUrl !== "string") {
|
|
23
24
|
throw new Error("[danx-dashboard-mcp] a terms_not_accepted refusal carried no acceptUrl");
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
if (typeof body.owner !== "string") {
|
|
27
|
+
throw new Error("[danx-dashboard-mcp] a terms_not_accepted refusal carried no owner");
|
|
28
|
+
}
|
|
29
|
+
return haltText(body.acceptUrl, body.owner);
|
|
26
30
|
}
|
|
27
31
|
/** The refusal for a call that would accept the Terms (never an agent's act), or null for any other call. */
|
|
28
32
|
export function termsAcceptanceCallHalt(args, dashboardUrl) {
|
package/dist/version-floor.js
CHANGED
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
* the main danxbot repo — this package cannot import them, see below).
|
|
6
6
|
*
|
|
7
7
|
* The dashboard stamps `X-Danx-Mcp-Min-Version` on every routed `/api/*`
|
|
8
|
-
* response with
|
|
9
|
-
* `src/mcp-contract.ts` — DX-3597 made
|
|
10
|
-
*
|
|
11
|
-
* published";
|
|
8
|
+
* response with the floor of the `api` surface (`MCP_SURFACE_MIN_VERSIONS.api`
|
|
9
|
+
* in `src/mcp-contract.ts` — DX-3597 made a floor track the version where
|
|
10
|
+
* its surface's MCP-exposed contract last changed, not "whatever's currently
|
|
11
|
+
* published"; DX-4215 scoped floors per surface, so only a change to the
|
|
12
|
+
* `danxbot_api` passthrough itself blocks this client's calls. A floor for
|
|
13
|
+
* another surface, such as the stats wire, is enforced by the server on
|
|
14
|
+
* requests to that surface alone and never reaches this header; see that
|
|
15
|
+
* file's module doc for the full decision).
|
|
12
16
|
*
|
|
13
17
|
* `DashboardHttpClient.request()` (`./http-client.ts`) reads this header on
|
|
14
18
|
* the FIRST call this process makes (regardless of outcome — a proactive
|
|
@@ -104,8 +108,8 @@ export class McpOutdatedError extends Error {
|
|
|
104
108
|
have;
|
|
105
109
|
need;
|
|
106
110
|
constructor(have, need) {
|
|
107
|
-
super(`[danx-dashboard-mcp] mcp_outdated: this MCP is running ${MCP_PACKAGE_NAME}@${have}, but the dashboard ` +
|
|
108
|
-
`requires >= ${need}. Restart your Claude Code session to pick up the published update.`);
|
|
111
|
+
super(`[danx-dashboard-mcp] mcp_outdated: this MCP is running ${MCP_PACKAGE_NAME}@${have}, but the dashboard's ` +
|
|
112
|
+
`danxbot_api surface requires >= ${need}. Restart your Claude Code session to pick up the published update.`);
|
|
109
113
|
this.name = "McpOutdatedError";
|
|
110
114
|
this.have = have;
|
|
111
115
|
this.need = need;
|
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.209",
|
|
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",
|