levante 0.3.3 → 0.3.5
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 +323 -29
- package/package.json +5 -3
package/dist/cli.js
CHANGED
|
@@ -56844,7 +56844,7 @@ var init_build3 = __esm(async () => {
|
|
|
56844
56844
|
|
|
56845
56845
|
// src/tui/CommandInspect.tsx
|
|
56846
56846
|
function CommandInspect({ theme, cliName, command, globalOptions, onRun, onBack }) {
|
|
56847
|
-
const allOptions = [...command.options, ...globalOptions];
|
|
56847
|
+
const allOptions = command.hideGlobalOptions ? [...command.options] : [...command.options, ...globalOptions];
|
|
56848
56848
|
const [fields, setFields] = import_react25.useState(() => ({
|
|
56849
56849
|
args: Object.fromEntries(command.args.map((a) => [a.name, ""])),
|
|
56850
56850
|
booleans: Object.fromEntries(allOptions.filter((o) => o.type === "boolean").map((o) => [o.flags, false])),
|
|
@@ -56859,12 +56859,14 @@ function CommandInspect({ theme, cliName, command, globalOptions, onRun, onBack
|
|
|
56859
56859
|
use_input_default((input, key) => {
|
|
56860
56860
|
if (key.escape)
|
|
56861
56861
|
return onBack();
|
|
56862
|
+
if (command.InlineView)
|
|
56863
|
+
return;
|
|
56862
56864
|
if (key.tab) {
|
|
56863
56865
|
setFocusIndex((i) => (i + 1) % Math.max(focusableFields.length, 1));
|
|
56864
56866
|
return;
|
|
56865
56867
|
}
|
|
56866
56868
|
if (key.return) {
|
|
56867
|
-
const argv = [command.name];
|
|
56869
|
+
const argv = [...command.baseArgv ?? [command.name]];
|
|
56868
56870
|
for (const arg of command.args) {
|
|
56869
56871
|
const val = fields.args[arg.name]?.trim();
|
|
56870
56872
|
if (val)
|
|
@@ -56900,6 +56902,60 @@ function CommandInspect({ theme, cliName, command, globalOptions, onRun, onBack
|
|
|
56900
56902
|
}
|
|
56901
56903
|
if (allOptions.length > 0)
|
|
56902
56904
|
usageParts.push("[options]");
|
|
56905
|
+
if (command.InlineView) {
|
|
56906
|
+
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
56907
|
+
flexDirection: "column",
|
|
56908
|
+
paddingX: 1,
|
|
56909
|
+
children: [
|
|
56910
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
56911
|
+
justifyContent: "space-between",
|
|
56912
|
+
marginBottom: 1,
|
|
56913
|
+
children: [
|
|
56914
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
56915
|
+
dimColor: true,
|
|
56916
|
+
children: "← esc"
|
|
56917
|
+
}, undefined, false, undefined, this),
|
|
56918
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
56919
|
+
color: theme.accent,
|
|
56920
|
+
bold: true,
|
|
56921
|
+
children: [
|
|
56922
|
+
cliName,
|
|
56923
|
+
" ",
|
|
56924
|
+
command.name
|
|
56925
|
+
]
|
|
56926
|
+
}, undefined, true, undefined, this)
|
|
56927
|
+
]
|
|
56928
|
+
}, undefined, true, undefined, this),
|
|
56929
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(command.InlineView, {
|
|
56930
|
+
theme
|
|
56931
|
+
}, undefined, false, undefined, this),
|
|
56932
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
56933
|
+
marginTop: 1,
|
|
56934
|
+
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
56935
|
+
dimColor: true,
|
|
56936
|
+
children: "esc back"
|
|
56937
|
+
}, undefined, false, undefined, this)
|
|
56938
|
+
}, undefined, false, undefined, this)
|
|
56939
|
+
]
|
|
56940
|
+
}, undefined, true, undefined, this);
|
|
56941
|
+
}
|
|
56942
|
+
const previewArgv = [cliName, ...command.baseArgv ?? [command.name]];
|
|
56943
|
+
for (const arg of command.args) {
|
|
56944
|
+
const val = fields.args[arg.name]?.trim();
|
|
56945
|
+
if (val)
|
|
56946
|
+
previewArgv.push(val);
|
|
56947
|
+
}
|
|
56948
|
+
for (const opt of allOptions) {
|
|
56949
|
+
if (opt.type === "boolean" && fields.booleans[opt.flags]) {
|
|
56950
|
+
previewArgv.push(opt.flags);
|
|
56951
|
+
}
|
|
56952
|
+
if (opt.type === "string") {
|
|
56953
|
+
const val = fields.strings[opt.flags]?.trim();
|
|
56954
|
+
if (val)
|
|
56955
|
+
previewArgv.push(opt.flags, val);
|
|
56956
|
+
}
|
|
56957
|
+
}
|
|
56958
|
+
const previewCommand = previewArgv.join(" ");
|
|
56903
56959
|
const renderOption = (opt) => {
|
|
56904
56960
|
const isFocused = currentFocus === `opt:${opt.flags}`;
|
|
56905
56961
|
if (opt.type === "boolean") {
|
|
@@ -56998,6 +57054,7 @@ function CommandInspect({ theme, cliName, command, globalOptions, onRun, onBack
|
|
|
56998
57054
|
children: "USAGE"
|
|
56999
57055
|
}, undefined, false, undefined, this),
|
|
57000
57056
|
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
57057
|
+
dimColor: true,
|
|
57001
57058
|
children: [
|
|
57002
57059
|
" ",
|
|
57003
57060
|
usageParts.join(" ")
|
|
@@ -57005,6 +57062,24 @@ function CommandInspect({ theme, cliName, command, globalOptions, onRun, onBack
|
|
|
57005
57062
|
}, undefined, true, undefined, this)
|
|
57006
57063
|
]
|
|
57007
57064
|
}, undefined, true, undefined, this),
|
|
57065
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
57066
|
+
flexDirection: "column",
|
|
57067
|
+
marginBottom: 1,
|
|
57068
|
+
children: [
|
|
57069
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
57070
|
+
dimColor: true,
|
|
57071
|
+
bold: true,
|
|
57072
|
+
children: "COMMAND"
|
|
57073
|
+
}, undefined, false, undefined, this),
|
|
57074
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
57075
|
+
color: theme.accent,
|
|
57076
|
+
children: [
|
|
57077
|
+
" $ ",
|
|
57078
|
+
previewCommand
|
|
57079
|
+
]
|
|
57080
|
+
}, undefined, true, undefined, this)
|
|
57081
|
+
]
|
|
57082
|
+
}, undefined, true, undefined, this),
|
|
57008
57083
|
command.args.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
57009
57084
|
flexDirection: "column",
|
|
57010
57085
|
marginBottom: 1,
|
|
@@ -57051,7 +57126,7 @@ function CommandInspect({ theme, cliName, command, globalOptions, onRun, onBack
|
|
|
57051
57126
|
command.options.map(renderOption)
|
|
57052
57127
|
]
|
|
57053
57128
|
}, undefined, true, undefined, this),
|
|
57054
|
-
globalOptions.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
57129
|
+
!command.hideGlobalOptions && globalOptions.length > 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
57055
57130
|
flexDirection: "column",
|
|
57056
57131
|
marginBottom: 1,
|
|
57057
57132
|
children: [
|
|
@@ -57095,9 +57170,108 @@ var init_theme2 = __esm(() => {
|
|
|
57095
57170
|
};
|
|
57096
57171
|
});
|
|
57097
57172
|
|
|
57173
|
+
// src/tui/McpInline.tsx
|
|
57174
|
+
function McpInline({ theme: theme2 }) {
|
|
57175
|
+
return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
|
|
57176
|
+
flexDirection: "column",
|
|
57177
|
+
gap: 1,
|
|
57178
|
+
children: [
|
|
57179
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
|
|
57180
|
+
flexDirection: "column",
|
|
57181
|
+
children: [
|
|
57182
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57183
|
+
bold: true,
|
|
57184
|
+
children: "Claude Code — add to project"
|
|
57185
|
+
}, undefined, false, undefined, this),
|
|
57186
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57187
|
+
color: theme2.accent,
|
|
57188
|
+
children: " claude mcp add levante -- levante-mcp"
|
|
57189
|
+
}, undefined, false, undefined, this)
|
|
57190
|
+
]
|
|
57191
|
+
}, undefined, true, undefined, this),
|
|
57192
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
|
|
57193
|
+
flexDirection: "column",
|
|
57194
|
+
children: [
|
|
57195
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57196
|
+
bold: true,
|
|
57197
|
+
children: "Claude Code — add globally"
|
|
57198
|
+
}, undefined, false, undefined, this),
|
|
57199
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57200
|
+
color: theme2.accent,
|
|
57201
|
+
children: " claude mcp add levante -s user -- levante-mcp"
|
|
57202
|
+
}, undefined, false, undefined, this)
|
|
57203
|
+
]
|
|
57204
|
+
}, undefined, true, undefined, this),
|
|
57205
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
|
|
57206
|
+
flexDirection: "column",
|
|
57207
|
+
children: [
|
|
57208
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57209
|
+
bold: true,
|
|
57210
|
+
children: "Claude Desktop / other clients"
|
|
57211
|
+
}, undefined, false, undefined, this),
|
|
57212
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57213
|
+
dimColor: true,
|
|
57214
|
+
children: " ~/.config/claude/claude_desktop_config.json"
|
|
57215
|
+
}, undefined, false, undefined, this),
|
|
57216
|
+
CONFIG.split(`
|
|
57217
|
+
`).map((line, i) => /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57218
|
+
color: theme2.accent,
|
|
57219
|
+
children: [
|
|
57220
|
+
" ",
|
|
57221
|
+
line
|
|
57222
|
+
]
|
|
57223
|
+
}, i, true, undefined, this))
|
|
57224
|
+
]
|
|
57225
|
+
}, undefined, true, undefined, this),
|
|
57226
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
|
|
57227
|
+
flexDirection: "column",
|
|
57228
|
+
children: [
|
|
57229
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57230
|
+
bold: true,
|
|
57231
|
+
children: "Available tools"
|
|
57232
|
+
}, undefined, false, undefined, this),
|
|
57233
|
+
TOOLS2.map((t) => /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57234
|
+
dimColor: true,
|
|
57235
|
+
children: [
|
|
57236
|
+
" · ",
|
|
57237
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
|
|
57238
|
+
color: theme2.accentSecondary,
|
|
57239
|
+
children: t
|
|
57240
|
+
}, undefined, false, undefined, this)
|
|
57241
|
+
]
|
|
57242
|
+
}, t, true, undefined, this))
|
|
57243
|
+
]
|
|
57244
|
+
}, undefined, true, undefined, this)
|
|
57245
|
+
]
|
|
57246
|
+
}, undefined, true, undefined, this);
|
|
57247
|
+
}
|
|
57248
|
+
var jsx_dev_runtime4, CONFIG = `{
|
|
57249
|
+
"mcpServers": {
|
|
57250
|
+
"levante": {
|
|
57251
|
+
"command": "levante-mcp"
|
|
57252
|
+
}
|
|
57253
|
+
}
|
|
57254
|
+
}`, TOOLS2;
|
|
57255
|
+
var init_McpInline = __esm(async () => {
|
|
57256
|
+
await init_build2();
|
|
57257
|
+
jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
|
|
57258
|
+
TOOLS2 = [
|
|
57259
|
+
"levante_plan_workflow",
|
|
57260
|
+
"levante_execute_step",
|
|
57261
|
+
"levante_scan_codebase",
|
|
57262
|
+
"levante_read_agent",
|
|
57263
|
+
"levante_scan_ast",
|
|
57264
|
+
"levante_scan_ast_detail",
|
|
57265
|
+
"levante_build_qa_map",
|
|
57266
|
+
"levante_read_qa_map",
|
|
57267
|
+
"levante_get_workflow_guide"
|
|
57268
|
+
];
|
|
57269
|
+
});
|
|
57270
|
+
|
|
57098
57271
|
// src/tui/commands.ts
|
|
57099
57272
|
var commandGroups;
|
|
57100
|
-
var init_commands = __esm(() => {
|
|
57273
|
+
var init_commands = __esm(async () => {
|
|
57274
|
+
await init_McpInline();
|
|
57101
57275
|
commandGroups = [
|
|
57102
57276
|
{
|
|
57103
57277
|
label: "⚡ PIPELINE",
|
|
@@ -57182,16 +57356,73 @@ var init_commands = __esm(() => {
|
|
|
57182
57356
|
label: "\uD83D\uDD17 INTEGRATIONS",
|
|
57183
57357
|
commands: [
|
|
57184
57358
|
{
|
|
57185
|
-
name: "auth",
|
|
57359
|
+
name: "auth login",
|
|
57360
|
+
baseArgv: ["auth", "login"],
|
|
57186
57361
|
args: [],
|
|
57187
|
-
description: "
|
|
57188
|
-
options: []
|
|
57362
|
+
description: "Authenticate with QA Intelligence — opens browser for sign-in",
|
|
57363
|
+
options: [],
|
|
57364
|
+
hideGlobalOptions: true
|
|
57189
57365
|
},
|
|
57190
57366
|
{
|
|
57191
|
-
name: "
|
|
57367
|
+
name: "auth logout",
|
|
57368
|
+
baseArgv: ["auth", "logout"],
|
|
57192
57369
|
args: [],
|
|
57193
|
-
description: "
|
|
57194
|
-
options: []
|
|
57370
|
+
description: "Sign out and revoke CLI token",
|
|
57371
|
+
options: [],
|
|
57372
|
+
hideGlobalOptions: true
|
|
57373
|
+
},
|
|
57374
|
+
{
|
|
57375
|
+
name: "auth status",
|
|
57376
|
+
baseArgv: ["auth", "status"],
|
|
57377
|
+
args: [],
|
|
57378
|
+
description: "Show current authentication status",
|
|
57379
|
+
options: [],
|
|
57380
|
+
hideGlobalOptions: true
|
|
57381
|
+
},
|
|
57382
|
+
{
|
|
57383
|
+
name: "auth switch",
|
|
57384
|
+
baseArgv: ["auth", "switch"],
|
|
57385
|
+
args: [],
|
|
57386
|
+
description: "Switch scope — re-authenticate with a different org/project/app",
|
|
57387
|
+
options: [],
|
|
57388
|
+
hideGlobalOptions: true
|
|
57389
|
+
},
|
|
57390
|
+
{
|
|
57391
|
+
name: "mcp",
|
|
57392
|
+
args: [],
|
|
57393
|
+
description: "Show MCP server setup instructions for Claude",
|
|
57394
|
+
options: [],
|
|
57395
|
+
hideGlobalOptions: true,
|
|
57396
|
+
InlineView: McpInline
|
|
57397
|
+
},
|
|
57398
|
+
{
|
|
57399
|
+
name: "jira browse",
|
|
57400
|
+
baseArgv: ["jira", "browse"],
|
|
57401
|
+
args: [],
|
|
57402
|
+
description: "Interactive Jira issue browser — search, select, and start test workflow",
|
|
57403
|
+
options: [],
|
|
57404
|
+
hideGlobalOptions: true
|
|
57405
|
+
},
|
|
57406
|
+
{
|
|
57407
|
+
name: "jira search",
|
|
57408
|
+
baseArgv: ["jira", "search"],
|
|
57409
|
+
args: [{ name: "query", required: true, description: "Text search query" }],
|
|
57410
|
+
description: "Search Jira issues by text or raw JQL",
|
|
57411
|
+
options: [
|
|
57412
|
+
{ flags: "--jql", description: "Use raw JQL instead of text search", type: "string", placeholder: "jql" },
|
|
57413
|
+
{ flags: "--max", description: "Maximum results to return", type: "string", placeholder: "n", default: "20" }
|
|
57414
|
+
],
|
|
57415
|
+
hideGlobalOptions: true
|
|
57416
|
+
},
|
|
57417
|
+
{
|
|
57418
|
+
name: "jira show",
|
|
57419
|
+
baseArgv: ["jira", "show"],
|
|
57420
|
+
args: [{ name: "issueKey", required: true, description: "Issue key (e.g. PROJ-101)" }],
|
|
57421
|
+
description: "Show full Jira issue details",
|
|
57422
|
+
options: [
|
|
57423
|
+
{ flags: "--save", description: "Save issue context for pipeline use", type: "boolean" }
|
|
57424
|
+
],
|
|
57425
|
+
hideGlobalOptions: true
|
|
57195
57426
|
}
|
|
57196
57427
|
]
|
|
57197
57428
|
}
|
|
@@ -57225,22 +57456,22 @@ function App2({ version: version2, onRunCommand, onQuit }) {
|
|
|
57225
57456
|
exit();
|
|
57226
57457
|
onRunCommand(argv);
|
|
57227
57458
|
}, [exit, onRunCommand]);
|
|
57228
|
-
return /* @__PURE__ */
|
|
57459
|
+
return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
57229
57460
|
flexDirection: "column",
|
|
57230
57461
|
children: [
|
|
57231
|
-
screen === "banner" && /* @__PURE__ */
|
|
57462
|
+
screen === "banner" && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Banner, {
|
|
57232
57463
|
theme,
|
|
57233
57464
|
version: version2,
|
|
57234
57465
|
onComplete: handleBannerComplete
|
|
57235
57466
|
}, undefined, false, undefined, this),
|
|
57236
|
-
screen === "browser" && /* @__PURE__ */
|
|
57467
|
+
screen === "browser" && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(CommandBrowser, {
|
|
57237
57468
|
theme,
|
|
57238
57469
|
version: version2,
|
|
57239
57470
|
groups: commandGroups,
|
|
57240
57471
|
onSelect: handleSelect,
|
|
57241
57472
|
onQuit: handleQuit
|
|
57242
57473
|
}, undefined, false, undefined, this),
|
|
57243
|
-
screen === "inspect" && inspectCommand && /* @__PURE__ */
|
|
57474
|
+
screen === "inspect" && inspectCommand && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(CommandInspect, {
|
|
57244
57475
|
theme,
|
|
57245
57476
|
cliName: "levante",
|
|
57246
57477
|
command: inspectCommand,
|
|
@@ -57253,7 +57484,7 @@ function App2({ version: version2, onRunCommand, onQuit }) {
|
|
|
57253
57484
|
}
|
|
57254
57485
|
async function launchTui(program2) {
|
|
57255
57486
|
const version2 = program2.version() || "0.0.0";
|
|
57256
|
-
return new Promise((resolve2
|
|
57487
|
+
return new Promise((resolve2) => {
|
|
57257
57488
|
let resolved = false;
|
|
57258
57489
|
const done = () => {
|
|
57259
57490
|
if (!resolved) {
|
|
@@ -57261,35 +57492,46 @@ async function launchTui(program2) {
|
|
|
57261
57492
|
resolve2();
|
|
57262
57493
|
}
|
|
57263
57494
|
};
|
|
57264
|
-
|
|
57495
|
+
let runningCommand = false;
|
|
57496
|
+
const instance = render_default(/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(App2, {
|
|
57265
57497
|
version: version2,
|
|
57266
57498
|
onRunCommand: (argv) => {
|
|
57267
|
-
|
|
57268
|
-
|
|
57269
|
-
|
|
57270
|
-
|
|
57271
|
-
|
|
57272
|
-
|
|
57273
|
-
|
|
57499
|
+
runningCommand = true;
|
|
57500
|
+
instance.waitUntilExit().then(async () => {
|
|
57501
|
+
process.stdin.resume();
|
|
57502
|
+
process.stdout.write(`
|
|
57503
|
+
$ levante ${argv.join(" ")}
|
|
57504
|
+
|
|
57505
|
+
`);
|
|
57506
|
+
try {
|
|
57507
|
+
await program2.parseAsync(argv, { from: "user" });
|
|
57508
|
+
} catch (err) {
|
|
57509
|
+
if (err?.name !== "ExitPromptError")
|
|
57510
|
+
throw err;
|
|
57511
|
+
}
|
|
57512
|
+
done();
|
|
57274
57513
|
});
|
|
57275
57514
|
},
|
|
57276
57515
|
onQuit: done
|
|
57277
57516
|
}, undefined, false, undefined, this));
|
|
57278
|
-
instance.waitUntilExit().then(
|
|
57517
|
+
instance.waitUntilExit().then(() => {
|
|
57518
|
+
if (!runningCommand)
|
|
57519
|
+
done();
|
|
57520
|
+
});
|
|
57279
57521
|
});
|
|
57280
57522
|
}
|
|
57281
|
-
var import_react26,
|
|
57523
|
+
var import_react26, jsx_dev_runtime5, globalOptions;
|
|
57282
57524
|
var init_App2 = __esm(async () => {
|
|
57283
57525
|
init_theme2();
|
|
57284
|
-
init_commands();
|
|
57285
57526
|
await __promiseAll([
|
|
57286
57527
|
init_build2(),
|
|
57287
57528
|
init_Banner(),
|
|
57288
57529
|
init_CommandBrowser(),
|
|
57289
|
-
init_CommandInspect()
|
|
57530
|
+
init_CommandInspect(),
|
|
57531
|
+
init_commands()
|
|
57290
57532
|
]);
|
|
57291
57533
|
import_react26 = __toESM(require_react(), 1);
|
|
57292
|
-
|
|
57534
|
+
jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
|
|
57293
57535
|
globalOptions = [
|
|
57294
57536
|
{ flags: "--key", description: "Issue key (e.g., PROJ-101, LIN-42)", type: "string", placeholder: "KEY" },
|
|
57295
57537
|
{ flags: "--provider", description: "LLM provider (openai|anthropic)", type: "string", placeholder: "provider" },
|
|
@@ -75474,7 +75716,7 @@ async function copyWorkflowGuide(projectRoot, nonInteractive) {
|
|
|
75474
75716
|
// src/commands/auth.ts
|
|
75475
75717
|
init_dist10();
|
|
75476
75718
|
function registerAuth(program2) {
|
|
75477
|
-
registerAuthCommands(program2
|
|
75719
|
+
registerAuthCommands(program2);
|
|
75478
75720
|
}
|
|
75479
75721
|
|
|
75480
75722
|
// src/commands/jira.ts
|
|
@@ -75735,6 +75977,57 @@ function registerJira(program2) {
|
|
|
75735
75977
|
});
|
|
75736
75978
|
}
|
|
75737
75979
|
|
|
75980
|
+
// src/commands/mcp.ts
|
|
75981
|
+
var import_picocolors7 = __toESM(require_picocolors(), 1);
|
|
75982
|
+
var TOOLS = [
|
|
75983
|
+
"levante_plan_workflow",
|
|
75984
|
+
"levante_execute_step",
|
|
75985
|
+
"levante_scan_codebase",
|
|
75986
|
+
"levante_validate_context",
|
|
75987
|
+
"levante_read_agent",
|
|
75988
|
+
"levante_get_example",
|
|
75989
|
+
"levante_get_workflow_guide",
|
|
75990
|
+
"levante_scan_ast",
|
|
75991
|
+
"levante_scan_ast_detail",
|
|
75992
|
+
"levante_build_qa_map",
|
|
75993
|
+
"levante_read_qa_map"
|
|
75994
|
+
];
|
|
75995
|
+
var DESKTOP_CONFIG = JSON.stringify({
|
|
75996
|
+
mcpServers: {
|
|
75997
|
+
levante: {
|
|
75998
|
+
command: "levante-mcp"
|
|
75999
|
+
}
|
|
76000
|
+
}
|
|
76001
|
+
}, null, 2);
|
|
76002
|
+
function registerMcp(program2) {
|
|
76003
|
+
program2.command("mcp").description("Show MCP server setup instructions for Claude").action(() => {
|
|
76004
|
+
console.log("");
|
|
76005
|
+
console.log(import_picocolors7.default.bold(import_picocolors7.default.cyan(" Levante MCP Server")));
|
|
76006
|
+
console.log(import_picocolors7.default.dim(" " + "─".repeat(42)));
|
|
76007
|
+
console.log("");
|
|
76008
|
+
console.log(import_picocolors7.default.bold(" Claude Code — add to project:"));
|
|
76009
|
+
console.log(import_picocolors7.default.cyan(" claude mcp add levante -- levante-mcp"));
|
|
76010
|
+
console.log("");
|
|
76011
|
+
console.log(import_picocolors7.default.bold(" Claude Code — add globally:"));
|
|
76012
|
+
console.log(import_picocolors7.default.cyan(" claude mcp add levante -s user -- levante-mcp"));
|
|
76013
|
+
console.log("");
|
|
76014
|
+
console.log(import_picocolors7.default.bold(" Claude Desktop / other clients"));
|
|
76015
|
+
console.log(import_picocolors7.default.dim(" ~/.config/claude/claude_desktop_config.json"));
|
|
76016
|
+
console.log("");
|
|
76017
|
+
const configLines = DESKTOP_CONFIG.split(`
|
|
76018
|
+
`);
|
|
76019
|
+
for (const line of configLines) {
|
|
76020
|
+
console.log(import_picocolors7.default.cyan(" " + line));
|
|
76021
|
+
}
|
|
76022
|
+
console.log("");
|
|
76023
|
+
console.log(import_picocolors7.default.bold(" Available tools:"));
|
|
76024
|
+
for (const tool of TOOLS) {
|
|
76025
|
+
console.log(import_picocolors7.default.dim(" · ") + tool);
|
|
76026
|
+
}
|
|
76027
|
+
console.log("");
|
|
76028
|
+
});
|
|
76029
|
+
}
|
|
76030
|
+
|
|
75738
76031
|
// src/cli.ts
|
|
75739
76032
|
var require2 = createRequire2(import.meta.url);
|
|
75740
76033
|
var { version: version2 } = require2("../package.json");
|
|
@@ -75759,6 +76052,7 @@ registerQa(program2);
|
|
|
75759
76052
|
registerRun(program2);
|
|
75760
76053
|
registerAuth(program2);
|
|
75761
76054
|
registerJira(program2);
|
|
76055
|
+
registerMcp(program2);
|
|
75762
76056
|
var userArgs = process.argv.slice(2);
|
|
75763
76057
|
var commandNames = program2.commands.map((c) => c.name());
|
|
75764
76058
|
var hasCommand = userArgs.some((a) => commandNames.includes(a));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "levante",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"levante": "./dist/cli.js",
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@playwright/test": ">=1.40.0"
|
|
26
26
|
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"picocolors": "^1.1.1",
|
|
29
|
+
"ws": "^8.19.0"
|
|
30
|
+
},
|
|
27
31
|
"devDependencies": {
|
|
28
32
|
"@inquirer/prompts": "^8.3.0",
|
|
29
33
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
@@ -36,11 +40,9 @@
|
|
|
36
40
|
"ink": "^5",
|
|
37
41
|
"ink-text-input": "^6",
|
|
38
42
|
"ora": "^9.3.0",
|
|
39
|
-
"picocolors": "^1.1.1",
|
|
40
43
|
"react": "^18",
|
|
41
44
|
"react-devtools-core": "^7.0.1",
|
|
42
45
|
"typescript": "^5.8.3",
|
|
43
|
-
"ws": "^8.19.0",
|
|
44
46
|
"yaml": "^2.7.1",
|
|
45
47
|
"zod": "^4.0.5"
|
|
46
48
|
}
|