@jskit-ai/agent-docs 0.1.131 → 0.1.133
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/guide/agent/app-extras/assistant.md +29 -605
- package/guide/agent/app-extras/mobile-capacitor.md +29 -362
- package/guide/agent/app-extras/realtime.md +29 -277
- package/guide/agent/app-setup/a-more-interesting-shell.md +44 -815
- package/guide/agent/app-setup/authentication.md +43 -1073
- package/guide/agent/app-setup/console.md +26 -298
- package/guide/agent/app-setup/database-layer.md +110 -790
- package/guide/agent/app-setup/existing-application-migration.md +273 -0
- package/guide/agent/app-setup/initial-scaffolding.md +50 -784
- package/guide/agent/app-setup/multi-homing.md +39 -712
- package/guide/agent/app-setup/quickstart.md +43 -179
- package/guide/agent/app-setup/users.md +34 -353
- package/guide/agent/index.md +17 -23
- package/package.json +2 -2
- package/patterns/INDEX.md +7 -7
- package/patterns/child-cruds.md +3 -3
- package/patterns/client-requests.md +6 -6
- package/patterns/crud-authoring.md +94 -0
- package/patterns/crud-links.md +1 -1
- package/patterns/feature-package/PATTERN.md +108 -0
- package/patterns/feature-package/example/booking-engine/package.json +48 -0
- package/patterns/feature-package/example/booking-engine/src/server/BookingEngineProvider.js +33 -0
- package/patterns/feature-package/example/booking-engine/src/server/actions.js +26 -0
- package/patterns/feature-package/example/booking-engine/src/server/inputSchemas.js +19 -0
- package/patterns/feature-package/example/variations/AvailabilityEngineProvider.js +31 -0
- package/patterns/feature-package/example/variations/InvoiceRollupProvider.js +36 -0
- package/patterns/feature-package/example/variations/customKnexRepository.js +34 -0
- package/patterns/feature-package/example/variations/orchestratorService.js +23 -0
- package/patterns/filters.md +8 -8
- package/patterns/live-actions.md +5 -18
- package/patterns/minimal-foundation/PATTERN.md +98 -0
- package/patterns/minimal-foundation/example/.nvmrc +1 -0
- package/patterns/minimal-foundation/example/AGENTS.md +17 -0
- package/patterns/minimal-foundation/example/Procfile +2 -0
- package/patterns/minimal-foundation/example/app.json +14 -0
- package/patterns/minimal-foundation/example/bin/develop.js +71 -0
- package/patterns/minimal-foundation/example/bin/server.js +8 -0
- package/patterns/minimal-foundation/example/config/public.js +40 -0
- package/patterns/minimal-foundation/example/config/server.js +1 -0
- package/patterns/minimal-foundation/example/config/surfaceAccessPolicies.js +3 -0
- package/patterns/minimal-foundation/example/eslint.config.mjs +19 -0
- package/patterns/minimal-foundation/example/favicon.svg +7 -0
- package/patterns/minimal-foundation/example/gitignore +9 -0
- package/patterns/minimal-foundation/example/index.html +13 -0
- package/patterns/minimal-foundation/example/jsconfig.json +8 -0
- package/patterns/minimal-foundation/example/package.json +57 -0
- package/patterns/minimal-foundation/example/packages/main/package.json +42 -0
- package/patterns/minimal-foundation/example/packages/main/src/shared/index.js +10 -0
- package/patterns/minimal-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
- package/patterns/minimal-foundation/example/playwright.config.mjs +31 -0
- package/patterns/minimal-foundation/example/server/lib/runtimeEnv.js +45 -0
- package/patterns/minimal-foundation/example/server/lib/surfaceRuntime.js +10 -0
- package/patterns/minimal-foundation/example/server.js +195 -0
- package/patterns/minimal-foundation/example/src/App.vue +13 -0
- package/patterns/minimal-foundation/example/src/main.js +85 -0
- package/patterns/minimal-foundation/example/src/pages/home/index.vue +48 -0
- package/patterns/minimal-foundation/example/src/pages/home.vue +13 -0
- package/patterns/minimal-foundation/example/src/views/NotFound.vue +13 -0
- package/patterns/minimal-foundation/example/tests/client/smoke.vitest.js +7 -0
- package/patterns/minimal-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
- package/patterns/minimal-foundation/example/tests/server/smoke.test.js +16 -0
- package/patterns/minimal-foundation/example/vite.config.mjs +81 -0
- package/patterns/page-scaffolding.md +20 -17
- package/patterns/placements.md +17 -15
- package/patterns/row-policies.md +4 -5
- package/patterns/server-search.md +3 -3
- package/patterns/shell-foundation/PATTERN.md +104 -0
- package/patterns/shell-foundation/example/.nvmrc +1 -0
- package/patterns/shell-foundation/example/AGENTS.md +17 -0
- package/patterns/shell-foundation/example/Procfile +2 -0
- package/patterns/shell-foundation/example/app.json +14 -0
- package/patterns/shell-foundation/example/bin/develop.js +71 -0
- package/patterns/shell-foundation/example/bin/server.js +8 -0
- package/patterns/shell-foundation/example/config/public.js +40 -0
- package/patterns/shell-foundation/example/config/server.js +1 -0
- package/patterns/shell-foundation/example/config/surfaceAccessPolicies.js +3 -0
- package/patterns/shell-foundation/example/eslint.config.mjs +19 -0
- package/patterns/shell-foundation/example/favicon.svg +7 -0
- package/patterns/shell-foundation/example/gitignore +9 -0
- package/patterns/shell-foundation/example/index.html +13 -0
- package/patterns/shell-foundation/example/jsconfig.json +8 -0
- package/patterns/shell-foundation/example/package.json +59 -0
- package/patterns/shell-foundation/example/packages/main/package.json +56 -0
- package/patterns/shell-foundation/example/packages/main/src/client/index.js +9 -0
- package/patterns/shell-foundation/example/packages/main/src/client/providers/MainClientProvider.js +18 -0
- package/patterns/shell-foundation/example/packages/main/src/shared/index.js +10 -0
- package/patterns/shell-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
- package/patterns/shell-foundation/example/playwright.config.mjs +31 -0
- package/patterns/shell-foundation/example/server/lib/runtimeEnv.js +45 -0
- package/patterns/shell-foundation/example/server/lib/surfaceRuntime.js +10 -0
- package/patterns/shell-foundation/example/server.js +195 -0
- package/patterns/shell-foundation/example/src/App.vue +11 -0
- package/patterns/shell-foundation/example/src/components/ShellLayout.vue +12 -0
- package/patterns/shell-foundation/example/src/components/menus/MenuLinkItem.vue +30 -0
- package/patterns/shell-foundation/example/src/components/menus/SurfaceAwareMenuLinkItem.vue +42 -0
- package/patterns/shell-foundation/example/src/components/menus/TabLinkItem.vue +42 -0
- package/patterns/shell-foundation/example/src/error.js +19 -0
- package/patterns/shell-foundation/example/src/main.js +85 -0
- package/patterns/shell-foundation/example/src/pages/home/index.vue +116 -0
- package/patterns/shell-foundation/example/src/pages/home/settings/general/index.vue +40 -0
- package/patterns/shell-foundation/example/src/pages/home/settings/index.vue +7 -0
- package/patterns/shell-foundation/example/src/pages/home/settings.vue +109 -0
- package/patterns/shell-foundation/example/src/pages/home.vue +20 -0
- package/patterns/shell-foundation/example/src/placement.js +56 -0
- package/patterns/shell-foundation/example/src/placementTopology.js +149 -0
- package/patterns/shell-foundation/example/src/views/NotFound.vue +13 -0
- package/patterns/shell-foundation/example/tests/client/smoke.vitest.js +7 -0
- package/patterns/shell-foundation/example/tests/e2e/adaptive-shell.spec.ts +10 -0
- package/patterns/shell-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
- package/patterns/shell-foundation/example/tests/server/smoke.test.js +16 -0
- package/patterns/shell-foundation/example/vite.config.mjs +81 -0
- package/patterns/ui-contract.md +56 -0
- package/patterns/ui-testing.md +10 -12
- package/reference/autogen/KERNEL_MAP.md +29 -107
- package/reference/autogen/PATTERN_INDEX.md +230 -0
- package/reference/autogen/README.md +4 -8
- package/reference/autogen/packages/agent-docs.md +259 -0
- package/reference/autogen/packages/assistant-core.md +3 -3
- package/reference/autogen/packages/assistant-runtime.md +32 -17
- package/reference/autogen/packages/auth-core.md +31 -33
- package/reference/autogen/packages/auth-provider-local-core.md +4 -12
- package/reference/autogen/packages/auth-provider-local-db-core.md +4 -4
- package/reference/autogen/packages/auth-provider-supabase-core.md +14 -18
- package/reference/autogen/packages/auth-web.md +42 -22
- package/reference/autogen/packages/console-core.md +8 -25
- package/reference/autogen/packages/console-web.md +5 -5
- package/reference/autogen/packages/crud-core.md +61 -17
- package/reference/autogen/packages/database-runtime-mysql.md +12 -2
- package/reference/autogen/packages/database-runtime-postgres.md +12 -2
- package/reference/autogen/packages/database-runtime.md +26 -25
- package/reference/autogen/packages/google-rewarded-core.md +19 -104
- package/reference/autogen/packages/http-runtime.md +4 -8
- package/reference/autogen/packages/http-web.md +32 -0
- package/reference/autogen/packages/json-rest-api-core.md +4 -6
- package/reference/autogen/packages/kernel.md +109 -390
- package/reference/autogen/packages/mobile-capacitor.md +2 -13
- package/reference/autogen/packages/realtime.md +29 -26
- package/reference/autogen/packages/resource-crud-core.md +6 -0
- package/reference/autogen/packages/shell-web.md +69 -54
- package/reference/autogen/packages/storage-runtime.md +3 -3
- package/reference/autogen/packages/uploads-image-web.md +0 -1
- package/reference/autogen/packages/uploads-runtime.md +3 -3
- package/reference/autogen/packages/users-core.md +45 -90
- package/reference/autogen/packages/users-web.md +5 -7
- package/reference/autogen/packages/workspaces-core.md +53 -74
- package/reference/autogen/packages/workspaces-web.md +15 -16
- package/reference/autogen/tooling/jskit-catalog.md +34 -0
- package/reference/autogen/tooling/testUtils.md +4 -4
- package/skills/jskit/SKILL.md +38 -31
- package/skills/jskit/references/app-operations.md +68 -53
- package/skills/jskit/references/crud-operations.md +58 -106
- package/skills/jskit/references/material-3.md +1 -1
- package/skills/jskit/references/ui-operations.md +41 -44
- package/templates/app/AGENTS.md +7 -3
- package/guide/agent/app-setup/upgrade-beta-1-to-final.md +0 -252
- package/guide/agent/app-setup/working-with-the-jskit-cli.md +0 -325
- package/guide/agent/generators/advanced-cruds.md +0 -1935
- package/guide/agent/generators/crud-generators.md +0 -948
- package/guide/agent/generators/intro.md +0 -65
- package/guide/agent/generators/row-policies.md +0 -537
- package/guide/agent/generators/ui-generators.md +0 -690
- package/patterns/crud-scaffolding.md +0 -198
- package/patterns/generated-ui-contract-tracking.md +0 -66
- package/reference/autogen/packages/assistant.md +0 -68
- package/reference/autogen/packages/crud-server-generator.md +0 -215
- package/reference/autogen/packages/crud-ui-generator.md +0 -192
- package/reference/autogen/packages/feature-server-generator.md +0 -65
- package/reference/autogen/packages/ui-generator.md +0 -127
- package/reference/autogen/tooling/create-app.md +0 -317
- package/reference/autogen/tooling/jskit-cli.md +0 -933
- package/reference/autogen/tooling/test-support.md +0 -27
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/upgrade-beta-1-to-final.md`. Do not edit manually. -->
|
|
2
|
-
|
|
3
|
-
# Upgrade guide from Beta 1 to Final Release
|
|
4
|
-
|
|
5
|
-
> Temporary migration guide. Delete this page after every maintained application has upgraded to the Final Release package model.
|
|
6
|
-
|
|
7
|
-
This is a one-way upgrade. Final Release does not read, translate, or preserve Beta 1 JSKIT state.
|
|
8
|
-
|
|
9
|
-
## 1. Start from a clean commit
|
|
10
|
-
|
|
11
|
-
Commit or stash application work. Record the current database migration status and make a normal database backup before changing packages.
|
|
12
|
-
|
|
13
|
-
Do not run a Final Release JSKIT command until the package manifests have been converted.
|
|
14
|
-
|
|
15
|
-
## 2. Move package metadata into package.json
|
|
16
|
-
|
|
17
|
-
For every JSKIT package, move the exported metadata from `package.descriptor.mjs` into the package's top-level `jskit` object.
|
|
18
|
-
|
|
19
|
-
Keep identity in standard npm fields:
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{
|
|
23
|
-
"name": "@acme/example-core",
|
|
24
|
-
"version": "1.2.3",
|
|
25
|
-
"description": "Example runtime package.",
|
|
26
|
-
"jskit": {
|
|
27
|
-
"kind": "runtime",
|
|
28
|
-
"capabilities": {
|
|
29
|
-
"provides": [],
|
|
30
|
-
"requires": []
|
|
31
|
-
},
|
|
32
|
-
"runtime": {
|
|
33
|
-
"server": { "providers": [] },
|
|
34
|
-
"client": { "providers": [] }
|
|
35
|
-
},
|
|
36
|
-
"mutations": {
|
|
37
|
-
"dependencies": { "runtime": {}, "dev": {} },
|
|
38
|
-
"files": []
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Remove `packageId`, `version`, and `description` from the moved object. Delete every `package.descriptor.mjs` after its data is represented in `package.json`.
|
|
45
|
-
|
|
46
|
-
## 3. Use npm dependencies for package relationships
|
|
47
|
-
|
|
48
|
-
Move every package relationship from `jskit.dependsOn` to the appropriate standard npm field:
|
|
49
|
-
|
|
50
|
-
- `dependencies` for required runtime packages;
|
|
51
|
-
- `optionalDependencies` for optional runtime integrations;
|
|
52
|
-
- `peerDependencies` for host-provided libraries;
|
|
53
|
-
- `devDependencies` for build and generator tooling.
|
|
54
|
-
|
|
55
|
-
Pin `@jskit-ai/*` packages to exact versions. Remove `jskit.dependsOn` completely.
|
|
56
|
-
|
|
57
|
-
Rename provider-class `static dependsOn` to `static startsAfter`, then audit every entry. Keep only providers whose registration or boot must complete before the declaring provider reaches the same phase. JSKIT completes registration for the entire graph before beginning any boot method, so a lazily consumed service does not justify an ordering edge.
|
|
58
|
-
|
|
59
|
-
## 4. Remove Beta 1 project state
|
|
60
|
-
|
|
61
|
-
Delete these paths from the application:
|
|
62
|
-
|
|
63
|
-
```text
|
|
64
|
-
.jskit/lock.json
|
|
65
|
-
.jskit/verification/
|
|
66
|
-
.jskit/vite.dev.proxy.json
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Remove ignore rules created solely for `.jskit/verification/`.
|
|
70
|
-
|
|
71
|
-
Do not translate these paths into replacements. Final Release derives package state from `package.json`, `package-lock.json`, installed package manifests, application config, migration files, and generated CI.
|
|
72
|
-
|
|
73
|
-
Delete the app-local Vite proxy loader and any `vite.shared.mjs` file used only for that generated JSON. Pass the application's API target to the standard plugin instead:
|
|
74
|
-
|
|
75
|
-
```js
|
|
76
|
-
createJskitClientBootstrapPlugin({
|
|
77
|
-
proxyTarget: apiProxyTarget
|
|
78
|
-
})
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Installed packages now declare development proxies in `package.json.jskit.vite.proxy`, and the plugin derives the active proxy table directly whenever Vite starts.
|
|
82
|
-
|
|
83
|
-
## 5. Replace command usage
|
|
84
|
-
|
|
85
|
-
Update scripts, workflow files, runbooks, and automation:
|
|
86
|
-
|
|
87
|
-
| Beta 1 | Final Release |
|
|
88
|
-
| --- | --- |
|
|
89
|
-
| `jskit package migrations ...` | `jskit migrations sync` |
|
|
90
|
-
| `jskit app sync-ci` | `jskit ci generate` |
|
|
91
|
-
| CI drift validation through `doctor` alone | `jskit migrations sync --check` and `jskit ci generate --check` |
|
|
92
|
-
| `jskit update package ...` | update npm versions explicitly or run `jskit app update-packages` |
|
|
93
|
-
| `jskit position element ...` | edit application-owned placements directly |
|
|
94
|
-
| `jskit app verify-ui ...` | run the application's Playwright command directly |
|
|
95
|
-
|
|
96
|
-
Delete automation for package adoption, source-mutation migration, managed-script adoption, UI receipts, or package replay. Final Release has no corresponding commands.
|
|
97
|
-
|
|
98
|
-
## 6. Install the coordinated Final Release
|
|
99
|
-
|
|
100
|
-
Update every direct `@jskit-ai/*` dependency in the root application and npm workspaces to the coordinated Final Release versions, then install from scratch with the application's normal npm workflow:
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
npm install
|
|
104
|
-
npm ls
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Resolve npm peer or capability errors as package-graph errors. Do not add overrides that mix Beta 1 and Final Release packages.
|
|
108
|
-
|
|
109
|
-
## 7. Move neutral web operations out of users-web
|
|
110
|
-
|
|
111
|
-
Final Release owns browser request, command, list, view, add/edit, permission,
|
|
112
|
-
paging, and generated CRUD UI APIs in `@jskit-ai/http-web`. There are no
|
|
113
|
-
`users-web` compatibility exports.
|
|
114
|
-
|
|
115
|
-
Add the coordinated `@jskit-ai/http-web` version to every application or
|
|
116
|
-
workspace that uses these APIs. Keep `@jskit-ai/users-web` only where the code
|
|
117
|
-
actually uses account, profile, or user-specific shell UI.
|
|
118
|
-
|
|
119
|
-
Update imports as follows:
|
|
120
|
-
|
|
121
|
-
| Beta 1 import or API | Final Release import or API |
|
|
122
|
-
| --- | --- |
|
|
123
|
-
| `@jskit-ai/users-web/client/composables/useCommand` | `@jskit-ai/http-web/client/composables/useCommand` |
|
|
124
|
-
| `@jskit-ai/users-web/client/composables/useEndpointResource` | `@jskit-ai/http-web/client/composables/useEndpointResource` |
|
|
125
|
-
| `@jskit-ai/users-web/client/composables/useList` | `@jskit-ai/http-web/client/composables/useList` |
|
|
126
|
-
| `@jskit-ai/users-web/client/composables/useView` | `@jskit-ai/http-web/client/composables/useView` |
|
|
127
|
-
| `@jskit-ai/users-web/client/composables/useAddEdit` | `@jskit-ai/http-web/client/composables/useAddEdit` |
|
|
128
|
-
| `@jskit-ai/users-web/client/composables/useAccess` | `@jskit-ai/http-web/client/composables/useAccess` |
|
|
129
|
-
| `@jskit-ai/users-web/client/composables/usePagedCollection` | `@jskit-ai/http-web/client/composables/usePagedCollection` |
|
|
130
|
-
| `@jskit-ai/users-web/client/composables/useRealtimeQueryInvalidation` | `@jskit-ai/http-web/client/composables/useRealtimeQueryInvalidation` |
|
|
131
|
-
| `@jskit-ai/users-web/client/composables/runtime/useUiFeedback` | `@jskit-ai/http-web/client/composables/useUiFeedback` |
|
|
132
|
-
| `@jskit-ai/users-web/client/composables/useCrud*` | `@jskit-ai/http-web/client/composables/useCrud*` |
|
|
133
|
-
| `@jskit-ai/users-web/client/components/Crud*` | `@jskit-ai/http-web/client/components/Crud*` |
|
|
134
|
-
| `@jskit-ai/users-web/client/filters` | `@jskit-ai/http-web/client/filters` |
|
|
135
|
-
| `@jskit-ai/users-web/client/bulkActions` | `@jskit-ai/http-web/client/bulkActions` |
|
|
136
|
-
| `@jskit-ai/users-web/client/rowActions` | `@jskit-ai/http-web/client/rowActions` |
|
|
137
|
-
| `@jskit-ai/users-web/client/lib/permissions` | `@jskit-ai/http-web/client/lib/permissions` |
|
|
138
|
-
| `@jskit-ai/users-web/client/support/contractGuards` | `@jskit-ai/http-web/client/support/contractGuards` |
|
|
139
|
-
| `configureUsersWebHttpClient(...)` | `configureHttpWebClient(...)` from `@jskit-ai/http-web/client/lib/httpClient` |
|
|
140
|
-
| `usersWebHttpClient` | `httpWebClient` from `@jskit-ai/http-web/client/lib/httpClient` |
|
|
141
|
-
|
|
142
|
-
Search every application workspace, generated route tree, test fixture, and
|
|
143
|
-
app bootstrap. An application that leaves even one removed import will fail at
|
|
144
|
-
module resolution; this is intentional because Final Release contains no
|
|
145
|
-
forwarding bridge.
|
|
146
|
-
|
|
147
|
-
`crud-ui-generator` now installs `@jskit-ai/http-web`. `ui-generator` installs
|
|
148
|
-
no users product. Existing generated files are application-owned, so update
|
|
149
|
-
their imports directly or deliberately regenerate them and review the diff.
|
|
150
|
-
|
|
151
|
-
After all imports are updated, remove `@jskit-ai/users-web` from any workspace
|
|
152
|
-
that used it only for neutral client APIs. This prevents those applications
|
|
153
|
-
from activating users, authentication, uploads, storage, or database
|
|
154
|
-
capabilities accidentally.
|
|
155
|
-
|
|
156
|
-
## 8. Use the separated CRUD package boundaries
|
|
157
|
-
|
|
158
|
-
Final Release separates shared resource contracts, browser CRUD, and
|
|
159
|
-
database-backed CRUD:
|
|
160
|
-
|
|
161
|
-
- `@jskit-ai/resource-crud-core` owns environment-neutral CRUD resource,
|
|
162
|
-
field, lookup, namespace, and list-filter contracts;
|
|
163
|
-
- `@jskit-ai/http-web` owns browser request runtimes and generated CRUD UI;
|
|
164
|
-
- `@jskit-ai/crud-core` owns database-backed server CRUD services and
|
|
165
|
-
repositories.
|
|
166
|
-
|
|
167
|
-
Update shared-contract imports as follows:
|
|
168
|
-
|
|
169
|
-
| Beta 1 import | Final Release import |
|
|
170
|
-
| --- | --- |
|
|
171
|
-
| `@jskit-ai/kernel/shared/support/crudFieldContract` | `@jskit-ai/resource-crud-core/shared/crudFieldContract` |
|
|
172
|
-
| `@jskit-ai/kernel/shared/support/crudLookup` | `@jskit-ai/resource-crud-core/shared/crudLookup` |
|
|
173
|
-
| `@jskit-ai/kernel/shared/support/crudListFilters` | `@jskit-ai/resource-crud-core/shared/crudListFilters` |
|
|
174
|
-
| `@jskit-ai/crud-core/shared/crudResource` | `@jskit-ai/resource-crud-core/shared/crudResource` |
|
|
175
|
-
| `@jskit-ai/crud-core/shared/crudNamespaceSupport` | `@jskit-ai/resource-crud-core/shared/crudNamespaceSupport` |
|
|
176
|
-
| `checkCrudLookupFormControl` from `@jskit-ai/crud-core/shared/crudFieldSupport` | `checkCrudLookupFormControl` from `@jskit-ai/resource-crud-core/shared/crudFieldContract` |
|
|
177
|
-
| `isCrudRuntimeOutputOnlyFieldKey` from `@jskit-ai/crud-core/shared/crudFieldSupport` | `isCrudRuntimeOutputOnlyFieldKey` from `@jskit-ai/resource-crud-core/shared/crudLookup` |
|
|
178
|
-
|
|
179
|
-
There is no `@jskit-ai/crud-core/client` surface. Replace browser imports from
|
|
180
|
-
that surface with the corresponding `@jskit-ai/http-web` API. Add
|
|
181
|
-
`@jskit-ai/resource-crud-core` directly wherever application code imports its
|
|
182
|
-
contracts. Remove `@jskit-ai/crud-core` from client-only and generator-only
|
|
183
|
-
workspaces; retain it only where database-backed server CRUD is used.
|
|
184
|
-
|
|
185
|
-
The current CRUD UI templates import `@jskit-ai/http-web`, and the CRUD UI
|
|
186
|
-
generator no longer installs the server CRUD runtime. Existing generated files
|
|
187
|
-
are application-owned, so update their imports directly or deliberately
|
|
188
|
-
regenerate them and review the diff.
|
|
189
|
-
|
|
190
|
-
If application tests or package tooling refer to workspaces-web mutation IDs,
|
|
191
|
-
rename the `users-web-*` prefix on workspaces-web-owned mutations to
|
|
192
|
-
`workspaces-web-*`. Package-internal `UsersWorkspace*` component paths are not
|
|
193
|
-
public APIs; remove any direct imports and use the exported workspaces-web
|
|
194
|
-
provider surface.
|
|
195
|
-
|
|
196
|
-
If application code imported repository persistence helpers from
|
|
197
|
-
`@jskit-ai/assistant-core/server`, keep those helpers with the repository that
|
|
198
|
-
uses them or use the matching database-runtime primitive. Assistant core no
|
|
199
|
-
longer owns database persistence utilities.
|
|
200
|
-
|
|
201
|
-
## 9. Generate deterministic projections
|
|
202
|
-
|
|
203
|
-
Synchronize package migration files without applying them:
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
npx jskit migrations sync
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Review the migration diff. Existing Knex migration files and migration-table history remain intact.
|
|
210
|
-
|
|
211
|
-
Runtime-package migration mutations must be deterministic without install
|
|
212
|
-
options. Convert an option-parameterized runtime migration into a generator
|
|
213
|
-
mutation, or materialize it as a fixed app-local package migration before the
|
|
214
|
-
upgrade.
|
|
215
|
-
|
|
216
|
-
Generate the JSKIT CI workflow:
|
|
217
|
-
|
|
218
|
-
```bash
|
|
219
|
-
npx jskit ci generate
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
Move application-specific CI into separate workflow files. The generated JSKIT workflow is replaced in full whenever this command runs.
|
|
223
|
-
|
|
224
|
-
## 10. Verify the application
|
|
225
|
-
|
|
226
|
-
```bash
|
|
227
|
-
npx jskit lint-packages
|
|
228
|
-
npx jskit doctor
|
|
229
|
-
npx jskit migrations sync --check
|
|
230
|
-
npx jskit ci generate --check
|
|
231
|
-
npm run verify
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
Run the application's Playwright suite directly for UI changes.
|
|
235
|
-
|
|
236
|
-
Apply database migrations only after reviewing the synchronized files:
|
|
237
|
-
|
|
238
|
-
```bash
|
|
239
|
-
npm run db:migrate
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
Commit package manifests, `package-lock.json`, synchronized migrations, generated CI, and required application changes together.
|
|
243
|
-
|
|
244
|
-
## 11. Update strict resource boundaries
|
|
245
|
-
|
|
246
|
-
Applications that pass JavaScript `Date` objects into resource validation must convert them to strings. `date` uses `YYYY-MM-DD`; `time` uses offset-free `HH:MM[:SS[.fraction]]`; and `dateTime` uses RFC 3339 with seconds and a `Z` or numeric offset. Select `epochMilliseconds` or `epochSeconds` explicitly for numeric epochs and preserve `temporalPrecision`.
|
|
247
|
-
|
|
248
|
-
Generated generic CRUD repositories serialize supported database temporal output. Custom repositories must return strict temporal strings and write ISO/RFC 3339 strings themselves.
|
|
249
|
-
|
|
250
|
-
For a generated view that needs delete confirmation, rerun its `crud-ui-generator crud` command with `--delete-confirmation`. Use `--force` only when replacing generated page output deliberately. For a customized view, preserve the customization and add the public `CrudViewScreen` `actions` slot, `CrudDeleteAction`, and `useCrudDeleteAction()` integration.
|
|
251
|
-
|
|
252
|
-
Review the complete application diff and run its full verification suite before applying database migrations.
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/working-with-the-jskit-cli.md`. Do not edit manually. -->
|
|
2
|
-
|
|
3
|
-
# Working with the JSKIT CLI
|
|
4
|
-
|
|
5
|
-
JSKIT uses normal npm state. `package.json` declares dependencies, `package-lock.json` fixes the installed graph, and each package publishes its JSKIT metadata in `package.json.jskit`.
|
|
6
|
-
|
|
7
|
-
The CLI has four jobs:
|
|
8
|
-
|
|
9
|
-
1. install packages and collect missing configuration;
|
|
10
|
-
2. run generators;
|
|
11
|
-
3. synchronize immutable migration files;
|
|
12
|
-
4. generate the JSKIT CI workflow.
|
|
13
|
-
|
|
14
|
-
Application source belongs to the application. Git records changes to it. JSKIT does not maintain a second project-state ledger.
|
|
15
|
-
|
|
16
|
-
## Package metadata
|
|
17
|
-
|
|
18
|
-
A JSKIT package is an ordinary npm package with a `jskit` object in `package.json`:
|
|
19
|
-
|
|
20
|
-
```json
|
|
21
|
-
{
|
|
22
|
-
"name": "@acme/example-core",
|
|
23
|
-
"version": "1.2.3",
|
|
24
|
-
"type": "module",
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@jskit-ai/kernel": "0.1.148"
|
|
27
|
-
},
|
|
28
|
-
"jskit": {
|
|
29
|
-
"kind": "runtime",
|
|
30
|
-
"capabilities": {
|
|
31
|
-
"provides": ["example.core"],
|
|
32
|
-
"requires": []
|
|
33
|
-
},
|
|
34
|
-
"options": {},
|
|
35
|
-
"runtime": {
|
|
36
|
-
"server": {
|
|
37
|
-
"providers": []
|
|
38
|
-
},
|
|
39
|
-
"client": {
|
|
40
|
-
"providers": []
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"vite": {
|
|
44
|
-
"proxy": {}
|
|
45
|
-
},
|
|
46
|
-
"mutations": {
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"runtime": {},
|
|
49
|
-
"dev": {}
|
|
50
|
-
},
|
|
51
|
-
"packageJson": {
|
|
52
|
-
"scripts": {}
|
|
53
|
-
},
|
|
54
|
-
"files": [],
|
|
55
|
-
"text": [],
|
|
56
|
-
"source": []
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Package identity, version, description, exports, npm dependencies, peer dependencies, and optional dependencies stay in their standard `package.json` fields. Do not repeat npm dependencies in a JSKIT-specific dependency graph.
|
|
63
|
-
|
|
64
|
-
`jskit.mutations.dependencies` has a narrower job: it adds direct dependencies
|
|
65
|
-
needed by generated application-owned source or application-level tooling. It
|
|
66
|
-
does not declare relationships between JSKIT packages and does not affect
|
|
67
|
-
package ordering.
|
|
68
|
-
|
|
69
|
-
`runtime.server.providers` and `runtime.client.providers` declare runtime entrypoints. A provider class may use `static startsAfter` when its own registration or boot genuinely requires another provider to have completed the same lifecycle phase first. JSKIT registers every provider before booting any provider, so later service consumption does not require an ordering declaration.
|
|
70
|
-
|
|
71
|
-
`jskit.vite.proxy` declares development proxy requirements as path-keyed metadata. `createJskitClientBootstrapPlugin({ proxyTarget })` reads those declarations directly from the installed npm graph when Vite starts. Package installation does not generate an intermediate proxy file.
|
|
72
|
-
|
|
73
|
-
Use exact versions for `@jskit-ai/*` dependencies. npm's `package-lock.json` remains the reproducible installation record.
|
|
74
|
-
|
|
75
|
-
## Install a package
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
npx jskit add package shell-web
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Short JSKIT ids resolve to their `@jskit-ai/*` package ids. A full package id also works:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
npx jskit add package @jskit-ai/shell-web
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
The command:
|
|
88
|
-
|
|
89
|
-
1. resolves the requested package;
|
|
90
|
-
2. computes the resulting npm package graph and validates capabilities and CI contributions;
|
|
91
|
-
3. collects missing configuration for installed runtime packages in dependency order;
|
|
92
|
-
4. asks for the requested package last;
|
|
93
|
-
5. writes an exact direct dependency and runs `npm install` when needed;
|
|
94
|
-
6. applies the requested package's initial app mutations;
|
|
95
|
-
7. synchronizes package migrations;
|
|
96
|
-
8. regenerates the JSKIT CI workflow.
|
|
97
|
-
|
|
98
|
-
Validation happens before application files or migrations are changed. A CI contribution conflict or incomplete capability graph stops the install.
|
|
99
|
-
|
|
100
|
-
Use `--dry-run` to inspect a supported install without writing, and `--json` when another tool needs structured output.
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
npx jskit add package database-runtime-mysql --dry-run
|
|
104
|
-
npx jskit add package database-runtime-mysql --json
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
## Configuration prompts
|
|
108
|
-
|
|
109
|
-
`jskit add` scans installed runtime packages for declared options. Packages with unresolved required configuration are prompted dependency-first. The requested package is prompted last.
|
|
110
|
-
|
|
111
|
-
This means a partially configured app can recover during the next normal package addition. Configuration discovery comes from:
|
|
112
|
-
|
|
113
|
-
- the installed npm dependency graph;
|
|
114
|
-
- each installed package's `package.json.jskit.options`;
|
|
115
|
-
- current application config and environment values.
|
|
116
|
-
|
|
117
|
-
Sensitive values can be written through the package's declared environment mutation. They are not stored in JSKIT project state.
|
|
118
|
-
|
|
119
|
-
For automation, pass package options inline:
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
npx jskit add package database-runtime-mysql \
|
|
123
|
-
--db-host database \
|
|
124
|
-
--db-port 3306 \
|
|
125
|
-
--db-name app \
|
|
126
|
-
--db-user app \
|
|
127
|
-
--db-password "$DB_PASSWORD"
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Third-party packages
|
|
131
|
-
|
|
132
|
-
Third-party authors publish an ordinary npm package containing `package.json.jskit`. No JSKIT registration step is required.
|
|
133
|
-
|
|
134
|
-
Install it at an exact version, then target it by its npm id:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
npm install --save-exact @acme/example-core@1.2.3
|
|
138
|
-
npx jskit add package @acme/example-core
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
The CLI reads the installed package manifest and its package files directly. Package templates referenced by `jskit.mutations.files` must be included in the npm package's `files` allowlist.
|
|
142
|
-
|
|
143
|
-
If an ecosystem package should support a short id or appear in the built-in JSKIT list, it can additionally be included in the JSKIT catalog. That is discovery metadata for the built-in distribution, not a requirement for package execution.
|
|
144
|
-
|
|
145
|
-
## Bundles
|
|
146
|
-
|
|
147
|
-
A bundle selects two or more runtime packages for one installation:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
npx jskit add bundle auth-local
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Bundle definitions contain package ids only. npm dependencies still define package dependency relationships. Configuration follows the same dependency-first order, with the explicitly requested packages last.
|
|
154
|
-
|
|
155
|
-
## Generators
|
|
156
|
-
|
|
157
|
-
List and inspect generators:
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
npx jskit list generators
|
|
161
|
-
npx jskit show package crud-server-generator
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
Run a generator:
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
npx jskit generate crud-server-generator scaffold contacts \
|
|
168
|
-
--surface app \
|
|
169
|
-
--grant-policy workspace_member
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
Generator packages are development dependencies. Their transitive dependencies are tooling dependencies and are not activated as application runtime packages.
|
|
173
|
-
|
|
174
|
-
Generated source belongs to the application immediately. Edit it normally and review it in Git.
|
|
175
|
-
|
|
176
|
-
## App-local packages
|
|
177
|
-
|
|
178
|
-
Create a local package:
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
npx jskit create package contacts
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
This creates `packages/contacts/package.json` with a `jskit` object and adds an exact `file:` dependency to the application.
|
|
185
|
-
|
|
186
|
-
The package can use standard npm dependencies and exports. Put server and client providers in `package.json.jskit.runtime`.
|
|
187
|
-
|
|
188
|
-
## Migrations
|
|
189
|
-
|
|
190
|
-
Packages declare migration templates with `install-migration` file mutations. Synchronize them into the application with:
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
npx jskit migrations sync
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Check without writing:
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
npx jskit migrations sync --check
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
Migration ids are immutable. The same package and migration id must always produce the same content. A conflict fails instead of overwriting migration history.
|
|
203
|
-
|
|
204
|
-
Runtime-package migrations are deterministic projections and cannot reference
|
|
205
|
-
install options. Use a generator when a migration must be parameterized for a
|
|
206
|
-
specific generated feature.
|
|
207
|
-
|
|
208
|
-
Synchronization changes files only. Apply database migrations separately:
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
npm run db:migrate
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Create an app-owned package migration with:
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
npx jskit create migration \
|
|
218
|
-
--package @local/contacts \
|
|
219
|
-
--id add-contact-status
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
Implement the package template, run `npx jskit migrations sync`, review the generated migration, and then run the database migration command.
|
|
223
|
-
|
|
224
|
-
## CI generation
|
|
225
|
-
|
|
226
|
-
Generate the JSKIT verification workflow:
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
npx jskit ci generate
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
Check it without writing:
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
npx jskit ci generate --check
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
This command fully generates one file:
|
|
239
|
-
|
|
240
|
-
```text
|
|
241
|
-
.github/workflows/jskit-verify.yml
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
Do not edit that file. Put application-specific CI jobs in separate, application-owned workflow files.
|
|
245
|
-
|
|
246
|
-
Packages contribute CI environment values, services, and pre-verification steps through `package.json.jskit.ci`. Conflicting contributions fail with the contributing package ids.
|
|
247
|
-
|
|
248
|
-
## Update JSKIT packages
|
|
249
|
-
|
|
250
|
-
```bash
|
|
251
|
-
npm run jskit:update
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
The script runs `jskit app update-packages`. It installs current `@jskit-ai/*` packages at exact versions, aligns JSKIT references in npm workspaces, refreshes npm resolution, synchronizes migrations, and regenerates CI.
|
|
255
|
-
|
|
256
|
-
Preview registry changes with:
|
|
257
|
-
|
|
258
|
-
```bash
|
|
259
|
-
npx jskit app update-packages --dry-run
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Package updates do not regenerate application source. Review upstream release notes and make application changes explicitly.
|
|
263
|
-
|
|
264
|
-
## Remove a package
|
|
265
|
-
|
|
266
|
-
```bash
|
|
267
|
-
npx jskit remove package @jskit-ai/example-core
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
The command removes the application's direct npm dependency, runs npm install, and regenerates CI. App source and database migration history are retained. Delete application-owned source only when you have reviewed its remaining consumers.
|
|
271
|
-
|
|
272
|
-
An npm-transitive package cannot be removed directly. Remove or replace the direct package that depends on it.
|
|
273
|
-
|
|
274
|
-
## Inspect and validate
|
|
275
|
-
|
|
276
|
-
Useful read-only commands:
|
|
277
|
-
|
|
278
|
-
```bash
|
|
279
|
-
npx jskit list packages
|
|
280
|
-
npx jskit list generators
|
|
281
|
-
npx jskit show package shell-web
|
|
282
|
-
npx jskit list-placements
|
|
283
|
-
npx jskit list-component-tokens
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
Validate package metadata:
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
npx jskit lint-packages
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
Validate an application:
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
npx jskit doctor
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
`doctor` checks the installed package graph, capability closure, provider declarations, migrations, generated CI, surfaces, placements, CRUD ownership, and other architecture contracts.
|
|
299
|
-
|
|
300
|
-
The normal CI sequence is:
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
npm ci
|
|
304
|
-
npx jskit migrations sync --check
|
|
305
|
-
npx jskit ci generate --check
|
|
306
|
-
npm run verify
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
## Command summary
|
|
310
|
-
|
|
311
|
-
```text
|
|
312
|
-
jskit add package <id>
|
|
313
|
-
jskit add bundle <id>
|
|
314
|
-
jskit generate <generator-id> [subcommand]
|
|
315
|
-
jskit create package <name>
|
|
316
|
-
jskit create migration --package <id> --id <migration-id>
|
|
317
|
-
jskit migrations sync [--check]
|
|
318
|
-
jskit ci generate [--check]
|
|
319
|
-
jskit remove package <id>
|
|
320
|
-
jskit app update-packages [--dry-run]
|
|
321
|
-
jskit doctor
|
|
322
|
-
jskit lint-packages
|
|
323
|
-
jskit list <packages|generators|bundles>
|
|
324
|
-
jskit show <package|bundle> <id>
|
|
325
|
-
```
|