@damper/cli 0.6.1 → 0.6.3
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 +1 -1
- package/dist/services/claude.js +21 -9
- package/dist/services/worktree.js +1 -35
- package/package.json +1 -1
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.6.
|
|
8
|
+
const VERSION = '0.6.3';
|
|
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
|
@@ -178,9 +178,21 @@ export async function postTaskFlow(options) {
|
|
|
178
178
|
hasUnpushedCommits = unpushed.trim().length > 0;
|
|
179
179
|
}
|
|
180
180
|
catch {
|
|
181
|
-
// No upstream branch -
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
// No upstream branch - check against main/origin
|
|
182
|
+
try {
|
|
183
|
+
const { stdout: commits } = await execa('git', ['log', 'origin/main..HEAD', '--oneline'], { cwd, stdio: 'pipe' });
|
|
184
|
+
hasUnpushedCommits = commits.trim().length > 0;
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
try {
|
|
188
|
+
const { stdout: commits } = await execa('git', ['log', 'main..HEAD', '--oneline'], { cwd, stdio: 'pipe' });
|
|
189
|
+
hasUnpushedCommits = commits.trim().length > 0;
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
// Can't determine - assume there are commits if branch differs from main
|
|
193
|
+
hasUnpushedCommits = currentBranch !== 'main' && currentBranch !== '';
|
|
194
|
+
}
|
|
195
|
+
}
|
|
184
196
|
}
|
|
185
197
|
}
|
|
186
198
|
catch {
|
|
@@ -202,13 +214,13 @@ export async function postTaskFlow(options) {
|
|
|
202
214
|
}
|
|
203
215
|
console.log();
|
|
204
216
|
// Offer actions based on state
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
217
|
+
const hasChanges = hasUnpushedCommits || hasUncommittedChanges;
|
|
218
|
+
if (hasChanges) {
|
|
219
|
+
if (hasUncommittedChanges) {
|
|
220
|
+
console.log(pc.yellow('⚠ There are uncommitted changes. You may want to commit them first.\n'));
|
|
221
|
+
}
|
|
210
222
|
const mergeAction = await select({
|
|
211
|
-
message: 'How do you want to
|
|
223
|
+
message: 'How do you want to handle your changes?',
|
|
212
224
|
choices: [
|
|
213
225
|
{ name: 'Create a pull request', value: 'pr' },
|
|
214
226
|
{ name: 'Merge directly to main', value: 'merge' },
|
|
@@ -276,41 +276,7 @@ export async function createWorktree(options) {
|
|
|
276
276
|
const claudeSettings = {
|
|
277
277
|
permissions: {
|
|
278
278
|
allow: [
|
|
279
|
-
'
|
|
280
|
-
'mcp__damper__get_task',
|
|
281
|
-
'mcp__damper__update_task',
|
|
282
|
-
'mcp__damper__create_task',
|
|
283
|
-
'mcp__damper__start_task',
|
|
284
|
-
'mcp__damper__add_note',
|
|
285
|
-
'mcp__damper__add_commit',
|
|
286
|
-
'mcp__damper__create_subtask',
|
|
287
|
-
'mcp__damper__update_subtask',
|
|
288
|
-
'mcp__damper__complete_task',
|
|
289
|
-
'mcp__damper__abandon_task',
|
|
290
|
-
'mcp__damper__get_agent_instructions',
|
|
291
|
-
'mcp__damper__list_context_sections',
|
|
292
|
-
'mcp__damper__get_context_section',
|
|
293
|
-
'mcp__damper__update_context_section',
|
|
294
|
-
'mcp__damper__delete_context_section',
|
|
295
|
-
'mcp__damper__sync_project_context',
|
|
296
|
-
'mcp__damper__get_project_context',
|
|
297
|
-
'mcp__damper__list_feedback',
|
|
298
|
-
'mcp__damper__get_feedback',
|
|
299
|
-
'mcp__damper__report_issue',
|
|
300
|
-
'mcp__damper__list_templates',
|
|
301
|
-
'mcp__damper__get_template',
|
|
302
|
-
'mcp__damper__update_template',
|
|
303
|
-
'mcp__damper__sync_templates',
|
|
304
|
-
'mcp__damper__list_modules',
|
|
305
|
-
'mcp__damper__get_module',
|
|
306
|
-
'mcp__damper__update_module',
|
|
307
|
-
'mcp__damper__sync_modules',
|
|
308
|
-
'mcp__damper__link_feedback_to_task',
|
|
309
|
-
'mcp__damper__list_changelogs',
|
|
310
|
-
'mcp__damper__create_changelog',
|
|
311
|
-
'mcp__damper__update_changelog',
|
|
312
|
-
'mcp__damper__add_to_changelog',
|
|
313
|
-
'mcp__damper__publish_changelog',
|
|
279
|
+
'mcp__damper__*',
|
|
314
280
|
],
|
|
315
281
|
},
|
|
316
282
|
};
|