@thehammer/danx-dashboard-mcp 0.1.256 → 0.1.259
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 +3 -3
- package/dist/one-line.js +6 -0
- package/dist/pacing-relay.js +16 -0
- package/dist/route-board-scope.generated.js +1 -0
- package/package.json +1 -1
package/dist/listen.js
CHANGED
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
* danxbot source.
|
|
50
50
|
*/
|
|
51
51
|
import { errorCodeOf } from "./json-body.js";
|
|
52
|
-
import { oneLine } from "./one-line.js";
|
|
52
|
+
import { LINE_PREFIX, oneLine } from "./one-line.js";
|
|
53
|
+
import { pacingRelayLine } from "./pacing-relay.js";
|
|
53
54
|
export const INITIAL_BACKOFF_MS = 1_000;
|
|
54
55
|
export const MAX_BACKOFF_MS = 30_000;
|
|
55
56
|
/** Three of the dashboard's 15 s keep-alives without a byte means the connection is dead. */
|
|
@@ -68,7 +69,6 @@ export const DELIVERED_ID_MEMORY = 1_000;
|
|
|
68
69
|
export function capResumeIds(ids) {
|
|
69
70
|
return ids.slice(-DELIVERED_ID_MEMORY);
|
|
70
71
|
}
|
|
71
|
-
const LINE_PREFIX = "[danx-dashboard stream]";
|
|
72
72
|
const ACTIVITY_ORIGINS = new Set(["operator", "agent", "machine"]);
|
|
73
73
|
function quoted(value) {
|
|
74
74
|
return `"${value.text}${value.truncated ? "…" : ""}"`;
|
|
@@ -350,7 +350,7 @@ export function formatPacingLine(event) {
|
|
|
350
350
|
const invalid = invalidPacingReason(event);
|
|
351
351
|
if (invalid !== null)
|
|
352
352
|
throw new Error(`malformed pacing message: ${invalid}`);
|
|
353
|
-
return
|
|
353
|
+
return pacingRelayLine(event.text);
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
356
356
|
* Incremental SSE parser. Comment lines (keep-alives, the connect marker) and
|
package/dist/one-line.js
CHANGED
|
@@ -17,3 +17,9 @@ export function oneLine(text, maxCodePoints) {
|
|
|
17
17
|
const points = Array.from(collapsed);
|
|
18
18
|
return points.length > maxCodePoints ? `${points.slice(0, maxCodePoints).join("")}…` : collapsed;
|
|
19
19
|
}
|
|
20
|
+
/** The prefix of every line the stream listener emits for the session to read. */
|
|
21
|
+
export const LINE_PREFIX = "[danx-dashboard stream]";
|
|
22
|
+
/** `text` as one prefixed listener line, optionally cut (the one template of a listener line, shared with whoever must know its length). */
|
|
23
|
+
export function prefixedLine(text, maxCodePoints) {
|
|
24
|
+
return oneLine(`${LINE_PREFIX} ${text}`, maxCodePoints);
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { prefixedLine } from "./one-line.js";
|
|
2
|
+
/**
|
|
3
|
+
* DX-4341 - the longest pacing line the stream listener relays whole. `formatPacingLine` (`listen.ts`) cuts a pacing line, PREFIX INCLUDED and
|
|
4
|
+
* after whitespace collapses, to this many code points and ends it with an ellipsis, which would drop the tail of a message first (an
|
|
5
|
+
* orchestrator's duties, the end of the pause note format). The dashboard renders the message and refuses one that would be cut
|
|
6
|
+
* (`pacingRelayLength`, used by `src/team-pacing/pacing-message.ts`), so the cut and the refusal measure the very same line.
|
|
7
|
+
*/
|
|
8
|
+
export const PACING_RELAY_MAX_CODE_POINTS = 1000;
|
|
9
|
+
/** The line the listener emits for pacing text `text`: prefixed, on one line, cut at the relay maximum. */
|
|
10
|
+
export function pacingRelayLine(text) {
|
|
11
|
+
return prefixedLine(text, PACING_RELAY_MAX_CODE_POINTS);
|
|
12
|
+
}
|
|
13
|
+
/** How many code points the listener's line for `text` has before the cut. */
|
|
14
|
+
export function pacingRelayLength(text) {
|
|
15
|
+
return Array.from(prefixedLine(text)).length;
|
|
16
|
+
}
|
|
@@ -44,6 +44,7 @@ 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],
|
|
47
48
|
["/api/team/invitations", false],
|
|
48
49
|
["/api/team/members", false],
|
|
49
50
|
["/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.
|
|
3
|
+
"version": "0.1.259",
|
|
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",
|