bemadralphy 0.2.0 → 0.3.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 CHANGED
@@ -138,6 +138,7 @@ flowchart TD
138
138
  - `qwen`: `ralphy --qwen --max-iterations 1 <task>`
139
139
  - `copilot`: `ralphy --copilot --max-iterations 1 <task>`
140
140
  - `gemini`: `gemini <task>`
141
+ - `ollama`: `ollama run <model> <task>` (default model via `OLLAMA_MODEL` or `llama3.2`)
141
142
  - `ralphy`: `ralphy --max-iterations 1 <task>`
142
143
 
143
144
  ---
@@ -172,11 +173,24 @@ npx bemadralphy run --mode auto --engine claude --max-parallel 5 --budget 50
172
173
  # Run with execution/audience profiles
173
174
  npx bemadralphy run --execution-profile safe --audience-profile product-team
174
175
 
176
+ # Preview pipeline and estimated cost without execution
177
+ npx bemadralphy run --dry-run --output json
178
+
179
+ # Resume a failed/interrupted run
180
+ npx bemadralphy run --resume
181
+
182
+ # Replay a previous run from history
183
+ npx bemadralphy replay <runId> --from-phase execute
184
+
175
185
  # Explore before planning (optional)
176
186
  npx bemadralphy explore "How should I structure authentication?"
177
187
 
178
188
  # Check pipeline status
179
189
  npx bemadralphy status
190
+
191
+ # Show run history (human or JSON)
192
+ npx bemadralphy history
193
+ npx bemadralphy history --output json
180
194
  ```
181
195
 
182
196
  ---
@@ -292,11 +306,11 @@ your-project/
292
306
 
293
307
  ---
294
308
 
295
- ## Configuration (planned)
309
+ ## Configuration
296
310
 
297
311
  ### `.bemadralphy/state.yaml`
298
312
 
299
- Tracks pipeline state for resumability:
313
+ Tracks pipeline state for resumability and recovery:
300
314
 
301
315
  ```yaml
302
316
  phase: execution
@@ -306,8 +320,38 @@ last_gate: architecture
306
320
  tasks_completed: 12
307
321
  tasks_total: 24
308
322
  cost_usd: 3.47
323
+ status: running
324
+ resumeFromPhase: execute
309
325
  ```
310
326
 
327
+ ### Run defaults via config file
328
+
329
+ You can define persistent defaults in either `.bemadralphyrc` (YAML/JSON) or `bemad.config.js`.
330
+
331
+ Example `.bemadralphyrc`:
332
+
333
+ ```yaml
334
+ mode: hybrid
335
+ engine: ollama
336
+ maxParallel: 2
337
+ executionProfile: balanced
338
+ output: text
339
+ plugins:
340
+ - ./bemad.plugins/local-plugin.mjs
341
+ ```
342
+
343
+ Example `bemad.config.js`:
344
+
345
+ ```js
346
+ export default {
347
+ mode: 'hybrid',
348
+ engine: 'ralphy',
349
+ output: 'json',
350
+ };
351
+ ```
352
+
353
+ CLI flags always override config file values.
354
+
311
355
  ### Flags
312
356
 
313
357
  | Flag | Description |
@@ -322,6 +366,11 @@ cost_usd: 3.47
322
366
  | `--brownfield` | Force brownfield mode |
323
367
  | `--swarm native\|process\|off` | Override swarm detection |
324
368
  | `--create-pr` | Create PRs for each task |
369
+ | `--dry-run` | Preflight plan + cost estimate only |
370
+ | `--resume` | Resume from latest checkpoint |
371
+ | `--from-phase <name>` | Start at a specific phase |
372
+ | `--output text\|json` | Human-readable or structured output |
373
+ | `--plugin <paths...>` | Load custom plugin modules |
325
374
 
326
375
  ### Execution profiles
327
376
 
@@ -405,6 +454,7 @@ node dist/cli.js --help
405
454
  - BMAD CLI (`bmad`)
406
455
  - Beads CLI (`bd`)
407
456
  - OpenSpec CLI (`openspec`)
457
+ - Optional local engine: Ollama (`ollama`) when using `--engine ollama`
408
458
 
409
459
  ## Fail-Fast Behavior
410
460
 
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
- import { runExplore, runInit, runPipeline, runStatus } from './orchestrator.js';
3
+ import { runExplore, runHistory, runInit, runPipeline, runReplay, runStatus } from './orchestrator.js';
4
4
  const program = new Command();
5
5
  program
6
6
  .name('bemadralphy')
@@ -15,19 +15,24 @@ program
15
15
  program
16
16
  .command('run')
17
17
  .description('Run the full pipeline')
18
- .option('--mode <mode>', 'Autonomy mode: auto|hybrid|supervised', 'hybrid')
18
+ .option('--mode <mode>', 'Autonomy mode: auto|hybrid|supervised')
19
19
  .option('--engine <name>', 'AI engine to use')
20
20
  .option('--planning-engine <name>', 'Override engine for planning phase only')
21
- .option('--max-parallel <n>', 'Max parallel tasks', (v) => Number(v), 3)
22
- .option('--execution-profile <profile>', 'Execution guardrails profile: safe|balanced|fast', 'balanced')
21
+ .option('--max-parallel <n>', 'Max parallel tasks', (v) => Number(v))
22
+ .option('--execution-profile <profile>', 'Execution guardrails profile: safe|balanced|fast')
23
23
  .option('--audience-profile <profile>', 'Target audience profile: solo-dev|agency-team|product-team|enterprise-team')
24
24
  .option('--budget <usd>', 'Cost cap in USD', (v) => Number(v))
25
- .option('--brownfield', 'Force brownfield mode', false)
25
+ .option('--brownfield', 'Force brownfield mode')
26
26
  .option('--swarm <mode>', 'Override swarm detection: native|process|off')
27
- .option('--create-pr', 'Create PRs per task', false)
28
- .option('--dry-run', 'Plan only; do not execute', false)
29
- .action(async (options) => {
30
- await runPipeline(options);
27
+ .option('--create-pr', 'Create PRs per task')
28
+ .option('--dry-run', 'Preview plan and estimated cost without execution')
29
+ .option('--resume', 'Resume from latest checkpoint')
30
+ .option('--from-phase <phase>', 'Start from a specific phase')
31
+ .option('--output <format>', 'Output format: text|json', 'text')
32
+ .option('--plugin <paths...>', 'Load plugin module(s) from path')
33
+ .action(async (options, command) => {
34
+ const resolved = resolveRunOptions(options, command);
35
+ await runPipeline(resolved);
31
36
  });
32
37
  program
33
38
  .command('explore <query>')
@@ -38,8 +43,53 @@ program
38
43
  program
39
44
  .command('status')
40
45
  .description('Show pipeline status')
41
- .action(async () => {
42
- await runStatus();
46
+ .option('--output <format>', 'Output format: text|json', 'text')
47
+ .action(async (options) => {
48
+ await runStatus(options.output);
49
+ });
50
+ program
51
+ .command('history')
52
+ .description('Show previous pipeline runs')
53
+ .option('--output <format>', 'Output format: text|json', 'text')
54
+ .action(async (options) => {
55
+ await runHistory(options.output);
56
+ });
57
+ program
58
+ .command('replay <runId>')
59
+ .description('Replay a previous run from history')
60
+ .option('--from-phase <phase>', 'Replay from a specific phase')
61
+ .option('--output <format>', 'Output format: text|json', 'text')
62
+ .action(async (runId, options) => {
63
+ await runReplay(runId, {
64
+ fromPhase: options.fromPhase,
65
+ output: options.output,
66
+ });
43
67
  });
44
68
  program.parse();
69
+ function resolveRunOptions(options, command) {
70
+ return {
71
+ mode: maybeOption(command, 'mode', options.mode),
72
+ engine: maybeOption(command, 'engine', options.engine),
73
+ planningEngine: maybeOption(command, 'planningEngine', options.planningEngine),
74
+ maxParallel: maybeOption(command, 'maxParallel', options.maxParallel),
75
+ executionProfile: maybeOption(command, 'executionProfile', options.executionProfile),
76
+ audienceProfile: maybeOption(command, 'audienceProfile', options.audienceProfile),
77
+ budget: maybeOption(command, 'budget', options.budget),
78
+ brownfield: maybeOption(command, 'brownfield', options.brownfield),
79
+ swarm: maybeOption(command, 'swarm', options.swarm),
80
+ createPr: maybeOption(command, 'createPr', options.createPr),
81
+ dryRun: maybeOption(command, 'dryRun', options.dryRun),
82
+ resume: maybeOption(command, 'resume', options.resume),
83
+ fromPhase: maybeOption(command, 'fromPhase', options.fromPhase),
84
+ output: maybeOption(command, 'output', options.output),
85
+ plugins: maybeOption(command, 'plugin', options.plugin),
86
+ };
87
+ }
88
+ function maybeOption(command, key, value) {
89
+ const source = command.getOptionValueSource(key);
90
+ if (source === 'cli') {
91
+ return value;
92
+ }
93
+ return undefined;
94
+ }
45
95
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEhF,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,aAAa,CAAC;KACnB,WAAW,C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,MAAM,CAAC;QACtD,UAAU,EAAE,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC;QAClE,KAAK,EAAE,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;QACnD,QAAQ,EAAE,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC;QAC5D,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC;QACtD,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC;QACtD,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,SAAS,CAAC;QAC/D,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC;QACtD,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC;KACxD,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,OAAgB,EAAE,GAAW,EAAE,KAAc;IAChE,MAAM,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;IACjD,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { OutputFormat } from './utils/logging.js';
2
+ export type RunConfig = {
3
+ mode?: 'auto' | 'hybrid' | 'supervised';
4
+ engine?: string;
5
+ planningEngine?: string;
6
+ maxParallel?: number;
7
+ executionProfile?: 'safe' | 'balanced' | 'fast';
8
+ audienceProfile?: 'solo-dev' | 'agency-team' | 'product-team' | 'enterprise-team';
9
+ budget?: number;
10
+ brownfield?: boolean;
11
+ swarm?: 'native' | 'process' | 'off';
12
+ createPr?: boolean;
13
+ output?: OutputFormat;
14
+ plugins?: string[];
15
+ };
16
+ export declare function loadRunConfig(projectRoot: string): Promise<RunConfig>;
package/dist/config.js ADDED
@@ -0,0 +1,44 @@
1
+ import { access, readFile } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { pathToFileURL } from 'node:url';
4
+ import { parse } from 'yaml';
5
+ const FILE_CANDIDATES = ['.bemadralphyrc', 'bemad.config.json', 'bemad.config.js', 'bemad.config.mjs'];
6
+ export async function loadRunConfig(projectRoot) {
7
+ for (const candidate of FILE_CANDIDATES) {
8
+ const fullPath = path.join(projectRoot, candidate);
9
+ if (!(await exists(fullPath))) {
10
+ continue;
11
+ }
12
+ if (candidate.endsWith('.js') || candidate.endsWith('.mjs')) {
13
+ return loadJsConfig(fullPath);
14
+ }
15
+ const raw = await readFile(fullPath, 'utf-8');
16
+ return parseTextConfig(raw);
17
+ }
18
+ return {};
19
+ }
20
+ function parseTextConfig(contents) {
21
+ const trimmed = contents.trim();
22
+ if (!trimmed) {
23
+ return {};
24
+ }
25
+ if (trimmed.startsWith('{')) {
26
+ return JSON.parse(trimmed);
27
+ }
28
+ return parse(trimmed) ?? {};
29
+ }
30
+ async function loadJsConfig(fullPath) {
31
+ const loaded = await import(pathToFileURL(fullPath).href);
32
+ const exported = loaded.default ?? loaded.config ?? loaded;
33
+ return (exported ?? {});
34
+ }
35
+ async function exists(targetPath) {
36
+ try {
37
+ await access(targetPath);
38
+ return true;
39
+ }
40
+ catch {
41
+ return false;
42
+ }
43
+ }
44
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;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,CAAC,MAAM,IAAI,MAAM,CAAC;IAC3D,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAc,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,MAAM,CAAC,UAAkB;IACtC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
package/dist/cost.d.ts CHANGED
@@ -4,3 +4,11 @@ export declare class CostTracker {
4
4
  getTotal(): number;
5
5
  persist(projectRoot: string): Promise<void>;
6
6
  }
7
+ export type CostEstimate = {
8
+ estimatedUsd: number;
9
+ minUsd: number;
10
+ maxUsd: number;
11
+ taskCount: number;
12
+ heuristic: string;
13
+ };
14
+ export declare function estimateRunCost(projectRoot: string, maxParallel: number): Promise<CostEstimate>;
package/dist/cost.js CHANGED
@@ -1,5 +1,6 @@
1
- import { mkdir, writeFile } from 'node:fs/promises';
1
+ import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
+ import { runCommand } from './utils/exec.js';
3
4
  export class CostTracker {
4
5
  totalUsd = 0;
5
6
  addCost(amountUsd) {
@@ -12,7 +13,50 @@ export class CostTracker {
12
13
  const dir = path.join(projectRoot, '.bemadralphy');
13
14
  await mkdir(dir, { recursive: true });
14
15
  const costPath = path.join(dir, 'cost.log');
15
- await writeFile(costPath, `${this.totalUsd}\n`, 'utf-8');
16
+ const existing = await safeRead(costPath);
17
+ const row = JSON.stringify({
18
+ ts: new Date().toISOString(),
19
+ totalUsd: Number(this.totalUsd.toFixed(4)),
20
+ });
21
+ await writeFile(costPath, `${existing}${row}\n`, 'utf-8');
16
22
  }
17
23
  }
24
+ export async function estimateRunCost(projectRoot, maxParallel) {
25
+ const taskCount = await estimateReadyTasks(projectRoot);
26
+ const baseCost = 0.08;
27
+ const perTask = 0.07;
28
+ const concurrencyMultiplier = Math.max(1, Math.min(maxParallel || 1, 8)) * 0.01;
29
+ const estimatedUsd = baseCost + taskCount * (perTask + concurrencyMultiplier);
30
+ return {
31
+ estimatedUsd: round4(estimatedUsd),
32
+ minUsd: round4(estimatedUsd * 0.65),
33
+ maxUsd: round4(estimatedUsd * 1.45),
34
+ taskCount,
35
+ heuristic: 'Heuristic estimate based on ready Beads tasks and configured parallelism; actual token usage varies by model and task size.',
36
+ };
37
+ }
38
+ async function estimateReadyTasks(projectRoot) {
39
+ try {
40
+ const { stdout } = await runCommand('bd', ['ready'], projectRoot);
41
+ const ids = stdout.match(/bd-[a-zA-Z0-9-]+/g);
42
+ if (!ids) {
43
+ return 0;
44
+ }
45
+ return new Set(ids).size;
46
+ }
47
+ catch {
48
+ return 0;
49
+ }
50
+ }
51
+ async function safeRead(filePath) {
52
+ try {
53
+ return await readFile(filePath, 'utf-8');
54
+ }
55
+ catch {
56
+ return '';
57
+ }
58
+ }
59
+ function round4(value) {
60
+ return Number(value.toFixed(4));
61
+ }
18
62
  //# sourceMappingURL=cost.js.map
package/dist/cost.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cost.js","sourceRoot":"","sources":["../src/cost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,OAAO,WAAW;IACd,QAAQ,GAAG,CAAC,CAAC;IAErB,OAAO,CAAC,SAAiB;QACvB,IAAI,CAAC,QAAQ,IAAI,SAAS,CAAC;IAC7B,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,WAAmB;QAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QACnD,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACtC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E,OAAO,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,KAAa;IAC3B,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC"}
@@ -4,6 +4,7 @@ import { copilotAdapter } from './copilot.js';
4
4
  import { cursorAdapter } from './cursor.js';
5
5
  import { geminiAdapter } from './gemini.js';
6
6
  import { kimiAdapter } from './kimi.js';
7
+ import { ollamaAdapter } from './ollama.js';
7
8
  import { opencodeAdapter } from './opencode.js';
8
9
  import { qwenAdapter } from './qwen.js';
9
10
  import { ralphyAdapter } from './ralphy.js';
@@ -14,6 +15,7 @@ export const engineAdapters = {
14
15
  cursor: cursorAdapter,
15
16
  gemini: geminiAdapter,
16
17
  kimi: kimiAdapter,
18
+ ollama: ollamaAdapter,
17
19
  opencode: opencodeAdapter,
18
20
  qwen: qwenAdapter,
19
21
  ralphy: ralphyAdapter,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/engines/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,CAAC,MAAM,cAAc,GAAkC;IAC3D,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,eAAe;IACzB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;CACtB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/engines/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,CAAC,MAAM,cAAc,GAAkC;IAC3D,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,QAAQ,EAAE,eAAe;IACzB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;CACtB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const ollamaAdapter: import("./types.js").EngineAdapter;
@@ -0,0 +1,13 @@
1
+ import { createCliAdapter } from './cli-adapter.js';
2
+ export const ollamaAdapter = createCliAdapter({
3
+ name: 'ollama',
4
+ commandName: 'ollama',
5
+ hasNativeSwarm: false,
6
+ buildArgs: (_task, prompt) => {
7
+ const model = process.env.OLLAMA_MODEL?.trim() || 'llama3.2';
8
+ return ['run', model, prompt];
9
+ },
10
+ unavailableHint: 'Install Ollama and run `ollama pull <model>`.',
11
+ failureHint: 'Ensure the Ollama daemon is running and the selected model is available.',
12
+ });
13
+ //# sourceMappingURL=ollama.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ollama.js","sourceRoot":"","sources":["../../src/engines/ollama.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC;IAC5C,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,cAAc,EAAE,KAAK;IACrB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,UAAU,CAAC;QAC7D,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IACD,eAAe,EAAE,+CAA+C;IAChE,WAAW,EAAE,0EAA0E;CACxF,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ export type RunHistoryRecord = {
2
+ runId: string;
3
+ startedAt: string;
4
+ finishedAt?: string;
5
+ status: 'running' | 'failed' | 'completed';
6
+ mode: 'auto' | 'hybrid' | 'supervised';
7
+ engine?: string;
8
+ output?: 'text' | 'json';
9
+ phase?: string;
10
+ resumeFromPhase?: string;
11
+ options: Record<string, unknown>;
12
+ error?: string;
13
+ };
14
+ export declare function appendRunHistory(projectRoot: string, record: RunHistoryRecord): Promise<void>;
15
+ export declare function readRunHistory(projectRoot: string): Promise<RunHistoryRecord[]>;
16
+ export declare function findRunHistory(projectRoot: string, runId: string): Promise<RunHistoryRecord | null>;
@@ -0,0 +1,35 @@
1
+ import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ const RUNS_PATH = ['.bemadralphy', 'runs.jsonl'];
4
+ export async function appendRunHistory(projectRoot, record) {
5
+ const fullPath = path.join(projectRoot, ...RUNS_PATH);
6
+ await mkdir(path.dirname(fullPath), { recursive: true });
7
+ const existing = await safeRead(fullPath);
8
+ await writeFile(fullPath, `${existing}${JSON.stringify(record)}\n`, 'utf-8');
9
+ }
10
+ export async function readRunHistory(projectRoot) {
11
+ const fullPath = path.join(projectRoot, ...RUNS_PATH);
12
+ const raw = await safeRead(fullPath);
13
+ if (!raw.trim()) {
14
+ return [];
15
+ }
16
+ return raw
17
+ .split('\n')
18
+ .map((line) => line.trim())
19
+ .filter(Boolean)
20
+ .map((line) => JSON.parse(line));
21
+ }
22
+ export async function findRunHistory(projectRoot, runId) {
23
+ const rows = await readRunHistory(projectRoot);
24
+ const found = rows.find((row) => row.runId === runId);
25
+ return found ?? null;
26
+ }
27
+ async function safeRead(filePath) {
28
+ try {
29
+ return await readFile(filePath, 'utf-8');
30
+ }
31
+ catch {
32
+ return '';
33
+ }
34
+ }
35
+ //# sourceMappingURL=history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.js","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAgB7B,MAAM,SAAS,GAAG,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,WAAmB,EACnB,MAAwB;IAExB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC;IACtD,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC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C"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { runExplore, runInit, runPipeline, runStatus } from './orchestrator.js';
1
+ export { runExplore, runHistory, runInit, runPipeline, runReplay, runStatus } from './orchestrator.js';
2
2
  export type { RunOptions } from './orchestrator.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { runExplore, runInit, runPipeline, runStatus } from './orchestrator.js';
1
+ export { runExplore, runHistory, runInit, runPipeline, runReplay, runStatus } from './orchestrator.js';
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,19 +1,28 @@
1
1
  import { type AudienceProfile, type ExecutionProfile, type PipelineMode } from './phases/index.js';
2
+ import { type OutputFormat } from './utils/logging.js';
2
3
  export type RunOptions = {
3
- mode: PipelineMode;
4
+ mode?: PipelineMode;
4
5
  engine?: string;
5
6
  planningEngine?: string;
6
- maxParallel: number;
7
+ maxParallel?: number;
7
8
  executionProfile?: ExecutionProfile;
8
9
  audienceProfile?: AudienceProfile;
9
10
  budget?: number;
10
- brownfield: boolean;
11
+ brownfield?: boolean;
11
12
  swarm?: 'native' | 'process' | 'off';
12
- createPr: boolean;
13
- dryRun: boolean;
13
+ createPr?: boolean;
14
+ dryRun?: boolean;
15
+ resume?: boolean;
16
+ fromPhase?: PipelinePhaseName;
17
+ output?: OutputFormat;
18
+ plugins?: string[];
14
19
  projectRoot?: string;
15
20
  };
21
+ type PipelinePhaseName = 'intake' | 'planning' | 'steering' | 'scaffold' | 'sync' | 'execute' | 'verify' | 'post';
16
22
  export declare function runInit(projectRoot?: string): Promise<void>;
17
23
  export declare function runPipeline(options: RunOptions): Promise<void>;
18
24
  export declare function runExplore(query: string): Promise<void>;
19
- export declare function runStatus(): Promise<void>;
25
+ export declare function runStatus(output?: OutputFormat): Promise<void>;
26
+ export declare function runHistory(output?: OutputFormat): Promise<void>;
27
+ export declare function runReplay(runId: string, options?: Partial<RunOptions>): Promise<void>;
28
+ export {};