mpd-llm-cli 0.1.39 → 0.1.41
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/bundle/api.js +2 -2
- package/bundle/gemini.js +126 -113
- package/package.json +2 -2
package/bundle/api.js
CHANGED
|
@@ -27724,7 +27724,7 @@ async function createContentGeneratorConfig(model, authType) {
|
|
|
27724
27724
|
return contentGeneratorConfig;
|
|
27725
27725
|
}
|
|
27726
27726
|
async function createContentGenerator(config2, sessionId2) {
|
|
27727
|
-
const version2 = "0.1.
|
|
27727
|
+
const version2 = "0.1.41";
|
|
27728
27728
|
const httpOptions = {
|
|
27729
27729
|
headers: {
|
|
27730
27730
|
"User-Agent": `GeminiCLI/${version2} (${process.platform}; ${process.arch})`
|
|
@@ -166412,7 +166412,7 @@ async function getPackageJson() {
|
|
|
166412
166412
|
// packages/cli/src/utils/version.ts
|
|
166413
166413
|
async function getCliVersion() {
|
|
166414
166414
|
const pkgJson = await getPackageJson();
|
|
166415
|
-
return "0.1.
|
|
166415
|
+
return "0.1.41";
|
|
166416
166416
|
}
|
|
166417
166417
|
|
|
166418
166418
|
// packages/cli/src/config/sandboxConfig.ts
|
package/bundle/gemini.js
CHANGED
|
@@ -62351,7 +62351,7 @@ async function createContentGeneratorConfig(model, authType) {
|
|
|
62351
62351
|
return contentGeneratorConfig;
|
|
62352
62352
|
}
|
|
62353
62353
|
async function createContentGenerator(config2, sessionId2) {
|
|
62354
|
-
const version3 = "0.1.
|
|
62354
|
+
const version3 = "0.1.41";
|
|
62355
62355
|
const httpOptions = {
|
|
62356
62356
|
headers: {
|
|
62357
62357
|
"User-Agent": `GeminiCLI/${version3} (${process.platform}; ${process.arch})`
|
|
@@ -199411,7 +199411,7 @@ var init_langfuseClient = __esm({
|
|
|
199411
199411
|
userId,
|
|
199412
199412
|
metadata: {
|
|
199413
199413
|
...safeMetadata,
|
|
199414
|
-
cli_version: this.safeString("0.1.
|
|
199414
|
+
cli_version: this.safeString("0.1.41", "unknown"),
|
|
199415
199415
|
model: this.safeString(process.env.CUSTOM_LLM_MODEL_NAME, "gemini"),
|
|
199416
199416
|
auth_type: process.env.USE_CUSTOM_LLM ? "custom_llm" : "google_oauth",
|
|
199417
199417
|
environment: this.safeString(this.configManager.getConfig()?.environment, "unknown")
|
|
@@ -200578,7 +200578,7 @@ var init_langfuseIntegration = __esm({
|
|
|
200578
200578
|
const metadata = {
|
|
200579
200579
|
model: this.config.getModel(),
|
|
200580
200580
|
auth_type: this.config.getContentGeneratorConfig()?.authType,
|
|
200581
|
-
cli_version: "0.1.
|
|
200581
|
+
cli_version: "0.1.41",
|
|
200582
200582
|
start_time: (/* @__PURE__ */ new Date()).toISOString(),
|
|
200583
200583
|
session_id: this.sessionId
|
|
200584
200584
|
};
|
|
@@ -200637,7 +200637,7 @@ var init_langfuseIntegration = __esm({
|
|
|
200637
200637
|
totalCachedTokens: sessionStats.totalCachedTokens,
|
|
200638
200638
|
totalPromptTokens: sessionStats.totalPromptTokens,
|
|
200639
200639
|
metadata: {
|
|
200640
|
-
cli_version: "0.1.
|
|
200640
|
+
cli_version: "0.1.41",
|
|
200641
200641
|
auth_type: this.config.getContentGeneratorConfig()?.authType,
|
|
200642
200642
|
session_end_time: (/* @__PURE__ */ new Date()).toISOString()
|
|
200643
200643
|
}
|
|
@@ -200709,7 +200709,7 @@ var init_langfuseIntegration = __esm({
|
|
|
200709
200709
|
error,
|
|
200710
200710
|
metadata: {
|
|
200711
200711
|
session_id: this.sessionId,
|
|
200712
|
-
cli_version: "0.1.
|
|
200712
|
+
cli_version: "0.1.41",
|
|
200713
200713
|
auth_type: this.config.getContentGeneratorConfig()?.authType
|
|
200714
200714
|
}
|
|
200715
200715
|
});
|
|
@@ -209197,12 +209197,13 @@ var require_lib6 = __commonJS({
|
|
|
209197
209197
|
// packages/router/dist/src/constants.js
|
|
209198
209198
|
import path37 from "node:path";
|
|
209199
209199
|
import os11 from "node:os";
|
|
209200
|
-
var HOME_DIR, CONFIG_FILE, PLUGINS_DIR, PID_FILE, REFERENCE_COUNT_FILE, CLAUDE_PROJECTS_DIR, DEFAULT_CONFIG;
|
|
209200
|
+
var HOME_DIR, CONFIG_FILE, RAKUTENSOLO_CONFIG_FILE, PLUGINS_DIR, PID_FILE, REFERENCE_COUNT_FILE, CLAUDE_PROJECTS_DIR, DEFAULT_CONFIG;
|
|
209201
209201
|
var init_constants2 = __esm({
|
|
209202
209202
|
"packages/router/dist/src/constants.js"() {
|
|
209203
209203
|
"use strict";
|
|
209204
209204
|
HOME_DIR = path37.join(os11.homedir(), ".mpdai");
|
|
209205
209205
|
CONFIG_FILE = path37.join(HOME_DIR, "router-config.json");
|
|
209206
|
+
RAKUTENSOLO_CONFIG_FILE = path37.join(HOME_DIR, "rakutensolo.json");
|
|
209206
209207
|
PLUGINS_DIR = path37.join(HOME_DIR, "plugins");
|
|
209207
209208
|
PID_FILE = path37.join(HOME_DIR, ".mpdai-router.pid");
|
|
209208
209209
|
REFERENCE_COUNT_FILE = path37.join(os11.tmpdir(), "mpdai-router-reference-count.txt");
|
|
@@ -209308,7 +209309,7 @@ var init_update = __esm({
|
|
|
209308
209309
|
// packages/router/dist/src/utils/index.js
|
|
209309
209310
|
import fs33 from "node:fs/promises";
|
|
209310
209311
|
import path39 from "node:path";
|
|
209311
|
-
var import_json5, interpolateEnvVars, ensureDir, initDir, readConfigFile, backupConfigFile, writeConfigFile, initConfig, updateRouterConfigFromModel;
|
|
209312
|
+
var import_json5, interpolateEnvVars, ensureDir, initDir, getConfigFilePath, readAndParseConfig, readConfigFile, backupConfigFile, writeConfigFile, initConfig, updateRouterConfigFromModel;
|
|
209312
209313
|
var init_utils6 = __esm({
|
|
209313
209314
|
"packages/router/dist/src/utils/index.js"() {
|
|
209314
209315
|
"use strict";
|
|
@@ -209345,85 +209346,101 @@ var init_utils6 = __esm({
|
|
|
209345
209346
|
await ensureDir(PLUGINS_DIR);
|
|
209346
209347
|
await ensureDir(path39.join(HOME_DIR, "logs"));
|
|
209347
209348
|
};
|
|
209348
|
-
|
|
209349
|
+
getConfigFilePath = async () => {
|
|
209350
|
+
try {
|
|
209351
|
+
await fs33.access(RAKUTENSOLO_CONFIG_FILE);
|
|
209352
|
+
return RAKUTENSOLO_CONFIG_FILE;
|
|
209353
|
+
} catch {
|
|
209354
|
+
return CONFIG_FILE;
|
|
209355
|
+
}
|
|
209356
|
+
};
|
|
209357
|
+
readAndParseConfig = async (filePath) => {
|
|
209349
209358
|
try {
|
|
209350
|
-
const config2 = await fs33.readFile(
|
|
209359
|
+
const config2 = await fs33.readFile(filePath, "utf-8");
|
|
209351
209360
|
try {
|
|
209352
209361
|
const parsedConfig = import_json5.default.parse(config2);
|
|
209353
209362
|
return interpolateEnvVars(parsedConfig);
|
|
209354
209363
|
} catch (parseError) {
|
|
209355
|
-
console.error(`Failed to parse config file at ${
|
|
209364
|
+
console.error(`Failed to parse config file at ${filePath}`);
|
|
209356
209365
|
console.error("Error details:", parseError.message);
|
|
209357
209366
|
console.error("Please check your config file syntax.");
|
|
209358
|
-
|
|
209367
|
+
throw parseError;
|
|
209359
209368
|
}
|
|
209360
|
-
} catch (
|
|
209361
|
-
if (
|
|
209362
|
-
|
|
209363
|
-
await initDir();
|
|
209364
|
-
const backupPath = await backupConfigFile();
|
|
209365
|
-
if (backupPath) {
|
|
209366
|
-
console.log(`Backed up existing configuration file to ${backupPath}`);
|
|
209367
|
-
}
|
|
209368
|
-
const config2 = {
|
|
209369
|
-
LOG: true,
|
|
209370
|
-
LOG_LEVEL: "debug",
|
|
209371
|
-
CLAUDE_PATH: "",
|
|
209372
|
-
HOST: "127.0.0.1",
|
|
209373
|
-
PORT: 3456,
|
|
209374
|
-
APIKEY: "123456",
|
|
209375
|
-
API_TIMEOUT_MS: "600000",
|
|
209376
|
-
PROXY_URL: "",
|
|
209377
|
-
transformers: [],
|
|
209378
|
-
Providers: [
|
|
209379
|
-
{
|
|
209380
|
-
name: "Rakuten-AI",
|
|
209381
|
-
api_base_url: "https://api.ai.public.rakuten-it.com/rakutenllms/v1/chat/completions",
|
|
209382
|
-
api_key: "raik-sk-b0bf37082r10ai3ba52386dd24bb102fb0a7348fa7564a3ba52386dd24bb102f",
|
|
209383
|
-
models: [
|
|
209384
|
-
"Rakuten-AI-3.0-Alpha"
|
|
209385
|
-
],
|
|
209386
|
-
transformer: {
|
|
209387
|
-
use: [
|
|
209388
|
-
"openrouter"
|
|
209389
|
-
]
|
|
209390
|
-
}
|
|
209391
|
-
}
|
|
209392
|
-
],
|
|
209393
|
-
StatusLine: {
|
|
209394
|
-
enabled: false,
|
|
209395
|
-
currentStyle: "default",
|
|
209396
|
-
default: {
|
|
209397
|
-
modules: []
|
|
209398
|
-
},
|
|
209399
|
-
powerline: {
|
|
209400
|
-
modules: []
|
|
209401
|
-
}
|
|
209402
|
-
},
|
|
209403
|
-
Router: {
|
|
209404
|
-
default: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209405
|
-
background: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209406
|
-
think: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209407
|
-
longContext: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209408
|
-
longContextThreshold: 6e4,
|
|
209409
|
-
webSearch: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209410
|
-
image: "Rakuten-AI,Rakuten-AI-3.0-Alpha"
|
|
209411
|
-
},
|
|
209412
|
-
CUSTOM_ROUTER_PATH: ""
|
|
209413
|
-
};
|
|
209414
|
-
await writeConfigFile(config2);
|
|
209415
|
-
console.log("Created default configuration file at ~/.mpdai/router-config.json");
|
|
209416
|
-
console.log("Please edit this file with your actual configuration.");
|
|
209417
|
-
return config2;
|
|
209418
|
-
} catch (error) {
|
|
209419
|
-
console.error("Failed to create default configuration:", error.message);
|
|
209420
|
-
process.exit(1);
|
|
209421
|
-
}
|
|
209422
|
-
} else {
|
|
209423
|
-
console.error(`Failed to read config file at ${CONFIG_FILE}`);
|
|
209424
|
-
console.error("Error details:", readError.message);
|
|
209425
|
-
process.exit(1);
|
|
209369
|
+
} catch (error) {
|
|
209370
|
+
if (error.code === "ENOENT") {
|
|
209371
|
+
return null;
|
|
209426
209372
|
}
|
|
209373
|
+
throw error;
|
|
209374
|
+
}
|
|
209375
|
+
};
|
|
209376
|
+
readConfigFile = async () => {
|
|
209377
|
+
let config2 = await readAndParseConfig(RAKUTENSOLO_CONFIG_FILE);
|
|
209378
|
+
if (config2 !== null) {
|
|
209379
|
+
return config2;
|
|
209380
|
+
}
|
|
209381
|
+
config2 = await readAndParseConfig(CONFIG_FILE);
|
|
209382
|
+
if (config2 !== null) {
|
|
209383
|
+
return config2;
|
|
209384
|
+
}
|
|
209385
|
+
try {
|
|
209386
|
+
await initDir();
|
|
209387
|
+
const backupPath = await backupConfigFile();
|
|
209388
|
+
if (backupPath) {
|
|
209389
|
+
console.log(`Backed up existing configuration file to ${backupPath}`);
|
|
209390
|
+
}
|
|
209391
|
+
const config3 = {
|
|
209392
|
+
LOG: true,
|
|
209393
|
+
LOG_LEVEL: "debug",
|
|
209394
|
+
CLAUDE_PATH: "",
|
|
209395
|
+
HOST: "127.0.0.1",
|
|
209396
|
+
PORT: 3456,
|
|
209397
|
+
APIKEY: "123456",
|
|
209398
|
+
API_TIMEOUT_MS: "600000",
|
|
209399
|
+
PROXY_URL: "",
|
|
209400
|
+
transformers: [],
|
|
209401
|
+
Providers: [
|
|
209402
|
+
{
|
|
209403
|
+
name: "Rakuten-AI",
|
|
209404
|
+
api_base_url: "https://api.ai.public.rakuten-it.com/rakutenllms/v1/chat/completions",
|
|
209405
|
+
api_key: "raik-sk-b0bf37082r10ai3ba52386dd24bb102fb0a7348fa7564a3ba52386dd24bb102f",
|
|
209406
|
+
models: [
|
|
209407
|
+
"Rakuten-AI-3.0-Alpha"
|
|
209408
|
+
],
|
|
209409
|
+
transformer: {
|
|
209410
|
+
use: [
|
|
209411
|
+
"openrouter"
|
|
209412
|
+
]
|
|
209413
|
+
}
|
|
209414
|
+
}
|
|
209415
|
+
],
|
|
209416
|
+
StatusLine: {
|
|
209417
|
+
enabled: false,
|
|
209418
|
+
currentStyle: "default",
|
|
209419
|
+
default: {
|
|
209420
|
+
modules: []
|
|
209421
|
+
},
|
|
209422
|
+
powerline: {
|
|
209423
|
+
modules: []
|
|
209424
|
+
}
|
|
209425
|
+
},
|
|
209426
|
+
Router: {
|
|
209427
|
+
default: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209428
|
+
background: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209429
|
+
think: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209430
|
+
longContext: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209431
|
+
longContextThreshold: 6e4,
|
|
209432
|
+
webSearch: "Rakuten-AI,Rakuten-AI-3.0-Alpha",
|
|
209433
|
+
image: "Rakuten-AI,Rakuten-AI-3.0-Alpha"
|
|
209434
|
+
},
|
|
209435
|
+
CUSTOM_ROUTER_PATH: ""
|
|
209436
|
+
};
|
|
209437
|
+
await writeConfigFile(config3);
|
|
209438
|
+
console.log("Created default configuration file at ~/.mpdai/router-config.json");
|
|
209439
|
+
console.log("Please edit this file with your actual configuration.");
|
|
209440
|
+
return config3;
|
|
209441
|
+
} catch (error) {
|
|
209442
|
+
console.error("Failed to create default configuration:", error.message);
|
|
209443
|
+
process.exit(1);
|
|
209427
209444
|
}
|
|
209428
209445
|
};
|
|
209429
209446
|
backupConfigFile = async () => {
|
|
@@ -276258,7 +276275,7 @@ var require_package7 = __commonJS({
|
|
|
276258
276275
|
"packages/router/package.json"(exports2, module2) {
|
|
276259
276276
|
module2.exports = {
|
|
276260
276277
|
name: "@mpdai/router",
|
|
276261
|
-
version: "0.1.
|
|
276278
|
+
version: "0.1.6",
|
|
276262
276279
|
description: "MPD AI Router - Route Claude Code to other LLM providers",
|
|
276263
276280
|
type: "module",
|
|
276264
276281
|
main: "dist/index.js",
|
|
@@ -278074,8 +278091,9 @@ async function run(options = {}) {
|
|
|
278074
278091
|
maxSize: "50M"
|
|
278075
278092
|
})
|
|
278076
278093
|
} : false;
|
|
278094
|
+
const actualConfigFilePath = await getConfigFilePath();
|
|
278077
278095
|
const server = createServer3({
|
|
278078
|
-
jsonPath:
|
|
278096
|
+
jsonPath: actualConfigFilePath,
|
|
278079
278097
|
initialConfig: {
|
|
278080
278098
|
providers: config2.Providers || config2.providers,
|
|
278081
278099
|
HOST,
|
|
@@ -278310,7 +278328,6 @@ var init_src2 = __esm({
|
|
|
278310
278328
|
init_auth3();
|
|
278311
278329
|
init_processCheck();
|
|
278312
278330
|
init_constants2();
|
|
278313
|
-
init_constants2();
|
|
278314
278331
|
init_cache();
|
|
278315
278332
|
init_SSEParser_transform();
|
|
278316
278333
|
init_SSESerializer_transform();
|
|
@@ -282495,6 +282512,7 @@ __export(dist_exports2, {
|
|
|
282495
282512
|
HOME_DIR: () => HOME_DIR,
|
|
282496
282513
|
PID_FILE: () => PID_FILE,
|
|
282497
282514
|
PLUGINS_DIR: () => PLUGINS_DIR,
|
|
282515
|
+
RAKUTENSOLO_CONFIG_FILE: () => RAKUTENSOLO_CONFIG_FILE,
|
|
282498
282516
|
REFERENCE_COUNT_FILE: () => REFERENCE_COUNT_FILE,
|
|
282499
282517
|
backupConfigFile: () => backupConfigFile,
|
|
282500
282518
|
checkForUpdates: () => checkForUpdates,
|
|
@@ -282502,6 +282520,7 @@ __export(dist_exports2, {
|
|
|
282502
282520
|
cleanupPidFile: () => cleanupPidFile,
|
|
282503
282521
|
decrementReferenceCount: () => decrementReferenceCount,
|
|
282504
282522
|
executeCodeCommand: () => executeCodeCommand,
|
|
282523
|
+
getConfigFilePath: () => getConfigFilePath,
|
|
282505
282524
|
getReferenceCount: () => getReferenceCount,
|
|
282506
282525
|
getServiceInfo: () => getServiceInfo,
|
|
282507
282526
|
getServicePid: () => getServicePid,
|
|
@@ -310241,7 +310260,7 @@ import { promises as fs36 } from "fs";
|
|
|
310241
310260
|
import path40 from "path";
|
|
310242
310261
|
|
|
310243
310262
|
// packages/cli/src/generated/git-commit.ts
|
|
310244
|
-
var GIT_COMMIT_INFO = "
|
|
310263
|
+
var GIT_COMMIT_INFO = "77abd11 (local modifications)";
|
|
310245
310264
|
|
|
310246
310265
|
// node_modules/read-package-up/index.js
|
|
310247
310266
|
import path35 from "node:path";
|
|
@@ -310454,7 +310473,7 @@ async function getPackageJson() {
|
|
|
310454
310473
|
// packages/cli/src/utils/version.ts
|
|
310455
310474
|
async function getCliVersion() {
|
|
310456
310475
|
const pkgJson = await getPackageJson();
|
|
310457
|
-
return "0.1.
|
|
310476
|
+
return "0.1.41";
|
|
310458
310477
|
}
|
|
310459
310478
|
|
|
310460
310479
|
// packages/cli/src/ui/commands/memoryCommand.ts
|
|
@@ -331723,7 +331742,7 @@ var DataCollector = class {
|
|
|
331723
331742
|
// 提取元数据
|
|
331724
331743
|
extractMetadata(data) {
|
|
331725
331744
|
return {
|
|
331726
|
-
cli_version: "0.1.
|
|
331745
|
+
cli_version: "0.1.41",
|
|
331727
331746
|
model: process.env.CUSTOM_LLM_MODEL_NAME || "gemini",
|
|
331728
331747
|
auth_type: process.env.USE_CUSTOM_LLM ? "custom_llm" : "google_oauth",
|
|
331729
331748
|
project_path: data.projectPath,
|
|
@@ -332143,7 +332162,7 @@ var ToolConfirmationMessage = ({
|
|
|
332143
332162
|
}
|
|
332144
332163
|
};
|
|
332145
332164
|
let bodyContent = null;
|
|
332146
|
-
let
|
|
332165
|
+
let question2;
|
|
332147
332166
|
const options = new Array();
|
|
332148
332167
|
function availableBodyContentHeight() {
|
|
332149
332168
|
if (options.length === 0) {
|
|
@@ -332178,7 +332197,7 @@ var ToolConfirmationMessage = ({
|
|
|
332178
332197
|
}
|
|
332179
332198
|
);
|
|
332180
332199
|
}
|
|
332181
|
-
|
|
332200
|
+
question2 = `Apply this change?`;
|
|
332182
332201
|
options.push(
|
|
332183
332202
|
{
|
|
332184
332203
|
label: "Yes, allow once",
|
|
@@ -332205,7 +332224,7 @@ var ToolConfirmationMessage = ({
|
|
|
332205
332224
|
);
|
|
332206
332225
|
} else if (confirmationDetails.type === "exec") {
|
|
332207
332226
|
const executionProps = confirmationDetails;
|
|
332208
|
-
|
|
332227
|
+
question2 = `Allow execution?`;
|
|
332209
332228
|
options.push(
|
|
332210
332229
|
{
|
|
332211
332230
|
label: "Yes, allow once",
|
|
@@ -332232,7 +332251,7 @@ var ToolConfirmationMessage = ({
|
|
|
332232
332251
|
} else if (confirmationDetails.type === "info") {
|
|
332233
332252
|
const infoProps = confirmationDetails;
|
|
332234
332253
|
const displayUrls = infoProps.urls && !(infoProps.urls.length === 1 && infoProps.urls[0] === infoProps.prompt);
|
|
332235
|
-
|
|
332254
|
+
question2 = `Do you want to proceed?`;
|
|
332236
332255
|
options.push(
|
|
332237
332256
|
{
|
|
332238
332257
|
label: "Yes, allow once",
|
|
@@ -332270,7 +332289,7 @@ var ToolConfirmationMessage = ({
|
|
|
332270
332289
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { color: Colors.Gray, children: mcpProps.args ? JSON.stringify(mcpProps.args, null, 2) : "No parameters" }) })
|
|
332271
332290
|
] })
|
|
332272
332291
|
] });
|
|
332273
|
-
|
|
332292
|
+
question2 = `Allow execution of MCP tool "${mcpProps.toolName}" from server "${mcpProps.serverName}"?`;
|
|
332274
332293
|
options.push(
|
|
332275
332294
|
{
|
|
332276
332295
|
label: "Yes, allow once",
|
|
@@ -332290,7 +332309,7 @@ var ToolConfirmationMessage = ({
|
|
|
332290
332309
|
}
|
|
332291
332310
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Box_default, { flexDirection: "column", padding: 1, width: childWidth, children: [
|
|
332292
332311
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { flexGrow: 1, flexShrink: 1, overflow: "hidden", marginBottom: 1, children: bodyContent }),
|
|
332293
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { marginBottom: 1, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { wrap: "truncate", children:
|
|
332312
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { marginBottom: 1, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { wrap: "truncate", children: question2 }) }),
|
|
332294
332313
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
332295
332314
|
RadioButtonSelect,
|
|
332296
332315
|
{
|
|
@@ -339193,7 +339212,6 @@ Example:
|
|
|
339193
339212
|
init_dist4();
|
|
339194
339213
|
init_dist4();
|
|
339195
339214
|
init_dist4();
|
|
339196
|
-
var readlineSync2 = __toESM(require_readline_sync(), 1);
|
|
339197
339215
|
var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
|
|
339198
339216
|
function getNodeMemoryArgs(config2) {
|
|
339199
339217
|
const totalMemoryMB = os23.totalmem() / (1024 * 1024);
|
|
@@ -339245,8 +339263,8 @@ async function waitForService3(timeout2 = 1e4, initialDelay = 1e3) {
|
|
|
339245
339263
|
}
|
|
339246
339264
|
async function installClaudeCode() {
|
|
339247
339265
|
return new Promise((resolve18) => {
|
|
339248
|
-
console.log("Installing
|
|
339249
|
-
const installProcess = spawn11("npm", ["install", "-g", "
|
|
339266
|
+
console.log("Installing mpdai-claude-code@2.0.35...");
|
|
339267
|
+
const installProcess = spawn11("npm", ["install", "-g", "mpdai-claude-code@2.0.35"], {
|
|
339250
339268
|
stdio: "inherit",
|
|
339251
339269
|
shell: true
|
|
339252
339270
|
});
|
|
@@ -339283,25 +339301,15 @@ async function handleClaudeCodeCommand(args) {
|
|
|
339283
339301
|
shell: true
|
|
339284
339302
|
});
|
|
339285
339303
|
checkProcess.on("error", async (error) => {
|
|
339286
|
-
console.
|
|
339287
|
-
console.log("\
|
|
339288
|
-
|
|
339289
|
-
if (
|
|
339290
|
-
|
|
339291
|
-
|
|
339292
|
-
|
|
339293
|
-
const installed = await installClaudeCode();
|
|
339294
|
-
if (installed) {
|
|
339295
|
-
executeCodeCommand(args);
|
|
339296
|
-
resolve18();
|
|
339297
|
-
} else {
|
|
339298
|
-
reject(new Error("Installation failed"));
|
|
339299
|
-
}
|
|
339300
|
-
} else {
|
|
339301
|
-
reject(new Error("User declined installation"));
|
|
339302
|
-
}
|
|
339304
|
+
console.log("\u274C Claude Code is not installed or not found in PATH");
|
|
339305
|
+
console.log("\u{1F4E6} Automatically installing mpdai-claude-code@2.0.35...\n");
|
|
339306
|
+
const installed = await installClaudeCode();
|
|
339307
|
+
if (installed) {
|
|
339308
|
+
console.log("\u2705 Installation complete, executing command...\n");
|
|
339309
|
+
executeCodeCommand(args);
|
|
339310
|
+
resolve18();
|
|
339303
339311
|
} else {
|
|
339304
|
-
reject(new Error("Claude Code
|
|
339312
|
+
reject(new Error("Failed to install Claude Code. Please install manually: npm install -g mpdai-claude-code@2.0.35"));
|
|
339305
339313
|
}
|
|
339306
339314
|
});
|
|
339307
339315
|
checkProcess.on("close", (code) => {
|
|
@@ -339330,9 +339338,14 @@ async function main() {
|
|
|
339330
339338
|
return;
|
|
339331
339339
|
}
|
|
339332
339340
|
}
|
|
339333
|
-
if (args.length > 0 && args[0] === "claude"
|
|
339334
|
-
|
|
339335
|
-
|
|
339341
|
+
if (args.length > 0 && args[0] === "claude") {
|
|
339342
|
+
if (args.length > 1 && args[1] === "code") {
|
|
339343
|
+
await handleClaudeCodeCommand(args.slice(2));
|
|
339344
|
+
return;
|
|
339345
|
+
} else {
|
|
339346
|
+
await handleClaudeCodeCommand(args.slice(1));
|
|
339347
|
+
return;
|
|
339348
|
+
}
|
|
339336
339349
|
}
|
|
339337
339350
|
loadStartupConfig();
|
|
339338
339351
|
const workspaceRoot = process.cwd();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mpd-llm-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.0.0"
|
|
6
6
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "git+https://git.rakuten-it.com/scm/mpd-ai/mpd-llm-cli.git"
|
|
14
14
|
},
|
|
15
15
|
"config": {
|
|
16
|
-
"sandboxImageUri": "xx:0.1.
|
|
16
|
+
"sandboxImageUri": "xx:0.1.41"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"start": "node scripts/start.js",
|