@genrupt/cli 0.1.4 → 0.1.5
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/constants.js +1 -1
- package/dist/doctor.js +11 -4
- package/package.json +1 -1
package/dist/constants.js
CHANGED
|
@@ -3,5 +3,5 @@ export const DEFAULT_MCP_SERVER_URL = `${DEFAULT_ORIGIN}/api/agent/mcp`;
|
|
|
3
3
|
export const OAUTH_DEVICE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|
|
4
4
|
export const OAUTH_SCOPE = "mcp";
|
|
5
5
|
export const CLI_CLIENT_NAME = "Genrupt CLI";
|
|
6
|
-
export const CLI_VERSION = "0.1.
|
|
6
|
+
export const CLI_VERSION = "0.1.5";
|
|
7
7
|
export const ACCESS_TOKEN_REFRESH_SKEW_MS = 60_000;
|
package/dist/doctor.js
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync } from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { getValidConfig } from "./auth.js";
|
|
4
4
|
import { CLI_VERSION } from "./constants.js";
|
|
5
|
-
import { buildNoGlobalInstallRemediation, collectGlobalCliDiagnostics, readGlobalCliInstallFailure, } from "./globalCli.js";
|
|
5
|
+
import { buildNoGlobalInstallRemediation, clearGlobalCliInstallFailure, collectGlobalCliDiagnostics, readGlobalCliInstallFailure, } from "./globalCli.js";
|
|
6
6
|
import { listRemoteMcpTools } from "./mcpClient.js";
|
|
7
7
|
import { GENRUPT_SKILL_NAMES, computeInstalledSkillDigests, defaultTargetForAgent, detectAgent, getInstalledRuntimeManifestPath, readInstalledRuntimeManifest, } from "./skills.js";
|
|
8
8
|
import { emitRuntimeTelemetry } from "./telemetry.js";
|
|
@@ -160,9 +160,16 @@ export async function runDoctor(options = {}) {
|
|
|
160
160
|
const globalCliDiagnostics = await collectGlobalCliDiagnostics();
|
|
161
161
|
checks.push(buildPackageManagerCheck(globalCliDiagnostics));
|
|
162
162
|
checks.push(buildGlobalCliCheck(globalCliDiagnostics));
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
const globalCliCurrent = globalCliDiagnostics.globalCliVersion &&
|
|
164
|
+
!isVersionNewer(CLI_VERSION, globalCliDiagnostics.globalCliVersion);
|
|
165
|
+
if (globalCliCurrent) {
|
|
166
|
+
await clearGlobalCliInstallFailure().catch(() => { });
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
const lastInstallFailureCheck = buildLastGlobalInstallFailureCheck(await readGlobalCliInstallFailure());
|
|
170
|
+
if (lastInstallFailureCheck) {
|
|
171
|
+
checks.push(lastInstallFailureCheck);
|
|
172
|
+
}
|
|
166
173
|
}
|
|
167
174
|
try {
|
|
168
175
|
const latestVersion = await fetchLatestCliVersion();
|