@vibes.diy/prompts 14.3.252 → 14.3.254
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/llms/access.md +2 -2
- package/package.json +5 -5
package/llms/access.md
CHANGED
|
@@ -198,7 +198,7 @@ The effective access state is the union of every current document's `AccessDescr
|
|
|
198
198
|
|
|
199
199
|
### `allowAnonymous`
|
|
200
200
|
|
|
201
|
-
If `user` is `null` and the function returns without throwing, the runtime checks `allowAnonymous`. If absent or `false`, the write is rejected. This prevents a function that never inspects `user` from silently opening anonymous writes. When `user` is not null, `allowAnonymous` has no effect. `grant.public` makes channels readable by any member (anyone through the door) without a specific channel grant — whether non-members can also read depends on the app-level public toggle. Anonymous _write_ requires `allowAnonymous: true` separately. Declaring it is
|
|
201
|
+
If `user` is `null` and the function returns without throwing, the runtime checks `allowAnonymous`. If absent or `false`, the write is rejected. This prevents a function that never inspects `user` from silently opening anonymous writes. When `user` is not null, `allowAnonymous` has no effect. `grant.public` makes channels readable by any member (anyone through the door) without a specific channel grant — whether non-members can also read depends on the app-level public toggle. Anonymous _write_ requires `allowAnonymous: true` separately. Declaring it is how the app asks for signed-out writes: when the app is published open and isn't sensitive, the platform turns the deployment's owner-visible anonymous-writes setting on from your literal `allowAnonymous: true`, and the owner can switch it off any time. Write the literal `true` where the app takes signed-out writes.
|
|
202
202
|
|
|
203
203
|
### Choosing channels — keep the count low
|
|
204
204
|
|
|
@@ -378,7 +378,7 @@ So, in the same turn as the access edit and after it:
|
|
|
378
378
|
- **Never add a branch to `access.js` just to admit a seed item.** A branch exists because the app writes that type. If a seed item's type appears nowhere in the app's own code, delete the item — do not widen the permission model to let example data through.
|
|
379
379
|
- **Keep every explicit `_id` byte-identical.** Seed items that other items reference, and well-known singletons (`config:profile`, `settings:sharing`), carry an explicit `_id` that the app's code matches literally. Renaming one during a reconcile breaks that lookup in `App.jsx` and orphans any document an owner already imported, in a single edit. Keep the `key` slugs stable for the same reason — the platform derives idempotency from them.
|
|
380
380
|
|
|
381
|
-
**Write the seed as its writer: the owner.** Applying the import writes every record as the owner, with `user = { userHandle: <the owner's handle>, isOwner: true }`, and stamps nothing on the record. So a field a branch compares to the writer — `authorHandle`, `creatorHandle`, `hostHandle` — carries `"@owner"`, and the platform fills in the handle of whoever applies the seed: `{ "key": "pancakes", "type": "recipe", "title": "Sunday pancakes", "authorHandle": "@owner" }` is the owner's own record in the app you build and in every remix of it. Write the marker as the whole value, exactly `"@owner"`. Where the rules set the state a new record starts in ("orders start as new"), each seeded record starts in that state.
|
|
381
|
+
**Write the seed as its writer: the owner.** Applying the import writes every record as the owner, with `user = { userHandle: <the owner's handle>, isOwner: true }`, and stamps nothing on the record. So a field a branch compares to the writer — `authorHandle`, `creatorHandle`, `hostHandle` — carries `"@owner"`, and the platform fills in the handle of whoever applies the seed: `{ "key": "pancakes", "type": "recipe", "title": "Sunday pancakes", "authorHandle": "@owner" }` is the owner's own record in the app you build and in every remix of it. Write the marker as the whole value, exactly `"@owner"`. An id the rules build from the writer carries the marker in the same spot, and it fills in there too: `"_id": "profile-@owner"` arrives as the owner's own profile when the rules ask for `"profile-" + authorHandle`, and `"like-@owner-post-pottery"` as their like. Where the rules set the state a new record starts in ("orders start as new"), each seeded record starts in that state.
|
|
382
382
|
|
|
383
383
|
**Order the seed so the function admits it.** Applying the import runs every document through `access.js` as the owner's first write, in file order, so the seed passes its own rules or it does not arrive at all. A document whose branch reads a channel off a parent needs that parent earlier in the file, granting the channel the child will be routed into; a type the function routes on a field carries that field on every item. A task list seeded as `{ type: "task", listId: "main" }` needs a `list` item with `_id: "main"` above it whose branch grants `list:main` — without it every task is refused on the first apply, and the app opens empty with nothing on screen to say why.
|
|
384
384
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/prompts",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.254",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"exports": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@adviser/cement": "~0.5.34",
|
|
42
|
-
"@vibes.diy/api-types": "14.3.
|
|
43
|
-
"@vibes.diy/call-ai-v2": "14.3.
|
|
44
|
-
"@vibes.diy/identity": "14.3.
|
|
45
|
-
"@vibes.diy/use-vibes-types": "14.3.
|
|
42
|
+
"@vibes.diy/api-types": "14.3.254",
|
|
43
|
+
"@vibes.diy/call-ai-v2": "14.3.254",
|
|
44
|
+
"@vibes.diy/identity": "14.3.254",
|
|
45
|
+
"@vibes.diy/use-vibes-types": "14.3.254",
|
|
46
46
|
"arktype": "~2.2.8",
|
|
47
47
|
"json-schema-faker": "~0.6.3"
|
|
48
48
|
},
|