@damper/cli 0.4.1 → 0.4.2

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
@@ -4,7 +4,7 @@ import { startCommand } from './commands/start.js';
4
4
  import { statusCommand } from './commands/status.js';
5
5
  import { cleanupCommand } from './commands/cleanup.js';
6
6
  import { setupCommand } from './commands/setup.js';
7
- const VERSION = '0.4.1';
7
+ const VERSION = '0.4.2';
8
8
  function showHelp() {
9
9
  console.log(`
10
10
  ${pc.bold('@damper/cli')} - Agent orchestration for Damper tasks
@@ -130,18 +130,22 @@ Once approved, switch to implementation and start logging your work.
130
130
  'Self-improvement: If you encounter friction, bugs, or have ideas to improve the CLI/workflow,',
131
131
  'use `report_issue` to log them. Your feedback improves tooling for all future tasks.',
132
132
  ].join('\n');
133
- // Build MCP config with API key so the Damper MCP server can authenticate
134
- const mcpConfig = JSON.stringify({
135
- damper: {
136
- command: 'npx',
137
- args: ['-y', '@damper/mcp'],
138
- env: { DAMPER_API_KEY: apiKey },
133
+ // Write MCP config to a temp file (more reliable than passing JSON on command line)
134
+ const mcpConfigPath = path.join(os.tmpdir(), `damper-mcp-${taskId}.json`);
135
+ const mcpConfig = {
136
+ mcpServers: {
137
+ damper: {
138
+ command: 'npx',
139
+ args: ['-y', '@damper/mcp'],
140
+ env: { DAMPER_API_KEY: apiKey },
141
+ },
139
142
  },
140
- });
143
+ };
144
+ fs.writeFileSync(mcpConfigPath, JSON.stringify(mcpConfig, null, 2));
141
145
  // Build Claude args
142
146
  const claudeArgs = [
143
147
  '--permission-mode', yolo ? 'acceptEdits' : 'plan',
144
- '--mcp-config', mcpConfig,
148
+ '--mcp-config', mcpConfigPath,
145
149
  initialPrompt,
146
150
  ];
147
151
  // Launch Claude Code in interactive mode
@@ -164,6 +168,15 @@ Once approved, switch to implementation and start logging your work.
164
168
  }
165
169
  // Claude exited with error - still continue to post-task flow
166
170
  }
171
+ finally {
172
+ // Clean up temp MCP config file
173
+ try {
174
+ fs.unlinkSync(mcpConfigPath);
175
+ }
176
+ catch {
177
+ // Ignore cleanup errors
178
+ }
179
+ }
167
180
  // Post-task flow
168
181
  console.log(pc.dim('\n─────────────────────────────────────────'));
169
182
  console.log(pc.bold('\nClaude session ended.\n'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {