@nomad-e/bluma-cli 0.0.110 → 0.0.112
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/README.md +1 -1
- package/dist/config/native_tools.json +1 -1
- package/dist/main.js +23 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -575,4 +575,4 @@ BluMa handles different classes of errors gracefully:
|
|
|
575
575
|
- Protect your API keys: never commit `.env` files.
|
|
576
576
|
- `edit_tool` can modify files — review previews before accepting.
|
|
577
577
|
- Use restricted permissions for API tokens wherever possible.
|
|
578
|
-
- If using on shared systems, ensure `.bluma
|
|
578
|
+
- If using on shared systems, ensure `.bluma` config is private.
|
|
@@ -504,7 +504,7 @@
|
|
|
504
504
|
"type": "function",
|
|
505
505
|
"function": {
|
|
506
506
|
"name": "create_artifact",
|
|
507
|
-
"description": "Create or update an artifact file in the artifacts directory (~/.bluma
|
|
507
|
+
"description": "Create or update an artifact file in the artifacts directory (~/.bluma/artifacts/). Use this to save implementation plans, walkthroughs, notes, or any document the user should review. Supports markdown files.",
|
|
508
508
|
"parameters": {
|
|
509
509
|
"type": "object",
|
|
510
510
|
"properties": {
|
package/dist/main.js
CHANGED
|
@@ -1998,7 +1998,7 @@ import * as path5 from "path";
|
|
|
1998
1998
|
var taskStore = [];
|
|
1999
1999
|
var nextId = 1;
|
|
2000
2000
|
function getTodoFilePath() {
|
|
2001
|
-
return path5.join(process.cwd(), ".bluma
|
|
2001
|
+
return path5.join(process.cwd(), ".bluma", "todo.json");
|
|
2002
2002
|
}
|
|
2003
2003
|
function loadTasksFromFile() {
|
|
2004
2004
|
try {
|
|
@@ -2933,7 +2933,7 @@ var artifactsDir = null;
|
|
|
2933
2933
|
async function getArtifactsDir() {
|
|
2934
2934
|
if (artifactsDir) return artifactsDir;
|
|
2935
2935
|
const homeDir = os3.homedir();
|
|
2936
|
-
const baseDir = path9.join(homeDir, ".bluma
|
|
2936
|
+
const baseDir = path9.join(homeDir, ".bluma", "artifacts");
|
|
2937
2937
|
const sessionId2 = Date.now().toString(36) + Math.random().toString(36).substr(2, 5);
|
|
2938
2938
|
artifactsDir = path9.join(baseDir, sessionId2);
|
|
2939
2939
|
await fs7.mkdir(artifactsDir, { recursive: true });
|
|
@@ -3285,9 +3285,7 @@ async function loadSkill(args) {
|
|
|
3285
3285
|
}
|
|
3286
3286
|
return {
|
|
3287
3287
|
success: true,
|
|
3288
|
-
message: `Skill "${skill_name}" loaded
|
|
3289
|
-
|
|
3290
|
-
${skill.content}`,
|
|
3288
|
+
message: `Skill "${skill_name}" loaded.`,
|
|
3291
3289
|
skill_name: skill.name,
|
|
3292
3290
|
description: skill.description
|
|
3293
3291
|
};
|
|
@@ -3403,7 +3401,7 @@ var MCPClient = class {
|
|
|
3403
3401
|
const __filename = fileURLToPath2(import.meta.url);
|
|
3404
3402
|
const __dirname = path11.dirname(__filename);
|
|
3405
3403
|
const defaultConfigPath = path11.resolve(__dirname, "config", "bluma-mcp.json");
|
|
3406
|
-
const userConfigPath = path11.join(os4.homedir(), ".bluma
|
|
3404
|
+
const userConfigPath = path11.join(os4.homedir(), ".bluma", "bluma-mcp.json");
|
|
3407
3405
|
const defaultConfig = await this.loadMcpConfig(defaultConfigPath, "Default");
|
|
3408
3406
|
const userConfig = await this.loadMcpConfig(userConfigPath, "User");
|
|
3409
3407
|
const mergedConfig = {
|
|
@@ -3617,7 +3615,7 @@ function expandHome(p) {
|
|
|
3617
3615
|
return p;
|
|
3618
3616
|
}
|
|
3619
3617
|
function getPreferredAppDir() {
|
|
3620
|
-
const fixed = path12.join(os5.homedir(), ".bluma
|
|
3618
|
+
const fixed = path12.join(os5.homedir(), ".bluma");
|
|
3621
3619
|
return path12.resolve(expandHome(fixed));
|
|
3622
3620
|
}
|
|
3623
3621
|
async function safeRenameWithRetry(src, dest, maxRetries = 6) {
|
|
@@ -4322,6 +4320,12 @@ You have access to specialized knowledge modules called **skills**. Skills exten
|
|
|
4322
4320
|
**Available skills:**
|
|
4323
4321
|
${skillsList}
|
|
4324
4322
|
|
|
4323
|
+
**Skill Lifecycle:**
|
|
4324
|
+
- Skills are **ephemeral** - they exist only for the current task
|
|
4325
|
+
- After completing a task, skill context is discarded
|
|
4326
|
+
- You MUST reload a skill with \`load_skill\` each time you need it
|
|
4327
|
+
- Never assume a skill is still loaded from a previous task
|
|
4328
|
+
|
|
4325
4329
|
---
|
|
4326
4330
|
|
|
4327
4331
|
### Skill Selection Process
|
|
@@ -4970,7 +4974,7 @@ var LLMService = class {
|
|
|
4970
4974
|
constructor(config2) {
|
|
4971
4975
|
this.client = new OpenAI({
|
|
4972
4976
|
apiKey: config2.apiKey,
|
|
4973
|
-
baseURL: config2.baseUrl || "
|
|
4977
|
+
baseURL: config2.baseUrl || ""
|
|
4974
4978
|
});
|
|
4975
4979
|
this.defaultModel = config2.model || "";
|
|
4976
4980
|
}
|
|
@@ -5451,7 +5455,7 @@ var RouteManager = class {
|
|
|
5451
5455
|
};
|
|
5452
5456
|
|
|
5453
5457
|
// src/app/agent/agent.ts
|
|
5454
|
-
var globalEnvPath = path16.join(os9.homedir(), ".bluma
|
|
5458
|
+
var globalEnvPath = path16.join(os9.homedir(), ".bluma", ".env");
|
|
5455
5459
|
dotenv.config({ path: globalEnvPath });
|
|
5456
5460
|
var Agent = class {
|
|
5457
5461
|
sessionId;
|
|
@@ -5474,35 +5478,37 @@ var Agent = class {
|
|
|
5474
5478
|
const apiKey = process.env.NOMAD_API_KEY;
|
|
5475
5479
|
const baseUrl = process.env.NOMAD_BASE_URL;
|
|
5476
5480
|
this.model = process.env.MODEL_NOMAD || "";
|
|
5477
|
-
|
|
5481
|
+
const requiredEnvVars = ["NOMAD_API_KEY", "NOMAD_BASE_URL"];
|
|
5482
|
+
const missingEnvVars = requiredEnvVars.filter((v) => !process.env[v]);
|
|
5483
|
+
if (missingEnvVars.length > 0) {
|
|
5478
5484
|
const platform = process.platform;
|
|
5479
5485
|
let guidance = "";
|
|
5480
5486
|
if (platform === "win32") {
|
|
5481
5487
|
guidance = [
|
|
5482
5488
|
"Windows (PowerShell):",
|
|
5483
|
-
|
|
5489
|
+
...missingEnvVars.map((v) => ` $env:${v}="<your-value>"`),
|
|
5484
5490
|
" # Para persistir:",
|
|
5485
|
-
|
|
5491
|
+
...missingEnvVars.map((v) => ` [System.Environment]::SetEnvironmentVariable("${v}", "<your-value>", "User")`)
|
|
5486
5492
|
].join("\n");
|
|
5487
5493
|
} else if (platform === "darwin" || platform === "linux") {
|
|
5488
5494
|
guidance = [
|
|
5489
5495
|
"macOS/Linux (bash/zsh):",
|
|
5490
|
-
` echo 'export
|
|
5496
|
+
...missingEnvVars.map((v) => ` echo 'export ${v}="<your-value>"' >> ~/.bashrc`),
|
|
5491
5497
|
" source ~/.bashrc"
|
|
5492
5498
|
].join("\n");
|
|
5493
5499
|
} else {
|
|
5494
|
-
guidance =
|
|
5500
|
+
guidance = missingEnvVars.map((v) => ` export ${v}="<your-value>"`).join("\n");
|
|
5495
5501
|
}
|
|
5496
5502
|
const message2 = [
|
|
5497
|
-
|
|
5498
|
-
`Configure
|
|
5503
|
+
`Missing required environment variables: ${missingEnvVars.join(", ")}.`,
|
|
5504
|
+
`Configure them globally using the commands below, or set them in: ${globalEnvPath}`,
|
|
5499
5505
|
"",
|
|
5500
5506
|
guidance
|
|
5501
5507
|
].join("\n");
|
|
5502
5508
|
this.eventBus.emit("backend_message", {
|
|
5503
5509
|
type: "error",
|
|
5504
5510
|
code: "missing_env",
|
|
5505
|
-
missing:
|
|
5511
|
+
missing: missingEnvVars,
|
|
5506
5512
|
path: globalEnvPath,
|
|
5507
5513
|
message: message2
|
|
5508
5514
|
});
|