@crewx/cli 0.9.0-rc.55 → 0.9.0-rc.57
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/commands/doctor.d.ts +17 -0
- package/dist/commands/doctor.js +21 -11
- package/package.json +12 -12
|
@@ -6,7 +6,24 @@
|
|
|
6
6
|
* crewx doctor Run full diagnosis
|
|
7
7
|
* crewx doctor --config <path> Use specific config file
|
|
8
8
|
*/
|
|
9
|
+
interface DiagnosticResult {
|
|
10
|
+
name: string;
|
|
11
|
+
status: 'success' | 'warning' | 'error';
|
|
12
|
+
message: string;
|
|
13
|
+
details?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CliProviderInfo {
|
|
16
|
+
cmd: string;
|
|
17
|
+
install: string;
|
|
18
|
+
}
|
|
19
|
+
/** CLI diagnostics keyed by the bare provider name used in PROVIDER_ORDER. */
|
|
20
|
+
export declare const CLI_PROVIDER_INFO: Record<string, CliProviderInfo>;
|
|
21
|
+
/**
|
|
22
|
+
* Check CLI provider availability in the canonical PROVIDER_ORDER.
|
|
23
|
+
*/
|
|
24
|
+
export declare function checkCliProviders(): DiagnosticResult[];
|
|
9
25
|
/**
|
|
10
26
|
* Handle `crewx doctor` command.
|
|
11
27
|
*/
|
|
12
28
|
export declare function handleDoctor(args: string[]): Promise<void>;
|
|
29
|
+
export {};
|
package/dist/commands/doctor.js
CHANGED
|
@@ -8,12 +8,23 @@
|
|
|
8
8
|
* crewx doctor --config <path> Use specific config file
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.CLI_PROVIDER_INFO = void 0;
|
|
12
|
+
exports.checkCliProviders = checkCliProviders;
|
|
11
13
|
exports.handleDoctor = handleDoctor;
|
|
12
14
|
const fs_1 = require("fs");
|
|
13
15
|
const path_1 = require("path");
|
|
14
16
|
const child_process_1 = require("child_process");
|
|
15
17
|
const sdk_1 = require("@crewx/sdk");
|
|
16
18
|
const parse_common_flags_1 = require("./parse-common-flags");
|
|
19
|
+
/** CLI diagnostics keyed by the bare provider name used in PROVIDER_ORDER. */
|
|
20
|
+
exports.CLI_PROVIDER_INFO = {
|
|
21
|
+
codex: { cmd: 'codex', install: 'npm install -g @openai/codex' },
|
|
22
|
+
claude: { cmd: 'claude', install: 'npm install -g @anthropic-ai/claude-code' },
|
|
23
|
+
grok: { cmd: 'grok', install: 'curl -fsSL https://x.ai/cli/install.sh | bash' },
|
|
24
|
+
opencode: { cmd: 'opencode', install: 'npm install -g opencode' },
|
|
25
|
+
antigravity: { cmd: 'antigravity', install: 'npm install -g antigravity' },
|
|
26
|
+
copilot: { cmd: 'gh', install: 'brew install gh # or visit cli.github.com' },
|
|
27
|
+
};
|
|
17
28
|
function statusIcon(status) {
|
|
18
29
|
switch (status) {
|
|
19
30
|
case 'success': return '✅';
|
|
@@ -99,20 +110,19 @@ function checkLogsDir() {
|
|
|
99
110
|
};
|
|
100
111
|
}
|
|
101
112
|
/**
|
|
102
|
-
* Check CLI provider availability.
|
|
103
|
-
* Providers are checked in PROVIDER_ORDER: codex → claude → opencode → antigravity → copilot.
|
|
113
|
+
* Check CLI provider availability in the canonical PROVIDER_ORDER.
|
|
104
114
|
*/
|
|
105
115
|
function checkCliProviders() {
|
|
106
|
-
// Map each provider (in PROVIDER_ORDER) to its CLI command and install hint.
|
|
107
|
-
const providerInfo = {
|
|
108
|
-
codex: { cmd: 'codex', install: 'npm install -g @openai/codex' },
|
|
109
|
-
claude: { cmd: 'claude', install: 'npm install -g @anthropic-ai/claude-code' },
|
|
110
|
-
opencode: { cmd: 'opencode', install: 'npm install -g opencode' },
|
|
111
|
-
antigravity: { cmd: 'antigravity', install: 'npm install -g antigravity' },
|
|
112
|
-
copilot: { cmd: 'gh', install: 'brew install gh # or visit cli.github.com' },
|
|
113
|
-
};
|
|
114
116
|
return sdk_1.PROVIDER_ORDER.map(provider => {
|
|
115
|
-
const info =
|
|
117
|
+
const info = exports.CLI_PROVIDER_INFO[provider];
|
|
118
|
+
if (!info) {
|
|
119
|
+
return {
|
|
120
|
+
name: `${provider.toUpperCase()} CLI`,
|
|
121
|
+
status: 'error',
|
|
122
|
+
message: 'Diagnostic metadata is missing',
|
|
123
|
+
details: `Add ${provider} to CLI_PROVIDER_INFO.`,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
116
126
|
const displayName = provider === 'copilot' ? 'copilot (gh)' : provider;
|
|
117
127
|
const available = isCommandAvailable(info.cmd);
|
|
118
128
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewx/cli",
|
|
3
|
-
"version": "0.9.0-rc.
|
|
3
|
+
"version": "0.9.0-rc.57",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.19.0"
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"better-sqlite3": "*",
|
|
26
26
|
"dotenv": "17.2.3",
|
|
27
27
|
"isomorphic-git": "1.37.1",
|
|
28
|
-
"@crewx/sdk": "0.9.0-rc.
|
|
29
|
-
"@crewx/memory": "0.1.23-rc.
|
|
30
|
-
"@crewx/
|
|
31
|
-
"@crewx/
|
|
32
|
-
"@crewx/
|
|
33
|
-
"@crewx/cron": "0.1.10-rc.
|
|
28
|
+
"@crewx/sdk": "0.9.0-rc.57",
|
|
29
|
+
"@crewx/memory": "0.1.23-rc.73",
|
|
30
|
+
"@crewx/search": "0.1.10-rc.52",
|
|
31
|
+
"@crewx/wbs": "0.1.10-rc.82",
|
|
32
|
+
"@crewx/doc": "0.1.9-rc.49",
|
|
33
|
+
"@crewx/cron": "0.1.10-rc.91",
|
|
34
|
+
"@crewx/workflow": "0.3.22-rc.103",
|
|
34
35
|
"@crewx/skill": "0.1.20",
|
|
35
|
-
"@crewx/wi": "0.1.10-rc.
|
|
36
|
-
"@crewx/
|
|
37
|
-
"@crewx/
|
|
38
|
-
"@crewx/
|
|
39
|
-
"@crewx/shared": "0.0.6"
|
|
36
|
+
"@crewx/wi": "0.1.10-rc.77",
|
|
37
|
+
"@crewx/shared": "0.0.6",
|
|
38
|
+
"@crewx/chromex": "0.1.0-rc.89",
|
|
39
|
+
"@crewx/notify": "0.1.0-rc.27"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/better-sqlite3": "*",
|