@gonzih/cc-discord 0.2.20 → 0.2.21
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/claude.js +4 -1
- package/dist/meta-agent-manager.js +4 -0
- package/package.json +3 -2
package/dist/claude.js
CHANGED
|
@@ -182,9 +182,12 @@ export function extractText(msg) {
|
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
184
|
* Resolve the claude CLI binary path.
|
|
185
|
-
* Checks PATH entries + common npm global install locations.
|
|
185
|
+
* Checks CLAUDE_BIN env var first, then PATH entries + common npm global install locations.
|
|
186
186
|
*/
|
|
187
187
|
function resolveClaude(pathEnv) {
|
|
188
|
+
// Allow test/operator override via CLAUDE_BIN
|
|
189
|
+
if (process.env.CLAUDE_BIN)
|
|
190
|
+
return process.env.CLAUDE_BIN;
|
|
188
191
|
// Try PATH entries first
|
|
189
192
|
const dirs = (pathEnv ?? process.env.PATH ?? "").split(":");
|
|
190
193
|
for (const dir of dirs) {
|
|
@@ -92,8 +92,12 @@ export function injectMcp(ns, wsPath, token) {
|
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* Resolve claude binary — same logic as claude.ts resolveClaude.
|
|
95
|
+
* Checks CLAUDE_BIN env var first, then PATH + common fallback locations.
|
|
95
96
|
*/
|
|
96
97
|
function resolveClaude() {
|
|
98
|
+
// Allow test/operator override via CLAUDE_BIN
|
|
99
|
+
if (process.env.CLAUDE_BIN)
|
|
100
|
+
return process.env.CLAUDE_BIN;
|
|
97
101
|
const dirs = (process.env.PATH ?? "").split(":");
|
|
98
102
|
for (const dir of dirs) {
|
|
99
103
|
const c = `${dir}/claude`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gonzih/cc-discord",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.21",
|
|
4
4
|
"description": "Claude Code Discord bot — chat with Claude Code via Discord",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"dev": "node --loader ts-node/esm src/index.ts",
|
|
13
13
|
"test": "vitest run",
|
|
14
14
|
"test:watch": "vitest",
|
|
15
|
-
"test:coverage": "vitest run --coverage"
|
|
15
|
+
"test:coverage": "vitest run --coverage",
|
|
16
|
+
"test:integration": "CLAUDE_BIN=./test/fixtures/mock-claude.js vitest run test/integration/"
|
|
16
17
|
},
|
|
17
18
|
"files": [
|
|
18
19
|
"dist/"
|