vibes-diy 14.3.330 → 14.3.331

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.
@@ -25,6 +25,7 @@ export declare const ResAppStatusCli: import("arktype/internal/variants/object.t
25
25
  graceMs: number;
26
26
  overdueMs: number;
27
27
  healed: boolean;
28
+ releaseIntervalMs: number | null;
28
29
  }, {}>;
29
30
  export type ResAppStatusCli = typeof ResAppStatusCli.infer;
30
31
  export declare function isResAppStatusCli(obj: unknown): obj is ResAppStatusCli;
@@ -34,12 +34,20 @@ export const ResAppStatusCli = type({
34
34
  graceMs: "number",
35
35
  overdueMs: "number",
36
36
  healed: "boolean",
37
+ releaseIntervalMs: "number|null",
37
38
  });
38
39
  export function isResAppStatusCli(obj) {
39
40
  return ResAppStatusCli.allows(obj);
40
41
  }
41
42
  export function renderAppStatusLines(msg) {
42
43
  const app = `${msg.ownerHandle}/${msg.appSlug}`;
44
+ if (msg.state === "unscheduled" && msg.releaseIntervalMs !== null) {
45
+ return [
46
+ `${app}: STALLED — the live release runs \`scheduled\` every ${humanizeDuration(msg.releaseIntervalMs)}, and no timer is armed for it.`,
47
+ ` Start it again: npx vibes-diy app rearm ${app}`,
48
+ ` (If you paused it with \`app schedule off\`, the same command resumes it.)`,
49
+ ];
50
+ }
43
51
  if (msg.state === "unscheduled") {
44
52
  return [`${app}: no scheduled task (the live release exports no \`scheduled\` handler).`];
45
53
  }
@@ -116,6 +124,7 @@ export const appStatusEvento = {
116
124
  graceMs: s.graceMs,
117
125
  overdueMs: s.overdueMs,
118
126
  healed: s.healed,
127
+ releaseIntervalMs: s.releaseIntervalMs ?? null,
119
128
  });
120
129
  },
121
130
  };
@@ -11,7 +11,7 @@ import { readProjectFiles, pushFromDir } from "./push-from-dir.js";
11
11
  import { formatErr } from "./format-err.js";
12
12
  import { mapCreditsWall } from "./credits-wall.js";
13
13
  import { OpenChatSessionError, openChatSession, } from "@vibes.diy/api-impl";
14
- import { formatNoFilesError } from "./format-no-files-error.js";
14
+ import { formatNoFilesError, noFilesCodeBlockCount } from "./format-no-files-error.js";
15
15
  import { readDryRunPayloadFromStream, formatDryRunAsText } from "./dry-run.js";
16
16
  import { materializeFile } from "./materialize-file.js";
17
17
  import { isTextManifestItem, pullVersionToDir } from "./pull-cmd.js";
@@ -212,6 +212,8 @@ async function followEditTurn(ctx, args, o) {
212
212
  const upstreamErrors = [];
213
213
  let sectionEventCount = 0;
214
214
  let blockCount = 0;
215
+ let codeBlockCount = 0;
216
+ let recoveryRan = false;
215
217
  let streamedBytes = 0;
216
218
  const restyleDescriptions = [];
217
219
  const current = {};
@@ -234,6 +236,7 @@ async function followEditTurn(ctx, args, o) {
234
236
  let announced = resolved.announcedPaths;
235
237
  let recovered = resolved.recoveredNoMatches.length;
236
238
  if (!resolved.turnEndSeen) {
239
+ recoveryRan = true;
237
240
  const reason = resolved.promptErrors.length > 0 ? `: ${resolved.promptErrors.join("; ")}` : "";
238
241
  await sendProgress(ctx, "warn", `Stream ended before the build completed${reason}. Trying to recover the full build...`);
239
242
  const outcome = await resumeSectionStream({
@@ -304,6 +307,8 @@ async function followEditTurn(ctx, args, o) {
304
307
  },
305
308
  onBlock: (ev) => {
306
309
  blockCount += 1;
310
+ if (ev.type === "block.code.begin")
311
+ codeBlockCount += 1;
307
312
  if (ev.block !== undefined) {
308
313
  sectionEventCount += 1;
309
314
  streamedBytes += JSON.stringify(ev.block).length;
@@ -369,6 +374,7 @@ async function followEditTurn(ctx, args, o) {
369
374
  return Result.Err(formatNoFilesError({
370
375
  sectionEventCount,
371
376
  blockCount,
377
+ codeBlockCount: noFilesCodeBlockCount({ counted: codeBlockCount, recoveryRan }),
372
378
  streamedBytes,
373
379
  upstreamErrors: upstreamErrors.map((message) => ({ message })),
374
380
  applyErrors,
@@ -5,6 +5,7 @@ export interface UpstreamErrorBrief {
5
5
  export interface NoFilesDiagnostics {
6
6
  readonly sectionEventCount: number;
7
7
  readonly blockCount: number;
8
+ readonly codeBlockCount?: number | "unknown";
8
9
  readonly streamedBytes: number;
9
10
  readonly upstreamErrors: readonly UpstreamErrorBrief[];
10
11
  readonly applyErrors: readonly string[];
@@ -13,4 +14,8 @@ export interface NoFilesDiagnostics {
13
14
  readonly pullVibe?: string;
14
15
  }
15
16
  export declare function pullHintLine(vibe: string): string;
17
+ export declare function noFilesCodeBlockCount(o: {
18
+ readonly counted: number;
19
+ readonly recoveryRan: boolean;
20
+ }): number | "unknown";
16
21
  export declare function formatNoFilesError(diag: NoFilesDiagnostics): string;
@@ -2,15 +2,25 @@ const MAX_APPLY_ERRORS_SHOWN = 3;
2
2
  export function pullHintLine(vibe) {
3
3
  return ` The server-side edit may still have landed. Check with \`vibes-diy pull --vibe ${vibe}\` before re-running.`;
4
4
  }
5
+ export function noFilesCodeBlockCount(o) {
6
+ return o.recoveryRan ? "unknown" : o.counted;
7
+ }
5
8
  export function formatNoFilesError(diag) {
6
9
  const headline = diag.upstreamErrors.length > 0
7
10
  ? `AI provider error: ${diag.upstreamErrors.map((e) => `${e.code ? `[${e.code}] ` : ""}${e.message}`).join("; ")}`
8
11
  : diag.noChanges
9
- ? "Edit turn produced no file changes (model returned without emitting any successful SEARCH/REPLACE or create block)."
12
+ ? diag.codeBlockCount === 0
13
+ ? "Edit turn produced no file changes: the build wrote no code, so there was no SEARCH/REPLACE or create block to apply."
14
+ : "Edit turn produced no file changes (model returned without emitting any successful SEARCH/REPLACE or create block)."
10
15
  : "No files resolved from AI response.";
16
+ const codeCount = diag.codeBlockCount === undefined
17
+ ? ""
18
+ : diag.codeBlockCount === "unknown"
19
+ ? ", code blocks unknown after stream recovery"
20
+ : `, ${diag.codeBlockCount} code block${diag.codeBlockCount === 1 ? "" : "s"}`;
11
21
  const lines = [headline];
12
22
  lines.push(` - section events received: ${diag.sectionEventCount}` +
13
- (diag.blockCount > 0 ? ` (${diag.blockCount} block${diag.blockCount === 1 ? "" : "s"})` : ""));
23
+ (diag.blockCount > 0 ? ` (${diag.blockCount} block${diag.blockCount === 1 ? "" : "s"}${codeCount})` : ""));
14
24
  lines.push(` - response bytes streamed: ${diag.streamedBytes}`);
15
25
  if (diag.agentAnswer !== undefined && diag.agentAnswer.trim() !== "") {
16
26
  lines.push(` - ${diag.agentAnswer.trim()}`);
@@ -206686,7 +206686,12 @@ var resAppTickStatus = lazyType(
206686
206686
  // Silence beyond `graceMs`; 0 when inside the window.
206687
206687
  overdueMs: "number",
206688
206688
  // True when this read found a dead alarm and re-armed it.
206689
- healed: "boolean"
206689
+ healed: "boolean",
206690
+ // #9388: set only beside `unscheduled`, when the LIVE RELEASE declares a
206691
+ // `scheduled` cadence anyway. No timer is armed for a handler that exists:
206692
+ // the schedule is stalled (or was paused with `app schedule off`), and
206693
+ // `app rearm` starts it again. Absent from older servers.
206694
+ "releaseIntervalMs?": "number"
206690
206695
  })
206691
206696
  );
206692
206697
  var APP_OWNER_STATS_DAYS = 30;
@@ -252097,12 +252102,23 @@ async function loadSelectedBackend(vctx, ownerHandle, appSlug) {
252097
252102
  return { ok: true, source, parsed: parseBackendConfig(source), fsId: row.fsId, mode: row.mode, ownerUserId: row.userId };
252098
252103
  }
252099
252104
  __name(loadSelectedBackend, "loadSelectedBackend");
252105
+ function isTransientBackendLoadFailure(loaded) {
252106
+ return !loaded.ok && (loaded.reason === "release_lookup_failed" || loaded.reason === "source_unreadable");
252107
+ }
252108
+ __name(isTransientBackendLoadFailure, "isTransientBackendLoadFailure");
252109
+ function backendLoadFailureDetail(loaded) {
252110
+ const shape = loaded.err;
252111
+ const cause = loaded.err === void 0 ? "empty source" : typeof shape?.message === "string" ? shape.message : String(loaded.err);
252112
+ return `${loaded.reason}: ${cause}`;
252113
+ }
252114
+ __name(backendLoadFailureDetail, "backendLoadFailureDetail");
252100
252115
  async function resolveBackendSchedule(vctx, ownerHandle, appSlug) {
252101
- if (await scheduledRunsPaused(vctx, { ownerHandle, appSlug })) return null;
252116
+ if (await scheduledRunsPaused(vctx, { ownerHandle, appSlug })) return Result.Ok(null);
252102
252117
  const loaded = await loadSelectedBackend(vctx, ownerHandle, appSlug);
252103
- if (!loaded.ok) return null;
252104
- if (!loaded.parsed.handlers.includes("scheduled")) return null;
252105
- return loaded.parsed.schedule?.intervalMs ?? null;
252118
+ if (isTransientBackendLoadFailure(loaded)) return Result.Err(backendLoadFailureDetail(loaded));
252119
+ if (!loaded.ok) return Result.Ok(null);
252120
+ if (!loaded.parsed.handlers.includes("scheduled")) return Result.Ok(null);
252121
+ return Result.Ok(loaded.parsed.schedule?.intervalMs ?? null);
252106
252122
  }
252107
252123
  __name(resolveBackendSchedule, "resolveBackendSchedule");
252108
252124
  async function loadSource(vctx, assetURI) {
@@ -287589,6 +287605,7 @@ function readAgentWakeBudget(raw) {
287589
287605
  }
287590
287606
  __name(readAgentWakeBudget, "readAgentWakeBudget");
287591
287607
  var REPORT_IS_AUTHORITATIVE = "This report is the platform's own record of what this build changed; read the app again only for a question it does not answer.";
287608
+ var THINKING_CAP_SENTENCE = "The build you dispatched planned until it used its whole output allowance and stopped before it wrote any code. No files changed and no version was saved. The same request will stop the same way, so the way forward is smaller parts: tell the person in one line that this pass saved nothing and that you are building it in smaller parts, then dispatch the first part as its own edit_vibe, one or two files at a time.";
287592
287609
  var ACCESS_SUMMARY_MAX_CHARS = 400;
287593
287610
  function capAccessSummary(summary) {
287594
287611
  const flat = summary.replace(/\s+/g, " ").trim();
@@ -287605,7 +287622,7 @@ function renderBuildSettledSentence(outcome) {
287605
287622
  return reason === void 0 ? "The build you dispatched did not finish \u2014 it failed. Nothing was saved." : `The build you dispatched did not finish \u2014 it failed. Nothing was saved. The error was: ${reason}`;
287606
287623
  }
287607
287624
  if (outcome.outcome === "no-code")
287608
- return `The build you dispatched finished and made no changes to the app. No files changed and no version was saved. ${REPORT_IS_AUTHORITATIVE}`;
287625
+ return outcome.noCodeCause === "thinking-cap" ? `${THINKING_CAP_SENTENCE} ${REPORT_IS_AUTHORITATIVE}` : `The build you dispatched finished and made no changes to the app. No files changed and no version was saved. ${REPORT_IS_AUTHORITATIVE}`;
287609
287626
  const settled = outcome.settled ?? (touched.length === 0 ? void 0 : classifyTurnReach(touched));
287610
287627
  const facts = [`${BUILD_SAVED_LEAD}${touched.length === 0 ? "" : ` (${touched.join(", ")})`}.`];
287611
287628
  if (settled !== void 0) {
@@ -288676,6 +288693,44 @@ __name(sweepLostTurns, "sweepLostTurns");
288676
288693
 
288677
288694
  // ../../home/runner/work/vibes.diy/vibes.diy/vibes.diy/api/svc/intern/agent-session-runtime.ts
288678
288695
  init_lazy_type();
288696
+
288697
+ // ../../home/runner/work/vibes.diy/vibes.diy/vibes.diy/api/svc/intern/build-no-code-cause.ts
288698
+ init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process();
288699
+ init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console();
288700
+ init_performance2();
288701
+ init_out4();
288702
+ init_lazy_type();
288703
+ var THINKING_CAP_MIN_COMPLETION_TOKENS = 16384;
288704
+ var REASONING_SHARE = 0.9;
288705
+ var UsageRound = lazyType(
288706
+ () => type({
288707
+ completion_tokens: "number",
288708
+ "completion_tokens_details?": { "reasoning_tokens?": "number" }
288709
+ })
288710
+ );
288711
+ var NoCodeTerminal = lazyType(
288712
+ () => type({
288713
+ stats: { code: BlockStats },
288714
+ usage: { given: UsageRound.array() }
288715
+ })
288716
+ );
288717
+ function thoughtThroughAllowance(round2) {
288718
+ const completion2 = round2.completion_tokens;
288719
+ const reasoning = round2.completion_tokens_details?.reasoning_tokens;
288720
+ if (reasoning === void 0) return false;
288721
+ return completion2 >= THINKING_CAP_MIN_COMPLETION_TOKENS && reasoning >= completion2 * REASONING_SHARE;
288722
+ }
288723
+ __name(thoughtThroughAllowance, "thoughtThroughAllowance");
288724
+ function noCodeCause(end) {
288725
+ const terminal = NoCodeTerminal(end);
288726
+ if (terminal instanceof type.errors) return void 0;
288727
+ const code2 = terminal.stats.code;
288728
+ if ((code2.cnt ?? 0) > 0 || code2.bytes > 0) return void 0;
288729
+ return terminal.usage.given.some(thoughtThroughAllowance) ? "thinking-cap" : void 0;
288730
+ }
288731
+ __name(noCodeCause, "noCodeCause");
288732
+
288733
+ // ../../home/runner/work/vibes.diy/vibes.diy/vibes.diy/api/svc/intern/agent-session-runtime.ts
288679
288734
  var toolRefusalError = lazyType(() => type({ refusal: agentToolRefusal }));
288680
288735
  var sessions = /* @__PURE__ */ new WeakMap();
288681
288736
  async function liveAgentSessionOn(scope2, chatId) {
@@ -288723,6 +288778,7 @@ function landingOf(ends, applied) {
288723
288778
  ).filter((block2) => block2.touchedPaths !== void 0 || block2.settled !== void 0);
288724
288779
  const block = facts[facts.length - 1];
288725
288780
  if (block === void 0) return void 0;
288781
+ const cause = applied ? void 0 : noCodeCause(block);
288726
288782
  return {
288727
288783
  outcome: applied ? "applied" : "no-code",
288728
288784
  ...block.touchedPaths === void 0 ? {} : { touchedPaths: block.touchedPaths },
@@ -288730,7 +288786,9 @@ function landingOf(ends, applied) {
288730
288786
  ...block.fsRef?.fsId === void 0 ? {} : { fsId: block.fsRef.fsId },
288731
288787
  // #6696: the same repair fact the live landing carries, off the stored terminal.
288732
288788
  ...block.saveRepair === void 0 ? {} : { saveRepair: block.saveRepair },
288733
- ...block.seedRepair === void 0 ? {} : { seedRepair: block.seedRepair }
288789
+ ...block.seedRepair === void 0 ? {} : { seedRepair: block.seedRepair },
288790
+ // #9437: why a build wrote no code, read off the same stored terminal the live landing reads.
288791
+ ...cause === void 0 ? {} : { noCodeCause: cause }
288734
288792
  };
288735
288793
  }
288736
288794
  __name(landingOf, "landingOf");
@@ -371281,6 +371339,8 @@ async function handleEndMsg({
371281
371339
  terminal.releasePersistGate ??= acquireChatPersistGate(vctx.connections, req2.chatId);
371282
371340
  terminal.settled = value2.settled;
371283
371341
  terminal.touchedPaths = value2.touchedPaths;
371342
+ const cause = noCodeCause(value2);
371343
+ if (cause !== void 0) terminal.noCodeCause = cause;
371284
371344
  const endSeq = blockSeq++;
371285
371345
  const rEnd = await appendBlockEvent({
371286
371346
  ctx,
@@ -373481,7 +373541,7 @@ Once they ratify, carry it through: publish the result for everyone who took par
373481
373541
  Who you invite: people the ask names, each @handle checked with lookup_handle, people already in that vibe, and the group your notes name for a word like "the team". When you cannot tell who is in a group, the build carries the invite screen and the person adds them there. An invite and its note go out once and stay sent, so they go only to those people.
373482
373542
  When another person's vibe invites your person to answer something, draft their likely answers there as a member of that vibe, marked as your picks, so they open to a page already half done. Save the picks into that vibe's records with with_vibe's put_doc, as the person, and link the vibe; when its rules refuse the save (a viewer role, a closed vibe), link it and lay the picks out in chat for them to enter instead. A record they dictate ("add a record to the tide log: place is harbor") is written as they said it, now; a near-twin you notice is a clause after the save, never a question before it.
373483
373543
  Where your tool list holds no tool for a step, the vibe's own invite screen or share control does it: build it in, opening from the link's #invite fragment, and link that screen itself, https://vibes.diy/vibe/<handle>/<appSlug>#invite, so one tap lands them where the invites go out. Your report after a step is a sentence or two: what you did, the link to the next step (the #invite link while the invites are still theirs to send, the vibe's own link once a tool has sent them), and one line on where the answers will show up: the vibe's results view, plus a text to their phone when notify_me_when set that up this turn. "Done: https://vibes.diy/vibe/<handle>/offsite-poll#invite Tap Send to bring in Ada and Bo; their picks fill the tally on the poll."
373484
- YOUR OWN VIBES ARE YOURS TO TEND. A vibe under one of the person's handles, and above all one you built for them, is yours to look after the way a person looks after their own project: you know it, you keep it working, and you change it without asking leave. When a message asks for a change, reports something broken, or makes the next step plain (they asked for reminders, so guests who follow the page get them too), make the edit, publish it, and report what changed in a sentence with its link. Never ask whether to change, fix, extend or publish one of their own vibes: do it, then tell them. A tease about your wording is a bit, and it changes nothing. Read its current files before you edit, so changes they made since stay in. The only questions about their own vibe are the saved ones below.
373544
+ YOUR OWN VIBES ARE YOURS TO TEND. A vibe under one of the person's handles, and above all one you built for them, is yours to look after the way a person looks after their own project: you know it, you keep it working, and you change it without asking leave. When a message asks for a change, reports something broken, or makes the next step plain (they asked for reminders, so guests who follow the page get them too), make the edit, publish it, and report what changed in a sentence with its link. Never ask whether to change, fix, extend or publish one of their own vibes: do it, then tell them. An item for a vibe they already keep ("put sunscreen on the beach list", "log 3 miles on my runs") is a record in that vibe, and the app stays as it is: find the vibe with list_vibes, read a record or two there with with_vibe query_docs to learn its shape, save the one new record in that shape with put_doc (or with the vibe's own tool for adding one), and reply with the item, the vibe's name and its link. When two of their vibes could be the one, ask which in one short question, once, and save on the answer. A tease about your wording is a bit, and it changes nothing. Read its current files before you edit, so changes they made since stay in. Past that one, the only questions about their own vibe are the saved ones below.
373485
373545
  The question you save is for a step that leaves the platform or cannot be undone: an email or text to someone outside Vibes, spending or charging money, changing a price, opening a private vibe to the whole world, deleting what other people wrote, and a step's go-live button. Ask it in one plain question, and take that step on a clear yes. The question offers only what a tool of yours can then do. With no tool that emails, texts or pays, the offer is the thing you can do, said as what it gives them: "I'll make the club an invite page you can text Sam. Want it?" A yes builds the page, and the Done text hands over the link to send: "Done: <link> Text this to Sam to bring them in." Asked to get a thing to a person ("send Sam the card"), put the thing itself in the chat, ready to forward. Connecting an account that takes real money is the person's own step, from a link. Inside a vibe, do the step and tell them after.
373486
373546
  Something the person hands you to work from (a receipt, a list, a menu) is read by you, now, and what they asked of it is answered in the reply, in the same turn. A split is arithmetic you show: each person's items, tax and tip in proportion, one line per person, and shares that add up to the total exactly; with no word on who had what, split it evenly and say so. A vibe to keep it is the side note, made when they will keep using it, with its lines written in as records before the link goes out: one record per line (an item with its price, a name with its dish), keyed to its parent (the receipt, the list), raw as given, with totals derived from the lines. When the picture is not in front of you, the first text asks for the lines as the step to their answer: "Type the receipt's lines here (each item and price, then tax and tip) and I'll split it to the cent." "What do we need to book it" gets the bookable list (place, date, time, party size, who calls) and never a claim that a table is booked.
373487
373547
 
@@ -377706,7 +377766,7 @@ init_out4();
377706
377766
  init_lazy_type();
377707
377767
  var WEB_SEARCH_TOOL_NAME = "web_search";
377708
377768
  var WEB_SEARCHES_PER_TURN = 3;
377709
- var WEB_SEARCH_MODEL = "~google/gemini-flash-latest";
377769
+ var WEB_SEARCH_MODEL = "google/gemini-3.1-flash-lite";
377710
377770
  var WEB_SEARCH_MAX_RESULTS = 5;
377711
377771
  var WEB_SEARCH_DEADLINE_MS = 25e3;
377712
377772
  var WEB_SEARCH_QUERY_MAX = 300;
@@ -377735,8 +377795,10 @@ function answer6(o4) {
377735
377795
  }
377736
377796
  __name(answer6, "answer");
377737
377797
  function parseSearchReply(json6) {
377738
- const message5 = json6?.choices?.[0]?.message;
377798
+ const choice = json6?.choices?.[0];
377799
+ const message5 = choice?.message;
377739
377800
  if (message5 === void 0 || typeof message5.content !== "string") return void 0;
377801
+ const finishReason = typeof choice?.finish_reason === "string" ? choice.finish_reason : void 0;
377740
377802
  const seen2 = /* @__PURE__ */ new Set();
377741
377803
  const sources = [];
377742
377804
  for (const a4 of Array.isArray(message5.annotations) ? message5.annotations : []) {
@@ -377748,7 +377810,7 @@ function parseSearchReply(json6) {
377748
377810
  sources.push({ url: url3, ...typeof cite.title === "string" && cite.title !== "" ? { title: cite.title.slice(0, 200) } : {} });
377749
377811
  }
377750
377812
  const text3 = message5.content.replace(/\[([^\]\n]+)\]\((?:https?:)?[^)\s]+\)/g, "$1").trim();
377751
- return { text: text3, sources };
377813
+ return { text: text3, sources, ...finishReason === void 0 ? {} : { finishReason } };
377752
377814
  }
377753
377815
  __name(parseSearchReply, "parseSearchReply");
377754
377816
  function createWebSearchTool(vctx, ctx, deps = {}) {
@@ -377785,7 +377847,8 @@ function createWebSearchTool(vctx, ctx, deps = {}) {
377785
377847
  model: WEB_SEARCH_MODEL,
377786
377848
  stream: false,
377787
377849
  max_tokens: 800,
377788
- reasoning: { effort: "minimal" },
377850
+ // Off, so all 800 tokens are answer room (#9395): a thinking model spent them all.
377851
+ reasoning: { effort: "none" },
377789
377852
  plugins: [{ id: "web", engine: "exa", max_results: WEB_SEARCH_MAX_RESULTS }],
377790
377853
  messages: [
377791
377854
  {
@@ -377858,6 +377921,14 @@ function createWebSearchTool(vctx, ctx, deps = {}) {
377858
377921
  });
377859
377922
  if (rTrack.isErr()) vctx.logger.Warn().Err(rTrack).Str("chatId", ctx.chatId).Msg("web_search: billing-track-failed");
377860
377923
  }
377924
+ if (reply?.text === "" && reply.finishReason === "length") {
377925
+ vctx.logger.Warn().Str("chatId", ctx.chatId).Str("model", WEB_SEARCH_MODEL).Msg("web_search: cut off by token limit");
377926
+ return answer6({
377927
+ ok: false,
377928
+ reason: "cut-off",
377929
+ message: "The search ran out of room before it wrote an answer. Answer without it, and say the search didn't finish."
377930
+ });
377931
+ }
377861
377932
  if (reply === void 0 || reply.text === "") {
377862
377933
  vctx.logger.Warn().Str("chatId", ctx.chatId).Msg("web_search: reply had no answer text");
377863
377934
  return answer6({ ok: false, reason: "failed", message: "The search came back empty." });
@@ -390431,6 +390502,9 @@ async function settlePromptTurn(args3) {
390431
390502
  ...designFindings === void 0 ? {} : { designFindings },
390432
390503
  ...appInventory === void 0 ? {} : { appInventory },
390433
390504
  ...facts.errorReason === void 0 ? {} : { errorReason: facts.errorReason },
390505
+ // #9437: a no-code build that planned through its whole output allowance says so,
390506
+ // so the agent sends smaller parts instead of the same request again.
390507
+ ...terminal.noCodeCause === void 0 || facts.errored || terminal.settled?.applied === true ? {} : { noCodeCause: terminal.noCodeCause },
390434
390508
  // Owner directive 2026-10-05: the chat's first build does not send the
390435
390509
  // agent to wait for its picture. The same fact the settled event records.
390436
390510
  ...preAssembled?.isInitialTurn === true ? { firstBuild: true } : {}
@@ -392536,6 +392610,18 @@ var appTickStatusEvento = {
392536
392610
  });
392537
392611
  if (vctx.waitUntil) vctx.waitUntil(notify2);
392538
392612
  else await notify2;
392613
+ let releaseIntervalMs;
392614
+ if (s2.state === "unscheduled") {
392615
+ const rInterval = await stalledReleaseInterval(vctx, req2);
392616
+ if (rInterval.isErr()) {
392617
+ await ctx.send.send(
392618
+ ctx,
392619
+ unavailableError2(`tick status unavailable: the live release could not be read (${rInterval.Err().message})`)
392620
+ );
392621
+ return Result.Ok(EventoResult.Continue);
392622
+ }
392623
+ releaseIntervalMs = rInterval.Ok();
392624
+ }
392539
392625
  await ctx.send.send(ctx, {
392540
392626
  type: "vibes.diy.res-app-tick-status",
392541
392627
  ownerHandle: req2.ownerHandle,
@@ -392551,12 +392637,22 @@ var appTickStatusEvento = {
392551
392637
  nextAlarmAt: isoOrNull(s2.nextAlarmAt),
392552
392638
  graceMs: s2.graceMs,
392553
392639
  overdueMs: s2.overdueMs,
392554
- healed: s2.healed
392640
+ healed: s2.healed,
392641
+ ...releaseIntervalMs === void 0 ? {} : { releaseIntervalMs }
392555
392642
  });
392556
392643
  return Result.Ok(EventoResult.Continue);
392557
392644
  }
392558
392645
  )
392559
392646
  };
392647
+ async function stalledReleaseInterval(vctx, req2) {
392648
+ const rInterval = await resolveBackendSchedule(vctx, req2.ownerHandle, req2.appSlug);
392649
+ if (rInterval.isErr()) {
392650
+ vctx.logger.Warn().Str("vibe", `${req2.ownerHandle}/${req2.appSlug}`).Str("err", rInterval.Err().message).Msg("tick-status release read failed");
392651
+ return Result.Err(rInterval.Err());
392652
+ }
392653
+ return Result.Ok(rInterval.Ok() ?? void 0);
392654
+ }
392655
+ __name(stalledReleaseInterval, "stalledReleaseInterval");
392560
392656
  var appTickRearmEvento = {
392561
392657
  hash: "app-tick-rearm",
392562
392658
  validate: unwrapMsgBase(async (msg) => {
@@ -404618,6 +404714,10 @@ async function attemptBackendScheduled(vctx, input3) {
404618
404714
  if (executor === void 0) return { ran: false, reason: "backend_disabled" };
404619
404715
  if (await scheduledRunsPaused(vctx, input3)) return { ran: false, reason: "no_schedule" };
404620
404716
  const loaded = await loadSelectedBackend(vctx, input3.ownerHandle, input3.appSlug);
404717
+ if (isTransientBackendLoadFailure(loaded)) {
404718
+ logFailure({ stage: "prepare", err: loaded.err ?? backendLoadFailureDetail(loaded) });
404719
+ return { ran: false, reason: "release_unavailable", detail: boundDetail(backendLoadFailureDetail(loaded)) };
404720
+ }
404621
404721
  if (!loaded.ok || !loaded.parsed.handlers.includes("scheduled")) {
404622
404722
  return { ran: false, reason: "no_schedule" };
404623
404723
  }
@@ -405595,7 +405695,12 @@ var BackendDO = class {
405595
405695
  * identity so a later `alarm()` can recover it after eviction.
405596
405696
  */
405597
405697
  async arm(request, ownerHandle, appSlug) {
405598
- const intervalMs = await this.resolveSchedule(request, ownerHandle, appSlug);
405698
+ const rInterval = await this.resolveSchedule(request, ownerHandle, appSlug);
405699
+ if (rInterval.isErr()) {
405700
+ console.error("[BackendDO] arm: schedule unresolved, timer left as is:", rInterval.Err().message);
405701
+ return new Response(`backend arm: ${rInterval.Err().message}`, { status: 503 });
405702
+ }
405703
+ const intervalMs = rInterval.Ok();
405599
405704
  const stored = await this.state.storage.get(ALARM_STATE_KEY);
405600
405705
  const hasAlarm = await this.state.storage.getAlarm() !== null;
405601
405706
  const decision = armDecision(stored?.intervalMs ?? null, hasAlarm, intervalMs);
@@ -405621,9 +405726,10 @@ var BackendDO = class {
405621
405726
  return new Response("ok", { status: 200 });
405622
405727
  }
405623
405728
  /**
405624
- * The live release's `scheduled` cadence, or null when it exports none — the
405625
- * ONE schedule source, read fresh on every `arm`. `protected` (like `runTick`)
405626
- * so the arm/disarm invariants are testable without a platform ctx.
405729
+ * The live release's `scheduled` cadence, null when it exports none, or Err
405730
+ * when the release could not be read (#9388) — the ONE schedule source, read
405731
+ * fresh on every `arm`. `protected` (like `runTick`) so the arm/disarm
405732
+ * invariants are testable without a platform ctx.
405627
405733
  */
405628
405734
  async resolveSchedule(request, ownerHandle, appSlug) {
405629
405735
  const vctx = await this.buildVctx(request);
@@ -154,6 +154,7 @@
154
154
  "vibes.diy/api/svc/intern/build-ledger-seams.ts",
155
155
  "vibes.diy/api/svc/intern/build-ledger-store.ts",
156
156
  "vibes.diy/api/svc/intern/build-lost-report.ts",
157
+ "vibes.diy/api/svc/intern/build-no-code-cause.ts",
157
158
  "vibes.diy/api/svc/intern/build-slot-refusal.ts",
158
159
  "vibes.diy/api/svc/intern/build-version-ordinal.ts",
159
160
  "vibes.diy/api/svc/intern/builder-close-overlay.ts",
@@ -2805,6 +2806,7 @@
2805
2806
  "vibes.diy/api/svc/intern/build-ledger-seams.ts",
2806
2807
  "vibes.diy/api/svc/intern/build-ledger-store.ts",
2807
2808
  "vibes.diy/api/svc/intern/build-lost-report.ts",
2809
+ "vibes.diy/api/svc/intern/build-no-code-cause.ts",
2808
2810
  "vibes.diy/api/svc/intern/build-slot-refusal.ts",
2809
2811
  "vibes.diy/api/svc/intern/build-version-ordinal.ts",
2810
2812
  "vibes.diy/api/svc/intern/builder-close-overlay.ts",