{"_id":"@aeonbrain/skill-schema","name":"@aeonbrain/skill-schema","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aeonbrain/skill-schema","version":"0.1.0","license":"Apache-2.0","description":"Vendor-neutral, ed25519-signed AI skill schema. Define a procedure once; compile it to Anthropic SKILL.md, OpenAPI 3.1 (Copilot Studio), and OpenAI custom-GPT actions.","keywords":["mcp","ai-agents","skills","ed25519","openapi","vendor-neutral","claude","copilot"],"homepage":"https://airiskmanagement.ca/aeonbrain","repository":{"type":"git","url":"git+https://github.com/AI-Risk-Management/aeon-skill-schema.git"},"author":{"name":"AI Risk Management Inc."},"type":"module","main":"src/index.ts","types":"src/index.ts","exports":{".":"./src/index.ts"},"publishConfig":{"access":"public","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"build":"tsc -b","test":"vitest run","typecheck":"tsc --noEmit","lint":"eslint src --ext ts","clean":"rm -rf dist .turbo","prepublishOnly":"npm run build"},"dependencies":{"@noble/ed25519":"^2.1.0","zod":"^3.24.0"},"devDependencies":{"@types/node":"^22.10.0","@vitest/coverage-v8":"^2.1.0","typescript":"^5.7.0","vitest":"^2.1.0"},"gitHead":"a8830e078430e3c1d6566e8441b144fa41b281a3","_id":"@aeonbrain/skill-schema@0.1.0","bugs":{"url":"https://github.com/AI-Risk-Management/aeon-skill-schema/issues"},"_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-9jQYV7IwmHjBIJlLPxqD3oMwRvE1xfvd9A2xkHRoUSCZcNiB4X722J8IwQUmvjwOL1A77D3LN0VWSVMkJKX+KA==","shasum":"7e1057aac83db379ff5785b4841a5f407e7daf49","tarball":"https://registry.npmjs.org/@aeonbrain/skill-schema/-/skill-schema-0.1.0.tgz","fileCount":65,"unpackedSize":178177,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCPKvKjtQr8zmk/WTVs1i1cVEEcPYfuigwDXbtwHum6lQIge8O6OaFCDlTHFrWYxBTKwuq+xo8VnDw1+gBxsbz+gOI="}]},"_npmUser":{"name":"aeonairisks","email":"info@airiskmanagement.ca"},"directories":{},"maintainers":[{"name":"aeonairisks","email":"info@airiskmanagement.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/skill-schema_0.1.0_1781444030892_0.3413107026739104"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-14T13:33:50.688Z","0.1.0":"2026-06-14T13:33:51.020Z","modified":"2026-06-14T13:33:51.276Z"},"maintainers":[{"name":"aeonairisks","email":"info@airiskmanagement.ca"}],"description":"Vendor-neutral, ed25519-signed AI skill schema. Define a procedure once; compile it to Anthropic SKILL.md, OpenAPI 3.1 (Copilot Studio), and OpenAI custom-GPT actions.","homepage":"https://airiskmanagement.ca/aeonbrain","keywords":["mcp","ai-agents","skills","ed25519","openapi","vendor-neutral","claude","copilot"],"repository":{"type":"git","url":"git+https://github.com/AI-Risk-Management/aeon-skill-schema.git"},"author":{"name":"AI Risk Management Inc."},"bugs":{"url":"https://github.com/AI-Risk-Management/aeon-skill-schema/issues"},"license":"Apache-2.0","readme":"# @aeonbrain/skill-schema\n\nThe foundational primitive for the Aeon platform. Every other component\ncompiles to this schema or consumes from it.\n\n## What's in this package\n\n- **`AeonSkill` Zod schema** (`src/schema.ts`) — the canonical, vendor-neutral\n  shape of a skill. Versioned via `schemaVersion` (currently `\"1.0\"`).\n- **Canonical JSON serialization** (`src/canonical.ts`) — sorted-key, no-whitespace\n  serialization for byte-stable signing input.\n- **ed25519 signing + verification** (`src/signing.ts`) — async-only API built\n  on `@noble/ed25519` v2.\n- **Compilers** (`src/compilers/`) — Aeon → SKILL.md / OpenAPI 3.1 / OpenAI\n  Custom GPT action.\n\n## Why a schema, not just SKILL.md\n\nAnthropic's `SKILL.md` is the wire format for Claude. Microsoft Copilot Studio\ntakes OpenAPI tool definitions. OpenAI Custom GPTs take OpenAPI 3.1 documents\nwith `x-openai-*` extensions. We define **one** Aeon schema as a *superset* and\nemit the right format per runtime. Hyperscalers will not ship cross-runtime\nportability — lock-in is their incentive. We are the Switzerland of skills.\n\n## The schema\n\n```ts\ninterface AeonSkill {\n  schemaVersion: \"1.0\";\n  slug: string;                 // tenant-unique kebab-case identifier\n  name: string;\n  description: string;\n  domain: string;\n\n  trigger: {\n    pattern: \"natural-language\" | \"explicit-call\";\n    examples: string[];\n  };\n\n  inputs: AeonInput[];\n  outputs: AeonOutput[];\n  steps: AeonStep[];\n\n  governance: {\n    requiresApproval: boolean;\n    dataClasses: string[];\n    regulatoryMappings: string[];\n  };\n\n  provenance: {\n    sourceArtifactIds: string[];\n    extractionRunId: string;\n    authoredBy: string;\n    authorizedAt: string;       // ISO 8601\n  };\n\n  signature?: {                 // attached at publish time, not at draft time\n    algorithm: \"ed25519\";\n    publicKeyId: string;\n    value: string;              // base64-encoded\n  };\n}\n```\n\n## Canonical example: refund handling\n\nThe example skill below is the round-trip fixture for tests\n(`src/__tests__/fixtures.ts`). It models the workflow extracted from a\nSlack thread about a $14,400 annual refund — the kind of tribal knowledge\nAeon turns into an executable skill any AI runtime can consume.\n\n```ts\nimport {\n  AeonSkillSchema,\n  compileToAnthropicSkillMd,\n  compileToOpenApiTool,\n  compileToOpenAiGptAction,\n  generateKeyPair,\n  signAndAttach,\n  verifySkill,\n} from \"@aeonbrain/skill-schema\";\n\nconst refundSkill = AeonSkillSchema.parse({\n  schemaVersion: \"1.0\",\n  slug: \"process-customer-refund\",\n  name: \"Process a Customer Refund Request\",\n  description: \"Handles a refund request through escalation tiers and finance reconciliation.\",\n  domain: \"customer-success\",\n  trigger: {\n    pattern: \"natural-language\",\n    examples: [\"Customer X is asking for a refund\", \"We need to refund Acme Corp\"],\n  },\n  inputs: [\n    { name: \"accountName\", description: \"Customer account\", type: \"string\", required: true },\n    { name: \"refundAmount\", description: \"Requested USD amount\", type: \"number\", required: true },\n  ],\n  outputs: [\n    { name: \"refundId\", description: \"Internal refund ID\", type: \"string\" },\n  ],\n  steps: [\n    { order: 0, description: \"Confirm with sales rep this isn't a sandbagged renewal.\", type: \"lookup\" },\n    { order: 1, description: \"If over $5,000 annual, get account-owner approval via email.\", type: \"user-input\" },\n  ],\n  governance: {\n    requiresApproval: true,\n    dataClasses: [\"financial\", \"customer-PII\"],\n    regulatoryMappings: [],\n  },\n  provenance: {\n    sourceArtifactIds: [\"slack-refund-thread\"],\n    extractionRunId: \"run-2026-04-30-001\",\n    authoredBy: \"user-curator-001\",\n    authorizedAt: \"2026-04-30T14:00:00Z\",\n  },\n});\n\n// Sign at publish time\nconst { privateKey, publicKey } = await generateKeyPair();\nconst signed = await signAndAttach(refundSkill, privateKey, \"tenant-key-1\");\n\n// Verify\nawait verifySkill(signed, publicKey); // true\n\n// Compile to runtime targets\nconst skillMd = compileToAnthropicSkillMd(signed);     // → SKILL.md for Claude\nconst openapi = compileToOpenApiTool(signed);          // → OpenAPI for Copilot Studio\nconst gptAction = compileToOpenAiGptAction(signed);    // → OpenAPI + x-openai-* extensions\n```\n\n## Signing details\n\n- Algorithm: **ed25519** (`@noble/ed25519` v2 async APIs)\n- Bytes signed: canonical JSON of the skill **with the `signature` field stripped**\n  (see `canonicalizeForSigning`)\n- Signature encoding: standard base64\n- Determinism: signing the same skill with the same key produces the same\n  signature (covered by tests — important for re-signing after immaterial\n  edits)\n\nThe signing private key never leaves AWS KMS in production. This package\naccepts raw bytes so it stays portable; integration with KMS happens at the\nAPI layer (Phase 3+).\n\n## Running tests\n\n```sh\nnpm install                                # at the repo root\nnpm run -w @aeonbrain/skill-schema test         # vitest\nnpm run -w @aeonbrain/skill-schema typecheck    # tsc --noEmit\n```\n","readmeFilename":"README.md","_rev":"1-0401d71af8c1af62e95b1c278a648af7"}