@damper/cli 0.7.0 → 0.7.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/services/claude.js
CHANGED
|
@@ -121,7 +121,8 @@ export async function launchClaude(options) {
|
|
|
121
121
|
// Use spawn with stdio: 'inherit' for proper TTY passthrough
|
|
122
122
|
// Signals (Ctrl+C, Escape) are handled naturally since child inherits the terminal
|
|
123
123
|
await new Promise((resolve) => {
|
|
124
|
-
const
|
|
124
|
+
const args = yolo ? ['--dangerously-skip-permissions', initialPrompt] : [initialPrompt];
|
|
125
|
+
const child = spawn('claude', args, {
|
|
125
126
|
cwd,
|
|
126
127
|
stdio: 'inherit',
|
|
127
128
|
env: {
|
|
@@ -96,7 +96,7 @@ export class DamperApi {
|
|
|
96
96
|
// Agent Instructions
|
|
97
97
|
async getAgentInstructions(format = 'section') {
|
|
98
98
|
// The MCP server has this hardcoded, so we'll return the same content
|
|
99
|
-
const lastModified = '2025-02-
|
|
99
|
+
const lastModified = '2025-02-06';
|
|
100
100
|
const section = `## Task Management with Damper MCP
|
|
101
101
|
|
|
102
102
|
> Last updated: ${lastModified}
|
|
@@ -127,6 +127,10 @@ This project uses Damper MCP for task tracking. **You MUST follow this workflow.
|
|
|
127
127
|
- \`add_to_changelog\` - Manually add completed tasks to a changelog
|
|
128
128
|
- \`publish_changelog\` - Publish with optional email notifications and Twitter posting
|
|
129
129
|
|
|
130
|
+
### Project Settings
|
|
131
|
+
- \`get_project_settings\` - View current settings (completion checklist, etc.)
|
|
132
|
+
- \`update_project_settings\` - Configure completion checklist and other agent-relevant settings
|
|
133
|
+
|
|
130
134
|
### At Session End (MANDATORY)
|
|
131
135
|
- ALWAYS call \`complete_task\` (if done) or \`abandon_task\` (if stopping early)
|
|
132
136
|
- NEVER leave a started task without completing or abandoning it
|
|
@@ -268,20 +268,29 @@ export async function createWorktree(options) {
|
|
|
268
268
|
};
|
|
269
269
|
fs.writeFileSync(path.join(worktreePath, '.mcp.json'), JSON.stringify(mcpConfig, null, 2));
|
|
270
270
|
console.log(pc.dim('Created .mcp.json with Damper MCP'));
|
|
271
|
-
// Create .claude/settings.local.json
|
|
271
|
+
// Create .claude/settings.local.json - copy root permissions and ensure Damper MCP is allowed
|
|
272
272
|
const claudeDir = path.join(worktreePath, '.claude');
|
|
273
273
|
if (!fs.existsSync(claudeDir)) {
|
|
274
274
|
fs.mkdirSync(claudeDir, { recursive: true });
|
|
275
275
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
276
|
+
// Read existing settings from root project
|
|
277
|
+
const rootSettingsPath = path.join(projectRoot, '.claude', 'settings.local.json');
|
|
278
|
+
let claudeSettings = {};
|
|
279
|
+
if (fs.existsSync(rootSettingsPath)) {
|
|
280
|
+
try {
|
|
281
|
+
claudeSettings = JSON.parse(fs.readFileSync(rootSettingsPath, 'utf-8'));
|
|
282
|
+
}
|
|
283
|
+
catch { }
|
|
284
|
+
}
|
|
285
|
+
// Ensure permissions.allow includes damper MCP
|
|
286
|
+
const permissions = (claudeSettings.permissions ?? {});
|
|
287
|
+
const allow = Array.isArray(permissions.allow) ? [...permissions.allow] : [];
|
|
288
|
+
if (!allow.includes('mcp__damper__*')) {
|
|
289
|
+
allow.unshift('mcp__damper__*');
|
|
290
|
+
}
|
|
291
|
+
claudeSettings.permissions = { ...permissions, allow };
|
|
283
292
|
fs.writeFileSync(path.join(claudeDir, 'settings.local.json'), JSON.stringify(claudeSettings, null, 2));
|
|
284
|
-
console.log(pc.dim('Created .claude/settings.local.json with
|
|
293
|
+
console.log(pc.dim('Created .claude/settings.local.json with root permissions + MCP'));
|
|
285
294
|
// Save to state
|
|
286
295
|
const worktreeState = {
|
|
287
296
|
taskId,
|