@damper/cli 0.5.10 → 0.5.12
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/commands/start.js +1 -0
- package/dist/index.js +1 -1
- package/dist/services/claude.js +10 -11
- package/dist/services/worktree.d.ts +1 -0
- package/dist/services/worktree.js +18 -0
- package/package.json +1 -1
package/dist/commands/start.js
CHANGED
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
|
+
const VERSION = '0.5.12';
|
|
9
9
|
function showHelp() {
|
|
10
10
|
console.log(`
|
|
11
11
|
${pc.bold('@damper/cli')} - Agent orchestration for Damper tasks
|
package/dist/services/claude.js
CHANGED
|
@@ -127,11 +127,17 @@ export async function launchClaude(options) {
|
|
|
127
127
|
initialPrompt,
|
|
128
128
|
];
|
|
129
129
|
// Launch Claude Code
|
|
130
|
+
// Note: MCP config is set globally via 'setup' command
|
|
131
|
+
// We just pass the API key via environment variable
|
|
130
132
|
const { spawnSync } = await import('node:child_process');
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
// Clean up unused temp MCP config file
|
|
134
|
+
try {
|
|
135
|
+
fs.unlinkSync(mcpConfigPath);
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
// Ignore cleanup errors
|
|
139
|
+
}
|
|
140
|
+
const result = spawnSync('claude', [initialPrompt], {
|
|
135
141
|
cwd,
|
|
136
142
|
stdio: 'inherit',
|
|
137
143
|
env: {
|
|
@@ -139,13 +145,6 @@ export async function launchClaude(options) {
|
|
|
139
145
|
DAMPER_API_KEY: apiKey,
|
|
140
146
|
},
|
|
141
147
|
});
|
|
142
|
-
// Clean up temp MCP config file
|
|
143
|
-
try {
|
|
144
|
-
fs.unlinkSync(mcpConfigPath);
|
|
145
|
-
}
|
|
146
|
-
catch {
|
|
147
|
-
// Ignore cleanup errors
|
|
148
|
-
}
|
|
149
148
|
// Check for errors
|
|
150
149
|
if (result.error) {
|
|
151
150
|
const error = result.error;
|
|
@@ -241,6 +241,24 @@ export async function createWorktree(options) {
|
|
|
241
241
|
await fs.promises.copyFile(source, target);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
+
// Create .claude/settings.json with Damper MCP configured
|
|
245
|
+
const claudeDir = path.join(worktreePath, '.claude');
|
|
246
|
+
if (!fs.existsSync(claudeDir)) {
|
|
247
|
+
fs.mkdirSync(claudeDir, { recursive: true });
|
|
248
|
+
}
|
|
249
|
+
const claudeSettings = {
|
|
250
|
+
mcpServers: {
|
|
251
|
+
damper: {
|
|
252
|
+
command: 'npx',
|
|
253
|
+
args: ['-y', '@damper/mcp'],
|
|
254
|
+
env: {
|
|
255
|
+
DAMPER_API_KEY: options.apiKey,
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
fs.writeFileSync(path.join(claudeDir, 'settings.json'), JSON.stringify(claudeSettings, null, 2));
|
|
261
|
+
console.log(pc.dim('Created .claude/settings.json with Damper MCP'));
|
|
244
262
|
// Save to state
|
|
245
263
|
const worktreeState = {
|
|
246
264
|
taskId,
|