mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-24 06:33:01 -04:00
58a27e7555
Plugins load their own copy of effect, so their live Effect schemas cannot be interpreted by the host instance: parser sentinels and AST class identity are per-instance, making checks false-fail on valid input (bogus minLength errors) and branded IDs die as defects surfaced as bare 'Tool execution failed'. Plugin.define now converts tool input/output schemas to detached Standard Schema wrappers at the draft.add boundary, so validation and JSON Schema generation run as closures bound to the instance that created the schema. The core tool runtime detects still-foreign live schemas from older plugin packages and skips validation with a warning instead of misvalidating, and standard-schema validation errors now include the issue path.