{"_id":"@atarashi/schema","name":"@atarashi/schema","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@atarashi/schema","version":"1.0.0","description":"Zod schemas and types for the Atarashi project spec, blueprint manifests and registry index.","type":"module","license":"MIT","author":"Gautam Suthar <iamgautamsuthar@gmail.com> (https://www.github.com/callmegautam)","repository":{"type":"git","url":"git+https://github.com/callmegautam/atarashi.git","directory":"packages/schema"},"homepage":"https://github.com/callmegautam/atarashi/tree/main/packages/schema#readme","bugs":{"url":"https://github.com/callmegautam/atarashi/issues"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json","./schemas/*":"./schemas/*"},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=20.11"},"dependencies":{"zod":"^3.25.76"},"publishConfig":{"access":"public"},"devDependencies":{"zod-to-json-schema":"^3.24.6"},"scripts":{"build":"tsup && node --experimental-strip-types scripts/emit-json-schema.mts","typecheck":"tsc --noEmit -p tsconfig.json","test":"vitest run --coverage","clean":"rm -rf dist .turbo"},"_nodeVersion":"26.2.0","_id":"@atarashi/schema@1.0.0","dist":{"integrity":"sha512-NcKqRjDbpT29W+ewr50RjqiRFrGh7vj2xrnAemBesq2epoGBM22eRoZy0XhxuJkPso8Wzgq8Sj8Vp8io7dMn0Q==","shasum":"10995f59c233296ffcf11b9df1237a56f6b079c1","tarball":"https://registry.npmjs.org/@atarashi/schema/-/schema-1.0.0.tgz","fileCount":12,"unpackedSize":278290,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA2OPXrG8igA5dvAcJ+eIPvCLltxB1Mtpk5ayt5hfElvAiEAgu4+HIrThPVxliDGLPcAFncms7WcxApG2YoO1PIRs7E="}]},"_npmUser":{"name":"iamgautamsuthar","email":"iamgautamsuthar@gmail.com"},"directories":{},"maintainers":[{"name":"iamgautamsuthar","email":"iamgautamsuthar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/schema_1.0.0_1789054557269_0.24867092998947493"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-10T15:35:57.044Z","1.0.0":"2026-09-10T15:35:57.414Z","modified":"2026-09-10T15:35:57.767Z"},"maintainers":[{"name":"iamgautamsuthar","email":"iamgautamsuthar@gmail.com"}],"description":"Zod schemas and types for the Atarashi project spec, blueprint manifests and registry index.","homepage":"https://github.com/callmegautam/atarashi/tree/main/packages/schema#readme","repository":{"type":"git","url":"git+https://github.com/callmegautam/atarashi.git","directory":"packages/schema"},"author":"Gautam Suthar <iamgautamsuthar@gmail.com> (https://www.github.com/callmegautam)","bugs":{"url":"https://github.com/callmegautam/atarashi/issues"},"license":"MIT","readme":"# @atarashi/schema\n\nZod schemas and inferred types for everything that crosses an Atarashi boundary:\nthe `ProjectSpec` a CLI or web builder produces, the blueprint and preset\nmanifests authors write, the registry index, and the `atarashi.json` recorded in\na generated project.\n\nThis package is the shared contract between the CLI and the web builder. It has\nexactly one runtime dependency (`zod`) and no I/O.\n\n```ts\nimport { parseBlueprintManifest, parseProjectSpec } from '@atarashi/schema';\n\nconst result = parseProjectSpec(JSON.parse(raw));\nif (!result.ok) {\n    for (const d of result.error.diagnostics) console.error(d.message);\n}\n```\n\n## What you get\n\n| Export | Purpose |\n|---|---|\n| `parseProjectSpec` / `parseProjectConfig` | Validate a spec or an `atarashi.json`, version-guarded first |\n| `parseBlueprintManifest` / `parsePresetManifest` / `parseManifest` | Validate authored manifests |\n| `parseRegistryIndex` / `parseUserConfig` | Validate registry and user configuration |\n| `Result`, `AtarashiError`, `ok`, `fail` | The no-throw result type core returns |\n| `Diagnostic`, `DIAGNOSTIC_CODES`, `Conflict` | Structured, machine-readable problems |\n| `GenerationPlan`, `PlannedFile`, `PostAction` | The engine's output types |\n\nVersion guards run **before** schema validation, so a manifest from a newer\nAtarashi produces \"upgrade atarashi\" rather than a wall of unknown-key errors.\n\n## JSON Schema\n\n`pnpm build` emits JSON Schema into `schemas/` for editor autocomplete in\n`blueprint.json` and `atarashi.json`:\n\n```json\n{ \"$schema\": \"https://unpkg.com/@atarashi/schema/schemas/blueprint.schema.json\" }\n```\n","readmeFilename":"","_rev":"1-1c35262e57a59c66efd49192658ae64f"}