almightygpt 0.2.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/bin/almightygpt.js +20 -0
- package/dist/commands/decide.d.ts +10 -0
- package/dist/commands/decide.d.ts.map +1 -0
- package/dist/commands/decide.js +105 -0
- package/dist/commands/decide.js.map +1 -0
- package/dist/commands/init.d.ts +15 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +105 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/review.d.ts +17 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +267 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/runs.d.ts +9 -0
- package/dist/commands/runs.d.ts.map +1 -0
- package/dist/commands/runs.js +126 -0
- package/dist/commands/runs.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Entry shim — delegates to the compiled CLI in dist/.
|
|
3
|
+
// If dist/ is missing, give a clear error pointing at the build step.
|
|
4
|
+
|
|
5
|
+
import { existsSync } from "node:fs";
|
|
6
|
+
import { dirname, join } from "node:path";
|
|
7
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
const distEntry = join(__dirname, "..", "dist", "index.js");
|
|
12
|
+
|
|
13
|
+
if (!existsSync(distEntry)) {
|
|
14
|
+
console.error(
|
|
15
|
+
"almightygpt: build output missing. Run `npm run build` from the repo root."
|
|
16
|
+
);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
await import(pathToFileURL(distEntry).href);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `almightygpt decide <run-id> --status <s> --note "<text>"`.
|
|
3
|
+
*
|
|
4
|
+
* Updates the human review file's "## Human Decision" section and the
|
|
5
|
+
* run.json's `decision` field. Pass "latest" as the run-id to target the
|
|
6
|
+
* most recent run.
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from "commander";
|
|
9
|
+
export declare function createDecideCommand(): Command;
|
|
10
|
+
//# sourceMappingURL=decide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decide.d.ts","sourceRoot":"","sources":["../../src/commands/decide.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2BpC,wBAAgB,mBAAmB,IAAI,OAAO,CAyB7C"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `almightygpt decide <run-id> --status <s> --note "<text>"`.
|
|
3
|
+
*
|
|
4
|
+
* Updates the human review file's "## Human Decision" section and the
|
|
5
|
+
* run.json's `decision` field. Pass "latest" as the run-id to target the
|
|
6
|
+
* most recent run.
|
|
7
|
+
*/
|
|
8
|
+
import { resolve } from "node:path";
|
|
9
|
+
import { Command } from "commander";
|
|
10
|
+
import chalk from "chalk";
|
|
11
|
+
import { findLatestRun, findRunById, GitStatusDirtyError, loadConfig, recordDecision, } from "@almightygpt/core";
|
|
12
|
+
const VALID_STATUSES = [
|
|
13
|
+
"approved",
|
|
14
|
+
"needs_changes",
|
|
15
|
+
"rejected",
|
|
16
|
+
"deferred",
|
|
17
|
+
];
|
|
18
|
+
export function createDecideCommand() {
|
|
19
|
+
return new Command("decide")
|
|
20
|
+
.description("Record a human decision on a review. Updates the review file's " +
|
|
21
|
+
"Human Decision section and the run.json. Pass 'latest' as the " +
|
|
22
|
+
"run-id to target the most recent run.")
|
|
23
|
+
.argument("<run-id>", "run id (e.g. 2026-05-23-...-topic-abcd) or 'latest'")
|
|
24
|
+
.requiredOption("--status <s>", "approved | needs_changes | rejected | deferred")
|
|
25
|
+
.option("--note <text>", "optional one-paragraph note")
|
|
26
|
+
.option("--by <name>", "who decided (defaults to undefined)")
|
|
27
|
+
.option("--cwd <path>", "repo root. Defaults to current directory.")
|
|
28
|
+
.option("--force", "overwrite the review file even if it has uncommitted changes", false)
|
|
29
|
+
.option("--json", "JSON output", false)
|
|
30
|
+
.action(runDecide);
|
|
31
|
+
}
|
|
32
|
+
async function runDecide(runIdArg, opts) {
|
|
33
|
+
const repoRoot = resolve(opts.cwd ?? process.cwd());
|
|
34
|
+
if (!opts.status) {
|
|
35
|
+
failed("Missing --status.", opts.json);
|
|
36
|
+
process.exit(2);
|
|
37
|
+
}
|
|
38
|
+
const status = opts.status;
|
|
39
|
+
if (!VALID_STATUSES.includes(status)) {
|
|
40
|
+
failed(`Invalid --status "${opts.status}". Use one of: ${VALID_STATUSES.join(", ")}.`, opts.json);
|
|
41
|
+
process.exit(2);
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const config = await loadConfig(repoRoot);
|
|
45
|
+
const found = runIdArg === "latest"
|
|
46
|
+
? await findLatestRun(repoRoot, config.runsDir)
|
|
47
|
+
: await findRunById(repoRoot, config.runsDir, runIdArg);
|
|
48
|
+
if (!found) {
|
|
49
|
+
failed(runIdArg === "latest"
|
|
50
|
+
? "No runs found."
|
|
51
|
+
: `Run id "${runIdArg}" not found in ${config.runsDir}/.`, opts.json);
|
|
52
|
+
process.exit(2);
|
|
53
|
+
}
|
|
54
|
+
const callOpts = {
|
|
55
|
+
repoRoot,
|
|
56
|
+
meta: found.meta,
|
|
57
|
+
runFolderAbs: found.absPath,
|
|
58
|
+
status,
|
|
59
|
+
force: opts.force,
|
|
60
|
+
};
|
|
61
|
+
if (opts.note)
|
|
62
|
+
callOpts.note = opts.note;
|
|
63
|
+
if (opts.by)
|
|
64
|
+
callOpts.decidedBy = opts.by;
|
|
65
|
+
const result = await recordDecision(callOpts);
|
|
66
|
+
if (opts.json) {
|
|
67
|
+
console.log(JSON.stringify({
|
|
68
|
+
type: "decision_recorded",
|
|
69
|
+
runId: found.meta.id,
|
|
70
|
+
reviewPath: result.reviewPath,
|
|
71
|
+
decision: result.decision,
|
|
72
|
+
}));
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
console.log(chalk.green(`✓ Decision recorded on ${chalk.bold(result.reviewPath)}`));
|
|
76
|
+
console.log();
|
|
77
|
+
console.log(` Run: ${found.meta.id}`);
|
|
78
|
+
console.log(` Status: ${chalk.cyan(result.decision.status)}`);
|
|
79
|
+
if (result.decision.decidedBy) {
|
|
80
|
+
console.log(` Decided by: ${result.decision.decidedBy}`);
|
|
81
|
+
}
|
|
82
|
+
console.log(` Decided at: ${result.decision.decidedAt}`);
|
|
83
|
+
if (result.decision.note) {
|
|
84
|
+
console.log();
|
|
85
|
+
console.log(chalk.dim(` Note: ${result.decision.note}`));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
if (err instanceof GitStatusDirtyError) {
|
|
90
|
+
failed(err.message, opts.json);
|
|
91
|
+
process.exit(1);
|
|
92
|
+
}
|
|
93
|
+
failed(err instanceof Error ? err.message : String(err), opts.json);
|
|
94
|
+
process.exit(1);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function failed(message, json) {
|
|
98
|
+
if (json) {
|
|
99
|
+
console.log(JSON.stringify({ type: "error", message }));
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
console.error(chalk.red(`error: ${message}`));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=decide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decide.js","sourceRoot":"","sources":["../../src/commands/decide.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;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CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,OAAe,EAAE,IAAa;IAC5C,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAC1D,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `almightygpt init` — drop the Convention Pack into the current repo.
|
|
3
|
+
*
|
|
4
|
+
* MVP 1 behavior:
|
|
5
|
+
* - One stack supported: node-ts.
|
|
6
|
+
* - All settings via flags. No interactive prompts (keeps deps light).
|
|
7
|
+
* - Existing tracked files are skipped unless --force.
|
|
8
|
+
* - Existing files with uncommitted changes are skipped with a clear reason
|
|
9
|
+
* unless --force.
|
|
10
|
+
* - Prints a summary of what was written and what was skipped.
|
|
11
|
+
* - Exits non-zero if nothing was written and not in dry-run mode.
|
|
12
|
+
*/
|
|
13
|
+
import { Command } from "commander";
|
|
14
|
+
export declare function createInitCommand(): Command;
|
|
15
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,wBAAgB,iBAAiB,IAAI,OAAO,CAiC3C"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `almightygpt init` — drop the Convention Pack into the current repo.
|
|
3
|
+
*
|
|
4
|
+
* MVP 1 behavior:
|
|
5
|
+
* - One stack supported: node-ts.
|
|
6
|
+
* - All settings via flags. No interactive prompts (keeps deps light).
|
|
7
|
+
* - Existing tracked files are skipped unless --force.
|
|
8
|
+
* - Existing files with uncommitted changes are skipped with a clear reason
|
|
9
|
+
* unless --force.
|
|
10
|
+
* - Prints a summary of what was written and what was skipped.
|
|
11
|
+
* - Exits non-zero if nothing was written and not in dry-run mode.
|
|
12
|
+
*/
|
|
13
|
+
import { resolve } from "node:path";
|
|
14
|
+
import { Command } from "commander";
|
|
15
|
+
import chalk from "chalk";
|
|
16
|
+
import { installTemplate, hasExistingConfig } from "@almightygpt/core";
|
|
17
|
+
export function createInitCommand() {
|
|
18
|
+
return new Command("init")
|
|
19
|
+
.description("Drop the AlmightyGPT Convention Pack into the current repo " +
|
|
20
|
+
"(AGENTS.md, CLAUDE.md, CODEX_AGENT.md, .almightyignore, .almightygpt/, " +
|
|
21
|
+
"docs/codex-reviews/).")
|
|
22
|
+
.option("--stack <name>", "stack template to use. MVP 1 supports: node-ts", "node-ts")
|
|
23
|
+
.option("--cwd <path>", "target directory to initialize. Defaults to the current working directory.")
|
|
24
|
+
.option("--force", "overwrite existing files even when they have uncommitted changes", false)
|
|
25
|
+
.option("--backup", "rename existing files to <file>.almighty-bak before writing the new template", false)
|
|
26
|
+
.option("--dry-run", "print what would be written without touching the filesystem", false)
|
|
27
|
+
.option("--json", "emit machine-readable JSON output", false)
|
|
28
|
+
.action(runInit);
|
|
29
|
+
}
|
|
30
|
+
async function runInit(opts) {
|
|
31
|
+
const targetDir = resolve(opts.cwd ?? process.cwd());
|
|
32
|
+
const existed = await hasExistingConfig(targetDir);
|
|
33
|
+
if (existed && !opts.force && !opts.backup) {
|
|
34
|
+
const msg = "AlmightyGPT config already present at .almightygpt/config.yaml. " +
|
|
35
|
+
"Re-run with --backup (safer — renames existing files to *.almighty-bak " +
|
|
36
|
+
"before overwriting) or --force (overwrites existing files; dirty files " +
|
|
37
|
+
"are still protected unless --force is also passed).";
|
|
38
|
+
if (opts.json) {
|
|
39
|
+
console.log(JSON.stringify({ type: "init_skipped", reason: "config_exists" }));
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
console.error(chalk.yellow(msg));
|
|
43
|
+
}
|
|
44
|
+
process.exit(2);
|
|
45
|
+
}
|
|
46
|
+
const result = await installTemplate({
|
|
47
|
+
targetDir,
|
|
48
|
+
stack: opts.stack,
|
|
49
|
+
force: opts.force,
|
|
50
|
+
backup: opts.backup,
|
|
51
|
+
dryRun: opts.dryRun,
|
|
52
|
+
});
|
|
53
|
+
if (opts.json) {
|
|
54
|
+
console.log(JSON.stringify({
|
|
55
|
+
type: opts.dryRun ? "init_dry_run" : "init_completed",
|
|
56
|
+
targetDir,
|
|
57
|
+
stack: opts.stack,
|
|
58
|
+
written: result.written,
|
|
59
|
+
skipped: result.skipped,
|
|
60
|
+
backedUp: result.backedUp,
|
|
61
|
+
}));
|
|
62
|
+
if (result.written.length === 0 && !opts.dryRun) {
|
|
63
|
+
process.exit(2);
|
|
64
|
+
}
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
// Human-friendly summary
|
|
68
|
+
const header = opts.dryRun
|
|
69
|
+
? chalk.cyan(`Dry run: would install ${opts.stack} template into ${targetDir}`)
|
|
70
|
+
: chalk.green(`Installed ${opts.stack} template into ${targetDir}`);
|
|
71
|
+
console.log(header);
|
|
72
|
+
console.log();
|
|
73
|
+
if (result.written.length > 0) {
|
|
74
|
+
console.log(chalk.bold("Files written:"));
|
|
75
|
+
for (const path of result.written) {
|
|
76
|
+
console.log(` ${chalk.green("+")} ${path}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (result.backedUp.length > 0) {
|
|
80
|
+
console.log();
|
|
81
|
+
console.log(chalk.bold("Backed up:"));
|
|
82
|
+
for (const { from, to } of result.backedUp) {
|
|
83
|
+
console.log(` ${chalk.cyan("→")} ${from} ${chalk.dim(`→ ${to}`)}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (result.skipped.length > 0) {
|
|
87
|
+
console.log();
|
|
88
|
+
console.log(chalk.bold("Skipped:"));
|
|
89
|
+
for (const { path, reason } of result.skipped) {
|
|
90
|
+
console.log(` ${chalk.yellow("-")} ${path} ${chalk.dim(`(${reason})`)}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
console.log();
|
|
94
|
+
if (result.written.length === 0 && !opts.dryRun) {
|
|
95
|
+
console.error(chalk.yellow("Nothing was written. Re-run with --force to overwrite existing files."));
|
|
96
|
+
process.exit(2);
|
|
97
|
+
}
|
|
98
|
+
if (!opts.dryRun) {
|
|
99
|
+
console.log(chalk.dim("Next:"));
|
|
100
|
+
console.log(chalk.dim(" 1. Edit CLAUDE.md and CODEX_AGENT.md for your repo."));
|
|
101
|
+
console.log(chalk.dim(" 2. Commit the Convention Pack so your team can adopt it."));
|
|
102
|
+
console.log(chalk.dim(" 3. Try a review: almightygpt review --diff --reviewer codex --topic first"));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAWvE,MAAM,UAAU,iBAAiB;IAC/B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;SACvB,WAAW,CACV,6DAA6D;QAC3D,yEAAyE;QACzE,uBAAuB,CAC1B;SACA,MAAM,CACL,g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G,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC,CAAC;QAChF,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,GAAG,CAAC,4DAA4D,CAAC,CACxE,CAAC;QACF,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,GAAG,CACP,6EAA6E,CAC9E,CACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `almightygpt review` — run a cross-AI review.
|
|
3
|
+
*
|
|
4
|
+
* MVP 1 modes:
|
|
5
|
+
* - Reviewer only on a diff:
|
|
6
|
+
* almightygpt review --diff --reviewer codex --topic auth-refactor
|
|
7
|
+
* - Worker + Reviewer two-role flow:
|
|
8
|
+
* almightygpt review --diff --worker claude --reviewer codex --topic auth-refactor
|
|
9
|
+
*
|
|
10
|
+
* In --json mode the command streams one line of JSON per event (run_started,
|
|
11
|
+
* agent_started/completed, redaction_complete, review_written, run_completed,
|
|
12
|
+
* run_failed). Tools (VS Code extension, dashboards) read line-delimited
|
|
13
|
+
* events from stdout.
|
|
14
|
+
*/
|
|
15
|
+
import { Command } from "commander";
|
|
16
|
+
export declare function createReviewCommand(): Command;
|
|
17
|
+
//# sourceMappingURL=review.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAsB5C,wBAAgB,mBAAmB,IAAI,OAAO,CAoC7C"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `almightygpt review` — run a cross-AI review.
|
|
3
|
+
*
|
|
4
|
+
* MVP 1 modes:
|
|
5
|
+
* - Reviewer only on a diff:
|
|
6
|
+
* almightygpt review --diff --reviewer codex --topic auth-refactor
|
|
7
|
+
* - Worker + Reviewer two-role flow:
|
|
8
|
+
* almightygpt review --diff --worker claude --reviewer codex --topic auth-refactor
|
|
9
|
+
*
|
|
10
|
+
* In --json mode the command streams one line of JSON per event (run_started,
|
|
11
|
+
* agent_started/completed, redaction_complete, review_written, run_completed,
|
|
12
|
+
* run_failed). Tools (VS Code extension, dashboards) read line-delimited
|
|
13
|
+
* events from stdout.
|
|
14
|
+
*/
|
|
15
|
+
import { resolve } from "node:path";
|
|
16
|
+
import { Command, Option } from "commander";
|
|
17
|
+
import chalk from "chalk";
|
|
18
|
+
import { runDiffReview, runWorkerReviewerReview, AdapterError, GitStatusDirtyError, BudgetExceededError, ReviewFileExistsError, } from "@almightygpt/core";
|
|
19
|
+
export function createReviewCommand() {
|
|
20
|
+
return new Command("review")
|
|
21
|
+
.description("Run a cross-AI review. Use --worker to enable the two-role " +
|
|
22
|
+
"Worker/Reviewer flow; otherwise the command runs Reviewer-only on " +
|
|
23
|
+
"the diff.")
|
|
24
|
+
.addOption(new Option("--diff [range]", "review a git diff. Optional range like 'HEAD~1..HEAD'. " +
|
|
25
|
+
"If no range is given, reviews uncommitted changes."))
|
|
26
|
+
.option("--worker <name>", "worker agent name. If set, runs the two-role flow. " +
|
|
27
|
+
"Falls back to defaults.worker in .almightygpt/config.yaml.")
|
|
28
|
+
.option("--reviewer <name>", "reviewer agent name (must exist in .almightygpt/config.yaml agents map)")
|
|
29
|
+
.option("--topic <name>", "topic slug for the review file")
|
|
30
|
+
.option("--cwd <path>", "repo root. Defaults to current directory.")
|
|
31
|
+
.option("--force", "overwrite the review file even when it already exists", false)
|
|
32
|
+
.option("--json", "stream JSON events on stdout (one per line)", false)
|
|
33
|
+
.action(runReview);
|
|
34
|
+
}
|
|
35
|
+
async function runReview(opts) {
|
|
36
|
+
if (!opts.topic) {
|
|
37
|
+
failed("Missing --topic. Every review needs a topic so the file path is deterministic.", opts.json);
|
|
38
|
+
process.exit(2);
|
|
39
|
+
}
|
|
40
|
+
if (opts.diff === undefined || opts.diff === false) {
|
|
41
|
+
failed("Missing --diff. MVP 1 supports diff review only.", opts.json);
|
|
42
|
+
process.exit(2);
|
|
43
|
+
}
|
|
44
|
+
const repoRoot = resolve(opts.cwd ?? process.cwd());
|
|
45
|
+
const useWorkerReviewer = opts.worker !== undefined;
|
|
46
|
+
// Event handler: prints either JSON lines or human progress text.
|
|
47
|
+
const onEvent = (event) => {
|
|
48
|
+
if (opts.json) {
|
|
49
|
+
console.log(JSON.stringify(event));
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
humanProgress(event);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
try {
|
|
56
|
+
if (useWorkerReviewer) {
|
|
57
|
+
const wrOpts = {
|
|
58
|
+
repoRoot,
|
|
59
|
+
topic: opts.topic,
|
|
60
|
+
force: opts.force,
|
|
61
|
+
onEvent,
|
|
62
|
+
};
|
|
63
|
+
if (typeof opts.diff === "string")
|
|
64
|
+
wrOpts.range = opts.diff;
|
|
65
|
+
if (opts.worker)
|
|
66
|
+
wrOpts.worker = opts.worker;
|
|
67
|
+
if (opts.reviewer)
|
|
68
|
+
wrOpts.reviewer = opts.reviewer;
|
|
69
|
+
const result = await runWorkerReviewerReview(wrOpts);
|
|
70
|
+
if (!opts.json) {
|
|
71
|
+
printWorkerReviewerSummary(result);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const drOpts = {
|
|
76
|
+
repoRoot,
|
|
77
|
+
topic: opts.topic,
|
|
78
|
+
force: opts.force,
|
|
79
|
+
};
|
|
80
|
+
if (typeof opts.diff === "string")
|
|
81
|
+
drOpts.range = opts.diff;
|
|
82
|
+
if (opts.reviewer)
|
|
83
|
+
drOpts.reviewer = opts.reviewer;
|
|
84
|
+
const result = await runDiffReview(drOpts);
|
|
85
|
+
// runDiffReview doesn't emit events yet; synthesize a run_completed
|
|
86
|
+
// event so --json output is consistent with the worker-reviewer path.
|
|
87
|
+
if (opts.json) {
|
|
88
|
+
onEvent({
|
|
89
|
+
type: "run_started",
|
|
90
|
+
runId: result.runId,
|
|
91
|
+
runType: "review-diff",
|
|
92
|
+
topic: opts.topic,
|
|
93
|
+
reviewsDir: result.reviewPath.split("/").slice(0, -1).join("/"),
|
|
94
|
+
runFolder: result.runFolder,
|
|
95
|
+
});
|
|
96
|
+
onEvent({
|
|
97
|
+
type: "agent_completed",
|
|
98
|
+
role: "reviewer",
|
|
99
|
+
agent: result.reviewer,
|
|
100
|
+
provider: result.provider,
|
|
101
|
+
model: result.modelUsed,
|
|
102
|
+
outputPath: `${result.runFolder}/outputs/reviewer.md`,
|
|
103
|
+
tokensIn: result.tokensIn,
|
|
104
|
+
tokensOut: result.tokensOut,
|
|
105
|
+
costUsd: result.costUsd,
|
|
106
|
+
latencyMs: result.latencyMs,
|
|
107
|
+
});
|
|
108
|
+
const reviewWritten = {
|
|
109
|
+
type: "review_written",
|
|
110
|
+
reviewPath: result.reviewPath,
|
|
111
|
+
bytes: result.reviewBytes,
|
|
112
|
+
};
|
|
113
|
+
if (result.shallowWarning) {
|
|
114
|
+
reviewWritten.shallowWarning =
|
|
115
|
+
result.shallowWarning;
|
|
116
|
+
}
|
|
117
|
+
onEvent(reviewWritten);
|
|
118
|
+
onEvent({
|
|
119
|
+
type: "run_completed",
|
|
120
|
+
runId: result.runId,
|
|
121
|
+
reviewPath: result.reviewPath,
|
|
122
|
+
runFolder: result.runFolder,
|
|
123
|
+
totals: {
|
|
124
|
+
tokensIn: result.tokensIn,
|
|
125
|
+
tokensOut: result.tokensOut,
|
|
126
|
+
costUsd: result.costUsd,
|
|
127
|
+
latencyMs: result.latencyMs,
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
printDiffReviewSummary(result);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
catch (err) {
|
|
137
|
+
handleError(err, opts.json);
|
|
138
|
+
process.exit(1);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// ─── Human progress output ──────────────────────────────────────────
|
|
142
|
+
function humanProgress(event) {
|
|
143
|
+
switch (event.type) {
|
|
144
|
+
case "run_started":
|
|
145
|
+
console.log(chalk.dim(`run ${event.runId} (${event.runType}) topic="${event.topic}"`));
|
|
146
|
+
return;
|
|
147
|
+
case "redaction_complete":
|
|
148
|
+
if (event.totalCount > 0) {
|
|
149
|
+
const kinds = event.byKind
|
|
150
|
+
.map((b) => `${b.count} ${b.kind}`)
|
|
151
|
+
.join(", ");
|
|
152
|
+
console.log(chalk.dim(` redacted ${event.totalCount} secret(s): ${kinds}`));
|
|
153
|
+
}
|
|
154
|
+
return;
|
|
155
|
+
case "agent_started":
|
|
156
|
+
console.log(chalk.dim(` → ${event.role}: ${event.agent} (${event.provider})`));
|
|
157
|
+
return;
|
|
158
|
+
case "agent_completed":
|
|
159
|
+
console.log(chalk.dim(` ✓ ${event.role}: ${event.tokensIn}/${event.tokensOut} tok, ` +
|
|
160
|
+
`$${event.costUsd.toFixed(4)}, ${(event.latencyMs / 1000).toFixed(1)}s`));
|
|
161
|
+
return;
|
|
162
|
+
case "review_written":
|
|
163
|
+
console.log();
|
|
164
|
+
console.log(chalk.green(`✓ Review written to ${chalk.bold(event.reviewPath)}`));
|
|
165
|
+
if (event.shallowWarning) {
|
|
166
|
+
console.log(chalk.yellow(` ⚠ ${event.shallowWarning}`));
|
|
167
|
+
}
|
|
168
|
+
return;
|
|
169
|
+
case "run_failed":
|
|
170
|
+
console.log(chalk.red(`✗ Run ${event.runId} failed: ${event.error.message}`));
|
|
171
|
+
return;
|
|
172
|
+
case "run_completed":
|
|
173
|
+
// Final summary is printed by the *Summary() helpers; nothing extra.
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
function printWorkerReviewerSummary(result) {
|
|
178
|
+
console.log();
|
|
179
|
+
console.log(chalk.dim(` Run folder: ${result.runFolder}`));
|
|
180
|
+
console.log();
|
|
181
|
+
console.log(` Worker: ${chalk.cyan(result.worker.name)} ` +
|
|
182
|
+
chalk.dim(`(${result.worker.provider}, ${result.worker.model})`));
|
|
183
|
+
console.log(` Reviewer: ${chalk.cyan(result.reviewer.name)} ` +
|
|
184
|
+
chalk.dim(`(${result.reviewer.provider}, ${result.reviewer.model})`));
|
|
185
|
+
console.log(` Tokens: ${result.totals.tokensIn} in / ${result.totals.tokensOut} out`);
|
|
186
|
+
console.log(` Cost: $${result.totals.costUsd.toFixed(4)} USD`);
|
|
187
|
+
console.log(` Latency: ${(result.totals.latencyMs / 1000).toFixed(2)}s`);
|
|
188
|
+
console.log(` Files: ${result.filesReviewed.length}`);
|
|
189
|
+
if (result.redactionsTotal > 0) {
|
|
190
|
+
console.log(chalk.dim(` Redacted: ${result.redactionsTotal} secret(s) before sending to provider`));
|
|
191
|
+
}
|
|
192
|
+
if (result.sameProviderWarning) {
|
|
193
|
+
console.log();
|
|
194
|
+
console.log(chalk.yellow(` ⚠ ${result.sameProviderWarning}`));
|
|
195
|
+
}
|
|
196
|
+
if (result.memoryMissing.length > 0) {
|
|
197
|
+
console.log();
|
|
198
|
+
console.log(chalk.yellow(` Memory files missing: ${result.memoryMissing.join(", ")}`));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function printDiffReviewSummary(result) {
|
|
202
|
+
console.log();
|
|
203
|
+
console.log(chalk.green(`✓ Review written to ${chalk.bold(result.reviewPath)}`));
|
|
204
|
+
console.log(chalk.dim(` Run folder: ${result.runFolder}`));
|
|
205
|
+
console.log();
|
|
206
|
+
console.log(` Reviewer: ${chalk.cyan(result.reviewer)} ` +
|
|
207
|
+
chalk.dim(`(${result.provider}, ${result.modelUsed})`));
|
|
208
|
+
console.log(` Tokens: ${result.tokensIn} in / ${result.tokensOut} out`);
|
|
209
|
+
console.log(` Cost: $${result.costUsd.toFixed(4)} USD`);
|
|
210
|
+
console.log(` Latency: ${(result.latencyMs / 1000).toFixed(2)}s`);
|
|
211
|
+
console.log(` Files: ${result.filesReviewed.length}`);
|
|
212
|
+
if (result.redactionsTotal > 0) {
|
|
213
|
+
console.log(chalk.dim(` Redacted: ${result.redactionsTotal} secret(s) before sending to provider`));
|
|
214
|
+
}
|
|
215
|
+
if (result.shallowWarning) {
|
|
216
|
+
console.log();
|
|
217
|
+
console.log(chalk.yellow(` ⚠ ${result.shallowWarning}`));
|
|
218
|
+
}
|
|
219
|
+
if (result.memoryMissing.length > 0) {
|
|
220
|
+
console.log();
|
|
221
|
+
console.log(chalk.yellow(` Memory files missing: ${result.memoryMissing.join(", ")}`));
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
// ─── Error helpers ──────────────────────────────────────────────────
|
|
225
|
+
function failed(message, json) {
|
|
226
|
+
if (json) {
|
|
227
|
+
console.log(JSON.stringify({ type: "error", message }));
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
console.error(chalk.red(`error: ${message}`));
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
function handleError(err, json) {
|
|
234
|
+
if (err instanceof BudgetExceededError) {
|
|
235
|
+
const budgetErr = err;
|
|
236
|
+
const message = budgetErr.message;
|
|
237
|
+
const stage = budgetErr.stage;
|
|
238
|
+
if (json) {
|
|
239
|
+
console.log(JSON.stringify({
|
|
240
|
+
type: "error",
|
|
241
|
+
code: "BUDGET_EXCEEDED",
|
|
242
|
+
stage,
|
|
243
|
+
capUsd: budgetErr.capUsd,
|
|
244
|
+
actualUsd: budgetErr.actualUsd,
|
|
245
|
+
message,
|
|
246
|
+
}));
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
console.error(chalk.red(`error (budget ${stage}): ${message}`));
|
|
250
|
+
}
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
if (err instanceof ReviewFileExistsError) {
|
|
254
|
+
failed(err.message, json);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if (err instanceof GitStatusDirtyError) {
|
|
258
|
+
failed(err.message, json);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
if (err instanceof AdapterError) {
|
|
262
|
+
failed(`Adapter "${err.adapterName}": ${err.message}`, json);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
failed(err instanceof Error ? err.message : String(err), json);
|
|
266
|
+
}
|
|
267
|
+
//# sourceMappingURL=review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GAEtB,MAAM,mBAAmB,CAAC;AAY3B,MAAM,UAAU,mBAAmB;IACjC,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC;SACzB,WAAW,CACV,6DAA6D;QAC3D,oEAAoE;QACpE,WAAW,CACd;SACA,SAAS,CACR,IAAI,MAAM,CACR,gBAAgB,EAChB,yDAAyD;QACvD,oDAAoD,CACvD,CACF;SACA,MAAM,CACL,iBAAiB,EACjB,qDAAqD;QACnD,4DAA4D,CAC/D;SACA,MAAM,CACL,mBAAmB,EACnB,yEAAyE,CAC1E;SACA,MAAM,CAAC,gBAAgB,EAAE,gCAAgC,CAAC;SAC1D,MAAM,CAAC,cAAc,EAAE,2CAA2C,CAAC;SACnE,MAAM,CACL,SAAS,EACT,uDAAuD,EACvD,KAAK,CACN;SACA,MAAM,CACL,QAAQ,EACR,6CAA6C,EAC7C,KAAK,CACN;SACA,MAAM,CAAC,SAAS,CAAC,CAAC;AACvB,CAAC;AAED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AAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC1B,OAAO;IACT,CAAC;IACD,IAAI,GAAG,YAAY,YAAY,EAAE,CAAC;QAChC,MAAM,CAAC,YAAY,GAAG,CAAC,WAAW,MAAM,GAAG,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;QAC7D,OAAO;IACT,CAAC;IACD,MAAM,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `almightygpt runs list` and `almightygpt runs latest`.
|
|
3
|
+
*
|
|
4
|
+
* Reads `.almightygpt/runs/<id>/run.json` and prints a table (or JSON). The
|
|
5
|
+
* runsDir comes from `.almightygpt/config.yaml`.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
export declare function createRunsCommand(): Command;
|
|
9
|
+
//# sourceMappingURL=runs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/commands/runs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC,wBAAgB,iBAAiB,IAAI,OAAO,CAyB3C"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `almightygpt runs list` and `almightygpt runs latest`.
|
|
3
|
+
*
|
|
4
|
+
* Reads `.almightygpt/runs/<id>/run.json` and prints a table (or JSON). The
|
|
5
|
+
* runsDir comes from `.almightygpt/config.yaml`.
|
|
6
|
+
*/
|
|
7
|
+
import { resolve } from "node:path";
|
|
8
|
+
import { Command } from "commander";
|
|
9
|
+
import chalk from "chalk";
|
|
10
|
+
import { findLatestRun, formatDuration, listRuns, loadConfig, } from "@almightygpt/core";
|
|
11
|
+
export function createRunsCommand() {
|
|
12
|
+
const cmd = new Command("runs").description("Inspect AlmightyGPT runs. Use `runs list` and `runs latest`.");
|
|
13
|
+
cmd
|
|
14
|
+
.command("list")
|
|
15
|
+
.description("List recent runs (newest first).")
|
|
16
|
+
.option("--cwd <path>", "repo root. Defaults to current directory.")
|
|
17
|
+
.option("--limit <n>", "max number of runs to show", "20")
|
|
18
|
+
.option("--json", "JSON output", false)
|
|
19
|
+
.action(runList);
|
|
20
|
+
cmd
|
|
21
|
+
.command("latest")
|
|
22
|
+
.description("Show the most recent run.")
|
|
23
|
+
.option("--cwd <path>", "repo root. Defaults to current directory.")
|
|
24
|
+
.option("--json", "JSON output", false)
|
|
25
|
+
.action(runLatest);
|
|
26
|
+
return cmd;
|
|
27
|
+
}
|
|
28
|
+
async function runList(opts) {
|
|
29
|
+
const repoRoot = resolve(opts.cwd ?? process.cwd());
|
|
30
|
+
const config = await loadConfig(repoRoot);
|
|
31
|
+
const limit = Number.parseInt(opts.limit, 10);
|
|
32
|
+
const { runs, errors } = await listRuns({
|
|
33
|
+
repoRoot,
|
|
34
|
+
runsDir: config.runsDir,
|
|
35
|
+
limit: Number.isFinite(limit) && limit > 0 ? limit : 20,
|
|
36
|
+
});
|
|
37
|
+
if (opts.json) {
|
|
38
|
+
console.log(JSON.stringify({ runs, errors }, null, 2));
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (runs.length === 0) {
|
|
42
|
+
console.log(chalk.dim("(no runs found)"));
|
|
43
|
+
if (errors.length > 0) {
|
|
44
|
+
for (const e of errors) {
|
|
45
|
+
console.log(chalk.yellow(` ! ${e.path}: ${e.reason}`));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
for (const r of runs) {
|
|
51
|
+
printSummaryLine(r);
|
|
52
|
+
}
|
|
53
|
+
if (errors.length > 0) {
|
|
54
|
+
console.log();
|
|
55
|
+
console.log(chalk.bold("Could not parse:"));
|
|
56
|
+
for (const e of errors) {
|
|
57
|
+
console.log(chalk.yellow(` ! ${e.path}: ${e.reason}`));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async function runLatest(opts) {
|
|
62
|
+
const repoRoot = resolve(opts.cwd ?? process.cwd());
|
|
63
|
+
const config = await loadConfig(repoRoot);
|
|
64
|
+
const result = await findLatestRun(repoRoot, config.runsDir);
|
|
65
|
+
if (!result) {
|
|
66
|
+
if (opts.json) {
|
|
67
|
+
console.log(JSON.stringify({ run: null }));
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
console.log(chalk.dim("(no runs found)"));
|
|
71
|
+
}
|
|
72
|
+
process.exit(2);
|
|
73
|
+
}
|
|
74
|
+
const { meta } = result;
|
|
75
|
+
if (opts.json) {
|
|
76
|
+
console.log(JSON.stringify({ run: meta }, null, 2));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
console.log(chalk.bold(`Run ${meta.id}`));
|
|
80
|
+
console.log(` Type: ${meta.type}`);
|
|
81
|
+
console.log(` Topic: ${meta.topic}`);
|
|
82
|
+
console.log(` Status: ${statusBadge(meta.status)}`);
|
|
83
|
+
console.log(` Created: ${meta.createdAt}`);
|
|
84
|
+
if (meta.finishedAt) {
|
|
85
|
+
console.log(` Finished: ${meta.finishedAt} ${chalk.dim(`(${formatDuration(meta.createdAt, meta.finishedAt)})`)}`);
|
|
86
|
+
}
|
|
87
|
+
console.log(` Tokens: ${meta.totals.tokensIn} in / ${meta.totals.tokensOut} out`);
|
|
88
|
+
console.log(` Cost: $${meta.totals.costUsd.toFixed(4)} USD`);
|
|
89
|
+
if (meta.reviewPath)
|
|
90
|
+
console.log(` Review: ${meta.reviewPath}`);
|
|
91
|
+
if (meta.decision) {
|
|
92
|
+
console.log(` Decision: ${chalk.cyan(meta.decision.status)} ${chalk.dim(`(${meta.decision.decidedAt})`)}`);
|
|
93
|
+
}
|
|
94
|
+
if (meta.error) {
|
|
95
|
+
console.log(chalk.red(` Error: ${meta.error.message}`));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function printSummaryLine(r) {
|
|
99
|
+
const id = r.id;
|
|
100
|
+
const status = statusBadge(r.status);
|
|
101
|
+
const cost = `$${r.totalCostUsd.toFixed(4)}`;
|
|
102
|
+
const tokens = `${r.totalTokens}t`;
|
|
103
|
+
const reviewer = r.reviewer ?? "—";
|
|
104
|
+
const worker = r.worker ?? "—";
|
|
105
|
+
const decision = r.decision
|
|
106
|
+
? chalk.cyan(`[${r.decision.status}]`)
|
|
107
|
+
: "";
|
|
108
|
+
console.log(`${chalk.dim(id)} ${status} ${chalk.bold(r.topic)} ` +
|
|
109
|
+
chalk.dim(`worker=${worker} reviewer=${reviewer} ${cost} ${tokens}`) +
|
|
110
|
+
(decision ? " " + decision : ""));
|
|
111
|
+
}
|
|
112
|
+
function statusBadge(status) {
|
|
113
|
+
switch (status) {
|
|
114
|
+
case "completed":
|
|
115
|
+
return chalk.green("✓ completed");
|
|
116
|
+
case "running":
|
|
117
|
+
return chalk.yellow("● running");
|
|
118
|
+
case "failed":
|
|
119
|
+
return chalk.red("✗ failed");
|
|
120
|
+
case "aborted_budget":
|
|
121
|
+
return chalk.red("✗ aborted (budget)");
|
|
122
|
+
default:
|
|
123
|
+
return status;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=runs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../src/commands/runs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,cAAc,EACd,QAAQ,EACR,UAAU,GAEX,MAAM,mBAAmB,C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G,CAAC;IACnC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC;IAC/B,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;QACtC,CAAC,CAAC,EAAE,CAAC;IACP,OAAO,CAAC,GAAG,CACT,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,MAAM,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI;QACrD,KAAK,CAAC,GAAG,CAAC,UAAU,MAAM,aAAa,QAAQ,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC;QACpE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CACnC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,MAAc;IACjC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,WAAW;YACd,OAAO,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACpC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACnC,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC/B,KAAK,gBAAgB;YACnB,OAAO,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QACzC;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* almightygpt CLI entry point.
|
|
4
|
+
*
|
|
5
|
+
* Wires up commander with all subcommands.
|
|
6
|
+
* Subcommands live in ./commands/*.ts.
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from "commander";
|
|
9
|
+
import { createInitCommand } from "./commands/init.js";
|
|
10
|
+
import { createReviewCommand } from "./commands/review.js";
|
|
11
|
+
import { createRunsCommand } from "./commands/runs.js";
|
|
12
|
+
import { createDecideCommand } from "./commands/decide.js";
|
|
13
|
+
const program = new Command();
|
|
14
|
+
program
|
|
15
|
+
.name("almightygpt")
|
|
16
|
+
.description("The convention and tooling for multi-AI development. " +
|
|
17
|
+
"One AI writes, another AI reviews.")
|
|
18
|
+
.version("0.2.0");
|
|
19
|
+
program.addCommand(createInitCommand());
|
|
20
|
+
program.addCommand(createReviewCommand());
|
|
21
|
+
program.addCommand(createRunsCommand());
|
|
22
|
+
program.addCommand(createDecideCommand());
|
|
23
|
+
program.parseAsync(process.argv).catch((err) => {
|
|
24
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
25
|
+
process.exit(1);
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,aAAa,CAAC;KACnB,WAAW,CACV,uDAAuD;IACrD,oCAAoC,CACvC;KACA,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACxC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAC1C,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACxC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAE1C,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IACtD,OAAO,CAAC,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "almightygpt",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "AlmightyGPT CLI — the convention and tooling for multi-AI development",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"almightygpt": "./bin/almightygpt.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc -p tsconfig.json",
|
|
17
|
+
"clean": "rm -rf dist",
|
|
18
|
+
"watch": "tsc -p tsconfig.json --watch"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@almightygpt/core": "*",
|
|
22
|
+
"@almightygpt/templates": "*",
|
|
23
|
+
"chalk": "^5.3.0",
|
|
24
|
+
"commander": "^12.0.0"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=18.0.0"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"ai",
|
|
31
|
+
"code-review",
|
|
32
|
+
"multi-agent",
|
|
33
|
+
"claude",
|
|
34
|
+
"openai",
|
|
35
|
+
"gemini",
|
|
36
|
+
"developer-tools"
|
|
37
|
+
]
|
|
38
|
+
}
|