File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646 "scripts" : {
4747 "postinstall" : " node scripts/check-old-cli.mjs" ,
4848 "build" : " npm run build:lib && npm run build:cli && npm run build:assets" ,
49+ "build:schema" : " node scripts/generate-schema.mjs && prettier --write schemas/" ,
4950 "build:lib" : " tsc -p tsconfig.build.json" ,
5051 "build:cli" : " node esbuild.config.mjs" ,
5152 "build:assets" : " node scripts/copy-assets.mjs" ,
Original file line number Diff line number Diff line change 1+ # JSON Schema
2+
3+ This directory contains the JSON Schema for ` agentcore.json ` , generated from the Zod schemas in ` src/schema/ ` .
4+
5+ ## Updating the schema
6+
7+ ``` bash
8+ npm run build:lib
9+ npm run build:schema
10+ ```
11+
12+ This regenerates ` schemas/schema.v1.json ` from the compiled Zod schemas. Commit the updated file.
13+
14+ ## Versioning
15+
16+ - ` schema.v1.json ` — backwards-compatible updates only (new optional fields)
17+ - Create ` schema.v2.json ` only for breaking changes (removed/renamed fields)
18+
19+ ### Creating a new major version
20+
21+ 1 . Update ` SCHEMA_VERSION ` in ` scripts/generate-schema.mjs `
22+ 2 . Run ` npm run build:lib && npm run build:schema `
23+ 3 . Commit the new schema file — keep the old version for existing projects
You can’t perform that action at this time.
0 commit comments