@automagik/genie 4.260420.11 → 4.260420.12

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/dist/genie.js CHANGED
@@ -1291,7 +1291,16 @@ Stopping inbox watcher...`),stopInboxWatcher2(handle),process.exit(0)};process.o
1291
1291
  SELECT * FROM tasks
1292
1292
  WHERE wish_file = ${wishFile} AND repo_path = ${repoPath} AND parent_id IS NULL
1293
1293
  LIMIT 1
1294
- `;return rows.length>0?rows[0]:null}async function findGroup(sql,parentId,groupName){let rows=await sql`
1294
+ `;if(rows.length>0)return rows[0];let crossRows=await sql`
1295
+ SELECT repo_path FROM tasks
1296
+ WHERE wish_file = ${wishFile} AND parent_id IS NULL AND repo_path != ${repoPath}
1297
+ `;if(crossRows.length>0){let otherList=crossRows.map((r)=>r.repo_path).filter((p,i2,arr)=>arr.indexOf(p)===i2).map((p)=>` - ${p}`).join(`
1298
+ `);console.warn(`\u26A0 Wish "${slug}" has state partitioned across repo_paths (issue #1234).
1299
+ Current cwd resolves to: ${repoPath}
1300
+ Other parents exist at:
1301
+ ${otherList}
1302
+ Operations against this wish from the current cwd see NONE of the state above.
1303
+ Re-run from one of the listed paths, or reconcile the partitioned rows manually.`)}return null}async function findGroup(sql,parentId,groupName){let rows=await sql`
1295
1304
  SELECT * FROM tasks
1296
1305
  WHERE parent_id = ${parentId} AND group_name = ${groupName}
1297
1306
  LIMIT 1
@@ -1342,10 +1351,11 @@ Stopping inbox watcher...`),stopInboxWatcher2(handle),process.exit(0)};process.o
1342
1351
  INSERT INTO task_actors (task_id, actor_type, actor_id, role)
1343
1352
  VALUES (${child.id}, 'local', ${assignee}, 'assignee')
1344
1353
  ON CONFLICT (task_id, actor_type, actor_id, role) DO UPDATE SET created_at = now()
1345
- `,console.warn(`\u26A0 Group "${groupName}" was \`ready\` (dispatch-bypass); auto-transitioned to \`in_progress\` before completion.`),child.status="in_progress",!child.started_at)child.started_at=startNow}if(child.status!=="in_progress")throw Error(`Cannot complete group "${groupName}": must be in_progress (currently ${child.status})`);let now=new Date;await sql`
1354
+ `,console.warn(`\u26A0 Group "${groupName}" was \`ready\` (dispatch-bypass); auto-transitioned to \`in_progress\` before completion.`),child.status="in_progress",!child.started_at)child.started_at=startNow}if(child.status!=="in_progress")throw Error(`Cannot complete group "${groupName}": must be in_progress (currently ${child.status})`);let now=new Date;if((await sql`
1346
1355
  UPDATE tasks SET status = 'done', ended_at = ${now}, updated_at = ${now}
1347
1356
  WHERE id = ${child.id}
1348
- `,await sql`
1357
+ RETURNING id
1358
+ `).length===0)throw Error(`Completion UPDATE affected 0 rows for group "${groupName}" in wish "${slug}" (child id ${child.id} disappeared mid-operation). `+`State was NOT written \u2014 re-run \`genie done ${slug}#${groupName}\` to retry.`);await sql`
1349
1359
  UPDATE tasks SET status = 'ready', updated_at = ${now}
1350
1360
  WHERE parent_id = ${parent.id}
1351
1361
  AND status = 'blocked'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/genie",
3
- "version": "4.260420.11",
3
+ "version": "4.260420.12",
4
4
  "description": "Collaborative terminal toolkit for human + AI workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genie",
3
- "version": "4.260420.11",
3
+ "version": "4.260420.12",
4
4
  "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, turn them into wishes, execute with /work, validate with /review, and ship as one team.",
5
5
  "author": {
6
6
  "name": "Namastex Labs"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genie-plugin",
3
- "version": "4.260420.11",
3
+ "version": "4.260420.12",
4
4
  "private": true,
5
5
  "description": "Runtime dependencies for genie bundled CLIs",
6
6
  "type": "module",