gm-gc 2.0.166 → 2.0.167

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.166",
3
+ "version": "2.0.167",
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",
@@ -22,10 +22,14 @@ 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
- return {
26
- ok: false,
27
- reason: `Work items remain in ${prdFile}. Remove completed items as they finish. Current items:\n\n${prdContent}`
28
- };
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
+ }
29
33
  }
30
34
  }
31
35
  return { ok: true };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-gc",
3
- "version": "2.0.166",
3
+ "version": "2.0.167",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",