@thehammer/danx-dashboard-mcp 0.1.228 → 0.1.229
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/bridge.js +5 -4
- package/dist/session-title.js +6 -2
- package/package.json +1 -1
package/dist/bridge.js
CHANGED
|
@@ -681,8 +681,9 @@ export async function runBridge(options, deps) {
|
|
|
681
681
|
? { state: "stopped", reason: stoppedReason ?? undefined }
|
|
682
682
|
: { state: "reconnecting" };
|
|
683
683
|
// DX-4461 - a rename reaches the dashboard without the agent: the title in the session's transcript rides the heartbeat
|
|
684
|
-
// when it differs from the one the dashboard last answered with.
|
|
685
|
-
//
|
|
684
|
+
// when it differs from the one the dashboard last answered with. Only the LATEST landed answer counts: one without a
|
|
685
|
+
// title (an older dashboard, including one rolled back to mid-session, or a refusal) stops the title until an answer
|
|
686
|
+
// carries one again, since an older dashboard refuses the `title` key and a refused heartbeat is a dead listener.
|
|
686
687
|
const titleReader = options.transcriptPath !== undefined ? new TranscriptTitleReader(options.transcriptPath) : null;
|
|
687
688
|
let dashboardTitle;
|
|
688
689
|
let lastTitleError = null;
|
|
@@ -710,8 +711,8 @@ export async function runBridge(options, deps) {
|
|
|
710
711
|
const title = titleToReport();
|
|
711
712
|
void sessionStats.tick(async (stats) => {
|
|
712
713
|
const answer = await sendHeartbeat(options, deps, connectionNow(), stats, title);
|
|
713
|
-
if (answer.
|
|
714
|
-
dashboardTitle = answer.title;
|
|
714
|
+
if (answer.landed)
|
|
715
|
+
dashboardTitle = answer.title ?? undefined;
|
|
715
716
|
// DX-4418 - a person revoked this session's key: tell the session to stop, at once and only once, as an ordinary event
|
|
716
717
|
// line (the same delivery the silent-failure notice below uses). Its next dashboard call says the same.
|
|
717
718
|
if (answer.revocation !== null && !revocationAnnounced) {
|
package/dist/session-title.js
CHANGED
|
@@ -109,7 +109,11 @@ function parseTitleRecord(line, path) {
|
|
|
109
109
|
const trimmed = customTitle.trim();
|
|
110
110
|
return trimmed === "" ? null : boundTitle(trimmed);
|
|
111
111
|
}
|
|
112
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* At most {@link SESSION_TITLE_MAX_CHARS} UTF-16 units, cut on a code-point boundary. A cut that lands after a space is
|
|
114
|
+
* trimmed again: the dashboard stores the trimmed title, so an untrimmed one would never equal it and the bridge would
|
|
115
|
+
* resend it on every heartbeat.
|
|
116
|
+
*/
|
|
113
117
|
function boundTitle(title) {
|
|
114
118
|
if (title.length <= SESSION_TITLE_MAX_CHARS)
|
|
115
119
|
return title;
|
|
@@ -119,5 +123,5 @@ function boundTitle(title) {
|
|
|
119
123
|
break;
|
|
120
124
|
out += point;
|
|
121
125
|
}
|
|
122
|
-
return out;
|
|
126
|
+
return out.trimEnd();
|
|
123
127
|
}
|
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.229",
|
|
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",
|