openkitt 0.3.8 → 0.3.10

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/cli.js +78 -15
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -256494,6 +256494,7 @@ var MODEL_PRICING = {
256494
256494
  "claude-opus-4-5": [15, 75],
256495
256495
  "claude-opus-4": [15, 75],
256496
256496
  "claude-sonnet-4-5": [3, 15],
256497
+ "claude-sonnet-4": [3, 15],
256497
256498
  "claude-sonnet-4-20250514": [3, 15],
256498
256499
  "claude-3-7-sonnet-20250219": [3, 15],
256499
256500
  "claude-3-5-sonnet-20241022": [3, 15],
@@ -256503,6 +256504,7 @@ var MODEL_PRICING = {
256503
256504
  "gpt-4o-mini": [0.15, 0.6],
256504
256505
  o3: [10, 40],
256505
256506
  "o4-mini": [1.1, 4.4],
256507
+ "gpt-4.1": [2, 8],
256506
256508
  "gemini-2.0-flash": [0.1, 0.4],
256507
256509
  "gemini-2.5-pro-preview-05-06": [1.25, 10]
256508
256510
  };
@@ -256544,6 +256546,10 @@ function renderContextBanner(params) {
256544
256546
  console.log(` ${import_picocolors3.default.dim(border)}`);
256545
256547
  console.log("");
256546
256548
  }
256549
+ function isModelNotSupportedError(err) {
256550
+ const msg = err instanceof Error ? err.message : String(err);
256551
+ return msg.includes("model is not supported") || msg.includes("model_not_found") || msg.includes("invalid model") || /4\d\d.*model/i.test(msg);
256552
+ }
256547
256553
 
256548
256554
  // src/mcp/lifecycle.ts
256549
256555
  var MCP_START_FAILURE_MESSAGE = "Railway MCP Server not found. Install it: npm install -g @railway/mcp-server";
@@ -257129,6 +257135,18 @@ var APPS_REQUIRED = new Set([
257129
257135
  "domain",
257130
257136
  "logs"
257131
257137
  ]);
257138
+ var MCP_REQUIRED = new Set([
257139
+ "init",
257140
+ "create",
257141
+ "delete",
257142
+ "deploy",
257143
+ "deploy:template",
257144
+ "env:create",
257145
+ "env:vars",
257146
+ "domain",
257147
+ "logs",
257148
+ "status"
257149
+ ]);
257132
257150
  var COMMAND_AUTH = {
257133
257151
  login: "none",
257134
257152
  logout: "none",
@@ -257182,11 +257200,27 @@ async function checkAuthGuard(commandKey) {
257182
257200
  }
257183
257201
  }
257184
257202
  if (requirement === "railway" || requirement === "both") {
257203
+ const cliInstalled = await isRailwayInstalled();
257204
+ if (!cliInstalled) {
257205
+ return {
257206
+ allowed: false,
257207
+ message: "Railway CLI is not installed. Install it: https://docs.railway.com/cli"
257208
+ };
257209
+ }
257185
257210
  const railwayStatus = await checkRailwayAuth();
257186
257211
  if (!railwayStatus.authenticated) {
257187
257212
  return {
257188
257213
  allowed: false,
257189
- message: "Railway authentication required. Run /login railway to authenticate."
257214
+ message: "Railway authentication required. Run /login to authenticate."
257215
+ };
257216
+ }
257217
+ }
257218
+ if (MCP_REQUIRED.has(commandKey)) {
257219
+ const mcpEntry = findMcpEntryPoint();
257220
+ if (!mcpEntry) {
257221
+ return {
257222
+ allowed: false,
257223
+ message: "Railway MCP server is not installed. Install it: npm install -g @railway/mcp-server"
257190
257224
  };
257191
257225
  }
257192
257226
  }
@@ -259116,7 +259150,11 @@ async function initCommand(context, _args) {
259116
259150
  }
259117
259151
  } catch (initError) {
259118
259152
  const detail = initError instanceof Error ? initError.message : String(initError);
259119
- warn(`Railway project creation failed: ${detail}. You can link manually later.`);
259153
+ if (isModelNotSupportedError(initError)) {
259154
+ warn(`LLM model not supported. Run /login model to switch to a valid model.`);
259155
+ } else {
259156
+ warn(`Railway project creation failed: ${detail}. You can link manually later.`);
259157
+ }
259120
259158
  logger.cmd("/init", "FAILED", detail);
259121
259159
  } finally {
259122
259160
  mcpClient?.close();
@@ -264179,7 +264217,11 @@ async function createCommand2(context, _args) {
264179
264217
  }
264180
264218
  } catch (createError) {
264181
264219
  const detail = createError instanceof Error ? createError.message : String(createError);
264182
- error(`Create failed: ${detail}`);
264220
+ if (isModelNotSupportedError(createError)) {
264221
+ error("LLM model not supported. Run /login model to switch to a valid model.");
264222
+ } else {
264223
+ error(`Create failed: ${detail}`);
264224
+ }
264183
264225
  logger.cmd("/create", "FAILED", detail);
264184
264226
  } finally {
264185
264227
  mcpClient?.close();
@@ -264539,7 +264581,11 @@ async function deployTemplateCommand(context, args) {
264539
264581
  logger.cmd("/deploy:template", "SUCCESS");
264540
264582
  } catch (operationError) {
264541
264583
  const detail = operationError instanceof Error ? operationError.message : String(operationError);
264542
- error(`Deploy template command failed: ${detail}`);
264584
+ if (isModelNotSupportedError(operationError)) {
264585
+ error("LLM model not supported. Run /login model to switch to a valid model.");
264586
+ } else {
264587
+ error(`Deploy template command failed: ${detail}`);
264588
+ }
264543
264589
  logger.cmd("/deploy:template", "FAILED", detail);
264544
264590
  } finally {
264545
264591
  mcpClient?.close();
@@ -264644,7 +264690,11 @@ async function deployCommand(context, args, commandKey) {
264644
264690
  logger.cmd("/deploy", "SUCCESS");
264645
264691
  } catch (operationError) {
264646
264692
  const detail = operationError instanceof Error ? operationError.message : String(operationError);
264647
- error(`Deploy command failed: ${detail}`);
264693
+ if (isModelNotSupportedError(operationError)) {
264694
+ error("LLM model not supported. Run /login model to switch to a valid model.");
264695
+ } else {
264696
+ error(`Deploy command failed: ${detail}`);
264697
+ }
264648
264698
  logger.cmd("/deploy", "FAILED", detail);
264649
264699
  } finally {
264650
264700
  mcpClient?.close();
@@ -264864,7 +264914,11 @@ async function domainCommand(_context, args, _commandKey) {
264864
264914
  logger.cmd("/domain", "SUCCESS");
264865
264915
  } catch (operationError) {
264866
264916
  const detail = operationError instanceof Error ? operationError.message : String(operationError);
264867
- error(`Domain command failed: ${detail}`);
264917
+ if (isModelNotSupportedError(operationError)) {
264918
+ error("LLM model not supported. Run /login model to switch to a valid model.");
264919
+ } else {
264920
+ error(`Domain command failed: ${detail}`);
264921
+ }
264868
264922
  logger.cmd("/domain", "FAILED", detail);
264869
264923
  } finally {
264870
264924
  mcpClient?.close();
@@ -264943,7 +264997,11 @@ async function logsCommand(_context, args, _commandKey) {
264943
264997
  logger.cmd("/logs", "SUCCESS");
264944
264998
  } catch (operationError) {
264945
264999
  const detail = operationError instanceof Error ? operationError.message : String(operationError);
264946
- error(`Logs command failed: ${detail}`);
265000
+ if (isModelNotSupportedError(operationError)) {
265001
+ error("LLM model not supported. Run /login model to switch to a valid model.");
265002
+ } else {
265003
+ error(`Logs command failed: ${detail}`);
265004
+ }
264947
265005
  logger.cmd("/logs", "FAILED", detail);
264948
265006
  } finally {
264949
265007
  mcpClient?.close();
@@ -265059,7 +265117,11 @@ async function statusCommand(_context, _args, _commandKey) {
265059
265117
  logger.cmd("/status", "SUCCESS");
265060
265118
  } catch (operationError) {
265061
265119
  const detail = operationError instanceof Error ? operationError.message : String(operationError);
265062
- error(`Status command failed: ${detail}`);
265120
+ if (isModelNotSupportedError(operationError)) {
265121
+ error("LLM model not supported. Run /login model to switch to a valid model.");
265122
+ } else {
265123
+ error(`Status command failed: ${detail}`);
265124
+ }
265063
265125
  logger.cmd("/status", "FAILED", detail);
265064
265126
  } finally {
265065
265127
  mcpClient?.close();
@@ -265085,9 +265147,9 @@ var PROVIDER_OPTIONS = [
265085
265147
  ];
265086
265148
  var MODEL_OPTIONS = {
265087
265149
  anthropic: [
265088
- { value: "claude-sonnet-4-20250514", label: "claude-sonnet-4-20250514 (recommended)" },
265089
- { value: "claude-opus-4-20250514", label: "claude-opus-4-20250514" },
265090
- { value: "claude-haiku-4-20250514", label: "claude-haiku-4-20250514" }
265150
+ { value: "claude-sonnet-4-5", label: "claude-sonnet-4-5 (recommended)" },
265151
+ { value: "claude-opus-4-5", label: "claude-opus-4-5" },
265152
+ { value: "claude-3-5-haiku-20241022", label: "claude-3-5-haiku-20241022 (fast & cheap)" }
265091
265153
  ],
265092
265154
  openai: [
265093
265155
  { value: "gpt-4o", label: "gpt-4o (recommended)" },
@@ -265102,10 +265164,11 @@ var MODEL_OPTIONS = {
265102
265164
  ]
265103
265165
  };
265104
265166
  var COPILOT_MODEL_OPTIONS = [
265105
- { value: "claude-sonnet-4", label: "claude-sonnet-4 (recommended — Claude via Copilot)" },
265106
- { value: "gpt-4o", label: "gpt-4o (GPT-4o via Copilot)" },
265167
+ { value: "claude-sonnet-4-5", label: "claude-sonnet-4-5 (recommended — Claude via Copilot)" },
265168
+ { value: "claude-sonnet-4", label: "claude-sonnet-4 (Claude Sonnet 4 via Copilot)" },
265169
+ { value: "claude-haiku-4-5", label: "claude-haiku-4-5 (fast & cheap — Claude via Copilot)" },
265170
+ { value: "claude-opus-4-5", label: "claude-opus-4-5 (most capable — Claude via Copilot)" },
265107
265171
  { value: "gpt-4.1", label: "gpt-4.1 (GPT-4.1 via Copilot)" },
265108
- { value: "o4-mini", label: "o4-mini (o4-mini via Copilot)" },
265109
265172
  { value: "gemini-2.5-pro", label: "gemini-2.5-pro (Gemini 2.5 Pro via Copilot)" }
265110
265173
  ];
265111
265174
  var GITHUB_DEVICE_CLIENT_ID = "Iv1.b507a08c87ecfe98";
@@ -266017,7 +266080,7 @@ async function helpCommand(_context, _args) {
266017
266080
  // package.json
266018
266081
  var package_default = {
266019
266082
  name: "openkitt",
266020
- version: "0.3.8",
266083
+ version: "0.3.10",
266021
266084
  description: "AI-powered monorepo scaffolding CLI",
266022
266085
  keywords: [
266023
266086
  "cli",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openkitt",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "description": "AI-powered monorepo scaffolding CLI",
5
5
  "keywords": [
6
6
  "cli",