agy-cli 0.1.15: an array tool schema whose items live only on a sibling gets an items schema Gemini accepts (klarkxy #963)
Gemini refuses an array schema with no `items`. array-items.mjs infers the items from the schema around it, or adds a permissive items schema 8 levels deep, without narrowing what the client allowed; tuple `items` lists are left as they are, with a hint. Closes #962. Reviewed head c7d3e7b8 (onc27ba5f7), landed onto main738fd501with the version moved to 0.1.15 and package.json `files` keeping both re2-pattern.mjs (#946) and array-items.mjs. Run at the reviewed head: WSL2 bun test packages/agy-cli 9 of 9, check.mjs ok; Windows 8 pass, 1 fail, the same smoke red as main (#973). Broken by hand: without the ensureGeminiArrayItems call in normalizeTools smoke.mjs reports 2 failures; PERMISSIVE_ARRAY_DEPTH = 1 and removing `if (openArray) return null` each turn a test red. Run at this commit (WSL2 Ubuntu 24.04, Bun 1.4.2, temp HOME): bun test packages/agy-cli 10 of 10 pass; bun scripts/check.mjs agy-cli ok; npm pack --dry-run lists 14 files, both new modules among them. Not tried: macOS (mote refused ssh), a real agy. Closes #963 Co-authored-by: klarkxy <klarkxy@users.noreply.github.com>
This commit is contained in:
@@ -42,3 +42,9 @@ test("test/smoke.mjs against a fake agy", () => {
|
||||
expect(output).toMatch(/ALL OK \(\d+ checks\)/)
|
||||
expect(code).toBe(0)
|
||||
}, 250_000)
|
||||
|
||||
test("test/array-items-unit.mjs", () => {
|
||||
const { code, output } = run([path.join(dir, "array-items-unit.mjs")], 60_000)
|
||||
expect(output).toMatch(/ALL OK/)
|
||||
expect(code).toBe(0)
|
||||
}, 70_000)
|
||||
|
||||
Reference in New Issue
Block a user