erosolar-cli 1.7.410 → 1.7.411

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 (205) hide show
  1. package/README.md +6 -6
  2. package/dist/StringUtils.d.ts +1 -4
  3. package/dist/StringUtils.d.ts.map +1 -1
  4. package/dist/StringUtils.js +2 -8
  5. package/dist/StringUtils.js.map +1 -1
  6. package/dist/browser/BrowserSessionManager.d.ts +1 -3
  7. package/dist/browser/BrowserSessionManager.d.ts.map +1 -1
  8. package/dist/browser/BrowserSessionManager.js +4 -24
  9. package/dist/browser/BrowserSessionManager.js.map +1 -1
  10. package/dist/capabilities/askUserCapability.d.ts.map +1 -1
  11. package/dist/capabilities/askUserCapability.js +64 -10
  12. package/dist/capabilities/askUserCapability.js.map +1 -1
  13. package/dist/capabilities/toolRegistry.d.ts +2 -0
  14. package/dist/capabilities/toolRegistry.d.ts.map +1 -1
  15. package/dist/capabilities/toolRegistry.js +40 -5
  16. package/dist/capabilities/toolRegistry.js.map +1 -1
  17. package/dist/contracts/agent-profiles.schema.json +5 -5
  18. package/dist/contracts/agent-schemas.json +6 -16
  19. package/dist/contracts/schemas/agent.schema.json +1 -5
  20. package/dist/contracts/schemas/tool-selection.schema.json +1 -7
  21. package/dist/contracts/tools.schema.json +80 -207
  22. package/dist/contracts/unified-schema.json +4 -5
  23. package/dist/contracts/v1/agent.d.ts +0 -3
  24. package/dist/contracts/v1/agent.d.ts.map +1 -1
  25. package/dist/contracts/v1/provider.d.ts +1 -2
  26. package/dist/contracts/v1/provider.d.ts.map +1 -1
  27. package/dist/contracts/v1/toolAccess.d.ts +1 -1
  28. package/dist/contracts/v1/toolAccess.d.ts.map +1 -1
  29. package/dist/core/agent.d.ts +1 -7
  30. package/dist/core/agent.d.ts.map +1 -1
  31. package/dist/core/agent.js +2 -131
  32. package/dist/core/agent.js.map +1 -1
  33. package/dist/core/alphaZeroEngine.d.ts +0 -8
  34. package/dist/core/alphaZeroEngine.d.ts.map +1 -1
  35. package/dist/core/alphaZeroEngine.js +35 -149
  36. package/dist/core/alphaZeroEngine.js.map +1 -1
  37. package/dist/core/alphaZeroOrchestrator.d.ts +0 -17
  38. package/dist/core/alphaZeroOrchestrator.d.ts.map +1 -1
  39. package/dist/core/alphaZeroOrchestrator.js +8 -95
  40. package/dist/core/alphaZeroOrchestrator.js.map +1 -1
  41. package/dist/core/claudeCodeFeatures.d.ts +2 -1
  42. package/dist/core/claudeCodeFeatures.d.ts.map +1 -1
  43. package/dist/core/claudeCodeFeatures.js +2 -1
  44. package/dist/core/claudeCodeFeatures.js.map +1 -1
  45. package/dist/core/cliTestHarness.d.ts +0 -5
  46. package/dist/core/cliTestHarness.d.ts.map +1 -1
  47. package/dist/core/cliTestHarness.js +3 -14
  48. package/dist/core/cliTestHarness.js.map +1 -1
  49. package/dist/core/contextManager.d.ts +0 -30
  50. package/dist/core/contextManager.d.ts.map +1 -1
  51. package/dist/core/contextManager.js +5 -87
  52. package/dist/core/contextManager.js.map +1 -1
  53. package/dist/core/contextWindow.d.ts +4 -4
  54. package/dist/core/contextWindow.js +9 -9
  55. package/dist/core/contextWindow.js.map +1 -1
  56. package/dist/core/modelDiscovery.js +3 -3
  57. package/dist/core/modelDiscovery.js.map +1 -1
  58. package/dist/core/preferences.d.ts +2 -3
  59. package/dist/core/preferences.d.ts.map +1 -1
  60. package/dist/core/preferences.js +11 -18
  61. package/dist/core/preferences.js.map +1 -1
  62. package/dist/core/secretStore.d.ts.map +1 -1
  63. package/dist/core/secretStore.js +31 -0
  64. package/dist/core/secretStore.js.map +1 -1
  65. package/dist/core/toolPreconditions.d.ts.map +1 -1
  66. package/dist/core/toolPreconditions.js +0 -60
  67. package/dist/core/toolPreconditions.js.map +1 -1
  68. package/dist/core/toolRuntime.d.ts.map +1 -1
  69. package/dist/core/toolRuntime.js +0 -17
  70. package/dist/core/toolRuntime.js.map +1 -1
  71. package/dist/core/types.d.ts +1 -1
  72. package/dist/core/types.d.ts.map +1 -1
  73. package/dist/headless/headlessApp.d.ts.map +1 -1
  74. package/dist/headless/headlessApp.js +6 -22
  75. package/dist/headless/headlessApp.js.map +1 -1
  76. package/dist/plugins/providers/google/index.js +3 -2
  77. package/dist/plugins/providers/google/index.js.map +1 -1
  78. package/dist/providers/openaiChatCompletionsProvider.d.ts.map +1 -1
  79. package/dist/providers/openaiChatCompletionsProvider.js +6 -60
  80. package/dist/providers/openaiChatCompletionsProvider.js.map +1 -1
  81. package/dist/runtime/agentController.d.ts.map +1 -1
  82. package/dist/runtime/agentController.js +6 -27
  83. package/dist/runtime/agentController.js.map +1 -1
  84. package/dist/shell/interactiveShell.d.ts +30 -79
  85. package/dist/shell/interactiveShell.d.ts.map +1 -1
  86. package/dist/shell/interactiveShell.js +726 -1511
  87. package/dist/shell/interactiveShell.js.map +1 -1
  88. package/dist/shell/shellApp.d.ts.map +1 -1
  89. package/dist/shell/shellApp.js +41 -15
  90. package/dist/shell/shellApp.js.map +1 -1
  91. package/dist/shell/systemPrompt.d.ts.map +1 -1
  92. package/dist/shell/systemPrompt.js +0 -1
  93. package/dist/shell/systemPrompt.js.map +1 -1
  94. package/dist/shell/terminalInput.d.ts +21 -85
  95. package/dist/shell/terminalInput.d.ts.map +1 -1
  96. package/dist/shell/terminalInput.js +60 -517
  97. package/dist/shell/terminalInput.js.map +1 -1
  98. package/dist/shell/terminalInputAdapter.d.ts +16 -37
  99. package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
  100. package/dist/shell/terminalInputAdapter.js +22 -44
  101. package/dist/shell/terminalInputAdapter.js.map +1 -1
  102. package/dist/shell/updateManager.d.ts.map +1 -1
  103. package/dist/shell/updateManager.js +17 -1
  104. package/dist/shell/updateManager.js.map +1 -1
  105. package/dist/subagents/parallelAgentManager.d.ts.map +1 -1
  106. package/dist/subagents/parallelAgentManager.js +2 -1
  107. package/dist/subagents/parallelAgentManager.js.map +1 -1
  108. package/dist/tools/buildTools.d.ts.map +1 -1
  109. package/dist/tools/buildTools.js +76 -19
  110. package/dist/tools/buildTools.js.map +1 -1
  111. package/dist/tools/editTools.js +1 -1
  112. package/dist/tools/editTools.js.map +1 -1
  113. package/dist/tools/enhancedCodeIntelligenceTools.js +2 -1
  114. package/dist/tools/enhancedCodeIntelligenceTools.js.map +1 -1
  115. package/dist/tools/fileTools.js +0 -3
  116. package/dist/tools/fileTools.js.map +1 -1
  117. package/dist/tools/frontendTestingTools.js +1 -1
  118. package/dist/tools/frontendTestingTools.js.map +1 -1
  119. package/dist/tools/interactionTools.d.ts.map +1 -1
  120. package/dist/tools/interactionTools.js +82 -15
  121. package/dist/tools/interactionTools.js.map +1 -1
  122. package/dist/tools/learnTools.d.ts +0 -2
  123. package/dist/tools/learnTools.d.ts.map +1 -1
  124. package/dist/tools/learnTools.js +81 -29
  125. package/dist/tools/learnTools.js.map +1 -1
  126. package/dist/tools/localExplore.d.ts.map +1 -1
  127. package/dist/tools/localExplore.js +1 -0
  128. package/dist/tools/localExplore.js.map +1 -1
  129. package/dist/tools/notebookEditTools.js.map +1 -1
  130. package/dist/tools/repoChecksTools.js +3 -4
  131. package/dist/tools/repoChecksTools.js.map +1 -1
  132. package/dist/tools/searchTools.js +0 -4
  133. package/dist/tools/searchTools.js.map +1 -1
  134. package/dist/tools/softwareEngineeringTools.d.ts.map +1 -1
  135. package/dist/tools/softwareEngineeringTools.js +0 -1
  136. package/dist/tools/softwareEngineeringTools.js.map +1 -1
  137. package/dist/tools/webTools.d.ts.map +1 -1
  138. package/dist/tools/webTools.js.map +1 -1
  139. package/dist/ui/ShellUIAdapter.d.ts +17 -54
  140. package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
  141. package/dist/ui/ShellUIAdapter.js +90 -378
  142. package/dist/ui/ShellUIAdapter.js.map +1 -1
  143. package/dist/ui/display.d.ts +38 -19
  144. package/dist/ui/display.d.ts.map +1 -1
  145. package/dist/ui/display.js +311 -96
  146. package/dist/ui/display.js.map +1 -1
  147. package/dist/ui/orchestration/UIUpdateCoordinator.d.ts.map +1 -1
  148. package/dist/ui/orchestration/UIUpdateCoordinator.js +3 -5
  149. package/dist/ui/orchestration/UIUpdateCoordinator.js.map +1 -1
  150. package/dist/ui/shortcutsHelp.d.ts +11 -1
  151. package/dist/ui/shortcutsHelp.d.ts.map +1 -1
  152. package/dist/ui/shortcutsHelp.js +54 -8
  153. package/dist/ui/shortcutsHelp.js.map +1 -1
  154. package/dist/ui/streamingFormatter.d.ts +16 -0
  155. package/dist/ui/streamingFormatter.d.ts.map +1 -0
  156. package/dist/ui/streamingFormatter.js +62 -0
  157. package/dist/ui/streamingFormatter.js.map +1 -0
  158. package/dist/ui/theme.d.ts +100 -100
  159. package/dist/ui/theme.d.ts.map +1 -1
  160. package/dist/ui/theme.js.map +1 -1
  161. package/dist/ui/toolDisplay.d.ts +3 -3
  162. package/dist/ui/toolDisplay.d.ts.map +1 -1
  163. package/dist/ui/toolDisplay.js +8 -7
  164. package/dist/ui/toolDisplay.js.map +1 -1
  165. package/dist/ui/unified/index.d.ts +3 -2
  166. package/dist/ui/unified/index.d.ts.map +1 -1
  167. package/dist/ui/unified/index.js +1 -0
  168. package/dist/ui/unified/index.js.map +1 -1
  169. package/dist/ui/unified/layout.d.ts +23 -0
  170. package/dist/ui/unified/layout.d.ts.map +1 -1
  171. package/dist/ui/unified/layout.js +113 -11
  172. package/dist/ui/unified/layout.js.map +1 -1
  173. package/package.json +24 -37
  174. package/dist/core/alphaZeroConfig.d.ts +0 -11
  175. package/dist/core/alphaZeroConfig.d.ts.map +0 -1
  176. package/dist/core/alphaZeroConfig.js +0 -59
  177. package/dist/core/alphaZeroConfig.js.map +0 -1
  178. package/dist/core/alphaZeroEnhanced.d.ts +0 -125
  179. package/dist/core/alphaZeroEnhanced.d.ts.map +0 -1
  180. package/dist/core/alphaZeroEnhanced.js +0 -386
  181. package/dist/core/alphaZeroEnhanced.js.map +0 -1
  182. package/dist/core/autonomousVerification.d.ts +0 -103
  183. package/dist/core/autonomousVerification.d.ts.map +0 -1
  184. package/dist/core/autonomousVerification.js +0 -583
  185. package/dist/core/autonomousVerification.js.map +0 -1
  186. package/dist/core/offsecAlphaZeroEnhanced.d.ts +0 -98
  187. package/dist/core/offsecAlphaZeroEnhanced.d.ts.map +0 -1
  188. package/dist/core/offsecAlphaZeroEnhanced.js +0 -441
  189. package/dist/core/offsecAlphaZeroEnhanced.js.map +0 -1
  190. package/dist/core/parallelAgentOrchestrator.d.ts +0 -171
  191. package/dist/core/parallelAgentOrchestrator.d.ts.map +0 -1
  192. package/dist/core/parallelAgentOrchestrator.js +0 -459
  193. package/dist/core/parallelAgentOrchestrator.js.map +0 -1
  194. package/dist/index.d.ts +0 -5
  195. package/dist/index.d.ts.map +0 -1
  196. package/dist/index.js +0 -3
  197. package/dist/index.js.map +0 -1
  198. package/dist/tools/detectCommands.d.ts +0 -8
  199. package/dist/tools/detectCommands.d.ts.map +0 -1
  200. package/dist/tools/detectCommands.js +0 -183
  201. package/dist/tools/detectCommands.js.map +0 -1
  202. package/dist/ui/assistantBlockRenderer.d.ts +0 -30
  203. package/dist/ui/assistantBlockRenderer.d.ts.map +0 -1
  204. package/dist/ui/assistantBlockRenderer.js +0 -121
  205. package/dist/ui/assistantBlockRenderer.js.map +0 -1
@@ -1,8 +0,0 @@
1
- export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
2
- export interface DetectedCommand {
3
- command: string;
4
- reason: string;
5
- }
6
- export declare function detectBuildCommand(workingDir: string): DetectedCommand | null;
7
- export declare function detectTestCommand(workingDir: string): DetectedCommand | null;
8
- //# sourceMappingURL=detectCommands.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"detectCommands.d.ts","sourceRoot":"","sources":["../../src/tools/detectCommands.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAE7D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AA0FD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CA0D7E;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAwD5E"}
@@ -1,183 +0,0 @@
1
- import { existsSync, readFileSync } from 'node:fs';
2
- import { join } from 'node:path';
3
- function readPackageJson(workingDir) {
4
- const packageJsonPath = join(workingDir, 'package.json');
5
- if (!existsSync(packageJsonPath)) {
6
- return null;
7
- }
8
- try {
9
- const raw = readFileSync(packageJsonPath, 'utf-8');
10
- return JSON.parse(raw);
11
- }
12
- catch {
13
- return null;
14
- }
15
- }
16
- function detectPackageManager(workingDir, pkg) {
17
- const declared = pkg?.packageManager;
18
- if (declared && typeof declared === 'string') {
19
- const name = declared.split('@')[0];
20
- if (name === 'npm' || name === 'pnpm' || name === 'yarn' || name === 'bun') {
21
- return name;
22
- }
23
- }
24
- if (existsSync(join(workingDir, 'pnpm-lock.yaml')))
25
- return 'pnpm';
26
- if (existsSync(join(workingDir, 'yarn.lock')))
27
- return 'yarn';
28
- if (existsSync(join(workingDir, 'bun.lockb')))
29
- return 'bun';
30
- if (existsSync(join(workingDir, 'package-lock.json')) || existsSync(join(workingDir, 'npm-shrinkwrap.json'))) {
31
- return 'npm';
32
- }
33
- return pkg ? 'npm' : null;
34
- }
35
- function buildNodeScriptCommand(manager, script, preferTestShortcut = false) {
36
- if (manager === 'yarn') {
37
- return preferTestShortcut && script === 'test' ? 'yarn test' : `yarn ${script}`;
38
- }
39
- if (manager === 'pnpm') {
40
- return preferTestShortcut && script === 'test' ? 'pnpm test' : `pnpm run ${script}`;
41
- }
42
- if (manager === 'bun') {
43
- return preferTestShortcut && script === 'test' ? 'bun test' : `bun run ${script}`;
44
- }
45
- return preferTestShortcut && script === 'test' ? 'npm test' : `npm run ${script}`;
46
- }
47
- function shouldForceInBand(scriptValue) {
48
- if (!scriptValue) {
49
- return false;
50
- }
51
- const lower = scriptValue.toLowerCase();
52
- return lower.includes('jest') || lower.includes('react-scripts');
53
- }
54
- function buildNodeTestCommand(manager, script, scriptValue) {
55
- const base = buildNodeScriptCommand(manager, script, true);
56
- if (!shouldForceInBand(scriptValue)) {
57
- return base;
58
- }
59
- const flag = manager === 'yarn' ? '--runInBand' : '-- --runInBand';
60
- return `${base} ${flag}`.trim();
61
- }
62
- function hasFile(workingDir, name) {
63
- return existsSync(join(workingDir, name));
64
- }
65
- function detectMakeTargets(workingDir) {
66
- const makefilePath = join(workingDir, 'Makefile');
67
- if (!existsSync(makefilePath)) {
68
- return { hasBuild: false, hasTest: false };
69
- }
70
- try {
71
- const content = readFileSync(makefilePath, 'utf-8');
72
- const buildMatch = /^\s*build\s*:/m.test(content);
73
- const testMatch = /^\s*test\s*:/m.test(content);
74
- return { hasBuild: buildMatch, hasTest: testMatch };
75
- }
76
- catch {
77
- return { hasBuild: false, hasTest: false };
78
- }
79
- }
80
- export function detectBuildCommand(workingDir) {
81
- const pkg = readPackageJson(workingDir);
82
- const manager = detectPackageManager(workingDir, pkg);
83
- if (pkg && manager) {
84
- const scripts = pkg.scripts ?? {};
85
- const candidates = ['build', 'compile', 'tsc'];
86
- for (const candidate of candidates) {
87
- if (scripts[candidate]) {
88
- return {
89
- command: buildNodeScriptCommand(manager, candidate),
90
- reason: `package.json scripts.${candidate}`,
91
- };
92
- }
93
- }
94
- if (hasFile(workingDir, 'tsconfig.json')) {
95
- const cmd = manager === 'bun' ? 'bunx tsc --noEmit' : 'npx tsc --noEmit';
96
- return { command: cmd, reason: 'tsconfig.json (TypeScript)' };
97
- }
98
- }
99
- if (hasFile(workingDir, 'Cargo.toml'))
100
- return { command: 'cargo build', reason: 'Cargo.toml' };
101
- if (hasFile(workingDir, 'go.mod'))
102
- return { command: 'go build ./...', reason: 'go.mod' };
103
- if (hasFile(workingDir, 'mvnw') || hasFile(workingDir, 'pom.xml')) {
104
- const mvn = hasFile(workingDir, 'mvnw') ? './mvnw' : 'mvn';
105
- return { command: `${mvn} -B -DskipTests package`, reason: 'Maven project' };
106
- }
107
- if (hasFile(workingDir, 'gradlew') || hasFile(workingDir, 'build.gradle') || hasFile(workingDir, 'build.gradle.kts')) {
108
- const gradle = hasFile(workingDir, 'gradlew') ? './gradlew' : 'gradle';
109
- return { command: `${gradle} assemble`, reason: 'Gradle project' };
110
- }
111
- if (hasFile(workingDir, 'pyproject.toml') || hasFile(workingDir, 'setup.py')) {
112
- return { command: 'python -m build', reason: 'Python project manifest' };
113
- }
114
- if (hasFile(workingDir, 'package.swift')) {
115
- return { command: 'swift build', reason: 'Swift Package Manager' };
116
- }
117
- const makeTargets = detectMakeTargets(workingDir);
118
- if (hasFile(workingDir, 'Makefile')) {
119
- const target = makeTargets.hasBuild ? 'build' : '';
120
- const command = target ? `make ${target}` : 'make';
121
- return { command, reason: 'Makefile' };
122
- }
123
- if (hasFile(workingDir, 'Cargo.lock'))
124
- return { command: 'cargo build', reason: 'Cargo.lock' };
125
- if (hasFile(workingDir, 'go.sum'))
126
- return { command: 'go build ./...', reason: 'go.sum' };
127
- if (hasFile(workingDir, 'package.json') && manager) {
128
- return { command: buildNodeScriptCommand(manager, 'build'), reason: 'package.json present' };
129
- }
130
- return null;
131
- }
132
- export function detectTestCommand(workingDir) {
133
- const pkg = readPackageJson(workingDir);
134
- const manager = detectPackageManager(workingDir, pkg);
135
- if (pkg && manager) {
136
- const scripts = pkg.scripts ?? {};
137
- const orderedScripts = [
138
- 'test',
139
- 'test:ci',
140
- 'test:unit',
141
- 'jest',
142
- 'vitest',
143
- 'coverage',
144
- ];
145
- for (const script of orderedScripts) {
146
- if (scripts[script]) {
147
- return {
148
- command: buildNodeTestCommand(manager, script, scripts[script]),
149
- reason: `package.json scripts.${script}`,
150
- };
151
- }
152
- }
153
- }
154
- if (hasFile(workingDir, 'Cargo.toml'))
155
- return { command: 'cargo test', reason: 'Cargo.toml' };
156
- if (hasFile(workingDir, 'go.mod'))
157
- return { command: 'go test ./...', reason: 'go.mod' };
158
- if (hasFile(workingDir, 'pytest.ini') || hasFile(workingDir, 'pyproject.toml')) {
159
- return { command: 'python -m pytest', reason: 'pytest configuration' };
160
- }
161
- if (hasFile(workingDir, 'tox.ini'))
162
- return { command: 'tox', reason: 'tox.ini' };
163
- if (hasFile(workingDir, 'mvnw') || hasFile(workingDir, 'pom.xml')) {
164
- const mvn = hasFile(workingDir, 'mvnw') ? './mvnw' : 'mvn';
165
- return { command: `${mvn} -B test`, reason: 'Maven project' };
166
- }
167
- if (hasFile(workingDir, 'gradlew') || hasFile(workingDir, 'build.gradle') || hasFile(workingDir, 'build.gradle.kts')) {
168
- const gradle = hasFile(workingDir, 'gradlew') ? './gradlew' : 'gradle';
169
- return { command: `${gradle} test`, reason: 'Gradle project' };
170
- }
171
- if (hasFile(workingDir, 'package.swift')) {
172
- return { command: 'swift test', reason: 'Swift Package Manager' };
173
- }
174
- const makeTargets = detectMakeTargets(workingDir);
175
- if (hasFile(workingDir, 'Makefile') && makeTargets.hasTest) {
176
- return { command: 'make test', reason: 'Makefile test target' };
177
- }
178
- if (hasFile(workingDir, 'package.json') && manager) {
179
- return { command: buildNodeTestCommand(manager, 'test', pkg?.scripts?.['test']), reason: 'package.json present' };
180
- }
181
- return null;
182
- }
183
- //# sourceMappingURL=detectCommands.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"detectCommands.js","sourceRoot":"","sources":["../../src/tools/detectCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAcjC,SAAS,eAAe,CAAC,UAAkB;IACzC,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACzD,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,MAAM,GA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AAE,GAAG,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACpH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,30 +0,0 @@
1
- import { UIUpdateCoordinator, type UIUpdateLane } from './orchestration/UIUpdateCoordinator.js';
2
- import type { DisplayMessageMetadata } from './display.js';
3
- export type AssistantBlockType = 'thought' | 'response' | 'tools';
4
- interface AssistantBlockRendererOptions {
5
- write: (content: string) => void;
6
- updates: UIUpdateCoordinator;
7
- lane?: UIUpdateLane;
8
- }
9
- /**
10
- * AssistantBlockRenderer
11
- *
12
- * Renders assistant output as structured blocks with a compact header.
13
- * Uses the shared UIUpdateCoordinator so streaming flushes coalesce
14
- * cleanly and the pinned prompt stays anchored beneath the last block.
15
- */
16
- export declare class AssistantBlockRenderer {
17
- private readonly write;
18
- private readonly updates;
19
- private readonly lane;
20
- constructor(options: AssistantBlockRendererOptions);
21
- renderBlock(type: AssistantBlockType, content: string, metadata?: DisplayMessageMetadata): void;
22
- formatHeader(type: AssistantBlockType, metadata?: DisplayMessageMetadata): string;
23
- private buildTypeBadge;
24
- private buildUsageBadges;
25
- private buildElapsedBadge;
26
- private resolveTokens;
27
- private formatTimestamp;
28
- }
29
- export {};
30
- //# sourceMappingURL=assistantBlockRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assistantBlockRenderer.d.ts","sourceRoot":"","sources":["../../src/ui/assistantBlockRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAChG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAG3D,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAElE,UAAU,6BAA6B;IACrC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED;;;;;;GAMG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA4B;IAClD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;gBAExB,OAAO,EAAE,6BAA6B;IAMlD,WAAW,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,sBAAsB,GAAG,IAAI;IAoB/F,YAAY,CAAC,IAAI,EAAE,kBAAkB,EAAE,QAAQ,CAAC,EAAE,sBAAsB,GAAG,MAAM;IAuBjF,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,gBAAgB;IA8BxB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,eAAe;CAQxB"}
@@ -1,121 +0,0 @@
1
- import { compactRenderer } from './compactRenderer.js';
2
- import { theme } from './theme.js';
3
- /**
4
- * AssistantBlockRenderer
5
- *
6
- * Renders assistant output as structured blocks with a compact header.
7
- * Uses the shared UIUpdateCoordinator so streaming flushes coalesce
8
- * cleanly and the pinned prompt stays anchored beneath the last block.
9
- */
10
- export class AssistantBlockRenderer {
11
- write;
12
- updates;
13
- lane;
14
- constructor(options) {
15
- this.write = options.write;
16
- this.updates = options.updates;
17
- this.lane = options.lane ?? 'stream';
18
- }
19
- renderBlock(type, content, metadata) {
20
- const normalized = content.replace(/\r\n/g, '\n').trimEnd();
21
- const compacted = normalized.replace(/\n{3,}/g, '\n\n');
22
- if (!normalized) {
23
- return;
24
- }
25
- const header = this.formatHeader(type, metadata);
26
- const block = `${header}\n${compacted}\n\n`;
27
- this.updates.enqueue({
28
- lane: this.lane,
29
- mode: ['streaming', 'processing', 'idle'],
30
- description: `${type} block flush`,
31
- run: () => {
32
- this.write(block);
33
- },
34
- });
35
- }
36
- formatHeader(type, metadata) {
37
- const badges = [];
38
- badges.push(this.buildTypeBadge(type));
39
- badges.push({
40
- text: this.formatTimestamp(),
41
- style: 'muted',
42
- icon: '🕑',
43
- });
44
- const usageBadges = this.buildUsageBadges(metadata);
45
- if (usageBadges.length) {
46
- badges.push(...usageBadges);
47
- }
48
- const elapsedBadge = this.buildElapsedBadge(metadata);
49
- if (elapsedBadge) {
50
- badges.push(elapsedBadge);
51
- }
52
- return compactRenderer.formatBadges(badges, theme.ui.muted(' │ '));
53
- }
54
- buildTypeBadge(type) {
55
- switch (type) {
56
- case 'thought':
57
- return { text: 'Thought', style: 'info', icon: '💭' };
58
- case 'tools':
59
- return { text: 'Tools', style: 'primary', icon: '🛠' };
60
- case 'response':
61
- default:
62
- return { text: 'Response', style: 'success', icon: '💬' };
63
- }
64
- }
65
- buildUsageBadges(metadata) {
66
- const badges = [];
67
- if (!metadata) {
68
- return badges;
69
- }
70
- const totalTokens = this.resolveTokens(metadata.usage);
71
- const contextWindow = typeof metadata.contextWindowTokens === 'number' ? metadata.contextWindowTokens : null;
72
- if (typeof totalTokens === 'number') {
73
- badges.push({
74
- text: `${totalTokens} tok`,
75
- style: 'muted',
76
- icon: '⎍',
77
- });
78
- }
79
- if (totalTokens && contextWindow) {
80
- const percentage = Math.min(100, Math.max(0, Math.round((totalTokens / contextWindow) * 100)));
81
- const style = percentage > 85 ? 'error' : percentage > 70 ? 'warning' : 'info';
82
- badges.push({
83
- text: `${percentage}% ctx`,
84
- style,
85
- icon: '⊛',
86
- });
87
- }
88
- return badges;
89
- }
90
- buildElapsedBadge(metadata) {
91
- const elapsed = metadata?.elapsedMs;
92
- if (typeof elapsed !== 'number' || elapsed <= 0) {
93
- return null;
94
- }
95
- const formatted = elapsed < 1000
96
- ? `${Math.round(elapsed)}ms`
97
- : `${Math.round(elapsed / 1000)}s`;
98
- return { text: formatted, style: 'muted', icon: '⏱' };
99
- }
100
- resolveTokens(usage) {
101
- if (!usage) {
102
- return null;
103
- }
104
- if (typeof usage.totalTokens === 'number' && Number.isFinite(usage.totalTokens)) {
105
- return usage.totalTokens;
106
- }
107
- if (typeof usage.outputTokens === 'number' && Number.isFinite(usage.outputTokens)) {
108
- return usage.outputTokens;
109
- }
110
- return null;
111
- }
112
- formatTimestamp(date = new Date()) {
113
- return date.toLocaleTimeString('en-US', {
114
- hour12: false,
115
- hour: '2-digit',
116
- minute: '2-digit',
117
- second: '2-digit',
118
- });
119
- }
120
- }
121
- //# sourceMappingURL=assistantBlockRenderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assistantBlockRenderer.js","sourceRoot":"","sources":["../../src/ui/assistantBlockRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAc,MAAM,sBAAsB,CAAC;AAGnE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAUnC;;;;;;GAMG;AACH,MAAM,OAAO,sBAAsB;IAChB,KAAK,CAA4B;IACjC,OAAO,CAAsB;IAC7B,IAAI,CAAe;IAEpC,YAAY,OAAsC;QAChD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC;IACvC,CAAC;IAED,WAAW,CAAC,IAAwB,EAAE,OAAe,EAAE,QAAiC;QACtF,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAC5D,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,KAAK,GAAG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