@bike4mind/cli 0.2.3-feat-cli-project-scoped-config.17063 → 0.2.3-feat-cli-project-scoped-config.17064
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/index.js +48 -35
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1622,7 +1622,7 @@ function mergeConfigs(global, project, local) {
|
|
|
1622
1622
|
if (project.tools) {
|
|
1623
1623
|
merged.tools = {
|
|
1624
1624
|
...merged.tools,
|
|
1625
|
-
enabled:
|
|
1625
|
+
enabled: [...merged.tools.enabled || [], ...project.tools.enabled || []],
|
|
1626
1626
|
disabled: [...merged.tools.disabled, ...project.tools.denied || []],
|
|
1627
1627
|
config: {
|
|
1628
1628
|
...merged.tools.config,
|
|
@@ -1636,7 +1636,8 @@ function mergeConfigs(global, project, local) {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
if (local) {
|
|
1638
1638
|
if (local.trustedTools) {
|
|
1639
|
-
|
|
1639
|
+
const trustedSet = /* @__PURE__ */ new Set([...merged.trustedTools || [], ...local.trustedTools]);
|
|
1640
|
+
merged.trustedTools = Array.from(trustedSet);
|
|
1640
1641
|
}
|
|
1641
1642
|
if (local.toolApiKeys) {
|
|
1642
1643
|
merged.toolApiKeys = {
|
|
@@ -9747,7 +9748,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
|
|
|
9747
9748
|
// package.json
|
|
9748
9749
|
var package_default = {
|
|
9749
9750
|
name: "@bike4mind/cli",
|
|
9750
|
-
version: "0.2.3-feat-cli-project-scoped-config.
|
|
9751
|
+
version: "0.2.3-feat-cli-project-scoped-config.17064+c671bc110",
|
|
9751
9752
|
type: "module",
|
|
9752
9753
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9753
9754
|
license: "UNLICENSED",
|
|
@@ -9849,10 +9850,10 @@ var package_default = {
|
|
|
9849
9850
|
},
|
|
9850
9851
|
devDependencies: {
|
|
9851
9852
|
"@bike4mind/agents": "0.1.0",
|
|
9852
|
-
"@bike4mind/common": "2.37.1-feat-cli-project-scoped-config.
|
|
9853
|
-
"@bike4mind/mcp": "1.19.5-feat-cli-project-scoped-config.
|
|
9854
|
-
"@bike4mind/services": "2.31.1-feat-cli-project-scoped-config.
|
|
9855
|
-
"@bike4mind/utils": "2.0.4-feat-cli-project-scoped-config.
|
|
9853
|
+
"@bike4mind/common": "2.37.1-feat-cli-project-scoped-config.17064+c671bc110",
|
|
9854
|
+
"@bike4mind/mcp": "1.19.5-feat-cli-project-scoped-config.17064+c671bc110",
|
|
9855
|
+
"@bike4mind/services": "2.31.1-feat-cli-project-scoped-config.17064+c671bc110",
|
|
9856
|
+
"@bike4mind/utils": "2.0.4-feat-cli-project-scoped-config.17064+c671bc110",
|
|
9856
9857
|
"@types/diff": "^5.0.9",
|
|
9857
9858
|
"@types/jsonwebtoken": "^9.0.4",
|
|
9858
9859
|
"@types/node": "^22.9.0",
|
|
@@ -9864,7 +9865,7 @@ var package_default = {
|
|
|
9864
9865
|
typescript: "^5.9.3",
|
|
9865
9866
|
vitest: "^3.2.4"
|
|
9866
9867
|
},
|
|
9867
|
-
gitHead: "
|
|
9868
|
+
gitHead: "c671bc110915b78abc187065ea6f65d2db6369df"
|
|
9868
9869
|
};
|
|
9869
9870
|
|
|
9870
9871
|
// src/config/constants.ts
|
|
@@ -10389,16 +10390,20 @@ Project Configuration:
|
|
|
10389
10390
|
console.log('\u274C No project found. Use "global" to save to ~/.bike4mind/config.json');
|
|
10390
10391
|
return;
|
|
10391
10392
|
}
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10393
|
+
try {
|
|
10394
|
+
await state.configStore.initProjectConfig();
|
|
10395
|
+
const existingLocal = await state.configStore.loadRawProjectLocalConfig() || {};
|
|
10396
|
+
const updatedLocal = {
|
|
10397
|
+
...existingLocal,
|
|
10398
|
+
trustedTools: [.../* @__PURE__ */ new Set([...existingLocal.trustedTools || [], toolToTrust])]
|
|
10399
|
+
};
|
|
10400
|
+
await state.configStore.saveProjectLocalConfig(updatedLocal);
|
|
10401
|
+
state.permissionManager?.trustTool(toolToTrust);
|
|
10402
|
+
console.log(`\u2705 Tool '${toolToTrust}' trusted for this project only`);
|
|
10403
|
+
console.log(` Saved in: ${projectDir}/.bike4mind/local.json`);
|
|
10404
|
+
} catch (error) {
|
|
10405
|
+
console.error(`\u274C Failed to save project-local config:`, error);
|
|
10406
|
+
}
|
|
10402
10407
|
break;
|
|
10403
10408
|
}
|
|
10404
10409
|
case "project": {
|
|
@@ -10406,26 +10411,34 @@ Project Configuration:
|
|
|
10406
10411
|
console.log('\u274C No project found. Use "global" to save to ~/.bike4mind/config.json');
|
|
10407
10412
|
return;
|
|
10408
10413
|
}
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10414
|
+
try {
|
|
10415
|
+
const existingProject = await state.configStore.loadRawProjectConfig() || {};
|
|
10416
|
+
const updatedProject = {
|
|
10417
|
+
...existingProject,
|
|
10418
|
+
tools: {
|
|
10419
|
+
...existingProject.tools,
|
|
10420
|
+
enabled: [.../* @__PURE__ */ new Set([...existingProject.tools?.enabled || [], toolToTrust])]
|
|
10421
|
+
}
|
|
10422
|
+
};
|
|
10423
|
+
await state.configStore.saveProjectConfig(updatedProject);
|
|
10424
|
+
state.permissionManager?.trustTool(toolToTrust);
|
|
10425
|
+
console.log(`\u2705 Tool '${toolToTrust}' trusted for entire team`);
|
|
10426
|
+
console.log(` Saved in: ${projectDir}/.bike4mind/config.json`);
|
|
10427
|
+
console.log(" \u26A0\uFE0F Remember to commit this file to share with your team!");
|
|
10428
|
+
} catch (error) {
|
|
10429
|
+
console.error(`\u274C Failed to save project config:`, error);
|
|
10430
|
+
}
|
|
10422
10431
|
break;
|
|
10423
10432
|
}
|
|
10424
10433
|
case "global": {
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10434
|
+
try {
|
|
10435
|
+
await state.configStore.trustTool(toolToTrust);
|
|
10436
|
+
state.permissionManager?.trustTool(toolToTrust);
|
|
10437
|
+
console.log(`\u2705 Tool '${toolToTrust}' trusted globally (all projects)`);
|
|
10438
|
+
console.log(" Saved in: ~/.bike4mind/config.json");
|
|
10439
|
+
} catch (error) {
|
|
10440
|
+
console.error(`\u274C Failed to save global config:`, error);
|
|
10441
|
+
}
|
|
10429
10442
|
break;
|
|
10430
10443
|
}
|
|
10431
10444
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.3-feat-cli-project-scoped-config.
|
|
3
|
+
"version": "0.2.3-feat-cli-project-scoped-config.17064+c671bc110",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -102,10 +102,10 @@
|
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@bike4mind/agents": "0.1.0",
|
|
105
|
-
"@bike4mind/common": "2.37.1-feat-cli-project-scoped-config.
|
|
106
|
-
"@bike4mind/mcp": "1.19.5-feat-cli-project-scoped-config.
|
|
107
|
-
"@bike4mind/services": "2.31.1-feat-cli-project-scoped-config.
|
|
108
|
-
"@bike4mind/utils": "2.0.4-feat-cli-project-scoped-config.
|
|
105
|
+
"@bike4mind/common": "2.37.1-feat-cli-project-scoped-config.17064+c671bc110",
|
|
106
|
+
"@bike4mind/mcp": "1.19.5-feat-cli-project-scoped-config.17064+c671bc110",
|
|
107
|
+
"@bike4mind/services": "2.31.1-feat-cli-project-scoped-config.17064+c671bc110",
|
|
108
|
+
"@bike4mind/utils": "2.0.4-feat-cli-project-scoped-config.17064+c671bc110",
|
|
109
109
|
"@types/diff": "^5.0.9",
|
|
110
110
|
"@types/jsonwebtoken": "^9.0.4",
|
|
111
111
|
"@types/node": "^22.9.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"typescript": "^5.9.3",
|
|
118
118
|
"vitest": "^3.2.4"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "c671bc110915b78abc187065ea6f65d2db6369df"
|
|
121
121
|
}
|