@open-tomato/rafa 0.34.1 → 0.36.0
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/README.md +18 -18
- package/dist/bundled/agents/doc-updater.md +1 -1
- package/dist/bundled/operators/.claude-plugin/plugin.json +5 -0
- package/dist/bundled/operators/agents/rafa-stretch-engineer.md +40 -19
- package/dist/bundled/operators/agents/rafa-stretch-watchtower.md +9 -9
- package/dist/bundled/operators/skills/rafa-stretch-pit-stop/SKILL.md +2 -2
- package/dist/cli.js +3748 -1682
- package/dist/effort/store/index.js +2 -2
- package/dist/{index-s8ff86xt.js → index-2n2nedrk.js} +1857 -860
- package/dist/{index-v8d7c6sw.js → index-7bb0fdb7.js} +40 -2
- package/dist/{index-nr4hdb35.js → index-ddzzmcaz.js} +1127 -346
- package/dist/{index-vp0xghk2.js → index-jfas157k.js} +6 -3
- package/dist/{index-bebv92ha.js → index-qvbeqrx3.js} +401 -201
- package/dist/index.js +4 -6
- package/dist/plan/index.js +2 -2
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
activeOutput,
|
|
4
4
|
isStampableStub,
|
|
5
5
|
readRafaBlocks
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-jfas157k.js";
|
|
7
7
|
import {
|
|
8
8
|
messageOf,
|
|
9
9
|
parseTaskDeclaration
|
|
@@ -519,6 +519,44 @@ function writeTrackerBlocker(trackerPath, lineNum, blocker) {
|
|
|
519
519
|
`), "utf8");
|
|
520
520
|
return true;
|
|
521
521
|
}
|
|
522
|
+
var ANY_TASK_PREFIX = /^- \[(?: |x|BLOCKED)\] /;
|
|
523
|
+
var LINE_TERMINATOR = /[\n\r\u2028\u2029]/;
|
|
524
|
+
function assertInsertable(entry) {
|
|
525
|
+
if (entry.task.trim().length === 0 || LINE_TERMINATOR.test(entry.task)) {
|
|
526
|
+
throw new Error("insertTrackerTask: the task text must be one line and not blank");
|
|
527
|
+
}
|
|
528
|
+
if (entry.declaration.trim().length === 0 || /[{}]/.test(entry.declaration) || LINE_TERMINATOR.test(entry.declaration)) {
|
|
529
|
+
throw new Error("insertTrackerTask: the declaration must be one line of entries holding no brace");
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
function endOfChecklist(lines, inBlock) {
|
|
533
|
+
for (let i = lines.length - 1;i >= 0; i -= 1) {
|
|
534
|
+
if (!inBlock.has(i) && ANY_TASK_PREFIX.test(lines[i]))
|
|
535
|
+
return i + 1;
|
|
536
|
+
}
|
|
537
|
+
const last = lines.length - 1;
|
|
538
|
+
return lines[last] === "" ? last : lines.length;
|
|
539
|
+
}
|
|
540
|
+
function insertTrackerTask(trackerPath, entry, beforeLine) {
|
|
541
|
+
assertInsertable(entry);
|
|
542
|
+
const content = fs.readFileSync(trackerPath, "utf8");
|
|
543
|
+
const lines = content.split(`
|
|
544
|
+
`);
|
|
545
|
+
const inBlock = closedBlockLines(content);
|
|
546
|
+
if (beforeLine !== null) {
|
|
547
|
+
const target = lines[beforeLine];
|
|
548
|
+
if (target === undefined || inBlock.has(beforeLine) || !ANY_TASK_PREFIX.test(target)) {
|
|
549
|
+
throw new Error(`insertTrackerTask: line ${beforeLine} is no task line`);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
const at = beforeLine ?? endOfChecklist(lines, inBlock);
|
|
553
|
+
const { cr } = splitCarriageReturn(lines[0] ?? "");
|
|
554
|
+
const line = `- [BLOCKED] ${entry.task.trim()}${BLOCKER_GAP}{${entry.declaration.trim()}}` + `${BLOCKER_GAP}${blockerComment(entry.blocker)}${cr}`;
|
|
555
|
+
const written = [...lines.slice(0, at), line, ...lines.slice(at)];
|
|
556
|
+
fs.writeFileSync(trackerPath, written.join(`
|
|
557
|
+
`), "utf8");
|
|
558
|
+
return at;
|
|
559
|
+
}
|
|
522
560
|
function trackerPathFor(planPath) {
|
|
523
561
|
return planPath.replace(/PLAN(-[^/]*)?\.md$/, (_m, stub) => `PLAN_TRACKER${stub ?? ""}.md`);
|
|
524
562
|
}
|
|
@@ -871,4 +909,4 @@ function renderInjection(request) {
|
|
|
871
909
|
}
|
|
872
910
|
return { requested: mode, mode, text: RENDERERS[mode](model, location.task), fallback: null };
|
|
873
911
|
}
|
|
874
|
-
export { escapeBlockerText, splitBlockerComment, findNextTask, updateTrackerLine, writeTrackerBlocker, trackerPathFor, PLAN_BLOCK_KINDS, PLAN_HEADER_FIELDS, PLAN_RELEASE_LEVELS, parsePlan, parsePrerequisites, planPrerequisites, malformedPrerequisiteLines, mergePlanPrerequisites, prerequisitesPathForPlan, loadPlanPrerequisites, PROBE_TIMEOUT_MS, runShellProbe, runPreflight, renderInjection };
|
|
912
|
+
export { escapeBlockerText, splitBlockerComment, findNextTask, updateTrackerLine, writeTrackerBlocker, insertTrackerTask, trackerPathFor, PLAN_BLOCK_KINDS, PLAN_HEADER_FIELDS, PLAN_RELEASE_LEVELS, parsePlan, parsePrerequisites, planPrerequisites, malformedPrerequisiteLines, mergePlanPrerequisites, prerequisitesPathForPlan, loadPlanPrerequisites, PROBE_TIMEOUT_MS, runShellProbe, runPreflight, renderInjection };
|