@notation/factory-claude 0.5.1 → 0.5.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notation/factory-claude",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "author": "Daniel Grant",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -24,9 +24,9 @@
24
24
  "valibot": "^1.1.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "@notation/factory": "^0.5.1"
27
+ "@notation/factory": "^0.5.3"
28
28
  },
29
29
  "devDependencies": {
30
- "@notation/factory": "0.5.1"
30
+ "@notation/factory": "0.5.3"
31
31
  }
32
32
  }
package/runtime/runner.ts CHANGED
@@ -17,6 +17,8 @@ function envFile(): Record<string, string> {
17
17
  /** One line of Claude Code's stream-json output. */
18
18
  type StreamEvent = {
19
19
  type?: string;
20
+ subtype?: string;
21
+ model?: string;
20
22
  result?: string;
21
23
  is_error?: boolean;
22
24
  session_id?: string;
@@ -79,6 +81,10 @@ const claude: RuntimeRunner = {
79
81
  if (text.length) return text.join("\n\n");
80
82
  return content.some((block) => block.type === "thinking" || block.type === "redacted_thinking") ? "Thinking..." : undefined;
81
83
  },
84
+ model: (line) => {
85
+ const event = parseLine(line);
86
+ return event?.type === "system" && event.subtype === "init" ? event.model : undefined;
87
+ },
82
88
  env: { DISABLE_AUTOUPDATER: "1", ...envFile() },
83
89
  };
84
90