claudish 12.2.0 → 12.2.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/dist/index.js +53 -15
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -901,7 +901,7 @@ var init_onepassword_config = __esm(() => {
901
901
  });
902
902
 
903
903
  // src/version.ts
904
- var VERSION = "12.2.0";
904
+ var VERSION = "12.2.2";
905
905
 
906
906
  // src/logger.ts
907
907
  import { appendFile, existsSync as existsSync2, mkdirSync, readdirSync, unlinkSync, writeFileSync as writeFileSync2 } from "fs";
@@ -30248,6 +30248,9 @@ function decideLaunchRole(facts) {
30248
30248
  return "never";
30249
30249
  return "interactive-launch";
30250
30250
  }
30251
+ function decideTuiRole(env = process.env) {
30252
+ return inMcpSession(env) ? "never" : "tui";
30253
+ }
30251
30254
  var role = "never", fixed = false;
30252
30255
  var init_prompt_role = __esm(() => {
30253
30256
  init_child_env();
@@ -30919,7 +30922,8 @@ function displayPath2(path) {
30919
30922
  return path.startsWith(`${home}/`) ? `~${path.slice(home.length)}` : path;
30920
30923
  }
30921
30924
  function describeMuseSigningSource(opts = {}) {
30922
- if (opts.probed && lastRejection) {
30925
+ const signedAndLive = opts.signedWith !== undefined && opts.failure === undefined;
30926
+ if (opts.probed && lastRejection && !signedAndLive) {
30923
30927
  return { present: false, label: "Muse Code login rejected", detail: lastRejection };
30924
30928
  }
30925
30929
  if (opts.signedWith) {
@@ -63950,7 +63954,11 @@ function readProcessTable() {
63950
63954
  }
63951
63955
  function readProcessTableAsync() {
63952
63956
  return new Promise((resolve) => {
63953
- execFile("ps", PS_ARGS, { env: PS_ENV, encoding: "utf8", maxBuffer: 64 * 1024 * 1024 }, (err, stdout) => resolve(err ? [] : parsePsTable(String(stdout))));
63957
+ try {
63958
+ execFile("ps", PS_ARGS, { env: PS_ENV, encoding: "utf8", maxBuffer: 64 * 1024 * 1024 }, (err, stdout) => resolve(err ? [] : parsePsTable(String(stdout))));
63959
+ } catch {
63960
+ resolve([]);
63961
+ }
63954
63962
  });
63955
63963
  }
63956
63964
  function magmuxNeedle(paneId) {
@@ -69641,8 +69649,17 @@ var init_session_discovery = __esm(() => {
69641
69649
 
69642
69650
  // src/team-orchestrator.ts
69643
69651
  import { randomBytes as randomBytes8, randomUUID as randomUUID5 } from "crypto";
69644
- import { existsSync as existsSync31, mkdirSync as mkdirSync21, readFileSync as readFileSync31, readdirSync as readdirSync9, statSync as statSync12, writeFileSync as writeFileSync22 } from "fs";
69645
- import { basename as basename4, join as join50, resolve as resolve5 } from "path";
69652
+ import {
69653
+ existsSync as existsSync31,
69654
+ lstatSync as lstatSync3,
69655
+ mkdirSync as mkdirSync21,
69656
+ readFileSync as readFileSync31,
69657
+ readdirSync as readdirSync9,
69658
+ realpathSync as realpathSync6,
69659
+ statSync as statSync12,
69660
+ writeFileSync as writeFileSync22
69661
+ } from "fs";
69662
+ import { basename as basename4, dirname as dirname15, join as join50, resolve as resolve5, sep } from "path";
69646
69663
  function slotTerminal(e) {
69647
69664
  if (!e.session)
69648
69665
  return true;
@@ -70028,9 +70045,30 @@ function persistErrorLog(errorLogPath, header, sections) {
70028
70045
  }
70029
70046
  function validateSessionPath(sessionPath) {
70030
70047
  const resolved = resolve5(sessionPath);
70031
- const cwd = process.cwd();
70032
- if (!resolved.startsWith(`${cwd}/`) && resolved !== cwd) {
70033
- throw new Error(`Session path must be within current directory: ${sessionPath}`);
70048
+ const outside = () => new Error(`Session path must be within current directory: ${sessionPath}`);
70049
+ let existing = resolved;
70050
+ const tail = [];
70051
+ for (;; ) {
70052
+ try {
70053
+ lstatSync3(existing);
70054
+ break;
70055
+ } catch {
70056
+ const parent = dirname15(existing);
70057
+ if (parent === existing)
70058
+ break;
70059
+ tail.unshift(basename4(existing));
70060
+ existing = parent;
70061
+ }
70062
+ }
70063
+ let real;
70064
+ try {
70065
+ real = join50(realpathSync6(existing), ...tail);
70066
+ } catch {
70067
+ throw outside();
70068
+ }
70069
+ const cwd = realpathSync6(process.cwd());
70070
+ if (real !== cwd && !real.startsWith(cwd + sep)) {
70071
+ throw outside();
70034
70072
  }
70035
70073
  return resolved;
70036
70074
  }
@@ -70772,7 +70810,7 @@ import {
70772
70810
  statSync as statSync13,
70773
70811
  writeFileSync as writeFileSync23
70774
70812
  } from "fs";
70775
- import { join as join51, resolve as resolve6, sep } from "path";
70813
+ import { join as join51, resolve as resolve6, sep as sep2 } from "path";
70776
70814
  function normaliseTimeoutSeconds(raw) {
70777
70815
  const n = typeof raw === "string" && raw.trim() !== "" ? Number(raw) : raw;
70778
70816
  if (typeof n !== "number" || !Number.isFinite(n))
@@ -71615,7 +71653,7 @@ class SessionManager {
71615
71653
  const dir = resolve6(root, sessionId);
71616
71654
  if (dir !== join51(root, sessionId))
71617
71655
  return null;
71618
- if (!dir.startsWith(root + sep))
71656
+ if (!dir.startsWith(root + sep2))
71619
71657
  return null;
71620
71658
  return dir;
71621
71659
  }
@@ -72301,7 +72339,7 @@ var init_run_prompt_claude_code = __esm(() => {
72301
72339
  // src/mcp-server.ts
72302
72340
  import { existsSync as existsSync33, mkdirSync as mkdirSync24, readFileSync as readFileSync33, readdirSync as readdirSync10, writeFileSync as writeFileSync25 } from "fs";
72303
72341
  import { homedir as homedir35 } from "os";
72304
- import { dirname as dirname15, join as join53, resolve as resolve7 } from "path";
72342
+ import { dirname as dirname16, join as join53, resolve as resolve7 } from "path";
72305
72343
  import { fileURLToPath as fileURLToPath3 } from "url";
72306
72344
  async function loadAllModels(forceRefresh = false) {
72307
72345
  if (!forceRefresh && existsSync33(OPENROUTER_MODELS_CACHE_PATH)) {
@@ -73851,7 +73889,7 @@ var init_mcp_server = __esm(() => {
73851
73889
  import_dotenv2 = __toESM(require_main(), 1);
73852
73890
  import_dotenv2.config({ quiet: true });
73853
73891
  __filename3 = fileURLToPath3(import.meta.url);
73854
- __dirname3 = dirname15(__filename3);
73892
+ __dirname3 = dirname16(__filename3);
73855
73893
  CLAUDISH_CACHE_DIR = join53(homedir35(), ".claudish");
73856
73894
  OPENROUTER_MODELS_CACHE_PATH = join53(CLAUDISH_CACHE_DIR, "openrouter-models.json");
73857
73895
  NEXT_STEP = {
@@ -83209,7 +83247,7 @@ import { createCliRenderer as createCliRenderer3 } from "@opentui/core";
83209
83247
  import { createRoot as createRoot3 } from "@opentui/react";
83210
83248
  import { jsx as jsx28 } from "@opentui/react/jsx-runtime";
83211
83249
  async function startConfigTui() {
83212
- setCredentialPromptRole("tui");
83250
+ setCredentialPromptRole(decideTuiRole());
83213
83251
  ensureEndpointsRegistered();
83214
83252
  setStderrQuiet(true);
83215
83253
  const loginRequest = {
@@ -83742,7 +83780,7 @@ import {
83742
83780
  writeFileSync as writeFileSync28
83743
83781
  } from "fs";
83744
83782
  import { homedir as homedir37, tmpdir as tmpdir3 } from "os";
83745
- import { dirname as dirname16, join as join57 } from "path";
83783
+ import { dirname as dirname17, join as join57 } from "path";
83746
83784
  import { isatty } from "tty";
83747
83785
  function releaseTerminalIsolation() {
83748
83786
  if (!restoreTerminal)
@@ -83983,7 +84021,7 @@ process.stdin.on('end', () => {
83983
84021
  }
83984
84022
  function initializeTokenFile(tokenFilePath) {
83985
84023
  try {
83986
- mkdirSync25(dirname16(tokenFilePath), { recursive: true });
84024
+ mkdirSync25(dirname17(tokenFilePath), { recursive: true });
83987
84025
  writeFileSync28(tokenFilePath, JSON.stringify({
83988
84026
  input_tokens: 0,
83989
84027
  output_tokens: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "12.2.0",
3
+ "version": "12.2.2",
4
4
  "description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -60,10 +60,10 @@
60
60
  "ai"
61
61
  ],
62
62
  "optionalDependencies": {
63
- "@claudish/magmux-darwin-arm64": "12.2.0",
64
- "@claudish/magmux-darwin-x64": "12.2.0",
65
- "@claudish/magmux-linux-arm64": "12.2.0",
66
- "@claudish/magmux-linux-x64": "12.2.0"
63
+ "@claudish/magmux-darwin-arm64": "12.2.2",
64
+ "@claudish/magmux-darwin-x64": "12.2.2",
65
+ "@claudish/magmux-linux-arm64": "12.2.2",
66
+ "@claudish/magmux-linux-x64": "12.2.2"
67
67
  },
68
68
  "author": "Jack Rudenko <i@madappgang.com>",
69
69
  "license": "MIT",