@jskit-ai/agent-docs 0.1.290 → 0.1.292

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 (37) hide show
  1. package/guide/agent/app-setup/existing-application-migration.md +1 -1
  2. package/guide/agent/framework/data-access.md +309 -22
  3. package/guide/agent/framework/material-3.md +40 -39
  4. package/guide/agent/framework/sanity-checks.md +19 -12
  5. package/package.json +1 -1
  6. package/patterns/feature-package/example/booking-engine/package.json +1 -1
  7. package/patterns/minimal-foundation/example/package.json +4 -4
  8. package/patterns/shell-foundation/example/package.json +5 -5
  9. package/patterns/shell-foundation/example/packages/main/package.json +1 -1
  10. package/reference/autogen/PATTERN_INDEX.md +38 -38
  11. package/reference/autogen/packages/agent-runtime.md +4 -0
  12. package/reference/autogen/packages/crud-core.md +1 -1
  13. package/reference/autogen/packages/kernel.md +1 -1
  14. package/reference/autogen/packages/resource-core.md +1 -0
  15. package/reference/autogen/packages/resource-runtime.md +39 -3
  16. package/reference/autogen/packages/workspaces-core.md +0 -2
  17. package/reference/autogen/tooling/jskit-catalog.md +30 -10
  18. package/skills/jskit/references/data-access.md +309 -22
  19. package/skills/jskit/references/existing-application-migration.md +1 -1
  20. package/skills/jskit/references/heuristics/ui-testing.md +6 -3
  21. package/skills/jskit/references/material-3.md +40 -39
  22. package/skills/jskit/references/pattern-index.md +38 -38
  23. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
  24. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +5 -5
  25. package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
  26. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
  27. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  28. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  29. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
  30. package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +3 -3
  31. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
  32. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
  33. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  34. package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
  35. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +3 -3
  36. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +6 -6
  37. package/skills/jskit/references/sanity-checks.md +19 -12
@@ -9,7 +9,7 @@
9
9
  "test": "jskit test --databases"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/database-runtime": "0.1.265",
13
- "@jskit-ai/database-runtime-postgres": "0.1.262"
12
+ "@jskit-ai/database-runtime": "0.1.266",
13
+ "@jskit-ai/database-runtime-postgres": "0.1.263"
14
14
  }
15
15
  }
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/realtime": "0.2.23",
6
- "@jskit-ai/shell-web": "0.2.20"
5
+ "@jskit-ai/realtime": "0.2.24",
6
+ "@jskit-ai/shell-web": "0.2.21"
7
7
  }
8
8
  }
@@ -5,7 +5,7 @@
5
5
  "private": true,
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@jskit-ai/kernel": "0.2.16",
8
+ "@jskit-ai/kernel": "0.2.17",
9
9
  "json-rest-schema": "^1.0.17"
10
10
  },
11
11
  "exports": {
@@ -10,9 +10,9 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.20",
14
- "@jskit-ai/resource-crud-core": "0.1.207",
15
- "@jskit-ai/users-core": "0.2.21"
13
+ "@jskit-ai/crud-core": "0.2.22",
14
+ "@jskit-ai/resource-crud-core": "0.1.208",
15
+ "@jskit-ai/users-core": "0.2.23"
16
16
  },
17
17
  "jskit": {
18
18
  "kind": "runtime",
@@ -10,14 +10,14 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.20",
14
- "@jskit-ai/resource-crud-core": "0.1.207",
15
- "@jskit-ai/users-core": "0.2.21",
16
- "@jskit-ai/workspaces-core": "0.2.21"
13
+ "@jskit-ai/crud-core": "0.2.22",
14
+ "@jskit-ai/resource-crud-core": "0.1.208",
15
+ "@jskit-ai/users-core": "0.2.23",
16
+ "@jskit-ai/workspaces-core": "0.2.23"
17
17
  },
18
18
  "peerDependencies": {
19
- "@jskit-ai/kernel": "0.2.16",
20
- "@jskit-ai/resource-runtime": "0.2.17"
19
+ "@jskit-ai/kernel": "0.2.17",
20
+ "@jskit-ai/resource-runtime": "0.2.19"
21
21
  },
22
22
  "jskit": {
23
23
  "kind": "runtime",
@@ -4,9 +4,9 @@
4
4
 
5
5
  Before calling a list, a save, a test, a refactor, a screen or a deployment
6
6
  done, measure what it costs and does, judge whether that is sane, and fix the
7
- cause when it is not. This page holds JSKIT's part: the pitfalls JSKIT's own
7
+ cause when it is not. This page holds JSKIT's part: the pitfalls its own
8
8
  packages cause, then the JSKIT call, helper or setting that applies each
9
- check, with one line on what it catches and why.
9
+ check, and what it catches.
10
10
 
11
11
  ## JSKIT's own pitfalls
12
12
 
@@ -67,10 +67,14 @@ expects the relationship id or an unselected field never gets it.
67
67
  ### Every row
68
68
 
69
69
  - A handle's `query()` answers one page and refuses a missing or oversized
70
- `page.size`, because json-rest-api would otherwise cut the list without an
71
- error. A read its callers treat as complete uses `queryAll()`, because the
72
- missing rows otherwise vanish from every picker and delivery built on it
70
+ `page.size`, where json-rest-api would cut the list silently. A read its
71
+ callers treat as complete uses `queryAll()`, or the missing rows vanish from
72
+ every picker and delivery built on it
73
73
  ([Reads](data-access.md#reads-shaped-for-the-screen)).
74
+ - A grouped `aggregate()` answers every group or throws
75
+ `RESOURCE_GROUP_LIMIT`; past `pageLimits().request` groups, page it with
76
+ `page: { size, number }`
77
+ ([The handle's calls](data-access.md#the-handle-s-calls)).
74
78
  - A lookup by a unique key matches at most one row: `get(id)`, or a `query()`
75
79
  of page size 1.
76
80
 
@@ -79,12 +83,11 @@ expects the relationship id or an unselected field never gets it.
79
83
  - Count a path's queries with `expectFlatQueries()` from
80
84
  `@jskit-ai/resource-runtime/test`, or `countQueries()` from
81
85
  `@jskit-ai/database-runtime/server/testDatabases`, at a few rows and at a
82
- realistic number; the count should follow tables and pages, not rows
86
+ realistic number; it should follow tables and pages, not rows
83
87
  ([Tests](data-access.md#tests)).
84
88
  - A JSON:API read adds a few lookup and visibility queries per page and per
85
- relationship field, and json-rest-api reads each relationship's related ids
86
- in one statement however many rows the page has. Both follow pages, not
87
- rows, so `expectFlatQueries` passes them.
89
+ relationship field, and one statement per relationship for its related ids.
90
+ Both follow pages, not rows, so `expectFlatQueries` passes them.
88
91
  - A handle's `get()` or `query()`, or a service `get`, inside a loop is the
89
92
  usual per-row read; batch it with an id-list filter through `queryAll()` or
90
93
  `include`, grouped with `Map.groupBy()`
@@ -108,11 +111,15 @@ expects the relationship id or an unselected field never gets it.
108
111
  `DB_NAME`, because tests write and delete rows and would destroy the
109
112
  developer's data. A skip for want of a test database is a failure.
110
113
  - Test databases restore a stored snapshot checked by a digest of the
111
- migration and seed sources, and the harness reports each preparation phase's
112
- duration, so slow preparation shows ([Test databases are prepared
114
+ migration and seed sources, and the harness times each preparation phase,
115
+ so slow preparation shows ([Test databases are prepared
113
116
  once](typed-features.md#test-databases-are-prepared-once),
114
117
  [integration test
115
118
  databases](database-layer.md#integration-test-databases)).
119
+ - A component's content and states are checked in a Vitest component test;
120
+ a browser check is an assertion in the Playwright spec that already reaches
121
+ that screen. Every Playwright run ends with its 10 slowest tests: compare a
122
+ new test's time, and the suite's, before and after.
116
123
 
117
124
  ### Inputs and access
118
125
 
@@ -135,7 +142,7 @@ Before changing a JSKIT feature, list where its behaviour lives, with the test
135
142
  that covers each item, and walk the list again after: routes, actions and
136
143
  their input schemas, row policies, CRUD fields, lookups and hooks, placements
137
144
  and navigation meta, messages and their codes, events, jobs and migrations.
138
- These are the places a consolidation drops behaviour without a failing build.
145
+ A consolidation drops behaviour there without a failing build.
139
146
 
140
147
  ### Changes others depend on
141
148