@damper/cli 0.5.4 → 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 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.4';
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
@@ -126,12 +126,10 @@ export async function launchClaude(options) {
126
126
  '--mcp-config', mcpConfigPath,
127
127
  initialPrompt,
128
128
  ];
129
- // Launch Claude Code - just use execa which handles this well
129
+ // Launch Claude Code using spawnSync for reliable TTY handling
130
130
  try {
131
- console.log(pc.dim('Launching Claude...'));
132
- // Simple approach: just launch claude in the directory
133
- // MCP config is passed, prompt is simple
134
- await execa('claude', [
131
+ const { spawnSync } = await import('node:child_process');
132
+ const result = spawnSync('claude', [
135
133
  '--mcp-config', mcpConfigPath,
136
134
  initialPrompt
137
135
  ], {
@@ -142,14 +140,17 @@ export async function launchClaude(options) {
142
140
  DAMPER_API_KEY: apiKey,
143
141
  },
144
142
  });
145
- }
146
- catch (err) {
147
- const error = err;
148
- if (error.code === 'ENOENT') {
149
- console.log(pc.red('\nError: Claude Code CLI not found.'));
150
- console.log(pc.dim('Install it with: npm install -g @anthropic-ai/claude-code\n'));
151
- process.exit(1);
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;
152
151
  }
152
+ }
153
+ catch {
153
154
  // Claude exited with error - still continue to post-task flow
154
155
  }
155
156
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/cli",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {