@thehammer/danx-dashboard-mcp 0.1.238 → 0.1.240

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/activity.js CHANGED
@@ -85,6 +85,19 @@ export function subagentActivityId(agentId) {
85
85
  const bare = agentId.startsWith(SUBAGENT_PREFIX) ? agentId.slice(SUBAGENT_PREFIX.length) : agentId;
86
86
  return `${SUBAGENT_PREFIX}${bare}`;
87
87
  }
88
+ /**
89
+ * DX-4498 — the facts only a transcript knows (the spawning sub-agent, effort, current tool call, how a background task
90
+ * ended, the brief's card). A hook envelope carries none of them, so it reports each as unknown; the server's merge
91
+ * never lets an unknown erase a value the transcript producer stored. A `SubagentStop` names no status either: its
92
+ * finish reads as `done` unless a task notification says otherwise.
93
+ */
94
+ const NO_TRANSCRIPT_FACTS = {
95
+ parentActivityId: null,
96
+ effort: null,
97
+ currentActivity: null,
98
+ endStatus: null,
99
+ briefIssueId: null,
100
+ };
88
101
  function nonEmptyString(value) {
89
102
  return typeof value === "string" && value !== "";
90
103
  }
@@ -123,6 +136,7 @@ export function activityChangeFromHook(event, envelope, eventAtMs) {
123
136
  // its liveness is its start and `finishedAt` stays null until the dispatch ends.
124
137
  lastActivityAt: eventAtMs,
125
138
  finishedAt: null,
139
+ ...NO_TRANSCRIPT_FACTS,
126
140
  },
127
141
  };
128
142
  }
@@ -149,6 +163,7 @@ export function activityChangeFromHook(event, envelope, eventAtMs) {
149
163
  startedAt: eventAtMs,
150
164
  lastActivityAt: eventAtMs,
151
165
  finishedAt: event === "SubagentStop" ? eventAtMs : null,
166
+ ...NO_TRANSCRIPT_FACTS,
152
167
  },
153
168
  };
154
169
  }
package/dist/index.js CHANGED
@@ -555,7 +555,11 @@ strictTool("plan_connect",
555
555
  "titles and a first page of open cards) and `listenerHealth` (when its `state` is not `healthy`, do its " +
556
556
  "`nextStep`). A session is on at most one plan: connecting elsewhere moves it, and `movedFrom` names the " +
557
557
  "plan it left. Afterwards a `danxbot_api` call to a `/api/plans/mine/...` route acts on this plan and " +
558
- "takes no plan id.", {
558
+ "takes no plan id. DX-4493 — a connected session's title must be `{Name}: PLAN-NNN {short title}`: the " +
559
+ "reply's `naming` block (`status: needed`: `format`, `instruction`, `suggestedTitle`, `liveNames`; `ok`: " +
560
+ "nothing to do) gives the exact title. Rename this thread to it (desktop `set_session_title`; terminal: ask " +
561
+ "the person to `/rename`), then connect again with that exact `title`. A wrong format or a name another live " +
562
+ "session holds is refused.", {
559
563
  plan_id: z
560
564
  .number()
561
565
  .int()
@@ -566,7 +570,7 @@ strictTool("plan_connect",
566
570
  .string()
567
571
  .min(1)
568
572
  .optional()
569
- .describe('This session\'s own Claude title: `get_session({session_id:"self"}).title`, verbatim, never invented and never the plan\'s name. Omit to keep the stored title.'),
573
+ .describe('Only the exact title from the previous reply\'s `naming` block (`{Name}: PLAN-NNN {short title}`), after you renamed this thread to it. Omit on the first connect.'),
570
574
  disconnect: z.boolean().optional().describe("true = leave `plan_id` (your current plan); no `title`."),
571
575
  },
572
576
  // DX-2862 — the connect is also the moment this session's event bridge learns
@@ -34,8 +34,7 @@ export const POLL_GRACE_MS = 90_000;
34
34
  const KEEP_KEY_FILE_EVERY_MS = 60 * 60 * 1000;
35
35
  /** The request's title when the agent gave none: the session id's first characters. */
36
36
  const TITLE_FALLBACK_LENGTH = 8;
37
- export const SIGN_IN_HALT = "Not signed in to the danxbot dashboard. Call `plan_connect` (with `title`: your session's own " +
38
- "title) to request access; the user approves it in their browser, then this tool works.";
37
+ export const SIGN_IN_HALT = "Not signed in to the danxbot dashboard. Call `plan_connect` (with `plan_id`) to request access; the user approves it in their browser, then this tool works.";
39
38
  /** DX-4418: the session's key lapsed (a day unused) or the dashboard does not know it; a PERSON's revoke is `keyRevokedHalt` instead. */
40
39
  export const KEY_LAPSED_HALT = "The dashboard no longer accepts this session's key (it lapsed after a day unused), so this session is signed out. " +
41
40
  SIGN_IN_HALT;
@@ -144,7 +144,8 @@ export class OperatorSessionStats {
144
144
  // collector's own estimate never counts them twice; the bridge has no
145
145
  // side-effecting transcript subscriber to skip them for.
146
146
  watcher.onUsageLine((raw, meta) => this.usage.observeRawLine(raw, meta));
147
- watcher.onEntry(activities.onEntry);
147
+ // DX-4498 — the raw line feed: the brief and Claude Code's task notifications are not entries.
148
+ watcher.onUsageLine(activities.onLine);
148
149
  this.watcher = watcher;
149
150
  void watcher
150
151
  .start()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.238",
3
+ "version": "0.1.240",
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",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@modelcontextprotocol/sdk": "1.29.0",
34
- "@thehammer/danx-session-telemetry": "0.1.25",
34
+ "@thehammer/danx-session-telemetry": "0.1.26",
35
35
  "zod": "^3.25.76"
36
36
  },
37
37
  "devDependencies": {