gcf-board 0.25.0 → 0.26.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.
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>GCF board</title>
7
- <script type="module" crossorigin src="/assets/index-DcxrkRUf.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-C3GmqyEz.css">
7
+ <script type="module" crossorigin src="/assets/index-BkakrCSw.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-CAApAJNx.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
@@ -273,11 +273,26 @@ export function listThreads(dir) {
273
273
  /** Whether the main run's lock (`runs/<main>.lock`) names a live process. */
274
274
  function mainBusy(file) {
275
275
  if (!file) return false;
276
- try {
277
- return alive(Number(readFileSync(file, 'utf8').split('\n')[0]));
278
- } catch {
279
- return false;
280
- }
276
+ const pidIn = (f, read) => {
277
+ try {
278
+ // `builder: null` after a release would read as 0, which `kill(0, 0)` answers as alive.
279
+ const pid = Number(read(readFileSync(f, 'utf8')));
280
+
281
+ return Number.isInteger(pid) && pid > 0 && alive(pid);
282
+ } catch {
283
+ return false;
284
+ }
285
+ };
286
+
287
+ // The builder a main run's yield let in holds the checkout too, its run dead or not (core
288
+ // lib/build-queue.js): `.gcf-session/.main-run.yield` beside `runs/.main-run.lock`.
289
+ return (
290
+ pidIn(file, (t) => t.split('\n')[0]) ||
291
+ pidIn(
292
+ path.join(path.dirname(path.dirname(file)), '.main-run.yield'),
293
+ (t) => JSON.parse(t).builder,
294
+ )
295
+ );
281
296
  }
282
297
 
283
298
  const hashOf = (text) => createHash('sha256').update(text).digest('hex').slice(0, 16);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gcf-session",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "description": "The session engine of GCF: one agent session and a run as a chain of them, the chat protocol, the provider adapters. Bundled by gcf-harness-aif-ext and gcf-board, never published.",
6
6
  "type": "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gcf-board",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "A local web board for GCF game projects: shows `gcf board --json` and runs the same ai-factory gcf commands an operator runs in a console",
5
5
  "type": "module",
6
6
  "license": "MIT",