claudish 3.0.0 → 3.0.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.
package/dist/index.js CHANGED
@@ -31033,7 +31033,7 @@ async function runPrompt(model, prompt, systemPrompt, maxTokens) {
31033
31033
  headers: {
31034
31034
  Authorization: `Bearer ${apiKey}`,
31035
31035
  "Content-Type": "application/json",
31036
- "HTTP-Referer": "https://github.com/MadAppGang/claude-code",
31036
+ "HTTP-Referer": "https://claudish.com",
31037
31037
  "X-Title": "Claudish MCP"
31038
31038
  },
31039
31039
  body: JSON.stringify({
@@ -34312,7 +34312,7 @@ var init_config = __esm(() => {
34312
34312
  CLAUDISH_SUMMARIZE_TOOLS: "CLAUDISH_SUMMARIZE_TOOLS"
34313
34313
  };
34314
34314
  OPENROUTER_HEADERS = {
34315
- "HTTP-Referer": "https://github.com/MadAppGang/claude-code",
34315
+ "HTTP-Referer": "https://claudish.com",
34316
34316
  "X-Title": "Claudish - OpenRouter Proxy"
34317
34317
  };
34318
34318
  });
@@ -34324,16 +34324,17 @@ __export(exports_claude_runner, {
34324
34324
  checkClaudeInstalled: () => checkClaudeInstalled
34325
34325
  });
34326
34326
  import { spawn } from "node:child_process";
34327
- import { writeFileSync as writeFileSync4, unlinkSync } from "node:fs";
34327
+ import { writeFileSync as writeFileSync4, unlinkSync, mkdirSync as mkdirSync2 } from "node:fs";
34328
34328
  import { tmpdir } from "node:os";
34329
34329
  import { join as join4 } from "node:path";
34330
34330
  function isWindows() {
34331
34331
  return process.platform === "win32";
34332
34332
  }
34333
34333
  function createStatusLineScript(tokenFilePath) {
34334
- const tempDir = tmpdir();
34334
+ const homeDir = process.env.HOME || process.env.USERPROFILE || tmpdir();
34335
+ const claudishDir = join4(homeDir, ".claudish");
34335
34336
  const timestamp = Date.now();
34336
- const scriptPath = join4(tempDir, `claudish-status-${timestamp}.js`);
34337
+ const scriptPath = join4(claudishDir, `status-${timestamp}.js`);
34337
34338
  const escapedTokenPath = tokenFilePath.replace(/\\/g, "\\\\");
34338
34339
  const script = `
34339
34340
  const fs = require('fs');
@@ -34381,10 +34382,14 @@ process.stdin.on('end', () => {
34381
34382
  return scriptPath;
34382
34383
  }
34383
34384
  function createTempSettingsFile(modelDisplay, port) {
34384
- const tempDir = tmpdir();
34385
+ const homeDir = process.env.HOME || process.env.USERPROFILE || tmpdir();
34386
+ const claudishDir = join4(homeDir, ".claudish");
34387
+ try {
34388
+ mkdirSync2(claudishDir, { recursive: true });
34389
+ } catch {}
34385
34390
  const timestamp = Date.now();
34386
- const tempPath = join4(tempDir, `claudish-settings-${timestamp}.json`);
34387
- const tokenFilePath = join4(tempDir, `claudish-tokens-${port}.json`);
34391
+ const tempPath = join4(claudishDir, `settings-${timestamp}.json`);
34392
+ const tokenFilePath = join4(claudishDir, `tokens-${port}.json`);
34388
34393
  let statusCommand;
34389
34394
  if (isWindows()) {
34390
34395
  const scriptPath = createStatusLineScript(tokenFilePath);
@@ -34705,7 +34710,7 @@ __export(exports_cli, {
34705
34710
  parseArgs: () => parseArgs,
34706
34711
  getVersion: () => getVersion
34707
34712
  });
34708
- import { readFileSync as readFileSync5, writeFileSync as writeFileSync6, existsSync as existsSync5, mkdirSync as mkdirSync2, copyFileSync } from "node:fs";
34713
+ import { readFileSync as readFileSync5, writeFileSync as writeFileSync6, existsSync as existsSync5, mkdirSync as mkdirSync3, copyFileSync } from "node:fs";
34709
34714
  import { fileURLToPath as fileURLToPath4 } from "node:url";
34710
34715
  import { dirname as dirname4, join as join6 } from "node:path";
34711
34716
  function getVersion() {
@@ -35558,15 +35563,15 @@ async function initializeClaudishSkill() {
35558
35563
  }
35559
35564
  try {
35560
35565
  if (!existsSync5(claudeDir)) {
35561
- mkdirSync2(claudeDir, { recursive: true });
35566
+ mkdirSync3(claudeDir, { recursive: true });
35562
35567
  console.log("\uD83D\uDCC1 Created .claude/ directory");
35563
35568
  }
35564
35569
  if (!existsSync5(skillsDir)) {
35565
- mkdirSync2(skillsDir, { recursive: true });
35570
+ mkdirSync3(skillsDir, { recursive: true });
35566
35571
  console.log("\uD83D\uDCC1 Created .claude/skills/ directory");
35567
35572
  }
35568
35573
  if (!existsSync5(claudishSkillDir)) {
35569
- mkdirSync2(claudishSkillDir, { recursive: true });
35574
+ mkdirSync3(claudishSkillDir, { recursive: true });
35570
35575
  console.log("\uD83D\uDCC1 Created .claude/skills/claudish-usage/ directory");
35571
35576
  }
35572
35577
  copyFileSync(sourceSkillPath, skillFile);
@@ -35712,7 +35717,7 @@ __export(exports_logger, {
35712
35717
  getLogLevel: () => getLogLevel,
35713
35718
  getLogFilePath: () => getLogFilePath
35714
35719
  });
35715
- import { writeFileSync as writeFileSync7, appendFile, existsSync as existsSync6, mkdirSync as mkdirSync3 } from "fs";
35720
+ import { writeFileSync as writeFileSync7, appendFile, existsSync as existsSync6, mkdirSync as mkdirSync4 } from "fs";
35716
35721
  import { join as join7 } from "path";
35717
35722
  function flushLogBuffer() {
35718
35723
  if (!logFilePath || logBuffer.length === 0)
@@ -35754,7 +35759,7 @@ function initLogger(debugMode, level = "info") {
35754
35759
  logLevel = level;
35755
35760
  const logsDir = join7(process.cwd(), "logs");
35756
35761
  if (!existsSync6(logsDir)) {
35757
- mkdirSync3(logsDir, { recursive: true });
35762
+ mkdirSync4(logsDir, { recursive: true });
35758
35763
  }
35759
35764
  const timestamp = new Date().toISOString().replace(/[:.]/g, "-").split("T").join("_").slice(0, -5);
35760
35765
  logFilePath = join7(logsDir, `claudish_${timestamp}.log`);
@@ -40202,7 +40207,7 @@ var init_openrouter_handler = __esm(() => {
40202
40207
  init_model_loader();
40203
40208
  init_openai_compat();
40204
40209
  OPENROUTER_HEADERS2 = {
40205
- "HTTP-Referer": "https://github.com/MadAppGang/claude-code",
40210
+ "HTTP-Referer": "https://claudish.com",
40206
40211
  "X-Title": "Claudish - OpenRouter Proxy"
40207
40212
  };
40208
40213
  });
@@ -61020,18 +61025,6 @@ async function createProxyServer(port, openrouterApiKey, model, monitorMode = fa
61020
61025
  }
61021
61026
  return null;
61022
61027
  };
61023
- const initHandler = (m) => {
61024
- if (!m)
61025
- return;
61026
- const localHandler = getLocalProviderHandler(m);
61027
- if (!localHandler && m.includes("/"))
61028
- getOpenRouterHandler(m);
61029
- };
61030
- initHandler(model);
61031
- initHandler(modelMap?.opus);
61032
- initHandler(modelMap?.sonnet);
61033
- initHandler(modelMap?.haiku);
61034
- initHandler(modelMap?.subagent);
61035
61028
  const getHandlerForRequest = (requestedModel) => {
61036
61029
  if (monitorMode)
61037
61030
  return nativeHandler;
@@ -61118,7 +61111,7 @@ __export(exports_update_checker, {
61118
61111
  });
61119
61112
  import { execSync } from "node:child_process";
61120
61113
  import { createInterface as createInterface2 } from "node:readline";
61121
- import { existsSync as existsSync7, readFileSync as readFileSync6, writeFileSync as writeFileSync10, mkdirSync as mkdirSync4, unlinkSync as unlinkSync2 } from "node:fs";
61114
+ import { existsSync as existsSync7, readFileSync as readFileSync6, writeFileSync as writeFileSync10, mkdirSync as mkdirSync5, unlinkSync as unlinkSync2 } from "node:fs";
61122
61115
  import { join as join10 } from "node:path";
61123
61116
  import { tmpdir as tmpdir4, homedir as homedir2, platform } from "node:os";
61124
61117
  function getCacheFilePath() {
@@ -61131,7 +61124,7 @@ function getCacheFilePath() {
61131
61124
  }
61132
61125
  try {
61133
61126
  if (!existsSync7(cacheDir)) {
61134
- mkdirSync4(cacheDir, { recursive: true });
61127
+ mkdirSync5(cacheDir, { recursive: true });
61135
61128
  }
61136
61129
  return join10(cacheDir, "update-check.json");
61137
61130
  } catch {
@@ -61365,12 +61358,14 @@ async function runCli() {
61365
61358
  }
61366
61359
  }
61367
61360
  const port = cliConfig.port || await findAvailablePort2(DEFAULT_PORT_RANGE2.start, DEFAULT_PORT_RANGE2.end);
61368
- const proxy = await createProxyServer2(port, cliConfig.monitor ? undefined : cliConfig.openrouterApiKey, cliConfig.monitor ? undefined : typeof cliConfig.model === "string" ? cliConfig.model : undefined, cliConfig.monitor, cliConfig.anthropicApiKey, {
61361
+ const explicitModel = typeof cliConfig.model === "string" ? cliConfig.model : undefined;
61362
+ const modelMap = explicitModel ? undefined : {
61369
61363
  opus: cliConfig.modelOpus,
61370
61364
  sonnet: cliConfig.modelSonnet,
61371
61365
  haiku: cliConfig.modelHaiku,
61372
61366
  subagent: cliConfig.modelSubagent
61373
- }, {
61367
+ };
61368
+ const proxy = await createProxyServer2(port, cliConfig.monitor ? undefined : cliConfig.openrouterApiKey, cliConfig.monitor ? undefined : explicitModel, cliConfig.monitor, cliConfig.anthropicApiKey, modelMap, {
61374
61369
  summarizeTools: cliConfig.summarizeTools
61375
61370
  });
61376
61371
  let exitCode = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "3.0.0",
3
+ "version": "3.0.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",
@@ -135,7 +135,7 @@ export const ENV = {
135
135
  // OpenRouter API Configuration
136
136
  export const OPENROUTER_API_URL = "https://openrouter.ai/api/v1/chat/completions";
137
137
  export const OPENROUTER_HEADERS = {
138
- "HTTP-Referer": "https://github.com/MadAppGang/claude-code",
138
+ "HTTP-Referer": "https://claudish.com",
139
139
  "X-Title": "Claudish - OpenRouter Proxy",
140
140
  } as const;
141
141
  `;