@damper/cli 0.5.3 → 0.5.5
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 +16 -22
- 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.5';
|
|
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,22 +126,13 @@ export async function launchClaude(options) {
|
|
|
126
126
|
'--mcp-config', mcpConfigPath,
|
|
127
127
|
initialPrompt,
|
|
128
128
|
];
|
|
129
|
-
//
|
|
130
|
-
if (process.env.DEBUG) {
|
|
131
|
-
console.log(pc.dim(`Debug: claude ${claudeArgs.join(' ')}`));
|
|
132
|
-
console.log(pc.dim(`Debug: MCP config at ${mcpConfigPath}`));
|
|
133
|
-
}
|
|
134
|
-
// Launch Claude Code in interactive mode
|
|
129
|
+
// Launch Claude Code using spawnSync for reliable TTY handling
|
|
135
130
|
try {
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (process.env.DEBUG) {
|
|
142
|
-
console.log(pc.dim(`Debug: Running: ${cmd}`));
|
|
143
|
-
}
|
|
144
|
-
execSync(cmd, {
|
|
131
|
+
const { spawnSync } = await import('node:child_process');
|
|
132
|
+
const result = spawnSync('claude', [
|
|
133
|
+
'--mcp-config', mcpConfigPath,
|
|
134
|
+
initialPrompt
|
|
135
|
+
], {
|
|
145
136
|
cwd,
|
|
146
137
|
stdio: 'inherit',
|
|
147
138
|
env: {
|
|
@@ -149,14 +140,17 @@ export async function launchClaude(options) {
|
|
|
149
140
|
DAMPER_API_KEY: apiKey,
|
|
150
141
|
},
|
|
151
142
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
143
|
+
if (result.error) {
|
|
144
|
+
const error = result.error;
|
|
145
|
+
if (error.code === 'ENOENT') {
|
|
146
|
+
console.log(pc.red('\nError: Claude Code CLI not found.'));
|
|
147
|
+
console.log(pc.dim('Install it with: npm install -g @anthropic-ai/claude-code\n'));
|
|
148
|
+
process.exit(1);
|
|
149
|
+
}
|
|
150
|
+
throw result.error;
|
|
159
151
|
}
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
160
154
|
// Claude exited with error - still continue to post-task flow
|
|
161
155
|
}
|
|
162
156
|
finally {
|