{"_id":"@axsept/event-schema","name":"@axsept/event-schema","dist-tags":{"latest":"1.0.0-beta.0"},"versions":{"1.0.0-beta.0":{"name":"@axsept/event-schema","version":"1.0.0-beta.0","description":"Open-standard JSON Schema for the HumanAIEvent wire format used by SkillChain-compatible integration wrappers.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./schema/HumanAIEvent.v1.json":"./schema/HumanAIEvent.v1.json"},"scripts":{"build":"tsc","test":"vitest run","prepack":"npm run build"},"keywords":["skillchain","skills","ai","attribution","json-schema","integration-protocol"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/skillchain/integration-protocol.git","directory":"packages/event-schema"},"homepage":"https://protocol.skillchain.tech","publishConfig":{"access":"public"},"devDependencies":{"ajv":"^8.17.1","ajv-formats":"^3.0.1","typescript":"^5.6.3","vitest":"^2.1.4"},"gitHead":"3c28628b061b5eee8a265568a173d3a5c29d9d13","_id":"@axsept/event-schema@1.0.0-beta.0","bugs":{"url":"https://github.com/skillchain/integration-protocol/issues"},"_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-iV/B2FFS99ceNaEXXz65NKLogdc5w+bJDrzw9CHhl62qDavvKRGaBGrPLmONEqoj0YjLtwsSih6W4/yFZWqGug==","shasum":"4fbb852192d2f30239ee7917f9a71ea4e7a1aacc","tarball":"https://registry.npmjs.org/@axsept/event-schema/-/event-schema-1.0.0-beta.0.tgz","fileCount":7,"unpackedSize":27783,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE6Pvq0FqNGt7TQiFVUF3hbLM4VHys15dl27nxjgL4vrAiEAoqeMrQJxa+642dUS5tT9RGsiO+0Uaw3WTHHKriR3u0Q="}]},"_npmUser":{"name":"lcucos","email":"lcucos@axsept.com"},"directories":{},"maintainers":[{"name":"lcucos","email":"lcucos@axsept.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/event-schema_1.0.0-beta.0_1782356663707_0.4482677839528304"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-25T03:04:23.524Z","1.0.0-beta.0":"2026-06-25T03:04:23.830Z","modified":"2026-06-25T03:04:24.084Z"},"maintainers":[{"name":"lcucos","email":"lcucos@axsept.com"}],"description":"Open-standard JSON Schema for the HumanAIEvent wire format used by SkillChain-compatible integration wrappers.","homepage":"https://protocol.skillchain.tech","keywords":["skillchain","skills","ai","attribution","json-schema","integration-protocol"],"repository":{"type":"git","url":"git+https://github.com/skillchain/integration-protocol.git","directory":"packages/event-schema"},"bugs":{"url":"https://github.com/skillchain/integration-protocol/issues"},"license":"Apache-2.0","readme":"# @axsept/event-schema\n\nThe open-standard JSON Schema for the `HumanAIEvent` wire format used by SkillChain-compatible integration wrappers.\n\nThis package is part of the [SkillChain integration protocol](https://protocol.skillchain.tech). It contains only the schema and its TypeScript types — no business logic, no anonymization rules, no API client. Wrappers that need anonymization use [`@axsept/anonymizer`](../skillchain-anonymizer/); wrappers that need an MCP-server runtime use `@axsept/mcp-server`.\n\n## Install\n\n```bash\nnpm install @axsept/event-schema\n```\n\n## Use\n\n### Validating an event in TypeScript\n\n```ts\nimport Ajv2020 from \"ajv/dist/2020.js\";\nimport addFormats from \"ajv-formats\";\nimport { HumanAIEventSchema, type HumanAIEvent, PROTOCOL_VERSION } from \"@axsept/event-schema\";\n\nconst ajv = new Ajv2020({ allErrors: true, strict: false });\naddFormats(ajv);\nconst validate = ajv.compile(HumanAIEventSchema);\n\nconst event: HumanAIEvent = {\n  protocol_version: PROTOCOL_VERSION,\n  event_id: \"evt_01HFG2X7K8Q9P0R1S2T3U4V5W6\",\n  timestamp: new Date().toISOString(),\n  source: {\n    provenance: \"claude-mcp\",\n    session_id: \"sess_01HFG2X7K8Q9P0R1S2T3U4V5XY\",\n    wrapper_version: \"0.1.0\",\n    client: \"claude-code\",\n  },\n  description: \"Designed a fraud-defense architecture and recorded the rationale.\",\n  skills: [\n    {\n      name: \"system design\",\n      proficiency: 0.85,\n      evidence_snippet: \"Reframed the fraud model as 'screen, not proof'.\",\n    },\n  ],\n};\n\nif (!validate(event)) {\n  throw new Error(\"invalid event: \" + JSON.stringify(validate.errors));\n}\n```\n\n### Loading the schema directly (e.g., in Python or another language)\n\nThe raw JSON Schema is shipped at `node_modules/@axsept/event-schema/schema/HumanAIEvent.v1.json` (or via the package export `@axsept/event-schema/schema/HumanAIEvent.v1.json`). Any JSON Schema 2020-12-compliant validator can load it.\n\n## What `HumanAIEvent` is for\n\nIt is the **wire format** every SkillChain-compatible wrapper emits to the SkillChain BFF. A wrapper observes a user working with an AI agent, extracts the skill-relevant content (locally, with PII / secrets stripped), and posts one or more `HumanAIEvent` payloads. The BFF deduplicates, ingests, and feeds the events into the engine's skill-extraction and verification pipeline.\n\nThe schema is **versioned with semver**:\n- **Major version** changes (e.g., 1.x → 2.0) are reserved for breaking changes. The BFF accepts events from the current and previous major version for at least 12 months after a major bump.\n- **Minor version** changes (1.0 → 1.1) are **additive only** — new optional fields or new enum values that older consumers can safely ignore.\n- **Patch version** changes are clarifications and bugfixes; no functional changes.\n\n## What about the rest of the protocol?\n\nThe full integration protocol — attribution model, anonymization rules, auth model, runtime contracts, conformance suite, scaffold, versioning policy — lives at:\n\n- The public protocol spec (TBD URL — see [`specs/architecture/skillchain-integration-protocol.md`](../../specs/architecture/skillchain-integration-protocol.md) in the SkillChain monorepo today)\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md","_rev":"1-d75ebf84141fb4163de22651a6445563"}