@automagik/genie 3.260317.13 → 3.260317.15

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.
@@ -10,7 +10,7 @@
10
10
  "plugins": [
11
11
  {
12
12
  "name": "genie",
13
- "version": "3.260317.12",
13
+ "version": "3.260317.14",
14
14
  "source": "./plugins/genie",
15
15
  "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
16
16
  }
package/dist/genie.js CHANGED
@@ -474,4 +474,4 @@ Run 'genie ls' to list agents.`)}function $J(D,F){let $=[];if(D.workerId){if($.p
474
474
  `),W=G.split(`
475
475
  `),U=W.length>0?W.length-1:0,z=W[W.length-1];for(let E of V.slice(U))if(E&&E!==z)F(E)}let q=setInterval(async()=>{if(!Q){clearInterval(q);return}try{let G=y3(await AD(B,100));if(G!==X)Y(X,G),X=G}catch{clearInterval(q),Q=!1}},500);return()=>{Q=!1,clearInterval(q)}}async function QJ(D,F){try{let $=await X6(D),J=$.paneId,B=$.session||D,Q=M7().readLines,Y={lines:F.lines?Number.parseInt(F.lines,10):Q,from:F.from?Number.parseInt(F.from,10):void 0,to:F.to?Number.parseInt(F.to,10):void 0,range:F.range,search:F.search,grep:F.grep,follow:F.follow,all:F.all,reverse:F.reverse,pane:J};if(F.follow){console.log(`Following "${D}" (Ctrl+C to stop)...`),console.log("");let G=await XJ(B,(H)=>{console.log(H)},{pane:J});process.on("SIGINT",()=>{G(),console.log(`
476
476
  Stopped following`),process.exit(0)}),await new Promise(()=>{});return}let q=await BJ(B,Y);if(F.json){let G=q.split(`
477
- `);console.log(JSON.stringify({target:D,session:B,lineCount:G.length,content:G},null,2));return}console.log(q)}catch($){let J=$ instanceof Error?$.message:String($);console.error(`Error reading logs: ${J}`),process.exit(1)}}Z3();import{existsSync as qJ}from"fs";import{copyFile as Uz,mkdir as zz}from"fs/promises";import{join as Q6,resolve as GJ}from"path";function HJ(D){let F=D.command("team").description("Team lifecycle management");F.command("create <name>").description("Create a new team with a git worktree").requiredOption("--repo <path>","Path to the git repository").option("--branch <branch>","Base branch to create from","dev").option("--wish <slug>","Wish slug \u2014 auto-spawns a task leader with wish context").action(async($,J)=>{try{if(J.wish){let X=GJ(J.repo),Q=Q6(X,".genie","wishes",J.wish,"WISH.md");if(!qJ(Q))console.error(`Error: Wish not found at ${Q}`),process.exit(1)}let B=await o1($,J.repo,J.branch);if(console.log(`Team "${B.name}" created.`),console.log(` Worktree: ${B.worktreePath}`),console.log(` Branch: ${B.name} (from ${B.baseBranch})`),B.nativeTeamsEnabled)console.log(" Native teams: enabled");if(J.wish)await Kz(B,J.wish,J.repo)}catch(B){let X=B instanceof Error?B.message:String(B);console.error(`Error: ${X}`),process.exit(1)}}),F.command("hire <agent>").description('Add an agent to a team ("council" hires all 10 council members)').option("--team <name>","Team name (auto-detects from leader context if omitted)").action(async($,J)=>{try{let B=J.team??await YJ();if(!B)console.error("Error: Could not detect team. Use --team <name> to specify."),process.exit(1);let X=await m8(B,$);if(X.length===0)console.log(`Agent "${$}" is already a member of "${B}".`);else if($==="council"){console.log(`Hired ${X.length} council members to "${B}":`);for(let Q of X)console.log(` + ${Q}`)}else console.log(`Hired "${$}" to team "${B}".`)}catch(B){let X=B instanceof Error?B.message:String(B);console.error(`Error: ${X}`),process.exit(1)}}),F.command("fire <agent>").description("Remove an agent from a team").option("--team <name>","Team name (auto-detects from leader context if omitted)").action(async($,J)=>{try{let B=J.team??await YJ();if(!B)console.error("Error: Could not detect team. Use --team <name> to specify."),process.exit(1);if(await s1(B,$))console.log(`Fired "${$}" from team "${B}".`);else console.error(`Agent "${$}" is not a member of "${B}".`),process.exit(1)}catch(B){let X=B instanceof Error?B.message:String(B);console.error(`Error: ${X}`),process.exit(1)}}),F.command("ls [name]").alias("list").description("List teams or members of a team").option("--json","Output as JSON").action(async($,J)=>{try{if($)await Mz($,J.json);else await Ez(J.json)}catch(B){let X=B instanceof Error?B.message:String(B);console.error(`Error: ${X}`),process.exit(1)}}),F.command("disband <name>").description("Disband a team: kill members, remove worktree, delete config").action(async($)=>{try{if(await a1($))console.log(`Team "${$}" disbanded.`);else console.error(`Team "${$}" not found.`),process.exit(1)}catch(J){let B=J instanceof Error?J.message:String(J);console.error(`Error: ${B}`),process.exit(1)}}),F.command("done <name>").description("Mark a team as done and kill all members").action(async($)=>{try{await d8($,"done"),await p8($),console.log(`Team "${$}" marked as done. All members killed.`)}catch(J){let B=J instanceof Error?J.message:String(J);console.error(`Error: ${B}`),process.exit(1)}}),F.command("blocked <name>").description("Mark a team as blocked and kill all members").action(async($)=>{try{await d8($,"blocked"),await p8($),console.log(`Team "${$}" marked as blocked. All members killed.`)}catch(J){let B=J instanceof Error?J.message:String(J);console.error(`Error: ${B}`),process.exit(1)}})}async function Kz(D,F,$){let{handleWorkerSpawn:J}=await Promise.resolve().then(() => (i8(),aF)),B=GJ($),X=Q6(B,".genie","wishes",F,"WISH.md");if(!qJ(X))console.error(`Error: Wish not found at ${X}`),process.exit(1);let Q=Q6(D.worktreePath,".genie","wishes",F);await zz(Q,{recursive:!0});let Y=Q6(Q,"WISH.md");await Uz(X,Y),console.log(` Wish: copied ${F}/WISH.md into worktree`);let q=["team-lead","engineer","reviewer","qa","fix"];for(let V of q)await m8(D.name,V);console.log(` Team: hired ${q.join(", ")}`);let G=q.filter((V)=>V!=="team-lead").join(", "),H=`Your team is "${D.name}". Repo: ${D.repo}. Branch: ${D.name}. Worktree: ${D.worktreePath}. Wish slug: ${F}. Your team members are: ${G} (already hired \u2014 genie work will spawn them automatically). Read the wish at .genie/wishes/${F}/WISH.md and execute the full lifecycle autonomously.`;await J("team-lead",{provider:"claude",team:D.name,cwd:D.worktreePath,initialPrompt:H}),console.log(" Leader: spawned and working")}async function YJ(){let D=process.env.GENIE_TEAM;if(D)return D;let F=await l8();if(F.length===1)return F[0].name;return null}async function Mz(D,F){let $=await t1(D);if($===null)console.error(`Team "${D}" not found.`),process.exit(1);if(F){console.log(JSON.stringify($,null,2));return}if($.length===0){console.log(`Team "${D}" has no members. Hire agents with: genie team hire <agent> --team ${D}`);return}console.log(""),console.log(`MEMBERS of "${D}"`),console.log("-".repeat(60));for(let J of $)console.log(` ${J}`);console.log("")}async function Ez(D){let F=await l8();if(D){console.log(JSON.stringify(F,null,2));return}if(F.length===0){console.log("No teams found. Create one with: genie team create <name> --repo <path>");return}console.log(""),console.log("TEAMS"),console.log("-".repeat(60));for(let $ of F)Az($);console.log("")}function Az(D){let F=D.status??"in_progress";console.log(` ${D.name} [${F}]`),console.log(` Repo: ${D.repo}`),console.log(` Branch: ${D.name} (from ${D.baseBranch})`),console.log(` Worktree: ${D.worktreePath}`),console.log(` Members: ${D.members.length}`)}var d=new p5;d.name("genie").description("Genie CLI - AI-assisted development").version(q4);async function lz(D){let{getOrCreateSession:F}=await Promise.resolve().then(() => (KJ(),zJ)),{buildTeamLeadCommand:$}=await Promise.resolve().then(() => (j8(),C4)),{getAgentsFilePath:J}=await Promise.resolve().then(() => (N5(),T5)),{uuid:B,isNew:X}=await F(D),Q=J(),Y=$(D,{systemPromptFile:Q??void 0,...X?{sessionId:B}:{resumeSessionId:B}});console.log(X?`Starting new session: ${D}`:`Resuming session: ${D}`);let{spawnSync:q}=await import("child_process"),G=q("sh",["-c",Y],{stdio:"inherit"});if(G.status)process.exit(G.status)}d.command("setup").description("Configure genie settings").option("--quick","Accept all defaults").option("--shortcuts","Only configure keyboard shortcuts").option("--codex","Only configure Codex integration").option("--terminal","Only configure terminal defaults").option("--session","Only configure session settings").option("--reset","Reset configuration to defaults").option("--show","Show current configuration").action(async(D)=>{await l9(D)});d.command("doctor").description("Run diagnostic checks on genie installation").action(j7);d.command("update").description("Update Genie CLI to the latest version").option("--next","Switch to dev builds (npm @next tag)").option("--stable","Switch to stable releases (npm @latest tag)").action(Y4);d.command("uninstall").description("Remove Genie CLI and clean up hooks").action(s9);var Y6=d.command("shortcuts").description("Manage tmux keyboard shortcuts");Y6.action(D1);Y6.command("show").description("Show available shortcuts and installation status").action(D1);Y6.command("install").description("Install shortcuts to config files (~/.tmux.conf, shell rc)").action(p9);Y6.command("uninstall").description("Remove shortcuts from config files").action(d9);HJ(d);tF(d);DJ(d);G$(d);K$(d);IF(d);d.command("spawn <name>").description("Spawn a new agent by name (resolves from directory or built-ins)").option("--provider <provider>","Provider: claude or codex","claude").option("--team <team>","Team name",process.env.GENIE_TEAM??"genie").option("--model <model>","Model override (e.g., sonnet, opus)").option("--skill <skill>","Skill to load (optional)").option("--layout <layout>","Layout mode: mosaic (default) or vertical").option("--color <color>","Teammate pane border color").option("--plan-mode","Start teammate in plan mode").option("--permission-mode <mode>","Permission mode (e.g., acceptEdits)").option("--extra-args <args...>","Extra CLI args forwarded to provider").option("--cwd <path>","Working directory for the agent (overrides directory entry)").action(async(D,F)=>{try{await V2(D,F)}catch($){let J=$ instanceof Error?$.message:String($);console.error(`Error: ${J}`),process.exit(1)}});d.command("kill <name>").description("Force kill an agent by name").action(async(D)=>{try{await D5(D)}catch(F){let $=F instanceof Error?F.message:String(F);console.error(`Error: ${$}`),process.exit(1)}});d.command("stop <name>").description("Stop an agent (preserves session for resume)").action(async(D)=>{try{await F5(D)}catch(F){let $=F instanceof Error?F.message:String(F);console.error(`Error: ${$}`),process.exit(1)}});d.command("history <name>").description("Show compressed session history for an agent").option("--full","Show full conversation without compression").option("--since <n>","Show last N user/assistant exchanges",Number.parseInt).option("--json","Output as JSON").option("--raw","Output raw JSONL entries").option("--log-file <path>","Direct path to log file (for testing)").action(async(D,F)=>{await j$(D,F)});d.command("read <name>").description("Read terminal output from an agent pane").option("-n, --lines <number>","Number of lines to read").option("--from <line>","Start line").option("--to <line>","End line").option("--range <range>",'Line range (e.g., "10-20")').option("--search <text>","Search for text").option("--grep <pattern>","Grep for pattern").option("-f, --follow","Follow mode (like tail -f)").option("--all","Show all output").option("-r, --reverse","Reverse order").option("--json","Output as JSON").action(async(D,F)=>{await QJ(D,F)});d.command("answer <name> <choice>").description('Answer a question for an agent (use "text:..." for text input)').action(async(D,F)=>{await JJ(D,F)});d.command("ls").description("List registered agents with runtime status").option("--json","Output as JSON").action(async(D)=>{try{await $5(D)}catch(F){let $=F instanceof Error?F.message:String(F);console.error(`Error: ${$}`),process.exit(1)}});var o2=process.argv.slice(2);if(o2.length===0||o2.every((D)=>D==="--reset")){let{sessionCommand:D}=await Promise.resolve().then(() => (N5(),T5));await D({reset:o2.includes("--reset")}),process.exit(0)}var m3=o2.indexOf("--session");if(m3!==-1&&m3+1<o2.length){let D=o2[m3+1];if(!o2.filter((J,B)=>B!==m3&&B!==m3+1).some((J)=>!J.startsWith("-")))try{await lz(D),process.exit(0)}catch(J){console.error(`Error: ${J instanceof Error?J.message:J}`),process.exit(1)}else d.parse()}else d.parse();
477
+ `);console.log(JSON.stringify({target:D,session:B,lineCount:G.length,content:G},null,2));return}console.log(q)}catch($){let J=$ instanceof Error?$.message:String($);console.error(`Error reading logs: ${J}`),process.exit(1)}}Z3();import{existsSync as qJ}from"fs";import{copyFile as Uz,mkdir as zz}from"fs/promises";import{join as Q6,resolve as GJ}from"path";function HJ(D){let F=D.command("team").description("Team lifecycle management");F.command("create <name>").description("Create a new team with a git worktree").requiredOption("--repo <path>","Path to the git repository").option("--branch <branch>","Base branch to create from","dev").option("--wish <slug>","Wish slug \u2014 auto-spawns a task leader with wish context").action(async($,J)=>{try{if(J.wish){let X=GJ(J.repo),Q=Q6(X,".genie","wishes",J.wish,"WISH.md");if(!qJ(Q))console.error(`Error: Wish not found at ${Q}`),process.exit(1)}let B=await o1($,J.repo,J.branch);if(console.log(`Team "${B.name}" created.`),console.log(` Worktree: ${B.worktreePath}`),console.log(` Branch: ${B.name} (from ${B.baseBranch})`),B.nativeTeamsEnabled)console.log(" Native teams: enabled");if(J.wish)await Kz(B,J.wish,J.repo)}catch(B){let X=B instanceof Error?B.message:String(B);console.error(`Error: ${X}`),process.exit(1)}}),F.command("hire <agent>").description('Add an agent to a team ("council" hires all 10 council members)').option("--team <name>","Team name (auto-detects from leader context if omitted)").action(async($,J)=>{try{let B=J.team??await YJ();if(!B)console.error("Error: Could not detect team. Use --team <name> to specify."),process.exit(1);let X=await m8(B,$);if(X.length===0)console.log(`Agent "${$}" is already a member of "${B}".`);else if($==="council"){console.log(`Hired ${X.length} council members to "${B}":`);for(let Q of X)console.log(` + ${Q}`)}else console.log(`Hired "${$}" to team "${B}".`)}catch(B){let X=B instanceof Error?B.message:String(B);console.error(`Error: ${X}`),process.exit(1)}}),F.command("fire <agent>").description("Remove an agent from a team").option("--team <name>","Team name (auto-detects from leader context if omitted)").action(async($,J)=>{try{let B=J.team??await YJ();if(!B)console.error("Error: Could not detect team. Use --team <name> to specify."),process.exit(1);if(await s1(B,$))console.log(`Fired "${$}" from team "${B}".`);else console.error(`Agent "${$}" is not a member of "${B}".`),process.exit(1)}catch(B){let X=B instanceof Error?B.message:String(B);console.error(`Error: ${X}`),process.exit(1)}}),F.command("ls [name]").alias("list").description("List teams or members of a team").option("--json","Output as JSON").action(async($,J)=>{try{if($)await Mz($,J.json);else await Ez(J.json)}catch(B){let X=B instanceof Error?B.message:String(B);console.error(`Error: ${X}`),process.exit(1)}}),F.command("disband <name>").description("Disband a team: kill members, remove worktree, delete config").action(async($)=>{try{if(await a1($))console.log(`Team "${$}" disbanded.`);else console.error(`Team "${$}" not found.`),process.exit(1)}catch(J){let B=J instanceof Error?J.message:String(J);console.error(`Error: ${B}`),process.exit(1)}}),F.command("done <name>").description("Mark a team as done and kill all members").action(async($)=>{try{await d8($,"done"),await p8($),console.log(`Team "${$}" marked as done. All members killed.`)}catch(J){let B=J instanceof Error?J.message:String(J);console.error(`Error: ${B}`),process.exit(1)}}),F.command("blocked <name>").description("Mark a team as blocked and kill all members").action(async($)=>{try{await d8($,"blocked"),await p8($),console.log(`Team "${$}" marked as blocked. All members killed.`)}catch(J){let B=J instanceof Error?J.message:String(J);console.error(`Error: ${B}`),process.exit(1)}})}async function Kz(D,F,$){let{handleWorkerSpawn:J}=await Promise.resolve().then(() => (i8(),aF)),B=GJ($),X=Q6(B,".genie","wishes",F,"WISH.md");if(!qJ(X))console.error(`Error: Wish not found at ${X}`),process.exit(1);let Q=Q6(D.worktreePath,".genie","wishes",F);await zz(Q,{recursive:!0});let Y=Q6(Q,"WISH.md");await Uz(X,Y),console.log(` Wish: copied ${F}/WISH.md into worktree`);let q=["team-lead","engineer","reviewer","qa","fix"];for(let V of q)await m8(D.name,V);console.log(` Team: hired ${q.join(", ")}`);let G=q.filter((V)=>V!=="team-lead").join(", "),H=`Your team is "${D.name}". Repo: ${D.repo}. Branch: ${D.name}. Worktree: ${D.worktreePath}. Wish slug: ${F}. Your team members are: ${G} (already hired \u2014 genie work will spawn them automatically). Read the wish at .genie/wishes/${F}/WISH.md and execute the full lifecycle autonomously.`;await J("team-lead",{provider:"claude",team:D.name,cwd:D.worktreePath,initialPrompt:H}),console.log(" Leader: spawned and working")}async function YJ(){let D=process.env.GENIE_TEAM;if(D)return D;let F=await l8();if(F.length===1)return F[0].name;return null}async function Mz(D,F){let $=await t1(D);if($===null)console.error(`Team "${D}" not found.`),process.exit(1);if(F){console.log(JSON.stringify($,null,2));return}if($.length===0){console.log(`Team "${D}" has no members. Hire agents with: genie team hire <agent> --team ${D}`);return}console.log(""),console.log(`MEMBERS of "${D}"`),console.log("-".repeat(60));for(let J of $)console.log(` ${J}`);console.log("")}async function Ez(D){let F=await l8();if(D){console.log(JSON.stringify(F,null,2));return}if(F.length===0){console.log("No teams found. Create one with: genie team create <name> --repo <path>");return}console.log(""),console.log("TEAMS"),console.log("-".repeat(60));for(let $ of F)Az($);console.log("")}function Az(D){let F=D.status??"in_progress";console.log(` ${D.name} [${F}]`),console.log(` Repo: ${D.repo}`),console.log(` Branch: ${D.name} (from ${D.baseBranch})`),console.log(` Worktree: ${D.worktreePath}`),console.log(` Members: ${D.members.length}`)}try{let{execSync:D}=v("child_process");if(D("git config core.bare",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim()==="true")D("git config core.bare false",{stdio:["pipe","pipe","pipe"]})}catch{}var d=new p5;d.name("genie").description("Genie CLI - AI-assisted development").version(q4);async function lz(D){let{getOrCreateSession:F}=await Promise.resolve().then(() => (KJ(),zJ)),{buildTeamLeadCommand:$}=await Promise.resolve().then(() => (j8(),C4)),{getAgentsFilePath:J}=await Promise.resolve().then(() => (N5(),T5)),{uuid:B,isNew:X}=await F(D),Q=J(),Y=$(D,{systemPromptFile:Q??void 0,...X?{sessionId:B}:{resumeSessionId:B}});console.log(X?`Starting new session: ${D}`:`Resuming session: ${D}`);let{spawnSync:q}=await import("child_process"),G=q("sh",["-c",Y],{stdio:"inherit"});if(G.status)process.exit(G.status)}d.command("setup").description("Configure genie settings").option("--quick","Accept all defaults").option("--shortcuts","Only configure keyboard shortcuts").option("--codex","Only configure Codex integration").option("--terminal","Only configure terminal defaults").option("--session","Only configure session settings").option("--reset","Reset configuration to defaults").option("--show","Show current configuration").action(async(D)=>{await l9(D)});d.command("doctor").description("Run diagnostic checks on genie installation").action(j7);d.command("update").description("Update Genie CLI to the latest version").option("--next","Switch to dev builds (npm @next tag)").option("--stable","Switch to stable releases (npm @latest tag)").action(Y4);d.command("uninstall").description("Remove Genie CLI and clean up hooks").action(s9);var Y6=d.command("shortcuts").description("Manage tmux keyboard shortcuts");Y6.action(D1);Y6.command("show").description("Show available shortcuts and installation status").action(D1);Y6.command("install").description("Install shortcuts to config files (~/.tmux.conf, shell rc)").action(p9);Y6.command("uninstall").description("Remove shortcuts from config files").action(d9);HJ(d);tF(d);DJ(d);G$(d);K$(d);IF(d);d.command("spawn <name>").description("Spawn a new agent by name (resolves from directory or built-ins)").option("--provider <provider>","Provider: claude or codex","claude").option("--team <team>","Team name",process.env.GENIE_TEAM??"genie").option("--model <model>","Model override (e.g., sonnet, opus)").option("--skill <skill>","Skill to load (optional)").option("--layout <layout>","Layout mode: mosaic (default) or vertical").option("--color <color>","Teammate pane border color").option("--plan-mode","Start teammate in plan mode").option("--permission-mode <mode>","Permission mode (e.g., acceptEdits)").option("--extra-args <args...>","Extra CLI args forwarded to provider").option("--cwd <path>","Working directory for the agent (overrides directory entry)").action(async(D,F)=>{try{await V2(D,F)}catch($){let J=$ instanceof Error?$.message:String($);console.error(`Error: ${J}`),process.exit(1)}});d.command("kill <name>").description("Force kill an agent by name").action(async(D)=>{try{await D5(D)}catch(F){let $=F instanceof Error?F.message:String(F);console.error(`Error: ${$}`),process.exit(1)}});d.command("stop <name>").description("Stop an agent (preserves session for resume)").action(async(D)=>{try{await F5(D)}catch(F){let $=F instanceof Error?F.message:String(F);console.error(`Error: ${$}`),process.exit(1)}});d.command("history <name>").description("Show compressed session history for an agent").option("--full","Show full conversation without compression").option("--since <n>","Show last N user/assistant exchanges",Number.parseInt).option("--json","Output as JSON").option("--raw","Output raw JSONL entries").option("--log-file <path>","Direct path to log file (for testing)").action(async(D,F)=>{await j$(D,F)});d.command("read <name>").description("Read terminal output from an agent pane").option("-n, --lines <number>","Number of lines to read").option("--from <line>","Start line").option("--to <line>","End line").option("--range <range>",'Line range (e.g., "10-20")').option("--search <text>","Search for text").option("--grep <pattern>","Grep for pattern").option("-f, --follow","Follow mode (like tail -f)").option("--all","Show all output").option("-r, --reverse","Reverse order").option("--json","Output as JSON").action(async(D,F)=>{await QJ(D,F)});d.command("answer <name> <choice>").description('Answer a question for an agent (use "text:..." for text input)').action(async(D,F)=>{await JJ(D,F)});d.command("ls").description("List registered agents with runtime status").option("--json","Output as JSON").action(async(D)=>{try{await $5(D)}catch(F){let $=F instanceof Error?F.message:String(F);console.error(`Error: ${$}`),process.exit(1)}});var o2=process.argv.slice(2);if(o2.length===0||o2.every((D)=>D==="--reset")){let{sessionCommand:D}=await Promise.resolve().then(() => (N5(),T5));await D({reset:o2.includes("--reset")}),process.exit(0)}var m3=o2.indexOf("--session");if(m3!==-1&&m3+1<o2.length){let D=o2[m3+1];if(!o2.filter((J,B)=>B!==m3&&B!==m3+1).some((J)=>!J.startsWith("-")))try{await lz(D),process.exit(0)}catch(J){console.error(`Error: ${J instanceof Error?J.message:J}`),process.exit(1)}else d.parse()}else d.parse();
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
  ### 🐛 Bug Fixes
4
- - **core:** add core.bare safety to pruneStaleWorktrees too ([`19c724d`](https://github.com/automagik-dev/genie/commit/19c724debae2a86f531c052ce66ebb52bf587601))
4
+ - **core:** startup guard — reset core.bare=false on every genie invocation ([`cfdf9d4`](https://github.com/automagik-dev/genie/commit/cfdf9d431ccd13a16249e92f7bc1395318dcbc54))
5
5
 
6
6
  ### 👥 Contributors
7
7
  - Test
@@ -2,7 +2,7 @@
2
2
  "id": "genie",
3
3
  "name": "Genie",
4
4
  "description": "Skills, agents, and hooks for the Genie CLI terminal orchestration toolkit",
5
- "version": "3.260317.12",
5
+ "version": "3.260317.14",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/genie",
3
- "version": "3.260317.13",
3
+ "version": "3.260317.15",
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": "3.260317.12",
3
+ "version": "3.260317.14",
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": "3.260317.12",
3
+ "version": "3.260317.14",
4
4
  "private": true,
5
5
  "description": "Runtime dependencies for genie bundled CLIs",
6
6
  "type": "module",
package/src/genie.ts CHANGED
@@ -45,6 +45,17 @@ import * as readCmd from './term-commands/read.js';
45
45
  import { registerStateCommands } from './term-commands/state.js';
46
46
  import { registerTeamNamespace } from './term-commands/team.js';
47
47
 
48
+ // Safety: ensure git repo is never in bare mode (worktree operations can corrupt this)
49
+ try {
50
+ const { execSync: execSyncStartup } = require('node:child_process');
51
+ const isBare = execSyncStartup('git config core.bare', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
52
+ if (isBare === 'true') {
53
+ execSyncStartup('git config core.bare false', { stdio: ['pipe', 'pipe', 'pipe'] });
54
+ }
55
+ } catch {
56
+ // Not in a git repo — that's fine
57
+ }
58
+
48
59
  const program = new Command();
49
60
 
50
61
  program.name('genie').description('Genie CLI - AI-assisted development').version(VERSION);