@damper/cli 0.5.0 → 0.5.1

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.0';
8
+ const VERSION = '0.5.1';
9
9
  function showHelp() {
10
10
  console.log(`
11
11
  ${pc.bold('@damper/cli')} - Agent orchestration for Damper tasks
@@ -1,6 +1,7 @@
1
1
  import * as fs from 'node:fs';
2
2
  import * as path from 'node:path';
3
3
  import * as os from 'node:os';
4
+ import { spawn } from 'node:child_process';
4
5
  import { execa } from 'execa';
5
6
  import pc from 'picocolors';
6
7
  const CLAUDE_SETTINGS_DIR = path.join(os.homedir(), '.claude');
@@ -148,24 +149,29 @@ Once approved, switch to implementation and start logging your work.
148
149
  '--mcp-config', mcpConfigPath,
149
150
  initialPrompt,
150
151
  ];
151
- // Launch Claude Code in interactive mode
152
+ // Launch Claude Code in interactive mode using spawn for better TTY handling
152
153
  try {
153
- await execa('claude', claudeArgs, {
154
- cwd,
155
- stdio: 'inherit',
156
- env: {
157
- ...process.env,
158
- DAMPER_API_KEY: apiKey,
159
- },
154
+ await new Promise((resolve, reject) => {
155
+ const child = spawn('claude', claudeArgs, {
156
+ cwd,
157
+ stdio: 'inherit',
158
+ env: {
159
+ ...process.env,
160
+ DAMPER_API_KEY: apiKey,
161
+ },
162
+ });
163
+ child.on('close', () => resolve());
164
+ child.on('error', (err) => {
165
+ if (err.code === 'ENOENT') {
166
+ console.log(pc.red('\nError: Claude Code CLI not found.'));
167
+ console.log(pc.dim('Install it with: npm install -g @anthropic-ai/claude-code\n'));
168
+ process.exit(1);
169
+ }
170
+ reject(err);
171
+ });
160
172
  });
161
173
  }
162
- catch (err) {
163
- const error = err;
164
- if (error.code === 'ENOENT') {
165
- console.log(pc.red('\nError: Claude Code CLI not found.'));
166
- console.log(pc.dim('Install it with: npm install -g @anthropic-ai/claude-code\n'));
167
- process.exit(1);
168
- }
174
+ catch {
169
175
  // Claude exited with error - still continue to post-task flow
170
176
  }
171
177
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {