cool-workflow 0.1.88 → 0.1.90
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +44 -1
- package/apps/architecture-review/app.json +1 -1
- package/apps/architecture-review-fast/app.json +1 -1
- package/apps/end-to-end-golden-path/app.json +1 -1
- package/apps/pr-review-fix-ci/app.json +1 -1
- package/apps/release-cut/app.json +1 -1
- package/apps/research-synthesis/app.json +1 -1
- package/dist/capability-core.js +123 -5
- package/dist/capability-registry.js +6 -0
- package/dist/cli/command-surface.js +99 -7
- package/dist/cli.js +27 -1
- package/dist/clones.js +162 -0
- package/dist/drive.js +35 -1
- package/dist/mcp/tool-call.js +4 -0
- package/dist/mcp/tool-definitions.js +5 -0
- package/dist/orchestrator/report.js +6 -0
- package/dist/orchestrator.js +37 -6
- package/dist/remote-source.js +444 -0
- package/dist/term.js +54 -8
- package/dist/version.js +1 -1
- package/docs/agent-delegation-drive.7.md +6 -0
- package/docs/cli-mcp-parity.7.md +11 -2
- package/docs/contract-migration-tooling.7.md +6 -0
- package/docs/control-plane-scheduling.7.md +6 -0
- package/docs/durable-state-and-locking.7.md +6 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +6 -0
- package/docs/execution-backends.7.md +6 -0
- package/docs/multi-agent-cli-mcp-surface.7.md +6 -0
- package/docs/multi-agent-eval-replay-harness.7.md +6 -0
- package/docs/multi-agent-operator-ux.7.md +6 -0
- package/docs/node-snapshot-diff-replay.7.md +6 -0
- package/docs/observability-cost-accounting.7.md +6 -0
- package/docs/project-index.md +16 -5
- package/docs/real-execution-backends.7.md +6 -0
- package/docs/release-and-migration.7.md +6 -0
- package/docs/release-tooling.7.md +6 -0
- package/docs/remote-source-review.7.md +88 -0
- package/docs/run-registry-control-plane.7.md +6 -0
- package/docs/run-retention-reclamation.7.md +6 -0
- package/docs/state-explosion-management.7.md +6 -0
- package/docs/team-collaboration.7.md +6 -0
- package/docs/web-desktop-workbench.7.md +6 -0
- package/manifest/plugin.manifest.json +1 -1
- package/manifest/source-context-profiles.json +1 -1
- package/package.json +1 -1
- package/scripts/canonical-apps.js +4 -4
- package/scripts/dogfood-release.js +1 -1
- package/scripts/golden-path.js +4 -4
- package/scripts/release-gate.sh +11 -2
package/dist/clones.js
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// src/clones.ts — manage the remote-source clone cache that `--link`/URL reviews populate.
|
|
3
|
+
//
|
|
4
|
+
// The cache lives under resolveCwHome()/clones/<hash>/ (one content-addressed checkout per
|
|
5
|
+
// URL+ref). `cw clones list` inspects it; `cw clones gc` reclaims it (a TTL sweep, or --all).
|
|
6
|
+
// Pure filesystem work — no network, no git. Fail closed: gc only ever deletes a path it has
|
|
7
|
+
// proven is INSIDE the clones root (the hash dir names are hex, so this always holds; the
|
|
8
|
+
// assertion guards against a future change).
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.listClones = listClones;
|
|
14
|
+
exports.gcClones = gcClones;
|
|
15
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
16
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
17
|
+
const run_registry_1 = require("./run-registry");
|
|
18
|
+
function isTrue(value) {
|
|
19
|
+
return value === true || value === "true" || value === "1" || value === 1;
|
|
20
|
+
}
|
|
21
|
+
function optionalNumber(value) {
|
|
22
|
+
if (value === undefined || value === null || value === "")
|
|
23
|
+
return undefined;
|
|
24
|
+
const n = Number(value);
|
|
25
|
+
return Number.isFinite(n) ? n : undefined;
|
|
26
|
+
}
|
|
27
|
+
function clonesRoot(args) {
|
|
28
|
+
// resolveCwHome reads CW_HOME/XDG_STATE_HOME from the environment — the same root the
|
|
29
|
+
// materialize step writes to, so list/gc see exactly what `--link` created.
|
|
30
|
+
void args;
|
|
31
|
+
return node_path_1.default.join((0, run_registry_1.resolveCwHome)(), "clones");
|
|
32
|
+
}
|
|
33
|
+
/** Total bytes of a directory tree, NOT following symlinks (lstat). Missing/unreadable
|
|
34
|
+
* entries are skipped — sizing is best-effort and must never throw. */
|
|
35
|
+
function dirSize(dir) {
|
|
36
|
+
let total = 0;
|
|
37
|
+
const walk = (d) => {
|
|
38
|
+
let names;
|
|
39
|
+
try {
|
|
40
|
+
names = node_fs_1.default.readdirSync(d);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
for (const name of names) {
|
|
46
|
+
const p = node_path_1.default.join(d, name);
|
|
47
|
+
let st;
|
|
48
|
+
try {
|
|
49
|
+
st = node_fs_1.default.lstatSync(p);
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if (st.isDirectory())
|
|
55
|
+
walk(p);
|
|
56
|
+
else
|
|
57
|
+
total += st.size;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
walk(dir);
|
|
61
|
+
return total;
|
|
62
|
+
}
|
|
63
|
+
function readEntries(root) {
|
|
64
|
+
let names = [];
|
|
65
|
+
try {
|
|
66
|
+
names = node_fs_1.default.readdirSync(root);
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return []; // no cache yet
|
|
70
|
+
}
|
|
71
|
+
const entries = [];
|
|
72
|
+
for (const hash of names) {
|
|
73
|
+
if (hash.startsWith("."))
|
|
74
|
+
continue; // skip in-progress .stage-* temp dirs
|
|
75
|
+
const dir = node_path_1.default.join(root, hash);
|
|
76
|
+
let st;
|
|
77
|
+
try {
|
|
78
|
+
st = node_fs_1.default.statSync(dir);
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
if (!st.isDirectory())
|
|
84
|
+
continue;
|
|
85
|
+
let meta = {};
|
|
86
|
+
try {
|
|
87
|
+
meta = JSON.parse(node_fs_1.default.readFileSync(node_path_1.default.join(dir, ".cw-clone-meta.json"), "utf8"));
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
/* legacy/partial entry without meta — still listable/reclaimable */
|
|
91
|
+
}
|
|
92
|
+
entries.push({
|
|
93
|
+
hash,
|
|
94
|
+
url: typeof meta.url === "string" ? meta.url : "(unknown)",
|
|
95
|
+
kind: typeof meta.kind === "string" ? meta.kind : "git",
|
|
96
|
+
ref: typeof meta.ref === "string" ? meta.ref : null,
|
|
97
|
+
fetchedAt: typeof meta.fetchedAt === "string" ? meta.fetchedAt : null,
|
|
98
|
+
commit: typeof meta.commit === "string" ? meta.commit : null,
|
|
99
|
+
bytes: dirSize(dir)
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
entries.sort((a, b) => (a.fetchedAt || "").localeCompare(b.fetchedAt || ""));
|
|
103
|
+
return entries;
|
|
104
|
+
}
|
|
105
|
+
/** `cw clones list` — every cached remote checkout with its origin, commit, age, and size. */
|
|
106
|
+
function listClones(args) {
|
|
107
|
+
const root = clonesRoot(args);
|
|
108
|
+
const entries = readEntries(root);
|
|
109
|
+
return {
|
|
110
|
+
schemaVersion: 1,
|
|
111
|
+
clonesDir: root,
|
|
112
|
+
count: entries.length,
|
|
113
|
+
totalBytes: entries.reduce((sum, e) => sum + e.bytes, 0),
|
|
114
|
+
entries
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/** `cw clones gc [--older-than-days N] [--all]` — reclaim cached checkouts. Default keeps
|
|
118
|
+
* entries fetched within the last 30 days; `--all` removes every entry. Deletes ONLY paths
|
|
119
|
+
* proven inside the clones root (fail closed). `--now` (ISO) is injectable for deterministic
|
|
120
|
+
* tests; an entry with no fetchedAt is treated as old (eligible). */
|
|
121
|
+
function gcClones(args) {
|
|
122
|
+
const root = clonesRoot(args);
|
|
123
|
+
const all = isTrue(args.all);
|
|
124
|
+
let olderThanDays = null;
|
|
125
|
+
if (!all) {
|
|
126
|
+
const raw = args.olderThanDays ?? args["older-than-days"];
|
|
127
|
+
olderThanDays = optionalNumber(raw) ?? 30;
|
|
128
|
+
if (!Number.isFinite(olderThanDays) || olderThanDays < 0) {
|
|
129
|
+
throw new Error(`--older-than-days must be a non-negative number (got ${String(raw)})`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
let now = Date.now();
|
|
133
|
+
if (args.now !== undefined) {
|
|
134
|
+
now = new Date(String(args.now)).getTime();
|
|
135
|
+
if (!Number.isFinite(now))
|
|
136
|
+
throw new Error(`--now must be a valid ISO date (got ${String(args.now)})`);
|
|
137
|
+
}
|
|
138
|
+
const cutoff = olderThanDays != null ? now - olderThanDays * 24 * 60 * 60 * 1000 : Infinity;
|
|
139
|
+
const rootResolved = node_path_1.default.resolve(root);
|
|
140
|
+
const removed = [];
|
|
141
|
+
let freedBytes = 0;
|
|
142
|
+
const entries = readEntries(root);
|
|
143
|
+
for (const entry of entries) {
|
|
144
|
+
if (!all) {
|
|
145
|
+
// Fail-SAFE: a TTL sweep reclaims only entries we can PROVE are old enough. An entry with
|
|
146
|
+
// no (or an unparseable) fetchedAt is a partial/legacy materialize that never wrote meta —
|
|
147
|
+
// we cannot date it, so we KEEP it (never delete what you can't age). `--all` clears them.
|
|
148
|
+
if (!entry.fetchedAt)
|
|
149
|
+
continue;
|
|
150
|
+
const age = new Date(entry.fetchedAt).getTime();
|
|
151
|
+
if (!Number.isFinite(age) || age > cutoff)
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
const dir = node_path_1.default.join(root, entry.hash);
|
|
155
|
+
if (!node_path_1.default.resolve(dir).startsWith(rootResolved + node_path_1.default.sep))
|
|
156
|
+
continue; // containment, fail closed
|
|
157
|
+
node_fs_1.default.rmSync(dir, { recursive: true, force: true });
|
|
158
|
+
removed.push({ hash: entry.hash, url: entry.url, bytes: entry.bytes });
|
|
159
|
+
freedBytes += entry.bytes;
|
|
160
|
+
}
|
|
161
|
+
return { schemaVersion: 1, clonesDir: root, removed, freedBytes, keptCount: entries.length - removed.length, olderThanDays, all };
|
|
162
|
+
}
|
package/dist/drive.js
CHANGED
|
@@ -32,6 +32,7 @@ exports.drive = drive;
|
|
|
32
32
|
exports.drivePreview = drivePreview;
|
|
33
33
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
34
34
|
const node_path_1 = __importDefault(require("node:path"));
|
|
35
|
+
const term_1 = require("./term");
|
|
35
36
|
const dispatch_1 = require("./dispatch");
|
|
36
37
|
const execution_backend_1 = require("./execution-backend");
|
|
37
38
|
const worker_isolation_1 = require("./worker-isolation");
|
|
@@ -690,6 +691,34 @@ function drive(runner, runId, options = {}) {
|
|
|
690
691
|
const cap = Math.max(1, Math.floor(run.workflow.limits?.maxConcurrentAgents || 1));
|
|
691
692
|
return Math.max(1, Math.min(cap, phase.taskIds.length));
|
|
692
693
|
};
|
|
694
|
+
// Phase-boundary progress (brew-style): announce each phase when it becomes active
|
|
695
|
+
// and when it finishes — `==> Map ✓ (6/6)` / `==> Assess … (3/6)`. Describes CW's OWN
|
|
696
|
+
// phases (vendor-neutral); goes to stderr via emitProgress so stdout stays clean data.
|
|
697
|
+
const announcedPhaseComplete = new Set();
|
|
698
|
+
let activePhaseId;
|
|
699
|
+
const titleCase = (s) => (s ? s.charAt(0).toUpperCase() + s.slice(1) : s);
|
|
700
|
+
const emitPhaseProgress = (run) => {
|
|
701
|
+
for (const ph of run.phases || []) {
|
|
702
|
+
const phaseTasks = run.tasks.filter((task) => ph.taskIds.includes(task.id));
|
|
703
|
+
const total = phaseTasks.length;
|
|
704
|
+
if (total === 0)
|
|
705
|
+
continue;
|
|
706
|
+
const done = phaseTasks.filter((task) => task.status === "completed").length;
|
|
707
|
+
const label = titleCase(ph.name || ph.id);
|
|
708
|
+
if (done >= total) {
|
|
709
|
+
if (!announcedPhaseComplete.has(ph.id)) {
|
|
710
|
+
announcedPhaseComplete.add(ph.id);
|
|
711
|
+
emitProgress((0, term_1.phaseProgressLine)(label, done, total, ph.mode, process.stderr));
|
|
712
|
+
}
|
|
713
|
+
continue;
|
|
714
|
+
}
|
|
715
|
+
if (ph.id !== activePhaseId) {
|
|
716
|
+
activePhaseId = ph.id;
|
|
717
|
+
emitProgress((0, term_1.phaseProgressLine)(label, done, total, ph.mode, process.stderr));
|
|
718
|
+
}
|
|
719
|
+
return; // only the first not-yet-complete phase is "active"
|
|
720
|
+
}
|
|
721
|
+
};
|
|
693
722
|
for (let i = 0; i < maxIterations; i++) {
|
|
694
723
|
const width = concurrency > 1 ? concurrency : autoWidth(runner.loadRun(runId));
|
|
695
724
|
const roundSteps = width > 1 ? driveConcurrentRound(ctx, width) : [driveStep(ctx)];
|
|
@@ -706,6 +735,10 @@ function drive(runner, runId, options = {}) {
|
|
|
706
735
|
.filter(Boolean)
|
|
707
736
|
.join(" "));
|
|
708
737
|
}
|
|
738
|
+
// Brew-style phase boundaries: after each round, announce a newly-active phase and
|
|
739
|
+
// any phase that just finished (`==> Map ✓ (6/6)` / `==> Assess … (3/6)`). Cheap —
|
|
740
|
+
// reuses the run we just advanced; goes to stderr via emitProgress so stdout is clean.
|
|
741
|
+
emitPhaseProgress(runner.loadRun(runId));
|
|
709
742
|
const last = roundSteps[roundSteps.length - 1];
|
|
710
743
|
if (options.once)
|
|
711
744
|
break;
|
|
@@ -739,7 +772,8 @@ function drive(runner, runId, options = {}) {
|
|
|
739
772
|
parkedWorkers,
|
|
740
773
|
commitId: committed?.id,
|
|
741
774
|
reportPath: run.paths.report,
|
|
742
|
-
statePath: run.paths.state
|
|
775
|
+
statePath: run.paths.state,
|
|
776
|
+
agentConfigured: agentConfigured(config)
|
|
743
777
|
};
|
|
744
778
|
}
|
|
745
779
|
/** Read-only, deterministic preview of the NEXT drive step for a run — no mutation,
|
package/dist/mcp/tool-call.js
CHANGED
|
@@ -402,6 +402,10 @@ function callTool(name, args) {
|
|
|
402
402
|
return (0, capability_core_1.gcRun)((0, capability_core_1.runRegistryFor)(args, runner), (0, capability_core_1.optionalString)(args.runId), args);
|
|
403
403
|
case "cw_gc_verify":
|
|
404
404
|
return (0, capability_core_1.gcVerify)((0, capability_core_1.runRegistryFor)(args, runner), String(args.runId || ""), args);
|
|
405
|
+
case "cw_clones_list":
|
|
406
|
+
return (0, capability_core_1.listClones)(args);
|
|
407
|
+
case "cw_clones_gc":
|
|
408
|
+
return (0, capability_core_1.gcClones)(args);
|
|
405
409
|
case "cw_telemetry_verify":
|
|
406
410
|
return (0, capability_core_1.telemetryVerify)(runner, args);
|
|
407
411
|
case "cw_history":
|
|
@@ -952,6 +952,11 @@ function toolDefinitions() {
|
|
|
952
952
|
scope: stringSchema("home (default, cross-repo) or repo"),
|
|
953
953
|
runId: stringSchema("Run id to verify")
|
|
954
954
|
}),
|
|
955
|
+
capabilityTool("clones.list", "List the cached remote-source checkouts that `--link`/URL reviews populate (origin URL, kind, commit, age, bytes). Read-only. Peer of `cw clones list`.", {}),
|
|
956
|
+
capabilityTool("clones.gc", "Reclaim cached remote-source checkouts: a TTL sweep (entries older than --older-than-days, default 30) or --all. Deletes only inside the clones cache. Peer of `cw clones gc`.", {
|
|
957
|
+
olderThanDays: numberSchema("Reclaim checkouts fetched more than N days ago (default 30; ignored with all)"),
|
|
958
|
+
all: booleanSchema("Reclaim every cached checkout")
|
|
959
|
+
}),
|
|
955
960
|
capabilityTool("telemetry.verify", "Re-prove a run's telemetry attestation ledger offline: prevHash chain linkage + independent per-record hash recompute (never trusts the stored hash), and optionally re-run ed25519 checks with a public key. A forged or edited record fails it. Peer of `cw telemetry verify`.", {
|
|
956
961
|
cwd: stringSchema("Repo workspace"),
|
|
957
962
|
runId: stringSchema("Run id to verify"),
|
|
@@ -39,6 +39,12 @@ function writeReport(run) {
|
|
|
39
39
|
`- Created: ${run.createdAt}`,
|
|
40
40
|
`- Updated: ${run.updatedAt}`,
|
|
41
41
|
`- Repository: ${String(run.inputs.repo || run.cwd)}`,
|
|
42
|
+
// Remote provenance (v0.1.91): when the repo was materialized from a --link/URL, record
|
|
43
|
+
// the sanitized origin + resolved commit so the report itself says where the code came
|
|
44
|
+
// from. Conditional — absent for a local-repo run, so existing reports stay byte-identical.
|
|
45
|
+
...(run.inputs.sourceUrl
|
|
46
|
+
? [`- Source: ${String(run.inputs.sourceUrl)}${run.inputs.sourceCommit ? `@${String(run.inputs.sourceCommit)}` : ""}`]
|
|
47
|
+
: []),
|
|
42
48
|
`- Question: ${String(run.inputs.question || "")}`,
|
|
43
49
|
`- Invariants: ${formatInputList(run.inputs.invariant)}`,
|
|
44
50
|
`- Loop Stage: ${run.loopStage}`,
|
package/dist/orchestrator.js
CHANGED
|
@@ -806,7 +806,7 @@ function parseArgv(argv) {
|
|
|
806
806
|
}
|
|
807
807
|
if (!token.startsWith("--")) {
|
|
808
808
|
// Single-dash short flag aliases: -q → question, -r → repo, -a → agent-command, -h → help, -v → version
|
|
809
|
-
const shortMap = { q: "question", r: "repo", a: "agent-command", h: "help", v: "version" };
|
|
809
|
+
const shortMap = { q: "question", r: "repo", d: "dir", l: "link", a: "agent-command", h: "help", v: "version" };
|
|
810
810
|
const flag = token.slice(1);
|
|
811
811
|
// Handle combined short flags like -qr (not common but safe to ignore)
|
|
812
812
|
const key = shortMap[flag] || flag;
|
|
@@ -824,7 +824,13 @@ function parseArgv(argv) {
|
|
|
824
824
|
}
|
|
825
825
|
else {
|
|
826
826
|
key = withoutPrefix;
|
|
827
|
-
value
|
|
827
|
+
// A flag's value is never ANOTHER flag: reject a next token starting with `-`
|
|
828
|
+
// (single OR double dash), matching the single-dash branch above. Without this, a
|
|
829
|
+
// valueless `--flag` greedily swallowed the following single-dash flag — e.g.
|
|
830
|
+
// `run app --drive -dir /p` made `drive="-dir"` and dropped `-dir` entirely. A
|
|
831
|
+
// value that legitimately starts with `-` still goes through `--key=-value` or
|
|
832
|
+
// after a `--` end-of-options marker (both handled above).
|
|
833
|
+
value = rest[index + 1] && !rest[index + 1].startsWith("-") ? rest[++index] : true;
|
|
828
834
|
}
|
|
829
835
|
appendOption(options, key, value);
|
|
830
836
|
}
|
|
@@ -835,7 +841,7 @@ exports.KNOWN_COMMANDS = new Set([
|
|
|
835
841
|
"help", "list", "doctor", "info", "search", "man", "init", "quickstart", "plan", "status", "next",
|
|
836
842
|
"dispatch", "result", "state", "commit", "report", "app", "sandbox",
|
|
837
843
|
"backend", "contract", "node", "feedback", "worker", "audit", "candidate",
|
|
838
|
-
"review", "loop", "schedule", "routine", "registry", "run", "queue",
|
|
844
|
+
"review", "loop", "schedule", "routine", "registry", "run", "queue", "clones",
|
|
839
845
|
"history", "audit-run", "multi-agent", "topology", "summary", "blackboard",
|
|
840
846
|
"coordinator", "metrics", "operator", "sched", "gc", "telemetry",
|
|
841
847
|
"migration", "demo", "workbench", "approve", "reject", "comment", "handoff",
|
|
@@ -923,23 +929,48 @@ function formatInfo(appId, data) {
|
|
|
923
929
|
return lines.join("\n");
|
|
924
930
|
}
|
|
925
931
|
function formatHelp() {
|
|
932
|
+
// Help is written to stdout, so color must key off stdout (not the term default).
|
|
933
|
+
const out = process.stdout;
|
|
934
|
+
const moreCommands = ("list search info init plan status next dispatch result state commit report app " +
|
|
935
|
+
"sandbox backend contract node feedback worker audit candidate review loop schedule " +
|
|
936
|
+
"routine registry run queue clones history quickstart audit-run multi-agent topology summary " +
|
|
937
|
+
"blackboard coordinator metrics operator sched gc telemetry migration demo workbench " +
|
|
938
|
+
"approve reject comment handoff graph eval man version update fix").split(" ");
|
|
939
|
+
// Wrap the command list into clean, indented, pipe-joined lines (<=76 cols) instead of
|
|
940
|
+
// one 400-char line that wraps raggedly and merges with the next shell prompt. Pipe-joined
|
|
941
|
+
// (no internal spaces) keeps it parseable by the CLI/MCP parity help-token check.
|
|
942
|
+
const wrapped = [];
|
|
943
|
+
let line = " ";
|
|
944
|
+
for (const cmd of moreCommands) {
|
|
945
|
+
const sep = line.length > 2 ? "|" : "";
|
|
946
|
+
if (line.length + sep.length + cmd.length > 76) {
|
|
947
|
+
wrapped.push(line);
|
|
948
|
+
line = " ";
|
|
949
|
+
}
|
|
950
|
+
line += (line.length > 2 ? "|" : "") + cmd;
|
|
951
|
+
}
|
|
952
|
+
if (line.length > 2)
|
|
953
|
+
wrapped.push(line);
|
|
926
954
|
return [
|
|
927
|
-
(0, term_1.bold)("Cool Workflow"),
|
|
955
|
+
(0, term_1.bold)("Cool Workflow", out),
|
|
928
956
|
"",
|
|
929
957
|
" -q \"question\" [-claude|-codex|-deepseek] Ask a question, get a report",
|
|
958
|
+
" -q \"question\" --link <url> Review a remote repo by URL",
|
|
930
959
|
" version Show version",
|
|
931
960
|
" update Update to latest release",
|
|
932
961
|
" doctor Check setup",
|
|
933
962
|
" fix Show fix commands for setup issues",
|
|
934
963
|
"",
|
|
935
|
-
(0, term_1.bold)("Flags"),
|
|
964
|
+
(0, term_1.bold)("Flags", out),
|
|
936
965
|
" -q, --question TEXT The task or question to answer",
|
|
937
966
|
" -r, --repo PATH Target repository path (default: .)",
|
|
967
|
+
" -d, --dir PATH Project folder to review (alias for --repo)",
|
|
938
968
|
" -claude Use Claude agent",
|
|
939
969
|
" -codex Use Codex agent",
|
|
940
970
|
" -deepseek Use DeepSeek (via opencode)",
|
|
941
971
|
"",
|
|
942
|
-
"
|
|
972
|
+
(0, term_1.bold)("More commands", out),
|
|
973
|
+
...wrapped
|
|
943
974
|
].join("\n");
|
|
944
975
|
}
|
|
945
976
|
function appendOption(options, key, value) {
|