@stigmer/ink 3.34.0 → 3.36.0

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.
Files changed (61) hide show
  1. package/app/SessionApp.d.ts.map +1 -1
  2. package/app/SessionApp.js.map +1 -1
  3. package/app/SessionView.d.ts.map +1 -1
  4. package/app/SessionView.js.map +1 -1
  5. package/cli/stigmer-ink.d.ts.map +1 -1
  6. package/cli/stigmer-ink.js.map +1 -1
  7. package/components/AgentPicker.d.ts.map +1 -1
  8. package/components/AgentPicker.js.map +1 -1
  9. package/components/ApprovalPrompt.d.ts.map +1 -1
  10. package/components/ApprovalPrompt.js.map +1 -1
  11. package/components/ContextGauge.d.ts.map +1 -1
  12. package/components/ContextGauge.js.map +1 -1
  13. package/components/ExecutionProgress.d.ts.map +1 -1
  14. package/components/ExecutionProgress.js.map +1 -1
  15. package/components/FileChangeProgressBar.d.ts.map +1 -1
  16. package/components/FileChangeProgressBar.js.map +1 -1
  17. package/components/FileDiffBody.d.ts.map +1 -1
  18. package/components/FileDiffBody.js.map +1 -1
  19. package/components/FileReviewAtoms.d.ts.map +1 -1
  20. package/components/FileReviewAtoms.js.map +1 -1
  21. package/components/FileReviewPrompt.d.ts.map +1 -1
  22. package/components/FileReviewPrompt.js.map +1 -1
  23. package/components/FileReviewRecord.d.ts.map +1 -1
  24. package/components/FileReviewRecord.js.map +1 -1
  25. package/components/FollowUpInput.d.ts.map +1 -1
  26. package/components/FollowUpInput.js.map +1 -1
  27. package/components/MessageEntry.d.ts.map +1 -1
  28. package/components/MessageEntry.js.map +1 -1
  29. package/components/MessageThread.d.ts.map +1 -1
  30. package/components/MessageThread.js.map +1 -1
  31. package/components/ResourcePicker.d.ts.map +1 -1
  32. package/components/ResourcePicker.js.map +1 -1
  33. package/components/SessionPicker.d.ts.map +1 -1
  34. package/components/SessionPicker.js.map +1 -1
  35. package/components/SubAgentBlock.d.ts.map +1 -1
  36. package/components/SubAgentBlock.js.map +1 -1
  37. package/components/TodoList.d.ts.map +1 -1
  38. package/components/TodoList.js.map +1 -1
  39. package/components/ToolCallGroup.d.ts.map +1 -1
  40. package/components/ToolCallGroup.js.map +1 -1
  41. package/components/ToolCallItem.d.ts.map +1 -1
  42. package/components/ToolCallItem.js.map +1 -1
  43. package/components/UsageWidget.d.ts.map +1 -1
  44. package/components/UsageWidget.js.map +1 -1
  45. package/file-review.d.ts.map +1 -1
  46. package/file-review.js.map +1 -1
  47. package/index.d.ts.map +1 -1
  48. package/index.js.map +1 -1
  49. package/markdown.d.ts.map +1 -1
  50. package/markdown.js.map +1 -1
  51. package/package.json +4 -4
  52. package/provider.d.ts.map +1 -1
  53. package/provider.js.map +1 -1
  54. package/src/__tests__/components.test.tsx +0 -378
  55. package/src/__tests__/context-gauge.test.tsx +0 -176
  56. package/src/__tests__/data-pickers.test.tsx +0 -147
  57. package/src/__tests__/file-change-progress.test.tsx +0 -295
  58. package/src/__tests__/file-review.test.tsx +0 -811
  59. package/src/__tests__/markdown.test.ts +0 -46
  60. package/src/__tests__/resource-picker.test.tsx +0 -176
  61. package/src/__tests__/test-support.tsx +0 -31
@@ -1 +1 @@
1
- {"version":3,"file":"file-review.d.ts","sourceRoot":"","sources":["../src/file-review.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACd,MAAM,oEAAoE,CAAC;AAC5E,OAAO,EACL,cAAc,EAEf,MAAM,8DAA8D,CAAC;AAGtE;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAWvD;AAoBD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,uBAAuB,GAAG,MAAM,CAE/E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,M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M,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAA+B,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,aAAa,EAA2B,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,WAAW,EAAyB,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,YAAY,EAA0B,MAAM,8BAA8B,CAAC;AAEpF,0CAA0C;AAC1C,OAAO,EAAE,cAAc,EAA6C,MAAM,gCAAgC,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAyB,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,aAAa,EAA2B,MAAM,+BAA+B,CAAC;AAEvF,iBAAiB;AACjB,OAAO,EAAE,WAAW,EAA+C,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAwB,MAAM,qBAAqB,CAAC"}
package/markdown.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../src/markdown.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAOtE"}
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["src/markdown.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAOtE"}
package/markdown.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.js","sourceRoot":"","sources":["../src/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,IAAI,OAAO,GAAkB,IAAI,CAAC;AAElC,SAAS,SAAS,CAAC,KAAc;IAC/B,IAA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,KAAK;KACzB,CAAC,CACH,CAAC;IAEF,IAAI,CAAC,KAAK;QAAE,OAAO,GAAG,QAAQ,CAAC;IAC/B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,KAAc;IAC5D,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,EAAE,CAAC;AAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigmer/ink",
3
- "version": "3.34.0",
3
+ "version": "3.36.0",
4
4
  "description": "Ink (React for terminals) components for rendering Stigmer agent sessions in the terminal",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@connectrpc/connect-node": "^2.1.1",
38
- "@stigmer/react": "3.34.0",
38
+ "@stigmer/react": "3.36.0",
39
39
  "ink-spinner": "^5.0.0",
40
40
  "ink-text-input": "^6.0.0",
41
41
  "marked": "^15.0.7",
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@bufbuild/protobuf": "^2.0.0",
46
- "@stigmer/protos": "3.34.0",
47
- "@stigmer/sdk": "3.34.0",
46
+ "@stigmer/protos": "3.36.0",
47
+ "@stigmer/sdk": "3.36.0",
48
48
  "ink": "^7.0.0",
49
49
  "react": ">=19.0.0"
50
50
  }
package/provider.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,kFAAkF;IAClF,MAAM,EAAE,OAAO,CAAC;IAEhB,kCAAkC;IAClC,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,cAAwB,GACzB,EAAE,uBAAuB,2CAQzB"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["src/provider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,kFAAkF;IAClF,MAAM,EAAE,OAAO,CAAC;IAEhB,kCAAkC;IAClC,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,cAAwB,GACzB,EAAE,uBAAuB,2CAQzB"}
package/provider.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAqBvE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,cAAc,GAAG,OAAO,GACA;IACxB,OAAO,CACL,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YACpC,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,cAAc,YAClD,QAAQ,GACsB,GACT,CAC3B,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["src/provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAqBvE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,MAAM,EACN,QAAQ,EACR,cAAc,GAAG,OAAO,GACA;IACxB,OAAO,CACL,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YACpC,KAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,cAAc,YAClD,QAAQ,GACsB,GACT,CAC3B,CAAC;AACJ,CAAC"}
@@ -1,378 +0,0 @@
1
- import React from "react";
2
- import { describe, it, expect, vi } from "vitest";
3
- import { render } from "ink-testing-library";
4
- import { Text, Box } from "ink";
5
- import { create } from "@bufbuild/protobuf";
6
- import { AgentMessageSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
7
- import { MessageType, ExecutionPhase, ToolCallStatus, ApprovalAction, ApprovalPolicySource } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
8
- import { ToolCallSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
9
- import { PendingApprovalSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/approval_pb";
10
- import { AgentExecutionSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
11
- import { MessageEntry } from "../components/MessageEntry.js";
12
- import { ExecutionProgress } from "../components/ExecutionProgress.js";
13
- import { ToolCallItem } from "../components/ToolCallItem.js";
14
- import { ApprovalPrompt } from "../components/ApprovalPrompt.js";
15
- import { MessageThread } from "../components/MessageThread.js";
16
-
17
- describe("MessageEntry", () => {
18
- it("renders a human message with 'You' prefix", () => {
19
- const msg = create(AgentMessageSchema);
20
- msg.type = MessageType.MESSAGE_HUMAN;
21
- msg.content = "Hello agent";
22
-
23
- const { lastFrame } = render(<MessageEntry message={msg} />);
24
- const output = lastFrame() ?? "";
25
- expect(output).toContain("You");
26
- expect(output).toContain("Hello agent");
27
- });
28
-
29
- it("renders an AI message with 'Agent' prefix", () => {
30
- const msg = create(AgentMessageSchema);
31
- msg.type = MessageType.MESSAGE_AI;
32
- msg.content = "Here is the answer";
33
- msg.isStreaming = false;
34
-
35
- const { lastFrame } = render(<MessageEntry message={msg} />);
36
- const output = lastFrame() ?? "";
37
- expect(output).toContain("Agent");
38
- expect(output).toContain("answer");
39
- });
40
-
41
- it("renders a system message in dim style", () => {
42
- const msg = create(AgentMessageSchema);
43
- msg.type = MessageType.MESSAGE_SYSTEM;
44
- msg.content = "System notice";
45
-
46
- const { lastFrame } = render(<MessageEntry message={msg} />);
47
- const output = lastFrame() ?? "";
48
- expect(output).toContain("System notice");
49
- });
50
-
51
- it("renders nothing for tool messages", () => {
52
- const msg = create(AgentMessageSchema);
53
- msg.type = MessageType.MESSAGE_TOOL;
54
- msg.content = "tool result";
55
-
56
- const { lastFrame } = render(<MessageEntry message={msg} />);
57
- expect(lastFrame()).toBe("");
58
- });
59
-
60
- it("shows 'Thinking...' for streaming AI with no content", () => {
61
- const msg = create(AgentMessageSchema);
62
- msg.type = MessageType.MESSAGE_AI;
63
- msg.content = "";
64
- msg.isStreaming = true;
65
-
66
- const { lastFrame } = render(<MessageEntry message={msg} />);
67
- const output = lastFrame() ?? "";
68
- expect(output).toContain("Thinking...");
69
- });
70
- });
71
-
72
- describe("ExecutionProgress", () => {
73
- it("shows 'Running' for in-progress phase", () => {
74
- const { lastFrame } = render(
75
- <ExecutionProgress phase={ExecutionPhase.EXECUTION_IN_PROGRESS} />,
76
- );
77
- const output = lastFrame() ?? "";
78
- expect(output).toContain("Running");
79
- });
80
-
81
- it("shows 'Completed' with check for completed phase", () => {
82
- const { lastFrame } = render(
83
- <ExecutionProgress phase={ExecutionPhase.EXECUTION_COMPLETED} />,
84
- );
85
- const output = lastFrame() ?? "";
86
- expect(output).toContain("Completed");
87
- expect(output).toContain("✓");
88
- });
89
-
90
- it("shows 'Failed' for failed phase", () => {
91
- const { lastFrame } = render(
92
- <ExecutionProgress phase={ExecutionPhase.EXECUTION_FAILED} />,
93
- );
94
- const output = lastFrame() ?? "";
95
- expect(output).toContain("Failed");
96
- });
97
-
98
- it("shows 'Waiting for approval' for approval phase", () => {
99
- const { lastFrame } = render(
100
- <ExecutionProgress
101
- phase={ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL}
102
- />,
103
- );
104
- const output = lastFrame() ?? "";
105
- expect(output).toContain("Waiting for approval");
106
- });
107
-
108
- it("renders nothing for unspecified phase", () => {
109
- const { lastFrame } = render(
110
- <ExecutionProgress
111
- phase={ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED}
112
- />,
113
- );
114
- expect(lastFrame()).toBe("");
115
- });
116
- });
117
-
118
- describe("ToolCallItem", () => {
119
- it("renders tool name with status indicator", () => {
120
- const tc = create(ToolCallSchema);
121
- tc.id = "tc-1";
122
- tc.name = "read_file";
123
- tc.status = ToolCallStatus.TOOL_CALL_COMPLETED;
124
-
125
- const { lastFrame } = render(<ToolCallItem toolCall={tc} />);
126
- const output = lastFrame() ?? "";
127
- expect(output).toContain("Read");
128
- expect(output).toContain("✓");
129
- });
130
-
131
- it("shows running indicator for running tools", () => {
132
- const tc = create(ToolCallSchema);
133
- tc.id = "tc-2";
134
- tc.name = "write_file";
135
- tc.status = ToolCallStatus.TOOL_CALL_RUNNING;
136
-
137
- const { lastFrame } = render(<ToolCallItem toolCall={tc} />);
138
- const output = lastFrame() ?? "";
139
- expect(output).toContain("Write");
140
- expect(output).toContain("running");
141
- });
142
-
143
- it("shows error for failed tools when expanded", () => {
144
- const tc = create(ToolCallSchema);
145
- tc.id = "tc-3";
146
- tc.name = "execute_command";
147
- tc.status = ToolCallStatus.TOOL_CALL_FAILED;
148
- tc.error = "Permission denied";
149
-
150
- const { lastFrame } = render(<ToolCallItem toolCall={tc} expanded />);
151
- const output = lastFrame() ?? "";
152
- expect(output).toContain("Permission denied");
153
- });
154
-
155
- it("renders an interrupted tool with the neutral cut-short glyph (issue #207)", () => {
156
- const tc = create(ToolCallSchema);
157
- tc.id = "tc-int";
158
- tc.name = "execute_command";
159
- tc.status = ToolCallStatus.TOOL_CALL_INTERRUPTED;
160
-
161
- const { lastFrame } = render(<ToolCallItem toolCall={tc} />);
162
- const output = lastFrame() ?? "";
163
- expect(output).toContain("⊘");
164
- // Settled: no live "running" hint, no success checkmark.
165
- expect(output).not.toContain("running");
166
- expect(output).not.toContain("✓");
167
- });
168
-
169
- it("titles a shell row with the model-authored intent, command as dim secondary (stigmer#276)", () => {
170
- const tc = create(ToolCallSchema);
171
- tc.id = "tc-intent";
172
- tc.name = "execute";
173
- tc.status = ToolCallStatus.TOOL_CALL_COMPLETED;
174
- tc.args = {
175
- command: "npx vitest run src/parser",
176
- description: "Run unit tests for the parser",
177
- };
178
-
179
- const { lastFrame } = render(<ToolCallItem toolCall={tc} />);
180
- const output = lastFrame() ?? "";
181
- expect(output).toContain("Run unit tests for the parser");
182
- expect(output).toContain("npx vitest run src/parser");
183
- // The intent replaces the category label as the title.
184
- expect(output).not.toContain("Shell");
185
- });
186
-
187
- it("falls back to the category label when no intent is present", () => {
188
- const tc = create(ToolCallSchema);
189
- tc.id = "tc-no-intent";
190
- tc.name = "execute";
191
- tc.status = ToolCallStatus.TOOL_CALL_COMPLETED;
192
- tc.args = { command: "ls" };
193
-
194
- const { lastFrame } = render(<ToolCallItem toolCall={tc} />);
195
- const output = lastFrame() ?? "";
196
- expect(output).toContain("Shell");
197
- });
198
-
199
- it("never titles a non-shell row from its description arg", () => {
200
- const tc = create(ToolCallSchema);
201
- tc.id = "tc-task";
202
- tc.name = "task";
203
- tc.status = ToolCallStatus.TOOL_CALL_COMPLETED;
204
- tc.args = { description: "general-purpose research", prompt: "Find the docs" };
205
-
206
- const { lastFrame } = render(<ToolCallItem toolCall={tc} />);
207
- const output = lastFrame() ?? "";
208
- // A task tool's description is the sub-agent subject, never a row title.
209
- expect(output).toContain("Sub-agent");
210
- });
211
-
212
- it("shows MCP server slug prefix", () => {
213
- const tc = create(ToolCallSchema);
214
- tc.id = "tc-4";
215
- tc.name = "list_resources";
216
- tc.mcpServerSlug = "github";
217
- tc.status = ToolCallStatus.TOOL_CALL_COMPLETED;
218
-
219
- const { lastFrame } = render(<ToolCallItem toolCall={tc} />);
220
- const output = lastFrame() ?? "";
221
- expect(output).toContain("github/list_resources");
222
- });
223
- });
224
-
225
- describe("ApprovalPrompt", () => {
226
- it("offers Approve, scope-truthful approve-all, Reject, and Skip", () => {
227
- const pending = create(PendingApprovalSchema);
228
- pending.toolCallId = "tc-1";
229
- pending.toolName = "write_file";
230
-
231
- const { lastFrame } = render(
232
- <ApprovalPrompt pendingApproval={pending} onSubmit={() => {}} />,
233
- );
234
- const output = lastFrame() ?? "";
235
- expect(output).toContain("[y] Approve");
236
- // write_file leases the "file edits" class — the label names that class.
237
- expect(output).toContain("[a] Approve all file edits");
238
- expect(output).toContain("[n] Reject");
239
- expect(output).toContain("[s] Skip");
240
- });
241
-
242
- it("renders the shell intent as supplementary context, args foregrounded (stigmer#276)", () => {
243
- const pending = create(PendingApprovalSchema);
244
- pending.toolCallId = "tc-1";
245
- pending.toolName = "execute";
246
- pending.argsPreview = JSON.stringify({
247
- command: "make deploy",
248
- description: "Deploy the staging build",
249
- });
250
-
251
- const { lastFrame } = render(
252
- <ApprovalPrompt pendingApproval={pending} onSubmit={() => {}} />,
253
- );
254
- const output = lastFrame() ?? "";
255
- expect(output).toContain("Intent:");
256
- expect(output).toContain("Deploy the staging build");
257
- // The command being approved stays visible in the Args line.
258
- expect(output).toContain("make deploy");
259
- });
260
-
261
- it("renders no intent line when the shell call carries none", () => {
262
- const pending = create(PendingApprovalSchema);
263
- pending.toolCallId = "tc-1";
264
- pending.toolName = "execute";
265
- pending.argsPreview = JSON.stringify({ command: "ls" });
266
-
267
- const { lastFrame } = render(
268
- <ApprovalPrompt pendingApproval={pending} onSubmit={() => {}} />,
269
- );
270
- const output = lastFrame() ?? "";
271
- expect(output).not.toContain("Intent:");
272
- });
273
-
274
- it("renders the why-gated line from the projected approval_policy_source", () => {
275
- const pending = create(PendingApprovalSchema);
276
- pending.toolCallId = "tc-1";
277
- pending.toolName = "write_file";
278
- pending.approvalPolicySource = ApprovalPolicySource.AGENT_OVERRIDE;
279
-
280
- const { lastFrame } = render(
281
- <ApprovalPrompt pendingApproval={pending} onSubmit={() => {}} />,
282
- );
283
- const output = lastFrame() ?? "";
284
- expect(output).toContain("Why:");
285
- expect(output).toContain("required by agent override");
286
- });
287
-
288
- it("submits APPROVE_ALL when the 'a' shortcut is pressed", () => {
289
- const pending = create(PendingApprovalSchema);
290
- pending.toolCallId = "tc-1";
291
- pending.toolName = "write_file";
292
- const onSubmit = vi.fn();
293
-
294
- const { stdin } = render(
295
- <ApprovalPrompt pendingApproval={pending} onSubmit={onSubmit} />,
296
- );
297
- stdin.write("a");
298
-
299
- expect(onSubmit).toHaveBeenCalledWith(ApprovalAction.APPROVE_ALL);
300
- });
301
-
302
- it("submits APPROVE when the 'y' shortcut is pressed", () => {
303
- const pending = create(PendingApprovalSchema);
304
- pending.toolCallId = "tc-1";
305
- pending.toolName = "write_file";
306
- const onSubmit = vi.fn();
307
-
308
- const { stdin } = render(
309
- <ApprovalPrompt pendingApproval={pending} onSubmit={onSubmit} />,
310
- );
311
- stdin.write("y");
312
-
313
- expect(onSubmit).toHaveBeenCalledWith(ApprovalAction.APPROVE);
314
- });
315
-
316
- it("ignores keyboard input when inactive", () => {
317
- const pending = create(PendingApprovalSchema);
318
- pending.toolCallId = "tc-1";
319
- pending.toolName = "write_file";
320
- const onSubmit = vi.fn();
321
-
322
- const { stdin } = render(
323
- <ApprovalPrompt
324
- pendingApproval={pending}
325
- onSubmit={onSubmit}
326
- isActive={false}
327
- />,
328
- );
329
- stdin.write("y");
330
- stdin.write("a");
331
-
332
- expect(onSubmit).not.toHaveBeenCalled();
333
- });
334
- });
335
-
336
- describe("MessageThread — multi-approval keyboard arbitration", () => {
337
- function execWithApprovals(...toolCallIds: string[]) {
338
- const pendingApprovals = toolCallIds.map((id) => {
339
- const pa = create(PendingApprovalSchema);
340
- pa.toolCallId = id;
341
- pa.toolName = "write_file";
342
- return pa;
343
- });
344
- return create(AgentExecutionSchema, {
345
- metadata: { id: "aex-1" },
346
- status: { pendingApprovals },
347
- });
348
- }
349
-
350
- it("routes a single keystroke to only the FIRST of multiple pending approvals", () => {
351
- // The regression lock for the keyboard-sharing bug: two live ApprovalPrompts
352
- // each had an unconditional useInput, so one keystroke settled both. Now only
353
- // the first is active.
354
- const onApprovalSubmit = vi.fn();
355
- const exec = execWithApprovals("tc-1", "tc-2");
356
-
357
- const { stdin } = render(
358
- <MessageThread executions={[exec]} onApprovalSubmit={onApprovalSubmit} />,
359
- );
360
- stdin.write("y");
361
-
362
- expect(onApprovalSubmit).toHaveBeenCalledTimes(1);
363
- expect(onApprovalSubmit).toHaveBeenCalledWith("tc-1", ApprovalAction.APPROVE);
364
- });
365
-
366
- it("keeps the sole pending approval interactive", () => {
367
- const onApprovalSubmit = vi.fn();
368
- const exec = execWithApprovals("tc-1");
369
-
370
- const { stdin } = render(
371
- <MessageThread executions={[exec]} onApprovalSubmit={onApprovalSubmit} />,
372
- );
373
- stdin.write("y");
374
-
375
- expect(onApprovalSubmit).toHaveBeenCalledTimes(1);
376
- expect(onApprovalSubmit).toHaveBeenCalledWith("tc-1", ApprovalAction.APPROVE);
377
- });
378
- });
@@ -1,176 +0,0 @@
1
- import React from "react";
2
- import { describe, it, expect } from "vitest";
3
- import { render } from "ink-testing-library";
4
- import { create } from "@bufbuild/protobuf";
5
- import {
6
- AgentExecutionSchema,
7
- AgentExecutionStatusSchema,
8
- type AgentExecution,
9
- } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
10
- import {
11
- ContextInfoSchema,
12
- SummarizationEventSchema,
13
- } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/context_pb";
14
- import { ContextGauge } from "../components/ContextGauge.js";
15
-
16
- function makeExecution(overrides?: {
17
- currentTokenCount?: number;
18
- contextWindowLimit?: number;
19
- utilizationPercent?: number;
20
- }): AgentExecution {
21
- const exec = create(AgentExecutionSchema);
22
- const status = create(AgentExecutionStatusSchema);
23
- const contextInfo = create(ContextInfoSchema);
24
-
25
- contextInfo.currentTokenCount = overrides?.currentTokenCount ?? 10_000;
26
- contextInfo.contextWindowLimit = overrides?.contextWindowLimit ?? 128_000;
27
- contextInfo.summarizationTriggerThreshold = 115_200;
28
- contextInfo.summarizationTargetTokens = 102_400;
29
- contextInfo.summarizationEnabled = true;
30
- contextInfo.utilizationPercent = overrides?.utilizationPercent ?? 5;
31
-
32
- status.contextInfo = contextInfo;
33
- exec.status = status;
34
- return exec;
35
- }
36
-
37
- function addSummarizationEvent(
38
- exec: AgentExecution,
39
- overrides?: {
40
- tokensBefore?: number;
41
- tokensAfter?: number;
42
- compressionRatio?: number;
43
- durationMs?: number;
44
- model?: string;
45
- costUsd?: number;
46
- },
47
- ): void {
48
- const event = create(SummarizationEventSchema);
49
- event.timestamp = "2026-05-17T10:30:00.000Z";
50
- event.tokensBefore = overrides?.tokensBefore ?? 120_000;
51
- event.tokensAfter = overrides?.tokensAfter ?? 82_000;
52
- event.compressionRatio = overrides?.compressionRatio ?? 0.32;
53
- event.durationMs = overrides?.durationMs ?? 2100;
54
- event.summarizationModel = overrides?.model ?? "claude-haiku-4";
55
- event.messagesBefore = 30;
56
- event.messagesAfter = 10;
57
- event.summarizationCostUsd = overrides?.costUsd ?? 0.02;
58
-
59
- exec.status!.contextInfo!.summarizationEvents.push(event);
60
- }
61
-
62
- describe("ContextGauge", () => {
63
- it("renders nothing when execution is null", () => {
64
- const { lastFrame } = render(<ContextGauge execution={null} />);
65
- expect(lastFrame()).toBe("");
66
- });
67
-
68
- it("renders nothing when contextInfo is absent", () => {
69
- const exec = create(AgentExecutionSchema);
70
- exec.status = create(AgentExecutionStatusSchema);
71
-
72
- const { lastFrame } = render(<ContextGauge execution={exec} />);
73
- expect(lastFrame()).toBe("");
74
- });
75
-
76
- it("renders healthy gauge with green bar and no health label", () => {
77
- const exec = makeExecution({
78
- currentTokenCount: 51_200,
79
- contextWindowLimit: 128_000,
80
- utilizationPercent: 40,
81
- });
82
-
83
- const { lastFrame } = render(<ContextGauge execution={exec} />);
84
- const output = lastFrame() ?? "";
85
-
86
- expect(output).toContain("Context");
87
- expect(output).toContain("40%");
88
- expect(output).toContain("51K / 128K tokens");
89
- expect(output).not.toContain("Approaching limit");
90
- expect(output).not.toContain("Near limit");
91
- });
92
-
93
- it("renders warning gauge with health label", () => {
94
- const exec = makeExecution({
95
- currentTokenCount: 96_000,
96
- contextWindowLimit: 128_000,
97
- utilizationPercent: 75,
98
- });
99
-
100
- const { lastFrame } = render(<ContextGauge execution={exec} />);
101
- const output = lastFrame() ?? "";
102
-
103
- expect(output).toContain("75%");
104
- expect(output).toContain("96K / 128K tokens");
105
- expect(output).toContain("Approaching limit");
106
- });
107
-
108
- it("renders critical gauge with health label", () => {
109
- const exec = makeExecution({
110
- currentTokenCount: 118_000,
111
- contextWindowLimit: 128_000,
112
- utilizationPercent: 92,
113
- });
114
-
115
- const { lastFrame } = render(<ContextGauge execution={exec} />);
116
- const output = lastFrame() ?? "";
117
-
118
- expect(output).toContain("92%");
119
- expect(output).toContain("118K / 128K tokens");
120
- expect(output).toContain("Near limit");
121
- });
122
-
123
- it("shows correct token formatting for large counts", () => {
124
- const exec = makeExecution({
125
- currentTokenCount: 1_500_000,
126
- contextWindowLimit: 2_000_000,
127
- utilizationPercent: 75,
128
- });
129
-
130
- const { lastFrame } = render(<ContextGauge execution={exec} />);
131
- const output = lastFrame() ?? "";
132
-
133
- expect(output).toContain("1.5M / 2.0M tokens");
134
- });
135
-
136
- it("shows summarization count and latest event details", () => {
137
- const exec = makeExecution({
138
- currentTokenCount: 82_000,
139
- contextWindowLimit: 128_000,
140
- utilizationPercent: 64,
141
- });
142
- addSummarizationEvent(exec, {
143
- tokensBefore: 120_000,
144
- tokensAfter: 82_000,
145
- compressionRatio: 0.32,
146
- durationMs: 2100,
147
- model: "claude-haiku-4",
148
- costUsd: 0.02,
149
- });
150
-
151
- const { lastFrame } = render(<ContextGauge execution={exec} />);
152
- const output = lastFrame() ?? "";
153
-
154
- expect(output).toContain("1 compaction");
155
- expect(output).toContain("120K → 82K tokens (32% reduction)");
156
- expect(output).toContain("claude-haiku-4");
157
- expect(output).toContain("2.1s");
158
- expect(output).toContain("$0.02");
159
- });
160
-
161
- it("shows plural compaction count for multiple events", () => {
162
- const exec = makeExecution({
163
- currentTokenCount: 60_000,
164
- contextWindowLimit: 128_000,
165
- utilizationPercent: 47,
166
- });
167
- addSummarizationEvent(exec, { tokensBefore: 120_000, tokensAfter: 90_000 });
168
- addSummarizationEvent(exec, { tokensBefore: 110_000, tokensAfter: 70_000 });
169
- addSummarizationEvent(exec, { tokensBefore: 100_000, tokensAfter: 60_000 });
170
-
171
- const { lastFrame } = render(<ContextGauge execution={exec} />);
172
- const output = lastFrame() ?? "";
173
-
174
- expect(output).toContain("3 compactions");
175
- });
176
- });