{"_id":"@anchor-app/types","name":"@anchor-app/types","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@anchor-app/types","version":"0.1.0","description":"Shared types and Zod schemas for Anchor — the neurodivergent-friendly daily planner","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","dev":"tsc --watch","prepublishOnly":"npm run build"},"keywords":["anchor","anchor-app","types","zod","tasks","habits","productivity"],"author":{"name":"Kirby Walls"},"license":"MIT","homepage":"https://github.com/kjswalls/v0-anchor","repository":{"type":"git","url":"git+https://github.com/kjswalls/v0-anchor.git","directory":"packages/types"},"dependencies":{"zod":"^3.23.0"},"devDependencies":{"typescript":"^5.4.0"},"_id":"@anchor-app/types@0.1.0","gitHead":"d4b87bf071b8ff5282eb1df49d398669b40dd1c7","bugs":{"url":"https://github.com/kjswalls/v0-anchor/issues"},"_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-nTIMy3wwJDKuXm1X3TM+bueDwomkPXUzKORveW/SatwSZ5XqbmJKj7ajdGM9nrJy4SHuHye2tCLAbT+jTfebRg==","shasum":"cc201a4c637a04d58d921413c6d50159334ef202","tarball":"https://registry.npmjs.org/@anchor-app/types/-/types-0.1.0.tgz","fileCount":10,"unpackedSize":31105,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIESE0blbVz9sJk2TIhPpu9YOVgU/sYG9EXExlqE5JcTsAiEApsERHgxh5mgkuo0DWncaJz69btIdmjEM3V4XtH0Stj8="}]},"_npmUser":{"name":"kjswalls","email":"kjswalls@gmail.com"},"directories":{},"maintainers":[{"name":"kjswalls","email":"kjswalls@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/types_0.1.0_1774480918110_0.16711343824182845"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-25T23:21:58.001Z","0.1.0":"2026-03-25T23:21:58.273Z","modified":"2026-03-25T23:21:58.534Z"},"maintainers":[{"name":"kjswalls","email":"kjswalls@gmail.com"}],"description":"Shared types and Zod schemas for Anchor — the neurodivergent-friendly daily planner","homepage":"https://github.com/kjswalls/v0-anchor","keywords":["anchor","anchor-app","types","zod","tasks","habits","productivity"],"repository":{"type":"git","url":"git+https://github.com/kjswalls/v0-anchor.git","directory":"packages/types"},"author":{"name":"Kirby Walls"},"bugs":{"url":"https://github.com/kjswalls/v0-anchor/issues"},"license":"MIT","readme":"# @anchor-app/types\n\nShared Zod schemas and TypeScript types for [Anchor](https://github.com/kjswalls/v0-anchor).\n\nUsed by:\n- The Anchor Next.js app (`lib/planner-types.ts` imports from here)\n- The `@anchor-app/openclaw-context` plugin (validates API responses at runtime)\n\n## Install\n\n```bash\nnpm install @anchor-app/types\n```\n\n## Usage\n\n```ts\nimport { TaskSchema, type Task, AnchorContextResponseSchema } from '@anchor-app/types'\n\n// Runtime validation — Zod parses and validates the shape\nconst result = AnchorContextResponseSchema.safeParse(apiResponse)\nif (!result.success) {\n  console.error('Anchor API response changed:', result.error)\n} else {\n  const { tasks, habits } = result.data  // fully typed ✅\n}\n\n// Types only — compile-time, no runtime cost\nfunction doSomething(task: Task) { ... }\n```\n\n## Why Zod?\n\nTypeScript types disappear at runtime. If Anchor's API schema changes and the plugin isn't updated, you'd get silent data corruption. Zod validates the actual JSON shape at runtime and tells you exactly what changed — so schema drift is caught immediately instead of causing subtle bugs downstream.\n","readmeFilename":"README.md","_rev":"1-4d3ebe948ef28ff019f20657ef53af83"}