@boxes-dev/dvb 1.0.71 → 1.0.73
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 +72 -19
- package/dist/bin/dvb.cjs.map +1 -1
- package/dist/bin/dvbd.cjs +5 -5
- package/dist/devbox/commands/init/codex/index.d.ts.map +1 -1
- package/dist/devbox/commands/init/codex/index.js +33 -5
- package/dist/devbox/commands/init/codex/index.js.map +1 -1
- package/dist/devbox/commands/init/codex/remote.d.ts.map +1 -1
- package/dist/devbox/commands/init/codex/remote.js +32 -4
- package/dist/devbox/commands/init/codex/remote.js.map +1 -1
- package/dist/devbox/commands/init/remote.js +1 -1
- package/dist/devbox/commands/init/remote.js.map +1 -1
- package/package.json +1 -1
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]="d3ae73b4-6c3c-5544-ba77-9fde7bd58dbe")}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.73";
|
|
88692
|
+
const rawGitSha = "24992cdd94ad7d517d34e0628755d0eb5a3af3a6";
|
|
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 };
|
|
@@ -120679,9 +120679,9 @@ var init_sentry = __esm({
|
|
|
120679
120679
|
sentryEnabled = false;
|
|
120680
120680
|
uncaughtExceptionMonitorInstalled = false;
|
|
120681
120681
|
readBuildMetadata2 = () => {
|
|
120682
|
-
const rawPackageVersion = "1.0.
|
|
120683
|
-
const rawGitSha = "
|
|
120684
|
-
const rawSentryRelease = "boxes-dev-dvb@1.0.
|
|
120682
|
+
const rawPackageVersion = "1.0.73";
|
|
120683
|
+
const rawGitSha = "24992cdd94ad7d517d34e0628755d0eb5a3af3a6";
|
|
120684
|
+
const rawSentryRelease = "boxes-dev-dvb@1.0.73+24992cdd94ad7d517d34e0628755d0eb5a3af3a6";
|
|
120685
120685
|
const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
|
|
120686
120686
|
const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
|
|
120687
120687
|
const sentryRelease = typeof rawSentryRelease === "string" ? rawSentryRelease : void 0;
|
|
@@ -204402,7 +204402,7 @@ ${canonicalBlock}
|
|
|
204402
204402
|
'if [ -f "$pid_file" ]; then',
|
|
204403
204403
|
' mux_pid="$(cat "$pid_file" 2>/dev/null || true)"',
|
|
204404
204404
|
' if [ -n "$mux_pid" ] && kill -0 "$mux_pid" 2>/dev/null; then',
|
|
204405
|
-
' if ps -p "$mux_pid" -o
|
|
204405
|
+
' if ps -p "$mux_pid" -o args= 2>/dev/null | grep -F "wezterm-mux-server" >/dev/null 2>&1; then',
|
|
204406
204406
|
" mux_running=1",
|
|
204407
204407
|
" else",
|
|
204408
204408
|
' mux_pid=""',
|
|
@@ -206211,7 +206211,7 @@ var init_prompts = __esm({
|
|
|
206211
206211
|
});
|
|
206212
206212
|
|
|
206213
206213
|
// src/devbox/commands/init/codex/remote.ts
|
|
206214
|
-
var import_node_child_process8, stripAnsi2, extractBoldText, extractAuthUrl, extractLocalPort, isRelayForbidden, isRelayMissingOpenAiProxyConfiguration, buildEntrypointsBlock, resolveRemoteApplyTemplateName, renderRemoteApplyPromptFromTemplate, renderRemoteApplyPrompt, openBrowser3, ensureRemoteCodexInstalled, isRemoteCodexLoggedIn, runRemoteCodexLogin, runRemoteCodexExec;
|
|
206214
|
+
var import_node_child_process8, stripAnsi2, extractBoldText, extractAuthUrl, extractLocalPort, isRelayForbidden, isRelayMissingOpenAiProxyConfiguration, summarizeExecOutput, buildEntrypointsBlock, resolveRemoteApplyTemplateName, renderRemoteApplyPromptFromTemplate, renderRemoteApplyPrompt, openBrowser3, ensureRemoteCodexInstalled, isRemoteCodexLoggedIn, runRemoteCodexLogin, runRemoteCodexExec;
|
|
206215
206215
|
var init_remote2 = __esm({
|
|
206216
206216
|
"src/devbox/commands/init/codex/remote.ts"() {
|
|
206217
206217
|
"use strict";
|
|
@@ -206245,6 +206245,17 @@ var init_remote2 = __esm({
|
|
|
206245
206245
|
};
|
|
206246
206246
|
isRelayForbidden = (value) => /(unexpected status 403 Forbidden|403 Forbidden: forbidden)/i.test(value) && /\/v1\/responses/i.test(value);
|
|
206247
206247
|
isRelayMissingOpenAiProxyConfiguration = (value) => /unexpected status 503 Service Unavailable/i.test(value) && /missing OpenAI proxy configuration/i.test(value) && /\/v1\/responses/i.test(value);
|
|
206248
|
+
summarizeExecOutput = (stderr, stdout) => {
|
|
206249
|
+
const summarize = (value) => {
|
|
206250
|
+
const cleaned = stripAnsi2(value);
|
|
206251
|
+
const lines = cleaned.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0);
|
|
206252
|
+
if (lines.length === 0) return null;
|
|
206253
|
+
const summary = lines.slice(-3).join(" | ");
|
|
206254
|
+
if (summary.length <= 500) return summary;
|
|
206255
|
+
return `${summary.slice(0, 500)}...`;
|
|
206256
|
+
};
|
|
206257
|
+
return summarize(stderr) ?? summarize(stdout);
|
|
206258
|
+
};
|
|
206248
206259
|
buildEntrypointsBlock = (entrypoints) => {
|
|
206249
206260
|
if (entrypoints.length === 0) return "";
|
|
206250
206261
|
const lines = [
|
|
@@ -206592,16 +206603,26 @@ fi`
|
|
|
206592
206603
|
noteLocalPort(stderrBuffer);
|
|
206593
206604
|
}
|
|
206594
206605
|
const finalize = () => {
|
|
206595
|
-
const finalCode = code2 ?? 0;
|
|
206596
206606
|
if (callbackError) {
|
|
206597
206607
|
reject(callbackError);
|
|
206598
206608
|
return;
|
|
206599
206609
|
}
|
|
206610
|
+
if (code2 === null) {
|
|
206611
|
+
const detail2 = summarizeExecOutput(stderr, stdout);
|
|
206612
|
+
const suffix2 = detail2 ? `: ${detail2}` : "";
|
|
206613
|
+
reject(
|
|
206614
|
+
new Error(
|
|
206615
|
+
`codex login failed: remote exec stream closed before exit status${suffix2}`
|
|
206616
|
+
)
|
|
206617
|
+
);
|
|
206618
|
+
return;
|
|
206619
|
+
}
|
|
206620
|
+
const finalCode = code2;
|
|
206600
206621
|
if (finalCode === 0) {
|
|
206601
206622
|
resolve2();
|
|
206602
206623
|
return;
|
|
206603
206624
|
}
|
|
206604
|
-
const detail = stderr
|
|
206625
|
+
const detail = summarizeExecOutput(stderr, stdout);
|
|
206605
206626
|
const suffix = detail ? `: ${detail}` : "";
|
|
206606
206627
|
reject(new Error(`codex login failed (exit ${finalCode})${suffix}`));
|
|
206607
206628
|
};
|
|
@@ -206753,7 +206774,17 @@ fi`
|
|
|
206753
206774
|
if (stderrBuffer) {
|
|
206754
206775
|
handleLine(stderrBuffer);
|
|
206755
206776
|
}
|
|
206756
|
-
|
|
206777
|
+
if (code2 === null) {
|
|
206778
|
+
const detail2 = summarizeExecOutput(stderr, stdout);
|
|
206779
|
+
const suffix2 = detail2 ? `: ${detail2}` : "";
|
|
206780
|
+
reject(
|
|
206781
|
+
new Error(
|
|
206782
|
+
`codex exec failed: remote exec stream closed before exit status${suffix2}`
|
|
206783
|
+
)
|
|
206784
|
+
);
|
|
206785
|
+
return;
|
|
206786
|
+
}
|
|
206787
|
+
const finalCode = code2;
|
|
206757
206788
|
if (finalCode === 0) {
|
|
206758
206789
|
resolve2({ stdout, stderr });
|
|
206759
206790
|
return;
|
|
@@ -206776,7 +206807,7 @@ ${stdout}`)) {
|
|
|
206776
206807
|
);
|
|
206777
206808
|
return;
|
|
206778
206809
|
}
|
|
206779
|
-
const detail = stderr
|
|
206810
|
+
const detail = summarizeExecOutput(stderr, stdout);
|
|
206780
206811
|
const suffix = detail ? `: ${detail}` : "";
|
|
206781
206812
|
reject(new Error(`codex exec failed (exit ${finalCode})${suffix}`));
|
|
206782
206813
|
};
|
|
@@ -208416,7 +208447,7 @@ var init_progress = __esm({
|
|
|
208416
208447
|
});
|
|
208417
208448
|
|
|
208418
208449
|
// src/devbox/commands/init/codex/index.ts
|
|
208419
|
-
var import_node_path27, import_node_crypto14, import_promises24, import_node_os14, CODEX_REQUEST_URL_REGEX2, extractRequestUrl2, isLoopbackRelayUrl2, resolveLocalCodexAuthPathCandidates, readLocalCodexAuthCache, syncLocalCodexAuthCacheToSprite, uploadSetupPlan, runRemoteCodexSetup;
|
|
208450
|
+
var import_node_path27, import_node_crypto14, import_promises24, import_node_os14, CODEX_REQUEST_URL_REGEX2, CODEX_STREAM_DISCONNECT_DETAIL_REGEX, extractRequestUrl2, extractStreamDisconnectDetail, summarizeCodexOutputDetail, isLoopbackRelayUrl2, resolveLocalCodexAuthPathCandidates, readLocalCodexAuthCache, syncLocalCodexAuthCacheToSprite, uploadSetupPlan, runRemoteCodexSetup;
|
|
208420
208451
|
var init_codex = __esm({
|
|
208421
208452
|
"src/devbox/commands/init/codex/index.ts"() {
|
|
208422
208453
|
"use strict";
|
|
@@ -208437,11 +208468,25 @@ var init_codex = __esm({
|
|
|
208437
208468
|
init_artifacts();
|
|
208438
208469
|
init_progress();
|
|
208439
208470
|
CODEX_REQUEST_URL_REGEX2 = /error sending request for url \(([^)]+)\)/i;
|
|
208471
|
+
CODEX_STREAM_DISCONNECT_DETAIL_REGEX = /stream disconnected before completion:\s*([^\n\r]+)/i;
|
|
208440
208472
|
extractRequestUrl2 = (value) => {
|
|
208441
208473
|
const match2 = value.match(CODEX_REQUEST_URL_REGEX2);
|
|
208442
208474
|
const url = match2?.[1]?.trim();
|
|
208443
208475
|
return url && url.length > 0 ? url : null;
|
|
208444
208476
|
};
|
|
208477
|
+
extractStreamDisconnectDetail = (value) => {
|
|
208478
|
+
const match2 = value.match(CODEX_STREAM_DISCONNECT_DETAIL_REGEX);
|
|
208479
|
+
const detail = match2?.[1]?.trim();
|
|
208480
|
+
return detail && detail.length > 0 ? detail : null;
|
|
208481
|
+
};
|
|
208482
|
+
summarizeCodexOutputDetail = (value) => {
|
|
208483
|
+
const cleaned = value.replace(/\u001b\[[0-9;]*[A-Za-z]/g, "");
|
|
208484
|
+
const lines = cleaned.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0);
|
|
208485
|
+
if (lines.length === 0) return null;
|
|
208486
|
+
const summary = lines.slice(-3).join(" | ");
|
|
208487
|
+
if (summary.length <= 500) return summary;
|
|
208488
|
+
return `${summary.slice(0, 500)}...`;
|
|
208489
|
+
};
|
|
208445
208490
|
isLoopbackRelayUrl2 = (requestUrl) => {
|
|
208446
208491
|
try {
|
|
208447
208492
|
const url = new URL(requestUrl);
|
|
@@ -209048,28 +209093,36 @@ ${execResult?.stderr ?? ""}`;
|
|
|
209048
209093
|
}
|
|
209049
209094
|
if (combinedOutput.includes("stream disconnected before completion")) {
|
|
209050
209095
|
const requestUrl = extractRequestUrl2(combinedOutputRaw);
|
|
209096
|
+
const detail2 = extractStreamDisconnectDetail(combinedOutputRaw) ?? summarizeCodexOutputDetail(combinedOutputRaw);
|
|
209097
|
+
const detailSuffix2 = detail2 ? ` Detail: ${detail2}` : "";
|
|
209051
209098
|
if (requestUrl && isLoopbackRelayUrl2(requestUrl)) {
|
|
209052
209099
|
throw new Error(
|
|
209053
|
-
`codex exec failed: local relay is unreachable at ${requestUrl}. Set a reachable remote relay URL (for example \`DEVBOX_REMOTE_RELAY_BASE_URL=https://relay.boxes.dev\`), run \`dvb setup\`, then retry with \`dvb init --resume
|
|
209100
|
+
`codex exec failed: local relay is unreachable at ${requestUrl}. Set a reachable remote relay URL (for example \`DEVBOX_REMOTE_RELAY_BASE_URL=https://relay.boxes.dev\`), run \`dvb setup\`, then retry with \`dvb init --resume\`.${detailSuffix2}`
|
|
209054
209101
|
);
|
|
209055
209102
|
}
|
|
209056
209103
|
const requestTarget = requestUrl ?? "relay /v1/responses endpoint";
|
|
209057
209104
|
throw new Error(
|
|
209058
|
-
`codex exec failed: proxy stream disconnected before completion while calling ${requestTarget}. Ensure relay connectivity from the remote devbox, then retry with \`dvb init --resume
|
|
209105
|
+
`codex exec failed: proxy stream disconnected before completion while calling ${requestTarget}. Ensure relay connectivity from the remote devbox, then retry with \`dvb init --resume\`.${detailSuffix2}`
|
|
209059
209106
|
);
|
|
209060
209107
|
}
|
|
209061
209108
|
if (combinedOutput.includes("no last agent message")) {
|
|
209109
|
+
const detail2 = summarizeCodexOutputDetail(combinedOutputRaw);
|
|
209110
|
+
const detailSuffix2 = detail2 ? ` Detail: ${detail2}` : "";
|
|
209062
209111
|
throw new Error(
|
|
209063
|
-
|
|
209112
|
+
`codex exec failed: Codex returned no final response.${detailSuffix2} Setup was not applied; retry with \`dvb init --resume\`.`
|
|
209064
209113
|
);
|
|
209065
209114
|
}
|
|
209066
209115
|
if (lastMessageReadError) {
|
|
209116
|
+
const detail2 = lastMessageReadError.message.trim();
|
|
209117
|
+
const detailSuffix2 = detail2 ? ` Detail: ${detail2}` : "";
|
|
209067
209118
|
throw new Error(
|
|
209068
|
-
|
|
209119
|
+
`codex exec failed: missing Codex final output file.${detailSuffix2} Setup may not have run; retry with \`dvb init --resume\`.`
|
|
209069
209120
|
);
|
|
209070
209121
|
}
|
|
209122
|
+
const detail = summarizeCodexOutputDetail(combinedOutputRaw);
|
|
209123
|
+
const detailSuffix = detail ? ` Detail: ${detail}` : "";
|
|
209071
209124
|
throw new Error(
|
|
209072
|
-
|
|
209125
|
+
`codex exec failed: empty Codex final response.${detailSuffix} Setup was not applied; retry with \`dvb init --resume\`.`
|
|
209073
209126
|
);
|
|
209074
209127
|
}
|
|
209075
209128
|
if (!emitCodexOutput) return;
|
|
@@ -219982,4 +220035,4 @@ smol-toml/dist/index.js:
|
|
|
219982
220035
|
*/
|
|
219983
220036
|
//# sourceMappingURL=dvb.cjs.map
|
|
219984
220037
|
|
|
219985
|
-
//# debugId=
|
|
220038
|
+
//# debugId=d3ae73b4-6c3c-5544-ba77-9fde7bd58dbe
|