@jskit-ai/agent-docs 0.1.177 → 0.1.179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/guide/agent/app-setup/upgrading-jskit.md +15 -0
- package/guide/agent/framework/application-operations.md +13 -14
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/PATTERN.md +10 -0
- package/patterns/minimal-foundation/example/index.html +15 -1
- package/patterns/minimal-foundation/example/package.json +9 -8
- package/patterns/minimal-foundation/example/src/main.js +4 -0
- package/patterns/minimal-foundation/example/tests/e2e/startup.spec.ts +35 -0
- package/patterns/shell-foundation/PATTERN.md +10 -0
- package/patterns/shell-foundation/example/index.html +15 -1
- package/patterns/shell-foundation/example/package.json +10 -9
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/patterns/shell-foundation/example/src/main.js +4 -0
- package/patterns/shell-foundation/example/tests/e2e/startup.spec.ts +35 -0
- package/reference/autogen/PATTERN_INDEX.md +35 -35
- package/skills/jskit/references/app-operations.md +13 -14
- package/skills/jskit/references/pattern-index.md +35 -35
- package/skills/jskit/references/patterns/app/minimal-foundation/PATTERN.md +10 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/index.html +15 -1
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +9 -8
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/main.js +4 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/tests/e2e/startup.spec.ts +35 -0
- package/skills/jskit/references/patterns/app/shell-foundation/PATTERN.md +10 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/index.html +15 -1
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +10 -9
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/main.js +4 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/e2e/startup.spec.ts +35 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +2 -2
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +1 -1
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +1 -1
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +3 -3
|
@@ -38,6 +38,21 @@ updating. Declare the workspace paths at the root and depend on each local
|
|
|
38
38
|
package by its exact manifest version. Do not retain legacy `file:` links; the
|
|
39
39
|
updater does not infer or rewrite an application's local package topology.
|
|
40
40
|
|
|
41
|
+
The shell and authentication packages use Pinia 4. Before upgrading an app
|
|
42
|
+
that still declares Pinia 3, update its manifest without installing the old
|
|
43
|
+
JSKIT graph:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm pkg set 'dependencies.pinia=^4.0.3' 'dependencies.@vue/devtools-api=^8.2.1' 'dependencies.vue-router=^5.3.1' 'dependencies.vue=^3.5.43'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Update any workspace Pinia declarations too. Pinia 4 requires ESM and the
|
|
50
|
+
separate `@vue/devtools-api` peer; the current application foundations include
|
|
51
|
+
both, with Vue Router 5.3.1 and Vue 3.5.43. Vue Router 5.0.6 still requires
|
|
52
|
+
Pinia 3. The JSKIT updater changes only JSKIT dependencies, so it does not make
|
|
53
|
+
this application-owned dependency change for you. Do not bypass peer conflicts
|
|
54
|
+
with `--force` or `--legacy-peer-deps`.
|
|
55
|
+
|
|
41
56
|
Then let the published updater select and install its exact coordinated
|
|
42
57
|
catalog:
|
|
43
58
|
|
|
@@ -7,15 +7,19 @@ description: Establish a JSKIT application, select capabilities, and realize pro
|
|
|
7
7
|
|
|
8
8
|
# Application operations
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
## Initial browser loading
|
|
11
|
+
|
|
12
|
+
Adopt the foundation's accessible HTML skeleton, inline styles, Reload link and
|
|
13
|
+
startup-error message; package updates do not rewrite existing app HTML. Follow
|
|
14
|
+
its cold-browser proof at compact, medium and expanded widths: delay JavaScript,
|
|
15
|
+
check loading feedback, then release it and check app mount, including production
|
|
16
|
+
builds. Compression belongs to hosting, not Genesis.
|
|
12
17
|
|
|
13
18
|
## Establish a new application
|
|
14
19
|
|
|
15
|
-
Start with
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
not run a JSKIT questionnaire and do not create a temporary scaffold app.
|
|
20
|
+
Start with Git and a clear product request. Consult current source and project
|
|
21
|
+
docs; ask for missing product decisions before writing source. Do not run a
|
|
22
|
+
JSKIT questionnaire or create a temporary scaffold app.
|
|
19
23
|
|
|
20
24
|
Read the [source pattern library](/patterns/). When the optional standalone
|
|
21
25
|
JSKIT Agent Skill is installed, its pattern index contains the same
|
|
@@ -41,14 +45,9 @@ receipts, generator provenance, completion ledgers, or hidden operation state.
|
|
|
41
45
|
|
|
42
46
|
## Install and compose capabilities
|
|
43
47
|
|
|
44
|
-
Plan
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
then run `npm install` once for that planned change.
|
|
48
|
-
|
|
49
|
-
Install the explicitly selected top-level packages through npm. Use one
|
|
50
|
-
installation for the planned closure so npm can resolve their ordinary package
|
|
51
|
-
dependencies together:
|
|
48
|
+
Plan capabilities using the catalogue and package-owned patterns: required
|
|
49
|
+
packages, configuration, resources and APIs. Install one planned dependency
|
|
50
|
+
closure of explicitly selected top-level packages in a single npm invocation:
|
|
52
51
|
|
|
53
52
|
```bash
|
|
54
53
|
npm install --save-exact @jskit-ai/<selected-package>@latest [...]
|
package/package.json
CHANGED
|
@@ -101,6 +101,16 @@ the dependency scanner or JSKIT's installed-package optimization settings.
|
|
|
101
101
|
|
|
102
102
|
## Verification
|
|
103
103
|
|
|
104
|
+
Keep the initial loading shell in `index.html`, with its critical inline styles
|
|
105
|
+
and Reload link. It must not depend on JavaScript, external fonts, or framework
|
|
106
|
+
components. Adapt its skeleton to the product without adding host branding.
|
|
107
|
+
Vue replaces it on mount; the bootstrap failure handler retains an actionable
|
|
108
|
+
error. A failed module download still leaves the static Reload link available.
|
|
109
|
+
Preserve `tests/e2e/startup.spec.ts`: it holds JavaScript requests while proving
|
|
110
|
+
visible loading feedback at three widths, then releases them and proves mounting.
|
|
111
|
+
Run this check against the production build as part of the application's release
|
|
112
|
+
verification, not only against Vite development mode.
|
|
113
|
+
|
|
104
114
|
After adapting the example, install the declared packages once and run
|
|
105
115
|
`npm run develop` for the live application. Then run the application's lint,
|
|
106
116
|
server tests, client tests, production build, and focused browser smoke.
|
|
@@ -5,9 +5,23 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<title>Reading Room</title>
|
|
8
|
+
<style>
|
|
9
|
+
#startup-shell { position: fixed; inset: 0; padding: 24px; background: #faf9fc; color: #25232a; font: 16px system-ui, sans-serif; }
|
|
10
|
+
#startup-shell .placeholder { height: 20px; max-width: 480px; margin: 24px 0; border-radius: 4px; background: #e5e2eb; }
|
|
11
|
+
#startup-shell a { display: inline-flex; align-items: center; min-height: 48px; color: inherit; }
|
|
12
|
+
@media (prefers-color-scheme: dark) { #startup-shell { background: #19181d; color: #eeeaf3; } #startup-shell .placeholder { background: #35323d; } }
|
|
13
|
+
</style>
|
|
8
14
|
</head>
|
|
9
15
|
<body>
|
|
10
|
-
<div id="app"
|
|
16
|
+
<div id="app">
|
|
17
|
+
<main id="startup-shell">
|
|
18
|
+
<p id="startup-status" role="status" aria-live="polite">Loading application…</p>
|
|
19
|
+
<div class="placeholder" aria-hidden="true"></div>
|
|
20
|
+
<div class="placeholder" aria-hidden="true"></div>
|
|
21
|
+
<noscript>JavaScript must be enabled to open this application.</noscript>
|
|
22
|
+
<a href="">Reload page</a>
|
|
23
|
+
</main>
|
|
24
|
+
</div>
|
|
11
25
|
<script type="module" src="/src/main.js"></script>
|
|
12
26
|
</body>
|
|
13
27
|
</html>
|
|
@@ -34,20 +34,21 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@local/main": "0.1.0",
|
|
36
36
|
"@fastify/static": "^10.1.3",
|
|
37
|
-
"@jskit-ai/kernel": "0.1.
|
|
37
|
+
"@jskit-ai/kernel": "0.1.207",
|
|
38
38
|
"@tanstack/vue-query": "^5.101.0",
|
|
39
39
|
"fastify": "^5.8.5",
|
|
40
40
|
"json-rest-schema": "^1.0.17",
|
|
41
|
-
"pinia": "^
|
|
42
|
-
"vue": "^3.5.
|
|
43
|
-
"vue-router": "^5.1
|
|
41
|
+
"pinia": "^4.0.3",
|
|
42
|
+
"vue": "^3.5.43",
|
|
43
|
+
"vue-router": "^5.3.1",
|
|
44
44
|
"vuetify": "^4.1.2",
|
|
45
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
46
|
-
"@fastify/fast-json-stringify-compiler": "^5.1.0"
|
|
45
|
+
"@jskit-ai/http-runtime": "0.1.205",
|
|
46
|
+
"@fastify/fast-json-stringify-compiler": "^5.1.0",
|
|
47
|
+
"@vue/devtools-api": "^8.2.1"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@jskit-ai/config-eslint": "0.1.
|
|
50
|
-
"@jskit-ai/jskit-catalog": "0.1.
|
|
50
|
+
"@jskit-ai/config-eslint": "0.1.204",
|
|
51
|
+
"@jskit-ai/jskit-catalog": "0.1.232",
|
|
51
52
|
"@playwright/test": "1.61.1",
|
|
52
53
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
53
54
|
"eslint": "^10.8.0",
|
|
@@ -82,4 +82,8 @@ void bootstrapClientShellApp({
|
|
|
82
82
|
fallbackRoute
|
|
83
83
|
}).catch((error) => {
|
|
84
84
|
console.error("Failed to bootstrap client app.", error);
|
|
85
|
+
const status = document.getElementById("startup-status");
|
|
86
|
+
if (status) {
|
|
87
|
+
status.textContent = "The application could not open. Reload the page to try again.";
|
|
88
|
+
}
|
|
85
89
|
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { expect, test } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
for (const width of [390, 768, 1280]) {
|
|
4
|
+
test(`startup remains visible before JavaScript at ${width}px`, async ({ page }) => {
|
|
5
|
+
await page.setViewportSize({ width, height: 900 });
|
|
6
|
+
let releaseScripts!: () => void;
|
|
7
|
+
const scriptsHeld = new Promise<void>(resolve => { releaseScripts = resolve; });
|
|
8
|
+
let scriptRequests = 0;
|
|
9
|
+
await page.route("**/*", async route => {
|
|
10
|
+
if (route.request().resourceType() === "script") {
|
|
11
|
+
scriptRequests += 1;
|
|
12
|
+
await scriptsHeld;
|
|
13
|
+
}
|
|
14
|
+
await route.continue();
|
|
15
|
+
});
|
|
16
|
+
try {
|
|
17
|
+
await page.goto("/home", { waitUntil: "commit" });
|
|
18
|
+
await expect(page.getByRole("status")).toHaveText("Loading application…");
|
|
19
|
+
await expect(page.getByRole("status")).toBeVisible();
|
|
20
|
+
await expect(page.getByRole("link", { name: "Reload page" })).toBeVisible();
|
|
21
|
+
await expect.poll(() => scriptRequests).toBeGreaterThan(0);
|
|
22
|
+
const geometry = await page.evaluate(() => ({
|
|
23
|
+
width: document.documentElement.clientWidth,
|
|
24
|
+
scrollWidth: document.documentElement.scrollWidth,
|
|
25
|
+
reloadHeight: document.querySelector("#startup-shell a")!.getBoundingClientRect().height
|
|
26
|
+
}));
|
|
27
|
+
expect(geometry.scrollWidth).toBeLessThanOrEqual(geometry.width + 1);
|
|
28
|
+
expect(geometry.reloadHeight).toBeGreaterThanOrEqual(48);
|
|
29
|
+
} finally {
|
|
30
|
+
releaseScripts();
|
|
31
|
+
}
|
|
32
|
+
await expect(page.locator("#app[data-v-app]")).toBeVisible();
|
|
33
|
+
await expect(page.locator("#startup-shell")).toHaveCount(0);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -103,6 +103,16 @@ the dependency scanner or JSKIT's installed-package optimization settings.
|
|
|
103
103
|
|
|
104
104
|
## Verification
|
|
105
105
|
|
|
106
|
+
Keep the initial loading shell in `index.html`, with its critical inline styles
|
|
107
|
+
and Reload link. It must not depend on JavaScript, external fonts, or framework
|
|
108
|
+
components. Adapt its skeleton to the product without adding host branding.
|
|
109
|
+
Vue replaces it on mount; the bootstrap failure handler retains an actionable
|
|
110
|
+
error. A failed module download still leaves the static Reload link available.
|
|
111
|
+
Preserve `tests/e2e/startup.spec.ts`: it holds JavaScript requests while proving
|
|
112
|
+
visible loading feedback at three widths, then releases them and proves mounting.
|
|
113
|
+
Run this check against the production build as part of the application's release
|
|
114
|
+
verification, not only against Vite development mode.
|
|
115
|
+
|
|
106
116
|
Install the declared packages once, run `npm run develop` for the live
|
|
107
117
|
application, then run lint, server tests, client tests, the production build,
|
|
108
118
|
and the adaptive browser smoke at compact, medium, and expanded viewports.
|
|
@@ -5,9 +5,23 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<title>Reading Room</title>
|
|
8
|
+
<style>
|
|
9
|
+
#startup-shell { position: fixed; inset: 0; padding: 24px; background: #faf9fc; color: #25232a; font: 16px system-ui, sans-serif; }
|
|
10
|
+
#startup-shell .placeholder { height: 20px; max-width: 480px; margin: 24px 0; border-radius: 4px; background: #e5e2eb; }
|
|
11
|
+
#startup-shell a { display: inline-flex; align-items: center; min-height: 48px; color: inherit; }
|
|
12
|
+
@media (prefers-color-scheme: dark) { #startup-shell { background: #19181d; color: #eeeaf3; } #startup-shell .placeholder { background: #35323d; } }
|
|
13
|
+
</style>
|
|
8
14
|
</head>
|
|
9
15
|
<body>
|
|
10
|
-
<div id="app"
|
|
16
|
+
<div id="app">
|
|
17
|
+
<main id="startup-shell">
|
|
18
|
+
<p id="startup-status" role="status" aria-live="polite">Loading application…</p>
|
|
19
|
+
<div class="placeholder" aria-hidden="true"></div>
|
|
20
|
+
<div class="placeholder" aria-hidden="true"></div>
|
|
21
|
+
<noscript>JavaScript must be enabled to open this application.</noscript>
|
|
22
|
+
<a href="">Reload page</a>
|
|
23
|
+
</main>
|
|
24
|
+
</div>
|
|
11
25
|
<script type="module" src="/src/main.js"></script>
|
|
12
26
|
</body>
|
|
13
27
|
</html>
|
|
@@ -34,22 +34,23 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@local/main": "0.1.0",
|
|
36
36
|
"@fastify/static": "^10.1.3",
|
|
37
|
-
"@jskit-ai/kernel": "0.1.
|
|
37
|
+
"@jskit-ai/kernel": "0.1.207",
|
|
38
38
|
"@tanstack/vue-query": "^5.101.0",
|
|
39
39
|
"fastify": "^5.8.5",
|
|
40
40
|
"json-rest-schema": "^1.0.17",
|
|
41
|
-
"pinia": "^
|
|
42
|
-
"vue": "^3.5.
|
|
43
|
-
"vue-router": "^5.1
|
|
41
|
+
"pinia": "^4.0.3",
|
|
42
|
+
"vue": "^3.5.43",
|
|
43
|
+
"vue-router": "^5.3.1",
|
|
44
44
|
"vuetify": "^4.1.2",
|
|
45
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
45
|
+
"@jskit-ai/http-runtime": "0.1.205",
|
|
46
46
|
"@mdi/js": "^7.4.47",
|
|
47
|
-
"@jskit-ai/shell-web": "0.1.
|
|
48
|
-
"@fastify/fast-json-stringify-compiler": "^5.1.0"
|
|
47
|
+
"@jskit-ai/shell-web": "0.1.211",
|
|
48
|
+
"@fastify/fast-json-stringify-compiler": "^5.1.0",
|
|
49
|
+
"@vue/devtools-api": "^8.2.1"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
|
-
"@jskit-ai/config-eslint": "0.1.
|
|
52
|
-
"@jskit-ai/jskit-catalog": "0.1.
|
|
52
|
+
"@jskit-ai/config-eslint": "0.1.204",
|
|
53
|
+
"@jskit-ai/jskit-catalog": "0.1.232",
|
|
53
54
|
"@playwright/test": "1.61.1",
|
|
54
55
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
55
56
|
"eslint": "^10.8.0",
|
|
@@ -82,4 +82,8 @@ void bootstrapClientShellApp({
|
|
|
82
82
|
fallbackRoute
|
|
83
83
|
}).catch((error) => {
|
|
84
84
|
console.error("Failed to bootstrap client app.", error);
|
|
85
|
+
const status = document.getElementById("startup-status");
|
|
86
|
+
if (status) {
|
|
87
|
+
status.textContent = "The application could not open. Reload the page to try again.";
|
|
88
|
+
}
|
|
85
89
|
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { expect, test } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
for (const width of [390, 768, 1280]) {
|
|
4
|
+
test(`startup remains visible before JavaScript at ${width}px`, async ({ page }) => {
|
|
5
|
+
await page.setViewportSize({ width, height: 900 });
|
|
6
|
+
let releaseScripts!: () => void;
|
|
7
|
+
const scriptsHeld = new Promise<void>(resolve => { releaseScripts = resolve; });
|
|
8
|
+
let scriptRequests = 0;
|
|
9
|
+
await page.route("**/*", async route => {
|
|
10
|
+
if (route.request().resourceType() === "script") {
|
|
11
|
+
scriptRequests += 1;
|
|
12
|
+
await scriptsHeld;
|
|
13
|
+
}
|
|
14
|
+
await route.continue();
|
|
15
|
+
});
|
|
16
|
+
try {
|
|
17
|
+
await page.goto("/home", { waitUntil: "commit" });
|
|
18
|
+
await expect(page.getByRole("status")).toHaveText("Loading application…");
|
|
19
|
+
await expect(page.getByRole("status")).toBeVisible();
|
|
20
|
+
await expect(page.getByRole("link", { name: "Reload page" })).toBeVisible();
|
|
21
|
+
await expect.poll(() => scriptRequests).toBeGreaterThan(0);
|
|
22
|
+
const geometry = await page.evaluate(() => ({
|
|
23
|
+
width: document.documentElement.clientWidth,
|
|
24
|
+
scrollWidth: document.documentElement.scrollWidth,
|
|
25
|
+
reloadHeight: document.querySelector("#startup-shell a")!.getBoundingClientRect().height
|
|
26
|
+
}));
|
|
27
|
+
expect(geometry.scrollWidth).toBeLessThanOrEqual(geometry.width + 1);
|
|
28
|
+
expect(geometry.reloadHeight).toBeGreaterThanOrEqual(48);
|
|
29
|
+
} finally {
|
|
30
|
+
releaseScripts();
|
|
31
|
+
}
|
|
32
|
+
await expect(page.locator("#app[data-v-app]")).toBeVisible();
|
|
33
|
+
await expect(page.locator("#startup-shell")).toHaveCount(0);
|
|
34
|
+
});
|
|
35
|
+
}
|