cohorte 3.1.2 → 3.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/CHANGELOG.md +31 -0
- package/bin/cli.js +33 -1
- package/core/hooks/gate.py +561 -550
- package/lib/doctor.js +48 -1
- package/lib/registry.js +118 -0
- package/package.json +3 -2
- package/scripts/kanban-move.sh +51 -11
- package/ui/docker.js +147 -0
- package/ui/jobs.js +127 -0
- package/ui/ops.js +164 -0
- package/ui/public/app.js +420 -0
- package/ui/public/index.html +13 -0
- package/ui/public/style.css +35 -0
- package/ui/runs.js +213 -0
- package/ui/server.js +299 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,37 @@ short, user-facing, most recent first. One `## <version> — <YYYY-MM-DD>` secti
|
|
|
7
7
|
> They are history and are deliberately not rewritten — every command gained a `cohorte-` prefix
|
|
8
8
|
> in 2.0.0.
|
|
9
9
|
|
|
10
|
+
## 3.2.0 — 2026-11-18
|
|
11
|
+
|
|
12
|
+
- **`cohorte ui` — a local dashboard over all your Cohorte projects.** Run it in a terminal; it opens
|
|
13
|
+
a page on `127.0.0.1` (session token, loopback Host/Origin checks, strict CSP) listing every
|
|
14
|
+
registered project (add one by path, or pick from the repos Claude Code already knows). Per project:
|
|
15
|
+
an overview, doctor checks, specs with their reports, cost by command, worktrees (create/remove,
|
|
16
|
+
dev servers with live logs) and the **Docker** stack — services, health and ports, start / stop /
|
|
17
|
+
restart / down (never `-v`) and logs. Zero dependencies, nothing leaves the machine.
|
|
18
|
+
- **Run `/cohorte-*` commands from the page.** Headless `claude -p` runs with the project's gate
|
|
19
|
+
asked first; permission asks and interview questions are answered in the page, and a reply resumes
|
|
20
|
+
the same session. It talks to Claude only through Cohorte commands — it is not a chat.
|
|
21
|
+
- **Worktree creation checks Docker first.** `scripts/new-feature.sh` creates the worktree's database
|
|
22
|
+
inside a compose service, and failed late and obscurely when Docker or that service was down; the
|
|
23
|
+
dashboard now says so up front and offers to start the stack.
|
|
24
|
+
|
|
25
|
+
## 3.1.3 — 2026-11-16
|
|
26
|
+
|
|
27
|
+
- **Kanban moves on macOS use a kernel lock.** macOS has no `flock(1)`, so parallel moves on one
|
|
28
|
+
board fell back to a hand-made `mkdir` lock — and a move killed while holding it left a stale
|
|
29
|
+
lock that the waiters broke all at once, letting two writers in: about half the runs with a
|
|
30
|
+
dozen parallel moves lost one. The lock is now a real `flock` taken by `python3` (which the gate
|
|
31
|
+
already requires) on the shell's own file descriptor: the kernel releases it if the move dies, so
|
|
32
|
+
there is nothing stale to break. The `mkdir` lock stays as a last resort (no flock, no python3),
|
|
33
|
+
with stale-lock breaking serialized; all locks are keyed by the board's physical path.
|
|
34
|
+
- **`cohorte doctor` reports folder trust.** Claude Code ignores a project's `permissions.allow`
|
|
35
|
+
until its folder has been trusted (the dialog an interactive `claude` shows once); under
|
|
36
|
+
`claude -p` — CI, francois — every pipeline script then asks or is refused. Doctor now warns and
|
|
37
|
+
says how to fix it. The gate itself runs either way.
|
|
38
|
+
- **The nightly real-model run is gone.** `scripts/ci/llm-e2e.sh` stays, to run by hand.
|
|
39
|
+
- **Internal:** the gate's analyzer is split into modules; no behaviour change.
|
|
40
|
+
|
|
10
41
|
## 3.1.2 — 2026-11-16
|
|
11
42
|
|
|
12
43
|
- **A red test piped into `| tail` no longer passes the preflight.** A quiet variant such as
|
package/bin/cli.js
CHANGED
|
@@ -35,6 +35,7 @@ Usage:
|
|
|
35
35
|
cohorte doctor [project] [--porcelain | --json | --panel]
|
|
36
36
|
cohorte specs [project] [--porcelain | --json | --panel]
|
|
37
37
|
cohorte metrics [project] [--days=N] [--since=ISO] [--runs] [--json]
|
|
38
|
+
cohorte ui [--port=N] [--no-open] Local dashboard over every registered project
|
|
38
39
|
cohorte version
|
|
39
40
|
|
|
40
41
|
Where things go:
|
|
@@ -69,7 +70,9 @@ let projectScope = false;
|
|
|
69
70
|
const metricsFlags = [];
|
|
70
71
|
const isMetricsFlag = (a) =>
|
|
71
72
|
a === '--json' || a === '--runs' || a.startsWith('--days=') || a.startsWith('--since=');
|
|
72
|
-
const VERBS = ['install', 'update', 'sync', 'uninstall', 'metrics', 'specs', 'doctor'];
|
|
73
|
+
const VERBS = ['install', 'update', 'sync', 'uninstall', 'metrics', 'specs', 'doctor', 'ui'];
|
|
74
|
+
let uiPort = 0;
|
|
75
|
+
let uiOpen = true;
|
|
73
76
|
|
|
74
77
|
for (const a of args) {
|
|
75
78
|
if (!mode && VERBS.includes(a)) mode = a;
|
|
@@ -77,6 +80,11 @@ for (const a of args) {
|
|
|
77
80
|
else if (isMetricsFlag(a)) { if (a === '--json') format = 'json'; metricsFlags.push(a); }
|
|
78
81
|
else if (a === 'version' || a === '--version' || a === '-v') { console.log(VERSION); process.exit(0); }
|
|
79
82
|
else if (a === 'help' || a === '--help' || a === '-h') usage(0);
|
|
83
|
+
else if (a.startsWith('--port=') && mode === 'ui') {
|
|
84
|
+
uiPort = Number(a.slice(7));
|
|
85
|
+
if (!Number.isInteger(uiPort) || uiPort < 0 || uiPort > 65535) { console.error('error: --port must be 0-65535'); process.exit(2); }
|
|
86
|
+
}
|
|
87
|
+
else if (a === '--no-open' && mode === 'ui') uiOpen = false;
|
|
80
88
|
else if (a === '--purge') purge = true;
|
|
81
89
|
else if (a === '--project') projectScope = true;
|
|
82
90
|
// 2.x flags. --global is what 3.x always does; --runtime=claude is the only runtime left.
|
|
@@ -98,8 +106,32 @@ if ((mode === 'install' || mode === 'update') && target) {
|
|
|
98
106
|
+ ' 2.x "bundled" installs (a core copied into the repo) no longer exist.');
|
|
99
107
|
process.exit(2);
|
|
100
108
|
}
|
|
109
|
+
if (mode === 'ui' && target) {
|
|
110
|
+
console.error('error: `cohorte ui` is a dashboard over all your projects and takes no path.\n'
|
|
111
|
+
+ ' Add a project from the page, or open one with its own `cohorte doctor <path>`.');
|
|
112
|
+
process.exit(2);
|
|
113
|
+
}
|
|
101
114
|
const project = target || process.cwd();
|
|
102
115
|
|
|
116
|
+
// --- dashboard ---------------------------------------------------------------
|
|
117
|
+
if (mode === 'ui') {
|
|
118
|
+
const { create } = require('../ui/server.js');
|
|
119
|
+
const ui = create({ globalDir, version: VERSION });
|
|
120
|
+
const bye = () => { ui.jobs.stopAll(); ui.runs.stopAll(); process.exit(0); };
|
|
121
|
+
process.on('SIGINT', bye);
|
|
122
|
+
process.on('SIGTERM', bye);
|
|
123
|
+
process.on('exit', () => { ui.jobs.stopAll(); ui.runs.stopAll(); });
|
|
124
|
+
ui.listen(uiPort).then((l) => {
|
|
125
|
+
console.log(`cohorte ui — ${l.url}\n Local only (127.0.0.1); the link carries this session's token. Ctrl-C stops it and the dev servers it started.`);
|
|
126
|
+
if (uiOpen && process.stdout.isTTY) {
|
|
127
|
+
const [cmd, ...a] = process.platform === 'darwin' ? ['open'] : process.platform === 'win32' ? ['cmd', '/c', 'start', ''] : ['xdg-open'];
|
|
128
|
+
const c = spawnSync(cmd, [...a, l.url], { stdio: 'ignore' });
|
|
129
|
+
if (c.error) console.log(' (could not open a browser — open the link above)');
|
|
130
|
+
}
|
|
131
|
+
}).catch((e) => { console.error(`error: ${e && e.message ? e.message : e}`); process.exit(1); });
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
103
135
|
// --- read-only reports -------------------------------------------------------
|
|
104
136
|
if (mode === 'specs' || mode === 'doctor') {
|
|
105
137
|
const report = require('./report.js');
|