@automagik/genie 4.260429.16 → 4.260429.17

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
@@ -529,7 +529,7 @@ ${bin} set-option -w pane-active-border-style "fg=$COLOR"
529
529
  `,added}async function fireAgent(teamName,agentName){let config=await getTeam(teamName);if(!config)throw Error(`Team "${teamName}" not found.`);let idx=config.members.indexOf(agentName);if(idx===-1)return!1;config.members.splice(idx,1);let sql=await getConnection();await sql`
530
530
  UPDATE teams SET members = ${sql.json(config.members)}
531
531
  WHERE name = ${teamName}
532
- `;try{await killWorkersByName(agentName)}catch{}return!0}async function removeWorktree(worktreePath){if(!worktreePath||!existsSync10(worktreePath))return;try{await $2`git worktree remove --force ${worktreePath}`.quiet()}catch{try{await rm(worktreePath,{recursive:!0,force:!0})}catch{}}}async function cleanupTeamGitArtifacts(config){if(config.worktreePath)try{await $2`git -C ${config.repo} worktree remove --force ${config.worktreePath}`.quiet()}catch{try{await $2`rm -rf ${config.worktreePath}`.quiet()}catch{}}try{let branchTip=(await $2`git -C ${config.repo} rev-parse ${config.name}`.quiet()).text().trim(),baseTip="";try{baseTip=(await $2`git -C ${config.repo} rev-parse origin/${config.baseBranch}`.quiet()).text().trim()}catch{try{baseTip=(await $2`git -C ${config.repo} rev-parse ${config.baseBranch}`.quiet()).text().trim()}catch{return}}if(branchTip&&baseTip&&branchTip===baseTip)await $2`git -C ${config.repo} branch -D ${config.name}`.quiet()}catch{}}async function cleanupTeamTmuxSession(tmuxSessionName,teamName){if(!tmuxSessionName)return;try{if(!await findSessionByName(tmuxSessionName))return;let windows=await listWindows(tmuxSessionName),teamWindow=await findWindowByName(tmuxSessionName,teamName);if(tmuxSessionName===teamName||windows.length===1&&windows[0]?.name===teamName)await killSession(tmuxSessionName);else if(teamWindow)await executeTmux2(`kill-window -t '${teamWindow.id}'`)}catch{}}async function archiveTeam(teamName){let config=await getTeam(teamName);if(!config)return!1;let killResults=await Promise.allSettled(config.members.map((member)=>killWorkersByName(member,teamName)));for(let i2=0;i2<killResults.length;i2++)if(killResults[i2].status==="rejected")console.error(` Failed to kill member "${config.members[i2]}": ${killResults[i2].reason}`);await cleanupTeamTmuxSession(config.tmuxSessionName??teamName,teamName),await cleanupTeamGitArtifacts(config);let sql=await getConnection(),archivedAgents=0,updated=!1;if(await sql.begin(async(tx)=>{if((await tx`
532
+ `;try{await killWorkersByName(agentName)}catch{}return!0}async function cleanupTeamGitArtifacts(config){if(config.worktreePath)try{await $2`git -C ${config.repo} worktree remove --force ${config.worktreePath}`.quiet()}catch{try{await $2`rm -rf ${config.worktreePath}`.quiet()}catch{}}try{let branchTip=(await $2`git -C ${config.repo} rev-parse ${config.name}`.quiet()).text().trim(),baseTip="";try{baseTip=(await $2`git -C ${config.repo} rev-parse origin/${config.baseBranch}`.quiet()).text().trim()}catch{try{baseTip=(await $2`git -C ${config.repo} rev-parse ${config.baseBranch}`.quiet()).text().trim()}catch{return}}if(branchTip&&baseTip&&branchTip===baseTip)await $2`git -C ${config.repo} branch -D ${config.name}`.quiet()}catch{}}async function cleanupTeamTmuxSession(tmuxSessionName,teamName){if(!tmuxSessionName)return;try{if(!await findSessionByName(tmuxSessionName))return;let windows=await listWindows(tmuxSessionName),teamWindow=await findWindowByName(tmuxSessionName,teamName);if(tmuxSessionName===teamName||windows.length===1&&windows[0]?.name===teamName)await killSession(tmuxSessionName);else if(teamWindow)await executeTmux2(`kill-window -t '${teamWindow.id}'`)}catch{}}async function archiveTeam(teamName){let config=await getTeam(teamName);if(!config)return!1;let killResults=await Promise.allSettled(config.members.map((member)=>killWorkersByName(member,teamName)));for(let i2=0;i2<killResults.length;i2++)if(killResults[i2].status==="rejected")console.error(` Failed to kill member "${config.members[i2]}": ${killResults[i2].reason}`);await cleanupTeamTmuxSession(config.tmuxSessionName??teamName,teamName),await cleanupTeamGitArtifacts(config);let sql=await getConnection(),archivedAgents=0,updated=!1;if(await sql.begin(async(tx)=>{if((await tx`
533
533
  UPDATE teams SET status = 'archived', archived_at = now(), updated_at = now()
534
534
  WHERE name = ${teamName}
535
535
  `).count===0)return;updated=!0,archivedAgents=(await tx`
@@ -538,7 +538,7 @@ ${bin} set-option -w pane-active-border-style "fg=$COLOR"
538
538
  `).count??0}),!updated)return!1;return recordAuditEvent("team",teamName,"archived",getActor(),{repo:config.repo,archivedAgents}).catch(()=>{}),!0}async function unarchiveTeam(teamName){let config=await getTeam(teamName);if(!config)return!1;let restoredStatus="done";if((await(await getConnection())`
539
539
  UPDATE teams SET status = ${restoredStatus}, archived_at = NULL, updated_at = now()
540
540
  WHERE name = ${teamName}
541
- `).count===0)return!1;return recordAuditEvent("team",teamName,"unarchived",getActor(),{repo:config.repo,restoredStatus}).catch(()=>{}),!0}async function disbandTeam(teamName){let config=await getTeam(teamName);if(!config)return!1;try{await deleteNativeTeam(teamName)}catch{}for(let member of config.members)try{await killWorkersByName(member,teamName)}catch{}await removeWorktree(config.worktreePath),await cleanupTeamTmuxSession(config.tmuxSessionName??teamName,teamName);let sql=await getConnection(),disbanded=!1;if(await sql.begin(async(tx)=>{if(config.wishSlug)try{let wishFile=`.genie/wishes/${config.wishSlug}/WISH.md`,parent=await tx`
541
+ `).count===0)return!1;return recordAuditEvent("team",teamName,"unarchived",getActor(),{repo:config.repo,restoredStatus}).catch(()=>{}),!0}async function disbandTeam(teamName){let config=await getTeam(teamName);if(!config)return!1;try{await deleteNativeTeam(teamName)}catch{}for(let member of config.members)try{await killWorkersByName(member,teamName)}catch{}await cleanupTeamGitArtifacts(config),await cleanupTeamTmuxSession(config.tmuxSessionName??teamName,teamName);let sql=await getConnection(),disbanded=!1;if(await sql.begin(async(tx)=>{if(config.wishSlug)try{let wishFile=`.genie/wishes/${config.wishSlug}/WISH.md`,parent=await tx`
542
542
  SELECT id FROM tasks
543
543
  WHERE wish_file = ${wishFile} AND repo_path = ${config.repo} AND parent_id IS NULL
544
544
  LIMIT 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/genie",
3
- "version": "4.260429.16",
3
+ "version": "4.260429.17",
4
4
  "description": "Collaborative terminal toolkit for human + AI workflows. NOTE: the npm distribution is being soft-deprecated — the canonical install is `curl -fsSL https://get.automagik.dev/genie | bash` (cosign + SLSA verified). See https://automagik.dev/genie/security/distribution-sovereignty",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genie",
3
- "version": "4.260429.16",
3
+ "version": "4.260429.17",
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.260429.16",
3
+ "version": "4.260429.17",
4
4
  "private": true,
5
5
  "description": "Runtime dependencies for genie bundled CLIs",
6
6
  "type": "module",