@jskit-ai/agent-docs 0.1.363 → 0.1.365

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 (83) hide show
  1. package/guide/agent/app-extras/mobile-capacitor.md +5 -0
  2. package/guide/agent/app-setup/authentication.md +10 -8
  3. package/guide/agent/app-setup/database-layer.md +67 -43
  4. package/guide/agent/app-setup/existing-application-migration.md +3 -1
  5. package/guide/agent/app-setup/upgrading-jskit.md +13 -3
  6. package/guide/agent/framework/application-operations.md +9 -0
  7. package/guide/agent/framework/client-features.md +22 -0
  8. package/guide/agent/framework/speed-pass.md +6 -94
  9. package/guide/agent/framework/test-pass.md +210 -0
  10. package/guide/agent/framework/typed-features.md +64 -1
  11. package/guide/agent/framework/ui-operations.md +43 -8
  12. package/guide/agent/index.md +40 -4
  13. package/guide/agent/recipes/another-language.md +129 -0
  14. package/guide/agent/recipes/file-uploads-and-images.md +125 -0
  15. package/guide/agent/recipes/installable-app.md +383 -0
  16. package/guide/agent/recipes/invite-people-with-roles.md +142 -0
  17. package/guide/agent/recipes/offline-study.md +163 -0
  18. package/guide/agent/recipes/payments-and-subscriptions.md +156 -0
  19. package/guide/agent/recipes/reminders-and-digests.md +153 -0
  20. package/guide/agent/recipes/usefulness-study.md +137 -0
  21. package/package.json +1 -1
  22. package/patterns/minimal-foundation/PATTERN.md +2 -0
  23. package/patterns/minimal-foundation/example/AGENTS.md +54 -101
  24. package/patterns/minimal-foundation/example/gitignore +1 -1
  25. package/patterns/minimal-foundation/example/package.json +3 -3
  26. package/patterns/minimal-foundation/example/server/lib/loggerOptions.js +6 -3
  27. package/patterns/minimal-foundation/example/server.js +1 -1
  28. package/patterns/minimal-foundation/example/vite.config.mjs +3 -2
  29. package/patterns/shell-foundation/PATTERN.md +2 -0
  30. package/patterns/shell-foundation/example/AGENTS.md +54 -101
  31. package/patterns/shell-foundation/example/gitignore +1 -1
  32. package/patterns/shell-foundation/example/package.json +4 -4
  33. package/patterns/shell-foundation/example/server/lib/loggerOptions.js +6 -3
  34. package/patterns/shell-foundation/example/server.js +1 -1
  35. package/patterns/shell-foundation/example/vite.config.mjs +3 -2
  36. package/reference/autogen/PATTERN_INDEX.md +36 -36
  37. package/reference/autogen/packages/agent-docs.md +2 -2
  38. package/reference/autogen/packages/assistant-runtime.md +4 -0
  39. package/reference/autogen/packages/auth-provider-local-core.md +1 -0
  40. package/reference/autogen/packages/auth-web.md +3 -2
  41. package/reference/autogen/packages/database-runtime.md +8 -17
  42. package/reference/autogen/packages/material-web.md +4 -0
  43. package/reference/autogen/tooling/config-eslint.md +8 -0
  44. package/reference/autogen/tooling/jskit-catalog.md +58 -5
  45. package/skills/jskit/SKILL.md +8 -4
  46. package/skills/jskit/references/app-operations.md +9 -0
  47. package/skills/jskit/references/client-features.md +22 -0
  48. package/skills/jskit/references/database-layer.md +67 -43
  49. package/skills/jskit/references/existing-application-migration.md +3 -1
  50. package/skills/jskit/references/heuristics/INDEX.md +2 -2
  51. package/skills/jskit/references/heuristics/client-requests.md +3 -1
  52. package/skills/jskit/references/heuristics/crud-authoring.md +10 -0
  53. package/skills/jskit/references/heuristics/placements.md +1 -0
  54. package/skills/jskit/references/heuristics/ui-testing.md +10 -7
  55. package/skills/jskit/references/pattern-index.md +36 -36
  56. package/skills/jskit/references/patterns/app/minimal-foundation/PATTERN.md +2 -0
  57. package/skills/jskit/references/patterns/app/minimal-foundation/example/AGENTS.md +54 -101
  58. package/skills/jskit/references/patterns/app/minimal-foundation/example/gitignore +1 -1
  59. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +3 -3
  60. package/skills/jskit/references/patterns/app/minimal-foundation/example/server/lib/loggerOptions.js +6 -3
  61. package/skills/jskit/references/patterns/app/minimal-foundation/example/server.js +1 -1
  62. package/skills/jskit/references/patterns/app/minimal-foundation/example/vite.config.mjs +3 -2
  63. package/skills/jskit/references/patterns/app/shell-foundation/PATTERN.md +2 -0
  64. package/skills/jskit/references/patterns/app/shell-foundation/example/AGENTS.md +54 -101
  65. package/skills/jskit/references/patterns/app/shell-foundation/example/gitignore +1 -1
  66. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +4 -4
  67. package/skills/jskit/references/patterns/app/shell-foundation/example/server/lib/loggerOptions.js +6 -3
  68. package/skills/jskit/references/patterns/app/shell-foundation/example/server.js +1 -1
  69. package/skills/jskit/references/patterns/app/shell-foundation/example/vite.config.mjs +3 -2
  70. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
  71. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  72. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
  73. package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +1 -1
  74. package/skills/jskit/references/patterns/database/mysql-application/PATTERN.md +6 -5
  75. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
  76. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
  77. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  78. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
  79. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +4 -4
  80. package/skills/jskit/references/speed-pass.md +5 -93
  81. package/skills/jskit/references/test-pass.md +205 -0
  82. package/skills/jskit/references/typed-features.md +64 -1
  83. package/skills/jskit/references/ui-operations.md +43 -8
@@ -1,103 +1,56 @@
1
1
  # App Agent Instructions
2
2
 
3
- Use current project context, JSKIT public APIs, and the official framework
4
- documentation as the source of truth for application work.
5
-
6
- Framework references:
7
-
8
- - `https://mobily-enterprises.github.io/jskit-ai/guide/`
9
- - `https://mobily-enterprises.github.io/jskit-ai/patterns/`
10
-
11
- Before writing or reviewing code that reads or writes a database table, read
12
- the data access guide at
13
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/data-access`.
14
-
15
- Before writing or reviewing server code (a feature, provider, action, service,
16
- repository, route, error or test), read the typed features guide at
17
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features`.
18
- `npm run lint` checks its rules, and each finding links the section that
19
- explains it; `npm run verify` adds the package graph, tests and build. Fix a
20
- finding in the code; excuse one only with the guide's `readable-check: allow`
21
- comment and reason prefix.
22
-
23
- Before writing or reviewing client code (a composable, component, client
24
- factory or client provider), read the client features guide at
25
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/client-features`.
26
- Simple, direct code comes first: never add a layer, wrapper, registry or tiny
27
- module only to satisfy a rule. `npm run lint` checks its rules too.
28
-
29
- Before writing code that sends email, SMS, push notifications or payments,
30
- calls another system, or depends on where the app runs, read the environments
31
- guide at
32
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/environments`.
33
- `APP_ENV` (development, test, staging or production) decides all of it: only
34
- production sends for real, staging sends email and SMS only to its test
35
- addresses, and `NODE_ENV` only picks optimised builds.
36
-
37
- Before implementation, read the narrow relevant source pattern completely. If
38
- its owner package is installed, prefer that version-matched package-owned copy.
39
- Do not install an unrelated runtime package only to read documentation.
40
-
41
- Where the host provides a managed browser runner, every Playwright suite runs
42
- through it from the first run, never through `npx playwright test`,
43
- `playwright test` or a package script such as `npm run test:e2e`.
44
-
45
- Before adding or changing browser-test setup, read the browser verification
46
- guide at
47
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`.
48
- `playwright.config.mjs` is `browserTestConfig()` from
49
- `@jskit-ai/jskit-catalog/browser-tests`: every Playwright worker gets its own
50
- server on the production build, its own port and, through the config's
51
- `prepare` module, its own copy of the browser database, restored from a schema
52
- snapshot and seeded. A local run never starts the development server; with
53
- `PLAYWRIGHT_BASE_URL`, the tests use that managed target as its host serves
54
- it. Keep `BROWSER_TEST_DB_NAME` distinct from disposable `TEST_DB_NAME`. The build and
55
- the snapshot are reused while their sources are unchanged; do not rebuild the
56
- database or production frontend for each focused browser check. Require
57
- repeat-start regression proof.
58
-
59
- Tests run in parallel within the machine's test budget: run node's test
60
- runner through `jskit test` (`npm test`), with `--databases` once the app has a
61
- database so each file running at once gets its own copy of `TEST_DB_NAME`,
62
- Playwright through `browserTestConfig()`, and take Vitest's `maxWorkers` from
63
- `testConcurrency()` of
64
- `@jskit-ai/jskit-catalog/test-budget`; never one file at a time or a fixed
65
- count. Isolate files that collide (their own port, temporary directory and
66
- database) instead of serialising them; a file that truly must run alone says
67
- why on its first line, `// jskit-test: alone - <reason>`. Plain `jskit check`
68
- fails anything else
69
- (`https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#test-files-run-in-parallel`).
70
-
71
- Keep verification output small. Run the relevant cases together, save complete
72
- stdout/stderr to local artifacts, and preserve the exit status. Report counts,
73
- duration, failed case names and artifact paths; read only actionable failure
74
- excerpts. Do not dump full JSON/TAP reports, passing assertions, request logs or
75
- traces into agent context. Wait on the existing run instead of restarting it or
76
- repeatedly printing unchanged output. Keep startup and cleanup errors visible.
77
- For browser evidence, use existing automated cases, targeted locators and
78
- meaningful visual checkpoints. Avoid a full DOM snapshot or screenshot after
79
- every action; retain the required viewport, identity and security checks.
80
-
81
- Pages never start with a page header, title block, welcome heading, or other
82
- standalone heading copy. Start with the useful content and actions. If the user
83
- wants a heading, they will ask for or add one.
84
-
85
- Selection fields never show a stored id as text. A select, autocomplete or
86
- combobox whose options load from the server, or whose value is a record id,
87
- uses `SelectField` from `@jskit-ai/http-web/client/components/SelectField` with
88
- `loading` while the options load, not a raw `v-select`, `v-autocomplete` or
89
- `v-combobox`. The lint rule `jskit/selection-field` reports a raw one whose
90
- items are not fixed (a list written out, a top-level `const` holding one, or an
91
- import from a `shared` module) and a `SelectField` over loaded items without
92
- `loading`; a justified case says why in
93
- `<!-- readable-check: allow selection-field - data: <reason> -->` above it.
94
- That `loading` is not a spinner: Vuetify draws it as the field's own thin
95
- progress line along its underline, the built-in loading state the Material 3
96
- rules keep (`https://mobily-enterprises.github.io/jskit-ai/guide/framework/material-3#components-state-and-feedback`).
97
- What those rules avoid is an ad-hoc spinner: a circular indicator on a button
98
- or in place of content, or a whole-page one. Count spinners by what renders,
99
- not by `loading` props.
100
-
101
- Copied pattern source is ordinary application source. Do not add generator
102
- provenance, receipts, completion ledgers, or tooling-operation history. Keep
103
- changes scoped to the user request and verify runtime behavior directly.
3
+ <!-- jskit:begin app guidance (written by npx jskit agents; edit outside this block) -->
4
+ ## JSKIT
5
+
6
+ This app is built on JSKIT. Its guide,
7
+ `https://mobily-enterprises.github.io/jskit-ai/guide/`, and its pattern
8
+ library, `https://mobily-enterprises.github.io/jskit-ai/patterns/`, describe
9
+ the current JSKIT release. `@jskit-ai/agent-docs` is not an app dependency, so
10
+ the guide has no copy under `node_modules`. Keep the app on the current release
11
+ (`npm run jskit:update`) so the two agree. A pattern whose owner runtime package
12
+ is installed is also in that package's `patterns/` folder, at the app's
13
+ version. Never install a runtime package only to read its documentation.
14
+
15
+ Read the guide's page before the work it covers:
16
+
17
+ - code that reads or writes a database table:
18
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/data-access`
19
+ - server code (a feature, provider, action, service, repository, route, error
20
+ or test):
21
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features`
22
+ - client code (a composable, component, client factory or client provider):
23
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/client-features`
24
+ - code that sends email, SMS, push notifications or payments, calls another
25
+ system, or depends on where the app runs (`APP_ENV`):
26
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/environments`
27
+ - a screen:
28
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/material-3`
29
+ - tests:
30
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#test-files-run-in-parallel`,
31
+ and browser tests:
32
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`
33
+ - a new capability: the pattern library; read the narrow pattern completely
34
+ before implementing.
35
+
36
+ `npm run verify` runs the checks listed in
37
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#running-the-checks`.
38
+ `npm test` runs every Node test file; `npm test -- <file>` runs exactly that
39
+ file. Each finding links the guide section that explains it: fix it in the
40
+ code, and excuse one only with the guide's `readable-check: allow` comment and
41
+ reason prefix.
42
+
43
+ Where the host provides a managed browser runner, such as Vibe64's, every
44
+ Playwright suite runs through it from the first run, on a declared test target:
45
+ give the runner the package script (on Vibe64,
46
+ `vibe64-helper playwright --target test-app npm-run test:e2e`), and never start
47
+ `npx playwright test`, `playwright test` or `npm run test:e2e` yourself. Specs
48
+ that write run only on a test target with its own database, never on the
49
+ person's development target or database. The browser tests guide above shows
50
+ the test target's declaration.
51
+ <!-- jskit:end app guidance -->
52
+
53
+ ## This app
54
+
55
+ Write this app's own rules here, outside the JSKIT block, which
56
+ `npm run jskit:update` rewrites.
@@ -3,7 +3,7 @@ dist/
3
3
  coverage/
4
4
  test-results/
5
5
  # Generated by vue-router/vite on the first dev or build scan.
6
- src/typed-router.d.ts
6
+ types/typed-router.d.ts
7
7
  .env
8
8
  .env.*
9
9
  !.env.example
@@ -35,7 +35,7 @@
35
35
  "@local/main": "0.1.0",
36
36
  "@fastify/static": "^10.1.3",
37
37
  "@jskit-ai/kernel": "0.2.35",
38
- "@jskit-ai/material-web": "0.1.14",
38
+ "@jskit-ai/material-web": "0.1.15",
39
39
  "@tanstack/vue-query": "^5.101.0",
40
40
  "fastify": "^5.12.7",
41
41
  "pino": "^10.3.1",
@@ -49,8 +49,8 @@
49
49
  "@vue/devtools-api": "^8.2.1"
50
50
  },
51
51
  "devDependencies": {
52
- "@jskit-ai/config-eslint": "0.1.253",
53
- "@jskit-ai/jskit-catalog": "0.2.115",
52
+ "@jskit-ai/config-eslint": "0.1.254",
53
+ "@jskit-ai/jskit-catalog": "0.2.117",
54
54
  "@playwright/test": "1.61.1",
55
55
  "@vitejs/plugin-vue": "^6.0.7",
56
56
  "eslint": "^10.8.0",
@@ -1,11 +1,14 @@
1
1
  import pino from "pino";
2
2
 
3
3
  /**
4
- * The Fastify logger's options. Fastify's logger serializes only the `err` key, so the same serializer under `error`
5
- * keeps the message and stack of `logger.error({ error }, "...")`.
4
+ * The Fastify logger's options: the level LOG_LEVEL names, info without one (`jskit test` and the browser test servers
5
+ * set warn, so a test server does not log every request), and, since Fastify's logger serializes only the `err` key,
6
+ * the same serializer under `error`, which keeps the message and stack of `logger.error({ error }, "...")`.
7
+ * @param {import("@jskit-ai/kernel/server/types").RuntimeEnv} runtimeEnv
6
8
  */
7
- function buildLoggerOptions() {
9
+ function buildLoggerOptions(runtimeEnv) {
8
10
  return {
11
+ level: String(runtimeEnv.LOG_LEVEL || "").trim() || "info",
9
12
  serializers: {
10
13
  error: pino.stdSerializers.err
11
14
  }
@@ -93,7 +93,7 @@ function canServeStaticFile(distRoot, relativePath) {
93
93
  */
94
94
  async function createServer({ runtimeEnv }) {
95
95
  const app = Fastify({
96
- logger: buildLoggerOptions(),
96
+ logger: buildLoggerOptions(runtimeEnv),
97
97
  // The proxies in front of the server (TRUSTED_PROXIES; loopback without it), so request.ip and the rate limits
98
98
  // counted by it are each client's address behind them.
99
99
  trustProxy: resolveTrustedProxies(runtimeEnv),
@@ -35,8 +35,9 @@ export default defineConfig({
35
35
  }),
36
36
  VueRouter({
37
37
  routesFolder: "src/pages",
38
- // Generated on the first Vite dev/build scan and intentionally gitignored.
39
- dts: "src/typed-router.d.ts",
38
+ // Generated on the first Vite dev/build scan and intentionally gitignored. It stays outside src, which the
39
+ // browser tests' frontend build reads: a file written there while it builds keeps that build from being reused.
40
+ dts: "types/typed-router.d.ts",
40
41
  nestedChildren: false
41
42
  }),
42
43
  vue(),
@@ -73,6 +73,8 @@ not convert those choices into a generator questionnaire.
73
73
  `server.js` takes `API_BASE_PATH` and `toRequestPathname` from the kernel's
74
74
  `shared/surface/paths`. `server/lib/envFile.js` loads `.env` once per process
75
75
  for every entry point. `server/lib/loggerOptions.js` gives Fastify's logger
76
+ the level `LOG_LEVEL` names, info without one (`jskit test` and the browser
77
+ test servers set warn, so a test server does not log every request), and
76
78
  pino's error serializer under `error` as well as `err`, so
77
79
  `logger.error({ error }, "...")` keeps the error's message and stack. `eslint.config.mjs` holds
78
80
  server and shared code to every typed-features rule (`typedFeaturesConfig`),
@@ -1,103 +1,56 @@
1
1
  # App Agent Instructions
2
2
 
3
- Use current project context, JSKIT public APIs, and the official framework
4
- documentation as the source of truth for application work.
5
-
6
- Framework references:
7
-
8
- - `https://mobily-enterprises.github.io/jskit-ai/guide/`
9
- - `https://mobily-enterprises.github.io/jskit-ai/patterns/`
10
-
11
- Before writing or reviewing code that reads or writes a database table, read
12
- the data access guide at
13
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/data-access`.
14
-
15
- Before writing or reviewing server code (a feature, provider, action, service,
16
- repository, route, error or test), read the typed features guide at
17
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features`.
18
- `npm run lint` checks its rules, and each finding links the section that
19
- explains it; `npm run verify` adds the package graph, tests and build. Fix a
20
- finding in the code; excuse one only with the guide's `readable-check: allow`
21
- comment and reason prefix.
22
-
23
- Before writing or reviewing client code (a composable, component, client
24
- factory or client provider), read the client features guide at
25
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/client-features`.
26
- Simple, direct code comes first: never add a layer, wrapper, registry or tiny
27
- module only to satisfy a rule. `npm run lint` checks its rules too.
28
-
29
- Before writing code that sends email, SMS, push notifications or payments,
30
- calls another system, or depends on where the app runs, read the environments
31
- guide at
32
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/environments`.
33
- `APP_ENV` (development, test, staging or production) decides all of it: only
34
- production sends for real, staging sends email and SMS only to its test
35
- addresses, and `NODE_ENV` only picks optimised builds.
36
-
37
- Before implementation, read the narrow relevant source pattern completely. If
38
- its owner package is installed, prefer that version-matched package-owned copy.
39
- Do not install an unrelated runtime package only to read documentation.
40
-
41
- Where the host provides a managed browser runner, every Playwright suite runs
42
- through it from the first run, never through `npx playwright test`,
43
- `playwright test` or a package script such as `npm run test:e2e`.
44
-
45
- Before adding or changing browser-test setup, read the browser verification
46
- guide at
47
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`.
48
- `playwright.config.mjs` is `browserTestConfig()` from
49
- `@jskit-ai/jskit-catalog/browser-tests`: every Playwright worker gets its own
50
- server on the production build, its own port and, through the config's
51
- `prepare` module, its own copy of the browser database, restored from a schema
52
- snapshot and seeded. A local run never starts the development server; with
53
- `PLAYWRIGHT_BASE_URL`, the tests use that managed target as its host serves
54
- it. Keep `BROWSER_TEST_DB_NAME` distinct from disposable `TEST_DB_NAME`. The build and
55
- the snapshot are reused while their sources are unchanged; do not rebuild the
56
- database or production frontend for each focused browser check. Require
57
- repeat-start regression proof.
58
-
59
- Tests run in parallel within the machine's test budget: run node's test
60
- runner through `jskit test` (`npm test`), with `--databases` once the app has a
61
- database so each file running at once gets its own copy of `TEST_DB_NAME`,
62
- Playwright through `browserTestConfig()`, and take Vitest's `maxWorkers` from
63
- `testConcurrency()` of
64
- `@jskit-ai/jskit-catalog/test-budget`; never one file at a time or a fixed
65
- count. Isolate files that collide (their own port, temporary directory and
66
- database) instead of serialising them; a file that truly must run alone says
67
- why on its first line, `// jskit-test: alone - <reason>`. Plain `jskit check`
68
- fails anything else
69
- (`https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#test-files-run-in-parallel`).
70
-
71
- Keep verification output small. Run the relevant cases together, save complete
72
- stdout/stderr to local artifacts, and preserve the exit status. Report counts,
73
- duration, failed case names and artifact paths; read only actionable failure
74
- excerpts. Do not dump full JSON/TAP reports, passing assertions, request logs or
75
- traces into agent context. Wait on the existing run instead of restarting it or
76
- repeatedly printing unchanged output. Keep startup and cleanup errors visible.
77
- For browser evidence, use existing automated cases, targeted locators and
78
- meaningful visual checkpoints. Avoid a full DOM snapshot or screenshot after
79
- every action; retain the required viewport, identity and security checks.
80
-
81
- Pages never start with a page header, title block, welcome heading, or other
82
- standalone heading copy. Start with the useful content and actions. If the user
83
- wants a heading, they will ask for or add one.
84
-
85
- Selection fields never show a stored id as text. A select, autocomplete or
86
- combobox whose options load from the server, or whose value is a record id,
87
- uses `SelectField` from `@jskit-ai/http-web/client/components/SelectField` with
88
- `loading` while the options load, not a raw `v-select`, `v-autocomplete` or
89
- `v-combobox`. The lint rule `jskit/selection-field` reports a raw one whose
90
- items are not fixed (a list written out, a top-level `const` holding one, or an
91
- import from a `shared` module) and a `SelectField` over loaded items without
92
- `loading`; a justified case says why in
93
- `<!-- readable-check: allow selection-field - data: <reason> -->` above it.
94
- That `loading` is not a spinner: Vuetify draws it as the field's own thin
95
- progress line along its underline, the built-in loading state the Material 3
96
- rules keep (`https://mobily-enterprises.github.io/jskit-ai/guide/framework/material-3#components-state-and-feedback`).
97
- What those rules avoid is an ad-hoc spinner: a circular indicator on a button
98
- or in place of content, or a whole-page one. Count spinners by what renders,
99
- not by `loading` props.
100
-
101
- Copied pattern source is ordinary application source. Do not add generator
102
- provenance, receipts, completion ledgers, or tooling-operation history. Keep
103
- changes scoped to the user request and verify runtime behavior directly.
3
+ <!-- jskit:begin app guidance (written by npx jskit agents; edit outside this block) -->
4
+ ## JSKIT
5
+
6
+ This app is built on JSKIT. Its guide,
7
+ `https://mobily-enterprises.github.io/jskit-ai/guide/`, and its pattern
8
+ library, `https://mobily-enterprises.github.io/jskit-ai/patterns/`, describe
9
+ the current JSKIT release. `@jskit-ai/agent-docs` is not an app dependency, so
10
+ the guide has no copy under `node_modules`. Keep the app on the current release
11
+ (`npm run jskit:update`) so the two agree. A pattern whose owner runtime package
12
+ is installed is also in that package's `patterns/` folder, at the app's
13
+ version. Never install a runtime package only to read its documentation.
14
+
15
+ Read the guide's page before the work it covers:
16
+
17
+ - code that reads or writes a database table:
18
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/data-access`
19
+ - server code (a feature, provider, action, service, repository, route, error
20
+ or test):
21
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features`
22
+ - client code (a composable, component, client factory or client provider):
23
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/client-features`
24
+ - code that sends email, SMS, push notifications or payments, calls another
25
+ system, or depends on where the app runs (`APP_ENV`):
26
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/environments`
27
+ - a screen:
28
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/material-3`
29
+ - tests:
30
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#test-files-run-in-parallel`,
31
+ and browser tests:
32
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`
33
+ - a new capability: the pattern library; read the narrow pattern completely
34
+ before implementing.
35
+
36
+ `npm run verify` runs the checks listed in
37
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#running-the-checks`.
38
+ `npm test` runs every Node test file; `npm test -- <file>` runs exactly that
39
+ file. Each finding links the guide section that explains it: fix it in the
40
+ code, and excuse one only with the guide's `readable-check: allow` comment and
41
+ reason prefix.
42
+
43
+ Where the host provides a managed browser runner, such as Vibe64's, every
44
+ Playwright suite runs through it from the first run, on a declared test target:
45
+ give the runner the package script (on Vibe64,
46
+ `vibe64-helper playwright --target test-app npm-run test:e2e`), and never start
47
+ `npx playwright test`, `playwright test` or `npm run test:e2e` yourself. Specs
48
+ that write run only on a test target with its own database, never on the
49
+ person's development target or database. The browser tests guide above shows
50
+ the test target's declaration.
51
+ <!-- jskit:end app guidance -->
52
+
53
+ ## This app
54
+
55
+ Write this app's own rules here, outside the JSKIT block, which
56
+ `npm run jskit:update` rewrites.
@@ -3,7 +3,7 @@ dist/
3
3
  coverage/
4
4
  test-results/
5
5
  # Generated by vue-router/vite on the first dev or build scan.
6
- src/typed-router.d.ts
6
+ types/typed-router.d.ts
7
7
  .env
8
8
  .env.*
9
9
  !.env.example
@@ -35,7 +35,7 @@
35
35
  "@local/main": "0.1.0",
36
36
  "@fastify/static": "^10.1.3",
37
37
  "@jskit-ai/kernel": "0.2.35",
38
- "@jskit-ai/material-web": "0.1.14",
38
+ "@jskit-ai/material-web": "0.1.15",
39
39
  "@tanstack/vue-query": "^5.101.0",
40
40
  "fastify": "^5.12.7",
41
41
  "pino": "^10.3.1",
@@ -45,13 +45,13 @@
45
45
  "vue-router": "^5.3.1",
46
46
  "vuetify": "^4.3.0",
47
47
  "@jskit-ai/http-runtime": "0.2.36",
48
- "@jskit-ai/shell-web": "0.2.55",
48
+ "@jskit-ai/shell-web": "0.2.56",
49
49
  "@fastify/fast-json-stringify-compiler": "^5.1.0",
50
50
  "@vue/devtools-api": "^8.2.1"
51
51
  },
52
52
  "devDependencies": {
53
- "@jskit-ai/config-eslint": "0.1.253",
54
- "@jskit-ai/jskit-catalog": "0.2.115",
53
+ "@jskit-ai/config-eslint": "0.1.254",
54
+ "@jskit-ai/jskit-catalog": "0.2.117",
55
55
  "@playwright/test": "1.61.1",
56
56
  "@vitejs/plugin-vue": "^6.0.7",
57
57
  "eslint": "^10.8.0",
@@ -1,11 +1,14 @@
1
1
  import pino from "pino";
2
2
 
3
3
  /**
4
- * The Fastify logger's options. Fastify's logger serializes only the `err` key, so the same serializer under `error`
5
- * keeps the message and stack of `logger.error({ error }, "...")`.
4
+ * The Fastify logger's options: the level LOG_LEVEL names, info without one (`jskit test` and the browser test servers
5
+ * set warn, so a test server does not log every request), and, since Fastify's logger serializes only the `err` key,
6
+ * the same serializer under `error`, which keeps the message and stack of `logger.error({ error }, "...")`.
7
+ * @param {import("@jskit-ai/kernel/server/types").RuntimeEnv} runtimeEnv
6
8
  */
7
- function buildLoggerOptions() {
9
+ function buildLoggerOptions(runtimeEnv) {
8
10
  return {
11
+ level: String(runtimeEnv.LOG_LEVEL || "").trim() || "info",
9
12
  serializers: {
10
13
  error: pino.stdSerializers.err
11
14
  }
@@ -93,7 +93,7 @@ function canServeStaticFile(distRoot, relativePath) {
93
93
  */
94
94
  async function createServer({ runtimeEnv }) {
95
95
  const app = Fastify({
96
- logger: buildLoggerOptions(),
96
+ logger: buildLoggerOptions(runtimeEnv),
97
97
  // The proxies in front of the server (TRUSTED_PROXIES; loopback without it), so request.ip and the rate limits
98
98
  // counted by it are each client's address behind them.
99
99
  trustProxy: resolveTrustedProxies(runtimeEnv),
@@ -35,8 +35,9 @@ export default defineConfig({
35
35
  }),
36
36
  VueRouter({
37
37
  routesFolder: "src/pages",
38
- // Generated on the first Vite dev/build scan and intentionally gitignored.
39
- dts: "src/typed-router.d.ts",
38
+ // Generated on the first Vite dev/build scan and intentionally gitignored. It stays outside src, which the
39
+ // browser tests' frontend build reads: a file written there while it builds keeps that build from being reused.
40
+ dts: "types/typed-router.d.ts",
40
41
  nestedChildren: false
41
42
  }),
42
43
  vue(),
@@ -2,8 +2,8 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/database-runtime": "0.1.290",
6
- "@jskit-ai/database-runtime-mysql": "0.1.288",
7
- "@jskit-ai/oidc-issuer-core": "0.1.59"
5
+ "@jskit-ai/database-runtime": "0.1.292",
6
+ "@jskit-ai/database-runtime-mysql": "0.1.290",
7
+ "@jskit-ai/oidc-issuer-core": "0.1.61"
8
8
  }
9
9
  }
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/auth-provider-oidc-core": "0.2.71",
6
- "@jskit-ai/auth-web": "0.2.63"
5
+ "@jskit-ai/auth-provider-oidc-core": "0.2.73",
6
+ "@jskit-ai/auth-web": "0.2.64"
7
7
  }
8
8
  }
@@ -7,10 +7,10 @@
7
7
  "db:migrate:status": "knex --knexfile ./knexfile.js migrate:list"
8
8
  },
9
9
  "dependencies": {
10
- "@jskit-ai/connectors-core": "0.2.58",
11
- "@jskit-ai/connector-google-calendar": "0.2.58",
12
- "@jskit-ai/database-runtime": "0.1.290",
13
- "@jskit-ai/database-runtime-mysql": "0.1.288",
10
+ "@jskit-ai/connectors-core": "0.2.60",
11
+ "@jskit-ai/connector-google-calendar": "0.2.60",
12
+ "@jskit-ai/database-runtime": "0.1.292",
13
+ "@jskit-ai/database-runtime-mysql": "0.1.290",
14
14
  "@jskit-ai/kernel": "0.2.35",
15
15
  "knex": "^3.1.0"
16
16
  }
@@ -9,7 +9,7 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.2.59",
12
+ "@jskit-ai/crud-core": "0.2.61",
13
13
  "@jskit-ai/resource-core": "0.1.226",
14
14
  "@jskit-ai/resource-crud-core": "0.1.228"
15
15
  },
@@ -69,9 +69,10 @@ application's workflow has no `postgres` service, `POSTGRES_*` variables, port
69
69
  Tests get their own databases from
70
70
  `@jskit-ai/database-runtime/server/testDatabases`. The `test` script runs
71
71
  `jskit test --databases`: each Node test file running at once gets its own
72
- copy of `TEST_DB_NAME` (`<name>`, `<name>_1`, ...), restored from a stored
73
- snapshot of the current migrations' schema and the rows they write, in
74
- `node_modules/.cache/jskit-test-databases/`. The snapshot is replayed once, and
72
+ copy of `TEST_DB_NAME` (`<name>`, `<name>_1`, ...), restored from a snapshot
73
+ of the current migrations' schema and the rows they write, kept on the server
74
+ in `<TEST_DB_NAME>_0`, whose tables each copy's are made from there (`INSERT
75
+ ... SELECT`), and which `npm ci` leaves. The snapshot is replayed once, and
75
76
  again only when a migration's name or contents or `package-lock.json` change;
76
77
  a file that migrates or drops tables leaves its copy to be restored before the
77
78
  next file takes it.
@@ -82,8 +83,8 @@ next file takes it.
82
83
  server its own copy of `BROWSER_TEST_DB_NAME`, restored from the same kind of
83
84
  snapshot and seeded in one transaction by the app's fixture `seed`, which
84
85
  restores any migration-owned baseline rows the app needs. Every server serves
85
- the production build. When the run stops, the launcher drops the numbered copies
86
- it made, after its servers stop; `BROWSER_TEST_DB_NAME` and the snapshot stay. Both refuse the application's database (`DB_NAME`,
86
+ the production build. When the run stops, the launcher stops its servers;
87
+ `BROWSER_TEST_DB_NAME`, its copies and the snapshot stay for the next run, which restores them. Both refuse the application's database (`DB_NAME`,
87
88
  `DATABASE_URL`'s, the Knex connection's), `STAGING_DB_NAME`,
88
89
  `PRODUCTION_DB_NAME` and the other test database and its copies. Provision `TEST_DB_NAME`, `BROWSER_TEST_DB_NAME` and
89
90
  their numbered copies with grants for the application account (a `<app>_%`
@@ -9,7 +9,7 @@
9
9
  "test": "jskit test --databases"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/database-runtime": "0.1.290",
13
- "@jskit-ai/database-runtime-mysql": "0.1.288"
12
+ "@jskit-ai/database-runtime": "0.1.292",
13
+ "@jskit-ai/database-runtime-mysql": "0.1.290"
14
14
  }
15
15
  }
@@ -9,7 +9,7 @@
9
9
  "test": "jskit test --databases"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/database-runtime": "0.1.290",
13
- "@jskit-ai/database-runtime-postgres": "0.1.287"
12
+ "@jskit-ai/database-runtime": "0.1.292",
13
+ "@jskit-ai/database-runtime-postgres": "0.1.289"
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.58",
6
- "@jskit-ai/shell-web": "0.2.55"
5
+ "@jskit-ai/realtime": "0.2.59",
6
+ "@jskit-ai/shell-web": "0.2.56"
7
7
  }
8
8
  }
@@ -10,9 +10,9 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.59",
13
+ "@jskit-ai/crud-core": "0.2.61",
14
14
  "@jskit-ai/resource-crud-core": "0.1.228",
15
- "@jskit-ai/users-core": "0.2.70"
15
+ "@jskit-ai/users-core": "0.2.72"
16
16
  },
17
17
  "jskit": {
18
18
  "kind": "runtime",