@happyvertical/smrt-template-sveltekit 0.44.1 → 0.45.1
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/AGENTS.md +67 -0
- package/package.json +25 -13
- package/template/package.json +11 -11
package/AGENTS.md
CHANGED
|
@@ -86,3 +86,70 @@ It is the ground-up alternative to `smrt-saas-starter`.
|
|
|
86
86
|
Tests live in package-level `__tests__/`, never under `template/`. Vitest's
|
|
87
87
|
global setup creates a temporary `.svelte-kit/tsconfig.json` stub and removes it
|
|
88
88
|
afterward; `copyTemplate()` filters the directory as defense in depth.
|
|
89
|
+
|
|
90
|
+
`__tests__/support/` holds reusable, test-only helpers shared by the M5
|
|
91
|
+
runtime-profile proofs:
|
|
92
|
+
|
|
93
|
+
- `runtimeSurfaceParity.ts` canonicalizes the generated REST routes, OpenAPI
|
|
94
|
+
operations, CLI commands, MCP tool schemas, WebMCP descriptors, and per-tool
|
|
95
|
+
policy (effect, destructive/external annotations, approval, exposure, tenant
|
|
96
|
+
scope) that one copied application emits under a given runtime profile.
|
|
97
|
+
`canonicalizeRuntimeProfileSurfaces()` produces the bytes compared across
|
|
98
|
+
profiles; `OPERATIONAL_DIAGNOSTIC_TOOL_NAME` names the single allowlisted
|
|
99
|
+
operational exception (the #2577 diagnostic tool), which is authored rather
|
|
100
|
+
than generated and is therefore excluded from the domain inventories.
|
|
101
|
+
- `runtimeFailureInjection.ts` holds narrowly scoped configuration/migration
|
|
102
|
+
failure injection. It adds no production seam: it only supplies ordinary
|
|
103
|
+
caller arguments (a runtime config object, the documented `prepareDatabase`
|
|
104
|
+
callback).
|
|
105
|
+
|
|
106
|
+
`runtimeProfileParity.test.ts` asserts that the three profiles emit one
|
|
107
|
+
byte-identical domain surface; its committed snapshot is an API/policy contract
|
|
108
|
+
and must be reviewed as a diff, never regenerated blindly. The PostgreSQL
|
|
109
|
+
external-worker half lives in `runtimeProfileParity.postgres.optional.test.ts`
|
|
110
|
+
and runs through `pnpm test:postgres`, which forces sequential file execution
|
|
111
|
+
because the optional PostgreSQL suites share one disposable database.
|
|
112
|
+
|
|
113
|
+
## M5 browser gate
|
|
114
|
+
|
|
115
|
+
`e2e/` holds the milestone-M5 acceptance gate (#2579): a Playwright pass that
|
|
116
|
+
provisions a fresh copy of the generated app into a temporary root, runs its
|
|
117
|
+
own `app:setup` build/migrate/bootstrap, serves it on an ephemeral loopback
|
|
118
|
+
port, and drives WebMCP discovery, execution, authorization, consent, disposal,
|
|
119
|
+
and redaction in a real browser. The only fabricated thing is
|
|
120
|
+
`document.modelContext`, which no headless browser exposes; database,
|
|
121
|
+
collections, handlers, session, and every registration are the application's
|
|
122
|
+
own. Never add a mocked REST handler, an in-memory database, or DOM automation
|
|
123
|
+
presented as WebMCP execution.
|
|
124
|
+
|
|
125
|
+
- `@happyvertical/smrt-cli` is a devDependency **because the gate needs it**:
|
|
126
|
+
the app's `app:setup` migration step shells out to `pnpm exec smrt db:migrate`,
|
|
127
|
+
and the copied app deliberately never runs `pnpm install`, so `smrt` has to
|
|
128
|
+
arrive through the linked `node_modules/.bin`. The harness pins the app's own
|
|
129
|
+
`.bin` ahead of `PATH` and fails with a named error if that binary is missing,
|
|
130
|
+
so a host-global `smrt` cannot make a local run pass where CI fails.
|
|
131
|
+
- `pnpm test:e2e` runs the browser half.
|
|
132
|
+
- `pnpm test:m5` runs the whole aggregate gate through
|
|
133
|
+
`e2e/support/gate.mjs`, which requires a PostgreSQL service and fails when a
|
|
134
|
+
required profile case is missing rather than merely absent from the log.
|
|
135
|
+
- Tracing, video, and screenshots stay off: onboarding carries a single-use
|
|
136
|
+
bootstrap token in a URL.
|
|
137
|
+
- `m5-gate-summary.json` is the one file the gate writes inside the package;
|
|
138
|
+
it is gitignored, overwritten every run, and is what CI uploads. Everything
|
|
139
|
+
else it generates stays in a test-owned temporary root. Playwright's
|
|
140
|
+
`outputDir` is `$TMPDIR/smrt-m5-artifacts`, emptied by
|
|
141
|
+
`e2e/support/globalTeardown.ts`; `e2e/redaction.spec.ts` reads that path back
|
|
142
|
+
from `testInfo.project.outputDir` and asserts it is outside the repository.
|
|
143
|
+
The harness gives the copied app a real `node_modules` directory of
|
|
144
|
+
individually symlinked entries rather than one symlink to this package's, so
|
|
145
|
+
the served app's `node_modules/.vite` cache cannot land in the checkout —
|
|
146
|
+
never replace that loop with a whole-directory symlink.
|
|
147
|
+
- `e2e/` is outside `biome.json`'s include globs, as every package's `e2e/` is,
|
|
148
|
+
so a green `Lint` job says nothing about this tree. `pnpm typecheck` covers
|
|
149
|
+
the `.ts` files (`tsconfig.fixture.json` includes `e2e/**/*.ts`) but NOT
|
|
150
|
+
`e2e/support/gate.mjs`, which no static analysis reaches. Its `emit()`
|
|
151
|
+
vocabulary guard is the runtime backstop; edit it carefully and run
|
|
152
|
+
`pnpm test:m5` after any change to it.
|
|
153
|
+
|
|
154
|
+
See [the M5 reference fixture gate](../../docs/content/m5-reference-fixture.md)
|
|
155
|
+
for what the milestone proves, what it does not, and the recovery commands.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-template-sveltekit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.1",
|
|
4
4
|
"description": "Minimal SvelteKit project template with s-m-r-t framework integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,23 +29,33 @@
|
|
|
29
29
|
"directory": "packages/template-sveltekit"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@happyvertical/smrt-core": "0.
|
|
32
|
+
"@happyvertical/smrt-core": "0.45.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@happyvertical/sql": "^0.89.4",
|
|
36
|
+
"@modelcontextprotocol/server": "^2.0.0",
|
|
37
|
+
"@playwright/test": "^1.61.1",
|
|
38
|
+
"@sveltejs/adapter-node": "^5.5.4",
|
|
39
|
+
"@sveltejs/kit": "^2.69.2",
|
|
40
|
+
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
|
36
41
|
"@types/node": "24.13.2",
|
|
42
|
+
"svelte": "^5.56.4",
|
|
37
43
|
"typescript": "5.9.3",
|
|
44
|
+
"vite": "8.1.4",
|
|
38
45
|
"vitest": "4.1.10",
|
|
39
|
-
"@happyvertical/smrt-
|
|
40
|
-
"@happyvertical/smrt-
|
|
41
|
-
"@happyvertical/smrt-
|
|
42
|
-
"@happyvertical/smrt-
|
|
43
|
-
"@happyvertical/smrt-
|
|
44
|
-
"@happyvertical/smrt-
|
|
45
|
-
"@happyvertical/smrt-scanner": "0.
|
|
46
|
-
"@happyvertical/smrt-
|
|
47
|
-
"@happyvertical/smrt-
|
|
48
|
-
"@happyvertical/smrt-
|
|
46
|
+
"@happyvertical/smrt-app-runtime": "0.45.1",
|
|
47
|
+
"@happyvertical/smrt-cli": "0.45.1",
|
|
48
|
+
"@happyvertical/smrt-assets": "0.45.1",
|
|
49
|
+
"@happyvertical/smrt-playbooks": "0.45.1",
|
|
50
|
+
"@happyvertical/smrt-jobs": "0.45.1",
|
|
51
|
+
"@happyvertical/smrt-config": "0.45.1",
|
|
52
|
+
"@happyvertical/smrt-scanner": "0.45.1",
|
|
53
|
+
"@happyvertical/smrt-tenancy": "0.45.1",
|
|
54
|
+
"@happyvertical/smrt-ui": "0.45.1",
|
|
55
|
+
"@happyvertical/smrt-users": "0.45.1",
|
|
56
|
+
"@happyvertical/smrt-web": "0.45.1",
|
|
57
|
+
"@happyvertical/smrt-svelte": "0.45.1",
|
|
58
|
+
"@happyvertical/smrt-profiles": "0.45.1"
|
|
49
59
|
},
|
|
50
60
|
"publishConfig": {
|
|
51
61
|
"registry": "https://registry.npmjs.org",
|
|
@@ -54,7 +64,9 @@
|
|
|
54
64
|
"scripts": {
|
|
55
65
|
"build": "pnpm run typecheck && node --check index.js",
|
|
56
66
|
"test": "vitest run",
|
|
57
|
-
"test:
|
|
67
|
+
"test:e2e": "pnpm exec playwright test --config playwright.config.ts",
|
|
68
|
+
"test:m5": "node ../../scripts/run-with-ci-postgres.mjs -- node e2e/support/gate.mjs",
|
|
69
|
+
"test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run --no-file-parallelism __tests__/*.postgres.optional.test.ts",
|
|
58
70
|
"test:watch": "vitest",
|
|
59
71
|
"typecheck": "tsc --noEmit -p tsconfig.fixture.json"
|
|
60
72
|
}
|
package/template/package.json
CHANGED
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"svelte-check": "^4.7.2",
|
|
38
38
|
"typescript": "^6.0.3",
|
|
39
39
|
"vite": "^8.1.4",
|
|
40
|
-
"@happyvertical/smrt-cli": "^0.
|
|
40
|
+
"@happyvertical/smrt-cli": "^0.45.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@happyvertical/smrt-app-runtime": "^0.
|
|
44
|
-
"@happyvertical/smrt-config": "^0.
|
|
45
|
-
"@happyvertical/smrt-core": "^0.
|
|
46
|
-
"@happyvertical/smrt-jobs": "^0.
|
|
47
|
-
"@happyvertical/smrt-profiles": "^0.
|
|
48
|
-
"@happyvertical/smrt-svelte": "^0.
|
|
49
|
-
"@happyvertical/smrt-tenancy": "^0.
|
|
50
|
-
"@happyvertical/smrt-ui": "^0.
|
|
51
|
-
"@happyvertical/smrt-users": "^0.
|
|
52
|
-
"@happyvertical/smrt-web": "^0.
|
|
43
|
+
"@happyvertical/smrt-app-runtime": "^0.45.1",
|
|
44
|
+
"@happyvertical/smrt-config": "^0.45.1",
|
|
45
|
+
"@happyvertical/smrt-core": "^0.45.1",
|
|
46
|
+
"@happyvertical/smrt-jobs": "^0.45.1",
|
|
47
|
+
"@happyvertical/smrt-profiles": "^0.45.1",
|
|
48
|
+
"@happyvertical/smrt-svelte": "^0.45.1",
|
|
49
|
+
"@happyvertical/smrt-tenancy": "^0.45.1",
|
|
50
|
+
"@happyvertical/smrt-ui": "^0.45.1",
|
|
51
|
+
"@happyvertical/smrt-users": "^0.45.1",
|
|
52
|
+
"@happyvertical/smrt-web": "^0.45.1",
|
|
53
53
|
"@happyvertical/sql": "^0.89.4",
|
|
54
54
|
"@modelcontextprotocol/server": "^2.0.0"
|
|
55
55
|
}
|