agentrace 0.0.6 → 0.0.7

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.
@@ -69,6 +69,25 @@ async function sendTranscript(params) {
69
69
  }
70
70
  process.exit(0);
71
71
  }
72
+ // Detect subagent (Task tool) sessions from first transcript line
73
+ const firstLine = transcriptLines[0];
74
+ const isSidechain = firstLine?.isSidechain === true;
75
+ const agentId = typeof firstLine?.agentId === "string" ? firstLine.agentId : undefined;
76
+ // For subagents, sessionId in transcript is the parent session ID
77
+ const parentSessionId = isSidechain && typeof firstLine?.sessionId === "string"
78
+ ? firstLine.sessionId
79
+ : undefined;
80
+ // Generate title for subagents from first user message
81
+ let subagentTitle;
82
+ if (isSidechain) {
83
+ const firstUserMsg = transcriptLines.find((line) => typeof line === "object" &&
84
+ line !== null &&
85
+ line.type === "user");
86
+ if (firstUserMsg?.message && typeof firstUserMsg.message?.content === "string") {
87
+ const content = firstUserMsg.message.content;
88
+ subagentTitle = content.slice(0, 100) + (content.length > 100 ? "..." : "");
89
+ }
90
+ }
72
91
  // Extract git info only on first send (when cursor doesn't exist yet)
73
92
  let gitRemoteUrl;
74
93
  let gitBranch;
@@ -83,6 +102,11 @@ async function sendTranscript(params) {
83
102
  cwd: cwd,
84
103
  git_remote_url: gitRemoteUrl,
85
104
  git_branch: gitBranch,
105
+ // Subagent fields
106
+ parent_session_id: parentSessionId,
107
+ agent_id: agentId,
108
+ is_sidechain: isSidechain || undefined,
109
+ title: subagentTitle,
86
110
  });
87
111
  if (result.ok) {
88
112
  // Update cursor on success
@@ -4,6 +4,10 @@ export interface IngestPayload {
4
4
  cwd?: string;
5
5
  git_remote_url?: string;
6
6
  git_branch?: string;
7
+ parent_session_id?: string;
8
+ agent_id?: string;
9
+ is_sidechain?: boolean;
10
+ title?: string;
7
11
  }
8
12
  export interface IngestResponse {
9
13
  ok: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentrace",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "CLI for AgenTrace - Claude Code session tracker",
5
5
  "type": "module",
6
6
  "bin": {