@trops/dash-core 0.1.550 → 0.1.551

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.
@@ -50460,6 +50460,53 @@ const LOCKDOWN_DISALLOWED_TOOLS = [
50460
50460
  "SlashCommand",
50461
50461
  ].join(",");
50462
50462
 
50463
+ /**
50464
+ * Path to the e2e-only argv capture file. Only written when
50465
+ * `process.env.DASH_E2E === "1"` (set by `e2e/helpers/electron-app.js`
50466
+ * for Playwright runs). Production launches never set it, so no
50467
+ * diagnostic is written on a real user's machine.
50468
+ *
50469
+ * The capture deterministically pins the chain ChatCore → IPC →
50470
+ * cliController. Slice 18a's diagnostic revealed that the chain
50471
+ * silently dropped `replaceSystemPrompt` and `disableTools` for
50472
+ * months. Without an argv assertion, the next break would be
50473
+ * invisible until a user filed a bug. With it, the e2e test
50474
+ * `widget-builder-cli-flow.spec.js` reads this file and asserts the
50475
+ * full lockdown flag set is present — fails immediately if any flag
50476
+ * goes missing.
50477
+ */
50478
+ const E2E_LAST_SPAWN_LOG_PATH = (() => {
50479
+ const os = require$$2$1;
50480
+ const path = require$$1$1;
50481
+ return path.join(os.tmpdir(), "dash-cli-last-spawn.e2e.json");
50482
+ })();
50483
+
50484
+ /**
50485
+ * Slice 18b — gated argv capture. No-op outside e2e mode.
50486
+ *
50487
+ * Captures argv only (NOT env values, NOT env keys — production users
50488
+ * are protected by the env-var gate; we don't need the keys-only
50489
+ * privacy hedge anymore since this never runs for them).
50490
+ */
50491
+ function captureLastSpawnArgsForE2E({ args, disableTools = false } = {}) {
50492
+ if (process.env.DASH_E2E !== "1") return;
50493
+ try {
50494
+ const fs = require("fs");
50495
+ const payload = {
50496
+ ts: Date.now(),
50497
+ disableTools: disableTools === true,
50498
+ args: Array.isArray(args) ? args.slice() : [],
50499
+ };
50500
+ fs.writeFileSync(
50501
+ E2E_LAST_SPAWN_LOG_PATH,
50502
+ JSON.stringify(payload, null, 2),
50503
+ { encoding: "utf8" },
50504
+ );
50505
+ } catch (_e) {
50506
+ // Capture must NEVER break the spawn.
50507
+ }
50508
+ }
50509
+
50463
50510
  /**
50464
50511
  * Build the argv array for spawning the Claude Code CLI.
50465
50512
  *
@@ -50758,6 +50805,8 @@ const cliController$2 = {
50758
50805
  }
50759
50806
  const spawnCmd = IS_WINDOWS ? windowsQuote(binaryPath) : binaryPath;
50760
50807
  const spawnArgs = IS_WINDOWS ? args.map(windowsQuote) : args;
50808
+ // No-op outside e2e mode (gated on process.env.DASH_E2E === "1").
50809
+ captureLastSpawnArgsForE2E({ args, disableTools });
50761
50810
  const child = spawn(spawnCmd, spawnArgs, spawnOpts);
50762
50811
 
50763
50812
  activeProcesses.set(requestId, child);
@@ -51079,6 +51128,7 @@ cliController$3.exports.buildClaudeCliArgs = buildClaudeCliArgs;
51079
51128
  cliController$3.exports.resolveLockdownCwd = resolveLockdownCwd;
51080
51129
  cliController$3.exports.resolveLockdownPluginDir = resolveLockdownPluginDir;
51081
51130
  cliController$3.exports.LOCKDOWN_DISALLOWED_TOOLS = LOCKDOWN_DISALLOWED_TOOLS;
51131
+ cliController$3.exports.E2E_LAST_SPAWN_LOG_PATH = E2E_LAST_SPAWN_LOG_PATH;
51082
51132
 
51083
51133
  var cliControllerExports = cliController$3.exports;
51084
51134