create-questpie 2.0.4 → 2.1.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.
Files changed (152) hide show
  1. package/dist/index.mjs +362 -119
  2. package/package.json +2 -3
  3. package/templates/elysia/AGENTS.md +56 -0
  4. package/templates/elysia/CLAUDE.md +39 -0
  5. package/templates/elysia/Dockerfile +24 -0
  6. package/templates/elysia/README.md +148 -0
  7. package/templates/elysia/docker/init-extensions.sql +11 -0
  8. package/templates/elysia/docker-compose.yml +21 -0
  9. package/templates/elysia/env.example +16 -0
  10. package/templates/elysia/gitignore +6 -0
  11. package/templates/elysia/package.json +47 -0
  12. package/templates/elysia/questpie.config.ts +12 -0
  13. package/templates/elysia/src/index.ts +21 -0
  14. package/templates/elysia/src/lib/auth-client.ts +32 -0
  15. package/templates/elysia/src/lib/client.ts +13 -0
  16. package/templates/elysia/src/lib/env.ts +24 -0
  17. package/templates/elysia/src/lib/query-client.ts +18 -0
  18. package/templates/elysia/src/lib/query.ts +18 -0
  19. package/templates/elysia/src/questpie/server/.generated/context.gen.ts +200 -0
  20. package/templates/elysia/src/questpie/server/.generated/entities.gen.ts +84 -0
  21. package/templates/elysia/src/questpie/server/.generated/factories.ts +65 -0
  22. package/templates/elysia/src/questpie/server/.generated/index.ts +131 -0
  23. package/templates/elysia/src/questpie/server/.generated/names.gen.ts +25 -0
  24. package/templates/elysia/src/questpie/server/app.ts +10 -0
  25. package/templates/elysia/src/questpie/server/collections/index.ts +1 -0
  26. package/templates/elysia/src/questpie/server/collections/posts.collection.ts +10 -0
  27. package/templates/elysia/src/questpie/server/config/auth.ts +8 -0
  28. package/templates/elysia/src/questpie/server/config/openapi.ts +10 -0
  29. package/templates/elysia/src/questpie/server/globals/index.ts +1 -0
  30. package/templates/elysia/src/questpie/server/globals/site-settings.global.ts +10 -0
  31. package/templates/elysia/src/questpie/server/modules.ts +8 -0
  32. package/templates/elysia/src/questpie/server/questpie.config.ts +21 -0
  33. package/templates/elysia/tsconfig.json +28 -0
  34. package/templates/hono/AGENTS.md +56 -0
  35. package/templates/hono/CLAUDE.md +39 -0
  36. package/templates/hono/Dockerfile +24 -0
  37. package/templates/hono/README.md +148 -0
  38. package/templates/hono/docker/init-extensions.sql +11 -0
  39. package/templates/hono/docker-compose.yml +21 -0
  40. package/templates/hono/env.example +16 -0
  41. package/templates/hono/gitignore +6 -0
  42. package/templates/hono/package.json +47 -0
  43. package/templates/hono/questpie.config.ts +12 -0
  44. package/templates/hono/src/index.ts +30 -0
  45. package/templates/hono/src/lib/auth-client.ts +32 -0
  46. package/templates/hono/src/lib/client.ts +13 -0
  47. package/templates/hono/src/lib/env.ts +24 -0
  48. package/templates/hono/src/lib/query-client.ts +18 -0
  49. package/templates/hono/src/lib/query.ts +18 -0
  50. package/templates/hono/src/questpie/server/.generated/context.gen.ts +200 -0
  51. package/templates/hono/src/questpie/server/.generated/entities.gen.ts +84 -0
  52. package/templates/hono/src/questpie/server/.generated/factories.ts +65 -0
  53. package/templates/hono/src/questpie/server/.generated/index.ts +131 -0
  54. package/templates/hono/src/questpie/server/.generated/names.gen.ts +25 -0
  55. package/templates/hono/src/questpie/server/app.ts +10 -0
  56. package/templates/hono/src/questpie/server/collections/index.ts +1 -0
  57. package/templates/hono/src/questpie/server/collections/posts.collection.ts +10 -0
  58. package/templates/hono/src/questpie/server/config/auth.ts +8 -0
  59. package/templates/hono/src/questpie/server/config/openapi.ts +10 -0
  60. package/templates/hono/src/questpie/server/globals/index.ts +1 -0
  61. package/templates/hono/src/questpie/server/globals/site-settings.global.ts +10 -0
  62. package/templates/hono/src/questpie/server/modules.ts +8 -0
  63. package/templates/hono/src/questpie/server/questpie.config.ts +21 -0
  64. package/templates/hono/tsconfig.json +28 -0
  65. package/templates/next/AGENTS.md +55 -0
  66. package/templates/next/CLAUDE.md +39 -0
  67. package/templates/next/Dockerfile +25 -0
  68. package/templates/next/README.md +148 -0
  69. package/templates/next/components.json +22 -0
  70. package/templates/next/docker/init-extensions.sql +11 -0
  71. package/templates/next/docker-compose.yml +21 -0
  72. package/templates/next/env.example +16 -0
  73. package/templates/next/gitignore +10 -0
  74. package/templates/next/next-env.d.ts +5 -0
  75. package/templates/next/next.config.ts +20 -0
  76. package/templates/next/package.json +54 -0
  77. package/templates/next/postcss.config.mjs +8 -0
  78. package/templates/next/public/.gitkeep +0 -0
  79. package/templates/next/questpie.config.ts +12 -0
  80. package/templates/next/src/app/admin/[[...all]]/page.tsx +34 -0
  81. package/templates/next/src/app/admin/admin.css +4 -0
  82. package/templates/next/src/app/admin/layout.tsx +63 -0
  83. package/templates/next/src/app/api/[...all]/route.ts +24 -0
  84. package/templates/next/src/app/layout.tsx +24 -0
  85. package/templates/next/src/app/not-found.tsx +18 -0
  86. package/templates/next/src/app/page.tsx +74 -0
  87. package/templates/next/src/app/providers.tsx +11 -0
  88. package/templates/next/src/lib/auth-client.ts +12 -0
  89. package/templates/next/src/lib/client.ts +13 -0
  90. package/templates/next/src/lib/env.ts +24 -0
  91. package/templates/next/src/lib/query-client.ts +18 -0
  92. package/templates/next/src/lib/query.ts +18 -0
  93. package/templates/next/src/questpie/admin/.generated/client.ts +13 -0
  94. package/templates/next/src/questpie/admin/admin.ts +9 -0
  95. package/templates/next/src/questpie/admin/modules.ts +3 -0
  96. package/templates/next/src/questpie/server/.generated/context.gen.ts +204 -0
  97. package/templates/next/src/questpie/server/.generated/entities.gen.ts +100 -0
  98. package/templates/next/src/questpie/server/.generated/factories.ts +204 -0
  99. package/templates/next/src/questpie/server/.generated/index.ts +139 -0
  100. package/templates/next/src/questpie/server/.generated/names.gen.ts +31 -0
  101. package/templates/next/src/questpie/server/app.ts +10 -0
  102. package/templates/next/src/questpie/server/collections/index.ts +1 -0
  103. package/templates/next/src/questpie/server/collections/posts.collection.ts +58 -0
  104. package/templates/next/src/questpie/server/config/admin.ts +80 -0
  105. package/templates/next/src/questpie/server/config/auth.ts +8 -0
  106. package/templates/next/src/questpie/server/config/openapi.ts +10 -0
  107. package/templates/next/src/questpie/server/globals/index.ts +1 -0
  108. package/templates/next/src/questpie/server/globals/site-settings.global.ts +19 -0
  109. package/templates/next/src/questpie/server/modules.ts +9 -0
  110. package/templates/next/src/questpie/server/questpie.config.ts +21 -0
  111. package/templates/next/src/styles.css +125 -0
  112. package/templates/next/tsconfig.json +37 -0
  113. package/templates/tanstack-start/AGENTS.md +35 -607
  114. package/templates/tanstack-start/CLAUDE.md +26 -134
  115. package/templates/tanstack-start/README.md +13 -1
  116. package/templates/tanstack-start/docker/init-extensions.sql +11 -0
  117. package/templates/tanstack-start/docker-compose.yml +1 -0
  118. package/templates/tanstack-start/src/lib/auth-client.ts +1 -1
  119. package/templates/tanstack-start/src/lib/client.ts +1 -1
  120. package/templates/tanstack-start/src/lib/query.ts +18 -0
  121. package/templates/tanstack-start/src/questpie/server/collections/index.ts +1 -1
  122. package/templates/tanstack-start/src/questpie/server/globals/index.ts +1 -1
  123. package/templates/tanstack-start/src/questpie/server/questpie.config.ts +1 -1
  124. package/templates/tanstack-start/src/routes/__root.tsx +31 -1
  125. package/templates/tanstack-start/src/routes/api/$.ts +1 -1
  126. package/templates/tanstack-start/src/routes/index.tsx +97 -0
  127. package/skills/questpie/AGENTS.md +0 -2871
  128. package/skills/questpie/SKILL.md +0 -293
  129. package/skills/questpie/coverage.json +0 -213
  130. package/skills/questpie/references/auth.md +0 -236
  131. package/skills/questpie/references/business-logic.md +0 -620
  132. package/skills/questpie/references/codegen-plugin-api.md +0 -382
  133. package/skills/questpie/references/crud-api.md +0 -580
  134. package/skills/questpie/references/data-modeling.md +0 -509
  135. package/skills/questpie/references/extend.md +0 -584
  136. package/skills/questpie/references/field-types.md +0 -398
  137. package/skills/questpie/references/infrastructure-adapters.md +0 -720
  138. package/skills/questpie/references/mcp.md +0 -147
  139. package/skills/questpie/references/multi-tenancy.md +0 -363
  140. package/skills/questpie/references/production.md +0 -640
  141. package/skills/questpie/references/query-operators.md +0 -125
  142. package/skills/questpie/references/quickstart.md +0 -562
  143. package/skills/questpie/references/rules.md +0 -454
  144. package/skills/questpie/references/sandbox.md +0 -110
  145. package/skills/questpie/references/tanstack-query.md +0 -543
  146. package/skills/questpie/references/type-inference.md +0 -167
  147. package/skills/questpie/references/workflows.md +0 -155
  148. package/skills/questpie-admin/AGENTS.md +0 -1515
  149. package/skills/questpie-admin/SKILL.md +0 -443
  150. package/skills/questpie-admin/references/blocks.md +0 -331
  151. package/skills/questpie-admin/references/custom-ui.md +0 -305
  152. package/skills/questpie-admin/references/views.md +0 -449
@@ -1,293 +0,0 @@
1
- ---
2
- name: questpie
3
- description: QUESTPIE framework — server-first TypeScript CMS. File-convention codegen, collections, globals, routes, jobs, services, emails, blocks, typed client SDK, TanStack Query integration, adapters (queue, search, realtime, storage, email, KV). Use when building, reviewing, or refactoring any QUESTPIE project.
4
- license: MIT
5
- metadata:
6
- author: questpie
7
- version: "3.0.0"
8
- ---
9
-
10
- # QUESTPIE Framework
11
-
12
- Server-first TypeScript application framework. Define your data schema once using standalone factories, codegen generates the typed runtime, and any frontend consumes it through introspection.
13
-
14
- ## When to Apply
15
-
16
- Reference these guidelines when:
17
-
18
- - Creating or modifying collections, globals, routes, jobs, services, emails, blocks
19
- - Working with file conventions or codegen pipeline
20
- - Configuring adapters (queue, search, storage, realtime, email, KV)
21
- - Setting up access control, hooks, or validation
22
- - Building typed client SDK queries or TanStack Query integrations
23
- - Writing modules or plugins for QUESTPIE
24
- - Exposing QUESTPIE through MCP tools or resources
25
- - Scaffolding a new project or onboarding
26
-
27
- ## Import Paths — Critical
28
-
29
- | Factory | Import From | Needs Codegen? |
30
- | ------------------------------ | ---------------------------- | -------------- |
31
- | `collection(name)` | `#questpie/factories` | Yes |
32
- | `global(name)` | `#questpie/factories` | Yes |
33
- | `block(name)` | `#questpie/factories` | Yes |
34
- | `adminConfig({...})` | `#questpie/factories` | Yes |
35
- | `route()` | `"questpie"` | No |
36
- | `job({...})` | `"questpie"` | No |
37
- | `service()` | `"questpie"` | No |
38
- | `email({...})` | `"questpie"` | No |
39
- | `migration({...})` | `"questpie"` | No |
40
- | `seed({...})` | `"questpie"` | No |
41
- | `runtimeConfig({...})` | `"questpie"` | No |
42
- | `appConfig({...})` | `"questpie"` | No |
43
- | `authConfig({...})` | `"questpie"` | No |
44
- | `env({...})` | `"questpie/env"` | No |
45
- | `clientEnv({...})` | `"questpie/env"` | No |
46
- | `createClient<AppConfig>()` | `"questpie/client"` | No |
47
- | `createQuestpieQueryOptions()` | `"@questpie/tanstack-query"` | No |
48
-
49
- ## Module And Plugin Configuration - Critical
50
-
51
- Codegen imports `modules.ts` before runtime app creation to extract module-contributed plugins. Any module that contributes a `plugin`, discover patterns, generated factories, categories, views, components, fields, or config factories must be statically discoverable from `modules.ts`.
52
-
53
- ### DO THIS
54
-
55
- Use a static module and a plugin-discovered config file for runtime options:
56
-
57
- ```ts title="modules.ts"
58
- import { observabilityModule } from "@questpie/observability/server";
59
-
60
- export default [observabilityModule] as const;
61
- ```
62
-
63
- ```ts title="config/observability.ts"
64
- import { observabilityConfig } from "@questpie/observability/server";
65
-
66
- export default observabilityConfig({
67
- serviceName: "barbershop",
68
- enabled: process.env.NODE_ENV === "production",
69
- });
70
- ```
71
-
72
- The module reads config at runtime from `app.state.config.observability`:
73
-
74
- ```ts
75
- export const observabilityModule = module({
76
- name: "questpie-observability",
77
- plugin: observabilityPlugin(),
78
- services: {
79
- observability: service({
80
- namespace: null,
81
- lifecycle: "singleton",
82
- create: ({ app, logger }) =>
83
- createObservabilityService(app.state.config?.observability, logger),
84
- }),
85
- },
86
- });
87
- ```
88
-
89
- ### DON'T DO THIS
90
-
91
- Do not make runtime options the primary API for codegen-aware modules:
92
-
93
- ```ts title="modules.ts"
94
- export default [
95
- observabilityModule({
96
- serviceName: "barbershop",
97
- }),
98
- ] as const;
99
- ```
100
-
101
- Do not conditionally hide codegen-aware modules or plugins behind env/runtime checks:
102
-
103
- ```ts title="modules.ts"
104
- export default [
105
- process.env.OTEL_ENABLED ? observabilityModule : undefined,
106
- ].filter(Boolean);
107
- ```
108
-
109
- Factory modules are acceptable only for simple runtime-only modules whose plugin identity and codegen contributions do not change. For reusable packages that ship a `CodegenPlugin`, prefer **static module + `config/*.ts` singleton factory**.
110
-
111
- ## Admin Auth Contract - Critical
112
-
113
- `adminModule` includes the starter auth model and owns the canonical Better Auth `user` collection shape used by admin setup and login guards. That contract includes `user.role` with at least `admin` and `user` values. Do not replace `collection("user")` from scratch in apps that use `adminModule`; merge `starterModule.collections.user` and extend it when custom user fields or layout are needed.
114
-
115
- ## Reference Topics
116
-
117
- ### Core
118
-
119
- | Topic | File | Covers |
120
- | ----------------- | ------------------------------- | ------------------------------------------------------------------ |
121
- | Quickstart | `references/quickstart.md` | Scaffold, configure, codegen, migrate, serve — zero to running app |
122
- | Data Modeling | `references/data-modeling.md` | Collections, globals, fields, relations, options, localization |
123
- | Field Types | `references/field-types.md` | All built-in field types with options and operators |
124
- | Type Inference | `references/type-inference.md` | The infer-first map: `CollectionDoc`, `AccessContext` helpers, per-op rule typing, cycle rules |
125
- | Rules | `references/rules.md` | Access control (row/field level), hooks lifecycle, validation, derived request context |
126
- | Business Logic | `references/business-logic.md` | Routes, jobs, services, email templates, context injection |
127
- | Durable Workflows | `references/workflows.md` | Long-running workflows, steps, events, cron, admin UI |
128
- | Sandboxed Code | `references/sandbox.md` | `ctx.executor.run()`, isolation modes, capability model, Deno engine deployment |
129
- | CRUD API | `references/crud-api.md` | `find`, `create`, `updateById`/`updateMany`, `deleteById`/`deleteMany`, atomic conditional updates, globals API |
130
- | Query Operators | `references/query-operators.md` | `where` clause operators by field type |
131
-
132
- ### Infrastructure
133
-
134
- | Topic | File | Covers |
135
- | ---------- | --------------------------------------- | ------------------------------------------------------------ |
136
- | Production | `references/production.md` | Queue, search, realtime, storage, email, KV adapter setup |
137
- | Environment | `references/env.md` | `env.ts` + `env.client.ts`: boot-validated, typed env, generated client modules |
138
- | Auth | `references/auth.md` | Better Auth integration, session, providers, access patterns |
139
- | Adapters | `references/infrastructure-adapters.md` | All adapter configs: pg-boss, S3, SMTP, pgNotify, Redis |
140
- | MCP | `references/mcp.md` | MCP setup, CRUD tools, route tools, custom tools, security |
141
-
142
- ### Extend
143
-
144
- | Topic | File | Covers |
145
- | ------------------ | ---------------------------------- | ------------------------------------------------------------ |
146
- | Extend | `references/extend.md` | Custom modules, fields, operators, adapters, codegen plugins |
147
- | Codegen Plugin API | `references/codegen-plugin-api.md` | Plugin architecture, category declarations, templates |
148
- | Multi-Tenancy | `references/multi-tenancy.md` | `appConfig({ context })` resolver, scope isolation, ScopeProvider |
149
-
150
- ### Client
151
-
152
- | Topic | File | Covers |
153
- | -------------- | ------------------------------ | ---------------------------------------------------------------- |
154
- | TanStack Query | `references/tanstack-query.md` | `q.collections.*`, `q.globals.*`, `q.routes.*`, realtime queries |
155
-
156
- ## Key Patterns — Quick Reference
157
-
158
- ### Collection
159
-
160
- ```ts
161
- import { collection } from "#questpie/factories";
162
-
163
- export default collection("posts")
164
- .fields(({ f }) => ({
165
- title: f.text().required(),
166
- status: f.select([{ value: "draft", label: "Draft" }]),
167
- author: f.relation("user").required(),
168
- }))
169
- .access({
170
- read: true,
171
- create: ({ session }) => !!session,
172
- // update rules get the existing row as `data` (typed, non-optional)
173
- update: ({ session, data }) => data.author === session?.user?.id,
174
- })
175
- .hooks({
176
- beforeChange: async ({ data, operation }) => {
177
- if (operation === "create") data.slug = slugify(data.title);
178
- return data;
179
- },
180
- })
181
- .options({ versioning: true, timestamps: true });
182
- ```
183
-
184
- ### Extend a Module Collection (don't redefine!)
185
-
186
- ```ts
187
- import { starterModule } from "questpie/app";
188
- import { collection } from "#questpie/factories";
189
-
190
- // Registering the same key from scratch REPLACES the module's collection
191
- // (drops its fields/hooks/auth wiring). Merge instead — fully typed:
192
- export default collection("user")
193
- .merge(starterModule.collections.user)
194
- .fields(({ f }) => ({
195
- isAnonymous: f.boolean().default(false),
196
- }));
197
- ```
198
-
199
- ### Route
200
-
201
- ```ts
202
- import { route } from "questpie/services";
203
- import z from "zod";
204
-
205
- export default route()
206
- .post()
207
- .schema(z.object({ period: z.enum(["day", "week", "month"]) }))
208
- .handler(async ({ input, collections }) => {
209
- return collections.posts.find({ where: { status: "published" } });
210
- });
211
- ```
212
-
213
- ### Job
214
-
215
- ```ts
216
- import { job } from "questpie/services";
217
- import z from "zod";
218
-
219
- export default job({
220
- name: "sendReminder",
221
- schema: z.object({ userId: z.string() }),
222
- retryDelay: 5, // seconds (not ms!)
223
- handler: async ({ payload, email, collections }) => {
224
- const user = await collections.users.findOne({
225
- where: { id: payload.userId },
226
- });
227
- await email.send("reminder", { to: user.email, data: { name: user.name } });
228
- },
229
- });
230
- ```
231
-
232
- ### Client SDK
233
-
234
- ```ts
235
- import { createClient } from "questpie/client";
236
- import type { AppConfig } from "#questpie";
237
- import { env } from "#questpie/env.client.vite"; // generated from env.client.ts
238
-
239
- const client = createClient<AppConfig>({
240
- baseURL:
241
- typeof window !== "undefined" ? window.location.origin : env.APP_URL,
242
- basePath: "/api",
243
- });
244
-
245
- const { docs } = await client.collections.posts.find({
246
- where: { status: "published" },
247
- orderBy: { createdAt: "desc" },
248
- with: { author: true },
249
- });
250
- ```
251
-
252
- ### Queue Dispatch
253
-
254
- ```ts
255
- // In any handler with AppContext:
256
- await queue.sendReminder.publish({ userId: "abc" });
257
- // NOT queue.send("sendReminder", payload)
258
- ```
259
-
260
- ## Common Mistakes
261
-
262
- | Severity | Mistake | Fix |
263
- | -------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------- |
264
- | CRITICAL | Files in wrong directory | Collections in `collections/`, routes in `routes/`, etc. |
265
- | CRITICAL | Missing `export default` on convention files | Codegen silently ignores files without default export |
266
- | CRITICAL | Importing route/job/service from `#questpie/factories` | Use `"questpie"` — only collection/global/block/adminConfig use `#questpie/factories` |
267
- | CRITICAL | Redefining a module collection (e.g. starter `user`) from scratch | `.merge(starterModule.collections.user)` then add fields — see Extend pattern |
268
- | HIGH | Forgetting `questpie generate` after adding files | Re-run codegen on any file add/remove in convention dirs |
269
- | HIGH | Job handler uses `input` instead of `payload` | Jobs destructure `{ payload }`, routes destructure `{ input }` |
270
- | HIGH | `queue.send("name", data)` | Use `queue.jobName.publish(data)` |
271
- | HIGH | Raw `process.env.X` / `process.env.X!` in app code | Declare in `env.ts` with `env()` — typed, boot-validated (see `references/env.md`) |
272
- | HIGH | `beforeCreate` / `afterCreate` hook names | Use `beforeChange` / `afterChange` with `operation === "create"` guard |
273
- | HIGH | Module-level app singleton for Better Auth callbacks | `getContext<App>()` works inside `onLinkAccount`/`databaseHooks`/plugin hooks — see `references/auth.md` |
274
- | HIGH | Hand-writing a type the schema already knows | Use the inference one-liner (`CollectionDoc`, `AccessContext`, `ctx.data`, …) — see `references/type-inference.md` |
275
- | HIGH | Runtime options in codegen-aware modules | Use static `module({...})` + plugin-discovered `config/*.ts` factory |
276
- | HIGH | Exposing MCP HTTP as trusted system access | HTTP MCP is user mode only; use stdio only in trusted local/system contexts |
277
- | HIGH | Bare `Date` as where-equality (`{ createdAt: someDate }`) | Use the explicit operator: `{ createdAt: { eq: someDate } }` — see `references/crud-api.md` keyset recipe |
278
- | MEDIUM | Using npm/yarn instead of Bun | QUESTPIE requires Bun as package manager |
279
- | MEDIUM | Editing `.generated/` files | Never edit — re-run `questpie generate` |
280
-
281
- ## Preview And Workflow Rules
282
-
283
- - Live Preview uses the existing admin `FormView`, Preview button, `LivePreviewMode`, and iframe. Do not introduce a separate visual-edit form API, a second default form view, or parallel preview API names.
284
- - Preserve save, autosave, Cmd+S, history, workflow transitions, locks, and actions in the normal form lifecycle.
285
- - Frontend visual editing needs `useCollectionPreview`, `PreviewProvider`, `PreviewField`, and usually `BlockRenderer`; load the `questpie-admin` skill for the full frontend preparation checklist.
286
- - For publishable pages with workflow enabled, workflow stage is the publication source. Public frontend reads use `stage: "published"`.
287
- - If public client/HTTP access is enabled, anonymous read access should require `input?.stage === "published"`; editor/preview reads can omit `stage` only when a session is present.
288
- - Preview/draft-mode reads may load the working stage for authorized editors.
289
- - Do not add duplicate `isPublished` guidance when workflow already controls publishing.
290
-
291
- ## Full Compiled Document
292
-
293
- For the complete framework reference with all topics expanded: `AGENTS.md`
@@ -1,213 +0,0 @@
1
- {
2
- "_readme": "Allowlist + surface map for scripts/skill-coverage.ts. Reviewed together with the skill: every public VALUE export must be mentioned in skills/questpie/** or tagged internal here (with a reason). Type-only exports are reported but never gate. Run: bun run scripts/skill-coverage.ts (--strict to gate, --json/--all for detail).",
3
- "skillRoot": "skills/questpie",
4
- "surfaces": [
5
- { "package": "questpie", "entries": ["packages/questpie/src/exports"] },
6
- { "package": "@questpie/tanstack-query", "entries": ["packages/tanstack-query/src/index.ts"] },
7
- { "package": "@questpie/workflows", "entries": ["packages/workflows/src/exports"] },
8
- { "package": "@questpie/mcp", "entries": ["packages/mcp/src/exports"] },
9
- { "package": "@questpie/sandbox", "entries": ["packages/sandbox/src/exports"] },
10
- { "package": "@questpie/hono", "entries": ["packages/hono/src/server.ts", "packages/hono/src/client.ts"] },
11
- { "package": "@questpie/elysia", "entries": ["packages/elysia/src/server.ts", "packages/elysia/src/client.ts"] },
12
- { "package": "@questpie/next", "entries": ["packages/next/src/server.ts"] },
13
- {
14
- "package": "@questpie/openapi",
15
- "entries": ["packages/openapi/src/index.ts", "packages/openapi/src/server.ts", "packages/openapi/src/plugin.ts"]
16
- }
17
- ],
18
- "skippedPackages": {
19
- "@questpie/admin": "covered by the separate questpie-admin skill (audit hook: map it there)",
20
- "@questpie/executor-engine (packages/executor)": "engine side of the sandbox primitive; apps target ctx.sandbox",
21
- "@questpie/ai": "product layer, not framework surface",
22
- "create-questpie": "scaffolder CLI, not a library surface",
23
- "@questpie/vite-plugin-iconify": "admin build tooling; covered by the questpie-admin skill"
24
- },
25
- "internal": {
26
- "createContextFactory": "only consumed by generated code (.generated/index.ts)",
27
- "extractAppServices": "context plumbing; apps receive services on ctx",
28
- "createWorkflowClient": "service factory internal; ctx.workflows.trigger is the taught surface",
29
- "introspectRoutes": "powers openapi/mcp generators",
30
- "handleError": "HTTP adapter internal",
31
- "RouteBuilder": "class behind route(); apps use the factory",
32
- "SandboxBroker": "engine side of sandbox bindings",
33
- "hostFetch": "sandbox host RPC internal",
34
- "coreBackendMessages": "override path covered by generic messages merge",
35
- "ExecutorService": "service class behind ctx.executor.run (the taught surface); constructed by the core service factory",
36
- "InProcessExecutorAdapter": "default trusted adapter, applied automatically; override via executor.trusted",
37
- "HTTP_FETCH_BODY_CAP_BYTES": "executor wire constant",
38
- "parseBindingMethod": "executor broker internal",
39
- "checkBindingCapability": "sandbox broker internal",
40
- "knowledgePathMatches": "sandbox broker internal",
41
- "normalizeKnowledgePath": "sandbox broker internal",
42
- "DOCUMENT_STORE_COLLECTION": "sandbox broker internal constant",
43
- "buildGuestBindings": "sandbox guest-side internal",
44
- "classifyIpLiteral": "sandbox egress validation internal",
45
- "parseHostEntry": "sandbox egress validation internal",
46
- "validateEgressHosts": "sandbox egress validation internal",
47
- "validateHostEgress": "sandbox egress validation internal",
48
- "BINDINGS_TOKEN_HEADER": "sandbox wire-protocol constant",
49
- "FRAME_MARKER": "sandbox wire-protocol constant",
50
- "toVectorLiteral": "pgvector adapter internal util",
51
- "createSearchService": "service wiring internal; ctx.search is the taught surface",
52
- "SearchServiceWrapper": "see createSearchService",
53
- "FilesError": "files-sdk pass-through; taught via Files SDK docs",
54
- "transfer": "files-sdk pass-through; taught via Files SDK docs",
55
- "RESEND_API_BASE_URL": "adapter default constant",
56
- "PLUNK_API_BASE_URL": "adapter default constant",
57
- "BullMQAdapter": "class form; bullMQAdapter() factory is the taught surface",
58
- "CloudflareKVAdapter": "class form; cloudflareKVAdapter() factory is the taught surface",
59
- "CloudflareQueuesAdapter": "class form; cloudflareQueuesAdapter() factory is the taught surface",
60
- "CloudflareRealtimeAdapter": "class form; cloudflareRealtimeAdapter() factory is the taught surface",
61
- "PgBossAdapter": "class form; pgBossAdapter() factory is the taught surface",
62
- "PgNotifyAdapter": "class form; pgNotifyAdapter() factory is the taught surface",
63
- "RedisStreamsAdapter": "class form; redisStreamsAdapter() factory is the taught surface",
64
- "PlunkAdapter": "class form; plunkAdapter() factory is the taught surface",
65
- "ResendAdapter": "class form; resendAdapter() factory is the taught surface",
66
- "HttpSandboxAdapter": "class form; httpSandboxAdapter() factory is the taught surface",
67
- "OpenAIEmbeddingProvider": "class form; createOpenAIEmbeddingProvider() factory is the taught surface",
68
- "CustomEmbeddingProvider": "class form; createCustomEmbeddingProvider() factory is the taught surface",
69
- "createCloudflareFetchHandler": "granular handler; createCloudflareWorkerHandlers umbrella is taught",
70
- "createCloudflareQueueHandler": "granular handler; createCloudflareWorkerHandlers umbrella is taught",
71
- "createCloudflareRealtimeDurableObjectHandler": "granular handler; createCloudflareWorkerHandlers umbrella is taught",
72
- "createCloudflareScheduledHandler": "granular handler; createCloudflareWorkerHandlers umbrella is taught",
73
- "publishScheduledJobs": "Cloudflare scheduled-handler internal",
74
- "toCloudflareQueuePushBatch": "Cloudflare queue-handler internal",
75
- "assertCloudflareCompatible": "boot-time compatibility check, runs automatically",
76
- "getCloudflareCompatibilityIssues": "see assertCloudflareCompatible",
77
- "CloudflareCompatibilityError": "see assertCloudflareCompatible",
78
- "CLOUD_ENV": "QUESTPIE Cloud env detection constant",
79
- "isQuestpieCloud": "QUESTPIE Cloud env detection helper",
80
- "createAdapterContext": "HTTP adapter wiring internal",
81
- "createAdapterRoutes": "HTTP adapter wiring internal",
82
- "evaluateRouteAccess": "route dispatcher internal",
83
- "executeJsonRoute": "route dispatcher internal",
84
- "executeRawRoute": "route dispatcher internal",
85
- "isJsonRoute": "route dispatcher internal",
86
- "isRawRoute": "route dispatcher internal",
87
- "executeAccessRule": "CRUD access-control engine internal",
88
- "mergeAuthOptions": "auth config merge internal (createApp applies it)",
89
- "guardHookRecursion": "hook engine internal",
90
- "GlobalCRUDGenerator": "CRUD engine internal; ctx.globals is the taught surface",
91
- "createQueueClient": "service wiring internal; ctx.queue is the taught surface",
92
- "startJobWorker": "worker wiring internal; app.queue.listen() is the taught surface",
93
- "runJobWorkerOnce": "worker wiring internal; app.queue.runOnce() is the taught surface",
94
- "createComponentCallbackProxy": "server-driven admin UI internal",
95
- "program": "CLI entry object; the questpie CLI commands are the taught surface",
96
- "builtinFields": "field registry internal; f.* factories are the taught surface",
97
- "createFieldBuilder": "builder engine internal",
98
- "createFieldsCallbackContext": "builder engine internal",
99
- "extractFieldDefinitions": "builder engine internal",
100
- "wrapBuilderWithExtensions": "builder engine internal",
101
- "wrapFieldComplete": "builder engine internal",
102
- "createCollectionValidationSchemas": "validation engine internal",
103
- "mergeFieldsForValidation": "validation engine internal",
104
- "softDeleteUniqueIndex": "schema generation internal",
105
- "introspectCollection": "introspection engine internal (powers /schema routes)",
106
- "introspectCollections": "introspection engine internal",
107
- "introspectGlobal": "introspection engine internal",
108
- "introspectGlobals": "introspection engine internal",
109
- "getCurrentTransaction": "transaction plumbing; withTransaction/onAfterCommit are the taught surface",
110
- "getTransactionContext": "transaction plumbing",
111
- "isInTransaction": "transaction plumbing",
112
- "isNotNull": "internal type guard util",
113
- "DrizzleMigrationGenerator": "CLI migration machinery",
114
- "MigrationRunner": "CLI migration machinery",
115
- "OperationSnapshotManager": "CLI migration machinery",
116
- "SeedRunner": "CLI seed machinery",
117
- "resolveAutoSeedCategories": "CLI seed machinery",
118
- "createInsertSchema": "drizzle-to-zod internal",
119
- "createUpdateSchema": "drizzle-to-zod internal",
120
- "drizzleColumnsToZod": "drizzle-to-zod internal",
121
- "drizzleColumnToZod": "drizzle-to-zod internal",
122
- "parseDatabaseError": "error mapping internal; ApiError is the taught surface",
123
- "CMS_ERROR_CODES": "raw code map; ApiError + docs reference/error-codes are the taught surface",
124
- "getHTTPStatusFromCode": "error mapping internal",
125
- "mergeAdminConfig": "admin config merge internal (createApp applies it)",
126
- "mergeAdminSidebar": "admin config merge internal",
127
- "isAuthoritativeSidebar": "admin sidebar internal",
128
- "shouldAutoAppendUnlistedSidebar": "admin sidebar internal",
129
- "serializeFormLayoutProps": "server-driven admin UI internal",
130
- "serializeReactivePropValue": "server-driven admin UI internal",
131
- "serializeReactivePropsRecord": "server-driven admin UI internal",
132
- "isReactiveConfig": "server-driven admin UI internal",
133
- "isReactivePropPlaceholder": "server-driven admin UI internal",
134
- "trackDependencies": "reactive admin fields internal",
135
- "trackDepsFunction": "reactive admin fields internal",
136
- "getDebounce": "reactive admin fields internal",
137
- "extractDependencies": "reactive admin fields internal",
138
- "createValidationTranslator": "i18n plumbing; messages merge + ctx.t are the taught surface",
139
- "createZodErrorMap": "i18n plumbing",
140
- "i18nParams": "i18n plumbing",
141
- "isI18nLocaleMap": "i18n plumbing",
142
- "isI18nTranslationKey": "i18n plumbing",
143
- "mergeValidationMessages": "i18n plumbing",
144
- "resolveI18nText": "i18n plumbing",
145
- "validationMessagesCS": "built-in locale pack, loaded automatically",
146
- "validationMessagesDE": "built-in locale pack",
147
- "validationMessagesEN": "built-in locale pack",
148
- "validationMessagesES": "built-in locale pack",
149
- "validationMessagesFR": "built-in locale pack",
150
- "validationMessagesPL": "built-in locale pack",
151
- "validationMessagesPT": "built-in locale pack",
152
- "validationMessagesSK": "built-in locale pack",
153
- "dedupeBy": "shared util pass-through",
154
- "deepMerge": "shared util pass-through; mergeRecord & friends are the taught merge surface",
155
- "isNullish": "shared util pass-through",
156
- "isPlainObject": "shared util pass-through",
157
- "toCamelCase": "shared util pass-through",
158
- "toKebabCase": "shared util pass-through",
159
- "toPascalCase": "shared util pass-through",
160
- "toSnakeCase": "shared util pass-through",
161
- "DEFAULT_LOCALE": "framework default constant",
162
- "DEFAULT_LOCALE_CONFIG": "framework default constant",
163
- "questpieSearchTable": "search infrastructure table (managed by adapter migrations)",
164
- "questpieSearchFacetsTable": "search infrastructure table",
165
- "questpieRealtimeLogTable": "realtime outbox table (managed by adapter migrations)",
166
- "extractFacetValues": "search indexing internal",
167
- "indexRecordsJob": "search reindex job, registered automatically",
168
- "indexRecordsSchema": "see indexRecordsJob",
169
- "categoryRecordEntry": "codegen template emission util",
170
- "categoryTypeEntry": "codegen template emission util",
171
- "importStatement": "codegen template emission util",
172
- "safeKey": "codegen template emission util",
173
- "sortedValues": "codegen template emission util",
174
- "sourceBasename": "codegen template emission util",
175
- "checkRetroactiveMatch": "workflow engine internal",
176
- "computeMatchHash": "workflow engine internal",
177
- "createCompletedStepsMap": "workflow engine internal",
178
- "cronFiredInWindow": "workflow engine internal",
179
- "cronMatches": "workflow engine internal",
180
- "dispatchEvent": "workflow engine internal; ctx.workflows.dispatchEvent is the taught surface",
181
- "defaultWorkflowAccess": "default applied automatically; override via workflowsConfig({ access })",
182
- "executeWorkflowHandler": "workflow engine internal",
183
- "getMatchHashesForDispatch": "workflow engine internal",
184
- "matchesCriteria": "workflow engine internal",
185
- "parseCron": "workflow engine internal",
186
- "parseDuration": "workflow engine internal",
187
- "resolveDate": "workflow engine internal",
188
- "runCompensations": "workflow engine internal",
189
- "WILDCARD_HASH": "workflow engine internal constant",
190
- "WorkflowLoggerImpl": "workflow engine internal",
191
- "StepExecutionContext": "workflow engine internal",
192
- "NonDeterministicError": "engine-raised error, surfaced in run records",
193
- "StepFailedError": "engine-raised error, surfaced in run records",
194
- "StepRetryError": "engine-raised error, surfaced in run records",
195
- "StepSuspendError": "engine-raised control-flow error",
196
- "WorkflowError": "engine-raised error, surfaced in run records",
197
- "WorkflowTimeoutError": "engine-raised error, surfaced in run records",
198
- "WorkflowsPage": "registered via workflowsClientModule (taught)",
199
- "WorkflowListPage": "registered via workflowsClientModule",
200
- "WorkflowDetailPage": "registered via workflowsClientModule"
201
- },
202
- "concepts": [
203
- { "name": "auth-callback context (getContext in Better Auth callbacks)", "patterns": ["onLinkAccount"] },
204
- { "name": "partial context overrides ({ accessMode } inherits session/db/locale)", "patterns": ["partial context override"] },
205
- { "name": "job-level cron (options.cron)", "patterns": ["options:\\s*\\{\\s*cron"] },
206
- { "name": "raw routes (.raw())", "patterns": ["\\.raw\\(\\)"] },
207
- { "name": "signed URLs for private files", "patterns": ["generateSignedUrlToken"] },
208
- { "name": "sandboxed code execution (ctx.executor)", "patterns": ["ctx\\.executor\\.run"] },
209
- { "name": "client-side auth (authClient)", "patterns": ["createAdminAuthClient", "authClient"] },
210
- { "name": "infer-first map (type-inference reference)", "patterns": ["CollectionDoc<"] },
211
- { "name": "realtime invalidation topics", "patterns": ["buildCollectionTopic"] }
212
- ]
213
- }