{"_id":"@civicwitness/spec","_rev":"2-f31677c2bd4858950a7ac55d6f170f02","name":"@civicwitness/spec","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@civicwitness/spec","version":"0.1.0","license":"Apache-2.0","_id":"@civicwitness/spec@0.1.0","maintainers":[{"name":"ceii","email":"basicalex8@gmail.com"}],"homepage":"https://civicwitness.com","bugs":{"url":"https://github.com/civicwitness/civic-witness-spec/issues"},"dist":{"shasum":"43fb244823aba952599ccec7cf085cce0d29e91e","tarball":"https://registry.npmjs.org/@civicwitness/spec/-/spec-0.1.0.tgz","fileCount":11,"integrity":"sha512-n3WGtwfbYzR/GGh9JcHiS6fHx4njV1GMH3T9LZASqsP3zcQECKo4feJ0674VbkX2zoN7ILp2dcvCTkwlM0ne6w==","signatures":[{"sig":"MEUCIGyegWYVeLOEtnQv0GZvkRvk2hC2tQ5UzjDaQT9i4+LZAiEA9JMgLtqEcEzBRiyTV0TrFKWZlUKGng2ucb/AAuILHbE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35909},"main":"./src/index.ts","type":"module","types":"./src/index.ts","engines":{"bun":">=1.3.0"},"exports":{".":"./src/index.ts","./schemas/incident-record":"./schemas/incident-record/v0/schema.json","./schemas/jurisdiction-pack":"./schemas/jurisdiction-pack/v0/schema.json"},"gitHead":"a7e88eb6977f8edae66881051da2e170bbb9faf9","scripts":{"generate":"bun run scripts/generate-types.ts","validate":"bun run scripts/validate-examples.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"ceii","email":"basicalex8@gmail.com"},"repository":{"url":"git+https://github.com/civicwitness/civic-witness-spec.git","type":"git"},"_npmVersion":"12.0.2","description":"Civic Witness protocol schemas: Jurisdiction Pack and Incident Record (JSON Schema 2020-12) with generated TypeScript types.","directories":{},"_nodeVersion":"26.7.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^8.17.1","@types/bun":"^1.3.1","typescript":"^5.7.3","ajv-formats":"^3.0.1","json-schema-to-typescript":"^15.0.4"},"_npmOperationalInternal":{"tmp":"tmp/spec_0.1.0_1787672734467_0.4783297237007951","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@civicwitness/spec","version":"0.1.1","description":"Civic Witness protocol schemas: Jurisdiction Pack and Incident Record (JSON Schema 2020-12) with generated TypeScript types.","license":"Apache-2.0","type":"module","main":"./src/index.ts","types":"./src/index.ts","exports":{".":"./src/index.ts","./schemas/jurisdiction-pack":"./schemas/jurisdiction-pack/v0/schema.json","./schemas/incident-record":"./schemas/incident-record/v0/schema.json"},"scripts":{"validate":"bun run scripts/validate-examples.ts","generate":"bun run scripts/generate-types.ts","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"git+https://github.com/civicwitness/civic-witness-spec.git"},"homepage":"https://civicwitness.com","engines":{"bun":">=1.3.0"},"publishConfig":{"access":"public"},"dependencies":{"ajv":"^8.17.1","ajv-formats":"^3.0.1"},"devDependencies":{"@types/bun":"^1.3.1","json-schema-to-typescript":"^15.0.4","typescript":"^5.7.3"},"gitHead":"a7e88eb6977f8edae66881051da2e170bbb9faf9","_id":"@civicwitness/spec@0.1.1","bugs":{"url":"https://github.com/civicwitness/civic-witness-spec/issues"},"_nodeVersion":"26.7.0","_npmVersion":"12.0.2","dist":{"integrity":"sha512-LyAoxKlTSc/0P3ZyMQn0rpU6d3qffOb2Ab5DHYppQqQZNHMXNpn+EZewhblOA9fXjneTqej4MI8fzPr0WNIYrw==","shasum":"3493a68a01c1aa9b89433109b0486999b621e5f4","tarball":"https://registry.npmjs.org/@civicwitness/spec/-/spec-0.1.1.tgz","fileCount":11,"unpackedSize":35933,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD20TGlsGs+vIA33hLpvI5yKCribb57QR06OniM/I461wIgYNMjjUIwXedH1BPGy80emZT3mflMa8zoRvMlO6/1Ek4="}]},"_npmUser":{"name":"ceii","email":"basicalex8@gmail.com"},"directories":{},"maintainers":[{"name":"ceii","email":"basicalex8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/spec_0.1.1_1787673099422_0.6117506958636727"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-25T15:45:34.325Z","modified":"2026-08-25T15:51:39.733Z","0.1.0":"2026-08-25T15:45:34.604Z","0.1.1":"2026-08-25T15:51:39.554Z"},"bugs":{"url":"https://github.com/civicwitness/civic-witness-spec/issues"},"license":"Apache-2.0","homepage":"https://civicwitness.com","repository":{"type":"git","url":"git+https://github.com/civicwitness/civic-witness-spec.git"},"description":"Civic Witness protocol schemas: Jurisdiction Pack and Incident Record (JSON Schema 2020-12) with generated TypeScript types.","maintainers":[{"name":"ceii","email":"basicalex8@gmail.com"}],"readme":"# Civic Witness Spec\n\n`@civicwitness/spec` publishes the JSON Schema contracts shared by Civic Witness tools and clients. The schemas use JSON Schema draft 2020-12 and define portable, locally validated protocol data; they do not provide legal advice.\n\n## Schemas\n\n- **Jurisdiction Pack**: citation-backed, state-level public-authority encounter guidance. A pack identifies its jurisdiction and content version, includes a required informational disclaimer, categorized topics with citations, recording-consent rules, and optional complaint-process information.\n- **Incident Record**: a structured account of one encounter. It supports a narrative, extracted assertions, grounding to jurisdiction-pack topics and citations, assistant interventions, local-save evidence-chain metadata, and a machine-checkable retention declaration. In v0, media references and escalation events must be empty and server persistence is always false.\n\n## Install\n\n```sh\nbun add @civicwitness/spec\n```\n\nImport the runtime schemas and generated types from the package entry point:\n\n```ts\nimport {\n  makeValidator,\n  jurisdictionPackSchema,\n  type JurisdictionPack,\n} from \"@civicwitness/spec\";\n\nconst { validateJurisdictionPack } = makeValidator();\nconst valid = validateJurisdictionPack(pack);\n```\n\nSchema JSON files are also exported directly:\n\n```ts\nimport jurisdictionPackSchema from \"@civicwitness/spec/schemas/jurisdiction-pack\" with { type: \"json\" };\nimport incidentRecordSchema from \"@civicwitness/spec/schemas/incident-record\" with { type: \"json\" };\n```\n\n## Development\n\n```sh\nbun install\nbun run generate\nbun run validate\nbunx tsc --noEmit\n```\n\nGenerated declaration files in `src/generated/` are committed. Regenerate them after an approved schema change.\n\n## Versioning\n\nEach schema has its own versioned directory under `schemas/<name>/`.\n\n- Breaking changes create a new major-version directory.\n- Additive changes increment the minor version.\n- Documentation-only changes increment the patch version.\n\n## License\n\nApache-2.0. See [LICENSE](LICENSE).\n","readmeFilename":"README.md"}