@boxes-dev/dvb-runtime 1.0.190 → 1.0.191
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/bin/dvb.cjs +275 -96
- package/dist/bin/dvb.cjs.map +1 -1
- package/dist/bin/dvbd.cjs +6 -6
- package/dist/devbox/commands/init/codex/events.d.ts +6 -1
- package/dist/devbox/commands/init/codex/events.d.ts.map +1 -1
- package/dist/devbox/commands/init/codex/events.js +171 -77
- package/dist/devbox/commands/init/codex/events.js.map +1 -1
- package/dist/devbox/commands/init/codex/index.js +2 -2
- package/dist/devbox/commands/init/codex/index.js.map +1 -1
- package/dist/devbox/commands/init/codex/local.d.ts +5 -4
- package/dist/devbox/commands/init/codex/local.d.ts.map +1 -1
- package/dist/devbox/commands/init/codex/local.js +28 -12
- package/dist/devbox/commands/init/codex/local.js.map +1 -1
- package/dist/devbox/commands/init/codex/remote.d.ts +2 -1
- package/dist/devbox/commands/init/codex/remote.d.ts.map +1 -1
- package/dist/devbox/commands/init/codex/remote.js +12 -8
- package/dist/devbox/commands/init/codex/remote.js.map +1 -1
- package/dist/devbox/commands/init/scanProgress.d.ts +18 -0
- package/dist/devbox/commands/init/scanProgress.d.ts.map +1 -0
- package/dist/devbox/commands/init/scanProgress.js +54 -0
- package/dist/devbox/commands/init/scanProgress.js.map +1 -0
- package/dist/devbox/commands/init/setupPlanFlow.d.ts.map +1 -1
- package/dist/devbox/commands/init/setupPlanFlow.js +22 -11
- package/dist/devbox/commands/init/setupPlanFlow.js.map +1 -1
- package/package.json +2 -2
package/dist/bin/dvb.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="12cda96d-089f-5b95-b67d-05e388742689")}catch(e){}}();
|
|
4
4
|
|
|
5
5
|
var __create = Object.create;
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
@@ -88688,8 +88688,8 @@ var init_otel = __esm({
|
|
|
88688
88688
|
return trimmed && trimmed.length > 0 ? trimmed : void 0;
|
|
88689
88689
|
};
|
|
88690
88690
|
readBuildMetadata = () => {
|
|
88691
|
-
const rawPackageVersion = "1.0.
|
|
88692
|
-
const rawGitSha = "
|
|
88691
|
+
const rawPackageVersion = "1.0.191";
|
|
88692
|
+
const rawGitSha = "cfde4319652d34938c2d325010794ab69d2e8d60";
|
|
88693
88693
|
const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
|
|
88694
88694
|
const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
|
|
88695
88695
|
return { packageVersion, gitSha };
|
|
@@ -120881,9 +120881,9 @@ var init_sentry = __esm({
|
|
|
120881
120881
|
sentryEnabled = false;
|
|
120882
120882
|
uncaughtExceptionMonitorInstalled = false;
|
|
120883
120883
|
readBuildMetadata2 = () => {
|
|
120884
|
-
const rawPackageVersion = "1.0.
|
|
120885
|
-
const rawGitSha = "
|
|
120886
|
-
const rawSentryRelease = "boxes-dev-dvb@1.0.
|
|
120884
|
+
const rawPackageVersion = "1.0.191";
|
|
120885
|
+
const rawGitSha = "cfde4319652d34938c2d325010794ab69d2e8d60";
|
|
120886
|
+
const rawSentryRelease = "boxes-dev-dvb@1.0.191+cfde4319652d34938c2d325010794ab69d2e8d60";
|
|
120887
120887
|
const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
|
|
120888
120888
|
const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
|
|
120889
120889
|
const sentryRelease = typeof rawSentryRelease === "string" ? rawSentryRelease : void 0;
|
|
@@ -124880,7 +124880,7 @@ var init_packageVersion = __esm({
|
|
|
124880
124880
|
return import_node_path8.default.join(process.cwd(), "dvb");
|
|
124881
124881
|
};
|
|
124882
124882
|
readEmbeddedPackageVersion = () => {
|
|
124883
|
-
const raw = "1.0.
|
|
124883
|
+
const raw = "1.0.191";
|
|
124884
124884
|
return trimVersion(raw);
|
|
124885
124885
|
};
|
|
124886
124886
|
readNearestPackageMetadata = (basePath) => {
|
|
@@ -215309,7 +215309,7 @@ var init_prompts = __esm({
|
|
|
215309
215309
|
});
|
|
215310
215310
|
|
|
215311
215311
|
// src/devbox/commands/init/codex/events.ts
|
|
215312
|
-
var stripAnsi2, extractBoldText, normalizeProgressMessage, toRecord, stripShellWrapper,
|
|
215312
|
+
var stripAnsi2, extractBoldText, normalizeProgressMessage, toRecord, toProgressUpdate, truncate2, stripShellWrapper, splitShellSegments, tokenizeShellSegment, unquoteToken, isEnvAssignment, isRedirectionToken, isPathLikeToken, isSimpleWordToken, isOptionToken, isInformativeSimpleToken, summarizeShellSegment, isNoopCommandSummary, summarizeCommandSequence, summarizeCommandExecution, extractCommandExecutionProgress, extractTodoListProgress, extractProgressUpdateFromJsonLine, extractThreadIdFromJsonLine, extractTurnFailureFromJsonLine;
|
|
215313
215313
|
var init_events = __esm({
|
|
215314
215314
|
"src/devbox/commands/init/codex/events.ts"() {
|
|
215315
215315
|
"use strict";
|
|
@@ -215330,6 +215330,11 @@ var init_events = __esm({
|
|
|
215330
215330
|
return normalized;
|
|
215331
215331
|
};
|
|
215332
215332
|
toRecord = (value) => typeof value === "object" && value !== null ? value : null;
|
|
215333
|
+
toProgressUpdate = (kind, value) => {
|
|
215334
|
+
const message = normalizeProgressMessage(value);
|
|
215335
|
+
return message ? { kind, message } : null;
|
|
215336
|
+
};
|
|
215337
|
+
truncate2 = (value, max = 72) => value.length <= max ? value : `${value.slice(0, max - 3).trimEnd()}...`;
|
|
215333
215338
|
stripShellWrapper = (command) => {
|
|
215334
215339
|
const trimmed = command.trim();
|
|
215335
215340
|
const shellMatch = trimmed.match(/^\/bin\/(?:bash|zsh|sh)\s+-lc\s+([\s\S]+)$/);
|
|
@@ -215339,56 +215344,139 @@ var init_events = __esm({
|
|
|
215339
215344
|
}
|
|
215340
215345
|
return unwrapped;
|
|
215341
215346
|
};
|
|
215342
|
-
|
|
215343
|
-
const
|
|
215344
|
-
|
|
215345
|
-
|
|
215346
|
-
|
|
215347
|
-
|
|
215348
|
-
|
|
215349
|
-
|
|
215350
|
-
|
|
215351
|
-
|
|
215352
|
-
|
|
215353
|
-
|
|
215354
|
-
|
|
215355
|
-
|
|
215356
|
-
|
|
215357
|
-
|
|
215358
|
-
|
|
215359
|
-
|
|
215360
|
-
|
|
215361
|
-
|
|
215362
|
-
|
|
215363
|
-
|
|
215364
|
-
|
|
215365
|
-
|
|
215366
|
-
|
|
215367
|
-
|
|
215368
|
-
|
|
215369
|
-
|
|
215370
|
-
|
|
215371
|
-
|
|
215372
|
-
|
|
215373
|
-
|
|
215374
|
-
|
|
215375
|
-
|
|
215376
|
-
|
|
215377
|
-
|
|
215378
|
-
|
|
215379
|
-
|
|
215380
|
-
|
|
215381
|
-
|
|
215382
|
-
return "scan docs for required tooling";
|
|
215347
|
+
splitShellSegments = (script) => {
|
|
215348
|
+
const segments = [];
|
|
215349
|
+
let current = "";
|
|
215350
|
+
let quote = null;
|
|
215351
|
+
for (let idx = 0; idx < script.length; idx += 1) {
|
|
215352
|
+
const ch = script[idx];
|
|
215353
|
+
const next = script[idx + 1] ?? "";
|
|
215354
|
+
const prev = script[idx - 1] ?? "";
|
|
215355
|
+
if (quote) {
|
|
215356
|
+
current += ch;
|
|
215357
|
+
if (ch === quote && prev !== "\\") {
|
|
215358
|
+
quote = null;
|
|
215359
|
+
}
|
|
215360
|
+
continue;
|
|
215361
|
+
}
|
|
215362
|
+
if (ch === "'" || ch === '"' || ch === "`") {
|
|
215363
|
+
quote = ch;
|
|
215364
|
+
current += ch;
|
|
215365
|
+
continue;
|
|
215366
|
+
}
|
|
215367
|
+
if (ch === "\n" || ch === ";") {
|
|
215368
|
+
const segment = current.trim();
|
|
215369
|
+
if (segment) segments.push(segment);
|
|
215370
|
+
current = "";
|
|
215371
|
+
continue;
|
|
215372
|
+
}
|
|
215373
|
+
if ((ch === "&" || ch === "|") && next === ch) {
|
|
215374
|
+
const segment = current.trim();
|
|
215375
|
+
if (segment) segments.push(segment);
|
|
215376
|
+
current = "";
|
|
215377
|
+
idx += 1;
|
|
215378
|
+
continue;
|
|
215379
|
+
}
|
|
215380
|
+
if (ch === "|") {
|
|
215381
|
+
const segment = current.trim();
|
|
215382
|
+
if (segment) segments.push(segment);
|
|
215383
|
+
current = "";
|
|
215384
|
+
continue;
|
|
215385
|
+
}
|
|
215386
|
+
current += ch;
|
|
215383
215387
|
}
|
|
215384
|
-
|
|
215385
|
-
|
|
215386
|
-
|
|
215387
|
-
|
|
215388
|
+
const tail = current.trim();
|
|
215389
|
+
if (tail) segments.push(tail);
|
|
215390
|
+
return segments;
|
|
215391
|
+
};
|
|
215392
|
+
tokenizeShellSegment = (segment) => {
|
|
215393
|
+
const tokens = [];
|
|
215394
|
+
let current = "";
|
|
215395
|
+
let quote = null;
|
|
215396
|
+
for (let idx = 0; idx < segment.length; idx += 1) {
|
|
215397
|
+
const ch = segment[idx];
|
|
215398
|
+
const prev = segment[idx - 1] ?? "";
|
|
215399
|
+
if (quote) {
|
|
215400
|
+
current += ch;
|
|
215401
|
+
if (ch === quote && prev !== "\\") {
|
|
215402
|
+
quote = null;
|
|
215403
|
+
}
|
|
215404
|
+
continue;
|
|
215405
|
+
}
|
|
215406
|
+
if (ch === "'" || ch === '"' || ch === "`") {
|
|
215407
|
+
quote = ch;
|
|
215408
|
+
current += ch;
|
|
215409
|
+
continue;
|
|
215410
|
+
}
|
|
215411
|
+
if (/\s/.test(ch)) {
|
|
215412
|
+
if (current) {
|
|
215413
|
+
tokens.push(current);
|
|
215414
|
+
current = "";
|
|
215415
|
+
}
|
|
215416
|
+
continue;
|
|
215417
|
+
}
|
|
215418
|
+
current += ch;
|
|
215388
215419
|
}
|
|
215389
|
-
if (
|
|
215390
|
-
|
|
215391
|
-
|
|
215420
|
+
if (current) tokens.push(current);
|
|
215421
|
+
return tokens;
|
|
215422
|
+
};
|
|
215423
|
+
unquoteToken = (token) => {
|
|
215424
|
+
const trimmed = token.trim();
|
|
215425
|
+
const unwrapped = trimmed.startsWith("'") && trimmed.endsWith("'") || trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("`") && trimmed.endsWith("`") ? trimmed.slice(1, -1) : trimmed;
|
|
215426
|
+
return unwrapped.replace(/\\(["'`\\])/g, "$1").replace(/[\[\]{}]/g, "").trim();
|
|
215427
|
+
};
|
|
215428
|
+
isEnvAssignment = (token) => /^[A-Za-z_][A-Za-z0-9_]*=.*/.test(token);
|
|
215429
|
+
isRedirectionToken = (token) => token === "|" || token === "<" || token === ">" || token === ">>" || /^[0-9]*[<>]/.test(token);
|
|
215430
|
+
isPathLikeToken = (token) => !/\s/.test(token) && /[./]/.test(token) && !token.startsWith("!") && !/[*?()[\]{}|\\]/.test(token);
|
|
215431
|
+
isSimpleWordToken = (token) => /^[A-Za-z0-9_.:-]+$/.test(token) && !isPathLikeToken(token);
|
|
215432
|
+
isOptionToken = (token) => /^--?[A-Za-z0-9][A-Za-z0-9-]*$/.test(token);
|
|
215433
|
+
isInformativeSimpleToken = (token) => isSimpleWordToken(token) && !/^\d+$/.test(token) && token.length > 1;
|
|
215434
|
+
summarizeShellSegment = (segment) => {
|
|
215435
|
+
const tokens = tokenizeShellSegment(segment).map((token) => unquoteToken(token)).filter((token) => token.length > 0);
|
|
215436
|
+
if (tokens.length === 0) return "shell command";
|
|
215437
|
+
let start = 0;
|
|
215438
|
+
while (start < tokens.length && isEnvAssignment(tokens[start])) {
|
|
215439
|
+
start += 1;
|
|
215440
|
+
}
|
|
215441
|
+
const commandTokens = tokens.slice(start);
|
|
215442
|
+
if (commandTokens.length === 0) return "shell command";
|
|
215443
|
+
const executable = commandTokens[0];
|
|
215444
|
+
if (executable === "command" && commandTokens[1] === "-v" && commandTokens[2]) {
|
|
215445
|
+
return truncate2(`command -v ${commandTokens[2]}`);
|
|
215446
|
+
}
|
|
215447
|
+
const args = commandTokens.slice(1).filter((token) => !isRedirectionToken(token));
|
|
215448
|
+
const nonOptionArgs = args.filter((token) => !isOptionToken(token));
|
|
215449
|
+
const simpleSubcommand = nonOptionArgs.find((token) => isInformativeSimpleToken(token)) ?? null;
|
|
215450
|
+
if (simpleSubcommand) {
|
|
215451
|
+
return truncate2(`${executable} ${simpleSubcommand}`);
|
|
215452
|
+
}
|
|
215453
|
+
const pathArg = nonOptionArgs.find((token) => isPathLikeToken(token)) ?? null;
|
|
215454
|
+
if (pathArg) {
|
|
215455
|
+
return truncate2(`${executable} ${pathArg}`);
|
|
215456
|
+
}
|
|
215457
|
+
const optionArg = args.find((token) => isOptionToken(token)) ?? null;
|
|
215458
|
+
if (optionArg) {
|
|
215459
|
+
return truncate2(`${executable} ${optionArg}`);
|
|
215460
|
+
}
|
|
215461
|
+
return truncate2(executable);
|
|
215462
|
+
};
|
|
215463
|
+
isNoopCommandSummary = (summary) => summary === ":" || summary === "true";
|
|
215464
|
+
summarizeCommandSequence = (segments) => {
|
|
215465
|
+
const meaningful = segments.filter((segment) => !isNoopCommandSummary(segment));
|
|
215466
|
+
if (meaningful.length === 0) return "shell command";
|
|
215467
|
+
const probeTarget = meaningful[0]?.match(/^command -v (.+)$/)?.[1] ?? null;
|
|
215468
|
+
const reduced = probeTarget && meaningful[1]?.startsWith(`${probeTarget} `) ? meaningful.slice(1) : meaningful;
|
|
215469
|
+
if (reduced.length === 1) return reduced[0];
|
|
215470
|
+
const previewLimit = 3;
|
|
215471
|
+
const preview = reduced.slice(0, previewLimit).join("; ");
|
|
215472
|
+
if (reduced.length <= previewLimit) return truncate2(preview);
|
|
215473
|
+
return truncate2(`${preview}; +${reduced.length - previewLimit} more`);
|
|
215474
|
+
};
|
|
215475
|
+
summarizeCommandExecution = (command) => {
|
|
215476
|
+
const segments = splitShellSegments(stripShellWrapper(command)).map(
|
|
215477
|
+
summarizeShellSegment
|
|
215478
|
+
);
|
|
215479
|
+
return summarizeCommandSequence(segments);
|
|
215392
215480
|
};
|
|
215393
215481
|
extractCommandExecutionProgress = (record, item) => {
|
|
215394
215482
|
if (item.type !== "command_execution" || typeof item.command !== "string") {
|
|
@@ -215400,12 +215488,12 @@ var init_events = __esm({
|
|
|
215400
215488
|
const status = typeof item.status === "string" ? item.status : null;
|
|
215401
215489
|
if (recordType === "item.completed" || status === "completed") {
|
|
215402
215490
|
if (exitCode !== null && exitCode !== 0) {
|
|
215403
|
-
return
|
|
215491
|
+
return toProgressUpdate("command", `failed ${summary} (exit ${exitCode})`);
|
|
215404
215492
|
}
|
|
215405
|
-
return
|
|
215493
|
+
return toProgressUpdate("command", `done ${summary}`);
|
|
215406
215494
|
}
|
|
215407
215495
|
if (recordType === "item.started" || status === "in_progress") {
|
|
215408
|
-
return
|
|
215496
|
+
return toProgressUpdate("command", `run ${summary}`);
|
|
215409
215497
|
}
|
|
215410
215498
|
return null;
|
|
215411
215499
|
};
|
|
@@ -215419,9 +215507,9 @@ var init_events = __esm({
|
|
|
215419
215507
|
const pending = entries.find((entry) => entry.completed !== true) ?? entries.at(-1) ?? null;
|
|
215420
215508
|
const pendingText = pending && typeof pending.text === "string" ? pending.text : null;
|
|
215421
215509
|
const summary = pendingText ? `${completedCount}/${entries.length} ${pendingText}` : `${completedCount}/${entries.length} todo items`;
|
|
215422
|
-
return
|
|
215510
|
+
return toProgressUpdate("todo", summary);
|
|
215423
215511
|
};
|
|
215424
|
-
|
|
215512
|
+
extractProgressUpdateFromJsonLine = (line) => {
|
|
215425
215513
|
const trimmed = line.trim();
|
|
215426
215514
|
if (!trimmed.startsWith("{")) return null;
|
|
215427
215515
|
let parsed;
|
|
@@ -215433,17 +215521,19 @@ var init_events = __esm({
|
|
|
215433
215521
|
const record = toRecord(parsed);
|
|
215434
215522
|
if (!record) return null;
|
|
215435
215523
|
if (record.type === "error" && typeof record.message === "string") {
|
|
215436
|
-
return
|
|
215524
|
+
return toProgressUpdate("command", record.message);
|
|
215437
215525
|
}
|
|
215438
215526
|
if (record.type === "reasoning") {
|
|
215439
|
-
return
|
|
215527
|
+
return toProgressUpdate(
|
|
215528
|
+
"reasoning",
|
|
215440
215529
|
extractBoldText(String(record.text ?? "")) ?? String(record.text ?? "")
|
|
215441
215530
|
);
|
|
215442
215531
|
}
|
|
215443
215532
|
const item = toRecord(record.item);
|
|
215444
215533
|
if (!item) return null;
|
|
215445
215534
|
if (item.type === "reasoning") {
|
|
215446
|
-
return
|
|
215535
|
+
return toProgressUpdate(
|
|
215536
|
+
"reasoning",
|
|
215447
215537
|
extractBoldText(String(item.text ?? "")) ?? String(item.text ?? "")
|
|
215448
215538
|
);
|
|
215449
215539
|
}
|
|
@@ -215451,7 +215541,8 @@ var init_events = __esm({
|
|
|
215451
215541
|
if (commandProgress) return commandProgress;
|
|
215452
215542
|
const todoProgress = extractTodoListProgress(item);
|
|
215453
215543
|
if (todoProgress) return todoProgress;
|
|
215454
|
-
return
|
|
215544
|
+
return toProgressUpdate(
|
|
215545
|
+
"reasoning",
|
|
215455
215546
|
extractBoldText(String(item.text ?? "")) ?? String(item.text ?? "")
|
|
215456
215547
|
);
|
|
215457
215548
|
};
|
|
@@ -216022,7 +216113,7 @@ fi`
|
|
|
216022
216113
|
let stderrBuffer = "";
|
|
216023
216114
|
let exitCode = null;
|
|
216024
216115
|
let resolved = false;
|
|
216025
|
-
let
|
|
216116
|
+
let lastProgressKey = null;
|
|
216026
216117
|
let threadId2 = null;
|
|
216027
216118
|
const handleLine = (line) => {
|
|
216028
216119
|
const clean = stripAnsi2(line);
|
|
@@ -216033,18 +216124,21 @@ fi`
|
|
|
216033
216124
|
}
|
|
216034
216125
|
}
|
|
216035
216126
|
if (!onProgress) return;
|
|
216036
|
-
const parsed =
|
|
216127
|
+
const parsed = extractProgressUpdateFromJsonLine(clean);
|
|
216037
216128
|
if (parsed) {
|
|
216038
|
-
|
|
216039
|
-
|
|
216129
|
+
const progressKey2 = `${parsed.kind}:${parsed.message}`;
|
|
216130
|
+
if (progressKey2 === lastProgressKey) return;
|
|
216131
|
+
lastProgressKey = progressKey2;
|
|
216040
216132
|
onProgress(parsed);
|
|
216041
216133
|
return;
|
|
216042
216134
|
}
|
|
216043
216135
|
if (clean.trimStart().startsWith("{")) return;
|
|
216044
216136
|
const bold = normalizeProgressMessage(extractBoldText(clean));
|
|
216045
|
-
if (!bold
|
|
216046
|
-
|
|
216047
|
-
|
|
216137
|
+
if (!bold) return;
|
|
216138
|
+
const progressKey = `reasoning:${bold}`;
|
|
216139
|
+
if (progressKey === lastProgressKey) return;
|
|
216140
|
+
lastProgressKey = progressKey;
|
|
216141
|
+
onProgress({ kind: "reasoning", message: bold });
|
|
216048
216142
|
};
|
|
216049
216143
|
const handleChunk = (text, buffer, update, sink) => {
|
|
216050
216144
|
let next = buffer + text;
|
|
@@ -216943,7 +217037,7 @@ ${turnFailedMessage}` : combinedOutput;
|
|
|
216943
217037
|
let stderr = "";
|
|
216944
217038
|
let stdoutBuffer = "";
|
|
216945
217039
|
let stderrBuffer = "";
|
|
216946
|
-
let
|
|
217040
|
+
let lastProgressKey = null;
|
|
216947
217041
|
let threadId2 = null;
|
|
216948
217042
|
let turnFailedMessage = null;
|
|
216949
217043
|
const handleLine = (line) => {
|
|
@@ -216959,18 +217053,21 @@ ${turnFailedMessage}` : combinedOutput;
|
|
|
216959
217053
|
turnFailedMessage = parsedTurnFailure;
|
|
216960
217054
|
}
|
|
216961
217055
|
if (!onProgress) return;
|
|
216962
|
-
const parsed =
|
|
217056
|
+
const parsed = extractProgressUpdateFromJsonLine(clean);
|
|
216963
217057
|
if (parsed) {
|
|
216964
|
-
|
|
216965
|
-
|
|
217058
|
+
const progressKey2 = `${parsed.kind}:${parsed.message}`;
|
|
217059
|
+
if (progressKey2 === lastProgressKey) return;
|
|
217060
|
+
lastProgressKey = progressKey2;
|
|
216966
217061
|
onProgress(parsed);
|
|
216967
217062
|
return;
|
|
216968
217063
|
}
|
|
216969
217064
|
if (clean.trimStart().startsWith("{")) return;
|
|
216970
217065
|
const bold = normalizeProgressMessage(extractBoldText(clean));
|
|
216971
|
-
if (!bold
|
|
216972
|
-
|
|
216973
|
-
|
|
217066
|
+
if (!bold) return;
|
|
217067
|
+
const progressKey = `reasoning:${bold}`;
|
|
217068
|
+
if (progressKey === lastProgressKey) return;
|
|
217069
|
+
lastProgressKey = progressKey;
|
|
217070
|
+
onProgress({ kind: "reasoning", message: bold });
|
|
216974
217071
|
};
|
|
216975
217072
|
const consume = (chunk, buffer, update) => {
|
|
216976
217073
|
let next = buffer + chunk.toString();
|
|
@@ -217120,7 +217217,10 @@ ${stdout}`;
|
|
|
217120
217217
|
trustedPaths: [cwd],
|
|
217121
217218
|
...onProgress ? {
|
|
217122
217219
|
onRetry: (info) => {
|
|
217123
|
-
onProgress(
|
|
217220
|
+
onProgress({
|
|
217221
|
+
kind: "command",
|
|
217222
|
+
message: formatCodexRetryProgress(info)
|
|
217223
|
+
});
|
|
217124
217224
|
}
|
|
217125
217225
|
} : {}
|
|
217126
217226
|
}
|
|
@@ -217201,7 +217301,10 @@ ${stdout}`;
|
|
|
217201
217301
|
trustedPaths: homeDir2 ? [cwd, homeDir2] : [cwd],
|
|
217202
217302
|
...onProgress ? {
|
|
217203
217303
|
onRetry: (info) => {
|
|
217204
|
-
onProgress(
|
|
217304
|
+
onProgress({
|
|
217305
|
+
kind: "command",
|
|
217306
|
+
message: formatCodexRetryProgress(info)
|
|
217307
|
+
});
|
|
217205
217308
|
}
|
|
217206
217309
|
} : {}
|
|
217207
217310
|
}
|
|
@@ -217273,7 +217376,10 @@ ${stdout}`;
|
|
|
217273
217376
|
trustedPaths: [cwd],
|
|
217274
217377
|
...onProgress ? {
|
|
217275
217378
|
onRetry: (info) => {
|
|
217276
|
-
onProgress(
|
|
217379
|
+
onProgress({
|
|
217380
|
+
kind: "command",
|
|
217381
|
+
message: formatCodexRetryProgress(info)
|
|
217382
|
+
});
|
|
217277
217383
|
}
|
|
217278
217384
|
} : {}
|
|
217279
217385
|
}
|
|
@@ -217354,7 +217460,10 @@ ${stdout}`;
|
|
|
217354
217460
|
trustedPaths: homeDir2 ? [cwd, homeDir2] : [cwd],
|
|
217355
217461
|
...onProgress ? {
|
|
217356
217462
|
onRetry: (info) => {
|
|
217357
|
-
onProgress(
|
|
217463
|
+
onProgress({
|
|
217464
|
+
kind: "command",
|
|
217465
|
+
message: formatCodexRetryProgress(info)
|
|
217466
|
+
});
|
|
217358
217467
|
}
|
|
217359
217468
|
} : {}
|
|
217360
217469
|
}
|
|
@@ -218640,8 +218749,8 @@ codex login`
|
|
|
218640
218749
|
"-c",
|
|
218641
218750
|
remoteCodexCommand
|
|
218642
218751
|
],
|
|
218643
|
-
onProgress: (
|
|
218644
|
-
status.stage(`Apply setup plan - ${message}`);
|
|
218752
|
+
onProgress: (update) => {
|
|
218753
|
+
status.stage(`Apply setup plan - ${update.message}`);
|
|
218645
218754
|
}
|
|
218646
218755
|
});
|
|
218647
218756
|
let attemptLastMessage = "";
|
|
@@ -218705,6 +218814,66 @@ codex login`
|
|
|
218705
218814
|
}
|
|
218706
218815
|
});
|
|
218707
218816
|
|
|
218817
|
+
// src/devbox/commands/init/scanProgress.ts
|
|
218818
|
+
var createInitialScanRowState, applyScanRowStatus, applyScanRowProgressUpdate, formatScanRow;
|
|
218819
|
+
var init_scanProgress = __esm({
|
|
218820
|
+
"src/devbox/commands/init/scanProgress.ts"() {
|
|
218821
|
+
"use strict";
|
|
218822
|
+
createInitialScanRowState = (status) => ({
|
|
218823
|
+
status,
|
|
218824
|
+
todo: null,
|
|
218825
|
+
reasoning: null,
|
|
218826
|
+
command: null
|
|
218827
|
+
});
|
|
218828
|
+
applyScanRowStatus = (state, status) => ({
|
|
218829
|
+
status,
|
|
218830
|
+
todo: null,
|
|
218831
|
+
reasoning: null,
|
|
218832
|
+
command: null
|
|
218833
|
+
});
|
|
218834
|
+
applyScanRowProgressUpdate = (state, update) => {
|
|
218835
|
+
if (update.kind === "todo") {
|
|
218836
|
+
return {
|
|
218837
|
+
status: null,
|
|
218838
|
+
todo: update.message,
|
|
218839
|
+
reasoning: null,
|
|
218840
|
+
command: null
|
|
218841
|
+
};
|
|
218842
|
+
}
|
|
218843
|
+
if (update.kind === "reasoning") {
|
|
218844
|
+
return {
|
|
218845
|
+
...state,
|
|
218846
|
+
status: null,
|
|
218847
|
+
reasoning: update.message,
|
|
218848
|
+
command: null
|
|
218849
|
+
};
|
|
218850
|
+
}
|
|
218851
|
+
return {
|
|
218852
|
+
...state,
|
|
218853
|
+
status: null,
|
|
218854
|
+
command: update.message
|
|
218855
|
+
};
|
|
218856
|
+
};
|
|
218857
|
+
formatScanRow = ({
|
|
218858
|
+
label,
|
|
218859
|
+
state,
|
|
218860
|
+
formatLabel
|
|
218861
|
+
}) => {
|
|
218862
|
+
const primary = state.todo ?? state.status ?? state.reasoning ?? state.command ?? "starting";
|
|
218863
|
+
const lines = [primary];
|
|
218864
|
+
if (state.reasoning && state.reasoning !== primary) {
|
|
218865
|
+
lines.push(state.reasoning);
|
|
218866
|
+
}
|
|
218867
|
+
if (state.command && state.command !== primary && state.command !== state.reasoning) {
|
|
218868
|
+
lines.push(state.command);
|
|
218869
|
+
}
|
|
218870
|
+
const prefix = `${formatLabel(label)}: `;
|
|
218871
|
+
const indent = " ".repeat(label.length + 2);
|
|
218872
|
+
return lines.map((line, index) => `${index === 0 ? prefix : indent}${line}`).join("\n");
|
|
218873
|
+
};
|
|
218874
|
+
}
|
|
218875
|
+
});
|
|
218876
|
+
|
|
218708
218877
|
// src/devbox/commands/init/setupArtifactsValidation.ts
|
|
218709
218878
|
var import_promises28, import_node_path32, expandHomePath2, resolveArtifactSourcePath, isMissingPathError, addMissingForCategory, collectMissingSetupArtifacts, remapSelectedPathEntries;
|
|
218710
218879
|
var init_setupArtifactsValidation = __esm({
|
|
@@ -218845,6 +219014,7 @@ var init_setupPlanFlow = __esm({
|
|
|
218845
219014
|
init_codex();
|
|
218846
219015
|
init_scanStatus();
|
|
218847
219016
|
init_progress();
|
|
219017
|
+
init_scanProgress();
|
|
218848
219018
|
init_setupArtifactsValidation();
|
|
218849
219019
|
SETUP_ARTIFACT_REGEN_MAX_ATTEMPTS = 3;
|
|
218850
219020
|
toPosixPath2 = (value) => value.split(import_node_path33.default.sep).join(import_node_path33.default.posix.sep);
|
|
@@ -219246,17 +219416,26 @@ var init_setupPlanFlow = __esm({
|
|
|
219246
219416
|
const resetColor = "\x1B[39m";
|
|
219247
219417
|
return `${undim}${teal}${bold}${label}${resetColor}${undim}${dim}`;
|
|
219248
219418
|
};
|
|
219249
|
-
const formatRow = (label, message) => {
|
|
219250
|
-
const normalized = message.replace(/\r?\n/g, " ").trim();
|
|
219251
|
-
return `${colorCategory(label)}: ${normalized}`;
|
|
219252
|
-
};
|
|
219253
219419
|
const envSecretsRow = log3.group("");
|
|
219254
219420
|
const externalRow = log3.group("");
|
|
219255
219421
|
const extraArtifactsRow = log3.group("");
|
|
219256
219422
|
const servicesRow = log3.group("");
|
|
219257
|
-
const makeUpdater = (row, label) =>
|
|
219258
|
-
|
|
219259
|
-
|
|
219423
|
+
const makeUpdater = (row, label) => {
|
|
219424
|
+
let state = createInitialScanRowState("starting");
|
|
219425
|
+
const render = () => {
|
|
219426
|
+
row.message(
|
|
219427
|
+
formatScanRow({
|
|
219428
|
+
label,
|
|
219429
|
+
state,
|
|
219430
|
+
formatLabel: colorCategory
|
|
219431
|
+
})
|
|
219432
|
+
);
|
|
219433
|
+
};
|
|
219434
|
+
return (message) => {
|
|
219435
|
+
if (!active) return;
|
|
219436
|
+
state = typeof message === "string" ? applyScanRowStatus(state, message) : applyScanRowProgressUpdate(state, message);
|
|
219437
|
+
render();
|
|
219438
|
+
};
|
|
219260
219439
|
};
|
|
219261
219440
|
const updateEnvSecrets = makeUpdater(envSecretsRow, "env/secrets");
|
|
219262
219441
|
const updateExternal = makeUpdater(externalRow, "external");
|
|
@@ -219386,7 +219565,7 @@ var init_setupPlanFlow = __esm({
|
|
|
219386
219565
|
envSecretsMissing
|
|
219387
219566
|
),
|
|
219388
219567
|
...initCodexProxyOptions ? { proxyOptions: initCodexProxyOptions } : {},
|
|
219389
|
-
onProgress: (
|
|
219568
|
+
onProgress: (update) => status.stage(`Rescan env/secrets - ${update.message}`)
|
|
219390
219569
|
});
|
|
219391
219570
|
saveScanThreadId("envSecretsThreadId", threadId2);
|
|
219392
219571
|
},
|
|
@@ -219431,7 +219610,7 @@ var init_setupPlanFlow = __esm({
|
|
|
219431
219610
|
externalMissing
|
|
219432
219611
|
),
|
|
219433
219612
|
...initCodexProxyOptions ? { proxyOptions: initCodexProxyOptions } : {},
|
|
219434
|
-
onProgress: (
|
|
219613
|
+
onProgress: (update) => status.stage(`Rescan external - ${update.message}`)
|
|
219435
219614
|
});
|
|
219436
219615
|
saveScanThreadId("externalThreadId", threadId2);
|
|
219437
219616
|
},
|
|
@@ -219471,7 +219650,7 @@ var init_setupPlanFlow = __esm({
|
|
|
219471
219650
|
extraArtifactsMissing
|
|
219472
219651
|
),
|
|
219473
219652
|
...initCodexProxyOptions ? { proxyOptions: initCodexProxyOptions } : {},
|
|
219474
|
-
onProgress: (
|
|
219653
|
+
onProgress: (update) => status.stage(`Rescan extra artifacts - ${update.message}`)
|
|
219475
219654
|
});
|
|
219476
219655
|
saveScanThreadId("extraArtifactsThreadId", threadId2);
|
|
219477
219656
|
},
|
|
@@ -230071,4 +230250,4 @@ smol-toml/dist/index.js:
|
|
|
230071
230250
|
*/
|
|
230072
230251
|
//# sourceMappingURL=dvb.cjs.map
|
|
230073
230252
|
|
|
230074
|
-
//# debugId=
|
|
230253
|
+
//# debugId=12cda96d-089f-5b95-b67d-05e388742689
|