great-cto 3.58.1 → 3.58.2
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "great-cto",
|
|
3
3
|
"description": "You already have the agent. This is everything around it. great_cto runs Claude Code as a pipeline of 72 specialist agents \u2014 an independent model checks each stage before the next builds on it, spending caps refuse rather than warn, and three decisions stay yours: what gets built, how, and whether it ships.",
|
|
4
|
-
"version": "3.58.
|
|
4
|
+
"version": "3.58.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Alexander Velikiy",
|
|
7
7
|
"url": "https://hashnode.com/@Greatcto"
|
|
@@ -4,7 +4,16 @@ import { fileURLToPath } from 'url';
|
|
|
4
4
|
import os from 'os';
|
|
5
5
|
|
|
6
6
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
|
|
7
|
+
// `--port N` (or `--port=N`) first — server.mjs's usage line documents it, and
|
|
8
|
+
// ignoring it put a test board started with `--port 3177` onto :3141 (3.58.1).
|
|
9
|
+
// Then BOARD_PORT, PORT, and 3141. A value that is not a port is skipped.
|
|
10
|
+
export function portFrom(argv = process.argv, env = process.env) {
|
|
11
|
+
const ok = (v) => { const n = Number(v); return Number.isInteger(n) && n > 0 && n < 65536 ? n : null; };
|
|
12
|
+
const i = argv.indexOf('--port');
|
|
13
|
+
const eq = argv.find((a) => typeof a === 'string' && a.startsWith('--port='));
|
|
14
|
+
return ok(i > -1 ? argv[i + 1] : eq ? eq.slice(7) : null) ?? ok(env.BOARD_PORT) ?? ok(env.PORT) ?? 3141;
|
|
15
|
+
}
|
|
16
|
+
const PORT = portFrom();
|
|
8
17
|
const PUBLIC = path.join(__dirname, '..', 'public');
|
|
9
18
|
// Build version — read the plugin manifest this board ships inside (packages/board → ../../.claude-plugin).
|
|
10
19
|
const BUILD_VERSION = (() => {
|
|
@@ -13,6 +13,7 @@ import { sseClients, notifHistory } from './state.mjs';
|
|
|
13
13
|
import { autoRegisterProject, listProjects, resolveProjectCwd, resolveProjectInfo, getChangeTier, readProjectsRegistry, getRegistryDegradation } from './projects.mjs';
|
|
14
14
|
import { readVerdictsWithHealth } from './verdicts.mjs';
|
|
15
15
|
import { agentUsage, usageSnapshot } from '../../../scripts/lib/agent-usage.mjs';
|
|
16
|
+
import { isProjectState } from '../../../scripts/lib/great-cto-scope.mjs';
|
|
16
17
|
import { usageIndexSnapshot, summarizeUsage, readCodexTitles, readClaudeLimits, claudeRecorder } from '../../../scripts/lib/session-usage.mjs';
|
|
17
18
|
import { outcomes as computeOutcomes } from '../../../scripts/lib/outcomes.mjs';
|
|
18
19
|
import { reviewerStatus } from '../../../scripts/lib/required-reviewers.mjs';
|
|
@@ -276,6 +277,13 @@ async function dispatch(req, res, url, cwd) {
|
|
|
276
277
|
return;
|
|
277
278
|
}
|
|
278
279
|
const view = String(parsed.view || '');
|
|
280
|
+
// Only into a project. The board's cwd can be a directory that is not one —
|
|
281
|
+
// a release worktree, deleted since — and mkdir here recreated it (3.58.1).
|
|
282
|
+
if (!isProjectState(path.join(c, '.great_cto'))) {
|
|
283
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
284
|
+
res.end(JSON.stringify({ ok: true, view, recorded: false, why: 'not a project' }));
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
279
287
|
try {
|
|
280
288
|
recordView({ root: c, view });
|
|
281
289
|
} catch (e) {
|
|
@@ -284,7 +292,7 @@ async function dispatch(req, res, url, cwd) {
|
|
|
284
292
|
return;
|
|
285
293
|
}
|
|
286
294
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
287
|
-
res.end(JSON.stringify({ ok: true, view }));
|
|
295
|
+
res.end(JSON.stringify({ ok: true, view, recorded: true }));
|
|
288
296
|
});
|
|
289
297
|
return true;
|
|
290
298
|
}
|
package/package.json
CHANGED