oh-my-agent 12.1.0 → 12.2.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.
Files changed (2) hide show
  1. package/bin/cli.js +3 -3
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -24,7 +24,7 @@ Expecting one of '${G.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycl
24
24
  `),this.outputHelp({error:!0});let G=z||{},J=G.exitCode||1,Q=G.code||"commander.error";this._exit(J,Q,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in q4.env){let z=$.attributeName();if(this.getOptionValue(z)===void 0||["default","config","env"].includes(this.getOptionValueSource(z)))if($.required||$.optional)this.emit(`optionEnv:${$.name()}`,q4.env[$.envVar]);else this.emit(`optionEnv:${$.name()}`)}})}_parseOptionsImplied(){let $=new Zh(this.options),z=(G)=>{return this.getOptionValue(G)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(G))};this.options.filter((G)=>G.implied!==void 0&&z(G.attributeName())&&$.valueFromOption(this.getOptionValue(G.attributeName()),G)).forEach((G)=>{Object.keys(G.implied).filter((J)=>!z(J)).forEach((J)=>{this.setOptionValueWithSource(J,G.implied[J],"implied")})})}missingArgument($){let z=`error: missing required argument '${$}'`;this.error(z,{code:"commander.missingArgument"})}optionMissingArgument($){let z=`error: option '${$.flags}' argument missing`;this.error(z,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue($){let z=`error: required option '${$.flags}' not specified`;this.error(z,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption($,z){let G=(U)=>{let K=U.attributeName(),Z=this.getOptionValue(K),W=this.options.find((B)=>B.negate&&K===B.attributeName()),k=this.options.find((B)=>!B.negate&&K===B.attributeName());if(W&&(W.presetArg===void 0&&Z===!1||W.presetArg!==void 0&&Z===W.presetArg))return W;return k||U},J=(U)=>{let K=G(U),Z=K.attributeName();if(this.getOptionValueSource(Z)==="env")return`environment variable '${K.envVar}'`;return`option '${K.flags}'`},Q=`error: ${J($)} cannot be used with ${J(z)}`;this.error(Q,{code:"commander.conflictingOption"})}unknownOption($){if(this._allowUnknownOption)return;let z="";if($.startsWith("--")&&this._showSuggestionAfterError){let J=[],Q=this;do{let U=Q.createHelp().visibleOptions(Q).filter((K)=>K.long).map((K)=>K.long);J=J.concat(U),Q=Q.parent}while(Q&&!Q._enablePositionalOptions);z=kh($,J)}let G=`error: unknown option '${$}'${z}`;this.error(G,{code:"commander.unknownOption"})}_excessArguments($){if(this._allowExcessArguments)return;let z=this.registeredArguments.length,G=z===1?"":"s",J=$.length,Q=this.parent?` for '${this.name()}'`:"",U=$.join(", "),K=`error: too many arguments${Q}. Expected ${z} argument${G} but got ${J}: ${U}.`;this.error(K,{code:"commander.excessArguments"})}unknownCommand(){let $=this.args[0],z="";if(this._showSuggestionAfterError){let J=[];this.createHelp().visibleCommands(this).forEach((Q)=>{if(J.push(Q.name()),Q.alias())J.push(Q.alias())}),z=kh($,J)}let G=`error: unknown command '${$}'${z}`;this.error(G,{code:"commander.unknownCommand"})}version($,z,G){if($===void 0)return this._version;this._version=$,z=z||"-V, --version",G=G||"output the version number";let J=this.createOption(z,G);return this._versionOptionName=J.attributeName(),this._registerOption(J),this.on("option:"+J.name(),()=>{this._outputConfiguration.writeOut(`${$}
25
25
  `),this._exit(0,"commander.version",$)}),this}description($,z){if($===void 0&&z===void 0)return this._description;if(this._description=$,z)this._argsDescription=z;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let z=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)z=this.commands[this.commands.length-1];if($===z._name)throw Error("Command alias can't be the same as its name");let G=this.parent?._findCommand($);if(G){let J=[G.name()].concat(G.aliases()).join("|");throw Error(`cannot add alias '${$}' to command '${this.name()}' as already have command '${J}'`)}return z._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((z)=>this.alias(z)),this}usage($){if($===void 0){if(this._usage)return this._usage;let z=this.registeredArguments.map((G)=>{return bu(G)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?z:[]).join(" ")}return this._usage=$,this}name($){if($===void 0)return this._name;return this._name=$,this}helpGroup($){if($===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=$,this}commandsGroup($){if($===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=$,this}optionsGroup($){if($===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=$,this}_initOptionGroup($){if(this._defaultOptionGroup&&!$.helpGroupHeading)$.helpGroup(this._defaultOptionGroup)}_initCommandGroup($){if(this._defaultCommandGroup&&!$.helpGroup())$.helpGroup(this._defaultCommandGroup)}nameFromFilename($){return this._name=Uz.basename($,Uz.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let z=this.createHelp(),G=this._getOutputContext($);z.prepareContext({error:G.error,helpWidth:G.helpWidth,outputHasColors:G.hasColors});let J=z.formatHelp(this,z);if(G.hasColors)return J;return this._outputConfiguration.stripColor(J)}_getOutputContext($){$=$||{};let z=!!$.error,G,J,Q;if(z)G=(K)=>this._outputConfiguration.writeErr(K),J=this._outputConfiguration.getErrHasColors(),Q=this._outputConfiguration.getErrHelpWidth();else G=(K)=>this._outputConfiguration.writeOut(K),J=this._outputConfiguration.getOutHasColors(),Q=this._outputConfiguration.getOutHelpWidth();return{error:z,write:(K)=>{if(!J)K=this._outputConfiguration.stripColor(K);return G(K)},hasColors:J,helpWidth:Q}}outputHelp($){let z;if(typeof $==="function")z=$,$=void 0;let G=this._getOutputContext($),J={error:G.error,write:G.write,command:this};this._getCommandAndAncestors().reverse().forEach((U)=>U.emit("beforeAllHelp",J)),this.emit("beforeHelp",J);let Q=this.helpInformation({error:G.error});if(z){if(Q=z(Q),typeof Q!=="string"&&!Buffer.isBuffer(Q))throw Error("outputHelp callback must return a string or a Buffer")}if(G.write(Q),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",J),this._getCommandAndAncestors().forEach((U)=>U.emit("afterAllHelp",J))}helpOption($,z){if(typeof $==="boolean"){if($){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption($??"-h, --help",z??"display help for command"),$||z)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption($){return this._helpOption=$,this._initOptionGroup($),this}help($){this.outputHelp($);let z=Number(q4.exitCode??0);if(z===0&&$&&typeof $!=="function"&&$.error)z=1;this._exit(z,"commander.help","(outputHelp)")}addHelpText($,z){let G=["beforeAll","before","after","afterAll"];if(!G.includes($))throw Error(`Unexpected value for position to addHelpText.
26
26
  Expecting one of '${G.join("', '")}'`);let J=`${$}Help`;return this.on(J,(Q)=>{let U;if(typeof z==="function")U=z({error:Q.error,command:Q.command});else U=z;if(U)Q.write(`${U}
27
- `)}),this}_outputHelpIfRequested($){let z=this._getHelpOption();if(z&&$.find((J)=>z.is(J)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}});var gX4;var Yh=q(()=>{_u();RQ2();bX();Kh();Wh();gX4=new bG});var xX;var Fh=q(()=>{xX={name:"oh-my-agent",version:"12.1.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"],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","check:emit-drift":"node ./scripts/check-emit-drift.mjs",test:"vitest run","test:coverage":"vitest run --coverage",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.7.0","@date-fns/tz":"^1.5.0","@napi-rs/keyring":"^1.3.0",axios:"^1.18.1","better-sqlite3":"^13.0.2",chokidar:"^5.0.0",commander:"^15.0.0","date-fns":"^4.4.0",eld:"^2.0.3","fast-xml-parser":"^5.10.1",minimatch:"^10.2.6","p-map":"^7.0.6",picocolors:"^1.1.1","puppeteer-core":"^25.4.0",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-parse":"^11.0.0","smol-toml":"^1.7.1",unified:"^11.0.5",ws:"^8.21.1",yaml:"^2.9.0",zod:"^4.4.3"},optionalDependencies:{pptxgenjs:"^4.0.1"},devDependencies:{"@biomejs/biome":"^2.5.6","@types/better-sqlite3":"^7.6.13","@types/mdast":"^4.0.4","@types/node":"^26.1.2","@types/ws":"^8.18.1","@vitest/coverage-v8":"^4.1.10",typescript:"^7.0.2",vitest:"^4.1.10"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},homepage:"https://firstfluke.com/oh-my-agent",bugs:{url:"https://github.com/first-fluke/oh-my-agent/issues"},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"]}}});import*as EW from"node:fs";import{homedir as zG5}from"node:os";import*as yX from"node:path";function CQ2($){if(Su)throw Error("install context already set in this process");Su=$}function TQ2(){if(Su===null)throw Error("install context not set — entry point must call setInstallContext()");return Su}function VU(){return TQ2().installRoot}function g7(){return TQ2().mode}function XU(){try{return g7()}catch{return"project"}}function bW(){try{return VU()}catch{return process.cwd()}}function PQ2($){let z=process.env.OMA_HOME,G=$.global===!0||process.env.OMA_INSTALL_GLOBAL==="1";if(z!==void 0&&z!=="")return GG5(z),{installRoot:z,mode:G?"global":"project"};if(G)return{installRoot:zG5(),mode:"global"};return{installRoot:process.cwd(),mode:"project"}}function GG5($){if(!yX.isAbsolute($))throw Error("OMA_HOME must be absolute path");for(let G of wQ2)if($===G||$.startsWith(G+yX.sep))throw Error(`OMA_HOME=${$} is forbidden (system path ${G})`);let z;try{z=EW.realpathSync($)}catch(G){let J=G instanceof Error?G.message:String(G);throw Error(`OMA_HOME=${$}: ${J}`)}for(let G of wQ2)if(z===G||z.startsWith(G+yX.sep))throw Error(`OMA_HOME=${z} is forbidden (system path ${G})`);try{EW.accessSync(z,EW.constants.W_OK)}catch{throw Error(`OMA_HOME=${z} is not writable`)}}var Su=null,wQ2;var h8=q(()=>{wQ2=["/etc","/usr","/bin","/boot","/sys","/proc"]});import{join as JG5}from"node:path";function HU($){return $.endsWith("/")?$:`${$}/`}function d3($,z){let G=z.split("/").filter((J)=>J.length>0);return JG5($,...G)}var g8=".agents",hu,G3,_G,EQ2,bQ2,gu,QG5=".antigravitycli",_Q2,UG5=".migration-backup",KG5="docs/plans",ZG5=".qwen/tmp",WG5,kG5,BG5,YG5,FG5,VG5,XG5,Vh;var J3=q(()=>{hu=`${g8}/skills`,G3=`${g8}/results`,_G=`${g8}/state`,EQ2=`${_G}/sessions`,bQ2=`${_G}/retry`,gu=`${_G}/archive`,_Q2=`${g8}/backup`;WG5=HU(G3),kG5=HU(_G),BG5=HU(QG5),YG5=HU(_Q2),FG5=HU(UG5),VG5=HU(KG5),XG5=HU(ZG5),Vh=[BG5,WG5,kG5,YG5,VG5,FG5,XG5]});var V1="first-fluke/oh-my-agent",N4,f8,fu,HG5,LG5,Kz,x1;var h0=q(()=>{J3();N4=hu,f8=["antigravity","claude","codex","commandcode","cursor","grok","kimi","kiro","qwen"],fu=["pi","opencode"],HG5=["copilot","hermes"],LG5=["zcode"],Kz=[...f8,...HG5,...LG5].sort(),x1={antigravity:{projectPath:".gemini/antigravity-cli/skills",homePath:".gemini/antigravity-cli/skills",requiresHomeConsent:!0},claude:{projectPath:".claude/skills",homePath:".claude/skills"},codex:{projectPath:".codex/skills",homePath:".codex/skills"},commandcode:{projectPath:".commandcode/skills",homePath:".commandcode/skills",optIn:!0},copilot:{projectPath:".github/skills",homePath:".copilot/skills"},cursor:{projectPath:".cursor/skills",homePath:".cursor/skills"},hermes:{projectPath:".hermes/skills/oma",homePath:".hermes/skills/oma",requiresHomeConsent:!0},kimi:{projectPath:".kimi-code/skills",homePath:".kimi-code/skills",requiresHomeConsent:!0,optIn:!0},kiro:{projectPath:".kiro/skills",homePath:".kiro/skills",optIn:!0},opencode:{projectPath:".opencode/skills",homePath:".opencode/skills"},qwen:{projectPath:".qwen/skills",homePath:".qwen/skills"}}});var mQ2={};C2(mQ2,{runAction:()=>X2,resolveJsonMode:()=>s2,printDescribe:()=>CG5,addOutputOptions:()=>e2});function e2($,z="Output as JSON"){return $.option("--json",z).option("--output <format>","Output format (text/json)",(G)=>{let J=G.trim().toLowerCase();if(!SX.includes(J))throw Error(`Invalid output format: ${G}. Expected one of ${SX.join(", ")}`);return J})}function qG5($){if($?.json)return"json";let z=$?.output?.trim().toLowerCase();if(z&&SX.includes(z))return z;if(process.env[SQ2]?.trim().toLowerCase()==="json")return"json";return"text"}function s2($){return qG5($)==="json"}function hQ2($){let z=$.at(-1);return z instanceof bG?z:null}function NG5($){let z=hQ2($);if(z)return z.opts();let G=$.at(-1);return G&&typeof G==="object"?G:{}}function AG5($){if($ instanceof Error)return $.message;return String($)}function xG($){throw Error($)}function Hh($,z){for(let G of $){let J=G.charCodeAt(0);if(J>=0&&J<=31||J===127)xG(`${z} must not contain control characters`)}}function DG5($,z){if(Hh($,z),/[?#%]/.test($))xG(`${z} must not contain ?, #, or %`);if($.includes(".."))xG(`${z} must not contain '..'`)}function jG5($,z){Hh($,z);try{new URL($)}catch{xG(`${z} must be a valid absolute URL`)}}function Xh($,z,G="text"){if(typeof $==="string"){if(G==="identifier"){DG5($,z);return}if(G==="url"){jG5($,z);return}Hh($,z);return}if(Array.isArray($))for(let[J,Q]of $.entries())Xh(Q,`${z}[${J}]`,G)}function yQ2($){let z=$.toLowerCase();if(z==="url"||z.endsWith("url"))return"url";if(z.includes("id")||z.includes("type")||z.includes("vendor")||z.includes("session"))return"identifier";return"text"}function uG5($){let z=$.vendor;if(typeof z==="string"){if(z.split(",").map((U)=>U.trim()).filter(Boolean).filter((U)=>!Kz.includes(U)).length>0)xG(`vendor must be one of ${Kz.join(", ")}`)}let G=$.output;if(typeof G==="string"&&!SX.includes(G))xG(`output must be one of ${SX.join(", ")}`)}function MG5($){let z=$.processedArgs??$.args??[];($.registeredArguments??[]).forEach((Q,U)=>{let K=Q.name?.()||String(U),Z=z[U];if(Xh(Z,K,yQ2(K)),K==="agent-type"&&typeof Z==="string"&&!xQ2.includes(Z))xG(`agent-type must be one of ${xQ2.join(", ")}`)});let J=$.opts();uG5(J);for(let[Q,U]of Object.entries(J))Xh(U,Q,yQ2(Q))}function OG5($){return($.registeredArguments??[]).map((z)=>({name:z.name?.()||"",required:!!z.required,variadic:!!z.variadic}))}function IG5($){return $.options.map((z)=>({flags:z.flags,long:z.long||void 0,short:z.short||void 0,description:z.description||"",required:!!z.required||!!z.mandatory,optional:!!z.optional,defaultValue:z.defaultValue}))}function gQ2($){let z=[],G=$;while(G?.parent)z.unshift(G.name()),G=G.parent;return z.join(" ")}function vG5($){return $.options.some((z)=>z.long==="--json"||z.long==="--output")}function RG5($){return $.options.some((z)=>z.long==="--dry-run")}function fQ2($){return{name:$.name(),path:gQ2($),summary:$.summary()||void 0,description:$.description(),arguments:OG5($),options:IG5($),supportsJsonOutput:vG5($),supportsDryRun:RG5($),subcommands:$.commands.map((z)=>fQ2(z))}}function wG5($,z){if(!z?.trim())return $;let G=z.trim(),J=[...$.commands];while(J.length>0){let Q=J.shift();if(!Q)continue;if(Q.name()===G||gQ2(Q)===G)return Q;J.push(...Q.commands)}return null}function CG5($,z){let G=wG5($,z);if(!G)xG(`Unknown command: ${z}`);let J={name:$.name(),version:$.version(),description:$.description(),env:{[SQ2]:"Set to json to force machine-readable output on commands that support it."},command:fQ2(G)};console.log(JSON.stringify(J,null,2))}function X2($,z={}){return async(...G)=>{let J=hQ2(G);if(J&&G.length>=2)G[G.length-2]=J.optsWithGlobals();let Q=NG5(G);try{if(J)MG5(J);await $(...G)}catch(U){let K=AG5(U);if(z.supportsJsonOutput&&s2(Q))console.log(JSON.stringify({error:K},null,2));else console.error(K);process.exitCode=1}}}var SQ2="OH_MY_AG_OUTPUT_FORMAT",SX,xQ2;var Z4=q(()=>{Yh();h0();SX=["text","json"],xQ2=["backend","frontend","mobile","qa","debug","pm"]});var iQ2,cQ2=($)=>{return $===12288||$>=65281&&$<=65376||$>=65504&&$<=65510},lQ2=($)=>{return $===8987||$===9001||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$>=131072&&$<=196605||$>=196608&&$<=262141};var pQ2=q(()=>{iQ2=(()=>{let $=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(z)=>{let G=0;$.lastIndex=0;while($.test(z))G+=1;return z.length-G}})()});var TG5,PG5,dQ2,EG5,nQ2,bG5,_G5,xG5,aQ2=($,z={},G={})=>{let J=z.limit??1/0,Q=z.ellipsis??"",U=z?.ellipsisWidth??(Q?aQ2(Q,xG5,G).width:0),K=0,Z=G.controlWidth??0,W=G.tabWidth??8,k=G.emojiWidth??2,B=2,Y=G.regularWidth??1,F=G.wideWidth??2,V=[[bG5,Y],[TG5,0],[PG5,Z],[EG5,W],[nQ2,k],[dQ2,F]],X=0,H=0,L=$.length,N=0,A=!1,D=L,u=Math.max(0,J-U),v=0,j=0,M=0,O=0;$:while(!0){if(j>v||H>=L&&H>X){let w=$.slice(v,j)||$.slice(X,H);N=0;for(let T of w.replaceAll(_G5,"")){let I=T.codePointAt(0)||0;if(cQ2(I))O=2;else if(lQ2(I))O=F;else O=Y;if(M+O>u)D=Math.min(D,Math.max(v,X)+N);if(M+O>J){A=!0;break $}N+=T.length,M+=O}v=j=0}if(H>=L)break $;for(let w=0,T=V.length;w<T;w++){let[I,R]=V[w];if(I.lastIndex=H,I.test($)){if(N=I===dQ2?iQ2($.slice(H,I.lastIndex)):I===nQ2?1:I.lastIndex-H,O=N*R,M+O>u)D=Math.min(D,H+Math.floor((u-M)/R));if(M+O>J){A=!0;break $}M+=O,v=X,j=H,H=X=I.lastIndex;continue $}}H+=1}return{width:A?u:M,index:A?D:L,truncated:A,ellipsed:A&&J>=U}},oQ2;var rQ2=q(()=>{pQ2();TG5=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,PG5=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,dQ2=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,EG5=/\t{1,1000}/y,nQ2=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,bG5=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,_G5=/\p{M}+/gu,xG5={limit:1/0,ellipsis:""},oQ2=aQ2});var yG5,SG5=($,z={})=>{return oQ2($,yG5,z).width},f7;var Lh=q(()=>{rQ2();yG5={limit:1/0,ellipsis:"",ellipsisWidth:0},f7=SG5});function g0($,z,G){return String($).normalize().split(iG5).map((J)=>mG5(J,z,G)).join(`
27
+ `)}),this}_outputHelpIfRequested($){let z=this._getHelpOption();if(z&&$.find((J)=>z.is(J)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}});var gX4;var Yh=q(()=>{_u();RQ2();bX();Kh();Wh();gX4=new bG});var xX;var Fh=q(()=>{xX={name:"oh-my-agent",version:"12.2.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"],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","check:emit-drift":"node ./scripts/check-emit-drift.mjs",test:"vitest run","test:coverage":"vitest run --coverage",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.7.0","@date-fns/tz":"^1.5.0","@napi-rs/keyring":"^1.3.0",axios:"^1.18.1","better-sqlite3":"^13.0.2",chokidar:"^5.0.0",commander:"^15.0.0","date-fns":"^4.4.0",eld:"^2.0.3","fast-xml-parser":"^5.10.1",minimatch:"^10.2.6","p-map":"^7.0.6",picocolors:"^1.1.1","puppeteer-core":"^25.4.0",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-parse":"^11.0.0","smol-toml":"^1.7.1",unified:"^11.0.5",ws:"^8.21.1",yaml:"^2.9.0",zod:"^4.4.3"},optionalDependencies:{pptxgenjs:"^4.0.1"},devDependencies:{"@biomejs/biome":"^2.5.6","@types/better-sqlite3":"^7.6.13","@types/mdast":"^4.0.4","@types/node":"^26.1.2","@types/ws":"^8.18.1","@vitest/coverage-v8":"^4.1.10",typescript:"^7.0.2",vitest:"^4.1.10"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},homepage:"https://firstfluke.com/oh-my-agent",bugs:{url:"https://github.com/first-fluke/oh-my-agent/issues"},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"]}}});import*as EW from"node:fs";import{homedir as zG5}from"node:os";import*as yX from"node:path";function CQ2($){if(Su)throw Error("install context already set in this process");Su=$}function TQ2(){if(Su===null)throw Error("install context not set — entry point must call setInstallContext()");return Su}function VU(){return TQ2().installRoot}function g7(){return TQ2().mode}function XU(){try{return g7()}catch{return"project"}}function bW(){try{return VU()}catch{return process.cwd()}}function PQ2($){let z=process.env.OMA_HOME,G=$.global===!0||process.env.OMA_INSTALL_GLOBAL==="1";if(z!==void 0&&z!=="")return GG5(z),{installRoot:z,mode:G?"global":"project"};if(G)return{installRoot:zG5(),mode:"global"};return{installRoot:process.cwd(),mode:"project"}}function GG5($){if(!yX.isAbsolute($))throw Error("OMA_HOME must be absolute path");for(let G of wQ2)if($===G||$.startsWith(G+yX.sep))throw Error(`OMA_HOME=${$} is forbidden (system path ${G})`);let z;try{z=EW.realpathSync($)}catch(G){let J=G instanceof Error?G.message:String(G);throw Error(`OMA_HOME=${$}: ${J}`)}for(let G of wQ2)if(z===G||z.startsWith(G+yX.sep))throw Error(`OMA_HOME=${z} is forbidden (system path ${G})`);try{EW.accessSync(z,EW.constants.W_OK)}catch{throw Error(`OMA_HOME=${z} is not writable`)}}var Su=null,wQ2;var h8=q(()=>{wQ2=["/etc","/usr","/bin","/boot","/sys","/proc"]});import{join as JG5}from"node:path";function HU($){return $.endsWith("/")?$:`${$}/`}function d3($,z){let G=z.split("/").filter((J)=>J.length>0);return JG5($,...G)}var g8=".agents",hu,G3,_G,EQ2,bQ2,gu,QG5=".antigravitycli",_Q2,UG5=".migration-backup",KG5="docs/plans",ZG5=".qwen/tmp",WG5,kG5,BG5,YG5,FG5,VG5,XG5,Vh;var J3=q(()=>{hu=`${g8}/skills`,G3=`${g8}/results`,_G=`${g8}/state`,EQ2=`${_G}/sessions`,bQ2=`${_G}/retry`,gu=`${_G}/archive`,_Q2=`${g8}/backup`;WG5=HU(G3),kG5=HU(_G),BG5=HU(QG5),YG5=HU(_Q2),FG5=HU(UG5),VG5=HU(KG5),XG5=HU(ZG5),Vh=[BG5,WG5,kG5,YG5,VG5,FG5,XG5]});var V1="first-fluke/oh-my-agent",N4,f8,fu,HG5,LG5,Kz,x1;var h0=q(()=>{J3();N4=hu,f8=["antigravity","claude","codex","commandcode","cursor","grok","kimi","kiro","qwen"],fu=["pi","opencode"],HG5=["copilot","hermes"],LG5=["zcode"],Kz=[...f8,...HG5,...LG5].sort(),x1={antigravity:{projectPath:".gemini/antigravity-cli/skills",homePath:".gemini/antigravity-cli/skills",requiresHomeConsent:!0},claude:{projectPath:".claude/skills",homePath:".claude/skills"},codex:{projectPath:".codex/skills",homePath:".codex/skills"},commandcode:{projectPath:".commandcode/skills",homePath:".commandcode/skills",optIn:!0},copilot:{projectPath:".github/skills",homePath:".copilot/skills"},cursor:{projectPath:".cursor/skills",homePath:".cursor/skills"},hermes:{projectPath:".hermes/skills/oma",homePath:".hermes/skills/oma",requiresHomeConsent:!0},kimi:{projectPath:".kimi-code/skills",homePath:".kimi-code/skills",requiresHomeConsent:!0,optIn:!0},kiro:{projectPath:".kiro/skills",homePath:".kiro/skills",optIn:!0},opencode:{projectPath:".opencode/skills",homePath:".opencode/skills"},qwen:{projectPath:".qwen/skills",homePath:".qwen/skills"}}});var mQ2={};C2(mQ2,{runAction:()=>X2,resolveJsonMode:()=>s2,printDescribe:()=>CG5,addOutputOptions:()=>e2});function e2($,z="Output as JSON"){return $.option("--json",z).option("--output <format>","Output format (text/json)",(G)=>{let J=G.trim().toLowerCase();if(!SX.includes(J))throw Error(`Invalid output format: ${G}. Expected one of ${SX.join(", ")}`);return J})}function qG5($){if($?.json)return"json";let z=$?.output?.trim().toLowerCase();if(z&&SX.includes(z))return z;if(process.env[SQ2]?.trim().toLowerCase()==="json")return"json";return"text"}function s2($){return qG5($)==="json"}function hQ2($){let z=$.at(-1);return z instanceof bG?z:null}function NG5($){let z=hQ2($);if(z)return z.opts();let G=$.at(-1);return G&&typeof G==="object"?G:{}}function AG5($){if($ instanceof Error)return $.message;return String($)}function xG($){throw Error($)}function Hh($,z){for(let G of $){let J=G.charCodeAt(0);if(J>=0&&J<=31||J===127)xG(`${z} must not contain control characters`)}}function DG5($,z){if(Hh($,z),/[?#%]/.test($))xG(`${z} must not contain ?, #, or %`);if($.includes(".."))xG(`${z} must not contain '..'`)}function jG5($,z){Hh($,z);try{new URL($)}catch{xG(`${z} must be a valid absolute URL`)}}function Xh($,z,G="text"){if(typeof $==="string"){if(G==="identifier"){DG5($,z);return}if(G==="url"){jG5($,z);return}Hh($,z);return}if(Array.isArray($))for(let[J,Q]of $.entries())Xh(Q,`${z}[${J}]`,G)}function yQ2($){let z=$.toLowerCase();if(z==="url"||z.endsWith("url"))return"url";if(z.includes("id")||z.includes("type")||z.includes("vendor")||z.includes("session"))return"identifier";return"text"}function uG5($){let z=$.vendor;if(typeof z==="string"){if(z.split(",").map((U)=>U.trim()).filter(Boolean).filter((U)=>!Kz.includes(U)).length>0)xG(`vendor must be one of ${Kz.join(", ")}`)}let G=$.output;if(typeof G==="string"&&!SX.includes(G))xG(`output must be one of ${SX.join(", ")}`)}function MG5($){let z=$.processedArgs??$.args??[];($.registeredArguments??[]).forEach((Q,U)=>{let K=Q.name?.()||String(U),Z=z[U];if(Xh(Z,K,yQ2(K)),K==="agent-type"&&typeof Z==="string"&&!xQ2.includes(Z))xG(`agent-type must be one of ${xQ2.join(", ")}`)});let J=$.opts();uG5(J);for(let[Q,U]of Object.entries(J))Xh(U,Q,yQ2(Q))}function OG5($){return($.registeredArguments??[]).map((z)=>({name:z.name?.()||"",required:!!z.required,variadic:!!z.variadic}))}function IG5($){return $.options.map((z)=>({flags:z.flags,long:z.long||void 0,short:z.short||void 0,description:z.description||"",required:!!z.required||!!z.mandatory,optional:!!z.optional,defaultValue:z.defaultValue}))}function gQ2($){let z=[],G=$;while(G?.parent)z.unshift(G.name()),G=G.parent;return z.join(" ")}function vG5($){return $.options.some((z)=>z.long==="--json"||z.long==="--output")}function RG5($){return $.options.some((z)=>z.long==="--dry-run")}function fQ2($){return{name:$.name(),path:gQ2($),summary:$.summary()||void 0,description:$.description(),arguments:OG5($),options:IG5($),supportsJsonOutput:vG5($),supportsDryRun:RG5($),subcommands:$.commands.map((z)=>fQ2(z))}}function wG5($,z){if(!z?.trim())return $;let G=z.trim(),J=[...$.commands];while(J.length>0){let Q=J.shift();if(!Q)continue;if(Q.name()===G||gQ2(Q)===G)return Q;J.push(...Q.commands)}return null}function CG5($,z){let G=wG5($,z);if(!G)xG(`Unknown command: ${z}`);let J={name:$.name(),version:$.version(),description:$.description(),env:{[SQ2]:"Set to json to force machine-readable output on commands that support it."},command:fQ2(G)};console.log(JSON.stringify(J,null,2))}function X2($,z={}){return async(...G)=>{let J=hQ2(G);if(J&&G.length>=2)G[G.length-2]=J.optsWithGlobals();let Q=NG5(G);try{if(J)MG5(J);await $(...G)}catch(U){let K=AG5(U);if(z.supportsJsonOutput&&s2(Q))console.log(JSON.stringify({error:K},null,2));else console.error(K);process.exitCode=1}}}var SQ2="OH_MY_AG_OUTPUT_FORMAT",SX,xQ2;var Z4=q(()=>{Yh();h0();SX=["text","json"],xQ2=["backend","frontend","mobile","qa","debug","pm"]});var iQ2,cQ2=($)=>{return $===12288||$>=65281&&$<=65376||$>=65504&&$<=65510},lQ2=($)=>{return $===8987||$===9001||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$>=131072&&$<=196605||$>=196608&&$<=262141};var pQ2=q(()=>{iQ2=(()=>{let $=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(z)=>{let G=0;$.lastIndex=0;while($.test(z))G+=1;return z.length-G}})()});var TG5,PG5,dQ2,EG5,nQ2,bG5,_G5,xG5,aQ2=($,z={},G={})=>{let J=z.limit??1/0,Q=z.ellipsis??"",U=z?.ellipsisWidth??(Q?aQ2(Q,xG5,G).width:0),K=0,Z=G.controlWidth??0,W=G.tabWidth??8,k=G.emojiWidth??2,B=2,Y=G.regularWidth??1,F=G.wideWidth??2,V=[[bG5,Y],[TG5,0],[PG5,Z],[EG5,W],[nQ2,k],[dQ2,F]],X=0,H=0,L=$.length,N=0,A=!1,D=L,u=Math.max(0,J-U),v=0,j=0,M=0,O=0;$:while(!0){if(j>v||H>=L&&H>X){let w=$.slice(v,j)||$.slice(X,H);N=0;for(let T of w.replaceAll(_G5,"")){let I=T.codePointAt(0)||0;if(cQ2(I))O=2;else if(lQ2(I))O=F;else O=Y;if(M+O>u)D=Math.min(D,Math.max(v,X)+N);if(M+O>J){A=!0;break $}N+=T.length,M+=O}v=j=0}if(H>=L)break $;for(let w=0,T=V.length;w<T;w++){let[I,R]=V[w];if(I.lastIndex=H,I.test($)){if(N=I===dQ2?iQ2($.slice(H,I.lastIndex)):I===nQ2?1:I.lastIndex-H,O=N*R,M+O>u)D=Math.min(D,H+Math.floor((u-M)/R));if(M+O>J){A=!0;break $}M+=O,v=X,j=H,H=X=I.lastIndex;continue $}}H+=1}return{width:A?u:M,index:A?D:L,truncated:A,ellipsed:A&&J>=U}},oQ2;var rQ2=q(()=>{pQ2();TG5=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,PG5=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,dQ2=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,EG5=/\t{1,1000}/y,nQ2=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,bG5=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,_G5=/\p{M}+/gu,xG5={limit:1/0,ellipsis:""},oQ2=aQ2});var yG5,SG5=($,z={})=>{return oQ2($,yG5,z).width},f7;var Lh=q(()=>{rQ2();yG5={limit:1/0,ellipsis:"",ellipsisWidth:0},f7=SG5});function g0($,z,G){return String($).normalize().split(iG5).map((J)=>mG5(J,z,G)).join(`
28
28
  `)}var mu="\x1B",zU2="›",hG5=39,Nh="\x07",GU2="[",gG5="]",JU2="m",Ah,sQ2,tQ2=($)=>{if($>=30&&$<=37)return 39;if($>=90&&$<=97)return 39;if($>=40&&$<=47)return 49;if($>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0;return},eQ2=($)=>`${mu}${GU2}${$}${JU2}`,$U2=($)=>`${mu}${Ah}${$}${Nh}`,qh=($,z,G)=>{let J=z[Symbol.iterator](),Q=!1,U=!1,K=$.at(-1),Z=K===void 0?0:f7(K),W=J.next(),k=J.next(),B=0;while(!W.done){let Y=W.value,F=f7(Y);if(Z+F<=G)$[$.length-1]+=Y;else $.push(Y),Z=0;if(Y===mu||Y===zU2)Q=!0,U=z.startsWith(Ah,B+1);if(Q){if(U){if(Y===Nh)Q=!1,U=!1}else if(Y===JU2)Q=!1}else if(Z+=F,Z===G&&!k.done)$.push(""),Z=0;W=k,k=J.next(),B+=Y.length}if(K=$.at(-1),!Z&&K!==void 0&&K.length&&$.length>1)$[$.length-2]+=$.pop()},fG5=($)=>{let z=$.split(" "),G=z.length;while(G){if(f7(z[G-1]))break;G--}if(G===z.length)return $;return z.slice(0,G).join(" ")+z.slice(G).join("")},mG5=($,z,G={})=>{if(G.trim!==!1&&$.trim()==="")return"";let J="",Q,U,K=$.split(" "),Z=[""],W=0;for(let Y=0;Y<K.length;Y++){let F=K[Y];if(G.trim!==!1){let X=Z.at(-1)??"",H=X.trimStart();if(X.length!==H.length)Z[Z.length-1]=H,W=f7(H)}if(Y!==0){if(W>=z&&(G.wordWrap===!1||G.trim===!1))Z.push(""),W=0;if(W||G.trim===!1)Z[Z.length-1]+=" ",W++}let V=f7(F);if(G.hard&&V>z){let X=z-W,H=1+Math.floor((V-X-1)/z);if(Math.floor((V-1)/z)<H)Z.push("");qh(Z,F,z),W=f7(Z.at(-1)??"");continue}if(W+V>z&&W&&V){if(G.wordWrap===!1&&W<z){qh(Z,F,z),W=f7(Z.at(-1)??"");continue}Z.push(""),W=0}if(W+V>z&&G.wordWrap===!1){qh(Z,F,z),W=f7(Z.at(-1)??"");continue}Z[Z.length-1]+=F,W+=V}if(G.trim!==!1)Z=Z.map((Y)=>fG5(Y));let k=Z.join(`
29
29
  `),B=!1;for(let Y=0;Y<k.length;Y++){let F=k[Y];if(J+=F,!B){if(B=F>="\uD800"&&F<="\uDBFF",B)continue}else B=!1;if(F===mu||F===zU2){sQ2.lastIndex=Y+1;let X=sQ2.exec(k)?.groups;if(X?.code!==void 0){let H=Number.parseFloat(X.code);Q=H===hG5?void 0:H}else if(X?.uri!==void 0)U=X.uri.length===0?void 0:X.uri}if(k[Y+1]===`
30
30
  `){if(U)J+=$U2("");let V=Q?tQ2(Q):void 0;if(Q&&V)J+=eQ2(V)}else if(F===`
@@ -374,7 +374,7 @@ ${z}`}var vI;var r9=q(()=>{I1();vI=V2(O1(),1)});import _U from"node:fs";import _
374
374
  `)}function A3($,z,G={}){let J=IL5($),Q=Z9.dirname(J),U=Z9.basename(J),K=`${Date.now()}-${process.pid}-${OL5++}`,Z=Z9.join(Q,`.${U}.tmp-${K}`);D4.mkdirSync(Q,{recursive:!0}),D4.writeFileSync(Z,z,{encoding:"utf-8",mode:G.mode});try{if(G.mode!==void 0)D4.chmodSync(Z,G.mode);D4.renameSync(Z,J)}catch(W){if(W instanceof Error&&W.code==="EXDEV"){if(D4.copyFileSync(Z,J),G.mode!==void 0)D4.chmodSync(J,G.mode);D4.unlinkSync(Z);return}try{D4.unlinkSync(Z)}catch{}throw W}}function IL5($){try{if(!D4.lstatSync($).isSymbolicLink())return $}catch{return $}try{return D4.realpathSync($)}catch{return Z9.resolve(Z9.dirname($),D4.readlinkSync($))}}function QJ($,z){let G=Z9.basename($);if(ML5.has(G))throw Error(`safeWriteFile: refusing to write ${G} — vendor-owned file (FORBIDDEN_VENDOR_FILES). targetPath=${$}`);if(D4.mkdirSync(Z9.dirname($),{recursive:!0}),D4.existsSync($)){let J=Md($);D4.mkdirSync(J.dir,{recursive:!0}),D4.copyFileSync($,Z9.join(J.dir,`${J.prefix}${Date.now()}-${process.pid}`))}A3($,z),RL5($)}function vL5($){let{dir:z,prefix:G}=Md($),J;try{J=D4.readdirSync(z,{withFileTypes:!0})}catch{return[]}let Q=J.filter((U)=>U.isFile()&&U.name.startsWith(G)).map((U)=>Z9.join(z,U.name));if(Q.length===0)return[];return Q.sort((U,K)=>{try{let Z=D4.statSync(U).mtimeMs;return D4.statSync(K).mtimeMs-Z}catch{return 0}})}function RL5($){let G=vL5($).slice(uL5);for(let J of G)try{D4.unlinkSync(J)}catch{}}var uL5=3,ML5,OL5=0;var a7=q(()=>{t9();ML5=new Set([".claude.json"])});import{isAbsolute as wL5,join as CL5,resolve as bY2,sep as TL5}from"node:path";function _Y2($){if(process.platform==="win32"||process.platform==="darwin")return $.toLowerCase();return $}function UJ($,z,G){if(typeof z!=="string"||z.length===0)throw Error(`Refusing ${G}: path is empty or not a string.`);if(wL5(z))throw Error(`Refusing ${G} with absolute path "${z}" — variant paths must be relative and stay inside the project.`);let J=bY2($),Q=bY2(CL5(J,z)),U=_Y2(J),K=_Y2(Q);if(K!==U&&!K.startsWith(U+TL5))throw Error(`Refusing ${G} "${z}" — resolves outside the project root.`);return z}var _I=()=>{};import{readFileSync as PL5}from"node:fs";function xI($){let z;try{z=JSON.parse(PL5($.variantPath,"utf-8"))}catch(G){return console.warn(`[oma] Skipping malformed ${$.kind} variant ${$.variantPath}: ${G instanceof Error?G.message:String(G)}`),null}try{$.validate(z)}catch(G){return console.warn(`[oma] Skipping unsafe ${$.kind} variant ${$.variantPath}: ${G instanceof Error?G.message:String(G)}`),null}return z}var Od=()=>{};import{existsSync as Id,mkdirSync as EL5,readdirSync as bL5,readFileSync as _L5}from"node:fs";import{join as Sk}from"node:path";function yL5($){return"maxTurns"}function SL5($){return"timeoutMins"}function hL5($){return $!=="opencode"}function SU($){return JSON.stringify($)}function gL5($){return`"""
375
375
  ${$.replaceAll('"""',"\\\"\\\"\\\"").trim()}
376
376
  """`}function mL5($){let z=$.indexOf(fL5),G=$.indexOf(xY2);if(z===-1||G===-1||G<z)return $;let J=G+xY2.length,Q=$.slice(J).replace(/^\n/,"");return $.slice(0,z)+Q}function yY2($,z){return $.replace("Follow the vendor-specific execution protocol:",`Follow \`${z}\`:`)}function iL5($){let z=Sk($,".agents","agents");if(!Id(z))return[];return bL5(z,{withFileTypes:!0}).filter((G)=>G.isFile()&&G.name.endsWith(".md")).map((G)=>{let J=G.name,Q=J.replace(".md",""),U=_L5(Sk(z,J),"utf-8"),{frontmatter:K,body:Z}=v1(U);return{agentKey:Q,entry:J,frontmatter:K,body:Z}})}function cL5($,z,G,J,Q){let{agentKey:U,entry:K,frontmatter:Z,body:W}=$,k=xL5[J]||{},B=G.tools||Z.tools||z.toolsDefault,F=(Array.isArray(B)?B:String(B||"").split(",").map((u)=>u.trim()).filter(Boolean)).map((u)=>k[u.toLowerCase()]||u),V=Array.isArray(z.toolsDefault)?F:F.join(", "),X=Array.isArray(V)?V.length>0:V.trim().length>0,H=G.model||Z.model||z.modelDefault,L={name:Z.name||U,description:G.description||Z.description,tools:X?V:void 0,model:J==="opencode"&&H==="inherit"?void 0:H};if(z.maxTurnsDefault||G.maxTurns||Z.maxTurns)L[yL5(J)]=G.maxTurns||Z.maxTurns||z.maxTurnsDefault;if(G.effort)if(J==="opencode")L.variant=G.effort;else L.effort=G.effort;if(G.kind)L.kind=G.kind;if(G.temperature!==void 0)L.temperature=G.temperature;if(G.timeoutMins!==void 0)L[SL5(J)]=G.timeoutMins;if(G.mcpServers)L.mcpServers=G.mcpServers;if(Z.skills&&hL5(J))L.skills=Z.skills;if(G.extra)Object.assign(L,G.extra);if(J==="opencode")L.mode="subagent";let N=Q==="Simple"?mL5(W):W,A=`<!-- Generated by oh-my-agent CLI. Source: .agents/agents/${K} -->
377
- ${yY2(N,z.protocolPath)}`,D=dL5(L,J);return{fileName:K,content:bk(D,A)}}function lL5($,z,G){let{agentKey:J,entry:Q,frontmatter:U,body:K}=$,Z=U.name||J,W=String(G.description||U.description||Z),k=String(G.model||U.model||z.modelDefault),B=G.effort||"medium",Y=typeof G.extra?.sandbox_mode==="string"?G.extra.sandbox_mode:"workspace-write",F=yY2(K,z.protocolPath),V=Array.isArray(U.skills)?U.skills.map((H)=>String(H)).filter(Boolean):[],X=[`# Generated by oh-my-agent CLI. Source: .agents/agents/${Q}`,`name = ${SU(Z)}`,`description = ${SU(W)}`,`model = ${SU(k)}`,`model_reasoning_effort = ${SU(B)}`,`sandbox_mode = ${SU(Y)}`,`developer_instructions = ${gL5(F)}`];for(let H of V)X.push(""),X.push("[[skills.config]]"),X.push(`path = ${SU(`.agents/skills/${H}/SKILL.md`)}`),X.push("enabled = true");if(G.mcpServers&&Object.keys(G.mcpServers).length>0){X.push(""),X.push("[mcp_servers]");for(let[H,L]of Object.entries(G.mcpServers))X.push(`${H} = ${SU(String(L))}`)}return{fileName:`${J}.toml`,content:`${X.join(`
377
+ ${yY2(N,z.protocolPath)}`,D=dL5(L,J);return{fileName:K,content:bk(D,A)}}function lL5($,z,G){let{agentKey:J,entry:Q,frontmatter:U,body:K}=$,Z=U.name||J,W=String(G.description||U.description||Z),k=String(G.model||U.model||z.modelDefault),B=G.effort||z.effortDefault||"medium",Y=typeof G.extra?.sandbox_mode==="string"?G.extra.sandbox_mode:"workspace-write",F=yY2(K,z.protocolPath),V=Array.isArray(U.skills)?U.skills.map((H)=>String(H)).filter(Boolean):[],X=[`# Generated by oh-my-agent CLI. Source: .agents/agents/${Q}`,`name = ${SU(Z)}`,`description = ${SU(W)}`,`model = ${SU(k)}`,`model_reasoning_effort = ${SU(B)}`,`sandbox_mode = ${SU(Y)}`,`developer_instructions = ${gL5(F)}`];for(let H of V)X.push(""),X.push("[[skills.config]]"),X.push(`path = ${SU(`.agents/skills/${H}/SKILL.md`)}`),X.push("enabled = true");if(G.mcpServers&&Object.keys(G.mcpServers).length>0){X.push(""),X.push("[mcp_servers]");for(let[H,L]of Object.entries(G.mcpServers))X.push(`${H} = ${SU(String(L))}`)}return{fileName:`${J}.toml`,content:`${X.join(`
378
378
  `)}
379
379
  `}}function dL5($,z){let G=pL5[z];if(!G)return{...$};let J=new Set(G),Q={};for(let[U,K]of Object.entries($))if(J.has(U))Q[U]=K;else if(z==="claude"&&U==="effort")console.warn("[agent-composer] Dropped 'effort' from claude variant (R14: Claude subagent frontmatter does not support effort — use CLI session --effort instead)");else console.warn(`[agent-composer] Dropped '${U}' from ${z} variant (not supported by this runtime)`);return Q}function nL5($,z){try{let G=iM($),J=PI(z,G);if(J.cli!=="opencode")return{};return{model:J.cliModel,effort:J.effort}}catch{return{}}}function yI($,z,G){let J=Sk($,".agents","agents"),Q=Sk(J,"variants",`${G}.json`);if(!Id(J)||!Id(Q))return 0;let U=xI({variantPath:Q,kind:"agent",validate:(W)=>{if(!W?.destDir)return;if(UJ(z,W.destDir,"agent dest dir"),W.protocolPath){if(/[`\r\n]/.test(W.protocolPath))throw Error(`protocol path "${W.protocolPath}" contains forbidden characters.`);UJ(z,W.protocolPath,"protocol path")}}});if(!U?.destDir)return 0;let K=Sk(z,U.destDir);EL5(K,{recursive:!0});let Z=0;for(let W of iL5($)){let k={...U.agents[W.agentKey]||{}};if(G==="opencode"){let Y=nL5($,W.agentKey);if(Y.model&&!k.model)k.model=Y.model;if(Y.effort&&!k.effort)k.effort=Y.effort}let B=G==="codex"?lL5(W,U,k):cL5(W,U,k,G);A3(Sk(K,B.fileName),B.content),Z+=1}return Z}var xL5,fL5="<!-- CHARTER_CHECK_BEGIN -->",xY2="<!-- CHARTER_CHECK_END -->",pL5;var SI=q(()=>{eg();EI();r9();a7();_I();Od();xL5={claude:{read:"Read",write:"Write",edit:"Edit",bash:"Bash",grep:"Grep",glob:"Glob"},cursor:{read:"read_file",write:"write_file",edit:"replace",bash:"run_shell_command",grep:"grep_search",glob:"glob"},grok:{read:"read_file",write:"write_file",edit:"search_replace",bash:"run_terminal_cmd",grep:"grep",glob:"list_dir",ask:"ask_user"}};pL5={claude:["name","description","tools","model","maxTurns","skills","memory","permissionMode"],codex:["name","description","model","model_reasoning_effort","sandbox_mode"],antigravity:["name","description","model"],qwen:["name","description","model","thinking"],opencode:["name","description","mode","model","variant","temperature","tools","permission"]}});import*as d8 from"node:fs";import{dirname as SY2,isAbsolute as hY2,resolve as gY2,sep as aL5}from"node:path";function mY2($){if(process.platform!=="win32")return $;if($.startsWith(fY2))return $;if($.length<=oL5)return $;return fY2+$}function hU($,z,G,J){if(J!==void 0){let Z=hY2($)?$:gY2(SY2(z),$),W=d8.realpathSync(Z),k=d8.realpathSync(J);if(W!==k&&!W.startsWith(k+aL5))throw Error(`createLink: target ${W} escapes SSOT base ${k}`)}if(process.platform!=="win32")return d8.symlinkSync($,z,G),"symlink";try{return d8.symlinkSync($,z,G),"symlink"}catch(Z){if(!rL5(Z))throw Z}let Q=hY2($)?$:gY2(SY2(z),$),U=mY2(Q),K=mY2(z);if(G==="dir")return d8.symlinkSync(U,K,"junction"),vd("junction"),"junction";try{return d8.linkSync(U,K),vd("hardlink"),"hardlink"}catch{return d8.copyFileSync(U,K),vd("copy"),"copy"}}function rL5($){if(!$||typeof $!=="object")return!1;let z=$.code;return z==="EPERM"||z==="EACCES"}function vd($){if(iY2.has($))return;iY2.add($);let z=sL5[$];if(z)console.warn(z)}var oL5=260,fY2="\\\\?\\",iY2,sL5;var kL=q(()=>{iY2=new Set;sL5={symlink:"",junction:"note: using directory junctions because symlinks need admin or Developer Mode",hardlink:"note: using hardlinks because symlinks need admin or Developer Mode (content stays in sync via shared inode)",copy:"note: copying files because symlinks and hardlinks both failed (likely cross-volume) — re-run install after editing .agents/* to refresh"}});import{existsSync as tL5,readFileSync as eL5}from"node:fs";function cY2($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Rd($,z,G){let J="";if(tL5($))J=eL5($,"utf-8");let Q=cY2(z),U=!1;for(let[K,Z]of Object.entries(G)){let W=cY2(K);if(new RegExp(`${W}\\s*=\\s*${Z}`,"i").test(J))continue;let B=new RegExp(`${W}\\s*=\\s*${!Z}`,"i"),Y=`${K} = ${Z}`;if(B.test(J)){J=J.replace(B,()=>Y),U=!0;continue}if(new RegExp(`\\[${Q}\\]`,"i").test(J))J=J.replace(new RegExp(`(\\[${Q}\\][^[]*)`,"i"),(V)=>`${V}${Y}
380
380
  `);else J=`${J.trimEnd()}
@@ -1310,7 +1310,7 @@ Skill eval live run preview:`),console.log(` skill: ${J}`),console.log(` tasks
1310
1310
  `),process.stderr.write(`[oma] path=${Q}
1311
1311
  `),process.stderr.write(`[oma] hint: run 'oma doctor' to diagnose disk/permission/corruption
1312
1312
  `),U}if(G.kind==="session.created"||G.kind==="workflow.phase"||G.kind==="session.ended")uN($,z);return J}function Of5($,z){let G=DN($);Le(G),pb2(G,`${JSON.stringify(z)}
1313
- `,"utf-8")}function If5($){let z=$.payload??{},G=(J)=>{let Q=z[J];return typeof Q==="string"&&Q.trim()?Q.trim():""};if($.kind==="decision.made"){let J=G("subject"),Q=G("decision"),U=G("rationale");if(!J&&!Q)return null;return{content:[J?`Decision [${J}]:`:"Decision:",Q,U?`Rationale: ${U}`:""].filter(Boolean).join(" "),importance:8}}if($.kind==="blocker.raised"){let J=G("summary");if(!J)return null;let Q=G("severity"),U=G("remediation");return{content:[`Blocker: ${J}`,Q?`(severity: ${Q})`:"",U?`Remediation: ${U}`:""].filter(Boolean).join(" "),importance:7}}return null}async function VY($,z,G,J=W0()){let Q=jN($,z,G);if(!Df5.has(Q.kind))return Q;if(!await J.observe({sessionId:z,content:`${JSON.stringify(Q)}
1313
+ `,"utf-8")}function If5($){let z=$.payload??{},G=(J)=>{let Q=z[J];return typeof Q==="string"&&Q.trim()?Q.trim():""};if($.kind==="decision.made"){let J=G("subject");if(J.startsWith("scm."))return null;let Q=G("decision"),U=G("rationale");if(!J&&!Q)return null;return{content:[J?`Decision [${J}]:`:"Decision:",Q,U?`Rationale: ${U}`:""].filter(Boolean).join(" "),importance:8}}if($.kind==="blocker.raised"){let J=G("summary");if(!J)return null;let Q=G("severity"),U=G("remediation");return{content:[`Blocker: ${J}`,Q?`(severity: ${Q})`:"",U?`Remediation: ${U}`:""].filter(Boolean).join(" "),importance:7}}return null}async function VY($,z,G,J=W0()){let Q=jN($,z,G);if(!Df5.has(Q.kind))return Q;if(!await J.observe({sessionId:z,content:`${JSON.stringify(Q)}
1314
1314
  `,source:"oma-workflow"}))Of5($,Q);let K=If5(Q);if(K&&typeof J.remember==="function")try{await J.remember({sessionId:z,content:K.content,importance:K.importance})}catch{}return Q}function B0($,z){let G=cC($,z);if(!nb2(G))return[];let J=[];for(let Q of rb2(G,"utf-8").split(`
1315
1315
  `)){if(!Q.trim())continue;try{let U=JSON.parse(Q);if(U.sid&&U.kind&&U.eventId&&U.ts)J.push(U)}catch{}}return lC(J)}function lC($){return[...$].sort((z,G)=>{let J=z.ts.localeCompare(G.ts);if(J!==0)return J;return z.eventId.localeCompare(G.eventId)})}function O$($,z,G=""){let J=$.payload?.[z];return typeof J==="string"&&J.trim()?J:G}function Y0($,z){let G={sid:$,schemaVersion:Xe,category:"main",status:"active",gatesPassedBy:[],pendingPeerReviews:[]};for(let J of lC(z))if(J.kind==="session.created")G.createdAt=G.createdAt??J.ts,G.workflow=String(J.payload?.workflow??G.workflow??""),G.category=String(J.payload?.category??G.category);else if(J.kind==="workflow.phase")G.currentPhase=String(J.payload?.phase??"");else if(J.kind==="gate.passed")G.gatesPassedBy.push({ts:J.ts,...J.payload??{}});else if(J.kind==="session.ended"){let Q=J.payload?.status;G.status=Q==="failed"?"failed":"completed"}return G}function uN($,z){let G=Y0(z,B0($,z));return YY(He($,z),G),G}var Nf5,Af5,Xe=1,Df5;var H9=q(()=>{J3();BY();Nf5=EQ2,Af5=bQ2,Df5=new Set(["workflow.phase","gate.passed","gate.failed","blocker.raised","session.ended","decision.made","decision.missing"])});import{join as XY}from"node:path";function MN($){return[XY($,".bun","bin"),XY($,".local","bin"),"/opt/homebrew/bin","/usr/local/bin","/usr/bin","/bin","/usr/sbin","/sbin"].join(":")}function dC($,z){if(z==="darwin")return XY($,"Library","LaunchAgents","dev.oma.agentmemory.plist");if(z==="linux")return XY($,".config","systemd","user","oma-agentmemory.service");if(z==="win32")return XY($,".agentmemory","oma-agentmemory.task.xml");return}function qe($){return XY($,".agentmemory")}function $_2($){return`<?xml version="1.0" encoding="UTF-8"?>
1316
1316
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-agent",
3
- "version": "12.1.0",
3
+ "version": "12.2.0",
4
4
  "description": "Portable multi-agent harness for .agents-based skills and workflows across Antigravity, Claude Code, Codex, OpenCode, and more",
5
5
  "type": "module",
6
6
  "bin": {