vibes-diy 14.3.455 → 14.3.457
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/cmds/run/run-bundle.js +81 -18
- package/package.json +8 -8
|
@@ -25434,7 +25434,6 @@ function poufRoomOfSeed(seed) {
|
|
|
25434
25434
|
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;
|
|
25435
25435
|
var init_style_presets = __esm({
|
|
25436
25436
|
"../prompts/pkg/themes/style-presets.ts"() {
|
|
25437
|
-
"use strict";
|
|
25438
25437
|
init_pouf_rooms();
|
|
25439
25438
|
STYLE_PRESETS = [
|
|
25440
25439
|
{
|
|
@@ -26601,7 +26600,6 @@ function lookColorwaySeed(slug, colorway) {
|
|
|
26601
26600
|
var LOOK_SLUGS_WITH_BRIEF, LOOK_SLUGS_WITH_OWN_TOKENS, LOOK_SLUGS_SERVING_LOOK_PACKAGES, SERVED_LOOK_VOICE, LOOK_VARIETY_DIALECTS, LOOK_COLORWAYS, LOOK_DRAW_POOLS, ROOM_SHORTLIST_MAX, LOOK_FIELD_HUES, LOOK_INHERITED_COLORWAYS, LOOK_WHOLE_PALETTE_COLORWAYS;
|
|
26602
26601
|
var init_looks = __esm({
|
|
26603
26602
|
"../prompts/pkg/themes/looks/index.ts"() {
|
|
26604
|
-
"use strict";
|
|
26605
26603
|
init_generation_variety();
|
|
26606
26604
|
init_style_presets();
|
|
26607
26605
|
init_field_hues();
|
|
@@ -114999,7 +114997,7 @@ import { exception2Result as exception2Result260 } from "@adviser/cement";
|
|
|
114999
114997
|
init_exports();
|
|
115000
114998
|
init_types3();
|
|
115001
114999
|
init_grouped_vibe_import_map();
|
|
115002
|
-
import { exception2Result as exception2Result259 } from "@adviser/cement";
|
|
115000
|
+
import { exception2Result as exception2Result259, KeyedResolvOnce as KeyedResolvOnce9 } from "@adviser/cement";
|
|
115003
115001
|
import { Parser as Parser2 } from "acorn";
|
|
115004
115002
|
import acornJsx from "acorn-jsx";
|
|
115005
115003
|
import { transform as transform6 } from "sucrase";
|
|
@@ -117848,7 +117846,35 @@ function seedFindings(vfs) {
|
|
|
117848
117846
|
);
|
|
117849
117847
|
}
|
|
117850
117848
|
__name(seedFindings, "seedFindings");
|
|
117849
|
+
var opensVerdictOnce = new KeyedResolvOnce9({ lru: { maxEntries: 4 } });
|
|
117850
|
+
function filesDigest(vfs) {
|
|
117851
|
+
let h = 2166136261;
|
|
117852
|
+
let chars = 0;
|
|
117853
|
+
const mix = /* @__PURE__ */ __name((text3) => {
|
|
117854
|
+
for (let i = 0; i < text3.length; i++) h = Math.imul(h ^ text3.charCodeAt(i), 16777619);
|
|
117855
|
+
h = Math.imul(h ^ 255, 16777619);
|
|
117856
|
+
chars += text3.length;
|
|
117857
|
+
}, "mix");
|
|
117858
|
+
for (const path of [...vfs.keys()].sort()) {
|
|
117859
|
+
mix(path);
|
|
117860
|
+
mix(vfs.get(path) ?? "");
|
|
117861
|
+
}
|
|
117862
|
+
return `${vfs.size}:${chars}:${(h >>> 0).toString(16)}`;
|
|
117863
|
+
}
|
|
117864
|
+
__name(filesDigest, "filesDigest");
|
|
117865
|
+
function sameFiles(a, b) {
|
|
117866
|
+
if (a.size !== b.size) return false;
|
|
117867
|
+
for (const [path, contents] of a) if (b.get(path) !== contents) return false;
|
|
117868
|
+
return true;
|
|
117869
|
+
}
|
|
117870
|
+
__name(sameFiles, "sameFiles");
|
|
117851
117871
|
function checkOpens(vfs) {
|
|
117872
|
+
const cached3 = opensVerdictOnce.get(filesDigest(vfs)).once(() => ({ vfs: new Map(vfs), verdict: checkOpensUncached(vfs) }));
|
|
117873
|
+
const verdict = sameFiles(cached3.vfs, vfs) ? cached3.verdict : checkOpensUncached(vfs);
|
|
117874
|
+
return { opens: verdict.opens, findings: [...verdict.findings] };
|
|
117875
|
+
}
|
|
117876
|
+
__name(checkOpens, "checkOpens");
|
|
117877
|
+
function checkOpensUncached(vfs) {
|
|
117852
117878
|
const entries = [...vfs.keys()].filter((path) => OPENS_ENTRY_PATH.test(path));
|
|
117853
117879
|
const queue = entries.length > 0 ? entries : [...vfs.keys()].filter(isBrowserModule);
|
|
117854
117880
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -117865,7 +117891,7 @@ function checkOpens(vfs) {
|
|
|
117865
117891
|
findings.push(...seedFindings(vfs));
|
|
117866
117892
|
return { opens: findings.every((finding) => OPENS_ADVISORY_CLASSES.has(finding.class)), findings };
|
|
117867
117893
|
}
|
|
117868
|
-
__name(
|
|
117894
|
+
__name(checkOpensUncached, "checkOpensUncached");
|
|
117869
117895
|
function collapseOpensFindings(findings) {
|
|
117870
117896
|
const counts2 = /* @__PURE__ */ new Map();
|
|
117871
117897
|
const atLoad = /* @__PURE__ */ new Set();
|
|
@@ -122817,17 +122843,36 @@ __name(replayInitiatorForTurn, "replayInitiatorForTurn");
|
|
|
122817
122843
|
// ../vibes.diy/api/svc/intern/chat-history-page.ts
|
|
122818
122844
|
init_types3();
|
|
122819
122845
|
import { and as and136, desc as desc34, eq as eq159, inArray as inArray41, isNotNull as isNotNull5, lt as lt14, ne as ne18, or as or15, sql as sql32 } from "drizzle-orm";
|
|
122846
|
+
var HISTORY_PAGE_ROW_BUDGET = 250;
|
|
122847
|
+
function fitHistoryPage(turns2, limit, rowBudget) {
|
|
122848
|
+
const page = [];
|
|
122849
|
+
let rows = 0;
|
|
122850
|
+
for (const turn of turns2) {
|
|
122851
|
+
if (page.length >= limit) break;
|
|
122852
|
+
if (page.length > 0 && rows + turn.rows > rowBudget) break;
|
|
122853
|
+
page.push(turn);
|
|
122854
|
+
rows += turn.rows;
|
|
122855
|
+
}
|
|
122856
|
+
return { page, hasMore: turns2.length > page.length };
|
|
122857
|
+
}
|
|
122858
|
+
__name(fitHistoryPage, "fitHistoryPage");
|
|
122820
122859
|
async function selectChatHistoryPage(vctx, args) {
|
|
122821
122860
|
const t = vctx.sql.tables.chatSections;
|
|
122822
122861
|
const created = sql32`min(${t.created})`;
|
|
122823
|
-
const
|
|
122862
|
+
const sectionRows = sql32`count(*)`;
|
|
122863
|
+
const rows = await vctx.sql.db.select({ promptId: t.promptId, created, rows: sectionRows }).from(t).where(and136(eq159(t.chatId, args.chatId), ne18(t.blockSeq, RESEARCH_BLOCK_SEQ))).groupBy(t.promptId).having(
|
|
122824
122864
|
args.before === void 0 ? void 0 : or15(lt14(created, args.before.created), and136(eq159(created, args.before.created), lt14(t.promptId, args.before.promptId)))
|
|
122825
122865
|
).orderBy(desc34(created), desc34(t.promptId)).limit(args.limit + 1);
|
|
122826
|
-
const page =
|
|
122827
|
-
|
|
122866
|
+
const { page, hasMore } = fitHistoryPage(
|
|
122867
|
+
rows.map((row) => ({ promptId: row.promptId, created: row.created, rows: Number(row.rows) })),
|
|
122868
|
+
args.limit,
|
|
122869
|
+
args.rowBudget ?? HISTORY_PAGE_ROW_BUDGET
|
|
122870
|
+
);
|
|
122871
|
+
const last = page.at(-1);
|
|
122872
|
+
const before = last === void 0 ? void 0 : { created: last.created, promptId: last.promptId };
|
|
122828
122873
|
return {
|
|
122829
122874
|
promptIds: page.map((row) => row.promptId),
|
|
122830
|
-
history: { hasMore
|
|
122875
|
+
history: { hasMore, ...before === void 0 ? {} : { before } }
|
|
122831
122876
|
};
|
|
122832
122877
|
}
|
|
122833
122878
|
__name(selectChatHistoryPage, "selectChatHistoryPage");
|
|
@@ -124270,7 +124315,15 @@ init_types3();
|
|
|
124270
124315
|
init_v2();
|
|
124271
124316
|
import { type as type151 } from "arktype";
|
|
124272
124317
|
import { and as and140, eq as eq164, inArray as inArray43, ne as ne19 } from "drizzle-orm/sql/expressions";
|
|
124273
|
-
|
|
124318
|
+
var KEPT_EVENT_VALIDATORS = /* @__PURE__ */ new Map([
|
|
124319
|
+
["prompt.req", (item) => PromptReq(item)],
|
|
124320
|
+
["prompt.agent-evidence", (item) => PromptAgentEvidence(item)],
|
|
124321
|
+
["block.toplevel.line", (item) => ToplevelLineMsg(item)],
|
|
124322
|
+
["block.code.begin", (item) => CodeBeginMsg(item)],
|
|
124323
|
+
["block.code.line", (item) => CodeLineMsg(item)],
|
|
124324
|
+
["block.code.end", (item) => CodeEndMsg(item)]
|
|
124325
|
+
]);
|
|
124326
|
+
function historyKeptMsgs(blocks) {
|
|
124274
124327
|
const msgs = [];
|
|
124275
124328
|
const warning = [];
|
|
124276
124329
|
if (!Array.isArray(blocks)) return { msgs, warning };
|
|
@@ -124279,16 +124332,26 @@ function historySectionMsgs(blocks) {
|
|
|
124279
124332
|
msgs.push(item);
|
|
124280
124333
|
return;
|
|
124281
124334
|
}
|
|
124282
|
-
const
|
|
124335
|
+
const t = typeof item === "object" && item !== null ? item.type : void 0;
|
|
124336
|
+
if (typeof t !== "string") {
|
|
124337
|
+
warning.push({ idx, txt: "event has no type" });
|
|
124338
|
+
return;
|
|
124339
|
+
}
|
|
124340
|
+
const validate = KEPT_EVENT_VALIDATORS.get(t);
|
|
124341
|
+
if (validate === void 0) return;
|
|
124342
|
+
if (t === "prompt.agent-evidence" && item.evidence?.kind !== "active") return;
|
|
124343
|
+
const parsed = validate(item);
|
|
124283
124344
|
if (parsed instanceof type151.errors) {
|
|
124284
|
-
|
|
124345
|
+
const full = PromptAndBlockMsgs(item);
|
|
124346
|
+
if (full instanceof type151.errors) warning.push({ idx, txt: full.summary });
|
|
124347
|
+
else msgs.push(full);
|
|
124285
124348
|
return;
|
|
124286
124349
|
}
|
|
124287
124350
|
msgs.push(parsed);
|
|
124288
124351
|
});
|
|
124289
124352
|
return { msgs, warning };
|
|
124290
124353
|
}
|
|
124291
|
-
__name(
|
|
124354
|
+
__name(historyKeptMsgs, "historyKeptMsgs");
|
|
124292
124355
|
function isCodeSummaryMsg(msg) {
|
|
124293
124356
|
return typeof msg === "object" && msg !== null && msg.type === "history.code.summary";
|
|
124294
124357
|
}
|
|
@@ -124316,7 +124379,7 @@ async function readChatHistory(vctx, chatId, opts) {
|
|
|
124316
124379
|
if (want.has(key)) byKey.set(key, row.blocks);
|
|
124317
124380
|
}
|
|
124318
124381
|
for (const k of pageKeys) {
|
|
124319
|
-
const { msgs, warning } =
|
|
124382
|
+
const { msgs, warning } = historyKeptMsgs(byKey.get(sectionKey(k)));
|
|
124320
124383
|
if (warning.length > 0) opts.onWarning?.(warning);
|
|
124321
124384
|
for (const msg of msgs) reducer.push(msg);
|
|
124322
124385
|
}
|
|
@@ -165106,7 +165169,7 @@ import { Result as Result318, BuildURI as BuildURI22, exception2Result as except
|
|
|
165106
165169
|
|
|
165107
165170
|
// ../vibes.diy/api/impl/websocket-connection.ts
|
|
165108
165171
|
init_types3();
|
|
165109
|
-
import { BuildURI as BuildURI21, exception2Result as exception2Result410, Future as Future4, KeyedResolvOnce as
|
|
165172
|
+
import { BuildURI as BuildURI21, exception2Result as exception2Result410, Future as Future4, KeyedResolvOnce as KeyedResolvOnce10, OnFunc as OnFunc2, Result as Result310, URI as URI49 } from "@adviser/cement";
|
|
165110
165173
|
|
|
165111
165174
|
// ../vibes.diy/api/impl/ws-proxy.ts
|
|
165112
165175
|
import { URI as URI48 } from "@adviser/cement";
|
|
@@ -165239,7 +165302,7 @@ function describeWsProxyDecision(decision) {
|
|
|
165239
165302
|
__name(describeWsProxyDecision, "describeWsProxyDecision");
|
|
165240
165303
|
|
|
165241
165304
|
// ../vibes.diy/api/impl/websocket-connection.ts
|
|
165242
|
-
var vibesDiyApiPerConnection = new
|
|
165305
|
+
var vibesDiyApiPerConnection = new KeyedResolvOnce10();
|
|
165243
165306
|
function runtimeWebSocketImpl() {
|
|
165244
165307
|
return {
|
|
165245
165308
|
globalWebSocket: typeof globalThis.WebSocket === "undefined" ? void 0 : globalThis.WebSocket,
|
|
@@ -168700,11 +168763,11 @@ var DeviceIdKeyBagItemSchema = z6.object({
|
|
|
168700
168763
|
}).readonly();
|
|
168701
168764
|
|
|
168702
168765
|
// ../vibes.diy/identity/keybag/keybag.ts
|
|
168703
|
-
import { URI as URI51, runtimeFn as runtimeFn3, KeyedResolvOnce as
|
|
168766
|
+
import { URI as URI51, runtimeFn as runtimeFn3, KeyedResolvOnce as KeyedResolvOnce12 } from "@adviser/cement";
|
|
168704
168767
|
|
|
168705
168768
|
// ../vibes.diy/identity/keybag/key-bag.ts
|
|
168706
168769
|
init_hashing();
|
|
168707
|
-
import { KeyedResolvOnce as
|
|
168770
|
+
import { KeyedResolvOnce as KeyedResolvOnce11, Lazy as Lazy16, Option as Option71 } from "@adviser/cement";
|
|
168708
168771
|
import { z as z7 } from "zod";
|
|
168709
168772
|
var KeyedDeviceIdKeyBagItemSchema = z7.object({
|
|
168710
168773
|
id: z7.string(),
|
|
@@ -168862,7 +168925,7 @@ var keyBagProviderFactories = new Map(
|
|
|
168862
168925
|
}
|
|
168863
168926
|
].map((i) => [i.protocol, i])
|
|
168864
168927
|
);
|
|
168865
|
-
var _keyBags = new
|
|
168928
|
+
var _keyBags = new KeyedResolvOnce12();
|
|
168866
168929
|
|
|
168867
168930
|
// ../vibes.diy/identity/keybag/instance.ts
|
|
168868
168931
|
import { URI as URI52, exception2Result as exception2Result420 } from "@adviser/cement";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibes-diy",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.457",
|
|
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.
|
|
56
|
-
"@vibes.diy/api-types": "14.3.
|
|
57
|
-
"@vibes.diy/call-ai-v2": "14.3.
|
|
58
|
-
"@vibes.diy/cmd-harness": "14.3.
|
|
59
|
-
"@vibes.diy/cmd-tools": "14.3.
|
|
60
|
-
"@vibes.diy/identity": "14.3.
|
|
61
|
-
"@vibes.diy/prompts": "14.3.
|
|
55
|
+
"@vibes.diy/api-impl": "14.3.457",
|
|
56
|
+
"@vibes.diy/api-types": "14.3.457",
|
|
57
|
+
"@vibes.diy/call-ai-v2": "14.3.457",
|
|
58
|
+
"@vibes.diy/cmd-harness": "14.3.457",
|
|
59
|
+
"@vibes.diy/cmd-tools": "14.3.457",
|
|
60
|
+
"@vibes.diy/identity": "14.3.457",
|
|
61
|
+
"@vibes.diy/prompts": "14.3.457",
|
|
62
62
|
"acorn": "~8.19.0",
|
|
63
63
|
"acorn-jsx": "~5.3.2",
|
|
64
64
|
"arktype": "~2.2.10",
|