@thehammer/danx-dashboard-mcp 0.1.207 → 0.1.208

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.
@@ -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 credentials are never terms-gated.
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 the person you act for accepts the " +
9
- "current Terms of Use.\n\n" +
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
- return haltText(body.acceptUrl);
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.207",
3
+ "version": "0.1.208",
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",