local-operator-ui 0.25.1 → 0.25.2

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.
Files changed (2) hide show
  1. package/out/main/index.js +24 -3
  2. package/package.json +3 -1
package/out/main/index.js CHANGED
@@ -17219,8 +17219,11 @@ function resolveWindowLaunchPlan(input = {}) {
17219
17219
  const modeValue = modeFlag.found ? modeFlag.value : env[WINDOW_MODE_ENV];
17220
17220
  const modeRaw = typeof modeValue === "string" && modeValue.trim() === "" ? void 0 : modeValue;
17221
17221
  const parsedMode = parseWindowMode(modeRaw);
17222
- const agentFlag = !modeFlag.found && modeRaw === void 0 ? AGENT_LAUNCH_FLAGS.find((flag) => readFlag(argv, flag).found) : void 0;
17223
- const assumed = agentFlag ? `${agentFlag} marks an agent-driven launch, and no window mode was named` : null;
17222
+ const unnamed = !modeFlag.found && modeRaw === void 0;
17223
+ const agentFlag = unnamed ? AGENT_LAUNCH_FLAGS.find((flag) => readFlag(argv, flag).found) : void 0;
17224
+ const platform = input.platform ?? process.platform;
17225
+ const driven = unnamed && agentFlag === void 0 && input.packaged === false && platform !== "win32" && input.stdinIsTTY !== true && input.stdoutIsTTY !== true;
17226
+ const assumed = agentFlag ? `${agentFlag} marks an agent-driven launch, and no window mode was named` : driven ? "the launch is not a packaged app and has no terminal on either stream, so it is a driven run rather than the operator using the app" : null;
17224
17227
  if (modeFlag.found && modeFlag.value === void 0) {
17225
17228
  problems.push(
17226
17229
  `${WINDOW_MODE_FLAG} needs a value: ${WINDOW_MODES.join("|")}`
@@ -17322,7 +17325,25 @@ const resolveUserPath = (filePath, cwd) => {
17322
17325
  };
17323
17326
  const windowLaunch = resolveWindowLaunchPlan({
17324
17327
  env: launchEnv,
17325
- argv: process.argv
17328
+ argv: process.argv,
17329
+ /*
17330
+ * The facts that let a flagless launch be recognised as a run rather than as
17331
+ * the operator's app — see the `driven` block in window-mode.ts for why the
17332
+ * shape is sound and why it cannot touch the shipped app.
17333
+ *
17334
+ * `app.isPackaged` is read here, at module load, rather than inside the
17335
+ * resolver: it describes the LAUNCH (the installed `.app` is packaged, a
17336
+ * checkout and the npm CLI are not), and the resolver stays free of Electron
17337
+ * so its rules can be tested as arithmetic instead of by booting an app.
17338
+ *
17339
+ * `process.stdin`/`process.stdout` are read as the process was STARTED with
17340
+ * them, for the same reason `launchEnv` exists: a terminal attached later
17341
+ * cannot make this a person's launch.
17342
+ */
17343
+ packaged: electron.app.isPackaged,
17344
+ stdinIsTTY: process.stdin.isTTY,
17345
+ stdoutIsTTY: process.stdout.isTTY,
17346
+ platform: process.platform
17326
17347
  });
17327
17348
  for (const problem of windowLaunch.problems) {
17328
17349
  logger.warn(`[window-mode] ${problem}`, LogFileType.BACKEND);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "productName": "Local Operator",
5
5
  "description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
6
6
  "main": "./out/main/index.js",
@@ -64,6 +64,8 @@
64
64
  "postinstall": "node ./bin/postinstall.js",
65
65
  "lint": "pnpm biome check src bin scripts/linux-sandbox.test.mjs",
66
66
  "lint:fix": "pnpm biome check --write src bin scripts/linux-sandbox.test.mjs",
67
+ "//lint:scripts": "`pnpm lint` names the paths it checks by hand, so the whole of `scripts/` - the proof harnesses, evidence rigs and release gates - sat outside the lint and formatter contracts, and a formatter error rode into a merged pull request green. This gate runs the same `biome check` over the `scripts/` files a change touches against a base ref (`origin/main` locally, the merge commit's first parent in CI), so a violation cannot ride in with the diff that introduces it, while the tree's 106 pre-existing offenders are burnt down file by file rather than turned red at once. Widening `pnpm lint` to name `scripts/` outright is the follow-up once that backlog is gone; scripts/check-scripts-lint.mjs holds the measurements and the full rationale.",
68
+ "lint:scripts": "node scripts/check-scripts-lint.mjs",
67
69
  "format": "pnpm biome format src",
68
70
  "format:fix": "pnpm biome format --write src",
69
71
  "prepack": "pnpm run build:npm",