@vibes.diy/prompts 14.3.330 → 14.3.332
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 +1 -1
- package/llms/callai.md +19 -0
- package/llms/use-viewer.md +2 -0
- package/package.json +5 -5
- package/system-prompt-initial-oneshot.md +4 -0
- package/system-prompt-initial.md +4 -0
- package/system-prompt.md +4 -0
package/llms/access.md
CHANGED
|
@@ -785,7 +785,7 @@ This example shows the full round-trip — access.js declares channels and grant
|
|
|
785
785
|
- **Owner bootstrap:** the vibe owner is auto-seeded into the reserved `owner` role, so gate management operations (channel setup, role grants, moderation) on `ctx.requireRole("owner")` — **never on a display flag** (the UI gates on `can.*`). No bootstrap problem — the seed means the owner can manage without a prior grant. Default content, though, should be author-owned (anyone signed-in creates and edits their own); reserve owner-gating for shared admin surfaces.
|
|
786
786
|
- **Channel identity:** Channel docs use `_id: "ch:" + name` so names are unique. The `_id` is the channel identifier everywhere — in `channels`, `grant`, and `ctx.requireAccess()`.
|
|
787
787
|
- **Channel grant:** A channel document grants the creator (`grant.users`), adds `grant.public` so all members can read, and `grant.roles` so posters can write.
|
|
788
|
-
- **Write surfaces** are gated with `useVibe(dbName).can.create/edit/delete` — it runs this same access function, so the UI verdict matches the server. When denied, read the viewer first: a settled signed-out visitor gets the sign-in ask as a `requestLogin` button, and a signed-in person gets a sentence in the app's words for the rule's `.reason` ("Name the tool to add it"). (See use-viewer and use-vibe docs.)
|
|
788
|
+
- **Write surfaces** are gated with `useVibe(dbName).can.create/edit/delete` — it runs this same access function, so the UI verdict matches the server. When denied, read the viewer first: a settled signed-out visitor gets the sign-in ask as a `requestLogin` button in Save's spot, and a signed-in person gets a sentence in the app's words for the rule's `.reason` ("Name the tool to add it"). (See use-viewer and use-vibe docs.)
|
|
789
789
|
- **`ViewerTag`** takes `userHandle` to render another user (authors, rosters). The current viewer's own pill is system chrome in the Vibes Switch (the logo) — don't add one to the app's UI, except a guarded no-prop `{viewer && <ViewerTag />}` when you want inline avatar self-edit for any signed-in member (see use-viewer docs). The sign-in ASK is the app's, though: `useViewer().requestLogin()` from your own button, at the moment the visitor's work becomes worth keeping.
|
|
790
790
|
|
|
791
791
|
### `access.js`
|
package/llms/callai.md
CHANGED
|
@@ -544,6 +544,25 @@ function GiftIdeas() {
|
|
|
544
544
|
}
|
|
545
545
|
```
|
|
546
546
|
|
|
547
|
+
The AI box renders for everyone in an app that keeps one list per person, too. When each person's records live in their own tree (a list keyed by `me?.userHandle`, a member's studio), a visitor has no tree yet, so the page puts the AI box first, open to them, and the sign-in ask stands where their list will be:
|
|
548
|
+
|
|
549
|
+
```jsx
|
|
550
|
+
function App() {
|
|
551
|
+
const { viewer, isViewerPending, requestLogin } = useViewer();
|
|
552
|
+
const tree = useMyTree(); // null until this person signs in
|
|
553
|
+
const settledSignedOut = !isViewerPending && !viewer;
|
|
554
|
+
return <Stack gap={3}>
|
|
555
|
+
{/* Everyone who opens the app describes a friend and presses Suggest. */}
|
|
556
|
+
<GiftIdeas />
|
|
557
|
+
{tree
|
|
558
|
+
? <FriendList tree={tree} />
|
|
559
|
+
: settledSignedOut && <Button variant="quiet" onClick={requestLogin}>Sign in to keep a list for each friend</Button>}
|
|
560
|
+
</Stack>;
|
|
561
|
+
}
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
A visitor presses Suggest, reads five ideas, and signs in when they want a list of friends to come back to.
|
|
565
|
+
|
|
547
566
|
## Error Handling
|
|
548
567
|
|
|
549
568
|
```javascript
|
package/llms/use-viewer.md
CHANGED
|
@@ -317,6 +317,8 @@ const refusalWords = (reason) => (reason === "a tool needs a name" ? "Name the t
|
|
|
317
317
|
|
|
318
318
|
The name they typed stays in the field across sign-in, so once they are back Save is one press away, and a signed-in neighbor reads what the tool needs next.
|
|
319
319
|
|
|
320
|
+
The signed-out visitor's half of a refusal is a button: `settledSignedOut` chooses between two controls, the `requestLogin` button and the Save-plus-reason pair, and the reason `Text` speaks only to a signed-in person. Even when the refusal is one line under Save (`{!verdict.ok && …}`), its signed-out branch renders `<Button onClick={requestLogin}>Sign in to add your dish</Button>` there, so a friend who opens the sheet signed out presses it, signs in, and comes back to a working Save.
|
|
321
|
+
|
|
320
322
|
Keep the guest's composed text across sign-in. Draft input lives in component state (or a local draft the app already saves) — and signing in never clears it. The new identity arrives on its own through `viewer`; the words they typed stay where they left them, and they continue from there. A form that resets on identity change makes the guest write everything twice.
|
|
321
323
|
|
|
322
324
|
## Notes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/prompts",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.332",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"exports": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@adviser/cement": "~0.5.37",
|
|
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.332",
|
|
43
|
+
"@vibes.diy/call-ai-v2": "14.3.332",
|
|
44
|
+
"@vibes.diy/identity": "14.3.332",
|
|
45
|
+
"@vibes.diy/use-vibes-types": "14.3.332",
|
|
46
46
|
"arktype": "~2.2.9",
|
|
47
47
|
"json-schema-faker": "~0.6.4"
|
|
48
48
|
},
|
|
@@ -558,6 +558,10 @@ When the user picks an option (or types a custom answer), your next turn:
|
|
|
558
558
|
1. Make the change implied by their answer.
|
|
559
559
|
2. End with another improvement question.
|
|
560
560
|
|
|
561
|
+
### A first build that holds records opens on the first real one
|
|
562
|
+
|
|
563
|
+
When this turn builds the first version of an app that holds records, the sentence just before the improvement question sends the person into the app to add their first real record with the form's sparkle, in the app's own words: "Tap ✨ on the form to fill your first recipe, then Save it." The question and its options follow as usual.
|
|
564
|
+
|
|
561
565
|
### Question categories — pick ONE per turn
|
|
562
566
|
|
|
563
567
|
Pick the category that fits the current state of the app. Don't repeat the same category back-to-back unless something obviously needs revisiting.
|
package/system-prompt-initial.md
CHANGED
|
@@ -560,6 +560,10 @@ When the user picks an option (or types a custom answer), your next turn:
|
|
|
560
560
|
1. Make the change implied by their answer.
|
|
561
561
|
2. End with another improvement question.
|
|
562
562
|
|
|
563
|
+
### A first build that holds records opens on the first real one
|
|
564
|
+
|
|
565
|
+
When this turn builds the first version of an app that holds records, the sentence just before the improvement question sends the person into the app to add their first real record with the form's sparkle, in the app's own words: "Tap ✨ on the form to fill your first recipe, then Save it." The question and its options follow as usual.
|
|
566
|
+
|
|
563
567
|
### Question categories — pick ONE per turn
|
|
564
568
|
|
|
565
569
|
Pick the category that fits the current state of the app. Don't repeat the same category back-to-back unless something obviously needs revisiting.
|
package/system-prompt.md
CHANGED
|
@@ -854,6 +854,10 @@ When the user picks an option (or types a custom answer), your next turn:
|
|
|
854
854
|
1. Make the change implied by their answer.
|
|
855
855
|
2. End with another improvement question.
|
|
856
856
|
|
|
857
|
+
### A first build that holds records opens on the first real one
|
|
858
|
+
|
|
859
|
+
When this turn builds the first version of an app that holds records, the sentence just before the improvement question sends the person into the app to add their first real record with the form's sparkle, in the app's own words: "Tap ✨ on the form to fill your first recipe, then Save it." The question and its options follow as usual.
|
|
860
|
+
|
|
857
861
|
### Question categories — pick ONE per turn
|
|
858
862
|
|
|
859
863
|
Pick the category that fits the current state of the app. Don't repeat the same category back-to-back unless something obviously needs revisiting.
|