@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 CHANGED
@@ -160,8 +160,12 @@ await ctx.notify({ toHandle: "alice", body: "Your turn", dedupeKey: "game-7-turn
160
160
  ctx.log("info", "tick finished", { written: 3 }); // diagnostics — read back with: vibes-diy app logs owner/slug
161
161
  const gh = await ctx.github.fetch("/repos/acme/site/issues", { method: "POST", body: { title: "Filed from the vibe" } }); // connected GitHub repo
162
162
  const routes = await ctx.github.routes(); // [{ repo, accountLogin, binderHandle, installationId }] — who connected which repo; no GitHub call
163
+ const session = await ctx.stripe.fetch("/v1/checkout/sessions", { method: "POST", body: form, mode: "test" }); // the owner's connected Stripe account
164
+ const stripe = await ctx.stripe.status(); // { test: { available, state }, live: { available, state } }
163
165
  ```
164
166
 
167
+ - An app that takes money loads the `stripe` skill (one-time charges) or the `stripe-subscriptions` skill (recurring): the Connect Stripe setup item, `ctx.stripe.fetch` with the order's `mode` on every call, hosted Checkout and a complete example.
168
+
165
169
  - An app that works with somebody's GitHub repo loads the `github` skill: the connect link, `config.github`, `ctx.github.routes()`, deliveries and a complete example.
166
170
  - `ctx.github.fetch(path, init)` calls the GitHub REST API **as the GitHub App
167
171
  installation the owner connected to this vibe**. It is the only GitHub surface
@@ -1,20 +1,25 @@
1
1
  export const connectionsConfig = {
2
2
  name: "connections",
3
3
  label: "Connections",
4
- description: "Connect a visitor's own GitHub profile, Threads or Instagram account with one click and read it from backend.js — config.connections, useConnection, @vibes.diy/social",
4
+ description: "Connect a visitor's own GitHub profile, Threads, Instagram or LinkedIn account with one click, read it from backend.js, and post to their Threads, Instagram or LinkedIn — config.connections, useConnection, @vibes.diy/social",
5
5
  cues: [
6
6
  "connect my",
7
7
  "sign in with github",
8
8
  "sign in with instagram",
9
9
  "sign in with threads",
10
+ "sign in with linkedin",
10
11
  "my instagram",
11
12
  "my threads",
12
13
  "my github",
14
+ "my linkedin",
15
+ "post to linkedin",
16
+ "share on linkedin",
13
17
  "my posts",
14
18
  "my followers",
15
19
  "social media login",
16
20
  "instagram",
17
21
  "threads",
22
+ "linkedin",
18
23
  "github account",
19
24
  ],
20
25
  importModule: "use-vibes",
@@ -1 +1 @@
1
- {"version":3,"file":"connections.js","sourceRoot":"","sources":["../../jsr/llms/connections.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,wKAAwK;IAC1K,IAAI,EAAE;QACJ,YAAY;QACZ,qBAAqB;QACrB,wBAAwB;QACxB,sBAAsB;QACtB,cAAc;QACd,YAAY;QACZ,WAAW;QACX,UAAU;QACV,cAAc;QACd,oBAAoB;QACpB,WAAW;QACX,SAAS;QACT,gBAAgB;KACjB;IACD,YAAY,EAAE,WAAW;IACzB,UAAU,EAAE,eAAe;CAC5B,CAAC"}
1
+ {"version":3,"file":"connections.js","sourceRoot":"","sources":["../../jsr/llms/connections.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,aAAa;IACpB,WAAW,EACT,iOAAiO;IACnO,IAAI,EAAE;QACJ,YAAY;QACZ,qBAAqB;QACrB,wBAAwB;QACxB,sBAAsB;QACtB,uBAAuB;QACvB,cAAc;QACd,YAAY;QACZ,WAAW;QACX,aAAa;QACb,kBAAkB;QAClB,mBAAmB;QACnB,UAAU;QACV,cAAc;QACd,oBAAoB;QACpB,WAAW;QACX,SAAS;QACT,UAAU;QACV,gBAAgB;KACjB;IACD,YAAY,EAAE,WAAW;IACzB,UAAU,EAAE,eAAe;CAC5B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  # Connections — a visitor's own account, spent by your app
2
2
 
3
3
  A **connection** lets a visitor link their own third-party account (GitHub,
4
- Threads, Instagram) to your app in one click, and lets your `backend.js` read
4
+ Threads, Instagram, LinkedIn) to your app in one click, and lets your `backend.js` read
5
5
  from that account — and, when they approve it, post to it — as them. The platform shows the consent screen, runs the
6
6
  sign-in, holds the credential, refreshes it, and warns the person before it
7
7
  expires. Your app contains **no** client id, secret, redirect route, token
@@ -17,7 +17,7 @@ to replace.
17
17
 
18
18
  ## When to use it — signal words
19
19
 
20
- "connect my Instagram", "sign in with GitHub", "my Threads posts", "show my
20
+ "connect my Instagram", "sign in with GitHub", "my Threads posts", "post this to my LinkedIn", "show my
21
21
  profile from …", "which of my videos got the most likes", "my followers on …".
22
22
  A request that names one of the providers below and wants **their** data is a
23
23
  connection. A request for public data nobody has to log in for (a public feed,
@@ -62,6 +62,8 @@ GitHub profile next to your entries."), never as a note to yourself.
62
62
  | `threads` | `threads_content_publish` | **post to their Threads feed** (`threads(ctx).publish()`) |
63
63
  | `instagram` | `instagram_business_basic` | read the account's profile and its own media with like/comment counts |
64
64
  | `instagram` | `instagram_business_content_publish` | **post a photo or video to their Instagram** (`instagram(ctx).publish()`) |
65
+ | `linkedin` | `profile` | read the member's name and profile photo (`linkedin(ctx).me()`) |
66
+ | `linkedin` | `w_member_social` | **post to their LinkedIn feed** (`linkedin(ctx).post()`); declare `profile` beside it |
65
67
 
66
68
  **A scope that posts is a separate scope, and asking for it is the whole
67
69
  authorization.** Declare it only when the app really posts, and say so in `why`
@@ -158,8 +160,18 @@ provider call as a typed request with a typed response, so there is no
158
160
  - `instagram(ctx).publish({ imageUrl, caption? })` → `{ id }`. Needs
159
161
  `instagram_business_content_publish`. Instagram has no text-only post, so
160
162
  `imageUrl` is required.
161
-
162
- **Video posting is not available on either provider yet** — the provider hands
163
+ - `linkedin(ctx).me()` → `{ id, name, givenName, familyName, picture, personUrn }`.
164
+ Needs `profile`.
165
+ - `linkedin(ctx).post({ text, visibility?, link? })` → `{ id }`. Needs
166
+ `w_member_social` and `profile` (a post is authored as the member, and
167
+ `profile` is where their id comes from). `text` is plain prose: the library
168
+ escapes LinkedIn's formatting characters and keeps `#hashtags` live.
169
+ `visibility` is `"PUBLIC"` (default) or `"CONNECTIONS"`. `link` is
170
+ `{ url, title?, description? }` and becomes the post's card exactly as given,
171
+ since LinkedIn shows what the request carries. LinkedIn posts carry text and
172
+ a link card.
173
+
174
+ **Video posting is not available on any provider yet** — the provider hands
163
175
  back a container while the video is still processing, and the platform cannot
164
176
  yet read that container's status, so a video post would intermittently fail
165
177
  rather than land. Build on text and images; do not work around it with a raw
@@ -1,7 +1,7 @@
1
1
  export const stripeSubscriptionsConfig = {
2
2
  name: "stripe-subscriptions",
3
3
  label: "Stripe subscriptions",
4
- description: "A paid membership or subscription through Stripe Checkout in subscription mode, ONLY when the person asks for recurring money — monthly, yearly, subscribe, membership fee, paid tier, paywall — on the owner's own STRIPE_SECRET_KEY: the setup steps the app shows when the key or the Customer Portal is missing, the key kept in backend.js with no Stripe.js in the page, one pending membership then one Checkout Session opened in a new tab, entitlement computed from Stripe's status plus one GRACE_DAYS knob for a past_due card, members-only content as a channel the membership record grants and the backend withdraws, cancellation and card changes in Stripe's Customer Portal, and a scheduled sweep that re-reads every live subscription. A one-time charge (dues once, a ticket, a deposit) is the stripe skill; an app with members-only content that charges nothing does not need this — offer it as the [pay] option instead",
4
+ description: "A paid membership or subscription through Stripe Checkout in subscription mode, ONLY when the person asks for recurring money — monthly, yearly, subscribe, membership fee, paid tier, paywall — into the owner's own Stripe account through ctx.stripe, connected once with Connect Stripe: the Connect Stripe and Customer Portal setup items, test mode first with the membership's mode passed on every call and live once the owner takes this app live, every Stripe call in backend.js with no Stripe.js in the page, one pending membership then one Checkout Session opened in a new tab, entitlement computed from Stripe's status plus one GRACE_DAYS knob for a past_due card, members-only content as a channel the membership record grants and the backend withdraws, cancellation and card changes in Stripe's Customer Portal, and a scheduled sweep that re-reads every live subscription. A one-time charge (dues once, a ticket, a deposit) is the stripe skill; an app with members-only content that charges nothing does not need this — offer it as the [pay] option instead",
5
5
  cues: [
6
6
  "subscription",
7
7
  "subscribe",
@@ -1 +1 @@
1
- {"version":3,"file":"stripe-subscriptions.js","sourceRoot":"","sources":["../../jsr/llms/stripe-subscriptions.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,yBAAyB,GAAc;IAClD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,w5BAAw5B;IAC15B,IAAI,EAAE;QACJ,cAAc;QACd,WAAW;QACX,SAAS;QACT,WAAW;QACX,SAAS;QACT,QAAQ;QACR,gBAAgB;QAChB,iBAAiB;QACjB,WAAW;QACX,SAAS;QACT,WAAW;QACX,cAAc;QACd,iBAAiB;KAClB;CACF,CAAC"}
1
+ {"version":3,"file":"stripe-subscriptions.js","sourceRoot":"","sources":["../../jsr/llms/stripe-subscriptions.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,yBAAyB,GAAc;IAClD,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,siCAAsiC;IACxiC,IAAI,EAAE;QACJ,cAAc;QACd,WAAW;QACX,SAAS;QACT,WAAW;QACX,SAAS;QACT,QAAQ;QACR,gBAAgB;QAChB,iBAAiB;QACjB,WAAW;QACX,SAAS;QACT,WAAW;QACX,cAAc;QACd,iBAAiB;KAClB;CACF,CAAC"}