@damper/cli 0.5.8 → 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 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';
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
@@ -127,51 +127,32 @@ export async function launchClaude(options) {
127
127
  initialPrompt,
128
128
  ];
129
129
  // Launch Claude Code
130
+ const { spawnSync } = await import('node:child_process');
131
+ const result = spawnSync('claude', [
132
+ '--mcp-config', mcpConfigPath,
133
+ initialPrompt,
134
+ ], {
135
+ cwd,
136
+ stdio: 'inherit',
137
+ env: {
138
+ ...process.env,
139
+ DAMPER_API_KEY: apiKey,
140
+ },
141
+ });
142
+ // Clean up temp MCP config file
130
143
  try {
131
- const { spawnSync } = await import('node:child_process');
132
- // Check if stdin is a TTY - if not, we may need special handling
133
- const isTTY = process.stdin.isTTY;
134
- if (process.env.DEBUG) {
135
- console.log(pc.dim(`Debug: stdin.isTTY = ${isTTY}`));
136
- console.log(pc.dim(`Debug: MCP config exists = ${fs.existsSync(mcpConfigPath)}`));
137
- console.log(pc.dim(`Debug: cwd = ${cwd}`));
138
- console.log(pc.dim(`Debug: About to spawn claude...`));
139
- }
140
- // Simple spawn - no script wrapper
141
- const result = spawnSync('claude', [
142
- '--mcp-config', mcpConfigPath,
143
- initialPrompt
144
- ], {
145
- cwd,
146
- stdio: 'inherit',
147
- env: {
148
- ...process.env,
149
- DAMPER_API_KEY: apiKey,
150
- },
151
- });
152
- if (process.env.DEBUG) {
153
- console.log(pc.dim(`Debug: spawnSync returned, status = ${result.status}`));
154
- }
155
- if (result.error) {
156
- const error = result.error;
157
- if (error.code === 'ENOENT') {
158
- console.log(pc.red('\nError: Claude Code CLI not found.'));
159
- console.log(pc.dim('Install it with: npm install -g @anthropic-ai/claude-code\n'));
160
- process.exit(1);
161
- }
162
- throw result.error;
163
- }
144
+ fs.unlinkSync(mcpConfigPath);
164
145
  }
165
146
  catch {
166
- // Claude exited with error - still continue to post-task flow
147
+ // Ignore cleanup errors
167
148
  }
168
- finally {
169
- // Clean up temp MCP config file
170
- try {
171
- fs.unlinkSync(mcpConfigPath);
172
- }
173
- catch {
174
- // Ignore cleanup errors
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);
175
156
  }
176
157
  }
177
158
  // Post-task flow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/cli",
3
- "version": "0.5.8",
3
+ "version": "0.5.10",
4
4
  "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {