@thehammer/danx-dashboard-mcp 0.1.330 → 0.1.332

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.
@@ -11,15 +11,18 @@
11
11
  *
12
12
  * THE WAIT CONTRACT (`wait`). One rule, one reset, and a cursor that is opaque to the caller.
13
13
  * 1. ONE RULE, BY ARRIVAL. Every record (a dashboard event, a digest, a notice, a pacing or resume message) is given the next
14
- * number of a sequence that only ever increases: its `seq`. Each answered record carries a CURSOR, an opaque string the
15
- * caller stores once it has DELIVERED that record and sends back on its next call. A call answers every buffered record
16
- * whose seq is above the cursor's (at once when there is one, else when one arrives, else empty at the timeout) and
17
- * DROPS every record at or below it, at the call (`acknowledged`, the one predicate). An answer is never a drain: a record
18
- * stays buffered until a LATER call's cursor passes it, so a call whose caller went away (a plugin reload) loses nothing.
14
+ * number of a sequence that only ever increases: its `seq`. Each answered record carries a CURSOR, an opaque string. The caller
15
+ * sends back, on its next call, the cursor of the newest record it has TAKEN (not necessarily delivered; DX-5403 / DX-5398). A call
16
+ * answers every buffered record whose seq is above the cursor's (at once when there is one, else when one arrives, else empty
17
+ * at the timeout) and DROPS every record at or below it, at the call (`acknowledged`, the one predicate). An answer is never a
18
+ * drain: a record stays buffered until a LATER call's cursor passes it, but the server does NOT promise to keep a record the
19
+ * caller has already taken. The danxbot plugin keeps its taken-but-undelivered events in its own `relayOutbox` $.state atom, so
20
+ * a reload of its hook module loses none (it may repeat one); a new process with no atom resumes from the plugin's stored
21
+ * delivered cursor.
19
22
  * The dashboard numbers its events when it INSERTS them but publishes them when it COMMITS, so an event can arrive after
20
23
  * a higher-numbered one; arrival order is the only order the relay can promise, which is why the dashboard's id is never
21
24
  * what is compared.
22
- * 2. THE CURSOR. `<seq>:<id>,<id>,...`: the record's seq, then the dashboard event ids delivered up to and including it, in
25
+ * 2. THE CURSOR. `<seq>:<id>,<id>,...`: the record's seq, then the dashboard event ids handed out up to and including it, in
23
26
  * arrival order and bounded to the last `CURSOR_IDS_MAX` (`formatCursor`, `parseCursor`: the seq and every id are base-10
24
27
  * whole numbers with no leading zero, the ids are distinct and positive; anything else is refused loudly). The ids are what
25
28
  * makes a restart exact. After a restart of the MCP server (a resumed session) a fresh relay is presented its caller's
@@ -87,7 +90,7 @@ export function parseCursor(raw) {
87
90
  return { seq, ids };
88
91
  }
89
92
  const boundedIds = (ids) => [...new Set(ids)].slice(-CURSOR_IDS_MAX);
90
- /** DX-4233: the one rule of the cursor: a record at or below its seq has been delivered. */
93
+ /** DX-4233: the one rule of the cursor: a record at or below the presented cursor's seq has been taken by the caller, so the server drops it. */
91
94
  export const acknowledged = (seq, cursor) => cursor !== null && seq <= cursor.seq;
92
95
  export class PlanEventRelay {
93
96
  deps;
@@ -145,6 +145,7 @@ export class OperatorSessionStats {
145
145
  startCursors: stored.sourceCursors,
146
146
  onCursorPastEof: (info) => this.usage.recordPastEof(info),
147
147
  onSourceDiscovered: (info) => activities.onSourceDiscovered(info),
148
+ onPollComplete: () => activities.onPollComplete(),
148
149
  });
149
150
  this.usage.attachCursors(() => watcher.cursorState(), stored.sourceCursors);
150
151
  this.usage.setTranscriptPath(path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.330",
3
+ "version": "0.1.332",
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, request_permission, attach_file, and danxbot_slack_reply) (DX-3465, PLN-11 R-25).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@danxbot/plugin-sdk": "0.2.1",
35
35
  "@modelcontextprotocol/sdk": "1.29.0",
36
- "@thehammer/danx-session-telemetry": "0.1.53",
36
+ "@thehammer/danx-session-telemetry": "0.1.54",
37
37
  "zod": "^3.25.76"
38
38
  },
39
39
  "devDependencies": {