diff --git a/.agents/rules/runtime-tsdown-build-isolation.mdc b/.agents/rules/runtime-tsdown-build-isolation.mdc index cb475135..93abd6e4 100644 --- a/.agents/rules/runtime-tsdown-build-isolation.mdc +++ b/.agents/rules/runtime-tsdown-build-isolation.mdc @@ -7,8 +7,8 @@ alwaysApply: false # Runtime `tsdown build()` must be isolated from the package build config Some packages call tsdown's programmatic `build()` at **runtime** (not as their -own build step) — e.g. `@prisma/compose-node` and `@prisma/compose-nextjs` bundle the -user's server inside `assemble()` during `prisma-compose deploy`. +own build step) — e.g. `@prisma/composer-node` and `@prisma/composer-nextjs` bundle the +user's server inside `assemble()` during `prisma-composer deploy`. tsdown's `build()` **auto-discovers a `tsdown.config.ts`** from the working directory. Every publishable package now has one (it enables tsdown's `exports` diff --git a/.agents/rules/test-import-patterns.mdc b/.agents/rules/test-import-patterns.mdc index c49520bb..9f100240 100644 --- a/.agents/rules/test-import-patterns.mdc +++ b/.agents/rules/test-import-patterns.mdc @@ -12,12 +12,12 @@ workspace package decides what it exercises. ## Within-package tests - **Import from source** (`../foo.ts`, `./foo.ts`) — not from the package's own - identifier. Importing your own package by name (`@prisma/compose`) resolves to its + identifier. Importing your own package by name (`@prisma/composer`) resolves to its built `dist/`, which is stale relative to the source you are editing. ## Cross-package / integration tests -- **Import from the package identifier** (`@prisma/compose`, `@prisma/compose-cloud`, …) +- **Import from the package identifier** (`@prisma/composer`, `@prisma/composer-cloud`, …) to verify the real public surface. This resolves to `dist/`, so the dependency must be built first — the `test`/`typecheck` turbo tasks build deps up front, and CI builds before testing (see diff --git a/.agents/rules/tsdown-config-package-source-only.mdc b/.agents/rules/tsdown-config-package-source-only.mdc index 111bd8f7..1708e87c 100644 --- a/.agents/rules/tsdown-config-package-source-only.mdc +++ b/.agents/rules/tsdown-config-package-source-only.mdc @@ -1,12 +1,12 @@ --- -description: Keep @prisma/compose-tsdown source-only exports +description: Keep @prisma/composer-tsdown source-only exports alwaysApply: false globs: ["packages/tsdown-config/**"] --- -# @prisma/compose-tsdown source-only policy +# @prisma/composer-tsdown source-only policy -The package `packages/tsdown-config` (`@prisma/compose-tsdown`) is the shared tsdown +The package `packages/tsdown-config` (`@prisma/composer-tsdown`) is the shared tsdown base config. It is source-only and must not add emitted JavaScript artifacts to work around runtime config loading. diff --git a/.agents/rules/workspace-package-not-found.mdc b/.agents/rules/workspace-package-not-found.mdc index a9230746..54cb4bcf 100644 --- a/.agents/rules/workspace-package-not-found.mdc +++ b/.agents/rules/workspace-package-not-found.mdc @@ -1,19 +1,19 @@ --- -description: "A missing workspace package (Cannot find module '@prisma/compose-*' / '@prisma/compose-alchemy' / 'prisma-compose', ERR_MODULE_NOT_FOUND / bun ResolveMessage) is a build/install-state issue, not a code bug — verify with require.resolve (pnpm links per-consumer, not repo root), then pnpm build (stale dist) / pnpm install (new dep)" +description: "A missing workspace package (Cannot find module '@prisma/composer-*' / '@prisma/composer-alchemy' / 'prisma-composer', ERR_MODULE_NOT_FOUND / bun ResolveMessage) is a build/install-state issue, not a code bug — verify with require.resolve (pnpm links per-consumer, not repo root), then pnpm build (stale dist) / pnpm install (new dep)" globs: [] alwaysApply: true --- # A missing workspace package is a build/install state issue, not a code bug -The workspace's own packages — `@prisma/compose`, `@prisma/compose-*`, `@prisma/compose-alchemy`, -and the unscoped `prisma-compose` — build to `dist/` and export from there. When one +The workspace's own packages — `@prisma/composer`, `@prisma/composer-*`, `@prisma/composer-alchemy`, +and the unscoped `prisma-composer` — build to `dist/` and export from there. When one of them fails to resolve ("Cannot find module", `ERR_MODULE_NOT_FOUND`, or bun's `ResolveMessage`), don't chase it as an import/tsconfig/deps bug. 1. **Verify — a repo-root check lies.** pnpm links workspace packages into the *consumer's* `node_modules`, never at the repo root: - `node -e "require.resolve('@prisma/compose-node', { paths: ['test/integration'] })"`. + `node -e "require.resolve('@prisma/composer-node', { paths: ['test/integration'] })"`. 2. **Resolves but still fails → stale `dist`** (these packages export `dist/`): run `pnpm build`. Cross-package (and self-name) imports only resolve once the dependency's dist exists; the `test`/`typecheck` turbo tasks build deps first, diff --git a/.claude/agents/agent-os/designer.md b/.claude/agents/agent-os/designer.md index 61e1d870..5c562348 100644 --- a/.claude/agents/agent-os/designer.md +++ b/.claude/agents/agent-os/designer.md @@ -6,7 +6,7 @@ color: purple model: inherit --- -You are a design facilitation specialist for Prisma Compose. +You are a design facilitation specialist for Prisma Composer. Your job is to facilitate product/architecture design discussions and turn outcomes into incremental updates to the design documentation framework under `docs/design/`. diff --git a/.claude/agents/domain-modeler.md b/.claude/agents/domain-modeler.md index d738ba58..9cdeb609 100644 --- a/.claude/agents/domain-modeler.md +++ b/.claude/agents/domain-modeler.md @@ -29,7 +29,7 @@ This agent is designed to be “set loose”: you do the research, make reasonab 4. **Separate stable research from evolving takeaways** - Keep “how the system works” relatively stable in research docs. - - Keep “what Prisma Compose should do because of it” in a separate takeaways doc that can evolve. + - Keep “what Prisma Composer should do because of it” in a separate takeaways doc that can evolve. 5. **Be explicit about uncertainty** - Track open questions and assumptions at the end of each doc. @@ -85,8 +85,8 @@ Produce this set of files (mirrors the `TanStack/` pattern): - the user mental model and how it maps to underlying mechanics - `execution-flows.md` - the “always happening” flows (deploy lifecycle, routing, local dev loops, etc.) -- `takeaways-for-prisma-compose.md` - - explicitly evolving: what Prisma Compose should emulate/adapt, plus design questions raised +- `takeaways-for-prisma-composer.md` + - explicitly evolving: what Prisma Composer should emulate/adapt, plus design questions raised Writing guidelines: - Prefer **small, scannable** docs over one huge one. @@ -112,10 +112,10 @@ When asked to “model Cloudflare + Wrangler”, a successful output usually inc - A new folder: `docs/design/04-inspirations/Cloudflare/` (or similarly named) - The standard library docs listed above, cross-linked and consistent -- A takeaways doc that cleanly separates “research facts” from “Prisma Compose implications” +- A takeaways doc that cleanly separates “research facts” from “Prisma Composer implications” ## Guardrails -- Do **not** change Prisma Compose’s core domain docs (`docs/design/03-domain-model/`, `docs/design/10-domains/`) unless the user explicitly asks you to translate research into Prisma Compose design changes. +- Do **not** change Prisma Composer’s core domain docs (`docs/design/03-domain-model/`, `docs/design/10-domains/`) unless the user explicitly asks you to translate research into Prisma Composer design changes. - Do **not** create ADRs unless the user explicitly indicates a decision has been made. - Prefer documenting what you can verify; label inferred models as assumptions. diff --git a/.drive/deferred.md b/.drive/deferred.md index bf3a81a3..9947c3ed 100644 --- a/.drive/deferred.md +++ b/.drive/deferred.md @@ -11,7 +11,7 @@ - **"Built output missing" error not covered by CLI-package tests — closed by S5.** `test/integration/test/cli.entry-anchored-resolution.test.ts` now drives the real CLI binary against a real, unbuilt fixture app and asserts - on the real "no built entry at" message from `@prisma/compose-node`'s assembler. + on the real "no built entry at" message from `@prisma/composer-node`'s assembler. Origin: S3 review. - **CLI publishability — closed by S5.** The CLI no longer depends on any target/adapter pack; resolution is anchored at the app's entry package via @@ -31,7 +31,7 @@ encryption at rest. 2. **Reserved/unique project names** — PDP allows duplicate project names (verified 2026-07-09), so name-based discovery of control-plane projects - (`prisma-compose-state`) is ambiguous and squattable; the client-side ownership + (`prisma-composer-state`) is ambiguous and squattable; the client-side ownership marker (bootstrap.ts `verifyOwnership`) is a workaround. Ask: unique names per workspace, or atomic create-if-absent, or a system-project concept. Related: workspace ids circulate in two shapes (`wksp_`-prefixed in API @@ -59,26 +59,26 @@ the standing concern). - **Deterministic Next-standalone artifact** (BUILD_ID non-determinism → Next services re-version on unchanged redeploys). -- **`@prisma/compose-node` rename** (descriptor kind means "plain server process", +- **`@prisma/composer-node` rename** (descriptor kind means "plain server process", not Node.js runtime — needs operator naming call). - **Interval-lease follow-ups from R8/R9 reviews**: `--wait` affordance on lock contention; connection-cap telemetry for the state store. -- **CI workspace sweep** (operator/token): ~17 duplicate `prisma-compose-state` +- **CI workspace sweep** (operator/token): ~17 duplicate `prisma-composer-state` projects accumulated in the CI workspace during the id-shape bug; deploys are stable (deterministic oldest-first adoption) but they're quota noise. - **core-model.md R6 absorption**: the doc's type sketches (Nodes, factories, Graph, SystemBuilder) predate R6 — `expose`, `ConnectionEnd.required`, ref-ports, the two-overload `provision()`, and required `name`/`pack` are shipped but absent from the sketches. The false "not yet built" claims and - the missing `@prisma/compose-rpc` entry-map row were fixed at close-out; absorbing + the missing `@prisma/composer-rpc` entry-map row were fixed at close-out; absorbing the full mechanism into the sketches is a docs slice of its own (connection-contracts.md is the accurate record meanwhile). # Stage-as-branch — deferred (2026-07-12) - **Route container resolution through the extension, not the CLI.** Today - `@prisma/compose-cli` hard-codes the Prisma Cloud specifics of stage resolution: - it imports `@prisma/compose-alchemy`'s `resolveContainer`/`deleteBranch` directly and + `@prisma/composer-cli` hard-codes the Prisma Cloud specifics of stage resolution: + it imports `@prisma/composer-alchemy`'s `resolveContainer`/`deleteBranch` directly and sets the target-specific `PRISMA_PROJECT_ID`/`PRISMA_BRANCH_ID` env vars on the alchemy child (`run-alchemy.ts`). That is Prisma Cloud config leaking into the otherwise target-agnostic CLI — accepted for the first @@ -91,9 +91,9 @@ # Auth — deferred (2026-07-12) - **Adopt the `@prisma/cli` credential mechanism; stop rolling our own auth.** - `@prisma/compose` authenticates the Management API with a static + `@prisma/composer` authenticates the Management API with a static `PRISMA_SERVICE_TOKEN` read from the env and sent as a raw `Bearer` header - (`@prisma/compose-alchemy` `credentials.ts` `fromEnv()` → `client.ts` + (`@prisma/composer-alchemy` `credentials.ts` `fromEnv()` → `client.ts` `createManagementApiClient({ token })`) — no login, no refresh, no stored credential; a long-lived plaintext token in `.env`. `@prisma/cli` already solves this: interactive `prisma auth login` (PKCE OAuth against @@ -101,8 +101,8 @@ `PRISMA_SERVICE_TOKEN` as the CI/non-interactive fallback. The same SDK ships the machinery we're not using (`@prisma/management-api-sdk`: `createManagementApiSdk` + `createTokenRefreshingFetch`). Ask: reuse the - prisma CLI's credential resolution in `@prisma/compose` — ideally its own loader, - so we don't reimplement the store/refresh — so `prisma-compose deploy` + prisma CLI's credential resolution in `@prisma/composer` — ideally its own loader, + so we don't reimplement the store/refresh — so `prisma-composer deploy` authenticates exactly like the rest of the CLI and we maintain no auth of our own. Touches `credentials.ts`, `client.ts`, `app-cli/ensure-containers.ts`, and the token-based state-store bootstrap (`state/bootstrap.ts`). Origin: auth diff --git a/.drive/next-session-brief.md b/.drive/next-session-brief.md index e6366da8..6b25a219 100644 --- a/.drive/next-session-brief.md +++ b/.drive/next-session-brief.md @@ -1,6 +1,6 @@ -# Next-session brief — Prisma Compose +# Next-session brief — Prisma Composer -You're picking up the **Prisma Compose**, the authoring layer for Prisma Cloud: +You're picking up the **Prisma Composer**, the authoring layer for Prisma Cloud: developers describe services and their typed dependencies in TypeScript, and the framework deploys them to Prisma Compute + Prisma Postgres. Work runs under the **Drive process** (`drive-process` skill). The **authoring-layer @@ -18,7 +18,7 @@ its `spec.md` and `plan.md`; tracker issues TML-2998…3005. 2. `docs/design/10-domains/connection-contracts.md` — typed service-to-service Contracts (`contract()`/`rpc()`/`serve()`, assignability + `satisfies()` + per-call validation). -3. `docs/design/10-domains/deploy-cli.md` — `prisma-compose deploy `: the +3. `docs/design/10-domains/deploy-cli.md` — `prisma-composer deploy `: the zero-config pipeline (Load → infer target → assemble → generated stack → Alchemy). 4. `docs/design/90-decisions/` — ADR-0003…0012. The state-store set @@ -32,8 +32,8 @@ its `spec.md` and `plan.md`; tracker issues TML-2998…3005. ## Likely next work -- **Naming/rename**: an operator design session settled **Prisma Compose - (`@prisma/compose`) replacing "MakerKit" and Module/`mod()` replacing Hex** (see +- **Naming/rename**: an operator design session settled **Prisma Composer + (`@prisma/composer`) replacing "MakerKit" and Module/`mod()` replacing Hex** (see agent memory `naming-decisions-2026-07`); the rename has since shipped as ADR-0014 (framework: Prisma App, unit: System, not Module). Confirm any remaining scope with the operator. @@ -70,7 +70,7 @@ its `spec.md` and `plan.md`; tracker issues TML-2998…3005. Never print secrets. - **Deploy state is hosted** (ADR-0009): no local `.alchemy` state matters; any credentialed machine deploys incrementally. The workspace shows a - `prisma-compose-state` project — control-plane, never delete it as cleanup. + `prisma-composer-state` project — control-plane, never delete it as cleanup. - **turbo 2 strict env** strips undeclared vars from tasks — declare in turbo.json (`env`/`globalPassThroughEnv`). Check this first when CI-only failures make no sense. diff --git a/.drive/projects/config-params-and-cron/plan.md b/.drive/projects/config-params-and-cron/plan.md index 1a122ff5..c35f1ed5 100644 --- a/.drive/projects/config-params-and-cron/plan.md +++ b/.drive/projects/config-params-and-cron/plan.md @@ -11,7 +11,7 @@ fixed by ADR-0018/0019/0020 and the two domain docs; these slices implement it. Slices are identified by S-number here; this plan is the source of truth. Linear issues are created per-slice when the slice starts, not during planning. Tracker -project: [Prisma App: Config Params + Cron](https://linear.app/prisma-company/project/prisma-compose-config-params-cron-78113f9ba550). +project: [Prisma App: Config Params + Cron](https://linear.app/prisma-company/project/prisma-composer-config-params-cron-78113f9ba550). - **S1** — TML-3007 — Done ([PR #41](https://github.com/prisma/app/pull/41), merged). - **S2** — TML-3010 — In progress ([spec](specs/s2-cron-driver-system.md)). diff --git a/.drive/projects/config-params-and-cron/spec.md b/.drive/projects/config-params-and-cron/spec.md index 452d1b97..38ceb022 100644 --- a/.drive/projects/config-params-and-cron/spec.md +++ b/.drive/projects/config-params-and-cron/spec.md @@ -52,7 +52,7 @@ Four decisions, realized in two slices: - Is the framework foundation the **Forcing-Function Apps** project depends on: its cron slice (datahub `/tick`) consumes this project's output, and its object-storage slice will reuse the structured-param mechanism. -- Tracker: [Prisma App: Config Params + Cron](https://linear.app/prisma-company/project/prisma-compose-config-params-cron-78113f9ba550) +- Tracker: [Prisma App: Config Params + Cron](https://linear.app/prisma-company/project/prisma-composer-config-params-cron-78113f9ba550) (Terminal). Linear issues are created per-slice when a slice starts, not now. # Cross-cutting requirements @@ -62,7 +62,7 @@ Four decisions, realized in two slices: nor an encoding, never stringifies, and never reads storage. - **The target owns the medium too.** Encoding, logic, and medium are all the target's; the framework fixes none of them (env key/value strings are - `@prisma/compose-cloud`'s choice). Params are target-agnostic. + `@prisma/composer-cloud`'s choice). Params are target-agnostic. - **Structured values stay visible to the graph.** `configOf` reports a param's schema, not "a string" — introspection and a future native lowering can read the real shape. diff --git a/.drive/projects/config-params-and-cron/specs/s1-schema-typed-params.md b/.drive/projects/config-params-and-cron/specs/s1-schema-typed-params.md index a7f6bd6c..3fcc31a3 100644 --- a/.drive/projects/config-params-and-cron/specs/s1-schema-typed-params.md +++ b/.drive/projects/config-params-and-cron/specs/s1-schema-typed-params.md @@ -13,7 +13,7 @@ Three coupled changes to the config model: 1. **Schema-typed params** — `ConfigParam` becomes a plain `{ schema, secret?, optional?, default? }`; the `ParamType = 'string' | 'number'` enum is deleted. -2. **Target-owned serialization** — the target (`@prisma/compose-cloud`) owns all +2. **Target-owned serialization** — the target (`@prisma/composer-cloud`) owns all encoding, driven by the schema; core never stringifies. `compute()` opens to user params. 3. **`config()`/`load()` split** — params are read through a new `config()`; @@ -42,18 +42,18 @@ export interface ConfigParam { - Delete `ParamType` and `TypeOf`. `Values

` infers each value via `StandardSchemaV1.InferOutput`, keeping the existing optional/default widening. -- Add core dep `@standard-schema/spec` (type-only; already used by `@prisma/compose-rpc`). +- Add core dep `@standard-schema/spec` (type-only; already used by `@prisma/composer-rpc`). - Core helpers `string(opts?)`, `number(opts?)` (→ `{ schema: type('string'|'number'), ...opts }`) - and `param(schema, opts?)` (→ `{ schema, ...opts }`). Export from `@prisma/compose`. + and `param(schema, opts?)` (→ `{ schema, ...opts }`). Export from `@prisma/composer`. Update `packages/app/src/index.ts` (drop `ParamType`/`TypeOf`). - `ConfigDeclaration` / `configOf` (introspection): replace `type: ParamType` with a JSON-Schema projection of the param's schema. Stays pure data. - `packages/app/src/node.ts` `freezeParams` keeps working over the new shape. -## 2. Target-owned serialization (`@prisma/compose-cloud`) +## 2. Target-owned serialization (`@prisma/composer-cloud`) The target owns encoding, logic, and medium; core hands it the typed `Config`. -Two sites in `@prisma/compose-cloud` do the work today by hand and must drive off the +Two sites in `@prisma/composer-cloud` do the work today by hand and must drive off the schema instead: - **Deploy encode** — `control.ts` `serialize` (`ServiceLowering.serialize`): @@ -127,7 +127,7 @@ are already correct.) ## Non-goals (this slice) - **Cron** — S2. -- **A second target** — only `@prisma/compose-cloud` serializes; a second target's +- **A second target** — only `@prisma/composer-cloud` serializes; a second target's medium is out of scope. - **Field-level secrets, provisioning refs inside structured params** — excluded by ADR-0018/0019. diff --git a/.drive/projects/config-params-and-cron/specs/s2-cron-driver-system.md b/.drive/projects/config-params-and-cron/specs/s2-cron-driver-system.md index 67469367..3b38cc98 100644 --- a/.drive/projects/config-params-and-cron/specs/s2-cron-driver-system.md +++ b/.drive/projects/config-params-and-cron/specs/s2-cron-driver-system.md @@ -15,14 +15,14 @@ against the router's handlers (`serveSchedule`). None of this needs a new composition primitive — the scheduler is an ordinary consumer of the router's exposed endpoint, exactly the storefront→auth shape. -New package `@prisma/compose-cron` ships the reusable pieces; an in-repo example +New package `@prisma/composer-cron` ships the reusable pieces; an in-repo example proves the whole pipeline. After this slice a service can be scheduled without writing a timer, and the schedule rides through S1's structured `jobs` param end to end. ## Deliverables -1. **`@prisma/compose-cron` package** with the reusable scheduler, the two authoring +1. **`@prisma/composer-cron` package** with the reusable scheduler, the two authoring utilities, and the trigger contract. 2. **A worked in-repo example** — scheduler + user router + target service, composed in a Cron system, deploy-ready, proven to fire on schedule by an @@ -128,7 +128,7 @@ project's recorded follow-up, not this slice.) ## 4. `serveSchedule` (`packages/app-cron/src/serve-schedule.ts`) -The router's entry. Mirrors `@prisma/compose-rpc`'s `serve()` exactly — a fetch +The router's entry. Mirrors `@prisma/composer-rpc`'s `serve()` exactly — a fetch handler that is **exhaustive over the schedule** at compile time — but the single exposed `trigger` method dispatches internally on `jobId` to the matching handler: @@ -194,9 +194,9 @@ is the implementer's call, guarded by the example type-checking. ## 6. Package shape (`packages/app-cron/`) -**Superseded in review:** cron shipped as its own package briefly, then folded into `@prisma/compose-cloud/cron` — a subpath of Prisma Cloud's common-Systems package rather than a standalone one (one entry point per System, tree-shakable). The package-shape details below describe the superseded standalone-package form. +**Superseded in review:** cron shipped as its own package briefly, then folded into `@prisma/composer-cloud/cron` — a subpath of Prisma Cloud's common-Systems package rather than a standalone one (one entry point per System, tree-shakable). The package-shape details below describe the superseded standalone-package form. -Model on `@prisma/compose-rpc` (authoring utilities) plus a built entry like a +Model on `@prisma/composer-rpc` (authoring utilities) plus a built entry like a compute service. `package.json` exports `.` (the authoring API) and the built `scheduler-entry`. `tsdown.config.ts` lists `index` and `scheduler-entry` as entries. Public API from `index.ts`: `defineSchedule`, `serveSchedule`, @@ -204,8 +204,8 @@ entries. Public API from `index.ts`: `defineSchedule`, `serveSchedule`, types. `parseEvery`/`runScheduler` are internal (tested directly, not exported) unless a test needs them exported. -Dependencies: `@prisma/compose`, `@prisma/compose-cloud` (`compute`), `@prisma/compose-node` -(`node` build adapter), `@prisma/compose-rpc` (`contract`, `rpc`, `serve`), `arktype`. +Dependencies: `@prisma/composer`, `@prisma/composer-cloud` (`compute`), `@prisma/composer-node` +(`node` build adapter), `@prisma/composer-rpc` (`contract`, `rpc`, `serve`), `arktype`. ## 7. The worked example (`examples/cron-datahub/` or similar) @@ -220,13 +220,13 @@ A minimal app proving the pipeline, structured like `examples/storefront-auth`: `cron('cron', { schedule, router })` wired to the target. - `defineSchedule({ tick: '2s', mrr: '5s' })` (short intervals so the test is quick), its own `package.json`/`tsconfig`/`tsdown.config`, and a - `prisma-compose.config.ts` if it is to be deployable. + `prisma-composer.config.ts` if it is to be deployable. **Proof of firing (the DoD test).** An in-process integration test (bun test, like storefront-auth's `page.integration.test.ts`) that: 1. Boots the router's real entry with `bootstrapService` (from - `@prisma/compose-cloud/testing`) against a fake target, so `POST /rpc/trigger` + `@prisma/composer-cloud/testing`) against a fake target, so `POST /rpc/trigger` works over real HTTP. 2. Drives `runScheduler` (or the scheduler entry) with a **fake timer** against the booted router URL, advances time, and asserts `trigger` was called with diff --git a/.drive/projects/forcing-function-apps/bugs-deploy-assembly.md b/.drive/projects/forcing-function-apps/bugs-deploy-assembly.md index 50ec99c8..1deef29a 100644 --- a/.drive/projects/forcing-function-apps/bugs-deploy-assembly.md +++ b/.drive/projects/forcing-function-apps/bugs-deploy-assembly.md @@ -9,10 +9,10 @@ > framework never launders trees. The per-bug fixes below are superseded where > they conflict; the ADR is authoritative. -The first real out-of-repo deploy (`datahub`, `prisma-compose deploy module.ts` +The first real out-of-repo deploy (`datahub`, `prisma-composer deploy module.ts` against the team workspace) surfaced three framework bugs in the deploy path. -All three ship in the published `@prisma/compose@0.1.0` / -`@prisma/compose-prisma-cloud@0.1.0`. None are datahub's fault. CI's +All three ship in the published `@prisma/composer@0.1.0` / +`@prisma/composer-prisma-cloud@0.1.0`. None are datahub's fault. CI's "Deploy, verify, destroy" job never caught them because it deploys only `storefront-auth` — one layout, no cron, and its tree happens not to trip the packager. @@ -41,7 +41,7 @@ own `examples/cron` (never deployed in CI). tsdown object entry (`entry: { main: serviceModule }`) emits `main.mjs` directly; the readdir hunt, regex, and rename all delete. Stage the wrapper in a deploy-owned dir keyed by the node's graph address -(`.prisma-compose/artifacts/

/`) — never inside `node_modules` (the +(`.prisma-composer/artifacts/
/`) — never inside `node_modules` (the scheduler's wrapper currently lands in the installed package's `dist/`) and never in the user's build output. (An earlier basename-arithmetic patch was verified live but is superseded: no filesystem-derived identity.) diff --git a/.drive/projects/forcing-function-apps/plan.md b/.drive/projects/forcing-function-apps/plan.md index 6116471b..fb12130f 100644 --- a/.drive/projects/forcing-function-apps/plan.md +++ b/.drive/projects/forcing-function-apps/plan.md @@ -14,7 +14,7 @@ decide whether M2 becomes a successor project instead. Slices are identified by their S-number here; this plan is the source of truth. Linear issues are created per-slice when the slice starts, not during planning. -Tracker project: [Prisma App: Forcing-Function Apps](https://linear.app/prisma-company/project/prisma-compose-forcing-function-apps-495e5a5c6a0d). +Tracker project: [Prisma App: Forcing-Function Apps](https://linear.app/prisma-company/project/prisma-composer-forcing-function-apps-495e5a5c6a0d). ## External dependencies @@ -67,7 +67,7 @@ the design settles. ADR for the secrets model. ### S2 — datahub port skeleton -datahub deployed via `prisma-compose deploy` from its own repo: ingest + web +datahub deployed via `prisma-composer deploy` from its own repo: ingest + web services, postgres resource, secrets bindings, published/preview packages. Scheduling unchanged (in-process tick) for this slice. diff --git a/.drive/projects/forcing-function-apps/slices/flat-bundle-deploy-path/plan.md b/.drive/projects/forcing-function-apps/slices/flat-bundle-deploy-path/plan.md index b2d53d30..096211b7 100644 --- a/.drive/projects/forcing-function-apps/slices/flat-bundle-deploy-path/plan.md +++ b/.drive/projects/forcing-function-apps/slices/flat-bundle-deploy-path/plan.md @@ -14,7 +14,7 @@ Contract source: [spec.md](spec.md). Do not re-derive the design; implement it. **Outcome:** a node service — including the cron scheduler, whose build module is `scheduler-service.mjs`, not `service.ts` — assembles its wrapper to `main.mjs` inside a deploy-owned, address-keyed dir -(`/.prisma-compose/artifacts/
/`), with the user's built entry +(`/.prisma-composer/artifacts/
/`), with the user's built entry copied in beside it. Nothing is written into `node_modules` or the user's build output. @@ -37,7 +37,7 @@ them; `main.mjs` staging is deploy-owned and address-keyed. **Completed when:** - `pnpm test:packages` covers a node assemble over a non-`service.ts` module (cron-scheduler shape) producing `main.mjs`; asserts staging is under - `.prisma-compose/artifacts/
/`, not `node_modules`/user output. + `.prisma-composer/artifacts/
/`, not `node_modules`/user output. - Existing node-adapter + assemble tests green with the new `AssembleInput`. ## D2 — nextjs adapter takes the standalone path; stops completing the tree @@ -89,7 +89,7 @@ links in your build, e.g. cp -RL`). No deref, no symlink tar entries. **Outcome:** storefront-auth's storefront module builds a **complete flat standalone** (next build → copy `.next/static` + `public/` → no symlinks) and its `nextjs()` call uses the standalone-path API, so its deploy path works with -the framework no longer completing the tree. `.prisma-compose/` is gitignored. +the framework no longer completing the tree. `.prisma-composer/` is gitignored. **Implementation notes:** update `examples/storefront-auth/modules/storefront/src/service.ts`'s `nextjs({...})` @@ -105,7 +105,7 @@ the new contract end-to-end. - Locally: storefront-auth's build produces a standalone with `static/` + `public/` present and zero symlinks; `assembleServices` + `packageComputeArtifact` over that tree succeed (binary, local — the live deploy is the PR's CI). -- `examples/storefront-auth/.gitignore` ignores `.prisma-compose/`. +- `examples/storefront-auth/.gitignore` ignores `.prisma-composer/`. --- diff --git a/.drive/projects/forcing-function-apps/slices/flat-bundle-deploy-path/spec.md b/.drive/projects/forcing-function-apps/slices/flat-bundle-deploy-path/spec.md index bf8efdaa..05770588 100644 --- a/.drive/projects/forcing-function-apps/slices/flat-bundle-deploy-path/spec.md +++ b/.drive/projects/forcing-function-apps/slices/flat-bundle-deploy-path/spec.md @@ -35,7 +35,7 @@ settled design, all on this PR: (core-model.md:106). - Rewrite the `deploy.ts` `address`/`cwd` doc comments in plain English. - Rejected on the way here: a generic `node({dir})` (deletes the nextjs adapter — - Will wanted it kept); a `prisma-compose next-standalone` CLI subcommand (wrong + Will wanted it kept); a `prisma-composer next-standalone` CLI subcommand (wrong altitude on the deploy CLI); a hand-maintained flatten script (a smell); a flat-bundle restructure (a novel invention off the trodden path). @@ -48,7 +48,7 @@ amendment wins. ## Chosen design **Artifact layout (both adapters).** Assembly builds a per-service working dir -`/.prisma-compose/artifacts/
/` containing: +`/.prisma-composer/artifacts/
/` containing: - `main.mjs` — our wrapper, at the working-dir root. - `bundle/` — the user's built output, copied in wholesale (already flat per the contract; a plain recursive copy). @@ -127,7 +127,7 @@ static/public copy; packager symlink hard-error; storefront-auth `nextjs()` call | Wrapper build's tsdown still auto-loads a stray `tsdown.config.ts` | Keep `config: false` (node adapter comment explains why — it would rewrite the package's own `exports`). | | App entry named `main.js`/`main.mjs` collides with the wrapper | Keep the existing reserved-basename error in the node adapter; add the equivalent to nextjs (its entry is `server.js`, so latent, but assert). | | storefront-auth standalone has no symlinks today (pnpm + hoisted `.npmrc`) so bug 3 doesn't trip it | The symlink error stays dormant for it; datahub (bun) is what the error is for. Don't regress the hoist shim. | -| `.prisma-compose/artifacts/` under deploy cwd needs gitignoring in examples | storefront-auth already needs `.prisma-compose/` ignored (datahub added the same). Verify/add. | +| `.prisma-composer/artifacts/` under deploy cwd needs gitignoring in examples | storefront-auth already needs `.prisma-composer/` ignored (datahub added the same). Verify/add. | ## Done conditions (slice-specific) @@ -137,8 +137,8 @@ static/public copy; packager symlink hard-error; storefront-auth `nextjs()` call ## Open questions -- Root for `.prisma-compose/artifacts/`: deploy `cwd` (where the CLI already - writes `.prisma-compose/alchemy.run.ts` and state — main.ts:255) is the +- Root for `.prisma-composer/artifacts/`: deploy `cwd` (where the CLI already + writes `.prisma-composer/alchemy.run.ts` and state — main.ts:255) is the consistent choice. Confirm the assembler receives cwd or resolves it the same way the CLI does; if assembly has no cwd handle, thread it alongside `address`. diff --git a/.drive/projects/forcing-function-apps/spec.md b/.drive/projects/forcing-function-apps/spec.md index bd8ebb22..48829d1c 100644 --- a/.drive/projects/forcing-function-apps/spec.md +++ b/.drive/projects/forcing-function-apps/spec.md @@ -1,6 +1,6 @@ # Purpose -Ground Prisma Compose's next capabilities in **real applications we +Ground Prisma Composer's next capabilities in **real applications we run ourselves**, so the high-value gaps — secrets, scheduled work, object storage, streams, and the local dev loop — are discovered, shaped, and prioritized by real pressure rather than speculation. A hypothetical example @@ -76,12 +76,12 @@ speculatively): That seam is **owned by hex-composition**; this project consumes it (see plan.md § "What we consume from hex-composition"), and does not re-derive it. - **Depends on the publishing setup** (PR #29): the ports live in their own - repos and consume published `@prisma/compose*` packages, which makes this + repos and consume published `@prisma/composer*` packages, which makes this project the first real consumer of the release pipeline. - Consumes the platform: Prisma Compute, Prisma Postgres, Prisma Streams (`prisma/streams`). Platform friction feeds `gotchas.md` and the Linear gotchas projects, as before. -- Tracker: [Prisma App: Forcing-Function Apps](https://linear.app/prisma-company/project/prisma-compose-forcing-function-apps-495e5a5c6a0d) +- Tracker: [Prisma App: Forcing-Function Apps](https://linear.app/prisma-company/project/prisma-composer-forcing-function-apps-495e5a5c6a0d) (Terminal). # Cross-cutting requirements @@ -113,13 +113,13 @@ speculatively): - Capability slices that need resource-as-System (cron, object storage) do not start until the system-composition branch lands on main. Secrets and the datahub port skeleton have no such dependency and can proceed first. -- Ports may begin against `workspace:`/preview versions of `@prisma/compose*`, but +- Ports may begin against `workspace:`/preview versions of `@prisma/composer*`, but the datahub port must end on published versions (that's part of its DoD). # Project-DoD -- [ ] **datahub deploys via `prisma-compose deploy`** from its own repo, consuming - published `@prisma/compose*` packages: ingest + web as services, postgres as +- [ ] **datahub deploys via `prisma-composer deploy`** from its own repo, consuming + published `@prisma/composer*` packages: ingest + web as services, postgres as a resource, secrets as bindings, and its `/tick` driven by the cron resource System. The team's real instance runs on this deployment. - [ ] **open-chat deploys the same way**, with streams, object storage, cron, diff --git a/.drive/projects/hex-composition/design-notes.md b/.drive/projects/hex-composition/design-notes.md index 106c38cd..c4b2420f 100644 --- a/.drive/projects/hex-composition/design-notes.md +++ b/.drive/projects/hex-composition/design-notes.md @@ -10,20 +10,20 @@ durable in the ADRs, the domain docs, and the code; this workspace's scratch - **A System has a service's typed boundary** — `system(name, { deps?, expose? }, body)`, nesting, forwarding as data flow across the boundary. **ADR-0016**; `docs/design/10-domains/module-composition.md`. -- **The control plane loads through `prisma-compose.config.ts`** — the config +- **The control plane loads through `prisma-composer.config.ts`** — the config statically imports extension descriptors; registries are keyed by `(extension, node type)`; nodes are pure data; one explicit state store per deploy. **ADR-0017**; `docs/design/10-domains/deploy-cli.md`. (This replaced a failed node-owned-loads approach that the live e2e caught.) - **A reusable System, proven, plus the testing seam** — auth becomes a System that owns its own database and exposes only its contract; `mockService` - (`@prisma/compose/testing`, unit) and `bootstrapService` (`@prisma/compose-cloud/testing`, + (`@prisma/composer/testing`, unit) and `bootstrapService` (`@prisma/composer-cloud/testing`, integration), with no test code in the production node. Proven by a unit test, an integration test, and a live "Deploy, verify, destroy" e2e. - `docs/design/10-domains/testing.md`; `skills/testing-prisma-composes`; PR #39. + `docs/design/10-domains/testing.md`; `skills/testing-prisma-composers`; PR #39. Built on the merged model: unified dependency slots (#21), always-system root -(#22), the `@prisma/compose*` / System naming (#24 = ADR-0014), and +(#22), the `@prisma/composer*` / System naming (#24 = ADR-0014), and dependencies-resolve-to-bindings (#26 = ADR-0015). ## Deferred follow-ups (off the critical path, not started) @@ -32,7 +32,7 @@ dependencies-resolve-to-bindings (#26 = ADR-0015). lookups (in `deploy.ts`, `validate-coverage.ts`, `assemble-services.ts`) with one in-memory client that *performs* control-plane operations — not a state map. Open design; raised in the PR #39 review. -- **Fold `@prisma/compose-alchemy` into `@prisma/compose-cloud`.** One consumer, a +- **Fold `@prisma/composer-alchemy` into `@prisma/composer-cloud`.** One consumer, a misleading generic name; the firewall that matters is a file boundary, so the package boundary earns nothing. Needs a slice note plus a mechanical PR. diff --git a/.drive/projects/mvp-example-app/design-notes.md b/.drive/projects/mvp-example-app/design-notes.md index 33469377..b51eadaf 100644 --- a/.drive/projects/mvp-example-app/design-notes.md +++ b/.drive/projects/mvp-example-app/design-notes.md @@ -43,7 +43,7 @@ against real Prisma Cloud primitives. - **Deploy Compute via the Prisma CLI (`prisma compute deploy`) and use Alchemy only for Postgres.** Faster to a first deploy, but leaves half the system outside - Alchemy and doesn't surface the seam Prisma Compose must close. Rejected in favour of + Alchemy and doesn't surface the seam Prisma Composer must close. Rejected in favour of an all-Alchemy path (operator's call). - **Use the v1 Postgres provider.** Rejected — see above. diff --git a/.drive/projects/mvp-example-app/spec.md b/.drive/projects/mvp-example-app/spec.md index 447c1ed8..930f779c 100644 --- a/.drive/projects/mvp-example-app/spec.md +++ b/.drive/projects/mvp-example-app/spec.md @@ -1,6 +1,6 @@ # Purpose -Prove that Prisma Compose's model can be provisioned and deployed to +Prove that Prisma Composer's model can be provisioned and deployed to Prisma Cloud **entirely through Alchemy** — by standing up the smallest real, connected, deployed application. The point is to ground the architecture in something that actually runs, so the lower-level framework design is made @@ -22,7 +22,7 @@ round-trips to Auth, and each service talks to its own database. # Non-goals -- **Prisma Compose primitives.** This project builds *directly* on Alchemy. +- **Prisma Composer primitives.** This project builds *directly* on Alchemy. The framework's composition layer on top is the next phase, not this one. - **Shared data.** No shared Postgres, data contracts, or aggregate contracts — each System gets its own database. @@ -35,7 +35,7 @@ round-trips to Auth, and each service talks to its own database. # Place in the larger world -Builds on the settled Prisma Compose design in +Builds on the settled Prisma Composer design in [`docs/design/`](../../../docs/design/) and the already-committed Postgres provider in [`packages/prisma-alchemy`](../../../packages/prisma-alchemy) (commit `64e530f`). Depends on `alchemy@2.0.0-beta.59`, `effect@4.0.0-beta.92`, @@ -90,7 +90,7 @@ Inherits the team DoD floor. Project-specific close conditions: # References -- [`docs/design/`](../../../docs/design/) — the settled Prisma Compose model. +- [`docs/design/`](../../../docs/design/) — the settled Prisma Composer model. - [`packages/prisma-alchemy`](../../../packages/prisma-alchemy) — the Postgres provider (done); Compute provider to be added here. - `@prisma/management-api-sdk` — the Management API client the providers wrap. diff --git a/.drive/projects/mvp-example-app/specs/slice-1-compute-provider.md b/.drive/projects/mvp-example-app/specs/slice-1-compute-provider.md index 33640829..4e060489 100644 --- a/.drive/projects/mvp-example-app/specs/slice-1-compute-provider.md +++ b/.drive/projects/mvp-example-app/specs/slice-1-compute-provider.md @@ -19,7 +19,7 @@ folded into `providers()`: ## DoD -- `pnpm --filter @prisma/compose-alchemy exec tsc --noEmit` passes. +- `pnpm --filter @prisma/composer-alchemy exec tsc --noEmit` passes. - Structure mirrors the Postgres provider (Context.Service tags, Provider.effect, the `call`/`callOptional`/`callVoid` helpers, Redacted secrets, 404-tolerant delete). v2/Effect only; no globals. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 97d4ee37..309a76d0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -16,8 +16,8 @@ body: id: package-and-version attributes: label: Package and version - description: Which package (or the `prisma-compose` CLI) and version are you using? - placeholder: "e.g. @prisma/compose@0.1.0" + description: Which package (or the `prisma-composer` CLI) and version are you using? + placeholder: "e.g. @prisma/composer@0.1.0" validations: required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0d8c5bd2..84acec23 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,5 @@