Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(materialize): let agents find the print lane, and close the campaign
nirholas6dde7d0b0bfd
diff --git a/api/_lib/3d-catalog/index.js b/api/_lib/3d-catalog/index.jsindex 5cd949e90..0153d1875 100644--- a/api/_lib/3d-catalog/index.js+++ b/api/_lib/3d-catalog/index.js@@ -30,6 +30,8 @@ import { fileURLToPath } from 'node:url';import diffEntry from './diff.js';import generateEntry from './generate.js';import inspectEntry from './inspect.js';+import printQuoteEntry from './print-quote.js';+import printPrepareEntry from './print-prepare.js';// Static barrel — the PRODUCTION source of truth for the catalog. Vercel's// bundler only reliably ships what static imports reach: the first deployed@@ -44,6 +46,8 @@ const STATIC_ENTRIES = [{ mod: diffEntry, source: 'diff.js' },{ mod: generateEntry, source: 'generate.js' },{ mod: inspectEntry, source: 'inspect.js' },+ { mod: printQuoteEntry, source: 'print-quote.js' },+ { mod: printPrepareEntry, source: 'print-prepare.js' },];// In dev/tests `import.meta.url` is this source file, so its own directory isdiff --git a/api/_lib/3d-catalog/print-prepare.js b/api/_lib/3d-catalog/print-prepare.jsnew file mode 100644index 000000000..b2c78ff75--- /dev/null+++ b/api/_lib/3d-catalog/print-prepare.js@@ -0,0 +1,111 @@+// Catalog entry for the free Materialize preparation endpoint: the step between+// "we measured your mesh" and "a machine can run it". Listed beside the quote+// endpoint so an agent that priced a print can also produce the exact files a+// bureau loads, and can show its user what the repair changed.++export default {+ id: 'print-prepare',+ name: 'Repair & Export for Printing (STL, 3MF, GLB)',+ path: '/api/print/prepare',+ methods: ['POST'],+ free: true,+ keyless: true,+ category: '3d',+ order: 41,+ tags: ['3d', 'printing', 'repair', 'stl', '3mf', 'manufacturing', 'materialize'],+ summary:+ 'Turn a generated mesh into a watertight solid and export the files a 3D printer takes.',+ description:+ 'Welds and re-winds the surface, fills the holes a generator left, closes it into a real ' ++ 'solid, scales it to the ordered height, optionally hollows it with drain holes for resin ' ++ 'economy, and writes three artifacts to durable storage: a binary STL in millimetres, a 3MF ' ++ 'carrying per-vertex colour when the source had a texture (which is what makes a full-colour ' ++ 'print possible), and the repaired GLB so the buyer can see exactly what will be printed. ' ++ 'Returns the printability report before and after side by side, plus the measured repair ' ++ 'metrics. Free and keyless: preparing a file costs CPU, not fulfillment.',+ useCase:+ 'An agent holding a generated model produces manufacturing-ready files without a slicer, a ' ++ 'desktop tool, or a human, and can show its user precisely which holes were filled and how ' ++ 'many triangles changed before anything is ordered.',+ rateLimit: '10 requests/minute per IP',+ input: {+ body: { description: 'JSON. Pass creationId or glbUrl, plus the height and material to prepare for.' },+ },+ inputSchema: {+ $schema: 'https://json-schema.org/draft/2020-12/schema',+ type: 'object',+ properties: {+ creationId: { type: 'string', description: 'A three.ws forge creation id.' },+ glbUrl: { type: 'string', format: 'uri', description: 'Public https URL of a .glb model, instead of a creation id.' },+ materialId: { type: 'string', description: 'Material id from GET /api/print/catalog. Decides the hollowing rules and wall limits.' },+ targetHeightMm: { type: 'number', minimum: 1, maximum: 1000, description: 'Printed height in millimetres.' },+ hollow: { type: 'boolean', description: 'Hollow the solid where it is geometrically safe, adding drain holes.' },+ },+ },+ outputSchema: {+ $schema: 'https://json-schema.org/draft/2020-12/schema',+ type: 'object',+ required: ['assets', 'before', 'after', 'repair'],+ properties: {+ sourceUrl: { type: ['string', 'null'], format: 'uri' },+ creationId: { type: ['string', 'null'] },+ assets: {+ type: 'object',+ required: ['stl', 'threemf', 'glb'],+ properties: {+ stl: { type: 'string', format: 'uri' },+ threemf: { type: 'string', format: 'uri' },+ glb: { type: 'string', format: 'uri' },+ bytes: { type: 'object' },+ },+ },+ before: { type: 'object', description: 'The printability report of the mesh as supplied.' },+ after: { type: 'object', description: 'The printability report of the repaired solid.' },+ repair: {+ type: 'object',+ description: 'What actually changed, all measured.',+ properties: {+ strategy: { type: 'string' },+ holesFilled: { type: 'integer' },+ patchTriangles: { type: 'integer' },+ mergedVertices: { type: 'integer' },+ degenerateRemoved: { type: 'integer' },+ trianglesFlipped: { type: 'integer' },+ trianglesBefore: { type: 'integer' },+ trianglesAfter: { type: 'integer' },+ shells: { type: 'integer' },+ elapsedMs: { type: 'integer' },+ },+ },+ hollow: {+ type: 'object',+ properties: {+ applied: { type: 'boolean' },+ reason: { type: ['string', 'null'] },+ wallMm: { type: ['number', 'null'] },+ drainHoles: { type: 'integer' },+ },+ },+ targetHeightMm: { type: ['number', 'null'] },+ catalogVersion: { type: 'integer' },+ },+ },+ example: {+ request:+ 'POST /api/print/prepare {"creationId":"6f1b…","materialId":"resin-standard","targetHeightMm":120,"hollow":true}',+ response: {+ assets: {+ stl: 'https://cdn.three.ws/print/6f1b….stl',+ threemf: 'https://cdn.three.ws/print/6f1b….3mf',+ glb: 'https://cdn.three.ws/print/6f1b….glb',+ bytes: { stl: 233684, threemf: 118220, glb: 402113 },+ },+ before: { version: 1, manifold: false, open_edges: 214, score: 62 },+ after: { version: 1, manifold: true, open_edges: 0, score: 100 },+ repair: { strategy: 'fill_and_close', holesFilled: 7, patchTriangles: 412, trianglesFlipped: 96, shells: 1, elapsedMs: 1840 },+ hollow: { applied: true, reason: null, wallMm: 2, drainHoles: 2 },+ targetHeightMm: 120,+ catalogVersion: 1,+ },+ },+};diff --git a/api/_lib/3d-catalog/print-quote.js b/api/_lib/3d-catalog/print-quote.jsnew file mode 100644index 000000000..c1e135b98--- /dev/null+++ b/api/_lib/3d-catalog/print-quote.js@@ -0,0 +1,141 @@+// Catalog entry for the free Materialize printability + quote endpoint. The+// /api/3d index globs api/_lib/3d-catalog/*.js and merges every default export+// into the public API catalog and the generated OpenAPI doc, so an agent that+// found the free 3D API also finds the lane that turns a model into an object.+//+// The endpoint is one call with two modes on purpose: without a material it is+// a pure printability analysis (free, keyless, no price), and with one it also+// prices the print and returns a signed quote token. Advertising it as a single+// entry keeps the catalog honest about the one round trip an agent makes.++export default {+ id: 'print-quote',+ name: 'Printability Report & Print Quote',+ path: '/api/print/quote',+ methods: ['POST'],+ free: true,+ keyless: true,+ category: '3d',+ order: 40,+ tags: ['3d', 'printing', 'manufacturing', 'physical', 'quote', 'materialize'],+ summary:+ 'Measure whether a 3D model can be physically printed, and price the print in USDC.',+ description:+ 'Analyzes a GLB for real-world manufacturing and, when a material is given, prices it. ' ++ 'The report covers whether the mesh is a closed solid, how many separate bodies it contains, ' ++ 'its open and non-manifold edges, self-intersections, exact enclosed volume, thinnest wall, ' ++ 'and a 0-100 printability score with named deductions, plus the smallest height each material ' ++ 'class can hold that detail at. With a materialId it returns an itemized quote (build setup, ' ++ 'material with the cm3 it was computed from, finish, quantity break, shipping) and an ' ++ 'HMAC-signed quote token valid for 24 hours. Free and keyless in both modes; nothing is ' ++ 'ordered and no money moves. Settle the token at POST /api/x402/print-order to have the ' ++ 'object manufactured and shipped.',+ useCase:+ 'An agent that just generated a 3D model checks whether the thing can exist physically, at ' ++ 'what size, in what material, and for how much, before committing its owner to a purchase. ' ++ 'The same call is what the /materialize page asks on every material and size change.',+ rateLimit: '30 requests/minute per IP',+ input: {+ body: {+ description:+ 'JSON. Pass creationId or glbUrl. Omit materialId for a free analysis with no price.',+ },+ },+ inputSchema: {+ $schema: 'https://json-schema.org/draft/2020-12/schema',+ type: 'object',+ properties: {+ creationId: { type: 'string', description: 'A three.ws forge creation id.' },+ glbUrl: { type: 'string', format: 'uri', description: 'Public https URL of a .glb model, instead of a creation id. Max 100 MB, 2M triangles.' },+ materialId: { type: 'string', description: 'Material id from GET /api/print/catalog. Omit for analysis only.' },+ finishId: { type: 'string', description: 'Optional finish id from that material.' },+ targetHeightMm: { type: 'number', minimum: 1, maximum: 1000, description: 'Printed height in millimetres.' },+ quantity: { type: 'integer', minimum: 1, maximum: 500, default: 1, description: 'How many. Price breaks at 5 and 20.' },+ country: { type: 'string', minLength: 2, maxLength: 2, description: 'ISO 3166-1 alpha-2 destination, for shipping.' },+ hollow: { type: 'boolean', description: 'Hollow the solid where it is geometrically safe. Lowers the price.' },+ note: { type: 'string', maxLength: 500, description: 'Optional note about the intended object. Read by the fabrication safety gate.' },+ },+ },+ outputSchema: {+ $schema: 'https://json-schema.org/draft/2020-12/schema',+ type: 'object',+ required: ['report', 'fits'],+ properties: {+ report: {+ type: 'object',+ required: ['version', 'manifold', 'volume_cm3', 'bbox_mm', 'score', 'deductions'],+ properties: {+ version: { type: 'integer' },+ manifold: { type: 'boolean' },+ watertight: { type: 'boolean' },+ shells: { type: 'integer' },+ open_edges: { type: 'integer' },+ non_manifold_edges: { type: 'integer' },+ self_intersections: { type: 'integer' },+ triangles: { type: 'integer' },+ volume_cm3: { type: 'number' },+ volume_source: { type: 'string', enum: ['manifold', 'signed_sum'] },+ surface_area_cm2: { type: 'number' },+ min_wall_mm: { type: ['number', 'null'] },+ bbox_mm: {+ type: 'object',+ properties: { x: { type: 'number' }, y: { type: 'number' }, z: { type: 'number' }, diagonal: { type: 'number' } },+ },+ recommended_min_height_mm: { type: ['object', 'null'] },+ score: { type: 'integer', minimum: 0, maximum: 100 },+ deductions: {+ type: 'array',+ items: {+ type: 'object',+ required: ['id', 'points', 'detail'],+ properties: { id: { type: 'string' }, points: { type: 'number' }, detail: { type: 'string' } },+ },+ },+ },+ },+ fits: { type: 'array', description: 'Per material: the height band this mesh can be printed at, or why it cannot.' },+ screening: {+ type: 'object',+ description: 'The fabrication gate verdict. A refused request answers 451 instead.',+ properties: { verdict: { type: 'string' }, stage: { type: 'string' }, policy_url: { type: 'string' } },+ },+ quote: { type: ['object', 'null'], description: 'Itemized price. Null when no material was given or the mesh was rejected.' },+ rejection: { type: ['object', 'null'], description: 'Why this material cannot take this mesh, with the measured number, the required number and the fix.' },+ token: { type: ['string', 'null'], description: 'Signed quote token, valid 24 hours. Null for a quote-on-request material.' },+ expiresInSeconds: { type: ['integer', 'null'] },+ },+ },+ example: {+ request:+ 'POST /api/print/quote {"creationId":"6f1b…","materialId":"resin-standard","targetHeightMm":120,"quantity":1,"country":"US"}',+ response: {+ report: {+ version: 1,+ manifold: true,+ shells: 1,+ open_edges: 0,+ triangles: 4672,+ volume_cm3: 27.144,+ volume_source: 'manifold',+ min_wall_mm: 2.4,+ bbox_mm: { x: 41, y: 120, z: 38, diagonal: 133 },+ score: 100,+ deductions: [],+ },+ screening: { verdict: 'allow', stage: 'quote', policy_url: '/docs/materialize#content-policy' },+ quote: {+ currency: 'USDC',+ chain: 'solana',+ lines: [+ { id: 'setup', label: 'Build setup, Standard resin', amount: 6 },+ { id: 'material', label: 'Standard resin', detail: '27.144 cm3 at 0.55 USDC per cm3.', amount: 14.93 },+ { id: 'shipping', label: 'Shipping to United States and Canada', amount: 12.94 },+ ],+ total: 33.87,+ leadTimeDays: 12,+ },+ token: 'pq1.eyJ2IjoxLC…',+ expiresInSeconds: 86400,+ },+ },+};diff --git a/docs/x402-endpoints.md b/docs/x402-endpoints.mdindex 38243c873..8c73188ce 100644--- a/docs/x402-endpoints.md+++ b/docs/x402-endpoints.md@@ -235,6 +235,7 @@ datapoints at **$0.0005** USDC each by default, overridable per family with| `/api/x402/pay-by-name` | $0.001 | Resolve and pay a `@username` / `.sol` name / raw address (see [Agent wallets](agent-wallets.md)); the paid resolve toll is $0.001, the transfer amount itself is buyer-specified. A name that resolves to nothing returns `404 not_found` and the payment is left unsettled, so an unresolvable name is free. || `/api/x402/did` | $0.001 | **POST** is the DID verification canary: it resolves three.ws's published W3C DID document over its real public route, structurally validates it, and returns `{ verified, latency_ms, configured, checks }`. `configured: false` means the resolver answered 404 or could not be reached at all. `mode: "sweep"` audits recent agent identities for resolvable key material instead. **GET** is the free publisher for `/.well-known/did.json`; every other verb returns `405`. || `/api/x402/three-buy` | $0.001 | Micro-buy service: one settled toll payment triggers one small, real on-chain USDC to $THREE buy funded by the micro-buy wallet (driven by the `three-buy-loop` cron). |+| `/api/x402/knock` | set by recipient | **Knock**: pay a person's own price and get exactly one message through to them, in person. The recipient sets what a moment of their attention costs and the USDC settles straight to their wallet, never the platform's, so a priced door cannot be opened without one. The accepted message becomes a companion event whose importance is derived from the amount paid, and their 3D companion walks on screen wherever they are and delivers it out loud. Body is validated against that door's limits before any 402 is issued, so nobody pays for a message that was going to be refused. || `/api/x402/billboard` | $0.05 | Post to the on-platform billboard. || `/api/x402/dance-tip` | $0.001 | Tip a club performer. || `/api/x402/club-cover` | $0.01 | **GET**: pole-club door cover charge; a paid wallet re-enters free for the pass window. **POST** sells a read of the club at the same price: `mode: "snapshot"` (default) returns membership growth/churn for a `club`, `mode: "revenue"` returns the door + floor take for a `period` (`24h`, `7d`, `14d`, `30d`, `all`). |@@ -278,6 +279,7 @@ directory.| `/api/x402/glb-optimization-report`| free | GLB Size Optimizer catalog feed: what the `glb-size-optimizer` autonomous-loop entry has measured. || `/api/x402/network-cost` | free | Cross-chain payment-cost recommendation feed from the hourly cross-chain-cost pipeline snapshots. || `/api/x402/runway-lab` | free | Live seed for [/economy-lab](https://three.ws/economy-lab): the fee wallet's real SOL balance and hard floor, the running deploy's governor config, today's spend from `x402_self_facilitator_log`, observed fee-per-settle and 24h demand, and the refusal histogram bucketed by cause (governor / floor / dust guard / duplicate). Read-only; every field is already public through `/api/x402-ring` and `/api/x402-status`. |+| `/api/x402/preflight` | free | Signed proof this seller can settle right now: measured settle rate, window and sample from the same sensor healthz reads, the live sponsor floor state, and the configured networks (optionally one route's price). Also served at `/.well-known/x402-preflight`. Wire contract: [specs/x402-preflight.md](../specs/x402-preflight.md); client: `packages/x402-preflight`. || `/api/x402/echo` | free | httpbin for x402 — decodes your `X-PAYMENT` header (signatures redacted) and returns a local verify verdict without settling. See [x402 dev tools](x402-dev-tools.md). || `/api/x402/debug` | free | Diagnoses a failed 402 exchange (`{challenge, payment, response}`) into an ordered `{severity, field, problem, fix}` list. See [x402 dev tools](x402-dev-tools.md). || `/api/x402/verify-receipt` | free | Recomputes a paid response's SHA-256 attestation and confirms a settlement tx on-chain. See [x402 dev tools](x402-dev-tools.md). |diff --git a/pages/payment-outcomes.html b/pages/payment-outcomes.htmlindex 9f22ee0e5..9b86605cc 100644--- a/pages/payment-outcomes.html+++ b/pages/payment-outcomes.html@@ -44,7 +44,7 @@.po-cell-note { font-size: 11.5px; color: rgba(255,255,255,0.35); margin-top: 0.4rem; line-height: 1.5; }.good { color: #2fbf71; }.warn { color: #f0a93b; }- .bad { color: var(--color-danger, #f87171); }+ .bad { color: var(--danger); }.muted { color: rgba(255,255,255,0.35); }.po-pill { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; }diff --git a/pages/print-insert.html b/pages/print-insert.htmlindex fd70cafcb..cbf75826b 100644--- a/pages/print-insert.html+++ b/pages/print-insert.html@@ -1,6 +1,7 @@<!doctype html><html lang="en"><head>+ <style>/* three.ws hidden-guard: make the `hidden` attribute authoritative. See scripts/lib/hidden-guard.mjs */[hidden]{display:none!important}</style><script>/* three.ws theme boot, no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" />diff --git a/prompts/finish/materialize-00-CONTEXT.md b/prompts/finish/materialize-00-CONTEXT.mddeleted file mode 100644index a868cb27c..000000000--- a/prompts/finish/materialize-00-CONTEXT.md+++ /dev/null@@ -1,195 +0,0 @@-# Materialize: shared facts and binding decisions--Every work order in this pack starts by reading this file. It carries the-decisions so the work orders can carry the work. If reality on disk-disagrees with a claim here, reality wins; measure first (each order's-step 0), then update this file in the same commit as the fix.--## What Materialize is--The physical lane of the forge. A user (or a paying AI agent) takes any-finished 3D generation and orders a high-precision physical print of it.-The platform analyzes the mesh for printability, repairs it, previews it at-true scale in AR, quotes a real price, takes payment in USDC on Solana,-routes the job to a fulfillment provider, attests the print on-chain, and-tracks it to delivery.--Origin: an inbound partnership offer (2026-08-13) from a Chinese-high-precision print operator. The partner is unverified and uncontracted.-**Nothing in this campaign blocks on the partner.** The adapter layer plus a-manual-fulfillment lane (a real operator console driving any print bureau-by hand) launches the product; a contracted partner API slots in later as-one more adapter. Signing any partner is an owner action, never an agent-action.--## Naming and routes (decided, do not re-litigate)--- Surface name: **Materialize**. Route: `/materialize`. Page:- `pages/materialize.html`, app `src/materialize.js`.-- API prefix: `/api/print/*` (handlers in `api/print/`). "print" is the- honest verb for the API; "Materialize" is the product name for humans.-- Agent lane: `POST /api/x402/print-order` (file `api/x402/print-order.js`).-- Certificate page: `/cert/:certId` (physical provenance permalink), with- `/cert` as the lookup for a number read off a printed card. NOT `/p/:certId`:- `/p/([a-z0-9-]+)` is already the launchpad route and a certificate id matches- it, so that path would have shadowed a live surface (measured 2026-09-02).- Certificate ids are 24 lowercase hex characters, not uuids, because the id is- printed on a card and encoded into a QR that has to scan off paper.-- Order tracking: `/materialize/orders/:id` for humans;- `GET /api/print/orders/:id` for machines.--## Architecture--```-/m/:id "Materialize" button /materialize page forge result bar x402 agent- │ │ │ │- └────────────┬──────────┴───────────────────┴───────────────┘- ▼- POST /api/print/analyze free, keyless: printability report + score- POST /api/print/prepare repair + scale + export STL/3MF/GLB to R2- GET /api/print/catalog materials, size presets, price parameters- POST /api/print/quote itemized, HMAC-signed, expiring quote- POST /api/print/orders session checkout (Solana USDC)- POST /api/x402/print-order agent checkout (x402 settle, same pipeline)- │- ▼- print_orders row + state machine ── operator console (api/print/ops/*)- │ │- ▼ ▼- fulfillment adapter (manual | partner API) ── status webhooks back in- │- ▼- on-chain certificate (Solana memo attest) + QR ──► /cert/:certId-```--Same design properties as the forge: one orchestrator per concern, adapters-declared as data, failure is a routing event. Read-`docs/forge-pipeline.md` before touching anything; Materialize reuses the-forge's job-token (HMAC), R2 mirroring, and store patterns wholesale.--## OSS decisions (search order honored: existing deps, then npm)--| Need | Use | Status |-|---|---|---|-| Mesh booleans, manifold repair, hollow/offset, volume | `manifold-3d` (Apache-2.0, WASM, the Manifold kernel) | add dependency |-| Decimate, weld, dedup, texture read | `@gltf-transform/{core,extensions,functions}` | already a dep |-| STL export | `three/examples/jsm/exporters/STLExporter` | already a dep (`three`) |-| 3MF writer (zip of XML, OPC layout) | small in-repo writer over `fflate` | `fflate` ships inside three's examples deps; verify with `npm ls fflate`, pin directly if absent |-| Wall-thickness sampling (inward ray casts) | `three-mesh-bvh` | verify with `npm ls three-mesh-bvh`; add if absent |-| QR codes for certificates | `qrcode` | verify; add if absent |--Rules: pin semver ranges (`^x.y.0`). No native-binary deps in `api/`-handlers (Cloud Run image is node-only for the API container); manifold-3d-is WASM, which is why it was chosen over CGAL bindings. If a prepare job-exceeds the request budget on 200k-triangle meshes, promote the prepare-step to a `workers/print-prepare/` Cloud Run worker following any existing-worker's layout; do not silently cap quality instead.--## Database (Neon Postgres, migrations in api/_lib/migrations/)--Tables (one migration per work order that introduces them):--- `print_orders`: id, user_id (nullable only for x402 agent orders, which- carry a payer wallet instead), creation_id (FK forge_creations, nullable- for direct GLB uploads), source_glb_url, prepared_asset_urls JSONB- (stl/3mf/glb on R2), analysis JSONB (the printability report at order- time), material_id, target_height_mm, quantity, quote JSONB (itemized,- with the signed token), price_usdc NUMERIC, status TEXT, provider TEXT,- provider_order_id TEXT, shipping JSONB (name, address lines, country,- phone; nothing else, minimize PII), tracking_number TEXT, timestamps.-- `print_order_events`: order_id, status, note, actor (system | operator |- provider | buyer), created_at. The timeline is this table, never a- mutated column.-- `print_certificates`: id, order_id, creation_id, glb_sha256, edition_no,- edition_of, solana_signature TEXT (null until attested), created_at.--Status machine (enforced in one module, `api/_lib/print-store.js`):-`created → quoted → paid → screening → submitted → printing → quality_check-→ shipped → delivered`, with `rejected` (failed screening, auto-refund-path), `canceled`, and `refunded` as terminal branches. Transitions are-whitelisted pairs; an illegal transition throws. Every transition writes a-`print_order_events` row and publishes a `user_notifications` event via the-existing `publishUserEvent()` vocabulary (extend `USER_EVENT_TYPES` with-one `print` type, mirroring how `market` events landed).--## Money (Solana first, always)--- Human checkout: USDC on Solana through the platform's existing self-hosted- rail (re-derive the exact flow from `api/x402/` and the marketplace- purchase path in step 0 of order 02; reuse, never fork, the settle logic).-- Agent checkout: `POST /api/x402/print-order`, priced per quote (dynamic- 402 amount, same pattern as the market-data endpoints with per-call- pricing). Params rejected pre-settle (422) so a bad request never charges.-- $THREE holders: percentage discount on the print price, applied in the- quote engine from the existing holder-check used by the forge High tier- (`api/_lib/forge-tiers.js` knows the pattern). The discount renders in the- itemized quote, never silently.-- No card processor. Onboarding one is a new external paid API and is- owner-gated; the quote UI says "USDC on Solana" plainly.-- Refunds are operator actions from the console (order 04), recorded as- events; no automatic on-chain sends without the CLAUDE.md gate.--## Pricing model (quote engine, order 02)--`data/print-catalog.json` is the single source of truth: materials (resin-standard/tough, SLS nylon, full-color sandstone, PLA draft, metal-tier-entries marked quote-on-request), each with density, per-cm3 rate,-setup fee, min/max bounding box, finish options, and lead-time days.-Quote = setup + rate * material_volume_cm3 * quantity, plus finish fees,-plus zone-based shipping from volumetric weight; quantity breaks at 5/20.-Numbers come from current published market rates of real print services-(researched at execution time, cited in the catalog file header) with a-declared margin field, all owner-tunable in one file. The engine is pure-and unit-tested; the catalog is data.--## The printability report (order 01, the contract everything reads)--One JSON shape produced by `/api/print/analyze` and stored on the order:-manifold (bool), watertight shells count, self_intersections count,-open_edges count, min_wall_mm (sampled), bbox_mm, volume_cm3 (of the-manifold repair, the number money hangs off), triangles, has_textures,-recommended_min_height_mm per material class, and a 0-100 printability-score with named deductions. Spec lands in `specs/PRINT_PIPELINE.md`-(order 06) and the shape never changes without a version field bump.--## Safety (order 06, gate runs before payment, at `screening` again after)--Fabrication gate over prompt lineage + mesh + reference imagery, extending-`api/_mcp-studio/safety.js` patterns: refuse firearm components and-receivers, working weapon parts, keys to real locks, counterfeit branded-goods and logos, and anything the upstream generation gate already refused.-Deny with an actionable message before money moves; a paid order that-fails second screening auto-enters `rejected` with the refund path. The-gate is code plus tests, not a prompt suggestion.--## Provenance (order 05, the phygital moat)--Every shipped print gets a certificate: SHA-256 of the exact prepared-asset, edition number (DB-enforced), and a Solana attestation (memo-transaction from the platform wallet; devnet in tests, mainnet send is-owner-gated per CLAUDE.md gate 1). The package carries a QR to `/cert/:certId`-showing the spinning original, the prompt lineage, the edition, and the-on-chain proof. Re-derive what `scripts/tokenize-3d-devnet-e2e.mjs` already-proves before writing any new chain code.--## Launch scope vs later (so nobody boils the ocean)--In scope now: single-object prints, five-ish materials, worldwide shipping-zones (CN/US/EU tiers), human + agent checkout, manual fulfillment lane,-certificates, full docs. Explicitly later (note in reports, do not build):-multi-part assemblies, paint/finishing marketplace, creator royalties on-physical sales, holder gift drops, physical goods marketplace. Later items-get designed-for (schema fields where free) but never half-built.--## Standards that bite in this pack--- CLAUDE.md rules apply in full: no mocks, no fake data, no unfinished- markers, every state designed, em-dash banned, explicit-path commits.-- The manual fulfillment lane is real operations, not a mock: a human- operator with a console driving a real bureau is how every print- marketplace on earth launched. Build it as a first-class adapter.-- PII discipline: shipping addresses are the first real PII this platform- stores. Minimum fields, never logged, never in analytics events, surfaced- only to the operator console and the provider adapter.-- Every money number a user sees comes from the quote engine. No price is- ever computed in a frontend file.diff --git a/prompts/finish/materialize-01-printability-engine.md b/prompts/finish/materialize-01-printability-engine.mddeleted file mode 100644index 49b377775..000000000--- a/prompts/finish/materialize-01-printability-engine.md+++ /dev/null@@ -1,125 +0,0 @@-# Work order 01: the printability engine (analyze, repair, export)--**How to run:** paste this whole file into a fresh Claude Code chat in this-repo, or name its path. Read `prompts/finish/materialize-00-CONTEXT.md` first; its-decisions bind this order.--**Binding operating clause:** finish 100%. Never end the session with a-question, an unexecuted plan, or "let me know". CLAUDE.md hard rules apply:-no mocks, no fake data, no unfinished markers, no em-dash anywhere, commit-finished work promptly with explicit paths. Pushes and production deploys-are owner-gated; everything else in this file is yours to do.--## Why this order exists--Every downstream piece (quotes, orders, the page, fulfillment) consumes one-thing: a trustworthy answer to "can this mesh be printed, at what size, and-what exact bytes go to the printer". AI-generated meshes are the worst case-the printing world sees: non-manifold shells, self-intersections, paper-thin-decorations, textures instead of geometry. Turning that into a printable-solid automatically, server-side, at forge scale, is the platform's hard-technical moat. Get this right and everything above it is plumbing.--## Step 0: re-derive current state (never trust status claims, even here)--```-ls api/print/ 2>/dev/null-npm ls manifold-3d three-mesh-bvh fflate 2>/dev/null-grep -rn "print" api/_lib/3d-catalog/ | head-ls tests/api/ | grep -i print-git log --oneline -10 -- api/print src/print-```--Whatever already exists and passes its tests, keep and extend; skip any-task below that is verifiably done. Read `api/3d/inspect.js` end to end-before writing anything: analyze is its sibling and must match its-conventions (keyless, CORS, bounded input, no persistence).--## Tasks--### 1. Dependencies--Add `manifold-3d` (pin `^` range). Verify `fflate` and `three-mesh-bvh`-per the 00-CONTEXT table; add whichever are missing. Log the rationale in-the commit message per CLAUDE.md OSS rules.--### 2. `api/_lib/print/` core modules (pure, unit-testable, no HTTP)--- `mesh-io.js`: load a GLB from a URL or buffer via gltf-transform, merge- primitives, bake node transforms, return indexed positions + uvs +- texture handles. Bound input size (reject > 100 MB or > 2M triangles- with a designed error naming the limit).-- `analyze.js`: produce the printability report exactly as specified in- 00-CONTEXT (manifold check, shells, self-intersections, open edges,- bbox_mm, volume_cm3 via manifold-3d, min-wall sampling via inward- ray casts with three-mesh-bvh over a deterministic sample of surface- points, score with named deductions). Deterministic: same bytes, same- report. Include `version: 1`.-- `repair.js`: manifold reconstruction via manifold-3d (union of shells,- hole fill), optional decimation to a triangle budget via- gltf-transform's simplify, scale-to-target-height, and optional hollow- (manifold offset) with two drain holes for resin economy, gated to- meshes where hollowing is geometrically safe. Every operation returns- metrics before/after so the UI can show what changed.-- `export-stl.js`: binary STL from the repaired mesh (three's STLExporter- or a direct writer; binary only, watertight input asserted).-- `export-3mf.js`: a minimal, spec-correct 3MF writer over fflate: OPC- zip layout, `3D/3dmodel.model` XML, units mm, vertex colors when the- source had textures (sample the base-color texture at each vertex UV in- `mesh-io.js`; this is what makes full-color sandstone prints possible- and no competitor's export button does it). Validate output opens in at- least one real slicer toolchain via a structural test (parse the zip,- validate XML against the 3MF core spec requirements you assert).--### 3. HTTP surface (thin handlers over the core, forge conventions)--- `POST /api/print/analyze` (`api/print/analyze.js`): body- `{glbUrl}` or `{creationId}` (resolve via `api/_lib/forge-store.js`).- Free, keyless, CORS like `api/3d/inspect.js`. Returns the report.-- `POST /api/print/prepare` (`api/print/prepare.js`): body adds- `{targetHeightMm, material, hollow}`. Runs repair + exports, mirrors- STL/3MF/repaired GLB to R2 exactly the way the forge mirrors finished- models (reuse the forge's persistence helper, do not fork it), returns- permanent URLs + the post-repair report. If p95 wall time in your local- measurement exceeds 20s on a 200k-triangle mesh, implement the async- job-token pattern from `api/forge.js` (HMAC token, poll param) instead- of raising timeouts.-- Register both in the free 3D API catalog: new descriptors in- `api/_lib/3d-catalog/` plus the barrel import lines, so `/api/3d` and- its OpenAPI advertise them with zero page edits.--### 4. Tests (vitest, `tests/api/`)--Fixtures: generate three tiny deterministic GLBs in-test (a clean cube, a-two-shell non-manifold, an open-bottom shell); never commit binary blobs.-Cover: report shape and determinism, manifold repair actually closes the-open shell (re-analyze reports manifold true), volume within 1% of the-analytic cube volume, STL byte-level header/count correctness, 3MF zip-structure + color payload presence, both handlers' validation errors, and-the size bounds.--## Definition of done (every line mechanically checkable)--- [ ] `npm test` green, including the new `tests/api/print-*.test.js`.-- [ ] `curl -s localhost:3000/api/print/analyze -d '{"glbUrl":"<a real R2 forge model URL>"}' -H 'content-type: application/json'` returns a version-1 report with a numeric score, on the dev server.-- [ ] The same call against a creationId of a real `forge_creations` row works.-- [ ] `/api/3d` index and `/api/3d/openapi.json` list both new endpoints.-- [ ] `npm run check:rules -- --paths <files you touched>` passes.-- [ ] Deliverables committed with explicit paths; this file deleted in the closing commit (`git rm prompts/finish/materialize-01-printability-engine.md`) and PROGRESS.md appended.--## Never blocked--| Blocker | Resolution |-|---|---|-| manifold-3d WASM will not load in the API runtime | It is plain WASM + JS, no native binding. Check the import style (ESM default export needs `await Manifold.init()` style setup); mirror how other WASM (draco decoders) is handled in this repo. |-| No real GLB URL for the curl check | `psql "$DATABASE_URL" -c "select id, asset_url from forge_creations where status='succeeded' order by created_at desc limit 5"` or generate one on the spot via `POST /api/3d/generate`. |-| R2 credentials | Same env the forge uses; find the mirroring helper by grepping `api/_lib/` for the R2 upload call. They are set in `.env`. |-| Wall-thickness sampling too slow | Sample count is a dial: 2,000 surface points with BVH raycasts is milliseconds. Fix the sample count, document it in the report's `sampling` field, never drop the metric. |-| 3MF spec ambiguity | The core spec is public (3mf.io); assert the small required subset (content types, relationship, model XML with mesh + color group). A structural round-trip test is the arbiter, not a vendor tool. |--## Report format--End the session with: files created/changed (paths), test names added and-their status, the measured analyze/prepare wall times on a real forge-model, any deviation from 00-CONTEXT (one line each, with why), and the-single next action for order 02.diff --git a/prompts/finish/materialize-06-safety-docs-launch.md b/prompts/finish/materialize-06-safety-docs-launch.mddeleted file mode 100644index b5f7ba433..000000000--- a/prompts/finish/materialize-06-safety-docs-launch.md+++ /dev/null@@ -1,129 +0,0 @@-# Work order 06: the fabrication gate, docs, spec, and launch--**How to run:** paste this whole file into a fresh Claude Code chat in this-repo, or name its path. Read `prompts/finish/materialize-00-CONTEXT.md` first; its-decisions bind this order.--**Binding operating clause:** finish 100%. Never end with a question or an-unexecuted plan. CLAUDE.md hard rules apply: no mocks, no fake data, no-unfinished markers, no em-dash, explicit-path commits. Production deploy-and any public announcement remain owner-gated; this order ends with the-ship being one command and one yes.--## Why this order exists--Physical manufacturing raises the stakes of everything the platform-already moderates: a refused image generation costs nothing, a printed-firearm component is a crime. The gate must be code. And a surface this-novel without docs is invisible: the docs are how users, agents, and the-partner's engineers discover that prompt-to-object exists. This order-closes both, then assembles the launch.--## Step 0: re-derive current state--```-ls prompts/materialize/ # which orders already retired?-ls docs/materialize.md specs/PRINT_PIPELINE.md 2>/dev/null-grep -n "print" data/changelog.json | head-cat api/_mcp-studio/safety.js | head -80-npm test -- tests/api/print 2>/dev/null | tail -3-grep -rn "screening" api/_lib/print-store.js | head-```--All prior orders' deliverables must be verified on disk (the shrinking-pack directory is the ledger, but verify the code, not the ledger). Any-gap found belongs to this session now; fix it, never report around it.--## Tasks--### 1. The fabrication gate (`api/_lib/print/gate.js`)--Runs twice per order: at quote time (cheap, fail fast, nothing charged)-and again on the `paid → screening` transition (thorough, auto-`rejected`-+ refund path on failure). Layers, all real code with tests:--- Reuse the upstream generation safety verdicts: a creation the forge- gate flagged never reaches a printer (re-derive where forge/mcp-studio- verdicts are recorded; read `api/_mcp-studio/safety.js` and- `docs/mcp-safety.md`).-- Fabrication-specific denylist evaluated over prompt lineage + model- title + buyer note: firearm parts and receivers, suppressors, working- weapon mechanisms, keys or bypass tools for real locks, counterfeit- branded goods and logos/trademarks, ammunition. Structured rules with- per-rule tests, not one regex blob.-- LLM screening pass over the same lineage through the platform's- existing LLM chain (`api/_lib/llm.js`) with a constrained verdict- schema, results recorded on the order (`analysis.screening`), the- denylist always winning over a permissive LLM verdict.-- Geometry heuristics where cheap and honest (e.g. blade-profile aspect- ratios are NOT reliably detectable; do not pretend otherwise, and say- so in the spec's limitations section).--Every refusal is designed UX: names the category, links the content-policy, offers what is allowed. Refusals emit the same ops-channel-notification as stalls (order 04), so a human reviews edge cases.--### 2. The spec (`specs/PRINT_PIPELINE.md`)--The wire contracts other code depends on: printability report v1 (every-field, units, the score deductions), quote token claims, order states +-legal transitions, adapter interface, webhook envelope + HMAC, certificate-memo payload, gate verdict shape and its stated limitations. Follow the-depth of the neighboring specs in `specs/`.--### 3. Docs (every layer from CLAUDE.md's documentation section)--- `docs/materialize.md`: the feature doc, zero-context reader, linked- from `docs/start-here.md` and `docs/nav.json` per how sibling docs are- wired. Covers the user flow, materials, pricing model shape, the agent- lane with a runnable x402 example, certificates, and the content- policy.-- `docs/api-reference.md`: the `/api/print/*` endpoints in the house- format; the x402 endpoint listed with its siblings.-- STRUCTURE.md: one row for Materialize mapping every path this campaign- created.-- `data/changelog.json`: one holder-readable entry (tags: feature), plus- a second entry if certificates shipped separately. `npm run build:pages`- validates.-- MCP: if the platform's MCP studio exposes forge tools, add the- analyze/quote tools there so agents discover the lane the same way they- discovered generation (re-derive the tool registry location; follow an- existing tool's shape end to end including its safety wiring).--### 4. Launch assembly--- `npm run audit:docs` green; `npm test` green; `npm run gate` run and- triaged (fix what your campaign broke; pre-existing reds noted per the- never-blocked table).-- Walk the CLAUDE.md definition-of-done checklist against the whole- surface in a real browser and record it in the report.-- Owner ship-list, one message: deploy command (`npm run deploy:gcp:full`- after the runbook's worktree steps), the partner/env residuals from- order 04, mainnet cert approval from order 05, and suggested changelog- timing. Nothing else may remain.--## Definition of done--- [ ] Gate tests cover every denylist category (allow + deny cases) and the two run points; `npm test` green.-- [ ] A crafted violating order is refused at quote time on the dev server, and a paid fixture reaching `screening` auto-rejects, both evidenced in the report.-- [ ] `specs/PRINT_PIPELINE.md` exists and matches the shipped code (spot-check three fields against live responses).-- [ ] `npm run audit:docs` passes; changelog entry validates via `npm run build:pages`.-- [ ] STRUCTURE.md row, docs/nav.json wiring, api-reference section all present.-- [ ] `npm run check:rules -- --paths <files you touched>` passes.-- [ ] Committed with explicit paths; this file AND the campaign README/context retire per the pack's retirement policy once PROGRESS.md records final evidence.--## Never blocked--| Blocker | Resolution |-|---|---|-| Upstream verdict storage unclear | Read the mcp-studio safety module and grep where its verdicts persist; if generation verdicts are not persisted, gate on re-evaluation of the lineage text and note the gap as a one-line owner FYI, not a stall. |-| LLM chain budget | The free-first chain in `api/_lib/llm.js` is the platform default; screening prompts are short. Use it as-is. |-| `npm run gate` has pre-existing reds | Fix what blocks your verification path; list the rest with one line each. Never let someone else's red stop your green (CLAUDE.md playbook). |-| Content-policy page to link | If none exists for fabrication, add the section to the existing policy/legal page the platform links elsewhere; a refusal must never link a 404. |-| Announcement copy | Changelog entry is the deliverable; social/announce content is owner-gated publishing and goes in the ship-list message only. |--## Report format--The final campaign report: every order's deliverables verified on disk,-gate evidence, docs/audit results, the one-message owner ship-list, and-PROGRESS.md's closing entry.diff --git a/prompts/finish/materialize-PROGRESS.md b/prompts/finish/materialize-PROGRESS.mdindex a361d9e06..8edf1c0ff 100644--- a/prompts/finish/materialize-PROGRESS.md+++ b/prompts/finish/materialize-PROGRESS.md@@ -213,3 +213,86 @@ what was verified (commands/evidence), owner items surfaced. Never record`PRINT_CERT_MAINNET_APPROVAL` on the Cloud Run service; without the secondthe certificate is issued and left unattested rather than downgraded to adevnet signature. Deliberately untriggered here (CLAUDE.md gate 1).++- 2026-09-02: Order 06 (fabrication gate, spec, docs, launch) shipped. The+ campaign is closed; 00-CONTEXT, 01, 06 and the README are retired in this+ commit and this log is the surviving record.+ THE GATE. `api/_lib/print/rules.js` carries the denylist as structured rules,+ one per category with its own buyer-facing message and its own "what is+ allowed instead" line: firearm components, suppressors and solvent traps,+ ammunition and feeding devices, keys and lock-bypass tools, counterfeit and+ trademark goods, working weapon mechanisms, drug paraphernalia, plus one SOFT+ rule for realistic weapon likeness. `api/_lib/print/gate.js` layers them:+ the generation content classifier (narrowed to its four scale-independent+ categories, see the deviation below), the denylist, a scale signal, then the+ platform LLM chain. The denylist always wins; the model can only ADD a+ refusal, and it is not called at all once a hard rule fires.+ TWO RUN POINTS, both wired, neither advisory. At quote time+ `api/print/quote.js` runs the deterministic layers before any price exists+ and answers 451 with the category, the policy link and the allowed+ alternative, so a refusal costs the buyer nothing and a price is never gated+ on a third-party model being up. After payment the screening pass runs as a+ third pass inside `api/cron/print-orders-sync.js` (it makes a model call, so+ it must not sit in a checkout request), records the verdict on+ `analysis.screening`, and moves a failure to `rejected`. `submitOrder()` now+ refuses any order without a recorded `allow` verdict, so the gate cannot be+ clicked past from the operator console.+ Also shipped by this order: `specs/PRINT_PIPELINE.md` (six versioned wire+ contracts: printability report, quote token, order states, gate verdict,+ adapter interface, webhook envelope, certificate memo, plus a stated+ limitations section), `docs/materialize.md` wired into `docs/nav.json`,+ `docs/start-here.md` and `data/pages.json`, the `/api/print/*` section of+ `docs/api-reference.md`, the STRUCTURE.md row, three changelog entries, and+ two MCP tools (`print_analyze`, `print_quote` in `api/_mcp/tools/print.js`)+ so an agent discovers the print lane in the same list it discovered+ generation. Tests: `print-fabrication-gate` (36), `print-gate-wiring` (7),+ `print-mcp-tools` (9).+ GAPS FROM EARLIER ORDERS, closed here rather than reported: order 01 never+ registered its endpoints in the free 3D API catalog, so `/api/3d` and its+ OpenAPI did not advertise the print lane at all; `api/_lib/3d-catalog/+ print-quote.js` and `print-prepare.js` plus the static barrel fix that, and+ both now appear in the live index and in `/api/3d/openapi.json` (verified).+ `src/materialize-order.js` shipped an inline `onclick="location.reload()"`+ on its error-state Try again button, which the site CSP blocks, so the only+ way out of that state did nothing; it is delegated now.+ `pages/print-insert.html` resolved no `[hidden]` guard.+ VERIFIED. Gate unit + wiring + MCP suites green (52 tests). Against a local+ `server/index.mjs` on the production database with the page served by vite:+ a clean quote returns 33.87 USDC with `screening.verdict: allow`, and three+ crafted violating orders (an AR-15 lower receiver, a suppressor baffle asked+ for in the buyer note, a bump key) each answer 451 with the right category+ and no price and no token in the body. Run point 2 was proven end to end on+ real rows: two orders walked created -> quoted -> paid -> screening, the+ violating one auto-rejected with the category and the policy link on its+ timeline and `allow`/`refuse` stored under `analysis.screening`, the+ ordinary one stayed in screening, and both rows were deleted afterwards (0+ remaining). No USDC moved: the `paid` transition was driven through the+ store with a note saying so, per CLAUDE.md gate 1. The LLM layer was proven+ separately against the live chain (OVH Llama-3.3-70B refused "a compact+ carry pistol, life accurate, for range use"). Browser walk: `/materialize`+ at 320, 768 and 1440 with zero horizontal overflow and no page-code console+ errors, and `/docs/materialize#content-policy` resolves to a real anchor+ (`id="content-policy"`), which is what keeps a refusal from linking a 404.+ `npm run audit:docs` clean (1480 files). `npm run gate`: every step passes+ except `audit:tokens`, which reports 8 hardcoded token hexes across four+ pages unrelated to this campaign (motion, oracle-lab, stream,+ threews-claim); the one drifted hex that WAS this campaign's+ (`pages/payment-outcomes.html`) is fixed. A peer session is visibly working+ that list down.+ DEVIATIONS FROM 00-CONTEXT, one line each. (1) There is no+ `POST /api/print/analyze`: order 02 merged analysis into+ `POST /api/print/quote`, which returns the report alone when no material is+ given. That is one round trip instead of two and is what the docs, the spec+ and the MCP tools describe; no stale reference to the old path survives.+ (2) The upstream generation classifier is honoured for csam, sexual, gore+ and hate only. Its fifth category refuses the bare word "pistol", which+ would refuse every tabletop miniature carrying one; weapons and drug+ paraphernalia are owned by the fabrication rules instead, which distinguish+ a display piece from a working part. (3) Generation safety verdicts are not+ persisted anywhere (`checkPromptSafety` refuses inline and stores nothing,+ and the main `/forge` lane never called it), so the gate re-evaluates the+ lineage rather than reading a stored verdict. Owner FYI, not a blocker.+ OWNER ITEMS carried out of this campaign are collected in the closing+ report: the devnet SOL for the certificate attester, the mainnet+ certificate approval pair, the partner and ops env vars from order 04, and+ the catalog rates to tune against a real bureau quote.diff --git a/prompts/finish/materialize-README.md b/prompts/finish/materialize-README.mddeleted file mode 100644index 1cf22a070..000000000--- a/prompts/finish/materialize-README.md+++ /dev/null@@ -1,46 +0,0 @@-# materialize: forge output becomes a physical object in the buyer's hands--This campaign builds **Materialize**, the lane that takes any three.ws forge-creation from GLB to a high-precision physical print delivered to a door.-The complete loop: prompt or photo, generated 3D model, printability analysis-and automatic repair, true-scale AR preview, itemized quote, Solana USDC-checkout (human or paying AI agent over x402), fulfillment through a-provider adapter, an on-chain birth certificate linking the physical object-back to its generation record, and a tracked delivery.--Nobody has shipped this loop end to end. Pieces exist elsewhere (print-bureaus have upload forms, AI 3D vendors have download buttons), but no-platform closes prompt-to-object in one surface, and no platform lets an AI-agent pay for a physical object of a model it just generated. That second-one is the headline: the x402 print endpoint makes three.ws the first place-where an autonomous agent can order manufacturing.--## Files--| File | Work order | Depends on |-|---|---|---|-| [00-CONTEXT.md](materialize-00-CONTEXT.md) | Shared facts: architecture, schema, naming, OSS decisions, launch scope. Read first, always. | none |-| [01-printability-engine.md](materialize-01-printability-engine.md) | Mesh analysis, repair, and print-format export (STL, 3MF, color) | none |-| [02-quote-order-payments.md](materialize-02-quote-order-payments.md) | Material catalog, quote engine, order state machine, Solana + x402 checkout | 01 |-| [03-materialize-surface.md](materialize-03-materialize-surface.md) | The /materialize page, entry points across the platform, true-scale AR | 01, 02 |-| [04-fulfillment-ops.md](materialize-04-fulfillment-ops.md) | Provider adapter layer, operator fulfillment console, partner onboarding | 02 |-| [05-provenance-phygital.md](materialize-05-provenance-phygital.md) | On-chain print certificates, editions, QR link from object to record | 02 |-| [06-safety-docs-launch.md](materialize-06-safety-docs-launch.md) | Fabrication content gate, docs, spec, changelog, launch checklist | all |-| [PROGRESS.md](materialize-PROGRESS.md) | Cross-chat handoff log. Append on finish. | none |--Run order: 01 first (everything consumes its analysis and export layer),-then 02, then 03/04/05 in any order or in parallel, then 06 to close.-Every order re-derives current state in its step 0, so re-running a-half-finished order is always safe.--## Relation to other packs--The swarm-100 orders in prompts/finish/ audit what exists; this pack builds a-new surface, like the roadmap orders. Where a swarm-100 sweep later touches `api/print/*` or-`/materialize`, both re-derive state first, so order does not matter.--## Retirement--A finished work order is deleted in the same commit as its last deliverable-(git rm, explicit path), per the prompts/README.md retirement policy. The-campaign retires when all six are gone and PROGRESS.md records the evidence.diff --git a/prompts/finish/production-100-00-INDEX.md b/prompts/finish/production-100-00-INDEX.mdindex 6c72e0931..7e4e493b2 100644--- a/prompts/finish/production-100-00-INDEX.md+++ b/prompts/finish/production-100-00-INDEX.md@@ -96,7 +96,7 @@ run in parallel, H waits on owner gates, I is anytime, J is the parallel swarm.| [../roadmap/developer-resources-repos.md](roadmap-developer-resources-repos.md) | Agent side shipped (`export:satellites` stages 70 files offline); blocked on OWNER-ACTIONS row 16, then the cross-links. || [../roadmap/native-widgets.md](roadmap-native-widgets.md) | Tasks 1 to 3 built (card endpoint, Android widget, Windows manifest); two commits await the deploy; task 4 needs row 17. || [../gcp-credits/05-catalog-animation-seeding.md](gcp-credits-05-catalog-animation-seeding.md) | Partial: the catalog seed runs at scale (56,898 avatars); the generated motion library has 0 clips. |-| [../materialize/README.md](materialize-README.md) | Six orders, zero code; design-only pack. |+| Materialize (retired 2026-09-02) | Shipped: the print engine, quote and catalog, checkout on both lanes, fulfillment adapters and the operator console, on-chain certificates, the fabrication gate, docs and `specs/PRINT_PIPELINE.md`. Evidence in [materialize-PROGRESS.md](materialize-PROGRESS.md). || [../simulation-ready/01-architecture.md](simulation-ready-01-architecture.md) | Kernel, spec and schema exist; 0.5 of 8 build tasks done. || Trading trio (see [../roadmap/00-README.md](roadmap-00-README.md)) | Three plans, largely absorbed by shipped surfaces; every commit touching them is gated. |diff --git a/public/mcp-catalog.json b/public/mcp-catalog.jsonindex 4b1cfc9c6..47bdfd10b 100644--- a/public/mcp-catalog.json+++ b/public/mcp-catalog.json@@ -2,15 +2,15 @@"$comment": "Generated by scripts/build-mcp-catalog.mjs from the tool definitions and price maps in this repo. Do not edit by hand: npm run build:mcp-catalog regenerates it and npm run audit:mcp-catalog fails the build when it is stale.","docs": "https://three.ws/docs/mcp-safety","counts": {- "tools": 299,+ "tools": 301,"servers": 39,- "free": 271,+ "free": 273,"paid": 28,- "read": 201,+ "read": 203,"write": 76,"irreversible": 22,- "withSchema": 299,- "withArguments": 277+ "withSchema": 301,+ "withArguments": 279},"servers": [{@@ -251,7 +251,7 @@"endpoint": "/api/mcp","transport": "remote","auth": "oauth-or-x402",- "tools": 50+ "tools": 52},{"id": "threews-3d-studio",@@ -10726,6 +10726,120 @@},"source": "api/_mcp/tools/oracle.js"},+ {+ "name": "print_analyze",+ "title": "Check whether a 3D model can be printed",+ "description": "Measure a 3D model for real-world manufacturing: whether it is a closed solid, how many separate bodies it contains, how many holes it has, its thinnest wall, its exact volume, and a 0-100 printability score with named reasons. Also returns, per material, the smallest height the model can be printed at and still hold its detail. Free, keyless, and read-only: nothing is ordered. Pass a three.ws creation_id or any public glb_url.",+ "server": {+ "id": "three.ws",+ "title": "three.ws",+ "endpoint": "/api/mcp",+ "transport": "remote",+ "auth": "oauth-or-x402"+ },+ "safety": "read",+ "annotations": {+ "readOnlyHint": true,+ "destructiveHint": false,+ "idempotentHint": true,+ "openWorldHint": true+ },+ "price": {+ "usd": 0,+ "free": true+ },+ "inputSchema": {+ "type": "object",+ "properties": {+ "creation_id": {+ "type": "string",+ "description": "A three.ws forge creation id."+ },+ "glb_url": {+ "type": "string",+ "format": "uri",+ "description": "Public https URL of a .glb file, instead of a creation id."+ }+ },+ "additionalProperties": false+ },+ "source": "api/_mcp/tools/print.js"+ },+ {+ "name": "print_quote",+ "title": "Price a real 3D print and get a signed quote",+ "description": "Price a physical print of a 3D model: an itemized quote in USDC (build setup, material with the exact volume it was computed from, finish, quantity break, shipping) plus a signed quote token valid for 24 hours. Materials, size limits and lead times come from GET /api/print/catalog. This tool does NOT place an order and moves no money: settle the token at POST /api/x402/print-order when you have a shipping address. Free and keyless.",+ "server": {+ "id": "three.ws",+ "title": "three.ws",+ "endpoint": "/api/mcp",+ "transport": "remote",+ "auth": "oauth-or-x402"+ },+ "safety": "read",+ "annotations": {+ "readOnlyHint": true,+ "destructiveHint": false,+ "idempotentHint": true,+ "openWorldHint": true+ },+ "price": {+ "usd": 0,+ "free": true+ },+ "inputSchema": {+ "type": "object",+ "properties": {+ "creation_id": {+ "type": "string",+ "description": "A three.ws forge creation id."+ },+ "glb_url": {+ "type": "string",+ "format": "uri",+ "description": "Public https URL of a .glb file, instead of a creation id."+ },+ "material_id": {+ "type": "string",+ "description": "Material id from the catalog, e.g. resin-standard. Omit to list what fits."+ },+ "finish_id": {+ "type": "string",+ "description": "Optional finish id from that material."+ },+ "target_height_mm": {+ "type": "number",+ "minimum": 1,+ "maximum": 1000,+ "description": "Printed height in millimetres."+ },+ "quantity": {+ "type": "integer",+ "minimum": 1,+ "maximum": 500,+ "default": 1,+ "description": "How many. Price breaks at 5 and 20."+ },+ "country": {+ "type": "string",+ "minLength": 2,+ "maxLength": 2,+ "description": "ISO 3166-1 alpha-2 destination, for shipping."+ },+ "hollow": {+ "type": "boolean",+ "description": "Hollow the solid where it is geometrically safe. Lowers the price."+ },+ "note": {+ "type": "string",+ "maxLength": 500,+ "description": "Optional note about the intended object. Read by the fabrication safety gate."+ }+ },+ "additionalProperties": false+ },+ "source": "api/_mcp/tools/print.js"+ },{"name": "pumpfun_creator_intel","title": "Pump.fun creator intel",diff --git a/scripts/lib/hidden-guard.mjs b/scripts/lib/hidden-guard.mjsindex 6462ea6e4..4ca5d5cba 100644--- a/scripts/lib/hidden-guard.mjs+++ b/scripts/lib/hidden-guard.mjs@@ -28,7 +28,7 @@ export const GUARD_RE = /\[hidden\][^{]*\{[^}]*display\s*:\s*none/i;// MARKER makes injection idempotent and lets the audit recognise stamped pages.export const MARKER = 'three.ws hidden-guard';export const INLINE_GUARD =- `<style>/* ${MARKER} — make the \`hidden\` attribute authoritative; see scripts/lib/hidden-guard.mjs */` ++ `<style>/* ${MARKER}: make the \`hidden\` attribute authoritative. See scripts/lib/hidden-guard.mjs */` +`[hidden]{display:none!important}</style>`;/** Resolve a CSS href/import to an absolute path on disk, or null (external CDN). */diff --git a/tests/fixtures/mcp-golden-tools.json b/tests/fixtures/mcp-golden-tools.jsonindex 8f68c70d3..9f9651ee9 100644--- a/tests/fixtures/mcp-golden-tools.json+++ b/tests/fixtures/mcp-golden-tools.json@@ -516,6 +516,24 @@"schemaHash": "7187ef4e7b09"}],+ "api/_mcp/tools/print.js": [+ {+ "name": "print_analyze",+ "title": "Check whether a 3D model can be printed",+ "descHead": "dynamic",+ "descHash": "dynamic",+ "annotations": "ref:PRINT_ANNOTATIONS",+ "schemaHash": "84a63f274adc"+ },+ {+ "name": "print_quote",+ "title": "Price a real 3D print and get a signed quote",+ "descHead": "dynamic",+ "descHash": "dynamic",+ "annotations": "ref:PRINT_ANNOTATIONS",+ "schemaHash": "8638cfe3d36d"+ }+ ],"api/_mcp/tools/pumpfun.js": [{"name": "pumpfun_creator_intel",diff --git a/tests/print-adapter-contract.test.js b/tests/print-adapter-contract.test.jsindex dfb2ebffc..65ae5a011 100644--- a/tests/print-adapter-contract.test.js+++ b/tests/print-adapter-contract.test.js@@ -5,7 +5,7 @@// API becomes a config change rather than a rebuild. That only holds if every// lane is held to one shape.//-// `partner-cn` is deliberately uncontracted (materialize-00-CONTEXT): the paths+// `partner-cn` is deliberately uncontracted (Materialize campaign, order 04): the paths// exercised below are the ones that run WITHOUT partner credentials plus the// two that need only the HMAC secret, which the test supplies itself.