@stigmer/ink-ui 0.1.1 → 0.1.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": "@stigmer/ink-ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Terminal components for Stigmer, the open-source backend for the agents in your product",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@bufbuild/protobuf": "^2.0.0",
42
- "@stigmer/apis": "0.1.1",
43
- "@stigmer/client": "0.1.1",
44
- "@stigmer/react-core": "0.1.1",
42
+ "@stigmer/apis": "0.1.3",
43
+ "@stigmer/client": "0.1.3",
44
+ "@stigmer/react-core": "0.1.3",
45
45
  "ink": "^7.0.0",
46
46
  "react": ">=19.0.0"
47
47
  }
package/recordings.d.ts CHANGED
@@ -3,7 +3,7 @@ export interface Recording {
3
3
  /** The handle pages use (`<TerminalRecording name="run-approval">`) and the file's name. */
4
4
  readonly name: string;
5
5
  /** The catalogue's story it draws, event by event. */
6
- readonly story: "scripted-turn";
6
+ readonly story: "scripted-turn" | "ledger-turn";
7
7
  /** The terminal's width, in columns. */
8
8
  readonly columns: number;
9
9
  /** The terminal's height, in rows: the player shows a frame's last this many lines. */
@@ -12,6 +12,22 @@ export interface Recording {
12
12
  readonly command: string;
13
13
  /** What the recording shows, as a reader would say it. */
14
14
  readonly title: string;
15
+ /** Words the last frame shows: what the turn ends on. */
16
+ readonly endsWith: string;
17
+ /** Whether a frame waits for the person's answer to an ask, and holds there. */
18
+ readonly asks: boolean;
19
+ /** What the host does when the turn ends, for a command that saves its outputs; none when it saves nothing. */
20
+ readonly afterTurn?: AfterTurn;
21
+ }
22
+ /** The turn's outputs a command saves when the turn ends, and the notes it writes in the thread as it does. */
23
+ export interface AfterTurn {
24
+ /** Each File saved: its place in the outputs folder and its size in bytes. */
25
+ readonly saved: readonly {
26
+ readonly path: string;
27
+ readonly bytes: number;
28
+ }[];
29
+ /** The notes, in order, each drawn in a frame of its own. */
30
+ readonly notes: readonly string[];
15
31
  }
16
32
  /** Every recording the docs may play. */
17
33
  export declare const RECORDINGS: readonly Recording[];
@@ -1 +1 @@
1
- {"version":3,"file":"recordings.d.ts","sourceRoot":"","sources":["src/recordings.ts"],"names":[],"mappings":"AAaA,uCAAuC;AACvC,MAAM,WAAW,SAAS;IACxB,4FAA4F;IAC5F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,wCAAwC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE,SAAS,SAAS,EAS1C,CAAC;AAEF,8HAA8H;AAC9H,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wCAAwC;AACxC,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC;CAC5C"}
1
+ {"version":3,"file":"recordings.d.ts","sourceRoot":"","sources":["src/recordings.ts"],"names":[],"mappings":"AAiBA,uCAAuC;AACvC,MAAM,WAAW,SAAS;IACxB,4FAA4F;IAC5F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,aAAa,CAAC;IAChD,wCAAwC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,+GAA+G;IAC/G,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;CAChC;AAED,+GAA+G;AAC/G,MAAM,WAAW,SAAS;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7E,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE,SAAS,SAAS,EAyB1C,CAAC;AAEF,8HAA8H;AAC9H,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wCAAwC;AACxC,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,QAAQ,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC;CAC5C"}
package/recordings.js CHANGED
@@ -2,11 +2,15 @@
2
2
  // drawn over a story of the scenario catalogue one event at a time.
3
3
  //
4
4
  // An entry names the story it draws, the terminal's size, the command the
5
- // first frame shows being typed, and what the recording shows.
6
- // `src/__tests__/recordings.test.tsx` draws each one with `SessionView`, as
7
- // the frame goldens draw a state, and holds the frames in
8
- // `src/__tests__/__recordings__/<name>.json`; the docs site plays that file
9
- // with `<TerminalRecording name>`.
5
+ // first frame shows being typed, what the recording shows, what its last
6
+ // frame says and whether it waits for the person, and, for a command that
7
+ // saves the turn's outputs, the notes the host writes in the thread when it
8
+ // does. `src/__tests__/recordings.test.tsx` draws each one with one live
9
+ // `SessionView`, as a terminal keeps one up through the turn, and holds the
10
+ // frames in `src/__tests__/__recordings__/<name>.json`; the docs site plays
11
+ // that file with `<TerminalRecording name>`. The CLI's own test holds each
12
+ // `afterTurn` to the lines `--download` writes
13
+ // (client-apps/cli/src/resources/run/__tests__/recorded-notes.test.ts).
10
14
  //
11
15
  // It imports nothing: the site reads this file into its own build and
12
16
  // typecheck, where the kit's sources do not load.
@@ -19,6 +23,22 @@ export const RECORDINGS = [
19
23
  rows: 24,
20
24
  command: 'stigmer run demo/demo-agent -m "What changed in billing this week?"',
21
25
  title: "stigmer run: the agent reads two files, asks before it runs git log, and answers once allowed",
26
+ endsWith: "Two changes this week",
27
+ asks: true,
28
+ },
29
+ {
30
+ name: "first-job",
31
+ story: "ledger-turn",
32
+ columns: 80,
33
+ rows: 16,
34
+ command: 'stigmer run variance-reporter --attach ledger.csv --download ./out --until turn -m "Review this quarter\'s ledger."',
35
+ title: "stigmer run: the Agent reads the customer's ledger, writes the variance report, names the flagged accounts, and the report is saved",
36
+ endsWith: "Worked for 38s",
37
+ asks: false,
38
+ afterTurn: {
39
+ saved: [{ path: "variance-report.md", bytes: 696 }],
40
+ notes: ["Downloading variance-report.md (696 B)...", "Downloaded variance-report.md (696 B)"],
41
+ },
22
42
  },
23
43
  ];
24
44
  //# sourceMappingURL=recordings.js.map
package/recordings.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"recordings.js","sourceRoot":"","sources":["src/recordings.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,oEAAoE;AACpE,EAAE;AACF,0EAA0E;AAC1E,+DAA+D;AAC/D,4EAA4E;AAC5E,0DAA0D;AAC1D,4EAA4E;AAC5E,mCAAmC;AACnC,EAAE;AACF,sEAAsE;AACtE,kDAAkD;AAkBlD,yCAAyC;AACzC,MAAM,CAAC,MAAM,UAAU,GAAyB;IAC9C;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,eAAe;QACtB,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;QACR,OAAO,EAAE,qEAAqE;QAC9E,KAAK,EAAE,+FAA+F;KACvG;CACF,CAAC"}
1
+ {"version":3,"file":"recordings.js","sourceRoot":"","sources":["src/recordings.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,oEAAoE;AACpE,EAAE;AACF,0EAA0E;AAC1E,yEAAyE;AACzE,0EAA0E;AAC1E,4EAA4E;AAC5E,yEAAyE;AACzE,4EAA4E;AAC5E,4EAA4E;AAC5E,2EAA2E;AAC3E,+CAA+C;AAC/C,wEAAwE;AACxE,EAAE;AACF,sEAAsE;AACtE,kDAAkD;AAgClD,yCAAyC;AACzC,MAAM,CAAC,MAAM,UAAU,GAAyB;IAC9C;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,eAAe;QACtB,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;QACR,OAAO,EAAE,qEAAqE;QAC9E,KAAK,EAAE,+FAA+F;QACtG,QAAQ,EAAE,uBAAuB;QACjC,IAAI,EAAE,IAAI;KACX;IACD;QACE,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,aAAa;QACpB,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;QACR,OAAO,EAAE,qHAAqH;QAC9H,KAAK,EAAE,qIAAqI;QAC5I,QAAQ,EAAE,gBAAgB;QAC1B,IAAI,EAAE,KAAK;QACX,SAAS,EAAE;YACT,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;YACnD,KAAK,EAAE,CAAC,2CAA2C,EAAE,uCAAuC,CAAC;SAC9F;KACF;CACF,CAAC"}
package/src/recordings.ts CHANGED
@@ -2,11 +2,15 @@
2
2
  // drawn over a story of the scenario catalogue one event at a time.
3
3
  //
4
4
  // An entry names the story it draws, the terminal's size, the command the
5
- // first frame shows being typed, and what the recording shows.
6
- // `src/__tests__/recordings.test.tsx` draws each one with `SessionView`, as
7
- // the frame goldens draw a state, and holds the frames in
8
- // `src/__tests__/__recordings__/<name>.json`; the docs site plays that file
9
- // with `<TerminalRecording name>`.
5
+ // first frame shows being typed, what the recording shows, what its last
6
+ // frame says and whether it waits for the person, and, for a command that
7
+ // saves the turn's outputs, the notes the host writes in the thread when it
8
+ // does. `src/__tests__/recordings.test.tsx` draws each one with one live
9
+ // `SessionView`, as a terminal keeps one up through the turn, and holds the
10
+ // frames in `src/__tests__/__recordings__/<name>.json`; the docs site plays
11
+ // that file with `<TerminalRecording name>`. The CLI's own test holds each
12
+ // `afterTurn` to the lines `--download` writes
13
+ // (client-apps/cli/src/resources/run/__tests__/recorded-notes.test.ts).
10
14
  //
11
15
  // It imports nothing: the site reads this file into its own build and
12
16
  // typecheck, where the kit's sources do not load.
@@ -16,7 +20,7 @@ export interface Recording {
16
20
  /** The handle pages use (`<TerminalRecording name="run-approval">`) and the file's name. */
17
21
  readonly name: string;
18
22
  /** The catalogue's story it draws, event by event. */
19
- readonly story: "scripted-turn";
23
+ readonly story: "scripted-turn" | "ledger-turn";
20
24
  /** The terminal's width, in columns. */
21
25
  readonly columns: number;
22
26
  /** The terminal's height, in rows: the player shows a frame's last this many lines. */
@@ -25,6 +29,20 @@ export interface Recording {
25
29
  readonly command: string;
26
30
  /** What the recording shows, as a reader would say it. */
27
31
  readonly title: string;
32
+ /** Words the last frame shows: what the turn ends on. */
33
+ readonly endsWith: string;
34
+ /** Whether a frame waits for the person's answer to an ask, and holds there. */
35
+ readonly asks: boolean;
36
+ /** What the host does when the turn ends, for a command that saves its outputs; none when it saves nothing. */
37
+ readonly afterTurn?: AfterTurn;
38
+ }
39
+
40
+ /** The turn's outputs a command saves when the turn ends, and the notes it writes in the thread as it does. */
41
+ export interface AfterTurn {
42
+ /** Each File saved: its place in the outputs folder and its size in bytes. */
43
+ readonly saved: readonly { readonly path: string; readonly bytes: number }[];
44
+ /** The notes, in order, each drawn in a frame of its own. */
45
+ readonly notes: readonly string[];
28
46
  }
29
47
 
30
48
  /** Every recording the docs may play. */
@@ -36,6 +54,22 @@ export const RECORDINGS: readonly Recording[] = [
36
54
  rows: 24,
37
55
  command: 'stigmer run demo/demo-agent -m "What changed in billing this week?"',
38
56
  title: "stigmer run: the agent reads two files, asks before it runs git log, and answers once allowed",
57
+ endsWith: "Two changes this week",
58
+ asks: true,
59
+ },
60
+ {
61
+ name: "first-job",
62
+ story: "ledger-turn",
63
+ columns: 80,
64
+ rows: 16,
65
+ command: 'stigmer run variance-reporter --attach ledger.csv --download ./out --until turn -m "Review this quarter\'s ledger."',
66
+ title: "stigmer run: the Agent reads the customer's ledger, writes the variance report, names the flagged accounts, and the report is saved",
67
+ endsWith: "Worked for 38s",
68
+ asks: false,
69
+ afterTurn: {
70
+ saved: [{ path: "variance-report.md", bytes: 696 }],
71
+ notes: ["Downloading variance-report.md (696 B)...", "Downloaded variance-report.md (696 B)"],
72
+ },
39
73
  },
40
74
  ];
41
75