claudish 12.2.0 → 12.2.1

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 +47 -13
  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.1";
905
905
 
906
906
  // src/logger.ts
907
907
  import { appendFile, existsSync as existsSync2, mkdirSync, readdirSync, unlinkSync, writeFileSync as writeFileSync2 } from "fs";
@@ -63950,7 +63950,11 @@ function readProcessTable() {
63950
63950
  }
63951
63951
  function readProcessTableAsync() {
63952
63952
  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))));
63953
+ try {
63954
+ execFile("ps", PS_ARGS, { env: PS_ENV, encoding: "utf8", maxBuffer: 64 * 1024 * 1024 }, (err, stdout) => resolve(err ? [] : parsePsTable(String(stdout))));
63955
+ } catch {
63956
+ resolve([]);
63957
+ }
63954
63958
  });
63955
63959
  }
63956
63960
  function magmuxNeedle(paneId) {
@@ -69641,8 +69645,17 @@ var init_session_discovery = __esm(() => {
69641
69645
 
69642
69646
  // src/team-orchestrator.ts
69643
69647
  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";
69648
+ import {
69649
+ existsSync as existsSync31,
69650
+ lstatSync as lstatSync3,
69651
+ mkdirSync as mkdirSync21,
69652
+ readFileSync as readFileSync31,
69653
+ readdirSync as readdirSync9,
69654
+ realpathSync as realpathSync6,
69655
+ statSync as statSync12,
69656
+ writeFileSync as writeFileSync22
69657
+ } from "fs";
69658
+ import { basename as basename4, dirname as dirname15, join as join50, resolve as resolve5, sep } from "path";
69646
69659
  function slotTerminal(e) {
69647
69660
  if (!e.session)
69648
69661
  return true;
@@ -70028,9 +70041,30 @@ function persistErrorLog(errorLogPath, header, sections) {
70028
70041
  }
70029
70042
  function validateSessionPath(sessionPath) {
70030
70043
  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}`);
70044
+ const outside = () => new Error(`Session path must be within current directory: ${sessionPath}`);
70045
+ let existing = resolved;
70046
+ const tail = [];
70047
+ for (;; ) {
70048
+ try {
70049
+ lstatSync3(existing);
70050
+ break;
70051
+ } catch {
70052
+ const parent = dirname15(existing);
70053
+ if (parent === existing)
70054
+ break;
70055
+ tail.unshift(basename4(existing));
70056
+ existing = parent;
70057
+ }
70058
+ }
70059
+ let real;
70060
+ try {
70061
+ real = join50(realpathSync6(existing), ...tail);
70062
+ } catch {
70063
+ throw outside();
70064
+ }
70065
+ const cwd = realpathSync6(process.cwd());
70066
+ if (real !== cwd && !real.startsWith(cwd + sep)) {
70067
+ throw outside();
70034
70068
  }
70035
70069
  return resolved;
70036
70070
  }
@@ -70772,7 +70806,7 @@ import {
70772
70806
  statSync as statSync13,
70773
70807
  writeFileSync as writeFileSync23
70774
70808
  } from "fs";
70775
- import { join as join51, resolve as resolve6, sep } from "path";
70809
+ import { join as join51, resolve as resolve6, sep as sep2 } from "path";
70776
70810
  function normaliseTimeoutSeconds(raw) {
70777
70811
  const n = typeof raw === "string" && raw.trim() !== "" ? Number(raw) : raw;
70778
70812
  if (typeof n !== "number" || !Number.isFinite(n))
@@ -71615,7 +71649,7 @@ class SessionManager {
71615
71649
  const dir = resolve6(root, sessionId);
71616
71650
  if (dir !== join51(root, sessionId))
71617
71651
  return null;
71618
- if (!dir.startsWith(root + sep))
71652
+ if (!dir.startsWith(root + sep2))
71619
71653
  return null;
71620
71654
  return dir;
71621
71655
  }
@@ -72301,7 +72335,7 @@ var init_run_prompt_claude_code = __esm(() => {
72301
72335
  // src/mcp-server.ts
72302
72336
  import { existsSync as existsSync33, mkdirSync as mkdirSync24, readFileSync as readFileSync33, readdirSync as readdirSync10, writeFileSync as writeFileSync25 } from "fs";
72303
72337
  import { homedir as homedir35 } from "os";
72304
- import { dirname as dirname15, join as join53, resolve as resolve7 } from "path";
72338
+ import { dirname as dirname16, join as join53, resolve as resolve7 } from "path";
72305
72339
  import { fileURLToPath as fileURLToPath3 } from "url";
72306
72340
  async function loadAllModels(forceRefresh = false) {
72307
72341
  if (!forceRefresh && existsSync33(OPENROUTER_MODELS_CACHE_PATH)) {
@@ -73851,7 +73885,7 @@ var init_mcp_server = __esm(() => {
73851
73885
  import_dotenv2 = __toESM(require_main(), 1);
73852
73886
  import_dotenv2.config({ quiet: true });
73853
73887
  __filename3 = fileURLToPath3(import.meta.url);
73854
- __dirname3 = dirname15(__filename3);
73888
+ __dirname3 = dirname16(__filename3);
73855
73889
  CLAUDISH_CACHE_DIR = join53(homedir35(), ".claudish");
73856
73890
  OPENROUTER_MODELS_CACHE_PATH = join53(CLAUDISH_CACHE_DIR, "openrouter-models.json");
73857
73891
  NEXT_STEP = {
@@ -83742,7 +83776,7 @@ import {
83742
83776
  writeFileSync as writeFileSync28
83743
83777
  } from "fs";
83744
83778
  import { homedir as homedir37, tmpdir as tmpdir3 } from "os";
83745
- import { dirname as dirname16, join as join57 } from "path";
83779
+ import { dirname as dirname17, join as join57 } from "path";
83746
83780
  import { isatty } from "tty";
83747
83781
  function releaseTerminalIsolation() {
83748
83782
  if (!restoreTerminal)
@@ -83983,7 +84017,7 @@ process.stdin.on('end', () => {
83983
84017
  }
83984
84018
  function initializeTokenFile(tokenFilePath) {
83985
84019
  try {
83986
- mkdirSync25(dirname16(tokenFilePath), { recursive: true });
84020
+ mkdirSync25(dirname17(tokenFilePath), { recursive: true });
83987
84021
  writeFileSync28(tokenFilePath, JSON.stringify({
83988
84022
  input_tokens: 0,
83989
84023
  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.1",
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.1",
64
+ "@claudish/magmux-darwin-x64": "12.2.1",
65
+ "@claudish/magmux-linux-arm64": "12.2.1",
66
+ "@claudish/magmux-linux-x64": "12.2.1"
67
67
  },
68
68
  "author": "Jack Rudenko <i@madappgang.com>",
69
69
  "license": "MIT",