agent-dag 1.15.0 → 1.15.1

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <title>agent-dag</title>
7
7
  <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='84' font-size='84'%3E%E2%97%89%3C/text%3E%3C/svg%3E" />
8
- <script type="module" crossorigin src="/assets/index-DZeh3MHD.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-Bq4SSF-l.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-Bwj0xSAo.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-dag",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "Live DAG of Claude Code agents — watch parallel subagents fork, call tools, and return on one calm canvas.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -98,17 +98,20 @@ async function readModelFromTranscript(path) {
98
98
  }
99
99
  let rootModel = null;
100
100
  const subagentModels = {};
101
+ let anyModelSeen = null; // regex-style fallback — the last claude-* model
102
+ // we encountered, regardless of sidechain flag.
103
+ // Keeps the old behavior alive when the JSONL
104
+ // schema doesn't expose `isSidechain`.
101
105
  for (const line of text.split("\n")) {
102
106
  if (!line) continue;
103
107
  let obj;
104
108
  try { obj = JSON.parse(line); } catch { continue; }
105
109
  const msg = obj && obj.message;
106
- // Assistant model entries live on either obj.model or obj.message.model
107
- // depending on CC schema version. Accept either.
108
110
  const model = (msg && typeof msg.model === "string" && /^claude[-_]/i.test(msg.model)) ? msg.model
109
111
  : (typeof obj.model === "string" && /^claude[-_]/i.test(obj.model)) ? obj.model
110
112
  : null;
111
113
  if (!model) continue;
114
+ anyModelSeen = model;
112
115
  const isSide = obj.isSidechain === true || obj.is_sidechain === true;
113
116
  const ptid = obj.parentToolUseID || obj.parent_tool_use_id || obj.parentToolUseId || null;
114
117
  if (isSide && ptid) {
@@ -117,6 +120,10 @@ async function readModelFromTranscript(path) {
117
120
  rootModel = model;
118
121
  }
119
122
  }
123
+ // Fallback: if no `isSidechain:false` entry was found (older schema, or
124
+ // a transcript that only contains sidechain blocks), use the last-seen
125
+ // model so the root card still shows SOMETHING instead of going blank.
126
+ if (!rootModel) rootModel = anyModelSeen;
120
127
  if (!rootModel && Object.keys(subagentModels).length === 0) return null;
121
128
  return { rootModel, subagentModels };
122
129
  } catch {