{"_id":"@avant-garde/design-surfaces","name":"@avant-garde/design-surfaces","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@avant-garde/design-surfaces","version":"0.1.0","description":"Design Surface layer (spec 23): Penpot adapter over the safe RPC set, file-first compose lane via @penpot/library, server-side export, tenant provisioning, and the canary conformance suite","type":"module","license":"MIT","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"bin":{"design-surfaces":"dist/cli.js"},"dependencies":{"@penpot/library":"^1.2.0-RC2","zod":"^3.25.0"},"devDependencies":{"@types/node":"^22.0.0","tsup":"^8.0.2","tsx":"^4.7.0","typescript":"^5.7.0","vitest":"^2.0.0","@avant-garde/brand-md":"0.1.0"},"engines":{"node":">=20.0.0"},"repository":{"type":"git","url":"git+https://github.com/Avant-Garde-AI/marketing-os.git","directory":"packages/design-surfaces"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:canary":"PENPOT_CANARY=1 vitest run test/canary.test.ts","typecheck":"tsc --noEmit"},"_id":"@avant-garde/design-surfaces@0.1.0","bugs":{"url":"https://github.com/Avant-Garde-AI/marketing-os/issues"},"homepage":"https://github.com/Avant-Garde-AI/marketing-os#readme","_integrity":"sha512-jCRbl2WyFHdcLsvrIG0ZPEDW83JQSo7t4XPWWEbey2atxFAXn6DVPmta4oGPG9FGCkW3V3LhELhYJivZL9NGnw==","_resolved":"/private/var/folders/zc/vndf3h0s6_dflp__t0q_3pjr0000gn/T/f40b1d995f8016861a10b9934fd9dddb/avant-garde-design-surfaces-0.1.0.tgz","_from":"file:avant-garde-design-surfaces-0.1.0.tgz","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-jCRbl2WyFHdcLsvrIG0ZPEDW83JQSo7t4XPWWEbey2atxFAXn6DVPmta4oGPG9FGCkW3V3LhELhYJivZL9NGnw==","shasum":"58e440949b959654a0acff668687835776955b8a","tarball":"https://registry.npmjs.org/@avant-garde/design-surfaces/-/design-surfaces-0.1.0.tgz","fileCount":8,"unpackedSize":149878,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDk9rbhAOezfR1AvjrH50LKVLjsvvk5plBzxoTduj1zDwIhAJLoQx/u5H59YG0qCptVw48etzOSIVs2eSRal12bf62k"}]},"_npmUser":{"name":"geastham","email":"garrett@openconjecture.com"},"directories":{},"maintainers":[{"name":"geastham","email":"garrett@openconjecture.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/design-surfaces_0.1.0_1784262015476_0.9281706399058971"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-17T04:20:15.285Z","0.1.0":"2026-07-17T04:20:15.623Z","modified":"2026-07-17T04:20:15.894Z"},"maintainers":[{"name":"geastham","email":"garrett@openconjecture.com"}],"description":"Design Surface layer (spec 23): Penpot adapter over the safe RPC set, file-first compose lane via @penpot/library, server-side export, tenant provisioning, and the canary conformance suite","homepage":"https://github.com/Avant-Garde-AI/marketing-os#readme","repository":{"type":"git","url":"git+https://github.com/Avant-Garde-AI/marketing-os.git","directory":"packages/design-surfaces"},"bugs":{"url":"https://github.com/Avant-Garde-AI/marketing-os/issues"},"license":"MIT","readme":"# @avant-garde/design-surfaces\n\nThe Design Surface layer (spec 23): the platform's domain-agnostic wrapper\naround managed Penpot. Creative capability packs (spec 24 social is the first)\nconsume *surfaces* — brand-templated design documents with lifecycle,\nprovenance, and an export contract — and never talk to Penpot directly.\n\n## The two lanes (spec 23 §4)\n\n- **Lane 1 — COMPOSE (headless, default):** `composeSurfaceFile(spec)` builds a\n  `.penpot` document in memory via `@penpot/library`; `createSurface(...)`\n  imports it into the tenant's team and returns everything the platform index\n  row needs. Deterministic, no browser, no MCP.\n- **Lane 2 — LIVE (human present):** the managed MCP connects the agent to an\n  open canvas session. Not in this package yet (DS5).\n\n## Quick start\n\n```ts\nimport { DesignSurfaceAdapter, createSurface, exportSurface } from \"@avant-garde/design-surfaces\";\n\nconst adapter = new DesignSurfaceAdapter({\n  baseUrl: process.env.PENPOT_URL!,\n  accessToken: process.env.PENPOT_ACCESS_TOKEN!,          // RPC lane\n  serviceAccount: {                                        // export lane (session auth)\n    email: process.env.PENPOT_SERVICE_EMAIL!,\n    password: process.env.PENPOT_SERVICE_PASSWORD!,\n  },\n});\n\nconst team = await adapter.provisionTenantTeam(\"arthaus\");\nconst project = await adapter.ensureProject(team.id, \"Design Surfaces\");\nconst { surface } = await createSurface(adapter, { /* kind, boundTo, spec… */ });\nconst png = await exportSurface(adapter, { fileId: surface.penpot.fileId, pageId: surface.penpot.pageId });\n```\n\n`scripts/demo-arthaus.ts` runs the full chain on the real Arthaus DESIGN.md:\nDTCG tokens (via `@avant-garde/brand-md`) → composed IG post → editable Penpot\nfile → on-brand PNG.\n\n## The canary suite (spec 23 §8 — read before touching the adapter)\n\nPenpot's RPC API is officially *internal*. Every internal behavior this package\ndepends on is exercised by `test/canary.test.ts`, which runs against a LIVE\ninstance and gates every Penpot version bump (we are self-supported by\ndecision D4). **Never add an adapter call without adding it to the canary\nsuite.** Hard-won protocol facts (SSE result streams, transit uuid results,\nkebab-case multipart fields, the /api/export transit+session protocol, text\ncontent-tree synthesis, fillOpacity) are documented where they're handled and\nin `docs/plans/design-surfaces/REVISIT.md`.\n\n```bash\nPENPOT_CANARY=1 PENPOT_URL=… PENPOT_ACCESS_TOKEN=… \\\nPENPOT_SERVICE_EMAIL=… PENPOT_SERVICE_PASSWORD=… pnpm test:canary\n```\n","readmeFilename":"README.md","_rev":"1-32ff3128c5d7a41e60e9088abca835c0"}