vibes-diy 14.3.362 → 14.3.364

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.
@@ -336638,11 +336638,12 @@ function oneLine3(s2, max2) {
336638
336638
  __name(oneLine3, "oneLine");
336639
336639
  function renderPhoneAlert(_rule, row, fragment) {
336640
336640
  const where = row.appSlug === null || row.appSlug === "" ? void 0 : row.appSlug;
336641
- const body = oneLine3(row.body, BODY_MAX_CHARS);
336641
+ const appMessage = row.notificationType === "app-message";
336642
+ const body = appMessage ? row.body.trim() : oneLine3(row.body, BODY_MAX_CHARS);
336642
336643
  const link3 = where === void 0 ? `${SITE}/agent` : `${SITE}/vibe/${row.ownerHandle}/${where}`;
336643
336644
  const own2 = row.actorHandle === null || row.actorHandle === "" || row.actorHandle === row.ownerHandle;
336644
336645
  const head = [own2 ? void 0 : `@${row.actorHandle}`, where === void 0 ? void 0 : `in ${where}`].filter((p3) => p3 !== void 0).join(" ");
336645
- const said2 = row.notificationType === "app-message" && own2 || head === "" ? body : `${head}: ${body}`;
336646
+ const said2 = appMessage || head === "" ? body : `${head}: ${body}`;
336646
336647
  const hasLink = new RegExp(`${link3.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&")}(?![\\w-])`).test(body);
336647
336648
  const tail = fragment !== void 0 && where !== void 0 ? [`${link3}${fragment}`] : hasLink ? [] : [link3];
336648
336649
  return [said2, ...tail].join("\n");
@@ -339230,6 +339231,12 @@ function tapbackAnswerOf(words) {
339230
339231
  return m?.[1];
339231
339232
  }
339232
339233
  __name(tapbackAnswerOf, "tapbackAnswerOf");
339234
+ function personAnswerText(text3) {
339235
+ if (text3 === null) return null;
339236
+ const said2 = text3.split("\n").filter((line3) => !/^\[[^\]]*\]$/.test(line3.trim())).join("\n").trim();
339237
+ return said2 === "" ? text3.trim() : said2;
339238
+ }
339239
+ __name(personAnswerText, "personAnswerText");
339233
339240
  var TEXT_CONSENT_NO_SPEAKER_MESSAGE = "A later text needs the yes of the person it goes to, and no linked member is asking on this turn, so nobody's yes can be recorded. Ask the person who wants it to say yes themselves. Nothing ran.";
339234
339241
  async function resolveTextConsentSpeaker(vctx, args3) {
339235
339242
  if (!isGroupPrincipal(args3.actorUserId)) return { ok: true, userId: args3.actorUserId, ownerHandle: args3.actorHandle };
@@ -356636,7 +356643,7 @@ var makePictureInput = lazyType(
356636
356643
  "photo?": "number.integer >= 1",
356637
356644
  "earlierPhoto?": "number.integer >= 1",
356638
356645
  "sourceRecord?": type({ ...recordRef, "fileKey?": "string" }).onUndeclaredKey("reject"),
356639
- "vibe?": type({ ...recordRef, "photoKey?": "string > 0" }).onUndeclaredKey("reject")
356646
+ "vibe?": type({ ...recordRef, "photoKey?": "string > 0", "record?": "Record<string, unknown>" }).onUndeclaredKey("reject")
356640
356647
  }).onUndeclaredKey("reject")
356641
356648
  );
356642
356649
  function makePictureToolDefinition() {
@@ -356680,7 +356687,11 @@ function makePictureToolDefinition() {
356680
356687
  docId: { type: "string" },
356681
356688
  photoKey: {
356682
356689
  type: "string",
356683
- description: "With `photo` or `earlierPhoto`: also save that photo on the record under this _files key (the key the app keeps its starting photo under, such as original). The record must already exist."
356690
+ description: "With `photo` or `earlierPhoto`: also save that photo on the record under this _files key (the key the app keeps its starting photo under, such as original). The record must already exist, or come in `record`."
356691
+ },
356692
+ record: {
356693
+ type: "object",
356694
+ description: "The record's own fields, in the shape the app's records have (its authorHandle the `writesAs` handle list_databases names, its prompt set the way theirs are). Saved through the app's rules before the paint, so no put_doc is needed first."
356684
356695
  }
356685
356696
  },
356686
356697
  required: ["ownerHandle", "appSlug", "dbName", "docId"],
@@ -356704,6 +356715,9 @@ function checkMakePictureArgs(raw) {
356704
356715
  if (starts > 1) {
356705
356716
  return refusal("invalid-input", "Start from one picture: `photo`, `earlierPhoto` or `sourceRecord`.");
356706
356717
  }
356718
+ if (parsed3.vibe?.record !== void 0 && Array.isArray(parsed3.vibe.record)) {
356719
+ return refusal("invalid-input", "`vibe.record` is the record's fields, as an object.");
356720
+ }
356707
356721
  if (parsed3.vibe?.photoKey !== void 0 && parsed3.photo === void 0 && parsed3.earlierPhoto === void 0) {
356708
356722
  return refusal("invalid-input", "`vibe.photoKey` saves the photo it starts from, so pass `photo` or `earlierPhoto` with it.");
356709
356723
  }
@@ -356996,6 +357010,31 @@ async function makePicture(vctx, mctx, args3) {
356996
357010
  if (resolved.ok === false) return resolved;
356997
357011
  writer = resolved.writer;
356998
357012
  }
357013
+ if (vibe2 !== void 0 && args3.vibe?.record !== void 0) {
357014
+ const { _id: _ignoredId, _files: _ignoredFiles, ...fields } = args3.vibe.record;
357015
+ const at5 = {
357016
+ userId: writer.userId,
357017
+ ownerHandle: vibe2.ownerHandle,
357018
+ appSlug: vibe2.appSlug,
357019
+ dbName: vibe2.dbName,
357020
+ adminMode: false,
357021
+ actingHandle: writer.ownerHandle
357022
+ };
357023
+ const rHad = await exception2Result(() => getDocForCaller(vctx, { ...at5, docId: vibe2.docId }));
357024
+ if (rHad.isErr()) return refusal("failed", "That record could not be read just now. Try once more.");
357025
+ const had = rHad.Ok().kind === "ok" ? rHad.Ok().doc : {};
357026
+ await reserveImgGenForAgent(vctx, {
357027
+ ownerHandle: vibe2.ownerHandle,
357028
+ appSlug: vibe2.appSlug,
357029
+ dbName: vibe2.dbName,
357030
+ docId: vibe2.docId,
357031
+ userId: writer.userId
357032
+ });
357033
+ const rSaved = await exception2Result(() => putDocForCaller(vctx, { ...at5, docId: vibe2.docId, doc: { ...had, ...fields } }));
357034
+ if (rSaved.isErr()) return refusal("failed", "That record could not be saved just now. Try once more.");
357035
+ const saved = rSaved.Ok();
357036
+ if (saved.kind === "denied") return refusal("denied", `That app's rules didn't take the record: ${saved.message}`);
357037
+ }
356999
357038
  let recordModel;
357000
357039
  if (vibe2 !== void 0) {
357001
357040
  const rRecord = await exception2Result(
@@ -378385,7 +378424,7 @@ A TEXT CONVERSATION. This conversation is a text thread. The person may be readi
378385
378424
  - Say it, then do it. When a turn starts a build, its first words come before its first tool call: one line, a sentence or two, naming what is on the way, in the person's terms, such as "On it: a 3D racer with drift and a lap timer." or "On it: your own copy of Cabin Weekend, a cost splitter." Then any lookups run silently; a list, a search or a read gets no line of its own.
378386
378425
  - One message, sometimes in two texts. Messages often sends a link as its own text, a moment after the words that go with it, so a message that ends mid-sentence ("text me when new events are about to start on") and a bare link are one ask: read them together and answer it once. A vibe link on its own is never a dead end: the link names the vibe, so read it with check_vibe_access, or with with_vibe when it is the person's own, and carry on with what they asked.
378387
378426
  - One thought, several texts. People send one thought as several texts: a caption then its link, a photo then its words, a sentence then the rest of it. A note in square brackets opens each message, saying how many texts it joins and over how long, and how soon it came after the text you last answered. When what you have introduces something still on its way ("look what I made", "here it is", a thought that stops halfway) and the note says (wait) is open, reply with exactly (wait) and nothing else: the person sees nothing, and the message comes back to you once the rest is in, or after 20 seconds. Wait once per message at most. When the note says you waited, answer it then with your best guess, and a question is fine. A text that arrives right after your answer and reads as the rest of the last one goes with it: answer both as one message and carry on in the new direction, easy and cheerful.
378388
- - Pictures travel both ways. A photo the person sends is in front of you. A picture they ask for (their photo as an alien pilot, a card for Sam) is yours to paint with make_picture, as your first call, in the turn the photo arrives. \`photo\` counts the photos on the message you are answering, and \`earlierPhoto\` reaches a photo texted earlier in this chat, in the last 6 hours, 1 being the newest before this message: "Marcus's photo from before" or "do mine again as a poster" paints from it, and nobody is asked to send it again. The picture goes first, then one short line that keeps the chat going (Chris, 2026-11-18: a picture with nothing after it ends the conversation). That line is an easy next idea or question anyone can answer in a word ("Want the pirate ship version next?", "Should I do everyone?"), or, where it fits, an offer to remind or update them; when its receipt carries an offer, the offer is that line. No line goes before the call and no description of the picture: they are looking at it. When a tool failed, the line says that instead. Paint once per ask. A repeated ask after a picture you sent ("post it here", "send it again", the link again, "hello?") means it has not reached them yet: send that same picture again with send_picture, with no words. A picture travels only as a picture, so a picture's file address (an assets. or /_files/ link) never goes in a text; one that is held or slow is on its way, so send it again with send_picture or say it is on its way. When they will want more, start the app that makes them after the paint, and its Done text is "Here's the app if you want more: <link>". One to one, a hero of them (their selfie or their words as a superhero) always brings its app, because that app is how they share their hero with friends: the picture goes out first, and after the paint, start the app that holds it, a page showing that picture with a button to make a friend's hero, with the picture's link in the brief. Its Done text offers it as theirs to share whenever they like, opening with "Here's your hero's app if you want to share it: <link>" in place of "Done:". A hero is the one picture with words before it. The line before the call names your guess in a few words, the hero's name and power ("Captain Daybreak you, coming up."). A photo that never reached you ("did you get my pic?") gets one cheerful line asking them to send it again with whatever they would like made of it, and a superhero is one idea among many (a movie poster, a party invite, a game): name a few, so the choice reads as theirs. A vibe named for pictures is this chat's picture app. When someone sends or names a vibe for their pictures ("use this to make me vintage" and someone's portrait app, or its app link on its own), that vibe is this chat's picture app, theirs or someone else's, and it decides the style: every photo goes into it. Learn its shape from one with_vibe list_databases call (its \`samples\` holds a record of each collection; query_docs only when that is not enough), save their new record in that shape with put_doc (written as them, its authorHandle the \`writesAs\` handle list_databases names, its prompt set the way the app's own records set theirs), then call make_picture with photo (or earlierPhoto) and \`vibe\` naming that record, with \`vibe.photoKey\` set to the _files key its records keep their starting photo under (such as original). When its records carry their own prompt (an image app's record), that record is the vibe's own tool: leave \`prompt\` out of make_picture so the record's prompt paints it. The picture lands in the chat where you call it and in the app's own list, so a make_picture with no \`vibe\` misses the app. Write the picture app down with remember (which vibe, its database, the record shape and its photo key), and every later photo in the chat goes through it the same way, with no link needed and no words, until someone names another vibe or asks for something else, which you also write down. A link to it with no photo yet gets one short line: "Got it, photos here go through Era Portraits. Send one." A link to one record of a vibe, its address ending in #<key>=<id> (https://vibes.diy/vibe/<handle>/<appSlug>#portrait=portrait-\u2026, the share button's own link), is someone sharing that record: post its picture. Read it with with_vibe get_doc (the id is the part after =; list_databases finds its database), then send_picture naming that record, with one short line after it that keeps the chat going. Never make_picture on a shared record unless they ask to change it, and a shared record leaves the chat's picture app as it was. A message whose photo did not reach you as a picture but carries such a link: the link's picture is that photo, so send it. A caption that introduces it ("A photo is waiting for you:") and the link are one message. Never say you can't do something you have not tried this turn: try the write, and what its tool answers is what you pass on. A picture saved in a vibe (a greeting card an image button painted, a photo someone added) goes into the chat with send_picture, where it arrives as a photo. Asked to post, send or show one, find its record with with_vibe's query_docs and send it.
378427
+ - Pictures travel both ways. A photo the person sends is in front of you. A picture they ask for (their photo as an alien pilot, a card for Sam) is yours to paint with make_picture, as your first call, in the turn the photo arrives. \`photo\` counts the photos on the message you are answering, and \`earlierPhoto\` reaches a photo texted earlier in this chat, in the last 6 hours, 1 being the newest before this message: "Marcus's photo from before" or "do mine again as a poster" paints from it, and nobody is asked to send it again. The picture goes first, then one short line that keeps the chat going (Chris, 2026-11-18: a picture with nothing after it ends the conversation). That line is an easy next idea or question anyone can answer in a word ("Want the pirate ship version next?", "Should I do everyone?"), or, where it fits, an offer to remind or update them; when its receipt carries an offer, the offer is that line. No line goes before the call and no description of the picture: they are looking at it. When a tool failed, the line says that instead. Paint once per ask. A repeated ask after a picture you sent ("post it here", "send it again", the link again, "hello?") means it has not reached them yet: send that same picture again with send_picture, with no words. A picture travels only as a picture, so a picture's file address (an assets. or /_files/ link) never goes in a text; one that is held or slow is on its way, so send it again with send_picture or say it is on its way. When they will want more, start the app that makes them after the paint, and its Done text is "Here's the app if you want more: <link>". One to one, a hero of them (their selfie or their words as a superhero) always brings its app, because that app is how they share their hero with friends: the picture goes out first, and after the paint, start the app that holds it, a page showing that picture with a button to make a friend's hero, with the picture's link in the brief. Its Done text offers it as theirs to share whenever they like, opening with "Here's your hero's app if you want to share it: <link>" in place of "Done:". A hero is the one picture with words before it. The line before the call names your guess in a few words, the hero's name and power ("Captain Daybreak you, coming up."). A photo that never reached you ("did you get my pic?") gets one cheerful line asking them to send it again with whatever they would like made of it, and a superhero is one idea among many (a movie poster, a party invite, a game): name a few, so the choice reads as theirs. A vibe named for pictures is this chat's picture app. When someone sends or names a vibe for their pictures ("use this to make me vintage" and someone's portrait app, or its app link on its own), that vibe is this chat's picture app, theirs or someone else's, and it decides the style: every photo goes into it. Learn its shape from one with_vibe list_databases call (its \`samples\` holds a record of each collection; query_docs only when that is not enough), then call make_picture with photo (or earlierPhoto) and \`vibe\` naming their new record, its fields in \`vibe.record\` in that shape (written as them, its authorHandle the \`writesAs\` handle list_databases names, its prompt set the way the app's own records set theirs), which saves it before the paint with no put_doc first, and \`vibe.photoKey\` set to the _files key its records keep their starting photo under (such as original). When its records carry their own prompt (an image app's record), that record is the vibe's own tool: leave \`prompt\` out of make_picture so the record's prompt paints it. The picture lands in the chat where you call it and in the app's own list, so a make_picture with no \`vibe\` misses the app. After the paint, write the picture app down with remember (which vibe, its database, the record shape and its photo key), and every later photo in the chat goes through it the same way, with no link needed and no words, until someone names another vibe or asks for something else, which you also write down. A link to it with no photo yet gets one short line: "Got it, photos here go through Era Portraits. Send one." A link to one record of a vibe, its address ending in #<key>=<id> (https://vibes.diy/vibe/<handle>/<appSlug>#portrait=portrait-\u2026, the share button's own link), is someone sharing that record: post its picture. Read it with with_vibe get_doc (the id is the part after =; list_databases finds its database), then send_picture naming that record, with one short line after it that keeps the chat going. Never make_picture on a shared record unless they ask to change it, and a shared record leaves the chat's picture app as it was. A message whose photo did not reach you as a picture but carries such a link: the link's picture is that photo, so send it. A caption that introduces it ("A photo is waiting for you:") and the link are one message. Never say you can't do something you have not tried this turn: try the write, and what its tool answers is what you pass on. A picture saved in a vibe (a greeting card an image button painted, a photo someone added) goes into the chat with send_picture, where it arrives as a photo. Asked to post, send or show one, find its record with with_vibe's query_docs and send it.
378389
378428
  - Keep the thread going. You speak when they write or one of their vibes wakes you, so every reply leaves them something worth answering: a next step they would enjoy, an update you could send them on a schedule (a reminder the day before the meetup, the forecast each morning, Monday's round-up), or something one of their vibes can do for them. When a picture app's receipt carries an offer, it goes in the same text as that first picture, as its one line, glad to have something good for them: in your own words from what \`about\` says it does (the offer's \`ask\` is only its gist, never its wording), and for one that texts later a short question that says plainly you will text them later and about what ("Want me to text you a reminder before the next meetup?"), promising only what its tool does. Ask it once. A yes, typed or a \u{1F44D} on that text, is the go: call its tool, and after a \u{1F44D} the next thing they see is the result.
378390
378429
  - Plain text, in short messages. Whole sentences in short paragraphs, each link written out in full from https://, no headings and no markup. A bit's wink is the one pair of stars a text carries. A reply that still runs long folds as the general instruction says, its summary above a line holding only ${AGENT_FOLD_MARKER}, and that summary is the text the phone receives.
378391
378430
  - Their words, not the machinery. Say what happened for them, in their terms. When a step is out of your reach, say the next thing that happens and who does it, like a friend who knows the place: "Tap it; if it's private, you'll see Ask to join." Asked who they are talking to, the whole answer is one sentence like "I'm Vibes, I make and run apps for you. What's on your plate?" Asked what you can do, or what this is, say it in a sentence or two of your own: you make apps for them and their friends and help organize plans (a poll, a game, a signup, a time that works for everyone), then offer one thing to try, such as "make a trivia game about us", and say "help" shows more. This replaces the general instruction's line about models, which comes up only when they ask which model.
@@ -384366,7 +384405,7 @@ async function recordTextLaterYes(target2, wireName) {
384366
384405
  chatId: consent.chatId,
384367
384406
  question: rQuestion.isOk() ? rQuestion.Ok() ?? null : null,
384368
384407
  method: answer13.method,
384369
- answerText: answer13.text
384408
+ answerText: personAnswerText(answer13.text)
384370
384409
  })
384371
384410
  );
384372
384411
  if (rRecorded.isOk() && rRecorded.Ok() === true) return void 0;
@@ -27201,6 +27201,7 @@ var init_version_timeline = __esm({
27201
27201
  var POUF_ENTRY_EXPORTS, POUF_TAUGHT_NAMES;
27202
27202
  var init_exports = __esm({
27203
27203
  "../vibes.diy/pouf/exports.ts"() {
27204
+ "use strict";
27204
27205
  POUF_ENTRY_EXPORTS = {
27205
27206
  index: [
27206
27207
  "AlertBell",
@@ -96489,11 +96490,12 @@ function oneLine3(s, max14) {
96489
96490
  }
96490
96491
  function renderPhoneAlert(_rule, row, fragment) {
96491
96492
  const where = row.appSlug === null || row.appSlug === "" ? void 0 : row.appSlug;
96492
- const body = oneLine3(row.body, BODY_MAX_CHARS);
96493
+ const appMessage = row.notificationType === "app-message";
96494
+ const body = appMessage ? row.body.trim() : oneLine3(row.body, BODY_MAX_CHARS);
96493
96495
  const link = where === void 0 ? `${SITE}/agent` : `${SITE}/vibe/${row.ownerHandle}/${where}`;
96494
96496
  const own = row.actorHandle === null || row.actorHandle === "" || row.actorHandle === row.ownerHandle;
96495
96497
  const head = [own ? void 0 : `@${row.actorHandle}`, where === void 0 ? void 0 : `in ${where}`].filter((p) => p !== void 0).join(" ");
96496
- const said2 = row.notificationType === "app-message" && own || head === "" ? body : `${head}: ${body}`;
96498
+ const said2 = appMessage || head === "" ? body : `${head}: ${body}`;
96497
96499
  const hasLink = new RegExp(`${link.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&")}(?![\\w-])`).test(body);
96498
96500
  const tail = fragment !== void 0 && where !== void 0 ? [`${link}${fragment}`] : hasLink ? [] : [link];
96499
96501
  return [said2, ...tail].join("\n");
@@ -99207,6 +99209,11 @@ function tapbackAnswerOf(words) {
99207
99209
  const m = /^\(tapped (\S{1,16}) on your question\)$/u.exec((words ?? "").trim());
99208
99210
  return m?.[1];
99209
99211
  }
99212
+ function personAnswerText(text3) {
99213
+ if (text3 === null) return null;
99214
+ const said2 = text3.split("\n").filter((line2) => !/^\[[^\]]*\]$/.test(line2.trim())).join("\n").trim();
99215
+ return said2 === "" ? text3.trim() : said2;
99216
+ }
99210
99217
  async function resolveTextConsentSpeaker(vctx, args) {
99211
99218
  if (!isGroupPrincipal(args.actorUserId)) return { ok: true, userId: args.actorUserId, ownerHandle: args.actorHandle };
99212
99219
  const rPayer = await readGroupPayer(vctx.sql, args.actorUserId);
@@ -99233,6 +99240,7 @@ var init_text_consents = __esm({
99233
99240
  __name(recordTextConsent, "recordTextConsent");
99234
99241
  __name(hasLiveTextConsent, "hasLiveTextConsent");
99235
99242
  __name(tapbackAnswerOf, "tapbackAnswerOf");
99243
+ __name(personAnswerText, "personAnswerText");
99236
99244
  TEXT_CONSENT_NO_SPEAKER_MESSAGE = "A later text needs the yes of the person it goes to, and no linked member is asking on this turn, so nobody's yes can be recorded. Ask the person who wants it to say yes themselves. Nothing ran.";
99237
99245
  __name(resolveTextConsentSpeaker, "resolveTextConsentSpeaker");
99238
99246
  }
@@ -107027,7 +107035,11 @@ function makePictureToolDefinition() {
107027
107035
  docId: { type: "string" },
107028
107036
  photoKey: {
107029
107037
  type: "string",
107030
- description: "With `photo` or `earlierPhoto`: also save that photo on the record under this _files key (the key the app keeps its starting photo under, such as original). The record must already exist."
107038
+ description: "With `photo` or `earlierPhoto`: also save that photo on the record under this _files key (the key the app keeps its starting photo under, such as original). The record must already exist, or come in `record`."
107039
+ },
107040
+ record: {
107041
+ type: "object",
107042
+ description: "The record's own fields, in the shape the app's records have (its authorHandle the `writesAs` handle list_databases names, its prompt set the way theirs are). Saved through the app's rules before the paint, so no put_doc is needed first."
107031
107043
  }
107032
107044
  },
107033
107045
  required: ["ownerHandle", "appSlug", "dbName", "docId"],
@@ -107049,6 +107061,9 @@ function checkMakePictureArgs(raw) {
107049
107061
  if (starts > 1) {
107050
107062
  return refusal("invalid-input", "Start from one picture: `photo`, `earlierPhoto` or `sourceRecord`.");
107051
107063
  }
107064
+ if (parsed.vibe?.record !== void 0 && Array.isArray(parsed.vibe.record)) {
107065
+ return refusal("invalid-input", "`vibe.record` is the record's fields, as an object.");
107066
+ }
107052
107067
  if (parsed.vibe?.photoKey !== void 0 && parsed.photo === void 0 && parsed.earlierPhoto === void 0) {
107053
107068
  return refusal("invalid-input", "`vibe.photoKey` saves the photo it starts from, so pass `photo` or `earlierPhoto` with it.");
107054
107069
  }
@@ -107328,6 +107343,31 @@ async function makePicture(vctx, mctx, args) {
107328
107343
  if (resolved.ok === false) return resolved;
107329
107344
  writer = resolved.writer;
107330
107345
  }
107346
+ if (vibe2 !== void 0 && args.vibe?.record !== void 0) {
107347
+ const { _id: _ignoredId, _files: _ignoredFiles, ...fields } = args.vibe.record;
107348
+ const at2 = {
107349
+ userId: writer.userId,
107350
+ ownerHandle: vibe2.ownerHandle,
107351
+ appSlug: vibe2.appSlug,
107352
+ dbName: vibe2.dbName,
107353
+ adminMode: false,
107354
+ actingHandle: writer.ownerHandle
107355
+ };
107356
+ const rHad = await exception2Result209(() => getDocForCaller(vctx, { ...at2, docId: vibe2.docId }));
107357
+ if (rHad.isErr()) return refusal("failed", "That record could not be read just now. Try once more.");
107358
+ const had = rHad.Ok().kind === "ok" ? rHad.Ok().doc : {};
107359
+ await reserveImgGenForAgent(vctx, {
107360
+ ownerHandle: vibe2.ownerHandle,
107361
+ appSlug: vibe2.appSlug,
107362
+ dbName: vibe2.dbName,
107363
+ docId: vibe2.docId,
107364
+ userId: writer.userId
107365
+ });
107366
+ const rSaved = await exception2Result209(() => putDocForCaller(vctx, { ...at2, docId: vibe2.docId, doc: { ...had, ...fields } }));
107367
+ if (rSaved.isErr()) return refusal("failed", "That record could not be saved just now. Try once more.");
107368
+ const saved = rSaved.Ok();
107369
+ if (saved.kind === "denied") return refusal("denied", `That app's rules didn't take the record: ${saved.message}`);
107370
+ }
107331
107371
  let recordModel;
107332
107372
  if (vibe2 !== void 0) {
107333
107373
  const rRecord = await exception2Result209(
@@ -107690,7 +107730,7 @@ var init_agent_make_picture_tool = __esm({
107690
107730
  "photo?": "number.integer >= 1",
107691
107731
  "earlierPhoto?": "number.integer >= 1",
107692
107732
  "sourceRecord?": type141({ ...recordRef, "fileKey?": "string" }).onUndeclaredKey("reject"),
107693
- "vibe?": type141({ ...recordRef, "photoKey?": "string > 0" }).onUndeclaredKey("reject")
107733
+ "vibe?": type141({ ...recordRef, "photoKey?": "string > 0", "record?": "Record<string, unknown>" }).onUndeclaredKey("reject")
107694
107734
  }).onUndeclaredKey("reject")
107695
107735
  );
107696
107736
  __name(makePictureToolDefinition, "makePictureToolDefinition");
@@ -129406,7 +129446,7 @@ A TEXT CONVERSATION. This conversation is a text thread. The person may be readi
129406
129446
  - Say it, then do it. When a turn starts a build, its first words come before its first tool call: one line, a sentence or two, naming what is on the way, in the person's terms, such as "On it: a 3D racer with drift and a lap timer." or "On it: your own copy of Cabin Weekend, a cost splitter." Then any lookups run silently; a list, a search or a read gets no line of its own.
129407
129447
  - One message, sometimes in two texts. Messages often sends a link as its own text, a moment after the words that go with it, so a message that ends mid-sentence ("text me when new events are about to start on") and a bare link are one ask: read them together and answer it once. A vibe link on its own is never a dead end: the link names the vibe, so read it with check_vibe_access, or with with_vibe when it is the person's own, and carry on with what they asked.
129408
129448
  - One thought, several texts. People send one thought as several texts: a caption then its link, a photo then its words, a sentence then the rest of it. A note in square brackets opens each message, saying how many texts it joins and over how long, and how soon it came after the text you last answered. When what you have introduces something still on its way ("look what I made", "here it is", a thought that stops halfway) and the note says (wait) is open, reply with exactly (wait) and nothing else: the person sees nothing, and the message comes back to you once the rest is in, or after 20 seconds. Wait once per message at most. When the note says you waited, answer it then with your best guess, and a question is fine. A text that arrives right after your answer and reads as the rest of the last one goes with it: answer both as one message and carry on in the new direction, easy and cheerful.
129409
- - Pictures travel both ways. A photo the person sends is in front of you. A picture they ask for (their photo as an alien pilot, a card for Sam) is yours to paint with make_picture, as your first call, in the turn the photo arrives. \`photo\` counts the photos on the message you are answering, and \`earlierPhoto\` reaches a photo texted earlier in this chat, in the last 6 hours, 1 being the newest before this message: "Marcus's photo from before" or "do mine again as a poster" paints from it, and nobody is asked to send it again. The picture goes first, then one short line that keeps the chat going (Chris, 2026-11-18: a picture with nothing after it ends the conversation). That line is an easy next idea or question anyone can answer in a word ("Want the pirate ship version next?", "Should I do everyone?"), or, where it fits, an offer to remind or update them; when its receipt carries an offer, the offer is that line. No line goes before the call and no description of the picture: they are looking at it. When a tool failed, the line says that instead. Paint once per ask. A repeated ask after a picture you sent ("post it here", "send it again", the link again, "hello?") means it has not reached them yet: send that same picture again with send_picture, with no words. A picture travels only as a picture, so a picture's file address (an assets. or /_files/ link) never goes in a text; one that is held or slow is on its way, so send it again with send_picture or say it is on its way. When they will want more, start the app that makes them after the paint, and its Done text is "Here's the app if you want more: <link>". One to one, a hero of them (their selfie or their words as a superhero) always brings its app, because that app is how they share their hero with friends: the picture goes out first, and after the paint, start the app that holds it, a page showing that picture with a button to make a friend's hero, with the picture's link in the brief. Its Done text offers it as theirs to share whenever they like, opening with "Here's your hero's app if you want to share it: <link>" in place of "Done:". A hero is the one picture with words before it. The line before the call names your guess in a few words, the hero's name and power ("Captain Daybreak you, coming up."). A photo that never reached you ("did you get my pic?") gets one cheerful line asking them to send it again with whatever they would like made of it, and a superhero is one idea among many (a movie poster, a party invite, a game): name a few, so the choice reads as theirs. A vibe named for pictures is this chat's picture app. When someone sends or names a vibe for their pictures ("use this to make me vintage" and someone's portrait app, or its app link on its own), that vibe is this chat's picture app, theirs or someone else's, and it decides the style: every photo goes into it. Learn its shape from one with_vibe list_databases call (its \`samples\` holds a record of each collection; query_docs only when that is not enough), save their new record in that shape with put_doc (written as them, its authorHandle the \`writesAs\` handle list_databases names, its prompt set the way the app's own records set theirs), then call make_picture with photo (or earlierPhoto) and \`vibe\` naming that record, with \`vibe.photoKey\` set to the _files key its records keep their starting photo under (such as original). When its records carry their own prompt (an image app's record), that record is the vibe's own tool: leave \`prompt\` out of make_picture so the record's prompt paints it. The picture lands in the chat where you call it and in the app's own list, so a make_picture with no \`vibe\` misses the app. Write the picture app down with remember (which vibe, its database, the record shape and its photo key), and every later photo in the chat goes through it the same way, with no link needed and no words, until someone names another vibe or asks for something else, which you also write down. A link to it with no photo yet gets one short line: "Got it, photos here go through Era Portraits. Send one." A link to one record of a vibe, its address ending in #<key>=<id> (https://vibes.diy/vibe/<handle>/<appSlug>#portrait=portrait-\u2026, the share button's own link), is someone sharing that record: post its picture. Read it with with_vibe get_doc (the id is the part after =; list_databases finds its database), then send_picture naming that record, with one short line after it that keeps the chat going. Never make_picture on a shared record unless they ask to change it, and a shared record leaves the chat's picture app as it was. A message whose photo did not reach you as a picture but carries such a link: the link's picture is that photo, so send it. A caption that introduces it ("A photo is waiting for you:") and the link are one message. Never say you can't do something you have not tried this turn: try the write, and what its tool answers is what you pass on. A picture saved in a vibe (a greeting card an image button painted, a photo someone added) goes into the chat with send_picture, where it arrives as a photo. Asked to post, send or show one, find its record with with_vibe's query_docs and send it.
129449
+ - Pictures travel both ways. A photo the person sends is in front of you. A picture they ask for (their photo as an alien pilot, a card for Sam) is yours to paint with make_picture, as your first call, in the turn the photo arrives. \`photo\` counts the photos on the message you are answering, and \`earlierPhoto\` reaches a photo texted earlier in this chat, in the last 6 hours, 1 being the newest before this message: "Marcus's photo from before" or "do mine again as a poster" paints from it, and nobody is asked to send it again. The picture goes first, then one short line that keeps the chat going (Chris, 2026-11-18: a picture with nothing after it ends the conversation). That line is an easy next idea or question anyone can answer in a word ("Want the pirate ship version next?", "Should I do everyone?"), or, where it fits, an offer to remind or update them; when its receipt carries an offer, the offer is that line. No line goes before the call and no description of the picture: they are looking at it. When a tool failed, the line says that instead. Paint once per ask. A repeated ask after a picture you sent ("post it here", "send it again", the link again, "hello?") means it has not reached them yet: send that same picture again with send_picture, with no words. A picture travels only as a picture, so a picture's file address (an assets. or /_files/ link) never goes in a text; one that is held or slow is on its way, so send it again with send_picture or say it is on its way. When they will want more, start the app that makes them after the paint, and its Done text is "Here's the app if you want more: <link>". One to one, a hero of them (their selfie or their words as a superhero) always brings its app, because that app is how they share their hero with friends: the picture goes out first, and after the paint, start the app that holds it, a page showing that picture with a button to make a friend's hero, with the picture's link in the brief. Its Done text offers it as theirs to share whenever they like, opening with "Here's your hero's app if you want to share it: <link>" in place of "Done:". A hero is the one picture with words before it. The line before the call names your guess in a few words, the hero's name and power ("Captain Daybreak you, coming up."). A photo that never reached you ("did you get my pic?") gets one cheerful line asking them to send it again with whatever they would like made of it, and a superhero is one idea among many (a movie poster, a party invite, a game): name a few, so the choice reads as theirs. A vibe named for pictures is this chat's picture app. When someone sends or names a vibe for their pictures ("use this to make me vintage" and someone's portrait app, or its app link on its own), that vibe is this chat's picture app, theirs or someone else's, and it decides the style: every photo goes into it. Learn its shape from one with_vibe list_databases call (its \`samples\` holds a record of each collection; query_docs only when that is not enough), then call make_picture with photo (or earlierPhoto) and \`vibe\` naming their new record, its fields in \`vibe.record\` in that shape (written as them, its authorHandle the \`writesAs\` handle list_databases names, its prompt set the way the app's own records set theirs), which saves it before the paint with no put_doc first, and \`vibe.photoKey\` set to the _files key its records keep their starting photo under (such as original). When its records carry their own prompt (an image app's record), that record is the vibe's own tool: leave \`prompt\` out of make_picture so the record's prompt paints it. The picture lands in the chat where you call it and in the app's own list, so a make_picture with no \`vibe\` misses the app. After the paint, write the picture app down with remember (which vibe, its database, the record shape and its photo key), and every later photo in the chat goes through it the same way, with no link needed and no words, until someone names another vibe or asks for something else, which you also write down. A link to it with no photo yet gets one short line: "Got it, photos here go through Era Portraits. Send one." A link to one record of a vibe, its address ending in #<key>=<id> (https://vibes.diy/vibe/<handle>/<appSlug>#portrait=portrait-\u2026, the share button's own link), is someone sharing that record: post its picture. Read it with with_vibe get_doc (the id is the part after =; list_databases finds its database), then send_picture naming that record, with one short line after it that keeps the chat going. Never make_picture on a shared record unless they ask to change it, and a shared record leaves the chat's picture app as it was. A message whose photo did not reach you as a picture but carries such a link: the link's picture is that photo, so send it. A caption that introduces it ("A photo is waiting for you:") and the link are one message. Never say you can't do something you have not tried this turn: try the write, and what its tool answers is what you pass on. A picture saved in a vibe (a greeting card an image button painted, a photo someone added) goes into the chat with send_picture, where it arrives as a photo. Asked to post, send or show one, find its record with with_vibe's query_docs and send it.
129410
129450
  - Keep the thread going. You speak when they write or one of their vibes wakes you, so every reply leaves them something worth answering: a next step they would enjoy, an update you could send them on a schedule (a reminder the day before the meetup, the forecast each morning, Monday's round-up), or something one of their vibes can do for them. When a picture app's receipt carries an offer, it goes in the same text as that first picture, as its one line, glad to have something good for them: in your own words from what \`about\` says it does (the offer's \`ask\` is only its gist, never its wording), and for one that texts later a short question that says plainly you will text them later and about what ("Want me to text you a reminder before the next meetup?"), promising only what its tool does. Ask it once. A yes, typed or a \u{1F44D} on that text, is the go: call its tool, and after a \u{1F44D} the next thing they see is the result.
129411
129451
  - Plain text, in short messages. Whole sentences in short paragraphs, each link written out in full from https://, no headings and no markup. A bit's wink is the one pair of stars a text carries. A reply that still runs long folds as the general instruction says, its summary above a line holding only ${AGENT_FOLD_MARKER}, and that summary is the text the phone receives.
129412
129452
  - Their words, not the machinery. Say what happened for them, in their terms. When a step is out of your reach, say the next thing that happens and who does it, like a friend who knows the place: "Tap it; if it's private, you'll see Ask to join." Asked who they are talking to, the whole answer is one sentence like "I'm Vibes, I make and run apps for you. What's on your plate?" Asked what you can do, or what this is, say it in a sentence or two of your own: you make apps for them and their friends and help organize plans (a poll, a game, a signup, a time that works for everyone), then offer one thing to try, such as "make a trivia game about us", and say "help" shows more. This replaces the general instruction's line about models, which comes up only when they ask which model.
@@ -135649,7 +135689,7 @@ async function recordTextLaterYes(target2, wireName) {
135649
135689
  chatId: consent.chatId,
135650
135690
  question: rQuestion.isOk() ? rQuestion.Ok() ?? null : null,
135651
135691
  method: answer13.method,
135652
- answerText: answer13.text
135692
+ answerText: personAnswerText(answer13.text)
135653
135693
  })
135654
135694
  );
135655
135695
  if (rRecorded.isOk() && rRecorded.Ok() === true) return void 0;
@@ -135671,6 +135711,7 @@ var init_agent_vibe_tool_calls = __esm({
135671
135711
  init_agent_find_vibes_tool();
135672
135712
  init_vibe_tools3();
135673
135713
  init_vibe_tool_offer();
135714
+ init_text_consents();
135674
135715
  __name(json2, "json");
135675
135716
  __name(parsedArgs, "parsedArgs");
135676
135717
  __name(vibeToolCallAnswer, "vibeToolCallAnswer");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibes-diy",
3
- "version": "14.3.362",
3
+ "version": "14.3.364",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "description": "Command-line tool for vibes.diy — generate, edit, pull, push, and publish AI-built apps",
@@ -41,13 +41,13 @@
41
41
  "@neondatabase/serverless": "~1.2.0",
42
42
  "@noble/hashes": "~2.4.0",
43
43
  "@shadcn/lint": "~0.2.3",
44
- "@vibes.diy/api-impl": "14.3.362",
45
- "@vibes.diy/api-types": "14.3.362",
46
- "@vibes.diy/call-ai-v2": "14.3.362",
47
- "@vibes.diy/cmd-harness": "14.3.362",
48
- "@vibes.diy/cmd-tools": "14.3.362",
49
- "@vibes.diy/identity": "14.3.362",
50
- "@vibes.diy/prompts": "14.3.362",
44
+ "@vibes.diy/api-impl": "14.3.364",
45
+ "@vibes.diy/api-types": "14.3.364",
46
+ "@vibes.diy/call-ai-v2": "14.3.364",
47
+ "@vibes.diy/cmd-harness": "14.3.364",
48
+ "@vibes.diy/cmd-tools": "14.3.364",
49
+ "@vibes.diy/identity": "14.3.364",
50
+ "@vibes.diy/prompts": "14.3.364",
51
51
  "acorn": "~8.19.0",
52
52
  "acorn-jsx": "~5.3.2",
53
53
  "arktype": "~2.2.9",