cloudaxe-opencode/packages/opencode/test
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
..
account refactor: eliminate account/ barrel, route consumers to sibling files (#22995) 2026-04-17 01:55:50 +00:00
acp fix: clean up final 16 no-unused-vars warnings (#22751) 2026-04-16 03:54:21 +00:00
agent feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
auth refactor(auth): remove async auth facade exports (#22306) 2026-04-13 12:31:43 -04:00
bus refactor(auth): remove async auth facade exports (#22306) 2026-04-13 12:31:43 -04:00
cli refactor: consolidate npm exports and trace flock acquisition (#23151) 2026-04-17 18:58:37 +00:00
config feat(effect-zod): translate Schema.check filters into zod .superRefine + promote LSP refinement to Effect layer (#23173) 2026-04-17 20:46:05 +00:00
control-plane feat(core): expose workspace adaptors to plugins (#21927) 2026-04-13 13:33:13 -04:00
effect fix: clean up final 16 no-unused-vars warnings (#22751) 2026-04-16 03:54:21 +00:00
fake feat: unwrap Provider namespace + improved automation script (#22690) 2026-04-15 21:44:46 -04:00
file chore: delete filetime module (#22999) 2026-04-16 23:31:21 -05:00
filesystem shared package (#22626) 2026-04-15 14:26:20 +00:00
fixture CLI perf: reduce deps (#22652) 2026-04-16 02:03:03 -04:00
format chore: generate 2026-04-17 02:34:07 +00:00
git feat: restore git-backed review modes (#20845) 2026-04-03 09:54:57 -05:00
ide fix(test): replace structuredClone with spread for process.env (#14908) 2026-02-24 23:16:24 +10:00
installation refactor(effect): upgrade opencode to beta.46 context APIs (#21977) 2026-04-10 23:06:28 -04:00
lib fix: delete 9 dead functions with zero callers (#22697) 2026-04-16 02:01:02 +00:00
lsp refactor: remove ambient instance reads from lsp (#23023) 2026-04-17 21:47:59 -04:00
mcp fix: clean up final 16 no-unused-vars warnings (#22751) 2026-04-16 03:54:21 +00:00
memory feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741) 2026-04-15 23:27:32 -04:00
patch
permission feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741) 2026-04-15 23:27:32 -04:00
plugin refactor: consolidate npm exports and trace flock acquisition (#23151) 2026-04-17 18:58:37 +00:00
project feat: unwrap storage namespaces to flat exports + barrel (#22747) 2026-04-15 23:30:49 -04:00
provider fix(opencode): normalize provider metadata and tag otel runs (#23140) 2026-04-17 15:22:08 -04:00
pty refactor(pty): remove async facade exports (#22305) 2026-04-13 11:47:05 -04:00
question add experimental question HttpApi slice (#22357) 2026-04-14 19:43:49 +00:00
server refactor(server): align route-span attrs with OTel semantic conventions (#23198) 2026-04-18 00:29:26 +00:00
session refactor(v2): tag session unions and exhaustively match events (#23201) 2026-04-18 00:29:26 +00:00
share refactor: eliminate account/ barrel, route consumers to sibling files (#22995) 2026-04-17 01:55:50 +00:00
shell feat: unwrap 11 util namespaces to flat exports + barrel (#22739) 2026-04-15 23:15:58 -04:00
skill feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741) 2026-04-15 23:27:32 -04:00
snapshot feat: unwrap 11 util namespaces to flat exports + barrel (#22739) 2026-04-15 23:15:58 -04:00
storage CLI perf: reduce deps (#22652) 2026-04-16 02:03:03 -04:00
sync refactor: convert Flag namespace to const object with getters (#22984) 2026-04-17 01:57:21 +00:00
tool test(tool): pin every tool's parameters schema before migration 2026-04-18 00:01:50 -04:00
util chore: generate 2026-04-18 02:03:30 +00:00
workspace fix(core): add historical sync on workspace connect (#23121) 2026-04-17 13:30:09 -04:00
AGENTS.md refactor(file): destroy FileTime facade (#22090) 2026-04-11 20:08:55 -04:00
keybind.test.ts feat: unwrap 11 util namespaces to flat exports + barrel (#22739) 2026-04-15 23:15:58 -04:00
npm.test.ts fix(plugin): parse package specifiers with npm-package-arg and sanitize win32 cache paths (#21135) 2026-04-06 00:26:40 +00:00
permission-task.test.ts feat: unwrap Config namespace to flat exports + barrel (#22689) 2026-04-15 21:26:24 -04:00
preload.ts feat: add LLM Gateway provider (#7847) 2026-04-17 10:29:31 -05:00