@oracle-agent/oracle 0.22.4 → 0.22.6

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.
@@ -1,9 +1,9 @@
1
- import u from"node:fs";import c from"node:path";var C=Object.freeze({openrouter:{key:"OPENROUTER_API_KEY",baseUrl:"https://openrouter.ai/api/v1",model:"openrouter/auto"},openai:{key:"OPENAI_API_KEY",baseUrl:"https://api.openai.com/v1",model:"gpt-4.1-mini"},anthropic:{key:"ANTHROPIC_API_KEY",baseUrl:"https://api.anthropic.com/v1",model:"claude-sonnet-4-6",protocol:"anthropic-messages"},xai:{key:"XAI_API_KEY",baseUrl:"https://api.x.ai/v1",model:"grok-4.5"},deepseek:{key:"DEEPSEEK_API_KEY",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-chat"},gemini:{key:"GEMINI_API_KEY",alternateKey:"GOOGLE_API_KEY",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-2.5-flash"},kimi:{key:"MOONSHOT_API_KEY",alternateKey:"KIMI_API_KEY",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k3",protocol:"openai-chat"},mistral:{key:"MISTRAL_API_KEY",baseUrl:"https://api.mistral.ai/v1",model:"mistral-large-latest",protocol:"openai-chat"}}),P=Object.freeze({"anthropic-oauth":{key:"ANTHROPIC_API_KEY",baseUrl:"https://api.anthropic.com/v1",model:"claude-sonnet-4-20250514",protocol:"anthropic-messages"},"openai-codex":{key:"OPENAI_API_KEY",baseUrl:"https://chatgpt.com/backend-api/codex",model:"gpt-5.4",protocol:"responses"},"xai-oauth":{key:"XAI_API_KEY",baseUrl:"https://api.x.ai/v1",model:"grok-4-latest",protocol:"responses"}});var d=Object.freeze([{name:"oracle",bin:"oracle",label:"Oracle Native (default)",kind:"oracle"},{name:"hermes",bin:"hermes",label:"Hermes Agent",kind:"hermes"},{name:"opencode",bin:"opencode",label:"OpenCode",kind:"mcp"},{name:"claude",bin:"claude",label:"Claude Code",kind:"mcp"},{name:"codex",bin:"codex",label:"OpenAI Codex CLI",kind:"mcp"},{name:"cursor",bin:"cursor",label:"Cursor IDE",kind:"mcp"},{name:"windsurf",bin:"windsurf",label:"Windsurf",kind:"mcp"},{name:"aider",bin:"aider",label:"Aider",kind:"mcp"},{name:"continue",bin:"continue",label:"Continue",kind:"mcp"}]);function p(n){for(let o of(process.env.PATH||"").split(c.delimiter)){let e=c.join(o,n);try{if(u.existsSync(e))return e}catch{}}return null}function l(){let n=[];for(let o of d){if(o.name==="oracle"){n.push({...o,path:process.argv[1]||"oracle"});continue}let e=p(o.bin);e&&n.push({...o,path:e})}return n}var m=Object.freeze({claude:"claude-code",codex:"codex",cursor:"cursor",windsurf:"vscode",continue:"vscode",opencode:"generic",aider:"generic"});function h(n){if(n.kind==="oracle")return{...n,direction:"native",integrate:null,backendEnv:null,note:"Oracle's own agent loop. This is the default and needs no wiring."};let e=`oracle mcp install ${m[n.name]||"generic"}`;return n.kind==="hermes"?{...n,direction:"both",integrate:e,backendEnv:`ORACLE_CHAT_BACKEND=${n.name}`,note:"Legacy: this hands Oracle's native model loop to Hermes. Prefer the inbound MCP wiring above."}:{...n,direction:"inbound",integrate:e,backendEnv:null,note:"Calls Oracle as an MCP server. Oracle's native model loop stays in charge."}}function f(n){let o=n.map(h),e=o.find(r=>r.direction==="native"),i=o.filter(r=>r.direction==="inbound"||r.direction==="both"),s=o.filter(r=>r.backendEnv),t=[];if(t.push(""),t.push(`Oracle native chat: default${e?` (${e.path})`:""}`),t.push("Oracle runs its own agent loop, memory, skills, and scheduler."),t.push(""),t.push("Integrate Oracle INTO these clients (recommended \u2014 native loop stays):"),i.length===0)t.push(" (none detected \u2014 Oracle runs standalone, nothing else required)");else for(let r of i)t.push(` ${r.label.padEnd(22)} ${r.path}`),t.push(` ${" ".repeat(22)} ${r.integrate}`);if(t.push(""),s.length>0){t.push("Delegate Oracle's model loop to another harness (legacy, not recommended):");for(let r of s)t.push(` ${r.label.padEnd(22)} ${r.backendEnv}`),t.push(` ${" ".repeat(22)} ${r.note}`);t.push("")}return t.push("Detection is capability discovery only. It never changes the backend."),t.join(`
1
+ import u from"node:fs";import c from"node:path";var k=Object.freeze({openrouter:{key:"OPENROUTER_API_KEY",baseUrl:"https://openrouter.ai/api/v1",model:"openrouter/auto"},openai:{key:"OPENAI_API_KEY",baseUrl:"https://api.openai.com/v1",model:"gpt-4.1-mini"},anthropic:{key:"ANTHROPIC_API_KEY",baseUrl:"https://api.anthropic.com/v1",model:"claude-sonnet-4-6",protocol:"anthropic-messages"},xai:{key:"XAI_API_KEY",baseUrl:"https://api.x.ai/v1",model:"grok-4.5"},deepseek:{key:"DEEPSEEK_API_KEY",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-chat"},gemini:{key:"GEMINI_API_KEY",alternateKey:"GOOGLE_API_KEY",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-2.5-flash"},kimi:{key:"MOONSHOT_API_KEY",alternateKey:"KIMI_API_KEY",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k3",protocol:"openai-chat"},mistral:{key:"MISTRAL_API_KEY",baseUrl:"https://api.mistral.ai/v1",model:"mistral-large-latest",protocol:"openai-chat"}}),w=Object.freeze({"anthropic-oauth":{key:"ANTHROPIC_API_KEY",baseUrl:"https://api.anthropic.com/v1",model:"claude-sonnet-4-20250514",protocol:"anthropic-messages"},"openai-codex":{key:"OPENAI_API_KEY",baseUrl:"https://chatgpt.com/backend-api/codex",model:"gpt-5.4",protocol:"responses"},"xai-oauth":{key:"XAI_API_KEY",baseUrl:"https://api.x.ai/v1",model:"grok-4-latest",protocol:"responses"}});var d=Object.freeze([{name:"oracle",bin:"oracle",label:"Oracle Native (default)",kind:"oracle"},{name:"hermes",bin:"hermes",label:"Hermes Agent",kind:"hermes"},{name:"opencode",bin:"opencode",label:"OpenCode",kind:"mcp"},{name:"claude",bin:"claude",label:"Claude Code",kind:"mcp"},{name:"codex",bin:"codex",label:"OpenAI Codex CLI",kind:"mcp"},{name:"cursor",bin:"cursor",label:"Cursor IDE",kind:"mcp"},{name:"windsurf",bin:"windsurf",label:"Windsurf",kind:"mcp"},{name:"aider",bin:"aider",label:"Aider",kind:"mcp"},{name:"continue",bin:"continue",label:"Continue",kind:"mcp"}]);function p(n){for(let o of(process.env.PATH||"").split(c.delimiter)){let e=c.join(o,n);try{if(u.existsSync(e))return e}catch{}}return null}function l(){let n=[];for(let o of d){if(o.name==="oracle"){n.push({...o,path:process.argv[1]||"oracle"});continue}let e=p(o.bin);e&&n.push({...o,path:e})}return n}var m=Object.freeze({claude:"claude-code",codex:"codex",cursor:"cursor",windsurf:"vscode",continue:"vscode",opencode:"generic",aider:"generic"});function h(n){if(n.kind==="oracle")return{...n,direction:"native",integrate:null,backendEnv:null,note:"Oracle's own agent loop. This is the default and needs no wiring."};let e=`oracle mcp install ${m[n.name]||"generic"}`;return n.kind==="hermes"?{...n,direction:"both",integrate:e,backendEnv:`ORACLE_CHAT_BACKEND=${n.name}`,note:"Legacy: this hands Oracle's native model loop to Hermes. Prefer the inbound MCP wiring above."}:{...n,direction:"inbound",integrate:e,backendEnv:null,note:"Calls Oracle as an MCP server. Oracle's native model loop stays in charge."}}function f(n){let o=n.map(h),e=o.find(r=>r.direction==="native"),i=o.filter(r=>r.direction==="inbound"||r.direction==="both"),s=o.filter(r=>r.backendEnv),t=[];if(t.push(""),t.push(`Oracle native chat: default${e?` (${e.path})`:""}`),t.push("Oracle runs its own agent loop, memory, skills, and scheduler."),t.push(""),t.push("Integrate Oracle INTO these clients (recommended \u2014 native loop stays):"),i.length===0)t.push(" (none detected \u2014 Oracle runs standalone, nothing else required)");else for(let r of i)t.push(` ${r.label.padEnd(22)} ${r.path}`),t.push(` ${" ".repeat(22)} ${r.integrate}`);if(t.push(""),s.length>0){t.push("Delegate Oracle's model loop to another harness (legacy, not recommended):");for(let r of s)t.push(` ${r.label.padEnd(22)} ${r.backendEnv}`),t.push(` ${" ".repeat(22)} ${r.note}`);t.push("")}return t.push("Detection is capability discovery only. It never changes the backend."),t.join(`
2
2
  `)}function a(){return["oracle harness \u2014 detect installed agent harnesses",""," oracle harness detect scan PATH for Agent Plugins-compatible clients","","Two directions, do not confuse them:"," inbound \u2014 the client calls Oracle as an MCP server (oracle mcp install <target>)."," Oracle's native model loop stays in charge. This is integration."," outbound \u2014 Oracle hands its model loop to that harness (ORACLE_CHAT_BACKEND=<name>)."," This surrenders the native harness and is legacy only.","","Detected: opencode, claude, codex, cursor, windsurf, aider, continue, hermes"].join(`
3
- `)}var y={name:"harness",summary:"detect installed agent harnesses",usage:a,async run(n,o){let e=n[0];if(e==="help"||e==="--help"||e==="-h")return process.stdout.write(a()+`
3
+ `)}var v={name:"harness",summary:"detect installed agent harnesses",usage:a,async run(n,o){let e=n[0];if(e==="help"||e==="--help"||e==="-h")return process.stdout.write(a()+`
4
4
  `),0;if(e&&e!=="detect"&&e!=="list")return process.stderr.write(`oracle harness: unknown subcommand '${e}'
5
5
  `),process.stderr.write(a()+`
6
6
  `),1;let i=l();return i.length===0?(process.stderr.write(`No agent harnesses detected on PATH.
7
7
  `),process.stderr.write(`Oracle runs natively \u2014 no external agent required.
8
8
  `),0):(process.stdout.write(f(i)+`
9
- `),0)}};export{h as classifyHarness,y as default,f as renderHarnessReport};
9
+ `),0)}};export{h as classifyHarness,v as default,f as renderHarnessReport};