@thehammer/danx-dashboard-mcp 0.1.259 → 0.1.260

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/listen.js CHANGED
@@ -12,8 +12,8 @@
12
12
  * `text` is what the session reads; an event it cannot read still produces one
13
13
  * (`could not read event …`), never silence. `id` is `null` only for a frame
14
14
  * that carried no usable id — which includes DX-2885's `nudge` frame
15
- * (`formatNudgeLine`) and DX-4340's `pacing` frame (`formatPacingLine`):
16
- * both are advisory, written fresh by the dashboard's own keep-alive tick,
15
+ * (`formatNudgeLine`), DX-4340's `pacing` frame (`formatPacingLine`) and
16
+ * DX-4342's `resume` frame (`formatResumeLine`): all are advisory, written fresh by the dashboard's own keep-alive tick,
17
17
  * and never replayed, so they ride this same shape with `id: null` rather
18
18
  * than growing a THIRD output variant.
19
19
  * - `{type:"stopped", reason, detail, refusal?}` — once, last. `reason`
@@ -352,6 +352,21 @@ export function formatPacingLine(event) {
352
352
  throw new Error(`malformed pacing message: ${invalid}`);
353
353
  return pacingRelayLine(event.text);
354
354
  }
355
+ /** Why a resume message cannot be read, or `null` when it can. */
356
+ export function invalidResumeReason(value) {
357
+ if (!isRecord(value))
358
+ return "the resume message is not an object";
359
+ if (typeof value.text !== "string" || value.text.trim() === "")
360
+ return "text is empty";
361
+ return null;
362
+ }
363
+ /** The one readable line for a resume message: the dashboard's text, on one line, cut like a pacing line. Throws, naming the fault, on a malformed message. */
364
+ export function formatResumeLine(event) {
365
+ const invalid = invalidResumeReason(event);
366
+ if (invalid !== null)
367
+ throw new Error(`malformed resume message: ${invalid}`);
368
+ return pacingRelayLine(event.text);
369
+ }
355
370
  /**
356
371
  * Incremental SSE parser. Comment lines (keep-alives, the connect marker) and
357
372
  * field-less blocks produce no message, which is what keeps them out of the output.
@@ -487,6 +502,9 @@ export async function runListener(options, deps) {
487
502
  // DX-4340 - the pacing tick's one message for this session's Claude account (level or budget changed): advisory like a nudge.
488
503
  if (message.event === "pacing")
489
504
  return emitAdvisory(message, "pacing message", invalidPacingReason, (p) => formatPacingLine(p));
505
+ // DX-4342 - the auto-resume's message once the limit that paused or stopped this session has reset: advisory like a pacing message.
506
+ if (message.event === "resume")
507
+ return emitAdvisory(message, "resume message", invalidResumeReason, (p) => formatResumeLine(p));
490
508
  if (message.event !== "activity")
491
509
  return null;
492
510
  // `Number(null)` is 0, so a frame with no id must never be read as event 0: that id
@@ -44,7 +44,6 @@ export const GET_ROUTE_BOARD_SCOPE = [
44
44
  ["/api/self-repair/errors", false],
45
45
  ["/api/sync-root", false],
46
46
  ["/api/tasks", false],
47
- ["/api/team/audit-events", false],
48
47
  ["/api/team/invitations", false],
49
48
  ["/api/team/members", false],
50
49
  ["/api/team/roles", false],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.259",
3
+ "version": "0.1.260",
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",