@automagik/genie 3.260316.3 → 3.260316.5
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.260316.
|
|
13
|
+
"version": "3.260316.5",
|
|
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
|
@@ -472,5 +472,5 @@ Run 'genie ls' to list agents.`)}function x$(D,F){let $=[];if(D.workerId){if($.p
|
|
|
472
472
|
`),W=G.split(`
|
|
473
473
|
`),U=W.length>0?W.length-1:0,K=W[W.length-1];for(let M of V.slice(U))if(M&&M!==K)F(M)}let q=setInterval(async()=>{if(!Q){clearInterval(q);return}try{let G=w3(await zD(B,100));if(G!==X)Y(X,G),X=G}catch{clearInterval(q),Q=!1}},500);return()=>{Q=!1,clearInterval(q)}}async function m$(D,F){try{let $=await D6(D),J=$.paneId,B=$.session||D,Q=X7().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 g$(B,(H)=>{console.log(H)},{pane:J});process.on("SIGINT",()=>{G(),console.log(`
|
|
474
474
|
Stopped following`),process.exit(0)}),await new Promise(()=>{});return}let q=await h$(B,Y);if(F.json){let G=q.split(`
|
|
475
|
-
`);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)}}j3();import{existsSync as p$}from"fs";import{copyFile as lU,mkdir as pU,readFile as dU}from"fs/promises";import{join as F6,resolve as d$}from"path";function c$(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=d$(J.repo),Q=F6(X,".genie","wishes",J.wish,"WISH.md");if(!p$(Q))console.error(`Error: Wish not found at ${Q}`),process.exit(1)}let B=await g1($,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 cU(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 l$();if(!B)console.error("Error: Could not detect team. Use --team <name> to specify."),process.exit(1);let X=await u8(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 l$();if(!B)console.error("Error: Could not detect team. Use --team <name> to specify."),process.exit(1);if(await m1(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 iU($,J.json);else await rU(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 l1($))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").action(async($)=>{try{await y8($,"done"),console.log(`Team "${$}" marked as done.`)}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").action(async($)=>{try{await y8($,"blocked"),console.log(`Team "${$}" marked as blocked.`)}catch(J){let B=J instanceof Error?J.message:String(J);console.error(`Error: ${B}`),process.exit(1)}})}async function cU(D,F,$){let{handleWorkerSpawn:J}=await Promise.resolve().then(() => (g8(),kF)),B=d$($),X=F6(B,".genie","wishes",F,"WISH.md");if(!p$(X))console.error(`Error: Wish not found at ${X}`),process.exit(1);let Q=F6(D.worktreePath,".genie","wishes",F);await pU(Q,{recursive:!0});let Y=F6(Q,"WISH.md");await lU(X,Y),console.log(` Wish: copied ${F}/WISH.md into worktree`),await u8(D.name,"
|
|
476
|
-
`),H=await N0(G),V=`Begin. Read the wish at .genie/wishes/${F}/WISH.md and execute the full lifecycle autonomously. Your team is ${D.name}.`;await J("
|
|
475
|
+
`);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)}}j3();import{existsSync as p$}from"fs";import{copyFile as lU,mkdir as pU,readFile as dU}from"fs/promises";import{join as F6,resolve as d$}from"path";function c$(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=d$(J.repo),Q=F6(X,".genie","wishes",J.wish,"WISH.md");if(!p$(Q))console.error(`Error: Wish not found at ${Q}`),process.exit(1)}let B=await g1($,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 cU(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 l$();if(!B)console.error("Error: Could not detect team. Use --team <name> to specify."),process.exit(1);let X=await u8(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 l$();if(!B)console.error("Error: Could not detect team. Use --team <name> to specify."),process.exit(1);if(await m1(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 iU($,J.json);else await rU(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 l1($))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").action(async($)=>{try{await y8($,"done"),console.log(`Team "${$}" marked as done.`)}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").action(async($)=>{try{await y8($,"blocked"),console.log(`Team "${$}" marked as blocked.`)}catch(J){let B=J instanceof Error?J.message:String(J);console.error(`Error: ${B}`),process.exit(1)}})}async function cU(D,F,$){let{handleWorkerSpawn:J}=await Promise.resolve().then(() => (g8(),kF)),B=d$($),X=F6(B,".genie","wishes",F,"WISH.md");if(!p$(X))console.error(`Error: Wish not found at ${X}`),process.exit(1);let Q=F6(D.worktreePath,".genie","wishes",F);await pU(Q,{recursive:!0});let Y=F6(Q,"WISH.md");await lU(X,Y),console.log(` Wish: copied ${F}/WISH.md into worktree`),await u8(D.name,"team-lead"),console.log(" Leader: hired");let q=await dU(Y,"utf-8"),G=["# Task Leader Context","",`**Wish slug:** \`${F}\``,`**Wish file:** \`${Y}\``,`**Team name:** \`${D.name}\``,`**Worktree:** \`${D.worktreePath}\``,"","## Wish Content","",q].join(`
|
|
476
|
+
`),H=await N0(G),V=`Begin. Read the wish at .genie/wishes/${F}/WISH.md and execute the full lifecycle autonomously. Your team is ${D.name}.`;await J("team-lead",{provider:"claude",team:D.name,cwd:D.worktreePath,extraArgs:["--append-system-prompt-file",H],initialPrompt:V}),console.log(" Leader: spawned and working")}async function l$(){let D=process.env.GENIE_TEAM;if(D)return D;let F=await x8();if(F.length===1)return F[0].name;return null}async function iU(D,F){let $=await p1(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 rU(D){let F=await x8();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)nU($);console.log("")}function nU(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 v5;d.name("genie").description("Genie CLI - AI-assisted development").version(s9);async function Rz(D){let{getOrCreateSession:F}=await Promise.resolve().then(() => (s$(),o$)),{buildTeamLeadCommand:$}=await Promise.resolve().then(() => (A8(),G4)),{getAgentsFilePath:J}=await Promise.resolve().then(() => (M5(),K5)),{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 P9(D)});d.command("doctor").description("Run diagnostic checks on genie installation").action(V7);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(o9);d.command("uninstall").description("Remove Genie CLI and clean up hooks").action(h9);var $6=d.command("shortcuts").description("Manage tmux keyboard shortcuts");$6.action(o6);$6.command("show").description("Show available shortcuts and installation status").action(o6);$6.command("install").description("Install shortcuts to config files (~/.tmux.conf, shell rc)").action(v9);$6.command("uninstall").description("Remove shortcuts from config files").action(k9);c$(d);wF(d);f$(d);iF(d);sF(d);UF(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 q2(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 c1(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 i1(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 m$(D,F)});d.command("answer <name> <choice>").description('Answer a question for an agent (use "text:..." for text input)').action(async(D,F)=>{await y$(D,F)});d.command("ls").description("List registered agents with runtime status").option("--json","Output as JSON").action(async(D)=>{try{await r1(D)}catch(F){let $=F instanceof Error?F.message:String(F);console.error(`Error: ${$}`),process.exit(1)}});var l2=process.argv.slice(2);if(l2.length===0||l2.every((D)=>D==="--reset")){let{sessionCommand:D}=await Promise.resolve().then(() => (M5(),K5));await D({reset:l2.includes("--reset")}),process.exit(0)}var x3=l2.indexOf("--session");if(x3!==-1&&x3+1<l2.length){let D=l2[x3+1];if(!l2.filter((J,B)=>B!==x3&&B!==x3+1).some((J)=>!J.startsWith("-")))try{await Rz(D),process.exit(0)}catch(J){console.error(`Error: ${J instanceof Error?J.message:J}`),process.exit(1)}else d.parse()}else d.parse();
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genie",
|
|
3
|
-
"version": "3.260316.
|
|
3
|
+
"version": "3.260316.5",
|
|
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"
|
|
@@ -212,7 +212,7 @@ async function spawnLeaderWithWish(config: TeamConfig, slug: string, repoPath: s
|
|
|
212
212
|
console.log(` Wish: copied ${slug}/WISH.md into worktree`);
|
|
213
213
|
|
|
214
214
|
// Hire leader
|
|
215
|
-
await teamManager.hireAgent(config.name, '
|
|
215
|
+
await teamManager.hireAgent(config.name, 'team-lead');
|
|
216
216
|
console.log(' Leader: hired');
|
|
217
217
|
|
|
218
218
|
// Build context file with wish content
|
|
@@ -233,7 +233,7 @@ async function spawnLeaderWithWish(config: TeamConfig, slug: string, repoPath: s
|
|
|
233
233
|
|
|
234
234
|
// Spawn leader in the worktree with auto-kickoff prompt
|
|
235
235
|
const kickoffPrompt = `Begin. Read the wish at .genie/wishes/${slug}/WISH.md and execute the full lifecycle autonomously. Your team is ${config.name}.`;
|
|
236
|
-
await handleWorkerSpawn('
|
|
236
|
+
await handleWorkerSpawn('team-lead', {
|
|
237
237
|
provider: 'claude',
|
|
238
238
|
team: config.name,
|
|
239
239
|
cwd: config.worktreePath,
|