actoviq-agent-sdk 0.4.14 → 0.4.15
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/CHANGELOG.md +9 -0
- package/dist/src/tui/hadamardTui.d.ts.map +1 -1
- package/dist/src/tui/hadamardTui.js +21 -3
- package/dist/src/tui/hadamardTui.js.map +1 -1
- package/dist/src/tui/reasoningDisplay.d.ts +1 -0
- package/dist/src/tui/reasoningDisplay.d.ts.map +1 -1
- package/dist/src/tui/reasoningDisplay.js +10 -3
- package/dist/src/tui/reasoningDisplay.js.map +1 -1
- package/dist/src/tui/toolActivityDisplay.d.ts +8 -0
- package/dist/src/tui/toolActivityDisplay.d.ts.map +1 -0
- package/dist/src/tui/toolActivityDisplay.js +24 -0
- package/dist/src/tui/toolActivityDisplay.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ The format is based on Keep a Changelog, with automated updates from GitHub Rele
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## v0.4.15 - 2026-08-10
|
|
10
|
+
|
|
11
|
+
### Fixes
|
|
12
|
+
|
|
13
|
+
- Prevent a completed reasoning segment from rendering twice when both streaming and final-response events contain it
|
|
14
|
+
- Render each identified tool-call start and terminal event only once, even when equivalent lifecycle events arrive through multiple runtime paths
|
|
15
|
+
|
|
16
|
+
**Full Changelog**: https://github.com/DeconBear/hadamard/compare/v0.4.14...v0.4.15
|
|
17
|
+
|
|
9
18
|
## v0.4.14 - 2026-08-10
|
|
10
19
|
|
|
11
20
|
### Features
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hadamardTui.d.ts","sourceRoot":"","sources":["../../../src/tui/hadamardTui.ts"],"names":[],"mappings":"AA+FA,OAAO,KAAK,EAIV,sBAAsB,EAMtB,cAAc,EAGf,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"hadamardTui.d.ts","sourceRoot":"","sources":["../../../src/tui/hadamardTui.ts"],"names":[],"mappings":"AA+FA,OAAO,KAAK,EAIV,sBAAsB,EAMtB,cAAc,EAGf,MAAM,aAAa,CAAC;AA6FrB,eAAO,MAAM,kBAAkB,wBAAgC,CAAC;AA4ChE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAE3D;AAED,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG,OAAO,CAE/E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACb;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAYzC;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAoDD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,EAAE,CAqCtG;AA+ED,wBAAsB,cAAc,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAksLpF"}
|
|
@@ -41,6 +41,7 @@ import { InputEditor } from './editor.js';
|
|
|
41
41
|
import { discoverHadamardPlugins } from './pluginCatalog.js';
|
|
42
42
|
import { TuiScreen } from './screen.js';
|
|
43
43
|
import { ReasoningDisplayState } from './reasoningDisplay.js';
|
|
44
|
+
import { ToolActivityDisplayState } from './toolActivityDisplay.js';
|
|
44
45
|
import { recallLatestFollowUp, restoreAbandonedFollowUp, submitActiveInput, } from './pendingInput.js';
|
|
45
46
|
import { filterTuiSelectionItems, moveTuiSelection, } from './selection.js';
|
|
46
47
|
import { StreamFlusher, formatBanner, formatCompactNotice, formatDivider, formatEditCall, formatErrorLine, formatInfoLine, formatQueuedPrompt, formatToolCall, formatToolResult, formatUserPrompt, } from './transcript.js';
|
|
@@ -703,6 +704,7 @@ export async function runHadamardTui(options = {}) {
|
|
|
703
704
|
let ctrlCTimer = null;
|
|
704
705
|
let streamedTextSeen = false;
|
|
705
706
|
const reasoningDisplay = new ReasoningDisplayState();
|
|
707
|
+
const toolActivityDisplay = new ToolActivityDisplayState();
|
|
706
708
|
// Track tool names by callId for PostToolUse hook context.
|
|
707
709
|
const toolCallNames = new Map();
|
|
708
710
|
// Live todo list (captured from TodoWrite tool calls). Rendered as a
|
|
@@ -1487,6 +1489,8 @@ export async function runHadamardTui(options = {}) {
|
|
|
1487
1489
|
requestStartedAt = 0;
|
|
1488
1490
|
providerActivitySeen = false;
|
|
1489
1491
|
runToolCount = 0;
|
|
1492
|
+
toolActivityDisplay.reset();
|
|
1493
|
+
toolCallNames.clear();
|
|
1490
1494
|
statusNote = 'preparing locally';
|
|
1491
1495
|
streamedTextSeen = false;
|
|
1492
1496
|
lastTokenEstimate = undefined;
|
|
@@ -1648,6 +1652,8 @@ export async function runHadamardTui(options = {}) {
|
|
|
1648
1652
|
case 'run.started':
|
|
1649
1653
|
streamedTextSeen = false;
|
|
1650
1654
|
reasoningDisplay.reset();
|
|
1655
|
+
toolActivityDisplay.reset();
|
|
1656
|
+
toolCallNames.clear();
|
|
1651
1657
|
return;
|
|
1652
1658
|
case 'request.started':
|
|
1653
1659
|
requestStartedAt = Date.now();
|
|
@@ -1702,9 +1708,11 @@ export async function runHadamardTui(options = {}) {
|
|
|
1702
1708
|
return;
|
|
1703
1709
|
}
|
|
1704
1710
|
case 'tool.started': {
|
|
1711
|
+
const callId = typeof data.callId === 'string' ? data.callId : '';
|
|
1712
|
+
if (!toolActivityDisplay.markStarted(callId))
|
|
1713
|
+
return;
|
|
1705
1714
|
providerActivitySeen = true;
|
|
1706
1715
|
collapseReasoning();
|
|
1707
|
-
const callId = typeof data.callId === 'string' ? data.callId : '';
|
|
1708
1716
|
const publicName = typeof data.publicName === 'string'
|
|
1709
1717
|
? data.publicName
|
|
1710
1718
|
: typeof data.name === 'string' ? data.name : 'tool';
|
|
@@ -1753,6 +1761,8 @@ export async function runHadamardTui(options = {}) {
|
|
|
1753
1761
|
case 'tool.failed':
|
|
1754
1762
|
case 'tool.rejected': {
|
|
1755
1763
|
const callId = typeof data.callId === 'string' ? data.callId : '';
|
|
1764
|
+
if (!toolActivityDisplay.markTerminal(callId))
|
|
1765
|
+
return;
|
|
1756
1766
|
const outputText = typeof data.outputText === 'string' ? data.outputText : '';
|
|
1757
1767
|
statusNote = '';
|
|
1758
1768
|
appendStatic(formatToolResult({
|
|
@@ -1765,6 +1775,8 @@ export async function runHadamardTui(options = {}) {
|
|
|
1765
1775
|
if (toolName) {
|
|
1766
1776
|
runPostToolUseHooks(() => readPostToolUseHooks(getLoadedJsonConfig()?.raw), toolName, null, outputText, sdk.config.workDir);
|
|
1767
1777
|
}
|
|
1778
|
+
if (callId)
|
|
1779
|
+
toolCallNames.delete(callId);
|
|
1768
1780
|
renderDynamic();
|
|
1769
1781
|
return;
|
|
1770
1782
|
}
|
|
@@ -5051,9 +5063,12 @@ export async function runHadamardTui(options = {}) {
|
|
|
5051
5063
|
__hadamardUseDefaultTools: false,
|
|
5052
5064
|
__hadamardAllowedTools: tools.map(item => item.name),
|
|
5053
5065
|
});
|
|
5066
|
+
const assistantToolDisplay = new ToolActivityDisplayState();
|
|
5054
5067
|
for await (const event of stream) {
|
|
5055
|
-
if (event.type === 'tool.call'
|
|
5068
|
+
if (event.type === 'tool.call'
|
|
5069
|
+
&& assistantToolDisplay.markStarted(event.call.id)) {
|
|
5056
5070
|
appendStatic([`${A.dim} ⚙ ${event.call.name}${A.reset}`]);
|
|
5071
|
+
}
|
|
5057
5072
|
}
|
|
5058
5073
|
const result = await stream.result;
|
|
5059
5074
|
if (result.text)
|
|
@@ -5403,9 +5418,12 @@ export async function runHadamardTui(options = {}) {
|
|
|
5403
5418
|
__hadamardAllowedTools: managerTools.map((tool) => tool.name),
|
|
5404
5419
|
};
|
|
5405
5420
|
const stream = managerTuiSession.stream(prompt, runOptions);
|
|
5421
|
+
const managerToolDisplay = new ToolActivityDisplayState();
|
|
5406
5422
|
for await (const event of stream) {
|
|
5407
|
-
if (event.type === 'tool.call'
|
|
5423
|
+
if (event.type === 'tool.call'
|
|
5424
|
+
&& managerToolDisplay.markStarted(event.call.id)) {
|
|
5408
5425
|
appendStatic([`${A.dim} ⚡ ${event.call.name}${A.reset}`]);
|
|
5426
|
+
}
|
|
5409
5427
|
}
|
|
5410
5428
|
const result = await stream.result;
|
|
5411
5429
|
if (result.text)
|