@vibes.diy/prompts 14.3.324 → 14.3.326
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/LICENSE.md +80 -0
- package/README.md +2 -2
- package/build-schema-prompt.js +0 -1
- package/chat.js +0 -1
- package/component-export-transforms.js +0 -1
- package/component-transforms.js +0 -1
- package/generation-variety.js +0 -1
- package/index.js +0 -1
- package/json-docs.js +0 -1
- package/llms/access.js +0 -1
- package/llms/access.md +1 -1
- package/llms/backend.js +0 -1
- package/llms/backend.md +126 -4
- package/llms/blockly.js +0 -1
- package/llms/bluesky.js +0 -1
- package/llms/board-games.js +0 -1
- package/llms/calendar.js +0 -1
- package/llms/callai.js +0 -1
- package/llms/canvas-theme-colors.js +0 -1
- package/llms/chess-variants.js +0 -1
- package/llms/chess.js +0 -1
- package/llms/connections.js +0 -1
- package/llms/create-vibe.js +0 -1
- package/llms/cues.js +0 -1
- package/llms/d3.js +0 -1
- package/llms/fireproof.js +0 -1
- package/llms/github.js +0 -1
- package/llms/group-plan.js +0 -1
- package/llms/hydra.js +0 -1
- package/llms/image-gen.js +0 -1
- package/llms/index.js +0 -1
- package/llms/keepsake.js +0 -1
- package/llms/live-rooms.js +0 -1
- package/llms/maps.js +0 -1
- package/llms/match-style.js +0 -1
- package/llms/media-capture.js +0 -1
- package/llms/mic-capture.js +0 -1
- package/llms/motion.js +0 -1
- package/llms/needs.js +0 -1
- package/llms/occasion.js +0 -1
- package/llms/owner-secret.js +0 -1
- package/llms/p5.js +0 -1
- package/llms/photo-input.js +0 -1
- package/llms/physics.js +0 -1
- package/llms/reskin.js +0 -1
- package/llms/richtext.js +0 -1
- package/llms/social-post.js +0 -1
- package/llms/sound-core.js +0 -1
- package/llms/spotify.js +0 -1
- package/llms/square.js +0 -1
- package/llms/stripe-subscriptions.js +0 -1
- package/llms/stripe.js +0 -1
- package/llms/strudel.js +0 -1
- package/llms/surface-board.js +0 -1
- package/llms/surface-play-area.js +0 -1
- package/llms/surface-presence.js +0 -1
- package/llms/surface-stage.js +0 -1
- package/llms/third-party-embed.js +0 -1
- package/llms/three-js.js +0 -1
- package/llms/touch-games.js +0 -1
- package/llms/types.js +0 -1
- package/llms/ui-blog.js +0 -1
- package/llms/ui-booking.js +0 -1
- package/llms/ui-calendar.js +0 -1
- package/llms/ui-chat.js +0 -1
- package/llms/ui-contact.js +0 -1
- package/llms/ui-course.js +0 -1
- package/llms/ui-crm.js +0 -1
- package/llms/ui-dashboard.js +0 -1
- package/llms/ui-editorial.js +0 -1
- package/llms/ui-event.js +0 -1
- package/llms/ui-feed.js +0 -1
- package/llms/ui-game.js +0 -1
- package/llms/ui-inbox.js +0 -1
- package/llms/ui-inventory.js +0 -1
- package/llms/ui-kanban.js +0 -1
- package/llms/ui-landing.js +0 -1
- package/llms/ui-login.js +0 -1
- package/llms/ui-music.js +0 -1
- package/llms/ui-onboarding.js +0 -1
- package/llms/ui-pricing.js +0 -1
- package/llms/ui-profile.js +0 -1
- package/llms/ui-quiz.js +0 -1
- package/llms/ui-settings.js +0 -1
- package/llms/ui-storefront.js +0 -1
- package/llms/ui-support.js +0 -1
- package/llms/ui-testimonials.js +0 -1
- package/llms/ui-todo.js +0 -1
- package/llms/ui-weather.js +0 -1
- package/llms/use-vibe.js +0 -1
- package/llms/use-viewer.js +0 -1
- package/llms/vibe-tools.js +0 -1
- package/llms/voxel.js +0 -1
- package/llms/weather.js +0 -1
- package/llms/web-audio.js +0 -1
- package/llms/web-music.js +0 -1
- package/llms/webxr.js +0 -1
- package/llms/world-controls.js +0 -1
- package/llms/worlds.js +0 -1
- package/llms/youtube.js +0 -1
- package/package.json +6 -6
- package/prompts.js +0 -1
- package/restyle.js +0 -1
- package/segment-parser.js +0 -1
- package/settings.js +0 -1
- package/style-prompts.js +0 -1
- package/themes/color-math.js +0 -1
- package/themes/colorsets-bundle.js +0 -1
- package/themes/colorsets.js +0 -1
- package/themes/fonts.js +0 -1
- package/themes/index.js +0 -1
- package/themes/looks/house/field-hues.js +0 -1
- package/themes/looks/house/variety.js +0 -1
- package/themes/looks/index.js +0 -1
- package/themes/looks/pouf/catalog.generated.js +0 -1
- package/themes/looks/pouf/variety.js +0 -1
- package/themes/ornament-pad.js +0 -1
- package/themes/palette-gen.js +0 -1
- package/themes/pouf-rooms.js +0 -1
- package/themes/style-presets.js +0 -1
- package/themes/theme-slugs.js +0 -1
- package/view-state.js +0 -1
- package/build-schema-prompt.js.map +0 -1
- package/chat.js.map +0 -1
- package/component-export-transforms.js.map +0 -1
- package/component-transforms.js.map +0 -1
- package/generation-variety.js.map +0 -1
- package/index.js.map +0 -1
- package/json-docs.js.map +0 -1
- package/llms/access.js.map +0 -1
- package/llms/backend.js.map +0 -1
- package/llms/blockly.js.map +0 -1
- package/llms/bluesky.js.map +0 -1
- package/llms/board-games.js.map +0 -1
- package/llms/calendar.js.map +0 -1
- package/llms/callai.js.map +0 -1
- package/llms/canvas-theme-colors.js.map +0 -1
- package/llms/chess-variants.js.map +0 -1
- package/llms/chess.js.map +0 -1
- package/llms/connections.js.map +0 -1
- package/llms/create-vibe.js.map +0 -1
- package/llms/cues.js.map +0 -1
- package/llms/d3.js.map +0 -1
- package/llms/fireproof.js.map +0 -1
- package/llms/github.js.map +0 -1
- package/llms/group-plan.js.map +0 -1
- package/llms/hydra.js.map +0 -1
- package/llms/image-gen.js.map +0 -1
- package/llms/index.js.map +0 -1
- package/llms/keepsake.js.map +0 -1
- package/llms/live-rooms.js.map +0 -1
- package/llms/maps.js.map +0 -1
- package/llms/match-style.js.map +0 -1
- package/llms/media-capture.js.map +0 -1
- package/llms/mic-capture.js.map +0 -1
- package/llms/motion.js.map +0 -1
- package/llms/needs.js.map +0 -1
- package/llms/occasion.js.map +0 -1
- package/llms/owner-secret.js.map +0 -1
- package/llms/p5.js.map +0 -1
- package/llms/photo-input.js.map +0 -1
- package/llms/physics.js.map +0 -1
- package/llms/reskin.js.map +0 -1
- package/llms/richtext.js.map +0 -1
- package/llms/social-post.js.map +0 -1
- package/llms/sound-core.js.map +0 -1
- package/llms/spotify.js.map +0 -1
- package/llms/square.js.map +0 -1
- package/llms/stripe-subscriptions.js.map +0 -1
- package/llms/stripe.js.map +0 -1
- package/llms/strudel.js.map +0 -1
- package/llms/surface-board.js.map +0 -1
- package/llms/surface-play-area.js.map +0 -1
- package/llms/surface-presence.js.map +0 -1
- package/llms/surface-stage.js.map +0 -1
- package/llms/third-party-embed.js.map +0 -1
- package/llms/three-js.js.map +0 -1
- package/llms/touch-games.js.map +0 -1
- package/llms/types.js.map +0 -1
- package/llms/ui-blog.js.map +0 -1
- package/llms/ui-booking.js.map +0 -1
- package/llms/ui-calendar.js.map +0 -1
- package/llms/ui-chat.js.map +0 -1
- package/llms/ui-contact.js.map +0 -1
- package/llms/ui-course.js.map +0 -1
- package/llms/ui-crm.js.map +0 -1
- package/llms/ui-dashboard.js.map +0 -1
- package/llms/ui-editorial.js.map +0 -1
- package/llms/ui-event.js.map +0 -1
- package/llms/ui-feed.js.map +0 -1
- package/llms/ui-game.js.map +0 -1
- package/llms/ui-inbox.js.map +0 -1
- package/llms/ui-inventory.js.map +0 -1
- package/llms/ui-kanban.js.map +0 -1
- package/llms/ui-landing.js.map +0 -1
- package/llms/ui-login.js.map +0 -1
- package/llms/ui-music.js.map +0 -1
- package/llms/ui-onboarding.js.map +0 -1
- package/llms/ui-pricing.js.map +0 -1
- package/llms/ui-profile.js.map +0 -1
- package/llms/ui-quiz.js.map +0 -1
- package/llms/ui-settings.js.map +0 -1
- package/llms/ui-storefront.js.map +0 -1
- package/llms/ui-support.js.map +0 -1
- package/llms/ui-testimonials.js.map +0 -1
- package/llms/ui-todo.js.map +0 -1
- package/llms/ui-weather.js.map +0 -1
- package/llms/use-vibe.js.map +0 -1
- package/llms/use-viewer.js.map +0 -1
- package/llms/vibe-tools.js.map +0 -1
- package/llms/voxel.js.map +0 -1
- package/llms/weather.js.map +0 -1
- package/llms/web-audio.js.map +0 -1
- package/llms/web-music.js.map +0 -1
- package/llms/webxr.js.map +0 -1
- package/llms/world-controls.js.map +0 -1
- package/llms/worlds.js.map +0 -1
- package/llms/youtube.js.map +0 -1
- package/prompts.js.map +0 -1
- package/restyle.js.map +0 -1
- package/segment-parser.js.map +0 -1
- package/settings.js.map +0 -1
- package/style-prompts.js.map +0 -1
- package/themes/color-math.js.map +0 -1
- package/themes/colorsets-bundle.js.map +0 -1
- package/themes/colorsets.js.map +0 -1
- package/themes/fonts.js.map +0 -1
- package/themes/index.js.map +0 -1
- package/themes/looks/house/field-hues.js.map +0 -1
- package/themes/looks/house/variety.js.map +0 -1
- package/themes/looks/index.js.map +0 -1
- package/themes/looks/pouf/catalog.generated.js.map +0 -1
- package/themes/looks/pouf/variety.js.map +0 -1
- package/themes/ornament-pad.js.map +0 -1
- package/themes/palette-gen.js.map +0 -1
- package/themes/pouf-rooms.js.map +0 -1
- package/themes/style-presets.js.map +0 -1
- package/themes/theme-slugs.js.map +0 -1
- package/view-state.js.map +0 -1
package/LICENSE.md
CHANGED
|
@@ -1,3 +1,82 @@
|
|
|
1
|
+
# License for @vibes.diy/prompts
|
|
2
|
+
|
|
3
|
+
This package is under two licenses, file by file. Paths are relative to the package root.
|
|
4
|
+
|
|
5
|
+
**Apache License 2.0** (the full text is at the end of this file) covers:
|
|
6
|
+
|
|
7
|
+
- `llms/*.md`
|
|
8
|
+
- `cli-footer.md`
|
|
9
|
+
- `mcp-footer.md`
|
|
10
|
+
- `system-prompt.md`
|
|
11
|
+
|
|
12
|
+
These are the skill docs `vibes-diy skills` prints and the coding rules `vibes-diy system` prints, published so any coding agent can write a vibe from them.
|
|
13
|
+
|
|
14
|
+
**Vibes DIY Runtime License** (below) covers every other file in this package.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Vibes DIY Runtime License
|
|
19
|
+
|
|
20
|
+
Copyright 2024-2026 Fireproof Storage Incorporated ("Licensor"). Vibes DIY is a brand of Fireproof Storage Incorporated.
|
|
21
|
+
|
|
22
|
+
## 1. Covered Software
|
|
23
|
+
|
|
24
|
+
"Covered Software" means the files that a package's `LICENSE.md` identifies as licensed under this Vibes DIY Runtime License, or the whole package when its `LICENSE.md` is this license. "Vibes App" means an app built with Vibes DIY, including an app built with the `vibes-diy` command-line tool, exported from Vibes DIY, or run from its source.
|
|
25
|
+
|
|
26
|
+
Files that the Covered Software writes into your own project for you, such as the README and app scaffold that `vibes-diy generate` creates, and the code of your Vibes Apps, belong to you. They are not Covered Software.
|
|
27
|
+
|
|
28
|
+
## 2. What you may do
|
|
29
|
+
|
|
30
|
+
Subject to these terms, Licensor grants you a worldwide, non-exclusive, royalty-free license to:
|
|
31
|
+
|
|
32
|
+
1. install and run the Covered Software, on your own computers, in continuous integration, on servers you operate, or on any host you choose;
|
|
33
|
+
2. include the Covered Software, unmodified, in Vibes Apps that you build, deploy, and run locally, self-hosted, or anywhere else; and
|
|
34
|
+
3. let anyone use those Vibes Apps, including for commercial purposes.
|
|
35
|
+
|
|
36
|
+
Your employees and contractors may do the same on your behalf.
|
|
37
|
+
|
|
38
|
+
## 3. What you may not do
|
|
39
|
+
|
|
40
|
+
You may not:
|
|
41
|
+
|
|
42
|
+
1. modify the Covered Software or create derivative works of it;
|
|
43
|
+
2. reverse engineer, decompile, or disassemble the Covered Software, except to the extent applicable law expressly permits it despite this restriction;
|
|
44
|
+
3. use the Covered Software for any purpose other than building and running Vibes Apps; or
|
|
45
|
+
4. distribute the Covered Software on its own, separately from a Vibes App or from the package it was published in.
|
|
46
|
+
|
|
47
|
+
You must keep this license and any copyright notices with every copy of the Covered Software.
|
|
48
|
+
|
|
49
|
+
## 4. Third-party components
|
|
50
|
+
|
|
51
|
+
The Covered Software includes open-source and other third-party components. Those components remain under their own licenses, listed in `THIRD_PARTY_NOTICES.md` where shipped and in the notices that accompany each component. Nothing in this license limits the rights those licenses give you.
|
|
52
|
+
|
|
53
|
+
## 5. Earlier releases
|
|
54
|
+
|
|
55
|
+
Versions of any package released before this license first shipped with it keep the license they were published with, including the Apache License 2.0 and MIT. This license does not withdraw any right granted under those licenses.
|
|
56
|
+
|
|
57
|
+
## 6. Hosted services
|
|
58
|
+
|
|
59
|
+
This license covers the Covered Software only. Your use of the hosted Vibes DIY services is governed by the Vibes DIY Terms of Service.
|
|
60
|
+
|
|
61
|
+
## 7. Termination
|
|
62
|
+
|
|
63
|
+
If you breach these terms, your license ends. Licensor may reinstate it in writing.
|
|
64
|
+
|
|
65
|
+
## 8. No warranty
|
|
66
|
+
|
|
67
|
+
THE COVERED SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
68
|
+
|
|
69
|
+
## 9. Limitation of liability
|
|
70
|
+
|
|
71
|
+
TO THE MAXIMUM EXTENT PERMITTED BY LAW, LICENSOR WILL NOT BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR CONNECTED WITH THE COVERED SOFTWARE OR ITS USE.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
# Apache License 2.0
|
|
76
|
+
|
|
77
|
+
Copyright 2024-2026 Fireproof Storage Incorporated
|
|
78
|
+
|
|
79
|
+
```text
|
|
1
80
|
Apache License
|
|
2
81
|
Version 2.0, January 2004
|
|
3
82
|
http://www.apache.org/licenses/
|
|
@@ -199,3 +278,4 @@
|
|
|
199
278
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
279
|
See the License for the specific language governing permissions and
|
|
201
280
|
limitations under the License.
|
|
281
|
+
```
|
package/README.md
CHANGED
|
@@ -25,9 +25,9 @@ Private by default — or open to the world. You choose. Keep an app to the peop
|
|
|
25
25
|
|
|
26
26
|
> Your app's data lives in a centralized cloud database. "Private" means access-gated from other people — not encrypted, and not hidden from the platform.
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Run your app anywhere
|
|
29
29
|
|
|
30
|
-
The `vibes-diy` CLI
|
|
30
|
+
The `vibes-diy` CLI and the `use-vibes` SDK are on npm, free to install and run. Build, deploy and share Vibes apps with them on your own computer, your own server or anywhere else, under the Vibes DIY Runtime License in each package's `LICENSE.md`. The skill docs your coding agent reads (`npx vibes-diy skills`) are Apache-2.0, so any agent can learn to write a vibe from them. Open an issue at [VibesDIY/use-vibes](https://github.com/VibesDIY/use-vibes).
|
|
31
31
|
|
|
32
32
|
## Quick Start
|
|
33
33
|
|
package/build-schema-prompt.js
CHANGED
package/chat.js
CHANGED
package/component-transforms.js
CHANGED
package/generation-variety.js
CHANGED
|
@@ -285,4 +285,3 @@ export function renderInstrumentArrangementSection(arrangement) {
|
|
|
285
285
|
`Lay out this app's instrument face as a ${arrangement} (web-music, "Make it yours") and name it in the picks line, unless the person's own words name a machine or a layout, which then decide.`,
|
|
286
286
|
].join("\n");
|
|
287
287
|
}
|
|
288
|
-
//# sourceMappingURL=generation-variety.js.map
|
package/index.js
CHANGED
|
@@ -12,4 +12,3 @@ export { parseContent } from "./segment-parser.js";
|
|
|
12
12
|
export { normalizeComponentExports, transformImports, coreImportMap } from "./component-transforms.js";
|
|
13
13
|
export { buildSchemaSystemMessage, schemaSystemMessageText } from "./build-schema-prompt.js";
|
|
14
14
|
export { allConfigs, canonicalSkillName, cueMatches, cueMatchedSkills, expandSkills, onSkillMenu, skillGraphProblems, universalSkillNames, SKILL_ALIASES, SKILL_SPLITS, SKILL_CATALOG_EPOCH, storedSkillNames, } from "./llms/index.js";
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
package/json-docs.js
CHANGED
package/llms/access.js
CHANGED
package/llms/access.md
CHANGED
|
@@ -190,7 +190,7 @@ the publish-time backfill evaluates them under the new rule.
|
|
|
190
190
|
|
|
191
191
|
### Pictures on shared records
|
|
192
192
|
|
|
193
|
-
Anyone who can read a record can make and keep pictures for it: each generation is saved in the media database as that person's own record, so a shared record stays author-edited while everyone's pictures land. Write-once docs can simply `if (oldDoc === null) {} else throw`.
|
|
193
|
+
Anyone who can read a record can make and keep pictures for it: each generation is saved in the media database as that person's own record, so a shared record stays author-edited while everyone's pictures land. Write-once docs can simply `if (oldDoc === null) {} else throw`. A create the function approved with `oldDoc === null` commits only while the record is still absent, so two writers creating the same `_id` at once never both land: the second is judged again against the first, which is what makes a claim-once record (see "A claim-once offer" in `backend.md`) first-write-wins.
|
|
194
194
|
|
|
195
195
|
### `_id` strategy matters
|
|
196
196
|
|
package/llms/backend.js
CHANGED
package/llms/backend.md
CHANGED
|
@@ -287,7 +287,9 @@ const budget = await ctx.youtube.status(); // { available, unitsLeftToday, daily
|
|
|
287
287
|
plus `ifRev` is an exclusive claim. A conflict is an answer, not a failure:
|
|
288
288
|
someone else has the doc, so return. Leave `ifRev` out and a put is
|
|
289
289
|
last-writer-wins, as always. This is `backend.js` only: `useFireproof`
|
|
290
|
-
writes in the browser are local-first and keep last-writer-wins
|
|
290
|
+
writes in the browser are local-first and keep last-writer-wins, except
|
|
291
|
+
that a create `access.js` approved with `oldDoc === null` commits only while
|
|
292
|
+
the record is still absent (see *A claim-once offer* below).
|
|
291
293
|
|
|
292
294
|
```js
|
|
293
295
|
try {
|
|
@@ -520,9 +522,9 @@ const budget = await ctx.youtube.status(); // { available, unitsLeftToday, daily
|
|
|
520
522
|
Keep interactive/streaming AI in `App.jsx` via `callAI`; use `ctx.callAI`
|
|
521
523
|
when the result must be server-authoritative (moderation, digests,
|
|
522
524
|
summaries users shouldn't be able to forge).
|
|
523
|
-
- **`ctx.notify({ toHandle, body, dedupeKey, path })` sends one person a notification.**
|
|
525
|
+
- **`ctx.notify({ toHandle, body, dedupeKey, path, picture })` sends one person a notification.**
|
|
524
526
|
It takes a single object; `toHandle`, `body` and `dedupeKey` are required and
|
|
525
|
-
`path`
|
|
527
|
+
`path` and `picture` are optional — match the object form in the example above, which is the
|
|
526
528
|
calling convention (codegen has been observed passing these positionally).
|
|
527
529
|
The message lands in that person's bell, inbox, and push notifications.
|
|
528
530
|
A notify to the app's own owner (`ctx.appInfo.ownerHandle`) also reaches
|
|
@@ -563,6 +565,18 @@ const budget = await ctx.youtube.status(); // { available, unitsLeftToday, daily
|
|
|
563
565
|
**A malformed `path` fails the whole `ctx.notify` call** (the promise
|
|
564
566
|
rejects) rather than being quietly ignored — so a dead deep link is
|
|
565
567
|
something you find out about, not something your users find out about.
|
|
568
|
+
- `picture` sends a picture with the words.
|
|
569
|
+
A picture goes with the words as `picture`, never as a link in the body.
|
|
570
|
+
Name a record of this app the way
|
|
571
|
+
you would read it, `{ dbName: "posters", docId: poster._id }` (an image
|
|
572
|
+
button's record works as is, and `fileKey` picks one of a record's several
|
|
573
|
+
files), or pass one of its own file URLs, `poster._files.art.url`. Someone
|
|
574
|
+
reached by text gets it as a photo under the words. The platform sends it
|
|
575
|
+
only to a person who could open that record in the app, as a png, jpeg, gif
|
|
576
|
+
or webp of at most 5 MB; anything else goes as the words alone and never
|
|
577
|
+
fails the call. With a picture named, the call resolves
|
|
578
|
+
`{ picture: "attached" }` or `{ picture: "text-only", reason }`, so log the
|
|
579
|
+
reason when it matters.
|
|
566
580
|
- Read it back in `App.jsx` from your own hash, and listen for changes,
|
|
567
581
|
because a click while the app is already open moves the hash without
|
|
568
582
|
reloading:
|
|
@@ -608,7 +622,7 @@ const budget = await ctx.youtube.status(); // { available, unitsLeftToday, daily
|
|
|
608
622
|
anyone follow it from their phone, signed in or not: they text Vibes the
|
|
609
623
|
vibe's link ("please notify me about the schedule on https://vibes.diy/vibe/…"),
|
|
610
624
|
and Vibes writes ONE record for them into the vibe's `subscribers` database,
|
|
611
|
-
`{ _id: "subscriber:<handle>", type: "subscriber", handle, authorHandle, created, until }`,
|
|
625
|
+
`{ _id: "subscriber:<handle>", type: "subscriber", handle, authorHandle, created, until, about }`,
|
|
612
626
|
then texts them each notification the vibe sends to that handle. The vibe
|
|
613
627
|
opts in by giving `access.js` a `subscribers` function; with none, Vibes tells
|
|
614
628
|
the texter this vibe doesn't send updates yet and saves nothing.
|
|
@@ -653,6 +667,35 @@ const budget = await ctx.youtube.status(); // { available, unitsLeftToday, daily
|
|
|
653
667
|
}
|
|
654
668
|
```
|
|
655
669
|
|
|
670
|
+
Each follower is a record of its own, so tell each one something different.
|
|
671
|
+
`doc.handle` is how you address a follower: an opaque Vibes handle (a texting
|
|
672
|
+
guest's reads `vg-…`), never a phone number, and nothing in the record is one.
|
|
673
|
+
`doc.about` is what they asked to hear about, in their words ("the Souwester
|
|
674
|
+
weekend schedule has something starting"): match it against what is happening,
|
|
675
|
+
or say it back so the text reads as an answer to their ask. Send the picture
|
|
676
|
+
with the words the same way:
|
|
677
|
+
|
|
678
|
+
```js
|
|
679
|
+
for (const doc of subs) {
|
|
680
|
+
const about = (doc.about || "").toLowerCase();
|
|
681
|
+
const mine = soon.filter((e) => !about || about.includes(e.stage.toLowerCase()));
|
|
682
|
+
if (mine.length === 0) continue; // nothing they asked about starts now
|
|
683
|
+
const body = mine.map((e) => `${e.title} starts at ${e.time}`).join("\n");
|
|
684
|
+
try {
|
|
685
|
+
const sent = await ctx.notify({
|
|
686
|
+
toHandle: doc.handle,
|
|
687
|
+
body,
|
|
688
|
+
dedupeKey: `soon-${mine[0].slot}`,
|
|
689
|
+
path: `#${mine[0].id}`,
|
|
690
|
+
picture: mine[0].posterId ? { dbName: "posters", docId: mine[0].posterId } : undefined,
|
|
691
|
+
});
|
|
692
|
+
if (sent?.picture === "text-only") ctx.log("info", "poster went as words", { reason: sent.reason });
|
|
693
|
+
} catch (err) {
|
|
694
|
+
ctx.log("warn", "notify failed", { handle: doc.handle, reason: err.message });
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
```
|
|
698
|
+
|
|
656
699
|
For the button, an `sms:` link opens Messages with the ask written out.
|
|
657
700
|
Ask `https://vibes.diy/_text-number` for Vibes' phone number once on load:
|
|
658
701
|
with it, the button texts from any phone, Android included. Until it answers
|
|
@@ -685,6 +728,85 @@ const budget = await ctx.youtube.status(); // { available, unitsLeftToday, daily
|
|
|
685
728
|
|
|
686
729
|
A follower ends it by replying "stop", and their follow lapses on its own
|
|
687
730
|
after the days Vibes set for it.
|
|
731
|
+
- **Followers who answer: a `replies` collection.** A follower who texts back
|
|
732
|
+
the vibe that just texted them ("yes, save me one", "7pm works", a photo of
|
|
733
|
+
their dog) reaches the vibe itself: Vibes writes their answer into the vibe's
|
|
734
|
+
`replies` database as them, `{ type: "reply", text, authorHandle, created }`,
|
|
735
|
+
with any photos as files in `_files`, and your `onChange` hears it like any
|
|
736
|
+
other write. `authorHandle` is the follower's handle, the same one on their
|
|
737
|
+
`subscriber` record; their phone number never reaches the app. The vibe opts
|
|
738
|
+
in by giving `access.js` a `replies` function; without one, the text is
|
|
739
|
+
answered the ordinary way and nothing lands.
|
|
740
|
+
|
|
741
|
+
```js
|
|
742
|
+
// access.js — each reply is its writer's own; the owner reads them all.
|
|
743
|
+
export function replies(doc, oldDoc, user, ctx) {
|
|
744
|
+
if (!user?.userHandle) throw { forbidden: "sign in" };
|
|
745
|
+
if (doc.type !== "reply" || doc.authorHandle !== user.userHandle) throw { forbidden: "reply as yourself" };
|
|
746
|
+
if (oldDoc && oldDoc.authorHandle !== user.userHandle) throw { forbidden: "your own reply" };
|
|
747
|
+
return { channels: ["replies"] }; // no grant: the owner reads replies, followers don't read each other's
|
|
748
|
+
}
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
```js
|
|
752
|
+
// backend.js — tell the owner, keyed by the reply, so a re-delivery sends nothing twice.
|
|
753
|
+
export async function onChange(event, ctx) {
|
|
754
|
+
if (event.dbName !== "replies" || event.deleted || event.oldDoc) return;
|
|
755
|
+
const words = event.doc.text ?? "sent a photo";
|
|
756
|
+
await ctx.notify({ toHandle: ctx.appInfo.ownerHandle, body: `A follower replied: ${words}`.slice(0, 500), dedupeKey: `reply-${event.docId}` });
|
|
757
|
+
}
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
The vibe a reply goes to is the one that texted that phone most recently, in
|
|
761
|
+
the last day. When two followed vibes texted within half an hour of each
|
|
762
|
+
other, or the newest one takes no replies, the text is answered the ordinary
|
|
763
|
+
way. A reply is no agent turn and costs no credits.
|
|
764
|
+
- **A claim-once offer is a record only its first writer creates.** "Last
|
|
765
|
+
lemon cake, first to say mine gets it", "one seat left for Saturday": send
|
|
766
|
+
the follower a notify whose `path` is `#claim=<id>`, and keep a `claims`
|
|
767
|
+
database whose `access.js` lets the first claim stand. A follower who answers
|
|
768
|
+
"mine" (or "me", "dibs", "I'll take it") makes Vibes write
|
|
769
|
+
`{ _id: "<id>", type: "claim", authorHandle, via: "text", created }` into
|
|
770
|
+
`claims` as them, and the texted link opens the app at `#claim=<id>`, where a
|
|
771
|
+
signed-in visitor taps to write the same record from `App.jsx`. Both go
|
|
772
|
+
through one gate: the platform commits a create that `access.js` approved
|
|
773
|
+
with `oldDoc === null` only while the record is still absent, so two claims
|
|
774
|
+
at the same instant never both land — the second is judged again against the
|
|
775
|
+
first, and its `forbidden` reason is what it hears. Vibes texts the winner
|
|
776
|
+
"It's yours!" and everyone after "That one's already taken".
|
|
777
|
+
|
|
778
|
+
```js
|
|
779
|
+
// access.js — the first claim stands; its claimer may re-save it, nobody else may.
|
|
780
|
+
export function claims(doc, oldDoc, user, ctx) {
|
|
781
|
+
if (!user?.userHandle) throw { forbidden: "sign in to claim" };
|
|
782
|
+
if (oldDoc && oldDoc.authorHandle !== user.userHandle) throw { forbidden: "already taken" };
|
|
783
|
+
if (doc.type !== "claim" || doc.authorHandle !== user.userHandle) throw { forbidden: "claim as yourself" };
|
|
784
|
+
return { channels: ["claims"], grant: { public: ["claims"] } }; // everyone sees it's gone
|
|
785
|
+
}
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
```js
|
|
789
|
+
// backend.js — offer it to every follower, once; and tell the owner who got it.
|
|
790
|
+
await ctx.notify({ toHandle: doc.handle, body: "Last lemon cake of the day! Reply mine to claim it.", dedupeKey: "cake-42-offer", path: "#claim=cake-42" });
|
|
791
|
+
|
|
792
|
+
export async function onChange(event, ctx) {
|
|
793
|
+
if (event.dbName !== "claims" || event.deleted || event.oldDoc) return;
|
|
794
|
+
await ctx.notify({ toHandle: ctx.appInfo.ownerHandle, body: `${event.docId} is claimed`, dedupeKey: `claimed-${event.docId}` });
|
|
795
|
+
}
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
```jsx
|
|
799
|
+
// App.jsx — the tapped link lands on #claim=<id>; one tap claims it for a signed-in visitor.
|
|
800
|
+
const { database, useLiveQuery } = useFireproof("claims");
|
|
801
|
+
const { viewer, requestLogin } = useViewer();
|
|
802
|
+
const claimId = target.startsWith("claim=") ? target.slice(6) : undefined; // `target` from your hash
|
|
803
|
+
const claim = useLiveQuery("_id", { key: claimId ?? "" }).docs[0];
|
|
804
|
+
const take = () =>
|
|
805
|
+
viewer
|
|
806
|
+
? database.put({ _id: claimId, type: "claim", authorHandle: viewer.userHandle, via: "tap", created: new Date().toISOString() })
|
|
807
|
+
: requestLogin();
|
|
808
|
+
// claim ? (claim.authorHandle === viewer?.userHandle ? "It's yours!" : "Already taken") : <button onClick={take}>Claim it</button>
|
|
809
|
+
```
|
|
688
810
|
- **`ctx.log(level?, ...args)` is the handler's diagnostic lane.** It is the
|
|
689
811
|
output that reaches the owner, who reads it back with
|
|
690
812
|
`vibes-diy app logs <owner>/<slug> --since 1h [--tail]` — the isolate's
|
package/llms/blockly.js
CHANGED
package/llms/bluesky.js
CHANGED
package/llms/board-games.js
CHANGED
package/llms/calendar.js
CHANGED
package/llms/callai.js
CHANGED
|
@@ -4,4 +4,3 @@ export const canvasThemeColorsConfig = {
|
|
|
4
4
|
description: "The app's theme tokens as concrete colours a canvas, p5 sketch, Three.js scene or Blockly theme can paint with: cssColor, readLook and watchLook in lib/look.js, read at mount and repainted on a restyle.",
|
|
5
5
|
menu: false,
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=canvas-theme-colors.js.map
|
package/llms/chess-variants.js
CHANGED
|
@@ -9,4 +9,3 @@ export const chessVariantsConfig = {
|
|
|
9
9
|
cues: ["chess variant", "chess variants", "minichess", "fairy chess", "fairy-stockfish", "crazyhouse", "atomic chess", "antichess", "pawn wars"],
|
|
10
10
|
teaches: ["ffish", "fairy-stockfish-single"],
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chess-variants.js.map
|
package/llms/chess.js
CHANGED
package/llms/connections.js
CHANGED
package/llms/create-vibe.js
CHANGED
package/llms/cues.js
CHANGED
package/llms/d3.js
CHANGED
package/llms/fireproof.js
CHANGED
package/llms/github.js
CHANGED
package/llms/group-plan.js
CHANGED
|
@@ -4,4 +4,3 @@ export const groupPlanConfig = {
|
|
|
4
4
|
description: "A job a group does together that ends in one result or one action: poll everyone then pick a date, collect each person's top picks then return a short bookable list, a meeting point that respects what each person privately needs, items people claim, an RSVP or order placed once for the group. Answers are one row per person, a person's private need is read only by its author and the scheduled tick that computes the plan, the plan record is written only by backend.js and quotes no private need, the scheduled tick notifies the owner only when a decision is needed (quorum, conflict, deadline) and stops at its check budget, an approval counts only from a member other than the proposer and only while the proposal's text, audience and amount are unchanged, and each outside action is claimed once as an intent (ifRev: null) and is done only when a receipt confirms it. A single person's own list or tracker, or a poll with no decision to act on, does not need it",
|
|
5
5
|
cues: ["poll everyone", "everyone's availability", "find a time that works", "plan for the group", "rsvp for"],
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=group-plan.js.map
|
package/llms/hydra.js
CHANGED
package/llms/image-gen.js
CHANGED
package/llms/index.js
CHANGED
package/llms/keepsake.js
CHANGED
package/llms/live-rooms.js
CHANGED
package/llms/maps.js
CHANGED
package/llms/match-style.js
CHANGED
package/llms/media-capture.js
CHANGED
package/llms/mic-capture.js
CHANGED
|
@@ -4,4 +4,3 @@ export const micCaptureConfig = {
|
|
|
4
4
|
description: "Opening the microphone or camera: getUserMedia inside the tap that needs it, voice and music constraints, a plain reason when the stream is blocked, missing or busy, and every track stopped on finish, unmount and page hide.",
|
|
5
5
|
menu: false,
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=mic-capture.js.map
|
package/llms/motion.js
CHANGED
package/llms/needs.js
CHANGED
package/llms/occasion.js
CHANGED
package/llms/owner-secret.js
CHANGED
package/llms/p5.js
CHANGED
package/llms/photo-input.js
CHANGED
|
@@ -4,4 +4,3 @@ export const photoInputConfig = {
|
|
|
4
4
|
description: "The photo picker that offers the camera and the photo library: a hidden accept=image/* input with no capture behind the app's own button, multi-select, paste and drag-and-drop, an immediate preview with remove and replace, and shrinkPhoto (downscale, EXIF and location stripped) before storing.",
|
|
5
5
|
menu: false,
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=photo-input.js.map
|
package/llms/physics.js
CHANGED
package/llms/reskin.js
CHANGED
package/llms/richtext.js
CHANGED
package/llms/social-post.js
CHANGED
package/llms/sound-core.js
CHANGED
|
@@ -4,4 +4,3 @@ export const soundCoreConfig = {
|
|
|
4
4
|
description: "Short sound effects that play on a phone: the AudioContext unlock inside the gesture, a synthesized blip per core action, one master gain with a mute toggle, and restraint (core actions only, never spawns or ticks).",
|
|
5
5
|
menu: false,
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=sound-core.js.map
|
package/llms/spotify.js
CHANGED
package/llms/square.js
CHANGED
package/llms/stripe.js
CHANGED
package/llms/strudel.js
CHANGED
package/llms/surface-board.js
CHANGED
|
@@ -5,4 +5,3 @@ export const surfacePlayAreaConfig = {
|
|
|
5
5
|
description: "A full-screen game wears the app's look: sky, fog, light, player and lane lines painted from the theme tokens, a day/night cycle between look colours, and the HUD as kit components on the look's surfaces.",
|
|
6
6
|
menu: false,
|
|
7
7
|
};
|
|
8
|
-
//# sourceMappingURL=surface-play-area.js.map
|
package/llms/surface-presence.js
CHANGED
package/llms/surface-stage.js
CHANGED
package/llms/three-js.js
CHANGED