@vibes.diy/prompts 14.0.11 → 14.0.13
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 +13 -2
- package/package.json +14 -4
package/llms/backend.md
CHANGED
|
@@ -28,6 +28,10 @@ create or mention `backend.js`.
|
|
|
28
28
|
- **`scheduled`** — "every N minutes", "poll", "check periodically", "cron",
|
|
29
29
|
"cleanup", "digest". **Timer-driven**, no user in the loop.
|
|
30
30
|
|
|
31
|
+
A reminder that recurs at a wall-clock time — "every morning at 9", "each
|
|
32
|
+
Friday" — is a `scheduled` handler; `onChange` answers a write that just
|
|
33
|
+
happened.
|
|
34
|
+
|
|
31
35
|
An app can need more than one — a payments app wants `fetch` (webhook receipt)
|
|
32
36
|
**and** `onChange` (email on the new order). If none of these signal words fit
|
|
33
37
|
the request, the app needs no `backend.js` — don't emit one.
|
|
@@ -511,7 +515,10 @@ a sweep that diffs against its own whole-db read goes blind the moment the
|
|
|
511
515
|
database outgrows one page, and then rewrites everything on every tick, forever.
|
|
512
516
|
Keep a copy of the state in module scope as well, and read a **missing or failed**
|
|
513
517
|
state read as *"don't know — skip this tick"*, never as *"nothing has been done
|
|
514
|
-
yet"*: that second reading is exactly what restarts the endless rewrite.
|
|
518
|
+
yet"*: that second reading is exactly what restarts the endless rewrite. That
|
|
519
|
+
state doc is owner-only in `access.js` — it is what the tick believes about
|
|
520
|
+
itself, so keeping it to the owner is what keeps anyone else from steering the
|
|
521
|
+
tick.
|
|
515
522
|
|
|
516
523
|
## fetch — the app's HTTP endpoint
|
|
517
524
|
|
|
@@ -792,7 +799,11 @@ export async function scheduled(event, ctx) {
|
|
|
792
799
|
},
|
|
793
800
|
{ db: SHOW_DB }
|
|
794
801
|
);
|
|
795
|
-
await ctx.notify({
|
|
802
|
+
await ctx.notify({
|
|
803
|
+
toHandle: ctx.appInfo.ownerHandle,
|
|
804
|
+
body: "Your six jokes are drafted and ready for the show.",
|
|
805
|
+
dedupeKey: `draft-${dayKey}`,
|
|
806
|
+
});
|
|
796
807
|
} catch (err) {
|
|
797
808
|
// The day stays claimed: the owner sees what went wrong and is not billed twice for it.
|
|
798
809
|
ctx.log("error", "[digest] draft failed after the day was claimed", { message: err.message });
|
package/package.json
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/prompts",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./build-schema-prompt.js": "./build-schema-prompt.js",
|
|
9
|
+
"./themes/colorsets.js": "./themes/colorsets.js",
|
|
10
|
+
"./themes/colorsets-bundle.js": "./themes/colorsets-bundle.js",
|
|
11
|
+
"./themes/fonts.js": "./themes/fonts.js",
|
|
12
|
+
"./themes/ornament-pad.js": "./themes/ornament-pad.js",
|
|
13
|
+
"./themes/palette-gen.js": "./themes/palette-gen.js",
|
|
14
|
+
"./themes/style-presets.js": "./themes/style-presets.js"
|
|
15
|
+
},
|
|
6
16
|
"description": "",
|
|
7
17
|
"scripts": {
|
|
8
18
|
"build": "core-cli tsc",
|
|
@@ -24,9 +34,9 @@
|
|
|
24
34
|
"license": "Apache-2.0",
|
|
25
35
|
"dependencies": {
|
|
26
36
|
"@adviser/cement": "~0.5.34",
|
|
27
|
-
"@vibes.diy/call-ai-v2": "14.0.
|
|
28
|
-
"@vibes.diy/identity": "14.0.
|
|
29
|
-
"@vibes.diy/use-vibes-types": "14.0.
|
|
37
|
+
"@vibes.diy/call-ai-v2": "14.0.13",
|
|
38
|
+
"@vibes.diy/identity": "14.0.13",
|
|
39
|
+
"@vibes.diy/use-vibes-types": "14.0.13",
|
|
30
40
|
"arktype": "~2.2.3",
|
|
31
41
|
"json-schema-faker": "~0.6.3"
|
|
32
42
|
},
|