@dosu/cli 0.6.0 → 0.7.0
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/bin/dosu.js +1 -46
- package/package.json +1 -1
package/bin/dosu.js
CHANGED
|
@@ -2772,13 +2772,6 @@ var init_zed = __esm(() => {
|
|
|
2772
2772
|
});
|
|
2773
2773
|
|
|
2774
2774
|
// src/mcp/providers.ts
|
|
2775
|
-
var exports_providers = {};
|
|
2776
|
-
__export(exports_providers, {
|
|
2777
|
-
getProvider: () => getProvider,
|
|
2778
|
-
detectInstalledProviders: () => detectInstalledProviders,
|
|
2779
|
-
allSetupProviders: () => allSetupProviders,
|
|
2780
|
-
allProviders: () => allProviders
|
|
2781
|
-
});
|
|
2782
2775
|
function allProviders() {
|
|
2783
2776
|
return [
|
|
2784
2777
|
ClaudeProvider(),
|
|
@@ -2802,9 +2795,6 @@ function allSetupProviders() {
|
|
|
2802
2795
|
const providers = allProviders().filter((p) => ("detectPaths" in p) && ("isInstalled" in p));
|
|
2803
2796
|
return providers.sort((a, b) => a.priority() - b.priority());
|
|
2804
2797
|
}
|
|
2805
|
-
function detectInstalledProviders() {
|
|
2806
|
-
return allSetupProviders().filter((p) => p.isInstalled());
|
|
2807
|
-
}
|
|
2808
2798
|
function getProvider(toolID) {
|
|
2809
2799
|
const provider = allProviders().find((p) => p.id() === toolID);
|
|
2810
2800
|
if (!provider)
|
|
@@ -4883,7 +4873,6 @@ async function runTUI() {
|
|
|
4883
4873
|
return;
|
|
4884
4874
|
}
|
|
4885
4875
|
while (true) {
|
|
4886
|
-
const hasMcpTarget = cfg.mode === MODE_OSS || !!cfg.deployment_id;
|
|
4887
4876
|
const action = await ve({
|
|
4888
4877
|
message: "What would you like to do?",
|
|
4889
4878
|
options: [
|
|
@@ -4897,11 +4886,6 @@ async function runTUI() {
|
|
|
4897
4886
|
value: "auth",
|
|
4898
4887
|
hint: isAuthenticated(cfg) ? "Re-authenticate" : undefined
|
|
4899
4888
|
},
|
|
4900
|
-
{
|
|
4901
|
-
label: "Remove MCP",
|
|
4902
|
-
value: "mcp-remove",
|
|
4903
|
-
hint: !hasMcpTarget ? "Select deployment first" : undefined
|
|
4904
|
-
},
|
|
4905
4889
|
{ label: "Clear Credentials", value: "logout" },
|
|
4906
4890
|
{ label: "Exit", value: "exit" }
|
|
4907
4891
|
]
|
|
@@ -4917,13 +4901,6 @@ async function runTUI() {
|
|
|
4917
4901
|
await runSetup();
|
|
4918
4902
|
Object.assign(cfg, loadConfig());
|
|
4919
4903
|
break;
|
|
4920
|
-
case "mcp-remove":
|
|
4921
|
-
if (!hasMcpTarget) {
|
|
4922
|
-
M2.warn("Please select a deployment first.");
|
|
4923
|
-
continue;
|
|
4924
|
-
}
|
|
4925
|
-
await handleMCPRemove(cfg);
|
|
4926
|
-
break;
|
|
4927
4904
|
case "logout":
|
|
4928
4905
|
handleLogout(cfg);
|
|
4929
4906
|
break;
|
|
@@ -4931,28 +4908,6 @@ async function runTUI() {
|
|
|
4931
4908
|
}
|
|
4932
4909
|
Se("Goodbye!");
|
|
4933
4910
|
}
|
|
4934
|
-
async function handleMCPRemove(_cfg) {
|
|
4935
|
-
const { allProviders: allProviders2 } = await Promise.resolve().then(() => (init_providers(), exports_providers));
|
|
4936
|
-
const providers = allProviders2();
|
|
4937
|
-
const selected = await ve({
|
|
4938
|
-
message: "Select tool to remove MCP from",
|
|
4939
|
-
options: providers.filter((p2) => p2.id() !== "manual").map((p2) => ({
|
|
4940
|
-
label: p2.name(),
|
|
4941
|
-
value: p2.id()
|
|
4942
|
-
}))
|
|
4943
|
-
});
|
|
4944
|
-
if (pD(selected))
|
|
4945
|
-
return;
|
|
4946
|
-
const provider = providers.find((p2) => p2.id() === selected);
|
|
4947
|
-
if (!provider)
|
|
4948
|
-
return;
|
|
4949
|
-
try {
|
|
4950
|
-
provider.remove(true);
|
|
4951
|
-
M2.success(`Removed Dosu MCP from ${provider.name()}`);
|
|
4952
|
-
} catch (err) {
|
|
4953
|
-
M2.error(`Failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
4954
|
-
}
|
|
4955
|
-
}
|
|
4956
4911
|
async function handleAuthenticate(cfg) {
|
|
4957
4912
|
if (cfg.access_token) {
|
|
4958
4913
|
const s = Y2();
|
|
@@ -5046,7 +5001,7 @@ init_config();
|
|
|
5046
5001
|
init_providers();
|
|
5047
5002
|
|
|
5048
5003
|
// src/version/version.ts
|
|
5049
|
-
var VERSION = "0.
|
|
5004
|
+
var VERSION = "0.7.0";
|
|
5050
5005
|
function getVersionString() {
|
|
5051
5006
|
return `v${VERSION}`;
|
|
5052
5007
|
}
|