agy-cli 0.1.28: tool schemas with $ref/allOf/oneOf reach the model with their fields (#1042)

Tool schemas that use $ref, allOf or oneOf now reach the model with all their fields (expandToolSchema).

Nullable unions are lowered to type:[X,"null"]. Inlining is capped by depth (counted only along $ref and allOf), by 8192 nodes and by 256 KiB. A tool with no schema gets a plain object. The ToolSearch fallback was dropped.

Run at 80d19737 merged with main 16e753e8: `bun test packages/agy-cli` 16 pass, check ok.

Broken by hand: lowering a nullable union to a single type makes 1 test fail, and removing the byte cap makes 1 test fail.

Not tried: a real agy turn with these schemas.

Co-authored-by: tungloong <tungloong@users.noreply.github.com>
This commit is contained in:
tungloong
2026-11-13 00:23:26 +08:00
committed by GitHub
co-authored by tungloong
parent b195b4f5a9
commit a2e601dc21
7 changed files with 1411 additions and 4 deletions
+1
View File
@@ -21,6 +21,7 @@ for (const [name, mocks] of [
["usage.mjs", true],
["catalog.mjs", false],
["step-usage.mjs", false],
["tool-schema.mjs", false],
["usage-settlement.mjs", false],
["repeat-batch.mjs", false],
["conversation-key.mjs", false],