@thehammer/danx-dashboard-mcp 0.1.211 → 0.1.212

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.
Files changed (2) hide show
  1. package/dist/listen.js +7 -1
  2. package/package.json +1 -1
package/dist/listen.js CHANGED
@@ -122,6 +122,10 @@ export function invalidEventReason(value) {
122
122
  if (typeof value.origin !== "string" || !ACTIVITY_ORIGINS.has(value.origin)) {
123
123
  return "origin is not one of operator, agent, machine";
124
124
  }
125
+ // DX-4246 — the key snapshot is part of every event the dashboard sends, `null` when no key wrote it.
126
+ if (value.viaKey !== null && !(isRecord(value.viaKey) && typeof value.viaKey.id === "number" && typeof value.viaKey.name === "string")) {
127
+ return "viaKey is not null or {id, name}";
128
+ }
125
129
  const d = value.detail;
126
130
  if (!isRecord(d))
127
131
  return "detail is not an object";
@@ -187,7 +191,9 @@ export function invalidEventReason(value) {
187
191
  * reader would have to cross-reference.
188
192
  */
189
193
  function actorLabel(event) {
190
- return `${event.actor} (${event.origin})`;
194
+ // DX-4246 — a write made through an API key names the user AND the key ("dan via claude-laptop (agent)").
195
+ const via = event.viaKey === null ? "" : ` via ${event.viaKey.name}`;
196
+ return `${event.actor}${via} (${event.origin})`;
191
197
  }
192
198
  /** Only ever called on an event `invalidEventReason` accepted, so its casts are checked. */
193
199
  function describe(event) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.211",
3
+ "version": "0.1.212",
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",