@jskit-ai/agent-docs 0.1.130 → 0.1.132

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 (171) hide show
  1. package/guide/agent/app-extras/assistant.md +29 -605
  2. package/guide/agent/app-extras/mobile-capacitor.md +29 -362
  3. package/guide/agent/app-extras/realtime.md +29 -277
  4. package/guide/agent/app-setup/a-more-interesting-shell.md +44 -815
  5. package/guide/agent/app-setup/authentication.md +43 -1073
  6. package/guide/agent/app-setup/console.md +26 -298
  7. package/guide/agent/app-setup/database-layer.md +110 -790
  8. package/guide/agent/app-setup/initial-scaffolding.md +50 -784
  9. package/guide/agent/app-setup/multi-homing.md +39 -712
  10. package/guide/agent/app-setup/quickstart.md +43 -179
  11. package/guide/agent/app-setup/users.md +34 -353
  12. package/guide/agent/index.md +16 -23
  13. package/package.json +2 -2
  14. package/patterns/INDEX.md +7 -7
  15. package/patterns/child-cruds.md +3 -3
  16. package/patterns/client-requests.md +6 -6
  17. package/patterns/crud-authoring.md +94 -0
  18. package/patterns/crud-links.md +1 -1
  19. package/patterns/feature-package/PATTERN.md +108 -0
  20. package/patterns/feature-package/example/booking-engine/package.json +48 -0
  21. package/patterns/feature-package/example/booking-engine/src/server/BookingEngineProvider.js +33 -0
  22. package/patterns/feature-package/example/booking-engine/src/server/actions.js +26 -0
  23. package/patterns/feature-package/example/booking-engine/src/server/inputSchemas.js +19 -0
  24. package/patterns/feature-package/example/variations/AvailabilityEngineProvider.js +31 -0
  25. package/patterns/feature-package/example/variations/InvoiceRollupProvider.js +36 -0
  26. package/patterns/feature-package/example/variations/customKnexRepository.js +34 -0
  27. package/patterns/feature-package/example/variations/orchestratorService.js +23 -0
  28. package/patterns/filters.md +8 -8
  29. package/patterns/live-actions.md +5 -18
  30. package/patterns/minimal-foundation/PATTERN.md +98 -0
  31. package/patterns/minimal-foundation/example/.nvmrc +1 -0
  32. package/patterns/minimal-foundation/example/AGENTS.md +17 -0
  33. package/patterns/minimal-foundation/example/Procfile +2 -0
  34. package/patterns/minimal-foundation/example/app.json +14 -0
  35. package/patterns/minimal-foundation/example/bin/develop.js +71 -0
  36. package/patterns/minimal-foundation/example/bin/server.js +8 -0
  37. package/patterns/minimal-foundation/example/config/public.js +40 -0
  38. package/patterns/minimal-foundation/example/config/server.js +1 -0
  39. package/patterns/minimal-foundation/example/config/surfaceAccessPolicies.js +3 -0
  40. package/patterns/minimal-foundation/example/eslint.config.mjs +19 -0
  41. package/patterns/minimal-foundation/example/favicon.svg +7 -0
  42. package/patterns/minimal-foundation/example/gitignore +9 -0
  43. package/patterns/minimal-foundation/example/index.html +13 -0
  44. package/patterns/minimal-foundation/example/jsconfig.json +8 -0
  45. package/patterns/minimal-foundation/example/package.json +57 -0
  46. package/patterns/minimal-foundation/example/packages/main/package.json +42 -0
  47. package/patterns/minimal-foundation/example/packages/main/src/shared/index.js +10 -0
  48. package/patterns/minimal-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
  49. package/patterns/minimal-foundation/example/playwright.config.mjs +31 -0
  50. package/patterns/minimal-foundation/example/server/lib/runtimeEnv.js +45 -0
  51. package/patterns/minimal-foundation/example/server/lib/surfaceRuntime.js +10 -0
  52. package/patterns/minimal-foundation/example/server.js +195 -0
  53. package/patterns/minimal-foundation/example/src/App.vue +13 -0
  54. package/patterns/minimal-foundation/example/src/main.js +85 -0
  55. package/patterns/minimal-foundation/example/src/pages/home/index.vue +48 -0
  56. package/patterns/minimal-foundation/example/src/pages/home.vue +13 -0
  57. package/patterns/minimal-foundation/example/src/views/NotFound.vue +13 -0
  58. package/patterns/minimal-foundation/example/tests/client/smoke.vitest.js +7 -0
  59. package/patterns/minimal-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
  60. package/patterns/minimal-foundation/example/tests/server/smoke.test.js +16 -0
  61. package/patterns/minimal-foundation/example/vite.config.mjs +81 -0
  62. package/patterns/page-scaffolding.md +20 -17
  63. package/patterns/placements.md +17 -15
  64. package/patterns/row-policies.md +4 -5
  65. package/patterns/server-search.md +3 -3
  66. package/patterns/shell-foundation/PATTERN.md +104 -0
  67. package/patterns/shell-foundation/example/.nvmrc +1 -0
  68. package/patterns/shell-foundation/example/AGENTS.md +17 -0
  69. package/patterns/shell-foundation/example/Procfile +2 -0
  70. package/patterns/shell-foundation/example/app.json +14 -0
  71. package/patterns/shell-foundation/example/bin/develop.js +71 -0
  72. package/patterns/shell-foundation/example/bin/server.js +8 -0
  73. package/patterns/shell-foundation/example/config/public.js +40 -0
  74. package/patterns/shell-foundation/example/config/server.js +1 -0
  75. package/patterns/shell-foundation/example/config/surfaceAccessPolicies.js +3 -0
  76. package/patterns/shell-foundation/example/eslint.config.mjs +19 -0
  77. package/patterns/shell-foundation/example/favicon.svg +7 -0
  78. package/patterns/shell-foundation/example/gitignore +9 -0
  79. package/patterns/shell-foundation/example/index.html +13 -0
  80. package/patterns/shell-foundation/example/jsconfig.json +8 -0
  81. package/patterns/shell-foundation/example/package.json +59 -0
  82. package/patterns/shell-foundation/example/packages/main/package.json +56 -0
  83. package/patterns/shell-foundation/example/packages/main/src/client/index.js +9 -0
  84. package/patterns/shell-foundation/example/packages/main/src/client/providers/MainClientProvider.js +18 -0
  85. package/patterns/shell-foundation/example/packages/main/src/shared/index.js +10 -0
  86. package/patterns/shell-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
  87. package/patterns/shell-foundation/example/playwright.config.mjs +31 -0
  88. package/patterns/shell-foundation/example/server/lib/runtimeEnv.js +45 -0
  89. package/patterns/shell-foundation/example/server/lib/surfaceRuntime.js +10 -0
  90. package/patterns/shell-foundation/example/server.js +195 -0
  91. package/patterns/shell-foundation/example/src/App.vue +11 -0
  92. package/patterns/shell-foundation/example/src/components/ShellLayout.vue +12 -0
  93. package/patterns/shell-foundation/example/src/components/menus/MenuLinkItem.vue +30 -0
  94. package/patterns/shell-foundation/example/src/components/menus/SurfaceAwareMenuLinkItem.vue +42 -0
  95. package/patterns/shell-foundation/example/src/components/menus/TabLinkItem.vue +42 -0
  96. package/patterns/shell-foundation/example/src/error.js +19 -0
  97. package/patterns/shell-foundation/example/src/main.js +85 -0
  98. package/patterns/shell-foundation/example/src/pages/home/index.vue +116 -0
  99. package/patterns/shell-foundation/example/src/pages/home/settings/general/index.vue +40 -0
  100. package/patterns/shell-foundation/example/src/pages/home/settings/index.vue +7 -0
  101. package/patterns/shell-foundation/example/src/pages/home/settings.vue +109 -0
  102. package/patterns/shell-foundation/example/src/pages/home.vue +20 -0
  103. package/patterns/shell-foundation/example/src/placement.js +56 -0
  104. package/patterns/shell-foundation/example/src/placementTopology.js +149 -0
  105. package/patterns/shell-foundation/example/src/views/NotFound.vue +13 -0
  106. package/patterns/shell-foundation/example/tests/client/smoke.vitest.js +7 -0
  107. package/patterns/shell-foundation/example/tests/e2e/adaptive-shell.spec.ts +10 -0
  108. package/patterns/shell-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
  109. package/patterns/shell-foundation/example/tests/server/smoke.test.js +16 -0
  110. package/patterns/shell-foundation/example/vite.config.mjs +81 -0
  111. package/patterns/ui-contract.md +56 -0
  112. package/patterns/ui-testing.md +10 -12
  113. package/reference/autogen/KERNEL_MAP.md +29 -107
  114. package/reference/autogen/PATTERN_INDEX.md +230 -0
  115. package/reference/autogen/README.md +4 -8
  116. package/reference/autogen/packages/agent-docs.md +259 -0
  117. package/reference/autogen/packages/assistant-core.md +3 -3
  118. package/reference/autogen/packages/assistant-runtime.md +32 -17
  119. package/reference/autogen/packages/auth-core.md +31 -33
  120. package/reference/autogen/packages/auth-provider-local-core.md +4 -12
  121. package/reference/autogen/packages/auth-provider-local-db-core.md +4 -4
  122. package/reference/autogen/packages/auth-provider-supabase-core.md +14 -18
  123. package/reference/autogen/packages/auth-web.md +42 -22
  124. package/reference/autogen/packages/console-core.md +8 -25
  125. package/reference/autogen/packages/console-web.md +5 -5
  126. package/reference/autogen/packages/crud-core.md +61 -17
  127. package/reference/autogen/packages/database-runtime-mysql.md +12 -2
  128. package/reference/autogen/packages/database-runtime-postgres.md +12 -2
  129. package/reference/autogen/packages/database-runtime.md +26 -25
  130. package/reference/autogen/packages/google-rewarded-core.md +19 -104
  131. package/reference/autogen/packages/http-runtime.md +4 -8
  132. package/reference/autogen/packages/http-web.md +32 -0
  133. package/reference/autogen/packages/json-rest-api-core.md +4 -6
  134. package/reference/autogen/packages/kernel.md +109 -390
  135. package/reference/autogen/packages/mobile-capacitor.md +2 -13
  136. package/reference/autogen/packages/realtime.md +29 -26
  137. package/reference/autogen/packages/resource-crud-core.md +6 -0
  138. package/reference/autogen/packages/shell-web.md +69 -54
  139. package/reference/autogen/packages/storage-runtime.md +3 -3
  140. package/reference/autogen/packages/uploads-image-web.md +0 -1
  141. package/reference/autogen/packages/uploads-runtime.md +3 -3
  142. package/reference/autogen/packages/users-core.md +45 -90
  143. package/reference/autogen/packages/users-web.md +5 -7
  144. package/reference/autogen/packages/workspaces-core.md +53 -74
  145. package/reference/autogen/packages/workspaces-web.md +15 -16
  146. package/reference/autogen/tooling/jskit-catalog.md +34 -0
  147. package/reference/autogen/tooling/testUtils.md +4 -4
  148. package/skills/jskit/SKILL.md +36 -28
  149. package/skills/jskit/agents/openai.yaml +2 -2
  150. package/skills/jskit/references/app-operations.md +68 -53
  151. package/skills/jskit/references/crud-operations.md +58 -106
  152. package/skills/jskit/references/material-3.md +105 -0
  153. package/skills/jskit/references/ui-operations.md +41 -44
  154. package/templates/app/AGENTS.md +7 -3
  155. package/guide/agent/app-setup/upgrade-beta-1-to-final.md +0 -252
  156. package/guide/agent/app-setup/working-with-the-jskit-cli.md +0 -325
  157. package/guide/agent/generators/advanced-cruds.md +0 -1935
  158. package/guide/agent/generators/crud-generators.md +0 -948
  159. package/guide/agent/generators/intro.md +0 -65
  160. package/guide/agent/generators/row-policies.md +0 -537
  161. package/guide/agent/generators/ui-generators.md +0 -690
  162. package/patterns/crud-scaffolding.md +0 -198
  163. package/patterns/generated-ui-contract-tracking.md +0 -66
  164. package/reference/autogen/packages/assistant.md +0 -68
  165. package/reference/autogen/packages/crud-server-generator.md +0 -215
  166. package/reference/autogen/packages/crud-ui-generator.md +0 -192
  167. package/reference/autogen/packages/feature-server-generator.md +0 -65
  168. package/reference/autogen/packages/ui-generator.md +0 -127
  169. package/reference/autogen/tooling/create-app.md +0 -317
  170. package/reference/autogen/tooling/jskit-cli.md +0 -933
  171. package/reference/autogen/tooling/test-support.md +0 -27
@@ -92,7 +92,6 @@ Exports
92
92
  - `completeOAuthCallbackFromUrl`
93
93
  - `readOAuthCallbackParamsFromUrl`
94
94
  - `routeComponents`
95
- - `clientProviders`
96
95
 
97
96
  ### `src/client/lib/profileMenuLinkTarget.js`
98
97
  Exports
@@ -115,16 +114,17 @@ Exports
115
114
  Exports
116
115
  - `AuthWebClientProvider`
117
116
 
118
- ### `src/client/providers/bootAuthClientProvider.js`
119
- Exports
120
- - `bootAuthClientProvider(app)`
121
-
122
117
  ### `src/client/runtime/authCallbackUrlParams.js`
123
118
  Exports
124
119
  - `readAuthCallbackParam(callbackUrlParams, key)`
125
120
  - `readAuthCallbackUrlParams(url = "")`
126
121
  - `stripAuthCallbackParamsFromUrl(url = "", keys = [])`
127
122
 
123
+ ### `src/client/runtime/authClient.js`
124
+ Exports
125
+ - `createAuthClient({ mobile = null, pinia, realtime = null, shell, vueApp } = {})`
126
+ - `createMobileCallbackCompleter()`
127
+
128
128
  ### `src/client/runtime/authGuardRuntime.js`
129
129
  Exports
130
130
  - `createAuthGuardRuntime({ placementRuntime = null, sessionPath = DEFAULT_SESSION_PATH, loginRoute = DEFAULT_LOGIN_ROUTE, fetchImplementation = globalThis.fetch, refreshOnForeground = DEFAULT_REFRESH_ON_FOREGROUND, refreshOnReconnect = DEFAULT_REFRESH_ON_RECONNECT, realtimeSocket = null, realtimeRefreshEvents = DEFAULT_REALTIME_REFRESH_EVENTS } = {})`
@@ -240,6 +240,12 @@ Local functions
240
240
  Exports
241
241
  - None
242
242
 
243
+ ### `src/server/AuthWebFeature.js`
244
+ Exports
245
+ - `AuthWebFeature`
246
+ Local functions
247
+ - `devAuthBootstrapEnabled(env)`
248
+
243
249
  ### `src/server/constants/authActionIds.js`
244
250
  Exports
245
251
  - `AUTH_ACTION_IDS`
@@ -250,15 +256,29 @@ Exports
250
256
  - `AUTH_ACTION_IDS`
251
257
  - `createController({ service, authService } = {})`
252
258
 
253
- ### `src/server/providers/AuthRouteServiceProvider.js`
254
- Exports
255
- - `AuthRouteServiceProvider`
256
-
257
- ### `src/server/providers/AuthWebServiceProvider.js`
259
+ ### `src/server/managedPreviewIdentity.js`
258
260
  Exports
259
- - `AuthWebServiceProvider`
261
+ - `MANAGED_PREVIEW_IDENTITY_PROTOCOL`
262
+ - `executeManagedPreviewIdentityRequest(value, { env = process.env, fetchImpl = globalThis.fetch } = {})`
263
+ - `runManagedPreviewIdentityCommand({ env = process.env, fetchImpl = globalThis.fetch, stdin = process.stdin, stdout = process.stdout } = {})`
260
264
  Local functions
261
- - `resolveDevAuthBootstrapEnabled(scope)`
265
+ - `commandError(message, code = "jskit_managed_preview_identity_failed", details = {})`
266
+ - `response(requestId, values)`
267
+ - `failure(requestId, error)`
268
+ - `readBoundedStream(stream, label)`
269
+ - `readCommandInput(stream)`
270
+ - `localTargetOrigin(value)`
271
+ - `normalizeRequest(value)`
272
+ - `identityFromSubject(subject)`
273
+ - `responseCookies(fetchResponse)`
274
+ - `cookieHeader(setCookie)`
275
+ - `responsePayload(fetchResponse)`
276
+ - `rejected(payload, fetchResponse, details = {})`
277
+ - `fetchRequest(fetchImpl, href, options)`
278
+ - `postJson(fetchImpl, href, body, headers = {})`
279
+ - `bootstrapSession(fetchImpl, targetOrigin)`
280
+ - `logout(fetchImpl, targetOrigin, session)`
281
+ - `login(fetchImpl, targetOrigin, identity, secret, session)`
262
282
 
263
283
  ### `src/server/routes/authRoutes.js`
264
284
  Exports
@@ -268,21 +288,21 @@ Exports
268
288
  Exports
269
289
  - `AuthWebService`
270
290
 
271
- ### templates
291
+ ### patterns
272
292
 
273
- ### `templates/src/pages/auth/login.vue`
293
+ ### `patterns/auth-surface/example/src/pages/auth/login.vue`
274
294
  Exports
275
295
  - None
276
296
 
277
- ### `templates/src/pages/auth/reset-password.vue`
297
+ ### `patterns/auth-surface/example/src/pages/auth/reset-password.vue`
278
298
  Exports
279
299
  - None
280
300
 
281
- ### `templates/src/pages/auth/signout.vue`
301
+ ### `patterns/auth-surface/example/src/pages/auth/signout.vue`
282
302
  Exports
283
303
  - None
284
304
 
285
- ### `templates/src/runtime/authGuardRuntime.js`
305
+ ### `patterns/auth-surface/example/src/runtime/authGuardRuntime.js`
286
306
  Exports
287
307
  - `createAuthGuardRuntime`
288
308
  - `isAuthGuardRuntime`
@@ -290,25 +310,25 @@ Exports
290
310
  - `refreshAuthGuardState`
291
311
  - `getAuthGuardState`
292
312
 
293
- ### `templates/src/runtime/authHttpClient.js`
313
+ ### `patterns/auth-surface/example/src/runtime/authHttpClient.js`
294
314
  Exports
295
315
  - `authHttpRequest`
296
316
  - `clearAuthCsrfTokenCache`
297
317
 
298
- ### `templates/src/runtime/useSignOut.js`
318
+ ### `patterns/auth-surface/example/src/runtime/useSignOut.js`
299
319
  Exports
300
320
  - `useSignOut`
301
321
  - `createSignOutAction`
302
322
  - `performSignOutRequest`
303
323
 
304
- ### `templates/src/views/auth/LoginView.vue`
324
+ ### `patterns/auth-surface/example/src/views/auth/LoginView.vue`
305
325
  Exports
306
326
  - None
307
327
 
308
- ### `templates/src/views/auth/ResetPasswordView.vue`
328
+ ### `patterns/auth-surface/example/src/views/auth/ResetPasswordView.vue`
309
329
  Exports
310
330
  - None
311
331
 
312
- ### `templates/src/views/auth/SignOutView.vue`
332
+ ### `patterns/auth-surface/example/src/views/auth/SignOutView.vue`
313
333
  Exports
314
334
  - None
@@ -24,13 +24,14 @@ Local functions
24
24
  Exports
25
25
  - `createConsoleBootstrapContributor({ consoleService } = {})`
26
26
 
27
- ### `src/server/ConsoleCoreServiceProvider.js`
27
+ ### `src/server/ConsoleFeature.js`
28
28
  Exports
29
- - `ConsoleCoreServiceProvider`
29
+ - `ConsoleFeature`
30
+ - `createConsoleRuntime({ database } = {})`
30
31
 
31
32
  ### `src/server/consoleSettings/bootConsoleSettingsRoutes.js`
32
33
  Exports
33
- - `bootConsoleSettingsRoutes(app)`
34
+ - `registerConsoleSettingsRoutes(router)`
34
35
  Local functions
35
36
  - `resolveConsoleSettingsRecordId()`
36
37
 
@@ -40,7 +41,8 @@ Exports
40
41
 
41
42
  ### `src/server/consoleSettings/consoleSettingsActions.js`
42
43
  Exports
43
- - `consoleSettingsActions`
44
+ - `consoleSettingsActionSpecifications`
45
+ - `buildConsoleSettingsActions({ consoleSettingsService } = {})`
44
46
 
45
47
  ### `src/server/consoleSettings/consoleSettingsRepository.js`
46
48
  Exports
@@ -55,25 +57,6 @@ Exports
55
57
  Local functions
56
58
  - `buildSettingsResponse(record = {})`
57
59
 
58
- ### `src/server/consoleSettings/registerConsoleSettings.js`
59
- Exports
60
- - `registerConsoleSettings(app)`
61
-
62
- ### `src/server/registerConsoleBootstrap.js`
63
- Exports
64
- - `registerConsoleBootstrap(app)`
65
-
66
- ### `src/server/registerConsoleCore.js`
67
- Exports
68
- - `registerConsoleCore(app)`
69
-
70
- ### `src/server/support/consoleActionSurfaces.js`
71
- Exports
72
- - `resolveConsoleSurfaceIdsFromAppConfig(appConfig = {})`
73
- - `registerConsoleCoreActionSurfaceSources(app)`
74
- Local functions
75
- - `normalizeSurfaceIds(surfaceIds = [])`
76
-
77
60
  ### `src/shared/operationMessages.js`
78
61
  Exports
79
62
  - `createOperationMessages({ validationMessage = "Validation failed.", apiValidationMessage = validationMessage } = {})`
@@ -82,8 +65,8 @@ Exports
82
65
  Exports
83
66
  - `consoleSettingsResource`
84
67
 
85
- ### templates
68
+ ### migrations
86
69
 
87
- ### `templates/migrations/console_core_generic_initial.cjs`
70
+ ### `migrations/console_core_generic_initial.cjs`
88
71
  Exports
89
72
  - None
@@ -12,20 +12,20 @@ Use this on demand; do not load the full index at startup.
12
12
 
13
13
  ## Sections
14
14
 
15
- ### templates
15
+ ### patterns
16
16
 
17
- ### `templates/src/pages/console.vue`
17
+ ### `patterns/console-surface/example/src/pages/console.vue`
18
18
  Exports
19
19
  - None
20
20
 
21
- ### `templates/src/pages/console/index.vue`
21
+ ### `patterns/console-surface/example/src/pages/console/index.vue`
22
22
  Exports
23
23
  - None
24
24
 
25
- ### `templates/src/pages/console/settings.vue`
25
+ ### `patterns/console-surface/example/src/pages/console/settings.vue`
26
26
  Exports
27
27
  - None
28
28
 
29
- ### `templates/src/pages/console/settings/index.vue`
29
+ ### `patterns/console-surface/example/src/pages/console/settings/index.vue`
30
30
  Exports
31
31
  - None
@@ -30,34 +30,32 @@ Local functions
30
30
 
31
31
  ### `src/server/crudModuleConfig.js`
32
32
  Exports
33
- - `CRUD_MODULE_ID`
34
- - `DEFAULT_OWNERSHIP_FILTER`
35
33
  - `CRUD_REQUESTED_OWNERSHIP_FILTER_AUTO`
36
- - `normalizeCrudNamespace`
37
- - `normalizeCrudOwnershipFilter(value, { fallback = DEFAULT_OWNERSHIP_FILTER } = {})`
38
34
  - `normalizeCrudRequestedOwnershipFilter(value, { fallback = CRUD_REQUESTED_OWNERSHIP_FILTER_AUTO } = {})`
39
35
  - `isWorkspaceRouteVisibility`
40
36
  - `requireCrudNamespace`
41
- - `resolveCrudNamespacePath(namespace = "")`
42
37
  - `resolveCrudRelativePath(namespace = "")`
43
38
  - `normalizeCrudRelativePath(relativePath = "", { context = "resolveCrudSurfacePolicy" } = {})`
44
- - `resolveCrudApiBasePath({ namespace = "", surfaceRequiresWorkspace = false } = {})`
45
- - `resolveCrudTableName(namespace = "")`
46
- - `resolveCrudActionIdPrefix(namespace = "")`
47
- - `resolveCrudContributorId(namespace = "")`
48
- - `resolveCrudDomain(namespace = "")`
49
- - `resolveCrudConfig(source = {})`
50
39
  - `resolveCrudSurfacePolicy(sourceConfig = {}, { surfaceDefinitions = {}, defaultSurfaceId = "", context = "resolveCrudSurfacePolicy" } = {})`
51
40
  - `resolveCrudSurfacePolicyFromAppConfig(sourceConfig = {}, appConfig = {}, options = {})`
52
- - `resolveCrudConfigsFromModules(modulesSource = {})`
53
- - `resolveCrudConfigFromModules(modulesSource = {}, options = {})`
54
41
  Local functions
55
42
  - `asRecord(value)`
56
- - `resolveCrudTokenPart(namespace = "")`
57
- - `resolveCrudToken(namespace = "", suffix = "")`
58
43
  - `normalizeSurfaceDefinitions(sourceDefinitions = {})`
59
44
  - `resolveOwnershipFilterFromSurfaceDefinition(definition = {})`
60
45
 
46
+ ### `src/server/defineCrudJsonApiFeature.js`
47
+ Exports
48
+ - `defineCrudJsonApiFeature({ resource, id = "", capability = "", surface, ownershipFilter = "", relativePath = "", internal = false, routes = true, listFilterQueryValidator = null, searchSchema = null, permissions = null, scope = {}, requires = {}, decorateRepository = null, decorateService = null, operationLifecycle = {}, operationInputs = {}, actions = {}, operations = undefined } = {})`
49
+ Local functions
50
+ - `normalizeAccess(resource = {})`
51
+ - `normalizeScope(scope = {})`
52
+ - `assertWorkspaceScope(scope, ownershipFilter)`
53
+ - `normalizeFeatureRequirements(requires = {})`
54
+ - `operationsFromResource(resource)`
55
+ - `normalizeOperations(operations, resource)`
56
+ - `resolveActionPermission(actionName, { access, workspaceScoped, permissions } = {})`
57
+ - `projectEnabledServiceOperations(service, operations)`
58
+
61
59
  ### `src/server/fieldAccess.js`
62
60
  Exports
63
61
  - `createCrudFieldAccessRuntime(resource = {}, { context = "crudFieldAccess" } = {})`
@@ -73,6 +71,35 @@ Local functions
73
71
  - `resolveRoleMatrixPolicy(matrix = {}, operation = "readable", input = {})`
74
72
  - `applyReadableFieldPolicyToRecord(record, allowedFields, outputRules = null, { context = "crudFieldAccess" } = {})`
75
73
 
74
+ ### `src/server/jsonApiModule/actions.js`
75
+ Exports
76
+ - `assertCrudOperationName(operation = "")`
77
+ - `createCrudJsonApiActions({ namespace, resource, repository = null, service, surface, permissionForOperation, permissionForAction = permissionForOperation, operations = CRUD_OPERATION_NAMES, scopeInputValidator = null, scopeInputKeys = [], listFilterQueryValidator = null, operationLifecycle = {}, operationInputs = {}, actions: additionalActionDefinitions = {}, dependencies = {} } = {})`
78
+ - `normalizeCrudOperationLifecycle(value = {})`
79
+ Local functions
80
+ - `createActionInput(resource, operation, scopeInputValidator = null, listFilterQueryValidator = null, operationInputs = {})`
81
+ - `omitInputKeys(input = {}, keys = [])`
82
+ - `createLifecycleContext(value = {})`
83
+ - `normalizeAdditionalActions(value = {}, { namespace, surface, permissionForAction, scopeInputValidator = null } = {})`
84
+
85
+ ### `src/server/jsonApiModule/repository.js`
86
+ Exports
87
+ - `createCrudJsonApiRepository({ api, knex, resource, resourceScopeName } = {})`
88
+
89
+ ### `src/server/jsonApiModule/routes.js`
90
+ Exports
91
+ - `normalizeCustomActionRoutes(actions = {}, namespace = "")`
92
+ - `registerCrudJsonApiRoutes(router, { namespace, resource, routeBase = "/", relativePath, surface, ownershipFilter, access, internal = false, operations = ["list", "view", "create", "update", "delete"], actions = {}, operationInputs = {}, listFilterQueryValidator = null, routeParamsValidator = null, scopeInput = null } = {})`
93
+ Local functions
94
+ - `createScopeInput(scopeInput, request)`
95
+ - `createCustomActionInput(scopeInput, route, request)`
96
+
97
+ ### `src/server/jsonApiModule/service.js`
98
+ Exports
99
+ - `createCrudJsonApiService({ repository } = {})`
100
+ Local functions
101
+ - `requireDocument(document = null)`
102
+
76
103
  ### `src/server/listFilters.js`
77
104
  Exports
78
105
  - `CRUD_LIST_FILTER_INVALID_VALUES_REJECT`
@@ -155,7 +182,6 @@ Exports
155
182
  ### `src/server/lookups.js`
156
183
  Exports
157
184
  - `resolveCrudLookupToken`
158
- - `createCrudLookupResolver(scope, { context = "crudLookup" } = {})`
159
185
  - `createCrudLookup(repository, { context = "crudLookup", ownershipFilter = "" } = {})`
160
186
  Local functions
161
187
  - `normalizeLookupOwnershipFilter(value, { context = "crudLookup ownershipFilter" } = {})`
@@ -258,7 +284,7 @@ Local functions
258
284
 
259
285
  ### `src/server/routeContracts.js`
260
286
  Exports
261
- - `createCrudJsonApiRouteContracts({ resource = {}, routeParamsValidator = null, listSearchQueryValidator = defaultListSearchQueryValidator, lookupIncludeQueryValidator = defaultLookupIncludeQueryValidator, listFilterQueryValidator = null } = {})`
287
+ - `createCrudJsonApiRouteContracts({ resource = {}, routeParamsValidator = null, operations = ["list", "view", "create", "update", "delete"], operationInputs = {}, listSearchQueryValidator = defaultListSearchQueryValidator, lookupIncludeQueryValidator = defaultLookupIncludeQueryValidator, listFilterQueryValidator = null } = {})`
262
288
  Local functions
263
289
  - `isRecord(value)`
264
290
  - `resolveSchemaFieldDefinitions(definition = null)`
@@ -299,3 +325,21 @@ Exports
299
325
  Local functions
300
326
  - `requireCrudServiceRepository(runtime = {}, repository = null)`
301
327
  - `splitCrudListRepositoryCall(query = {}, options = {})`
328
+
329
+ ### patterns
330
+
331
+ ### `patterns/json-api-resource-package/example/migrations/20260815000000_books.cjs`
332
+ Exports
333
+ - None
334
+
335
+ ### `patterns/json-api-resource-package/example/packages/books/src/server/BooksFeature.js`
336
+ Exports
337
+ - `BooksFeature`
338
+
339
+ ### `patterns/json-api-resource-package/example/packages/books/src/shared/bookResource.js`
340
+ Exports
341
+ - `bookResource`
342
+
343
+ ### `patterns/json-api-resource-package/example/packages/books/src/shared/index.js`
344
+ Exports
345
+ - `bookResource`
@@ -18,9 +18,9 @@ Use this on demand; do not load the full index at startup.
18
18
  Exports
19
19
  - None
20
20
 
21
- ### `src/server/providers/DatabaseRuntimeMysqlServiceProvider.js`
21
+ ### `src/server/providers/MysqlDatabaseDriverProvider.js`
22
22
  Exports
23
- - `DatabaseRuntimeMysqlServiceProvider`
23
+ - `MysqlDatabaseDriverProvider`
24
24
 
25
25
  ### `src/shared/dialect.js`
26
26
  Exports
@@ -57,3 +57,13 @@ Local functions
57
57
  - `requireIdColumn(columns, idColumn)`
58
58
  - `requirePrimaryKeyContainsId(primaryKeyColumns, idColumn)`
59
59
  - `requireSupportedForeignKeys(foreignKeys, primaryKeyColumnsByTable)`
60
+
61
+ ### patterns
62
+
63
+ ### `patterns/mysql-application/example/knexfile.js`
64
+ Exports
65
+ - None
66
+
67
+ ### `patterns/mysql-application/example/scripts/prepare-database.js`
68
+ Exports
69
+ - None
@@ -18,9 +18,9 @@ Use this on demand; do not load the full index at startup.
18
18
  Exports
19
19
  - None
20
20
 
21
- ### `src/server/providers/DatabaseRuntimePostgresServiceProvider.js`
21
+ ### `src/server/providers/PostgresDatabaseDriverProvider.js`
22
22
  Exports
23
- - `DatabaseRuntimePostgresServiceProvider`
23
+ - `PostgresDatabaseDriverProvider`
24
24
 
25
25
  ### `src/shared/dialect.js`
26
26
  Exports
@@ -31,3 +31,13 @@ Exports
31
31
  Exports
32
32
  - `DIALECT_ID`
33
33
  - `getDialectId`
34
+
35
+ ### patterns
36
+
37
+ ### `patterns/postgres-application/example/knexfile.js`
38
+ Exports
39
+ - None
40
+
41
+ ### `patterns/postgres-application/example/scripts/prepare-database.js`
42
+ Exports
43
+ - None
@@ -18,18 +18,31 @@ Use this on demand; do not load the full index at startup.
18
18
  Exports
19
19
  - None
20
20
 
21
- ### `src/server/providers/DatabaseRuntimeServiceProvider.js`
21
+ ### `src/server/databaseSetup.js`
22
22
  Exports
23
- - `DatabaseRuntimeServiceProvider`
23
+ - `prepareDatabaseFromApp({ client, appRoot = process.cwd(), environment = process.env, migrationsDirectory = "migrations", seed } = {})`
24
+ - `runDatabaseSetup({ knex, seed, appRoot = process.cwd(), environment = process.env } = {})`
24
25
  Local functions
25
- - `resolveDatabaseEnv(scope)`
26
- - `resolveDriverDialectId(driver)`
26
+ - `normalizeMigrationResult(result)`
27
+
28
+ ### `src/server/knexFactory.js`
29
+ Exports
27
30
  - `loadKnexFactory()`
28
- - `resolveRegisteredDriver(scope)`
29
- - `resolveRegisteredDrivers(scope)`
30
- - `resolveSingleRegisteredDriver(scope)`
31
- - `createKnexConfig(scope)`
32
- - `createKnexInstance(scope)`
31
+
32
+ ### `src/server/knexMigrationConfig.js`
33
+ Exports
34
+ - `createKnexMigrationConfig({ client, environment = process.env, appRoot = process.cwd(), migrationsDirectory = "migrations", packageMigrationDirectories = [] } = {})`
35
+ - `createKnexMigrationConfigFromApp(options = {})`
36
+ - `discoverPackageMigrationDirectories({ appRoot = process.cwd() } = {})`
37
+ Local functions
38
+ - `directoryExists(directory)`
39
+
40
+ ### `src/server/providers/DatabaseProvider.js`
41
+ Exports
42
+ - `DatabaseProvider`
43
+ Local functions
44
+ - `resolveDriverDialectId(driver)`
45
+ - `createDatabase({ driver, env })`
33
46
 
34
47
  ### `src/shared/databaseClient.js`
35
48
  Exports
@@ -87,7 +100,6 @@ Exports
87
100
  - `createTransactionManager`
88
101
  - `BaseRepository`
89
102
  - `buildPaginationMeta`
90
- - `registerDatabaseRuntime`
91
103
  - `normalizeDateInput`
92
104
  - `toIsoString`
93
105
  - `toInsertDateTime`
@@ -131,6 +143,7 @@ Exports
131
143
  - `toDbJson`
132
144
  - `runInTransaction`
133
145
  - `createWithTransaction`
146
+ - `lockScopedRecordId`
134
147
  - `normalizeBatchSize`
135
148
  - `normalizeCutoffDateOrThrow`
136
149
  - `normalizeDeletedRowCount`
@@ -169,6 +182,9 @@ Exports
169
182
  - `toDbJson(value)`
170
183
  - `runInTransaction(knex, callback)`
171
184
  - `createWithTransaction(knex)`
185
+ - `lockScopedRecordId({ trx, tableName, recordId, scopeId, idColumn = "id", scopeColumn = "workspace_id" } = {})`
186
+ Local functions
187
+ - `requireSqlIdentifier(value, label)`
172
188
 
173
189
  ### `src/shared/repositoryScope.js`
174
190
  Exports
@@ -185,15 +201,6 @@ Exports
185
201
  - `deleteRowsOlderThan({ client, tableName, dateColumn, cutoffDate, batchSize, applyFilters })`
186
202
  - `__testables`
187
203
 
188
- ### `src/shared/runtime.js`
189
- Exports
190
- - `registerDatabaseRuntime(app, { knex } = {})`
191
- Local functions
192
- - `ensureContainerInterface(app)`
193
- - `ensureKnexInterface(knex)`
194
- - `ensureKnexBinding(app, knex)`
195
- - `ensureTransactionManagerBinding(app)`
196
-
197
204
  ### `src/shared/runtimeErrors.js`
198
205
  Exports
199
206
  - `DatabaseRuntimeError`
@@ -214,9 +221,3 @@ Exports
214
221
  - `DEFAULT_VISIBILITY_COLUMNS`
215
222
  - `applyVisibility(queryBuilder, visibilityContext = {})`
216
223
  - `applyVisibilityOwners(payload = {}, visibilityContext = {})`
217
-
218
- ### templates
219
-
220
- ### `templates/knexfile.js`
221
- Exports
222
- - `default`
@@ -20,11 +20,22 @@ Exports
20
20
  - `ACTION_START`
21
21
  - `ACTION_GRANT`
22
22
  - `ACTION_CLOSE`
23
- - `googleRewardedActions`
23
+ - `createGoogleRewardedActions({ googleRewarded } = {})`
24
+ Local functions
25
+ - `changedEvent({ entity, operation, entityId, event })`
24
26
 
25
27
  ### `src/server/GoogleRewardedCoreProvider.js`
26
28
  Exports
27
- - `GoogleRewardedCoreProvider`
29
+ - `GoogleRewardedCoreFeature`
30
+
31
+ ### `src/server/GoogleRewardedResources.js`
32
+ Exports
33
+ - `GoogleRewardedProviderConfigsFeature`
34
+ - `GoogleRewardedRulesFeature`
35
+ - `GoogleRewardedUnlockReceiptsFeature`
36
+ - `GoogleRewardedWatchSessionsFeature`
37
+ Local functions
38
+ - `workspaceScope()`
28
39
 
29
40
  ### `src/server/inputSchemas.js`
30
41
  Exports
@@ -39,60 +50,12 @@ Exports
39
50
  Local functions
40
51
  - `createGateStateOutputValidator({ includeSession = false } = {})`
41
52
 
42
- ### `src/server/providerConfigs/actions.js`
43
- Exports
44
- - `createActions({ surface } = {})`
45
-
46
- ### `src/server/providerConfigs/GoogleRewardedProviderConfigsProvider.js`
47
- Exports
48
- - `GoogleRewardedProviderConfigsProvider`
49
- Local functions
50
- - `resolveCrudPolicyFromApp(app)`
51
-
52
- ### `src/server/providerConfigs/registerRoutes.js`
53
- Exports
54
- - `registerRoutes(app, { routeOwnershipFilter = "public", routeSurface = "", routeRelativePath = "" } = {})`
55
-
56
- ### `src/server/providerConfigs/repository.js`
57
- Exports
58
- - `createRepository({ api, knex } = {})`
59
-
60
- ### `src/server/providerConfigs/service.js`
61
- Exports
62
- - `createService({ googleRewardedProviderConfigsRepository } = {})`
63
- Local functions
64
- - `return404IfNotFound(document = null)`
65
-
66
53
  ### `src/server/registerRoutes.js`
67
54
  Exports
68
- - `registerRoutes(app, { routeOwnershipFilter = "workspace_user", routeSurface = "app", routeRelativePath = "google-rewarded" } = {})`
55
+ - `registerRoutes(router, { routeOwnershipFilter = "workspace_user", routeSurface = "app", routeRelativePath = "google-rewarded" } = {})`
69
56
  Local functions
70
57
  - `createWorkflowResponses(outputValidator)`
71
58
 
72
- ### `src/server/rules/actions.js`
73
- Exports
74
- - `createActions({ surface } = {})`
75
-
76
- ### `src/server/rules/GoogleRewardedRulesProvider.js`
77
- Exports
78
- - `GoogleRewardedRulesProvider`
79
- Local functions
80
- - `resolveCrudPolicyFromApp(app)`
81
-
82
- ### `src/server/rules/registerRoutes.js`
83
- Exports
84
- - `registerRoutes(app, { routeOwnershipFilter = "public", routeSurface = "", routeRelativePath = "" } = {})`
85
-
86
- ### `src/server/rules/repository.js`
87
- Exports
88
- - `createRepository({ api, knex } = {})`
89
-
90
- ### `src/server/rules/service.js`
91
- Exports
92
- - `createService({ googleRewardedRulesRepository } = {})`
93
- Local functions
94
- - `return404IfNotFound(document = null)`
95
-
96
59
  ### `src/server/service.js`
97
60
  Exports
98
61
  - `createService({ googleRewardedRulesRepository, googleRewardedProviderConfigsRepository, googleRewardedWatchSessionsRepository, googleRewardedUnlockReceiptsRepository } = {})`
@@ -126,54 +89,6 @@ Local functions
126
89
  - `isConfigurationBypassAllowed(gateState = null, requireConfigured = false)`
127
90
  - `createRewardedGateError(gateState = null, { errorCode = "", errorMessage = "" } = {})`
128
91
 
129
- ### `src/server/unlockReceipts/actions.js`
130
- Exports
131
- - `createActions({ surface } = {})`
132
-
133
- ### `src/server/unlockReceipts/GoogleRewardedUnlockReceiptsProvider.js`
134
- Exports
135
- - `GoogleRewardedUnlockReceiptsProvider`
136
- Local functions
137
- - `resolveCrudPolicyFromApp(app)`
138
-
139
- ### `src/server/unlockReceipts/registerRoutes.js`
140
- Exports
141
- - `registerRoutes(app, { routeOwnershipFilter = "public", routeSurface = "", routeRelativePath = "" } = {})`
142
-
143
- ### `src/server/unlockReceipts/repository.js`
144
- Exports
145
- - `createRepository({ api, knex } = {})`
146
-
147
- ### `src/server/unlockReceipts/service.js`
148
- Exports
149
- - `createService({ googleRewardedUnlockReceiptsRepository } = {})`
150
- Local functions
151
- - `return404IfNotFound(document = null)`
152
-
153
- ### `src/server/watchSessions/actions.js`
154
- Exports
155
- - `createActions({ surface } = {})`
156
-
157
- ### `src/server/watchSessions/GoogleRewardedWatchSessionsProvider.js`
158
- Exports
159
- - `GoogleRewardedWatchSessionsProvider`
160
- Local functions
161
- - `resolveCrudPolicyFromApp(app)`
162
-
163
- ### `src/server/watchSessions/registerRoutes.js`
164
- Exports
165
- - `registerRoutes(app, { routeOwnershipFilter = "public", routeSurface = "", routeRelativePath = "" } = {})`
166
-
167
- ### `src/server/watchSessions/repository.js`
168
- Exports
169
- - `createRepository({ api, knex } = {})`
170
-
171
- ### `src/server/watchSessions/service.js`
172
- Exports
173
- - `createService({ googleRewardedWatchSessionsRepository } = {})`
174
- Local functions
175
- - `return404IfNotFound(document = null)`
176
-
177
92
  ### `src/shared/googleRewardedProviderConfigResource.js`
178
93
  Exports
179
94
  - `resource`
@@ -197,20 +112,20 @@ Exports
197
112
  - `googleRewardedWatchSessionResource`
198
113
  - `googleRewardedUnlockReceiptResource`
199
114
 
200
- ### templates
115
+ ### migrations
201
116
 
202
- ### `templates/migrations/google_rewarded_provider_configs_initial.cjs`
117
+ ### `migrations/google_rewarded_provider_configs_initial.cjs`
203
118
  Exports
204
119
  - None
205
120
 
206
- ### `templates/migrations/google_rewarded_rules_initial.cjs`
121
+ ### `migrations/google_rewarded_rules_initial.cjs`
207
122
  Exports
208
123
  - None
209
124
 
210
- ### `templates/migrations/google_rewarded_unlock_receipts_initial.cjs`
125
+ ### `migrations/google_rewarded_unlock_receipts_initial.cjs`
211
126
  Exports
212
127
  - None
213
128
 
214
- ### `templates/migrations/google_rewarded_watch_sessions_initial.cjs`
129
+ ### `migrations/google_rewarded_watch_sessions_initial.cjs`
215
130
  Exports
216
131
  - None
@@ -53,13 +53,13 @@ Exports
53
53
  - `resolveFieldErrors`
54
54
  - `createValidationFailure({ error = "Validation failed.", code = "validation_failed", fieldErrors = {} } = {})`
55
55
 
56
- ### `src/server/providers/HttpClientRuntimeServiceProvider.js`
56
+ ### `src/server/providers/HttpClientProvider.js`
57
57
  Exports
58
- - `HttpClientRuntimeServiceProvider`
58
+ - `HttpClientProvider`
59
59
 
60
- ### `src/server/providers/HttpValidatorsServiceProvider.js`
60
+ ### `src/server/providers/HttpValidatorsProvider.js`
61
61
  Exports
62
- - `HttpValidatorsServiceProvider`
62
+ - `HttpValidatorsProvider`
63
63
 
64
64
  ### `src/shared/clientRuntime/client.js`
65
65
  Exports
@@ -193,10 +193,6 @@ Exports
193
193
  - `createJsonApiResourceRouteTransport`
194
194
  - `createJsonApiResourceRouteContract`
195
195
 
196
- ### `src/shared/providers/singletonApiProvider.js`
197
- Exports
198
- - `SingletonApiProvider`
199
-
200
196
  ### `src/shared/support/fieldErrors.js`
201
197
  Exports
202
198
  - `isRecord`