vibes-diy 14.3.444 → 14.3.446
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/cli/cmd-evento.d.ts +1 -0
- package/cli/cmds/agent-cmd.d.ts +4 -2
- package/cli/cmds/agent-cmd.js +27 -23
- package/cli/cmds/format-err.js +3 -6
- package/cli/cmds/generate-core.js +10 -11
- package/cli/cmds/mcp-cmd.js +2 -4
- package/cli/cmds/run/backend-worker/run-backend-entry.js +71 -34
- package/cli/cmds/run/run-bundle.js +4699 -4624
- package/cli/cmds/versions-cmd.d.ts +1 -0
- package/package.json +24 -12
package/cli/cmd-evento.d.ts
CHANGED
|
@@ -1070,6 +1070,7 @@ export declare function cliEventoHandlers(): (import("@adviser/cement").EventoHa
|
|
|
1070
1070
|
releaseSeq: number;
|
|
1071
1071
|
created: string;
|
|
1072
1072
|
published: boolean;
|
|
1073
|
+
byHandle?: string | undefined;
|
|
1073
1074
|
}[];
|
|
1074
1075
|
}> | import("@adviser/cement").EventoHandler<WrapCmdTSMsg<unknown>, {
|
|
1075
1076
|
type: "vibes-diy.cli.assets-ls";
|
package/cli/cmds/agent-cmd.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Result, EventoHandler } from "@adviser/cement";
|
|
2
|
-
import { appLinksIn, foldAgentReplies } from "@vibes.diy/api-types";
|
|
3
|
-
import { CliCtx } from "../cli-ctx.js";
|
|
2
|
+
import { appLinksIn, foldAgentReplies, type AgentPicture } from "@vibes.diy/api-types";
|
|
3
|
+
import { CliCtx, type CliOutput } from "../cli-ctx.js";
|
|
4
4
|
import { WrapCmdTSMsg } from "../cmd-evento.js";
|
|
5
5
|
import { type PutAssetApi } from "./put-asset-core.js";
|
|
6
|
+
import { type AgentPictureDownloadCtx } from "./agent-picture-download.js";
|
|
6
7
|
import type { VibesFileContent } from "@vibes.diy/call-ai-v2";
|
|
7
8
|
export { foldAgentReplies, appLinksIn };
|
|
9
|
+
export declare function agentPictureHook(download: AgentPictureDownloadCtx, output: CliOutput, json: boolean): (picture: AgentPicture) => Promise<void>;
|
|
8
10
|
export declare const ReqAgent: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
9
11
|
type: "vibes-diy.cli.agent";
|
|
10
12
|
apiUrl: string;
|
package/cli/cmds/agent-cmd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { resolve as resolvePath, basename } from "node:path";
|
|
2
2
|
import { array, command, flag, multioption, number, option, positional, string } from "cmd-ts";
|
|
3
|
-
import { Result, Option } from "@adviser/cement";
|
|
3
|
+
import { Result, exception2Result, Option, } from "@adviser/cement";
|
|
4
4
|
import { type } from "arktype";
|
|
5
5
|
import { AGENT_CHAT_APP_SLUG, appLinksIn, foldAgentReplies, splitAgentFold } from "@vibes.diy/api-types";
|
|
6
|
-
import { OpenChatSessionError, openChatSession
|
|
6
|
+
import { OpenChatSessionError, openChatSession } from "@vibes.diy/api-impl";
|
|
7
7
|
import { cmdTsDefaultArgs } from "../cli-ctx.js";
|
|
8
8
|
import { sendMsg } from "../cmd-evento.js";
|
|
9
9
|
import { resolveHandle } from "../resolve-handle.js";
|
|
@@ -15,6 +15,22 @@ import { inferMimeType } from "./infer-mime-type.js";
|
|
|
15
15
|
import { putAssetFile } from "./put-asset-core.js";
|
|
16
16
|
import { downloadAgentPicture } from "./agent-picture-download.js";
|
|
17
17
|
export { foldAgentReplies, appLinksIn };
|
|
18
|
+
export function agentPictureHook(download, output, json) {
|
|
19
|
+
return async (picture) => {
|
|
20
|
+
const rPath = await downloadAgentPicture(download, picture);
|
|
21
|
+
const base = { name: picture.name, mimeType: picture.mimeType, url: picture.url };
|
|
22
|
+
if (json) {
|
|
23
|
+
const line = rPath.isOk() ? { ...base, path: rPath.Ok() } : { ...base, error: rPath.Err().message };
|
|
24
|
+
output.stdout(JSON.stringify({ type: "vibes-diy.cli.agent-picture", ...line }) + "\n");
|
|
25
|
+
}
|
|
26
|
+
else if (rPath.isOk())
|
|
27
|
+
output.stdout(`[picture: ${rPath.Ok()}]\n\n`);
|
|
28
|
+
else
|
|
29
|
+
output.stderr(`[picture not saved: ${rPath.Err().message}]\n`);
|
|
30
|
+
if (rPath.isErr())
|
|
31
|
+
return Promise.reject(rPath.Err());
|
|
32
|
+
};
|
|
33
|
+
}
|
|
18
34
|
export const ReqAgent = type({
|
|
19
35
|
type: "'vibes-diy.cli.agent'",
|
|
20
36
|
apiUrl: "string",
|
|
@@ -121,19 +137,18 @@ export const agentEvento = {
|
|
|
121
137
|
return Result.Err(rBlocks.Err());
|
|
122
138
|
fileBlocks = rBlocks.Ok();
|
|
123
139
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
catch (e) {
|
|
140
|
+
const rSession = await exception2Result(() => openChatSession({
|
|
141
|
+
api: api,
|
|
142
|
+
openReq: { ownerHandle, appSlug: AGENT_CHAT_APP_SLUG, mode: "codegen", ...rConversation.Ok() },
|
|
143
|
+
renderError: (e) => formatErr(e),
|
|
144
|
+
}));
|
|
145
|
+
if (rSession.isErr()) {
|
|
146
|
+
const e = rSession.Err();
|
|
133
147
|
if (e instanceof OpenChatSessionError && e.stage === "overloaded")
|
|
134
148
|
return Result.Err("The agent is busy with other builds right now. Try again in a minute.");
|
|
135
149
|
return Result.Err(`Failed to open the agent chat: ${e instanceof Error ? e.message : String(e)}`);
|
|
136
150
|
}
|
|
151
|
+
const session = rSession.Ok();
|
|
137
152
|
const feed = makeChatEventFeed(session);
|
|
138
153
|
try {
|
|
139
154
|
const turnOpts = {
|
|
@@ -174,18 +189,7 @@ export const agentEvento = {
|
|
|
174
189
|
if (args.json)
|
|
175
190
|
ectx.output.stdout(JSON.stringify({ type: "vibes-diy.cli.agent-copy", ...copy }) + "\n");
|
|
176
191
|
},
|
|
177
|
-
onPicture:
|
|
178
|
-
const rPath = await downloadAgentPicture({ getToken: () => api.cfg.getToken(), ...(ectx.fetch === undefined ? {} : { fetch: ectx.fetch }) }, picture);
|
|
179
|
-
const base = { name: picture.name, mimeType: picture.mimeType, url: picture.url };
|
|
180
|
-
if (args.json) {
|
|
181
|
-
const line = rPath.isOk() ? { ...base, path: rPath.Ok() } : { ...base, error: rPath.Err().message };
|
|
182
|
-
ectx.output.stdout(JSON.stringify({ type: "vibes-diy.cli.agent-picture", ...line }) + "\n");
|
|
183
|
-
}
|
|
184
|
-
else if (rPath.isOk())
|
|
185
|
-
ectx.output.stdout(`[picture: ${rPath.Ok()}]\n\n`);
|
|
186
|
-
else
|
|
187
|
-
ectx.output.stderr(`[picture not saved: ${rPath.Err().message}]\n`);
|
|
188
|
-
},
|
|
192
|
+
onPicture: agentPictureHook({ getToken: () => api.cfg.getToken(), ...(ectx.fetch === undefined ? {} : { fetch: ectx.fetch }) }, ectx.output, args.json),
|
|
189
193
|
});
|
|
190
194
|
return sendMsg(ctx, {
|
|
191
195
|
type: "vibes-diy.cli.res-agent",
|
package/cli/cmds/format-err.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { exception2Result } from "@adviser/cement";
|
|
1
2
|
import { HANDLE_REQUIRED_CLI_MESSAGE, isHandleRequiredError } from "../handle-required.js";
|
|
2
3
|
export function formatErr(err) {
|
|
3
4
|
if (isHandleRequiredError(err))
|
|
@@ -19,10 +20,6 @@ export function formatErr(err) {
|
|
|
19
20
|
const message = err.message;
|
|
20
21
|
if (typeof message === "string")
|
|
21
22
|
return message;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
return String(err);
|
|
27
|
-
}
|
|
23
|
+
const rJson = exception2Result(() => JSON.stringify(err));
|
|
24
|
+
return rJson.isOk() ? rJson.Ok() : String(err);
|
|
28
25
|
}
|
|
@@ -63,17 +63,15 @@ async function runGenerateRound(api, args, progress) {
|
|
|
63
63
|
...(args.stylePin === undefined ? {} : { stylePin: args.stylePin }),
|
|
64
64
|
...(args.fastPass === undefined ? {} : { fastPass: args.fastPass }),
|
|
65
65
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
catch (e) {
|
|
66
|
+
const rSession = await exception2Result(() => openChatSession({
|
|
67
|
+
api: api,
|
|
68
|
+
openReq,
|
|
69
|
+
decode: { keepBlock: true },
|
|
70
|
+
shouldProceed: () => args.signal?.aborted !== true,
|
|
71
|
+
renderError: (e) => formatErr(e),
|
|
72
|
+
}));
|
|
73
|
+
if (rSession.isErr()) {
|
|
74
|
+
const e = rSession.Err();
|
|
77
75
|
if (e instanceof OpenChatSessionError && e.stage === "fenced") {
|
|
78
76
|
return Result.Err("Cancelled by caller after opening the chat");
|
|
79
77
|
}
|
|
@@ -83,6 +81,7 @@ async function runGenerateRound(api, args, progress) {
|
|
|
83
81
|
}
|
|
84
82
|
return Result.Err(`Failed to open chat: ${e instanceof Error ? e.message : String(e)}`);
|
|
85
83
|
}
|
|
84
|
+
const session = rSession.Ok();
|
|
86
85
|
if (args.signal?.aborted) {
|
|
87
86
|
await session.close();
|
|
88
87
|
return Result.Err("Cancelled by caller after opening the chat");
|
package/cli/cmds/mcp-cmd.js
CHANGED
|
@@ -315,14 +315,12 @@ export function createMcpServer(deps) {
|
|
|
315
315
|
if (progressToken === undefined)
|
|
316
316
|
return;
|
|
317
317
|
progressCount += 1;
|
|
318
|
-
|
|
318
|
+
await exception2Result(async () => {
|
|
319
319
|
await extra.sendNotification({
|
|
320
320
|
method: "notifications/progress",
|
|
321
321
|
params: { progressToken, progress: progressCount, message: `${level === "warn" ? "warning: " : ""}${message}` },
|
|
322
322
|
});
|
|
323
|
-
}
|
|
324
|
-
catch {
|
|
325
|
-
}
|
|
323
|
+
});
|
|
326
324
|
};
|
|
327
325
|
const baseDir = await mkdtemp(join(tmpdir(), "vibes-generate-"));
|
|
328
326
|
const startedAt = Date.now();
|
|
@@ -25732,6 +25732,7 @@ var init_data_stream = __esm({
|
|
|
25732
25732
|
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console();
|
|
25733
25733
|
init_performance2();
|
|
25734
25734
|
init_out4();
|
|
25735
|
+
init_esm();
|
|
25735
25736
|
init_types3();
|
|
25736
25737
|
init_line_stream();
|
|
25737
25738
|
init_stats_stream();
|
|
@@ -30606,7 +30607,12 @@ var init_app = __esm({
|
|
|
30606
30607
|
mode: "'production'|'dev'",
|
|
30607
30608
|
releaseSeq: "number",
|
|
30608
30609
|
created: "string",
|
|
30609
|
-
published: "boolean"
|
|
30610
|
+
published: "boolean",
|
|
30611
|
+
// #10219: the handle of the person who made this version when it was not
|
|
30612
|
+
// the owner (an editor's turn or a developer push, `Apps.deployerUserId`).
|
|
30613
|
+
// Sent only to the app's owner; absent means the owner
|
|
30614
|
+
// made it (or the caller is not the owner). A handle, never a name or email.
|
|
30615
|
+
"byHandle?": "string"
|
|
30610
30616
|
})
|
|
30611
30617
|
);
|
|
30612
30618
|
resListVersions = lazyType(
|
|
@@ -38355,7 +38361,7 @@ function textOnboardingSmsBody(nonce) {
|
|
|
38355
38361
|
function textSmsHref(phoneNumber, body) {
|
|
38356
38362
|
return `sms:${phoneNumber}?&body=${encodeURIComponent(body)}`;
|
|
38357
38363
|
}
|
|
38358
|
-
var TEXT_LINE_CYCLE_START_DAY, TEXT_LINE_CYCLE_START_DAYS, TEXT_NUMBER_ERROR, TEXT_ONBOARDING_GREETING, reqGetTextOnboarding, resGetTextOnboarding, reqGetTextNumber, resGetTextNumber;
|
|
38364
|
+
var TEXT_LINE_CYCLE_START_DAY, TEXT_LINE_CYCLE_START_DAYS, TEXT_NUMBER_ERROR, TEXT_ONBOARDING_GREETING, reqGetTextOnboarding, resGetTextOnboarding, reqGetTextNumber, resGetTextNumber, resGetTextNumberAnswer;
|
|
38359
38365
|
var init_text_number = __esm({
|
|
38360
38366
|
"../../home/runner/work/vibes.diy/vibes.diy/vibes.diy/api/types/text-number.ts"() {
|
|
38361
38367
|
"use strict";
|
|
@@ -38408,6 +38414,19 @@ var init_text_number = __esm({
|
|
|
38408
38414
|
phoneNumber: "string > 0"
|
|
38409
38415
|
})
|
|
38410
38416
|
);
|
|
38417
|
+
resGetTextNumberAnswer = lazyType(
|
|
38418
|
+
() => type({
|
|
38419
|
+
type: "'vibes.diy.res-get-text-number-answer'",
|
|
38420
|
+
answer: "'line'",
|
|
38421
|
+
/** The line with room (E.164). */
|
|
38422
|
+
phoneNumber: "string > 0"
|
|
38423
|
+
}).or({
|
|
38424
|
+
type: "'vibes.diy.res-get-text-number-answer'",
|
|
38425
|
+
answer: "'agent' | 'direct'",
|
|
38426
|
+
/** The web agent's address, without the `?text=` the button adds. */
|
|
38427
|
+
agentUrl: "string > 0"
|
|
38428
|
+
})
|
|
38429
|
+
);
|
|
38411
38430
|
}
|
|
38412
38431
|
});
|
|
38413
38432
|
|
|
@@ -134412,12 +134431,13 @@ ${JSON.stringify(example, null, 2)}
|
|
|
134412
134431
|
\`\`\``;
|
|
134413
134432
|
}
|
|
134414
134433
|
async function schemaSystemMessageText(schema5, onDegrade) {
|
|
134415
|
-
|
|
134416
|
-
|
|
134417
|
-
|
|
134434
|
+
const rMessage = await exception2Result(() => buildSchemaSystemMessage(schema5));
|
|
134435
|
+
if (rMessage.isErr()) {
|
|
134436
|
+
const err = rMessage.Err();
|
|
134418
134437
|
onDegrade?.(err instanceof Error ? err : new Error(String(err)));
|
|
134419
134438
|
return bareSchemaInstruction(schema5);
|
|
134420
134439
|
}
|
|
134440
|
+
return rMessage.Ok();
|
|
134421
134441
|
}
|
|
134422
134442
|
var init_build_schema_prompt = __esm({
|
|
134423
134443
|
"../../home/runner/work/vibes.diy/vibes.diy/prompts/pkg/build-schema-prompt.ts"() {
|
|
@@ -134425,6 +134445,7 @@ var init_build_schema_prompt = __esm({
|
|
|
134425
134445
|
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process();
|
|
134426
134446
|
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console();
|
|
134427
134447
|
init_performance2();
|
|
134448
|
+
init_esm();
|
|
134428
134449
|
init_dist2();
|
|
134429
134450
|
__name(buildExample, "buildExample");
|
|
134430
134451
|
__name(bareSchemaInstruction, "bareSchemaInstruction");
|
|
@@ -137356,7 +137377,7 @@ var init_agent_session_instruction = __esm({
|
|
|
137356
137377
|
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console();
|
|
137357
137378
|
init_performance2();
|
|
137358
137379
|
init_types4();
|
|
137359
|
-
AGENT_SESSION_INSTRUCTION_VERSION = "2026-11-
|
|
137380
|
+
AGENT_SESSION_INSTRUCTION_VERSION = "2026-11-24.2";
|
|
137360
137381
|
BROWSER_APP_ASK_LINE = 'When the ask names a desktop program, a phone app or software to install (an iPhone, iPad or Android app, or a mobile app, is a phone app), the app is made as one that opens from its own link, and those words say so in a clause: "Making your <app> as an app that opens in your browser", or for a phone app "Making your <app> as an app that opens on your phone from its own link".';
|
|
137361
137382
|
FIRST_BUILD_SAYS_WHAT_IS_MADE = `On a first build, the words before create_vibe say what will be made in the person's terms, and a control they mention is one the brief asks for. ${BROWSER_APP_ASK_LINE}`;
|
|
137362
137383
|
REPLY_FOLD = `A reply that runs past about three short sentences, as one often does after tool calls or a build, opens with a summary of one or two plain sentences that stands on its own: what happened, and the one link or question that matters most. Then comes a line holding only ${AGENT_FOLD_MARKER}, then the full reply, shaped by every rule here. The summary is what a phone receives as a text message, and the web page shows the full reply under a More button, so the summary carries that link or question itself. A reply of three short sentences or fewer is its own summary and goes out whole, just as it is. Words written before a tool call go out as their own text the moment the call starts, so keep them to one short sentence of what you are about to do; the result comes in the reply after.`;
|
|
@@ -140609,37 +140630,45 @@ function resolveQueryPage(req) {
|
|
|
140609
140630
|
async function loadHeadDocsPage(vctx, part, page) {
|
|
140610
140631
|
const t3 = vctx.sql.tables.appDocuments;
|
|
140611
140632
|
const afterArm = typeof page.after === "string" ? [gt(t3.docId, page.after)] : [];
|
|
140612
|
-
const
|
|
140613
|
-
|
|
140614
|
-
eq(t3.appSlug, part.appSlug),
|
|
140615
|
-
eq(t3.dbName, part.dbName),
|
|
140616
|
-
...afterArm
|
|
140617
|
-
];
|
|
140618
|
-
const rowConds = [
|
|
140619
|
-
eq(t3.ownerHandle, part.ownerHandle),
|
|
140620
|
-
eq(t3.appSlug, part.appSlug),
|
|
140621
|
-
eq(t3.dbName, part.dbName),
|
|
140622
|
-
eq(t3.deleted, 0),
|
|
140623
|
-
...afterArm
|
|
140624
|
-
];
|
|
140625
|
-
const heads = vctx.sql.db.select({ docId: t3.docId, headSeq: max(t3.seq).as("headSeq") }).from(t3).where(and(...headConds)).groupBy(t3.docId).as("heads");
|
|
140626
|
-
return vctx.sql.db.select({ docId: t3.docId, seq: t3.seq, data: t3.data }).from(t3).innerJoin(heads, and(eq(t3.docId, heads.docId), eq(t3.seq, heads.headSeq))).where(and(...rowConds)).orderBy(t3.docId).limit(page.limit);
|
|
140633
|
+
const x3 = liveHeadRows(vctx, part, afterArm);
|
|
140634
|
+
return vctx.sql.db.select().from(x3).where(isNotNull(x3.data)).orderBy(x3.docId).limit(page.limit);
|
|
140627
140635
|
}
|
|
140628
140636
|
async function loadLiveHeadDocIds(vctx, part) {
|
|
140629
140637
|
const t3 = vctx.sql.tables.appDocuments;
|
|
140630
|
-
const heads = vctx
|
|
140631
|
-
const
|
|
140638
|
+
const heads = headSeqs(vctx, part, []);
|
|
140639
|
+
const headDeleted = headRowLookup(vctx, part, heads, t3.deleted, []);
|
|
140640
|
+
const x3 = vctx.sql.db.select({ docId: heads.docId, deleted: headDeleted.mapWith(t3.deleted).as("deleted") }).from(heads).orderBy(heads.docId).limit(HEAD_LOOKUP_FENCE).as("x");
|
|
140641
|
+
const rows = await vctx.sql.db.select({ docId: x3.docId }).from(x3).where(eq(x3.deleted, 0)).orderBy(x3.docId);
|
|
140632
140642
|
return rows.map((r2) => r2.docId);
|
|
140633
140643
|
}
|
|
140634
140644
|
async function loadHeadDocsChunk(vctx, part, docIds) {
|
|
140635
140645
|
const t3 = vctx.sql.tables.appDocuments;
|
|
140636
|
-
const restrict = docIds === void 0 ?
|
|
140637
|
-
const
|
|
140638
|
-
return vctx.sql.db.select(
|
|
140639
|
-
|
|
140640
|
-
|
|
140646
|
+
const restrict = docIds === void 0 ? [] : [inArray(t3.docId, [...docIds])];
|
|
140647
|
+
const x3 = liveHeadRows(vctx, part, restrict);
|
|
140648
|
+
return vctx.sql.db.select().from(x3).where(isNotNull(x3.data)).orderBy(x3.docId);
|
|
140649
|
+
}
|
|
140650
|
+
function partitionConds(vctx, part) {
|
|
140651
|
+
const t3 = vctx.sql.tables.appDocuments;
|
|
140652
|
+
return [eq(t3.ownerHandle, part.ownerHandle), eq(t3.appSlug, part.appSlug), eq(t3.dbName, part.dbName)];
|
|
140641
140653
|
}
|
|
140642
|
-
|
|
140654
|
+
function headSeqs(vctx, part, extra) {
|
|
140655
|
+
const t3 = vctx.sql.tables.appDocuments;
|
|
140656
|
+
const headSeq = sql`max(${t3.seq})`.mapWith(t3.seq);
|
|
140657
|
+
return vctx.sql.db.select({ docId: t3.docId, headSeq: headSeq.as("headSeq") }).from(t3).where(and(...partitionConds(vctx, part), ...extra)).groupBy(t3.docId).as(HEADS_ALIAS);
|
|
140658
|
+
}
|
|
140659
|
+
function headRowLookup(vctx, part, heads, column, extra) {
|
|
140660
|
+
const t3 = vctx.sql.tables.appDocuments;
|
|
140661
|
+
const headSeq = sql`${sql.identifier(HEADS_ALIAS)}.${sql.identifier("headSeq")}`;
|
|
140662
|
+
const lookup = vctx.sql.db.select({ value: sql`${column}` }).from(t3).where(and(...partitionConds(vctx, part), eq(t3.docId, heads.docId), eq(t3.seq, headSeq), ...extra));
|
|
140663
|
+
return sql`(${lookup})`;
|
|
140664
|
+
}
|
|
140665
|
+
function liveHeadRows(vctx, part, extra) {
|
|
140666
|
+
const t3 = vctx.sql.tables.appDocuments;
|
|
140667
|
+
const heads = headSeqs(vctx, part, extra);
|
|
140668
|
+
const data2 = headRowLookup(vctx, part, heads, t3.data, [eq(t3.deleted, 0)]);
|
|
140669
|
+
return vctx.sql.db.select({ docId: heads.docId, seq: heads.headSeq, data: data2.mapWith(t3.data).as("data") }).from(heads).orderBy(heads.docId).limit(HEAD_LOOKUP_FENCE).as("x");
|
|
140670
|
+
}
|
|
140671
|
+
var HEAD_DOC_IN_CHUNK, headDocsPostFetchHookForTests, QUERY_DOCS_MAX_PAGE, HEADS_ALIAS, HEAD_LOOKUP_FENCE;
|
|
140643
140672
|
var init_app_documents_head_query = __esm({
|
|
140644
140673
|
"../../home/runner/work/vibes.diy/vibes.diy/vibes.diy/api/svc/public/app-documents-head-query.ts"() {
|
|
140645
140674
|
"use strict";
|
|
@@ -140656,6 +140685,12 @@ var init_app_documents_head_query = __esm({
|
|
|
140656
140685
|
__name(loadHeadDocsPage, "loadHeadDocsPage");
|
|
140657
140686
|
__name(loadLiveHeadDocIds, "loadLiveHeadDocIds");
|
|
140658
140687
|
__name(loadHeadDocsChunk, "loadHeadDocsChunk");
|
|
140688
|
+
HEADS_ALIAS = "heads";
|
|
140689
|
+
__name(partitionConds, "partitionConds");
|
|
140690
|
+
__name(headSeqs, "headSeqs");
|
|
140691
|
+
__name(headRowLookup, "headRowLookup");
|
|
140692
|
+
__name(liveHeadRows, "liveHeadRows");
|
|
140693
|
+
HEAD_LOOKUP_FENCE = Number.MAX_SAFE_INTEGER;
|
|
140659
140694
|
}
|
|
140660
140695
|
});
|
|
140661
140696
|
|
|
@@ -149729,6 +149764,7 @@ var init_error_handling = __esm({
|
|
|
149729
149764
|
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process();
|
|
149730
149765
|
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console();
|
|
149731
149766
|
init_performance2();
|
|
149767
|
+
init_esm();
|
|
149732
149768
|
init_key_management();
|
|
149733
149769
|
init_types9();
|
|
149734
149770
|
}
|
|
@@ -149816,6 +149852,7 @@ var init_streaming = __esm({
|
|
|
149816
149852
|
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process();
|
|
149817
149853
|
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console();
|
|
149818
149854
|
init_performance2();
|
|
149855
|
+
init_esm();
|
|
149819
149856
|
init_types9();
|
|
149820
149857
|
init_key_management();
|
|
149821
149858
|
init_response_metadata();
|
|
@@ -149832,6 +149869,7 @@ var init_api2 = __esm({
|
|
|
149832
149869
|
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console();
|
|
149833
149870
|
init_performance2();
|
|
149834
149871
|
init_types9();
|
|
149872
|
+
init_esm();
|
|
149835
149873
|
init_strategies();
|
|
149836
149874
|
init_response_metadata();
|
|
149837
149875
|
init_key_management();
|
|
@@ -168586,6 +168624,8 @@ async function getTextNumber(vctx, opts = {}) {
|
|
|
168586
168624
|
return phoneNumber === void 0 ? unavailable() : { type: "vibes.diy.res-get-text-number", phoneNumber };
|
|
168587
168625
|
}
|
|
168588
168626
|
__name(getTextNumber, "getTextNumber");
|
|
168627
|
+
var TEXT_LINE_FULL_NEW_CHATS_24H = Math.ceil(NEW_CHATS_24H_HOLD * 95 / 100);
|
|
168628
|
+
var TEXT_LINE_FULL_CYCLE_ACTIVE = Math.ceil(LINE_CYCLE_CAP * 95 / 100);
|
|
168589
168629
|
async function pickOnboardingLine(vctx, cfg, now2) {
|
|
168590
168630
|
const linq = cfg.linq;
|
|
168591
168631
|
if (linq === void 0) return void 0;
|
|
@@ -169420,11 +169460,8 @@ var DeviceIdVerifyMsg = class {
|
|
|
169420
169460
|
}
|
|
169421
169461
|
findTrustedCA(cert, trustedCAs) {
|
|
169422
169462
|
return trustedCAs.find((trustedCA) => {
|
|
169423
|
-
|
|
169424
|
-
|
|
169425
|
-
} catch {
|
|
169426
|
-
return false;
|
|
169427
|
-
}
|
|
169463
|
+
const r2 = exception2Result(() => cert.iss === trustedCA.sub);
|
|
169464
|
+
return r2.isOk() ? r2.Ok() : false;
|
|
169428
169465
|
});
|
|
169429
169466
|
}
|
|
169430
169467
|
// #2671: verify the embedded device cert was genuinely issued by the trusted CA,
|