Harness spec 1.2.0: the library's tools fit both projects; the CLI implements it
The CLI's facts in memory, notes_search, note_manage, skills_list, skill_view and skill_manage are `variables` now, filled with the CLI's own values (src/tool/spec-vars.ts): every description and parameter list the CLI sends is word for word what 1.1.0 said, except note and document ids, which are strings on both sides (a number is still taken). Descriptions are filled by the prompt texts' rules, parameter descriptions too. `narrow` says what a project offers of a shared tool's parameters. Memory's changes are one pure function (applyOps). Conformance: fill, narrow, memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
23 files changed
+1398
-88
No files matched your search
+8
-1
@@ -371,7 +371,14 @@ export function createApp(o: AppOptions): App {
|
||||
background: " For a server, a watcher or anything long, set `background: true`: it returns at once with a job id; read its output with bash_output, list jobs with bash_list, stop one with bash_kill.",
|
||||
},
|
||||
}
|
||||
const tools: Tool[] = offered.map((t) => (TOOL_SPECS[t.name]?.variables ? { ...t, description: fillDescription(t.description, vars[t.name] ?? {}) } : t))
|
||||
// A tool whose values are its own (the library's, set where it is defined) is filled already;
|
||||
// any other with variables is filled here, and one with none given fails rather than reach the
|
||||
// model with a literal `{{name}}`.
|
||||
const tools: Tool[] = offered.map((t) => {
|
||||
if (!TOOL_SPECS[t.name]?.variables || (t.vars && !vars[t.name])) return t
|
||||
const v = vars[t.name] ?? {}
|
||||
return { ...t, description: fillDescription(t.description, v), vars: { ...t.vars, ...v } }
|
||||
})
|
||||
const spawn: NonNullable<EngineOptions["spawn"]> = async (name, prompt, signal, callId, opts = {}) => {
|
||||
const spec = agentList.find((a) => a.name === name)
|
||||
if (!spec) throw new ToolError(`There is no agent "${name}". The agents are: ${agentList.map((a) => a.name).join(", ")}.`)
|
||||
|
||||
Reference in new issue
Block a user