oh-my-agent 4.15.2 → 4.16.0
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/bin/cli.js +1 -1
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -490,7 +490,7 @@ Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-
|
|
|
490
490
|
</html>`;function KO(){let $=Jf();if(!_f($))gf($,{recursive:!0});let I=vf((z,v)=>{if(z.url==="/api/state")v.writeHead(200,{"Content-Type":"application/json"}),v.end(JSON.stringify(x9($)));else v.writeHead(200,{"Content-Type":"text/html"}),v.end(Tf)}),U=new f9.default({server:I}),_=null;function u(z,v){if(_)clearTimeout(_);_=setTimeout(()=>{let J=JSON.stringify({type:"update",event:z,file:v,data:x9($)});U.clients.forEach((N)=>{if(N.readyState===C9.default.OPEN)N.send(J)})},100)}let g=V2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});g.on("all",(z,v)=>u(z,RO(v))),U.on("connection",(z)=>{z.send(JSON.stringify({type:"full",data:x9($)})),z.on("error",()=>z.terminate())}),process.on("SIGINT",()=>{console.log(`
|
|
491
491
|
Shutting down...`),g.close(),U.clients.forEach((z)=>{z.terminate()}),U.close(()=>I.close(()=>process.exit(0))),setTimeout(()=>process.exit(1),3000).unref()}),process.on("SIGTERM",()=>process.emit("SIGINT")),I.listen(MO,()=>{console.log(BI.magenta(`
|
|
492
492
|
\uD83D\uDEF8 Serena Memory Dashboard`)),console.log(BI.white(` http://localhost:${MO}`)),console.log(BI.dim(` Watching: ${$}
|
|
493
|
-
`))})}var LO={name:"oh-my-agent",version:"4.
|
|
493
|
+
`))})}var LO={name:"oh-my-agent",version:"4.16.0",description:"Portable multi-agent harness for .agents-based skills and workflows across Antigravity, Claude Code, Codex, OpenCode, and more",type:"module",bin:{"oh-my-ag":"./bin/cli.js",oma:"./bin/cli.js"},files:["bin"],keywords:["oh-my-agent","antigravity",".agents","agent","skills","agent-skills","multi-agent","orchestrator","claude","claude-code","codex","opencode","copilot","cursor","chatgpt","pm","frontend","backend","mobile","qa","debug","terraform","database","workflow","bug-fixing","gemini"],author:"our.first.fluke <our.first.fluke@gmail.com>",contributors:["gracefullight <gracefullight.dev@gmail.com>","gahyun-git <go4it.gh@gmail.com>"],license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/first-fluke"},{type:"buymeacoffee",url:"https://buymeacoffee.com/firstfluke"}],scripts:{"sync:readme":"node ./scripts/sync-readme.mjs",build:"bun run sync:readme && bun build cli.ts --outfile bin/cli.js --target node --minify",dev:"bun run cli.ts",lint:"biome check --write --unsafe .",test:"vitest run",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.1.0",chokidar:"^5.0.0",commander:"^14.0.3","p-map":"^7.0.4",picocolors:"^1.1.1",ws:"^8.18.0",yaml:"^2.8.2",zod:"^4.3.6"},devDependencies:{"@biomejs/biome":"2.4.5","@types/bun":"^1.3.10","@types/ws":"^8.18.1",vitest:"^4.0.18"},peerDependencies:{typescript:"^6"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},antigravity:{skillsPath:".agents/skills",skills:["oma-brainstorm","oma-coordination","oma-pm","oma-frontend","oma-backend","oma-db","oma-mobile","oma-qa","oma-debug","oma-orchestrator","oma-dev-workflow","oma-tf-infra","oma-commit"]}};import{existsSync as Yf,mkdirSync as Of,readdirSync as o0,readFileSync as Df,statSync as n9}from"node:fs";import{basename as Vf,join as A4}from"node:path";var i$=q$(b$(),1),Bf="●",Mf="✓",Rf="✗",Kf="○",Lf="◌";function Pf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return A4($,".serena","memories");return A4(process.cwd(),".serena","memories")}function t0($){try{return Df($,"utf-8")}catch{return""}}function Wf($){try{let I=o0($);if(I.includes("orchestrator-session.md"))return A4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:n9(A4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return A4($,U[0].name)}catch{}return null}function Zf($){let I=Wf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=t0(I);if(!U)return{id:"N/A",status:"UNKNOWN"};let _=(U.match(/session-id:\s*(.+)/i)||[])[1]||(U.match(/# Session:\s*(.+)/i)||[])[1]||U.match(/(session-\d{8}-\d{6})/)?.[1]||Vf(I,".md"),u="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(U))u="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(U))u="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(U))u="FAILED";else if(/Step \d+:.*\[/i.test(U))u="RUNNING";return{id:(_||"N/A").trim(),status:u}}function Af($){let I=t0(A4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
|
|
494
494
|
`);for(let u of _){if(!u.startsWith("|")||/^\|\s*-+/.test(u))continue;let g=u.split("|").map((N)=>N.trim()).filter(Boolean),z=g[0];if(g.length<2||!z||/^agent$/i.test(z))continue;let v=g[1],J=g[2];U.push({agent:z,status:v||"pending",task:J||""})}return U}function i9($,I){try{let U=o0($).filter((g)=>g.startsWith(`progress-${I}`)&&g.endsWith(".md")).sort().reverse();if(U.length===0||!U[0])return null;let u=t0(A4($,U[0])).match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function bf($){try{let I=o0($).filter((_)=>_.endsWith(".md")&&_!==".gitkeep").map((_)=>({name:_,mtime:n9(A4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime).slice(0,5),U=[];for(let _ of I){let u=_.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||_.name.replace(/\.md$/,""),z=t0(A4($,_.name)).split(`
|
|
495
495
|
`).map((J)=>J.trim()).filter((J)=>J&&!J.startsWith("---")&&J.length>3),v="";for(let J=z.length-1;J>=0;J--){let N=z[J];if(!N)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(N)){if(v=N.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),v.length>5)break}}if(v.length>52)v=`${v.substring(0,49)}...`;if(v)U.push({agent:u,message:v})}return U}catch{return[]}}function jf($){let I=[],U=new Set;try{let _=o0($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:n9(A4($,u)).mtimeMs})).sort((u,g)=>g.mtime-u.mtime);for(let u of _){let g=t0(A4($,u.name)),z=g.match(/\*\*Agent\*\*:\s*(.+)/i)||g.match(/Agent:\s*(.+)/i)||g.match(/^#+\s*(.+?)\s*Agent/im),v=null;if(z?.[1])v=z[1].trim();else if(/_agent|agent_|-agent/i.test(u.name))v=u.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(v&&!U.has(v.toLowerCase())){U.add(v.toLowerCase());let J="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(g))J="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(g))J="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(g))J="failed";let N=g.match(/## Task\s*\n+(.+)/i)||g.match(/\*\*Task\*\*:\s*(.+)/i),X=N?.[1]?N[1].trim().substring(0,20):"";I.push({agent:v,status:J,task:X,turn:i9($,v)})}}}catch{}return I}function Ff($){let I=$.toLowerCase();if(["running","active","in_progress","in-progress"].includes(I))return`${i$.default.green(Bf)} running`;else if(["completed","done","finished"].includes(I))return`${i$.default.cyan(Mf)} completed`;else if(["failed","error"].includes(I))return`${i$.default.red(Rf)} failed`;else if(["blocked","waiting"].includes(I))return`${i$.default.yellow(Kf)} blocked`;return`${i$.default.dim(Lf)} pending`}function PO($){console.clear();let I=Zf($),_=Af($).map((Q)=>({...Q,turn:i9($,Q.agent)}));if(_.length===0)_=jf($);if(_.length===0)try{let Q=o0($).filter((Y)=>Y.startsWith("progress-")&&Y.endsWith(".md"));for(let Y of Q){let R=Y.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:R,status:"running",task:"",turn:i9($,R)})}}catch{}let u=56,g="═".repeat(u),z=(Q)=>" ".repeat(Math.max(0,Q)),v=(Q)=>i$.default.magenta(Q),J=(Q)=>i$.default.bold(Q),N=(Q)=>i$.default.dim(Q),X=i$.default.yellow;if(I.status==="RUNNING")X=i$.default.green;else if(I.status==="COMPLETED")X=i$.default.cyan;else if(I.status==="FAILED")X=i$.default.red;console.log(`${v(`╔${g}╗`)}`),console.log(`${v("║")} ${J(v("Serena Memory Dashboard"))}${z(u-25)}${v("║")}`);let G=`Session: ${J(I.id.padEnd(20))} [${X(I.status)}]`;if(console.log(`${v("║")} ${G}${z(u-4-G.length-9)}${v("║")}`),console.log(`${v(`╠${g}╣`)}`),console.log(`${v("║")} ${J(`${"Agent".padEnd(12)} ${"Status".padEnd(12)} ${"Turn".padEnd(6)} ${"Task".padEnd(20)}`)} ${v("║")}`),console.log(`${v("║")} ${N(`${"──────────".padEnd(12)} ${"──────────".padEnd(12)} ${"────".padEnd(6)} ${"──────────────────".padEnd(20)}`)} ${v("║")}`),_.length===0)console.log(`${v("║")} ${N(`No agents detected yet${z(32)}`)}${v("║")}`);else for(let Q of _){let Y=Ff(Q.status),R=Q.turn!=null?String(Q.turn):"-",K=Q.task.substring(0,20);console.log(`${v("║")} ${Q.agent.padEnd(12)} ${Y.padEnd(22)} ${R.padEnd(6)} ${K.padEnd(20)}${v("║")}`)}console.log(`${v(`╠${g}╣`)}`),console.log(`${v("║")} ${J("Latest Activity:")}${z(u-18)}${v("║")}`);let q=bf($);if(q.length===0)console.log(`${v("║")} ${N(`No activity yet${z(38)}`)}${v("║")}`);else for(let Q of q){let Y=`[${Q.agent}] ${Q.message}`;console.log(`${v("║")} ${N(Y.substring(0,52).padEnd(52))}${v("║")}`)}console.log(`${v(`╠${g}╣`)}`);let H=`Updated: ${new Date().toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})} | Ctrl+C to exit`;console.log(`${v("║")} ${N(H)}${z(u-4-H.length)}${v("║")}`),console.log(`${v(`╚${g}╝`)}`)}async function WO(){let $=Pf();if(!Yf($))Of($,{recursive:!0}),console.log(i$.default.yellow(`Created ${$} — waiting for memory files...`));console.log(i$.default.magenta(`
|
|
496
496
|
\uD83D\uDEF8 Serena Terminal Dashboard`)),console.log(i$.default.dim(` Watching: ${$}
|
package/package.json
CHANGED