@vibes.diy/prompts 14.3.181 → 14.3.184
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/backend.md +4 -0
- package/llms/connections.js +6 -1
- package/llms/connections.js.map +1 -1
- package/llms/connections.md +16 -4
- package/llms/stripe-subscriptions.js +1 -1
- package/llms/stripe-subscriptions.js.map +1 -1
- package/llms/stripe-subscriptions.md +280 -154
- package/llms/stripe.js +1 -1
- package/llms/stripe.js.map +1 -1
- package/llms/stripe.md +250 -130
- package/llms/use-vibe.md +5 -4
- package/package.json +5 -5
package/llms/use-vibe.md
CHANGED
|
@@ -85,13 +85,14 @@ Don't gate management UI on a display flag directly. Encode the rule in `access.
|
|
|
85
85
|
|
|
86
86
|
Most apps work the moment they open. Some need their owner to do one thing first — paste a key, save a billing portal, connect an account — and that is a property of the app, not of any one integration, so every app that has it takes the same shape. An app has at most one **Setup** surface, and the backend's verdict decides its state, never a display flag. The integration skills (Stripe, Spotify, YouTube) each contribute one item to it: what the app needs, how the backend checks it, and the linked steps in the provider's own words.
|
|
87
87
|
|
|
88
|
-
**The backend answers what the app needs and whether each item is done.** A `/setup` route in `backend.js`, called with `apiFetch` so `ctx.userInfo` is set, lists the items — the key is present, the portal is saved, the account is connected — with `done` read from `ctx.secrets
|
|
88
|
+
**The backend answers what the app needs and whether each item is done.** A `/setup` route in `backend.js`, called with `apiFetch` so `ctx.userInfo` is set, lists the items — the key is present, the portal is saved, the account is connected — with `done` read from `ctx.secrets`, the connection or `ctx.stripe.status()`, and `ready` when every item is done. An item whose verdict costs a provider call (is the portal saved?) is asked on the owner's call alone and kept in a document the backend writes; a visitor's read takes the kept value, so visitor traffic spends nothing of the provider's and a blip there keeps the last verdict. The Setup surface is the owner's alone: the backend decides who the owner is, and non-owners never receive the items. Each step is a link to the exact page in that page's own words, with the vibe's real handle and slug filled in from what the backend hands the client. The route carries `ownerHandle` and `appSlug` from `ctx.appInfo`, so the Settings link (`https://vibes.diy/vibes/mine/<ownerHandle>/<appSlug>/settings`, **Secrets**) and the CLI line (`npx vibes-diy secrets set KEY --vibe <ownerHandle>/<appSlug>`) are copy-ready rather than templates.
|
|
89
89
|
|
|
90
90
|
```js
|
|
91
91
|
// backend.js — the verdict for everyone, the items for the owner alone
|
|
92
92
|
if (url.pathname === "/setup" && request.method === "GET") {
|
|
93
93
|
const owner = ctx.userInfo?.userHandle === ctx.appInfo.ownerHandle;
|
|
94
|
-
const
|
|
94
|
+
const stripe = await ctx.stripe.status(); // the stripe skill picks the mode: test until the owner takes this app live
|
|
95
|
+
const items = [{ id: "stripe-connect", label: "Connect Stripe", done: stripe.test.state === "ready" }];
|
|
95
96
|
const ready = items.every((item) => item.done);
|
|
96
97
|
if (!owner) return json({ ok: true, ready, owner });
|
|
97
98
|
return json({ ok: true, ready, owner, items, ownerHandle: ctx.appInfo.ownerHandle, appSlug: ctx.appInfo.appSlug });
|
|
@@ -132,8 +133,8 @@ function SetupScreen({ setup }) {
|
|
|
132
133
|
<Row gap={2}><Text>{item.label}</Text><Badge tone={item.done ? "up" : "info"}>{item.done ? "Done" : "To do"}</Badge></Row>
|
|
133
134
|
{/* the skill's steps: each one a link to the exact page, in that page's own words */}
|
|
134
135
|
<ol>
|
|
135
|
-
<li>Open
|
|
136
|
-
<li>
|
|
136
|
+
<li>Open <a href={`https://vibes.diy/vibes/mine/${vibe}/settings`} target="_blank" rel="noreferrer">this vibe's Settings tab</a> and press <b>Connect Stripe</b> under <b>Payments</b>; Stripe opens its own setup pages.</li>
|
|
137
|
+
<li>Come back here: the feature unlocks as soon as Stripe says the account is ready.</li>
|
|
137
138
|
</ol>
|
|
138
139
|
</Stack>
|
|
139
140
|
))}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/prompts",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.184",
|
|
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.184",
|
|
43
|
+
"@vibes.diy/call-ai-v2": "14.3.184",
|
|
44
|
+
"@vibes.diy/identity": "14.3.184",
|
|
45
|
+
"@vibes.diy/use-vibes-types": "14.3.184",
|
|
46
46
|
"arktype": "~2.2.8",
|
|
47
47
|
"json-schema-faker": "~0.6.3"
|
|
48
48
|
},
|