@notation/factory-cursor 0.5.1 → 0.5.2

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-cursor",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
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.2"
28
28
  },
29
29
  "devDependencies": {
30
- "@notation/factory": "0.5.1"
30
+ "@notation/factory": "0.5.2"
31
31
  }
32
32
  }
package/runtime/runner.ts CHANGED
@@ -5,6 +5,8 @@ import type { RuntimeRunner } from "@notation/factory";
5
5
  /** One line of Cursor Agent's stream-json output. */
6
6
  type StreamEvent = {
7
7
  type?: string;
8
+ subtype?: string;
9
+ model?: string;
8
10
  result?: string;
9
11
  is_error?: boolean;
10
12
  session_id?: string;
@@ -100,6 +102,10 @@ const cursor: RuntimeRunner = {
100
102
  const text = (event.message?.content ?? []).flatMap((block) => (block.type === "text" && block.text ? [block.text] : []));
101
103
  return text.length ? text.join("\n\n") : undefined;
102
104
  },
105
+ model: (line) => {
106
+ const event = parseLine(line);
107
+ return event?.type === "system" && event.subtype === "init" ? event.model : undefined;
108
+ },
103
109
  };
104
110
 
105
111
  export default cursor;