@happyvertical/smrt-template-sveltekit 0.43.2 → 0.43.4
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/README.md +8 -3
- package/package.json +4 -4
- package/template/README.md +11 -5
- package/template/package.json +8 -8
package/README.md
CHANGED
|
@@ -122,8 +122,10 @@ pnpm smrt generate-mcp --no-config --no-readme
|
|
|
122
122
|
|
|
123
123
|
WebMCP registration is documented as an opt-in, per-page integration using
|
|
124
124
|
`collectionDefinitions` from `@happyvertical/smrt-virt-web` and
|
|
125
|
-
`registerWebMcpTools()` from `@happyvertical/smrt-web`.
|
|
126
|
-
|
|
125
|
+
`registerWebMcpTools()` from `@happyvertical/smrt-web`. Generated model tools
|
|
126
|
+
default to read-effect exposure, including custom actions declared as reads.
|
|
127
|
+
Write and destructive effects require explicit opt-in, and all custom actions
|
|
128
|
+
execute through their generated REST routes.
|
|
127
129
|
The CLI's manifest-only `objects` and `schema` commands work in this
|
|
128
130
|
source-first template. Local-object CRUD execution through the generic CLI
|
|
129
131
|
additionally requires a compiled JavaScript project entry point.
|
|
@@ -134,9 +136,12 @@ additionally requires a compiled JavaScript project entry point.
|
|
|
134
136
|
consumer adds it only when a page imports the live collection or WebMCP runtime:
|
|
135
137
|
|
|
136
138
|
```bash
|
|
137
|
-
pnpm add @happyvertical/smrt-web
|
|
139
|
+
pnpm add "@happyvertical/smrt-web@$(node -p "require('./package.json').dependencies['@happyvertical/smrt-core']")"
|
|
138
140
|
```
|
|
139
141
|
|
|
142
|
+
Run this inside the generated project. It keeps `smrt-web` on the same release
|
|
143
|
+
line as the template's synchronized `smrt-core` dependency.
|
|
144
|
+
|
|
140
145
|
The generated-project README shows the current hydration pattern:
|
|
141
146
|
`createSmrtCollection(getCollectionDefinition('items'), { initialData,
|
|
142
147
|
basePath: '/api' })` followed by `liveCollection()`. The root layout does not
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-template-sveltekit",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.4",
|
|
4
4
|
"description": "Minimal SvelteKit project template with s-m-r-t framework integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"directory": "packages/template-sveltekit"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@happyvertical/smrt-core": "0.43.
|
|
32
|
+
"@happyvertical/smrt-core": "0.43.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"vitest": "4.1.10",
|
|
36
|
-
"@happyvertical/smrt-tenancy": "0.43.
|
|
37
|
-
"@happyvertical/smrt-users": "0.43.
|
|
36
|
+
"@happyvertical/smrt-tenancy": "0.43.4",
|
|
37
|
+
"@happyvertical/smrt-users": "0.43.4"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"registry": "https://registry.npmjs.org",
|
package/template/README.md
CHANGED
|
@@ -253,9 +253,12 @@ WebMCP is opt-in per browser surface. First add the browser runtime, then put
|
|
|
253
253
|
registration in a dedicated page that actually exposes tools:
|
|
254
254
|
|
|
255
255
|
```bash
|
|
256
|
-
pnpm add @happyvertical/smrt-web
|
|
256
|
+
pnpm add "@happyvertical/smrt-web@$(node -p "require('./package.json').dependencies['@happyvertical/smrt-core']")"
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
+
This derives the version from the generated project's synchronized s-m-r-t release
|
|
260
|
+
pin, so the optional browser runtime stays on the same release line.
|
|
261
|
+
|
|
259
262
|
```svelte
|
|
260
263
|
<script lang="ts">
|
|
261
264
|
import { collectionDefinitions } from '@happyvertical/smrt-virt-web';
|
|
@@ -274,10 +277,13 @@ pnpm add @happyvertical/smrt-web@0.38.25
|
|
|
274
277
|
```
|
|
275
278
|
|
|
276
279
|
`registerWebMcpTools()` feature-detects browser support and uses the current
|
|
277
|
-
authenticated page session.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
280
|
+
authenticated page session. Omitted policy exposes all `read`-effect tools:
|
|
281
|
+
intrinsic `list`/`get` plus custom actions explicitly declared as reads. To
|
|
282
|
+
advertise mutations on a trusted surface, pass an explicit effect allowlist, for
|
|
283
|
+
example `effects: ['read', 'write']`; include `destructive` only where delete and
|
|
284
|
+
destructive custom actions are intended. Generated custom actions execute
|
|
285
|
+
through their authenticated REST routes, and undeclared custom effects fail
|
|
286
|
+
closed as destructive.
|
|
281
287
|
|
|
282
288
|
## 9. Add optional live browser data
|
|
283
289
|
|
package/template/package.json
CHANGED
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"svelte-check": "^4.7.2",
|
|
26
26
|
"typescript": "^6.0.3",
|
|
27
27
|
"vite": "^8.1.4",
|
|
28
|
-
"@happyvertical/smrt-cli": "^0.43.
|
|
28
|
+
"@happyvertical/smrt-cli": "^0.43.4"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@happyvertical/smrt-config": "^0.43.
|
|
32
|
-
"@happyvertical/smrt-core": "^0.43.
|
|
33
|
-
"@happyvertical/smrt-profiles": "^0.43.
|
|
34
|
-
"@happyvertical/smrt-svelte": "^0.43.
|
|
35
|
-
"@happyvertical/smrt-tenancy": "^0.43.
|
|
36
|
-
"@happyvertical/smrt-ui": "^0.43.
|
|
37
|
-
"@happyvertical/smrt-users": "^0.43.
|
|
31
|
+
"@happyvertical/smrt-config": "^0.43.4",
|
|
32
|
+
"@happyvertical/smrt-core": "^0.43.4",
|
|
33
|
+
"@happyvertical/smrt-profiles": "^0.43.4",
|
|
34
|
+
"@happyvertical/smrt-svelte": "^0.43.4",
|
|
35
|
+
"@happyvertical/smrt-tenancy": "^0.43.4",
|
|
36
|
+
"@happyvertical/smrt-ui": "^0.43.4",
|
|
37
|
+
"@happyvertical/smrt-users": "^0.43.4",
|
|
38
38
|
"@modelcontextprotocol/server": "^2.0.0"
|
|
39
39
|
}
|
|
40
40
|
}
|