mirror of
https://github.com/hanzoai/mcp.git
synced 2026-10-15 12:30:12 +00:00
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:
@@ -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}`];
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user