vibeview 0.45.0 → 0.47.0
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/dist/{chunk-GDTLLJFL.js → chunk-3LXR2YCS.js} +5 -0
- package/dist/{chunk-YF4L2WO2.js → chunk-GA56B7WS.js} +128 -22
- package/dist/cli.js +179 -135
- package/dist/{server-LC2EYAPO.js → server-PSPIUL6A.js} +61 -6
- package/dist/{upload-app-ZEQMGZIT.js → upload-app-TDR6PIWD.js} +1 -1
- package/package.json +1 -1
- package/skills/vibeview-agent/SKILL.md +14 -0
|
@@ -331,6 +331,11 @@ var ApiClient = class {
|
|
|
331
331
|
async listApps() {
|
|
332
332
|
return this.requestRaw("GET", "/apps/");
|
|
333
333
|
}
|
|
334
|
+
/** POST /api/v1/agent-reports — a bug, friction or idea about VibeView
|
|
335
|
+
* itself. The server attaches the session's context. */
|
|
336
|
+
async sendFeedback(body) {
|
|
337
|
+
return this.requestRaw("POST", "/agent-reports", body);
|
|
338
|
+
}
|
|
334
339
|
/** GET /api/v1/apps/{appPublicId} — the app with its uploaded builds,
|
|
335
340
|
* newest first. */
|
|
336
341
|
async getApp(appId) {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveArtifact,
|
|
14
14
|
resolveAuth,
|
|
15
15
|
uploadAppBuild
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3LXR2YCS.js";
|
|
17
17
|
|
|
18
18
|
// src/lib/formatters/not-checked.ts
|
|
19
19
|
function notCheckedSteps(steps) {
|
|
@@ -617,6 +617,19 @@ function clearDevStateIfOwned(cwd, pid) {
|
|
|
617
617
|
if (found && found.state.pid === pid) clearDevState(cwd);
|
|
618
618
|
}
|
|
619
619
|
|
|
620
|
+
// src/lib/feedback.ts
|
|
621
|
+
var FEEDBACK_KINDS = ["bug", "friction", "idea"];
|
|
622
|
+
function isFeedbackKind(value) {
|
|
623
|
+
return typeof value === "string" && FEEDBACK_KINDS.includes(value);
|
|
624
|
+
}
|
|
625
|
+
var FEEDBACK_RULES = "Only for problems with VibeView itself (the CLI, MCP tools, devices, sessions, runs, dashboard, docs) \u2014 never for bugs in the user's own app. Show the user what you will send and get their OK first. Never include passwords, tokens, API keys, test data values or personal data. One report per problem; do not resend it. kind: bug (something broke), friction (it worked but was confusing, slow or awkward), idea (a missing capability). user_quote: the user's own words, verbatim \u2014 never a paraphrase.";
|
|
626
|
+
function feedbackSentLine(result) {
|
|
627
|
+
if (result.duplicate) {
|
|
628
|
+
return `This was already sent (report ${result.id}); no need to send it again.`;
|
|
629
|
+
}
|
|
630
|
+
return `Sent (report ${result.id}). The VibeView team reads every report; you'll get a notification if we reply.`;
|
|
631
|
+
}
|
|
632
|
+
|
|
620
633
|
// src/lib/dev-use.ts
|
|
621
634
|
import {
|
|
622
635
|
existsSync as existsSync2,
|
|
@@ -796,6 +809,90 @@ function describeLocalChanges(before, after) {
|
|
|
796
809
|
|
|
797
810
|
// src/commands/build.ts
|
|
798
811
|
import { spawn as spawn2 } from "child_process";
|
|
812
|
+
|
|
813
|
+
// src/lib/build-source.ts
|
|
814
|
+
import { execFile } from "child_process";
|
|
815
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
816
|
+
import { promisify } from "util";
|
|
817
|
+
var COMMIT_RE = /^[0-9a-f]{7,64}$/;
|
|
818
|
+
function clean(source) {
|
|
819
|
+
const out = {};
|
|
820
|
+
const commit = source.commit?.trim().toLowerCase();
|
|
821
|
+
if (commit && COMMIT_RE.test(commit)) out.commit = commit;
|
|
822
|
+
const branch = source.branch?.trim().replace(/^refs\/heads\//, "");
|
|
823
|
+
if (branch && branch.length <= 255 && !/[\u0000-\u001f\u007f]/.test(branch)) {
|
|
824
|
+
out.branch = branch;
|
|
825
|
+
}
|
|
826
|
+
const url = source.ci_run_url?.trim();
|
|
827
|
+
if (url && url.length <= 2048 && url.startsWith("https://") && !/\s/.test(url)) {
|
|
828
|
+
out.ci_run_url = url;
|
|
829
|
+
}
|
|
830
|
+
return Object.keys(out).length ? out : void 0;
|
|
831
|
+
}
|
|
832
|
+
function pullRequestHeadSha(eventPath) {
|
|
833
|
+
if (!eventPath) return void 0;
|
|
834
|
+
try {
|
|
835
|
+
const event = JSON.parse(readFileSync5(eventPath, "utf8"));
|
|
836
|
+
const sha = event.pull_request?.head?.sha;
|
|
837
|
+
return typeof sha === "string" ? sha : void 0;
|
|
838
|
+
} catch {
|
|
839
|
+
return void 0;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
function ciBuildSource(env = process.env) {
|
|
843
|
+
if (env.GITHUB_ACTIONS === "true") {
|
|
844
|
+
const run = env.GITHUB_SERVER_URL && env.GITHUB_REPOSITORY && env.GITHUB_RUN_ID ? `${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}` : void 0;
|
|
845
|
+
return clean({
|
|
846
|
+
commit: env.GITHUB_HEAD_REF && pullRequestHeadSha(env.GITHUB_EVENT_PATH) || env.GITHUB_SHA,
|
|
847
|
+
branch: env.GITHUB_HEAD_REF || env.GITHUB_REF_NAME,
|
|
848
|
+
ci_run_url: run
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
if (env.GITLAB_CI === "true") {
|
|
852
|
+
return clean({
|
|
853
|
+
commit: env.CI_COMMIT_SHA,
|
|
854
|
+
branch: env.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME || env.CI_COMMIT_REF_NAME,
|
|
855
|
+
ci_run_url: env.CI_JOB_URL || env.CI_PIPELINE_URL
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
if (env.BITRISE_IO === "true") {
|
|
859
|
+
return clean({
|
|
860
|
+
commit: env.BITRISE_GIT_COMMIT || env.GIT_CLONE_COMMIT_HASH,
|
|
861
|
+
branch: env.BITRISE_GIT_BRANCH,
|
|
862
|
+
ci_run_url: env.BITRISE_BUILD_URL
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
if (env.CIRCLECI === "true") {
|
|
866
|
+
return clean({
|
|
867
|
+
commit: env.CIRCLE_SHA1,
|
|
868
|
+
branch: env.CIRCLE_BRANCH,
|
|
869
|
+
ci_run_url: env.CIRCLE_BUILD_URL
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
return void 0;
|
|
873
|
+
}
|
|
874
|
+
async function git(cwd, args) {
|
|
875
|
+
try {
|
|
876
|
+
const { stdout } = await promisify(execFile)("git", args, { cwd, timeout: 5e3 });
|
|
877
|
+
return stdout.trim();
|
|
878
|
+
} catch {
|
|
879
|
+
return void 0;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
async function buildSource(cwd, env = process.env) {
|
|
883
|
+
const ci = ciBuildSource(env);
|
|
884
|
+
if (ci) return ci;
|
|
885
|
+
const commit = await git(cwd, ["rev-parse", "HEAD"]);
|
|
886
|
+
if (!commit) return void 0;
|
|
887
|
+
const branch = await git(cwd, ["rev-parse", "--abbrev-ref", "HEAD"]);
|
|
888
|
+
const dirty = await git(cwd, ["status", "--porcelain"]);
|
|
889
|
+
return clean({
|
|
890
|
+
commit: dirty === "" ? commit : void 0,
|
|
891
|
+
branch: branch && branch !== "HEAD" ? branch : void 0
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
// src/commands/build.ts
|
|
799
896
|
import { createInterface } from "readline";
|
|
800
897
|
import { select as select2 } from "@inquirer/prompts";
|
|
801
898
|
import chalk3 from "chalk";
|
|
@@ -805,13 +902,13 @@ import chalk2 from "chalk";
|
|
|
805
902
|
import { input, select } from "@inquirer/prompts";
|
|
806
903
|
|
|
807
904
|
// src/lib/project-detect.ts
|
|
808
|
-
import { execFile } from "child_process";
|
|
809
|
-
import { existsSync as existsSync3, readFileSync as
|
|
905
|
+
import { execFile as execFile2 } from "child_process";
|
|
906
|
+
import { existsSync as existsSync3, readFileSync as readFileSync6, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
|
|
810
907
|
import { join as join5 } from "path";
|
|
811
908
|
import ignore from "ignore";
|
|
812
909
|
function readJson(cwd, name) {
|
|
813
910
|
try {
|
|
814
|
-
return JSON.parse(
|
|
911
|
+
return JSON.parse(readFileSync6(join5(cwd, name), "utf-8"));
|
|
815
912
|
} catch {
|
|
816
913
|
return null;
|
|
817
914
|
}
|
|
@@ -826,7 +923,7 @@ function isFile(path) {
|
|
|
826
923
|
function detectFlavor(cwd) {
|
|
827
924
|
let deps = {};
|
|
828
925
|
try {
|
|
829
|
-
const pkg = JSON.parse(
|
|
926
|
+
const pkg = JSON.parse(readFileSync6(join5(cwd, "package.json"), "utf-8"));
|
|
830
927
|
deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
831
928
|
} catch {
|
|
832
929
|
}
|
|
@@ -851,7 +948,7 @@ var CAPACITOR_CONFIGS = ["capacitor.config.ts", "capacitor.config.js", "capacito
|
|
|
851
948
|
function nativeDirShipped(cwd, dir) {
|
|
852
949
|
if (!existsSync3(join5(cwd, dir))) return false;
|
|
853
950
|
try {
|
|
854
|
-
const ig = ignore().add(
|
|
951
|
+
const ig = ignore().add(readFileSync6(join5(cwd, ".gitignore"), "utf-8"));
|
|
855
952
|
return !ig.ignores(`${dir}/`);
|
|
856
953
|
} catch {
|
|
857
954
|
return true;
|
|
@@ -890,7 +987,7 @@ function dirShipped(cwd, rel) {
|
|
|
890
987
|
if (slash !== -1) checks.push([rel.slice(0, slash), rel.slice(slash + 1)]);
|
|
891
988
|
return checks.every(([dir, path]) => {
|
|
892
989
|
try {
|
|
893
|
-
return !ignore().add(
|
|
990
|
+
return !ignore().add(readFileSync6(join5(cwd, dir, ".gitignore"), "utf-8")).ignores(`${path}/`);
|
|
894
991
|
} catch {
|
|
895
992
|
return true;
|
|
896
993
|
}
|
|
@@ -986,7 +1083,7 @@ var FVM_CONFIGS = [".fvmrc", ".fvm/fvm_config.json"];
|
|
|
986
1083
|
function flutterCommand(cwd) {
|
|
987
1084
|
let ig = null;
|
|
988
1085
|
try {
|
|
989
|
-
ig = ignore().add(
|
|
1086
|
+
ig = ignore().add(readFileSync6(join5(cwd, ".gitignore"), "utf-8"));
|
|
990
1087
|
} catch {
|
|
991
1088
|
}
|
|
992
1089
|
const pinned = FVM_CONFIGS.some((f) => isFile(join5(cwd, f)) && !ig?.ignores(f));
|
|
@@ -1228,7 +1325,7 @@ function uniqueMatch(text, re) {
|
|
|
1228
1325
|
}
|
|
1229
1326
|
function readText(path) {
|
|
1230
1327
|
try {
|
|
1231
|
-
return
|
|
1328
|
+
return readFileSync6(path, "utf-8");
|
|
1232
1329
|
} catch {
|
|
1233
1330
|
return null;
|
|
1234
1331
|
}
|
|
@@ -1270,7 +1367,7 @@ var readExpoConfig = (cwd, timeoutMs = EXPO_CONFIG_TIMEOUT_MS) => {
|
|
|
1270
1367
|
clearTimeout(timer);
|
|
1271
1368
|
fn();
|
|
1272
1369
|
};
|
|
1273
|
-
const child =
|
|
1370
|
+
const child = execFile2(
|
|
1274
1371
|
process.execPath,
|
|
1275
1372
|
[cli, "config", "--json", "--type", "public"],
|
|
1276
1373
|
{
|
|
@@ -1516,8 +1613,8 @@ async function promptMetroCommand(cwd, platform) {
|
|
|
1516
1613
|
}
|
|
1517
1614
|
|
|
1518
1615
|
// src/lib/source-pack.ts
|
|
1519
|
-
import { execFile as
|
|
1520
|
-
import { lstatSync, mkdtempSync, readFileSync as
|
|
1616
|
+
import { execFile as execFile3, spawn } from "child_process";
|
|
1617
|
+
import { lstatSync, mkdtempSync, readFileSync as readFileSync7, rmSync as rmSync5, statSync as statSync3, writeFileSync as writeFileSync5 } from "fs";
|
|
1521
1618
|
import { tmpdir } from "os";
|
|
1522
1619
|
import { join as join6 } from "path";
|
|
1523
1620
|
import ignore2 from "ignore";
|
|
@@ -1547,7 +1644,7 @@ async function listSourceFiles(projectRoot) {
|
|
|
1547
1644
|
let filtered = rawPaths;
|
|
1548
1645
|
const vvignorePath = join6(projectRoot, ".vvignore");
|
|
1549
1646
|
if (statOrNull(vvignorePath)?.isFile()) {
|
|
1550
|
-
const ig = ignore2().add(
|
|
1647
|
+
const ig = ignore2().add(readFileSync7(vvignorePath, "utf-8"));
|
|
1551
1648
|
filtered = filtered.filter((p) => !ig.ignores(p));
|
|
1552
1649
|
}
|
|
1553
1650
|
const result = [];
|
|
@@ -1655,7 +1752,7 @@ function probeTarNullSupport() {
|
|
|
1655
1752
|
const listPath = join6(tmp, "empty.list");
|
|
1656
1753
|
writeFileSync5(listPath, "");
|
|
1657
1754
|
const out = join6(tmp, "probe.tgz");
|
|
1658
|
-
|
|
1755
|
+
execFile3("tar", ["-czf", out, "-C", tmp, "--null", "-T", listPath], (err) => {
|
|
1659
1756
|
rmSync5(tmp, { recursive: true, force: true });
|
|
1660
1757
|
resolve(!err);
|
|
1661
1758
|
});
|
|
@@ -1686,7 +1783,7 @@ function runTar(args) {
|
|
|
1686
1783
|
}
|
|
1687
1784
|
|
|
1688
1785
|
// src/lib/build-preflight.ts
|
|
1689
|
-
import { execFile as
|
|
1786
|
+
import { execFile as execFile4 } from "child_process";
|
|
1690
1787
|
import { realpathSync, statSync as statSync4 } from "fs";
|
|
1691
1788
|
import { dirname as dirname2, isAbsolute, join as join7, relative } from "path";
|
|
1692
1789
|
import { parse } from "shell-quote";
|
|
@@ -1876,7 +1973,7 @@ function isFile2(path) {
|
|
|
1876
1973
|
}
|
|
1877
1974
|
async function gitToplevel(cwd) {
|
|
1878
1975
|
return new Promise((resolve) => {
|
|
1879
|
-
|
|
1976
|
+
execFile4("git", ["rev-parse", "--show-toplevel"], { cwd }, (err, stdout) => {
|
|
1880
1977
|
resolve(err ? null : stdout.trim() || null);
|
|
1881
1978
|
});
|
|
1882
1979
|
});
|
|
@@ -2291,6 +2388,7 @@ function defaultCloudBuildDeps(client) {
|
|
|
2291
2388
|
packSource,
|
|
2292
2389
|
listApps: client.listApps.bind(client),
|
|
2293
2390
|
createCloudBuilds: client.createCloudBuilds.bind(client),
|
|
2391
|
+
buildSource,
|
|
2294
2392
|
getCloudBuildLogs: client.getCloudBuildLogs.bind(client),
|
|
2295
2393
|
getCloudBuild: client.getCloudBuild.bind(client),
|
|
2296
2394
|
downloadCloudBuildArtifact: client.downloadCloudBuildArtifact.bind(client)
|
|
@@ -2420,7 +2518,11 @@ ${offenders}`);
|
|
|
2420
2518
|
uploadSpinner?.start();
|
|
2421
2519
|
let created;
|
|
2422
2520
|
try {
|
|
2423
|
-
const
|
|
2521
|
+
const source = d.buildSource ? await d.buildSource(cwd) : void 0;
|
|
2522
|
+
const resp = await d.createCloudBuilds(
|
|
2523
|
+
source ? { builds: manifestEntries, source } : { builds: manifestEntries },
|
|
2524
|
+
tarPath
|
|
2525
|
+
);
|
|
2424
2526
|
created = resp.builds;
|
|
2425
2527
|
} catch (err) {
|
|
2426
2528
|
uploadSpinner?.stop();
|
|
@@ -2744,7 +2846,7 @@ your build command must produce a zip \u2014 use the package/zip step, not deplo
|
|
|
2744
2846
|
|
|
2745
2847
|
// src/commands/dev.ts
|
|
2746
2848
|
import { spawn as spawn4 } from "child_process";
|
|
2747
|
-
import { closeSync, createWriteStream, mkdirSync as mkdirSync5, openSync, readFileSync as
|
|
2849
|
+
import { closeSync, createWriteStream, mkdirSync as mkdirSync5, openSync, readFileSync as readFileSync9 } from "fs";
|
|
2748
2850
|
import { dirname as dirname5, join as join9 } from "path";
|
|
2749
2851
|
import { createInterface as createInterface3 } from "readline";
|
|
2750
2852
|
import { stripVTControlCharacters } from "util";
|
|
@@ -2948,7 +3050,7 @@ import { spawn as spawn3 } from "child_process";
|
|
|
2948
3050
|
import { createInterface as createInterface2 } from "readline";
|
|
2949
3051
|
|
|
2950
3052
|
// src/lib/metro-state.ts
|
|
2951
|
-
import { existsSync as existsSync4, mkdirSync as mkdirSync4, readFileSync as
|
|
3053
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync4, readFileSync as readFileSync8, rmSync as rmSync6, writeFileSync as writeFileSync6 } from "fs";
|
|
2952
3054
|
import { dirname as dirname3, join as join8 } from "path";
|
|
2953
3055
|
var STATE_DIR2 = ".vibeview";
|
|
2954
3056
|
var STATE_FILE2 = "metro-state.json";
|
|
@@ -2974,7 +3076,7 @@ function writeMetroState(cwd, state) {
|
|
|
2974
3076
|
function readMetroState(cwd) {
|
|
2975
3077
|
let parsed;
|
|
2976
3078
|
try {
|
|
2977
|
-
parsed = JSON.parse(
|
|
3079
|
+
parsed = JSON.parse(readFileSync8(statePath2(cwd), "utf-8"));
|
|
2978
3080
|
} catch {
|
|
2979
3081
|
return null;
|
|
2980
3082
|
}
|
|
@@ -4483,7 +4585,7 @@ function openDetachLog(path) {
|
|
|
4483
4585
|
function lastErrorLine(path) {
|
|
4484
4586
|
let text;
|
|
4485
4587
|
try {
|
|
4486
|
-
text =
|
|
4588
|
+
text = readFileSync9(path, "utf-8");
|
|
4487
4589
|
} catch {
|
|
4488
4590
|
return null;
|
|
4489
4591
|
}
|
|
@@ -4844,7 +4946,7 @@ var AGENT_COMMANDS = [
|
|
|
4844
4946
|
cli: "positional",
|
|
4845
4947
|
type: "string",
|
|
4846
4948
|
required: true,
|
|
4847
|
-
description: "'get' returns the alert message and button labels; 'accept' taps a button (first by default); 'dismiss' taps a button (
|
|
4949
|
+
description: "'get' returns the alert message and button labels; 'accept' taps a button (first by default); 'dismiss' taps a button (by default a Cancel, Don't Allow or Not Now style button, else the last)."
|
|
4848
4950
|
},
|
|
4849
4951
|
{
|
|
4850
4952
|
name: "button",
|
|
@@ -5514,6 +5616,10 @@ export {
|
|
|
5514
5616
|
clearDevState,
|
|
5515
5617
|
readMetroState,
|
|
5516
5618
|
killOwnedMetro,
|
|
5619
|
+
FEEDBACK_KINDS,
|
|
5620
|
+
isFeedbackKind,
|
|
5621
|
+
FEEDBACK_RULES,
|
|
5622
|
+
feedbackSentLine,
|
|
5517
5623
|
recordDevUse,
|
|
5518
5624
|
checkMetro,
|
|
5519
5625
|
loadLocalDevConfig,
|