@happyvertical/smrt-template-sveltekit 0.55.23 → 0.56.0

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 CHANGED
@@ -67,7 +67,7 @@ It is the ground-up alternative to `smrt-saas-starter`.
67
67
  CLI's or core's transitive dependencies to the app root — its strict layout
68
68
  does not (#2297).
69
69
  - `vite.config.ts` is `[sveltekit(), smrt()]`. The preset consumes exactly the
70
- packages in `smrt.config.ts` `consumer.packages` (profiles, tenancy, users),
70
+ packages in `smrt.config.ts` `consumer.packages` (profiles, tenancy, users, reports),
71
71
  scans `src/lib/objects`, and generates Vite virtual definitions, SvelteKit
72
72
  routes, runtime registration, and knowledge artifacts. With a
73
73
  `smrt.cookbook.json` it also hosts the cookbook's package models over REST
@@ -218,3 +218,12 @@ presented as WebMCP execution.
218
218
 
219
219
  See [the M5 reference fixture gate](../../docs/content/m5-reference-fixture.md)
220
220
  for what the milestone proves, what it does not, and the recovery commands.
221
+
222
+ Runtime report confirmation mounts the reports-owned Fetch handler at
223
+ `/api/_reports/runtime/confirm`. It passes verified locals and the request's
224
+ collection database; smrt-app-runtime has no reports dependency. The template
225
+ consumes the reports manifest for migrations and explicitly hosts only
226
+ `@happyvertical/smrt-reports:RuntimeReport` through the Vite preset’s `expose` option. Apps enabling
227
+ `reports.runtime` configure `packages.reports.runtime.sources`; the default
228
+ empty allow-list exposes no report sources. The authored route is preserved by
229
+ the template's `.gitignore` exception.
@@ -1,4 +1,4 @@
1
1
  {
2
- "@happyvertical/smrt-app-mcp": "^0.55.23",
3
- "@happyvertical/smrt-mcp-openai": "^0.55.23"
2
+ "@happyvertical/smrt-app-mcp": "^0.56.0",
3
+ "@happyvertical/smrt-mcp-openai": "^0.56.0"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-template-sveltekit",
3
- "version": "0.55.23",
3
+ "version": "0.56.0",
4
4
  "description": "Minimal SvelteKit project template with s-m-r-t framework integration",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -32,26 +32,26 @@
32
32
  "directory": "packages/template-sveltekit"
33
33
  },
34
34
  "peerDependencies": {
35
- "@happyvertical/smrt-core": "0.55.23"
35
+ "@happyvertical/smrt-core": "0.56.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@happyvertical/smrt-app-cli": "0.55.23",
39
- "@happyvertical/smrt-app-mcp": "0.55.23",
40
- "@happyvertical/smrt-app-runtime": "0.55.23",
41
- "@happyvertical/smrt-assets": "0.55.23",
42
- "@happyvertical/smrt-chat": "0.55.23",
43
- "@happyvertical/smrt-cli": "0.55.23",
44
- "@happyvertical/smrt-config": "0.55.23",
45
- "@happyvertical/smrt-jobs": "0.55.23",
46
- "@happyvertical/smrt-mcp-openai": "0.55.23",
47
- "@happyvertical/smrt-playbooks": "0.55.23",
48
- "@happyvertical/smrt-profiles": "0.55.23",
49
- "@happyvertical/smrt-scanner": "0.55.23",
50
- "@happyvertical/smrt-svelte": "0.55.23",
51
- "@happyvertical/smrt-tenancy": "0.55.23",
52
- "@happyvertical/smrt-ui": "0.55.23",
53
- "@happyvertical/smrt-users": "0.55.23",
54
- "@happyvertical/smrt-web": "0.55.23",
38
+ "@happyvertical/smrt-app-cli": "0.56.0",
39
+ "@happyvertical/smrt-app-mcp": "0.56.0",
40
+ "@happyvertical/smrt-app-runtime": "0.56.0",
41
+ "@happyvertical/smrt-assets": "0.56.0",
42
+ "@happyvertical/smrt-chat": "0.56.0",
43
+ "@happyvertical/smrt-cli": "0.56.0",
44
+ "@happyvertical/smrt-config": "0.56.0",
45
+ "@happyvertical/smrt-jobs": "0.56.0",
46
+ "@happyvertical/smrt-mcp-openai": "0.56.0",
47
+ "@happyvertical/smrt-playbooks": "0.56.0",
48
+ "@happyvertical/smrt-profiles": "0.56.0",
49
+ "@happyvertical/smrt-scanner": "0.56.0",
50
+ "@happyvertical/smrt-svelte": "0.56.0",
51
+ "@happyvertical/smrt-tenancy": "0.56.0",
52
+ "@happyvertical/smrt-ui": "0.56.0",
53
+ "@happyvertical/smrt-users": "0.56.0",
54
+ "@happyvertical/smrt-web": "0.56.0",
55
55
  "@happyvertical/sql": "^0.89.12",
56
56
  "@modelcontextprotocol/client": "2.0.0",
57
57
  "@modelcontextprotocol/server": "^2.0.0",
@@ -64,7 +64,8 @@
64
64
  "svelte-check": "^4.7.6",
65
65
  "typescript": "6.0.3",
66
66
  "vite": "8.1.4",
67
- "vitest": "4.1.10"
67
+ "vitest": "4.1.10",
68
+ "@happyvertical/smrt-reports": "0.56.0"
68
69
  },
69
70
  "publishConfig": {
70
71
  "registry": "https://registry.npmjs.org",
@@ -25,6 +25,7 @@ src/routes/api/**/+server.ts
25
25
  # The runtime readiness endpoint is authored infrastructure, not generated API
26
26
  # output, and must remain in the installable scaffold.
27
27
  !src/routes/api/_runtime/health/+server.ts
28
+ !src/routes/api/_reports/runtime/confirm/+server.ts
28
29
  src/lib/server/smrt-register.ts
29
30
  src/lib/types/smrt-generated/
30
31
  src/types/smrt-generated/
@@ -39,20 +39,21 @@
39
39
  "svelte-check": "^4.7.6",
40
40
  "typescript": "6.0.3",
41
41
  "vite": "8.3.0",
42
- "@happyvertical/smrt-cli": "^0.55.23"
42
+ "@happyvertical/smrt-cli": "^0.56.0"
43
43
  },
44
44
  "dependencies": {
45
- "@happyvertical/smrt-app-runtime": "^0.55.23",
46
- "@happyvertical/smrt-config": "^0.55.23",
47
- "@happyvertical/smrt-core": "^0.55.23",
48
- "@happyvertical/smrt-jobs": "^0.55.23",
49
- "@happyvertical/smrt-profiles": "^0.55.23",
50
- "@happyvertical/smrt-svelte": "^0.55.23",
51
- "@happyvertical/smrt-tenancy": "^0.55.23",
52
- "@happyvertical/smrt-ui": "^0.55.23",
53
- "@happyvertical/smrt-users": "^0.55.23",
54
- "@happyvertical/smrt-web": "^0.55.23",
45
+ "@happyvertical/smrt-app-runtime": "^0.56.0",
46
+ "@happyvertical/smrt-config": "^0.56.0",
47
+ "@happyvertical/smrt-core": "^0.56.0",
48
+ "@happyvertical/smrt-jobs": "^0.56.0",
49
+ "@happyvertical/smrt-profiles": "^0.56.0",
50
+ "@happyvertical/smrt-svelte": "^0.56.0",
51
+ "@happyvertical/smrt-tenancy": "^0.56.0",
52
+ "@happyvertical/smrt-ui": "^0.56.0",
53
+ "@happyvertical/smrt-users": "^0.56.0",
54
+ "@happyvertical/smrt-web": "^0.56.0",
55
55
  "@happyvertical/sql": "^0.89.12",
56
- "@modelcontextprotocol/server": "^2.0.0"
56
+ "@modelcontextprotocol/server": "^2.0.0",
57
+ "@happyvertical/smrt-reports": "^0.56.0"
57
58
  }
58
59
  }
@@ -25,6 +25,7 @@ export default {
25
25
  '@happyvertical/smrt-profiles',
26
26
  '@happyvertical/smrt-tenancy',
27
27
  '@happyvertical/smrt-users',
28
+ '@happyvertical/smrt-reports',
28
29
  ],
29
30
  },
30
31
 
@@ -0,0 +1,23 @@
1
+ import type { SmrtRuntimeLocals } from '@happyvertical/smrt-app-runtime/sveltekit';
2
+ import { createRuntimeReportConfirmHandler } from '@happyvertical/smrt-reports';
3
+ import { runtime } from '$lib/server/smrt';
4
+
5
+ const confirm = createRuntimeReportConfirmHandler();
6
+
7
+ /** Approve a report as the verified session user, on the request's database. */
8
+ export const POST = async ({
9
+ request,
10
+ locals,
11
+ }: {
12
+ request: Request;
13
+ locals: SmrtRuntimeLocals;
14
+ }): Promise<Response> => {
15
+ if (!locals.user?.id || !locals.tenantId) return confirm(request, null);
16
+ const collection = await runtime.getCollection('RuntimeReport');
17
+ return confirm(request, {
18
+ db: collection.db,
19
+ userId: locals.user.id,
20
+ tenantId: locals.tenantId,
21
+ permissions: locals.permissions ?? [],
22
+ });
23
+ };
@@ -6,5 +6,8 @@ import { defineConfig } from 'vite';
6
6
  // the packages listed in `smrt.config.ts` (`consumer.packages`), and generates
7
7
  // this app's object registration, types, and API routes.
8
8
  export default defineConfig({
9
- plugins: [sveltekit(), smrt()],
9
+ plugins: [
10
+ sveltekit(),
11
+ smrt({ expose: ['@happyvertical/smrt-reports:RuntimeReport'] }),
12
+ ],
10
13
  });
@@ -19,22 +19,23 @@ export default {
19
19
 
20
20
  // Dependencies to add to generated project
21
21
  dependencies: {
22
- '@happyvertical/smrt-app-runtime': '^0.55.23',
23
- '@happyvertical/smrt-config': '^0.55.23',
24
- '@happyvertical/smrt-core': '^0.55.23',
25
- '@happyvertical/smrt-jobs': '^0.55.23',
26
- '@happyvertical/smrt-profiles': '^0.55.23',
27
- '@happyvertical/smrt-svelte': '^0.55.23',
28
- '@happyvertical/smrt-tenancy': '^0.55.23',
29
- '@happyvertical/smrt-ui': '^0.55.23',
30
- '@happyvertical/smrt-users': '^0.55.23',
31
- '@happyvertical/smrt-web': '^0.55.23',
22
+ '@happyvertical/smrt-app-runtime': '^0.56.0',
23
+ '@happyvertical/smrt-config': '^0.56.0',
24
+ '@happyvertical/smrt-core': '^0.56.0',
25
+ '@happyvertical/smrt-jobs': '^0.56.0',
26
+ '@happyvertical/smrt-profiles': '^0.56.0',
27
+ '@happyvertical/smrt-reports': '^0.56.0',
28
+ '@happyvertical/smrt-svelte': '^0.56.0',
29
+ '@happyvertical/smrt-tenancy': '^0.56.0',
30
+ '@happyvertical/smrt-ui': '^0.56.0',
31
+ '@happyvertical/smrt-users': '^0.56.0',
32
+ '@happyvertical/smrt-web': '^0.56.0',
32
33
  '@happyvertical/sql': '^0.89.12',
33
34
  '@modelcontextprotocol/server': '^2.0.0',
34
35
  },
35
36
 
36
37
  devDependencies: {
37
- '@happyvertical/smrt-cli': '^0.55.23',
38
+ '@happyvertical/smrt-cli': '^0.56.0',
38
39
  '@sveltejs/adapter-node': '^5.5.7',
39
40
  '@sveltejs/kit': '2.70.3',
40
41
  '@sveltejs/vite-plugin-svelte': '^7.3.0',