@happyvertical/smrt-template-sveltekit 0.60.15 → 0.60.16
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 +6 -0
- package/mcp-apps-template/package.dependencies.json +2 -2
- package/package.json +20 -20
- package/template/AGENTS.md +19 -0
- package/template/README.md +12 -0
- package/template/compose.yaml +36 -0
- package/template/package.json +15 -13
- package/template.config.js +12 -12
package/AGENTS.md
CHANGED
|
@@ -13,6 +13,12 @@ It is the ground-up alternative to `smrt-start`.
|
|
|
13
13
|
|
|
14
14
|
## Current generated-project contract
|
|
15
15
|
|
|
16
|
+
- `template/compose.yaml` carries the `x-happyvertical` deployment declaration
|
|
17
|
+
(contract v1, `@happyvertical/smrt-config/deployment`). It is the source of
|
|
18
|
+
`charts/smrt-app/fixtures/starter.json`: after changing its services or
|
|
19
|
+
annotations run `node scripts/compose-contract-fixture.mjs --write` and
|
|
20
|
+
commit the fixture; `scripts/compose-contract.test.mjs` fails on drift.
|
|
21
|
+
|
|
16
22
|
- Node `>=26.0.0`; pnpm `11.25.0` via `packageManager` and `engines`. Node 25+
|
|
17
23
|
images ship no Corepack, so the Dockerfile installs a pinned copy.
|
|
18
24
|
- `runtime.profile` is the canonical infrastructure selector. Generated apps
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-template-sveltekit",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.16",
|
|
4
4
|
"description": "Minimal SvelteKit project template with s-m-r-t framework integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -37,26 +37,26 @@
|
|
|
37
37
|
"directory": "packages/template-sveltekit"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@happyvertical/smrt-core": "0.60.
|
|
40
|
+
"@happyvertical/smrt-core": "0.60.16"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@happyvertical/smrt-app-cli": "0.60.
|
|
44
|
-
"@happyvertical/smrt-app-mcp": "0.60.
|
|
45
|
-
"@happyvertical/smrt-app-runtime": "0.60.
|
|
46
|
-
"@happyvertical/smrt-assets": "0.60.
|
|
47
|
-
"@happyvertical/smrt-chat": "0.60.
|
|
48
|
-
"@happyvertical/smrt-cli": "0.60.
|
|
49
|
-
"@happyvertical/smrt-config": "0.60.
|
|
50
|
-
"@happyvertical/smrt-jobs": "0.60.
|
|
51
|
-
"@happyvertical/smrt-mcp-openai": "0.60.
|
|
52
|
-
"@happyvertical/smrt-playbooks": "0.60.
|
|
53
|
-
"@happyvertical/smrt-profiles": "0.60.
|
|
54
|
-
"@happyvertical/smrt-scanner": "0.60.
|
|
55
|
-
"@happyvertical/smrt-svelte": "0.60.
|
|
56
|
-
"@happyvertical/smrt-tenancy": "0.60.
|
|
57
|
-
"@happyvertical/smrt-ui": "0.60.
|
|
58
|
-
"@happyvertical/smrt-users": "0.60.
|
|
59
|
-
"@happyvertical/smrt-web": "0.60.
|
|
43
|
+
"@happyvertical/smrt-app-cli": "0.60.16",
|
|
44
|
+
"@happyvertical/smrt-app-mcp": "0.60.16",
|
|
45
|
+
"@happyvertical/smrt-app-runtime": "0.60.16",
|
|
46
|
+
"@happyvertical/smrt-assets": "0.60.16",
|
|
47
|
+
"@happyvertical/smrt-chat": "0.60.16",
|
|
48
|
+
"@happyvertical/smrt-cli": "0.60.16",
|
|
49
|
+
"@happyvertical/smrt-config": "0.60.16",
|
|
50
|
+
"@happyvertical/smrt-jobs": "0.60.16",
|
|
51
|
+
"@happyvertical/smrt-mcp-openai": "0.60.16",
|
|
52
|
+
"@happyvertical/smrt-playbooks": "0.60.16",
|
|
53
|
+
"@happyvertical/smrt-profiles": "0.60.16",
|
|
54
|
+
"@happyvertical/smrt-scanner": "0.60.16",
|
|
55
|
+
"@happyvertical/smrt-svelte": "0.60.16",
|
|
56
|
+
"@happyvertical/smrt-tenancy": "0.60.16",
|
|
57
|
+
"@happyvertical/smrt-ui": "0.60.16",
|
|
58
|
+
"@happyvertical/smrt-users": "0.60.16",
|
|
59
|
+
"@happyvertical/smrt-web": "0.60.16",
|
|
60
60
|
"@happyvertical/sql": "^0.89.12",
|
|
61
61
|
"@modelcontextprotocol/client": "2.3.1",
|
|
62
62
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"typescript": "6.0.3",
|
|
71
71
|
"vite": "8.1.6",
|
|
72
72
|
"vitest": "4.1.10",
|
|
73
|
-
"@happyvertical/smrt-reports": "0.60.
|
|
73
|
+
"@happyvertical/smrt-reports": "0.60.16"
|
|
74
74
|
},
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"registry": "https://registry.npmjs.org",
|
package/template/AGENTS.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# s-m-r-t SvelteKit app
|
|
2
2
|
|
|
3
|
+
<!-- smrt:agents:begin -->
|
|
4
|
+
## smrt framework
|
|
5
|
+
|
|
6
|
+
- Framework reference: `.agents/smrt-framework.md`
|
|
7
|
+
- Intent index: `.agents/smrt-knowledge/intents/index.md`
|
|
8
|
+
- Before adding infrastructure, utility or integration code, read the intent index.
|
|
9
|
+
- If smrt has the home package but lacks the behaviour, or lacks it entirely, file an issue on happyvertical/smrt and mark any local shim temporary: framework first, no glue.
|
|
10
|
+
- Refresh this block and the references: `smrt docs:agents`.
|
|
11
|
+
- Check for duplicated capability: `smrt-dev-mcp review --directory . --format summary`.
|
|
12
|
+
|
|
13
|
+
_Generated; edit outside the markers only. Text between them is replaced on refresh._
|
|
14
|
+
<!-- smrt:agents:end -->
|
|
15
|
+
|
|
3
16
|
This project uses s-m-r-t objects to generate REST routes, CLI commands, MCP
|
|
4
17
|
tools, WebMCP definitions, and agent/developer knowledge artifacts.
|
|
5
18
|
|
|
@@ -67,6 +80,12 @@ tools, WebMCP definitions, and agent/developer knowledge artifacts.
|
|
|
67
80
|
Keep the guard in place for SSR and seed live collections with SSR
|
|
68
81
|
`initialData`.
|
|
69
82
|
- Do not enable knowledge HTTP routes in production without explicit admin auth.
|
|
83
|
+
- `compose.yaml` is the deployment declaration: its `x-happyvertical` fields
|
|
84
|
+
(`role`, `health`, `binding`, top-level `migrate`) are what a hosting
|
|
85
|
+
platform that implements the contract reads and what
|
|
86
|
+
`smrt deploy:chart-values` renders. Keep them when editing services, keep
|
|
87
|
+
`entrypoint` equal to the image's own (the chart replaces it), use no `$`
|
|
88
|
+
variables in `command`, and run `pnpm deploy:check` after any Compose change.
|
|
70
89
|
- Run task and schedule workers as separate deployed processes. The worker
|
|
71
90
|
imports `.smrt/runtime/register.js` (compiled by `pnpm build`) before any
|
|
72
91
|
runner starts, so jobs can target this app's own `@smrt()` objects; keep that
|
package/template/README.md
CHANGED
|
@@ -409,6 +409,18 @@ concerns are intentionally absent here.
|
|
|
409
409
|
- `cloud`: hosted identity, managed providers, required tenant context, and
|
|
410
410
|
scalable workers. `.env.cloud.example` records the composition boundary.
|
|
411
411
|
|
|
412
|
+
`compose.yaml` is also the app's deployment declaration. Its `x-happyvertical`
|
|
413
|
+
fields name the web service and its health path, the two workers, the
|
|
414
|
+
migration command, and the `database` service as a stand-in for a platform's
|
|
415
|
+
PostgreSQL. Compose ignores them, so the file runs unchanged; `pnpm
|
|
416
|
+
deploy:check` validates the declaration against the supported platform subset,
|
|
417
|
+
and `pnpm exec smrt deploy:chart-values` renders it for the `smrt-app` chart.
|
|
418
|
+
The one-shot `migrate` service has no annotation and stays local: a platform
|
|
419
|
+
runs the declared migration command inside the web image instead. The three
|
|
420
|
+
application services set `entrypoint` to the node image's own entrypoint, which
|
|
421
|
+
changes nothing for Compose and lets a rendering that replaces the entrypoint
|
|
422
|
+
start the same process.
|
|
423
|
+
|
|
412
424
|
The adapter-node `Dockerfile` and `compose.yaml` provide the production path.
|
|
413
425
|
Compose gates the web and both workers on the one-shot, idempotent migration
|
|
414
426
|
service. The runtime image retains the generated manifest and operator CLI for
|
package/template/compose.yaml
CHANGED
|
@@ -1,33 +1,67 @@
|
|
|
1
1
|
x-runtime-environment: &runtime-environment
|
|
2
2
|
DATABASE_URL: ${DATABASE_URL:?Set DATABASE_URL in the ignored .env file}
|
|
3
3
|
|
|
4
|
+
# Deployment declaration (contract version 1). Compose ignores `x-` keys, so
|
|
5
|
+
# this file still runs as it always did. A platform that reads the contract
|
|
6
|
+
# deploys the `role` services from image digests, runs `migrate` before each
|
|
7
|
+
# release, and provides its own service in place of every `binding`.
|
|
8
|
+
# Check it with `pnpm exec smrt deploy:check`.
|
|
9
|
+
#
|
|
10
|
+
# `entrypoint` on the three application services repeats the node image's own
|
|
11
|
+
# entrypoint, so Compose runs exactly what it ran before, and a rendering that
|
|
12
|
+
# replaces the entrypoint (the smrt-app chart) starts the same process.
|
|
13
|
+
x-happyvertical:
|
|
14
|
+
version: 1
|
|
15
|
+
preset: smrt
|
|
16
|
+
# domain: app.example.com
|
|
17
|
+
migrate:
|
|
18
|
+
command: ["pnpm", "exec", "smrt", "db:migrate"]
|
|
19
|
+
|
|
4
20
|
services:
|
|
5
21
|
web:
|
|
6
22
|
build: .
|
|
7
23
|
env_file: .env.self-hosted
|
|
8
24
|
environment: *runtime-environment
|
|
25
|
+
entrypoint: ["docker-entrypoint.sh"]
|
|
9
26
|
command: node build
|
|
10
27
|
ports:
|
|
11
28
|
- "3000:3000"
|
|
12
29
|
depends_on:
|
|
13
30
|
migrate:
|
|
14
31
|
condition: service_completed_successfully
|
|
32
|
+
x-happyvertical:
|
|
33
|
+
role: web
|
|
34
|
+
health:
|
|
35
|
+
path: /api/_runtime/health
|
|
15
36
|
worker:
|
|
16
37
|
build: .
|
|
17
38
|
env_file: .env.self-hosted
|
|
18
39
|
environment: *runtime-environment
|
|
40
|
+
entrypoint: ["docker-entrypoint.sh"]
|
|
19
41
|
command: pnpm exec smrt app worker task
|
|
20
42
|
depends_on:
|
|
21
43
|
migrate:
|
|
22
44
|
condition: service_completed_successfully
|
|
45
|
+
x-happyvertical:
|
|
46
|
+
role: worker
|
|
47
|
+
health:
|
|
48
|
+
command: ["pnpm", "exec", "smrt", "app", "doctor"]
|
|
23
49
|
schedule-worker:
|
|
24
50
|
build: .
|
|
25
51
|
env_file: .env.self-hosted
|
|
26
52
|
environment: *runtime-environment
|
|
53
|
+
entrypoint: ["docker-entrypoint.sh"]
|
|
27
54
|
command: pnpm exec smrt app worker schedule
|
|
28
55
|
depends_on:
|
|
29
56
|
migrate:
|
|
30
57
|
condition: service_completed_successfully
|
|
58
|
+
x-happyvertical:
|
|
59
|
+
role: worker
|
|
60
|
+
health:
|
|
61
|
+
command: ["pnpm", "exec", "smrt", "app", "doctor"]
|
|
62
|
+
# Local and self-hosted one-shot migration. It has no annotation, so a
|
|
63
|
+
# platform does not run it: there the `migrate` command above runs inside
|
|
64
|
+
# the web image.
|
|
31
65
|
migrate:
|
|
32
66
|
build:
|
|
33
67
|
context: .
|
|
@@ -52,6 +86,8 @@ services:
|
|
|
52
86
|
volumes:
|
|
53
87
|
# PostgreSQL 18+ keeps PGDATA under /var/lib/postgresql/18/docker.
|
|
54
88
|
- postgres-data:/var/lib/postgresql
|
|
89
|
+
x-happyvertical:
|
|
90
|
+
binding: postgres
|
|
55
91
|
|
|
56
92
|
volumes:
|
|
57
93
|
postgres-data:
|
package/template/package.json
CHANGED
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
"app:import": "smrt app import",
|
|
29
29
|
"mcp-apps:validate": "pnpm exec smrt mcp-apps validate --output-dir ./mcp-apps",
|
|
30
30
|
"worker": "smrt app worker task",
|
|
31
|
-
"worker:schedule": "smrt app worker schedule"
|
|
31
|
+
"worker:schedule": "smrt app worker schedule",
|
|
32
|
+
"deploy:check": "smrt deploy:check",
|
|
33
|
+
"docs:agents": "smrt docs:agents"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
36
|
"@sveltejs/adapter-node": "^5.5.7",
|
|
@@ -39,21 +41,21 @@
|
|
|
39
41
|
"svelte-check": "^4.7.6",
|
|
40
42
|
"typescript": "6.0.3",
|
|
41
43
|
"vite": "8.3.3",
|
|
42
|
-
"@happyvertical/smrt-cli": "^0.60.
|
|
44
|
+
"@happyvertical/smrt-cli": "^0.60.16"
|
|
43
45
|
},
|
|
44
46
|
"dependencies": {
|
|
45
|
-
"@happyvertical/smrt-app-runtime": "^0.60.
|
|
46
|
-
"@happyvertical/smrt-config": "^0.60.
|
|
47
|
-
"@happyvertical/smrt-core": "^0.60.
|
|
48
|
-
"@happyvertical/smrt-jobs": "^0.60.
|
|
49
|
-
"@happyvertical/smrt-profiles": "^0.60.
|
|
50
|
-
"@happyvertical/smrt-svelte": "^0.60.
|
|
51
|
-
"@happyvertical/smrt-tenancy": "^0.60.
|
|
52
|
-
"@happyvertical/smrt-ui": "^0.60.
|
|
53
|
-
"@happyvertical/smrt-users": "^0.60.
|
|
54
|
-
"@happyvertical/smrt-web": "^0.60.
|
|
47
|
+
"@happyvertical/smrt-app-runtime": "^0.60.16",
|
|
48
|
+
"@happyvertical/smrt-config": "^0.60.16",
|
|
49
|
+
"@happyvertical/smrt-core": "^0.60.16",
|
|
50
|
+
"@happyvertical/smrt-jobs": "^0.60.16",
|
|
51
|
+
"@happyvertical/smrt-profiles": "^0.60.16",
|
|
52
|
+
"@happyvertical/smrt-svelte": "^0.60.16",
|
|
53
|
+
"@happyvertical/smrt-tenancy": "^0.60.16",
|
|
54
|
+
"@happyvertical/smrt-ui": "^0.60.16",
|
|
55
|
+
"@happyvertical/smrt-users": "^0.60.16",
|
|
56
|
+
"@happyvertical/smrt-web": "^0.60.16",
|
|
55
57
|
"@happyvertical/sql": "^0.89.12",
|
|
56
58
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
57
|
-
"@happyvertical/smrt-reports": "^0.60.
|
|
59
|
+
"@happyvertical/smrt-reports": "^0.60.16"
|
|
58
60
|
}
|
|
59
61
|
}
|
package/template.config.js
CHANGED
|
@@ -19,23 +19,23 @@ export default {
|
|
|
19
19
|
|
|
20
20
|
// Dependencies to add to generated project
|
|
21
21
|
dependencies: {
|
|
22
|
-
'@happyvertical/smrt-app-runtime': '^0.60.
|
|
23
|
-
'@happyvertical/smrt-config': '^0.60.
|
|
24
|
-
'@happyvertical/smrt-core': '^0.60.
|
|
25
|
-
'@happyvertical/smrt-jobs': '^0.60.
|
|
26
|
-
'@happyvertical/smrt-profiles': '^0.60.
|
|
27
|
-
'@happyvertical/smrt-reports': '^0.60.
|
|
28
|
-
'@happyvertical/smrt-svelte': '^0.60.
|
|
29
|
-
'@happyvertical/smrt-tenancy': '^0.60.
|
|
30
|
-
'@happyvertical/smrt-ui': '^0.60.
|
|
31
|
-
'@happyvertical/smrt-users': '^0.60.
|
|
32
|
-
'@happyvertical/smrt-web': '^0.60.
|
|
22
|
+
'@happyvertical/smrt-app-runtime': '^0.60.16',
|
|
23
|
+
'@happyvertical/smrt-config': '^0.60.16',
|
|
24
|
+
'@happyvertical/smrt-core': '^0.60.16',
|
|
25
|
+
'@happyvertical/smrt-jobs': '^0.60.16',
|
|
26
|
+
'@happyvertical/smrt-profiles': '^0.60.16',
|
|
27
|
+
'@happyvertical/smrt-reports': '^0.60.16',
|
|
28
|
+
'@happyvertical/smrt-svelte': '^0.60.16',
|
|
29
|
+
'@happyvertical/smrt-tenancy': '^0.60.16',
|
|
30
|
+
'@happyvertical/smrt-ui': '^0.60.16',
|
|
31
|
+
'@happyvertical/smrt-users': '^0.60.16',
|
|
32
|
+
'@happyvertical/smrt-web': '^0.60.16',
|
|
33
33
|
'@happyvertical/sql': '^0.89.12',
|
|
34
34
|
'@modelcontextprotocol/server': '^2.3.1',
|
|
35
35
|
},
|
|
36
36
|
|
|
37
37
|
devDependencies: {
|
|
38
|
-
'@happyvertical/smrt-cli': '^0.60.
|
|
38
|
+
'@happyvertical/smrt-cli': '^0.60.16',
|
|
39
39
|
'@sveltejs/adapter-node': '^5.5.7',
|
|
40
40
|
'@sveltejs/kit': '2.70.3',
|
|
41
41
|
'@sveltejs/vite-plugin-svelte': '^7.3.0',
|