feat(config): add Zod schema validation and JSON Schema generation

- Add Zod schema for oh-my-opencode.json configuration validation
- Generate JSON Schema at build time for IDE autocompletion
- Add safeParse validation with error reporting on config load
- Export OhMyOpenCodeConfigSchema for programmatic usage
- Add build:schema script and ./schema.json export
- Update README with $schema usage documentation
This commit is contained in:
YeonGyu-Kim
2025-12-05 02:53:44 +09:00
parent 8e5064c547
commit b5274fcb63
3 changed files with 100 additions and 0 deletions

15
src/config/index.ts Normal file
View File

@@ -0,0 +1,15 @@
export {
OhMyOpenCodeConfigSchema,
AgentOverrideConfigSchema,
AgentOverridesSchema,
McpNameSchema,
AgentNameSchema,
} from "./schema"
export type {
OhMyOpenCodeConfig,
AgentOverrideConfig,
AgentOverrides,
McpName,
AgentName,
} from "./schema"