@boxes-dev/dvb 1.0.110 → 1.0.111
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 +128 -20
- package/dist/bin/dvb.cjs.map +1 -1
- package/dist/bin/dvbd.cjs +5 -5
- package/dist/devbox/commands/init/codex/remote.d.ts.map +1 -1
- package/dist/devbox/commands/init/codex/remote.js +108 -14
- package/dist/devbox/commands/init/codex/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]="4b04c911-9455-5cd9-8300-dbba8853d31b")}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.111";
|
|
88692
|
+
const rawGitSha = "1fdaf96784cb7f6612b34d445ee4adfbcebe53c1";
|
|
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.111";
|
|
120683
|
+
const rawGitSha = "1fdaf96784cb7f6612b34d445ee4adfbcebe53c1";
|
|
120684
|
+
const rawSentryRelease = "boxes-dev-dvb@1.0.111+1fdaf96784cb7f6612b34d445ee4adfbcebe53c1";
|
|
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;
|
|
@@ -206408,7 +206408,7 @@ var init_prompts = __esm({
|
|
|
206408
206408
|
});
|
|
206409
206409
|
|
|
206410
206410
|
// src/devbox/commands/init/codex/remote.ts
|
|
206411
|
-
var import_node_child_process8, stripAnsi2, extractBoldText, extractAuthUrl, extractLocalPort, isRelayForbidden, isRelayMissingOpenAiProxyConfiguration, summarizeExecOutput, buildEntrypointsBlock, resolveRemoteApplyTemplateName, renderRemoteApplyPromptFromTemplate, renderRemoteApplyPrompt, openBrowser3, ensureRemoteCodexInstalled, isRemoteCodexLoggedIn, runRemoteCodexLogin, runRemoteCodexExec;
|
|
206411
|
+
var import_node_child_process8, stripAnsi2, decodeBase643, parseExitCode2, parseRemoteExecMessage, extractBoldText, extractAuthUrl, extractLocalPort, isRelayForbidden, isRelayMissingOpenAiProxyConfiguration, summarizeExecOutput, buildEntrypointsBlock, resolveRemoteApplyTemplateName, renderRemoteApplyPromptFromTemplate, renderRemoteApplyPrompt, openBrowser3, ensureRemoteCodexInstalled, isRemoteCodexLoggedIn, runRemoteCodexLogin, runRemoteCodexExec;
|
|
206412
206412
|
var init_remote2 = __esm({
|
|
206413
206413
|
"src/devbox/commands/init/codex/remote.ts"() {
|
|
206414
206414
|
"use strict";
|
|
@@ -206416,6 +206416,62 @@ var init_remote2 = __esm({
|
|
|
206416
206416
|
init_prompts();
|
|
206417
206417
|
init_template();
|
|
206418
206418
|
stripAnsi2 = (value) => value.replace(/\u001b\[[0-9;]*[A-Za-z]/g, "");
|
|
206419
|
+
decodeBase643 = (value) => {
|
|
206420
|
+
if (typeof value !== "string") return Buffer.alloc(0);
|
|
206421
|
+
try {
|
|
206422
|
+
return Buffer.from(value, "base64");
|
|
206423
|
+
} catch {
|
|
206424
|
+
return Buffer.alloc(0);
|
|
206425
|
+
}
|
|
206426
|
+
};
|
|
206427
|
+
parseExitCode2 = (value) => {
|
|
206428
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
206429
|
+
return Math.max(0, Math.min(255, Math.floor(value)));
|
|
206430
|
+
}
|
|
206431
|
+
const parsed = Number.parseInt(String(value ?? "0"), 10);
|
|
206432
|
+
if (!Number.isFinite(parsed)) {
|
|
206433
|
+
return 0;
|
|
206434
|
+
}
|
|
206435
|
+
return Math.max(0, Math.min(255, parsed));
|
|
206436
|
+
};
|
|
206437
|
+
parseRemoteExecMessage = (data) => {
|
|
206438
|
+
let payload;
|
|
206439
|
+
try {
|
|
206440
|
+
payload = JSON.parse(data);
|
|
206441
|
+
} catch {
|
|
206442
|
+
return { kind: "raw" };
|
|
206443
|
+
}
|
|
206444
|
+
if (payload.type === "exit" && typeof payload.exit_code === "number") {
|
|
206445
|
+
return { kind: "exit", code: parseExitCode2(payload.exit_code) };
|
|
206446
|
+
}
|
|
206447
|
+
if (payload.type === "tty_exit") {
|
|
206448
|
+
return {
|
|
206449
|
+
kind: "exit",
|
|
206450
|
+
code: parseExitCode2(payload.code ?? payload.exit_code)
|
|
206451
|
+
};
|
|
206452
|
+
}
|
|
206453
|
+
if (payload.type === "tty_data") {
|
|
206454
|
+
const bytes = decodeBase643(payload.data);
|
|
206455
|
+
if (bytes.length === 0) return { kind: "ignore" };
|
|
206456
|
+
return {
|
|
206457
|
+
kind: "stream",
|
|
206458
|
+
stream: payload.stream === "stderr" ? "stderr" : "stdout",
|
|
206459
|
+
text: bytes.toString("utf8")
|
|
206460
|
+
};
|
|
206461
|
+
}
|
|
206462
|
+
if (payload.type === "tty_ready" || payload.type === "tty_replay_start" || payload.type === "tty_replay_done" || payload.type === "session_info" || payload.type === "port_opened" || payload.type === "port_closed") {
|
|
206463
|
+
return { kind: "ignore" };
|
|
206464
|
+
}
|
|
206465
|
+
if ((payload.type === "tty_error" || payload.type === "error") && typeof payload.message === "string" && payload.message.trim().length > 0) {
|
|
206466
|
+
return {
|
|
206467
|
+
kind: "stream",
|
|
206468
|
+
stream: "stderr",
|
|
206469
|
+
text: `${payload.message}
|
|
206470
|
+
`
|
|
206471
|
+
};
|
|
206472
|
+
}
|
|
206473
|
+
return { kind: "raw" };
|
|
206474
|
+
};
|
|
206419
206475
|
extractBoldText = (line) => {
|
|
206420
206476
|
const match2 = line.match(/\*\*([^*]+)\*\*/);
|
|
206421
206477
|
const text = match2?.[1];
|
|
@@ -206757,14 +206813,40 @@ fi`
|
|
|
206757
206813
|
}
|
|
206758
206814
|
};
|
|
206759
206815
|
const handleText = (data) => {
|
|
206760
|
-
|
|
206761
|
-
|
|
206762
|
-
|
|
206763
|
-
|
|
206764
|
-
|
|
206816
|
+
const parsed = parseRemoteExecMessage(data);
|
|
206817
|
+
if (parsed.kind === "exit") {
|
|
206818
|
+
exitCode = parsed.code;
|
|
206819
|
+
ws.close();
|
|
206820
|
+
return;
|
|
206821
|
+
}
|
|
206822
|
+
if (parsed.kind === "stream") {
|
|
206823
|
+
if (parsed.stream === "stderr") {
|
|
206824
|
+
handleChunk(
|
|
206825
|
+
parsed.text,
|
|
206826
|
+
stderrBuffer,
|
|
206827
|
+
(next) => {
|
|
206828
|
+
stderrBuffer = next;
|
|
206829
|
+
},
|
|
206830
|
+
(value) => {
|
|
206831
|
+
stderr += value;
|
|
206832
|
+
}
|
|
206833
|
+
);
|
|
206765
206834
|
return;
|
|
206766
206835
|
}
|
|
206767
|
-
|
|
206836
|
+
handleChunk(
|
|
206837
|
+
parsed.text,
|
|
206838
|
+
stdoutBuffer,
|
|
206839
|
+
(next) => {
|
|
206840
|
+
stdoutBuffer = next;
|
|
206841
|
+
},
|
|
206842
|
+
(value) => {
|
|
206843
|
+
stdout += value;
|
|
206844
|
+
}
|
|
206845
|
+
);
|
|
206846
|
+
return;
|
|
206847
|
+
}
|
|
206848
|
+
if (parsed.kind === "ignore") {
|
|
206849
|
+
return;
|
|
206768
206850
|
}
|
|
206769
206851
|
handleChunk(
|
|
206770
206852
|
data,
|
|
@@ -206931,14 +207013,40 @@ fi`
|
|
|
206931
207013
|
}
|
|
206932
207014
|
};
|
|
206933
207015
|
const handleText = (data) => {
|
|
206934
|
-
|
|
206935
|
-
|
|
206936
|
-
|
|
206937
|
-
|
|
206938
|
-
|
|
207016
|
+
const parsed = parseRemoteExecMessage(data);
|
|
207017
|
+
if (parsed.kind === "exit") {
|
|
207018
|
+
exitCode = parsed.code;
|
|
207019
|
+
ws.close();
|
|
207020
|
+
return;
|
|
207021
|
+
}
|
|
207022
|
+
if (parsed.kind === "stream") {
|
|
207023
|
+
if (parsed.stream === "stderr") {
|
|
207024
|
+
handleChunk(
|
|
207025
|
+
parsed.text,
|
|
207026
|
+
stderrBuffer,
|
|
207027
|
+
(next) => {
|
|
207028
|
+
stderrBuffer = next;
|
|
207029
|
+
},
|
|
207030
|
+
(value) => {
|
|
207031
|
+
stderr += value;
|
|
207032
|
+
}
|
|
207033
|
+
);
|
|
206939
207034
|
return;
|
|
206940
207035
|
}
|
|
206941
|
-
|
|
207036
|
+
handleChunk(
|
|
207037
|
+
parsed.text,
|
|
207038
|
+
stdoutBuffer,
|
|
207039
|
+
(next) => {
|
|
207040
|
+
stdoutBuffer = next;
|
|
207041
|
+
},
|
|
207042
|
+
(value) => {
|
|
207043
|
+
stdout += value;
|
|
207044
|
+
}
|
|
207045
|
+
);
|
|
207046
|
+
return;
|
|
207047
|
+
}
|
|
207048
|
+
if (parsed.kind === "ignore") {
|
|
207049
|
+
return;
|
|
206942
207050
|
}
|
|
206943
207051
|
handleChunk(
|
|
206944
207052
|
data,
|
|
@@ -220335,4 +220443,4 @@ smol-toml/dist/index.js:
|
|
|
220335
220443
|
*/
|
|
220336
220444
|
//# sourceMappingURL=dvb.cjs.map
|
|
220337
220445
|
|
|
220338
|
-
//# debugId=
|
|
220446
|
+
//# debugId=4b04c911-9455-5cd9-8300-dbba8853d31b
|