{"_id":"@act-spec/adapter-contentful","name":"@act-spec/adapter-contentful","dist-tags":{"rc":"0.2.0-rc.1","latest":"0.2.0-rc.1"},"versions":{"0.2.0-rc.1":{"name":"@act-spec/adapter-contentful","version":"0.2.0-rc.1","description":"PRD-202 Contentful adapter for the ACT (Agent Content Tree) v0.1 reference implementation. Consumes Contentful Content Delivery API and emits PRD-100/PRD-102 envelopes; supports field-mapping DSL, Rich Text → block conversion, locale fan-out per PRD-104, ","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-contentful"},"dependencies":{"@contentful/rich-text-types":"^16.8.5","ajv":"^8.17.1","ajv-formats":"^3.0.1","@act-spec/adapter-framework":"0.2.0-rc.1","@act-spec/validator":"0.2.0-rc.1","@act-spec/core":"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-contentful@0.2.0-rc.1","_integrity":"sha512-L14XGYuJwzghsXzWRKN2vLf8KCIGs/UF5Q5ic8kPe3FJCDHUUvgc0HKLdieGgS9fhnXGeJ9IKotgJoOuWSLQhA==","_resolved":"/private/var/folders/yp/y7frhcvj70jgr6b8g633lghr0000gn/T/a1efa7b958374de7257e2dd49fc1531d/act-spec-adapter-contentful-0.2.0-rc.1.tgz","_from":"file:act-spec-adapter-contentful-0.2.0-rc.1.tgz","_nodeVersion":"22.19.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-L14XGYuJwzghsXzWRKN2vLf8KCIGs/UF5Q5ic8kPe3FJCDHUUvgc0HKLdieGgS9fhnXGeJ9IKotgJoOuWSLQhA==","shasum":"d8c0deb9adf8056fa119681fa9f055000d26d061","tarball":"https://registry.npmjs.org/@act-spec/adapter-contentful/-/adapter-contentful-0.2.0-rc.1.tgz","fileCount":31,"unpackedSize":297149,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICDO4JWntWW0CE0VGSGVQPdcBCERTdj1LgdSjPr3CYE8AiAyn6VTSxLTKKY0F8sJUfZ1tzhQ3mQVitPW1OotcncKHw=="}]},"_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-contentful_0.2.0-rc.1_1777915284681_0.9628443487979212"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-04T17:21:24.558Z","0.2.0-rc.1":"2026-05-04T17:21:24.878Z","modified":"2026-05-04T17:21:25.165Z"},"maintainers":[{"name":"jdforsythe","email":"jdforsythe@gmail.com"}],"description":"PRD-202 Contentful adapter for the ACT (Agent Content Tree) v0.1 reference implementation. Consumes Contentful Content Delivery API and emits PRD-100/PRD-102 envelopes; supports field-mapping DSL, Rich Text → block conversion, locale fan-out per PRD-104, ","homepage":"https://act-spec.org","repository":{"type":"git","url":"git+https://github.com/act-spec/act.git","directory":"packages/adapter-contentful"},"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-contentful\n\nContentful adapter for ACT (Agent Content Tree). Consumes the Contentful\nContent Delivery API and emits ACT envelopes against the shared adapter\nframework (`@act-spec/adapter-framework`). Supports a field-mapping DSL,\nRich Text → block conversion, locale fan-out, and sync-API delta.\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-contentful\": \"workspace:*\" } }\n```\n\nFor out-of-tree hand-test, run `pnpm pack` inside\n`packages/adapter-contentful` and install the resulting tarball locally.\n\n## Usage\n\n```ts\nimport { createContentfulAdapter } from '@act-spec/adapter-contentful';\n\nconst adapter = createContentfulAdapter({\n  config: {\n    spaceId: process.env.CONTENTFUL_SPACE_ID!,\n    accessToken: { from_env: 'CONTENTFUL_CDA_TOKEN' },\n    environment: 'master',\n    mappings: {\n      blogPost: {\n        type: 'article',\n        title: 'fields.title',\n        summary: 'fields.summary',\n        body: { from: 'fields.body', as: 'richtext' },\n      },\n    },\n    locales: { available: ['en-US', 'fr-FR'] },\n  },\n});\n```\n\nRich Text conversion is exposed standalone for callers that already have\na Contentful entry in hand:\n\n```ts\nimport { richTextToBlocks } from '@act-spec/adapter-contentful';\n\nconst blocks = richTextToBlocks(entry.fields.body, ctx);\n```\n\n## Conformance / what's tested\n\nEvery public API has a citing test in `src/contentful.test.ts`. Inline\n`accessToken` triggers a one-time warning; the `{ from_env }` form is the\nspec-preferred shape. The conformance gate runs `@act-spec/validator`\nagainst the bundled `test-fixtures/` corpus.\n\n```bash\npnpm -F @act-spec/adapter-contentful conformance\n```\n\n## Configuration (selected)\n\n| Option | Default | Notes |\n| --- | --- | --- |\n| `spaceId` | (required) | Contentful space identifier. |\n| `accessToken` | (required) | Inline string OR `{ from_env: 'NAME' }` (preferred). |\n| `environment` | `'master'` | Contentful environment. |\n| `mappings` | `{}` | Content-type → field-mapping DSL. |\n| `locales.available` | `[]` | Locale fan-out. |\n| `concurrency` | `4` | Adapter framework parallelism. |\n\n## Peer dependencies\n\n`@contentful/rich-text-types` is bundled (used for the Rich Text walker).\nNo Contentful SDK peer; the adapter speaks HTTP to the CDA directly.\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-5bbad90fafc461a027343f96de58e1e1"}