{"_id":"@act-spec/adapter-strapi","name":"@act-spec/adapter-strapi","dist-tags":{"rc":"0.2.0-rc.1","latest":"0.2.0-rc.1"},"versions":{"0.2.0-rc.1":{"name":"@act-spec/adapter-strapi","version":"0.2.0-rc.1","description":"PRD-205 Strapi adapter for the ACT (Agent Content Tree) v0.1 reference implementation. Consumes the Strapi v4/v5 REST (default) or GraphQL Content API and emits PRD-100/PRD-102 envelopes; supports content-type / field mapping, markdown body emission with ","license":"Apache-2.0","author":{"name":"Jeremy Forsythe","email":"jeremy@act-spec.org"},"homepage":"https://act-spec.org","bugs":{"url":"https://github.com/act-spec/act/issues"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/act-spec/act.git","directory":"packages/adapter-strapi"},"dependencies":{"ajv":"^8.17.1","ajv-formats":"^3.0.1","@act-spec/adapter-framework":"0.2.0-rc.1","@act-spec/core":"0.2.0-rc.1","@act-spec/validator":"0.2.0-rc.1"},"devDependencies":{"@vitest/coverage-v8":"^2.1.9","tsx":"^4.19.2","typescript":"^5.6.3","vitest":"^2.1.4"},"scripts":{"build":"tsc -p tsconfig.json","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","lint":"eslint src","typecheck":"tsc -p tsconfig.json --noEmit","conformance":"tsx conformance.ts"},"_id":"@act-spec/adapter-strapi@0.2.0-rc.1","_integrity":"sha512-7Hmwu53BmEi4A+h1C1mjSgK/MDRKUEide/jGDaTL95d87yMWg//PyAQZTTjiyWilNOy9cQj93GoZ8uxf1h0Hag==","_resolved":"/private/var/folders/yp/y7frhcvj70jgr6b8g633lghr0000gn/T/53d080f077fb6ad8542fd4e91cbb5a47/act-spec-adapter-strapi-0.2.0-rc.1.tgz","_from":"file:act-spec-adapter-strapi-0.2.0-rc.1.tgz","_nodeVersion":"22.19.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-7Hmwu53BmEi4A+h1C1mjSgK/MDRKUEide/jGDaTL95d87yMWg//PyAQZTTjiyWilNOy9cQj93GoZ8uxf1h0Hag==","shasum":"41307e09c15d9d4eaf46eea582705547071df8ce","tarball":"https://registry.npmjs.org/@act-spec/adapter-strapi/-/adapter-strapi-0.2.0-rc.1.tgz","fileCount":46,"unpackedSize":311784,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCe5EhB7LImmf7+3dTmZOxqw9fU/AXpJM2kgcPSdJnEfAIhAKP0HYeXSXTBGxp+a5BYpxa3trYDnDtflENOoErvsXZA"}]},"_npmUser":{"name":"jdforsythe","email":"jdforsythe@gmail.com"},"directories":{},"maintainers":[{"name":"jdforsythe","email":"jdforsythe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adapter-strapi_0.2.0-rc.1_1777915297091_0.14931544886145343"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-04T17:21:36.989Z","0.2.0-rc.1":"2026-05-04T17:21:37.232Z","modified":"2026-05-04T17:21:37.462Z"},"maintainers":[{"name":"jdforsythe","email":"jdforsythe@gmail.com"}],"description":"PRD-205 Strapi adapter for the ACT (Agent Content Tree) v0.1 reference implementation. Consumes the Strapi v4/v5 REST (default) or GraphQL Content API and emits PRD-100/PRD-102 envelopes; supports content-type / field mapping, markdown body emission with ","homepage":"https://act-spec.org","repository":{"type":"git","url":"git+https://github.com/act-spec/act.git","directory":"packages/adapter-strapi"},"author":{"name":"Jeremy Forsythe","email":"jeremy@act-spec.org"},"bugs":{"url":"https://github.com/act-spec/act/issues"},"license":"Apache-2.0","readme":"# @act-spec/adapter-strapi\n\nStrapi adapter for ACT (Agent Content Tree). Consumes the Strapi v4 / v5\nREST (default) or GraphQL Content API and emits ACT envelopes against the\nshared adapter framework (`@act-spec/adapter-framework`). Supports\ncontent-type and field mapping, markdown body emission with optional\nsplit into `prose` / `code` / `callout` blocks, dynamic-zone components →\n`marketing:*`, relation resolution with cycle tolerance, locale fan-out\nvia the Strapi i18n plugin, `updatedAt`-marker delta, and HMAC-SHA256\nwebhook signature verification.\n\n## Status\n\nACT v0.1 internal hand-test candidate. Public release lands at v0.2.\n\n## Install\n\nUnpublished in v0.1. Consume via the workspace:\n\n```jsonc\n// package.json\n{ \"dependencies\": { \"@act-spec/adapter-strapi\": \"workspace:*\" } }\n```\n\n## Usage\n\n```ts\nimport { createStrapiAdapter } from '@act-spec/adapter-strapi';\n\nconst adapter = createStrapiAdapter({\n  config: {\n    baseUrl: 'https://cms.example.com',         // https in prod\n    apiToken: { from_env: 'STRAPI_TOKEN' },\n    apiVersion: 'v5',                           // or 'v4'\n    transport: 'rest',                          // or 'graphql'\n    populateDepth: 2,                           // 0–4\n    dynamicZoneMax: 2,                          // 1–3\n    mappings: {\n      article: {\n        type: 'article',\n        title: 'title',\n        body: { from: 'body', as: 'markdown', split: true },\n      },\n    },\n  },\n});\n```\n\nWebhook signatures:\n\n```ts\nimport { verifyWebhookSignature } from '@act-spec/adapter-strapi';\n\nconst ok = verifyWebhookSignature(rawBody, headers['x-strapi-signature'], secret);\n```\n\n## Conformance / what's tested\n\nEvery public API has a citing test in `src/strapi.test.ts` covering REST\nand GraphQL transports, dynamic-zone walks, relation cycle tolerance,\nlocale fan-out, and the `updatedAt` delta path. The conformance gate runs\n`@act-spec/validator` against the bundled fixtures.\n\n```bash\npnpm -F @act-spec/adapter-strapi conformance\n```\n\n## Configuration (selected)\n\n| Option | Default | Notes |\n| --- | --- | --- |\n| `baseUrl` | (required) | Strapi base URL; `http://` triggers a warning. |\n| `apiToken` | (required) | Inline string OR `{ from_env: 'NAME' }`. |\n| `apiVersion` | `'v5'` | `'v4'` selects v4 response normalization. |\n| `transport` | `'rest'` | Or `'graphql'`. |\n| `populateDepth` | `2` | Range 0–4. |\n| `dynamicZoneMax` | `2` | Range 1–3. |\n| `mappings` | `{}` | Content-type → field-mapping DSL. |\n| `concurrency` | `4` | Adapter framework parallelism. |\n\n## Compatibility\n\nNo Strapi SDK peer dependency; the adapter speaks HTTP / GraphQL to the\nconfigured `baseUrl` directly. Tested against Strapi v4 and v5 response\nshapes (v4 `data.attributes` envelope is normalized via\n`normalizeEntity`).\n\n## Links\n\n- Adapter framework: [`@act-spec/adapter-framework`](../adapter-framework)\n- Repository: <https://github.com/act-spec/act>\n","readmeFilename":"README.md","_rev":"1-51fceeb658528d94885d4e569d9dc338"}