@jskit-ai/agent-docs 0.1.3 → 0.1.5
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/DISTR_AGENT.md +11 -1
- package/guide/agent/app-extras/assistant.md +1 -1
- package/guide/agent/app-extras/realtime.md +1 -1
- package/guide/agent/app-setup/a-more-interesting-shell.md +1 -1
- package/guide/agent/app-setup/authentication.md +9 -1
- package/guide/agent/app-setup/console.md +1 -1
- package/guide/agent/app-setup/database-layer.md +1 -1
- package/guide/agent/app-setup/initial-scaffolding.md +1 -1
- package/guide/agent/app-setup/multi-homing.md +3 -1
- package/guide/agent/app-setup/users.md +1 -1
- package/guide/agent/app-setup/working-with-the-jskit-cli.md +1 -1
- package/guide/agent/generators/advanced-cruds.md +163 -1
- package/guide/agent/generators/crud-generators.md +30 -1
- package/guide/agent/generators/intro.md +1 -1
- package/guide/agent/generators/ui-generators.md +1 -1
- package/guide/agent/index.md +1 -1
- package/package.json +1 -1
- package/reference/autogen/packages/agent-docs.md +19 -1
- package/reference/autogen/packages/assistant-core.md +1 -1
- package/reference/autogen/packages/assistant-runtime.md +1 -1
- package/reference/autogen/packages/assistant.md +1 -1
- package/reference/autogen/packages/auth-core.md +1 -1
- package/reference/autogen/packages/auth-provider-supabase-core.md +1 -1
- package/reference/autogen/packages/auth-web.md +1 -1
- package/reference/autogen/packages/console-core.md +1 -1
- package/reference/autogen/packages/console-web.md +1 -1
- package/reference/autogen/packages/crud-core.md +1 -1
- package/reference/autogen/packages/crud-server-generator.md +1 -1
- package/reference/autogen/packages/crud-ui-generator.md +1 -1
- package/reference/autogen/packages/database-runtime-mysql.md +1 -1
- package/reference/autogen/packages/database-runtime-postgres.md +1 -1
- package/reference/autogen/packages/database-runtime.md +1 -1
- package/reference/autogen/packages/http-runtime.md +1 -1
- package/reference/autogen/packages/kernel.md +1 -1
- package/reference/autogen/packages/realtime.md +1 -1
- package/reference/autogen/packages/shell-web.md +1 -1
- package/reference/autogen/packages/storage-runtime.md +1 -1
- package/reference/autogen/packages/ui-generator.md +1 -1
- package/reference/autogen/packages/uploads-image-web.md +1 -1
- package/reference/autogen/packages/uploads-runtime.md +1 -1
- package/reference/autogen/packages/users-core.md +1 -1
- package/reference/autogen/packages/users-web.md +1 -1
- package/reference/autogen/packages/workspaces-core.md +1 -1
- package/reference/autogen/packages/workspaces-web.md +1 -1
- package/reference/autogen/tooling/config-eslint.md +1 -1
- package/reference/autogen/tooling/create-app.md +1 -1
- package/reference/autogen/tooling/jskit-catalog.md +1 -1
- package/reference/autogen/tooling/jskit-cli.md +1 -1
- package/reference/autogen/tooling/test-support.md +1 -1
- package/reference/autogen/tooling/testUtils.md +1 -1
- package/skills/jskit-review/SKILL.md +12 -2
- package/templates/APP_BLUEPRINT.md +9 -0
- package/templates/WORKBOARD.md +3 -3
- package/templates/app/AGENTS.md +15 -3
- package/workflow/bootstrap.md +17 -2
- package/workflow/feature-delivery.md +19 -3
- package/workflow/review.md +9 -3
- package/workflow/scoping.md +10 -1
- package/workflow/workboard.md +1 -1
- package/guide/human/app-extras/assistant.md +0 -693
- package/guide/human/app-extras/realtime.md +0 -268
- package/guide/human/app-setup/a-more-interesting-shell.md +0 -732
- package/guide/human/app-setup/authentication.md +0 -961
- package/guide/human/app-setup/console.md +0 -350
- package/guide/human/app-setup/database-layer.md +0 -820
- package/guide/human/app-setup/initial-scaffolding.md +0 -753
- package/guide/human/app-setup/multi-homing.md +0 -793
- package/guide/human/app-setup/users.md +0 -402
- package/guide/human/app-setup/working-with-the-jskit-cli.md +0 -1047
- package/guide/human/generators/advanced-cruds.md +0 -921
- package/guide/human/generators/crud-generators.md +0 -554
- package/guide/human/generators/intro.md +0 -107
- package/guide/human/generators/ui-generators.md +0 -663
- package/guide/human/index.md +0 -37
package/DISTR_AGENT.md
CHANGED
|
@@ -14,7 +14,7 @@ Use these references on demand:
|
|
|
14
14
|
- `reference/autogen/KERNEL_MAP.md`
|
|
15
15
|
- `reference/autogen/README.md`
|
|
16
16
|
- `guide/agent/index.md`
|
|
17
|
-
- `guide/
|
|
17
|
+
- `site/guide/index.md` when compressed guidance is ambiguous or missing nuance
|
|
18
18
|
- `templates/APP_BLUEPRINT.md`
|
|
19
19
|
- `templates/WORKBOARD.md`
|
|
20
20
|
- `skills/jskit-review/SKILL.md` for review passes when your Codex environment supports packaged skills
|
|
@@ -22,10 +22,20 @@ Use these references on demand:
|
|
|
22
22
|
Core rules:
|
|
23
23
|
|
|
24
24
|
- Inspect the workspace before assuming a JSKIT app exists.
|
|
25
|
+
- Before non-trivial edits, print a short visible checkpoint using this format:
|
|
26
|
+
- `Problem: ...`
|
|
27
|
+
- `Fix: ...`
|
|
28
|
+
- `Why this sticks: ...`
|
|
29
|
+
- `Not doing: ...`
|
|
30
|
+
- Keep that checkpoint compact. Do not expand it into a long preamble unless the developer asks for detail.
|
|
25
31
|
- Reuse existing JSKIT helpers and runtime seams before adding new local helpers.
|
|
26
32
|
- A freshly scaffolded JSKIT app can still be in Stage 1. If platform decisions are not settled yet, continue with the initialize workflow before adding runtime packages.
|
|
27
33
|
- Do not treat a missing `config.tenancyMode` line or an untouched minimal scaffold as a final tenancy decision.
|
|
28
34
|
- Do not install tenancy-sensitive packages until Stage 1 decisions are complete and the chosen tenancy is written into `config/public.js`.
|
|
35
|
+
- Treat standard JSKIT package-owned workflows as the default baseline once the relevant package stack is chosen. Do not ask the developer to redesign those flows unless they want overrides, restrictions, or custom additions.
|
|
36
|
+
- Example: if the app is workspace-capable and uses `workspaces-core` plus `workspaces-web`, assume the standard workspace invite flow is part of the baseline package behavior.
|
|
37
|
+
- For baseline package setup, ask plainly for the exact local development values needed for the next install step, but only for the modules or packages that are actually selected.
|
|
38
|
+
- Use the real env var names or option names instead of vague requests for "credentials". Values such as `DB_NAME`, `DB_USER`, `DB_PASSWORD`, `AUTH_SUPABASE_URL`, `AUTH_SUPABASE_PUBLISHABLE_KEY`, and `APP_PUBLIC_URL` are routine setup inputs when the relevant package stack needs them.
|
|
29
39
|
- Do not implement app features before the blueprint has the database, surfaces, ownership model, and route/screen plan written down.
|
|
30
40
|
- For substantial or multi-chunk work, create or update `.jskit/WORKBOARD.md` as the per-request execution tracker.
|
|
31
41
|
- Use the compressed guide first for speed; fall back to the human guide when a workflow trap, migration caveat, or architectural boundary needs exact wording.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-extras/assistant.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Assistant
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-extras/realtime.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Realtime
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/a-more-interesting-shell.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# A more interesting shell
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/authentication.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Authentication
|
|
4
4
|
|
|
@@ -44,6 +44,14 @@ JSKIT uses the project URL as `AUTH_SUPABASE_URL`, the publishable key as `AUTH_
|
|
|
44
44
|
|
|
45
45
|
Use the **publishable** key here, not the secret key and not a service-role key. If you later run the app on a different host or port, update both Supabase's URL settings and `APP_PUBLIC_URL` to match the real browser URL exactly.
|
|
46
46
|
|
|
47
|
+
If you are guiding someone interactively, ask plainly for these exact values:
|
|
48
|
+
|
|
49
|
+
- `AUTH_SUPABASE_URL`
|
|
50
|
+
- `AUTH_SUPABASE_PUBLISHABLE_KEY`
|
|
51
|
+
- whether `APP_PUBLIC_URL` should stay `http://localhost:5173`
|
|
52
|
+
|
|
53
|
+
Do not hide behind vague language like "send the auth credentials later." In this local guide flow, those are routine setup values for the Supabase auth install step.
|
|
54
|
+
|
|
47
55
|
## Installing the auth layer
|
|
48
56
|
|
|
49
57
|
From inside `exampleapp`, run:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/console.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Console
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/database-layer.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Database layer
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/initial-scaffolding.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Initial scaffolding
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/multi-homing.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Multi-homing
|
|
4
4
|
|
|
@@ -33,6 +33,8 @@ This chapter teaches `personal`, not `workspaces`.
|
|
|
33
33
|
|
|
34
34
|
That is deliberate. `personal` gives the guide a much better first-run experience because the first workspace is auto-provisioned for the user. The app still becomes multi-homing-capable, because invitations and memberships can still put one user in several workspaces at once. The `personal` part only changes how the first workspace is provisioned and how its slug policy works.
|
|
35
35
|
|
|
36
|
+
Once `workspaces-core` and `workspaces-web` are installed, the baseline workspace invitation flow is already part of the package stack. Treat that as the default behavior unless the app explicitly needs custom invite rules or custom UI beyond what the packages already provide.
|
|
37
|
+
|
|
36
38
|
## Installing the workspace packages
|
|
37
39
|
|
|
38
40
|
If your app is already on `tenancyMode = "personal"`, run:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/app-setup/users.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Users
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
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
2
|
|
|
3
3
|
# Working with the JSKIT CLI
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/generators/advanced-cruds.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Advanced CRUDs
|
|
4
4
|
|
|
@@ -451,6 +451,168 @@ They usually:
|
|
|
451
451
|
|
|
452
452
|
These files are mostly containers. That is deliberate.
|
|
453
453
|
|
|
454
|
+
### CRUD link resolution
|
|
455
|
+
|
|
456
|
+
This deserves an explicit warning, because it was implemented incorrectly in a real app.
|
|
457
|
+
|
|
458
|
+
When you customize generated CRUD pages, use the CRUD runtime that owns the current route scope to resolve CRUD-bound links.
|
|
459
|
+
|
|
460
|
+
Use `paths.page()` for **surface-aware** navigation:
|
|
461
|
+
|
|
462
|
+
- `/account`
|
|
463
|
+
- `/assistant`
|
|
464
|
+
- `/lists`
|
|
465
|
+
- other links that only need normal surface params such as `workspaceSlug`
|
|
466
|
+
|
|
467
|
+
Do **not** use `paths.page()` with CRUD record placeholders inside the relative path or URL template, such as:
|
|
468
|
+
|
|
469
|
+
- `:contactId`
|
|
470
|
+
- `:addressId`
|
|
471
|
+
- `:todoListId`
|
|
472
|
+
- `:todoItemId`
|
|
473
|
+
|
|
474
|
+
For CRUD-bound links, use the runtime-provided resolvers instead:
|
|
475
|
+
|
|
476
|
+
- list pages:
|
|
477
|
+
- `records.resolveViewUrl(record)`
|
|
478
|
+
- `records.resolveEditUrl(record)`
|
|
479
|
+
- `records.resolveParams(template, extraParams)`
|
|
480
|
+
- view pages:
|
|
481
|
+
- `view.listUrl`
|
|
482
|
+
- `view.editUrl`
|
|
483
|
+
- `view.resolveParams(template, extraParams)`
|
|
484
|
+
- add/edit pages:
|
|
485
|
+
- `formRuntime.addEdit.resolveParams(template, extraParams)`
|
|
486
|
+
|
|
487
|
+
Why this matters:
|
|
488
|
+
|
|
489
|
+
- `paths.page()` only knows about the current surface route params
|
|
490
|
+
- CRUD runtimes also know about the current CRUD route shape, current record id, parent record ids, and nested child route context
|
|
491
|
+
- once a page is CRUD-bound, those runtime resolvers are the safe way to build record-scoped links
|
|
492
|
+
|
|
493
|
+
Scope rule:
|
|
494
|
+
|
|
495
|
+
- use the runtime anchored to the record that owns the action
|
|
496
|
+
- on a parent record view page with nested child routes, parent actions should still resolve from the parent `view` runtime even while a child route like `/items/new` is active
|
|
497
|
+
- child-item actions should resolve from the child/item runtime only when the current route is actually child-scoped
|
|
498
|
+
|
|
499
|
+
Examples:
|
|
500
|
+
|
|
501
|
+
- good: `view.resolveParams("./items/new")`
|
|
502
|
+
- good: `view.resolveParams("./items/:todoItemId/edit", { todoItemId: item.id })`
|
|
503
|
+
- good: `formRuntime.addEdit.resolveParams("../../..")`
|
|
504
|
+
- bad: `paths.page("/lists/:todoListId/items/new")`
|
|
505
|
+
- bad: `paths.page("/lists/:todoListId/edit")`
|
|
506
|
+
|
|
507
|
+
The safe mental model is:
|
|
508
|
+
|
|
509
|
+
- use `paths.page()` to get to the right surface
|
|
510
|
+
- use CRUD runtime resolvers to move around inside the CRUD
|
|
511
|
+
|
|
512
|
+
### Live actions and `useCommand()`
|
|
513
|
+
|
|
514
|
+
There is one more client-side pattern worth naming explicitly:
|
|
515
|
+
|
|
516
|
+
Use `useCommand()` for live actions such as:
|
|
517
|
+
|
|
518
|
+
- checkboxes that toggle a record field
|
|
519
|
+
- archive / publish / reopen buttons
|
|
520
|
+
- delete buttons
|
|
521
|
+
- small one-click PATCH / POST / DELETE actions that are not full forms
|
|
522
|
+
|
|
523
|
+
This is the pattern the `todo` app uses for "mark item done".
|
|
524
|
+
|
|
525
|
+
The page renders a checkbox like this:
|
|
526
|
+
|
|
527
|
+
```vue
|
|
528
|
+
<v-checkbox-btn
|
|
529
|
+
:model-value="item.done"
|
|
530
|
+
:disabled="!canUpdateItem || isItemBusy(item.id)"
|
|
531
|
+
@update:model-value="toggleItem(item, $event)"
|
|
532
|
+
/>
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
Then the page wires a command:
|
|
536
|
+
|
|
537
|
+
```js
|
|
538
|
+
const itemPatchModel = reactive({
|
|
539
|
+
id: "",
|
|
540
|
+
patch: {}
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
const updateItemCommand = useCommand({
|
|
544
|
+
model: itemPatchModel,
|
|
545
|
+
apiSuffix: ({ model }) => `/todo-items/${model?.id || ""}`,
|
|
546
|
+
writeMethod: "PATCH",
|
|
547
|
+
runPermissions: ["crud.todo_items.update"],
|
|
548
|
+
suppressSuccessMessage: true,
|
|
549
|
+
fallbackRunError: "Unable to update item.",
|
|
550
|
+
buildRawPayload(model) {
|
|
551
|
+
return model.patch;
|
|
552
|
+
},
|
|
553
|
+
async onRunSuccess(_payload, context = {}) {
|
|
554
|
+
if (context.queryClient) {
|
|
555
|
+
await context.queryClient.invalidateQueries({
|
|
556
|
+
queryKey: ["ui-generator", "todo_items"]
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
async function toggleItem(item = {}, nextValue = false) {
|
|
563
|
+
itemPatchModel.id = String(item.id || "");
|
|
564
|
+
itemPatchModel.patch = {
|
|
565
|
+
done: Boolean(nextValue)
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
await updateItemCommand.run();
|
|
569
|
+
}
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
That gives you a clean action pipeline:
|
|
573
|
+
|
|
574
|
+
1. the UI captures the click
|
|
575
|
+
2. the page writes a tiny action model
|
|
576
|
+
3. `useCommand()` resolves the correct scoped API path for the current route/surface
|
|
577
|
+
4. it sends the request through the standard HTTP runtime
|
|
578
|
+
5. on success, it invalidates the relevant query keys so the list/view refreshes
|
|
579
|
+
|
|
580
|
+
So yes: for this class of interaction, `useCommand()` is the right helper.
|
|
581
|
+
|
|
582
|
+
Use this rule of thumb:
|
|
583
|
+
|
|
584
|
+
- `useCommand()`
|
|
585
|
+
- for live actions
|
|
586
|
+
- button clicks
|
|
587
|
+
- toggles
|
|
588
|
+
- small PATCH/POST/DELETE interactions
|
|
589
|
+
- `useAddEdit()` / `useCrudAddEdit()`
|
|
590
|
+
- for real forms
|
|
591
|
+
- create/edit screens
|
|
592
|
+
- save/cancel flows
|
|
593
|
+
- `useCrudList()` / `useCrudView()`
|
|
594
|
+
- for routed list/view loading and CRUD URL resolution
|
|
595
|
+
|
|
596
|
+
Best practices for live CRUD actions:
|
|
597
|
+
|
|
598
|
+
- keep the payload narrow
|
|
599
|
+
- send the field change you mean, not a whole copied record
|
|
600
|
+
- disable the control while the command for that record is running
|
|
601
|
+
- `todo` does this with `isItemBusy(item.id)`
|
|
602
|
+
- invalidate the relevant list/view query keys on success
|
|
603
|
+
- do not hand-maintain parallel local record copies unless you really need optimistic UI
|
|
604
|
+
- suppress success toasts for high-frequency actions when they would become noisy
|
|
605
|
+
- a checkbox toggle usually does not need "Saved." every time
|
|
606
|
+
- keep business rules on the server
|
|
607
|
+
- in `todo`, the client sends `{ done: true|false }`
|
|
608
|
+
- the server service decides how `completedAt` should be set or cleared
|
|
609
|
+
|
|
610
|
+
The safe mental model is:
|
|
611
|
+
|
|
612
|
+
- use form runtimes for forms
|
|
613
|
+
- use command runtimes for actions
|
|
614
|
+
- keep the server as the source of truth for derived state
|
|
615
|
+
|
|
454
616
|
### `_components/CrudAddEditForm.vue`
|
|
455
617
|
|
|
456
618
|
This is the shared rendering shell for the add/edit form.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/generators/crud-generators.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# CRUD Generators
|
|
4
4
|
|
|
@@ -238,6 +238,7 @@ The exact fields will vary by app. What matters for the generator is:
|
|
|
238
238
|
- the table already exists
|
|
239
239
|
- the ownership columns match the ownership filter you are going to choose
|
|
240
240
|
- the column names are stable enough to become part of your app's resource contract
|
|
241
|
+
- if you are using `crud-server-generator`, do **not** hand-write a separate CRUD migration for this table; the server generator installs the CRUD migration scaffold itself
|
|
241
242
|
|
|
242
243
|
In this table, `workspace_id` is the important ownership clue. That is why the next step uses:
|
|
243
244
|
|
|
@@ -261,6 +262,13 @@ npx jskit generate crud-server-generator scaffold \
|
|
|
261
262
|
|
|
262
263
|
This creates an app-local package under `packages/contacts/`.
|
|
263
264
|
|
|
265
|
+
Before generating anything, decide these with the developer:
|
|
266
|
+
|
|
267
|
+
- which operations are allowed for this CRUD
|
|
268
|
+
- which fields belong in the list view if a list exists
|
|
269
|
+
- what the view form should look like
|
|
270
|
+
- what the edit/new form should look like
|
|
271
|
+
|
|
264
272
|
The most important file from the UI point of view is:
|
|
265
273
|
|
|
266
274
|
```text
|
|
@@ -505,6 +513,27 @@ The host page then renders the comment list directly, usually with lower-level C
|
|
|
505
513
|
- `useCrudAddEdit()`
|
|
506
514
|
- `useCrudView()` when needed
|
|
507
515
|
|
|
516
|
+
There is one more runtime worth knowing about early:
|
|
517
|
+
|
|
518
|
+
- `useCommand()`
|
|
519
|
+
|
|
520
|
+
Use it for live actions that are **not** full forms, such as:
|
|
521
|
+
|
|
522
|
+
- checkbox toggles
|
|
523
|
+
- archive / reopen buttons
|
|
524
|
+
- quick PATCH / POST / DELETE actions on one record
|
|
525
|
+
|
|
526
|
+
So the practical split is:
|
|
527
|
+
|
|
528
|
+
- `useCrudList()` / `useCrudView()`
|
|
529
|
+
- routed list/view loading
|
|
530
|
+
- `useCrudAddEdit()`
|
|
531
|
+
- real create/edit forms
|
|
532
|
+
- `useCommand()`
|
|
533
|
+
- live actions inside the page
|
|
534
|
+
|
|
535
|
+
The `todo` app uses that last pattern for "mark item done" checkboxes. The deeper best-practices explanation is in [Advanced CRUDs](/guide/generators/advanced-cruds).
|
|
536
|
+
|
|
508
537
|
That is the same general pattern already used in the real app for embedded child records like pet notes: the record list lives inside the main view page, while routed child pages handle the operations that still deserve their own URLs.
|
|
509
538
|
|
|
510
539
|
This pattern is useful when the child records are supporting detail rather than a destination in their own right.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/generators/intro.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# Generators
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/guide/
|
|
1
|
+
<!-- Generated by `npm run agent-docs:build` from `packages/agent-docs/site/guide/generators/ui-generators.md`. Do not edit manually. -->
|
|
2
2
|
|
|
3
3
|
# UI Generators
|
|
4
4
|
|
package/guide/agent/index.md
CHANGED
package/package.json
CHANGED
|
@@ -8,6 +8,24 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/agent-docs/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
|
+
|
|
15
|
+
### site
|
|
16
|
+
|
|
17
|
+
### `site/.vitepress/config.mjs`
|
|
18
|
+
Exports
|
|
19
|
+
- None
|
|
20
|
+
|
|
21
|
+
### `site/.vitepress/theme/components/DocsInDepth.vue`
|
|
22
|
+
Exports
|
|
23
|
+
- None
|
|
24
|
+
|
|
25
|
+
### `site/.vitepress/theme/components/DocsTerminalTip.vue`
|
|
26
|
+
Exports
|
|
27
|
+
- None
|
|
28
|
+
|
|
29
|
+
### `site/.vitepress/theme/index.js`
|
|
30
|
+
Exports
|
|
31
|
+
- `default`
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/assistant-core/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/assistant-runtime/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/assistant/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/auth-core/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/auth-provider-supabase-core/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/auth-web/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/console-core/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/console-web/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/crud-core/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/crud-server-generator/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/crud-ui-generator/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/database-runtime-mysql/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/database-runtime-postgres/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/database-runtime/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/http-runtime/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/kernel/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/realtime/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/shell-web/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/storage-runtime/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/ui-generator/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ Use this on demand; do not load the full index at startup.
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
- Source: `packages/uploads-image-web/**/*{.js,.mjs,.cjs,.vue}`
|
|
11
|
-
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`
|
|
11
|
+
- Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `LEGACY/`, `.vitepress/cache/`, `.vitepress/dist/`
|
|
12
12
|
|
|
13
13
|
## Sections
|
|
14
14
|
|