agentic-forge 0.0.0 → 0.7.1

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.
Files changed (212) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +64 -24
  3. package/{src/claude → dist/authoring}/.claude/skills/workflow-builder/SKILL.md +2 -2
  4. package/{src/claude → dist/authoring}/.claude/skills/workflow-builder/references/REFERENCE.md +9 -3
  5. package/{src/claude → dist/authoring}/.claude/skills/workflow-builder/references/workflow-example.yaml +15 -8
  6. package/dist/checkpoints/manager.d.ts +5 -0
  7. package/dist/checkpoints/manager.js +87 -0
  8. package/dist/checkpoints/manager.js.map +1 -0
  9. package/{src → dist}/claude/.claude/skills/analyze/SKILL.md +1 -1
  10. package/{src → dist}/claude/.claude/skills/create-checkpoint/SKILL.md +1 -1
  11. package/{src → dist}/claude/.claude/skills/create-log/SKILL.md +1 -1
  12. package/{src → dist}/claude/.claude/skills/fix-analyze/SKILL.md +1 -1
  13. package/{src → dist}/claude/.claude/skills/git-branch/SKILL.md +1 -1
  14. package/{src → dist}/claude/.claude/skills/git-commit/SKILL.md +1 -1
  15. package/{src → dist}/claude/.claude/skills/git-pr/SKILL.md +1 -1
  16. package/{src → dist}/claude/.claude/skills/sdlc-plan/SKILL.md +1 -1
  17. package/{src → dist}/claude/.claude/skills/sdlc-review/SKILL.md +1 -1
  18. package/dist/cli.d.ts +3 -0
  19. package/dist/cli.js +173 -0
  20. package/dist/cli.js.map +1 -0
  21. package/dist/commands/authoring-dir.d.ts +2 -0
  22. package/dist/commands/authoring-dir.js +9 -0
  23. package/dist/commands/authoring-dir.js.map +1 -0
  24. package/dist/commands/config-cmd.d.ts +2 -0
  25. package/dist/commands/config-cmd.js +30 -0
  26. package/dist/commands/config-cmd.js.map +1 -0
  27. package/{src/commands/index.ts → dist/commands/index.d.ts} +2 -10
  28. package/dist/commands/index.js +14 -0
  29. package/dist/commands/index.js.map +1 -0
  30. package/dist/commands/init.d.ts +6 -0
  31. package/dist/commands/init.js +83 -0
  32. package/dist/commands/init.js.map +1 -0
  33. package/dist/commands/release-notes.d.ts +5 -0
  34. package/dist/commands/release-notes.js +68 -0
  35. package/dist/commands/release-notes.js.map +1 -0
  36. package/dist/commands/resume.d.ts +5 -0
  37. package/dist/commands/resume.js +79 -0
  38. package/dist/commands/resume.js.map +1 -0
  39. package/dist/commands/run.d.ts +27 -0
  40. package/dist/commands/run.js +243 -0
  41. package/dist/commands/run.js.map +1 -0
  42. package/dist/commands/shortcuts.d.ts +2 -0
  43. package/dist/commands/shortcuts.js +11 -0
  44. package/dist/commands/shortcuts.js.map +1 -0
  45. package/dist/commands/skills-dir.d.ts +2 -0
  46. package/dist/commands/skills-dir.js +9 -0
  47. package/dist/commands/skills-dir.js.map +1 -0
  48. package/dist/commands/status.d.ts +4 -0
  49. package/dist/commands/status.js +99 -0
  50. package/dist/commands/status.js.map +1 -0
  51. package/dist/commands/update.d.ts +4 -0
  52. package/dist/commands/update.js +65 -0
  53. package/dist/commands/update.js.map +1 -0
  54. package/dist/commands/version.d.ts +3 -0
  55. package/dist/commands/version.js +26 -0
  56. package/dist/commands/version.js.map +1 -0
  57. package/dist/commands/workflows.d.ts +4 -0
  58. package/dist/commands/workflows.js +111 -0
  59. package/dist/commands/workflows.js.map +1 -0
  60. package/dist/config.d.ts +8 -0
  61. package/dist/config.js +110 -0
  62. package/dist/config.js.map +1 -0
  63. package/dist/console.d.ts +103 -0
  64. package/dist/console.js +670 -0
  65. package/dist/console.js.map +1 -0
  66. package/dist/executor.d.ts +27 -0
  67. package/dist/executor.js +236 -0
  68. package/dist/executor.js.map +1 -0
  69. package/dist/git/worktree.d.ts +23 -0
  70. package/dist/git/worktree.js +170 -0
  71. package/dist/git/worktree.js.map +1 -0
  72. package/dist/logging/logger.d.ts +27 -0
  73. package/dist/logging/logger.js +69 -0
  74. package/dist/logging/logger.js.map +1 -0
  75. package/dist/orchestrator.d.ts +44 -0
  76. package/dist/orchestrator.js +587 -0
  77. package/dist/orchestrator.js.map +1 -0
  78. package/dist/parser.d.ts +17 -0
  79. package/dist/parser.js +184 -0
  80. package/dist/parser.js.map +1 -0
  81. package/dist/progress.d.ts +29 -0
  82. package/dist/progress.js +275 -0
  83. package/dist/progress.js.map +1 -0
  84. package/dist/ralph-loop.d.ts +26 -0
  85. package/dist/ralph-loop.js +194 -0
  86. package/dist/ralph-loop.js.map +1 -0
  87. package/dist/renderer.d.ts +15 -0
  88. package/dist/renderer.js +123 -0
  89. package/dist/renderer.js.map +1 -0
  90. package/dist/runner.d.ts +84 -0
  91. package/dist/runner.js +529 -0
  92. package/dist/runner.js.map +1 -0
  93. package/dist/signal-manager.d.ts +16 -0
  94. package/dist/signal-manager.js +50 -0
  95. package/dist/signal-manager.js.map +1 -0
  96. package/dist/steps/base.d.ts +28 -0
  97. package/dist/steps/base.js +23 -0
  98. package/dist/steps/base.js.map +1 -0
  99. package/dist/steps/conditional-step.d.ts +12 -0
  100. package/dist/steps/conditional-step.js +106 -0
  101. package/dist/steps/conditional-step.js.map +1 -0
  102. package/{src/steps/index.ts → dist/steps/index.d.ts} +1 -9
  103. package/dist/steps/index.js +8 -0
  104. package/dist/steps/index.js.map +1 -0
  105. package/dist/steps/parallel-step.d.ts +11 -0
  106. package/dist/steps/parallel-step.js +166 -0
  107. package/dist/steps/parallel-step.js.map +1 -0
  108. package/dist/steps/prompt-step.d.ts +8 -0
  109. package/dist/steps/prompt-step.js +94 -0
  110. package/dist/steps/prompt-step.js.map +1 -0
  111. package/dist/steps/ralph-loop-step.d.ts +8 -0
  112. package/dist/steps/ralph-loop-step.js +132 -0
  113. package/dist/steps/ralph-loop-step.js.map +1 -0
  114. package/dist/steps/serial-step.d.ts +10 -0
  115. package/dist/steps/serial-step.js +57 -0
  116. package/dist/steps/serial-step.js.map +1 -0
  117. package/dist/types.d.ts +118 -0
  118. package/dist/types.js +10 -0
  119. package/dist/types.js.map +1 -0
  120. package/package.json +59 -2
  121. package/.gitattributes +0 -24
  122. package/.github/workflows/ci.yml +0 -70
  123. package/.markdownlint-cli2.jsonc +0 -16
  124. package/.prettierignore +0 -3
  125. package/.prettierrc +0 -6
  126. package/.vscode/agentic-forge.code-workspace +0 -26
  127. package/CHANGELOG.md +0 -100
  128. package/CLAUDE.md +0 -158
  129. package/CONTRIBUTING.md +0 -152
  130. package/biome.json +0 -21
  131. package/scripts/copy-assets.js +0 -21
  132. package/src/checkpoints/manager.ts +0 -119
  133. package/src/cli.ts +0 -182
  134. package/src/commands/config-cmd.ts +0 -28
  135. package/src/commands/init.ts +0 -96
  136. package/src/commands/release-notes.ts +0 -85
  137. package/src/commands/resume.ts +0 -103
  138. package/src/commands/run.ts +0 -234
  139. package/src/commands/shortcuts.ts +0 -11
  140. package/src/commands/skills-dir.ts +0 -11
  141. package/src/commands/status.ts +0 -112
  142. package/src/commands/update.ts +0 -64
  143. package/src/commands/version.ts +0 -27
  144. package/src/commands/workflows.ts +0 -129
  145. package/src/config.ts +0 -129
  146. package/src/console.ts +0 -790
  147. package/src/executor.ts +0 -354
  148. package/src/git/worktree.ts +0 -236
  149. package/src/logging/logger.ts +0 -95
  150. package/src/orchestrator.ts +0 -815
  151. package/src/parser.ts +0 -225
  152. package/src/progress.ts +0 -306
  153. package/src/ralph-loop.ts +0 -260
  154. package/src/renderer.ts +0 -164
  155. package/src/runner.ts +0 -634
  156. package/src/signal-manager.ts +0 -55
  157. package/src/steps/base.ts +0 -71
  158. package/src/steps/conditional-step.ts +0 -144
  159. package/src/steps/parallel-step.ts +0 -213
  160. package/src/steps/prompt-step.ts +0 -121
  161. package/src/steps/ralph-loop-step.ts +0 -186
  162. package/src/steps/serial-step.ts +0 -84
  163. package/src/types.ts +0 -141
  164. package/tests/config.test.ts +0 -219
  165. package/tests/console.test.ts +0 -506
  166. package/tests/executor.test.ts +0 -339
  167. package/tests/init.test.ts +0 -86
  168. package/tests/logger.test.ts +0 -110
  169. package/tests/parser.test.ts +0 -290
  170. package/tests/progress.test.ts +0 -345
  171. package/tests/ralph-loop.test.ts +0 -418
  172. package/tests/renderer.test.ts +0 -350
  173. package/tests/runner.test.ts +0 -497
  174. package/tests/setup.test.ts +0 -7
  175. package/tests/signal-manager.test.ts +0 -26
  176. package/tests/steps.test.ts +0 -412
  177. package/tests/worktree.test.ts +0 -411
  178. package/tsconfig.json +0 -18
  179. package/vitest.config.ts +0 -8
  180. /package/{src → dist}/agents/explorer.md +0 -0
  181. /package/{src → dist}/agents/reviewer.md +0 -0
  182. /package/{src → dist}/claude/.claude/skills/analyze/references/bug.md +0 -0
  183. /package/{src → dist}/claude/.claude/skills/analyze/references/debt.md +0 -0
  184. /package/{src → dist}/claude/.claude/skills/analyze/references/doc.md +0 -0
  185. /package/{src → dist}/claude/.claude/skills/analyze/references/security.md +0 -0
  186. /package/{src → dist}/claude/.claude/skills/analyze/references/style.md +0 -0
  187. /package/{src → dist}/claude/.claude/skills/orchestrate/SKILL.md +0 -0
  188. /package/{src → dist}/claude/.claude/skills/sdlc-plan/references/bug.md +0 -0
  189. /package/{src → dist}/claude/.claude/skills/sdlc-plan/references/chore.md +0 -0
  190. /package/{src → dist}/claude/.claude/skills/sdlc-plan/references/feature.md +0 -0
  191. /package/{src → dist}/prompts/agentic-system.md +0 -0
  192. /package/{src → dist}/templates/analysis/bug.md.j2 +0 -0
  193. /package/{src → dist}/templates/analysis/debt.md.j2 +0 -0
  194. /package/{src → dist}/templates/analysis/doc.md.j2 +0 -0
  195. /package/{src → dist}/templates/analysis/security.md.j2 +0 -0
  196. /package/{src → dist}/templates/analysis/style.md.j2 +0 -0
  197. /package/{src → dist}/templates/analysis-summary.md.j2 +0 -0
  198. /package/{src → dist}/templates/checkpoint.md.j2 +0 -0
  199. /package/{src → dist}/templates/implementation-report.md.j2 +0 -0
  200. /package/{src → dist}/templates/memory.md.j2 +0 -0
  201. /package/{src → dist}/templates/plan-bug.md.j2 +0 -0
  202. /package/{src → dist}/templates/plan-chore.md.j2 +0 -0
  203. /package/{src → dist}/templates/plan-feature.md.j2 +0 -0
  204. /package/{src → dist}/templates/progress.json.j2 +0 -0
  205. /package/{src → dist}/templates/ralph-report.md.j2 +0 -0
  206. /package/{src → dist}/workflows/analyze-codebase-merge.yaml +0 -0
  207. /package/{src → dist}/workflows/analyze-codebase.yaml +0 -0
  208. /package/{src → dist}/workflows/analyze-single.yaml +0 -0
  209. /package/{src → dist}/workflows/demo.yaml +0 -0
  210. /package/{src → dist}/workflows/one-shot.yaml +0 -0
  211. /package/{src → dist}/workflows/plan-build-review.yaml +0 -0
  212. /package/{src → dist}/workflows/ralph-loop.yaml +0 -0
@@ -0,0 +1,11 @@
1
+ /** Shortcut command handlers (input). */
2
+ import { processHumanInput } from "../orchestrator.js";
3
+ export function cmdInput(workflowId, response) {
4
+ if (processHumanInput(workflowId, response)) {
5
+ process.stdout.write(`Input recorded for workflow: ${workflowId}\n`);
6
+ }
7
+ else {
8
+ process.exit(1);
9
+ }
10
+ }
11
+ //# sourceMappingURL=shortcuts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortcuts.js","sourceRoot":"","sources":["../../src/commands/shortcuts.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,UAAU,QAAQ,CAAC,UAAkB,EAAE,QAAgB;IAC5D,IAAI,iBAAiB,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC7C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,UAAU,IAAI,CAAC,CAAC;IACtE,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;AACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Skills-dir command handler. */
2
+ export declare function cmdSkillsDir(): void;
@@ -0,0 +1,9 @@
1
+ /** Skills-dir command handler. */
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
+ export function cmdSkillsDir() {
6
+ const skillsDir = path.resolve(path.join(__dirname, "..", "claude"));
7
+ process.stdout.write(`${skillsDir}\n`);
8
+ }
9
+ //# sourceMappingURL=skills-dir.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-dir.js","sourceRoot":"","sources":["../../src/commands/skills-dir.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAElC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,MAAM,UAAU,YAAY;IAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IACrE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,SAAS,IAAI,CAAC,CAAC;AACxC,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Status, cancel, and list command handlers. */
2
+ export declare function cmdStatus(workflowId: string): void;
3
+ export declare function cmdCancel(workflowId: string): void;
4
+ export declare function cmdList(statusFilter?: string): void;
@@ -0,0 +1,99 @@
1
+ /** Status, cancel, and list command handlers. */
2
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
3
+ import path from "node:path";
4
+ import { WORKFLOW_STATUS, loadProgress, saveProgress } from "../progress.js";
5
+ export function cmdStatus(workflowId) {
6
+ const progress = loadProgress(workflowId);
7
+ if (progress === null) {
8
+ process.stderr.write(`Error: Workflow not found: ${workflowId}\n`);
9
+ process.exit(1);
10
+ }
11
+ process.stdout.write(`Workflow: ${progress.workflowName}\n`);
12
+ process.stdout.write(`ID: ${progress.workflowId}\n`);
13
+ process.stdout.write(`Status: ${progress.status}\n`);
14
+ process.stdout.write(`Started: ${progress.startedAt}\n`);
15
+ if (progress.completedAt) {
16
+ process.stdout.write(`Completed: ${progress.completedAt}\n`);
17
+ }
18
+ if (progress.currentStep) {
19
+ process.stdout.write(`\nCurrent Step: ${progress.currentStep.name}\n`);
20
+ process.stdout.write(` Retry Count: ${progress.currentStep.retryCount}\n`);
21
+ }
22
+ if (progress.completedSteps && progress.completedSteps.length > 0) {
23
+ process.stdout.write("\nCompleted Steps:\n");
24
+ for (const step of progress.completedSteps) {
25
+ const icon = step.status === "completed" ? "+" : "x";
26
+ process.stdout.write(` [${icon}] ${step.name}\n`);
27
+ }
28
+ }
29
+ if (progress.pendingSteps && progress.pendingSteps.length > 0) {
30
+ process.stdout.write("\nPending Steps:\n");
31
+ for (const stepName of progress.pendingSteps) {
32
+ process.stdout.write(` [ ] ${stepName}\n`);
33
+ }
34
+ }
35
+ if (progress.errors && progress.errors.length > 0) {
36
+ process.stdout.write("\nErrors:\n");
37
+ for (const error of progress.errors) {
38
+ const err = error;
39
+ process.stdout.write(` - ${err.step}: ${err.error}\n`);
40
+ }
41
+ }
42
+ }
43
+ export function cmdCancel(workflowId) {
44
+ const progress = loadProgress(workflowId);
45
+ if (progress === null) {
46
+ process.stderr.write(`Error: Workflow not found: ${workflowId}\n`);
47
+ process.exit(1);
48
+ }
49
+ if (progress.status !== WORKFLOW_STATUS.RUNNING && progress.status !== WORKFLOW_STATUS.PAUSED) {
50
+ process.stderr.write(`Error: Cannot cancel workflow in '${progress.status}' status\n`);
51
+ process.exit(1);
52
+ }
53
+ progress.status = WORKFLOW_STATUS.CANCELED;
54
+ progress.completedAt = new Date().toISOString();
55
+ saveProgress(progress);
56
+ process.stdout.write(`Workflow canceled: ${workflowId}\n`);
57
+ }
58
+ export function cmdList(statusFilter) {
59
+ const outputsDir = path.join(process.cwd(), "agentic", "outputs");
60
+ if (!existsSync(outputsDir)) {
61
+ process.stdout.write("No workflows found.\n");
62
+ return;
63
+ }
64
+ const workflows = [];
65
+ const entries = readdirSync(outputsDir, { withFileTypes: true });
66
+ for (const entry of entries) {
67
+ if (entry.isDirectory()) {
68
+ const progressFile = path.join(outputsDir, entry.name, "progress.json");
69
+ if (existsSync(progressFile)) {
70
+ try {
71
+ const data = JSON.parse(readFileSync(progressFile, "utf-8"));
72
+ if (statusFilter == null || data.status === statusFilter) {
73
+ workflows.push(data);
74
+ }
75
+ }
76
+ catch {
77
+ // Skip corrupted progress files
78
+ }
79
+ }
80
+ }
81
+ }
82
+ if (workflows.length === 0) {
83
+ const suffix = statusFilter ? ` (status=${statusFilter})` : "";
84
+ process.stdout.write(`No workflows found.${suffix}\n`);
85
+ return;
86
+ }
87
+ process.stdout.write(`${"ID".padEnd(12)} ${"Name".padEnd(25)} ${"Status".padEnd(12)} ${"Started".padEnd(20)}\n`);
88
+ process.stdout.write(`${"-".repeat(70)}\n`);
89
+ for (const wf of workflows) {
90
+ const id = String(wf.workflow_id ?? "").padEnd(12);
91
+ const name = String(wf.workflow_name ?? "")
92
+ .slice(0, 25)
93
+ .padEnd(25);
94
+ const status = String(wf.status ?? "").padEnd(12);
95
+ const started = wf.started_at ? String(wf.started_at).slice(0, 19).padEnd(20) : "".padEnd(20);
96
+ process.stdout.write(`${id} ${name} ${status} ${started}\n`);
97
+ }
98
+ }
99
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE7E,MAAM,UAAU,SAAS,CAAC,UAAkB;IAC3C,MAAM,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IAC1C,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,CAAC,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AAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC9F,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,IAAI,IAAI,MAAM,IAAI,OAAO,IAAI,CAAC,CAAC;IAC9D,CAAC;AACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Update command handler. */
2
+ export declare function cmdUpdate(options: {
3
+ check?: boolean;
4
+ }): void;
@@ -0,0 +1,65 @@
1
+ /** Update command handler. */
2
+ import { execFileSync } from "node:child_process";
3
+ import { getVersion } from "./version.js";
4
+ function commandExists(cmd) {
5
+ try {
6
+ execFileSync(process.platform === "win32" ? "where" : "which", [cmd], {
7
+ stdio: "ignore",
8
+ });
9
+ return true;
10
+ }
11
+ catch {
12
+ return false;
13
+ }
14
+ }
15
+ export function cmdUpdate(options) {
16
+ const currentVersion = getVersion();
17
+ if (currentVersion === "unknown") {
18
+ process.stderr.write("Error: agentic-forge is not installed\n");
19
+ process.exit(1);
20
+ }
21
+ if (!commandExists("npm")) {
22
+ process.stderr.write("Error: npm is required for updating agentic-forge\n");
23
+ process.exit(1);
24
+ }
25
+ if (options.check) {
26
+ process.stdout.write(`Current version: ${currentVersion}\n`);
27
+ try {
28
+ const result = execFileSync("npm", ["view", "agentic-forge", "version"], {
29
+ encoding: "utf-8",
30
+ stdio: ["pipe", "pipe", "pipe"],
31
+ }).trim();
32
+ if (result && result !== currentVersion) {
33
+ process.stdout.write(`Latest version: ${result}\n`);
34
+ }
35
+ else {
36
+ process.stdout.write("Already at the latest version.\n");
37
+ }
38
+ }
39
+ catch {
40
+ process.stdout.write("Could not check for updates.\n");
41
+ }
42
+ }
43
+ else {
44
+ process.stdout.write(`Current version: ${currentVersion}\n`);
45
+ process.stdout.write("Upgrading...\n");
46
+ try {
47
+ execFileSync("npm", ["install", "-g", "agentic-forge"], {
48
+ encoding: "utf-8",
49
+ stdio: ["pipe", "pipe", "pipe"],
50
+ });
51
+ const newVersion = getVersion();
52
+ if (newVersion !== currentVersion) {
53
+ process.stdout.write(`Successfully updated to version ${newVersion}\n`);
54
+ }
55
+ else {
56
+ process.stdout.write("Already at the latest version.\n");
57
+ }
58
+ }
59
+ catch {
60
+ process.stderr.write("Update failed.\n");
61
+ process.exit(1);
62
+ }
63
+ }
64
+ }
65
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,SAAS,aAAa,CAAC,GAAW;IACjC,IAAI,CAAC;QACJ,YAAY,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE;YACrE,KAAK,EAAE,QAAQ;SACf,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAA4B;IACrD,MAAM,cAAc,GAAG,UAAU,EAAE,CAAC;IACpC,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;QAC5E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,OAAO,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AAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;YAC1D,CAAC;QACF,CAAC;QAAC,MAAM,CAAC;YACR,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;YACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Version command handler. */
2
+ export declare function cmdVersion(): void;
3
+ export declare function getVersion(): string;
@@ -0,0 +1,26 @@
1
+ /** Version command handler. */
2
+ import { readFileSync } from "node:fs";
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
6
+ export function cmdVersion() {
7
+ try {
8
+ const packageJsonPath = path.join(__dirname, "..", "..", "package.json");
9
+ const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
10
+ process.stdout.write(`agentic-forge ${pkg.version}\n`);
11
+ }
12
+ catch {
13
+ process.stdout.write("agentic-forge version unknown (package not installed)\n");
14
+ }
15
+ }
16
+ export function getVersion() {
17
+ try {
18
+ const packageJsonPath = path.join(__dirname, "..", "..", "package.json");
19
+ const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
20
+ return pkg.version;
21
+ }
22
+ catch {
23
+ return "unknown";
24
+ }
25
+ }
26
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/commands/version.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,MAAM,UAAU,UAAU;IACzB,IAAI,CAAC;QACJ,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAwB,CAAC;QACtF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;IACjF,CAAC;AACF,CAAC;AAED,MAAM,UAAU,UAAU;IACzB,IAAI,CAAC;QACJ,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAwB,CAAC;QACtF,OAAO,GAAG,CAAC,OAAO,CAAC;IACpB,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Workflows command handler. */
2
+ export declare function cmdWorkflows(options: {
3
+ verbose?: boolean;
4
+ }): void;
@@ -0,0 +1,111 @@
1
+ /** Workflows command handler. */
2
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
3
+ import path from "node:path";
4
+ import yaml from "js-yaml";
5
+ import { getBundledWorkflowsDir, getProjectWorkflowsDir, getUserWorkflowsDir } from "./run.js";
6
+ function getWorkflowMetadata(filePath) {
7
+ try {
8
+ const content = yaml.load(readFileSync(filePath, "utf-8"));
9
+ if (!content || typeof content !== "object") {
10
+ return { name: path.basename(filePath, ".yaml"), description: "", variables: [] };
11
+ }
12
+ return {
13
+ name: content.name ?? path.basename(filePath, ".yaml"),
14
+ description: content.description ?? "",
15
+ variables: content.variables ?? [],
16
+ };
17
+ }
18
+ catch {
19
+ return { name: path.basename(filePath, ".yaml"), description: "", variables: [] };
20
+ }
21
+ }
22
+ function listAllWorkflows() {
23
+ const workflows = [];
24
+ const searchLocations = [
25
+ [getProjectWorkflowsDir(), "project"],
26
+ [getUserWorkflowsDir(), "user"],
27
+ [getBundledWorkflowsDir(), "bundled"],
28
+ ];
29
+ for (const [directory, locationType] of searchLocations) {
30
+ if (existsSync(directory)) {
31
+ const files = readdirSync(directory)
32
+ .filter((f) => f.endsWith(".yaml"))
33
+ .sort();
34
+ for (const file of files) {
35
+ const fullPath = path.join(directory, file);
36
+ const metadata = getWorkflowMetadata(fullPath);
37
+ workflows.push([path.basename(file, ".yaml"), fullPath, locationType, metadata]);
38
+ }
39
+ }
40
+ }
41
+ return workflows;
42
+ }
43
+ export function cmdWorkflows(options) {
44
+ const workflows = listAllWorkflows();
45
+ if (workflows.length === 0) {
46
+ process.stdout.write("No workflows found.\n");
47
+ process.stdout.write("\nSearched locations:\n");
48
+ process.stdout.write(` - Project: ${getProjectWorkflowsDir()}\n`);
49
+ process.stdout.write(` - User: ${getUserWorkflowsDir()}\n`);
50
+ process.stdout.write(` - Bundled: ${getBundledWorkflowsDir()}\n`);
51
+ process.stdout.write("\nUse 'agentic-forge init' to copy bundled workflows locally.\n");
52
+ return;
53
+ }
54
+ const verbose = options.verbose ?? false;
55
+ // Group by location
56
+ const byLocation = {};
57
+ for (const [name, wfPath, location, metadata] of workflows) {
58
+ if (!byLocation[location]) {
59
+ byLocation[location] = [];
60
+ }
61
+ byLocation[location].push([name, wfPath, metadata]);
62
+ }
63
+ process.stdout.write("Available Workflows\n");
64
+ process.stdout.write(`${"=".repeat(50)}\n\n`);
65
+ const locationOrder = ["project", "user", "bundled"];
66
+ const locationLabels = {
67
+ project: "Project",
68
+ user: "User",
69
+ bundled: "Bundled",
70
+ };
71
+ for (const location of locationOrder) {
72
+ if (!byLocation[location]) {
73
+ continue;
74
+ }
75
+ process.stdout.write(`${locationLabels[location]}:\n`);
76
+ for (const [name, , metadata] of byLocation[location]) {
77
+ let desc = metadata.description;
78
+ if (desc) {
79
+ if (desc.length > 60 && !verbose) {
80
+ desc = `${desc.slice(0, 57)}...`;
81
+ }
82
+ process.stdout.write(` ${name.padEnd(25)} ${desc}\n`);
83
+ }
84
+ else {
85
+ process.stdout.write(` ${name}\n`);
86
+ }
87
+ if (verbose && metadata.variables.length > 0) {
88
+ process.stdout.write(" Variables:\n");
89
+ for (const v of metadata.variables) {
90
+ const req = v.required ? "required" : "optional";
91
+ const def = v.default !== undefined ? `, default: ${v.default}` : "";
92
+ const typ = v.type ? ` (${v.type})` : "";
93
+ process.stdout.write(` ${v.name}${typ} [${req}${def}]\n`);
94
+ if (v.description) {
95
+ process.stdout.write(` ${v.description}\n`);
96
+ }
97
+ }
98
+ }
99
+ }
100
+ process.stdout.write("\n");
101
+ }
102
+ process.stdout.write(`Total: ${workflows.length} workflow(s)\n\n`);
103
+ process.stdout.write("Usage:\n");
104
+ process.stdout.write(" agentic-forge run <workflow> key=value [key=value ...]\n");
105
+ process.stdout.write(" agentic-forge run <workflow> --var key=value\n\n");
106
+ process.stdout.write("Examples:\n");
107
+ process.stdout.write(' agentic-forge run one-shot task="Add login button"\n');
108
+ process.stdout.write(" agentic-forge run analyze-single analysis_type=bug\n");
109
+ process.stdout.write(' agentic-forge run plan-build-review task="Refactor auth"\n');
110
+ }
111
+ //# sourceMappingURL=workflows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/commands/workflows.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,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,CAAC,CAAC;IACnE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACjC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;IACnF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAC3E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC/E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC/E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;AACtF,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** Configuration management for agentic-forge. */
2
+ export declare function getConfigPath(repoRoot?: string): string;
3
+ export declare function getDefaultConfig(): Record<string, unknown>;
4
+ export declare function loadConfig(repoRoot?: string): Record<string, unknown>;
5
+ export declare function saveConfig(config: Record<string, unknown>, repoRoot?: string): void;
6
+ export declare function getConfigValue(key: string, repoRoot?: string): unknown;
7
+ export declare function setConfigValue(key: string, value: string, repoRoot?: string): void;
8
+ export declare function deepMerge(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown>;
package/dist/config.js ADDED
@@ -0,0 +1,110 @@
1
+ /** Configuration management for agentic-forge. */
2
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
+ import path from "node:path";
4
+ const DEFAULT_CONFIG = {
5
+ outputDirectory: "agentic",
6
+ logging: {
7
+ enabled: true,
8
+ level: "Error",
9
+ },
10
+ git: {
11
+ mainBranch: "main",
12
+ autoCommit: true,
13
+ autoPr: true,
14
+ },
15
+ defaults: {
16
+ model: "sonnet",
17
+ maxRetry: 3,
18
+ timeoutMinutes: 60,
19
+ trackProgress: true,
20
+ terminalOutput: "base",
21
+ },
22
+ execution: {
23
+ maxWorkers: 4,
24
+ pollingIntervalSeconds: 5,
25
+ },
26
+ };
27
+ export function getConfigPath(repoRoot) {
28
+ const root = repoRoot ?? process.cwd();
29
+ return path.join(root, "agentic", "config.json");
30
+ }
31
+ export function getDefaultConfig() {
32
+ return deepCopy(DEFAULT_CONFIG);
33
+ }
34
+ export function loadConfig(repoRoot) {
35
+ const configPath = getConfigPath(repoRoot);
36
+ if (existsSync(configPath)) {
37
+ const content = readFileSync(configPath, "utf-8");
38
+ const userConfig = JSON.parse(content);
39
+ return deepMerge(getDefaultConfig(), userConfig);
40
+ }
41
+ return getDefaultConfig();
42
+ }
43
+ export function saveConfig(config, repoRoot) {
44
+ const configPath = getConfigPath(repoRoot);
45
+ const dir = path.dirname(configPath);
46
+ mkdirSync(dir, { recursive: true });
47
+ writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
48
+ }
49
+ export function getConfigValue(key, repoRoot) {
50
+ const config = loadConfig(repoRoot);
51
+ const parts = key.split(".");
52
+ let value = config;
53
+ for (const part of parts) {
54
+ if (value !== null &&
55
+ typeof value === "object" &&
56
+ !Array.isArray(value) &&
57
+ part in value) {
58
+ value = value[part];
59
+ }
60
+ else {
61
+ return null;
62
+ }
63
+ }
64
+ return value;
65
+ }
66
+ export function setConfigValue(key, value, repoRoot) {
67
+ const config = loadConfig(repoRoot);
68
+ const parts = key.split(".");
69
+ let target = config;
70
+ for (const part of parts.slice(0, -1)) {
71
+ if (!(part in target)) {
72
+ target[part] = {};
73
+ }
74
+ target = target[part];
75
+ }
76
+ let parsedValue = value;
77
+ if (value.toLowerCase() === "true") {
78
+ parsedValue = true;
79
+ }
80
+ else if (value.toLowerCase() === "false") {
81
+ parsedValue = false;
82
+ }
83
+ else if (/^\d+$/.test(value)) {
84
+ parsedValue = Number.parseInt(value, 10);
85
+ }
86
+ target[parts[parts.length - 1]] = parsedValue;
87
+ saveConfig(config, repoRoot);
88
+ }
89
+ export function deepMerge(base, override) {
90
+ const result = { ...base };
91
+ for (const key of Object.keys(override)) {
92
+ if (key in result &&
93
+ typeof result[key] === "object" &&
94
+ result[key] !== null &&
95
+ !Array.isArray(result[key]) &&
96
+ typeof override[key] === "object" &&
97
+ override[key] !== null &&
98
+ !Array.isArray(override[key])) {
99
+ result[key] = deepMerge(result[key], override[key]);
100
+ }
101
+ else {
102
+ result[key] = override[key];
103
+ }
104
+ }
105
+ return result;
106
+ }
107
+ function deepCopy(obj) {
108
+ return JSON.parse(JSON.stringify(obj));
109
+ }
110
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAElD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,cAAc,GAA4B;IAC/C,eAAe,EAAE,SAAS;IAC1B,OAAO,EAAE;QACR,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,OAAO;KACd;IACD,GAAG,EAAE;QACJ,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;KACZ;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,CAAC;QACX,cAAc,EAAE,EAAE;QAClB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,MAAM;KACtB;IACD,SAAS,EAAE;QACV,UAAU,EAAE,CAAC;QACb,sBAAsB,EAAE,CAAC;KACzB;CACD,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,QAAiB;IAC9C,MAAM,IAAI,GAAG,QAAQ,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACvC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC/B,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AACjC,CAAC;A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AC3B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,IACC,GAAG,IAAI,MAAM;YACb,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,QAAQ;YAC/B,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI;YACpB,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC3B,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,QAAQ;YACjC,QAAQ,CAAC,GAAG,CAAC,KAAK,IAAI;YACtB,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAC5B,CAAC;YACF,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CACtB,MAAM,CAAC,GAAG,CAA4B,EACtC,QAAQ,CAAC,GAAG,CAA4B,CACxC,CAAC;QACH,CAAC;aAAM,CAAC;YACP,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,GAA4B;IAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAA4B,CAAC;AACnE,CAAC"}
@@ -0,0 +1,103 @@
1
+ /** Console output utilities for workflow execution. */
2
+ import type { Writable } from "node:stream";
3
+ export declare const OutputLevel: {
4
+ readonly BASE: "base";
5
+ readonly ALL: "all";
6
+ };
7
+ export type OutputLevel = (typeof OutputLevel)[keyof typeof OutputLevel];
8
+ export declare const Color: {
9
+ readonly RESET: "\u001B[0m";
10
+ readonly BOLD: "\u001B[1m";
11
+ readonly DIM: "\u001B[2m";
12
+ readonly RED: "\u001B[31m";
13
+ readonly GREEN: "\u001B[32m";
14
+ readonly YELLOW: "\u001B[33m";
15
+ readonly BLUE: "\u001B[34m";
16
+ readonly MAGENTA: "\u001B[35m";
17
+ readonly CYAN: "\u001B[36m";
18
+ readonly WHITE: "\u001B[37m";
19
+ readonly BRIGHT_RED: "\u001B[91m";
20
+ readonly BRIGHT_GREEN: "\u001B[92m";
21
+ readonly BRIGHT_YELLOW: "\u001B[93m";
22
+ readonly BRIGHT_BLUE: "\u001B[94m";
23
+ readonly BRIGHT_CYAN: "\u001B[96m";
24
+ };
25
+ export type Color = (typeof Color)[keyof typeof Color];
26
+ export declare function supportsColor(): boolean;
27
+ export declare function colorize(text: string, ...colors: Color[]): string;
28
+ /** Callback to format a model name for display, avoiding circular imports with runner.ts. */
29
+ type ModelFormatter = (model: string) => string | null;
30
+ export declare class ParallelOutputHandler {
31
+ stream: Writable;
32
+ level: OutputLevel;
33
+ private printFn;
34
+ private branches;
35
+ private branchIndex;
36
+ private branchDone;
37
+ private deferredMessages;
38
+ private linesPerBranch;
39
+ private active;
40
+ private currentBranch;
41
+ private accumulatedText;
42
+ private accumulatedRole;
43
+ private accumulatedModel;
44
+ private baseAccumulatedText;
45
+ private messageQueue;
46
+ constructor(stream?: Writable, level?: OutputLevel, printFn?: (message: string) => void);
47
+ private print;
48
+ get isActive(): boolean;
49
+ get hasBranches(): boolean;
50
+ registerBranches(branches: string[]): void;
51
+ updateBranchLine(branch: string, text: string, maxWidth?: number): void;
52
+ markBranchDone(branch: string, success?: boolean): void;
53
+ private clearDisplay;
54
+ enter(): void;
55
+ exit(): void;
56
+ deferMessage(message: string): void;
57
+ setBranch(branchName: string): void;
58
+ getCurrentBranch(): string | null;
59
+ enqueueCurrentMessage(): void;
60
+ private printBranchMessage;
61
+ accumulateText(text: string, role: string, model?: string | null): void;
62
+ accumulateBaseText(text: string): string;
63
+ }
64
+ export declare class ConsoleOutput {
65
+ level: OutputLevel;
66
+ stream: Writable;
67
+ _baseAccumulatedText: string;
68
+ private baseLastDisplayLines;
69
+ _parallelHandler: ParallelOutputHandler;
70
+ private formatModelName;
71
+ constructor(level?: OutputLevel, stream?: Writable);
72
+ /** Set model name formatter to avoid circular imports with runner. */
73
+ setModelFormatter(fn: ModelFormatter): void;
74
+ private printLine;
75
+ private printInplace;
76
+ private clearInplace;
77
+ registerParallelBranches(branches: string[]): void;
78
+ enterParallelMode(): void;
79
+ exitParallelMode(): void;
80
+ setParallelBranch(branchName: string): void;
81
+ markParallelBranchDone(branch: string, success?: boolean): void;
82
+ private isParallelMode;
83
+ private shouldDeferMessage;
84
+ private deferMessage;
85
+ workflowStart(workflowName: string, workflowId: string): void;
86
+ workflowComplete(workflowName: string, status: string): void;
87
+ stepStart(stepName: string, stepType?: string | null, model?: string | null): void;
88
+ stepComplete(stepName: string, summary?: string | null): void;
89
+ stepFailed(stepName: string, error?: string | null): void;
90
+ stepRetry(stepName: string, attempt: number, maxAttempts: number, error?: string | null): void;
91
+ ralphIterationStart(stepName: string, iteration: number, maxIterations: number): void;
92
+ ralphIteration(_stepName: string, _iteration: number, _maxIterations: number, summary?: string | null): void;
93
+ ralphComplete(stepName: string, iteration: number, maxIterations: number): void;
94
+ ralphMaxIterations(stepName: string, maxIterations: number): void;
95
+ info(message: string): void;
96
+ warning(message: string): void;
97
+ error(message: string): void;
98
+ streamText(text: string, role?: string, model?: string | null): void;
99
+ streamComplete(): void;
100
+ }
101
+ export declare function extractJson(output: string): Record<string, unknown> | null;
102
+ export declare function extractSummary(output: string, maxLines?: number, maxChars?: number): string;
103
+ export {};