@damper/cli 0.5.9 → 0.5.11
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 +18 -10
- 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.11';
|
|
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,25 +126,33 @@ export async function launchClaude(options) {
|
|
|
126
126
|
'--mcp-config', mcpConfigPath,
|
|
127
127
|
initialPrompt,
|
|
128
128
|
];
|
|
129
|
-
// Launch Claude Code
|
|
129
|
+
// Launch Claude Code
|
|
130
|
+
// Note: MCP config is set globally via 'setup' command
|
|
131
|
+
// We just pass the API key via environment variable
|
|
130
132
|
const { spawnSync } = await import('node:child_process');
|
|
131
|
-
|
|
133
|
+
// Clean up unused temp MCP config file
|
|
134
|
+
try {
|
|
135
|
+
fs.unlinkSync(mcpConfigPath);
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
// Ignore cleanup errors
|
|
139
|
+
}
|
|
132
140
|
const result = spawnSync('claude', [initialPrompt], {
|
|
133
141
|
cwd,
|
|
134
142
|
stdio: 'inherit',
|
|
135
143
|
env: {
|
|
136
144
|
...process.env,
|
|
137
145
|
DAMPER_API_KEY: apiKey,
|
|
138
|
-
DAMPER_MCP_CONFIG: mcpConfigPath,
|
|
139
146
|
},
|
|
140
147
|
});
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
// Check for errors
|
|
149
|
+
if (result.error) {
|
|
150
|
+
const error = result.error;
|
|
151
|
+
if (error.code === 'ENOENT') {
|
|
152
|
+
console.log(pc.red('\nError: Claude Code CLI not found.'));
|
|
153
|
+
console.log(pc.dim('Install it with: npm install -g @anthropic-ai/claude-code\n'));
|
|
154
|
+
process.exit(1);
|
|
155
|
+
}
|
|
148
156
|
}
|
|
149
157
|
// Post-task flow
|
|
150
158
|
console.log(pc.dim('\n─────────────────────────────────────────'));
|