@damper/cli 0.5.7 → 0.5.9

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.7';
8
+ const VERSION = '0.5.9';
9
9
  function showHelp() {
10
10
  console.log(`
11
11
  ${pc.bold('@damper/cli')} - Agent orchestration for Damper tasks
@@ -126,68 +126,25 @@ export async function launchClaude(options) {
126
126
  '--mcp-config', mcpConfigPath,
127
127
  initialPrompt,
128
128
  ];
129
- // Launch Claude Code
129
+ // Launch Claude Code - simplest possible approach
130
+ const { spawnSync } = await import('node:child_process');
131
+ console.error('DEBUG: About to call spawnSync');
132
+ const result = spawnSync('claude', [initialPrompt], {
133
+ cwd,
134
+ stdio: 'inherit',
135
+ env: {
136
+ ...process.env,
137
+ DAMPER_API_KEY: apiKey,
138
+ DAMPER_MCP_CONFIG: mcpConfigPath,
139
+ },
140
+ });
141
+ console.error(`DEBUG: spawnSync done, status=${result.status}`);
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
- }
137
- // Use script command on macOS to ensure proper TTY allocation
138
- // This is needed when running through npx which may not pass TTY properly
139
- const isMac = process.platform === 'darwin';
140
- let result;
141
- if (isMac) {
142
- // script -q /dev/null ensures TTY is allocated
143
- result = spawnSync('script', [
144
- '-q', '/dev/null',
145
- 'claude',
146
- '--mcp-config', mcpConfigPath,
147
- initialPrompt
148
- ], {
149
- cwd,
150
- stdio: 'inherit',
151
- env: {
152
- ...process.env,
153
- DAMPER_API_KEY: apiKey,
154
- },
155
- });
156
- }
157
- else {
158
- result = spawnSync('claude', [
159
- '--mcp-config', mcpConfigPath,
160
- initialPrompt
161
- ], {
162
- cwd,
163
- stdio: 'inherit',
164
- env: {
165
- ...process.env,
166
- DAMPER_API_KEY: apiKey,
167
- },
168
- });
169
- }
170
- if (result.error) {
171
- const error = result.error;
172
- if (error.code === 'ENOENT') {
173
- console.log(pc.red('\nError: Claude Code CLI not found.'));
174
- console.log(pc.dim('Install it with: npm install -g @anthropic-ai/claude-code\n'));
175
- process.exit(1);
176
- }
177
- throw result.error;
178
- }
144
+ fs.unlinkSync(mcpConfigPath);
179
145
  }
180
146
  catch {
181
- // Claude exited with error - still continue to post-task flow
182
- }
183
- finally {
184
- // Clean up temp MCP config file
185
- try {
186
- fs.unlinkSync(mcpConfigPath);
187
- }
188
- catch {
189
- // Ignore cleanup errors
190
- }
147
+ // Ignore cleanup errors
191
148
  }
192
149
  // Post-task flow
193
150
  console.log(pc.dim('\n─────────────────────────────────────────'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/cli",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {