@vibes.diy/prompts 14.3.304 → 14.3.305

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.
@@ -224,7 +224,7 @@ export function drawInstrumentArrangement(seed) {
224
224
  return INSTRUMENT_ARRANGEMENTS[h % INSTRUMENT_ARRANGEMENTS.length];
225
225
  }
226
226
  export function askNamesInstrumentLayout(text) {
227
- return /\b(mpc|808|909|707|groovebox|rack|rack-?mount|pads?|finger.?drum\w*|launchpad|rows?|grid|columns?)\b/i.test(text);
227
+ return /\b(mpc|808|909|707|groovebox|rack|rack-?mount|finger.?drum\w*|launchpad|pad.?grid)\b/i.test(text);
228
228
  }
229
229
  export function askIsBeatApp(text) {
230
230
  return /\b(drums?|drum.?machines?|drum.?kits?|beat.?makers?|beat.?machines?|beat.?pads?|(?:step.?)?sequencers?|grooveboxe?s?|mpc|808|909|707|finger.?drum\w*)\b/i.test(text);
@@ -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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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"}
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;KACx7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,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/access.md CHANGED
@@ -637,7 +637,7 @@ export function pieces(doc, oldDoc, user, ctx) {
637
637
 
638
638
  The leaderboard is just the access model: read the public `track:` channels and sum them; each viewer additionally sees their own tallies and any buddy who granted them in. A practice log whose owner **asked to keep it to themselves** is instead the per-visitor shape shown above: every visitor's pieces and check-ins on their single `user:${user.userHandle}` channel, self-granted and private to them.
639
639
 
640
- **Per-object collaboration is the shape of every second or shared thing** (the second worked example above), and certainly of anything that says "invite", "join", "people can join", "collaborate", "share with", "together", "with my partner/team", or names a board/canvas/room/whiteboard a group co-edits — each shared thing is ONE object its members reach directly; it needs no owner. Use the per-object recipe: a channel per object, named from the record (`board:${doc._id}` on the object, `board:${doc.boardId}` on its children); the creator self-grants at creation (`grant: { users: { [user.userHandle]: [ch] } }`); child docs gate on `ctx.requireAccess(ch)` so any member edits any child in it (not just their own); a member-authored `share` doc grants a peer the same channel; a `request` doc — which takes **no** `requireAccess` — lets a not-yet-member ask to join. **Each object opens from its own link**: the share control and every link the app hands out carry the object in the fragment (`publicUrl(`#board=${board._id}`)`), the app reads it on load and on `hashchange` and opens that object, and a signed-in visitor whose link names an object they are not in sees an **Ask to join** button right there that writes their `request`; members see the waiting requests on the object and let one in with a tap (the `share`), so a link always leads somewhere, whoever opens it. Keep the _object's own_ creator field write-once (`if (oldDoc && doc.author !== oldDoc.author) throw`) and a child's object-id immutable. **Two traps to avoid:** don't build it as an open public feed where each person only owns their own items (that abandons the shared membership), and don't gate it behind a single writer (members self-serve via share/request). The app owner is not special in the data model: any signed-in person creates their own object and invites a friend into it, and the rule keys on `user.userHandle` or the object's creator, never on `user.isOwner`.
640
+ **Per-object collaboration is the shape of every second or shared thing** (the second worked example above), and certainly of anything that says "invite", "join", "people can join", "collaborate", "share with", "together", "with my partner/team", or names a board/canvas/room/whiteboard a group co-edits — each shared thing is ONE object its members reach directly; it needs no owner. Use the per-object recipe: a channel per object, named from the record (`board:${doc._id}` on the object, `board:${doc.boardId}` on its children); the creator self-grants at creation (`grant: { users: { [user.userHandle]: [ch] } }`); child docs gate on `ctx.requireAccess(ch)` so any member edits any child in it (not just their own); a member-authored `share` doc grants a peer the same channel; a `request` doc — which takes **no** `requireAccess` — lets a not-yet-member ask to join. **Each object opens from its own link**: the share control and every link the app hands out carry the object in the fragment under the one key `open` (`publicUrl(`#open=${board._id}`)` — always `open`, whatever the object is called, so the app, a person and Vibes in a group chat all build the same link), the app reads it on load and on `hashchange` and opens that object, and a signed-in visitor whose link names an object they are not in sees an **Ask to join** button right there that writes their `request` and then reads **Asked** (kept in local state: the asker cannot read their own request back until they are in); members see the waiting requests on the object and let one in with a tap (the `share`), and the newcomer's screen fills in on its own as the grant arrives, so a link always leads somewhere, whoever opens it. Keep the _object's own_ creator field write-once (`if (oldDoc && doc.author !== oldDoc.author) throw`) and a child's object-id immutable. **Two traps to avoid:** don't build it as an open public feed where each person only owns their own items (that abandons the shared membership), and don't gate it behind a single writer (members self-serve via share/request). The app owner is not special in the data model: any signed-in person creates their own object and invites a friend into it, and the rule keys on `user.userHandle` or the object's creator, never on `user.isOwner`.
641
641
 
642
642
  **A page a person sets up for their own visitors is a product its provider owns** — a booking page, a storefront, office hours, a menu, a class sign-up. "My page", "my clients" and "my shop" are the words of the service provider speaking, who is usually the person who made the app and is never assumed to be: any signed-in person can set up a page of their own, a provider can run more than one, and nothing in the rules or the screens asks who owns the vibe. The page is a document like any product (`_id: "page-" + crypto.randomUUID()`), its provider in a write-once `creatorHandle`, readable by everyone on its own `page:<id>` channel, and every record a visitor makes on it carries that page's id in `pageId`, so bookings live under their page rather than beside it. A visitor's record is private between that visitor and the page's provider: it routes to the page's inbox channel, which the page branch grants to its provider alone, and to the visitor's own `user:<handle>` channel, which grants them their own; what other visitors need to know — that a time is taken — rides a separate marker holding only the page and the time, routed to the page's public channel; a client who cancels deletes their booking, and the provider or the scheduled run frees the time. A count of what is left — seats in a class, loaves in this week's bake, spots in an evening — rides the same kind of marker: each visitor's record comes with a twin holding only the page, the item and how many it takes, routed to the page's public channel, and what's left is the item's total minus those twins, so the visitors' own records stay between each of them and the provider. Each page has its own link (`#page=<pageId>`): the provider's view shows it to copy and share, a visitor who opens it lands on that page's open times, and someone who opens the app with no page in the link sees the pages they run and can set up a new one. Clients can offer services too, by setting up a page of their own.
643
643
 
@@ -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. Render `.reason` when denied. (See 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, 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`
@@ -1064,7 +1064,7 @@ export default function (doc, oldDoc, user, ctx) {
1064
1064
  // Summary: each person makes their own lists and shares one with a friend, and everyone on a list adds and edits its items. A list carries its writer's handle in author, and items and shares name their list in listId.
1065
1065
  ```
1066
1066
 
1067
- To invite someone who isn't a member yet without knowing their handle in advance, invert the flow with a request doc: a `request` type takes **no** `ctx.requireAccess` (any signed-in user may create one — their handle is `user.userHandle`, unforgeable) and routes to the list channel `ch(doc.listId)`, where current members read it (the requester can't read their own request back — they aren't a member yet — which is fine; they just wait to be granted). A member then writes the `share` above to approve.
1067
+ To invite someone who isn't a member yet without knowing their handle in advance, invert the flow with a request doc: a `request` type takes **no** `ctx.requireAccess` (any signed-in user may create one — their handle is `user.userHandle`, unforgeable) and routes to the list channel `ch(doc.listId)`, where current members read it (the requester can't read their own request back — they aren't a member yet — so the app keeps an asked state locally and the button reads Asked while they wait to be granted). A member then writes the `share` above to approve.
1068
1068
 
1069
1069
  App.jsx — `access.hasChannel()` shows only the lists the viewer belongs to; `useVibe("lists").can` gates each write surface (create list, add item, invite peer):
1070
1070
 
@@ -294,6 +294,27 @@ When the access rules keep a one-press action to members — Vote beside each po
294
294
 
295
295
  Every row keeps a press that goes somewhere, and once they are back the row shows Vote. `disabled` stays for facts about the record, like a closed poll.
296
296
 
297
+ A form judged at Save hears one verdict for two different people. `can.create(draft)` refuses a settled signed-out visitor, and it refuses a signed-in neighbor whose draft the rules turn down — a tool on a lending shelf with no name yet (`throw { forbidden: "a tool needs a name" }` in `access.js`). So read the viewer before you word the refusal: the signed-out visitor gets the ask as a button in Save's spot, and everyone else gets that rule's own reason in the app's words, beside the field it is about:
298
+
299
+ ```jsx
300
+ const settledSignedOut = !isViewerPending && !viewer;
301
+ const draft = { type: "tool", name: name.trim(), authorHandle: me?.userHandle };
302
+ const verdict = can.create(draft);
303
+ // Each reason access.js can give, in the app's own words.
304
+ const refusalWords = (reason) => (reason === "a tool needs a name" ? "Name the tool to add it" : "Tools come from the shelf's neighbors");
305
+
306
+ {settledSignedOut ? (
307
+ <Button type="button" onClick={requestLogin}>Sign in to add your tool</Button>
308
+ ) : (
309
+ <Stack gap={1}>
310
+ <Button type="submit" disabled={!verdict.ok}>Add tool</Button>
311
+ {!verdict.ok && !verdict.pending && <Text size="sm" muted>{refusalWords(verdict.reason)}</Text>}
312
+ </Stack>
313
+ )}
314
+ ```
315
+
316
+ 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.
317
+
297
318
  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.
298
319
 
299
320
  ## Notes
package/llms/web-music.md CHANGED
@@ -62,6 +62,8 @@ import { Slider } from "@vibes.diy/ui/interactive";
62
62
  <Slider label="Volume" min={0} max={1} step={0.01} value={[volume]} onChange={([v]) => { setVolumeState(v); setVolume(v); }} />
63
63
  ```
64
64
 
65
+ These two sliders are for a synth, a drone, a theremin and every other audio toy. A beat app turns the same two controls as knobs: Drive and Volume sit beside Tempo and Swing as four `Knob`s on the drum machine's face (§6).
66
+
65
67
  With an engine that arrives by runtime import (the Web Audio doc above), the same two controls sit on its output: a `Tone.Distortion` (or `Tone.Chebyshev`) before `Tone.Destination`, with Saturation setting the `Tone.Distortion`'s `distortion` (or the `Tone.Chebyshev`'s `order`), and Volume setting `Tone.Destination.volume`.
66
68
 
67
69
  ## 2) Echo/Delay with Effects Inside the Feedback Loop
@@ -262,9 +264,33 @@ Build the first version of any beat app (a drum machine, beat maker, step
262
264
  sequencer or groovebox) from this section: the engine as written, and an
263
265
  instrument face whose picks you choose (§ "Make it yours" below). The
264
266
  `data-instrument` panel is how a drum machine looks from its very first build,
265
- under any look, layout or skin the turn also carries. The `App.jsx` below
266
- holds the parts every arrangement shares, followed by three short arrangement
267
- sketches: pick one and write the app around it.
267
+ under any look, layout or skin the turn also carries.
268
+
269
+ **Every beat app's first build wears the whole face**, copied from the
270
+ `App.jsx` below: `Panel` (the bezel, four corner screws and a printed name
271
+ plate), `Transport` (Play, Clear and the recessed tempo readout), `Knobs`
272
+ (Tempo, Swing, Drive and Volume, each a turning `Knob`), `Lights` (the row of
273
+ step lights that follows the playing step) and one arrangement of the pads.
274
+ The knob is the one control this face draws itself: where the builder's rules
275
+ say a slider is `Slider`, an instrument's Tempo, Swing, Drive and Volume are
276
+ still `Knob`s, because turning a knob is what makes it read as a machine.
277
+
278
+ **Three arrangements, one per app.** The `App.jsx` ends with three
279
+ arrangement sketches of the same parts, and each makes a different machine:
280
+
281
+ - **rows** (`RowsPanel`): every voice a line of sixteen steps, the classic
282
+ drum machine;
283
+ - **pad grid** (`PadGridPanel`): four big voice pads choose a sound, and that
284
+ voice's sixteen steps sit four by four, MPC style;
285
+ - **vertical rack** (`RackPanel`): each voice its own rack unit with a name
286
+ plate, a Hit button and its step row, stacked like studio gear.
287
+
288
+ The turn's "Instrument arrangement" section names this app's arrangement. With
289
+ no such section, choose the one that suits what the person asked for and what
290
+ the app is about: a pad grid for finger drumming and big taps on a phone, a rack
291
+ for a studio or a layered kit, rows for a classic pattern machine. Each is as
292
+ good a first build as the others, so rows is one choice of three. `App` sets
293
+ `ARRANGEMENT` to the chosen name and renders that sketch.
268
294
 
269
295
  This is a two-file kit: a synthesized four-voice kit (kick,
270
296
  snare, closed and open hat), a sixteen-step sequencer, tempo and swing, and
@@ -765,8 +791,8 @@ function Knobs({ m }) {
765
791
  </Row>
766
792
  );
767
793
  }
768
- // Three arrangements. Choose one, name it in the picks line, and render it inside App after
769
- // `const m = useDrumMachine();`. Saving, sharing and the list of saved beats are the app's own,
794
+ // Three arrangements. Choose one, name it in the picks line and in ARRANGEMENT at the end; App renders
795
+ // it after `const m = useDrumMachine();`. Saving, sharing and the list of saved beats are the app's own,
770
796
  // built from the Fireproof and access docs as ordinary Cards outside the panel.
771
797
 
772
798
  // Rows: every voice is a line of steps, the classic drum machine.
@@ -831,6 +857,20 @@ function RackPanel({ m }) {
831
857
  </Panel>
832
858
  );
833
859
  }
860
+
861
+ // The arrangement this app wears: the turn's "Instrument arrangement", or the one that suits the ask.
862
+ const ARRANGEMENT = "pad grid"; // "rows" · "pad grid" · "vertical rack"
863
+ const ARRANGEMENTS = { rows: RowsPanel, "pad grid": PadGridPanel, "vertical rack": RackPanel };
864
+
865
+ export default function App() {
866
+ const m = useDrumMachine();
867
+ const Machine = ARRANGEMENTS[ARRANGEMENT];
868
+ return (
869
+ <Stack gap={4}>
870
+ <Machine m={m} />
871
+ </Stack>
872
+ );
873
+ }
834
874
  ```
835
875
 
836
876
  ### The instrument face — hardware painted from the look
@@ -876,12 +916,13 @@ reference's picks are one combination; keep one only when it is the right one
876
916
  for this app, so two drum machines rarely share all five. Each pick is a few
877
917
  lines of the sheet or the markup.
878
918
 
879
- - **Arrangement:** tracks as rows (one `StepGrid` per voice, stacked, as in the
880
- reference); a pad grid (four big voice pads choose which voice to edit, and a
919
+ - **Arrangement:** tracks as rows (one `StepGrid` per voice, stacked:
920
+ `RowsPanel`); a pad grid (four big voice pads choose which voice to edit, and a
881
921
  single `StepGrid` for that voice is laid out four by four with
882
- `--ui-steps: 4; --ui-steps-narrow: 4` on `.ui-stepgrid`, MPC style); or a
883
- vertical rack (each voice its own rack unit, stacked: a name plate, a mute
884
- or level knob and its step row, with a rail and screws per unit).
922
+ `--ui-steps: 4; --ui-steps-narrow: 4` on `.ui-stepgrid`, MPC style:
923
+ `PadGridPanel`); or a vertical rack (each voice its own rack unit, stacked: a
924
+ name plate, a mute or level knob and its step row, with a rail and screws per
925
+ unit: `RackPanel`).
885
926
 
886
927
  - **Pad shape:** square key (small radius, hard bottom edge), rubber pad
887
928
  (`border-radius: 30%`, inset shadow), or round cap (`50%`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/prompts",
3
- "version": "14.3.304",
3
+ "version": "14.3.305",
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.304",
43
- "@vibes.diy/call-ai-v2": "14.3.304",
44
- "@vibes.diy/identity": "14.3.304",
45
- "@vibes.diy/use-vibes-types": "14.3.304",
42
+ "@vibes.diy/api-types": "14.3.305",
43
+ "@vibes.diy/call-ai-v2": "14.3.305",
44
+ "@vibes.diy/identity": "14.3.305",
45
+ "@vibes.diy/use-vibes-types": "14.3.305",
46
46
  "arktype": "~2.2.9",
47
47
  "json-schema-faker": "~0.6.3"
48
48
  },