@dunnewold-labs/mr-manager 0.4.27 → 0.4.30
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 +31 -6
- 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.30",
|
|
189
189
|
description: "Mr. Manager - Task and project management CLI",
|
|
190
190
|
bin: {
|
|
191
191
|
mr: "./dist/index.mjs"
|
|
@@ -1354,6 +1354,18 @@ If a scenario name matches the feature you're testing (by name or keyword):
|
|
|
1354
1354
|
3. Note in your test plan summary which scenario you used.
|
|
1355
1355
|
|
|
1356
1356
|
If no matching scenario exists, infer interactions from the codebase as normal.`;
|
|
1357
|
+
var SYSTEM_SECTION_QUIET_MODE = `## Quiet Mode \u2014 CRITICAL
|
|
1358
|
+
|
|
1359
|
+
You are running in **quiet mode**. This means:
|
|
1360
|
+
|
|
1361
|
+
1. **DO NOT** write any explanatory text, conversation, commentary, or summaries outside of tool calls.
|
|
1362
|
+
2. **DO NOT** describe what you are about to do or what you just did in prose.
|
|
1363
|
+
3. **ONLY** output text when using \`mr update\` for status updates (keep these to 1 short sentence each).
|
|
1364
|
+
4. All your work must happen through tool calls (Read, Edit, Write, Bash, etc.) \u2014 not through conversational output.
|
|
1365
|
+
5. When you would normally explain your reasoning or next steps, simply proceed silently with the tool calls.
|
|
1366
|
+
6. After completing work, exit immediately without a summary.
|
|
1367
|
+
|
|
1368
|
+
This mode exists to minimize output token usage. Every word of conversational text you generate costs tokens. Tool calls and file writes are the only acceptable output.`;
|
|
1357
1369
|
var SYSTEM_SECTIONS = {
|
|
1358
1370
|
"status-updates": SYSTEM_SECTION_STATUS_UPDATES,
|
|
1359
1371
|
"screenshots": SYSTEM_SECTION_SCREENSHOTS,
|
|
@@ -1362,7 +1374,8 @@ var SYSTEM_SECTIONS = {
|
|
|
1362
1374
|
"features-workflow": SYSTEM_SECTION_FEATURES_WORKFLOW,
|
|
1363
1375
|
"prd-format": SYSTEM_SECTION_PRD_FORMAT,
|
|
1364
1376
|
"prd-open-questions": SYSTEM_SECTION_PRD_OPEN_QUESTIONS,
|
|
1365
|
-
"mr-tests": SYSTEM_SECTION_MR_TESTS
|
|
1377
|
+
"mr-tests": SYSTEM_SECTION_MR_TESTS,
|
|
1378
|
+
"quiet-mode": SYSTEM_SECTION_QUIET_MODE
|
|
1366
1379
|
};
|
|
1367
1380
|
function composeSystemPrompt(sections) {
|
|
1368
1381
|
return sections.map((s) => SYSTEM_SECTIONS[s]).join("\n\n");
|
|
@@ -2571,7 +2584,7 @@ function askYesNo(question) {
|
|
|
2571
2584
|
});
|
|
2572
2585
|
});
|
|
2573
2586
|
}
|
|
2574
|
-
function spawnAgent(agent, repoDir, prompt2, prefix, onActivity, sessionId, name, resumeSession = false, onSpawnError, systemPrompt, maxTurns, claudeModel) {
|
|
2587
|
+
function spawnAgent(agent, repoDir, prompt2, prefix, onActivity, sessionId, name, resumeSession = false, onSpawnError, systemPrompt, maxTurns, claudeModel, onOutputBytes) {
|
|
2575
2588
|
const jobLabel = name ?? "unknown";
|
|
2576
2589
|
console.log(`${timestamp()} ${prefix} ${paint("dim", tokenLogLine("agent", jobLabel, prompt2, systemPrompt))}`);
|
|
2577
2590
|
const { bin, args } = buildAgentArgs(agent, prompt2, "execute", sessionId, name, resumeSession, systemPrompt, maxTurns, claudeModel);
|
|
@@ -2590,12 +2603,14 @@ function spawnAgent(agent, repoDir, prompt2, prefix, onActivity, sessionId, name
|
|
|
2590
2603
|
}
|
|
2591
2604
|
child.stdout?.on("data", (data) => {
|
|
2592
2605
|
onActivity?.();
|
|
2606
|
+
onOutputBytes?.(data.length);
|
|
2593
2607
|
for (const line of data.toString().split("\n")) {
|
|
2594
2608
|
if (line) console.log(`${timestamp()} ${prefix} ${paint("dim", line)}`);
|
|
2595
2609
|
}
|
|
2596
2610
|
});
|
|
2597
2611
|
child.stderr?.on("data", (data) => {
|
|
2598
2612
|
onActivity?.();
|
|
2613
|
+
onOutputBytes?.(data.length);
|
|
2599
2614
|
for (const line of data.toString().split("\n")) {
|
|
2600
2615
|
if (line) logError(prefix, paint("dim", line));
|
|
2601
2616
|
}
|
|
@@ -2829,7 +2844,8 @@ var watchCommand = new Command8("watch").description(
|
|
|
2829
2844
|
cleanupRepoDir: cleanupWorktreePath ? repoDir : void 0,
|
|
2830
2845
|
cleanupWorktreePath,
|
|
2831
2846
|
startedAt: Date.now(),
|
|
2832
|
-
lastActivityAt: Date.now()
|
|
2847
|
+
lastActivityAt: Date.now(),
|
|
2848
|
+
outputBytes: 0
|
|
2833
2849
|
};
|
|
2834
2850
|
const touchActivity = () => {
|
|
2835
2851
|
activeEntry.lastActivityAt = Date.now();
|
|
@@ -2858,7 +2874,8 @@ var watchCommand = new Command8("watch").description(
|
|
|
2858
2874
|
const shouldResumeClaudeSession = attemptAgent === "claude" && !!task.claudeSessionId && !resumeAlreadyRetried && (hasFeedback || pausedForNetwork?.resumeSession === true);
|
|
2859
2875
|
const sessionId = attemptAgent === "claude" ? shouldResumeClaudeSession ? task.claudeSessionId : randomUUID() : void 0;
|
|
2860
2876
|
const effectiveClaudeModel = attemptAgent === "claude" ? taskClaudeModel : void 0;
|
|
2861
|
-
const
|
|
2877
|
+
const systemSections = ["quiet-mode", ...EXECUTION_SYSTEM_SECTIONS];
|
|
2878
|
+
const executionSystemPrompt = composeSystemPrompt(systemSections);
|
|
2862
2879
|
const child = spawnAgent(
|
|
2863
2880
|
attemptAgent,
|
|
2864
2881
|
executionDir,
|
|
@@ -2873,7 +2890,10 @@ var watchCommand = new Command8("watch").description(
|
|
|
2873
2890
|
},
|
|
2874
2891
|
executionSystemPrompt,
|
|
2875
2892
|
void 0,
|
|
2876
|
-
effectiveClaudeModel
|
|
2893
|
+
effectiveClaudeModel,
|
|
2894
|
+
(bytes) => {
|
|
2895
|
+
activeEntry.outputBytes += bytes;
|
|
2896
|
+
}
|
|
2877
2897
|
);
|
|
2878
2898
|
activeEntry.process = child;
|
|
2879
2899
|
activeEntry.currentAgent = attemptAgent;
|
|
@@ -2928,6 +2948,11 @@ var watchCommand = new Command8("watch").description(
|
|
|
2928
2948
|
}
|
|
2929
2949
|
}
|
|
2930
2950
|
finishing.add(task.id);
|
|
2951
|
+
const elapsedMs = Date.now() - activeEntry.startedAt;
|
|
2952
|
+
const outputTokenEstimate = Math.ceil(activeEntry.outputBytes / 4);
|
|
2953
|
+
console.log(
|
|
2954
|
+
`${timestamp()} ${prefix} ${paint("dim", `[output] output=~${formatTokenCount(outputTokenEstimate)} elapsed=${Math.round(elapsedMs / 1e3)}s exit=${code}`)}`
|
|
2955
|
+
);
|
|
2931
2956
|
try {
|
|
2932
2957
|
if (code === 0) {
|
|
2933
2958
|
try {
|