oh-my-agent 8.3.0 → 8.4.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/README.md +4 -6
- package/bin/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,17 +13,17 @@ Works with all major AI IDEs: Antigravity, Claude Code, Cursor, Gemini CLI, Code
|
|
|
13
13
|
## Quick Start
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
# macOS / Linux — auto-installs bun &
|
|
16
|
+
# macOS / Linux — auto-installs bun, uv & serena if missing
|
|
17
17
|
curl -fsSL https://raw.githubusercontent.com/first-fluke/oh-my-agent/main/cli/install.sh | bash
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
```powershell
|
|
21
|
-
# Windows (PowerShell) — auto-installs bun &
|
|
21
|
+
# Windows (PowerShell) — auto-installs bun, uv & serena if missing
|
|
22
22
|
irm https://raw.githubusercontent.com/first-fluke/oh-my-agent/main/cli/install.ps1 | iex
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
# Or manual (any OS, requires bun + uv)
|
|
26
|
+
# Or manual (any OS, requires bun + uv + serena)
|
|
27
27
|
bunx oh-my-agent@latest
|
|
28
28
|
```
|
|
29
29
|
|
|
@@ -43,8 +43,6 @@ apm install first-fluke/oh-my-agent
|
|
|
43
43
|
apm install first-fluke/oh-my-agent/.agents/skills/oma-frontend
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
APM reads `.claude-plugin/plugin.json`'s `skills: .agents/skills/` pointer, so the `.agents/` SSOT is the only source — no build step or mirror.
|
|
47
|
-
|
|
48
46
|
APM ships skills only. For workflows, rules, `oma-config.yaml`, keyword-detection hooks, and the `oma agent:spawn` CLI, use `bunx oh-my-agent@latest`. Pick one distribution per project to avoid drift.
|
|
49
47
|
|
|
50
48
|
</details>
|
|
@@ -245,7 +243,7 @@ agents:
|
|
|
245
243
|
- `ralph` workflow — independent JUDGE re-verifies every criterion each iteration to catch silent regressions; heavy-test caching for >30s suites
|
|
246
244
|
- Exploration Loop — after 2 retries, `orchestrate` spawns hypothesis variants in parallel and keeps the highest-scoring result
|
|
247
245
|
- Monorepo auto-routing — `detectWorkspace` reads pnpm / nx / turbo / lerna and routes each agent to its workspace
|
|
248
|
-
- **Multi-vendor** — Mix
|
|
246
|
+
- **Multi-vendor** — Mix Claude, Codex, Cursor, and Qwen per agent type
|
|
249
247
|
- **Observable** — Terminal and web dashboards for real-time monitoring
|
|
250
248
|
|
|
251
249
|
## Architecture
|
package/bin/cli.js
CHANGED
|
@@ -1637,7 +1637,7 @@ spawn_error:${Q.message}`})})})}async function _K2($,z,G={}){let J=performance.n
|
|
|
1637
1637
|
`);let z=new V6("!xml"),G=z,J="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let U=this.options,K=new xD(U.processEntities),X=$.length;for(let Q=0;Q<X;Q++)if($[Q]==="<"){let j=$.charCodeAt(Q+1);if(j===47){let Y=PZ($,">",Q,"Closing Tag is not closed."),W=$.substring(Q+2,Y).trim();if(U.removeNSPrefix){let L=W.indexOf(":");if(L!==-1)W=W.substr(L+1)}if(W=Vd(U.transformTagName,W,"",U).tagName,G)J=this.saveTextToParentTag(J,G,this.readonlyMatcher);let k=this.matcher.getCurrentTag();if(W&&U.unpairedTagsSet.has(W))throw Error(`Unpaired tag can not be used as closing tag: </${W}>`);if(k&&U.unpairedTagsSet.has(k))this.matcher.pop(),this.tagsNodeStack.pop();this.matcher.pop(),this.isCurrentNodeStopNode=!1,G=this.tagsNodeStack.pop(),J="",Q=Y}else if(j===63){let Y=Fd($,Q,!1,"?>");if(!Y)throw Error("Pi Tag is not closed.");J=this.saveTextToParentTag(J,G,this.readonlyMatcher);let W=this.buildAttributesMap(Y.tagExp,this.matcher,Y.tagName,!0);if(W){let k=W[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(k)||1),K.setXmlVersion(Number(k)||1)}if(U.ignoreDeclaration&&Y.tagName==="?xml"||U.ignorePiTags);else{let k=new V6(Y.tagName);if(k.add(U.textNodeName,""),Y.tagName!==Y.tagExp&&Y.attrExpPresent&&U.ignoreAttributes!==!0)k[":@"]=W;this.addChild(G,k,this.readonlyMatcher,Q)}Q=Y.closeIndex+1}else if(j===33&&$.charCodeAt(Q+2)===45&&$.charCodeAt(Q+3)===45){let Y=PZ($,"-->",Q+4,"Comment is not closed.");if(U.commentPropName){let W=$.substring(Q+4,Y-2);J=this.saveTextToParentTag(J,G,this.readonlyMatcher),G.add(U.commentPropName,[{[U.textNodeName]:W}])}Q=Y}else if(j===33&&$.charCodeAt(Q+2)===68){let Y=K.readDocType($,Q);this.entityDecoder.addInputEntities(Y.entities),Q=Y.i}else if(j===33&&$.charCodeAt(Q+2)===91){let Y=PZ($,"]]>",Q,"CDATA is not closed.")-2,W=$.substring(Q+9,Y);J=this.saveTextToParentTag(J,G,this.readonlyMatcher);let k=this.parseTextData(W,G.tagname,this.readonlyMatcher,!0,!1,!0,!0);if(k==null)k="";if(U.cdataPropName)G.add(U.cdataPropName,[{[U.textNodeName]:W}]);else G.add(U.textNodeName,k);Q=Y+2}else{let Y=Fd($,Q,U.removeNSPrefix);if(!Y){let I=$.substring(Math.max(0,Q-50),Math.min(X,Q+50));throw Error(`readTagExp returned undefined at position ${Q}. Context: "${I}"`)}let{tagName:W,rawTagName:k,tagExp:L,attrExpPresent:H,closeIndex:B}=Y;if({tagName:W,tagExp:L}=Vd(U.transformTagName,W,L,U),U.strictReservedNames&&(W===U.commentPropName||W===U.cdataPropName||W===U.textNodeName||W===U.attributesGroupName))throw Error(`Invalid tag name: ${W}`);if(G&&J){if(G.tagname!=="!xml")J=this.saveTextToParentTag(J,G,this.readonlyMatcher,!1)}let A=G;if(A&&U.unpairedTagsSet.has(A.tagname))G=this.tagsNodeStack.pop(),this.matcher.pop();let V=!1;if(L.length>0&&L.lastIndexOf("/")===L.length-1){if(V=!0,W[W.length-1]==="/")W=W.substr(0,W.length-1),L=W;else L=L.substr(0,L.length-1);H=W!==L}let F=null,N={},O=void 0;if(O=eb5(k),W!==z.tagname)this.matcher.push(W,{},O);if(W!==L&&H){if(F=this.buildAttributesMap(L,this.matcher,W),F)N=tb5(F,U)}if(W!==z.tagname)this.isCurrentNodeStopNode=this.isItStopNode();let u=Q;if(this.isCurrentNodeStopNode){let I="";if(V)Q=Y.closeIndex;else if(U.unpairedTagsSet.has(W))Q=Y.closeIndex;else{let M=this.readStopNodeData($,k,B+1);if(!M)throw Error(`Unexpected end of ${k}`);Q=M.i,I=M.tagContent}let D=new V6(W);if(F)D[":@"]=F;D.add(U.textNodeName,I),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(G,D,this.readonlyMatcher,u)}else{if(V){({tagName:W,tagExp:L}=Vd(U.transformTagName,W,L,U));let I=new V6(W);if(F)I[":@"]=F;this.addChild(G,I,this.readonlyMatcher,u),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(U.unpairedTagsSet.has(W)){let I=new V6(W);if(F)I[":@"]=F;this.addChild(G,I,this.readonlyMatcher,u),this.matcher.pop(),this.isCurrentNodeStopNode=!1,Q=Y.closeIndex;continue}else{let I=new V6(W);if(this.tagsNodeStack.length>U.maxNestedTags)throw Error("Maximum nested tags exceeded");if(this.tagsNodeStack.push(G),F)I[":@"]=F;this.addChild(G,I,this.readonlyMatcher,u),G=I}J="",Q=B}}}else J+=$[Q];return z.child};function KC5($,z,G,J){if(!this.options.captureMetaData)J=void 0;let U=this.options.jPath?G.toString():G,K=this.options.updateTag(z.tagname,U,z[":@"]);if(K===!1);else if(typeof K==="string")z.tagname=K,$.addChild(z,J);else $.addChild(z,J)}function XC5($,z,G){let J=this.options.processEntities;if(!J||!J.enabled)return $;if(J.allowedTags){let U=this.options.jPath?G.toString():G;if(!(Array.isArray(J.allowedTags)?J.allowedTags.includes(z):J.allowedTags(z,U)))return $}if(J.tagFilter){let U=this.options.jPath?G.toString():G;if(!J.tagFilter(z,U))return $}return this.entityDecoder.decode($)}function QC5($,z,G,J){if($){if(J===void 0)J=z.child.length===0;if($=this.parseTextData($,z.tagname,G,!1,z[":@"]?Object.keys(z[":@"]).length!==0:!1,J),$!==void 0&&$!=="")z.add(this.options.textNodeName,$);$=""}return $}function ZC5(){if(this.stopNodeExpressionsSet.size===0)return!1;return this.matcher.matchesAny(this.stopNodeExpressionsSet)}function jC5($,z,G=">"){let J=0,U=$.length,K=G.charCodeAt(0),X=G.length>1?G.charCodeAt(1):-1,Q="",Z=z;for(let j=z;j<U;j++){let Y=$.charCodeAt(j);if(J){if(Y===J)J=0}else if(Y===34||Y===39)J=Y;else if(Y===K)if(X!==-1){if($.charCodeAt(j+1)===X)return Q+=$.substring(Z,j),{data:Q,index:j}}else return Q+=$.substring(Z,j),{data:Q,index:j};else if(Y===9&&!J)Q+=$.substring(Z,j)+" ",Z=j+1}}function PZ($,z,G,J){let U=$.indexOf(z,G);if(U===-1)throw Error(J);else return U+z.length-1}function YC5($,z,G,J){let U=$.indexOf(z,G);if(U===-1)throw Error(J);return U}function Fd($,z,G,J=">"){let U=jC5($,z+1,J);if(!U)return;let{data:K,index:X}=U,Q=K.search(/\s/),Z=K,j=!0;if(Q!==-1)Z=K.substring(0,Q),K=K.substring(Q+1).trimStart();let Y=Z;if(G){let W=Z.indexOf(":");if(W!==-1)Z=Z.substr(W+1),j=Z!==U.data.substr(W+1)}return{tagName:Z,tagExp:K,closeIndex:X,attrExpPresent:j,rawTagName:Y}}function WC5($,z,G){let J=G,U=1,K=$.length;for(;G<K;G++)if($[G]==="<"){let X=$.charCodeAt(G+1);if(X===47){let Q=YC5($,">",G,`${z} is not closed`);if($.substring(G+2,Q).trim()===z){if(U--,U===0)return{tagContent:$.substring(J,G),i:Q}}G=Q}else if(X===63)G=PZ($,"?>",G+1,"StopNode is not closed.");else if(X===33&&$.charCodeAt(G+2)===45&&$.charCodeAt(G+3)===45)G=PZ($,"-->",G+3,"StopNode is not closed.");else if(X===33&&$.charCodeAt(G+2)===91)G=PZ($,"]]>",G,"StopNode is not closed.")-2;else{let Q=Fd($,G,!1);if(Q){if((Q&&Q.tagName)===z&&Q.tagExp[Q.tagExp.length-1]!=="/")U++;G=Q.closeIndex}}}}function Nd($,z,G){if(z&&typeof $==="string"){let J=$.trim();if(J==="true")return!0;else if(J==="false")return!1;else return Bd($,G)}else if(zT2($))return $;else return""}function Vd($,z,G,J){if($){let U=$(z);if(G===z)G=U;z=U}return z=TT2(z,J),{tagName:z,tagExp:G}}function TT2($,z){if(SD.includes($))throw Error(`[SECURITY] Invalid name: "${$}" is a reserved JavaScript keyword that could cause prototype pollution`);else if(lk.includes($))return z.onDangerousProperty($);return $}var Od=V6.getMetaDataSymbol();function LC5($,z){if(!$||typeof $!=="object")return{};if(!z)return $;let G={};for(let J in $)if(J.startsWith(z)){let U=J.substring(z.length);G[U]=$[J]}else G[J]=$[J];return G}function qd($,z,G,J){return RT2($,z,G,J)}function RT2($,z,G,J){let U,K={};for(let X=0;X<$.length;X++){let Q=$[X],Z=kC5(Q);if(Z!==void 0&&Z!==z.textNodeName){let j=LC5(Q[":@"]||{},z.attributeNamePrefix);G.push(Z,j)}if(Z===z.textNodeName)if(U===void 0)U=Q[Z];else U+=""+Q[Z];else if(Z===void 0)continue;else if(Q[Z]){let j=RT2(Q[Z],z,G,J),Y=BC5(j,z);if(Object.keys(j).length===0&&z.alwaysCreateTextNode)j[z.textNodeName]="";if(Q[":@"])HC5(j,Q[":@"],J,z);else if(Object.keys(j).length===1&&j[z.textNodeName]!==void 0&&!z.alwaysCreateTextNode)j=j[z.textNodeName];else if(Object.keys(j).length===0)if(z.alwaysCreateTextNode)j[z.textNodeName]="";else j="";if(Q[Od]!==void 0&&typeof j==="object"&&j!==null)j[Od]=Q[Od];if(K[Z]!==void 0&&Object.prototype.hasOwnProperty.call(K,Z)){if(!Array.isArray(K[Z]))K[Z]=[K[Z]];K[Z].push(j)}else{let W=z.jPath?J.toString():J;if(z.isArray(Z,W,Y))K[Z]=[j];else K[Z]=j}if(Z!==void 0&&Z!==z.textNodeName)G.pop()}}if(typeof U==="string"){if(U.length>0)K[z.textNodeName]=U}else if(U!==void 0)K[z.textNodeName]=U;return K}function kC5($){let z=Object.keys($);for(let G=0;G<z.length;G++){let J=z[G];if(J!==":@")return J}}function HC5($,z,G,J){if(z){let U=Object.keys(z),K=U.length;for(let X=0;X<K;X++){let Q=U[X],Z=Q.startsWith(J.attributeNamePrefix)?Q.substring(J.attributeNamePrefix.length):Q,j=J.jPath?G.toString()+"."+Z:G;if(J.isArray(Q,j,!0,!0))$[Q]=[z[Q]];else $[Q]=z[Q]}}}function BC5($,z){let{textNodeName:G}=z,J=Object.keys($).length;if(J===0)return!0;if(J===1&&($[G]||typeof $[G]==="boolean"||$[G]===0))return!0;return!1}class rk{constructor($){this.externalEntities={},this.options=uT2($)}parse($,z){if(typeof $!=="string"&&$.toString)$=$.toString();else if(typeof $!=="string")throw Error("XML data is accepted in String or Bytes[] form.");if(z){if(z===!0)z={};let U=XT2($,z);if(U!==!0)throw Error(`${U.err.msg}:${U.err.line}:${U.err.col}`)}let G=new iD(this.options,this.externalEntities),J=G.parseXml($);if(this.options.preserveOrder||J===void 0)return J;else return qd(J,this.options,G.matcher,G.readonlyMatcher)}addEntity($,z){if(z.indexOf("&")!==-1)throw Error("Entity value can't have '&'");else if($.indexOf("&")!==-1||$.indexOf(";")!==-1)throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");else if(z==="&")throw Error("An entity with value '&' is not permitted");else this.externalEntities[$]=z}static getMetaDataSymbol(){return V6.getMetaDataSymbol()}}X8();var AC5=["/rss","/feed","/atom.xml","/rss.xml","/index.xml"],VC5=new rk({ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text"});function ud($){if($===void 0||$===null)return[];return Array.isArray($)?$:[$]}function P3($){if($==null)return;if(typeof $==="string")return $;if(typeof $==="object"){let z=$;if(typeof z["#text"]==="string")return z["#text"];if(typeof z["#cdata"]==="string")return z["#cdata"]}return}function vT2($){for(let z of ud($)){let G=z?.["@_href"],J=z?.["@_rel"];if(typeof G==="string"&&(J===void 0||J==="alternate"))return G}return}function PT2($){let z;try{z=VC5.parse($)}catch{return null}let G=z.rss;if(G){let U=G.channel;if(!U)return null;let K=ud(U.item);return{kind:"rss",title:P3(U.title),description:P3(U.description),link:P3(U.link),entries:K.map((X)=>({title:P3(X.title),link:P3(X.link),pubDate:P3(X.pubDate),description:P3(X.description),content:P3(X["content:encoded"])??P3(X.content)}))}}let J=z.feed;if(J){let U=ud(J.entry);return{kind:"atom",title:P3(J.title),description:P3(J.subtitle),link:vT2(J.link),entries:U.map((K)=>({title:P3(K.title),link:vT2(K.link),pubDate:P3(K.published)??P3(K.updated),description:P3(K.summary),content:P3(K.content)??P3(K.summary)}))}}return null}async function wT2($,z){let G=performance.now(),J;try{let K=await d1($.toString(),{timeoutMs:z.timeoutMs,locale:z.locale,signal:z.signal});if(K.ok)J=KO(K.text).alternate?.[0]?.href}catch{}let U=new Set;if(J)try{U.add(new URL(J,$).toString())}catch{}for(let K of AC5)U.add(new URL(K,`${$.protocol}//${$.host}`).toString());for(let K of U){if(z.signal?.aborted)break;try{let X=await d1(K,{timeoutMs:z.timeoutMs,locale:z.locale,signal:z.signal});if(!X.ok||X.text.length<50)continue;let Q=PT2(X.text);if(!Q||Q.entries.length===0)continue;return{url:$.toString(),status:"ok",strategy:"probe",platform:"rss",httpStatus:X.status,content:X.text,contentType:X.headers.get("content-type")??void 0,elapsedMs:Math.round(performance.now()-G),signals:[],feedUrl:K,feed:Q}}catch{}}return{url:$.toString(),status:"not-found",strategy:"probe",platform:"rss",content:"",elapsedMs:Math.round(performance.now()-G),signals:[],error:"no RSS/Atom feed discovered"}}function bT2($,z="en-US"){let[G,J]=z.split("-"),U=new URL("https://news.google.com/rss/search");return U.searchParams.set("q",$),U.searchParams.set("hl",G??"en"),U.searchParams.set("gl",J??"US"),U.searchParams.set("ceid",`${J??"US"}:${G??"en"}`),U.toString()}KW();X8();var gD={"github.com":{domain:"github.com",level:"verified",score:0.95,tags:["code-host"],source:"registry"},"docs.github.com":{domain:"docs.github.com",level:"verified",score:0.95,tags:["lang-docs"],source:"registry"},"developer.mozilla.org":{domain:"developer.mozilla.org",level:"verified",score:0.95,tags:["lang-docs"],source:"registry"},"nextjs.org":{domain:"nextjs.org",level:"verified",score:0.9,tags:["vendor","lang-docs"],source:"registry"},"vercel.com":{domain:"vercel.com",level:"verified",score:0.9,tags:["vendor"],source:"registry"},"typescriptlang.org":{domain:"typescriptlang.org",level:"verified",score:0.95,tags:["lang-docs"],source:"registry"},"stackoverflow.com":{domain:"stackoverflow.com",level:"community",score:0.7,tags:["qna"],source:"registry"},"dev.to":{domain:"dev.to",level:"external",score:0.4,tags:["blog"],source:"registry"},"medium.com":{domain:"medium.com",level:"external",score:0.35,tags:["blog"],source:"registry"},"npmjs.com":{domain:"npmjs.com",level:"verified",score:0.9,tags:["registry"],source:"registry"},"pypi.org":{domain:"pypi.org",level:"verified",score:0.9,tags:["registry"],source:"registry"},"news.ycombinator.com":{domain:"news.ycombinator.com",level:"community",score:0.65,tags:["news"],source:"registry"},"reddit.com":{domain:"reddit.com",level:"community",score:0.55,tags:["forum"],source:"registry"},"wikipedia.org":{domain:"wikipedia.org",level:"community",score:0.75,tags:["encyclopedia"],source:"registry"},"arxiv.org":{domain:"arxiv.org",level:"verified",score:0.9,tags:["academic"],source:"registry"},"doi.org":{domain:"doi.org",level:"verified",score:0.95,tags:["academic"],source:"registry"}};function FC5($){return $.replace(/^www\./,"")}function NC5($){if($ in gD){let G=gD[$];return G?{...G}:null}let z=FC5($);if(z in gD){let G=gD[z];return G?{...G}:null}return null}function OC5($){let z=$.split(".").pop();if(z==="gov"||z==="edu"||z==="mil")return{domain:$,level:"verified",score:0.9,tags:["institution"],source:"heuristic"};if(/\.gov\.[a-z]{2}$/.test($)||/\.ac\.[a-z]{2}$/.test($))return{domain:$,level:"verified",score:0.85,tags:["institution"],source:"heuristic"};return null}async function qC5($){try{let z=await d1(`https://tranco-list.eu/api/ranks/domain/${$}`,{timeoutMs:5000});if(!z.ok)return null;let J=JSON.parse(z.text).ranks?.[0]?.rank;if(!J)return null;let U=J<1e4?0.6:J<1e5?0.4:0.2;return{domain:$,level:J<1e4?"community":"external",score:U,tags:["tranco"],source:"tranco",rank:J}}catch{return null}}async function CT2($){let z=NC5($);if(z)return z;let G=OC5($);if(G)return G;let J=await qC5($);if(J)return J;return{domain:$,level:"unknown",score:null,tags:[],source:"heuristic"}}var ST2=["api","probe","impersonate","browser","archive"];function _T2($){if(!$)return;let z=$.split(",").map((J)=>J.trim()).filter(Boolean),G=z.filter((J)=>!ST2.includes(J));if(G.length>0)throw Error(`Unknown strategy: ${G.join(", ")}. Valid: ${ST2.join(", ")}`);return z}function wZ($){try{return new URL($)}catch{throw Error(`Invalid URL: ${$}`)}}function lz($){return{timeoutMs:$.timeout?Math.max(1000,Math.floor(Number($.timeout)*1000)):15000,locale:$.locale??"en-US,en;q=0.9"}}function m0($,z){if(z)console.log(JSON.stringify($,null,2));else console.log(JSON.stringify($))}function XU($){if(!$){process.exitCode=1;return}if($.status==="ok")process.exitCode=0;else if($.status==="blocked")process.exitCode=2;else if($.status==="not-found")process.exitCode=3;else if($.status==="invalid-input")process.exitCode=4;else if($.status==="auth-required")process.exitCode=5;else if($.status==="timeout")process.exitCode=6;else process.exitCode=1}function yT2($){let z=$.command("search").description("Mechanical search primitives — fetch, meta, rss, media, trust, code").alias("s");z.command("fetch <url>").description("Fetch URL via auto-escalating strategy pipeline").option("--only <strategies>","Comma-separated strategies to run").option("--skip <strategies>","Comma-separated strategies to skip").option("--include-archive","Include archive strategy as last fallback").option("--timeout <seconds>","Per-strategy timeout","15").option("--locale <value>","Accept-Language header","en-US,en;q=0.9").option("--pretty","Pretty-print JSON output").action(async(G,J)=>{try{let U=wZ(G),K=lz(J),X=await $T2(U,K,{only:_T2(J.only),skip:_T2(J.skip),includeArchive:J.includeArchive});m0(X,Boolean(J.pretty)),XU(X)}catch(U){console.error(w8.default.red(U.message)),process.exitCode=1}}),z.command("api <url>").description("Fetch via matched platform API (Phase 0)").option("--timeout <seconds>","Timeout","15").option("--locale <value>","Accept-Language","en-US,en;q=0.9").option("--pretty","Pretty-print JSON").action(async(G,J)=>{try{let U=wZ(G);if(!Dy(U)){console.error(w8.default.yellow(`No API handler matches host ${U.hostname}`)),process.exitCode=3;return}let X=lz(J),Q=await oF(U,X);if(!Q){process.exitCode=3;return}m0(Q,Boolean(J.pretty)),XU(Q)}catch(U){console.error(w8.default.red(U.message)),process.exitCode=1}}),z.command("api:search <query>").description("Fan-out keyword search across platforms that support it").option("--platforms <list>","Comma-separated platform ids").option("--timeout <seconds>","Timeout","15").option("--locale <value>","Accept-Language","en-US,en;q=0.9").option("--pretty","Pretty-print JSON").action(async(G,J)=>{let U=lz(J),K=J.platforms?J.platforms.split(",").map((Q)=>Q.trim()).filter(Boolean):void 0,X=await x$(G,U,K);m0(X,Boolean(J.pretty))}),z.command("meta <url>").description("Extract OGP / JSON-LD / Schema.org from URL").option("--timeout <seconds>","Timeout","15").option("--locale <value>","Accept-Language","en-US,en;q=0.9").option("--pretty","Pretty-print JSON").action(async(G,J)=>{try{let U=wZ(G),K=lz(J),X=await hK2(U,K),{content:Q,...Z}=X;m0(Z,Boolean(J.pretty)),XU(X)}catch(U){console.error(w8.default.red(U.message)),process.exitCode=1}}),z.command("rss <url>").description("Discover and parse RSS/Atom feed for a URL").option("--timeout <seconds>","Timeout","15").option("--locale <value>","Accept-Language","en-US,en;q=0.9").option("--pretty","Pretty-print JSON").action(async(G,J)=>{try{let U=wZ(G),K=lz(J),X=await wT2(U,K),{content:Q,...Z}=X;m0(Z,Boolean(J.pretty)),XU(X)}catch(U){console.error(w8.default.red(U.message)),process.exitCode=1}}),z.command("rss:google <query>").description("Build Google News RSS URL for a query").option("--locale <value>","Locale (e.g., ko-KR)","en-US").action((G,J)=>{let U=bT2(G,J.locale??"en-US");console.log(U)}),z.command("media <url>").description("Extract media metadata via yt-dlp (1858 sites)").option("--subs","Write subtitles").option("--sub-lang <list>","Subtitle languages (comma-separated)","en").option("--format <spec>","yt-dlp format spec").option("--timeout <seconds>","Timeout","30").option("--pretty","Pretty-print JSON").action(async(G,J)=>{try{let U=wZ(G),K=lz(J),X=J.subLang?J.subLang.split(",").map((Z)=>Z.trim()).filter(Boolean):void 0,Q=await _K2(U,K,{subtitles:J.subs,...X?{subLangs:X}:{},...J.format?{format:J.format}:{}});m0(Q,Boolean(J.pretty)),XU(Q)}catch(U){console.error(w8.default.red(U.message)),process.exitCode=1}}),z.command("archive <url>").description("Fetch via AMP / archive.today / Wayback").option("--timeout <seconds>","Timeout","15").option("--locale <value>","Accept-Language","en-US,en;q=0.9").option("--pretty","Pretty-print JSON").action(async(G,J)=>{try{let U=wZ(G),K=lz(J),X=await bW(U,K);m0(X,Boolean(J.pretty)),XU(X)}catch(U){console.error(w8.default.red(U.message)),process.exitCode=1}}),z.command("trust <domain>").description("Resolve trust level / score for a domain").option("--pretty","Pretty-print JSON").action(async(G,J)=>{let U=await CT2(G.toLowerCase());m0(U,Boolean(J.pretty))}),z.command("code <query>").description("Search code via gh / glab").option("--host <github|gitlab>","Host","github").option("--language <lang>","Language filter").option("--repo <owner/repo>","Scope to a repo").option("--limit <n>","Max results","20").option("--pretty","Pretty-print JSON").action(async(G,J)=>{let U=J.host==="gitlab"||J.host==="github"?J.host:"github",K=lz({}),X=await SK2(G,K,{host:U,...J.language?{language:J.language}:{},...J.repo?{repo:J.repo}:{},...J.limit?{limit:Number.parseInt(J.limit,10)}:{}});m0(X,Boolean(J.pretty)),XU(X)}),z.command("doctor").description("Check dependencies (Chrome, python3 curl_cffi, yt-dlp, gh)").action(async()=>{let G=[],J=Qd();G.push({name:"chrome",ok:Boolean(J),detail:J??"Install Chrome or set OMA_CHROME_PATH"}),G.push(await Md("python3",["--version"])),G.push(await uC5()),G.push(await Md("yt-dlp",["--version"])),G.push(await Md("gh",["--version"]));for(let U of G){let K=U.ok?w8.default.green("✓"):w8.default.yellow("!");console.log(`${K} ${U.name}: ${U.detail}`)}if(G.some((U)=>!U.ok))process.exitCode=1})}async function Md($,z){return new Promise((G)=>{let{spawn:J}=X2("node:child_process"),U=J($,z,{stdio:["ignore","pipe","pipe"]}),K="";U.stdout?.on("data",(X)=>{K+=X.toString()}),U.on("error",()=>G({name:$,ok:!1,detail:"not found"})),U.on("close",(X)=>{if(X===0)G({name:$,ok:!0,detail:K.trim()});else G({name:$,ok:!1,detail:`exit code ${X}`})})})}async function uC5(){return new Promise(($)=>{let{spawn:z}=X2("node:child_process"),G=z("python3",["-c","import curl_cffi; print(curl_cffi.__version__)"],{stdio:["ignore","pipe","pipe"]}),J="";G.stdout?.on("data",(U)=>{J+=U.toString()}),G.on("error",()=>$({name:"curl_cffi",ok:!1,detail:"python3 not found"})),G.on("close",(U)=>{if(U===0)$({name:"curl_cffi",ok:!0,detail:`v${J.trim()}`});else $({name:"curl_cffi",ok:!1,detail:"not installed (pip install curl_cffi)"})})})}U7();var cz=p2(I4(),1);import{execSync as MC5,spawnSync as hT2}from"node:child_process";import{platform as DC5}from"node:os";function IC5(){let $=DC5();if($==="darwin")return"brew install gh";if($==="win32")return"winget install GitHub.cli";return"sudo apt install gh"}async function xT2(){if(console.clear(),d4(cz.default.bgMagenta(cz.default.white(" ⭐ oh-my-agent star "))),!NG()){let z=IC5(),G=await F3({message:`GitHub CLI (gh) is not installed. Install with ${cz.default.cyan(z)}?`});if(Y4(G)||!G){T5("Install gh manually and try again.");return}let J=D6();J.start("Installing GitHub CLI...");let U=hT2(z,{shell:!0,stdio:"pipe"});if(U.status!==0){J.stop("Installation failed"),c5.error(U.stderr?.toString()||"Unknown error"),T5("Please install gh manually.");return}J.stop("GitHub CLI installed!")}if(!$8()){c5.warn("GitHub CLI is not authenticated.");let z=await F3({message:`Run ${cz.default.cyan("gh auth login")} now?`});if(Y4(z)||!z){T5("Authenticate and try again.");return}if(hT2("gh",["auth","login"],{stdio:"inherit"}),!$8()){T5("Authentication was not completed. Try again.");return}c5.success("Authenticated!")}if(OG()){T5(`Already starred ${cz.default.cyan(K1)}! Thank you! \uD83D\uDE4F`);return}let $=await F3({message:`Star ${cz.default.cyan(K1)} on GitHub?`});if(Y4($)||!$){T5("Maybe next time!");return}try{MC5(`gh api -X PUT /user/starred/${K1}`,{stdio:"ignore"}),T5(`Starred ${cz.default.cyan(K1)}! Thank you! \uD83C\uDF1F`)}catch{c5.error("Failed to star the repository."),T5("Please try again later.")}}function iT2($){$.command("star").description("Star oh-my-agent on GitHub").action(Y5(async()=>{await xT2()}))}U7();ix();oj();var w3=p2(I4(),1);import{existsSync as sk,mkdirSync as EC5,readdirSync as TC5,readFileSync as gT2,writeFileSync as lT2}from"node:fs";import{dirname as RC5,join as Dd}from"node:path";function vC5($){let z=te($),G={},J=0,U=0;for(let K of z){J+=K.tokens;let X=se(K.tokens,K.vendor);U+=X;let Q=G[K.vendor]??{tokens:0,spawns:0,usd:0};Q.tokens+=K.tokens,Q.spawns+=1,Q.usd+=X,G[K.vendor]=Q}return{totalTokens:J,totalSpawns:z.length,estimatedUsd:U,byVendor:G}}function mT2($){return $.toLocaleString("en-US")}function fT2($){if($===0)return"$0.00";if($<0.01)return"<$0.01";return`$${$.toFixed(2)}`}function Id($){return Dd($,".agents","state","metrics.json")}function PC5($){return Dd($,".serena","metrics.json")}function mD(){return{sessions:0,skillsUsed:{},tasksCompleted:0,totalSessionTime:0,filesChanged:0,linesAdded:0,linesRemoved:0,lastUpdated:new Date().toISOString(),startDate:new Date().toISOString()}}function wC5($){let z=Id($);if(sk(z))try{return JSON.parse(gT2(z,"utf-8"))}catch{return mD()}let G=PC5($);if(sk(G))try{return JSON.parse(gT2(G,"utf-8"))}catch{return mD()}return mD()}function bC5($,z){let G=Id($),J=RC5(G);if(!sk(J))EC5(J,{recursive:!0});z.lastUpdated=new Date().toISOString(),lT2(G,JSON.stringify(z,null,2),"utf-8")}function CC5($){let z=Dd($,".serena","memories"),G={};if(!sk(z))return G;try{let J=TC5(z);for(let U of J){let K=U.match(/(?:progress|result)-(\w+)/);if(K?.[1]){let X=K[1];G[X]=(G[X]||0)+1}}}catch{}return G}async function cT2($=!1,z=!1){let G=process.cwd(),J=Id(G);if(z){if(sk(J))lT2(J,JSON.stringify(mD(),null,2),"utf-8");if($)console.log(JSON.stringify({reset:!0}));else console.log(w3.default.green("✅ Metrics reset successfully."));return}let U=wC5(G),K=sN(G),X=CC5(G),Q=ve(G),Z=sA(G),j=Z.startedAt?new Date(Z.startedAt):null,Y=j&&!Number.isNaN(j.getTime())?Math.max(0,Math.floor((Date.now()-j.getTime())/1000)):0;for(let[A,V]of Object.entries(X))U.skillsUsed[A]=(U.skillsUsed[A]||0)+V;if(Q>U.tasksCompleted)U.tasksCompleted=Q;if(Z.id){if(["completed","failed","aborted"].includes(Z.status||"")&&(U.lastSessionId!==Z.id||U.lastSessionStatus!==Z.status)&&Y>0)U.totalSessionTime+=Y;U.lastSessionId=Z.id,U.lastSessionStatus=Z.status,U.lastSessionStarted=Z.startedAt,U.lastSessionDuration=Y}U.filesChanged+=K.filesChanged,U.linesAdded+=K.linesAdded,U.linesRemoved+=K.linesRemoved,U.sessions+=1,bC5(G,U);let W=Math.max(1,Math.ceil((Date.now()-new Date(U.startDate).getTime())/86400000)),k=U.sessions>0?Math.round(U.totalSessionTime/U.sessions):0,L=vC5(G);if($){console.log(JSON.stringify({...U,gitStats:K,daysSinceStart:W,avgSessionTime:k,cost:L},null,2));return}console.clear(),d4(w3.default.bgMagenta(w3.default.white(" \uD83D\uDCCA oh-my-agent stats ")));let H=[w3.default.bold(`\uD83D\uDCC8 Productivity Metrics (${W} days)`),"┌─────────────────────┬──────────────┐",`│ ${w3.default.bold("Metric")} │ ${w3.default.bold("Value")} │`,"├─────────────────────┼──────────────┤",`│ Sessions │ ${String(U.sessions).padEnd(12)} │`,`│ Tasks Completed │ ${String(U.tasksCompleted).padEnd(12)} │`,`│ Files Changed │ ${String(U.filesChanged).padEnd(12)} │`,`│ Lines Added │ ${w3.default.green(`+${U.linesAdded}`.padEnd(12))} │`,`│ Lines Removed │ ${w3.default.red(`-${U.linesRemoved}`.padEnd(12))} │`,"└─────────────────────┴──────────────┘"].join(`
|
|
1638
1638
|
`);if(G5(H,"Overview"),L.totalSpawns>0){let A=Object.entries(L.byVendor).sort(([,F],[,N])=>N.tokens-F.tokens).map(([F,N])=>` ${F.padEnd(12)} ${mT2(N.tokens).padStart(12)} tokens · ${String(N.spawns).padStart(3)} spawns · ${fT2(N.usd).padStart(7)}`),V=[w3.default.bold("\uD83D\uDCB0 Cost Telemetry (all sessions)"),"┌─────────────────────┬──────────────┐",`│ ${w3.default.bold("Metric")} │ ${w3.default.bold("Value")} │`,"├─────────────────────┼──────────────┤",`│ Total tokens (est.) │ ${mT2(L.totalTokens).padEnd(12)} │`,`│ Total spawns │ ${String(L.totalSpawns).padEnd(12)} │`,`│ Estimated USD │ ${fT2(L.estimatedUsd).padEnd(12)} │`,"└─────────────────────┴──────────────┘",w3.default.dim("By vendor (sorted by tokens):"),...A,w3.default.dim("Estimate is input-only (prompt char approximation); output tokens not yet tracked."),w3.default.dim("Configure session.quota_cap in .agents/oma-config.yaml to enforce budgets.")].join(`
|
|
1639
1639
|
`);G5(V,"Cost")}let B=Object.entries(U.skillsUsed).sort(([,A],[,V])=>V-A).slice(0,5);if(B.length>0){let A=[w3.default.bold("\uD83C\uDFC6 Top Skills Used"),...B.map(([V,F],N)=>` ${N+1}. ${V} (${F})`)].join(`
|
|
1640
|
-
`);G5(A,"Skills")}T5(w3.default.dim(`Data stored in: ${J}`))}function nT2($){$3($.command("stats").description("View productivity metrics").option("--reset","Reset metrics data")).action(Y5(async(z)=>{await cT2(l1(z),z.reset)},{supportsJsonOutput:!0}))}U7();var c4=p2(I4(),1);import{execSync as oT2}from"node:child_process";import{cpSync as cD,existsSync as ZU,mkdirSync as Ed,readFileSync as rT2,rmSync as Td,writeFileSync as Rd}from"node:fs";import{tmpdir as gC5}from"node:os";import{join as l7}from"node:path";var fD=p2(I4(),1);import{execSync as SC5,spawn as _C5}from"node:child_process";import{realpathSync as dT2}from"node:fs";import tk from"node:process";var QU="oh-my-agent";function yC5($=tk.argv[1]){if(!$)return{packageManager:"unknown",isGlobal:!1};if(tk.env.IS_BINARY==="true")return{packageManager:"binary",isGlobal:!0,updateMessage:"Running as a standalone binary. Download the latest release from GitHub."};let z;try{z=j9(dT2($))}catch{return{packageManager:"unknown",isGlobal:!1}}if(z.includes("/.npm/_npx")||z.includes("/npm/_npx"))return{packageManager:"npx",isGlobal:!1,updateMessage:"Running via npx, auto-update not applicable."};if(z.includes("/.pnpm/_pnpx")||z.includes("/.cache/pnpm/dlx"))return{packageManager:"pnpx",isGlobal:!1,updateMessage:"Running via pnpx, auto-update not applicable."};if(z.includes("/.bun/install/cache"))return{packageManager:"bunx",isGlobal:!1,updateMessage:"Running via bunx, auto-update not applicable."};if(tk.platform==="darwin")try{let G=SC5(`brew --prefix ${QU}`,{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();if(G){let J=j9(dT2(G));if(z.startsWith(J))return{packageManager:"homebrew",isGlobal:!0,updateCommand:`brew upgrade ${QU}`,updateMessage:"Installed via Homebrew. Updating in background..."}}}catch{}if(z.includes("/.pnpm/global")||z.includes("/.local/share/pnpm"))return{packageManager:"pnpm",isGlobal:!0,updateCommand:`pnpm add -g ${QU}@latest`,updateMessage:"Installed via pnpm. Updating in background..."};if(z.includes("/.yarn/global"))return{packageManager:"yarn",isGlobal:!0,updateCommand:`yarn global add ${QU}@latest`,updateMessage:"Installed via yarn. Updating in background..."};if(z.includes("/.bun/install/global"))return{packageManager:"bun",isGlobal:!0,updateCommand:`bun add -g ${QU}@latest`,updateMessage:"Installed via bun. Updating in background..."};return{packageManager:"npm",isGlobal:!0,updateCommand:`npm install -g ${QU}@latest`,updateMessage:"Installed via npm. Updating in background..."}}var pT2=/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/;function hC5($,z){let G=$.match(pT2),J=z.match(pT2);if(!G||!J)return!1;for(let U=1;U<=3;U++){let K=Number(G[U]),X=Number(J[U]);if(K<X)return!0;if(K>X)return!1}return!1}async function xC5($=QU,z=2000){try{let G=await S$.get(`https://registry.npmjs.org/${$}/latest`,{timeout:z});return typeof G.data?.version==="string"?G.data.version:null}catch{return null}}async function aT2($){if(!$.enabled)return{triggered:!1,reason:"disabled"};if(tk.env.OMA_SKIP_VERSION_CHECK==="1")return{triggered:!1,reason:"skipped-env"};if(tk.env.NODE_ENV==="development")return{triggered:!1,reason:"skipped-env"};let z=await xC5();if(!z)return{triggered:!1,reason:"fetch-failed"};if(!hC5($.currentVersion,z))return{triggered:!1,reason:"up-to-date",latest:z};let G=yC5();if(!G.updateCommand)return $.onNotice?.(fD.default.yellow(`global oh-my-agent ${$.currentVersion} → ${z} available. ${G.updateMessage??"Update manually."}`)),{triggered:!1,reason:"non-upgradable",latest:z};try{return _C5(G.updateCommand,{stdio:"ignore",shell:!0,detached:!0}).unref(),$.onSpawnStart?.(fD.default.cyan(`global oh-my-agent ${$.currentVersion} → ${z} updating in background. New version applies on next run.`)),{triggered:!0,latest:z}}catch{return $.onNotice?.(fD.default.yellow(`global oh-my-agent ${$.currentVersion} → ${z} available. Run: ${G.updateCommand}`)),{triggered:!1,reason:"spawn-failed",latest:z}}}var lD={name:"oh-my-agent",version:"8.
|
|
1640
|
+
`);G5(A,"Skills")}T5(w3.default.dim(`Data stored in: ${J}`))}function nT2($){$3($.command("stats").description("View productivity metrics").option("--reset","Reset metrics data")).action(Y5(async(z)=>{await cT2(l1(z),z.reset)},{supportsJsonOutput:!0}))}U7();var c4=p2(I4(),1);import{execSync as oT2}from"node:child_process";import{cpSync as cD,existsSync as ZU,mkdirSync as Ed,readFileSync as rT2,rmSync as Td,writeFileSync as Rd}from"node:fs";import{tmpdir as gC5}from"node:os";import{join as l7}from"node:path";var fD=p2(I4(),1);import{execSync as SC5,spawn as _C5}from"node:child_process";import{realpathSync as dT2}from"node:fs";import tk from"node:process";var QU="oh-my-agent";function yC5($=tk.argv[1]){if(!$)return{packageManager:"unknown",isGlobal:!1};if(tk.env.IS_BINARY==="true")return{packageManager:"binary",isGlobal:!0,updateMessage:"Running as a standalone binary. Download the latest release from GitHub."};let z;try{z=j9(dT2($))}catch{return{packageManager:"unknown",isGlobal:!1}}if(z.includes("/.npm/_npx")||z.includes("/npm/_npx"))return{packageManager:"npx",isGlobal:!1,updateMessage:"Running via npx, auto-update not applicable."};if(z.includes("/.pnpm/_pnpx")||z.includes("/.cache/pnpm/dlx"))return{packageManager:"pnpx",isGlobal:!1,updateMessage:"Running via pnpx, auto-update not applicable."};if(z.includes("/.bun/install/cache"))return{packageManager:"bunx",isGlobal:!1,updateMessage:"Running via bunx, auto-update not applicable."};if(tk.platform==="darwin")try{let G=SC5(`brew --prefix ${QU}`,{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();if(G){let J=j9(dT2(G));if(z.startsWith(J))return{packageManager:"homebrew",isGlobal:!0,updateCommand:`brew upgrade ${QU}`,updateMessage:"Installed via Homebrew. Updating in background..."}}}catch{}if(z.includes("/.pnpm/global")||z.includes("/.local/share/pnpm"))return{packageManager:"pnpm",isGlobal:!0,updateCommand:`pnpm add -g ${QU}@latest`,updateMessage:"Installed via pnpm. Updating in background..."};if(z.includes("/.yarn/global"))return{packageManager:"yarn",isGlobal:!0,updateCommand:`yarn global add ${QU}@latest`,updateMessage:"Installed via yarn. Updating in background..."};if(z.includes("/.bun/install/global"))return{packageManager:"bun",isGlobal:!0,updateCommand:`bun add -g ${QU}@latest`,updateMessage:"Installed via bun. Updating in background..."};return{packageManager:"npm",isGlobal:!0,updateCommand:`npm install -g ${QU}@latest`,updateMessage:"Installed via npm. Updating in background..."}}var pT2=/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/;function hC5($,z){let G=$.match(pT2),J=z.match(pT2);if(!G||!J)return!1;for(let U=1;U<=3;U++){let K=Number(G[U]),X=Number(J[U]);if(K<X)return!0;if(K>X)return!1}return!1}async function xC5($=QU,z=2000){try{let G=await S$.get(`https://registry.npmjs.org/${$}/latest`,{timeout:z});return typeof G.data?.version==="string"?G.data.version:null}catch{return null}}async function aT2($){if(!$.enabled)return{triggered:!1,reason:"disabled"};if(tk.env.OMA_SKIP_VERSION_CHECK==="1")return{triggered:!1,reason:"skipped-env"};if(tk.env.NODE_ENV==="development")return{triggered:!1,reason:"skipped-env"};let z=await xC5();if(!z)return{triggered:!1,reason:"fetch-failed"};if(!hC5($.currentVersion,z))return{triggered:!1,reason:"up-to-date",latest:z};let G=yC5();if(!G.updateCommand)return $.onNotice?.(fD.default.yellow(`global oh-my-agent ${$.currentVersion} → ${z} available. ${G.updateMessage??"Update manually."}`)),{triggered:!1,reason:"non-upgradable",latest:z};try{return _C5(G.updateCommand,{stdio:"ignore",shell:!0,detached:!0}).unref(),$.onSpawnStart?.(fD.default.cyan(`global oh-my-agent ${$.currentVersion} → ${z} updating in background. New version applies on next run.`)),{triggered:!0,latest:z}}catch{return $.onNotice?.(fD.default.yellow(`global oh-my-agent ${$.currentVersion} → ${z} available. Run: ${G.updateCommand}`)),{triggered:!1,reason:"spawn-failed",latest:z}}}var lD={name:"oh-my-agent",version:"8.4.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-agent":"./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","generate:skill-data":"node ./scripts/generate-skill-data.mjs",build:"bun run generate:skill-data && bun run sync:readme && bun build cli.ts --outfile bin/cli.js --target node --minify --external @napi-rs/keyring",dev:"bun run generate:skill-data && bun run cli.ts",lint:"biome check .","lint:fix":"biome check --write --unsafe .","check:boundaries":"node ./scripts/check-boundaries.mjs",test:"vitest run","test:coverage":"vitest run --coverage",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.1.0","@date-fns/tz":"^1.4.1","@napi-rs/keyring":"^1.3.0",axios:"^1.15.0","better-sqlite3":"^12.9.0",chokidar:"^5.0.0",commander:"^14.0.3","date-fns":"^4.2.1",eld:"^2.0.3","fast-xml-parser":"^5",minimatch:"^10.2.5","p-map":"^7.0.4",picocolors:"^1.1.1","puppeteer-core":"^24",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-parse":"^11.0.0","smol-toml":"^1.6.1",unified:"^11.0.5",ws:"^8.18.0",yaml:"^2.8.2",zod:"^4.3.6"},devDependencies:{"@biomejs/biome":"^2.4.15","@types/better-sqlite3":"^7.6.13","@types/mdast":"^4.0.4","@types/node":"^24","@types/ws":"^8.18.1","@vitest/coverage-v8":"^4.1.4",typescript:"^6",vitest:"^4.0.18"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},antigravity:{skillsPath:".agents/skills",skills:["oma-architecture","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-scm","oma-pdf","oma-recap"]}};function mC5($){if(!$)return{intro:(G)=>d4(G),outro:(G)=>T5(G),note:(G,J)=>G5(G,J),logError:(G)=>c5.error(G),spinnerStart:(G)=>{let J=D6();return J.start(G),J}};let z={start(G){},stop(G){if(G)console.log(G)},message(G){console.log(G)}};return{intro:(G)=>console.log(G),outro:(G)=>console.log(G),note:(G,J)=>console.log(G),logError:(G)=>console.error(G),spinnerStart:(G)=>{return console.log(G),z}}}function fC5($,z){if($!==null)return"ready";return z?"legacy":"missing"}async function vd($=!1,z=!1){if(!z&&process.stdout.isTTY)console.clear();let G=mC5(z);G.intro(c4.default.bgMagenta(c4.default.white(" \uD83D\uDEF8 oh-my-agent update ")));let J=process.cwd();await aT2({currentVersion:lD.version,enabled:m82(J),onSpawnStart:(Y)=>G.note(Y,"CLI auto-update"),onNotice:(Y)=>G.note(Y,"CLI update available")});let U=await EF(J),K=w82(J),X=fC5(U,K);if(X==="missing"){if(G.logError("oh-my-agent is not installed in this project. Run `oma install` first."),z)throw Error("oh-my-agent is not installed in this project. Run `oma install` first.");process.exit(1)}let Q=cG(J);if(Q.length>0)G.note(Q.map((Y)=>`${c4.default.green("✓")} ${Y}`).join(`
|
|
1641
1641
|
`),"Migration");let Z=Q.length>0||Gy(J);if(Q.length>0&&!Gy(J))Jy(J,!0);if(!z)await vF(J);if(X==="legacy")G.note("Existing .agents installation detected without _version.json. Updating in place and restoring version metadata.","Legacy install");let j;try{j=G.spinnerStart("Checking for updates...");let Y=await h82();if(U===Y.version&&!Z){j.stop(c4.default.green("Already up to date!")),G.outro(`Current version: ${c4.default.cyan(U)}`);return}let W=U===Y.version;j.message(`Downloading ${c4.default.cyan(Y.version)}...`);let{dir:k,cleanup:L}=await hK();try{j.message("Copying files..."),cG(J);let H=l7(J,".agents","oma-config.yaml"),B=l7(J,".agents","mcp.json"),A=!$&&ZU(H)?rT2(H):null,V=!$&&ZU(B)?rT2(B):null,F=l7(gC5(),`oma-stack-backup-${Date.now()}`),N=l7(J,".agents","skills","oma-backend","stack"),O=!$&&ZU(N);if(O)Ed(F,{recursive:!0}),cD(N,l7(F,"oma-backend"),{recursive:!0});let u=["snippets.md","tech-stack.md","api-template.py"],I=l7(J,".agents","skills","oma-backend","resources"),D=!$&&!O&&u.some((r)=>ZU(l7(I,r))),M=Uy(J);if(cD(l7(k,".agents"),l7(J,".agents"),{recursive:!0,force:!0}),A)Rd(H,A);if(V)Rd(B,V);if(O)try{Ed(N,{recursive:!0}),cD(l7(F,"oma-backend"),N,{recursive:!0,force:!0})}finally{Td(F,{recursive:!0,force:!0})}if(D){let r=l7(k,".agents","skills","oma-backend","variants","python");if(ZU(r))Ed(N,{recursive:!0}),cD(r,N,{recursive:!0,force:!0}),Rd(l7(N,"stack.yaml"),`language: python
|
|
1642
1642
|
framework: fastapi
|
|
1643
1643
|
orm: sqlalchemy
|
package/package.json
CHANGED