ceetrix 1.0.1 → 1.0.10
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/ceetrix.js +21 -9
- package/dist/claude.d.ts +13 -4
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +91 -12
- package/dist/claude.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/debug.d.ts +11 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.js +121 -0
- package/dist/debug.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -9
- package/dist/index.js.map +1 -1
- package/dist/permissions.d.ts +21 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +63 -0
- package/dist/permissions.js.map +1 -0
- package/dist/version-check.d.ts +28 -0
- package/dist/version-check.d.ts.map +1 -0
- package/dist/version-check.js +84 -0
- package/dist/version-check.js.map +1 -0
- package/package.json +4 -2
package/bin/ceetrix.js
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { main } from '../dist/index.js';
|
|
3
|
+
import { printDebugInfo } from '../dist/debug.js';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
|
|
7
|
+
if (args.includes('--debug') || args.includes('-d')) {
|
|
8
|
+
printDebugInfo()
|
|
9
|
+
.then(() => process.exit(0))
|
|
10
|
+
.catch((err) => {
|
|
11
|
+
console.error('Debug failed:', err.message);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
});
|
|
14
|
+
} else {
|
|
15
|
+
main()
|
|
16
|
+
.then(() => {
|
|
17
|
+
// @inquirer/prompts leaves stdin open - unref it so Node can exit
|
|
18
|
+
process.stdin.unref();
|
|
19
|
+
})
|
|
20
|
+
.catch((err) => {
|
|
21
|
+
console.error(err.message);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
});
|
|
24
|
+
}
|
package/dist/claude.d.ts
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Claude CLI integration
|
|
3
|
+
*
|
|
4
|
+
* Uses the `which` package for cross-platform executable detection.
|
|
5
|
+
* This handles non-login shells (e.g., npx context) where PATH may not
|
|
6
|
+
* include user-configured directories like /opt/homebrew/bin.
|
|
7
|
+
*
|
|
8
|
+
* Verifies found binaries are actually Claude Code (not stale npm installs)
|
|
9
|
+
* by checking --version output contains "Claude Code".
|
|
10
|
+
*
|
|
11
|
+
* Permission is requested once upfront in index.ts, not per-command.
|
|
3
12
|
*/
|
|
4
13
|
/**
|
|
5
|
-
* Check if the Claude CLI is available
|
|
14
|
+
* Check if the Claude CLI is available.
|
|
6
15
|
*
|
|
7
|
-
* @returns true if claude command is available
|
|
16
|
+
* @returns true if claude command is available and responds to --version
|
|
8
17
|
*/
|
|
9
18
|
export declare function checkClaudeCli(): Promise<boolean>;
|
|
10
19
|
/**
|
|
11
20
|
* Add Ceetrix MCP server configuration to Claude Code.
|
|
12
21
|
*
|
|
13
22
|
* @param apiKey - The API key to use for authentication
|
|
14
|
-
* @throws Error if
|
|
23
|
+
* @throws Error if Claude CLI not found or command fails
|
|
15
24
|
*/
|
|
16
25
|
export declare function addConfig(apiKey: string): Promise<void>;
|
|
17
26
|
/**
|
|
@@ -23,7 +32,7 @@ export declare function checkExistingConfig(): Promise<boolean>;
|
|
|
23
32
|
/**
|
|
24
33
|
* Remove Ceetrix configuration from Claude Code.
|
|
25
34
|
*
|
|
26
|
-
* @throws Error if
|
|
35
|
+
* @throws Error if Claude CLI not found or command fails
|
|
27
36
|
*/
|
|
28
37
|
export declare function removeConfig(): Promise<void>;
|
|
29
38
|
//# sourceMappingURL=claude.d.ts.map
|
package/dist/claude.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../src/claude.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../src/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAuFH;;;;GAIG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAGvD;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB7D;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAY5D;AAED;;;;GAIG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CASlD"}
|
package/dist/claude.js
CHANGED
|
@@ -1,35 +1,108 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Claude CLI integration
|
|
3
|
+
*
|
|
4
|
+
* Uses the `which` package for cross-platform executable detection.
|
|
5
|
+
* This handles non-login shells (e.g., npx context) where PATH may not
|
|
6
|
+
* include user-configured directories like /opt/homebrew/bin.
|
|
7
|
+
*
|
|
8
|
+
* Verifies found binaries are actually Claude Code (not stale npm installs)
|
|
9
|
+
* by checking --version output contains "Claude Code".
|
|
10
|
+
*
|
|
11
|
+
* Permission is requested once upfront in index.ts, not per-command.
|
|
3
12
|
*/
|
|
4
13
|
import { exec } from 'child_process';
|
|
5
14
|
import { promisify } from 'util';
|
|
15
|
+
import which from 'which';
|
|
6
16
|
import { getMcpServerUrl } from './constants.js';
|
|
7
17
|
const execAsync = promisify(exec);
|
|
8
18
|
/** Timeout for Claude CLI commands in milliseconds */
|
|
9
19
|
const CLAUDE_COMMAND_TIMEOUT_MS = 10000;
|
|
20
|
+
/** Short timeout for version check (old versions may hang) */
|
|
21
|
+
const VERSION_CHECK_TIMEOUT_MS = 3000;
|
|
22
|
+
/** Expected string in Claude Code version output */
|
|
23
|
+
const CLAUDE_CODE_VERSION_MARKER = 'Claude Code';
|
|
24
|
+
/** Common installation paths for Claude CLI (fallback when not in PATH) */
|
|
25
|
+
const COMMON_CLAUDE_PATHS = [
|
|
26
|
+
'/opt/homebrew/bin/claude', // macOS Homebrew ARM
|
|
27
|
+
'/usr/local/bin/claude', // macOS Homebrew Intel / Linux
|
|
28
|
+
`${process.env.HOME}/.local/bin/claude`, // pip/pipx style installs
|
|
29
|
+
];
|
|
30
|
+
/** Cached path to claude executable */
|
|
31
|
+
let cachedClaudePath = null;
|
|
10
32
|
/**
|
|
11
|
-
*
|
|
33
|
+
* Verify a path is actually Claude Code by checking version output.
|
|
12
34
|
*
|
|
13
|
-
* @
|
|
35
|
+
* @param path - Path to executable
|
|
36
|
+
* @returns true if responds with "Claude Code" in version output
|
|
14
37
|
*/
|
|
15
|
-
|
|
38
|
+
async function isClaudeCode(path) {
|
|
16
39
|
try {
|
|
17
|
-
await execAsync(
|
|
18
|
-
timeout:
|
|
40
|
+
const { stdout } = await execAsync(`"${path}" --version`, {
|
|
41
|
+
timeout: VERSION_CHECK_TIMEOUT_MS,
|
|
19
42
|
});
|
|
20
|
-
return
|
|
43
|
+
return stdout.includes(CLAUDE_CODE_VERSION_MARKER);
|
|
21
44
|
}
|
|
22
45
|
catch {
|
|
46
|
+
// Timeout, error, or doesn't respond correctly
|
|
23
47
|
return false;
|
|
24
48
|
}
|
|
25
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Find claude executable by checking candidates in order.
|
|
52
|
+
* Verifies each candidate is actually Claude Code (not a stale npm install).
|
|
53
|
+
*
|
|
54
|
+
* @returns Full path to claude executable, or null if not found
|
|
55
|
+
*/
|
|
56
|
+
async function findClaudePath() {
|
|
57
|
+
const candidates = [];
|
|
58
|
+
// Try which first
|
|
59
|
+
try {
|
|
60
|
+
candidates.push(await which('claude'));
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
// Not in PATH
|
|
64
|
+
}
|
|
65
|
+
// Add common fallback paths
|
|
66
|
+
candidates.push(...COMMON_CLAUDE_PATHS);
|
|
67
|
+
// Find first candidate that is actually Claude Code
|
|
68
|
+
for (const path of candidates) {
|
|
69
|
+
if (await isClaudeCode(path)) {
|
|
70
|
+
return path;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get the cached claude path, finding it if not already cached.
|
|
77
|
+
*
|
|
78
|
+
* @returns Full path to claude executable, or empty string if not found
|
|
79
|
+
*/
|
|
80
|
+
async function getClaudePath() {
|
|
81
|
+
if (cachedClaudePath === null) {
|
|
82
|
+
cachedClaudePath = (await findClaudePath()) ?? '';
|
|
83
|
+
}
|
|
84
|
+
return cachedClaudePath;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Check if the Claude CLI is available.
|
|
88
|
+
*
|
|
89
|
+
* @returns true if claude command is available and responds to --version
|
|
90
|
+
*/
|
|
91
|
+
export async function checkClaudeCli() {
|
|
92
|
+
const claudePath = await getClaudePath();
|
|
93
|
+
return claudePath !== '';
|
|
94
|
+
}
|
|
26
95
|
/**
|
|
27
96
|
* Add Ceetrix MCP server configuration to Claude Code.
|
|
28
97
|
*
|
|
29
98
|
* @param apiKey - The API key to use for authentication
|
|
30
|
-
* @throws Error if
|
|
99
|
+
* @throws Error if Claude CLI not found or command fails
|
|
31
100
|
*/
|
|
32
101
|
export async function addConfig(apiKey) {
|
|
102
|
+
const claudePath = await getClaudePath();
|
|
103
|
+
if (!claudePath) {
|
|
104
|
+
throw new Error('Claude CLI not found');
|
|
105
|
+
}
|
|
33
106
|
const config = {
|
|
34
107
|
type: 'http',
|
|
35
108
|
url: getMcpServerUrl(),
|
|
@@ -38,9 +111,8 @@ export async function addConfig(apiKey) {
|
|
|
38
111
|
},
|
|
39
112
|
};
|
|
40
113
|
const configJson = JSON.stringify(config);
|
|
41
|
-
// Escape single quotes for shell
|
|
42
114
|
const escaped = configJson.replace(/'/g, "'\\''");
|
|
43
|
-
await execAsync(`
|
|
115
|
+
await execAsync(`"${claudePath}" mcp add-json ceetrix '${escaped}' --scope user`, {
|
|
44
116
|
timeout: CLAUDE_COMMAND_TIMEOUT_MS,
|
|
45
117
|
});
|
|
46
118
|
}
|
|
@@ -50,8 +122,11 @@ export async function addConfig(apiKey) {
|
|
|
50
122
|
* @returns true if ceetrix server is configured
|
|
51
123
|
*/
|
|
52
124
|
export async function checkExistingConfig() {
|
|
125
|
+
const claudePath = await getClaudePath();
|
|
126
|
+
if (!claudePath)
|
|
127
|
+
return false;
|
|
53
128
|
try {
|
|
54
|
-
const { stdout } = await execAsync(
|
|
129
|
+
const { stdout } = await execAsync(`"${claudePath}" mcp list`, {
|
|
55
130
|
timeout: CLAUDE_COMMAND_TIMEOUT_MS,
|
|
56
131
|
});
|
|
57
132
|
return stdout.includes('ceetrix:');
|
|
@@ -63,10 +138,14 @@ export async function checkExistingConfig() {
|
|
|
63
138
|
/**
|
|
64
139
|
* Remove Ceetrix configuration from Claude Code.
|
|
65
140
|
*
|
|
66
|
-
* @throws Error if
|
|
141
|
+
* @throws Error if Claude CLI not found or command fails
|
|
67
142
|
*/
|
|
68
143
|
export async function removeConfig() {
|
|
69
|
-
|
|
144
|
+
const claudePath = await getClaudePath();
|
|
145
|
+
if (!claudePath) {
|
|
146
|
+
throw new Error('Claude CLI not found');
|
|
147
|
+
}
|
|
148
|
+
await execAsync(`"${claudePath}" mcp remove ceetrix`, {
|
|
70
149
|
timeout: CLAUDE_COMMAND_TIMEOUT_MS,
|
|
71
150
|
});
|
|
72
151
|
}
|
package/dist/claude.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../src/claude.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../src/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC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AM,aAAa,EAAE,CAAC;IACzC,IAAI,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAE9B,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,IAAI,UAAU,YAAY,EAAE;YAC7D,OAAO,EAAE,yBAAyB;SACnC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,UAAU,GAAG,MAAM,aAAa,EAAE,CAAC;IACzC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,SAAS,CAAC,IAAI,UAAU,sBAAsB,EAAE;QACpD,OAAO,EAAE,yBAAyB;KACnC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/** Base URL for Ceetrix API, can be overridden via CEETRIX_API_URL env var */
|
|
8
8
|
export function getApiBaseUrl() {
|
|
9
|
-
return process.env.CEETRIX_API_URL || 'https://
|
|
9
|
+
return process.env.CEETRIX_API_URL || 'https://api.ceetrix.com';
|
|
10
10
|
}
|
|
11
11
|
/** Setup endpoint URL */
|
|
12
12
|
export function getSetupUrl() {
|
package/dist/debug.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debug diagnostics for troubleshooting installation issues
|
|
3
|
+
*
|
|
4
|
+
* Note: --debug mode runs without permission prompt since it's
|
|
5
|
+
* explicitly invoked by the user for diagnostic purposes.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Print debug diagnostics and exit.
|
|
9
|
+
*/
|
|
10
|
+
export declare function printDebugInfo(): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=debug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwBH;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAiGpD"}
|
package/dist/debug.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debug diagnostics for troubleshooting installation issues
|
|
3
|
+
*
|
|
4
|
+
* Note: --debug mode runs without permission prompt since it's
|
|
5
|
+
* explicitly invoked by the user for diagnostic purposes.
|
|
6
|
+
*/
|
|
7
|
+
import { exec } from 'child_process';
|
|
8
|
+
import { promisify } from 'util';
|
|
9
|
+
import which from 'which';
|
|
10
|
+
const execAsync = promisify(exec);
|
|
11
|
+
/** Common installation paths for Claude CLI */
|
|
12
|
+
const COMMON_CLAUDE_PATHS = [
|
|
13
|
+
'/opt/homebrew/bin/claude',
|
|
14
|
+
'/usr/local/bin/claude',
|
|
15
|
+
`${process.env.HOME}/.local/bin/claude`,
|
|
16
|
+
];
|
|
17
|
+
/** Command timeout for diagnostics */
|
|
18
|
+
const DIAG_TIMEOUT_MS = 5000;
|
|
19
|
+
/** Short timeout for version verification */
|
|
20
|
+
const VERSION_CHECK_TIMEOUT_MS = 3000;
|
|
21
|
+
/** Expected marker in Claude Code version output */
|
|
22
|
+
const CLAUDE_CODE_MARKER = 'Claude Code';
|
|
23
|
+
/**
|
|
24
|
+
* Print debug diagnostics and exit.
|
|
25
|
+
*/
|
|
26
|
+
export async function printDebugInfo() {
|
|
27
|
+
console.log('\nCeetrix Debug Diagnostics');
|
|
28
|
+
console.log('═════════════════════════\n');
|
|
29
|
+
// Platform info
|
|
30
|
+
console.log('Platform');
|
|
31
|
+
console.log('────────');
|
|
32
|
+
console.log(` OS: ${process.platform}`);
|
|
33
|
+
console.log(` Arch: ${process.arch}`);
|
|
34
|
+
console.log(` Node: ${process.version}`);
|
|
35
|
+
console.log('');
|
|
36
|
+
// PATH
|
|
37
|
+
console.log('PATH');
|
|
38
|
+
console.log('────');
|
|
39
|
+
const pathDirs = (process.env.PATH || '').split(':');
|
|
40
|
+
for (const dir of pathDirs) {
|
|
41
|
+
console.log(` ${dir}`);
|
|
42
|
+
}
|
|
43
|
+
console.log('');
|
|
44
|
+
// Claude CLI detection
|
|
45
|
+
console.log('Claude CLI Detection');
|
|
46
|
+
console.log('────────────────────');
|
|
47
|
+
// Helper to check if path is real Claude Code
|
|
48
|
+
async function checkClaudeCode(path) {
|
|
49
|
+
try {
|
|
50
|
+
const { stdout } = await execAsync(`"${path}" --version`, {
|
|
51
|
+
timeout: VERSION_CHECK_TIMEOUT_MS,
|
|
52
|
+
});
|
|
53
|
+
if (stdout.includes(CLAUDE_CODE_MARKER)) {
|
|
54
|
+
return `✓ Claude Code (${stdout.trim()})`;
|
|
55
|
+
}
|
|
56
|
+
return `✗ NOT Claude Code (responds: ${stdout.trim().slice(0, 40)})`;
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
const err = e;
|
|
60
|
+
if (err.killed)
|
|
61
|
+
return '✗ TIMEOUT (possibly stale install)';
|
|
62
|
+
return '✗ NOT FOUND or ERROR';
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Try which
|
|
66
|
+
let whichPath = null;
|
|
67
|
+
try {
|
|
68
|
+
whichPath = await which('claude');
|
|
69
|
+
const status = await checkClaudeCode(whichPath);
|
|
70
|
+
console.log(` which('claude'): ${whichPath}`);
|
|
71
|
+
console.log(` ${status}`);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
console.log(` which('claude'): NOT IN PATH`);
|
|
75
|
+
}
|
|
76
|
+
// Try common paths
|
|
77
|
+
for (const path of COMMON_CLAUDE_PATHS) {
|
|
78
|
+
if (path === whichPath)
|
|
79
|
+
continue; // Already checked
|
|
80
|
+
const status = await checkClaudeCode(path);
|
|
81
|
+
console.log(` ${path}:`);
|
|
82
|
+
console.log(` ${status}`);
|
|
83
|
+
}
|
|
84
|
+
console.log('');
|
|
85
|
+
// Existing MCP config
|
|
86
|
+
console.log('Ceetrix MCP Config');
|
|
87
|
+
console.log('──────────────────');
|
|
88
|
+
try {
|
|
89
|
+
const { stdout } = await execAsync('claude mcp list', { timeout: DIAG_TIMEOUT_MS });
|
|
90
|
+
if (stdout.includes('ceetrix:')) {
|
|
91
|
+
const lines = stdout.split('\n');
|
|
92
|
+
const ceetrixLine = lines.find(l => l.includes('ceetrix'));
|
|
93
|
+
console.log(` Status: CONFIGURED`);
|
|
94
|
+
if (ceetrixLine) {
|
|
95
|
+
console.log(` Entry: ${ceetrixLine.trim()}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
console.log(` Status: NOT CONFIGURED`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
console.log(` Status: UNABLE TO CHECK (claude mcp list failed)`);
|
|
104
|
+
}
|
|
105
|
+
console.log('');
|
|
106
|
+
// Shell info
|
|
107
|
+
console.log('Shell Environment');
|
|
108
|
+
console.log('─────────────────');
|
|
109
|
+
console.log(` SHELL: ${process.env.SHELL || 'not set'}`);
|
|
110
|
+
console.log(` HOME: ${process.env.HOME || 'not set'}`);
|
|
111
|
+
console.log(` USER: ${process.env.USER || 'not set'}`);
|
|
112
|
+
console.log('');
|
|
113
|
+
console.log('─────────────────────────────────────────────────────');
|
|
114
|
+
console.log('Ceetrix currently supports macOS + Claude Code only.');
|
|
115
|
+
console.log('');
|
|
116
|
+
console.log('If you have this combination and still have issues,');
|
|
117
|
+
console.log('copy the above and post to the Ceetrix Discord:');
|
|
118
|
+
console.log('https://ceetrix.com/discord');
|
|
119
|
+
console.log('');
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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G,CAAC,2BAA2B,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,aAAa;IACb,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,SAAS,EAAE,CAAC,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,mBAAmB,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC,CAAC;IAChE,OAAO,CAAC,GAAG,CAAC,mBAAmB,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC,CAAC;IAChE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;IAC/D,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAC3C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAkE1C"}
|
package/dist/index.js
CHANGED
|
@@ -8,19 +8,37 @@ import { openBrowser } from './browser.js';
|
|
|
8
8
|
import { promptForRepo, promptExistingConfig } from './prompts.js';
|
|
9
9
|
import { checkClaudeCli, addConfig } from './claude.js';
|
|
10
10
|
import { getSetupUrl, AUTH_TIMEOUT_MS } from './constants.js';
|
|
11
|
+
import { enforceLatestVersion } from './version-check.js';
|
|
12
|
+
import { requestPermissionOrExit } from './permissions.js';
|
|
13
|
+
/** Supported platform for this release */
|
|
14
|
+
const SUPPORTED_PLATFORM = 'darwin';
|
|
11
15
|
/**
|
|
12
16
|
* Main CLI entry point
|
|
13
17
|
*/
|
|
14
18
|
export async function main() {
|
|
15
|
-
console.log('[DEBUG] main() started');
|
|
16
19
|
console.log('\nCeetrix Setup');
|
|
17
20
|
console.log('─────────────\n');
|
|
21
|
+
// Version check - refuse to run outdated cached versions
|
|
22
|
+
await enforceLatestVersion();
|
|
23
|
+
// Platform check - macOS only for now
|
|
24
|
+
if (process.platform !== SUPPORTED_PLATFORM) {
|
|
25
|
+
console.error(`✗ Unsupported platform: ${process.platform}\n`);
|
|
26
|
+
console.error('Ceetrix currently supports macOS + Claude Code only.');
|
|
27
|
+
console.error('Windows and Linux support coming soon.');
|
|
28
|
+
console.error('');
|
|
29
|
+
console.error('Join the Discord for updates: https://ceetrix.com/discord\n');
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
// Single upfront permission for all CLI operations
|
|
33
|
+
await requestPermissionOrExit();
|
|
18
34
|
// Check Claude CLI is available
|
|
19
35
|
const claudeAvailable = await checkClaudeCli();
|
|
20
36
|
if (!claudeAvailable) {
|
|
21
37
|
console.error('✗ Claude Code CLI not found\n');
|
|
22
|
-
console.error('Install Claude Code first:');
|
|
23
|
-
console.error('
|
|
38
|
+
console.error('Install Claude Code first: https://claude.ai/download');
|
|
39
|
+
console.error('');
|
|
40
|
+
console.error('If Claude Code is installed, run: npx ceetrix --debug');
|
|
41
|
+
console.error('and post the output to: https://ceetrix.com/discord\n');
|
|
24
42
|
process.exit(1);
|
|
25
43
|
}
|
|
26
44
|
// Check if already configured
|
|
@@ -55,9 +73,7 @@ export async function main() {
|
|
|
55
73
|
repo = await promptForRepo();
|
|
56
74
|
}
|
|
57
75
|
// Run the setup flow
|
|
58
|
-
console.log('[DEBUG] Calling runSetupFlow...');
|
|
59
76
|
await runSetupFlow(repo);
|
|
60
|
-
console.log('[DEBUG] runSetupFlow completed, main() returning');
|
|
61
77
|
}
|
|
62
78
|
/**
|
|
63
79
|
* Handle case when Ceetrix is already configured.
|
|
@@ -142,14 +158,10 @@ async function runSetupFlow(repo) {
|
|
|
142
158
|
console.log('✓ Configuration added\n');
|
|
143
159
|
// Show restart notice
|
|
144
160
|
printRestartNotice();
|
|
145
|
-
console.log('[DEBUG] About to close server...');
|
|
146
161
|
}
|
|
147
162
|
finally {
|
|
148
|
-
console.log('[DEBUG] In finally block, calling close()...');
|
|
149
163
|
close();
|
|
150
|
-
console.log('[DEBUG] Server closed');
|
|
151
164
|
}
|
|
152
|
-
console.log('[DEBUG] runSetupFlow() returning');
|
|
153
165
|
}
|
|
154
166
|
/**
|
|
155
167
|
* Create a cancellable timeout promise.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAsB,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,cAAc,EAA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 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission-based execution module
|
|
3
|
+
*
|
|
4
|
+
* Single upfront permission for all CLI operations.
|
|
5
|
+
* All-or-nothing: either user trusts ceetrix to run commands or exits.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Request upfront permission for all CLI operations.
|
|
9
|
+
* Must be called once at startup. Exits if denied.
|
|
10
|
+
*/
|
|
11
|
+
export declare function requestPermissionOrExit(): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Check if permission has been granted.
|
|
14
|
+
* For internal use by other modules.
|
|
15
|
+
*/
|
|
16
|
+
export declare function hasPermission(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Reset permission state (for testing).
|
|
19
|
+
*/
|
|
20
|
+
export declare function resetPermission(): void;
|
|
21
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH;;;GAGG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CA+B7D;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission-based execution module
|
|
3
|
+
*
|
|
4
|
+
* Single upfront permission for all CLI operations.
|
|
5
|
+
* All-or-nothing: either user trusts ceetrix to run commands or exits.
|
|
6
|
+
*/
|
|
7
|
+
import { confirm } from '@inquirer/prompts';
|
|
8
|
+
/** Whether permission has been granted for this session */
|
|
9
|
+
let permissionGranted = false;
|
|
10
|
+
/** Commands that will be executed */
|
|
11
|
+
const COMMANDS_DESCRIPTION = `
|
|
12
|
+
• which claude (find Claude CLI location)
|
|
13
|
+
• claude --version (verify it's Claude Code)
|
|
14
|
+
• claude mcp list (check existing config)
|
|
15
|
+
• claude mcp add-json (add Ceetrix server)
|
|
16
|
+
• claude mcp remove (if reconfiguring)
|
|
17
|
+
`;
|
|
18
|
+
/**
|
|
19
|
+
* Request upfront permission for all CLI operations.
|
|
20
|
+
* Must be called once at startup. Exits if denied.
|
|
21
|
+
*/
|
|
22
|
+
export async function requestPermissionOrExit() {
|
|
23
|
+
if (permissionGranted) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
console.log('');
|
|
27
|
+
console.log('┌─ Permission Request ─────────────────────────────────────────┐');
|
|
28
|
+
console.log('│ │');
|
|
29
|
+
console.log('│ Ceetrix needs to run the following commands: │');
|
|
30
|
+
console.log('│ │');
|
|
31
|
+
for (const line of COMMANDS_DESCRIPTION.trim().split('\n')) {
|
|
32
|
+
console.log(`│ ${line.padEnd(58)}│`);
|
|
33
|
+
}
|
|
34
|
+
console.log('│ │');
|
|
35
|
+
console.log('│ All results stay local on your machine. │');
|
|
36
|
+
console.log('│ Nothing is sent externally unless you choose to share. │');
|
|
37
|
+
console.log('│ │');
|
|
38
|
+
console.log('└──────────────────────────────────────────────────────────────┘');
|
|
39
|
+
console.log('');
|
|
40
|
+
const allowed = await confirm({
|
|
41
|
+
message: 'Allow Ceetrix to run these commands?',
|
|
42
|
+
default: true,
|
|
43
|
+
});
|
|
44
|
+
if (!allowed) {
|
|
45
|
+
console.log('\nPermission denied. Exiting.\n');
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
permissionGranted = true;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if permission has been granted.
|
|
52
|
+
* For internal use by other modules.
|
|
53
|
+
*/
|
|
54
|
+
export function hasPermission() {
|
|
55
|
+
return permissionGranted;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Reset permission state (for testing).
|
|
59
|
+
*/
|
|
60
|
+
export function resetPermission() {
|
|
61
|
+
permissionGranted = false;
|
|
62
|
+
}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,EAAE,sCAAsC;QAC/C,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;QAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,iBAAiB,GAAG,IAAI,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,iBAAiB,GAAG,KAAK,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version check against npm registry
|
|
3
|
+
*
|
|
4
|
+
* Ensures user is running the latest version.
|
|
5
|
+
* npx caches old versions, so we enforce @latest.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Get the current package version from package.json
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCurrentVersion(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Fetch the latest version from npm registry
|
|
13
|
+
*
|
|
14
|
+
* @returns Latest version string, or null if fetch fails
|
|
15
|
+
*/
|
|
16
|
+
export declare function getLatestVersion(): Promise<string | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Compare two semver version strings
|
|
19
|
+
*
|
|
20
|
+
* @returns negative if a < b, 0 if equal, positive if a > b
|
|
21
|
+
*/
|
|
22
|
+
export declare function compareVersions(a: string, b: string): number;
|
|
23
|
+
/**
|
|
24
|
+
* Check if current version is latest and exit if not.
|
|
25
|
+
* Skips check if unable to reach npm registry.
|
|
26
|
+
*/
|
|
27
|
+
export declare function enforceLatestVersion(): Promise<void>;
|
|
28
|
+
//# sourceMappingURL=version-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-check.d.ts","sourceRoot":"","sources":["../src/version-check.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAM1C;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqB/D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAU5D;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkB1D"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version check against npm registry
|
|
3
|
+
*
|
|
4
|
+
* Ensures user is running the latest version.
|
|
5
|
+
* npx caches old versions, so we enforce @latest.
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync } from 'fs';
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
9
|
+
import { dirname, join } from 'path';
|
|
10
|
+
/** npm registry URL for version check */
|
|
11
|
+
const NPM_REGISTRY_URL = 'https://registry.npmjs.org/ceetrix/latest';
|
|
12
|
+
/** Timeout for npm registry request */
|
|
13
|
+
const REGISTRY_TIMEOUT_MS = 5000;
|
|
14
|
+
/**
|
|
15
|
+
* Get the current package version from package.json
|
|
16
|
+
*/
|
|
17
|
+
export function getCurrentVersion() {
|
|
18
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
19
|
+
const __dirname = dirname(__filename);
|
|
20
|
+
const packagePath = join(__dirname, '..', 'package.json');
|
|
21
|
+
const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8'));
|
|
22
|
+
return packageJson.version;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Fetch the latest version from npm registry
|
|
26
|
+
*
|
|
27
|
+
* @returns Latest version string, or null if fetch fails
|
|
28
|
+
*/
|
|
29
|
+
export async function getLatestVersion() {
|
|
30
|
+
try {
|
|
31
|
+
const controller = new AbortController();
|
|
32
|
+
const timeoutId = setTimeout(() => controller.abort(), REGISTRY_TIMEOUT_MS);
|
|
33
|
+
const response = await fetch(NPM_REGISTRY_URL, {
|
|
34
|
+
signal: controller.signal,
|
|
35
|
+
});
|
|
36
|
+
clearTimeout(timeoutId);
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
const data = await response.json();
|
|
41
|
+
return data.version ?? null;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// Network error, timeout, or parse error
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Compare two semver version strings
|
|
50
|
+
*
|
|
51
|
+
* @returns negative if a < b, 0 if equal, positive if a > b
|
|
52
|
+
*/
|
|
53
|
+
export function compareVersions(a, b) {
|
|
54
|
+
const partsA = a.split('.').map(Number);
|
|
55
|
+
const partsB = b.split('.').map(Number);
|
|
56
|
+
for (let i = 0; i < 3; i++) {
|
|
57
|
+
const diff = (partsA[i] || 0) - (partsB[i] || 0);
|
|
58
|
+
if (diff !== 0)
|
|
59
|
+
return diff;
|
|
60
|
+
}
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Check if current version is latest and exit if not.
|
|
65
|
+
* Skips check if unable to reach npm registry.
|
|
66
|
+
*/
|
|
67
|
+
export async function enforceLatestVersion() {
|
|
68
|
+
const current = getCurrentVersion();
|
|
69
|
+
const latest = await getLatestVersion();
|
|
70
|
+
if (latest === null) {
|
|
71
|
+
// Can't reach npm registry, allow to proceed
|
|
72
|
+
// (might be offline, corporate firewall, etc.)
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (compareVersions(current, latest) < 0) {
|
|
76
|
+
console.error(`\n✗ Outdated version: ${current} (latest: ${latest})\n`);
|
|
77
|
+
console.error('npx caches old versions. Run with @latest:\n');
|
|
78
|
+
console.error(' npx ceetrix@latest\n');
|
|
79
|
+
console.error('Or clear the cache:\n');
|
|
80
|
+
console.error(' rm -rf ~/.npm/_npx && npx ceetrix\n');
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=version-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-check.js","sourceRoot":"","sources":["../src/version-check.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAErC,yCAAyC;AACzC,MAAM,gBAAgB,GAAG,2CAA2C,CAAC;AAErE,uCAAuC;AACvC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAEjC;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IACnE,OAAO,WAAW,CAAC,OAAO,CAAC;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,mBAAmB,CAAC,CAAC;QAE5E,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,gBAAgB,EAAE;YAC7C,MAAM,EAAE,UAAU,CAAC,MAAM;SAC1B,CA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O,CAAC,KAAK,CAAC,yBAAyB,OAAO,aAAa,MAAM,KAAK,CAAC,CAAC;QACxE,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAC9D,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACxC,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACvC,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ceetrix",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Set up Ceetrix backlog management for Claude Code",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ceetrix": "./bin/ceetrix.js"
|
|
@@ -19,10 +19,12 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@inquirer/prompts": "^7.0.0",
|
|
22
|
-
"open": "^10.0.0"
|
|
22
|
+
"open": "^10.0.0",
|
|
23
|
+
"which": "^6.0.0"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/node": "^20.0.0",
|
|
27
|
+
"@types/which": "^3.0.4",
|
|
26
28
|
"typescript": "^5.0.0",
|
|
27
29
|
"vitest": "^2.0.0",
|
|
28
30
|
"why-is-node-running": "^3.2.2"
|