@vibes.diy/prompts 14.3.309 → 14.3.311

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.
@@ -52,7 +52,10 @@ export declare function renderLookPackageSection(look: {
52
52
  readonly label: string;
53
53
  readonly brief: string;
54
54
  } | undefined): string;
55
- export declare function renderReskinDoseSection(dose: "light" | "full" | undefined): string;
55
+ export declare function renderReskinDoseSection(dose: "light" | "full" | undefined, opts?: {
56
+ readonly occasion?: boolean;
57
+ }): string;
58
+ export declare function renderOccasionDressSection(): string;
56
59
  export declare function renderTextureNoteSection(note: string | undefined): string;
57
60
  export declare const INSTRUMENT_ARRANGEMENTS: readonly ["rows", "pad grid", "vertical rack"];
58
61
  export type InstrumentArrangement = (typeof INSTRUMENT_ARRANGEMENTS)[number];
@@ -186,9 +186,11 @@ export function renderLookPackageSection(look) {
186
186
  "Write the app exactly as the brief above says, importing from `@vibes.diy/ui`: the served stylesheet draws those same components in this look, so never import a look's own package, restyle a component, or redraw a control by hand to get it. An instrument face a skill teaches (`data-instrument`) is the one place you paint kit pads and draw knobs, from this look's tokens, as that skill shows. What is yours is the voice: write the title, headings, labels, empty states and sample data in a tone that suits this look.",
187
187
  ].join("\n");
188
188
  }
189
- export function renderReskinDoseSection(dose) {
189
+ export function renderReskinDoseSection(dose, opts = {}) {
190
190
  if (dose === undefined)
191
191
  return "";
192
+ if (opts.occasion === true)
193
+ return renderOccasionDressSection();
192
194
  if (dose === "light") {
193
195
  return [
194
196
  "## Reskin — light",
@@ -202,6 +204,46 @@ export function renderReskinDoseSection(dose) {
202
204
  "Dress this whole app in an appearance with the reskin skill, even though the person did not name one. Choose one named style that suits the app's subject and the look it is served in, say which in a line of your reply, and carry it through: fonts, borders, corners, texture, motion and a recomposed layout, all on the look's own components and tokens. An instrument face a skill teaches (`data-instrument`) stays its own panel: the skin dresses the page around it, and the face keeps its knobs, pads and token-painted colours.",
203
205
  ].join("\n");
204
206
  }
207
+ export function renderOccasionDressSection() {
208
+ return [
209
+ "## Occasion — dress the app for its day",
210
+ "",
211
+ "This app is FOR an occasion, and the occasion is its style (the occasion skill). Name the day in your opening sentence, then dress the whole app for it with the reskin technique. Your `App.jsx` opens with this skin, every `<…>` filled in with the day's own values, and the app's root renders it as its first child:",
212
+ "",
213
+ "```jsx",
214
+ "const SKIN = `",
215
+ "@import url('https://fonts.googleapis.com/css2?family=<Display+Face>&family=<Body+Face>:wght@400;600&display=swap');",
216
+ "[data-reskin], body:has([data-reskin]) {",
217
+ " --bg: <ground>; --surface: <card>; --ink: <text>; --text-secondary: <quiet text>;",
218
+ " --purple: <the day's lead colour>; --on-accent: <ink on the lead>; --orange: <second colour>; --info: <third colour>;",
219
+ " --font-family: '<Body Face>', system-ui, sans-serif;",
220
+ " min-height: 100vh; color: var(--ink); font-family: var(--font-family);",
221
+ " background: <a CSS pattern of the day's motif: radial-gradient stars, snow, confetti>, var(--bg);",
222
+ "}",
223
+ "[data-reskin] .ui-h1, [data-reskin] .ui-h2, [data-reskin] .hero-when { font-family: '<Display Face>', <fallback>; }",
224
+ "[data-reskin] .hero { text-align: center; padding: 40px 16px 24px; }",
225
+ '[data-reskin] .motif::before { content: "<the day\'s object> "; }',
226
+ "`;",
227
+ "",
228
+ "export default function App() {",
229
+ " return (",
230
+ " <div data-reskin>",
231
+ " <style>{SKIN}</style>",
232
+ ' <header className="hero">',
233
+ " <Heading level={1}><the occasion's welcome></Heading>",
234
+ ' <p className="hero-when"><the date line></p>',
235
+ " </header>",
236
+ " {/* the app's real work, on the kit's components as the look serves them */}",
237
+ " </div>",
238
+ " );",
239
+ "}",
240
+ "```",
241
+ "",
242
+ "The hex values inside `SKIN` are the one place this app writes a colour: they are what the look's token rules above make room for, and every component, prop and record stays exactly as the look serves it. A dark ground also re-declares the composite surfaces (`--ui-card --ui-row --ui-control --ui-field`) as a soft glow in the lead colour. The motif class goes on list items, the empty state and a divider, so the day's object repeats down the page.",
243
+ "",
244
+ "Headings, buttons, empty states and success messages speak the day; field labels stay plain. A stranger glancing at the first screen names the occasion from its colours alone: the look's palette and voice were a starting sketch, and the occasion's replace them.",
245
+ ].join("\n");
246
+ }
205
247
  export function renderTextureNoteSection(note) {
206
248
  const trimmed = typeof note === "string" ? note.trim() : "";
207
249
  if (trimmed.length === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"generation-variety.js","sourceRoot":"","sources":["../jsr/generation-variety.ts"],"names":[],"mappings":"AA6EA,MAAM,CAAC,MAAM,iBAAiB,GAA+B;IAC3D;QACE,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EACN,6RAA6R;KAChS;IACD;QACE,EAAE,EAAE,WAAW;QACf,QAAQ,EACN,4PAA4P;KAC/P;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EACN,uPAAuP;KAC1P;IACD;QACE,EAAE,EAAE,mBAAmB;QACvB,QAAQ,EACN,yRAAyR;KAC5R;IACD;QACE,EAAE,EAAE,WAAW;QACf,QAAQ,EACN,+PAA+P;KAClQ;CACF,CAAC;AAuBF,MAAM,CAAC,MAAM,UAAU,GAAwB;IAC7C;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,yXAAyX;KAC5X;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,wSAAwS;KAC3S;IACD;QACE,EAAE,EAAE,aAAa;QACjB,QAAQ,EACN,mSAAmS;KACtS;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,mgBAAmgB;KACtgB;IACD;QACE,EAAE,EAAE,eAAe;QACnB,QAAQ,EACN,q7BAAq7B;KACx7B;IACD;QACE,EAAE,EAAE,aAAa;QACjB,QAAQ,EACN,8UAA8U;KACjV;IACD;QACE,EAAE,EAAE,cAAc;QAClB,QAAQ,EACN,sWAAsW;KACzW;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,smBAAsmB;KACzmB;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,sTAAsT;KACzT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AAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"generation-variety.js","sourceRoot":"","sources":["../jsr/generation-variety.ts"],"names":[],"mappings":"AA6EA,MAAM,CAAC,MAAM,iBAAiB,GAA+B;IAC3D;QACE,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EACN,6RAA6R;KAChS;IACD;QACE,EAAE,EAAE,WAAW;QACf,QAAQ,EACN,4PAA4P;KAC/P;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EACN,uPAAuP;KAC1P;IACD;QACE,EAAE,EAAE,mBAAmB;QACvB,QAAQ,EACN,yRAAyR;KAC5R;IACD;QACE,EAAE,EAAE,WAAW;QACf,QAAQ,EACN,+PAA+P;KAClQ;CACF,CAAC;AAuBF,MAAM,CAAC,MAAM,UAAU,GAAwB;IAC7C;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,yXAAyX;KAC5X;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,wSAAwS;KAC3S;IACD;QACE,EAAE,EAAE,aAAa;QACjB,QAAQ,EACN,mSAAmS;KACtS;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,mgBAAmgB;KACtgB;IACD;QACE,EAAE,EAAE,eAAe;QACnB,QAAQ,EACN,q7BAAq7B;KACx7B;IACD;QACE,EAAE,EAAE,aAAa;QACjB,QAAQ,EACN,8UAA8U;KACjV;IACD;QACE,EAAE,EAAE,cAAc;QAClB,QAAQ,EACN,sWAAsW;KACzW;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,smBAAsmB;KACzmB;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,sTAAsT;KACzT;IACD;QACE,EAAE,EAAE,eAAe;QACnB,QAAQ,EACN,8SAA8S;KACjT;IACD;QACE,EAAE,EAAE,cAAc;QAClB,QAAQ,EACN,6uBAA6uB;KAChvB;IACD;QACE,EAAE,EAAE,gBAAg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;IACnD,OAAO,uFAAuF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5G,CAAC;AAOD,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,0JAA0J,CAAC,IAAI,CACpK,IAAI,CACL,CAAC;AACJ,CAAC;AAOD,MAAM,UAAU,4BAA4B,CAAC,IAG5C;IACC,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC;QAAE,OAAO,SAAS,CAAC;IACjE,OAAO,yBAAyB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAMD,MAAM,UAAU,kCAAkC,CAAC,WAA8C;IAC/F,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACzC,OAAO;QACL,2BAA2B;QAC3B,EAAE;QACF,2CAA2C,WAAW,2IAA2I;KAClM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
package/llms/backend.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export const backendConfig = {
2
2
  name: "backend",
3
3
  label: "backend-js",
4
- description: "server-side backend.js file: answer HTTP/webhook requests at the app's /_api URL, react to committed data changes, and run scheduled jobs — its writes go through the app's own access rules; reads a web page, feed or API the person names and hands it to the page through /_api; emails, notifies and reminds people through ctx.notify by handle — a weekly digest, a summary for the owner, a Monday email to the manager — and invites a recipient who is not in the app yet; sends a record to a tool the person names (Slack, Google Sheets, a CRM, Zapier) through a Zapier Catch Hook the owner connects; and takes records in from Zapier — a Google Forms response, a new sheet row, an email — at its /_api URL, checked against a shared secret",
4
+ description: "server-side backend.js file: answer HTTP/webhook requests at the app's /_api URL, react to committed data changes, and run scheduled jobs — its writes go through the app's own access rules; reads a web page, feed or API the person names and hands it to the page through /_api; emails, notifies and reminds people through ctx.notify by handle — a weekly digest, a summary for the owner, a Monday email to the manager — and invites a recipient who is not in the app yet; sends a record to a tool the person names (Slack, Google Sheets, a CRM, Zapier) through a Zapier Catch Hook the owner connects; and takes records in from Zapier — a Google Forms response, a new sheet row, an email — at its /_api URL, checked against a shared secret, including the person's own Gmail: a Zap they filter forwards only the mail they choose, which is how an app reads receipts or newsletters from an inbox",
5
5
  universal: "edits",
6
- cues: ["email", "notify", "remind", "digest", "zapier", "catch hook", "webhook", "slack", "sheets", "crm", "google forms"],
6
+ cues: ["email", "notify", "remind", "digest", "zapier", "catch hook", "webhook", "slack", "sheets", "crm", "google forms", "gmail", "inbox"],
7
7
  };
8
8
  //# sourceMappingURL=backend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"backend.js","sourceRoot":"","sources":["../../jsr/llms/backend.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,aAAa,GAAc;IACtC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,YAAY;IACnB,WAAW,EACT,guBAAguB;IAKluB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,CAAC;CAC3H,CAAC"}
1
+ {"version":3,"file":"backend.js","sourceRoot":"","sources":["../../jsr/llms/backend.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,aAAa,GAAc;IACtC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,YAAY;IACnB,WAAW,EACT,y3BAAy3B;IAK33B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,CAAC;CAC7I,CAAC"}
package/llms/backend.md CHANGED
@@ -979,7 +979,7 @@ caller, so the app's rules hold for API writes too.
979
979
  A Zap brings records into the app by POSTing to its `/_api` route.
980
980
  Reach for it when the ask says the records come *from* another tool — "from
981
981
  Zapier", "when a form is submitted in Google Forms", "every new row in my
982
- sheet", "each new email in my inbox". The owner makes a Zap whose trigger is
982
+ sheet", "each new email in my inbox", "the receipts in my Gmail". The owner makes a Zap whose trigger is
983
983
  that tool and whose action is **Webhooks by Zapier → POST** to
984
984
  `https://vibes.diy/vibe/<owner>/<slug>/_api/zapier/lead`, sending the fields as
985
985
  JSON and mapping the tool's own id for the record (the form response id, the
@@ -1145,6 +1145,72 @@ The page lists `lead` records with `useLiveQuery("type", { key: "lead" })`,
1145
1145
  and the owner and their teammates see each one within a minute of the Zap
1146
1146
  firing.
1147
1147
 
1148
+ ### Mail in from Gmail — the person's Zap is the filter
1149
+
1150
+ An app that reads the person's email (receipts into a budget, newsletters into
1151
+ a reading list, order confirmations into a tracker) gets its mail through this
1152
+ same Zapier route, because the platform has no Gmail read connection. That is
1153
+ the good part to say in your reply: the person writes the filter in Zapier, so
1154
+ the app sees only the mail they chose to send it and nothing else in their
1155
+ inbox, and deleting the Zap ends it. The Zap's trigger is **Gmail → New Email
1156
+ Matching Search**, and its search box takes a Gmail search, which *is* the
1157
+ filter (`subject:(receipt OR order) newer_than:30d`, `from:@shop.example.com`,
1158
+ `label:to-vibes`). Its action is **Webhooks by Zapier → POST** to
1159
+ `https://vibes.diy/vibe/<owner>/<slug>/_api/zapier/mail`, payload type JSON,
1160
+ with `id` = *Message Id*, `from` = *From Email*, `subject` = *Subject*,
1161
+ `date` = *Date* and `body` = *Body Plain*, and the `x-zapier-secret` header.
1162
+
1163
+ Build it as the lead recipe above with these changes:
1164
+
1165
+ - **The route is `/zapier/mail` and takes the mail's fields.** It answers
1166
+ `400` when both `subject` and `body` are missing, keeps each field a string
1167
+ and caps it (`body` at 20,000 characters), and keys the mail by a hash of
1168
+ Gmail's message `id`. The seal covers `[key, from, subject, date, body]`.
1169
+ - **Mail is the owner's alone.** The tick writes `mail:<key>` records with
1170
+ `ifRev: null` on a `mail` channel granted only to the reserved `owner` role,
1171
+ with no member record and no anonymous read, and the page shows the owner
1172
+ the steps above. Your reply says that only the owner sees what arrives.
1173
+ - **Reading a mail is a second step in the same tick.** The tick writes each
1174
+ new mail with `state: "new"`, then reads up to four of them a tick
1175
+ (`ctx.callAI` allows five calls a run) and writes what it finds beside the
1176
+ mail as its own backend-only type, in its own `access.js` branch that starts
1177
+ with `ctx.requireBackend("scheduled")`. A failed AI call leaves the mail
1178
+ `new` for the next tick.
1179
+
1180
+ ```js partial
1181
+ const RECEIPT = {
1182
+ properties: { isReceipt: { type: "boolean" }, merchant: { type: "string" }, total: { type: "number" }, currency: { type: "string" } },
1183
+ required: ["isReceipt", "merchant", "total", "currency"],
1184
+ };
1185
+ // After the arrivals loop: gather up to four new mails, paging on `next` (`limit` clamps the raw page before the filter).
1186
+ const unread = [];
1187
+ let cursor;
1188
+ let scanned = 0;
1189
+ do {
1190
+ const page = await ctx.db.query({ db: "mail", field: "state", key: "new", limit: 200, after: cursor });
1191
+ for (const doc of page) if (doc.type === "mail" && unread.length < 4) unread.push(doc);
1192
+ cursor = page.next;
1193
+ scanned += 1;
1194
+ } while (cursor && unread.length < 4 && scanned < 10);
1195
+ // Read each one and keep the receipts.
1196
+ for (const mail of unread) {
1197
+ let found;
1198
+ try {
1199
+ found = JSON.parse(await ctx.callAI(`Is this email a receipt? From: ${mail.from}\nSubject: ${mail.subject}\n\n${mail.body.slice(0, 12000)}`, { schema: RECEIPT }));
1200
+ } catch (err) {
1201
+ ctx.log("warn", "receipt read failed", { id: mail._id, reason: String(err?.message ?? err) });
1202
+ break; // the mail stays new and the next tick tries again
1203
+ }
1204
+ if (found.isReceipt && typeof found.total === "number") {
1205
+ const receipt = { type: "receipt", mailId: mail._id, merchant: String(found.merchant).slice(0, 200), total: found.total, currency: String(found.currency).slice(0, 8) };
1206
+ await ctx.db.put(receipt, { db: "mail", id: "receipt:" + mail._id.slice(5), ifRev: null }).catch((err) => {
1207
+ if (err?.code !== "conflict") throw err;
1208
+ });
1209
+ }
1210
+ await ctx.db.put({ ...mail, state: "read" }, { db: "mail", id: mail._id });
1211
+ }
1212
+ ```
1213
+
1148
1214
  ### Bulk transformations run as a route
1149
1215
 
1150
1216
  A change that touches many stored records is written once, as a named `/_api` route, and run
@@ -0,0 +1,2 @@
1
+ import type { LlmConfig } from "./types.js";
2
+ export declare const hydraConfig: LlmConfig;
package/llms/hydra.js ADDED
@@ -0,0 +1,41 @@
1
+ export const hydraConfig = {
2
+ name: "hydra",
3
+ label: "Hydra live-coded visuals",
4
+ description: "Live-coded video with Hydra, the browser video synth of the algorave scene, where a moving picture is a chain " +
5
+ "of functions written as text (osc, noise, voronoi, shape, kaleid, modulate, feedback through src(o0)): a " +
6
+ "sketch pad with an editor, examples, a callAI box that rewrites the sketch and a shared gallery; a video synth " +
7
+ "whose knobs write the sketch, with the camera as a source; VJ decks and full-screen visuals for a set; visuals " +
8
+ "that move with the room's sound or with a Strudel pattern's beat through a.fft. Covers the AGPL engine fetched " +
9
+ "after first paint by a pinned esm.sh dynamic import (never bundled, credited visibly), one canvas and a frame " +
10
+ "loop the app owns, running typed sketches with errors shown while the last good one plays, the verbatim " +
11
+ "text-to-sketch system prompt, the microphone and camera from a press. hydra, hydra-synth, live coding " +
12
+ "visuals, livecoding visuals, live visuals, video synth, vj, vjing, algorithmic video, generative video, " +
13
+ "audio-reactive visuals, algorave visuals, feedback visuals, kaleidoscope visuals",
14
+ needs: ["surface-stage"],
15
+ teaches: ["hydra-synth"],
16
+ cues: [
17
+ "hydra",
18
+ "hydra-synth",
19
+ "hydra synth",
20
+ "live coding visuals",
21
+ "live-coding visuals",
22
+ "livecoding visuals",
23
+ "live coded visuals",
24
+ "live-coded visuals",
25
+ "live visuals",
26
+ "video synth",
27
+ "video synthesizer",
28
+ "visual synth",
29
+ "vj",
30
+ "vjing",
31
+ "vj visuals",
32
+ "algorithmic video",
33
+ "algorithmic visuals",
34
+ "generative video",
35
+ "audio reactive visuals",
36
+ "audio-reactive visuals",
37
+ "algorave visuals",
38
+ "feedback visuals",
39
+ ],
40
+ };
41
+ //# sourceMappingURL=hydra.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydra.js","sourceRoot":"","sources":["../../jsr/llms/hydra.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,WAAW,GAAc;IACpC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,gHAAgH;QAChH,2GAA2G;QAC3G,iHAAiH;QACjH,iHAAiH;QACjH,iHAAiH;QACjH,gHAAgH;QAChH,0GAA0G;QAC1G,wGAAwG;QACxG,0GAA0G;QAC1G,kFAAkF;IACpF,KAAK,EAAE,CAAC,eAAe,CAAC;IACxB,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,IAAI,EAAE;QACJ,OAAO;QACP,aAAa;QACb,aAAa;QACb,qBAAqB;QACrB,qBAAqB;QACrB,oBAAoB;QACpB,oBAAoB;QACpB,oBAAoB;QACpB,cAAc;QACd,aAAa;QACb,mBAAmB;QACnB,cAAc;QACd,IAAI;QACJ,OAAO;QACP,YAAY;QACZ,mBAAmB;QACnB,qBAAqB;QACrB,kBAAkB;QAClB,wBAAwB;QACxB,wBAAwB;QACxB,kBAAkB;QAClB,kBAAkB;KACnB;CACF,CAAC"}