Skip to content

fix(tools): enforce JSON Schema Draft 2020-12 on agent tool arguments - #22

Merged
1998x-stack merged 4 commits into
mainfrom
fix/phase4-draft202012-validation
Oct 28, 2026
Merged

1998x-stack merged 4 commits into
mainfrom
fix/phase4-draft202012-validation

Conversation

@1998x-stack

Copy link
Copy Markdown
Owner

Phase 4 Tool Factory validation.

  • Replace top-level-only manual checks with standard Draft 2020-12 validator, supporting nested objects/arrays, required/additionalProperties, numeric bounds, combinators, internal $defs and supported formats.
  • Validate schema correctness when a ToolDef is registered; reject top-level non-object schemas and external $ref/$dynamicRef targets to avoid untrusted network schema retrieval.
  • Reject non-object arguments even under legacy empty {} schemas.
  • Revalidate after HITL approves modified arguments; no invalid payload reaches a handler.
  • Add jsonschema>=4.23,<5 dependency, broad contract tests and adjust one historical permissive test.

This is structural input validation, not an OS sandbox or a substitute for an explicit filesystem path contract.

@1998x-stack
1998x-stack merged commit 7d56d79 into main Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant