@dosu/cli 0.37.1 → 0.38.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/README.md +1 -1
- package/bin/dosu.js +35 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ Or right-click the binary, select "Open", and click "Open" in the dialog.
|
|
|
92
92
|
| `dosu setup` | Run the setup wizard (auth → deployment → detect tools → configure) |
|
|
93
93
|
| `dosu login` | Authenticate with Dosu via browser OAuth |
|
|
94
94
|
| `dosu logout` | Clear saved credentials |
|
|
95
|
-
| `dosu status` | Show current authentication and MCP status |
|
|
95
|
+
| `dosu status [--json]` | Show current authentication and MCP status |
|
|
96
96
|
| `dosu mcp list` | List supported AI tools |
|
|
97
97
|
| `dosu mcp add <tool>` | Add the Dosu MCP server to a specific tool |
|
|
98
98
|
| `dosu logs` | View or manage debug logs (`--tail`, `--clear`) |
|
package/bin/dosu.js
CHANGED
|
@@ -4759,7 +4759,7 @@ var init_dist4 = __esm(() => {
|
|
|
4759
4759
|
function getVersionString() {
|
|
4760
4760
|
return `v${VERSION}`;
|
|
4761
4761
|
}
|
|
4762
|
-
var VERSION = "0.
|
|
4762
|
+
var VERSION = "0.38.0", INSTALL_CHANNEL = "npm";
|
|
4763
4763
|
|
|
4764
4764
|
// src/debug/logger.ts
|
|
4765
4765
|
import {
|
|
@@ -13632,7 +13632,7 @@ async function runAgentSetup(opts) {
|
|
|
13632
13632
|
}
|
|
13633
13633
|
emitStep({
|
|
13634
13634
|
step: "done",
|
|
13635
|
-
agent_next_steps: `Dosu is configured for ${provider.name()}. Tell the user setup is complete and they can ask their agent a Dosu question. Run 'dosu status' to verify.`
|
|
13635
|
+
agent_next_steps: `Dosu is configured for ${provider.name()}. Tell the user setup is complete and they can ask their agent a Dosu question. Run 'dosu status --json' to verify.`
|
|
13636
13636
|
});
|
|
13637
13637
|
return 0;
|
|
13638
13638
|
}
|
|
@@ -16929,14 +16929,45 @@ Run 'dosu --help' to see available commands.`;
|
|
|
16929
16929
|
saveConfig(cfg);
|
|
16930
16930
|
console.log("Successfully logged out.");
|
|
16931
16931
|
});
|
|
16932
|
-
program2.command("status").description("Show current authentication and MCP status").action(async () => {
|
|
16932
|
+
program2.command("status").description("Show current authentication and MCP status").option("--json", "Output as JSON").action(async (opts) => {
|
|
16933
16933
|
const cfg = loadConfig();
|
|
16934
|
+
const mode = cfg.mode === MODE_OSS ? "oss" : "cloud";
|
|
16934
16935
|
if (!isAuthenticated(cfg)) {
|
|
16936
|
+
if (opts.json) {
|
|
16937
|
+
console.log(JSON.stringify({
|
|
16938
|
+
authenticated: false,
|
|
16939
|
+
session_status: "missing",
|
|
16940
|
+
mode,
|
|
16941
|
+
mcp: {
|
|
16942
|
+
status: "not_configured",
|
|
16943
|
+
deployment_id: null,
|
|
16944
|
+
deployment_name: null
|
|
16945
|
+
}
|
|
16946
|
+
}, null, 2));
|
|
16947
|
+
return;
|
|
16948
|
+
}
|
|
16935
16949
|
console.log("Status: Not logged in");
|
|
16936
16950
|
console.log("Run 'dosu login' to authenticate.");
|
|
16937
16951
|
return;
|
|
16938
16952
|
}
|
|
16939
|
-
|
|
16953
|
+
const sessionStatus = isTokenExpired(cfg) && !await ensureFreshSession(cfg) ? "expired" : "valid";
|
|
16954
|
+
if (opts.json) {
|
|
16955
|
+
const deploymentId = cfg.active_account.target?.deployment_id ?? null;
|
|
16956
|
+
const deploymentName = cfg.active_account.target?.deployment_name ?? null;
|
|
16957
|
+
const mcpStatus = cfg.mode === MODE_OSS ? "public_libraries" : deploymentId ? "configured" : "not_configured";
|
|
16958
|
+
console.log(JSON.stringify({
|
|
16959
|
+
authenticated: sessionStatus === "valid",
|
|
16960
|
+
session_status: sessionStatus,
|
|
16961
|
+
mode,
|
|
16962
|
+
mcp: {
|
|
16963
|
+
status: mcpStatus,
|
|
16964
|
+
deployment_id: deploymentId,
|
|
16965
|
+
deployment_name: deploymentName
|
|
16966
|
+
}
|
|
16967
|
+
}, null, 2));
|
|
16968
|
+
return;
|
|
16969
|
+
}
|
|
16970
|
+
if (sessionStatus === "expired") {
|
|
16940
16971
|
console.log("Status: Token expired");
|
|
16941
16972
|
console.log("Run 'dosu login' to re-authenticate.");
|
|
16942
16973
|
} else {
|