create-ailk 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -22
- package/component-catalog.json +3 -3
- package/component-catalog.md +3 -3
- package/dist/add-module.js +4 -2
- package/dist/add-route.d.ts +12 -1
- package/dist/add-route.js +31 -3
- package/dist/cli.js +12 -7
- package/dist/derive-architecture.d.ts +3 -4
- package/dist/derive-architecture.js +65 -29
- package/dist/lib/design-checks.d.ts +9 -4
- package/dist/lib/design-checks.js +13 -7
- package/dist/lib/extract-module-bundle.js +29 -2
- package/dist/lib/fetch-template-snapshot.d.ts +2 -1
- package/dist/lib/fetch-template-snapshot.js +8 -3
- package/dist/lib/import-graph.d.ts +1 -1
- package/dist/lib/import-graph.js +4 -4
- package/dist/lib/module-license-gate.d.ts +12 -1
- package/dist/lib/module-license-gate.js +36 -15
- package/dist/lib/module-tier.d.ts +2 -8
- package/dist/lib/module-tier.js +13 -12
- package/dist/module-architecture.d.ts +20 -3
- package/dist/module-architecture.js +129 -552
- package/dist/paid-sections.d.ts +25 -1
- package/dist/paid-sections.js +88 -3
- package/dist/starter-grid.d.ts +6 -6
- package/dist/starter-grid.js +12 -5
- package/dist/surfaces.js +39 -2
- package/dist/template-record.d.ts +21 -3
- package/dist/template-record.js +38 -7
- package/dist/topology.d.ts +16 -3
- package/dist/topology.js +54 -23
- package/dist/update.d.ts +10 -1
- package/dist/update.js +715 -21
- package/package.json +3 -3
- package/release-scope.json +2 -2
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.json +8 -2
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.md +2 -2
- package/site-templates/marketing-site/ailk-template.json +7 -1
- package/site-templates/marketing-site/provenance.json +7 -1
- package/site-templates/saas-product/ailk-template.json +2 -1
- package/site-templates/saas-product/provenance.json +1 -0
- package/templates/.claude/cloudparity-repo-hooks.json +5 -0
- package/templates/.claude/hooks/template-guard.sh +137 -0
- package/templates/.claude/rules/extending.md +106 -0
- package/templates/.claude/rules/loop-contract.md +2 -2
- package/templates/.claude/settings.json +11 -0
- package/templates/.env.example +20 -5
- package/templates/.github/workflows/ci.yml +7 -4
- package/templates/CLAUDE.md +11 -1
- package/templates/CONVENTIONS.md +8 -10
- package/templates/README.md +14 -13
- package/templates/apps/api/.env.example +23 -2
- package/templates/apps/api/CLAUDE.md +119 -83
- package/templates/apps/api/jest.config.cjs +15 -5
- package/templates/apps/api/package.json +16 -20
- package/templates/apps/api/src/__tests__/trusted-origins.server.test.ts +2 -2
- package/templates/apps/api/src/__tests__/vercel-handler.test.ts +4 -4
- package/templates/apps/api/src/index.ts +1 -1
- package/templates/apps/api/src/lib/__mocks__/prisma-client.js +16 -0
- package/templates/apps/api/src/lib/__mocks__/prisma.ts +3 -3
- package/templates/apps/api/src/modules/commerce.ts +10 -0
- package/templates/apps/api/src/modules/content-write.ts +10 -0
- package/templates/apps/api/src/modules/multi-tenant.ts +10 -0
- package/templates/apps/api/src/modules/scheduling.ts +10 -0
- package/templates/apps/api/src/modules/signal-collectors.ts +10 -0
- package/templates/apps/api/src/modules/workspace.ts +10 -0
- package/templates/apps/api/src/server.ts +117 -1882
- package/templates/apps/api/vercel.json +2 -2
- package/templates/apps/mcp/CLAUDE.md +90 -26
- package/templates/apps/mcp/__tests__/app-entry.test.ts +4 -254
- package/templates/apps/mcp/__tests__/boot-file.test.ts +92 -0
- package/templates/apps/mcp/jest.config.cjs +6 -1
- package/templates/apps/mcp/package.json +5 -13
- package/templates/apps/mcp/src/app.ts +8 -7
- package/templates/apps/mcp/src/index.ts +6 -34
- package/templates/apps/mcp/src/lib/paid-tools.generated.ts +10 -0
- package/templates/apps/mcp/src/lib/topology.generated.ts +2 -2
- package/templates/apps/mcp/src/site.ts +12 -0
- package/templates/apps/web/.env.example +1 -1
- package/templates/apps/web/CLAUDE.md +31 -3
- package/templates/apps/web/app/.well-known/mcp.json/route.ts +9 -3
- package/templates/apps/web/app/[locale]/(auth)/__tests__/auth-pages.test.tsx +43 -4
- package/templates/apps/web/app/[locale]/(auth)/legal-footnote.tsx +35 -0
- package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +117 -8
- package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +14 -37
- package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +6 -6
- package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +20 -35
- package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/page.test.tsx +108 -0
- package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/sign-up-card.test.tsx +111 -5
- package/templates/apps/web/app/[locale]/(auth)/sign-up/page.tsx +78 -16
- package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up-card.tsx +132 -12
- package/templates/apps/web/app/[locale]/(authed)/__tests__/gate.test.tsx +53 -1
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/billing.test.tsx +38 -0
- package/templates/apps/web/app/[locale]/(authed)/account/billing/page.tsx +4 -2
- package/templates/apps/web/app/[locale]/(authed)/sign-in-gate.tsx +47 -24
- package/templates/apps/web/app/[locale]/(authed)/signed-out-gate.generated.tsx +23 -4
- package/templates/apps/web/app/[locale]/contact/intake-analytics.ts +1 -1
- package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/magnet-page.test.tsx +22 -1
- package/templates/apps/web/app/[locale]/flows/[slug]/magnet-page.tsx +7 -3
- package/templates/apps/web/app/[locale]/layout.tsx +33 -13
- package/templates/apps/web/app/[locale]/meet/confirmed/BookingHandOff.tsx +128 -0
- package/templates/apps/web/app/[locale]/meet/confirmed/__tests__/BookingHandOff.test.tsx +126 -0
- package/templates/apps/web/app/[locale]/pricing/__tests__/unconnected.test.tsx +43 -0
- package/templates/apps/web/app/[locale]/pricing/page.tsx +7 -3
- package/templates/apps/web/app/api/offerings/checkout/[lookupKey]/__tests__/route.test.ts +222 -0
- package/templates/apps/web/app/api/offerings/checkout/[lookupKey]/route.ts +10 -3
- package/templates/apps/web/app/api/revalidate/route.ts +3 -3
- package/templates/apps/web/auth.ts +10 -6
- package/templates/apps/web/i18n/request.ts +49 -1
- package/templates/apps/web/jest.config.cjs +1 -0
- package/templates/apps/web/lib/__tests__/account-config.test.ts +7 -0
- package/templates/apps/web/lib/__tests__/auth-email.test.ts +276 -0
- package/templates/apps/web/lib/auth-email.ts +103 -21
- package/templates/apps/web/lib/hub-session/__tests__/sign-in-gate.test.tsx +72 -23
- package/templates/apps/web/lib/hub-session/sign-in-gate.tsx +94 -70
- package/templates/apps/web/lib/prisma-for-auth.ts +5 -2
- package/templates/apps/web/lib/relay.ts +2 -2
- package/templates/apps/web/lib/release-scope.ts +47 -0
- package/templates/apps/web/lib/server-api.ts +1 -1
- package/templates/apps/web/lib/sign-up-agreements.ts +291 -28
- package/templates/apps/web/lib/site-contributions.ts +18 -0
- package/templates/apps/web/messages/en.json +186 -20
- package/templates/apps/web/messages/site/en.json +1 -0
- package/templates/apps/web/src/lib/commerce-claim.ts +1 -1
- package/templates/customizations.yaml +37 -0
- package/templates/database/prisma.config.ts +10 -14
- package/templates/database/seed-test.ts +2 -2
- package/templates/database/seed.ts +5 -5
- package/templates/package.json +12 -6
- package/templates/pnpm-workspace.yaml +0 -1
- package/templates/project.yaml +16 -8
- package/templates/tools/jest/reporters.cjs +65 -0
- package/templates/tools/lint-architecture.ts +553 -7
- package/templates/tsconfig.json +1 -2
- package/versions.json +49 -36
- package/templates/apps/api/src/__tests__/commerce-claim-registration.test.ts +0 -409
- package/templates/apps/api/src/__tests__/factories/agent-caller.ts +0 -102
- package/templates/apps/api/src/__tests__/factories/content-fixture.ts +0 -138
- package/templates/apps/api/src/__tests__/factories/in-memory-prisma.ts +0 -441
- package/templates/apps/api/src/__tests__/factories/index.ts +0 -70
- package/templates/apps/api/src/__tests__/factories/lead-fixture.ts +0 -82
- package/templates/apps/api/src/__tests__/leads-forwarded-rate-limit.test.ts +0 -135
- package/templates/apps/api/src/__tests__/services/enrichment-shim.test.ts +0 -126
- package/templates/apps/api/src/__tests__/stripe-boot.test.ts +0 -132
- package/templates/apps/api/src/__tests__/support/hub-sign-in-fake-db.ts +0 -362
- package/templates/apps/api/src/bin/__tests__/rate-limit-probe.test.ts +0 -184
- package/templates/apps/api/src/bin/abandon-sweep.ts +0 -42
- package/templates/apps/api/src/bin/rate-limit-probe.ts +0 -53
- package/templates/apps/api/src/bin/spokes.ts +0 -198
- package/templates/apps/api/src/bin/stripe-connections-rekey.ts +0 -45
- package/templates/apps/api/src/config/__tests__/hub-require-spoke-key.test.ts +0 -196
- package/templates/apps/api/src/config/__tests__/index.test.ts +0 -233
- package/templates/apps/api/src/config/__tests__/modules.test.ts +0 -76
- package/templates/apps/api/src/config/__tests__/stripe-connection-key.test.ts +0 -185
- package/templates/apps/api/src/config/__tests__/trusted-origins.test.ts +0 -238
- package/templates/apps/api/src/config/index.ts +0 -596
- package/templates/apps/api/src/config/modules.ts +0 -83
- package/templates/apps/api/src/lib/__tests__/agent-store.test.ts +0 -581
- package/templates/apps/api/src/lib/__tests__/auth-email-budget.test.ts +0 -143
- package/templates/apps/api/src/lib/__tests__/consent-ledger-double.ts +0 -237
- package/templates/apps/api/src/lib/__tests__/consent-store.test.ts +0 -353
- package/templates/apps/api/src/lib/__tests__/content-adapter.test.ts +0 -201
- package/templates/apps/api/src/lib/__tests__/deliverable-asset-store.test.ts +0 -224
- package/templates/apps/api/src/lib/__tests__/error-serializer.test.ts +0 -120
- package/templates/apps/api/src/lib/__tests__/errors.test.ts +0 -94
- package/templates/apps/api/src/lib/__tests__/file-fallback.test.ts +0 -144
- package/templates/apps/api/src/lib/__tests__/fixtures/HomePage/home.mdx +0 -8
- package/templates/apps/api/src/lib/__tests__/flow-completion-store.test.ts +0 -149
- package/templates/apps/api/src/lib/__tests__/flow-rename-race.db.test.ts +0 -116
- package/templates/apps/api/src/lib/__tests__/hub-sign-in-store.test.ts +0 -209
- package/templates/apps/api/src/lib/__tests__/lead-capture-store.test.ts +0 -257
- package/templates/apps/api/src/lib/__tests__/lead-delivery.test.ts +0 -96
- package/templates/apps/api/src/lib/__tests__/outbound-http.test.ts +0 -125
- package/templates/apps/api/src/lib/__tests__/prisma.test.ts +0 -165
- package/templates/apps/api/src/lib/__tests__/require-commerce-claim.test.ts +0 -317
- package/templates/apps/api/src/lib/__tests__/require-paid-tier.test.ts +0 -129
- package/templates/apps/api/src/lib/__tests__/site.test.ts +0 -308
- package/templates/apps/api/src/lib/__tests__/slice-load.test.ts +0 -89
- package/templates/apps/api/src/lib/__tests__/spoke-store.test.ts +0 -202
- package/templates/apps/api/src/lib/__tests__/stripe-admission.test.ts +0 -217
- package/templates/apps/api/src/lib/__tests__/stripe.test.ts +0 -82
- package/templates/apps/api/src/lib/agent-store.ts +0 -613
- package/templates/apps/api/src/lib/auth-email-budget.ts +0 -161
- package/templates/apps/api/src/lib/consent-store.ts +0 -363
- package/templates/apps/api/src/lib/content-adapter.ts +0 -112
- package/templates/apps/api/src/lib/deliverable-asset-store.ts +0 -96
- package/templates/apps/api/src/lib/error-serializer.ts +0 -164
- package/templates/apps/api/src/lib/errors.ts +0 -95
- package/templates/apps/api/src/lib/file-fallback.ts +0 -87
- package/templates/apps/api/src/lib/flow-completion-store.ts +0 -136
- package/templates/apps/api/src/lib/hub-sign-in-store.ts +0 -455
- package/templates/apps/api/src/lib/lead-capture-store.ts +0 -122
- package/templates/apps/api/src/lib/lead-delivery.ts +0 -52
- package/templates/apps/api/src/lib/license-key-store.ts +0 -45
- package/templates/apps/api/src/lib/locales.ts +0 -201
- package/templates/apps/api/src/lib/outbound-http.ts +0 -127
- package/templates/apps/api/src/lib/prisma.ts +0 -21
- package/templates/apps/api/src/lib/proposal-paid-store.ts +0 -66
- package/templates/apps/api/src/lib/rate-limit-probe.ts +0 -165
- package/templates/apps/api/src/lib/rate-limit-store.ts +0 -142
- package/templates/apps/api/src/lib/require-commerce-claim.ts +0 -250
- package/templates/apps/api/src/lib/require-paid-tier.ts +0 -53
- package/templates/apps/api/src/lib/site.ts +0 -257
- package/templates/apps/api/src/lib/slice-load.ts +0 -90
- package/templates/apps/api/src/lib/spoke-store.ts +0 -180
- package/templates/apps/api/src/lib/stripe.ts +0 -321
- package/templates/apps/api/src/lib/webhook-idempotency.ts +0 -156
- package/templates/apps/api/src/middleware/__tests__/adversarial/bearer-token-format.test.ts +0 -111
- package/templates/apps/api/src/middleware/__tests__/adversarial/cookie-or-bearer-precedence.test.ts +0 -172
- package/templates/apps/api/src/middleware/__tests__/adversarial/csrf-bearer-skip.test.ts +0 -119
- package/templates/apps/api/src/middleware/__tests__/adversarial/csrf-cookie-path.test.ts +0 -138
- package/templates/apps/api/src/middleware/__tests__/adversarial/csrf-trusted-origins.test.ts +0 -142
- package/templates/apps/api/src/middleware/__tests__/adversarial/session-fixation.test.ts +0 -155
- package/templates/apps/api/src/middleware/__tests__/adversarial/session-timeout.test.ts +0 -139
- package/templates/apps/api/src/middleware/__tests__/auth.bearer-path.test.ts +0 -562
- package/templates/apps/api/src/middleware/__tests__/auth.both-present-precedence.test.ts +0 -76
- package/templates/apps/api/src/middleware/__tests__/auth.cookie-path.test.ts +0 -220
- package/templates/apps/api/src/middleware/__tests__/auth.database-not-configured.test.ts +0 -97
- package/templates/apps/api/src/middleware/__tests__/auth.hub-session-path.test.ts +0 -557
- package/templates/apps/api/src/middleware/__tests__/auth.neither-present.test.ts +0 -72
- package/templates/apps/api/src/middleware/__tests__/auth.optional-cookie.test.ts +0 -140
- package/templates/apps/api/src/middleware/__tests__/default-tenant.test.ts +0 -721
- package/templates/apps/api/src/middleware/__tests__/rate-limit-cross-isolate.db.test.ts +0 -220
- package/templates/apps/api/src/middleware/__tests__/rate-limit-store.test.ts +0 -430
- package/templates/apps/api/src/middleware/__tests__/rate-limit.test.ts +0 -1409
- package/templates/apps/api/src/middleware/__tests__/write-budget.test.ts +0 -174
- package/templates/apps/api/src/middleware/auth.ts +0 -864
- package/templates/apps/api/src/middleware/default-tenant.ts +0 -166
- package/templates/apps/api/src/middleware/rate-limit.ts +0 -983
- package/templates/apps/api/src/openapi/__tests__/openapi.test.ts +0 -391
- package/templates/apps/api/src/openapi/__tests__/spec-identity.test.ts +0 -182
- package/templates/apps/api/src/openapi/index.ts +0 -18
- package/templates/apps/api/src/openapi/spec.ts +0 -2148
- package/templates/apps/api/src/openapi/surface-drift.ts +0 -195
- package/templates/apps/api/src/routes/aeo/__tests__/index.test.ts +0 -175
- package/templates/apps/api/src/routes/aeo/index.ts +0 -107
- package/templates/apps/api/src/routes/auth/__tests__/auth-tokens.functional.test.ts +0 -196
- package/templates/apps/api/src/routes/auth/__tests__/auth-user.functional.test.ts +0 -249
- package/templates/apps/api/src/routes/auth/__tests__/hub-sign-in.test.ts +0 -532
- package/templates/apps/api/src/routes/auth/__tests__/tokens.test.ts +0 -313
- package/templates/apps/api/src/routes/auth/__tests__/transactional-email.test.ts +0 -413
- package/templates/apps/api/src/routes/auth/__tests__/user.test.ts +0 -609
- package/templates/apps/api/src/routes/auth/hub-sign-in.ts +0 -242
- package/templates/apps/api/src/routes/auth/tokens.ts +0 -211
- package/templates/apps/api/src/routes/auth/transactional-email.ts +0 -301
- package/templates/apps/api/src/routes/auth/user.ts +0 -305
- package/templates/apps/api/src/routes/billing/plan-checkout.ts +0 -332
- package/templates/apps/api/src/routes/checkout/__tests__/live-key.test.ts +0 -178
- package/templates/apps/api/src/routes/checkout/__tests__/offerings-authorization.test.ts +0 -1426
- package/templates/apps/api/src/routes/checkout/__tests__/session.test.ts +0 -448
- package/templates/apps/api/src/routes/checkout/__tests__/sessions.test.ts +0 -1742
- package/templates/apps/api/src/routes/checkout/index.ts +0 -34
- package/templates/apps/api/src/routes/checkout/session.ts +0 -171
- package/templates/apps/api/src/routes/checkout/sessions.ts +0 -540
- package/templates/apps/api/src/routes/consent/__tests__/account.test.ts +0 -386
- package/templates/apps/api/src/routes/consent/__tests__/sign-up-rate-limit.test.ts +0 -160
- package/templates/apps/api/src/routes/consent/account.ts +0 -268
- package/templates/apps/api/src/routes/consent/cookie.ts +0 -90
- package/templates/apps/api/src/routes/consent/index.ts +0 -26
- package/templates/apps/api/src/routes/consent/unsubscribe.ts +0 -127
- package/templates/apps/api/src/routes/content/__tests__/get-page.test.ts +0 -853
- package/templates/apps/api/src/routes/content/__tests__/list-pages.test.ts +0 -230
- package/templates/apps/api/src/routes/content/__tests__/list-types.test.ts +0 -44
- package/templates/apps/api/src/routes/content/__tests__/locale.test.ts +0 -118
- package/templates/apps/api/src/routes/content/__tests__/offerings.test.ts +0 -731
- package/templates/apps/api/src/routes/content/__tests__/pricing.test.ts +0 -753
- package/templates/apps/api/src/routes/content/__tests__/rate-limit.test.ts +0 -51
- package/templates/apps/api/src/routes/content/__tests__/search.test.ts +0 -450
- package/templates/apps/api/src/routes/content/__tests__/shown-offerings.test.ts +0 -762
- package/templates/apps/api/src/routes/content/get-page.ts +0 -183
- package/templates/apps/api/src/routes/content/index.ts +0 -49
- package/templates/apps/api/src/routes/content/list-pages.ts +0 -74
- package/templates/apps/api/src/routes/content/list-types.ts +0 -19
- package/templates/apps/api/src/routes/content/offerings.ts +0 -184
- package/templates/apps/api/src/routes/content/pricing.ts +0 -176
- package/templates/apps/api/src/routes/content/rate-limit.ts +0 -22
- package/templates/apps/api/src/routes/content/search.ts +0 -100
- package/templates/apps/api/src/routes/content/shown-offerings.ts +0 -229
- package/templates/apps/api/src/routes/leads/__tests__/capture.test.ts +0 -88
- package/templates/apps/api/src/routes/leads/__tests__/list.test.ts +0 -171
- package/templates/apps/api/src/routes/leads/__tests__/magnet-completion.test.ts +0 -515
- package/templates/apps/api/src/routes/leads/__tests__/spoke.test.ts +0 -392
- package/templates/apps/api/src/routes/leads/__tests__/track.test.ts +0 -165
- package/templates/apps/api/src/routes/leads/index.ts +0 -639
- package/templates/apps/api/src/routes/leads/list.ts +0 -104
- package/templates/apps/api/src/routes/project-listings/__tests__/configured-application.test.ts +0 -626
- package/templates/apps/api/src/routes/project-listings/__tests__/drafts.test.ts +0 -1268
- package/templates/apps/api/src/routes/project-listings/__tests__/founder-identity.test.ts +0 -847
- package/templates/apps/api/src/routes/project-listings/__tests__/me.test.ts +0 -491
- package/templates/apps/api/src/routes/project-listings/__tests__/public.test.ts +0 -476
- package/templates/apps/api/src/routes/project-listings/__tests__/resume-email.test.ts +0 -872
- package/templates/apps/api/src/routes/project-listings/__tests__/site-answers.test.ts +0 -1022
- package/templates/apps/api/src/routes/project-listings/__tests__/site-key.test.ts +0 -484
- package/templates/apps/api/src/routes/project-listings/__tests__/structured-address.test.ts +0 -535
- package/templates/apps/api/src/routes/project-listings/index.ts +0 -164
- package/templates/apps/api/src/routes/project-listings/me.ts +0 -87
- package/templates/apps/api/src/routes/project-listings/patch-copy.ts +0 -224
- package/templates/apps/api/src/routes/project-listings/patch-draft.ts +0 -102
- package/templates/apps/api/src/routes/project-listings/public.ts +0 -98
- package/templates/apps/api/src/routes/project-listings/respond.ts +0 -48
- package/templates/apps/api/src/routes/project-listings/resume-token.ts +0 -27
- package/templates/apps/api/src/routes/project-listings/start.ts +0 -140
- package/templates/apps/api/src/routes/project-listings/submit.ts +0 -130
- package/templates/apps/api/src/routes/project-listings/verify-email.ts +0 -150
- package/templates/apps/api/src/routes/requests/__tests__/confirm.test.ts +0 -686
- package/templates/apps/api/src/routes/requests/confirm.ts +0 -601
- package/templates/apps/api/src/routes/requests/index.ts +0 -54
- package/templates/apps/api/src/routes/test/auth/__tests__/session.test.ts +0 -306
- package/templates/apps/api/src/routes/test/auth/session.ts +0 -143
- package/templates/apps/api/src/routes/webhooks/README.md +0 -398
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-checkout-consent.test.ts +0 -649
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-dunning.test.ts +0 -749
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-flow-checkout.test.ts +0 -449
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-idempotency.test.ts +0 -264
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-livemode-live.test.ts +0 -159
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-livemode.test.ts +0 -158
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-offerings.test.ts +0 -814
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-org-billing.test.ts +0 -301
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-proposal-paid.test.ts +0 -369
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-rate-limit.test.ts +0 -215
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-request-paid.test.ts +0 -301
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-site-filter.test.ts +0 -809
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe.test.ts +0 -1155
- package/templates/apps/api/src/routes/webhooks/index.ts +0 -141
- package/templates/apps/api/src/routes/webhooks/stripe-offerings.ts +0 -384
- package/templates/apps/api/src/routes/webhooks/stripe.ts +0 -2028
- package/templates/apps/api/src/services/__tests__/abandon-email.test.ts +0 -645
- package/templates/apps/api/src/services/__tests__/answer-distributions.test.ts +0 -132
- package/templates/apps/api/src/services/__tests__/audit-log.test.ts +0 -1028
- package/templates/apps/api/src/services/__tests__/checkout-plan.test.ts +0 -313
- package/templates/apps/api/src/services/__tests__/consent-ledger.test.ts +0 -503
- package/templates/apps/api/src/services/__tests__/consent-migration.test.ts +0 -65
- package/templates/apps/api/src/services/__tests__/consent.test.ts +0 -299
- package/templates/apps/api/src/services/__tests__/default-tenant.test.ts +0 -147
- package/templates/apps/api/src/services/__tests__/deliverable-fulfillment.test.ts +0 -877
- package/templates/apps/api/src/services/__tests__/deliverable-resend.test.ts +0 -379
- package/templates/apps/api/src/services/__tests__/dunning-policy.test.ts +0 -368
- package/templates/apps/api/src/services/__tests__/entitlements.test.ts +0 -142
- package/templates/apps/api/src/services/__tests__/hub-sign-in.test.ts +0 -854
- package/templates/apps/api/src/services/__tests__/keyless-workspace-predicate.test.ts +0 -234
- package/templates/apps/api/src/services/__tests__/lead-accept-user.test.ts +0 -251
- package/templates/apps/api/src/services/__tests__/lead-routing.test.ts +0 -2660
- package/templates/apps/api/src/services/__tests__/listing-config.test.ts +0 -166
- package/templates/apps/api/src/services/__tests__/magnet-completion.test.ts +0 -389
- package/templates/apps/api/src/services/__tests__/person.test.ts +0 -1204
- package/templates/apps/api/src/services/__tests__/plan-offerings.test.ts +0 -450
- package/templates/apps/api/src/services/__tests__/project-listings.counts.test.ts +0 -202
- package/templates/apps/api/src/services/__tests__/project-listings.fence.test.ts +0 -151
- package/templates/apps/api/src/services/__tests__/public-site-resolver.test.ts +0 -137
- package/templates/apps/api/src/services/__tests__/request-confirm.test.ts +0 -531
- package/templates/apps/api/src/services/__tests__/revalidation.test.ts +0 -372
- package/templates/apps/api/src/services/__tests__/slack-notify.test.ts +0 -348
- package/templates/apps/api/src/services/__tests__/spoke-resolution.test.ts +0 -660
- package/templates/apps/api/src/services/__tests__/usage-aggregation.test.ts +0 -941
- package/templates/apps/api/src/services/__tests__/usage-credits.test.ts +0 -588
- package/templates/apps/api/src/services/__tests__/verified-email.test.ts +0 -78
- package/templates/apps/api/src/services/abandon-email.ts +0 -336
- package/templates/apps/api/src/services/aeo-score.ts +0 -325
- package/templates/apps/api/src/services/answer-distributions.ts +0 -138
- package/templates/apps/api/src/services/audit-log.ts +0 -961
- package/templates/apps/api/src/services/checkout-buyer.ts +0 -168
- package/templates/apps/api/src/services/consent.ts +0 -834
- package/templates/apps/api/src/services/default-tenant.ts +0 -416
- package/templates/apps/api/src/services/deliverable-fulfillment.ts +0 -750
- package/templates/apps/api/src/services/dunning-policy.ts +0 -294
- package/templates/apps/api/src/services/enrichment-shim.ts +0 -53
- package/templates/apps/api/src/services/entitlements.ts +0 -338
- package/templates/apps/api/src/services/hub-sign-in.ts +0 -472
- package/templates/apps/api/src/services/lead-accept-user.ts +0 -126
- package/templates/apps/api/src/services/lead-promotion.ts +0 -160
- package/templates/apps/api/src/services/lead-routing.ts +0 -1372
- package/templates/apps/api/src/services/leads-inbox.ts +0 -312
- package/templates/apps/api/src/services/listing-config.ts +0 -178
- package/templates/apps/api/src/services/magnet-completion.ts +0 -242
- package/templates/apps/api/src/services/offerings/__tests__/catalog.test.ts +0 -348
- package/templates/apps/api/src/services/offerings/__tests__/checkout-session-record.test.ts +0 -268
- package/templates/apps/api/src/services/offerings/__tests__/connection.test.ts +0 -975
- package/templates/apps/api/src/services/offerings/__tests__/fixtures.ts +0 -416
- package/templates/apps/api/src/services/offerings/__tests__/org-products.test.ts +0 -400
- package/templates/apps/api/src/services/offerings/__tests__/readers.test.ts +0 -685
- package/templates/apps/api/src/services/offerings/__tests__/source.test.ts +0 -231
- package/templates/apps/api/src/services/offerings/catalog.ts +0 -318
- package/templates/apps/api/src/services/offerings/checkout-authorization.ts +0 -403
- package/templates/apps/api/src/services/offerings/checkout-session-record.ts +0 -192
- package/templates/apps/api/src/services/offerings/connection.ts +0 -1083
- package/templates/apps/api/src/services/offerings/index.ts +0 -614
- package/templates/apps/api/src/services/offerings/source.ts +0 -140
- package/templates/apps/api/src/services/offerings/store.ts +0 -150
- package/templates/apps/api/src/services/owner-workspaces.ts +0 -132
- package/templates/apps/api/src/services/person.ts +0 -1211
- package/templates/apps/api/src/services/plan-offerings.ts +0 -125
- package/templates/apps/api/src/services/project-listing-resume-email.ts +0 -326
- package/templates/apps/api/src/services/project-listings.ts +0 -2085
- package/templates/apps/api/src/services/public-site-resolver.ts +0 -396
- package/templates/apps/api/src/services/request-confirm.ts +0 -698
- package/templates/apps/api/src/services/revalidation.ts +0 -235
- package/templates/apps/api/src/services/slack-notify.ts +0 -291
- package/templates/apps/api/src/services/usage-aggregation.ts +0 -516
- package/templates/apps/api/src/services/usage-credits.ts +0 -340
- package/templates/apps/api/src/services/verified-email.ts +0 -71
- package/templates/apps/mcp/__tests__/abuse/daily-cap.test.ts +0 -52
- package/templates/apps/mcp/__tests__/abuse/email-validator.test.ts +0 -46
- package/templates/apps/mcp/__tests__/abuse/guard.test.ts +0 -198
- package/templates/apps/mcp/__tests__/abuse/honeypot.test.ts +0 -36
- package/templates/apps/mcp/__tests__/abuse/user-agent-deny.test.ts +0 -54
- package/templates/apps/mcp/__tests__/aeo-cli-parity.test.ts +0 -116
- package/templates/apps/mcp/__tests__/audit-single-page.test.ts +0 -299
- package/templates/apps/mcp/__tests__/boot.test.ts +0 -280
- package/templates/apps/mcp/__tests__/catalog-drift.test.ts +0 -359
- package/templates/apps/mcp/__tests__/config/modules.test.ts +0 -78
- package/templates/apps/mcp/__tests__/get_business_hours.test.ts +0 -82
- package/templates/apps/mcp/__tests__/get_faq.test.ts +0 -80
- package/templates/apps/mcp/__tests__/get_locations.test.ts +0 -65
- package/templates/apps/mcp/__tests__/get_offerings.test.ts +0 -557
- package/templates/apps/mcp/__tests__/get_pricing.test.ts +0 -524
- package/templates/apps/mcp/__tests__/get_site_info.test.ts +0 -81
- package/templates/apps/mcp/__tests__/http-transport.test.ts +0 -1232
- package/templates/apps/mcp/__tests__/index.test.ts +0 -195
- package/templates/apps/mcp/__tests__/lib/audit-single-page-readiness-scan.test.ts +0 -191
- package/templates/apps/mcp/__tests__/lib/commerce-claim.test.ts +0 -531
- package/templates/apps/mcp/__tests__/lib/content-adapter-parity.test.ts +0 -70
- package/templates/apps/mcp/__tests__/lib/content-adapter.test.ts +0 -162
- package/templates/apps/mcp/__tests__/lib/content-root.test.ts +0 -93
- package/templates/apps/mcp/__tests__/lib/errors.test.ts +0 -75
- package/templates/apps/mcp/__tests__/lib/fail-closed-tools.test.ts +0 -180
- package/templates/apps/mcp/__tests__/lib/public-workspace.test.ts +0 -124
- package/templates/apps/mcp/__tests__/list_pages.test.ts +0 -268
- package/templates/apps/mcp/__tests__/locale.test.ts +0 -120
- package/templates/apps/mcp/__tests__/module-exclusion.test.ts +0 -175
- package/templates/apps/mcp/__tests__/purchase-disabled.test.ts +0 -101
- package/templates/apps/mcp/__tests__/rate-limit-write.test.ts +0 -189
- package/templates/apps/mcp/__tests__/read_content.test.ts +0 -511
- package/templates/apps/mcp/__tests__/request_callback.test.ts +0 -160
- package/templates/apps/mcp/__tests__/search_content.test.ts +0 -271
- package/templates/apps/mcp/__tests__/server.test.ts +0 -388
- package/templates/apps/mcp/__tests__/start_purchase.test.ts +0 -448
- package/templates/apps/mcp/__tests__/submit_lead.test.ts +0 -222
- package/templates/apps/mcp/__tests__/subscribe_newsletter.test.ts +0 -152
- package/templates/apps/mcp/__tests__/tools/create_project.test.ts +0 -243
- package/templates/apps/mcp/__tests__/tools/purchase.test.ts +0 -451
- package/templates/apps/mcp/src/abuse/daily-cap.ts +0 -47
- package/templates/apps/mcp/src/abuse/email-validator.ts +0 -25
- package/templates/apps/mcp/src/abuse/honeypot.ts +0 -21
- package/templates/apps/mcp/src/abuse/index.ts +0 -349
- package/templates/apps/mcp/src/abuse/user-agent-deny.ts +0 -58
- package/templates/apps/mcp/src/boot.ts +0 -167
- package/templates/apps/mcp/src/config/modules.ts +0 -43
- package/templates/apps/mcp/src/http-transport.ts +0 -564
- package/templates/apps/mcp/src/lib/audit-single-page.ts +0 -308
- package/templates/apps/mcp/src/lib/commerce-claim.ts +0 -263
- package/templates/apps/mcp/src/lib/content-adapter.ts +0 -116
- package/templates/apps/mcp/src/lib/empty-content-adapter.ts +0 -140
- package/templates/apps/mcp/src/lib/errors.ts +0 -61
- package/templates/apps/mcp/src/lib/license-key-store.ts +0 -45
- package/templates/apps/mcp/src/lib/locales.ts +0 -171
- package/templates/apps/mcp/src/lib/prisma.ts +0 -39
- package/templates/apps/mcp/src/lib/public-workspace.ts +0 -133
- package/templates/apps/mcp/src/lib/resolve-locale.ts +0 -30
- package/templates/apps/mcp/src/lib/shown-offerings.ts +0 -105
- package/templates/apps/mcp/src/lib/site-config.ts +0 -53
- package/templates/apps/mcp/src/lib/stripe-tax-signal.ts +0 -59
- package/templates/apps/mcp/src/request-context.ts +0 -52
- package/templates/apps/mcp/src/server.ts +0 -343
- package/templates/apps/mcp/src/serverless-app.ts +0 -88
- package/templates/apps/mcp/src/tools/audit.ts +0 -127
- package/templates/apps/mcp/src/tools/capture_lead.ts +0 -66
- package/templates/apps/mcp/src/tools/create_project.ts +0 -134
- package/templates/apps/mcp/src/tools/get_business_hours.ts +0 -68
- package/templates/apps/mcp/src/tools/get_faq.ts +0 -71
- package/templates/apps/mcp/src/tools/get_locations.ts +0 -88
- package/templates/apps/mcp/src/tools/get_offerings.ts +0 -96
- package/templates/apps/mcp/src/tools/get_pricing.ts +0 -94
- package/templates/apps/mcp/src/tools/get_site_info.ts +0 -86
- package/templates/apps/mcp/src/tools/index.ts +0 -138
- package/templates/apps/mcp/src/tools/list_pages.ts +0 -68
- package/templates/apps/mcp/src/tools/person_notes.ts +0 -25
- package/templates/apps/mcp/src/tools/proposals.ts +0 -27
- package/templates/apps/mcp/src/tools/purchase.ts +0 -205
- package/templates/apps/mcp/src/tools/read_content.ts +0 -81
- package/templates/apps/mcp/src/tools/request_callback.ts +0 -52
- package/templates/apps/mcp/src/tools/search_content.ts +0 -63
- package/templates/apps/mcp/src/tools/subscribe_newsletter.ts +0 -54
- package/templates/apps/mcp/src/workspace-server.ts +0 -224
- package/templates/database/CHANGELOG.md +0 -981
- package/templates/database/LICENSE +0 -202
- package/templates/database/NOTICE +0 -2
- package/templates/database/README.md +0 -243
- package/templates/database/__tests__/agents.db.test.ts +0 -320
- package/templates/database/__tests__/appointment.db.test.ts +0 -106
- package/templates/database/__tests__/artifact-content-store.db.test.ts +0 -316
- package/templates/database/__tests__/composite-fence.db.test.ts +0 -206
- package/templates/database/__tests__/consent-ledger.db.test.ts +0 -345
- package/templates/database/__tests__/consent-source-checkout-migration.test.ts +0 -79
- package/templates/database/__tests__/fence-fan-out.db.test.ts +0 -715
- package/templates/database/__tests__/fixtures/appointment-create-probe.ts +0 -79
- package/templates/database/__tests__/fixtures/person-backfill.json +0 -264
- package/templates/database/__tests__/fixtures/person-contact-backfill.json +0 -182
- package/templates/database/__tests__/fixtures/project-listing-consent-probe.ts +0 -100
- package/templates/database/__tests__/flow-completion-migration.test.ts +0 -115
- package/templates/database/__tests__/flow-completion.db.test.ts +0 -136
- package/templates/database/__tests__/flow-workspace-key.db.test.ts +0 -263
- package/templates/database/__tests__/flows-listing-diagnostic.test.ts +0 -392
- package/templates/database/__tests__/flows-presets.test.ts +0 -173
- package/templates/database/__tests__/in-page-magnets-migration.test.ts +0 -161
- package/templates/database/__tests__/lead-idempotency-key.db.test.ts +0 -92
- package/templates/database/__tests__/member-area.db.test.ts +0 -257
- package/templates/database/__tests__/member-contract-migration.test.ts +0 -85
- package/templates/database/__tests__/member-contract.db.test.ts +0 -413
- package/templates/database/__tests__/offerings-checkout-session.db.test.ts +0 -270
- package/templates/database/__tests__/offerings-migration.test.ts +0 -197
- package/templates/database/__tests__/offerings-shown-price-ids-migration.test.ts +0 -86
- package/templates/database/__tests__/offerings.db.test.ts +0 -303
- package/templates/database/__tests__/outbound-message-action.db.test.ts +0 -80
- package/templates/database/__tests__/person-contact.db.test.ts +0 -563
- package/templates/database/__tests__/person-notes.db.test.ts +0 -249
- package/templates/database/__tests__/person.db.test.ts +0 -586
- package/templates/database/__tests__/piece-kind-migration.test.ts +0 -67
- package/templates/database/__tests__/piece-kind.db.test.ts +0 -208
- package/templates/database/__tests__/prefixed-ids.db.test.ts +0 -222
- package/templates/database/__tests__/project-listing-consent-at.db.test.ts +0 -111
- package/templates/database/__tests__/seed.test.ts +0 -272
- package/templates/database/__tests__/spoke-registry.db.test.ts +0 -191
- package/templates/database/__tests__/tenancy.test.ts +0 -141
- package/templates/database/__tests__/trial-magnet-migration.test.ts +0 -186
- package/templates/database/__tests__/user-cascade.test.ts +0 -140
- package/templates/database/_gitignore +0 -8
- package/templates/database/auth/.gitkeep +0 -0
- package/templates/database/auth/schema.prisma +0 -641
- package/templates/database/config/.gitkeep +0 -0
- package/templates/database/config/schema.prisma +0 -441
- package/templates/database/content/.gitkeep +0 -0
- package/templates/database/content/schema.prisma +0 -339
- package/templates/database/eslint.config.mjs +0 -69
- package/templates/database/flows/listing-diagnostic.ts +0 -182
- package/templates/database/flows/presets.ts +0 -315
- package/templates/database/inbox/.gitkeep +0 -0
- package/templates/database/inbox/README.md +0 -3
- package/templates/database/inbox/__tests__/schema.test.ts +0 -44
- package/templates/database/inbox/schema.prisma +0 -1447
- package/templates/database/jest.config.cjs +0 -36
- package/templates/database/migrations/20260508000000_add_inbox_namespace/migration.sql +0 -328
- package/templates/database/migrations/20260513000000_better_auth_migration/migration.sql +0 -100
- package/templates/database/migrations/20260515000000_add_user_billing_fields/migration.sql +0 -28
- package/templates/database/migrations/20260516000000_add_user_tier_care_plan_seat/migration.sql +0 -25
- package/templates/database/migrations/20260518000000_add_telemetry_records/migration.sql +0 -42
- package/templates/database/migrations/20260525000000_theme_wiring/migration.sql +0 -67
- package/templates/database/migrations/20260710000000_retire_commercial_tier/migration.sql +0 -21
- package/templates/database/migrations/20260712215647_add_multi_tenant_tenancy/migration.sql +0 -201
- package/templates/database/migrations/20260713143320_reanchor_site_config_to_workspace/migration.sql +0 -67
- package/templates/database/migrations/20260713174000_add_audit_logs/migration.sql +0 -46
- package/templates/database/migrations/20260713190000_drop_telemetry_records/migration.sql +0 -25
- package/templates/database/migrations/20260713192000_add_uuidv7_function/migration.sql +0 -49
- package/templates/database/migrations/20260713192429_prefixed_uuid_entity_ids/migration.sql +0 -197
- package/templates/database/migrations/20260713200000_add_org_billing/migration.sql +0 -32
- package/templates/database/migrations/20260714000000_add_lead_promotion_fields/migration.sql +0 -22
- package/templates/database/migrations/20260714010000_add_usage_billing_content_models/migration.sql +0 -151
- package/templates/database/migrations/20260714020000_add_usage_billing_auth_config_models/migration.sql +0 -223
- package/templates/database/migrations/20260714030000_credit_balance_non_negative/migration.sql +0 -22
- package/templates/database/migrations/20260714030000_widen_usage_billing_report_aggregates/migration.sql +0 -32
- package/templates/database/migrations/20260810233516_add_flow_engine_models/migration.sql +0 -40
- package/templates/database/migrations/20260811020000_add_flow_session_abandon_email_columns/migration.sql +0 -4
- package/templates/database/migrations/20260811030000_add_flow_session_abandon_email_index/migration.sql +0 -2
- package/templates/database/migrations/20260811040000_add_flow_session_segment/migration.sql +0 -2
- package/templates/database/migrations/20260811050000_add_deliverable_models/migration.sql +0 -29
- package/templates/database/migrations/20260812000000_add_deliverable_grant_send_columns/migration.sql +0 -6
- package/templates/database/migrations/20260902222948_add_waitlist_experiment_models/migration.sql +0 -39
- package/templates/database/migrations/20260902224500_add_waitlist_id_format_checks/migration.sql +0 -24
- package/templates/database/migrations/20260903004112_add_flow_session_flags_aeo_score/migration.sql +0 -3
- package/templates/database/migrations/20260903010000_add_playbook_instance/migration.sql +0 -33
- package/templates/database/migrations/20260904000000_add_waitlist_followup_send/migration.sql +0 -30
- package/templates/database/migrations/20260905230000_add_flow_checkout/migration.sql +0 -47
- package/templates/database/migrations/20260906000000_add_flow_checkout_idempotency/migration.sql +0 -16
- package/templates/database/migrations/20260907120000_add_project_listing/migration.sql +0 -47
- package/templates/database/migrations/20260907130000_add_project_listing_slack_columns/migration.sql +0 -10
- package/templates/database/migrations/20260907180000_add_listing_csv_send/migration.sql +0 -26
- package/templates/database/migrations/20260909120000_project_listings_platform/migration.sql +0 -90
- package/templates/database/migrations/20260909180000_listing_draft_and_fields/migration.sql +0 -174
- package/templates/database/migrations/20260910120000_listing_public_site_key/migration.sql +0 -14
- package/templates/database/migrations/20260911120000_listing_copy_edit_audit/migration.sql +0 -25
- package/templates/database/migrations/20260911140000_listing_structured_address/migration.sql +0 -32
- package/templates/database/migrations/20260911180000_consent_grants/migration.sql +0 -71
- package/templates/database/migrations/20260911200000_listing_site_answers/migration.sql +0 -30
- package/templates/database/migrations/20260912120000_listing_owner_link/migration.sql +0 -49
- package/templates/database/migrations/20260914120000_listing_founder_identity/migration.sql +0 -123
- package/templates/database/migrations/20260915120000_project_listing_solution/migration.sql +0 -15
- package/templates/database/migrations/20260916120000_artifact_content_store/migration.sql +0 -158
- package/templates/database/migrations/20260917120000_callback_request_confirm/migration.sql +0 -40
- package/templates/database/migrations/20260918120000_add_appointment/migration.sql +0 -67
- package/templates/database/migrations/20260918120000_asset_metadata_columns/migration.sql +0 -70
- package/templates/database/migrations/20260919120000_flow_workspace_key/migration.sql +0 -181
- package/templates/database/migrations/20260919130000_flow_definition_admin_columns/migration.sql +0 -172
- package/templates/database/migrations/20260919130000_workspace_meetings/migration.sql +0 -41
- package/templates/database/migrations/20260919140000_inbox_workspace_key/migration.sql +0 -185
- package/templates/database/migrations/20260920120000_lead_handled_at/migration.sql +0 -70
- package/templates/database/migrations/20260920130000_lead_workspace_source_index/migration.sql +0 -57
- package/templates/database/migrations/20260921120000_deliverable_grant_workspace_key/migration.sql +0 -68
- package/templates/database/migrations/20260922120000_tenancy_fence/migration.sql +0 -1067
- package/templates/database/migrations/20260923120000_listing_capturing_magnet/migration.sql +0 -210
- package/templates/database/migrations/20261003120000_spoke_registry/migration.sql +0 -80
- package/templates/database/migrations/20261003130000_scheduling_connection/migration.sql +0 -49
- package/templates/database/migrations/20261005120000_agents/migration.sql +0 -84
- package/templates/database/migrations/20261008120000_user_last_workspace/migration.sql +0 -35
- package/templates/database/migrations/20261008130000_lead_idempotency_key/migration.sql +0 -20
- package/templates/database/migrations/20261009120000_agent_grants/migration.sql +0 -33
- package/templates/database/migrations/20261010120000_person/migration.sql +0 -106
- package/templates/database/migrations/20261010121000_person_backfill/migration.sql +0 -132
- package/templates/database/migrations/20261010130000_agent_grants_people_read/migration.sql +0 -20
- package/templates/database/migrations/20261011120000_member_area/migration.sql +0 -158
- package/templates/database/migrations/20261011130000_agent_grants_member_pieces_manage/migration.sql +0 -21
- package/templates/database/migrations/20261012120000_member_contract/migration.sql +0 -192
- package/templates/database/migrations/20261013120000_lead_spoke_checkout/migration.sql +0 -20
- package/templates/database/migrations/20261014120000_consent_ledger/migration.sql +0 -122
- package/templates/database/migrations/20261014120000_person_contact/migration.sql +0 -231
- package/templates/database/migrations/20261015120000_person_notes/migration.sql +0 -77
- package/templates/database/migrations/20261015120000_rate_limit_counters/migration.sql +0 -43
- package/templates/database/migrations/20261016120000_piece_kind/migration.sql +0 -95
- package/templates/database/migrations/20261017120000_outbound_message_action/migration.sql +0 -30
- package/templates/database/migrations/20261018120000_flow_completion/migration.sql +0 -52
- package/templates/database/migrations/20261019120000_consent_source_checkout/migration.sql +0 -27
- package/templates/database/migrations/20261020120000_offerings_data_model/migration.sql +0 -146
- package/templates/database/migrations/20261021120000_offerings_checkout_session/migration.sql +0 -77
- package/templates/database/migrations/20261022120000_in_page_magnets/migration.sql +0 -45
- package/templates/database/migrations/20261023120000_offerings_shown_price_ids/migration.sql +0 -47
- package/templates/database/migrations/20261024120000_organization_plan_checkout_session/migration.sql +0 -16
- package/templates/database/migrations/20261025120000_trial_magnet/migration.sql +0 -28
- package/templates/database/migrations/20261026120000_trial_magnet_proof_line/migration.sql +0 -23
- package/templates/database/migrations/migration_lock.toml +0 -3
- package/templates/database/ops/.gitkeep +0 -0
- package/templates/database/ops/schema.prisma +0 -43
- package/templates/database/package.json +0 -89
- package/templates/database/schema.prisma +0 -71
- package/templates/database/scripts/db-generate-locked.sh +0 -80
- package/templates/database/scripts/person-backfill.sql +0 -132
- package/templates/database/tenancy.ts +0 -183
- package/templates/database/tsconfig.build.json +0 -16
- package/templates/database/tsconfig.flows.json +0 -15
- package/templates/database/tsconfig.json +0 -16
- package/templates/database/tsconfig.tenancy.json +0 -14
|
@@ -110,7 +110,7 @@ export const ARCHITECTURE_BASE = {
|
|
|
110
110
|
version: 1,
|
|
111
111
|
composition_model: {
|
|
112
112
|
tiers: {
|
|
113
|
-
data: "database/ — Prisma
|
|
113
|
+
data: "database/ — Prisma config + seed; schema and migrations ship in @working-theory/database",
|
|
114
114
|
api: "apps/api (public HTTP API) + apps/mcp (agent tools)",
|
|
115
115
|
presentation: "apps/web — frontend surfaces",
|
|
116
116
|
},
|
|
@@ -150,82 +150,6 @@ export const ARCHITECTURE_BASE = {
|
|
|
150
150
|
},
|
|
151
151
|
],
|
|
152
152
|
};
|
|
153
|
-
/**
|
|
154
|
-
* The member area's apps/api files (#7877 D9, D11), co-owned by `workspace`
|
|
155
|
-
* and `multi-tenant`: server.ts registers all five routes under the
|
|
156
|
-
* `workspace || multi-tenant` disjunction, so both bundles must deliver every
|
|
157
|
-
* file behind it — the three operator route files, the two member route
|
|
158
|
-
* files, the member resolution (`services/member-area.ts`) and the member
|
|
159
|
-
* data boundary (`lib/member-store.ts`).
|
|
160
|
-
*
|
|
161
|
-
* #8169 D9 adds the five Phase 1 member reads registered under that same
|
|
162
|
-
* disjunction. Its two other reads — `routes/member/meeting-types.ts` and
|
|
163
|
-
* `availability.ts` — reach `services/scheduling/`, so they are the
|
|
164
|
-
* `scheduling` slice's, not listed here.
|
|
165
|
-
*
|
|
166
|
-
* #8170 D11 adds the four member writes registered under that same
|
|
167
|
-
* disjunction (the message POST rides `messages.ts`). The fifth —
|
|
168
|
-
* `routes/member/bookings.ts` — reaches `services/scheduling/`, so it is the
|
|
169
|
-
* `scheduling` slice's.
|
|
170
|
-
*/
|
|
171
|
-
const MEMBER_AREA_FILES = [
|
|
172
|
-
"apps/api/src/routes/workspaces/pieces.ts",
|
|
173
|
-
"apps/api/src/routes/workspaces/plan.ts",
|
|
174
|
-
"apps/api/src/routes/workspaces/messages-out.ts",
|
|
175
|
-
// #8171 D8 — the workspace Requests read; imports only pieces.ts,
|
|
176
|
-
// lib/tenant-db.ts and @working-theory/validation.
|
|
177
|
-
"apps/api/src/routes/workspaces/requests.ts",
|
|
178
|
-
"apps/api/src/routes/member/pieces.ts",
|
|
179
|
-
"apps/api/src/routes/member/messages.ts",
|
|
180
|
-
"apps/api/src/routes/member/purchases.ts",
|
|
181
|
-
"apps/api/src/routes/member/appointments.ts",
|
|
182
|
-
"apps/api/src/routes/member/artifacts.ts",
|
|
183
|
-
"apps/api/src/routes/member/request-form.ts",
|
|
184
|
-
"apps/api/src/routes/member/billing.ts",
|
|
185
|
-
"apps/api/src/routes/member/requests.ts",
|
|
186
|
-
// #8515 D13 — the client's onboarding read and write.
|
|
187
|
-
"apps/api/src/routes/member/onboarding.ts",
|
|
188
|
-
"apps/api/src/routes/member/artifact-review.ts",
|
|
189
|
-
"apps/api/src/routes/member/profile.ts",
|
|
190
|
-
"apps/api/src/routes/member/deletion-request.ts",
|
|
191
|
-
// #8438 D6 — the member's own consents; the same gate as the writes above.
|
|
192
|
-
"apps/api/src/routes/member/consents.ts",
|
|
193
|
-
"apps/api/src/services/member-area.ts",
|
|
194
|
-
// #8516 D8 — whether proposal payment runs, and the Checkout Session;
|
|
195
|
-
// imported only by member-area files (pieces.ts and the two member
|
|
196
|
-
// artifact routes), and itself imports only base files.
|
|
197
|
-
"apps/api/src/services/proposal-payments.ts",
|
|
198
|
-
"apps/api/src/lib/member-store.ts",
|
|
199
|
-
// #8226 D12 — the member-request match CLI; both import member-store.ts,
|
|
200
|
-
// which a build without the member slice does not carry.
|
|
201
|
-
"apps/api/src/lib/member-request-match.ts",
|
|
202
|
-
"apps/api/src/bin/member-request-match.ts",
|
|
203
|
-
];
|
|
204
|
-
/**
|
|
205
|
-
* The workspace asset store (#5854), CO-OWNED by the `workspace` and
|
|
206
|
-
* `multi-tenant` slices.
|
|
207
|
-
*
|
|
208
|
-
* `server.ts` registers both of its routes under
|
|
209
|
-
* `isModuleEnabled("workspace") || isModuleEnabled("multi-tenant")`, and a file
|
|
210
|
-
* behind a two-module disjunction must be deliverable by BOTH bundles — or
|
|
211
|
-
* whichever module lacks it throws ERR_MODULE_NOT_FOUND during `build()`. One
|
|
212
|
-
* array spread into both `ownedFiles` lists makes the two copies incapable of
|
|
213
|
-
* drifting, which matters because a drift only surfaces in a scaffolded
|
|
214
|
-
* customer repo rather than here.
|
|
215
|
-
*
|
|
216
|
-
* `routes/assets/index.ts` is listed although it registers nothing: the
|
|
217
|
-
* template-exclusion closure runs over IMPORTERS, so a shared-constants module
|
|
218
|
-
* that is imported BY the routes and imports neither of them is never reached
|
|
219
|
-
* from them, and an unlisted one would ship into the keyless Free starter.
|
|
220
|
-
*/
|
|
221
|
-
const ASSET_STORE_FILES = [
|
|
222
|
-
"apps/api/src/routes/assets/index.ts",
|
|
223
|
-
"apps/api/src/routes/assets/upload.ts",
|
|
224
|
-
"apps/api/src/routes/assets/read.ts",
|
|
225
|
-
// The manage routes — list, PATCH, DELETE (#6093 D16).
|
|
226
|
-
"apps/api/src/routes/assets/manage.ts",
|
|
227
|
-
"apps/api/src/lib/asset-store.ts",
|
|
228
|
-
];
|
|
229
153
|
/**
|
|
230
154
|
* The auth-adapter exception (#587 in the AILK repo's own architecture.yaml):
|
|
231
155
|
* the base apps/web hands Better Auth its Prisma client from
|
|
@@ -548,7 +472,7 @@ export const MODULE_SLICES = {
|
|
|
548
472
|
apps: {
|
|
549
473
|
admin: {
|
|
550
474
|
path: "apps/admin",
|
|
551
|
-
description: "Next.js —
|
|
475
|
+
description: "Next.js — the Admin shell (Organization → Workspace → Membership): boots @working-theory/admin, which carries the pages, components, lib and auth, through generated route re-exports (#9570). Hosts the organization-plugin Better Auth route; the database read sits in that package (its lib/prisma-for-auth.ts, the auth-adapter exception); all domain data via apps/api's workspace-scoped routes over HTTP.",
|
|
552
476
|
may_import_from: [
|
|
553
477
|
"database",
|
|
554
478
|
"packages/templates",
|
|
@@ -699,12 +623,17 @@ export const MODULE_SLICES = {
|
|
|
699
623
|
// ownedFiles (S1, #5088). Verified against the current filesystem and
|
|
700
624
|
// server.ts's module-conditional registration (isModuleEnabled('multi-tenant')).
|
|
701
625
|
//
|
|
702
|
-
// apps-paid/admin/** is a single glob — the whole app
|
|
703
|
-
//
|
|
704
|
-
//
|
|
705
|
-
//
|
|
706
|
-
//
|
|
707
|
-
//
|
|
626
|
+
// apps-paid/admin/** is a single glob — the whole app, originally moved
|
|
627
|
+
// here from apps/workspace by a parallel workstream on this same branch,
|
|
628
|
+
// later renamed in place from its former Workspace-prefixed directory
|
|
629
|
+
// name by #5637, the Admin-vocabulary rename. Since #9570 the app under
|
|
630
|
+
// the glob is the Next SHELL (@working-theory/admin-shell): its configs,
|
|
631
|
+
// root layout, stylesheet, icons, Better Auth route, a re-exporting
|
|
632
|
+
// auth.ts and the generated re-exports of the package's routes — the
|
|
633
|
+
// pages, components, lib and auth implementation live in
|
|
634
|
+
// @working-theory/admin (packages-paid/admin), which the staged shell
|
|
635
|
+
// depends on, so the bundle carries no Admin source. Unlike every other
|
|
636
|
+
// entry below, this one is intentionally a glob, not an enumeration.
|
|
708
637
|
//
|
|
709
638
|
// apps/api/src/routes/project-listings/ is MIXED (free anonymous surface
|
|
710
639
|
// + tenant dashboard sharing one directory) — only the tenant-guarded
|
|
@@ -723,20 +652,20 @@ export const MODULE_SLICES = {
|
|
|
723
652
|
// patch.ts (tenant) AND ALSO by patch-draft.ts/public.ts (free) —
|
|
724
653
|
// shared within the directory across the free/paid split, so it stays.
|
|
725
654
|
//
|
|
726
|
-
//
|
|
655
|
+
// routes/waitlist-experiments/respond.ts (now api-signal-collectors'), by contrast, IS
|
|
727
656
|
// listed: grepped every `from "./respond.js"` importer in the repo and
|
|
728
657
|
// it is used ONLY by this directory's own comparison.ts/list.ts/signup.ts/
|
|
729
658
|
// signups.ts — all four tenant-scoped — so unlike its project-listings
|
|
730
659
|
// namesake it is NOT shared with a free route.
|
|
731
660
|
//
|
|
732
|
-
//
|
|
661
|
+
// packages/api/src/middleware/tenant.ts, services/tenant-context.ts,
|
|
733
662
|
// services/waitlist-dashboard.ts: each grepped for every importer
|
|
734
663
|
// repo-wide. tenant.ts is registered only in server.ts's tenantScope;
|
|
735
664
|
// tenant-context.ts backs only workspaces/tenant-guarded routes;
|
|
736
665
|
// waitlist-dashboard.ts backs only the four waitlist-experiments handlers
|
|
737
666
|
// above. None is reachable from a free route.
|
|
738
667
|
//
|
|
739
|
-
//
|
|
668
|
+
// packages/api/src/lib/tenant-db.ts and lib/ws-token.ts are an ADDITION beyond
|
|
740
669
|
// this card's literal checklist, found by tracing workspaces/*.ts's own
|
|
741
670
|
// imports: tenant-db.ts (the per-tenant Prisma-scoped client) is used only
|
|
742
671
|
// by services/tenant-context.ts and the three workspaces/*.ts route files
|
|
@@ -790,124 +719,6 @@ export const MODULE_SLICES = {
|
|
|
790
719
|
// not file grain, so it stays out of this literal list rather than
|
|
791
720
|
// asserting a split the evidence doesn't cleanly support.
|
|
792
721
|
ownedFiles: [
|
|
793
|
-
"apps/api/src/routes/workspaces/index.ts",
|
|
794
|
-
"apps/api/src/routes/workspaces/sessions.ts",
|
|
795
|
-
"apps/api/src/routes/workspaces/config.ts",
|
|
796
|
-
// #8926 D1 — the workspace Offerings routes, registered in the
|
|
797
|
-
// multi-tenant tenant scope beside the billing routes.
|
|
798
|
-
"apps/api/src/routes/workspaces/offerings.ts",
|
|
799
|
-
// #8438 D8 — the Admin owner's consents to Working Theory: registered
|
|
800
|
-
// under `isModuleEnabled("multi-tenant")` alone, the module that
|
|
801
|
-
// contributes the Admin app.
|
|
802
|
-
"apps/api/src/routes/consent/platform.ts",
|
|
803
|
-
// Co-owned with `workspace` (#5853): the content-write scope is gated on
|
|
804
|
-
// content-write AND (workspace || multi-tenant) and this file imports
|
|
805
|
-
// lib/tenant-db.ts, so each tenancy slice must deliver it.
|
|
806
|
-
"apps/api/src/routes/workspaces/content.ts",
|
|
807
|
-
...ASSET_STORE_FILES,
|
|
808
|
-
"apps/api/src/routes/billing/index.ts",
|
|
809
|
-
"apps/api/src/routes/billing/portal.ts",
|
|
810
|
-
"apps/api/src/routes/billing/read.ts",
|
|
811
|
-
"apps/api/src/routes/billing/stripe-connection.ts",
|
|
812
|
-
"apps/api/src/routes/billing/stripe-products.ts",
|
|
813
|
-
"apps/api/src/routes/billing/usage.ts",
|
|
814
|
-
"apps/api/src/routes/waitlist-experiments/index.ts",
|
|
815
|
-
"apps/api/src/routes/waitlist-experiments/list.ts",
|
|
816
|
-
"apps/api/src/routes/waitlist-experiments/comparison.ts",
|
|
817
|
-
"apps/api/src/routes/waitlist-experiments/signup.ts",
|
|
818
|
-
"apps/api/src/routes/waitlist-experiments/signups.ts",
|
|
819
|
-
"apps/api/src/routes/waitlist-experiments/respond.ts",
|
|
820
|
-
"apps/api/src/routes/project-listings/get.ts",
|
|
821
|
-
"apps/api/src/routes/project-listings/list.ts",
|
|
822
|
-
"apps/api/src/routes/project-listings/patch.ts",
|
|
823
|
-
"apps/api/src/middleware/tenant.ts",
|
|
824
|
-
"apps/api/src/services/tenant-context.ts",
|
|
825
|
-
"apps/api/src/services/waitlist-dashboard.ts",
|
|
826
|
-
// #6258 — the file waitlist-dashboard.ts imports for the pinned
|
|
827
|
-
// platform-operator read scope. It rides BOTH slices for the same
|
|
828
|
-
// reason its importer does: an unlisted import target breaks a
|
|
829
|
-
// signal-collectors-without-multi-tenant scaffold at build() time.
|
|
830
|
-
"apps/api/src/services/waitlist-operator-reads.ts",
|
|
831
|
-
// #6204/#6280 CI fix — `listUnhandledMessages`/`markMessageHandled`
|
|
832
|
-
// (the "Needs-you" message read/write over `tenantDb(tenant).leads`)
|
|
833
|
-
// moved here off `services/leads-inbox.ts`, a BASE-tier file every
|
|
834
|
-
// scaffold ships. Importing `lib/tenant-db.ts` from that base file
|
|
835
|
-
// walked `paidModuleTemplateExclusions()`'s companion closure
|
|
836
|
-
// (`lib/import-graph.ts`) BACKWARD into `leads-inbox.ts` itself and
|
|
837
|
-
// then into every one of `apps/api/src/{server,cli,index,
|
|
838
|
-
// vercel-handler}.ts` — all of which reach it through
|
|
839
|
-
// `routes/leads/list.ts` — dropping them from a keyless scaffold
|
|
840
|
-
// (`__tests__/paid-module-exclusions.test.ts`'s `MUST_SHIP` guard,
|
|
841
|
-
// #5678's cascade shape recurring a third time).
|
|
842
|
-
//
|
|
843
|
-
// #6216 — now reached: `routes/workspaces/messages.ts` (below)
|
|
844
|
-
// consumes `getMessage` alongside the two functions above. That route
|
|
845
|
-
// registers under `isModuleEnabled("workspace") ||
|
|
846
|
-
// isModuleEnabled("multi-tenant")` — the SAME gate
|
|
847
|
-
// `workspaces/general.ts`/`members.ts` register under, NOT the
|
|
848
|
-
// multi-tenant-only family `workspaces/meetings.ts`/`config.ts` sit
|
|
849
|
-
// in — so this file and `routes/workspaces/messages.ts` are now
|
|
850
|
-
// CO-OWNED with `workspace` too (see that slice's entry below), the
|
|
851
|
-
// asset-store precedent: a file behind an OR gate must be
|
|
852
|
-
// deliverable by BOTH bundles.
|
|
853
|
-
"apps/api/src/services/inbox-messages.ts",
|
|
854
|
-
"apps/api/src/routes/workspaces/messages.ts",
|
|
855
|
-
// #7535 — the Inbox submissions and subscribers reads: the same
|
|
856
|
-
// workspace||multi-tenant gate and the same tenant-db.ts import as
|
|
857
|
-
// the two lines above, so co-owned with `workspace` for the same
|
|
858
|
-
// reason (see that slice's entry below).
|
|
859
|
-
"apps/api/src/routes/workspaces/submissions.ts",
|
|
860
|
-
"apps/api/src/routes/workspaces/subscribers.ts",
|
|
861
|
-
"apps/api/src/services/inbox-submissions.ts",
|
|
862
|
-
// #9170 — the Inbox orders read: the same gate and the same
|
|
863
|
-
// tenant-db.ts import, co-owned with `workspace` for the same reason.
|
|
864
|
-
"apps/api/src/routes/workspaces/orders.ts",
|
|
865
|
-
"apps/api/src/services/inbox-orders.ts",
|
|
866
|
-
// #9254 DD5 — the Inbox callbacks read: the same gate and the same
|
|
867
|
-
// tenant-db.ts import, co-owned with `workspace` for the same reason.
|
|
868
|
-
"apps/api/src/routes/workspaces/callbacks.ts",
|
|
869
|
-
// #9287 DD2 — Start, Get and Extend trial: the same gate and the same
|
|
870
|
-
// tenant-db.ts import, co-owned with `workspace` for the same reason.
|
|
871
|
-
"apps/api/src/routes/workspaces/trial.ts",
|
|
872
|
-
"apps/api/src/services/trial.ts",
|
|
873
|
-
// #852 D8 — the People reads: the same workspace||multi-tenant gate and
|
|
874
|
-
// the same tenant-db.ts import, co-owned with `workspace` for the same
|
|
875
|
-
// reason.
|
|
876
|
-
"apps/api/src/routes/workspaces/people.ts",
|
|
877
|
-
// #7877 D9, D11 — the member area: the operator's routes and the member
|
|
878
|
-
// reads register under the same workspace||multi-tenant gate, so each
|
|
879
|
-
// file behind it — the routes, the member resolution and the member
|
|
880
|
-
// data boundary — is co-owned with `workspace`, as people.ts is.
|
|
881
|
-
...MEMBER_AREA_FILES,
|
|
882
|
-
// #7399 — the two siblings #6216 left `workspace`-only. They register
|
|
883
|
-
// under that same `workspace || multi-tenant` gate, so a scaffold with
|
|
884
|
-
// `multi-tenant` and without `workspace` loaded them with no file behind
|
|
885
|
-
// the specifier and 500'd every request at server construction. Co-owned
|
|
886
|
-
// with `workspace` (see that slice's entry below); both import only
|
|
887
|
-
// `lib/tenant-db.ts` (owned here) and base files.
|
|
888
|
-
// `__tests__/tenancy-slice-resolution.test.ts` holds the whole gate set.
|
|
889
|
-
"apps/api/src/routes/workspaces/general.ts",
|
|
890
|
-
"apps/api/src/routes/workspaces/members.ts",
|
|
891
|
-
// #3591 PR-B — the agent seat's routes, a sibling of `members.ts` under
|
|
892
|
-
// the same `workspace || multi-tenant` gate, so co-owned with
|
|
893
|
-
// `workspace` for the #7399 reason above.
|
|
894
|
-
"apps/api/src/routes/workspaces/agents.ts",
|
|
895
|
-
// #3591 PR-E — the signed-in workspace MCP tools that twin the agent
|
|
896
|
-
// context, message and submission routes above. Each registers when
|
|
897
|
-
// its twin route does (`workspace || multi-tenant`), so co-owned with
|
|
898
|
-
// `workspace` for the same reason; the application tools' file is
|
|
899
|
-
// co-owned with `signal-collectors` instead, its routes' gate.
|
|
900
|
-
"apps/mcp/src/tools/agent_context.ts",
|
|
901
|
-
"apps/mcp/src/tools/inbox_messages.ts",
|
|
902
|
-
"apps/mcp/src/tools/inbox_submissions.ts",
|
|
903
|
-
"apps/mcp/src/tools/inbox_applications.ts",
|
|
904
|
-
"apps/api/src/lib/tenant-db.ts",
|
|
905
|
-
"apps/api/src/lib/ws-token.ts",
|
|
906
|
-
// #6157 D16 — the magnet Admin authoring surface, co-owned with
|
|
907
|
-
// `signal-collectors` below for the SAME reason #5677 co-owns the
|
|
908
|
-
// review surface under both: its scope is registered under the
|
|
909
|
-
// widened `multi-tenant || signal-collectors` gate.
|
|
910
|
-
"apps/api/src/routes/magnets/index.ts",
|
|
911
722
|
"apps/web/app/[locale]/(authed)/waitlist/page.tsx",
|
|
912
723
|
"apps/web/app/[locale]/(authed)/waitlist/[experimentId]/page.tsx",
|
|
913
724
|
"apps/web/app/[locale]/(authed)/waitlist/[experimentId]/signups/[leadId]/page.tsx",
|
|
@@ -918,25 +729,13 @@ export const MODULE_SLICES = {
|
|
|
918
729
|
"apps/web/app/[locale]/(authed)/waitlist/components/SignupsTable.tsx",
|
|
919
730
|
"apps/web/app/[locale]/(authed)/waitlist/components/WaitlistComparisonTabs.tsx",
|
|
920
731
|
"apps/web/app/[locale]/(authed)/waitlist/components/status-badges.tsx",
|
|
921
|
-
// #7389 — the three api suites that enable `multi-tenant` ALONE and so
|
|
922
|
-
// reach files this slice delivers (`services/tenant-context.ts` and the
|
|
923
|
-
// `routes/workspaces/` index). Each is listed individually, never as a
|
|
924
|
-
// glob (the `scheduling` slice's § D12 property 1: a glob entry is a
|
|
925
|
-
// silent no-op), so it ships to a keyed scaffold with the slice and is
|
|
926
|
-
// stripped from a keyless one with it — instead of a keyless scaffold
|
|
927
|
-
// carrying a test that raises `createNoMappedModuleFoundError`. A suite
|
|
928
|
-
// that enables SEVERAL paid modules cannot be owned by any one of
|
|
929
|
-
// them; those are `EXCLUDE_TEMPLATE_DIRS` entries below.
|
|
930
|
-
"apps/api/src/services/__tests__/lead-promotion.test.ts",
|
|
931
|
-
"apps/api/src/services/__tests__/leads-inbox.test.ts",
|
|
932
|
-
"apps/api/src/__tests__/content-write-production-boot.test.ts",
|
|
933
732
|
"apps-paid/admin/**",
|
|
934
733
|
],
|
|
935
734
|
// The whole-app glob above lands its files at their REPO-relative path
|
|
936
735
|
// unless something re-roots them (`installBundleTree`'s `copyTree`
|
|
937
736
|
// excludes only `installMap` KEYS from its verbatim copy), so without a
|
|
938
737
|
// rename rule a keyed install left a stray source-tree-relative
|
|
939
|
-
// directory in the scaffold instead of the working `apps/admin`
|
|
738
|
+
// directory in the scaffold instead of the working `apps/admin` shell
|
|
940
739
|
// this slice's own `apps.admin.path` (and `paid-paths.ts`'s
|
|
941
740
|
// `introducedAppPaths()`) already declares (#5626 D3/D4). The fix lives
|
|
942
741
|
// here, on the module, so `--modules multi-tenant` alone is fixed too —
|
|
@@ -953,6 +752,26 @@ export const MODULE_SLICES = {
|
|
|
953
752
|
// fixture calls the same derivation so it cannot drift from the
|
|
954
753
|
// producer's. See `installRoot`'s own doc on `ModuleSlice` above.
|
|
955
754
|
installRoot: "apps/admin/",
|
|
755
|
+
// #9460 DD5/DD6 — the signed-in workspace MCP tools (#3591 PR-E) ride
|
|
756
|
+
// `@working-theory/mcp-workspace`, delivered as a dependency of the
|
|
757
|
+
// buyer's apps/mcp and reached through the generated registry; the
|
|
758
|
+
// merge-keys op is the same shape every other paid package uses.
|
|
759
|
+
paidMcpToolPackages: ["@working-theory/mcp-workspace"],
|
|
760
|
+
patches: [
|
|
761
|
+
{
|
|
762
|
+
target: "apps/mcp/package.json",
|
|
763
|
+
kind: "json",
|
|
764
|
+
ops: [
|
|
765
|
+
{
|
|
766
|
+
op: "merge-keys",
|
|
767
|
+
path: ["dependencies"],
|
|
768
|
+
entries: {
|
|
769
|
+
"@working-theory/mcp-workspace": "workspace:*",
|
|
770
|
+
},
|
|
771
|
+
},
|
|
772
|
+
],
|
|
773
|
+
},
|
|
774
|
+
],
|
|
956
775
|
},
|
|
957
776
|
// ── workspace — Pro module: the single-workspace settings shell (D-27/D-49)
|
|
958
777
|
//
|
|
@@ -975,7 +794,7 @@ export const MODULE_SLICES = {
|
|
|
975
794
|
webImports: [WEB_AUTH_ADAPTER_IMPORT, "packages/admin-ui"],
|
|
976
795
|
packages: {
|
|
977
796
|
"admin-ui": {
|
|
978
|
-
description: "Shared Admin
|
|
797
|
+
description: "Shared Admin components — the settings shell plus the General / Site / Team panels, and the Magnets (flow wizard, flow list) and Meetings (meeting types, meeting detail) screens, presentational only (data + save callbacks as props)",
|
|
979
798
|
// packages/templates is required because AdminSettingsShell
|
|
980
799
|
// composes AppShell from @working-theory/templates/shells — the same
|
|
981
800
|
// composition apps/web's own account page uses.
|
|
@@ -988,7 +807,7 @@ export const MODULE_SLICES = {
|
|
|
988
807
|
},
|
|
989
808
|
},
|
|
990
809
|
// SOURCE files only, and only the ones this module physically owns: the
|
|
991
|
-
//
|
|
810
|
+
// apps/web /admin route files and the two modules they share.
|
|
992
811
|
//
|
|
993
812
|
// `packages/admin-ui/**` is deliberately NOT listed (D1a). It is a
|
|
994
813
|
// whole package that is paid end to end, whose strip disposition is
|
|
@@ -1013,47 +832,16 @@ export const MODULE_SLICES = {
|
|
|
1013
832
|
"apps/web/app/[locale]/(authed)/admin/page.tsx",
|
|
1014
833
|
"apps/web/app/[locale]/(authed)/admin/site/page.tsx",
|
|
1015
834
|
"apps/web/app/[locale]/(authed)/admin/team/page.tsx",
|
|
1016
|
-
//
|
|
1017
|
-
//
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
"apps/
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
// routes.
|
|
1027
|
-
"apps/mcp/src/tools/agent_context.ts",
|
|
1028
|
-
"apps/mcp/src/tools/inbox_messages.ts",
|
|
1029
|
-
"apps/mcp/src/tools/inbox_submissions.ts",
|
|
1030
|
-
// Co-owned with `multi-tenant` (#6216) — see that slice's entry: the
|
|
1031
|
-
// route registers under the SAME workspace||multi-tenant gate as the
|
|
1032
|
-
// two lines above, and its service function imports `lib/tenant-db.ts`
|
|
1033
|
-
// (a multi-tenant-owned file), so both must be deliverable by either
|
|
1034
|
-
// bundle alone.
|
|
1035
|
-
"apps/api/src/routes/workspaces/messages.ts",
|
|
1036
|
-
"apps/api/src/services/inbox-messages.ts",
|
|
1037
|
-
// Co-owned with `multi-tenant` (#7535), for the reason the two
|
|
1038
|
-
// message lines above carry.
|
|
1039
|
-
"apps/api/src/routes/workspaces/submissions.ts",
|
|
1040
|
-
"apps/api/src/routes/workspaces/subscribers.ts",
|
|
1041
|
-
"apps/api/src/services/inbox-submissions.ts",
|
|
1042
|
-
// Co-owned with `multi-tenant` (#9170), as the reads above.
|
|
1043
|
-
"apps/api/src/routes/workspaces/orders.ts",
|
|
1044
|
-
"apps/api/src/services/inbox-orders.ts",
|
|
1045
|
-
// Co-owned with `multi-tenant` (#9254 DD5), as the reads above.
|
|
1046
|
-
"apps/api/src/routes/workspaces/callbacks.ts",
|
|
1047
|
-
// Co-owned with `multi-tenant` (#9287 DD2), as the reads above.
|
|
1048
|
-
"apps/api/src/routes/workspaces/trial.ts",
|
|
1049
|
-
"apps/api/src/services/trial.ts",
|
|
1050
|
-
// Co-owned with `multi-tenant` (#852 D8), as the reads above.
|
|
1051
|
-
"apps/api/src/routes/workspaces/people.ts",
|
|
1052
|
-
// Co-owned with `multi-tenant` (#7877 D9, D11) — see that slice's entry.
|
|
1053
|
-
...MEMBER_AREA_FILES,
|
|
1054
|
-
// Co-owned with `multi-tenant` (#5853) — see that slice's entry.
|
|
1055
|
-
"apps/api/src/routes/workspaces/content.ts",
|
|
1056
|
-
...ASSET_STORE_FILES,
|
|
835
|
+
// #9746 D10 — the shared nav, the client bindings, and the Magnets and
|
|
836
|
+
// Meetings tabs. Not routes themselves (the first two), but owned the
|
|
837
|
+
// same way: a keyless scaffold drops them with the pages that import
|
|
838
|
+
// them.
|
|
839
|
+
"apps/web/app/[locale]/(authed)/admin/admin-nav.ts",
|
|
840
|
+
"apps/web/app/[locale]/(authed)/admin/admin-panels.tsx",
|
|
841
|
+
"apps/web/app/[locale]/(authed)/admin/magnets/page.tsx",
|
|
842
|
+
"apps/web/app/[locale]/(authed)/admin/magnets/new/[kind]/page.tsx",
|
|
843
|
+
"apps/web/app/[locale]/(authed)/admin/meetings/page.tsx",
|
|
844
|
+
"apps/web/app/[locale]/(authed)/admin/meetings/[slug]/page.tsx",
|
|
1057
845
|
],
|
|
1058
846
|
// patches — the dependency add that delivers the shared package to the
|
|
1059
847
|
// buyer's apps/web, mirroring docs-blog's own fumadocs-schema merge-keys
|
|
@@ -1075,7 +863,23 @@ export const MODULE_SLICES = {
|
|
|
1075
863
|
},
|
|
1076
864
|
],
|
|
1077
865
|
},
|
|
866
|
+
// #9460 DD5/DD6 — the signed-in workspace MCP tools (#3591 PR-E),
|
|
867
|
+
// co-owned with `multi-tenant`, ride `@working-theory/mcp-workspace`.
|
|
868
|
+
{
|
|
869
|
+
target: "apps/mcp/package.json",
|
|
870
|
+
kind: "json",
|
|
871
|
+
ops: [
|
|
872
|
+
{
|
|
873
|
+
op: "merge-keys",
|
|
874
|
+
path: ["dependencies"],
|
|
875
|
+
entries: {
|
|
876
|
+
"@working-theory/mcp-workspace": "workspace:*",
|
|
877
|
+
},
|
|
878
|
+
},
|
|
879
|
+
],
|
|
880
|
+
},
|
|
1078
881
|
],
|
|
882
|
+
paidMcpToolPackages: ["@working-theory/mcp-workspace"],
|
|
1079
883
|
},
|
|
1080
884
|
// ── scheduling — full-stack module (provider + routes + booker pages) ────
|
|
1081
885
|
//
|
|
@@ -1183,7 +987,7 @@ export const MODULE_SLICES = {
|
|
|
1183
987
|
// server.ts's module-conditional registration (isModuleEnabled('scheduling')),
|
|
1184
988
|
// and a repo-wide grep of every importer of each candidate file.
|
|
1185
989
|
//
|
|
1186
|
-
//
|
|
990
|
+
// services/scheduling/index.ts, cal-provider.ts, types.ts (now api-scheduling's) —
|
|
1187
991
|
// the whole directory; grepped `services/scheduling` repo-wide and the
|
|
1188
992
|
// ONLY importer outside its own __tests__/ is routes/schedule/index.ts,
|
|
1189
993
|
// so no sibling error-type file exists elsewhere to add.
|
|
@@ -1246,19 +1050,6 @@ export const MODULE_SLICES = {
|
|
|
1246
1050
|
// deliberately NOT listed here: they ship, and listing one would take the
|
|
1247
1051
|
// whole dispatch table with it.
|
|
1248
1052
|
ownedFiles: [
|
|
1249
|
-
"apps/api/src/routes/schedule/index.ts",
|
|
1250
|
-
"apps/api/src/services/scheduling/index.ts",
|
|
1251
|
-
"apps/api/src/services/scheduling/cal-provider.ts",
|
|
1252
|
-
"apps/api/src/services/scheduling/types.ts",
|
|
1253
|
-
// #6182 (S9a) — the Cal adapter's own suite. Individually, never as a
|
|
1254
|
-
// glob (§ D12 above, property 1: a glob entry is a silent no-op, so
|
|
1255
|
-
// `__tests__/**` would ship no test at all to a keyed scaffold).
|
|
1256
|
-
"apps/api/src/services/scheduling/__tests__/cal-provider.test.ts",
|
|
1257
|
-
"apps/mcp/src/tools/list_availability.ts",
|
|
1258
|
-
"apps/mcp/src/tools/get_event_meta.ts",
|
|
1259
|
-
// #8843 D5 — the twin of GET /v1/schedule/meetings.
|
|
1260
|
-
"apps/mcp/src/tools/list_meetings.ts",
|
|
1261
|
-
"apps/mcp/src/tools/create_booking.ts",
|
|
1262
1053
|
"apps/web/app/[locale]/meet/page.tsx",
|
|
1263
1054
|
"apps/web/app/[locale]/meet/[slug]/page.tsx",
|
|
1264
1055
|
"apps/web/app/[locale]/meet/confirmed/page.tsx",
|
|
@@ -1272,23 +1063,6 @@ export const MODULE_SLICES = {
|
|
|
1272
1063
|
"apps/web/app/[locale]/private/page.tsx",
|
|
1273
1064
|
"apps/web/app/[locale]/private/__tests__/page.test.tsx",
|
|
1274
1065
|
"apps/web/app/[locale]/private/__tests__/sitemap.test.ts",
|
|
1275
|
-
// #6085 (brief H7) — the six files the webhook receiver + the
|
|
1276
|
-
// tenant-guarded appointments read add. Individually, never as a
|
|
1277
|
-
// glob (§ D12 / this card's own comment above, property 1: a glob
|
|
1278
|
-
// entry is a silent no-op, so __tests__/** would ship no test at all
|
|
1279
|
-
// to a keyed scaffold). `apps/api/src/routes/webhooks/index.ts` is
|
|
1280
|
-
// NOT added — it is the mixed barrel that also registers the Stripe
|
|
1281
|
-
// receiver, the same "mixed barrel is never listed" precedent this
|
|
1282
|
-
// slice already records for `routes/project-listings/index.ts`.
|
|
1283
|
-
// `apps/api/src/routes/schedule/index.ts` is already listed above and
|
|
1284
|
-
// stays (it re-exports `listAppointmentsRoute` alongside the three
|
|
1285
|
-
// anonymous routes it already re-exports).
|
|
1286
|
-
"apps/api/src/routes/webhooks/calcom.ts",
|
|
1287
|
-
"apps/api/src/routes/webhooks/__tests__/calcom.test.ts",
|
|
1288
|
-
"apps/api/src/services/scheduling/appointments.ts",
|
|
1289
|
-
"apps/api/src/services/scheduling/__tests__/appointments.test.ts",
|
|
1290
|
-
"apps/api/src/routes/schedule/appointments.ts",
|
|
1291
|
-
"apps/api/src/routes/schedule/__tests__/appointments.test.ts",
|
|
1292
1066
|
// #6086 (brief H7) — the SITE's appointments page, the visible half of
|
|
1293
1067
|
// the read above. The co-located suite is listed EXPLICITLY alongside
|
|
1294
1068
|
// its page: `EXCLUDE_TEMPLATE_DIRS` below drops only the three
|
|
@@ -1299,80 +1073,6 @@ export const MODULE_SLICES = {
|
|
|
1299
1073
|
// test for a page it does not have.
|
|
1300
1074
|
"apps/web/app/[locale]/(authed)/appointments/page.tsx",
|
|
1301
1075
|
"apps/web/app/[locale]/(authed)/appointments/__tests__/page.test.tsx",
|
|
1302
|
-
// #6183 S9b — the enabled-meeting-slugs gate. `meetings.ts` is its own
|
|
1303
|
-
// file (not folded into `routes/workspaces/config.ts`, which is
|
|
1304
|
-
// `workspace`/`multi-tenant`-owned) precisely because its GET reaches
|
|
1305
|
-
// `services/scheduling/` — the SAME reason `routes/schedule/
|
|
1306
|
-
// appointments.ts` above is its own file rather than a row on an
|
|
1307
|
-
// existing route. `lib/public-meetings-config.ts` is the public-read
|
|
1308
|
-
// boundary `routes/schedule/meeting-types.ts` (the anonymous read,
|
|
1309
|
-
// already reached via the already-listed `routes/schedule/index.ts`)
|
|
1310
|
-
// calls into.
|
|
1311
|
-
"apps/api/src/routes/workspaces/meetings.ts",
|
|
1312
|
-
"apps/api/src/routes/workspaces/__tests__/meetings.test.ts",
|
|
1313
|
-
"apps/api/src/lib/public-meetings-config.ts",
|
|
1314
|
-
"apps/api/src/routes/schedule/meeting-types.ts",
|
|
1315
|
-
"apps/api/src/routes/schedule/__tests__/meeting-types.test.ts",
|
|
1316
|
-
// #8843 D1 — the meetings read's own suite; the route is in
|
|
1317
|
-
// `routes/schedule/index.ts`, listed above.
|
|
1318
|
-
"apps/api/src/routes/schedule/__tests__/meetings.test.ts",
|
|
1319
|
-
// #7532 — a hub spoke's meeting types and booking, through the real
|
|
1320
|
-
// scheduling routes; it ships and strips with them.
|
|
1321
|
-
"apps/api/src/routes/schedule/__tests__/spoke.test.ts",
|
|
1322
|
-
// meetings.ts is the FIRST scheduling-gated route to use the generic
|
|
1323
|
-
// tenantDb() scope layer directly (its sibling, appointments.ts, does
|
|
1324
|
-
// its own scoped read in services/scheduling/appointments.ts instead)
|
|
1325
|
-
// — and `workspaceMeetings` is now in architecture.yaml's tenant-scope
|
|
1326
|
-
// forbidden_pattern (#6183), so meetings.ts cannot bypass tenantDb()
|
|
1327
|
-
// with a raw prisma call. Co-owned with `multi-tenant` below (the
|
|
1328
|
-
// SAME two files, same reason `content.ts`'s own comment there
|
|
1329
|
-
// records: "each tenancy slice must deliver it").
|
|
1330
|
-
"apps/api/src/lib/tenant-db.ts",
|
|
1331
|
-
"apps/api/src/services/tenant-context.ts",
|
|
1332
|
-
// #7389 — `routes/workspaces/__tests__/meetings.test.ts` and
|
|
1333
|
-
// `meetings-connection.test.ts` (listed below) register the real
|
|
1334
|
-
// `tenantPreHandlerPlugin` in front of `meetings.ts`, so a scheduling
|
|
1335
|
-
// scaffold without `multi-tenant` could not load them. It imports only
|
|
1336
|
-
// `services/tenant-context.ts` (owned above) and the base
|
|
1337
|
-
// `default-tenant.ts`, so co-owning it keeps the closure tight.
|
|
1338
|
-
"apps/api/src/middleware/tenant.ts",
|
|
1339
|
-
// #7533 — a scheduling connection per workspace. `connections.ts` (the
|
|
1340
|
-
// cipher + the one SchedulingConnection data-access boundary) and
|
|
1341
|
-
// `resolve.ts` (the workspace-aware provider resolution the meetings,
|
|
1342
|
-
// schedule and webhook routes above now call), plus each new suite,
|
|
1343
|
-
// individually (§ D12, property 1: a glob ships no test). The config
|
|
1344
|
-
// suite is listed here although `config/index.ts` itself stays base:
|
|
1345
|
-
// it tests a scheduling-only variable, so a keyless scaffold carries
|
|
1346
|
-
// neither the variable's purpose nor its test.
|
|
1347
|
-
"apps/api/src/services/scheduling/connections.ts",
|
|
1348
|
-
"apps/api/src/services/scheduling/resolve.ts",
|
|
1349
|
-
"apps/api/src/services/scheduling/__tests__/connections.test.ts",
|
|
1350
|
-
"apps/api/src/services/scheduling/__tests__/provider-resolution.test.ts",
|
|
1351
|
-
// #9129 — the meetings-list assembly the meetings route and the member
|
|
1352
|
-
// meeting types share, plus its suite.
|
|
1353
|
-
"apps/api/src/services/scheduling/meetings.ts",
|
|
1354
|
-
"apps/api/src/services/scheduling/__tests__/meetings.test.ts",
|
|
1355
|
-
"apps/api/src/routes/workspaces/__tests__/meetings-connection.test.ts",
|
|
1356
|
-
"apps/api/src/routes/schedule/__tests__/public-connection.test.ts",
|
|
1357
|
-
"apps/api/src/routes/webhooks/__tests__/calcom-connection.test.ts",
|
|
1358
|
-
"apps/api/src/config/__tests__/scheduling-credential-key.test.ts",
|
|
1359
|
-
// #8169 D9 — the two member reads that reach `services/scheduling/`,
|
|
1360
|
-
// registered under `scheduling && (workspace || multi-tenant)`, plus
|
|
1361
|
-
// the three member files they import, which this slice then CO-OWNS
|
|
1362
|
-
// with the two tenancy slices (`MEMBER_AREA_FILES`) — exactly as it
|
|
1363
|
-
// co-owns `lib/tenant-db.ts` for `routes/workspaces/meetings.ts` above.
|
|
1364
|
-
"apps/api/src/routes/member/meeting-types.ts",
|
|
1365
|
-
"apps/api/src/routes/member/availability.ts",
|
|
1366
|
-
// #8170 D11 — the member booking, the same shape.
|
|
1367
|
-
"apps/api/src/routes/member/bookings.ts",
|
|
1368
|
-
"apps/api/src/routes/member/pieces.ts",
|
|
1369
|
-
"apps/api/src/services/member-area.ts",
|
|
1370
|
-
"apps/api/src/lib/member-store.ts",
|
|
1371
|
-
// #7389 — the two api suites that enable `scheduling` alone, so they
|
|
1372
|
-
// strip with `routes/schedule/index.ts`, which they load by a computed
|
|
1373
|
-
// specifier the import-graph closure cannot follow.
|
|
1374
|
-
"apps/api/src/__tests__/schedule-forwarded-rate-limit.test.ts",
|
|
1375
|
-
"apps/api/src/__tests__/openapi-keyless-hub.test.ts",
|
|
1376
1076
|
],
|
|
1377
1077
|
// pageContributions (spec 5478; parent § D6 shape 1) — the meeting
|
|
1378
1078
|
// index, the meeting page, the confirmation page and the private index
|
|
@@ -1406,7 +1106,23 @@ export const MODULE_SLICES = {
|
|
|
1406
1106
|
},
|
|
1407
1107
|
],
|
|
1408
1108
|
},
|
|
1109
|
+
// #9460 DD5/DD6 — the four scheduling MCP tools (#4416, #4633, #8843
|
|
1110
|
+
// D5) ride `@working-theory/mcp-scheduling`.
|
|
1111
|
+
{
|
|
1112
|
+
target: "apps/mcp/package.json",
|
|
1113
|
+
kind: "json",
|
|
1114
|
+
ops: [
|
|
1115
|
+
{
|
|
1116
|
+
op: "merge-keys",
|
|
1117
|
+
path: ["dependencies"],
|
|
1118
|
+
entries: {
|
|
1119
|
+
"@working-theory/mcp-scheduling": "workspace:*",
|
|
1120
|
+
},
|
|
1121
|
+
},
|
|
1122
|
+
],
|
|
1123
|
+
},
|
|
1409
1124
|
],
|
|
1125
|
+
paidMcpToolPackages: ["@working-theory/mcp-scheduling"],
|
|
1410
1126
|
},
|
|
1411
1127
|
// ── signal-collectors — flows, deliverables, project listings, waitlist
|
|
1412
1128
|
// signups (D-48, #5366) ───────────────────────────────────────────────
|
|
@@ -1416,14 +1132,14 @@ export const MODULE_SLICES = {
|
|
|
1416
1132
|
// and a repo-wide grep of every importer of each candidate file (an
|
|
1417
1133
|
// independent re-grep, not carried over from the spec's own table).
|
|
1418
1134
|
//
|
|
1419
|
-
//
|
|
1135
|
+
// routes/project-listings/index.ts (now api-signal-collectors') is MIXED (D4): it holds
|
|
1420
1136
|
// this module's five anonymous/founder-read re-exports (lines 1-55) AND
|
|
1421
1137
|
// multi-tenant's TENANT_HANDLERS table + projectListingTenantRoutes
|
|
1422
1138
|
// (lines 57-139) in one file. NOT listed here — never deleted/edited on
|
|
1423
1139
|
// its own, exactly like the scheduling/multi-tenant precedent for a mixed
|
|
1424
1140
|
// barrel above.
|
|
1425
1141
|
//
|
|
1426
|
-
//
|
|
1142
|
+
// routes/project-listings/respond.ts (`sendValidated`, now api-signal-collectors') IS
|
|
1427
1143
|
// listed, even though it is ALSO imported directly by the tenant routes
|
|
1428
1144
|
// get.ts/list.ts/patch.ts/patch-copy.ts (multi-tenant, Pro Plus territory
|
|
1429
1145
|
// — grep-verified, four direct importers outside this module). Same D6
|
|
@@ -1470,13 +1186,13 @@ export const MODULE_SLICES = {
|
|
|
1470
1186
|
// selection, exactly as it did before this card (a narrower, temporary
|
|
1471
1187
|
// miss than the one D6 accepts on purpose for the other nine).
|
|
1472
1188
|
//
|
|
1473
|
-
//
|
|
1189
|
+
// services/listing-promotion.ts (now api-signal-collectors') has ZERO production
|
|
1474
1190
|
// importers anywhere in the repo (only its own test) — confirmed dead code
|
|
1475
1191
|
// (spec §7 Q5). Listed anyway: it is listing code by subject, D-48 places
|
|
1476
1192
|
// the instrument here, and a reachability grep cannot place an unreached
|
|
1477
1193
|
// file — this is a recorded pre-existing defect, not fixed by this card.
|
|
1478
1194
|
//
|
|
1479
|
-
//
|
|
1195
|
+
// bin/deliverable-upload.ts (now api-signal-collectors') imports only `prisma` (no moved
|
|
1480
1196
|
// service) but is a deliverables CLI a Free starter should not ship —
|
|
1481
1197
|
// listed by subject, not by the import-criterion the other six bins meet.
|
|
1482
1198
|
//
|
|
@@ -1522,7 +1238,7 @@ export const MODULE_SLICES = {
|
|
|
1522
1238
|
// ownedFiles under apps/api/** dropped (removed root)
|
|
1523
1239
|
// ownedFiles under (authed)/waitlist/** dropped (removal seed)
|
|
1524
1240
|
// ownedFiles projects/apply/ListingApplicationClient lands; no route mounts it
|
|
1525
|
-
//
|
|
1241
|
+
// paidMcpToolPackages (apps/mcp/package.json) lands when apps/mcp is kept
|
|
1526
1242
|
// installMap content/en/** (12 seeds) lands, but for the five report seeds
|
|
1527
1243
|
// installMap database/flows/{referral,fit-check}.flow.json
|
|
1528
1244
|
// remapped to flows/<name>.json — declared
|
|
@@ -1535,148 +1251,14 @@ export const MODULE_SLICES = {
|
|
|
1535
1251
|
// It stays a Pro module: a keyless spoke carries no flows.
|
|
1536
1252
|
spoke: true,
|
|
1537
1253
|
paidSectionsPackage: "@working-theory/ui-signal-collectors",
|
|
1254
|
+
// #9460 DD5/DD6 — the flow tools ride `@working-theory/mcp-signal-collectors`;
|
|
1255
|
+
// the listing-application tools (#3591 PR-E, co-owned with multi-tenant)
|
|
1256
|
+
// ride `@working-theory/mcp-workspace`, whose one file holds them.
|
|
1257
|
+
paidMcpToolPackages: [
|
|
1258
|
+
"@working-theory/mcp-signal-collectors",
|
|
1259
|
+
"@working-theory/mcp-workspace",
|
|
1260
|
+
],
|
|
1538
1261
|
ownedFiles: [
|
|
1539
|
-
"apps/api/src/routes/flows/index.ts",
|
|
1540
|
-
// README.md documents the flows rate-limit rationale (#4730) — not a
|
|
1541
|
-
// test/generated file, and its absence is exactly what left a stray
|
|
1542
|
-
// apps/api/src/routes/flows/ directory in a keyless templates/ snapshot
|
|
1543
|
-
// (empirically found, #5366) since the import-graph closure below only
|
|
1544
|
-
// scans source extensions, never markdown.
|
|
1545
|
-
"apps/api/src/routes/flows/README.md",
|
|
1546
|
-
"apps/api/src/routes/deliverables/index.ts",
|
|
1547
|
-
"apps/api/src/routes/slack/index.ts",
|
|
1548
|
-
"apps/api/src/routes/slack/actions.ts",
|
|
1549
|
-
"apps/api/src/routes/waitlist-signups/index.ts",
|
|
1550
|
-
// #7479 — the listing-draft forwarded-visitor suite exercises the three
|
|
1551
|
-
// project-listings draft routes through the real build(), and those
|
|
1552
|
-
// routes register only under isModuleEnabled("signal-collectors"), so
|
|
1553
|
-
// the suite strips with this slice (the #7389 shape for
|
|
1554
|
-
// schedule-forwarded-rate-limit.test.ts under scheduling) instead of
|
|
1555
|
-
// failing every keyless scaffold's apps/api jest gate.
|
|
1556
|
-
"apps/api/src/__tests__/listings-forwarded-rate-limit.test.ts",
|
|
1557
|
-
// apps/api/src/routes/project-listings/{start,patch-draft,submit,public,
|
|
1558
|
-
// me,respond,resume-token}.ts and services/{project-listings,
|
|
1559
|
-
// listing-config}.ts deliberately NOT listed — see the comment above
|
|
1560
|
-
// this array (D-48/#5366 escalation: the mixed-barrel `index.ts` in
|
|
1561
|
-
// that directory is reached from server.ts by a plain, literal
|
|
1562
|
-
// `import()` for multi-tenant's tenant routes, and statically imports
|
|
1563
|
-
// all nine of these files itself, so `paidModuleTemplateExclusions()`'s
|
|
1564
|
-
// import-graph closure excluded `index.ts`, then `server.ts` itself,
|
|
1565
|
-
// from every keyless scaffold (empirically found, #5366 resume pass,
|
|
1566
|
-
// same failure mode as the deliverable-fulfillment.ts case below but a
|
|
1567
|
-
// permanent structural one rather than a temporal gap pending another
|
|
1568
|
-
// PR). This is also the ORIGINAL multi-tenant/#5088 card's own
|
|
1569
|
-
// conclusion about these same nine files (lines 556-571 above) —
|
|
1570
|
-
// D-48 moves their tier ownership to signal-collectors but not their
|
|
1571
|
-
// must-ship-unconditionally constraint. Registration of every route
|
|
1572
|
-
// that reaches them stays gated by `isModuleEnabled("signal-collectors")`
|
|
1573
|
-
// in server.ts; only the source files themselves ship regardless.
|
|
1574
|
-
"apps/api/src/services/flow-engine.ts",
|
|
1575
|
-
"apps/api/src/services/flow-aggregate.ts",
|
|
1576
|
-
"apps/api/src/services/waitlist-signups.ts",
|
|
1577
|
-
"apps/api/src/services/waitlist-scoring.ts",
|
|
1578
|
-
"apps/api/src/services/playbook-compile.ts",
|
|
1579
|
-
"apps/api/src/services/playbook-render.ts",
|
|
1580
|
-
"apps/api/src/services/listing-csv-sweep.ts",
|
|
1581
|
-
"apps/api/src/services/waitlist-followup.ts",
|
|
1582
|
-
"apps/api/src/services/listing-promotion.ts",
|
|
1583
|
-
"apps/api/src/services/project-listing-decision.ts",
|
|
1584
|
-
"apps/api/src/services/project-listing-flow.ts",
|
|
1585
|
-
"apps/api/src/services/project-listing-issue.ts",
|
|
1586
|
-
"apps/api/src/services/waitlist-experiments.ts",
|
|
1587
|
-
// deliverable-fulfillment.ts deliberately NOT listed — see the comment
|
|
1588
|
-
// above this array (spec §5.4 escalation boundary, temporary pending #5364).
|
|
1589
|
-
"apps/api/src/bin/deliverable-resend.ts",
|
|
1590
|
-
"apps/api/src/bin/deliverable-upload.ts",
|
|
1591
|
-
"apps/api/src/bin/session-retention-sweep.ts",
|
|
1592
|
-
"apps/api/src/bin/seed-presets.ts",
|
|
1593
|
-
// #7844 D7 — the operator flow-copy CLI and its service: flows code by
|
|
1594
|
-
// subject, and a Free scaffold carries no flows.
|
|
1595
|
-
"apps/api/src/bin/flows-copy.ts",
|
|
1596
|
-
"apps/api/src/services/flow-copy.ts",
|
|
1597
|
-
"apps/api/src/bin/listing-csv-sweep.ts",
|
|
1598
|
-
"apps/api/src/bin/followup-sweep.ts",
|
|
1599
|
-
"apps/api/src/bin/seed-waitlist-experiments.ts",
|
|
1600
|
-
// #7389 — the listing-directory suite enables `signal-collectors` alone
|
|
1601
|
-
// and loads `routes/waitlist-signups/index.ts` through the server it
|
|
1602
|
-
// builds, so it strips with that route. Individually, never as a glob.
|
|
1603
|
-
"apps/api/src/routes/project-listings/__tests__/directory.test.ts",
|
|
1604
|
-
"apps/mcp/src/tools/get_flow.ts",
|
|
1605
|
-
"apps/mcp/src/tools/submit_flow_step.ts",
|
|
1606
|
-
// #3591 PR-E — the signed-in MCP tools that twin the tenant-scoped
|
|
1607
|
-
// project-listing routes, CO-OWNED with multi-tenant: they register
|
|
1608
|
-
// under the routes' own `multi-tenant || signal-collectors` gate.
|
|
1609
|
-
"apps/mcp/src/tools/inbox_applications.ts",
|
|
1610
|
-
// ── The review surface (#5677) — CO-OWNED with multi-tenant ──────────
|
|
1611
|
-
//
|
|
1612
|
-
// Every path below is ALSO a multi-tenant `ownedFiles` entry and stays
|
|
1613
|
-
// one. Listing a file under two modules is additive, not a transfer:
|
|
1614
|
-
// `paidModuleTemplateExclusions()` unions every paid module's entries,
|
|
1615
|
-
// so the `templates/` snapshot is unchanged, and a multi-tenant scaffold
|
|
1616
|
-
// keeps receiving these from the multi-tenant bundle exactly as before.
|
|
1617
|
-
// What changes is that a signal-collectors bundle now carries them too.
|
|
1618
|
-
//
|
|
1619
|
-
// WHY THEY MUST BE HERE. #5677 widened `server.ts`'s review-surface
|
|
1620
|
-
// registration from `multi-tenant` to `multi-tenant || signal-collectors`,
|
|
1621
|
-
// because signal-collectors is the module that SELLS the instruments
|
|
1622
|
-
// these routes read back. Registration and DELIVERY are separate layers:
|
|
1623
|
-
// the widened gate calls `sliceRoutePlugin("waitlistExperimentRoutes")`
|
|
1624
|
-
// and imports `projectListingTenantRoutes`, so on a scaffold whose
|
|
1625
|
-
// `AILK_ENABLED_MODULES` names signal-collectors but whose tree lacks
|
|
1626
|
-
// these files, `loadSlice` throws ERR_MODULE_NOT_FOUND during `build()`
|
|
1627
|
-
// — construction, so EVERY route 500s rather than one. That is not a
|
|
1628
|
-
// feature gap; it is the outage shape `lib/slice-load.ts` exists to
|
|
1629
|
-
// diagnose.
|
|
1630
|
-
//
|
|
1631
|
-
// It is not hypothetical: `marketing-site` — the Pro flagship in
|
|
1632
|
-
// `template-manifest.ts` — declares
|
|
1633
|
-
// `requires: ["marketing", "docs-blog", "scheduling", "signal-collectors"]`,
|
|
1634
|
-
// i.e. signal-collectors WITHOUT multi-tenant. That is exactly the
|
|
1635
|
-
// configuration that would crash, which is why the gate and the delivery
|
|
1636
|
-
// land together rather than the delivery being deferred.
|
|
1637
|
-
//
|
|
1638
|
-
// The closure is tight, verified by grep rather than assumed: none of
|
|
1639
|
-
// these files imports `lib/tenant-db.ts` or `services/tenant-context.ts`
|
|
1640
|
-
// (both multi-tenant-only). #5677 retargeted `waitlist-dashboard.ts`'s
|
|
1641
|
-
// type import of `tenant-context.js` to the base `services/default-tenant.ts`,
|
|
1642
|
-
// which severed the one cross-slice edge that existed.
|
|
1643
|
-
//
|
|
1644
|
-
// `routes/project-listings/{start,patch-draft,submit,public,me,respond,
|
|
1645
|
-
// resume-token,patch-copy}.ts` are NOT listed — they are the free
|
|
1646
|
-
// anonymous surface and the mixed barrel, covered by the note above this
|
|
1647
|
-
// array, and they already ship unconditionally.
|
|
1648
|
-
"apps/api/src/routes/waitlist-experiments/index.ts",
|
|
1649
|
-
"apps/api/src/routes/waitlist-experiments/list.ts",
|
|
1650
|
-
"apps/api/src/routes/waitlist-experiments/comparison.ts",
|
|
1651
|
-
"apps/api/src/routes/waitlist-experiments/signup.ts",
|
|
1652
|
-
"apps/api/src/routes/waitlist-experiments/signups.ts",
|
|
1653
|
-
"apps/api/src/routes/waitlist-experiments/respond.ts",
|
|
1654
|
-
"apps/api/src/services/waitlist-dashboard.ts",
|
|
1655
|
-
// #6258 — the file waitlist-dashboard.ts imports for the pinned
|
|
1656
|
-
// platform-operator read scope. It rides BOTH slices for the same
|
|
1657
|
-
// reason its importer does: an unlisted import target breaks a
|
|
1658
|
-
// signal-collectors-without-multi-tenant scaffold at build() time.
|
|
1659
|
-
"apps/api/src/services/waitlist-operator-reads.ts",
|
|
1660
|
-
// #6157 D14/D16 — the magnet Admin authoring surface's own sibling
|
|
1661
|
-
// tenant scope is gated `multi-tenant || signal-collectors` (D4,
|
|
1662
|
-
// the SAME expression this review-surface block co-owns files
|
|
1663
|
-
// under), so both its route file AND `lib/tenant-db.ts` (the ONE
|
|
1664
|
-
// data path it reads/writes through, FR3) must be delivered here
|
|
1665
|
-
// too. `lib/tenant-db.ts` is ALSO listed under `multi-tenant` above
|
|
1666
|
-
// — additive, not a transfer (the same reasoning this array's own
|
|
1667
|
-
// header comment already states for every other file in it).
|
|
1668
|
-
//
|
|
1669
|
-
// The closure stays tight WITHOUT dragging in `tenant-context.ts` or
|
|
1670
|
-
// the multi-tenant guard assembly behind it, because `tenant-db.ts`'s
|
|
1671
|
-
// own type import was retargeted from `tenant-context.js` to the
|
|
1672
|
-
// BASE-tree `services/default-tenant.js` in this same unit (D15) —
|
|
1673
|
-
// the identical one-line class of move #5677 made for
|
|
1674
|
-
// `waitlist-dashboard.ts` two paragraphs above this one.
|
|
1675
|
-
"apps/api/src/routes/magnets/index.ts",
|
|
1676
|
-
"apps/api/src/lib/tenant-db.ts",
|
|
1677
|
-
"apps/api/src/routes/project-listings/get.ts",
|
|
1678
|
-
"apps/api/src/routes/project-listings/list.ts",
|
|
1679
|
-
"apps/api/src/routes/project-listings/patch.ts",
|
|
1680
1262
|
// The dashboard itself. Without these the Pro scaffold would boot with
|
|
1681
1263
|
// reachable review routes and no UI to read them through, and the two
|
|
1682
1264
|
// files that DO already ship into every scaffold
|
|
@@ -1876,14 +1458,30 @@ export const MODULE_SLICES = {
|
|
|
1876
1458
|
},
|
|
1877
1459
|
],
|
|
1878
1460
|
},
|
|
1461
|
+
// #9460 DD6 — the two MCP packs above, as apps/mcp dependencies.
|
|
1462
|
+
{
|
|
1463
|
+
target: "apps/mcp/package.json",
|
|
1464
|
+
kind: "json",
|
|
1465
|
+
ops: [
|
|
1466
|
+
{
|
|
1467
|
+
op: "merge-keys",
|
|
1468
|
+
path: ["dependencies"],
|
|
1469
|
+
entries: {
|
|
1470
|
+
"@working-theory/mcp-signal-collectors": "workspace:*",
|
|
1471
|
+
"@working-theory/mcp-workspace": "workspace:*",
|
|
1472
|
+
},
|
|
1473
|
+
},
|
|
1474
|
+
],
|
|
1475
|
+
},
|
|
1879
1476
|
],
|
|
1880
1477
|
},
|
|
1881
1478
|
// ── commerce — per-site paid add-on (D-47, amending D-26) ─────────────────
|
|
1882
1479
|
//
|
|
1883
1480
|
// Checkout, the Stripe webhook receiver, flow checkouts and the recommender
|
|
1884
1481
|
// (D-47's disposition sentence, verbatim). The base API keeps only
|
|
1885
|
-
// `isModuleEnabled("commerce")`; every registration
|
|
1886
|
-
// `
|
|
1482
|
+
// `isModuleEnabled("commerce")`; every registration is a row of
|
|
1483
|
+
// `API_MODULE_TABLE` carried by the commerce module object (#9565).
|
|
1484
|
+
// `apps.api.may_import_from` names
|
|
1887
1485
|
// `packages/stripe-client` — the module's own package (D5) — mirroring the
|
|
1888
1486
|
// `multi-tenant`/`scheduling` slices' identical entry, which already
|
|
1889
1487
|
// document "checkout moved to the commerce module (D-47)" for the same
|
|
@@ -1966,30 +1564,19 @@ export const MODULE_SLICES = {
|
|
|
1966
1564
|
//
|
|
1967
1565
|
// THE PRIMITIVES LEFT THIS SLICE (D-64, epic #5770, #5796). The checkout
|
|
1968
1566
|
// launcher, the Stripe webhook receiver, customer mapping and the
|
|
1969
|
-
// `lib/stripe.ts` shim are BASE TREE now: `
|
|
1567
|
+
// `lib/stripe.ts` shim are BASE TREE now: `packages/api/src/server.ts`
|
|
1970
1568
|
// registers them unconditionally and gates them at CALL time on the JWT
|
|
1971
|
-
// `commerce` claim (`
|
|
1569
|
+
// `commerce` claim (`packages/api/src/lib/require-commerce-claim.ts`), so a
|
|
1972
1570
|
// keyless scaffold must CARRY them. Claiming them here is what deleted
|
|
1973
1571
|
// them from that scaffold while the server still loaded them —
|
|
1974
1572
|
// ERR_MODULE_NOT_FOUND inside build(), every route 500ing, which is the
|
|
1975
|
-
// exact defect
|
|
1976
|
-
// catch. The six that left: lib/stripe.ts,
|
|
1573
|
+
// exact defect the slice-registration lint (#5701; retired by #9565 D8)
|
|
1574
|
+
// existed to catch. The six that left: lib/stripe.ts,
|
|
1977
1575
|
// routes/checkout/{index,sessions}.ts, routes/webhooks/{index,stripe}.ts
|
|
1978
1576
|
// and routes/webhooks/README.md. The four below STAY — they are commerce
|
|
1979
1577
|
// OVERLAY, still registered behind `isModuleEnabled("commerce")` and
|
|
1980
1578
|
// still carrying their `// oss: false` markers.
|
|
1981
1579
|
ownedFiles: [
|
|
1982
|
-
"apps/api/src/routes/flow-checkouts/index.ts",
|
|
1983
|
-
"apps/api/src/routes/flows/recommender.ts",
|
|
1984
|
-
"apps/api/src/services/recommender-capture.ts",
|
|
1985
|
-
"apps/api/src/services/flow-checkouts.ts",
|
|
1986
|
-
// #6038 — the buyer-scoped subscription-status route pair (the
|
|
1987
|
-
// update-your-card banner's read + portal handoff). Commerce OVERLAY,
|
|
1988
|
-
// same posture as the four flow-checkouts/recommender entries above.
|
|
1989
|
-
"apps/api/src/routes/subscription/index.ts",
|
|
1990
|
-
"apps/api/src/routes/subscription/me.ts",
|
|
1991
|
-
"apps/api/src/routes/subscription/portal.ts",
|
|
1992
|
-
"apps/api/src/services/subscription.ts",
|
|
1993
1580
|
// #5581 U5 — the fifteen commerce components (+ ten .text.ts extractors
|
|
1994
1581
|
// + the slice's own re-export entry point) moved to
|
|
1995
1582
|
// packages-paid/ui-commerce; the package is delivered to a keyed
|
|
@@ -2222,12 +1809,6 @@ export function coOwnedModuleDestinations() {
|
|
|
2222
1809
|
// The exclusion is per file, not a `testPathIgnorePatterns` entry in the
|
|
2223
1810
|
// scaffold's jest config: that would hide these suites from a keyed
|
|
2224
1811
|
// scaffold too, and from the suites a slice owns.
|
|
2225
|
-
// - database/__tests__/build.test.ts (#7959) — the monorepo build probe
|
|
2226
|
-
// (#7565). Its `beforeAll` symlinks `REPO_ROOT/packages` and copies
|
|
2227
|
-
// `REPO_ROOT/tsconfig.base.json`, neither of which a scaffold has, so it
|
|
2228
|
-
// red the scaffold's database jest run. Matched exactly, not by basename
|
|
2229
|
-
// in `EXCLUDE_FILES`, which would drop a `build.test.ts` anywhere in the
|
|
2230
|
-
// snapshot; every other database suite still ships.
|
|
2231
1812
|
// - the /pricing suite `monorepo-only.test.tsx` and its snapshot (#9179) —
|
|
2232
1813
|
// it snapshots the monorepo's own `content/en/Pricing/pricing.mdx`, which
|
|
2233
1814
|
// a scaffold replaces with its seed, and reads
|
|
@@ -2246,28 +1827,24 @@ export const EXCLUDE_TEMPLATE_DIRS = [
|
|
|
2246
1827
|
"apps/web/app/[locale]/__tests__",
|
|
2247
1828
|
"apps/web/app/[locale]/(authed)/edit",
|
|
2248
1829
|
"apps/web/content",
|
|
2249
|
-
"apps/api/src/__tests__/api-parity.test.ts",
|
|
2250
|
-
"apps/api/src/__tests__/api-parity-paid.test.ts",
|
|
2251
1830
|
"apps/mcp/__tests__/api-parity.test.ts",
|
|
2252
1831
|
"apps/mcp/__tests__/pro-tool-call-gate.test.ts",
|
|
2253
1832
|
"apps/mcp/__tests__/write-tool-guard.test.ts",
|
|
2254
|
-
"apps/
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
"apps/api/src/__tests__/
|
|
2258
|
-
"apps/api/src/__tests__/
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
1833
|
+
"apps/mcp/__tests__/create-booking-guard.test.ts",
|
|
1834
|
+
// #9564 AC-1 — pins THIS monorepo's route table and imports the six module
|
|
1835
|
+
// objects; a scaffold has neither.
|
|
1836
|
+
"apps/api/src/__tests__/registration-table.test.ts",
|
|
1837
|
+
"apps/api/src/__tests__/fixtures",
|
|
1838
|
+
// #9571 — exercises the composition's `loadInstalledHub` by `jest.doMock`-ing
|
|
1839
|
+
// `@working-theory/api-hub/package.json`, a specifier a Free scaffold cannot
|
|
1840
|
+
// resolve (no `virtual` mock), and it depends on the monorepo
|
|
1841
|
+
// `apps/api/jest.config.cjs` mapper that `build-templates` drops; the
|
|
1842
|
+
// scaffold's own boot behaviour is covered by `verify-scaffold`'s boot leg.
|
|
1843
|
+
"apps/api/src/__tests__/hub-install.test.ts",
|
|
2264
1844
|
"apps/mcp/__tests__/workspace-surface.test.ts",
|
|
2265
1845
|
"apps/mcp/__tests__/parity.test.ts",
|
|
2266
|
-
"apps/mcp/__tests__/audit.test.ts",
|
|
2267
|
-
"database/__tests__/build.test.ts",
|
|
2268
1846
|
"apps/web/app/[locale]/pricing/__tests__/monorepo-only.test.tsx",
|
|
2269
1847
|
"apps/web/app/[locale]/pricing/__tests__/__snapshots__/monorepo-only.test.tsx.snap",
|
|
2270
|
-
"apps/api/src/services/offerings/__tests__/delegate-confinement.test.ts",
|
|
2271
1848
|
];
|
|
2272
1849
|
export function paidModuleTemplateExclusions(snapshotRoots, repoRoot) {
|
|
2273
1850
|
const roots = new Set(snapshotRoots);
|
|
@@ -2283,8 +1860,8 @@ export function paidModuleTemplateExclusions(snapshotRoots, repoRoot) {
|
|
|
2283
1860
|
}
|
|
2284
1861
|
}
|
|
2285
1862
|
// Companion closure by import graph, to a fixed point — the shared walker
|
|
2286
|
-
// (`lib/import-graph.ts`),
|
|
2287
|
-
//
|
|
1863
|
+
// (`lib/import-graph.ts`), the resolution the retired slice-registration
|
|
1864
|
+
// lint (#5701, #9565 D8) asked its question with.
|
|
2288
1865
|
return [...importClosure(repoRoot, [...roots], seeds)].sort();
|
|
2289
1866
|
}
|
|
2290
1867
|
/** The scaffold's architecture linter, relative to the site root (#6649). */
|