cloudaxe-opencode/packages/opencode
Kit Langton d6abb56f58 test(tool): pin every tool's parameters schema before migration
Pre-migration safety net for the upcoming tool-by-tool zod\u2192Schema
conversion. Every tool's parameters schema now has:

1. A JSON Schema snapshot (`z.toJSONSchema` with `io: "input"`) \u2014 this
   captures exactly what the LLM sees at tool registration time, so any
   drift caused by a future migration fails the snapshot.
2. Parse-accept/parse-reject assertions per tool pinning the
   user-visible behavioural contract (required fields, refinement
   bounds, enum membership, default values).

To make the snapshots possible without standing up each tool's full
Effect runtime, every tool file now exports its parameters schema as
`Parameters` at module scope:

- 9 tools already had a module-level const \u2014 just added `export`, and
  standardised the name to `Parameters` (uppercase) where it was
  previously `parameters`.
- 9 tools had their schema inline inside `Tool.define` \u2014 hoisted to
  module scope under the same `Parameters` name and wired back through.

Zero behaviour change: Tool.define still sees the same schema, runtime
validation path is identical, SDK (types.gen.ts + openapi.json) is
byte-identical, and the full 2054-test suite passes.

18 JSON Schema snapshots and 43 explicit parse/reject assertions for the
18 built-in tools (apply_patch, bash, codesearch, edit, glob, grep,
invalid, lsp, multiedit, plan, question, read, skill, task, todo,
webfetch, websearch, write).
2026-04-18 00:01:50 -04:00
..
bin cache platform binary in postinstall for faster startup (#14467) 2026-02-20 12:19:17 -06:00
migration chore: generate 2026-04-13 18:02:12 +00:00
script fix: stop rewriting dev during release publish (#22982) 2026-04-18 02:53:19 +00:00
specs docs(effect): refresh migration status specs (#23206) 2026-04-18 00:29:26 +00:00
src test(tool): pin every tool's parameters schema before migration 2026-04-18 00:01:50 -04:00
test test(tool): pin every tool's parameters schema before migration 2026-04-18 00:01:50 -04:00
.gitignore CLI perf: reduce deps (#22652) 2026-04-16 02:03:03 -04:00
AGENTS.md chore: retire namespace migration tooling + document module shape (#23010) 2026-04-17 02:48:40 +00:00
BUN_SHELL_MIGRATION_PLAN.md sync 2026-02-25 01:48:10 -05:00
bunfig.toml tui plugins (#19347) 2026-03-27 15:00:26 +01:00
Dockerfile
drizzle.config.ts sqlite again (#10597) 2026-02-14 04:19:02 +00:00
git feat: interactive update flow for non-patch releases (#18662) 2026-03-22 23:12:40 +00:00
package.json release: v1.4.11 2026-04-18 00:29:16 +00:00
parsers-config.ts feat(tui): add syntax highlighting for kotlin, hcl, lua, toml (#18198) 2026-03-23 16:15:24 +01:00
README.md
sst-env.d.ts zen: update sst version 2026-02-18 13:54:23 -05:00
tsconfig.json CLI perf: reduce deps (#22652) 2026-04-16 02:03:03 -04:00

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.