@boxes-dev/dvb 1.0.48 → 1.0.50

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 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]="119d7e63-fb65-5c6b-9057-03eebe3f0256")}catch(e){}}();
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]="c7b28144-a37f-5cd7-b6e5-1af8e43047e8")}catch(e){}}();
4
4
 
5
5
  var __create = Object.create;
6
6
  var __defProp = Object.defineProperty;
@@ -24472,7 +24472,7 @@ var require_otlp_node_http_env_configuration = __commonJS({
24472
24472
  "use strict";
24473
24473
  Object.defineProperty(exports2, "__esModule", { value: true });
24474
24474
  exports2.getNodeHttpConfigurationFromEnvironment = void 0;
24475
- var fs27 = require("fs");
24475
+ var fs28 = require("fs");
24476
24476
  var path35 = require("path");
24477
24477
  var core_1 = require_src3();
24478
24478
  var api_1 = require_src();
@@ -24537,7 +24537,7 @@ var require_otlp_node_http_env_configuration = __commonJS({
24537
24537
  const filePath = signalSpecificPath ?? nonSignalSpecificPath;
24538
24538
  if (filePath != null) {
24539
24539
  try {
24540
- return fs27.readFileSync(path35.resolve(process.cwd(), filePath));
24540
+ return fs28.readFileSync(path35.resolve(process.cwd(), filePath));
24541
24541
  } catch {
24542
24542
  api_1.diag.warn(warningMessage);
24543
24543
  return void 0;
@@ -36584,14 +36584,14 @@ var require_tls_helpers = __commonJS({
36584
36584
  Object.defineProperty(exports2, "__esModule", { value: true });
36585
36585
  exports2.CIPHER_SUITES = void 0;
36586
36586
  exports2.getDefaultRootsData = getDefaultRootsData;
36587
- var fs27 = require("fs");
36587
+ var fs28 = require("fs");
36588
36588
  exports2.CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES;
36589
36589
  var DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH;
36590
36590
  var defaultRootsData = null;
36591
36591
  function getDefaultRootsData() {
36592
36592
  if (DEFAULT_ROOTS_FILE_PATH) {
36593
36593
  if (defaultRootsData === null) {
36594
- defaultRootsData = fs27.readFileSync(DEFAULT_ROOTS_FILE_PATH);
36594
+ defaultRootsData = fs28.readFileSync(DEFAULT_ROOTS_FILE_PATH);
36595
36595
  }
36596
36596
  return defaultRootsData;
36597
36597
  }
@@ -41602,7 +41602,7 @@ var require_fetch = __commonJS({
41602
41602
  module2.exports = fetch2;
41603
41603
  var asPromise = require_aspromise();
41604
41604
  var inquire2 = require_inquire();
41605
- var fs27 = inquire2("fs");
41605
+ var fs28 = inquire2("fs");
41606
41606
  function fetch2(filename, options, callback) {
41607
41607
  if (typeof options === "function") {
41608
41608
  callback = options;
@@ -41611,8 +41611,8 @@ var require_fetch = __commonJS({
41611
41611
  options = {};
41612
41612
  if (!callback)
41613
41613
  return asPromise(fetch2, this, filename, options);
41614
- if (!options.xhr && fs27 && fs27.readFile)
41615
- return fs27.readFile(filename, function fetchReadFileCallback(err, contents) {
41614
+ if (!options.xhr && fs28 && fs28.readFile)
41615
+ return fs28.readFile(filename, function fetchReadFileCallback(err, contents) {
41616
41616
  return err && typeof XMLHttpRequest !== "undefined" ? fetch2.xhr(filename, options, callback) : err ? callback(err) : callback(null, options.binary ? contents : contents.toString("utf8"));
41617
41617
  });
41618
41618
  return fetch2.xhr(filename, options, callback);
@@ -47886,7 +47886,7 @@ var require_util4 = __commonJS({
47886
47886
  "use strict";
47887
47887
  Object.defineProperty(exports2, "__esModule", { value: true });
47888
47888
  exports2.addCommonProtos = exports2.loadProtosWithOptionsSync = exports2.loadProtosWithOptions = void 0;
47889
- var fs27 = require("fs");
47889
+ var fs28 = require("fs");
47890
47890
  var path35 = require("path");
47891
47891
  var Protobuf = require_protobufjs();
47892
47892
  function addIncludePathResolver(root, includePaths) {
@@ -47898,7 +47898,7 @@ var require_util4 = __commonJS({
47898
47898
  for (const directory of includePaths) {
47899
47899
  const fullPath = path35.join(directory, target);
47900
47900
  try {
47901
- fs27.accessSync(fullPath, fs27.constants.R_OK);
47901
+ fs28.accessSync(fullPath, fs28.constants.R_OK);
47902
47902
  return fullPath;
47903
47903
  } catch (err) {
47904
47904
  continue;
@@ -57720,7 +57720,7 @@ var require_certificate_provider = __commonJS({
57720
57720
  "use strict";
57721
57721
  Object.defineProperty(exports2, "__esModule", { value: true });
57722
57722
  exports2.FileWatcherCertificateProvider = void 0;
57723
- var fs27 = require("fs");
57723
+ var fs28 = require("fs");
57724
57724
  var logging = require_logging();
57725
57725
  var constants_1 = require_constants9();
57726
57726
  var util_1 = require("util");
@@ -57728,7 +57728,7 @@ var require_certificate_provider = __commonJS({
57728
57728
  function trace15(text) {
57729
57729
  logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
57730
57730
  }
57731
- var readFilePromise = (0, util_1.promisify)(fs27.readFile);
57731
+ var readFilePromise = (0, util_1.promisify)(fs28.readFile);
57732
57732
  var FileWatcherCertificateProvider = class {
57733
57733
  constructor(config3) {
57734
57734
  this.config = config3;
@@ -61052,7 +61052,7 @@ var require_otlp_grpc_env_configuration = __commonJS({
61052
61052
  var core_1 = require_src28();
61053
61053
  var grpc_exporter_transport_1 = require_grpc_exporter_transport();
61054
61054
  var node_http_1 = require_index_node_http();
61055
- var fs27 = require("fs");
61055
+ var fs28 = require("fs");
61056
61056
  var path35 = require("path");
61057
61057
  var api_1 = require_src();
61058
61058
  function fallbackIfNullishOrBlank(signalSpecific, nonSignalSpecific) {
@@ -61102,7 +61102,7 @@ var require_otlp_grpc_env_configuration = __commonJS({
61102
61102
  const filePath = fallbackIfNullishOrBlank(signalSpecificPath, nonSignalSpecificPath);
61103
61103
  if (filePath != null) {
61104
61104
  try {
61105
- return fs27.readFileSync(path35.resolve(process.cwd(), filePath));
61105
+ return fs28.readFileSync(path35.resolve(process.cwd(), filePath));
61106
61106
  } catch {
61107
61107
  api_1.diag.warn(warningMessage);
61108
61108
  return void 0;
@@ -79470,14 +79470,14 @@ var require_parser = __commonJS({
79470
79470
  case "scalar":
79471
79471
  case "single-quoted-scalar":
79472
79472
  case "double-quoted-scalar": {
79473
- const fs27 = this.flowScalar(this.type);
79473
+ const fs28 = this.flowScalar(this.type);
79474
79474
  if (atNextItem || it2.value) {
79475
- map.items.push({ start, key: fs27, sep: [] });
79475
+ map.items.push({ start, key: fs28, sep: [] });
79476
79476
  this.onKeyLine = true;
79477
79477
  } else if (it2.sep) {
79478
- this.stack.push(fs27);
79478
+ this.stack.push(fs28);
79479
79479
  } else {
79480
- Object.assign(it2, { key: fs27, sep: [] });
79480
+ Object.assign(it2, { key: fs28, sep: [] });
79481
79481
  this.onKeyLine = true;
79482
79482
  }
79483
79483
  return;
@@ -79605,13 +79605,13 @@ var require_parser = __commonJS({
79605
79605
  case "scalar":
79606
79606
  case "single-quoted-scalar":
79607
79607
  case "double-quoted-scalar": {
79608
- const fs27 = this.flowScalar(this.type);
79608
+ const fs28 = this.flowScalar(this.type);
79609
79609
  if (!it2 || it2.value)
79610
- fc.items.push({ start: [], key: fs27, sep: [] });
79610
+ fc.items.push({ start: [], key: fs28, sep: [] });
79611
79611
  else if (it2.sep)
79612
- this.stack.push(fs27);
79612
+ this.stack.push(fs28);
79613
79613
  else
79614
- Object.assign(it2, { key: fs27, sep: [] });
79614
+ Object.assign(it2, { key: fs28, sep: [] });
79615
79615
  return;
79616
79616
  }
79617
79617
  case "flow-map-end":
@@ -79927,7 +79927,7 @@ var require_FileConfigFactory = __commonJS({
79927
79927
  exports2.setLoggerProvider = exports2.getSeverity = exports2.setMeterProvider = exports2.getTemporalityPreference = exports2.setTracerProvider = exports2.setPropagator = exports2.setAttributeLimits = exports2.setResourceAttributes = exports2.parseConfigFile = exports2.hasValidConfigFile = exports2.FileConfigFactory = void 0;
79928
79928
  var core_1 = require_src46();
79929
79929
  var configModel_1 = require_configModel();
79930
- var fs27 = require("fs");
79930
+ var fs28 = require("fs");
79931
79931
  var yaml = require_dist();
79932
79932
  var utils_1 = require_utils27();
79933
79933
  var commonModel_1 = require_commonModel();
@@ -79949,7 +79949,7 @@ var require_FileConfigFactory = __commonJS({
79949
79949
  function hasValidConfigFile() {
79950
79950
  const configFile = (0, core_1.getStringFromEnv)("OTEL_EXPERIMENTAL_CONFIG_FILE");
79951
79951
  if (configFile) {
79952
- if (!(configFile.endsWith(".yaml") || configFile.endsWith(".yml")) || !fs27.existsSync(configFile)) {
79952
+ if (!(configFile.endsWith(".yaml") || configFile.endsWith(".yml")) || !fs28.existsSync(configFile)) {
79953
79953
  api_1.diag.warn(`Config file ${configFile} set on OTEL_EXPERIMENTAL_CONFIG_FILE is not valid`);
79954
79954
  return false;
79955
79955
  }
@@ -79961,7 +79961,7 @@ var require_FileConfigFactory = __commonJS({
79961
79961
  function parseConfigFile(config3) {
79962
79962
  const supportedFileVersions = ["1.0-rc.3"];
79963
79963
  const configFile = (0, core_1.getStringFromEnv)("OTEL_EXPERIMENTAL_CONFIG_FILE") || "";
79964
- const file = fs27.readFileSync(configFile, "utf8");
79964
+ const file = fs28.readFileSync(configFile, "utf8");
79965
79965
  const parsedContent = yaml.parse(file);
79966
79966
  if (parsedContent["file_format"] && supportedFileVersions.includes(parsedContent["file_format"])) {
79967
79967
  const disabled = (0, utils_1.getBooleanFromConfigFile)(parsedContent["disabled"]);
@@ -88619,8 +88619,8 @@ var init_otel = __esm({
88619
88619
  return trimmed && trimmed.length > 0 ? trimmed : void 0;
88620
88620
  };
88621
88621
  readBuildMetadata = () => {
88622
- const rawPackageVersion = "1.0.48";
88623
- const rawGitSha = "e25aee27469b25316e872a60223e01885bcbc35a";
88622
+ const rawPackageVersion = "1.0.50";
88623
+ const rawGitSha = "2775fab43ab9e55ae518a9d8665bec8c7a1a7b67";
88624
88624
  const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
88625
88625
  const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
88626
88626
  return { packageVersion, gitSha };
@@ -120608,9 +120608,9 @@ var init_sentry = __esm({
120608
120608
  sentryEnabled = false;
120609
120609
  uncaughtExceptionMonitorInstalled = false;
120610
120610
  readBuildMetadata2 = () => {
120611
- const rawPackageVersion = "1.0.48";
120612
- const rawGitSha = "e25aee27469b25316e872a60223e01885bcbc35a";
120613
- const rawSentryRelease = "boxes-dev-dvb@1.0.48+e25aee27469b25316e872a60223e01885bcbc35a";
120611
+ const rawPackageVersion = "1.0.50";
120612
+ const rawGitSha = "2775fab43ab9e55ae518a9d8665bec8c7a1a7b67";
120613
+ const rawSentryRelease = "boxes-dev-dvb@1.0.50+2775fab43ab9e55ae518a9d8665bec8c7a1a7b67";
120614
120614
  const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
120615
120615
  const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
120616
120616
  const sentryRelease = typeof rawSentryRelease === "string" ? rawSentryRelease : void 0;
@@ -127602,7 +127602,7 @@ var init_simple_client_node = __esm({
127602
127602
  });
127603
127603
  require_node_gyp_build = __commonJS2({
127604
127604
  "../common/temp/node_modules/.pnpm/node-gyp-build@4.8.4/node_modules/node-gyp-build/node-gyp-build.js"(exports2, module2) {
127605
- var fs27 = __require("fs");
127605
+ var fs28 = __require("fs");
127606
127606
  var path35 = __require("path");
127607
127607
  var os20 = __require("os");
127608
127608
  var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
@@ -127663,7 +127663,7 @@ var init_simple_client_node = __esm({
127663
127663
  };
127664
127664
  function readdirSync(dir) {
127665
127665
  try {
127666
- return fs27.readdirSync(dir);
127666
+ return fs28.readdirSync(dir);
127667
127667
  } catch (err) {
127668
127668
  return [];
127669
127669
  }
@@ -127757,7 +127757,7 @@ var init_simple_client_node = __esm({
127757
127757
  return typeof window !== "undefined" && window.process && window.process.type === "renderer";
127758
127758
  }
127759
127759
  function isAlpine(platform22) {
127760
- return platform22 === "linux" && fs27.existsSync("/etc/alpine-release");
127760
+ return platform22 === "linux" && fs28.existsSync("/etc/alpine-release");
127761
127761
  }
127762
127762
  load2.parseTags = parseTags;
127763
127763
  load2.matchTags = matchTags;
@@ -144289,7 +144289,7 @@ ${canonicalBlock}
144289
144289
  const reportPhase = (completedPhases, detail) => {
144290
144290
  onPhase?.(completedPhases, totalPhases, detail);
144291
144291
  };
144292
- reportPhase(0, "fixing ownership and permissions");
144292
+ reportPhase(0, "fix ownership/permissions");
144293
144293
  const permissionsScript = [
144294
144294
  "set -euo pipefail",
144295
144295
  "if [ -d /home/sprite ]; then",
@@ -144316,7 +144316,7 @@ ${canonicalBlock}
144316
144316
  details ? `devbox bootstrap failed: ${details}` : `devbox bootstrap failed (exit ${permsResult.exitCode})`
144317
144317
  );
144318
144318
  }
144319
- reportPhase(1, "setting IPv4 localhost preference");
144319
+ reportPhase(1, "prefer IPv4 localhost");
144320
144320
  const ipv4PreferenceScript = [
144321
144321
  "set -euo pipefail",
144322
144322
  'if ! sudo -n grep -q "ipv4first" /etc/gai.conf 2>/dev/null; then',
@@ -145008,9 +145008,9 @@ chmod 755 ${WEZTERM_MUX_RUNNER_PATH}`,
145008
145008
  const reportPhase = (completedPhases, detail) => {
145009
145009
  onPhase?.(completedPhases, totalPhases, detail);
145010
145010
  };
145011
- reportPhase(0, "downloading daemon package");
145011
+ reportPhase(0, "download package");
145012
145012
  const { buffer } = await fetchDaemonBinary(release2, onDownloadProgress);
145013
- reportPhase(1, "uploading daemon package");
145013
+ reportPhase(1, "upload package");
145014
145014
  if (onUploadProgress) {
145015
145015
  await client.writeFile(spriteName, DAEMON_TARBALL, buffer, {
145016
145016
  onProgress: onUploadProgress
@@ -145018,13 +145018,13 @@ chmod 755 ${WEZTERM_MUX_RUNNER_PATH}`,
145018
145018
  } else {
145019
145019
  await client.writeFile(spriteName, DAEMON_TARBALL, buffer);
145020
145020
  }
145021
- reportPhase(2, "uploading daemon config");
145021
+ reportPhase(2, "upload config");
145022
145022
  await client.writeFile(
145023
145023
  spriteName,
145024
145024
  DAEMON_CONFIG_FILE,
145025
145025
  Buffer.from(buildDaemonConfig(convexUrl, heartbeatToken))
145026
145026
  );
145027
- reportPhase(3, "installing daemon on sprite");
145027
+ reportPhase(3, "install daemon");
145028
145028
  const result = await client.exec(
145029
145029
  spriteName,
145030
145030
  [
@@ -145056,7 +145056,7 @@ chmod 755 ${WEZTERM_MUX_RUNNER_PATH}`,
145056
145056
  if (result.exitCode !== 0) {
145057
145057
  throw new Error(result.stderr || result.stdout || "Daemon install failed.");
145058
145058
  }
145059
- reportPhase(4, "ensuring daemon service");
145059
+ reportPhase(4, "ensure daemon service");
145060
145060
  await ensureSpriteDaemonService({ client, spriteName });
145061
145061
  reportPhase(5, "completed");
145062
145062
  };
@@ -146475,7 +146475,7 @@ ${bottom}
146475
146475
  });
146476
146476
 
146477
146477
  // src/devbox/commands/init/codex/local.ts
146478
- var import_node_child_process9, import_node_fs8, import_promises21, import_node_os10, import_node_path23, stripAnsi3, extractBoldText2, normalizeProgressMessage, toRecord, extractProgressFromJsonLine, extractThreadIdFromJsonLine, buildRetryPrompt, runCodexExec, runLocalSetupEnvSecretsScan, runLocalSetupExternalScan, runLocalSetupExtraArtifactsScan, runLocalServicesScan, toPosixPath, toRepoRelativePath, countSecretVars, buildEnvFileHint, buildExternalDependencyLabel, promptForPlanApproval, promptForServicesApproval;
146478
+ var import_node_child_process9, import_node_fs8, import_promises21, import_node_os10, import_node_path23, stripAnsi3, extractBoldText2, normalizeProgressMessage, toRecord, extractProgressFromJsonLine, extractThreadIdFromJsonLine, isRelayUsageLimitExceeded, buildRetryPrompt, runCodexExec, runLocalSetupEnvSecretsScan, runLocalSetupExternalScan, runLocalSetupExtraArtifactsScan, runLocalServicesScan, toPosixPath, toRepoRelativePath, countSecretVars, buildEnvFileHint, buildExternalDependencyLabel, promptForPlanApproval, promptForServicesApproval;
146479
146479
  var init_local = __esm({
146480
146480
  "src/devbox/commands/init/codex/local.ts"() {
146481
146481
  "use strict";
@@ -146542,6 +146542,7 @@ var init_local = __esm({
146542
146542
  const threadId2 = record.thread_id;
146543
146543
  return typeof threadId2 === "string" && threadId2.length > 0 ? threadId2 : null;
146544
146544
  };
146545
+ isRelayUsageLimitExceeded = (value) => /usage limit exceeded/i.test(value) && /(?:relay\.boxes\.dev\/v1\/responses|\/v1\/responses)/i.test(value);
146545
146546
  buildRetryPrompt = (basePrompt, retryFeedback) => retryFeedback ? [
146546
146547
  basePrompt,
146547
146548
  "",
@@ -146683,6 +146684,15 @@ var init_local = __esm({
146683
146684
  return;
146684
146685
  }
146685
146686
  const detail = stderr.trim() || stdout.trim();
146687
+ if (isRelayUsageLimitExceeded(`${stderr}
146688
+ ${stdout}`)) {
146689
+ reject(
146690
+ new Error(
146691
+ "Codex scan failed: OpenAI usage limit exceeded. Run `dvb setup --codex-auth byo` to use your own Codex auth, then retry with `dvb init --resume`."
146692
+ )
146693
+ );
146694
+ return;
146695
+ }
146686
146696
  const suffix = detail ? `: ${detail}` : "";
146687
146697
  reject(
146688
146698
  new Error(`codex exec failed (exit ${code2 ?? "unknown"})${suffix}`)
@@ -147436,7 +147446,7 @@ var init_artifacts = __esm({
147436
147446
  });
147437
147447
 
147438
147448
  // src/devbox/commands/init/progress.ts
147439
- var noopStatus, CLACK_PROGRESS_SIZE, formatBytes, normalizeByteProgress, normalizePhaseProgress, runInitStep;
147449
+ var noopStatus, CLACK_PROGRESS_SIZE, INIT_PROGRESS_MAX_TEXT, INIT_PROGRESS_MIN_TEXT, INIT_PROGRESS_LINE_PADDING, getProgressTextLimit, fitProgressText, formatBytes, normalizeByteProgress, normalizePhaseProgress, runInitStep;
147440
147450
  var init_progress = __esm({
147441
147451
  "src/devbox/commands/init/progress.ts"() {
147442
147452
  "use strict";
@@ -147452,6 +147462,27 @@ var init_progress = __esm({
147452
147462
  }
147453
147463
  };
147454
147464
  CLACK_PROGRESS_SIZE = 24;
147465
+ INIT_PROGRESS_MAX_TEXT = 64;
147466
+ INIT_PROGRESS_MIN_TEXT = 24;
147467
+ INIT_PROGRESS_LINE_PADDING = CLACK_PROGRESS_SIZE + 6;
147468
+ getProgressTextLimit = () => {
147469
+ const columns = process.stdout.columns ?? 0;
147470
+ if (!Number.isFinite(columns) || columns <= 0) {
147471
+ return INIT_PROGRESS_MAX_TEXT;
147472
+ }
147473
+ const widthBound = Math.max(
147474
+ INIT_PROGRESS_MIN_TEXT,
147475
+ columns - INIT_PROGRESS_LINE_PADDING
147476
+ );
147477
+ return Math.min(INIT_PROGRESS_MAX_TEXT, widthBound);
147478
+ };
147479
+ fitProgressText = (value) => {
147480
+ const normalized = value.replace(/\s+/g, " ").trim();
147481
+ const limit = getProgressTextLimit();
147482
+ if (normalized.length <= limit) return normalized;
147483
+ if (limit <= 3) return normalized.slice(0, limit);
147484
+ return `${normalized.slice(0, limit - 3).trimEnd()}...`;
147485
+ };
147455
147486
  formatBytes = (value) => {
147456
147487
  if (!Number.isFinite(value) || value <= 0) return "0 B";
147457
147488
  const units = ["B", "KB", "MB", "GB", "TB"];
@@ -147525,14 +147556,15 @@ var init_progress = __esm({
147525
147556
  activeProgress = null;
147526
147557
  };
147527
147558
  const ensureSpinnerRunning = (text) => {
147559
+ const formatted = fitProgressText(text);
147528
147560
  if (activeMode === "spinner") {
147529
- sp.message(text);
147561
+ sp.message(formatted);
147530
147562
  return;
147531
147563
  }
147532
147564
  if (activeMode === "progress") {
147533
147565
  clearActiveProgress();
147534
147566
  }
147535
- sp.start(text);
147567
+ sp.start(formatted);
147536
147568
  activeMode = "spinner";
147537
147569
  };
147538
147570
  const updateClackProgress = ({
@@ -147542,14 +147574,15 @@ var init_progress = __esm({
147542
147574
  value,
147543
147575
  message
147544
147576
  }) => {
147577
+ const formattedMessage = fitProgressText(message);
147545
147578
  const currentProgress = activeMode === "progress" ? activeProgress : null;
147546
147579
  const canReuse = currentProgress && currentProgress.kind === kind && currentProgress.title === progressTitle && currentProgress.max === max && value >= currentProgress.value;
147547
147580
  if (canReuse && currentProgress) {
147548
147581
  const delta = value - currentProgress.value;
147549
147582
  if (delta > 0) {
147550
- currentProgress.bar.advance(delta, message);
147583
+ currentProgress.bar.advance(delta, formattedMessage);
147551
147584
  } else {
147552
- currentProgress.bar.message(message);
147585
+ currentProgress.bar.message(formattedMessage);
147553
147586
  }
147554
147587
  currentProgress.value = value;
147555
147588
  return;
@@ -147560,7 +147593,7 @@ var init_progress = __esm({
147560
147593
  clearActiveProgress();
147561
147594
  }
147562
147595
  const bar = Kt({ max, size: CLACK_PROGRESS_SIZE });
147563
- bar.start(message);
147596
+ bar.start(formattedMessage);
147564
147597
  activeMode = "progress";
147565
147598
  activeProgress = {
147566
147599
  kind,
@@ -147570,7 +147603,7 @@ var init_progress = __esm({
147570
147603
  bar
147571
147604
  };
147572
147605
  if (value > 0) {
147573
- bar.advance(value, message);
147606
+ bar.advance(value, formattedMessage);
147574
147607
  activeProgress.value = value;
147575
147608
  }
147576
147609
  };
@@ -147598,12 +147631,13 @@ var init_progress = __esm({
147598
147631
  const ok = (message) => {
147599
147632
  if (finalized) return;
147600
147633
  const finalText = message ?? finalSuccess;
147634
+ const formatted = fitProgressText(finalText);
147601
147635
  if (activeMode === "progress" && activeProgress) {
147602
- activeProgress.bar.stop(finalText);
147636
+ activeProgress.bar.stop(formatted);
147603
147637
  activeProgress = null;
147604
147638
  } else {
147605
- ensureSpinnerRunning(finalText);
147606
- sp.stop(finalText);
147639
+ ensureSpinnerRunning(formatted);
147640
+ sp.stop(formatted);
147607
147641
  }
147608
147642
  activeMode = "none";
147609
147643
  finalized = true;
@@ -147611,12 +147645,13 @@ var init_progress = __esm({
147611
147645
  const fail = (message) => {
147612
147646
  if (finalized) return;
147613
147647
  const finalText = message ?? title;
147648
+ const formatted = fitProgressText(finalText);
147614
147649
  if (activeMode === "progress" && activeProgress) {
147615
- activeProgress.bar.error(finalText);
147650
+ activeProgress.bar.error(formatted);
147616
147651
  activeProgress = null;
147617
147652
  } else {
147618
- ensureSpinnerRunning(finalText);
147619
- sp.error(finalText);
147653
+ ensureSpinnerRunning(formatted);
147654
+ sp.error(formatted);
147620
147655
  }
147621
147656
  activeMode = "none";
147622
147657
  finalized = true;
@@ -147674,7 +147709,7 @@ var init_codex = __esm({
147674
147709
  }) => {
147675
147710
  const authBytes = await readLocalCodexAuthCache();
147676
147711
  if (!authBytes) return false;
147677
- status.stage("Syncing local Codex auth cache");
147712
+ status.stage("Syncing Codex auth cache");
147678
147713
  const remoteAuthPath = "/home/sprite/.codex/auth.json";
147679
147714
  const ensureDir2 = await client.exec(spriteAlias, [
147680
147715
  "/bin/bash",
@@ -147727,7 +147762,7 @@ var init_codex = __esm({
147727
147762
  remoteArtifactsPartsDescriptorPath,
147728
147763
  status
147729
147764
  }) => {
147730
- status.stage("Preparing setup upload");
147765
+ status.stage("Preparing setup files");
147731
147766
  const setupDirResult = await client.exec(spriteAlias, [
147732
147767
  "/bin/bash",
147733
147768
  "--noprofile",
@@ -147787,7 +147822,7 @@ var init_codex = __esm({
147787
147822
  expectedBundleSha: descriptor.bundleSha256,
147788
147823
  parts
147789
147824
  };
147790
- status.stage("Preparing split setup artifacts upload");
147825
+ status.stage("Prep split artifact upload");
147791
147826
  const cleanupScript = [
147792
147827
  "set -euo pipefail",
147793
147828
  `bundle=${shellQuote3(remoteArtifactsBundlePath)}`,
@@ -147817,19 +147852,19 @@ var init_codex = __esm({
147817
147852
  }
147818
147853
  uploadItems.push(
147819
147854
  {
147820
- label: `setup artifacts manifest (${import_node_path25.default.basename(localArtifactsManifestPath)})`,
147855
+ label: `artifacts manifest (${import_node_path25.default.basename(localArtifactsManifestPath)})`,
147821
147856
  localPath: localArtifactsManifestPath,
147822
147857
  remotePath: remoteArtifactsManifestPath
147823
147858
  },
147824
147859
  {
147825
- label: `setup artifacts parts descriptor (${import_node_path25.default.basename(localArtifactsPartsDescriptorPath)})`,
147860
+ label: `artifacts parts (${import_node_path25.default.basename(localArtifactsPartsDescriptorPath)})`,
147826
147861
  localPath: localArtifactsPartsDescriptorPath,
147827
147862
  remotePath: remoteArtifactsPartsDescriptorPath
147828
147863
  }
147829
147864
  );
147830
147865
  for (const part of parts) {
147831
147866
  uploadItems.push({
147832
- label: `setup artifacts part ${part.index + 1}/${parts.length}`,
147867
+ label: `artifacts part ${part.index + 1}/${parts.length}`,
147833
147868
  localPath: part.localPath,
147834
147869
  remotePath: part.remotePath
147835
147870
  });
@@ -147837,12 +147872,12 @@ var init_codex = __esm({
147837
147872
  } else {
147838
147873
  uploadItems.push(
147839
147874
  {
147840
- label: "setup artifacts bundle",
147875
+ label: "artifacts bundle",
147841
147876
  localPath: localArtifactsBundlePath,
147842
147877
  remotePath: remoteArtifactsBundlePath
147843
147878
  },
147844
147879
  {
147845
- label: `setup artifacts manifest (${import_node_path25.default.basename(localArtifactsManifestPath)})`,
147880
+ label: `artifacts manifest (${import_node_path25.default.basename(localArtifactsManifestPath)})`,
147846
147881
  localPath: localArtifactsManifestPath,
147847
147882
  remotePath: remoteArtifactsManifestPath
147848
147883
  }
@@ -147880,7 +147915,7 @@ var init_codex = __esm({
147880
147915
  updateProgress(fileData.length, detail);
147881
147916
  }
147882
147917
  if (splitArtifacts && remoteArtifactsBundlePath) {
147883
- status.stage("Assembling setup artifacts on remote");
147918
+ status.stage("Assembling artifacts on remote");
147884
147919
  const assembledTmpPath = `${remoteArtifactsBundlePath}.tmp-assemble-${(0, import_node_crypto11.randomUUID)()}`;
147885
147920
  const assembleScript = [
147886
147921
  "set -euo pipefail",
@@ -147965,7 +148000,7 @@ var init_codex = __esm({
147965
148000
  emitCodexOutput = true
147966
148001
  }) => {
147967
148002
  if (!proxyOptions) {
147968
- status.stage("Checking Codex login");
148003
+ status.stage("Check Codex login");
147969
148004
  let loggedIn = await isRemoteCodexLoggedIn(client, spriteAlias);
147970
148005
  if (!loggedIn) {
147971
148006
  const synced = await syncLocalCodexAuthCacheToSprite({
@@ -148063,7 +148098,7 @@ codex login`
148063
148098
  if (portReloadError) {
148064
148099
  throw portReloadError;
148065
148100
  }
148066
- status.stage("Checking Codex login");
148101
+ status.stage("Check Codex login");
148067
148102
  const loggedInAfter = await isRemoteCodexLoggedIn(client, spriteAlias);
148068
148103
  if (!loggedInAfter) {
148069
148104
  throw new Error(
@@ -148075,7 +148110,7 @@ codex login`
148075
148110
  }
148076
148111
  }
148077
148112
  }
148078
- status.stage("Applying setup plan");
148113
+ status.stage("Apply setup plan");
148079
148114
  const remotePrompt = await renderRemoteApplyPrompt({
148080
148115
  setupPath: remoteSetupPath,
148081
148116
  artifactsBundle: remoteArtifactsBundlePath,
@@ -148088,7 +148123,7 @@ codex login`
148088
148123
  const proxyCodexHome = proxyRoot ? `${proxyRoot}/codex-home` : null;
148089
148124
  const proxyConfigPath = proxyCodexHome ? `${proxyCodexHome}/config.toml` : null;
148090
148125
  if (proxyOptions && proxyRoot && proxyTokenPath && proxyConfigPath) {
148091
- status.stage("Preparing Codex proxy context");
148126
+ status.stage("Preparing Codex proxy");
148092
148127
  const codexHomePath = proxyCodexHome ?? `${proxyRoot}/codex-home`;
148093
148128
  try {
148094
148129
  const prepResult = await client.exec(spriteAlias, [
@@ -148200,8 +148235,8 @@ codex login`
148200
148235
  remoteCodexCommand
148201
148236
  ],
148202
148237
  onProgress: (message) => {
148203
- const base = "Applying setup plan";
148204
- status.stage(`${base} \u2014 ${message}`);
148238
+ const base = "Apply setup plan";
148239
+ status.stage(`${base} - ${message}`);
148205
148240
  }
148206
148241
  });
148207
148242
  } finally {
@@ -148761,7 +148796,7 @@ var init_setupPlanFlow = __esm({
148761
148796
  });
148762
148797
  } else {
148763
148798
  const log3 = zt({
148764
- title: "Analyzing local environment",
148799
+ title: "Analyzing local env",
148765
148800
  limit: 1,
148766
148801
  spacing: 0
148767
148802
  });
@@ -148812,10 +148847,10 @@ var init_setupPlanFlow = __esm({
148812
148847
  updateServices
148813
148848
  });
148814
148849
  active = false;
148815
- log3.success("Analyzing local environment");
148850
+ log3.success("Analyzing local env");
148816
148851
  } catch (error2) {
148817
148852
  active = false;
148818
- log3.error("Analyzing local environment");
148853
+ log3.error("Analyzing local env");
148819
148854
  throw error2;
148820
148855
  }
148821
148856
  }
@@ -148915,13 +148950,13 @@ var init_setupPlanFlow = __esm({
148915
148950
  envSecretsMissing
148916
148951
  ),
148917
148952
  ...initCodexProxyOptions ? { proxyOptions: initCodexProxyOptions } : {},
148918
- onProgress: (message) => status.stage(`Regenerating env/secrets scan - ${message}`)
148953
+ onProgress: (message) => status.stage(`Rescan env/secrets - ${message}`)
148919
148954
  });
148920
148955
  saveScanThreadId("envSecretsThreadId", threadId2);
148921
148956
  },
148922
148957
  read: async () => await readSetupEnvSecretsPlan(setupEnvSecretsScanPath),
148923
148958
  outputPath: setupEnvSecretsScanPath,
148924
- update: (message) => status.stage(`Regenerating env/secrets scan - ${message}`),
148959
+ update: (message) => status.stage(`Rescan env/secrets - ${message}`),
148925
148960
  shouldRetry: (scan) => shouldRetryCodexScan(
148926
148961
  scan.scanFullyCompleted,
148927
148962
  scan.envFiles,
@@ -148959,13 +148994,13 @@ var init_setupPlanFlow = __esm({
148959
148994
  externalMissing
148960
148995
  ),
148961
148996
  ...initCodexProxyOptions ? { proxyOptions: initCodexProxyOptions } : {},
148962
- onProgress: (message) => status.stage(`Regenerating external scan - ${message}`)
148997
+ onProgress: (message) => status.stage(`Rescan external - ${message}`)
148963
148998
  });
148964
148999
  saveScanThreadId("externalThreadId", threadId2);
148965
149000
  },
148966
149001
  read: async () => await readSetupExternalPlan(setupExternalScanPath),
148967
149002
  outputPath: setupExternalScanPath,
148968
- update: (message) => status.stage(`Regenerating external scan - ${message}`),
149003
+ update: (message) => status.stage(`Rescan external - ${message}`),
148969
149004
  shouldRetry: (scan) => shouldRetryCodexScan(
148970
149005
  scan.scanFullyCompleted,
148971
149006
  scan.externalDependencies,
@@ -148998,13 +149033,13 @@ var init_setupPlanFlow = __esm({
148998
149033
  extraArtifactsMissing
148999
149034
  ),
149000
149035
  ...initCodexProxyOptions ? { proxyOptions: initCodexProxyOptions } : {},
149001
- onProgress: (message) => status.stage(`Regenerating extra artifacts scan - ${message}`)
149036
+ onProgress: (message) => status.stage(`Rescan extra artifacts - ${message}`)
149002
149037
  });
149003
149038
  saveScanThreadId("extraArtifactsThreadId", threadId2);
149004
149039
  },
149005
149040
  read: async () => await readSetupExtraArtifactsPlan(setupExtraArtifactsScanPath),
149006
149041
  outputPath: setupExtraArtifactsScanPath,
149007
- update: (message) => status.stage(`Regenerating extra artifacts scan - ${message}`),
149042
+ update: (message) => status.stage(`Rescan extra artifacts - ${message}`),
149008
149043
  shouldRetry: (scan) => shouldRetryCodexScan(scan.scanFullyCompleted, scan.extraArtifacts)
149009
149044
  });
149010
149045
  nextPlan = {
@@ -149230,7 +149265,7 @@ var init_setupPlanFlow = __esm({
149230
149265
  ...needsExtraArtifacts ? ["extra artifacts"] : []
149231
149266
  ];
149232
149267
  status.stage(
149233
- `Found ${missingArtifacts.length} missing setup artifact path(s); regenerating ${scanLabels.join(", ")} scan(s) (${attempt}/${SETUP_ARTIFACT_REGEN_MAX_ATTEMPTS})`
149268
+ `Missing setup paths; rescan ${scanLabels.join(", ")} (${attempt}/${SETUP_ARTIFACT_REGEN_MAX_ATTEMPTS})`
149234
149269
  );
149235
149270
  planForArtifacts = await regenerateSetupPlanForMissingArtifacts({
149236
149271
  plan: planForArtifacts,
@@ -149497,7 +149532,7 @@ var init_provisionFlow = __esm({
149497
149532
  });
149498
149533
  await runInitStep({
149499
149534
  enabled: progressEnabled,
149500
- title: "Preparing remote directories",
149535
+ title: "Preparing remote dirs",
149501
149536
  fn: async ({ status }) => {
149502
149537
  status.stage("Checking remote git");
149503
149538
  const gitCheck = await client.exec(spriteAlias, [
@@ -149521,7 +149556,7 @@ var init_provisionFlow = __esm({
149521
149556
  remoteDirs.add(import_node_path29.default.posix.dirname(mapping.dest));
149522
149557
  }
149523
149558
  if (remoteDirs.size > 0) {
149524
- status.stage("Preparing remote directories");
149559
+ status.stage("Preparing remote dirs");
149525
149560
  const prepResult = await client.exec(spriteAlias, [
149526
149561
  "/bin/bash",
149527
149562
  "-lc",
@@ -151089,7 +151124,7 @@ var init_finalizeFlow = __esm({
151089
151124
  }
151090
151125
  const owner = checkResult.stdout.trim();
151091
151126
  if (!owner || owner === "sprite") return;
151092
- status.stage("Fixing workdir ownership");
151127
+ status.stage("Fixing workdir owner");
151093
151128
  const chownResult = await client.exec(spriteAlias, [
151094
151129
  "/bin/bash",
151095
151130
  "-lc",
@@ -151108,7 +151143,7 @@ var init_finalizeFlow = __esm({
151108
151143
  workdir,
151109
151144
  status
151110
151145
  }) => {
151111
- status.stage("Configuring git safe.directory");
151146
+ status.stage("Configuring git safe dir");
151112
151147
  logger7.info("init_git_safe_directory_configure_start", {
151113
151148
  box: spriteAlias,
151114
151149
  workdir
@@ -151212,11 +151247,11 @@ var init_finalizeFlow = __esm({
151212
151247
  const expandedWorkdir = expandHome2(workdir);
151213
151248
  await runInitStep({
151214
151249
  enabled: progressEnabled,
151215
- title: "Ensuring workdir ownership",
151250
+ title: "Ensuring workdir owner",
151216
151251
  fn: async ({ status }) => {
151217
151252
  await retryInitStep2({
151218
151253
  status,
151219
- title: "Ensuring workdir ownership",
151254
+ title: "Ensuring workdir owner",
151220
151255
  fn: async () => await ensureWorkdirOwnership({
151221
151256
  client,
151222
151257
  spriteAlias,
@@ -151232,7 +151267,7 @@ var init_finalizeFlow = __esm({
151232
151267
  if (!skipGitSafeDirectory) {
151233
151268
  await runInitStep({
151234
151269
  enabled: progressEnabled,
151235
- title: "Configuring git safe.directory",
151270
+ title: "Configuring git safe dir",
151236
151271
  fn: async ({ status }) => {
151237
151272
  await ensureGitSafeDirectory({
151238
151273
  client,
@@ -151252,7 +151287,7 @@ var init_finalizeFlow = __esm({
151252
151287
  if (!skipSshAuth) {
151253
151288
  const { remoteOrigin, remoteInfo } = await runInitStep({
151254
151289
  enabled: progressEnabled,
151255
- title: "Checking git remote for SSH auth",
151290
+ title: "Checking git SSH remote",
151256
151291
  fn: async () => {
151257
151292
  const remoteOrigin2 = await readRemoteOrigin(
151258
151293
  client,
@@ -151318,7 +151353,7 @@ var init_finalizeFlow = __esm({
151318
151353
  } else {
151319
151354
  await runInitStep({
151320
151355
  enabled: progressEnabled,
151321
- title: "Updating remote devbox checkout to SSH git remote",
151356
+ title: "Switching remote git to SSH",
151322
151357
  fn: async () => {
151323
151358
  await setRemoteOrigin(
151324
151359
  client,
@@ -151410,7 +151445,7 @@ var init_finalizeFlow = __esm({
151410
151445
  if (!skipServicesConfig) {
151411
151446
  await runInitStep({
151412
151447
  enabled: progressEnabled,
151413
- title: "Writing devbox.toml services",
151448
+ title: "Writing services config",
151414
151449
  fn: async () => {
151415
151450
  await writeRemoteServicesToml({
151416
151451
  client,
@@ -151478,7 +151513,7 @@ var init_finalizeFlow = __esm({
151478
151513
  enabled: progressEnabled,
151479
151514
  title: "Staging setup artifacts",
151480
151515
  fn: async ({ status }) => {
151481
- status.stage("Copying repo artifacts and staging external files");
151516
+ status.stage("Staging repo + external artifacts");
151482
151517
  await stageRemoteSetupArtifacts({
151483
151518
  client,
151484
151519
  spriteAlias,
@@ -151493,12 +151528,12 @@ var init_finalizeFlow = __esm({
151493
151528
  if (!skipCodexApply) {
151494
151529
  await runInitStep({
151495
151530
  enabled: progressEnabled,
151496
- title: "Snapshotting filesystem (pre-setup)",
151531
+ title: "Snapshot FS (pre-setup)",
151497
151532
  fn: async ({ status, fail, ok }) => {
151498
151533
  try {
151499
151534
  const checkpoint = await retryInitStep2({
151500
151535
  status,
151501
- title: "Snapshotting filesystem (pre-setup)",
151536
+ title: "Snapshot FS (pre-setup)",
151502
151537
  fn: async () => await recordCodexCheckpoint({
151503
151538
  client,
151504
151539
  canonical,
@@ -151516,7 +151551,7 @@ var init_finalizeFlow = __esm({
151516
151551
  phase: "pre-codex-setup",
151517
151552
  error: error2 instanceof Error ? error2.message : String(error2)
151518
151553
  });
151519
- fail("Snapshotting filesystem (pre-setup) (failed)");
151554
+ fail("Snapshot FS (pre-setup) (failed)");
151520
151555
  throw error2;
151521
151556
  }
151522
151557
  }
@@ -151524,7 +151559,7 @@ var init_finalizeFlow = __esm({
151524
151559
  if (!skipServicesEnable) {
151525
151560
  await runInitStep({
151526
151561
  enabled: progressEnabled,
151527
- title: "Enabling devbox services",
151562
+ title: "Enabling services",
151528
151563
  fn: async ({ status }) => {
151529
151564
  await enableRemoteServices({
151530
151565
  client,
@@ -151562,12 +151597,12 @@ var init_finalizeFlow = __esm({
151562
151597
  );
151563
151598
  await runInitStep({
151564
151599
  enabled: progressEnabled,
151565
- title: "Snapshotting filesystem (post-setup)",
151600
+ title: "Snapshot FS (post-setup)",
151566
151601
  fn: async ({ status, fail, ok }) => {
151567
151602
  try {
151568
151603
  const checkpoint = await retryInitStep2({
151569
151604
  status,
151570
- title: "Snapshotting filesystem (post-setup)",
151605
+ title: "Snapshot FS (post-setup)",
151571
151606
  fn: async () => await recordCodexCheckpoint({
151572
151607
  client,
151573
151608
  canonical,
@@ -151585,7 +151620,7 @@ var init_finalizeFlow = __esm({
151585
151620
  phase: "post-codex-setup",
151586
151621
  error: error2 instanceof Error ? error2.message : String(error2)
151587
151622
  });
151588
- fail("Snapshotting filesystem (post-setup) (failed)");
151623
+ fail("Snapshot FS (post-setup) (failed)");
151589
151624
  throw error2;
151590
151625
  }
151591
151626
  }
@@ -151657,6 +151692,7 @@ var init_init = __esm({
151657
151692
  init_repo2();
151658
151693
  init_remote();
151659
151694
  init_ensureMux();
151695
+ init_installOptions();
151660
151696
  init_registry2();
151661
151697
  init_state();
151662
151698
  init_mountSsh();
@@ -152040,7 +152076,7 @@ var init_init = __esm({
152040
152076
  }
152041
152077
  await runInitStep({
152042
152078
  enabled: progressEnabled,
152043
- title: "Destroying existing devbox (--force)",
152079
+ title: "Destroying devbox (--force)",
152044
152080
  fn: async ({ status }) => {
152045
152081
  logger7.info("init_force_destroy_start", {
152046
152082
  box: forceCanonical,
@@ -152066,7 +152102,7 @@ var init_init = __esm({
152066
152102
  if (!confirmedDestroy) {
152067
152103
  throw new Error("Force init canceled.");
152068
152104
  }
152069
- status.stage("Destroying existing devbox (--force)");
152105
+ status.stage("Destroying devbox (--force)");
152070
152106
  }
152071
152107
  if (spriteExists) {
152072
152108
  logger7.info("init_force_destroy_confirmed", {
@@ -152163,7 +152199,7 @@ var init_init = __esm({
152163
152199
  } else {
152164
152200
  const suffix = fingerprint.slice(0, 6);
152165
152201
  nextCanonical = `${nextCanonical}-${suffix}`;
152166
- status.stage("Resolving devbox name");
152202
+ status.stage("Resolving name");
152167
152203
  const second = await createSprite(nextCanonical);
152168
152204
  if (second.kind === "exists") {
152169
152205
  throw new Error(`Sprite already exists: ${nextCanonical}`);
@@ -152291,7 +152327,7 @@ var init_init = __esm({
152291
152327
  if (!release2) {
152292
152328
  throw new Error("No sprite daemon release available.");
152293
152329
  }
152294
- status.stage("Issuing daemon heartbeat token");
152330
+ status.stage("Issuing daemon token");
152295
152331
  const heartbeatToken = await issueSpriteDaemonToken(
152296
152332
  controlPlaneToken,
152297
152333
  alias
@@ -152313,7 +152349,7 @@ var init_init = __esm({
152313
152349
  title: "Installing sprite daemon",
152314
152350
  uploadedBytes: downloadedBytes,
152315
152351
  totalBytes,
152316
- detail: "downloading daemon package"
152352
+ detail: "downloading package"
152317
152353
  });
152318
152354
  },
152319
152355
  onUploadProgress: (uploadedBytes, totalBytes) => {
@@ -152321,7 +152357,7 @@ var init_init = __esm({
152321
152357
  title: "Installing sprite daemon",
152322
152358
  uploadedBytes,
152323
152359
  totalBytes,
152324
- detail: "uploading daemon package"
152360
+ detail: "uploading package"
152325
152361
  });
152326
152362
  },
152327
152363
  onPhase: (completedPhases, totalPhases, detail) => {
@@ -152348,12 +152384,12 @@ var init_init = __esm({
152348
152384
  }
152349
152385
  await runInitStep({
152350
152386
  enabled: progressEnabled,
152351
- title: "Ensuring sprite daemon service",
152387
+ title: "Ensuring daemon service",
152352
152388
  fn: async ({ status, fail }) => {
152353
152389
  try {
152354
152390
  await retryInitStep({
152355
152391
  status,
152356
- title: "Ensuring sprite daemon service",
152392
+ title: "Ensuring daemon service",
152357
152393
  fn: async () => await ensureSpriteDaemonService({
152358
152394
  client,
152359
152395
  spriteName: alias
@@ -152365,7 +152401,7 @@ var init_init = __esm({
152365
152401
  box: canonical,
152366
152402
  error: String(error2)
152367
152403
  });
152368
- fail("Ensuring sprite daemon service (failed)");
152404
+ fail("Ensuring daemon service (failed)");
152369
152405
  throw error2;
152370
152406
  }
152371
152407
  }
@@ -152374,12 +152410,12 @@ var init_init = __esm({
152374
152410
  if (!skipSshdConfig) {
152375
152411
  await runInitStep({
152376
152412
  enabled: progressEnabled,
152377
- title: "Configuring SSH mount access",
152413
+ title: "SSH mount setup",
152378
152414
  fn: async ({ status, fail }) => {
152379
152415
  const totalPhases = 5;
152380
152416
  const setPhase = (completedPhases, detail) => {
152381
152417
  status.phaseProgress({
152382
- title: "Configuring SSH mount access",
152418
+ title: "SSH mount setup",
152383
152419
  completedPhases,
152384
152420
  totalPhases,
152385
152421
  detail
@@ -152388,17 +152424,17 @@ var init_init = __esm({
152388
152424
  try {
152389
152425
  await retryInitStep({
152390
152426
  status,
152391
- title: "Configuring SSH mount access",
152427
+ title: "SSH mount setup",
152392
152428
  fn: async () => {
152393
- setPhase(0, "ensuring local mount key (1/5)");
152429
+ setPhase(0, "ensure mount key");
152394
152430
  await ensureLocalMountKey();
152395
- setPhase(1, "ensuring known_hosts file (2/5)");
152431
+ setPhase(1, "ensure known_hosts");
152396
152432
  await ensureKnownHostsFile();
152397
- setPhase(2, "reading mount public key (3/5)");
152433
+ setPhase(2, "read mount key");
152398
152434
  const publicKey = await readLocalMountPublicKey();
152399
- setPhase(3, "bootstrapping remote sshd access (4/5)");
152435
+ setPhase(3, "bootstrap sshd");
152400
152436
  await ensureRemoteMountAccess(client, alias, publicKey);
152401
- setPhase(4, "ensuring sshd service (5/5)");
152437
+ setPhase(4, "ensure sshd service");
152402
152438
  await ensureSshdService(client, alias);
152403
152439
  setPhase(5, "completed");
152404
152440
  }
@@ -152409,27 +152445,38 @@ var init_init = __esm({
152409
152445
  box: canonical,
152410
152446
  error: String(error2)
152411
152447
  });
152412
- fail("Configuring SSH mount access (failed)");
152448
+ fail("SSH mount setup (failed)");
152413
152449
  throw error2;
152414
152450
  }
152415
152451
  }
152416
152452
  });
152417
152453
  }
152418
- const weztermMuxPresent = await runInitStep({
152454
+ const localWeztermVersion = await resolveLocalWeztermVersion();
152455
+ if (!localWeztermVersion) {
152456
+ logger7.info("wezterm_mux_skipped_local_missing", { box: canonical });
152457
+ if (!parsed.json) {
152458
+ console.log(
152459
+ "WezTerm not installed locally; skipping optional mux server setup."
152460
+ );
152461
+ }
152462
+ }
152463
+ const weztermMuxPresent = localWeztermVersion ? await runInitStep({
152419
152464
  enabled: progressEnabled,
152420
- title: "Ensuring WezTerm mux server (optional)",
152465
+ title: "Ensure WezTerm mux (opt)",
152421
152466
  fn: async ({ status, fail }) => {
152422
152467
  try {
152423
152468
  const installResult = await retryInitStep({
152424
152469
  status,
152425
- title: "Ensuring WezTerm mux server",
152470
+ title: "Ensuring WezTerm mux",
152426
152471
  fn: async () => !shouldResume || !initState?.steps.weztermMuxInstalled ? await ensureWeztermMuxInstalled({
152427
152472
  client,
152428
152473
  spriteName: alias,
152474
+ installOptions: { version: localWeztermVersion },
152429
152475
  allowResolveAsset: true
152430
152476
  }) : await ensureWeztermMuxInstalled({
152431
152477
  client,
152432
152478
  spriteName: alias,
152479
+ installOptions: { version: localWeztermVersion },
152433
152480
  // If the mux is missing on resume, we still need to resolve a GitHub asset.
152434
152481
  allowResolveAsset: true
152435
152482
  })
@@ -152443,7 +152490,7 @@ var init_init = __esm({
152443
152490
  box: canonical,
152444
152491
  error: error2 instanceof Error ? error2.message : String(error2)
152445
152492
  });
152446
- fail("Ensuring WezTerm mux server (optional) (failed)");
152493
+ fail("Ensure WezTerm mux (opt) (failed)");
152447
152494
  if (!parsed.json) {
152448
152495
  const message = error2 instanceof Error && error2.message ? error2.message : String(error2);
152449
152496
  console.warn(
@@ -152454,16 +152501,16 @@ Tip: re-run with DEVBOX_LOG_LEVEL=info to see Sprite exec logs on stderr.`
152454
152501
  return false;
152455
152502
  }
152456
152503
  }
152457
- });
152504
+ }) : false;
152458
152505
  if (weztermMuxPresent && (!shouldResume || !initState?.steps.weztermMuxServiceEnsured)) {
152459
152506
  await runInitStep({
152460
152507
  enabled: progressEnabled,
152461
- title: "Ensuring WezTerm mux service (optional)",
152508
+ title: "Ensure WezTerm mux svc (opt)",
152462
152509
  fn: async ({ status, fail }) => {
152463
152510
  try {
152464
152511
  await retryInitStep({
152465
152512
  status,
152466
- title: "Ensuring WezTerm mux service",
152513
+ title: "Ensuring WezTerm mux svc",
152467
152514
  fn: async () => await ensureWeztermMuxService({
152468
152515
  client,
152469
152516
  spriteName: alias
@@ -152477,7 +152524,7 @@ Tip: re-run with DEVBOX_LOG_LEVEL=info to see Sprite exec logs on stderr.`
152477
152524
  box: canonical,
152478
152525
  error: error2 instanceof Error ? error2.message : String(error2)
152479
152526
  });
152480
- fail("Ensuring WezTerm mux service (optional) (failed)");
152527
+ fail("Ensure WezTerm mux svc (opt) (failed)");
152481
152528
  if (!parsed.json) {
152482
152529
  const message = error2 instanceof Error && error2.message ? error2.message : String(error2);
152483
152530
  console.warn(
@@ -157379,12 +157426,15 @@ var init_updateNotice = __esm({
157379
157426
  // src/devbox/cli.ts
157380
157427
  var cli_exports = {};
157381
157428
  __export(cli_exports, {
157382
- main: () => main2
157429
+ main: () => main2,
157430
+ resolveEmptyInvocationMode: () => resolveEmptyInvocationMode
157383
157431
  });
157384
- var printUsage, main2;
157432
+ var import_promises33, hasProjectState, resolveEmptyInvocationMode, printOnboardingHint, printUsage, main2;
157385
157433
  var init_cli = __esm({
157386
157434
  "src/devbox/cli.ts"() {
157387
157435
  "use strict";
157436
+ import_promises33 = __toESM(require("node:fs/promises"), 1);
157437
+ init_src();
157388
157438
  init_connect2();
157389
157439
  init_daemon();
157390
157440
  init_destroy();
@@ -157404,6 +157454,39 @@ var init_cli = __esm({
157404
157454
  init_wezterm();
157405
157455
  init_completions();
157406
157456
  init_updateNotice();
157457
+ init_colors();
157458
+ hasProjectState = async (projectsDir) => {
157459
+ try {
157460
+ const entries = await import_promises33.default.readdir(projectsDir, { withFileTypes: true });
157461
+ return entries.some((entry) => entry.isDirectory());
157462
+ } catch (error2) {
157463
+ if (error2 instanceof Error && "code" in error2 && error2.code === "ENOENT") {
157464
+ return false;
157465
+ }
157466
+ throw error2;
157467
+ }
157468
+ };
157469
+ resolveEmptyInvocationMode = async ({
157470
+ homeDir
157471
+ } = {}) => {
157472
+ const config3 = await loadConfig(homeDir ? { homeDir } : void 0);
157473
+ if (!config3) {
157474
+ return "setup_hint";
157475
+ }
157476
+ const initializedAnyRepo = await hasProjectState(
157477
+ resolveDevboxProjectsDir(homeDir)
157478
+ );
157479
+ return initializedAnyRepo ? "show_usage" : "init_hint";
157480
+ };
157481
+ printOnboardingHint = (mode) => {
157482
+ const command = mode === "setup_hint" ? "`dvb setup`" : "`dvb init`";
157483
+ const suffix = mode === "setup_hint" ? " to get started." : " at the root of your repo to set up your first devbox.";
157484
+ console.log(
157485
+ `${colors.bold("Welcome to ")}${colors.style("boxes.dev!", ["bold", "green"])}${colors.bold(" Run ")}${colors.style(command, ["bold", "cyan"])}${colors.bold(suffix)}`
157486
+ );
157487
+ console.log("");
157488
+ console.log("Use `dvb --help` to see all commands.");
157489
+ };
157407
157490
  printUsage = () => {
157408
157491
  console.log("Usage:");
157409
157492
  console.log(" dvb --version");
@@ -157466,7 +157549,21 @@ var init_cli = __esm({
157466
157549
  main2 = async () => {
157467
157550
  const args = process.argv.slice(2);
157468
157551
  await maybePrintUpgradeNotice(args);
157469
- if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
157552
+ if (args.length === 0) {
157553
+ try {
157554
+ const mode = await resolveEmptyInvocationMode(
157555
+ process.env.HOME ? { homeDir: process.env.HOME } : void 0
157556
+ );
157557
+ if (mode === "setup_hint" || mode === "init_hint") {
157558
+ printOnboardingHint(mode);
157559
+ return;
157560
+ }
157561
+ } catch {
157562
+ }
157563
+ printUsage();
157564
+ return;
157565
+ }
157566
+ if (args[0] === "--help" || args[0] === "-h") {
157470
157567
  printUsage();
157471
157568
  return;
157472
157569
  }
@@ -157791,4 +157888,4 @@ smol-toml/dist/index.js:
157791
157888
  */
157792
157889
  //# sourceMappingURL=dvb.cjs.map
157793
157890
 
157794
- //# debugId=119d7e63-fb65-5c6b-9057-03eebe3f0256
157891
+ //# debugId=c7b28144-a37f-5cd7-b6e5-1af8e43047e8