fix(ts): import kaiAgentTools, and type the decision a compaction reads

unified/index.ts spread kaiAgentTools without importing it, so loading
the module threw a ReferenceError and the TypeScript server could not
start. tsc reports it (TS2304) and fails on d2dc818, which hanzo.yml's
typecheck step would too. compact.ts read the decision's JSON into a
value tsc types unknown (TS18046); the answer is the wire's, as kai.ts's
decide() already returns it.

tsc --noEmit is clean and scripts/smoke-mcp.mjs passes 9 of 9 against the
bundle.
This commit is contained in:
2026-10-14 14:54:31 -07:00
parent fe2e8c2a02
commit ce3c6bfd4a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -205,7 +205,7 @@ export const kaiCompactTool: Tool = {
});
if (r.ok) {
const dec = await r.json();
const dec: any = await r.json();
for (let idx = 0; idx < unpinnedPairs.length; idx++) {
const pair = unpinnedPairs[idx];
const ans = dec.answers?.[`keep_${idx}`];
+1 -1
View File
@@ -27,7 +27,7 @@ import { codeIntelTools } from '../code-intel.js';
// Work items — Hanzo /v1/tracker (the ONE work-item primitive; boards, issues)
import { trackerTools } from '../tracker.js';
// Decisions — Kai on Hanzo /v1/decisions (choice, score, noul)
import { kaiTools } from '../kai.js';
import { kaiTools, kaiAgentTools } from '../kai.js';
// The user's browser through the Hanzo extension, over the ZAP router
import { browserTool, cdpTool } from '../browser.js';
// Package runners and JSON, as python-sdk's shell tools