@vibeframe/cli 0.111.3 → 0.112.1
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/commands/_shared/build-plan.d.ts +9 -0
- package/dist/commands/_shared/project-list.d.ts +39 -0
- package/dist/commands/_shared/project-list.test.d.ts +1 -0
- package/dist/index.js +300 -153
- package/dist/tools/manifest/index.js +271 -128
- package/dist/tools/manifest/project.d.ts +9 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7844,7 +7844,7 @@ function errorMessage(error) {
|
|
|
7844
7844
|
return error instanceof Error ? error.message : "Unknown error";
|
|
7845
7845
|
}
|
|
7846
7846
|
function sleep(ms) {
|
|
7847
|
-
return new Promise((
|
|
7847
|
+
return new Promise((resolve86) => setTimeout(resolve86, ms));
|
|
7848
7848
|
}
|
|
7849
7849
|
var ProviderHttpError;
|
|
7850
7850
|
var init_http = __esm({
|
|
@@ -11612,15 +11612,15 @@ async function loadKokoroFactory() {
|
|
|
11612
11612
|
}
|
|
11613
11613
|
async function loadKokoroFromWorkspace(baseDir = process.cwd()) {
|
|
11614
11614
|
try {
|
|
11615
|
-
const { readFile:
|
|
11616
|
-
const { join:
|
|
11615
|
+
const { readFile: readFile56 } = await import("node:fs/promises");
|
|
11616
|
+
const { join: join30, resolve: resolve86 } = await import("node:path");
|
|
11617
11617
|
const { pathToFileURL } = await import("node:url");
|
|
11618
|
-
const pkgDir =
|
|
11619
|
-
const pkg = JSON.parse(await
|
|
11618
|
+
const pkgDir = resolve86(baseDir, "node_modules", "kokoro-js");
|
|
11619
|
+
const pkg = JSON.parse(await readFile56(join30(pkgDir, "package.json"), "utf-8"));
|
|
11620
11620
|
const entry = pkg.exports?.node?.import ?? pkg.exports?.default ?? pkg.module ?? pkg.main;
|
|
11621
11621
|
if (!entry)
|
|
11622
11622
|
return null;
|
|
11623
|
-
const mod = await import(pathToFileURL(
|
|
11623
|
+
const mod = await import(pathToFileURL(join30(pkgDir, entry)).href);
|
|
11624
11624
|
return mod.KokoroTTS ?? null;
|
|
11625
11625
|
} catch {
|
|
11626
11626
|
return null;
|
|
@@ -12278,7 +12278,7 @@ var init_RunwayProvider = __esm({
|
|
|
12278
12278
|
* Sleep helper
|
|
12279
12279
|
*/
|
|
12280
12280
|
sleep(ms) {
|
|
12281
|
-
return new Promise((
|
|
12281
|
+
return new Promise((resolve86) => setTimeout(resolve86, ms));
|
|
12282
12282
|
}
|
|
12283
12283
|
};
|
|
12284
12284
|
RunwayProvider.API_VERSION = "2024-11-06";
|
|
@@ -12719,7 +12719,7 @@ var init_KlingProvider = __esm({
|
|
|
12719
12719
|
* Sleep helper
|
|
12720
12720
|
*/
|
|
12721
12721
|
sleep(ms) {
|
|
12722
|
-
return new Promise((
|
|
12722
|
+
return new Promise((resolve86) => setTimeout(resolve86, ms));
|
|
12723
12723
|
}
|
|
12724
12724
|
};
|
|
12725
12725
|
klingProvider = new KlingProvider();
|
|
@@ -13037,7 +13037,7 @@ var init_GrokProvider = __esm({
|
|
|
13037
13037
|
}
|
|
13038
13038
|
}
|
|
13039
13039
|
sleep(ms) {
|
|
13040
|
-
return new Promise((
|
|
13040
|
+
return new Promise((resolve86) => setTimeout(resolve86, ms));
|
|
13041
13041
|
}
|
|
13042
13042
|
};
|
|
13043
13043
|
grokProvider = new GrokProvider();
|
|
@@ -13072,11 +13072,11 @@ var require_middleware = __commonJS({
|
|
|
13072
13072
|
"use strict";
|
|
13073
13073
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13074
13074
|
function adopt(value) {
|
|
13075
|
-
return value instanceof P ? value : new P(function(
|
|
13076
|
-
|
|
13075
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
13076
|
+
resolve86(value);
|
|
13077
13077
|
});
|
|
13078
13078
|
}
|
|
13079
|
-
return new (P || (P = Promise))(function(
|
|
13079
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
13080
13080
|
function fulfilled(value) {
|
|
13081
13081
|
try {
|
|
13082
13082
|
step(generator.next(value));
|
|
@@ -13092,7 +13092,7 @@ var require_middleware = __commonJS({
|
|
|
13092
13092
|
}
|
|
13093
13093
|
}
|
|
13094
13094
|
function step(result) {
|
|
13095
|
-
result.done ?
|
|
13095
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13096
13096
|
}
|
|
13097
13097
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13098
13098
|
});
|
|
@@ -13177,11 +13177,11 @@ var require_response = __commonJS({
|
|
|
13177
13177
|
"use strict";
|
|
13178
13178
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13179
13179
|
function adopt(value) {
|
|
13180
|
-
return value instanceof P ? value : new P(function(
|
|
13181
|
-
|
|
13180
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
13181
|
+
resolve86(value);
|
|
13182
13182
|
});
|
|
13183
13183
|
}
|
|
13184
|
-
return new (P || (P = Promise))(function(
|
|
13184
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
13185
13185
|
function fulfilled(value) {
|
|
13186
13186
|
try {
|
|
13187
13187
|
step(generator.next(value));
|
|
@@ -13197,7 +13197,7 @@ var require_response = __commonJS({
|
|
|
13197
13197
|
}
|
|
13198
13198
|
}
|
|
13199
13199
|
function step(result) {
|
|
13200
|
-
result.done ?
|
|
13200
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13201
13201
|
}
|
|
13202
13202
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13203
13203
|
});
|
|
@@ -13304,11 +13304,11 @@ var require_utils = __commonJS({
|
|
|
13304
13304
|
"use strict";
|
|
13305
13305
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13306
13306
|
function adopt(value) {
|
|
13307
|
-
return value instanceof P ? value : new P(function(
|
|
13308
|
-
|
|
13307
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
13308
|
+
resolve86(value);
|
|
13309
13309
|
});
|
|
13310
13310
|
}
|
|
13311
|
-
return new (P || (P = Promise))(function(
|
|
13311
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
13312
13312
|
function fulfilled(value) {
|
|
13313
13313
|
try {
|
|
13314
13314
|
step(generator.next(value));
|
|
@@ -13324,7 +13324,7 @@ var require_utils = __commonJS({
|
|
|
13324
13324
|
}
|
|
13325
13325
|
}
|
|
13326
13326
|
function step(result) {
|
|
13327
|
-
result.done ?
|
|
13327
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13328
13328
|
}
|
|
13329
13329
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13330
13330
|
});
|
|
@@ -13417,7 +13417,7 @@ var require_utils = __commonJS({
|
|
|
13417
13417
|
}
|
|
13418
13418
|
function sleep4(ms) {
|
|
13419
13419
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13420
|
-
return new Promise((
|
|
13420
|
+
return new Promise((resolve86) => setTimeout(resolve86, ms));
|
|
13421
13421
|
});
|
|
13422
13422
|
}
|
|
13423
13423
|
}
|
|
@@ -13429,11 +13429,11 @@ var require_retry = __commonJS({
|
|
|
13429
13429
|
"use strict";
|
|
13430
13430
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13431
13431
|
function adopt(value) {
|
|
13432
|
-
return value instanceof P ? value : new P(function(
|
|
13433
|
-
|
|
13432
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
13433
|
+
resolve86(value);
|
|
13434
13434
|
});
|
|
13435
13435
|
}
|
|
13436
|
-
return new (P || (P = Promise))(function(
|
|
13436
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
13437
13437
|
function fulfilled(value) {
|
|
13438
13438
|
try {
|
|
13439
13439
|
step(generator.next(value));
|
|
@@ -13449,7 +13449,7 @@ var require_retry = __commonJS({
|
|
|
13449
13449
|
}
|
|
13450
13450
|
}
|
|
13451
13451
|
function step(result) {
|
|
13452
|
-
result.done ?
|
|
13452
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13453
13453
|
}
|
|
13454
13454
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13455
13455
|
});
|
|
@@ -13656,11 +13656,11 @@ var require_request = __commonJS({
|
|
|
13656
13656
|
"use strict";
|
|
13657
13657
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13658
13658
|
function adopt(value) {
|
|
13659
|
-
return value instanceof P ? value : new P(function(
|
|
13660
|
-
|
|
13659
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
13660
|
+
resolve86(value);
|
|
13661
13661
|
});
|
|
13662
13662
|
}
|
|
13663
|
-
return new (P || (P = Promise))(function(
|
|
13663
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
13664
13664
|
function fulfilled(value) {
|
|
13665
13665
|
try {
|
|
13666
13666
|
step(generator.next(value));
|
|
@@ -13676,7 +13676,7 @@ var require_request = __commonJS({
|
|
|
13676
13676
|
}
|
|
13677
13677
|
}
|
|
13678
13678
|
function step(result) {
|
|
13679
|
-
result.done ?
|
|
13679
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13680
13680
|
}
|
|
13681
13681
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13682
13682
|
});
|
|
@@ -13763,11 +13763,11 @@ var require_storage = __commonJS({
|
|
|
13763
13763
|
"use strict";
|
|
13764
13764
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
13765
13765
|
function adopt(value) {
|
|
13766
|
-
return value instanceof P ? value : new P(function(
|
|
13767
|
-
|
|
13766
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
13767
|
+
resolve86(value);
|
|
13768
13768
|
});
|
|
13769
13769
|
}
|
|
13770
|
-
return new (P || (P = Promise))(function(
|
|
13770
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
13771
13771
|
function fulfilled(value) {
|
|
13772
13772
|
try {
|
|
13773
13773
|
step(generator.next(value));
|
|
@@ -13783,7 +13783,7 @@ var require_storage = __commonJS({
|
|
|
13783
13783
|
}
|
|
13784
13784
|
}
|
|
13785
13785
|
function step(result) {
|
|
13786
|
-
result.done ?
|
|
13786
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
13787
13787
|
}
|
|
13788
13788
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13789
13789
|
});
|
|
@@ -14111,11 +14111,11 @@ var require_auth = __commonJS({
|
|
|
14111
14111
|
"use strict";
|
|
14112
14112
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
14113
14113
|
function adopt(value) {
|
|
14114
|
-
return value instanceof P ? value : new P(function(
|
|
14115
|
-
|
|
14114
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
14115
|
+
resolve86(value);
|
|
14116
14116
|
});
|
|
14117
14117
|
}
|
|
14118
|
-
return new (P || (P = Promise))(function(
|
|
14118
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
14119
14119
|
function fulfilled(value) {
|
|
14120
14120
|
try {
|
|
14121
14121
|
step(generator.next(value));
|
|
@@ -14131,7 +14131,7 @@ var require_auth = __commonJS({
|
|
|
14131
14131
|
}
|
|
14132
14132
|
}
|
|
14133
14133
|
function step(result) {
|
|
14134
|
-
result.done ?
|
|
14134
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14135
14135
|
}
|
|
14136
14136
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14137
14137
|
});
|
|
@@ -14170,11 +14170,11 @@ var require_streaming = __commonJS({
|
|
|
14170
14170
|
"use strict";
|
|
14171
14171
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
14172
14172
|
function adopt(value) {
|
|
14173
|
-
return value instanceof P ? value : new P(function(
|
|
14174
|
-
|
|
14173
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
14174
|
+
resolve86(value);
|
|
14175
14175
|
});
|
|
14176
14176
|
}
|
|
14177
|
-
return new (P || (P = Promise))(function(
|
|
14177
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
14178
14178
|
function fulfilled(value) {
|
|
14179
14179
|
try {
|
|
14180
14180
|
step(generator.next(value));
|
|
@@ -14190,7 +14190,7 @@ var require_streaming = __commonJS({
|
|
|
14190
14190
|
}
|
|
14191
14191
|
}
|
|
14192
14192
|
function step(result) {
|
|
14193
|
-
result.done ?
|
|
14193
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14194
14194
|
}
|
|
14195
14195
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14196
14196
|
});
|
|
@@ -14423,7 +14423,7 @@ var require_streaming = __commonJS({
|
|
|
14423
14423
|
query: options.queryParams
|
|
14424
14424
|
});
|
|
14425
14425
|
this.options = options;
|
|
14426
|
-
this.donePromise = new Promise((
|
|
14426
|
+
this.donePromise = new Promise((resolve86, reject) => {
|
|
14427
14427
|
if (this.streamClosed) {
|
|
14428
14428
|
reject(new response_1.ApiError({
|
|
14429
14429
|
message: "Streaming connection is already closed.",
|
|
@@ -14434,11 +14434,11 @@ var require_streaming = __commonJS({
|
|
|
14434
14434
|
}
|
|
14435
14435
|
this.signal.addEventListener("abort", () => {
|
|
14436
14436
|
var _a2;
|
|
14437
|
-
|
|
14437
|
+
resolve86((_a2 = this.currentData) !== null && _a2 !== void 0 ? _a2 : {});
|
|
14438
14438
|
});
|
|
14439
14439
|
this.on("done", (data) => {
|
|
14440
14440
|
this.streamClosed = true;
|
|
14441
|
-
|
|
14441
|
+
resolve86(data);
|
|
14442
14442
|
});
|
|
14443
14443
|
this.on("error", (error) => {
|
|
14444
14444
|
this.streamClosed = true;
|
|
@@ -14463,7 +14463,7 @@ var require_streaming = __commonJS({
|
|
|
14463
14463
|
if (data) {
|
|
14464
14464
|
yield yield __await(data);
|
|
14465
14465
|
}
|
|
14466
|
-
yield __await(new Promise((
|
|
14466
|
+
yield __await(new Promise((resolve86) => setTimeout(resolve86, 16)));
|
|
14467
14467
|
}
|
|
14468
14468
|
});
|
|
14469
14469
|
}
|
|
@@ -14508,11 +14508,11 @@ var require_queue = __commonJS({
|
|
|
14508
14508
|
"use strict";
|
|
14509
14509
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
14510
14510
|
function adopt(value) {
|
|
14511
|
-
return value instanceof P ? value : new P(function(
|
|
14512
|
-
|
|
14511
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
14512
|
+
resolve86(value);
|
|
14513
14513
|
});
|
|
14514
14514
|
}
|
|
14515
|
-
return new (P || (P = Promise))(function(
|
|
14515
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
14516
14516
|
function fulfilled(value) {
|
|
14517
14517
|
try {
|
|
14518
14518
|
step(generator.next(value));
|
|
@@ -14528,7 +14528,7 @@ var require_queue = __commonJS({
|
|
|
14528
14528
|
}
|
|
14529
14529
|
}
|
|
14530
14530
|
function step(result) {
|
|
14531
|
-
result.done ?
|
|
14531
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
14532
14532
|
}
|
|
14533
14533
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14534
14534
|
});
|
|
@@ -14663,7 +14663,7 @@ var require_queue = __commonJS({
|
|
|
14663
14663
|
}
|
|
14664
14664
|
return doneStatus;
|
|
14665
14665
|
}
|
|
14666
|
-
return new Promise((
|
|
14666
|
+
return new Promise((resolve86, reject) => {
|
|
14667
14667
|
var _a;
|
|
14668
14668
|
let pollingTimeoutId;
|
|
14669
14669
|
const pollInterval = "pollInterval" in options && typeof options.pollInterval === "number" ? (_a = options.pollInterval) !== null && _a !== void 0 ? _a : DEFAULT_POLL_INTERVAL : DEFAULT_POLL_INTERVAL;
|
|
@@ -14695,7 +14695,7 @@ var require_queue = __commonJS({
|
|
|
14695
14695
|
}
|
|
14696
14696
|
if (requestStatus.status === "COMPLETED") {
|
|
14697
14697
|
clearScheduledTasks();
|
|
14698
|
-
|
|
14698
|
+
resolve86(requestStatus);
|
|
14699
14699
|
return;
|
|
14700
14700
|
}
|
|
14701
14701
|
pollingTimeoutId = setTimeout(poll, pollInterval);
|
|
@@ -16656,11 +16656,11 @@ var require_realtime = __commonJS({
|
|
|
16656
16656
|
"use strict";
|
|
16657
16657
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
16658
16658
|
function adopt(value) {
|
|
16659
|
-
return value instanceof P ? value : new P(function(
|
|
16660
|
-
|
|
16659
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
16660
|
+
resolve86(value);
|
|
16661
16661
|
});
|
|
16662
16662
|
}
|
|
16663
|
-
return new (P || (P = Promise))(function(
|
|
16663
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
16664
16664
|
function fulfilled(value) {
|
|
16665
16665
|
try {
|
|
16666
16666
|
step(generator.next(value));
|
|
@@ -16676,7 +16676,7 @@ var require_realtime = __commonJS({
|
|
|
16676
16676
|
}
|
|
16677
16677
|
}
|
|
16678
16678
|
function step(result) {
|
|
16679
|
-
result.done ?
|
|
16679
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16680
16680
|
}
|
|
16681
16681
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16682
16682
|
});
|
|
@@ -17001,11 +17001,11 @@ var require_client = __commonJS({
|
|
|
17001
17001
|
"use strict";
|
|
17002
17002
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
17003
17003
|
function adopt(value) {
|
|
17004
|
-
return value instanceof P ? value : new P(function(
|
|
17005
|
-
|
|
17004
|
+
return value instanceof P ? value : new P(function(resolve86) {
|
|
17005
|
+
resolve86(value);
|
|
17006
17006
|
});
|
|
17007
17007
|
}
|
|
17008
|
-
return new (P || (P = Promise))(function(
|
|
17008
|
+
return new (P || (P = Promise))(function(resolve86, reject) {
|
|
17009
17009
|
function fulfilled(value) {
|
|
17010
17010
|
try {
|
|
17011
17011
|
step(generator.next(value));
|
|
@@ -17021,7 +17021,7 @@ var require_client = __commonJS({
|
|
|
17021
17021
|
}
|
|
17022
17022
|
}
|
|
17023
17023
|
function step(result) {
|
|
17024
|
-
result.done ?
|
|
17024
|
+
result.done ? resolve86(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
17025
17025
|
}
|
|
17026
17026
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17027
17027
|
});
|
|
@@ -17706,7 +17706,7 @@ var init_ReplicateProvider = __esm({
|
|
|
17706
17706
|
* Sleep helper
|
|
17707
17707
|
*/
|
|
17708
17708
|
sleep(ms) {
|
|
17709
|
-
return new Promise((
|
|
17709
|
+
return new Promise((resolve86) => setTimeout(resolve86, ms));
|
|
17710
17710
|
}
|
|
17711
17711
|
/**
|
|
17712
17712
|
* Generate music from text prompt using MusicGen
|
|
@@ -26180,7 +26180,7 @@ async function prompt(question, hidden = false) {
|
|
|
26180
26180
|
input: process.stdin,
|
|
26181
26181
|
output: process.stdout
|
|
26182
26182
|
});
|
|
26183
|
-
return new Promise((
|
|
26183
|
+
return new Promise((resolve86) => {
|
|
26184
26184
|
if (hidden && process.stdin.isTTY) {
|
|
26185
26185
|
process.stdout.write(question);
|
|
26186
26186
|
let input = "";
|
|
@@ -26194,7 +26194,7 @@ async function prompt(question, hidden = false) {
|
|
|
26194
26194
|
process.stdin.removeListener("data", onData);
|
|
26195
26195
|
process.stdout.write("\n");
|
|
26196
26196
|
rl.close();
|
|
26197
|
-
|
|
26197
|
+
resolve86(input);
|
|
26198
26198
|
} else if (char === "") {
|
|
26199
26199
|
process.exit(1);
|
|
26200
26200
|
} else if (char === "\x7F" || char === "\b") {
|
|
@@ -26209,7 +26209,7 @@ async function prompt(question, hidden = false) {
|
|
|
26209
26209
|
} else {
|
|
26210
26210
|
rl.question(question, (answer) => {
|
|
26211
26211
|
rl.close();
|
|
26212
|
-
|
|
26212
|
+
resolve86(answer);
|
|
26213
26213
|
});
|
|
26214
26214
|
}
|
|
26215
26215
|
});
|
|
@@ -33767,16 +33767,16 @@ async function prompt2(question) {
|
|
|
33767
33767
|
input,
|
|
33768
33768
|
output: process.stdout
|
|
33769
33769
|
});
|
|
33770
|
-
return new Promise((
|
|
33770
|
+
return new Promise((resolve86) => {
|
|
33771
33771
|
rl.question(question, (answer) => {
|
|
33772
33772
|
rl.close();
|
|
33773
|
-
|
|
33773
|
+
resolve86(answer);
|
|
33774
33774
|
});
|
|
33775
33775
|
});
|
|
33776
33776
|
}
|
|
33777
33777
|
async function promptHidden(question, opts = {}) {
|
|
33778
33778
|
const input = getTTYInputStream();
|
|
33779
|
-
return new Promise((
|
|
33779
|
+
return new Promise((resolve86) => {
|
|
33780
33780
|
let value = "";
|
|
33781
33781
|
if (typeof input.setRawMode === "function") {
|
|
33782
33782
|
input.setRawMode(true);
|
|
@@ -33790,7 +33790,7 @@ async function promptHidden(question, opts = {}) {
|
|
|
33790
33790
|
input.setRawMode(false);
|
|
33791
33791
|
input.removeListener("data", onData);
|
|
33792
33792
|
process.stdout.write("\n");
|
|
33793
|
-
|
|
33793
|
+
resolve86(value);
|
|
33794
33794
|
} else if (char === "") {
|
|
33795
33795
|
input.setRawMode(false);
|
|
33796
33796
|
process.stdout.write("\n");
|
|
@@ -33816,7 +33816,7 @@ async function promptHidden(question, opts = {}) {
|
|
|
33816
33816
|
const rl = createInterface2({ input, output: process.stdout });
|
|
33817
33817
|
rl.question(question, (answer) => {
|
|
33818
33818
|
rl.close();
|
|
33819
|
-
|
|
33819
|
+
resolve86(answer);
|
|
33820
33820
|
});
|
|
33821
33821
|
}
|
|
33822
33822
|
});
|
|
@@ -33824,7 +33824,7 @@ async function promptHidden(question, opts = {}) {
|
|
|
33824
33824
|
async function promptSelect(_question, options, defaultIndex = 0, opts = {}) {
|
|
33825
33825
|
const input = getTTYInputStream();
|
|
33826
33826
|
if (typeof input.setRawMode === "function") {
|
|
33827
|
-
return new Promise((
|
|
33827
|
+
return new Promise((resolve86) => {
|
|
33828
33828
|
let selected = defaultIndex;
|
|
33829
33829
|
const render = () => {
|
|
33830
33830
|
if (renderCount > 0) {
|
|
@@ -33852,7 +33852,7 @@ async function promptSelect(_question, options, defaultIndex = 0, opts = {}) {
|
|
|
33852
33852
|
input.setRawMode(false);
|
|
33853
33853
|
input.removeListener("data", onData);
|
|
33854
33854
|
process.stdout.write("\n");
|
|
33855
|
-
|
|
33855
|
+
resolve86(selected);
|
|
33856
33856
|
} else if (char === "") {
|
|
33857
33857
|
input.setRawMode(false);
|
|
33858
33858
|
process.stdout.write("\n");
|
|
@@ -33862,7 +33862,7 @@ async function promptSelect(_question, options, defaultIndex = 0, opts = {}) {
|
|
|
33862
33862
|
input.setRawMode(false);
|
|
33863
33863
|
input.removeListener("data", onData);
|
|
33864
33864
|
process.stdout.write("\n");
|
|
33865
|
-
|
|
33865
|
+
resolve86(opts.backIndex);
|
|
33866
33866
|
} else if (char === "\x1B[A" || char === "k") {
|
|
33867
33867
|
selected = (selected - 1 + options.length) % options.length;
|
|
33868
33868
|
render();
|
|
@@ -33876,7 +33876,7 @@ async function promptSelect(_question, options, defaultIndex = 0, opts = {}) {
|
|
|
33876
33876
|
input.removeListener("data", onData);
|
|
33877
33877
|
render();
|
|
33878
33878
|
process.stdout.write("\n");
|
|
33879
|
-
|
|
33879
|
+
resolve86(selected);
|
|
33880
33880
|
}
|
|
33881
33881
|
};
|
|
33882
33882
|
const onData = (chunk) => {
|
|
@@ -33900,7 +33900,7 @@ async function promptSelect(_question, options, defaultIndex = 0, opts = {}) {
|
|
|
33900
33900
|
async function promptConfirm(question, defaultYes = true) {
|
|
33901
33901
|
const input = getTTYInputStream();
|
|
33902
33902
|
if (typeof input.setRawMode === "function") {
|
|
33903
|
-
return new Promise((
|
|
33903
|
+
return new Promise((resolve86) => {
|
|
33904
33904
|
const options = ["Yes", "No"];
|
|
33905
33905
|
let selected = defaultYes ? 0 : 1;
|
|
33906
33906
|
let renderCount = 0;
|
|
@@ -33930,7 +33930,7 @@ async function promptConfirm(question, defaultYes = true) {
|
|
|
33930
33930
|
finished = true;
|
|
33931
33931
|
input.setRawMode(false);
|
|
33932
33932
|
input.removeListener("data", onData);
|
|
33933
|
-
|
|
33933
|
+
resolve86(selected === 0);
|
|
33934
33934
|
} else if (char === "") {
|
|
33935
33935
|
input.setRawMode(false);
|
|
33936
33936
|
process.stdout.write("\n");
|
|
@@ -33944,14 +33944,14 @@ async function promptConfirm(question, defaultYes = true) {
|
|
|
33944
33944
|
input.setRawMode(false);
|
|
33945
33945
|
input.removeListener("data", onData);
|
|
33946
33946
|
render();
|
|
33947
|
-
|
|
33947
|
+
resolve86(true);
|
|
33948
33948
|
} else if (char === "n" || char === "N") {
|
|
33949
33949
|
selected = 1;
|
|
33950
33950
|
finished = true;
|
|
33951
33951
|
input.setRawMode(false);
|
|
33952
33952
|
input.removeListener("data", onData);
|
|
33953
33953
|
render();
|
|
33954
|
-
|
|
33954
|
+
resolve86(false);
|
|
33955
33955
|
}
|
|
33956
33956
|
};
|
|
33957
33957
|
const onData = (chunk) => {
|
|
@@ -33970,7 +33970,7 @@ async function promptMultiSelect(_question, options, defaultSelected = [], opts
|
|
|
33970
33970
|
const input = getTTYInputStream();
|
|
33971
33971
|
const selected = options.map((_, i) => Boolean(defaultSelected[i]));
|
|
33972
33972
|
if (typeof input.setRawMode === "function") {
|
|
33973
|
-
return new Promise((
|
|
33973
|
+
return new Promise((resolve86) => {
|
|
33974
33974
|
let cursor = 0;
|
|
33975
33975
|
let renderCount = 0;
|
|
33976
33976
|
let userToggled = false;
|
|
@@ -34000,7 +34000,7 @@ async function promptMultiSelect(_question, options, defaultSelected = [], opts
|
|
|
34000
34000
|
for (let i = 0; i < selected.length; i++) {
|
|
34001
34001
|
if (selected[i]) result.push(i);
|
|
34002
34002
|
}
|
|
34003
|
-
|
|
34003
|
+
resolve86(result);
|
|
34004
34004
|
};
|
|
34005
34005
|
let finished = false;
|
|
34006
34006
|
const handleChar = (char) => {
|
|
@@ -34314,7 +34314,7 @@ var init_speech = __esm({
|
|
|
34314
34314
|
import { writeFile as writeFile20, unlink, rename } from "node:fs/promises";
|
|
34315
34315
|
import { resolve as resolve24, basename as basename4 } from "node:path";
|
|
34316
34316
|
function sleep2(ms) {
|
|
34317
|
-
return new Promise((
|
|
34317
|
+
return new Promise((resolve86) => setTimeout(resolve86, ms));
|
|
34318
34318
|
}
|
|
34319
34319
|
async function uploadToImgbb(imageBuffer, apiKey) {
|
|
34320
34320
|
try {
|
|
@@ -36051,7 +36051,7 @@ function unique(items) {
|
|
|
36051
36051
|
];
|
|
36052
36052
|
}
|
|
36053
36053
|
function sleep3(ms) {
|
|
36054
|
-
return new Promise((
|
|
36054
|
+
return new Promise((resolve86) => setTimeout(resolve86, ms));
|
|
36055
36055
|
}
|
|
36056
36056
|
var LOCAL_JOB_ORPHAN_AFTER_MS;
|
|
36057
36057
|
var init_status_jobs = __esm({
|
|
@@ -48424,8 +48424,8 @@ var init_FileTokenizer = __esm({
|
|
|
48424
48424
|
*/
|
|
48425
48425
|
static async fromFile(sourceFilePath) {
|
|
48426
48426
|
const fileHandle = await fsOpen(sourceFilePath, "r");
|
|
48427
|
-
const
|
|
48428
|
-
return new _FileTokenizer(fileHandle, { fileInfo: { path: sourceFilePath, size:
|
|
48427
|
+
const stat11 = await fileHandle.stat();
|
|
48428
|
+
return new _FileTokenizer(fileHandle, { fileInfo: { path: sourceFilePath, size: stat11.size } });
|
|
48429
48429
|
}
|
|
48430
48430
|
constructor(fileHandle, options) {
|
|
48431
48431
|
super(options);
|
|
@@ -59515,6 +59515,9 @@ var init_build_backdrop_prompt = __esm({
|
|
|
59515
59515
|
import { existsSync as existsSync47 } from "node:fs";
|
|
59516
59516
|
import { readFile as readFile43 } from "node:fs/promises";
|
|
59517
59517
|
import { dirname as dirname21, join as join23, resolve as resolve60 } from "node:path";
|
|
59518
|
+
function backdropCostUsd(quality) {
|
|
59519
|
+
return quality === "hd" ? 0.2 : 0.05;
|
|
59520
|
+
}
|
|
59518
59521
|
async function createBuildPlan(opts) {
|
|
59519
59522
|
const projectDir = resolve60(opts.projectDir);
|
|
59520
59523
|
loadPlanEnv(projectDir);
|
|
@@ -59670,7 +59673,7 @@ async function createBuildPlan(opts) {
|
|
|
59670
59673
|
reference: backdropReference,
|
|
59671
59674
|
projectDir,
|
|
59672
59675
|
force: opts.force,
|
|
59673
|
-
cost:
|
|
59676
|
+
cost: backdropCostUsd(imageQuality),
|
|
59674
59677
|
active: includeAssets
|
|
59675
59678
|
}) : null;
|
|
59676
59679
|
const video = videoCue && !opts.skipVideo ? assetPlan({
|
|
@@ -60146,7 +60149,7 @@ function loadPlanEnv(projectDir) {
|
|
|
60146
60149
|
dir = dirname21(dir);
|
|
60147
60150
|
}
|
|
60148
60151
|
}
|
|
60149
|
-
var import_dotenv3,
|
|
60152
|
+
var import_dotenv3, VIDEO_COST_USD, MUSIC_COST_USD, ELEVENLABS_NARRATION_COST_USD, COMPOSE_COST_USD, SUPPORTED_BUILD_IMAGE_PROVIDERS;
|
|
60150
60153
|
var init_build_plan = __esm({
|
|
60151
60154
|
"src/commands/_shared/build-plan.ts"() {
|
|
60152
60155
|
"use strict";
|
|
@@ -60161,7 +60164,6 @@ var init_build_plan = __esm({
|
|
|
60161
60164
|
init_storyboard_parse();
|
|
60162
60165
|
init_project_config();
|
|
60163
60166
|
init_storyboard_edit();
|
|
60164
|
-
BACKDROP_COST_USD = 3;
|
|
60165
60167
|
VIDEO_COST_USD = 5;
|
|
60166
60168
|
MUSIC_COST_USD = 0.5;
|
|
60167
60169
|
ELEVENLABS_NARRATION_COST_USD = 0.05;
|
|
@@ -61177,7 +61179,10 @@ async function executeSceneBuild(opts) {
|
|
|
61177
61179
|
(beat) => beat.narrationStatus === "failed" || beat.backdropStatus === "failed" || beat.videoStatus === "failed" || beat.musicStatus === "failed"
|
|
61178
61180
|
);
|
|
61179
61181
|
stageReports.assets.status = assetFailed ? "failed" : pendingJobs.length > 0 ? "pending-jobs" : "done";
|
|
61180
|
-
stageReports.assets.costUsd = estimateActualAssetCost(
|
|
61182
|
+
stageReports.assets.costUsd = estimateActualAssetCost(
|
|
61183
|
+
beatOutcomes,
|
|
61184
|
+
opts.imageQuality ?? "hd"
|
|
61185
|
+
);
|
|
61181
61186
|
stageReports.assets.retryWith = pendingJobs.map(
|
|
61182
61187
|
(job) => `vibe status job ${job.id} --project ${projectDir} --json`
|
|
61183
61188
|
);
|
|
@@ -62360,11 +62365,11 @@ function shouldRunStage(selected, stage) {
|
|
|
62360
62365
|
if (selected === "all") return true;
|
|
62361
62366
|
return selected === stage;
|
|
62362
62367
|
}
|
|
62363
|
-
function estimateActualAssetCost(outcomes) {
|
|
62368
|
+
function estimateActualAssetCost(outcomes, imageQuality) {
|
|
62364
62369
|
let cost = 0;
|
|
62365
62370
|
for (const outcome of outcomes) {
|
|
62366
62371
|
if (outcome.narrationStatus === "generated") cost += 0.05;
|
|
62367
|
-
if (outcome.backdropStatus === "generated") cost +=
|
|
62372
|
+
if (outcome.backdropStatus === "generated") cost += backdropCostUsd(imageQuality);
|
|
62368
62373
|
if (outcome.videoStatus === "generated" || outcome.videoStatus === "pending") cost += 5;
|
|
62369
62374
|
if (outcome.musicStatus === "generated" || outcome.musicStatus === "pending") cost += 0.5;
|
|
62370
62375
|
}
|
|
@@ -71027,17 +71032,158 @@ var init_timeline = __esm({
|
|
|
71027
71032
|
}
|
|
71028
71033
|
});
|
|
71029
71034
|
|
|
71035
|
+
// src/commands/_shared/project-list.ts
|
|
71036
|
+
import { readdir as readdir7, readFile as readFile53, stat as stat9 } from "node:fs/promises";
|
|
71037
|
+
import { existsSync as existsSync57 } from "node:fs";
|
|
71038
|
+
import { join as join28, resolve as resolve80 } from "node:path";
|
|
71039
|
+
async function executeProjectList(opts = {}) {
|
|
71040
|
+
const workspaceDir = resolve80(opts.workspaceDir ?? ".");
|
|
71041
|
+
if (!existsSync57(workspaceDir)) {
|
|
71042
|
+
return {
|
|
71043
|
+
success: false,
|
|
71044
|
+
workspaceDir,
|
|
71045
|
+
projects: [],
|
|
71046
|
+
archivedCount: 0,
|
|
71047
|
+
error: `Workspace directory not found: ${workspaceDir}`
|
|
71048
|
+
};
|
|
71049
|
+
}
|
|
71050
|
+
const entries = await readdir7(workspaceDir, { withFileTypes: true });
|
|
71051
|
+
const projects = [];
|
|
71052
|
+
let archivedCount = 0;
|
|
71053
|
+
for (const entry of entries) {
|
|
71054
|
+
if (!entry.isDirectory()) continue;
|
|
71055
|
+
if (entry.name === "node_modules") continue;
|
|
71056
|
+
if (entry.name.startsWith(".")) continue;
|
|
71057
|
+
if (entry.name.startsWith("_")) {
|
|
71058
|
+
archivedCount += await countProjects(join28(workspaceDir, entry.name));
|
|
71059
|
+
continue;
|
|
71060
|
+
}
|
|
71061
|
+
const projectDir = join28(workspaceDir, entry.name);
|
|
71062
|
+
if (!existsSync57(join28(projectDir, "STORYBOARD.md"))) continue;
|
|
71063
|
+
projects.push(await describeProject(entry.name, projectDir));
|
|
71064
|
+
}
|
|
71065
|
+
projects.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
|
|
71066
|
+
return { success: true, workspaceDir, projects, archivedCount };
|
|
71067
|
+
}
|
|
71068
|
+
async function countProjects(dir) {
|
|
71069
|
+
try {
|
|
71070
|
+
const entries = await readdir7(dir, { withFileTypes: true });
|
|
71071
|
+
return entries.filter(
|
|
71072
|
+
(e) => e.isDirectory() && existsSync57(join28(dir, e.name, "STORYBOARD.md"))
|
|
71073
|
+
).length;
|
|
71074
|
+
} catch {
|
|
71075
|
+
return 0;
|
|
71076
|
+
}
|
|
71077
|
+
}
|
|
71078
|
+
async function describeProject(name, projectDir) {
|
|
71079
|
+
let beats = 0;
|
|
71080
|
+
let storyboardDurationSec = 0;
|
|
71081
|
+
const timestamps = [];
|
|
71082
|
+
try {
|
|
71083
|
+
const storyboardPath2 = join28(projectDir, "STORYBOARD.md");
|
|
71084
|
+
const parsed = parseStoryboard(await readFile53(storyboardPath2, "utf-8"));
|
|
71085
|
+
beats = parsed.beats.length;
|
|
71086
|
+
storyboardDurationSec = Number(
|
|
71087
|
+
parsed.beats.reduce((sum, beat) => sum + (beat.duration ?? 0), 0).toFixed(2)
|
|
71088
|
+
);
|
|
71089
|
+
timestamps.push((await stat9(storyboardPath2)).mtimeMs);
|
|
71090
|
+
} catch {
|
|
71091
|
+
}
|
|
71092
|
+
let buildStatus;
|
|
71093
|
+
let buildUpdatedAt;
|
|
71094
|
+
try {
|
|
71095
|
+
const reportPath = join28(projectDir, "build-report.json");
|
|
71096
|
+
const report = JSON.parse(await readFile53(reportPath, "utf-8"));
|
|
71097
|
+
buildStatus = report.status ?? report.phase;
|
|
71098
|
+
buildUpdatedAt = report.updatedAt;
|
|
71099
|
+
timestamps.push((await stat9(reportPath)).mtimeMs);
|
|
71100
|
+
} catch {
|
|
71101
|
+
}
|
|
71102
|
+
let latestRender;
|
|
71103
|
+
try {
|
|
71104
|
+
const rendersDir = join28(projectDir, "renders");
|
|
71105
|
+
const files = await readdir7(rendersDir);
|
|
71106
|
+
let newest;
|
|
71107
|
+
for (const file of files) {
|
|
71108
|
+
if (!/\.(mp4|webm|mov)$/i.test(file)) continue;
|
|
71109
|
+
const { mtimeMs } = await stat9(join28(rendersDir, file));
|
|
71110
|
+
if (!newest || mtimeMs > newest.mtimeMs) newest = { file, mtimeMs };
|
|
71111
|
+
}
|
|
71112
|
+
if (newest) {
|
|
71113
|
+
latestRender = { file: newest.file, modifiedAt: new Date(newest.mtimeMs).toISOString() };
|
|
71114
|
+
timestamps.push(newest.mtimeMs);
|
|
71115
|
+
}
|
|
71116
|
+
} catch {
|
|
71117
|
+
}
|
|
71118
|
+
const updatedAt = new Date(
|
|
71119
|
+
timestamps.length > 0 ? Math.max(...timestamps) : (await stat9(projectDir)).mtimeMs
|
|
71120
|
+
).toISOString();
|
|
71121
|
+
return {
|
|
71122
|
+
name,
|
|
71123
|
+
path: projectDir,
|
|
71124
|
+
beats,
|
|
71125
|
+
storyboardDurationSec,
|
|
71126
|
+
...buildStatus ? { buildStatus } : {},
|
|
71127
|
+
...buildUpdatedAt ? { buildUpdatedAt } : {},
|
|
71128
|
+
...latestRender ? { latestRender } : {},
|
|
71129
|
+
updatedAt
|
|
71130
|
+
};
|
|
71131
|
+
}
|
|
71132
|
+
var init_project_list = __esm({
|
|
71133
|
+
"src/commands/_shared/project-list.ts"() {
|
|
71134
|
+
"use strict";
|
|
71135
|
+
init_storyboard_parse();
|
|
71136
|
+
}
|
|
71137
|
+
});
|
|
71138
|
+
|
|
71030
71139
|
// src/tools/manifest/project.ts
|
|
71031
|
-
import { resolve as
|
|
71140
|
+
import { resolve as resolve81 } from "node:path";
|
|
71032
71141
|
import { writeFile as writeFile58 } from "node:fs/promises";
|
|
71033
|
-
var projectCreateTool, projectInfoTool, projectTools;
|
|
71142
|
+
var projectListTool, projectCreateTool, projectInfoTool, projectTools;
|
|
71034
71143
|
var init_project2 = __esm({
|
|
71035
71144
|
"src/tools/manifest/project.ts"() {
|
|
71036
71145
|
"use strict";
|
|
71037
71146
|
init_zod();
|
|
71038
71147
|
init_define_tool();
|
|
71039
71148
|
init_engine();
|
|
71149
|
+
init_project_list();
|
|
71040
71150
|
init_project_io();
|
|
71151
|
+
projectListTool = defineTool({
|
|
71152
|
+
name: "project_list",
|
|
71153
|
+
category: "project",
|
|
71154
|
+
cost: "free",
|
|
71155
|
+
title: "List Video Projects",
|
|
71156
|
+
annotations: { readOnly: true, openWorld: false },
|
|
71157
|
+
description: `List every VibeFrame video project in the workspace (directories with a STORYBOARD.md), newest activity first: beat count, storyboard duration, last build status, and the latest render. Directories starting with '_' (e.g. _archive) are skipped and reported as an archived count \u2014 move a project into _archive/ to retire it. Use this to answer "what projects do I have?" before init/build/render.`,
|
|
71158
|
+
schema: external_exports.object({
|
|
71159
|
+
dir: external_exports.string().optional().describe(
|
|
71160
|
+
"Workspace directory to scan. Defaults to the surface's cwd; in MCP hosts this is the configured server workspace."
|
|
71161
|
+
)
|
|
71162
|
+
}),
|
|
71163
|
+
async execute(args, ctx) {
|
|
71164
|
+
const result = await executeProjectList({
|
|
71165
|
+
workspaceDir: args.dir ? resolve81(ctx.workingDirectory, args.dir) : ctx.workingDirectory
|
|
71166
|
+
});
|
|
71167
|
+
if (!result.success) {
|
|
71168
|
+
return { success: false, error: result.error ?? "project list failed" };
|
|
71169
|
+
}
|
|
71170
|
+
return {
|
|
71171
|
+
success: true,
|
|
71172
|
+
data: {
|
|
71173
|
+
workspaceDir: result.workspaceDir,
|
|
71174
|
+
count: result.projects.length,
|
|
71175
|
+
archivedCount: result.archivedCount,
|
|
71176
|
+
projects: result.projects
|
|
71177
|
+
},
|
|
71178
|
+
humanLines: [
|
|
71179
|
+
`\u{1F4C1} ${result.projects.length} project(s) in ${result.workspaceDir}` + (result.archivedCount > 0 ? ` (+${result.archivedCount} archived)` : ""),
|
|
71180
|
+
...result.projects.map(
|
|
71181
|
+
(p) => ` \u2022 ${p.name} \u2014 ${p.beats} beat(s), ~${p.storyboardDurationSec}s` + (p.buildStatus ? `, build: ${p.buildStatus}` : "") + (p.latestRender ? `, latest render: ${p.latestRender.file}` : "") + ` (updated ${p.updatedAt})`
|
|
71182
|
+
)
|
|
71183
|
+
]
|
|
71184
|
+
};
|
|
71185
|
+
}
|
|
71186
|
+
});
|
|
71041
71187
|
projectCreateTool = defineTool({
|
|
71042
71188
|
name: "project_create",
|
|
71043
71189
|
category: "project",
|
|
@@ -71053,7 +71199,7 @@ var init_project2 = __esm({
|
|
|
71053
71199
|
fps: external_exports.number().optional().describe("Frames per second (default: 30)")
|
|
71054
71200
|
}),
|
|
71055
71201
|
async execute(args, ctx) {
|
|
71056
|
-
const outputPath =
|
|
71202
|
+
const outputPath = resolve81(ctx.workingDirectory, args.outputPath ?? `${args.name}.vibe.json`);
|
|
71057
71203
|
const project = new Project(args.name);
|
|
71058
71204
|
if (args.fps) project.setFrameRate(args.fps);
|
|
71059
71205
|
await writeFile58(outputPath, JSON.stringify(project.toJSON(), null, 2), "utf-8");
|
|
@@ -71094,6 +71240,7 @@ var init_project2 = __esm({
|
|
|
71094
71240
|
}
|
|
71095
71241
|
});
|
|
71096
71242
|
projectTools = [
|
|
71243
|
+
projectListTool,
|
|
71097
71244
|
projectCreateTool,
|
|
71098
71245
|
projectInfoTool
|
|
71099
71246
|
];
|
|
@@ -71101,8 +71248,8 @@ var init_project2 = __esm({
|
|
|
71101
71248
|
});
|
|
71102
71249
|
|
|
71103
71250
|
// src/commands/export.ts
|
|
71104
|
-
import { readFile as
|
|
71105
|
-
import { resolve as
|
|
71251
|
+
import { readFile as readFile54, access as access7 } from "node:fs/promises";
|
|
71252
|
+
import { resolve as resolve82, basename as basename24 } from "node:path";
|
|
71106
71253
|
import { spawn as spawn3 } from "node:child_process";
|
|
71107
71254
|
function timelineBaseName(path2) {
|
|
71108
71255
|
const name = basename24(path2);
|
|
@@ -71170,7 +71317,7 @@ async function runExport(projectPath, outputPath, options = {}) {
|
|
|
71170
71317
|
};
|
|
71171
71318
|
}
|
|
71172
71319
|
const filePath = await resolveTimelineFile(projectPath);
|
|
71173
|
-
const content = await
|
|
71320
|
+
const content = await readFile54(filePath, "utf-8");
|
|
71174
71321
|
const data = JSON.parse(content);
|
|
71175
71322
|
const project = Project.fromJSON(data);
|
|
71176
71323
|
const summary = project.getSummary();
|
|
@@ -71180,7 +71327,7 @@ async function runExport(projectPath, outputPath, options = {}) {
|
|
|
71180
71327
|
message: "Project has no clips to export"
|
|
71181
71328
|
};
|
|
71182
71329
|
}
|
|
71183
|
-
const finalOutputPath =
|
|
71330
|
+
const finalOutputPath = resolve82(process.cwd(), outputPath);
|
|
71184
71331
|
const basePresetSettings = getPresetSettings(preset, summary.aspectRatio);
|
|
71185
71332
|
const presetSettings = applyCustomOverrides(basePresetSettings, { bitrate, fps, resolution, codec });
|
|
71186
71333
|
const clips = project.getClips().sort((a, b) => a.startTime - b.startTime);
|
|
@@ -71576,7 +71723,7 @@ function buildFFmpegArgs(clips, sources, presetSettings, outputPath, options, so
|
|
|
71576
71723
|
return args;
|
|
71577
71724
|
}
|
|
71578
71725
|
function runFFmpegProcess(ffmpegPath, args, onProgress) {
|
|
71579
|
-
return new Promise((
|
|
71726
|
+
return new Promise((resolve86, reject) => {
|
|
71580
71727
|
const ffmpeg = spawn3(ffmpegPath, args, {
|
|
71581
71728
|
stdio: ["pipe", "pipe", "pipe"]
|
|
71582
71729
|
});
|
|
@@ -71600,7 +71747,7 @@ function runFFmpegProcess(ffmpegPath, args, onProgress) {
|
|
|
71600
71747
|
});
|
|
71601
71748
|
ffmpeg.on("close", (code) => {
|
|
71602
71749
|
if (code === 0) {
|
|
71603
|
-
|
|
71750
|
+
resolve86();
|
|
71604
71751
|
} else {
|
|
71605
71752
|
const errorMatch = stderr.match(/Error.*$/m);
|
|
71606
71753
|
const errorMsg = errorMatch ? errorMatch[0] : `FFmpeg exited with code ${code}`;
|
|
@@ -71736,17 +71883,17 @@ function getPresetSettings(preset, aspectRatio2) {
|
|
|
71736
71883
|
}
|
|
71737
71884
|
async function runHyperframesExport(projectPath, options, spinner2, startedAt) {
|
|
71738
71885
|
spinner2.text = "Loading project...";
|
|
71739
|
-
const { readFile:
|
|
71740
|
-
const { resolve:
|
|
71886
|
+
const { readFile: readFile56 } = await import("node:fs/promises");
|
|
71887
|
+
const { resolve: resolve86 } = await import("node:path");
|
|
71741
71888
|
const { Project: Project2 } = await Promise.resolve().then(() => (init_engine(), engine_exports));
|
|
71742
71889
|
const { createHyperframesBackend: createHyperframesBackend2 } = await Promise.resolve().then(() => (init_hyperframes(), hyperframes_exports));
|
|
71743
71890
|
const { exitWithError: exitWithError2, generalError: generalError2, outputSuccess: outputSuccess2 } = await Promise.resolve().then(() => (init_output(), output_exports));
|
|
71744
71891
|
const chalk2 = (await Promise.resolve().then(() => (init_source(), source_exports))).default;
|
|
71745
71892
|
const filePath = await resolveTimelineFile(projectPath);
|
|
71746
|
-
const content = await
|
|
71893
|
+
const content = await readFile56(filePath, "utf-8");
|
|
71747
71894
|
const project = Project2.fromJSON(JSON.parse(content));
|
|
71748
71895
|
const state = project.getState();
|
|
71749
|
-
const outputPath = options.output ?
|
|
71896
|
+
const outputPath = options.output ? resolve86(process.cwd(), options.output) : resolve86(process.cwd(), `${timelineBaseName(projectPath)}.${options.format ?? "mp4"}`);
|
|
71750
71897
|
const quality = ["draft", "standard", "high"].includes(options.preset ?? "") ? options.preset : "standard";
|
|
71751
71898
|
const backend = createHyperframesBackend2();
|
|
71752
71899
|
spinner2.text = "Rendering with Hyperframes...";
|
|
@@ -71865,7 +72012,7 @@ Run 'vibe schema export' for structured parameter info.`).action(async (projectP
|
|
|
71865
72012
|
}
|
|
71866
72013
|
spinner2.text = "Loading project...";
|
|
71867
72014
|
const filePath = await resolveTimelineFile(projectPath);
|
|
71868
|
-
const content = await
|
|
72015
|
+
const content = await readFile54(filePath, "utf-8");
|
|
71869
72016
|
const data = JSON.parse(content);
|
|
71870
72017
|
const project = Project.fromJSON(data);
|
|
71871
72018
|
const summary = project.getSummary();
|
|
@@ -71873,7 +72020,7 @@ Run 'vibe schema export' for structured parameter info.`).action(async (projectP
|
|
|
71873
72020
|
spinner2.fail("Project has no clips to export");
|
|
71874
72021
|
exitWithError(usageError("Project has no clips to export"));
|
|
71875
72022
|
}
|
|
71876
|
-
const outputPath = options.output ?
|
|
72023
|
+
const outputPath = options.output ? resolve82(process.cwd(), options.output) : resolve82(
|
|
71877
72024
|
process.cwd(),
|
|
71878
72025
|
`${timelineBaseName(projectPath)}.${options.format}`
|
|
71879
72026
|
);
|
|
@@ -71957,7 +72104,7 @@ Run 'vibe schema export' for structured parameter info.`).action(async (projectP
|
|
|
71957
72104
|
});
|
|
71958
72105
|
|
|
71959
72106
|
// src/tools/manifest/export.ts
|
|
71960
|
-
import { resolve as
|
|
72107
|
+
import { resolve as resolve83 } from "node:path";
|
|
71961
72108
|
var exportVideoTool, exportTools;
|
|
71962
72109
|
var init_export2 = __esm({
|
|
71963
72110
|
"src/tools/manifest/export.ts"() {
|
|
@@ -71980,8 +72127,8 @@ var init_export2 = __esm({
|
|
|
71980
72127
|
overwrite: external_exports.boolean().optional().describe("Overwrite existing output file (default: false)")
|
|
71981
72128
|
}),
|
|
71982
72129
|
async execute(args, ctx) {
|
|
71983
|
-
const projectPath =
|
|
71984
|
-
const outputPath =
|
|
72130
|
+
const projectPath = resolve83(ctx.workingDirectory, args.projectPath);
|
|
72131
|
+
const outputPath = resolve83(ctx.workingDirectory, args.outputPath);
|
|
71985
72132
|
const result = await runExport(projectPath, outputPath, {
|
|
71986
72133
|
preset: args.preset,
|
|
71987
72134
|
format: args.format,
|
|
@@ -72000,8 +72147,8 @@ var init_export2 = __esm({
|
|
|
72000
72147
|
});
|
|
72001
72148
|
|
|
72002
72149
|
// src/tools/manifest/agent-only.ts
|
|
72003
|
-
import { readFile as
|
|
72004
|
-
import { resolve as
|
|
72150
|
+
import { readFile as readFile55, writeFile as writeFile59, readdir as readdir8, stat as stat10, access as access8, unlink as unlink4 } from "node:fs/promises";
|
|
72151
|
+
import { resolve as resolve84, join as join29, basename as basename25, extname as extname16 } from "node:path";
|
|
72005
72152
|
function matchPattern(filename, pattern) {
|
|
72006
72153
|
const regex2 = new RegExp(
|
|
72007
72154
|
"^" + pattern.replace(/\./g, "\\.").replace(/\*/g, ".*").replace(/\?/g, ".") + "$",
|
|
@@ -72081,13 +72228,13 @@ var init_agent_only = __esm({
|
|
|
72081
72228
|
async execute(args, ctx) {
|
|
72082
72229
|
const dirPath = args.path ?? ".";
|
|
72083
72230
|
try {
|
|
72084
|
-
const absPath =
|
|
72085
|
-
const entries = await
|
|
72231
|
+
const absPath = resolve84(ctx.workingDirectory, dirPath);
|
|
72232
|
+
const entries = await readdir8(absPath, { withFileTypes: true });
|
|
72086
72233
|
const results = [];
|
|
72087
72234
|
for (const entry of entries) {
|
|
72088
72235
|
if (args.pattern && !matchPattern(entry.name, args.pattern)) continue;
|
|
72089
|
-
const fullPath =
|
|
72090
|
-
const stats = await
|
|
72236
|
+
const fullPath = join29(absPath, entry.name);
|
|
72237
|
+
const stats = await stat10(fullPath);
|
|
72091
72238
|
if (entry.isDirectory()) {
|
|
72092
72239
|
results.push(`[DIR] ${entry.name}/`);
|
|
72093
72240
|
} else {
|
|
@@ -72114,8 +72261,8 @@ var init_agent_only = __esm({
|
|
|
72114
72261
|
}),
|
|
72115
72262
|
async execute(args, ctx) {
|
|
72116
72263
|
try {
|
|
72117
|
-
const absPath =
|
|
72118
|
-
const content = await
|
|
72264
|
+
const absPath = resolve84(ctx.workingDirectory, args.path);
|
|
72265
|
+
const content = await readFile55(absPath, "utf-8");
|
|
72119
72266
|
const maxLength = 4e3;
|
|
72120
72267
|
const truncated = content.length > maxLength;
|
|
72121
72268
|
const output = truncated ? content.substring(0, maxLength) + "\n... (truncated)" : content;
|
|
@@ -72139,7 +72286,7 @@ var init_agent_only = __esm({
|
|
|
72139
72286
|
}),
|
|
72140
72287
|
async execute(args, ctx) {
|
|
72141
72288
|
try {
|
|
72142
|
-
const absPath =
|
|
72289
|
+
const absPath = resolve84(ctx.workingDirectory, args.path);
|
|
72143
72290
|
await writeFile59(absPath, args.content, "utf-8");
|
|
72144
72291
|
return { success: true, data: { bytes: args.content.length }, humanLines: [`File written: ${args.path} (${formatSize(args.content.length)})`] };
|
|
72145
72292
|
} catch (error) {
|
|
@@ -72159,10 +72306,10 @@ var init_agent_only = __esm({
|
|
|
72159
72306
|
path: external_exports.string().describe("Path to check")
|
|
72160
72307
|
}),
|
|
72161
72308
|
async execute(args, ctx) {
|
|
72162
|
-
const absPath =
|
|
72309
|
+
const absPath = resolve84(ctx.workingDirectory, args.path);
|
|
72163
72310
|
try {
|
|
72164
72311
|
await access8(absPath);
|
|
72165
|
-
const stats = await
|
|
72312
|
+
const stats = await stat10(absPath);
|
|
72166
72313
|
const type = stats.isDirectory() ? "directory" : "file";
|
|
72167
72314
|
return { success: true, data: { exists: true, type }, humanLines: [`${type} exists: ${args.path}`] };
|
|
72168
72315
|
} catch {
|
|
@@ -72187,19 +72334,19 @@ var init_agent_only = __esm({
|
|
|
72187
72334
|
}),
|
|
72188
72335
|
async execute(args, ctx) {
|
|
72189
72336
|
try {
|
|
72190
|
-
const filePath =
|
|
72191
|
-
const content = await
|
|
72337
|
+
const filePath = resolve84(ctx.workingDirectory, args.project);
|
|
72338
|
+
const content = await readFile55(filePath, "utf-8");
|
|
72192
72339
|
const data = JSON.parse(content);
|
|
72193
72340
|
const project = Project.fromJSON(data);
|
|
72194
|
-
const dirPath =
|
|
72341
|
+
const dirPath = resolve84(ctx.workingDirectory, args.directory);
|
|
72195
72342
|
const filterExts = args.filter ? args.filter.split(",").map((e) => e.trim().toLowerCase()) : null;
|
|
72196
72343
|
const imageDuration = args.imageDuration ?? 5;
|
|
72197
72344
|
const recursive = args.recursive ?? false;
|
|
72198
72345
|
const mediaFiles = [];
|
|
72199
72346
|
const scanDir = async (dir) => {
|
|
72200
|
-
const entries = await
|
|
72347
|
+
const entries = await readdir8(dir, { withFileTypes: true });
|
|
72201
72348
|
for (const entry of entries) {
|
|
72202
|
-
const entryPath =
|
|
72349
|
+
const entryPath = join29(dir, entry.name);
|
|
72203
72350
|
if (entry.isDirectory() && recursive) {
|
|
72204
72351
|
await scanDir(entryPath);
|
|
72205
72352
|
} else if (entry.isFile()) {
|
|
@@ -72259,8 +72406,8 @@ var init_agent_only = __esm({
|
|
|
72259
72406
|
}),
|
|
72260
72407
|
async execute(args, ctx) {
|
|
72261
72408
|
try {
|
|
72262
|
-
const filePath =
|
|
72263
|
-
const content = await
|
|
72409
|
+
const filePath = resolve84(ctx.workingDirectory, args.project);
|
|
72410
|
+
const content = await readFile55(filePath, "utf-8");
|
|
72264
72411
|
const data = JSON.parse(content);
|
|
72265
72412
|
const project = Project.fromJSON(data);
|
|
72266
72413
|
const sourceIds = args.sourceIds ?? [];
|
|
@@ -72330,8 +72477,8 @@ var init_agent_only = __esm({
|
|
|
72330
72477
|
}),
|
|
72331
72478
|
async execute(args, ctx) {
|
|
72332
72479
|
try {
|
|
72333
|
-
const filePath =
|
|
72334
|
-
const content = await
|
|
72480
|
+
const filePath = resolve84(ctx.workingDirectory, args.project);
|
|
72481
|
+
const content = await readFile55(filePath, "utf-8");
|
|
72335
72482
|
const data = JSON.parse(content);
|
|
72336
72483
|
const project = Project.fromJSON(data);
|
|
72337
72484
|
const clipIds = args.clipIds ?? [];
|
|
@@ -72386,7 +72533,7 @@ var init_agent_only = __esm({
|
|
|
72386
72533
|
async execute(args, ctx) {
|
|
72387
72534
|
try {
|
|
72388
72535
|
const filePath = await resolveTimelineFile(args.project, ctx.workingDirectory);
|
|
72389
|
-
const content = await
|
|
72536
|
+
const content = await readFile55(filePath, "utf-8");
|
|
72390
72537
|
const data = JSON.parse(content);
|
|
72391
72538
|
const project = Project.fromJSON(data);
|
|
72392
72539
|
const what = args.what ?? "clips";
|
|
@@ -72463,7 +72610,7 @@ var init_agent_only = __esm({
|
|
|
72463
72610
|
async execute(args, ctx) {
|
|
72464
72611
|
try {
|
|
72465
72612
|
const filePath = await resolveTimelineFile(args.projectPath, ctx.workingDirectory);
|
|
72466
|
-
const content = await
|
|
72613
|
+
const content = await readFile55(filePath, "utf-8");
|
|
72467
72614
|
const data = JSON.parse(content);
|
|
72468
72615
|
const project = Project.fromJSON(data);
|
|
72469
72616
|
const updates = [];
|
|
@@ -72622,7 +72769,7 @@ var init_agent_only = __esm({
|
|
|
72622
72769
|
}),
|
|
72623
72770
|
async execute(args, ctx) {
|
|
72624
72771
|
try {
|
|
72625
|
-
const absPath =
|
|
72772
|
+
const absPath = resolve84(ctx.workingDirectory, args.path);
|
|
72626
72773
|
const { stdout } = await execSafe(
|
|
72627
72774
|
"ffprobe",
|
|
72628
72775
|
["-v", "quiet", "-print_format", "json", "-show_format", "-show_streams", absPath],
|
|
@@ -72711,10 +72858,10 @@ Audio:`);
|
|
|
72711
72858
|
}),
|
|
72712
72859
|
async execute(args, ctx) {
|
|
72713
72860
|
try {
|
|
72714
|
-
const absInput =
|
|
72861
|
+
const absInput = resolve84(ctx.workingDirectory, args.input);
|
|
72715
72862
|
const ext = args.input.split(".").pop() || "mp4";
|
|
72716
72863
|
const baseName = args.input.replace(/\.[^/.]+$/, "");
|
|
72717
|
-
const outputPath = args.output ?
|
|
72864
|
+
const outputPath = args.output ? resolve84(ctx.workingDirectory, args.output) : resolve84(ctx.workingDirectory, `${baseName}-compressed.${ext}`);
|
|
72718
72865
|
const crfValues = { low: 28, medium: 23, high: 18 };
|
|
72719
72866
|
const crf = crfValues[args.quality ?? "medium"];
|
|
72720
72867
|
await execSafe(
|
|
@@ -72737,8 +72884,8 @@ Audio:`);
|
|
|
72737
72884
|
],
|
|
72738
72885
|
{ maxBuffer: 50 * 1024 * 1024 }
|
|
72739
72886
|
);
|
|
72740
|
-
const inputBuf = await
|
|
72741
|
-
const outputBuf = await
|
|
72887
|
+
const inputBuf = await readFile55(absInput);
|
|
72888
|
+
const outputBuf = await readFile55(outputPath);
|
|
72742
72889
|
const inputSize = inputBuf.length;
|
|
72743
72890
|
const outputSize = outputBuf.length;
|
|
72744
72891
|
const reduction = (inputSize - outputSize) / inputSize * 100;
|
|
@@ -72774,8 +72921,8 @@ Audio:`);
|
|
|
72774
72921
|
}),
|
|
72775
72922
|
async execute(args, ctx) {
|
|
72776
72923
|
try {
|
|
72777
|
-
const absInput =
|
|
72778
|
-
const absOutput =
|
|
72924
|
+
const absInput = resolve84(ctx.workingDirectory, args.input);
|
|
72925
|
+
const absOutput = resolve84(ctx.workingDirectory, args.output);
|
|
72779
72926
|
const codecMap = {
|
|
72780
72927
|
h264: "libx264",
|
|
72781
72928
|
h265: "libx265",
|
|
@@ -72828,11 +72975,11 @@ Audio:`);
|
|
|
72828
72975
|
};
|
|
72829
72976
|
}
|
|
72830
72977
|
try {
|
|
72831
|
-
const absOutput =
|
|
72978
|
+
const absOutput = resolve84(ctx.workingDirectory, args.output);
|
|
72832
72979
|
if (args.reencode) {
|
|
72833
72980
|
const ffmpegArgs = [];
|
|
72834
72981
|
for (const i of args.inputs) {
|
|
72835
|
-
ffmpegArgs.push("-i",
|
|
72982
|
+
ffmpegArgs.push("-i", resolve84(ctx.workingDirectory, i));
|
|
72836
72983
|
}
|
|
72837
72984
|
const filterComplex = args.inputs.map((_, i) => `[${i}:v][${i}:a]`).join("");
|
|
72838
72985
|
ffmpegArgs.push(
|
|
@@ -72847,8 +72994,8 @@ Audio:`);
|
|
|
72847
72994
|
);
|
|
72848
72995
|
await execSafe("ffmpeg", ffmpegArgs, { maxBuffer: 100 * 1024 * 1024 });
|
|
72849
72996
|
} else {
|
|
72850
|
-
const tempList =
|
|
72851
|
-
const listContent = args.inputs.map((i) => `file '${
|
|
72997
|
+
const tempList = resolve84(ctx.workingDirectory, `concat-list-${Date.now()}.txt`);
|
|
72998
|
+
const listContent = args.inputs.map((i) => `file '${resolve84(ctx.workingDirectory, i)}'`).join("\n");
|
|
72852
72999
|
await writeFile59(tempList, listContent, "utf-8");
|
|
72853
73000
|
try {
|
|
72854
73001
|
await execSafe(
|
|
@@ -72945,7 +73092,7 @@ var init_walkthrough = __esm({
|
|
|
72945
73092
|
});
|
|
72946
73093
|
|
|
72947
73094
|
// src/tools/manifest/status.ts
|
|
72948
|
-
import { resolve as
|
|
73095
|
+
import { resolve as resolve85 } from "node:path";
|
|
72949
73096
|
var PROJECT_DIR_DESCRIPTION4, statusJobTool, statusProjectTool, statusTools;
|
|
72950
73097
|
var init_status = __esm({
|
|
72951
73098
|
"src/tools/manifest/status.ts"() {
|
|
@@ -72969,7 +73116,7 @@ var init_status = __esm({
|
|
|
72969
73116
|
output: external_exports.string().optional().describe("Download result media to this path when complete.")
|
|
72970
73117
|
}),
|
|
72971
73118
|
async execute(args, ctx) {
|
|
72972
|
-
const projectDir = args.projectDir ?
|
|
73119
|
+
const projectDir = args.projectDir ? resolve85(ctx.workingDirectory, args.projectDir) : findProjectRoot(ctx.workingDirectory);
|
|
72973
73120
|
const record = await readJobRecord(args.jobId, projectDir);
|
|
72974
73121
|
if (!record) return { success: false, error: `Job not found: ${args.jobId}` };
|
|
72975
73122
|
const result = args.refresh === false ? makeJobStatusResult(record, {
|
|
@@ -72978,7 +73125,7 @@ var init_status = __esm({
|
|
|
72978
73125
|
warnings: []
|
|
72979
73126
|
}) : await refreshJobRecord(record, {
|
|
72980
73127
|
wait: args.wait,
|
|
72981
|
-
output: args.output ?
|
|
73128
|
+
output: args.output ? resolve85(ctx.workingDirectory, args.output) : void 0,
|
|
72982
73129
|
workingDirectory: ctx.workingDirectory
|
|
72983
73130
|
});
|
|
72984
73131
|
return {
|
|
@@ -73003,7 +73150,7 @@ var init_status = __esm({
|
|
|
73003
73150
|
refresh: external_exports.boolean().optional().describe("Refresh active supported jobs before summarizing. Default false.")
|
|
73004
73151
|
}),
|
|
73005
73152
|
async execute(args, ctx) {
|
|
73006
|
-
const projectDir = args.projectDir ?
|
|
73153
|
+
const projectDir = args.projectDir ? resolve85(ctx.workingDirectory, args.projectDir) : ctx.workingDirectory;
|
|
73007
73154
|
const result = await inspectProjectStatus(projectDir, { refresh: args.refresh === true });
|
|
73008
73155
|
return {
|
|
73009
73156
|
success: true,
|
|
@@ -73289,7 +73436,7 @@ init_source();
|
|
|
73289
73436
|
// package.json
|
|
73290
73437
|
var package_default = {
|
|
73291
73438
|
name: "@vibeframe/cli",
|
|
73292
|
-
version: "0.
|
|
73439
|
+
version: "0.112.1",
|
|
73293
73440
|
description: "VibeFrame CLI - agentic video workflow runtime",
|
|
73294
73441
|
private: false,
|
|
73295
73442
|
license: "MIT",
|
|
@@ -80465,12 +80612,12 @@ function resolveCopier() {
|
|
|
80465
80612
|
async function copyToClipboard(text) {
|
|
80466
80613
|
const opener = resolveCopier();
|
|
80467
80614
|
if (!opener) return false;
|
|
80468
|
-
return new Promise((
|
|
80615
|
+
return new Promise((resolve86) => {
|
|
80469
80616
|
let settled = false;
|
|
80470
80617
|
const finish = (ok) => {
|
|
80471
80618
|
if (settled) return;
|
|
80472
80619
|
settled = true;
|
|
80473
|
-
|
|
80620
|
+
resolve86(ok);
|
|
80474
80621
|
};
|
|
80475
80622
|
try {
|
|
80476
80623
|
const child = spawn2(opener.command, opener.args, {
|
|
@@ -84404,13 +84551,13 @@ async function runDiagnostics() {
|
|
|
84404
84551
|
installed = false;
|
|
84405
84552
|
}
|
|
84406
84553
|
} else if (toolName === "chrome") {
|
|
84407
|
-
const { existsSync:
|
|
84554
|
+
const { existsSync: existsSync58 } = await import("node:fs");
|
|
84408
84555
|
const { homedir: homedir8 } = await import("node:os");
|
|
84409
|
-
const { join:
|
|
84556
|
+
const { join: join30 } = await import("node:path");
|
|
84410
84557
|
const chromePaths = [
|
|
84411
84558
|
process.env.HYPERFRAMES_CHROME_PATH,
|
|
84412
84559
|
process.env.CHROME_PATH,
|
|
84413
|
-
|
|
84560
|
+
join30(
|
|
84414
84561
|
homedir8(),
|
|
84415
84562
|
".cache",
|
|
84416
84563
|
"puppeteer",
|
|
@@ -84425,7 +84572,7 @@ async function runDiagnostics() {
|
|
|
84425
84572
|
"/usr/bin/chromium",
|
|
84426
84573
|
"/usr/bin/chromium-browser"
|
|
84427
84574
|
];
|
|
84428
|
-
installed = chromePaths.some((p) => p &&
|
|
84575
|
+
installed = chromePaths.some((p) => p && existsSync58(p));
|
|
84429
84576
|
} else {
|
|
84430
84577
|
installed = commandExists(toolName);
|
|
84431
84578
|
}
|
|
@@ -86277,7 +86424,7 @@ async function startAgent(options = {}) {
|
|
|
86277
86424
|
console.log();
|
|
86278
86425
|
console.log(source_default.dim(" Commands: exit \xB7 reset \xB7 tools \xB7 context"));
|
|
86279
86426
|
console.log();
|
|
86280
|
-
return new Promise((
|
|
86427
|
+
return new Promise((resolve86) => {
|
|
86281
86428
|
if (typeof process.stdin.ref === "function") {
|
|
86282
86429
|
process.stdin.ref();
|
|
86283
86430
|
}
|
|
@@ -86384,7 +86531,7 @@ async function startAgent(options = {}) {
|
|
|
86384
86531
|
clearInterval(keepalive);
|
|
86385
86532
|
console.log();
|
|
86386
86533
|
console.log(source_default.dim("Goodbye!"));
|
|
86387
|
-
|
|
86534
|
+
resolve86();
|
|
86388
86535
|
});
|
|
86389
86536
|
rl.prompt();
|
|
86390
86537
|
});
|