bemadralphy 0.2.0 → 0.3.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.
- package/README.md +65 -2
- package/dist/cli.js +61 -11
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +16 -0
- package/dist/config.js +44 -0
- package/dist/config.js.map +1 -0
- package/dist/cost.d.ts +8 -0
- package/dist/cost.js +37 -2
- package/dist/cost.js.map +1 -1
- package/dist/engines/index.js +2 -0
- package/dist/engines/index.js.map +1 -1
- package/dist/engines/ollama.d.ts +1 -0
- package/dist/engines/ollama.js +13 -0
- package/dist/engines/ollama.js.map +1 -0
- package/dist/history.d.ts +16 -0
- package/dist/history.js +38 -0
- package/dist/history.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/orchestrator.d.ts +15 -6
- package/dist/orchestrator.js +295 -38
- package/dist/orchestrator.js.map +1 -1
- package/dist/phases/execute.js +20 -2
- package/dist/phases/execute.js.map +1 -1
- package/dist/phases/types.d.ts +4 -0
- package/dist/plugins/index.d.ts +10 -0
- package/dist/plugins/index.js +59 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/types.d.ts +13 -0
- package/dist/plugins/types.js +2 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/state.d.ts +8 -0
- package/dist/state.js.map +1 -1
- package/dist/utils/logging.d.ts +11 -1
- package/dist/utils/logging.js +56 -3
- package/dist/utils/logging.js.map +1 -1
- package/package.json +1 -1
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
|
|
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,51 @@ 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
|
+
Resume and replay behavior:
|
|
328
|
+
|
|
329
|
+
- `--resume` retries the failed phase when a run fails.
|
|
330
|
+
- `--resume` starts at the next phase when the previous phase completed successfully.
|
|
331
|
+
- completed runs clear `resumeFromPhase`, so a later `--resume` starts fresh instead of re-running `post`.
|
|
332
|
+
- `replay <runId>` resolves from the latest run-history record for that `runId` (not the first row).
|
|
333
|
+
|
|
334
|
+
Run/cost logs are append-only JSONL and use atomic append writes:
|
|
335
|
+
|
|
336
|
+
- `.bemadralphy/runs.jsonl` (history)
|
|
337
|
+
- `.bemadralphy/cost.log` (cost tracking)
|
|
338
|
+
- `.bemadralphy/failures.log` (phase failures)
|
|
339
|
+
|
|
340
|
+
### Run defaults via config file
|
|
341
|
+
|
|
342
|
+
You can define persistent defaults in either `.bemadralphyrc` (YAML/JSON) or `bemad.config.js`.
|
|
343
|
+
|
|
344
|
+
Example `.bemadralphyrc`:
|
|
345
|
+
|
|
346
|
+
```yaml
|
|
347
|
+
mode: hybrid
|
|
348
|
+
engine: ollama
|
|
349
|
+
maxParallel: 2
|
|
350
|
+
executionProfile: balanced
|
|
351
|
+
output: text
|
|
352
|
+
plugins:
|
|
353
|
+
- ./bemad.plugins/local-plugin.mjs
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Example `bemad.config.js`:
|
|
357
|
+
|
|
358
|
+
```js
|
|
359
|
+
export default {
|
|
360
|
+
mode: 'hybrid',
|
|
361
|
+
engine: 'ralphy',
|
|
362
|
+
output: 'json',
|
|
363
|
+
};
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
CLI flags always override config file values.
|
|
367
|
+
|
|
311
368
|
### Flags
|
|
312
369
|
|
|
313
370
|
| Flag | Description |
|
|
@@ -322,6 +379,11 @@ cost_usd: 3.47
|
|
|
322
379
|
| `--brownfield` | Force brownfield mode |
|
|
323
380
|
| `--swarm native\|process\|off` | Override swarm detection |
|
|
324
381
|
| `--create-pr` | Create PRs for each task |
|
|
382
|
+
| `--dry-run` | Preflight plan + cost estimate only |
|
|
383
|
+
| `--resume` | Resume from latest checkpoint |
|
|
384
|
+
| `--from-phase <name>` | Start at a specific phase |
|
|
385
|
+
| `--output text\|json` | Human-readable or structured output |
|
|
386
|
+
| `--plugin <paths...>` | Load custom plugin modules |
|
|
325
387
|
|
|
326
388
|
### Execution profiles
|
|
327
389
|
|
|
@@ -405,6 +467,7 @@ node dist/cli.js --help
|
|
|
405
467
|
- BMAD CLI (`bmad`)
|
|
406
468
|
- Beads CLI (`bd`)
|
|
407
469
|
- OpenSpec CLI (`openspec`)
|
|
470
|
+
- Optional local engine: Ollama (`ollama`) when using `--engine ollama`
|
|
408
471
|
|
|
409
472
|
## Fail-Fast Behavior
|
|
410
473
|
|
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'
|
|
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)
|
|
22
|
-
.option('--execution-profile <profile>', 'Execution guardrails profile: safe|balanced|fast'
|
|
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'
|
|
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'
|
|
28
|
-
.option('--dry-run', '
|
|
29
|
-
.
|
|
30
|
-
|
|
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
|
-
.
|
|
42
|
-
|
|
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,CA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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"}
|
package/dist/config.d.ts
ADDED
|
@@ -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.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AAI,EAAE,CAAC;AAC7C,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,QAAgB;IAC1C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,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 {
|
|
1
|
+
import { appendFile, mkdir } 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,41 @@ 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
|
-
|
|
16
|
+
const row = JSON.stringify({
|
|
17
|
+
ts: new Date().toISOString(),
|
|
18
|
+
totalUsd: Number(this.totalUsd.toFixed(4)),
|
|
19
|
+
});
|
|
20
|
+
await appendFile(costPath, `${row}\n`, 'utf-8');
|
|
16
21
|
}
|
|
17
22
|
}
|
|
23
|
+
export async function estimateRunCost(projectRoot, maxParallel) {
|
|
24
|
+
const taskCount = await estimateReadyTasks(projectRoot);
|
|
25
|
+
const baseCost = 0.08;
|
|
26
|
+
const perTask = 0.07;
|
|
27
|
+
const concurrencyMultiplier = Math.max(1, Math.min(maxParallel || 1, 8)) * 0.01;
|
|
28
|
+
const estimatedUsd = baseCost + taskCount * (perTask + concurrencyMultiplier);
|
|
29
|
+
return {
|
|
30
|
+
estimatedUsd: round4(estimatedUsd),
|
|
31
|
+
minUsd: round4(estimatedUsd * 0.65),
|
|
32
|
+
maxUsd: round4(estimatedUsd * 1.45),
|
|
33
|
+
taskCount,
|
|
34
|
+
heuristic: 'Heuristic estimate based on ready Beads tasks and configured parallelism; actual token usage varies by model and task size.',
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
async function estimateReadyTasks(projectRoot) {
|
|
38
|
+
try {
|
|
39
|
+
const { stdout } = await runCommand('bd', ['ready'], projectRoot);
|
|
40
|
+
const ids = stdout.match(/bd-[a-zA-Z0-9-]+/g);
|
|
41
|
+
if (!ids) {
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
return new Set(ids).size;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function round4(value) {
|
|
51
|
+
return Number(value.toFixed(4));
|
|
52
|
+
}
|
|
18
53
|
//# 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,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AAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAChF,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,CAAC,OAAO,GAAG,qBAAqB,CAAC,CAAC;IAC9E,OAAO;QACL,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;QAClC,MAAM,EAAE,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;QACnC,MAAM,EAAE,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;QACnC,SAAS;QACT,SAAS,EACP,6HAA6H;KAChI,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,kBAAkB,CAAC,WAAmB;IACnD,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC;QAClE,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC9C,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,KAAa;IAC3B,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/engines/index.js
CHANGED
|
@@ -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>;
|
package/dist/history.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { appendFile, mkdir, readFile } 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
|
+
await appendFile(fullPath, `${JSON.stringify(record)}\n`, 'utf-8');
|
|
8
|
+
}
|
|
9
|
+
export async function readRunHistory(projectRoot) {
|
|
10
|
+
const fullPath = path.join(projectRoot, ...RUNS_PATH);
|
|
11
|
+
const raw = await safeRead(fullPath);
|
|
12
|
+
if (!raw.trim()) {
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
return raw
|
|
16
|
+
.split('\n')
|
|
17
|
+
.map((line) => line.trim())
|
|
18
|
+
.filter(Boolean)
|
|
19
|
+
.map((line) => JSON.parse(line));
|
|
20
|
+
}
|
|
21
|
+
export async function findRunHistory(projectRoot, runId) {
|
|
22
|
+
const rows = await readRunHistory(projectRoot);
|
|
23
|
+
for (let index = rows.length - 1; index >= 0; index -= 1) {
|
|
24
|
+
if (rows[index].runId === runId) {
|
|
25
|
+
return rows[index];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
async function safeRead(filePath) {
|
|
31
|
+
try {
|
|
32
|
+
return await readFile(filePath, 'utf-8');
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.js","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,IAAI,MAAM,WAAW,CAAC;AAgB7B,MAAM,SAAS,GAAG,CAAC,cAAc,EAAE,YAA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AK,KAAK,KAAK,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,QAAgB;IACtC,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
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"}
|
package/dist/orchestrator.d.ts
CHANGED
|
@@ -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
|
|
4
|
+
mode?: PipelineMode;
|
|
4
5
|
engine?: string;
|
|
5
6
|
planningEngine?: string;
|
|
6
|
-
maxParallel
|
|
7
|
+
maxParallel?: number;
|
|
7
8
|
executionProfile?: ExecutionProfile;
|
|
8
9
|
audienceProfile?: AudienceProfile;
|
|
9
10
|
budget?: number;
|
|
10
|
-
brownfield
|
|
11
|
+
brownfield?: boolean;
|
|
11
12
|
swarm?: 'native' | 'process' | 'off';
|
|
12
|
-
createPr
|
|
13
|
-
dryRun
|
|
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 {};
|