Tags: BrainerVirus/opencode-commandcode
Tags
feat: zod validation, explicit load results, V2 wire modelID fix (#140) * feat: zod validation, explicit load results, V2 wire modelID fix - Add src/schemas.ts (ModelEntry/Manifest/availability/plugin config) as the single source of truth; catalog/manifest types derive via z.infer. - Add explicit LoadResult boundaries (src/load-result.ts) and a hermetic EnvDeps seam (src/env.ts); degraded reasons carry the real cause. - Parse bundled models.json entry-by-entry, dropping invalid entries with reasons instead of failing the whole catalog. - V2 modelID is the full catalog wire id; the UI/map key stays the toConfigKey short name. * fix: use @ai-sdk/openai-compatible as V1 provider npm default V1 resolves provider npm through BunProc.install and calls the first create* export, so the plugin package itself can never be the SDK npm field. Default provider.commandcode to @ai-sdk/openai-compatible and add the Provider API baseURL unless a custom npm/baseURL is already configured. Aligns the sync:global helper and README transport section with the same defaults. * chore(deps): refresh and hard-pin dependencies Refresh devDependencies (ai 7.0.114, oxlint 1.85.0, oxfmt 0.70.0, typescript 6.0.3) and remove the last caret ranges so the lockfile is fully exact. chore commits are path-gated out of releases. * docs: rewrite README flow and prune docs to specs README now leads with how the pipeline works (extract/filter, cost merge, artifacts, V1+V2 injection, fallbacks) and the shipped plugin config file. Plans and task notes are removed; docs/specs describe what ships, including the new catalog-freshness spec. AGENTS.md gains the docs rule and the validation/runtime-weight boundaries.
PreviousNext