@dunnewold-labs/mr-manager 0.4.25 → 0.4.27
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.mjs +24 -17
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -185,7 +185,7 @@ import { fileURLToPath } from "url";
|
|
|
185
185
|
// cli/package.json
|
|
186
186
|
var package_default = {
|
|
187
187
|
name: "@dunnewold-labs/mr-manager",
|
|
188
|
-
version: "0.4.
|
|
188
|
+
version: "0.4.27",
|
|
189
189
|
description: "Mr. Manager - Task and project management CLI",
|
|
190
190
|
bin: {
|
|
191
191
|
mr: "./dist/index.mjs"
|
|
@@ -2498,7 +2498,8 @@ ${systemPrompt}` : prompt2;
|
|
|
2498
2498
|
if (mode === "plan") {
|
|
2499
2499
|
return { bin: "claude", args: [...sessionArgs, ...nameArgs, ...systemArgs, ...turnsArgs, ...modelArgs, "--permission-mode", "plan", "-p", prompt2] };
|
|
2500
2500
|
}
|
|
2501
|
-
|
|
2501
|
+
const permissionArgs = ["--dangerously-skip-permissions"];
|
|
2502
|
+
return { bin: "claude", args: [...sessionArgs, ...nameArgs, ...systemArgs, ...turnsArgs, ...modelArgs, ...permissionArgs, "-p", prompt2] };
|
|
2502
2503
|
}
|
|
2503
2504
|
function commandExists(cmd) {
|
|
2504
2505
|
return new Promise((resolve9) => {
|
|
@@ -3011,14 +3012,19 @@ var watchCommand = new Command8("watch").description(
|
|
|
3011
3012
|
await postTaskUpdate(task.id, `Agent finished \u2014 no ${prLabel} found for branch ${branchName}`, "system");
|
|
3012
3013
|
}
|
|
3013
3014
|
}
|
|
3014
|
-
await api.
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3015
|
+
const currentTask = await api.get(`/api/tasks/${task.id}`);
|
|
3016
|
+
if (currentTask.status === "completed" || currentTask.status === "review") {
|
|
3017
|
+
logWarn(prefix, `Task already in "${currentTask.status}" state \u2014 skipping status update`);
|
|
3018
|
+
} else {
|
|
3019
|
+
await api.patch(`/api/tasks/${task.id}`, {
|
|
3020
|
+
status: "review",
|
|
3021
|
+
claudeSessionId: activeEntry.currentAgent === "claude" ? void 0 : null,
|
|
3022
|
+
...prUrl ? { link: prUrl } : {}
|
|
3023
|
+
});
|
|
3024
|
+
logSuccess(prefix, `"${paint("bold", task.title)}" marked ready for review`);
|
|
3025
|
+
if (noMrRequested) {
|
|
3026
|
+
await postTaskUpdate(task.id, `No ${prLabel} required: ${noMrDescription}`, "system");
|
|
3027
|
+
}
|
|
3022
3028
|
}
|
|
3023
3029
|
} catch (err) {
|
|
3024
3030
|
if (isLikelyNetworkError(err)) {
|
|
@@ -3745,6 +3751,7 @@ ${divider}`);
|
|
|
3745
3751
|
if (taskId.startsWith("proto-") || taskId.startsWith("repo-") || taskId.startsWith("scan-")) continue;
|
|
3746
3752
|
if (!activeTaskIds.has(taskId)) {
|
|
3747
3753
|
logWarn(watchTag(), `Task ${paint("yellow", taskId.slice(0, 8))} no longer active, terminating\u2026`);
|
|
3754
|
+
entry.terminatedForError = true;
|
|
3748
3755
|
entry.process.kill("SIGTERM");
|
|
3749
3756
|
active.delete(taskId);
|
|
3750
3757
|
queued.delete(taskId);
|
|
@@ -4121,20 +4128,20 @@ ${divider}`);
|
|
|
4121
4128
|
const prefix = taskTag(sid);
|
|
4122
4129
|
const prLabel = task.link.includes("gitlab") ? "MR" : "PR";
|
|
4123
4130
|
const vcs = task.link.includes("gitlab") ? "gitlab" : "github";
|
|
4124
|
-
const repoDir = findDirectoryForProject(config, task.projectId, rootDir)
|
|
4131
|
+
const repoDir = findDirectoryForProject(config, task.projectId, rootDir);
|
|
4132
|
+
if (!repoDir) continue;
|
|
4125
4133
|
const status = await checkPrStatus(task.link, repoDir, vcs);
|
|
4126
4134
|
if (!status) continue;
|
|
4127
4135
|
if (status.merged) {
|
|
4128
|
-
|
|
4136
|
+
if (task.autoMergedAt) continue;
|
|
4137
|
+
logSuccess(prefix, `${prLabel} merged \u2014 marking for acknowledgment "${paint("bold", task.title)}"`);
|
|
4129
4138
|
try {
|
|
4130
4139
|
await api.patch(`/api/tasks/${task.id}`, {
|
|
4131
|
-
|
|
4132
|
-
completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4133
|
-
inProgressSince: null
|
|
4140
|
+
autoMergedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4134
4141
|
});
|
|
4135
|
-
await postTaskUpdate(task.id, `${prLabel} merged \u2014
|
|
4142
|
+
await postTaskUpdate(task.id, `${prLabel} merged \u2014 waiting for your acknowledgment to complete the task`, "system");
|
|
4136
4143
|
} catch (err) {
|
|
4137
|
-
logError(prefix, `Failed to auto-
|
|
4144
|
+
logError(prefix, `Failed to mark task as auto-merged: ${err.message}`);
|
|
4138
4145
|
}
|
|
4139
4146
|
continue;
|
|
4140
4147
|
}
|