mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
hanzo-kai linked hanzoai/decision's control and program crates by git. That repository is private: the public build, CI, and every cargo install of dev failed to fetch it. Kai is now a client of POST /v1/decisions at api.hanzo.ai, signed with the Hanzo credential Dev already sends; nothing of hanzoai/decision is linked, .cargo/config.toml goes, and Cargo.lock loses 89 packages and every private source. The programs Dev asks (tools.select, router.model, reasoning.budget, context.select, agent.command-risk, agent.progress, agent.complete, and the fix flow's fix.pick and fix.next) ship in crates/hanzo-kai/programs as typed questions with their thresholds, verdict rules and calibration pins. The gate that reads the answers is Dev's own: a noul holds at its threshold, a choice or score is accepted at its certainty, a verdict rule joins the policy on allow < ask < deny only when enforced, and an answer under another calibration runs in shadow. When Kai does not answer (refused, timed out, 401, 404, 5xx, or no state of the decision answered) the decision fails at once and Kai is down for 60 s: no request is made in that window, the loop does exactly what it does without Kai, one line goes to the log and no trace line is written. Only a decision asked after the failure brings Kai back. A decision's states are asked in parallel; tier and budget together. The tool shortlist is decided again when the tools on offer change, since an MCP server that finishes starting mid-turn adds its tools. dev flow is now dev flow fix, a fixed pipeline rather than a Decision Program run by the private executor: retrieval, Kai's pick, Zen's diff, the tests, Kai's next. --control rule, or Kai not answering, leaves the tests and the budget to decide, and the report says so once. An attempt whose patch no longer reverses ends the flow instead of retrying over it. Tests serve the Decisions API and chat completions from wiremock: Kai on (tools shortlisted, tier and effort hinted, verdict tightened, one trace line per decision with its distributions), Kai answering 404, Kai unreachable, Kai answering with a page that is not the API, tools arriving mid-turn, and an answer under another calibration. Claude-Session: https://claude.ai/code/session_018Gt5TvrE2rxXuZikWSauv3
26 lines
767 B
JSON
26 lines
767 B
JSON
{
|
|
"id": "agent.progress@1",
|
|
"description": "Mid-task: is the agent getting closer to the goal, and should it stop to ask?",
|
|
"calibration": "cal_6dbb072f8109a222",
|
|
"questions": {
|
|
"status": {
|
|
"type": "choice",
|
|
"instructions": "How is the agent doing on the task so far?",
|
|
"criteria": {
|
|
"advancing": "each step moves closer to the goal",
|
|
"stalled": "recent steps changed nothing",
|
|
"looping": "repeating the same actions or errors",
|
|
"blocked": "cannot continue without something outside the agent's control"
|
|
}
|
|
},
|
|
"needs_user": {
|
|
"type": "noul",
|
|
"instructions": "Should the agent stop and ask the user now?"
|
|
}
|
|
},
|
|
"thresholds": {
|
|
"status": 0.5,
|
|
"needs_user": 0.5
|
|
}
|
|
}
|