@herjarsa/omo-meta-governor 0.34.0 → 0.34.1

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/dist/index.js CHANGED
@@ -30,7 +30,7 @@ After the tool call, briefly confirm what you stored and for which tool.`};try{r
30
30
 
31
31
  Please invoke the \`task\` tool with \`subagent_type=oracle\` to perform a verification pass on the current session state. Decision context: ${$.evidenceCount} evidence unit(s). After Oracle returns, you should continue with the recommended action.`;return`[MetaGovernor] Escalation to user required. Reason: ${$.reasoning}
32
32
 
33
- Present a clear summary to the user with the deviation(s) detected and your recommended next steps. Wait for explicit user input before proceeding.`}var P4,tO=0,bU=null;var _U=l$(()=>{P4=new u8});var sO=LX((EI,f8)=>{f8.exports={name:"@herjarsa/omo-meta-governor",version:"0.34.0",repository:{type:"git",url:"https://github.com/herjarsa/omo-meta-governor.git"},main:"./dist/index.js",devDependencies:{"@colbymchenry/codegraph":"^1.5.0","@modelcontextprotocol/sdk":"^1.30.0","@opencode-ai/plugin":"^1.17.4","@types/node":"^25.9.3",typescript:"^7.0.2"},peerDependencies:{"@opencode-ai/plugin":">=1.0.0"},exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js"},"./lib":{types:"./dist/lib.d.ts",import:"./dist/lib.js"}},bin:{"omo-meta-governor-mcp":"./dist/mcp-server.js"},description:"Self-judging agent orchestration layer for OpenCode. Reads memory, scores sessions, dispatches decisions.",files:["dist","README.md"],license:"MIT",publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},scripts:{build:"bun build.ts",typecheck:"tsc --noEmit",test:"bun test"},type:"module",types:"./dist/index.d.ts"}});var tJ={};Y$(tJ,{stripJsoncComments:()=>lJ,parseJsonc:()=>oJ,loadMetaGovernorConfig:()=>yN,loadJsoncFile:()=>uN,getUserConfigPath:()=>dJ,getProjectConfigPath:()=>pJ,deepMerge:()=>q4});import{readFile as a8,access as e8}from"node:fs/promises";import{resolve as s8,join as $Y}from"node:path";import{homedir as vY}from"node:os";function lJ($){let v=[],b=0;while(b<$.length){let U=$[b];if(U==='"'||U==="'"){let _=U;v.push(_),b++;while(b<$.length){let N=$[b];if(v.push(N),N==="\\"){if(b++,b<$.length)v.push($[b])}else if(N===_){b++;break}b++}continue}if(U==="/"&&b+1<$.length&&$[b+1]==="/"){b+=2;while(b<$.length&&$[b]!==`
33
+ Present a clear summary to the user with the deviation(s) detected and your recommended next steps. Wait for explicit user input before proceeding.`}var P4,tO=0,bU=null;var _U=l$(()=>{P4=new u8});var sO=LX((EI,f8)=>{f8.exports={name:"@herjarsa/omo-meta-governor",version:"0.34.1",repository:{type:"git",url:"https://github.com/herjarsa/omo-meta-governor.git"},main:"./dist/index.js",devDependencies:{"@colbymchenry/codegraph":"^1.5.0","@modelcontextprotocol/sdk":"^1.30.0","@opencode-ai/plugin":"^1.17.4","@types/node":"^25.9.3",typescript:"^7.0.2"},peerDependencies:{"@opencode-ai/plugin":">=1.0.0"},exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js"},"./lib":{types:"./dist/lib.d.ts",import:"./dist/lib.js"}},bin:{"omo-meta-governor-mcp":"./dist/mcp-server.js"},description:"Self-judging agent orchestration layer for OpenCode. Reads memory, scores sessions, dispatches decisions.",files:["dist","README.md"],license:"MIT",publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},scripts:{build:"bun build.ts",typecheck:"tsc --noEmit",test:"bun test"},type:"module",types:"./dist/index.d.ts"}});var tJ={};Y$(tJ,{stripJsoncComments:()=>lJ,parseJsonc:()=>oJ,loadMetaGovernorConfig:()=>yN,loadJsoncFile:()=>uN,getUserConfigPath:()=>dJ,getProjectConfigPath:()=>pJ,deepMerge:()=>q4});import{readFile as a8,access as e8}from"node:fs/promises";import{resolve as s8,join as $Y}from"node:path";import{homedir as vY}from"node:os";function lJ($){let v=[],b=0;while(b<$.length){let U=$[b];if(U==='"'||U==="'"){let _=U;v.push(_),b++;while(b<$.length){let N=$[b];if(v.push(N),N==="\\"){if(b++,b<$.length)v.push($[b])}else if(N===_){b++;break}b++}continue}if(U==="/"&&b+1<$.length&&$[b+1]==="/"){b+=2;while(b<$.length&&$[b]!==`
34
34
  `)b++;continue}if(U==="/"&&b+1<$.length&&$[b+1]==="*"){b+=2;while(b<$.length){if($[b]==="*"&&b+1<$.length&&$[b+1]==="/"){b+=2;break}b++}continue}v.push(U),b++}let z=v.join("");for(let U=0;U<10;U++){let _=z;if(z=z.replace(/,(\s*[\]}])/g,"$1"),z===_)break}return z}function oJ($){try{let v=lJ($);return JSON.parse(v)}catch{return}}function dJ(){return s8(vY(),".config","opencode",iJ)}function pJ($){let v=$??process.cwd();return $Y(v,".opencode",iJ)}async function UY($){try{return await e8($),!0}catch{return!1}}async function uN($){if(!await UY($))return;try{let v=await a8($,"utf-8");return oJ(v)}catch{return}}function q4($,v){let b={...$};for(let z of Object.keys(v)){let U=v[z],_=b[z];if(U===void 0)continue;if(nJ(U)&&nJ(_))b[z]=q4(_,U);else b[z]=U}return b}function nJ($){return typeof $==="object"&&$!==null&&!Array.isArray($)}async function yN($={}){let v=[],b="defaults",z={},U=$.userConfigPath??dJ(),_=await uN(U);if(_)z=q4(z,_),v.push(`user:${U}`),b="user";let N=pJ($.projectDir),O=await uN(N);if(O)z=q4(z,O),v.push(`project:${N}`),b="project";if($.cliOptions&&Object.keys($.cliOptions).length>0)z=q4(z,$.cliOptions),v.push("cli:inline"),b="cli";return{config:z,sources:v,effectiveSource:b}}var iJ="omo-meta-governor.jsonc";var fN=()=>{};var sJ={};Y$(sJ,{triggerWorkflow:()=>kY,pollRunUntilComplete:()=>KY,getLatestRunForSha:()=>XY,getFailedLogs:()=>QY,DEFAULT_CI_MONITOR_CONFIG:()=>JY});import{execFileSync as OY}from"node:child_process";function B4($,v=1e4){try{return OY("gh",$,{encoding:"utf-8",timeout:v,stdio:["ignore","pipe","pipe"],windowsHide:!0}).toString().replace(/\r\n/g,`
35
35
  `).trim()}catch{return null}}function XY($){let v=B4(["run","list","--limit","1","--commit",$,"--json","databaseId,status,conclusion,displayTitle,headSha,url"],1e4);if(!v)return null;try{return JSON.parse(v)[0]??null}catch{return null}}function KY($,v){let b=Date.now(),z="",U=B4(["run","view",String($),"--json","status,conclusion,url,headSha,displayTitle"],1e4);if(!U)return null;let _;try{_=JSON.parse(U)}catch{return null}while((_.status==="queued"||_.status==="in_progress"||_.status==="waiting"||_.status==="requested")&&Date.now()-b<v.maxWaitMs){let N=Date.now()+v.pollIntervalMs;while(Date.now()<N);let O=B4(["run","view",String($),"--json","status,conclusion,url,headSha,displayTitle"],1e4);if(!O)return null;try{_=JSON.parse(O)}catch{return null}}return _}function kY($,v){let b=B4(["workflow","run",$,"--ref",v],15000);return null}function QY($,v=4000){let b=B4(["run","view",String($),"--log-failed"],30000);if(!b)return"";if(b.length<=v)return b;return b.slice(0,v)+`
36
36
 
@@ -275,5 +275,5 @@ Current decision: ${H.message}`;let r2=`[${H.action}] ${H.message}`;if(F.recentI
275
275
  `)}function xY($,v,b=jY){if($==="own"||$==="third-party")return $;try{let z=b("gh repo view --json isFork,parent",{cwd:v,stdio:"pipe",timeout:1e4}),U=JSON.parse(String(z));if(U.isFork===!0&&U.parent!==null&&U.parent!==void 0)return"third-party";return"own"}catch{try{let z=b("git remote -v",{cwd:v,stdio:"pipe",timeout:1e4});if(String(z).split(`
276
276
  `).some((_)=>/^\s*upstream\s+/.test(_)))return"third-party"}catch{}return"own"}}var RY=JX();function JU($,v){return RY($,v)}JU.id="omo-meta-governor";JU.server=JU;var lj=JU;export{lj as default};
277
277
 
278
- //# debugId=CA75C5C1DE59614264756E2164756E21
278
+ //# debugId=73D7A57789C5C06564756E2164756E21
279
279
  //# sourceMappingURL=index.js.map