@thehammer/danx-dashboard-mcp 0.1.221 → 0.1.222
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 +0 -45
- package/package.json +1 -1
package/dist/listen.js
CHANGED
|
@@ -329,32 +329,6 @@ export function formatNudgeLine(event) {
|
|
|
329
329
|
"Work these cards; any you cannot work, update to its true state: open a problem, add depends_on or " +
|
|
330
330
|
"conflict_on, block it with the real reason, or rollback_pickup.");
|
|
331
331
|
}
|
|
332
|
-
/** Why a reminder cannot be read, or `null` when it can. */
|
|
333
|
-
export function invalidReminderReason(value) {
|
|
334
|
-
if (!isRecord(value))
|
|
335
|
-
return "the reminder is not an object";
|
|
336
|
-
if (value.kind !== "policy_reminder")
|
|
337
|
-
return "kind is not policy_reminder";
|
|
338
|
-
if (typeof value.text !== "string" || value.text.trim() === "")
|
|
339
|
-
return "text is not a non-empty string";
|
|
340
|
-
return null;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* The label every reminder carries, so the session can never read one as the operator speaking
|
|
344
|
-
* (DX-2955: "labelled unmistakably as automated system reminders, never phrased as the operator").
|
|
345
|
-
*/
|
|
346
|
-
export const REMINDER_LABEL = "AUTOMATED SYSTEM REMINDER from the danxbot dashboard monitor (not from the operator):";
|
|
347
|
-
/**
|
|
348
|
-
* The text of a reminder: the label, then the reminder as the dashboard wrote it. Unlike an
|
|
349
|
-
* activity line the body keeps its line breaks, because a reminder with something off is the
|
|
350
|
-
* numbered checklist plus what is off. Throws, naming the fault, on a malformed reminder.
|
|
351
|
-
*/
|
|
352
|
-
export function formatReminderLine(event) {
|
|
353
|
-
const invalid = invalidReminderReason(event);
|
|
354
|
-
if (invalid !== null)
|
|
355
|
-
throw new Error(`malformed reminder event: ${invalid}`);
|
|
356
|
-
return `${LINE_PREFIX} ${REMINDER_LABEL}\n${event.text.trim()}`;
|
|
357
|
-
}
|
|
358
332
|
/**
|
|
359
333
|
* Incremental SSE parser. Comment lines (keep-alives, the connect marker) and
|
|
360
334
|
* field-less blocks produce no message, which is what keeps them out of the output.
|
|
@@ -495,25 +469,6 @@ export async function runListener(options, deps) {
|
|
|
495
469
|
deps.write({ type: "event", id: null, text, origin: null });
|
|
496
470
|
return null;
|
|
497
471
|
}
|
|
498
|
-
if (message.event === "reminder") {
|
|
499
|
-
// DX-2955 - like a nudge: no usable id, never replayed, never deduplicated, and
|
|
500
|
-
// `origin: null` so `bridge.ts` delivers it immediately instead of folding it
|
|
501
|
-
// into a digest (the generic null-origin exemption in `routeEvent`).
|
|
502
|
-
let parsed;
|
|
503
|
-
let invalid;
|
|
504
|
-
try {
|
|
505
|
-
parsed = JSON.parse(message.data);
|
|
506
|
-
invalid = invalidReminderReason(parsed);
|
|
507
|
-
}
|
|
508
|
-
catch (err) {
|
|
509
|
-
invalid = `not JSON: ${err.message}`;
|
|
510
|
-
}
|
|
511
|
-
const text = invalid === null
|
|
512
|
-
? formatReminderLine(parsed)
|
|
513
|
-
: `${LINE_PREFIX} could not read reminder (${invalid}): ${oneLine(message.data, 300)}`;
|
|
514
|
-
deps.write({ type: "event", id: null, text, origin: null });
|
|
515
|
-
return null;
|
|
516
|
-
}
|
|
517
472
|
if (message.event !== "activity")
|
|
518
473
|
return null;
|
|
519
474
|
// `Number(null)` is 0, so a frame with no id must never be read as event 0: that id
|
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.222",
|
|
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",
|