@thehammer/danx-session-telemetry 0.1.46 → 0.1.47
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ecc5da92c3cb5fcb4ef6668b9d9307de4f31ba3665c1d9437fdc1f45bd6f8b06
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* Claude Code's `SubagentStart` / `SubagentStop` hooks carry an `agent_type`
|
|
13
13
|
* before the sub-agent has written anything and a FINISH for every sub-agent,
|
|
14
14
|
* foreground or background. They ship from the danxbot plugin in the
|
|
15
|
-
* claude-plugins repo (DX-3284
|
|
16
|
-
* `
|
|
15
|
+
* claude-plugins repo (DX-3284; DX-4235 moved them into the plugin's hooks module), which calls
|
|
16
|
+
* `danxbot_api`, and reach the server
|
|
17
17
|
* through `POST /api/plan-sessions/me/activity` — which writes the SAME
|
|
18
18
|
* `dispatch_activities` rows through the same one server writer.
|
|
19
19
|
*
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
* Every row is an upsert keyed `(dispatch_id, kind, activity_id)`, and BOTH
|
|
51
51
|
* producers derive `activity_id` from the same thing: the sub-agent's transcript
|
|
52
52
|
* file basename, `agent-<agent_id>`. The watcher has it directly; a hook has the
|
|
53
|
-
* `agent_id` and builds the same basename from it
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* `agent_id` and builds the same basename from it: `agent-` plus the id with one leading `agent-` stripped (the hooks docs
|
|
54
|
+
* show the prefix on some `agent_id`s), so both forms reach this key. That rule lives in the danxbot plugin's hooks module
|
|
55
|
+
* (claude-plugins repo). A hook's `transcript_path` is NOT the
|
|
56
56
|
* sub-agent's file — on these events it is the MAIN session's transcript, and only
|
|
57
57
|
* `SubagentStop` also carries the sub-agent's own as `agent_transcript_path`,
|
|
58
|
-
* which the
|
|
58
|
+
* which the plugin uses to refuse a key that disagrees. That basename is also
|
|
59
59
|
* the key the ledger credits the sub-agent's tokens under, which is how
|
|
60
60
|
* per-sub-agent tokens join to the running set without this table carrying a
|
|
61
61
|
* token column. A task notification names the sub-agent by its bare id
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* Claude Code's `SubagentStart` / `SubagentStop` hooks carry an `agent_type`
|
|
13
13
|
* before the sub-agent has written anything and a FINISH for every sub-agent,
|
|
14
14
|
* foreground or background. They ship from the danxbot plugin in the
|
|
15
|
-
* claude-plugins repo (DX-3284
|
|
16
|
-
* `
|
|
15
|
+
* claude-plugins repo (DX-3284; DX-4235 moved them into the plugin's hooks module), which calls
|
|
16
|
+
* `danxbot_api`, and reach the server
|
|
17
17
|
* through `POST /api/plan-sessions/me/activity` — which writes the SAME
|
|
18
18
|
* `dispatch_activities` rows through the same one server writer.
|
|
19
19
|
*
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
* Every row is an upsert keyed `(dispatch_id, kind, activity_id)`, and BOTH
|
|
51
51
|
* producers derive `activity_id` from the same thing: the sub-agent's transcript
|
|
52
52
|
* file basename, `agent-<agent_id>`. The watcher has it directly; a hook has the
|
|
53
|
-
* `agent_id` and builds the same basename from it
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* `agent_id` and builds the same basename from it: `agent-` plus the id with one leading `agent-` stripped (the hooks docs
|
|
54
|
+
* show the prefix on some `agent_id`s), so both forms reach this key. That rule lives in the danxbot plugin's hooks module
|
|
55
|
+
* (claude-plugins repo). A hook's `transcript_path` is NOT the
|
|
56
56
|
* sub-agent's file — on these events it is the MAIN session's transcript, and only
|
|
57
57
|
* `SubagentStop` also carries the sub-agent's own as `agent_transcript_path`,
|
|
58
|
-
* which the
|
|
58
|
+
* which the plugin uses to refuse a key that disagrees. That basename is also
|
|
59
59
|
* the key the ledger credits the sub-agent's tokens under, which is how
|
|
60
60
|
* per-sub-agent tokens join to the running set without this table carrying a
|
|
61
61
|
* token column. A task notification names the sub-agent by its bare id
|
package/dist/internal-logger.js
CHANGED
|
@@ -13,7 +13,7 @@ function emit(level, component, message, error) {
|
|
|
13
13
|
entry.error = String(error);
|
|
14
14
|
}
|
|
15
15
|
// DX-2954 — every level goes to STDERR. The MCP server's
|
|
16
|
-
// relay and the
|
|
16
|
+
// relay and the `subagents-live` subcommand run this collector; the subcommand's STDOUT is a protocol
|
|
17
17
|
// channel the plugin parses (and the MCP server's is JSON-RPC), so a log line there
|
|
18
18
|
// would corrupt it. The worker captures both streams.
|
|
19
19
|
console.error(JSON.stringify(entry));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thehammer/danx-session-telemetry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"description": "Shared Claude Code transcript collector (DX-2962) — incremental JSONL tailing for the danxbot worker and the danx-dashboard-mcp MCP server's relay, so both run identical collector code.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|