@damper/cli 0.5.9 → 0.5.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/dist/index.js +1 -1
- package/dist/services/claude.js +14 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { statusCommand } from './commands/status.js';
|
|
|
5
5
|
import { cleanupCommand } from './commands/cleanup.js';
|
|
6
6
|
import { setupCommand } from './commands/setup.js';
|
|
7
7
|
import { releaseCommand } from './commands/release.js';
|
|
8
|
-
const VERSION = '0.5.
|
|
8
|
+
const VERSION = '0.5.10';
|
|
9
9
|
function showHelp() {
|
|
10
10
|
console.log(`
|
|
11
11
|
${pc.bold('@damper/cli')} - Agent orchestration for Damper tasks
|
package/dist/services/claude.js
CHANGED
|
@@ -126,19 +126,19 @@ export async function launchClaude(options) {
|
|
|
126
126
|
'--mcp-config', mcpConfigPath,
|
|
127
127
|
initialPrompt,
|
|
128
128
|
];
|
|
129
|
-
// Launch Claude Code
|
|
129
|
+
// Launch Claude Code
|
|
130
130
|
const { spawnSync } = await import('node:child_process');
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
const result = spawnSync('claude', [
|
|
132
|
+
'--mcp-config', mcpConfigPath,
|
|
133
|
+
initialPrompt,
|
|
134
|
+
], {
|
|
133
135
|
cwd,
|
|
134
136
|
stdio: 'inherit',
|
|
135
137
|
env: {
|
|
136
138
|
...process.env,
|
|
137
139
|
DAMPER_API_KEY: apiKey,
|
|
138
|
-
DAMPER_MCP_CONFIG: mcpConfigPath,
|
|
139
140
|
},
|
|
140
141
|
});
|
|
141
|
-
console.error(`DEBUG: spawnSync done, status=${result.status}`);
|
|
142
142
|
// Clean up temp MCP config file
|
|
143
143
|
try {
|
|
144
144
|
fs.unlinkSync(mcpConfigPath);
|
|
@@ -146,6 +146,15 @@ export async function launchClaude(options) {
|
|
|
146
146
|
catch {
|
|
147
147
|
// Ignore cleanup errors
|
|
148
148
|
}
|
|
149
|
+
// Check for errors
|
|
150
|
+
if (result.error) {
|
|
151
|
+
const error = result.error;
|
|
152
|
+
if (error.code === 'ENOENT') {
|
|
153
|
+
console.log(pc.red('\nError: Claude Code CLI not found.'));
|
|
154
|
+
console.log(pc.dim('Install it with: npm install -g @anthropic-ai/claude-code\n'));
|
|
155
|
+
process.exit(1);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
149
158
|
// Post-task flow
|
|
150
159
|
console.log(pc.dim('\n─────────────────────────────────────────'));
|
|
151
160
|
console.log(pc.bold('\nClaude session ended.\n'));
|