@vibes.diy/prompts 14.3.355 → 14.3.356
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/vibe-tools.js +1 -1
- package/llms/vibe-tools.md +27 -0
- package/package.json +5 -5
package/llms/vibe-tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const vibeToolsConfig = {
|
|
2
2
|
name: "vibe-tools",
|
|
3
3
|
label: "Vibe tools",
|
|
4
|
-
description: "The verbs a person could ask for by text instead of tapping (vote for a place, claim a slot, book a table, add a book to the list), declared in backend.js as a static `export const tools` (at most 8) so an assistant in a group chat can do them for that person. Each tool has a one-line description, typed input fields, who it is for (anyone, members, owner), and either a handler shared with the page's button through a fetch route or a declared one-record write (`key: \"caller\"` for one record per person). A tool always acts as its caller through access.js (`user.backend` is `tool`, never admin mode) and its callAI spends the caller's credits. An app whose actions only happen on the page does not need it",
|
|
4
|
+
description: "The verbs a person could ask for by text instead of tapping (vote for a place, claim a slot, book a table, add a book to the list), declared in backend.js as a static `export const tools` (at most 8) so an assistant in a group chat can do them for that person. Each tool has a one-line description, typed input fields, who it is for (anyone, members, owner), and either a handler shared with the page's button through a fetch route or a declared one-record write (`key: \"caller\"` for one record per person). A tool always acts as its caller through access.js (`user.backend` is `tool`, never admin mode) and its callAI spends the caller's credits. A picture app may mark one tool `offer: true`, which the assistant may offer once per chat after posting the app's picture. An app whose actions only happen on the page does not need it",
|
|
5
5
|
cues: ["text the app", "ask the assistant to", "from the group chat", "vote by text", "claim by text", "tools for the agent"],
|
|
6
6
|
};
|
package/llms/vibe-tools.md
CHANGED
|
@@ -25,6 +25,8 @@ static object whose keys are the tool names. Each tool has:
|
|
|
25
25
|
- **Either `handler` or `write`**, never both:
|
|
26
26
|
- `handler(input, ctx)` runs your code, with the same `ctx` as `fetch`.
|
|
27
27
|
- `write: { db, set, key }` saves one record and runs no code at all.
|
|
28
|
+
- **`offer: true`** (optional, on one tool at most): the tool the assistant
|
|
29
|
+
may offer after it posts this app's picture in a chat. See below.
|
|
28
30
|
|
|
29
31
|
**A vibe declares at most 8 tools.** A ninth refuses the save. Names are
|
|
30
32
|
lowercase letters, digits and underscores, starting with a letter
|
|
@@ -228,6 +230,31 @@ from a browser, the CLI and every other handler. A shared handler reached from
|
|
|
228
230
|
the page writes with `user.backend` set to `"fetch"`, so don't put this gate on
|
|
229
231
|
a record your button writes too.
|
|
230
232
|
|
|
233
|
+
## Offer one tool with the picture
|
|
234
|
+
|
|
235
|
+
When the app makes pictures (a portrait app a texting chat uses for its
|
|
236
|
+
photos), mark the one tool people will want right after their picture as
|
|
237
|
+
`offer: true`:
|
|
238
|
+
|
|
239
|
+
### `backend.js`
|
|
240
|
+
```js partial
|
|
241
|
+
export const tools = {
|
|
242
|
+
remind_me: {
|
|
243
|
+
description: "Text me a reminder the day before the next meetup.",
|
|
244
|
+
offer: true,
|
|
245
|
+
handler: remindMe,
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
After the assistant posts this app's picture in a chat, it may ask once, in
|
|
251
|
+
that chat, a short yes/no question the platform writes from the tool's name
|
|
252
|
+
(`Want me to set up "remind me" for you?`), and it uses the tool
|
|
253
|
+
only after someone says yes. It never asks twice in one chat, and never in a
|
|
254
|
+
chat that is paused or opted out. The question comes from the platform, so
|
|
255
|
+
your description stays a description: name the tool for what the person gets.
|
|
256
|
+
At most one tool says `offer: true`; a second refuses the save.
|
|
257
|
+
|
|
231
258
|
## Writing a good tool
|
|
232
259
|
|
|
233
260
|
- **Name the verbs a person would text.** "vote", "claim", "book", "add",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/prompts",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.356",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"exports": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@adviser/cement": "~0.5.37",
|
|
42
|
-
"@vibes.diy/api-types": "14.3.
|
|
43
|
-
"@vibes.diy/call-ai-v2": "14.3.
|
|
44
|
-
"@vibes.diy/identity": "14.3.
|
|
45
|
-
"@vibes.diy/use-vibes-types": "14.3.
|
|
42
|
+
"@vibes.diy/api-types": "14.3.356",
|
|
43
|
+
"@vibes.diy/call-ai-v2": "14.3.356",
|
|
44
|
+
"@vibes.diy/identity": "14.3.356",
|
|
45
|
+
"@vibes.diy/use-vibes-types": "14.3.356",
|
|
46
46
|
"arktype": "~2.2.9",
|
|
47
47
|
"json-schema-faker": "~0.6.4"
|
|
48
48
|
},
|