openkitt 0.3.7 → 0.3.9
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/cli.js +73 -13
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -256544,6 +256544,10 @@ function renderContextBanner(params) {
|
|
|
256544
256544
|
console.log(` ${import_picocolors3.default.dim(border)}`);
|
|
256545
256545
|
console.log("");
|
|
256546
256546
|
}
|
|
256547
|
+
function isModelNotSupportedError(err) {
|
|
256548
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
256549
|
+
return msg.includes("model is not supported") || msg.includes("model_not_found") || msg.includes("invalid model") || /4\d\d.*model/i.test(msg);
|
|
256550
|
+
}
|
|
256547
256551
|
|
|
256548
256552
|
// src/mcp/lifecycle.ts
|
|
256549
256553
|
var MCP_START_FAILURE_MESSAGE = "Railway MCP Server not found. Install it: npm install -g @railway/mcp-server";
|
|
@@ -257129,6 +257133,18 @@ var APPS_REQUIRED = new Set([
|
|
|
257129
257133
|
"domain",
|
|
257130
257134
|
"logs"
|
|
257131
257135
|
]);
|
|
257136
|
+
var MCP_REQUIRED = new Set([
|
|
257137
|
+
"init",
|
|
257138
|
+
"create",
|
|
257139
|
+
"delete",
|
|
257140
|
+
"deploy",
|
|
257141
|
+
"deploy:template",
|
|
257142
|
+
"env:create",
|
|
257143
|
+
"env:vars",
|
|
257144
|
+
"domain",
|
|
257145
|
+
"logs",
|
|
257146
|
+
"status"
|
|
257147
|
+
]);
|
|
257132
257148
|
var COMMAND_AUTH = {
|
|
257133
257149
|
login: "none",
|
|
257134
257150
|
logout: "none",
|
|
@@ -257182,11 +257198,27 @@ async function checkAuthGuard(commandKey) {
|
|
|
257182
257198
|
}
|
|
257183
257199
|
}
|
|
257184
257200
|
if (requirement === "railway" || requirement === "both") {
|
|
257201
|
+
const cliInstalled = await isRailwayInstalled();
|
|
257202
|
+
if (!cliInstalled) {
|
|
257203
|
+
return {
|
|
257204
|
+
allowed: false,
|
|
257205
|
+
message: "Railway CLI is not installed. Install it: https://docs.railway.com/cli"
|
|
257206
|
+
};
|
|
257207
|
+
}
|
|
257185
257208
|
const railwayStatus = await checkRailwayAuth();
|
|
257186
257209
|
if (!railwayStatus.authenticated) {
|
|
257187
257210
|
return {
|
|
257188
257211
|
allowed: false,
|
|
257189
|
-
message: "Railway authentication required. Run /login
|
|
257212
|
+
message: "Railway authentication required. Run /login to authenticate."
|
|
257213
|
+
};
|
|
257214
|
+
}
|
|
257215
|
+
}
|
|
257216
|
+
if (MCP_REQUIRED.has(commandKey)) {
|
|
257217
|
+
const mcpEntry = findMcpEntryPoint();
|
|
257218
|
+
if (!mcpEntry) {
|
|
257219
|
+
return {
|
|
257220
|
+
allowed: false,
|
|
257221
|
+
message: "Railway MCP server is not installed. Install it: npm install -g @railway/mcp-server"
|
|
257190
257222
|
};
|
|
257191
257223
|
}
|
|
257192
257224
|
}
|
|
@@ -259116,7 +259148,11 @@ async function initCommand(context, _args) {
|
|
|
259116
259148
|
}
|
|
259117
259149
|
} catch (initError) {
|
|
259118
259150
|
const detail = initError instanceof Error ? initError.message : String(initError);
|
|
259119
|
-
|
|
259151
|
+
if (isModelNotSupportedError(initError)) {
|
|
259152
|
+
warn(`LLM model not supported. Run /login model to switch to a valid model.`);
|
|
259153
|
+
} else {
|
|
259154
|
+
warn(`Railway project creation failed: ${detail}. You can link manually later.`);
|
|
259155
|
+
}
|
|
259120
259156
|
logger.cmd("/init", "FAILED", detail);
|
|
259121
259157
|
} finally {
|
|
259122
259158
|
mcpClient?.close();
|
|
@@ -264179,7 +264215,11 @@ async function createCommand2(context, _args) {
|
|
|
264179
264215
|
}
|
|
264180
264216
|
} catch (createError) {
|
|
264181
264217
|
const detail = createError instanceof Error ? createError.message : String(createError);
|
|
264182
|
-
|
|
264218
|
+
if (isModelNotSupportedError(createError)) {
|
|
264219
|
+
error("LLM model not supported. Run /login model to switch to a valid model.");
|
|
264220
|
+
} else {
|
|
264221
|
+
error(`Create failed: ${detail}`);
|
|
264222
|
+
}
|
|
264183
264223
|
logger.cmd("/create", "FAILED", detail);
|
|
264184
264224
|
} finally {
|
|
264185
264225
|
mcpClient?.close();
|
|
@@ -264539,7 +264579,11 @@ async function deployTemplateCommand(context, args) {
|
|
|
264539
264579
|
logger.cmd("/deploy:template", "SUCCESS");
|
|
264540
264580
|
} catch (operationError) {
|
|
264541
264581
|
const detail = operationError instanceof Error ? operationError.message : String(operationError);
|
|
264542
|
-
|
|
264582
|
+
if (isModelNotSupportedError(operationError)) {
|
|
264583
|
+
error("LLM model not supported. Run /login model to switch to a valid model.");
|
|
264584
|
+
} else {
|
|
264585
|
+
error(`Deploy template command failed: ${detail}`);
|
|
264586
|
+
}
|
|
264543
264587
|
logger.cmd("/deploy:template", "FAILED", detail);
|
|
264544
264588
|
} finally {
|
|
264545
264589
|
mcpClient?.close();
|
|
@@ -264644,7 +264688,11 @@ async function deployCommand(context, args, commandKey) {
|
|
|
264644
264688
|
logger.cmd("/deploy", "SUCCESS");
|
|
264645
264689
|
} catch (operationError) {
|
|
264646
264690
|
const detail = operationError instanceof Error ? operationError.message : String(operationError);
|
|
264647
|
-
|
|
264691
|
+
if (isModelNotSupportedError(operationError)) {
|
|
264692
|
+
error("LLM model not supported. Run /login model to switch to a valid model.");
|
|
264693
|
+
} else {
|
|
264694
|
+
error(`Deploy command failed: ${detail}`);
|
|
264695
|
+
}
|
|
264648
264696
|
logger.cmd("/deploy", "FAILED", detail);
|
|
264649
264697
|
} finally {
|
|
264650
264698
|
mcpClient?.close();
|
|
@@ -264864,7 +264912,11 @@ async function domainCommand(_context, args, _commandKey) {
|
|
|
264864
264912
|
logger.cmd("/domain", "SUCCESS");
|
|
264865
264913
|
} catch (operationError) {
|
|
264866
264914
|
const detail = operationError instanceof Error ? operationError.message : String(operationError);
|
|
264867
|
-
|
|
264915
|
+
if (isModelNotSupportedError(operationError)) {
|
|
264916
|
+
error("LLM model not supported. Run /login model to switch to a valid model.");
|
|
264917
|
+
} else {
|
|
264918
|
+
error(`Domain command failed: ${detail}`);
|
|
264919
|
+
}
|
|
264868
264920
|
logger.cmd("/domain", "FAILED", detail);
|
|
264869
264921
|
} finally {
|
|
264870
264922
|
mcpClient?.close();
|
|
@@ -264943,7 +264995,11 @@ async function logsCommand(_context, args, _commandKey) {
|
|
|
264943
264995
|
logger.cmd("/logs", "SUCCESS");
|
|
264944
264996
|
} catch (operationError) {
|
|
264945
264997
|
const detail = operationError instanceof Error ? operationError.message : String(operationError);
|
|
264946
|
-
|
|
264998
|
+
if (isModelNotSupportedError(operationError)) {
|
|
264999
|
+
error("LLM model not supported. Run /login model to switch to a valid model.");
|
|
265000
|
+
} else {
|
|
265001
|
+
error(`Logs command failed: ${detail}`);
|
|
265002
|
+
}
|
|
264947
265003
|
logger.cmd("/logs", "FAILED", detail);
|
|
264948
265004
|
} finally {
|
|
264949
265005
|
mcpClient?.close();
|
|
@@ -265059,7 +265115,11 @@ async function statusCommand(_context, _args, _commandKey) {
|
|
|
265059
265115
|
logger.cmd("/status", "SUCCESS");
|
|
265060
265116
|
} catch (operationError) {
|
|
265061
265117
|
const detail = operationError instanceof Error ? operationError.message : String(operationError);
|
|
265062
|
-
|
|
265118
|
+
if (isModelNotSupportedError(operationError)) {
|
|
265119
|
+
error("LLM model not supported. Run /login model to switch to a valid model.");
|
|
265120
|
+
} else {
|
|
265121
|
+
error(`Status command failed: ${detail}`);
|
|
265122
|
+
}
|
|
265063
265123
|
logger.cmd("/status", "FAILED", detail);
|
|
265064
265124
|
} finally {
|
|
265065
265125
|
mcpClient?.close();
|
|
@@ -265085,9 +265145,9 @@ var PROVIDER_OPTIONS = [
|
|
|
265085
265145
|
];
|
|
265086
265146
|
var MODEL_OPTIONS = {
|
|
265087
265147
|
anthropic: [
|
|
265088
|
-
{ value: "claude-sonnet-4-
|
|
265089
|
-
{ value: "claude-opus-4-
|
|
265090
|
-
{ value: "claude-haiku-
|
|
265148
|
+
{ value: "claude-sonnet-4-5", label: "claude-sonnet-4-5 (recommended)" },
|
|
265149
|
+
{ value: "claude-opus-4-5", label: "claude-opus-4-5" },
|
|
265150
|
+
{ value: "claude-3-5-haiku-20241022", label: "claude-3-5-haiku-20241022 (fast & cheap)" }
|
|
265091
265151
|
],
|
|
265092
265152
|
openai: [
|
|
265093
265153
|
{ value: "gpt-4o", label: "gpt-4o (recommended)" },
|
|
@@ -265949,7 +266009,7 @@ function renderHelp() {
|
|
|
265949
266009
|
divider("Setup");
|
|
265950
266010
|
cmd("/login", "", "Full auth setup (Railway + LLM)");
|
|
265951
266011
|
cmd("/login railway", "", "Authenticate with Railway");
|
|
265952
|
-
cmd("/login llm", "", "
|
|
266012
|
+
cmd("/login llm", "", "Reconfigure LLM provider, model, or auth method");
|
|
265953
266013
|
cmd("/login model", "", "Switch active model without re-entering key");
|
|
265954
266014
|
cmd("/login status", "", "Show current auth status for Railway and LLM");
|
|
265955
266015
|
cmd("/logout", "", "Remove all stored credentials");
|
|
@@ -266017,7 +266077,7 @@ async function helpCommand(_context, _args) {
|
|
|
266017
266077
|
// package.json
|
|
266018
266078
|
var package_default = {
|
|
266019
266079
|
name: "openkitt",
|
|
266020
|
-
version: "0.3.
|
|
266080
|
+
version: "0.3.9",
|
|
266021
266081
|
description: "AI-powered monorepo scaffolding CLI",
|
|
266022
266082
|
keywords: [
|
|
266023
266083
|
"cli",
|