gm-gc 2.0.234 → 2.0.236

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,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.234",
3
+ "version": "2.0.236",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "homepage": "https://github.com/AnEntrypoint/gm",
@@ -296,10 +296,12 @@ const run = () => {
296
296
  let out = stripFooter((r.stdout || '') + (r.stderr || ''));
297
297
  const bg = out.match(/Task ID:\s*(task_\S+)/);
298
298
  if (bg) {
299
- runGmExec(['sleep', bg[1], '60'], { timeout: 70000 });
299
+ runGmExec(['sleep', bg[1], '15'], { timeout: 25000 });
300
300
  const sr = runGmExec(['status', bg[1]], { timeout: 15000 });
301
- out = stripFooter((sr.stdout || '') + (sr.stderr || ''));
302
- runGmExec(['close', bg[1]], { timeout: 10000 });
301
+ const statusOut = stripFooter((sr.stdout || '') + (sr.stderr || ''));
302
+ const stillRunning = /Status:\s*running/i.test(statusOut);
303
+ out = statusOut;
304
+ if (!stillRunning) runGmExec(['close', bg[1]], { timeout: 10000 });
303
305
  }
304
306
  return out;
305
307
  };
@@ -22,14 +22,10 @@ const run = () => {
22
22
  if (fs.existsSync(prdFile)) {
23
23
  const prdContent = fs.readFileSync(prdFile, 'utf-8').trim();
24
24
  if (prdContent.length > 0) {
25
- let items;
26
- try { items = JSON.parse(prdContent); } catch { items = null; }
27
- if (!Array.isArray(items) || items.length > 0) {
28
- return {
29
- ok: false,
30
- reason: `Work items remain in ${prdFile}. Remove completed items as they finish. Current items:\n\n${prdContent}`
31
- };
32
- }
25
+ return {
26
+ ok: false,
27
+ reason: `Work items remain in ${prdFile}. Remove completed items as they finish. Delete the file when all items are done.\n\n${prdContent}`
28
+ };
33
29
  }
34
30
  }
35
31
  return { ok: true };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-gc",
3
- "version": "2.0.234",
3
+ "version": "2.0.236",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",