@jskit-ai/agent-docs 0.1.351 → 0.1.353

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 (52) hide show
  1. package/guide/agent/app-extras/assistant-conversation.md +63 -5
  2. package/guide/agent/app-extras/assistant-voice.md +38 -21
  3. package/guide/agent/app-setup/database-layer.md +26 -0
  4. package/guide/agent/app-setup/upgrading-jskit.md +15 -3
  5. package/guide/agent/framework/data-access.md +19 -5
  6. package/guide/agent/framework/material-3.md +3 -3
  7. package/guide/agent/framework/ui-operations.md +8 -5
  8. package/package.json +1 -1
  9. package/patterns/minimal-foundation/example/AGENTS.md +4 -0
  10. package/patterns/minimal-foundation/example/package.json +3 -3
  11. package/patterns/shell-foundation/example/AGENTS.md +4 -0
  12. package/patterns/shell-foundation/example/package.json +4 -4
  13. package/reference/autogen/PATTERN_INDEX.md +35 -35
  14. package/reference/autogen/packages/assistant-core.md +12 -3
  15. package/reference/autogen/packages/assistant-voice-sherpa.md +34 -5
  16. package/reference/autogen/packages/assistant-voice.md +61 -16
  17. package/reference/autogen/packages/database-runtime.md +25 -1
  18. package/reference/autogen/packages/http-runtime.md +2 -0
  19. package/reference/autogen/packages/http-web.md +6 -5
  20. package/reference/autogen/packages/material-web.md +10 -4
  21. package/reference/autogen/packages/resource-runtime.md +1 -0
  22. package/reference/autogen/packages/shell-web.md +1 -1
  23. package/reference/autogen/tooling/jskit-catalog.md +6 -0
  24. package/reference/autogen/tooling/jskit-release.md +12 -5
  25. package/skills/jskit/SKILL.md +4 -1
  26. package/skills/jskit/references/data-access.md +19 -5
  27. package/skills/jskit/references/database-layer.md +26 -0
  28. package/skills/jskit/references/heuristics/INDEX.md +1 -1
  29. package/skills/jskit/references/heuristics/client-requests.md +3 -2
  30. package/skills/jskit/references/heuristics/ui-testing.md +15 -15
  31. package/skills/jskit/references/material-3.md +3 -3
  32. package/skills/jskit/references/pattern-index.md +35 -35
  33. package/skills/jskit/references/patterns/app/minimal-foundation/example/AGENTS.md +4 -0
  34. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +3 -3
  35. package/skills/jskit/references/patterns/app/shell-foundation/example/AGENTS.md +4 -0
  36. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +4 -4
  37. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
  38. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  39. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
  40. package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +1 -1
  41. package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookEditPage.vue +0 -1
  42. package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookListPage.vue +0 -1
  43. package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookViewPage.vue +0 -1
  44. package/skills/jskit/references/patterns/database/mysql-application/PATTERN.md +4 -2
  45. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
  46. package/skills/jskit/references/patterns/database/postgres-application/PATTERN.md +3 -1
  47. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
  48. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  49. package/skills/jskit/references/patterns/shell/application-shell/PATTERN.md +5 -3
  50. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
  51. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +4 -4
  52. package/skills/jskit/references/ui-operations.md +8 -5
@@ -1715,6 +1715,17 @@ effect. A call keeps its originating context and admission across steering;
1715
1715
  saved-result retry verifies that same original turn/message. Hosts retain their
1716
1716
  own exact resource/version fences and action policy. Bound conversations without
1717
1717
  this explicit facility keep their existing common-runtime behavior.
1718
+ A refusal the mapper throws with a 4xx status (an `AppError(403, ...)` when the
1719
+ person may not act, or no longer may) comes back to the model as that call's
1720
+ error, `{ ok: false, error: { code, message, status } }`: the call is recorded
1721
+ `not-executed` with it, nothing runs, and the turn goes on, so the model can say
1722
+ why or try something else. A replay of a recorded call is refused the same way
1723
+ and keeps its recorded result. A stale message
1724
+ (`conversation_application_tool_message_stale`,
1725
+ `conversation_native_completion_message_stale`), a stopped turn and any other
1726
+ failure still end the turn. Direct `createConversationTools()` callers choose
1727
+ this with `contextRefusalsAreResults: true`; without it every mapper error ends
1728
+ the turn.
1718
1729
  The frozen admission also exposes `nativeThreadId`, captured from the native
1719
1730
  owner's pre-dispatch identity when that request is accepted. It is not taken
1720
1731
  from authored input or application data. Check both `nativeThreadId` and
@@ -2989,6 +3000,15 @@ Supply the environment variable names carrying the runtime token and command
2989
3000
  hash. `capture()` records the leader's start time; `inspect()` checks the leader
2990
3001
  and marked descendant groups; `stop()` rechecks ownership before signalling and
2991
3002
  escalation. Ambiguous or unreadable ownership does not authorize signalling.
3003
+ A process table that cannot be read (`/proc` on Linux, `ps` on macOS), or a
3004
+ process in it whose stat or environment read fails for any reason but its
3005
+ having gone or belonging to another user, refuses the check: `inspect()` is
3006
+ `ambiguous` with `processTableError` naming the error, and `stop()` returns
3007
+ it with `processExitVerified: false`. The Codex runtime then neither reuses
3008
+ nor replaces its earlier app-server: `ensure` fails with
3009
+ `<errorPrefix>codex_app_server_process_identity_unreadable`, retryable. An
3010
+ ambiguous group whose table was read, such as one whose members are still
3011
+ settling, stays reusable.
2992
3012
  The caller must validate its persisted metadata contract before requesting these
2993
3013
  operations and must retain managed-execution authority where one exists. This
2994
3014
  facility leaves native server sharing and conversation lifetime to their owners.
@@ -3553,9 +3573,24 @@ also enters the fence when nothing began it. Once the fence is set, a Claude
3553
3573
  or OpenCode turn that ends on its own is left to the next server like one the
3554
3574
  shutdown stops: Claude's saved record keeps the execution and the active turn,
3555
3575
  and OpenCode marks the turn `stoppedByShutdown` (a temporary conversation's
3556
- turn ends interrupted and `afterClose` receives `stoppedByShutdown: true`), so
3557
- the next server records the turn interrupted and runs the host's checkpoint
3558
- once.
3576
+ turn ends interrupted and `afterClose` receives `stoppedByShutdown: true`).
3577
+ The next server decides how such a turn ended from the provider's own history,
3578
+ read once the turn's process is gone, and runs the host's checkpoint once: the
3579
+ turn is completed, through the host's completed checkpoint, when that history
3580
+ holds the turn's answer, and interrupted otherwise. For Claude the answer is
3581
+ the session file's last message, with `stop_reason` `"end_turn"` (Claude Code
3582
+ saves no result frame; it saves the answer before it reports the result),
3583
+ following the turn's latest prompt (the saved `lastMessageId`, else the turn's
3584
+ own) and then its first, with no input queued after it, no API error, no
3585
+ unfinished goal, and an end reported for every background task the turn
3586
+ started. For OpenCode it is the history's last message: the run's assistant
3587
+ answer, completed with finish `"stop"`, without an error and with text; an
3588
+ answer that finished with tool calls is not one. A history that is unreadable,
3589
+ ends mid-frame or lacks that answer leaves the turn interrupted. A temporary
3590
+ OpenCode read reports such a run `completed` and calls
3591
+ `ended({ outcome: "completed" })` (`ended` receives the read's `outcome` either
3592
+ way), so the host makes the matching checkpoint. Codex's next server already
3593
+ reads Codex's thread, where a turn Codex lists as completed completes.
3559
3594
  A running Codex app-server keeps the credentials it started with. A Codex turn
3560
3595
  whose OpenAI credentials were rejected after a sign-out or account switch
3561
3596
  (ChatGPT's token-refresh failure, or a 401 from OpenAI) ends with "Codex (OpenAI)
@@ -4194,12 +4229,35 @@ unbounded. A request abort retires the local request; interrupt a running native
4194
4229
  turn with `turn/interrupt` when cancellation must stop provider work.
4195
4230
 
4196
4231
  `prepareCodexModelCatalog({ command, runtimeDir, bundled, additionalModels,
4197
- codexHome, signal })` from the same entry point exports a runtime's
4232
+ codexHome, signal, env, cwd })` from the same entry point exports a runtime's
4198
4233
  `models.json` with the CLI's `debug models` and reuses it until its revision
4199
4234
  changes: the absolute command's file identity, `bundled`, `additionalModels`, or
4200
4235
  the metadata of `auth.json` and `config.toml` in `codexHome` (default
4201
4236
  `CODEX_HOME`, then `~/.codex`). A bare command name exports every time. Isolated
4202
- tests pass their own `codexHome`.
4237
+ tests pass their own `codexHome`. `env` is the exporter's environment and `cwd`
4238
+ its working directory when they are not this process's.
4239
+
4240
+ Every app-server start passes its exported catalogue as its last
4241
+ `-c model_catalog_json=...`; without one, Codex's model manager fetches the
4242
+ provider's model list (chatgpt.com for OpenAI) before each `turn/start` and
4243
+ `thread/resume`. A managed start's leader (`runCodexAppServerProcess`) exports
4244
+ it. A Helper start, which has no leader, exports the binary's bundled
4245
+ definitions, which fetch nothing, with a copied provider home's rows, in the
4246
+ Helper's own home and environment and with that home as its working directory,
4247
+ so the export reads no project's configuration from wherever the server runs,
4248
+ and refuses to start (`codex_helper_runtime_start_failed`) when that export
4249
+ fails. A Helper's files (its home, which holds the copied provider home, its
4250
+ workspace and log, `models.json` and `models.revision`) last only as long as
4251
+ its runtime. Its stop removes the runtime directory. A start whose Helper home
4252
+ or workspace cannot be created, whose provider home cannot be copied or whose
4253
+ export fails removes them, never the socket or metadata, and sets the refusal's
4254
+ `cleanupRequired` when it could not. A start that fails after its launch
4255
+ removes them once its process is proved gone. A managed runtime keeps its
4256
+ catalogue for its next start. Every start checks the
4257
+ runtime's socket before it changes anything in the runtime directory: a socket
4258
+ whose owner it has not proved gone refuses the start
4259
+ (`codex_app_server_socket_owner_unverified`) and leaves that owner's files as
4260
+ they were.
4203
4261
 
4204
4262
  The original public import contracts remain available alongside these host and
4205
4263
  testing surfaces. `/server/codex-client` exports `CodexAppServerJsonRpcClient`
@@ -346,7 +346,8 @@ registerVoiceProxyRoute(fastify, {
346
346
  ```
347
347
 
348
348
  Import `registerVoiceProxyRoute` and `resolveVoiceProxyConfig` from that server
349
- entrypoint. The endpoint and protected token file are operator inputs. The
349
+ entrypoint. The endpoint and token are operator inputs: a protected
350
+ `accessTokenFile`, or the value as `accessToken`, never both. The
350
351
  application supplies the illustrated origin and conversation checks; authorization
351
352
  runs before connecting upstream. No service key or token belongs in browser code.
352
353
  A speech grant does not authorize access to a conversation or execution of tools.
@@ -357,12 +358,19 @@ Socket.IO, so Fastify does not close that connection as an unknown speech route.
357
358
  Other upgrades remain with their application routes and authorization. The
358
359
  application does not need a separate upgrade handler.
359
360
 
360
- `createVoiceDaemon({ engine, accessKey, ... })` supplies the bounded service.
361
- The engine owns recognition and asynchronous synthesis. A host may supply its
362
- own `authorize(token)` and `handleRequest(request, response)` grant policy.
363
- Principals contain `tenant` and optional `parentTenant`; connection limits apply
364
- to both. `revokeTenant(id)` terminates existing sessions and queued work. The
365
- host's authorizer must also reject subsequent use of a revoked grant.
361
+ `createVoiceDaemon({ engine, credentialsFile, ... })` supplies the bounded
362
+ service; the engine owns recognition and asynchronous synthesis. The speech
363
+ service is run by its host like a database, and each application is a client
364
+ of it with its own token. The host's credentials file lists the clients by name
365
+ with the SHA-256 of each token (`jskit.assistant-voice.credentials.v1`; the
366
+ package README has the format), and the service checks it every second: a
367
+ removed token's sessions end with `voice_access_revoked`, an added client
368
+ connects without a restart, and `/health` reports the `credentialsSha256` in use
369
+ once revoked sessions have ended. `GET /v1/catalogue` (with a token) lists the
370
+ recognition models and voices; `/health` stays open and names the protocol and
371
+ package versions. One JSON line per connection (client, start, end, audio
372
+ seconds heard, characters spoken, how it closed; never audio or words) and per
373
+ credentials change is written to standard output.
366
374
 
367
375
  ## Native service and configurable voices
368
376
 
@@ -374,23 +382,31 @@ in npm. Preparation verifies pinned archives and installed files.
374
382
  ```sh
375
383
  npx jskit-assistant-voice prepare --models-root /srv/speech/models --pack cori
376
384
  npx jskit-assistant-voice verify --models-root /srv/speech/models
377
- npx jskit-assistant-voice serve --models-root /srv/speech/models --key-file /run/secrets/speech-key
385
+ npx jskit-assistant-voice serve --models-root /srv/speech/models --credentials-file /srv/speech/credentials.json
378
386
  ```
379
387
 
380
- The signing key is an operator-created random secret of at least 32 bytes in a
381
- protected file. `jskit-assistant-voice token --key-file PATH --tenant NAME` emits
382
- an application token; redirect it into a separate protected file. The standalone
383
- token command does not implement a revocation store. Service defaults are
384
- `127.0.0.1:3092`, `/v1/voice` and readiness at `/health`.
388
+ `createVoiceClientToken()` and `voiceTokenSha256(token)` from
389
+ `@jskit-ai/assistant-voice/server` make a client's token and the hash its
390
+ credentials entry holds; the client's server keeps the token in a protected
391
+ file. Service defaults are `127.0.0.1:3092`, `/v1/voice`, `/v1/catalogue`,
392
+ `/voices` and readiness at `/health`. Recognition and synthesis each run in a
393
+ pool of processes, one per CPU unless `--workers`, `--recognition-workers` or
394
+ `--synthesis-workers` says otherwise, and the connection limits are sized from
395
+ the pools. `--hotwords-file` adds a host's words to JSKIT's 48 recognizer
396
+ hotwords; `--spellings-file` (one `spoken phrase => Written form` per line) adds
397
+ a host's spellings to JSKIT's, a host's winning on a clash. A host's tests run the
398
+ real service with no model through `runVoiceCli(argv, { createEngine })` and
399
+ `createStandInSpeechEngine` from `@jskit-ai/assistant-voice/stand-in`.
385
400
 
386
401
  The `cori` preparation preset supplies one English voice. `piper` adds Alba
387
402
  (female, Scottish English), Joe and Bryce (male, American English) and
388
403
  Northern English (male, British English), retaining
389
404
  Cori (female, British English) as the default. These are separate Piper medium
390
- models; one synthesis worker retains only the selected model. Changing models
391
- releases the previous worker and its native caches before loading the next, while
392
- recognition and the connection stay running. The first reply after a change
393
- includes loading time. Extra choices require disk space, not resident model RAM.
405
+ models; each synthesis worker retains one model, and a reply prefers an idle
406
+ worker that already has its model. Changing a worker's model releases its
407
+ previous process and native caches before loading the next, while recognition
408
+ and the connection stay running. The first reply after a change includes loading
409
+ time. Resident model RAM grows with the synthesis worker count, not the choices.
394
410
  The native engine advertises a bounded 120-second first-audio allowance at each
395
411
  new phrase's acquired queue slot: its unchanged load and generation requests each
396
412
  have a 60-second deadline. The browser returns to its original 20-second progress
@@ -409,7 +425,7 @@ the same Sherpa worker and 24,000 Hz output; benchmark CPU latency before choosi
409
425
  it as a default. The original full-size `kokoro` preset remains available.
410
426
  `piper-kitten-kokoro-q8f16` retains Piper's five voices/default Cori and Kitten's
411
427
  eight unchanged IDs/speeds, adding the 28 Kokoro choices (41 total). Kokoro files
412
- are namespaced separately. Existing single-worker model switching releases the
428
+ are namespaced separately. Each worker's model switching releases its
413
429
  previous native model, and the original combined-pack resampler keeps 22,050 Hz
414
430
  output. Saved Piper/Kitten voice choices remain valid.
415
431
  All presets use the English streaming
@@ -419,7 +435,8 @@ for native recognition/synthesis settings, voice IDs, labels and speaker IDs.
419
435
  `recognitionVocabulary` maps literal phrases to application spellings, for example
420
436
  `{ "acme labs": "Acme Labs" }`. It applies when normalizing uppercase recognition;
421
437
  mixed-case input remains intact. CLI hosts can supply the same option as a
422
- default, overridden by an explicit speech configuration vocabulary.
438
+ default, overridden by an explicit speech configuration vocabulary; a
439
+ `--spellings-file` adds to either.
423
440
  A voice's optional `speed` sets its synthesis pace from `0.5` to `2`, default `1`.
424
441
  Multiple native models use a `synthesizers` map and a `modelId` on each voice;
425
442
  their output sample rates must match unless `outputSampleRate` configures a shared
@@ -429,8 +446,8 @@ Jasper, Bruno, Hugo and Leo (male). All eight share one model. Bella uses
429
446
  `speed: 1.15`; the others use normal speed. Their upstream catalogue does not
430
447
  identify British or Australian accents.
431
448
  `piper-kitten` lists Kitten before the five Piper voices, defaults to Cori and
432
- normalizes output to 22,050 Hz. One synthesis model remains resident across
433
- engine changes. The settings cog lists installed voices.
449
+ normalizes output to 22,050 Hz. Each synthesis worker keeps one model resident
450
+ across engine changes. The settings cog lists installed voices.
434
451
  The package README documents the exact source manifest and configuration fields.
435
452
  Stop the service before replacing its prepared pack, verify it, then restart.
436
453
 
@@ -383,6 +383,14 @@ the application's `knexfile.js`:
383
383
  Every file starts from the snapshot, rows included: a copy an earlier file of
384
384
  the run used is restored before the next file takes it, so no file sees what
385
385
  another wrote.
386
+ - When the run ends, whether its test files passed, failed or were stopped
387
+ (Ctrl-C, `SIGTERM`), or its foreign key check failed before the first file,
388
+ it drops the numbered copies it made and says so
389
+ (`jskit test: dropped the run's 3 numbered test database(s).`); the next run
390
+ makes them afresh from the snapshot. `TEST_DB_NAME` and the snapshot stay, so
391
+ a later run in the same tree restores them instead of replaying the
392
+ migrations. Only the copies the run made are dropped, and none a session is
393
+ connected to, such as another run's: the run names each copy it kept and why.
386
394
  - The snapshot holds the schema as the engine reports it and the rows the
387
395
  migrations wrote, including the migration ledger. On MySQL and MariaDB it is
388
396
  each table's `SHOW CREATE TABLE` and rows, in
@@ -446,6 +454,13 @@ the app's `knexfile.js`) reaches that worker's copy. The copies (`<name>`, `<nam
446
454
  transaction each, so stale rows never survive a run and the migrations are
447
455
  replayed only when one changes. It refuses the application's database,
448
456
  `STAGING_DB_NAME`, `PRODUCTION_DB_NAME`, `TEST_DB_NAME` and their copies.
457
+ When the run stops (Playwright's `SIGTERM`, Ctrl-C, or a start that failed), the
458
+ launcher stops its servers, whose sessions keep their copies, then drops the
459
+ numbered copies the `prepare` module made and says so
460
+ (`[browser-tests] dropped the run's 3 numbered test database(s).`), all within
461
+ the 10 s Playwright gives its webServer; `BROWSER_TEST_DB_NAME` and the snapshot
462
+ stay. `prepareTestDatabases()` itself drops the copies it made when it throws,
463
+ for a Node or a browser run alike.
449
464
 
450
465
  Give disposable integration and migration tests their own `TEST_DB_NAME`;
451
466
  the two names, and their copies, must differ, and the application account
@@ -462,3 +477,14 @@ host serves it, starts no second server, and restores normal Preview after the
462
477
  batch. Database isolation alone does not
463
478
  disable email, payments or other external effects: configure those test controls
464
479
  and verify the actual server identity before destructive requests.
480
+
481
+ A host's browser test target, such as a Vibe64 Outputs target with
482
+ ``- Data: `test` ``, runs `jskit browser-test-server <host> <port>`: one worker's
483
+ server of the app's own `browserTestConfig()`, on the production build, with the
484
+ database its `prepare` module gives that worker (`BROWSER_TEST_DB_NAME` itself in
485
+ the database patterns), its test-only `env` and `APP_ENV=test`, on the host's
486
+ address. The JSKIT Stack piece declares that target as `test-app`, so
487
+ `vibe64-helper playwright --target test-app npm-run test:e2e` runs the app's
488
+ suite against its own test database from the first commit. The target signs
489
+ nothing in; the host supplies the suite's login state through the target's
490
+ Preview identity, the same command as the normal target's.
@@ -188,6 +188,15 @@ The check fails when:
188
188
  (`manifest/capabilities`, see
189
189
  [Package manifest](/guide/framework/typed-features#package-manifest)).
190
190
 
191
+ Each refusal names its fix. A JSKIT pin that is not the installed catalog's,
192
+ and an installed JSKIT copy newer than the lockfile at the version the catalog
193
+ names (a JSKIT source under development in place of the published copy), name
194
+ `npm run jskit:update`: it moves every JSKIT pin to one catalog together. Any
195
+ other installed copy that disagrees with the lockfile names `npm ci`. Never move
196
+ a JSKIT package with `npm install` or `npm update`, and never make the check
197
+ pass with `npm install --no-save`: that puts the published copy back, so the
198
+ check then passes for code the application does not run.
199
+
191
200
  Shared client owners such as the kernel, HTTP runtime, shell, auth web runtime,
192
201
  realtime runtime, and assistant runtime use exact peer dependencies where they
193
202
  must share application state. A partial upgrade can therefore fail during npm
@@ -264,9 +273,12 @@ application:
264
273
  (`CREATEDB` on PostgreSQL). Test files read `DB_NAME`/`TEST_DB_NAME` as
265
274
  given rather than naming the test database themselves, and no longer
266
275
  create, migrate or drop it: the run hands each file a restored copy.
267
- 5. Proves it with a timed full run: `npm test` and `npx playwright test`, every
268
- test passing, the time of each before and after recorded, and the slowest
269
- tests the run lists read.
276
+ 5. Proves it with a timed full run: `npm test` and the whole Playwright suite,
277
+ every test passing, the time of each before and after recorded, and the
278
+ slowest tests the run lists read. Where the host provides a managed browser
279
+ runner, every Playwright suite runs through it from the first run, never
280
+ through `npx playwright test`, `playwright test` or a package script such
281
+ as `npm run test:e2e`. Elsewhere the suite is `npx playwright test`.
270
282
 
271
283
  ## Cache built assets for good
272
284
 
@@ -1983,11 +1983,25 @@ nothing never passes: "The path sent no statement at any size" means pass
1983
1983
 
1984
1984
  A package's own data test that creates its tables in the test takes its Knex
1985
1985
  from `createPackageTestKnex(t, { environment: process.env })` (from
1986
- `@jskit-ai/resource-runtime/test`): an in-memory SQLite database, or on a
1987
- `DB_CLIENT=pg` run a schema of the test's own in `TEST_DB_NAME`, dropped after
1988
- it. The same file then proves its locks, many-row writes and upserts on
1989
- PostgreSQL too; compare counts with `Number()` (PostgreSQL answers them as
1990
- strings) and ids with `String()`.
1986
+ `@jskit-ai/resource-runtime/test`), on the run's `DB_CLIENT`: an in-memory
1987
+ SQLite database when it is neither `pg` nor `mysql2`; on `pg` a schema of the
1988
+ test's own in `TEST_DB_NAME`; on `mysql2` one of `TEST_DB_NAME`'s 26 lettered
1989
+ copies, `<TEST_DB_NAME>_a` to `_z`, the first no other test holds, recreated
1990
+ empty. A test holds its copy with a lock on the database server named after
1991
+ it, so tests at once, in this run or another tree's, never share one, and a
1992
+ test whose process dies gives its copy up; in a file `jskit test --databases`
1993
+ gave a numbered copy, the lettered copies are the run's designated database's.
1994
+ Either is dropped after the test, so files run at once, on MySQL and MariaDB as
1995
+ on SQLite, and an application on MySQL or MariaDB needs no SQLite driver. There
1996
+ the database user needs all privileges on the 26 lettered copies, by name or at
1997
+ once (`` `<TEST_DB_NAME>\__`.* ``), beside the numbered copies a
1998
+ `jskit test --databases` run makes; with all 26 held a test waits up to a
1999
+ minute for one, then fails, as a refused copy does, naming the grant. An
2000
+ application's own test fixture that uses these copies too claims one the same
2001
+ way, `GET_LOCK('<copy>', 0)` on a session it keeps while it uses the copy, so
2002
+ the two never share one. The same file then proves its locks, many-row writes and
2003
+ upserts on PostgreSQL, MySQL and MariaDB too; compare counts with `Number()`
2004
+ (PostgreSQL answers them as strings) and ids with `String()`.
1991
2005
 
1992
2006
  `createTestResourceRuntime({ knex })` gives a test the resource runtime its
1993
2007
  features own their tables through: `runtime.own(featureId, [resource])`
@@ -198,10 +198,10 @@ never "Back" or a back arrow.
198
198
  `createVuetify(createMaterialVuetifyOptions(theme))` with
199
199
  `createMaterialVuetifyOptions` from `@jskit-ai/material-web/client`, importing
200
200
  `@jskit-ai/material-web/client/material.css`. JSKIT generates the light and
201
- dark schemes from the seed at startup (every role in kebab-case such as
201
+ dark schemes from the seed (every role in kebab-case such as
202
202
  `surface-container-low`, plus success, warning and info with their
203
- containers), with
204
- `defaultTheme: "system"` so the person's light, dark or system preference
203
+ containers) once per seed and colours, which a browser keeps for its next
204
+ start, with `defaultTheme: "system"` so the person's light, dark or system preference
205
205
  applies. The `md3` blueprint and JSKIT's Material 3 Vuetify defaults live in
206
206
  material-web; an app keeps no defaults file and never hand-picks a colour. The
207
207
  seed is the only hex value.
@@ -88,15 +88,18 @@ main-menu destinations show no arrow, a reload keeps the trail, and Save or
88
88
  Cancel never leaves the form in it. Find a field by its exact label:
89
89
  `page.getByLabel("Email", { exact: true })`.
90
90
 
91
- A managed host owns its browser and may provide
92
- `PLAYWRIGHT_STORAGE_STATE`; never print or commit that value, bypass it,
93
- or install another browser. If tests run signed out despite that state, report
94
- the host defect with evidence and stop; never rewrite its cookies or add a login.
91
+ Where the host provides a managed browser runner, every Playwright suite runs
92
+ through it from the first run, never through `npx playwright test`,
93
+ `playwright test` or a package script such as `npm run test:e2e`. The host owns
94
+ its browser and may provide `PLAYWRIGHT_STORAGE_STATE`; never print or commit
95
+ that value, bypass it, or install another browser. If tests run signed out
96
+ despite that state, report the host defect with evidence and stop; never
97
+ rewrite its cookies or add a login.
95
98
  For explicitly enabled direct-local auth, use
96
99
  `loginAsExistingUser()` from `@jskit-ai/auth-web/test/playwright`; never expose
97
100
  the exchange secret to browser code, URLs, or client environment.
98
101
 
99
- Run the narrow test directly:
102
+ Without a managed runner, run the narrow test directly:
100
103
 
101
104
  ```bash
102
105
  npx playwright test <test-file> -g "<changed behavior>"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/agent-docs",
3
- "version": "0.1.351",
3
+ "version": "0.1.353",
4
4
  "description": "Distributed JSKIT agent references, prompts, guides, and generated reference maps.",
5
5
  "type": "module",
6
6
  "files": [
@@ -38,6 +38,10 @@ Before implementation, read the narrow relevant source pattern completely. If
38
38
  its owner package is installed, prefer that version-matched package-owned copy.
39
39
  Do not install an unrelated runtime package only to read documentation.
40
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
+
41
45
  Before adding or changing browser-test setup, read the browser verification
42
46
  guide at
43
47
  `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`.
@@ -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.33",
38
- "@jskit-ai/material-web": "0.1.9",
38
+ "@jskit-ai/material-web": "0.1.10",
39
39
  "@tanstack/vue-query": "^5.101.0",
40
40
  "fastify": "^5.12.7",
41
41
  "pino": "^10.3.1",
@@ -44,13 +44,13 @@
44
44
  "vue": "^3.5.44",
45
45
  "vue-router": "^5.3.1",
46
46
  "vuetify": "^4.3.0",
47
- "@jskit-ai/http-runtime": "0.2.33",
47
+ "@jskit-ai/http-runtime": "0.2.34",
48
48
  "@fastify/fast-json-stringify-compiler": "^5.1.0",
49
49
  "@vue/devtools-api": "^8.2.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@jskit-ai/config-eslint": "0.1.252",
53
- "@jskit-ai/jskit-catalog": "0.2.103",
53
+ "@jskit-ai/jskit-catalog": "0.2.105",
54
54
  "@playwright/test": "1.61.1",
55
55
  "@vitejs/plugin-vue": "^6.0.7",
56
56
  "eslint": "^10.8.0",
@@ -38,6 +38,10 @@ Before implementation, read the narrow relevant source pattern completely. If
38
38
  its owner package is installed, prefer that version-matched package-owned copy.
39
39
  Do not install an unrelated runtime package only to read documentation.
40
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
+
41
45
  Before adding or changing browser-test setup, read the browser verification
42
46
  guide at
43
47
  `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`.
@@ -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.33",
38
- "@jskit-ai/material-web": "0.1.9",
38
+ "@jskit-ai/material-web": "0.1.10",
39
39
  "@tanstack/vue-query": "^5.101.0",
40
40
  "fastify": "^5.12.7",
41
41
  "pino": "^10.3.1",
@@ -44,14 +44,14 @@
44
44
  "vue": "^3.5.44",
45
45
  "vue-router": "^5.3.1",
46
46
  "vuetify": "^4.3.0",
47
- "@jskit-ai/http-runtime": "0.2.33",
48
- "@jskit-ai/shell-web": "0.2.49",
47
+ "@jskit-ai/http-runtime": "0.2.34",
48
+ "@jskit-ai/shell-web": "0.2.50",
49
49
  "@fastify/fast-json-stringify-compiler": "^5.1.0",
50
50
  "@vue/devtools-api": "^8.2.1"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@jskit-ai/config-eslint": "0.1.252",
54
- "@jskit-ai/jskit-catalog": "0.2.103",
54
+ "@jskit-ai/jskit-catalog": "0.2.105",
55
55
  "@playwright/test": "1.61.1",
56
56
  "@vitejs/plugin-vue": "^6.0.7",
57
57
  "eslint": "^10.8.0",