vibes-diy 14.3.458 → 14.3.460

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.
@@ -32319,7 +32319,7 @@ var init_text_turn = __esm({
32319
32319
  }).or({ kind: "'picture'", url: "string", mimeType: "string", "name?": "string", "sticker?": "true" }).or({ kind: "'picture-missed'" }).or({ kind: "'poll'", question: "string", options: "string[]" }).or({ kind: "'background'", "clear?": "true" })
32320
32320
  );
32321
32321
  textTurnLine = lazyType(
32322
- () => type({ "+": "reject", reply: foldedReplyWire }).or({ "+": "reject", done: "true", chatId: "string", "credits?": "number" }).or({ "+": "reject", error: "string", "detail?": "string" }).or({ "+": "reject", reaction: "string" }).or({ "+": "reject", confirm: { action: "'unpublish'", ownerHandle: "string", appSlug: "string" } }).or({ "+": "reject", copy: { ownerHandle: "string", appSlug: "string", remixOf: "string" } }).or({ "+": "reject", idle: "true", chatId: "string" })
32322
+ () => type({ "+": "reject", reply: foldedReplyWire }).or({ "+": "reject", done: "true", chatId: "string", "credits?": "number", "ownerHandle?": "string" }).or({ "+": "reject", error: "string", "detail?": "string" }).or({ "+": "reject", reaction: "string" }).or({ "+": "reject", confirm: { action: "'unpublish'", ownerHandle: "string", appSlug: "string" } }).or({ "+": "reject", copy: { ownerHandle: "string", appSlug: "string", remixOf: "string" } }).or({ "+": "reject", idle: "true", chatId: "string" }).or({ "+": "reject", ranAs: "string > 0" })
32323
32323
  );
32324
32324
  }
32325
32325
  });
@@ -10974,7 +10974,7 @@ var init_text_turn = __esm({
10974
10974
  }).or({ kind: "'picture'", url: "string", mimeType: "string", "name?": "string", "sticker?": "true" }).or({ kind: "'picture-missed'" }).or({ kind: "'poll'", question: "string", options: "string[]" }).or({ kind: "'background'", "clear?": "true" })
10975
10975
  );
10976
10976
  textTurnLine = lazyType(
10977
- () => type34({ "+": "reject", reply: foldedReplyWire }).or({ "+": "reject", done: "true", chatId: "string", "credits?": "number" }).or({ "+": "reject", error: "string", "detail?": "string" }).or({ "+": "reject", reaction: "string" }).or({ "+": "reject", confirm: { action: "'unpublish'", ownerHandle: "string", appSlug: "string" } }).or({ "+": "reject", copy: { ownerHandle: "string", appSlug: "string", remixOf: "string" } }).or({ "+": "reject", idle: "true", chatId: "string" })
10977
+ () => type34({ "+": "reject", reply: foldedReplyWire }).or({ "+": "reject", done: "true", chatId: "string", "credits?": "number", "ownerHandle?": "string" }).or({ "+": "reject", error: "string", "detail?": "string" }).or({ "+": "reject", reaction: "string" }).or({ "+": "reject", confirm: { action: "'unpublish'", ownerHandle: "string", appSlug: "string" } }).or({ "+": "reject", copy: { ownerHandle: "string", appSlug: "string", remixOf: "string" } }).or({ "+": "reject", idle: "true", chatId: "string" }).or({ "+": "reject", ranAs: "string > 0" })
10978
10978
  );
10979
10979
  }
10980
10980
  });
@@ -23089,7 +23089,6 @@ function isKnownThemeSlug(slug) {
23089
23089
  var THEME_SLUGS, THEME_SLUG_SET;
23090
23090
  var init_theme_slugs = __esm({
23091
23091
  "../prompts/pkg/themes/theme-slugs.ts"() {
23092
- "use strict";
23093
23092
  THEME_SLUGS = [
23094
23093
  "aether",
23095
23094
  "archive",
@@ -25535,7 +25534,6 @@ function poufRoomOfSeed(seed) {
25535
25534
  var STYLE_PRESETS, FLOOR_PRESET_SLUG, STAMPABLE_STYLE_PRESETS, HOUSE_COLORWAY_SLUGS, POUF_ROOM_SLUGS, POUF_ROOM_ACCENT_PINS, POUF_STYLE_PRESETS, POUF_BOLD_TONE, POUF_BOLD_PRESETS;
25536
25535
  var init_style_presets = __esm({
25537
25536
  "../prompts/pkg/themes/style-presets.ts"() {
25538
- "use strict";
25539
25537
  init_pouf_rooms();
25540
25538
  STYLE_PRESETS = [
25541
25539
  {
@@ -60184,6 +60182,8 @@ async function moveAppsOffProvisionalHandle(db, t, input) {
60184
60182
  const cc = t.chatContexts;
60185
60183
  await db.update(cc).set({ ownerHandle: input.toHandle }).where(and62(eq75(cc.ownerHandle, input.fromHandle), eq75(cc.appSlug, AGENT_CHAT_APP_SLUG), eq75(cc.userId, input.userId)));
60186
60184
  await copyAgentDiscussionDeletions(db, t, input);
60185
+ const tl = t.textLinks;
60186
+ await db.update(tl).set({ ownerHandle: input.toHandle }).where(and62(eq75(tl.ownerHandle, input.fromHandle), eq75(tl.userId, input.userId)));
60187
60187
  const hb = t.handleBinding;
60188
60188
  await db.update(hb).set({ migratedAway: 1 }).where(and62(eq75(hb.handle, input.fromHandle), eq75(hb.userId, input.userId)));
60189
60189
  return Result64.Ok({ moved, deferred });
@@ -122695,6 +122695,7 @@ async function readAgentDiscussionChoices(vctx, args) {
122695
122695
  __name(readAgentDiscussionChoices, "readAgentDiscussionChoices");
122696
122696
 
122697
122697
  // ../vibes.diy/api/svc/intern/ensure-chat-id.ts
122698
+ init_resolve_active_handle();
122698
122699
  init_developer_grants();
122699
122700
  init_platform_admin();
122700
122701
  import { generate as generate5 } from "random-words";
@@ -124245,10 +124246,11 @@ async function ensureAgentChat(ctx, args) {
124245
124246
  }
124246
124247
  const hb = ctx.sql.tables.handleBinding;
124247
124248
  const rOwned = await exception2Result284(
124248
- () => ctx.sql.db.select({ handle: hb.handle }).from(hb).where(and136(eq159(hb.userId, args.userId), eq159(hb.handle, ownerHandle))).limit(1)
124249
+ () => ctx.sql.db.select({ handle: hb.handle, migratedAway: hb.migratedAway }).from(hb).where(and136(eq159(hb.userId, args.userId), eq159(hb.handle, ownerHandle))).limit(1)
124249
124250
  );
124250
124251
  if (rOwned.isErr()) return Result170.Err(`Failed to check handle ownership: ${rOwned.Err().message}`);
124251
124252
  if (rOwned.Ok().length === 0) return Result170.Err(`ownerHandle "${ownerHandle}" is not one of this account's handles`);
124253
+ const retired = rOwned.Ok()[0]?.migratedAway === 1;
124252
124254
  const cc = ctx.sql.tables.chatContexts;
124253
124255
  if (args.chatId !== void 0) {
124254
124256
  const named2 = args.chatId;
@@ -124263,8 +124265,23 @@ async function ensureAgentChat(ctx, args) {
124263
124265
  ).limit(1)
124264
124266
  );
124265
124267
  if (rNamed.isErr()) return Result170.Err(`Failed to query the agent discussion: ${rNamed.Err().message}`);
124266
- if (rNamed.Ok().length === 0) return Result170.Err(`agent discussion ${named2} not found`);
124267
- return Result170.Ok({ appSlug: AGENT_CHAT_APP_SLUG, ownerHandle, chatId: named2, chatCreated: false });
124268
+ if (rNamed.Ok().length > 0) return Result170.Ok({ appSlug: AGENT_CHAT_APP_SLUG, ownerHandle, chatId: named2, chatCreated: false });
124269
+ if (!retired) return Result170.Err(`agent discussion ${named2} not found`);
124270
+ const rMoved = await exception2Result284(
124271
+ () => ctx.sql.db.select({ ownerHandle: cc.ownerHandle }).from(cc).where(and136(eq159(cc.chatId, named2), eq159(cc.userId, args.userId), eq159(cc.appSlug, AGENT_CHAT_APP_SLUG))).limit(1)
124272
+ );
124273
+ if (rMoved.isErr()) return Result170.Err(`Failed to query the agent discussion: ${rMoved.Err().message}`);
124274
+ const movedTo = rMoved.Ok()[0]?.ownerHandle;
124275
+ if (movedTo === void 0) return Result170.Err(`agent discussion ${named2} not found`);
124276
+ return Result170.Ok({ appSlug: AGENT_CHAT_APP_SLUG, ownerHandle: movedTo, chatId: named2, chatCreated: false });
124277
+ }
124278
+ if (retired) {
124279
+ const rActive = await exception2Result284(() => resolveActiveHandle(ctx, args.userId));
124280
+ if (rActive.isErr()) return Result170.Err(`Failed to resolve the active handle: ${rActive.Err().message}`);
124281
+ const active = rActive.Ok();
124282
+ if (active !== void 0 && active !== ownerHandle) {
124283
+ return ensureAgentChat(ctx, { ...args, ownerHandle: active });
124284
+ }
124268
124285
  }
124269
124286
  if (args.newDiscussion === true) {
124270
124287
  const fresh = `agent-${ctx.sthis.nextId(12).str}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibes-diy",
3
- "version": "14.3.458",
3
+ "version": "14.3.460",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "description": "Command-line tool for vibes.diy — vibes give agents superpowers: generate, edit, pull, push, and publish AI-built apps. Login is free and easy.",
@@ -52,13 +52,13 @@
52
52
  "@neondatabase/serverless": "~1.2.1",
53
53
  "@noble/hashes": "~2.4.0",
54
54
  "@shadcn/lint": "~0.2.3",
55
- "@vibes.diy/api-impl": "14.3.458",
56
- "@vibes.diy/api-types": "14.3.458",
57
- "@vibes.diy/call-ai-v2": "14.3.458",
58
- "@vibes.diy/cmd-harness": "14.3.458",
59
- "@vibes.diy/cmd-tools": "14.3.458",
60
- "@vibes.diy/identity": "14.3.458",
61
- "@vibes.diy/prompts": "14.3.458",
55
+ "@vibes.diy/api-impl": "14.3.460",
56
+ "@vibes.diy/api-types": "14.3.460",
57
+ "@vibes.diy/call-ai-v2": "14.3.460",
58
+ "@vibes.diy/cmd-harness": "14.3.460",
59
+ "@vibes.diy/cmd-tools": "14.3.460",
60
+ "@vibes.diy/identity": "14.3.460",
61
+ "@vibes.diy/prompts": "14.3.460",
62
62
  "acorn": "~8.19.0",
63
63
  "acorn-jsx": "~5.3.2",
64
64
  "arktype": "~2.2.10",