@jskit-ai/agent-docs 0.1.131 → 0.1.132

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 (170) hide show
  1. package/guide/agent/app-extras/assistant.md +29 -605
  2. package/guide/agent/app-extras/mobile-capacitor.md +29 -362
  3. package/guide/agent/app-extras/realtime.md +29 -277
  4. package/guide/agent/app-setup/a-more-interesting-shell.md +44 -815
  5. package/guide/agent/app-setup/authentication.md +43 -1073
  6. package/guide/agent/app-setup/console.md +26 -298
  7. package/guide/agent/app-setup/database-layer.md +110 -790
  8. package/guide/agent/app-setup/initial-scaffolding.md +50 -784
  9. package/guide/agent/app-setup/multi-homing.md +39 -712
  10. package/guide/agent/app-setup/quickstart.md +43 -179
  11. package/guide/agent/app-setup/users.md +34 -353
  12. package/guide/agent/index.md +16 -23
  13. package/package.json +2 -2
  14. package/patterns/INDEX.md +7 -7
  15. package/patterns/child-cruds.md +3 -3
  16. package/patterns/client-requests.md +6 -6
  17. package/patterns/crud-authoring.md +94 -0
  18. package/patterns/crud-links.md +1 -1
  19. package/patterns/feature-package/PATTERN.md +108 -0
  20. package/patterns/feature-package/example/booking-engine/package.json +48 -0
  21. package/patterns/feature-package/example/booking-engine/src/server/BookingEngineProvider.js +33 -0
  22. package/patterns/feature-package/example/booking-engine/src/server/actions.js +26 -0
  23. package/patterns/feature-package/example/booking-engine/src/server/inputSchemas.js +19 -0
  24. package/patterns/feature-package/example/variations/AvailabilityEngineProvider.js +31 -0
  25. package/patterns/feature-package/example/variations/InvoiceRollupProvider.js +36 -0
  26. package/patterns/feature-package/example/variations/customKnexRepository.js +34 -0
  27. package/patterns/feature-package/example/variations/orchestratorService.js +23 -0
  28. package/patterns/filters.md +8 -8
  29. package/patterns/live-actions.md +5 -18
  30. package/patterns/minimal-foundation/PATTERN.md +98 -0
  31. package/patterns/minimal-foundation/example/.nvmrc +1 -0
  32. package/patterns/minimal-foundation/example/AGENTS.md +17 -0
  33. package/patterns/minimal-foundation/example/Procfile +2 -0
  34. package/patterns/minimal-foundation/example/app.json +14 -0
  35. package/patterns/minimal-foundation/example/bin/develop.js +71 -0
  36. package/patterns/minimal-foundation/example/bin/server.js +8 -0
  37. package/patterns/minimal-foundation/example/config/public.js +40 -0
  38. package/patterns/minimal-foundation/example/config/server.js +1 -0
  39. package/patterns/minimal-foundation/example/config/surfaceAccessPolicies.js +3 -0
  40. package/patterns/minimal-foundation/example/eslint.config.mjs +19 -0
  41. package/patterns/minimal-foundation/example/favicon.svg +7 -0
  42. package/patterns/minimal-foundation/example/gitignore +9 -0
  43. package/patterns/minimal-foundation/example/index.html +13 -0
  44. package/patterns/minimal-foundation/example/jsconfig.json +8 -0
  45. package/patterns/minimal-foundation/example/package.json +57 -0
  46. package/patterns/minimal-foundation/example/packages/main/package.json +42 -0
  47. package/patterns/minimal-foundation/example/packages/main/src/shared/index.js +10 -0
  48. package/patterns/minimal-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
  49. package/patterns/minimal-foundation/example/playwright.config.mjs +31 -0
  50. package/patterns/minimal-foundation/example/server/lib/runtimeEnv.js +45 -0
  51. package/patterns/minimal-foundation/example/server/lib/surfaceRuntime.js +10 -0
  52. package/patterns/minimal-foundation/example/server.js +195 -0
  53. package/patterns/minimal-foundation/example/src/App.vue +13 -0
  54. package/patterns/minimal-foundation/example/src/main.js +85 -0
  55. package/patterns/minimal-foundation/example/src/pages/home/index.vue +48 -0
  56. package/patterns/minimal-foundation/example/src/pages/home.vue +13 -0
  57. package/patterns/minimal-foundation/example/src/views/NotFound.vue +13 -0
  58. package/patterns/minimal-foundation/example/tests/client/smoke.vitest.js +7 -0
  59. package/patterns/minimal-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
  60. package/patterns/minimal-foundation/example/tests/server/smoke.test.js +16 -0
  61. package/patterns/minimal-foundation/example/vite.config.mjs +81 -0
  62. package/patterns/page-scaffolding.md +20 -17
  63. package/patterns/placements.md +17 -15
  64. package/patterns/row-policies.md +4 -5
  65. package/patterns/server-search.md +3 -3
  66. package/patterns/shell-foundation/PATTERN.md +104 -0
  67. package/patterns/shell-foundation/example/.nvmrc +1 -0
  68. package/patterns/shell-foundation/example/AGENTS.md +17 -0
  69. package/patterns/shell-foundation/example/Procfile +2 -0
  70. package/patterns/shell-foundation/example/app.json +14 -0
  71. package/patterns/shell-foundation/example/bin/develop.js +71 -0
  72. package/patterns/shell-foundation/example/bin/server.js +8 -0
  73. package/patterns/shell-foundation/example/config/public.js +40 -0
  74. package/patterns/shell-foundation/example/config/server.js +1 -0
  75. package/patterns/shell-foundation/example/config/surfaceAccessPolicies.js +3 -0
  76. package/patterns/shell-foundation/example/eslint.config.mjs +19 -0
  77. package/patterns/shell-foundation/example/favicon.svg +7 -0
  78. package/patterns/shell-foundation/example/gitignore +9 -0
  79. package/patterns/shell-foundation/example/index.html +13 -0
  80. package/patterns/shell-foundation/example/jsconfig.json +8 -0
  81. package/patterns/shell-foundation/example/package.json +59 -0
  82. package/patterns/shell-foundation/example/packages/main/package.json +56 -0
  83. package/patterns/shell-foundation/example/packages/main/src/client/index.js +9 -0
  84. package/patterns/shell-foundation/example/packages/main/src/client/providers/MainClientProvider.js +18 -0
  85. package/patterns/shell-foundation/example/packages/main/src/shared/index.js +10 -0
  86. package/patterns/shell-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
  87. package/patterns/shell-foundation/example/playwright.config.mjs +31 -0
  88. package/patterns/shell-foundation/example/server/lib/runtimeEnv.js +45 -0
  89. package/patterns/shell-foundation/example/server/lib/surfaceRuntime.js +10 -0
  90. package/patterns/shell-foundation/example/server.js +195 -0
  91. package/patterns/shell-foundation/example/src/App.vue +11 -0
  92. package/patterns/shell-foundation/example/src/components/ShellLayout.vue +12 -0
  93. package/patterns/shell-foundation/example/src/components/menus/MenuLinkItem.vue +30 -0
  94. package/patterns/shell-foundation/example/src/components/menus/SurfaceAwareMenuLinkItem.vue +42 -0
  95. package/patterns/shell-foundation/example/src/components/menus/TabLinkItem.vue +42 -0
  96. package/patterns/shell-foundation/example/src/error.js +19 -0
  97. package/patterns/shell-foundation/example/src/main.js +85 -0
  98. package/patterns/shell-foundation/example/src/pages/home/index.vue +116 -0
  99. package/patterns/shell-foundation/example/src/pages/home/settings/general/index.vue +40 -0
  100. package/patterns/shell-foundation/example/src/pages/home/settings/index.vue +7 -0
  101. package/patterns/shell-foundation/example/src/pages/home/settings.vue +109 -0
  102. package/patterns/shell-foundation/example/src/pages/home.vue +20 -0
  103. package/patterns/shell-foundation/example/src/placement.js +56 -0
  104. package/patterns/shell-foundation/example/src/placementTopology.js +149 -0
  105. package/patterns/shell-foundation/example/src/views/NotFound.vue +13 -0
  106. package/patterns/shell-foundation/example/tests/client/smoke.vitest.js +7 -0
  107. package/patterns/shell-foundation/example/tests/e2e/adaptive-shell.spec.ts +10 -0
  108. package/patterns/shell-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
  109. package/patterns/shell-foundation/example/tests/server/smoke.test.js +16 -0
  110. package/patterns/shell-foundation/example/vite.config.mjs +81 -0
  111. package/patterns/ui-contract.md +56 -0
  112. package/patterns/ui-testing.md +10 -12
  113. package/reference/autogen/KERNEL_MAP.md +29 -107
  114. package/reference/autogen/PATTERN_INDEX.md +230 -0
  115. package/reference/autogen/README.md +4 -8
  116. package/reference/autogen/packages/agent-docs.md +259 -0
  117. package/reference/autogen/packages/assistant-core.md +3 -3
  118. package/reference/autogen/packages/assistant-runtime.md +32 -17
  119. package/reference/autogen/packages/auth-core.md +31 -33
  120. package/reference/autogen/packages/auth-provider-local-core.md +4 -12
  121. package/reference/autogen/packages/auth-provider-local-db-core.md +4 -4
  122. package/reference/autogen/packages/auth-provider-supabase-core.md +14 -18
  123. package/reference/autogen/packages/auth-web.md +42 -22
  124. package/reference/autogen/packages/console-core.md +8 -25
  125. package/reference/autogen/packages/console-web.md +5 -5
  126. package/reference/autogen/packages/crud-core.md +61 -17
  127. package/reference/autogen/packages/database-runtime-mysql.md +12 -2
  128. package/reference/autogen/packages/database-runtime-postgres.md +12 -2
  129. package/reference/autogen/packages/database-runtime.md +26 -25
  130. package/reference/autogen/packages/google-rewarded-core.md +19 -104
  131. package/reference/autogen/packages/http-runtime.md +4 -8
  132. package/reference/autogen/packages/http-web.md +32 -0
  133. package/reference/autogen/packages/json-rest-api-core.md +4 -6
  134. package/reference/autogen/packages/kernel.md +109 -390
  135. package/reference/autogen/packages/mobile-capacitor.md +2 -13
  136. package/reference/autogen/packages/realtime.md +29 -26
  137. package/reference/autogen/packages/resource-crud-core.md +6 -0
  138. package/reference/autogen/packages/shell-web.md +69 -54
  139. package/reference/autogen/packages/storage-runtime.md +3 -3
  140. package/reference/autogen/packages/uploads-image-web.md +0 -1
  141. package/reference/autogen/packages/uploads-runtime.md +3 -3
  142. package/reference/autogen/packages/users-core.md +45 -90
  143. package/reference/autogen/packages/users-web.md +5 -7
  144. package/reference/autogen/packages/workspaces-core.md +53 -74
  145. package/reference/autogen/packages/workspaces-web.md +15 -16
  146. package/reference/autogen/tooling/jskit-catalog.md +34 -0
  147. package/reference/autogen/tooling/testUtils.md +4 -4
  148. package/skills/jskit/SKILL.md +34 -29
  149. package/skills/jskit/references/app-operations.md +68 -53
  150. package/skills/jskit/references/crud-operations.md +58 -106
  151. package/skills/jskit/references/material-3.md +1 -1
  152. package/skills/jskit/references/ui-operations.md +41 -44
  153. package/templates/app/AGENTS.md +7 -3
  154. package/guide/agent/app-setup/upgrade-beta-1-to-final.md +0 -252
  155. package/guide/agent/app-setup/working-with-the-jskit-cli.md +0 -325
  156. package/guide/agent/generators/advanced-cruds.md +0 -1935
  157. package/guide/agent/generators/crud-generators.md +0 -948
  158. package/guide/agent/generators/intro.md +0 -65
  159. package/guide/agent/generators/row-policies.md +0 -537
  160. package/guide/agent/generators/ui-generators.md +0 -690
  161. package/patterns/crud-scaffolding.md +0 -198
  162. package/patterns/generated-ui-contract-tracking.md +0 -66
  163. package/reference/autogen/packages/assistant.md +0 -68
  164. package/reference/autogen/packages/crud-server-generator.md +0 -215
  165. package/reference/autogen/packages/crud-ui-generator.md +0 -192
  166. package/reference/autogen/packages/feature-server-generator.md +0 -65
  167. package/reference/autogen/packages/ui-generator.md +0 -127
  168. package/reference/autogen/tooling/create-app.md +0 -317
  169. package/reference/autogen/tooling/jskit-cli.md +0 -933
  170. package/reference/autogen/tooling/test-support.md +0 -27
@@ -12,7 +12,7 @@ Core rule:
12
12
  - repositories may add internal-only filter keys before forwarding the query to JSON REST
13
13
  - structured list filters should use `createCrudListFilterContract(...)` so route/action validators, JSON REST search schema, and repository query normalization are derived from one definition
14
14
 
15
- Fresh generated CRUD repositories already follow this path:
15
+ The standard CRUD repository pattern follows this path:
16
16
 
17
17
  ```js
18
18
  return api.resources.contacts.query({
@@ -31,7 +31,7 @@ The normal layer split is:
31
31
  Use `search: true` on a schema field when:
32
32
  - the public filter key should be the same as the field name
33
33
  - direct field filtering is enough
34
- - you are happy with the generated/effective search entry for that one field
34
+ - you are happy with the effective search entry for that one field
35
35
 
36
36
  Example:
37
37
 
@@ -162,7 +162,7 @@ Append validators separately only for genuinely additional, non-filter query
162
162
  input. Standard view actions use
163
163
  `createStandardCrudViewQueryValidators()`.
164
164
 
165
- For structured list filters, prefer the generated contract shape:
165
+ For structured list filters, prefer the standard contract shape:
166
166
 
167
167
  ```js
168
168
  const receivalListFilterContract = createCrudListFilterContract(
@@ -0,0 +1,104 @@
1
+ ---
2
+ id: app/shell-foundation
3
+ title: Adaptive-shell JSKIT application foundation
4
+ summary: A concrete JSKIT web application foundation with responsive shell navigation, settings, placements, and browser verification.
5
+ keywords: app, foundation, material, navigation, placements, shell, vite, vue
6
+ requires: @jskit-ai/http-runtime, @jskit-ai/kernel, @jskit-ai/shell-web
7
+ ---
8
+
9
+ # Adaptive-shell JSKIT application foundation
10
+
11
+ ## Use when
12
+
13
+ Use this pattern for a new browser application that needs the normal JSKIT
14
+ adaptive shell: responsive navigation, route surfaces, settings, placement
15
+ topology, app-local providers, server/runtime composition, and representative
16
+ browser coverage. It is the normal starting point for a full JSKIT product.
17
+
18
+ The example is a concrete `reading-room` application. An agent may copy it
19
+ directly, adapt a narrow set of files, or use it as evidence while authoring a
20
+ different layout through the same public framework APIs.
21
+
22
+ ## Do not use when
23
+
24
+ Do not impose this tree on an existing application. Do not use it for a
25
+ command-line service, an API-only service, or a product whose navigation model
26
+ is still unknown. Use the minimal foundation when the shell would be
27
+ premature.
28
+
29
+ ## Product decisions
30
+
31
+ Decide the application name, initial surface, navigation vocabulary, public or
32
+ authenticated access, and which settings actually exist. Decide database,
33
+ authentication, tenancy, and domain capabilities separately. The pattern does
34
+ not convert those choices into a generator questionnaire.
35
+
36
+ ## Invariants
37
+
38
+ - Materialize source inside the existing project without disturbing `.git` or
39
+ any existing project/agent context.
40
+ - Inspect and resolve file collisions; never force-overwrite product source.
41
+ - Keep placements and topology explicit and use shell public components.
42
+ - Keep one app-owned `npm run develop` entry that runs the API on loopback and
43
+ Vite on the host-supplied preview port; do not require a host to infer or
44
+ supervise framework-specific processes.
45
+ - Keep `packages/main` as composition and light glue, not a feature dumping
46
+ ground.
47
+ - Preserve accessible navigation, 48px compact interaction targets, warm-cache
48
+ state hydration, skeleton loading, and toast-based transient errors.
49
+ - Use public shell controls in browser tests rather than implementation-detail
50
+ scrims or coordinates.
51
+ - Do not attach generator provenance, receipts, completion state, or replay
52
+ history to copied source.
53
+
54
+ ## Framework APIs
55
+
56
+ The example uses `@jskit-ai/shell-web` for layout, navigation, placement, and
57
+ adaptive shell testing; `@jskit-ai/kernel` for provider/runtime composition;
58
+ and `@jskit-ai/http-runtime` for the server boundary. Application routes,
59
+ placement declarations, surface access, and app-local providers remain normal
60
+ source files.
61
+
62
+ ## Example files
63
+
64
+ `example/` contains the complete reference tree. Rename `example/gitignore` to
65
+ `.gitignore` when copying it to an app. Managed preview identity belongs to the
66
+ authentication surface pattern, not the shell foundation.
67
+
68
+ Read these together before adapting the shell:
69
+
70
+ - `example/src/App.vue`
71
+ - `example/src/components/ShellLayout.vue`
72
+ - `example/src/placement.js`
73
+ - `example/src/placementTopology.js`
74
+ - `example/config/surfaceAccessPolicies.js`
75
+ - `example/src/pages/home.vue`
76
+ - `example/src/pages/home/settings.vue`
77
+ - `example/tests/e2e/adaptive-shell.spec.ts`
78
+
79
+ ## Variation points
80
+
81
+ Rename the example, replace the home content, add or remove settings routes,
82
+ and change placements through their public contracts. Use package-owned
83
+ patterns for auth, users, databases, CRUD, realtime, and other capabilities.
84
+ Do not preinstall capabilities solely because they appear in another app.
85
+
86
+ ## Verification
87
+
88
+ Install the declared packages once, run `npm run develop` for the live
89
+ application, then run lint, server tests, client tests, the production build,
90
+ and the adaptive browser smoke at compact, medium, and expanded viewports.
91
+ Verify navigation through accessible controls and confirm there is no
92
+ horizontal overflow.
93
+
94
+ ## Avoid
95
+
96
+ - Do not run `create-app` or reproduce its options in another command.
97
+ - Do not create a temporary scaffold directory.
98
+ - Do not require `.generated-ui-screen` or another magic class to recognize a
99
+ valid screen.
100
+ - Do not add spinners for ordinary screen loading; use structure-matching
101
+ skeletons.
102
+ - Do not push content down with persistent transient-error banners; use the
103
+ standard toast/error presentation.
104
+ - Do not preserve historical template ownership after copying.
@@ -0,0 +1,17 @@
1
+ # App Agent Instructions
2
+
3
+ Use current project context, JSKIT public APIs, and the installed JSKIT pattern
4
+ index as the source of truth for application work.
5
+
6
+ Recommended references:
7
+
8
+ - `node_modules/@jskit-ai/agent-docs/guide/agent/index.md`
9
+ - `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md`
10
+
11
+ Before database, schema, CRUD, repository, or persistence work, inspect the
12
+ relevant package-owned pattern from
13
+ `node_modules/@jskit-ai/agent-docs/reference/autogen/PATTERN_INDEX.md`.
14
+
15
+ Copied pattern source is ordinary application source. Do not add generator
16
+ provenance, receipts, completion ledgers, or tooling-operation history. Keep
17
+ changes scoped to the user request and verify runtime behavior directly.
@@ -0,0 +1,2 @@
1
+ release: npm run db:migrate
2
+ web: npm run start
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "reading-room",
3
+ "healthchecks": {
4
+ "web": [
5
+ {
6
+ "type": "startup",
7
+ "name": "web-ready",
8
+ "description": "Application responds to /api/health",
9
+ "path": "/api/health",
10
+ "attempts": 6
11
+ }
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1,71 @@
1
+ import { spawn } from "node:child_process";
2
+ import { startServer } from "../server.js";
3
+
4
+ const LOOPBACK_HOST = "127.0.0.1";
5
+
6
+ function requiredPort(value, fallback = 3000) {
7
+ const normalized = String(value || "").trim();
8
+ const parsed = Number.parseInt(normalized || String(fallback), 10);
9
+ if (!Number.isInteger(parsed) || parsed < 1 || parsed > 65_535) {
10
+ throw new Error(`Invalid development port: ${normalized || "(empty)"}.`);
11
+ }
12
+ return parsed;
13
+ }
14
+
15
+ function waitForChild(child) {
16
+ return new Promise((resolve, reject) => {
17
+ child.once("error", reject);
18
+ child.once("exit", (code, signal) => resolve({ code, signal }));
19
+ });
20
+ }
21
+
22
+ const previewHost = String(process.env.HOST || "").trim() || "0.0.0.0";
23
+ const previewPort = requiredPort(process.env.PORT);
24
+ let apiServer = null;
25
+ let viteProcess = null;
26
+ let requestedSignal = "";
27
+
28
+ function requestShutdown(signal) {
29
+ requestedSignal = signal;
30
+ if (viteProcess && !viteProcess.killed) {
31
+ viteProcess.kill(signal);
32
+ }
33
+ }
34
+
35
+ process.once("SIGINT", () => requestShutdown("SIGINT"));
36
+ process.once("SIGTERM", () => requestShutdown("SIGTERM"));
37
+
38
+ try {
39
+ apiServer = await startServer({ host: LOOPBACK_HOST, port: 0 });
40
+ const apiPort = requiredPort(apiServer.server.address()?.port);
41
+ const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
42
+ viteProcess = spawn(
43
+ npmCommand,
44
+ ["run", "dev", "--", "--host", previewHost, "--port", String(previewPort), "--strictPort"],
45
+ {
46
+ cwd: process.cwd(),
47
+ env: {
48
+ ...process.env,
49
+ HOST: previewHost,
50
+ PORT: String(previewPort),
51
+ VITE_API_PROXY_TARGET: `http://${LOOPBACK_HOST}:${apiPort}`,
52
+ VITE_DEV_PORT: String(previewPort)
53
+ },
54
+ stdio: "inherit"
55
+ }
56
+ );
57
+
58
+ const result = await waitForChild(viteProcess);
59
+ if (!requestedSignal && result.code !== 0) {
60
+ throw new Error(
61
+ `Vite development server stopped unexpectedly (${result.signal || `exit ${result.code ?? "unknown"}`}).`
62
+ );
63
+ }
64
+ } catch (error) {
65
+ console.error("Failed to start the development application:", error);
66
+ process.exitCode = 1;
67
+ } finally {
68
+ if (apiServer) {
69
+ await apiServer.close().catch(() => {});
70
+ }
71
+ }
@@ -0,0 +1,8 @@
1
+ import { startServer } from "../server.js";
2
+
3
+ try {
4
+ await startServer();
5
+ } catch (error) {
6
+ console.error("Failed to start reading-room server:", error);
7
+ process.exitCode = 1;
8
+ }
@@ -0,0 +1,40 @@
1
+ import { surfaceAccessPolicies } from "./surfaceAccessPolicies.js";
2
+
3
+ export const config = {};
4
+
5
+ config.surfaceModeAll = "all";
6
+ config.surfaceDefaultId = "home";
7
+ config.webRootAllowed = "no";
8
+ config.surfaceAccessPolicies = surfaceAccessPolicies;
9
+ config.mobile = {
10
+ enabled: false,
11
+ strategy: "",
12
+ appId: "",
13
+ appName: "",
14
+ assetMode: "bundled",
15
+ devServerUrl: "",
16
+ apiBaseUrl: "",
17
+ auth: {
18
+ callbackPath: "/auth/login",
19
+ customScheme: "",
20
+ appLinkDomains: []
21
+ },
22
+ android: {
23
+ packageName: "",
24
+ minSdk: 26,
25
+ targetSdk: 35,
26
+ versionCode: 1,
27
+ versionName: "1.0.0"
28
+ }
29
+ };
30
+ config.surfaceDefinitions = {};
31
+ config.surfaceDefinitions.home = {
32
+ id: "home",
33
+ label: "Home",
34
+ pagesRoot: "home",
35
+ enabled: true,
36
+ requiresAuth: false,
37
+ requiresWorkspace: false,
38
+ accessPolicyId: "public",
39
+ origin: ""
40
+ };
@@ -0,0 +1 @@
1
+ export const config = {};
@@ -0,0 +1,3 @@
1
+ export const surfaceAccessPolicies = {};
2
+
3
+ surfaceAccessPolicies.public = {};
@@ -0,0 +1,19 @@
1
+ import { baseConfig, nodeConfig, vueConfig, webConfig } from "@jskit-ai/config-eslint/server";
2
+
3
+ export default [
4
+ {
5
+ ignores: ["dist/**", "node_modules/**", "coverage/**", "test-results/**", ".jskit/**"]
6
+ },
7
+ {
8
+ files: ["src/pages/**/*.vue"],
9
+ languageOptions: {
10
+ globals: {
11
+ definePage: "readonly"
12
+ }
13
+ }
14
+ },
15
+ ...baseConfig,
16
+ ...vueConfig,
17
+ ...webConfig,
18
+ ...nodeConfig
19
+ ];
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <rect width="64" height="64" rx="12" fill="#111827" />
3
+ <path
4
+ d="M20 16h24v8H28v20c0 6-4 10-10 10h-2v-8h2c2 0 2-1 2-3V16z"
5
+ fill="#22d3ee"
6
+ />
7
+ </svg>
@@ -0,0 +1,9 @@
1
+ node_modules/
2
+ dist/
3
+ coverage/
4
+ test-results/
5
+ # Generated by vue-router/vite on the first dev or build scan.
6
+ src/typed-router.d.ts
7
+ .env
8
+ .env.*
9
+ !.env.example
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
+ <title>Reading Room</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.js"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,8 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "paths": {
5
+ "@/*": ["src/*"]
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "reading-room",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "description": "JSKIT shell-web app (Fastify + Vue)",
7
+ "engines": {
8
+ "node": "26.x"
9
+ },
10
+ "scripts": {
11
+ "server": "node ./bin/server.js",
12
+ "server:all": "node ./bin/server.js",
13
+ "server:home": "SERVER_SURFACE=home node ./bin/server.js",
14
+ "start": "node ./bin/server.js",
15
+ "develop": "node ./bin/develop.js",
16
+ "dev": "vite",
17
+ "dev:all": "vite",
18
+ "dev:home": "VITE_SURFACE=home vite",
19
+ "build": "vite build",
20
+ "build:all": "vite build",
21
+ "build:home": "VITE_SURFACE=home vite build",
22
+ "preview": "vite preview",
23
+ "lint": "eslint .",
24
+ "test": "node --test",
25
+ "test:client": "vitest run tests/client",
26
+ "test:e2e": "playwright test tests/e2e",
27
+ "verify": "npm run lint && npm run test && npm run test:client && npm run build"
28
+ },
29
+ "dependencies": {
30
+ "@local/main": "file:packages/main",
31
+ "@fastify/static": "^10.1.3",
32
+ "@jskit-ai/kernel": "0.1.160",
33
+ "@tanstack/vue-query": "^5.101.0",
34
+ "fastify": "^5.8.5",
35
+ "json-rest-schema": "^1.0.17",
36
+ "pinia": "^3.0.4",
37
+ "vue": "^3.5.38",
38
+ "vue-router": "^5.1.0",
39
+ "vuetify": "^4.1.2",
40
+ "@jskit-ai/http-runtime": "0.1.158",
41
+ "@mdi/js": "^7.4.47",
42
+ "@jskit-ai/shell-web": "0.1.164"
43
+ },
44
+ "devDependencies": {
45
+ "@jskit-ai/agent-docs": "0.1.132",
46
+ "@jskit-ai/config-eslint": "0.1.157",
47
+ "@playwright/test": "1.61.1",
48
+ "@vitejs/plugin-vue": "^6.0.7",
49
+ "eslint": "^10.8.0",
50
+ "vite": "^8.2.1",
51
+ "vite-plugin-vuetify": "^2.1.3",
52
+ "vitest": "^4.1.9"
53
+ },
54
+ "allowScripts": {
55
+ "fsevents@2.3.2": true,
56
+ "fsevents@2.3.3": true,
57
+ "vue-demi@0.14.10": true
58
+ }
59
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@local/main",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "exports": {
7
+ "./client": "./src/client/index.js",
8
+ "./shared": "./src/shared/index.js"
9
+ },
10
+ "description": "App-local runtime composition and lightweight glue.",
11
+ "dependencies": {
12
+ "@jskit-ai/kernel": "0.1.160"
13
+ },
14
+ "jskit": {
15
+ "kind": "runtime",
16
+ "capabilities": {
17
+ "provides": [],
18
+ "requires": []
19
+ },
20
+ "runtime": {
21
+ "client": {
22
+ "providers": [
23
+ {
24
+ "entrypoint": "src/client/providers/MainClientProvider.js",
25
+ "export": "MainClientProvider"
26
+ }
27
+ ]
28
+ }
29
+ },
30
+ "metadata": {
31
+ "jskit": {
32
+ "ownershipGuidance": {
33
+ "title": "App-local main lane",
34
+ "summary": "Keep @local/main focused on app composition and lightweight glue. Substantial server features should become dedicated packages instead of growing inside packages/main.",
35
+ "responsibilities": [
36
+ "packages/main server code: bootstraps app-local configuration and lightweight wiring only",
37
+ "substantial server features: author a dedicated app-local package from the relevant framework pattern",
38
+ "packages/main: do not add service/controller/route/repository feature trees here"
39
+ ],
40
+ "examples": [
41
+ "packages/booking-engine owns booking operations",
42
+ "packages/availability-engine owns availability orchestration"
43
+ ]
44
+ }
45
+ },
46
+ "server": {
47
+ "routes": []
48
+ },
49
+ "ui": {
50
+ "routes": [],
51
+ "elements": [],
52
+ "overrides": []
53
+ }
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Client entrypoint for @local/main.
3
+ *
4
+ * Export browser-facing modules from here.
5
+ *
6
+ * This package contributes its named UI components through one explicit
7
+ * capability provider.
8
+ */
9
+ export { MainClientProvider } from "./providers/MainClientProvider.js";
@@ -0,0 +1,18 @@
1
+ import { defineProvider } from "@jskit-ai/kernel/shared/capabilities";
2
+ import MenuLinkItem from "/src/components/menus/MenuLinkItem.vue";
3
+ import SurfaceAwareMenuLinkItem from "/src/components/menus/SurfaceAwareMenuLinkItem.vue";
4
+ import TabLinkItem from "/src/components/menus/TabLinkItem.vue";
5
+
6
+ const MainClientProvider = defineProvider({
7
+ id: "local.main.client",
8
+ requires: {
9
+ components: "client.components"
10
+ },
11
+ setup({ components }) {
12
+ components.register("local.main.ui.menu-link-item", MenuLinkItem);
13
+ components.register("local.main.ui.surface-aware-menu-link-item", SurfaceAwareMenuLinkItem);
14
+ components.register("local.main.ui.tab-link-item", TabLinkItem);
15
+ }
16
+ });
17
+
18
+ export { MainClientProvider };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Shared entrypoint for code used by both client and server.
3
+ *
4
+ * Keep this for genuinely app-local shared glue only.
5
+ *
6
+ * Example:
7
+ * export * from "./schemas/index.js";
8
+ * export * from "./constants/index.js";
9
+ */
10
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * App-local shared transport validators/resources live here.
3
+ * Dedicated feature packages should keep their own schemas with the feature.
4
+ *
5
+ * Example:
6
+ * import { createSchema } from "json-rest-schema";
7
+ *
8
+ * export const helloQuerySchema = createSchema({
9
+ * name: { type: "string", minLength: 1, maxLength: 80 }
10
+ * });
11
+ *
12
+ * export const helloResponseSchema = {
13
+ * type: "object",
14
+ * additionalProperties: false,
15
+ * required: ["ok", "message"],
16
+ * properties: {
17
+ * ok: { type: "boolean" },
18
+ * message: { type: "string", minLength: 1 }
19
+ * }
20
+ * };
21
+ */
22
+ export {};
@@ -0,0 +1,31 @@
1
+ import { defineConfig } from "@playwright/test";
2
+
3
+ const managedBaseUrl = String(process.env.PLAYWRIGHT_BASE_URL || "")
4
+ .trim()
5
+ .replace(/\/+$/u, "");
6
+ const baseURL = managedBaseUrl || "http://127.0.0.1:4173";
7
+ const storageState = String(process.env.VIBE64_PLAYWRIGHT_STORAGE_STATE || "").trim();
8
+
9
+ export default defineConfig({
10
+ testDir: "./tests/e2e",
11
+ timeout: 60_000,
12
+ expect: {
13
+ timeout: 10_000
14
+ },
15
+ use: {
16
+ baseURL,
17
+ headless: true,
18
+ ...(storageState ? { storageState } : {})
19
+ },
20
+ ...(managedBaseUrl ? {} : {
21
+ webServer: {
22
+ command: "npm run build && node ./bin/server.js",
23
+ env: {
24
+ PORT: "4173"
25
+ },
26
+ url: `${baseURL}/api/health`,
27
+ reuseExistingServer: true,
28
+ timeout: 180_000
29
+ }
30
+ })
31
+ });
@@ -0,0 +1,45 @@
1
+ import { createRequire } from "node:module";
2
+ import { surfaceRuntime } from "./surfaceRuntime.js";
3
+
4
+ const require = createRequire(import.meta.url);
5
+
6
+ function toPort(value, fallback = 3000) {
7
+ const parsed = Number.parseInt(String(value || "").trim(), 10);
8
+ if (Number.isInteger(parsed) && parsed > 0) {
9
+ return parsed;
10
+ }
11
+ return fallback;
12
+ }
13
+
14
+ let envLoaded = false;
15
+
16
+ function ensureRuntimeEnvLoaded() {
17
+ if (envLoaded) {
18
+ return;
19
+ }
20
+ try {
21
+ const dotenvModule = require("dotenv");
22
+ const loadDotEnv = dotenvModule?.config;
23
+ if (typeof loadDotEnv === "function") {
24
+ loadDotEnv();
25
+ }
26
+ } catch {
27
+ // dotenv is optional in base-shell; bundles can add it when needed.
28
+ }
29
+ envLoaded = true;
30
+ }
31
+
32
+ function resolveRuntimeEnv() {
33
+ ensureRuntimeEnvLoaded();
34
+ const serverSurface = surfaceRuntime.normalizeSurfaceMode(
35
+ process.env.JSKIT_SERVER_SURFACE || process.env.SERVER_SURFACE
36
+ );
37
+ return {
38
+ ...process.env,
39
+ SERVER_SURFACE: serverSurface,
40
+ PORT: toPort(process.env.PORT, 3000),
41
+ HOST: String(process.env.HOST || "").trim() || "0.0.0.0"
42
+ };
43
+ }
44
+
45
+ export { resolveRuntimeEnv };
@@ -0,0 +1,10 @@
1
+ import { createSurfaceRuntime } from "@jskit-ai/kernel/shared/surface/runtime";
2
+ import { config } from "../../config/public.js";
3
+
4
+ const surfaceRuntime = createSurfaceRuntime({
5
+ allMode: config.surfaceModeAll,
6
+ surfaces: config.surfaceDefinitions,
7
+ defaultSurfaceId: config.surfaceDefaultId
8
+ });
9
+
10
+ export { surfaceRuntime };