@oracle-agent/oracle 0.32.0 → 0.33.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.
@@ -1,4 +1,4 @@
1
- import A from"node:fs";import m from"node:path";var s=Object.freeze([{id:"oracle",label:"Oracle Native",kind:"oracle",bins:["oracle"],website:!0,detect:!0},{id:"hermes",label:"Hermes Agent",kind:"mcp",bins:["hermes"],mcpTarget:"generic",configKey:"hermes",website:!0,detect:!0},{id:"claude",label:"Claude Code",kind:"mcp",bins:["claude"],mcpTarget:"claude-code",configKey:"claudeCode",website:!0,detect:!0},{id:"claude-desktop",label:"Claude Desktop",kind:"mcp",bins:[],mcpTarget:"claude-desktop",configKey:"claudeDesktop",website:!0,detect:!1},{id:"chatgpt",label:"ChatGPT",kind:"mcp",bins:[],mcpTarget:"chatgpt",configKey:"chatgpt",website:!0,detect:!1},{id:"codex",label:"OpenAI Codex",kind:"mcp",bins:["codex"],mcpTarget:"codex",configKey:"codex",website:!0,detect:!0},{id:"cursor",label:"Cursor",kind:"mcp",bins:["cursor","cursor-agent"],mcpTarget:"cursor",configKey:"cursor",website:!0,detect:!0},{id:"windsurf",label:"Windsurf",kind:"mcp",bins:["windsurf"],mcpTarget:"vscode",configKey:"windsurf",website:!0,detect:!0},{id:"vscode",label:"VS Code / Copilot",kind:"mcp",bins:["code","code-insiders"],mcpTarget:"vscode",configKey:"vscode",website:!0,detect:!0},{id:"openclaw",label:"OpenClaw",kind:"mcp",bins:["openclaw","claw"],mcpTarget:"generic",configKey:"openclaw",website:!0,detect:!0},{id:"perplexity",label:"Perplexity",kind:"mcp",bins:["perplexity","pplx"],mcpTarget:"generic",configKey:"perplexity",website:!0,detect:!0},{id:"manus",label:"Manus",kind:"mcp",bins:["manus"],mcpTarget:"generic",configKey:"manus",website:!0,detect:!0},{id:"prime",label:"Prime Intellect Agent",kind:"mcp",bins:["prime-agent","prime"],mcpTarget:"generic",configKey:"prime",website:!1,detect:!0},{id:"opencode",label:"OpenCode",kind:"mcp",bins:["opencode"],mcpTarget:"generic",configKey:"opencode",website:!1,detect:!0},{id:"aider",label:"Aider",kind:"mcp",bins:["aider"],mcpTarget:"generic",configKey:"aider",website:!1,detect:!0},{id:"continue",label:"Continue",kind:"mcp",bins:["continue"],mcpTarget:"vscode",configKey:"continue",website:!1,detect:!0},{id:"goose",label:"Goose",kind:"mcp",bins:["goose"],mcpTarget:"generic",configKey:"goose",website:!1,detect:!0},{id:"amp",label:"Amp",kind:"mcp",bins:["amp"],mcpTarget:"generic",configKey:"amp",website:!1,detect:!0},{id:"generic",label:"Generic MCP",kind:"mcp",bins:[],mcpTarget:"generic",configKey:"genericMcp",website:!0,detect:!1}]);function c(){return s.filter(e=>e.website)}function d(){return s.filter(e=>e.detect!==!1&&(e.bins?.length||e.kind==="oracle"))}function l(e){return s.find(n=>n.id===e)?.mcpTarget||"generic"}function p(e){return e==="oracle"?"oracle chat":`oracle mcp install ${l(e)}`}var I=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.6"},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"},nous:{key:"NOUS_API_KEY",baseUrl:"https://inference-api.nousresearch.com/v1",model:"moonshotai/kimi-k3",protocol:"openai-chat"},qwen:{key:"DASHSCOPE_API_KEY",alternateKey:"QWEN_API_KEY",baseUrl:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",model:"qwen-plus",protocol:"openai-chat"},glm:{key:"ZHIPU_API_KEY",alternateKey:"GLM_API_KEY",baseUrl:"https://open.bigmodel.cn/api/paas/v4",model:"glm-4.5",protocol:"openai-chat"}}),L=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.6",protocol:"responses"}});var U=Object.freeze(["xai-oauth","anthropic-oauth","openai-codex"]);function k(){return d().map(e=>({name:e.id,bin:e.bins?.[0]||e.id,label:e.label,kind:e.kind,altBins:(e.bins||[]).slice(1)}))}function h(e){for(let o of(process.env.PATH||"").split(m.delimiter)){let n=m.join(o,e);try{if(A.existsSync(n))return n}catch{}}return null}function _(e){let o=[e.bin,...e.altBins||[]].filter(Boolean);for(let n of o){let r=h(n);if(r)return r}return null}function f(e=process.env){let o=[];for(let r of k()){if(r.kind==="oracle"||r.name==="oracle"){o.push({...r,path:process.argv[1]||"oracle"});continue}let a=_(r);a&&o.push({name:r.name,bin:r.bin,label:r.label,kind:r.kind,path:a})}let n=String(e.ORACLE_HARNESS_EXTRA||e.ORACLE_CLIENT_EXTRA||"").split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){if(o.some(t=>t.bin===r||t.name===r))continue;let a=h(r);a&&o.push({name:r,bin:r,label:r,kind:"mcp",path:a})}return o}function O(e){if(e.kind==="oracle"||e.name==="oracle")return{...e,direction:"native",integrate:"oracle chat",outbound:"oracle chat",inbound:null,plugins:null,backendEnv:null,note:"Oracle native harness. Default. No external harness required."};let o=l(e.name)||"generic",n=e.name==="hermes"?"hermes":e.name;return{...e,direction:"client",integrate:`oracle mcp install ${o}`,outbound:`oracle chat --backend ${n}`,inbound:`oracle mcp install ${o}`,plugins:"oracle plugins install <path|git-url>",backendEnv:`ORACLE_CHAT_BACKEND=${n}`,note:"Use through Oracle (`oracle chat --backend \u2026`) or wire Oracle into this harness (`oracle mcp install`). Detection never auto-selects."}}function w(e){let o=e.map(O),n=o.find(i=>i.direction==="native"),r=o.filter(i=>i.direction!=="native"),a=c().filter(i=>i.kind==="mcp"),t=[];if(t.push(""),t.push("Three ways to run Oracle:"),t.push(` 1) Oracle native harness ${n?n.path:"oracle"}`),t.push(" oracle setup model && oracle chat"),t.push(" 2) Through Oracle attach Hermes / Claude / Codex as the engine"),t.push(" oracle chat --backend hermes"),t.push(" 3) Into your harness wire Oracle MCP into the agent you already use"),t.push(" oracle mcp install <target> | oracle plugins install <path>"),t.push(""),t.push("Oracle native is the default harness. Detection never auto-selects another harness."),t.push(""),t.push("Detected on this machine:"),r.length===0)t.push(" (none, Oracle native is enough)");else for(let i of r)t.push(` ${i.label.padEnd(22)} ${i.path}`),t.push(` ${" ".repeat(22)} \u2192 through Oracle: ${i.outbound}`),t.push(` ${" ".repeat(22)} into harness: ${i.inbound}`);t.push(""),t.push("Supported harness roster (MCP install targets):");for(let i of a){let b=p(i.id),g=r.find(E=>E.name===i.id);t.push(` ${i.label.padEnd(22)} ${b}${g?" [detected]":""}`)}return t.push(""),t.push("Also:"),t.push(" oracle mcp print --target generic"),t.push(" oracle plugins list"),t.push(" ORACLE_HARNESS_EXTRA=foo,bar # detect extra bins"),t.push(""),t.push("Models on the site (Grok, Gemini, DeepSeek, Qwen, Kimi) are providers for"),t.push("Oracle native, configure with oracle setup model / oracle auth, not as harnesses."),t.join(`
1
+ import k from"node:fs";import m from"node:path";var s=Object.freeze([{id:"oracle",label:"Oracle Native",kind:"oracle",bins:["oracle"],website:!0,detect:!0},{id:"hermes",label:"Hermes Agent",kind:"mcp",bins:["hermes"],mcpTarget:"generic",configKey:"hermes",website:!0,detect:!0},{id:"claude",label:"Claude Code",kind:"mcp",bins:["claude"],mcpTarget:"claude-code",configKey:"claudeCode",website:!0,detect:!0},{id:"claude-desktop",label:"Claude Desktop",kind:"mcp",bins:[],mcpTarget:"claude-desktop",configKey:"claudeDesktop",website:!0,detect:!1},{id:"chatgpt",label:"ChatGPT",kind:"mcp",bins:[],mcpTarget:"chatgpt",configKey:"chatgpt",website:!0,detect:!1},{id:"codex",label:"OpenAI Codex",kind:"mcp",bins:["codex"],mcpTarget:"codex",configKey:"codex",website:!0,detect:!0},{id:"cursor",label:"Cursor",kind:"mcp",bins:["cursor","cursor-agent"],mcpTarget:"cursor",configKey:"cursor",website:!0,detect:!0},{id:"windsurf",label:"Windsurf",kind:"mcp",bins:["windsurf"],mcpTarget:"vscode",configKey:"windsurf",website:!0,detect:!0},{id:"vscode",label:"VS Code / Copilot",kind:"mcp",bins:["code","code-insiders"],mcpTarget:"vscode",configKey:"vscode",website:!0,detect:!0},{id:"openclaw",label:"OpenClaw",kind:"mcp",bins:["openclaw","claw"],mcpTarget:"generic",configKey:"openclaw",website:!0,detect:!0},{id:"perplexity",label:"Perplexity",kind:"mcp",bins:["perplexity","pplx"],mcpTarget:"generic",configKey:"perplexity",website:!0,detect:!0},{id:"manus",label:"Manus",kind:"mcp",bins:["manus"],mcpTarget:"generic",configKey:"manus",website:!0,detect:!0},{id:"prime",label:"Prime Intellect Agent",kind:"mcp",bins:["prime-agent","prime"],mcpTarget:"generic",configKey:"prime",website:!1,detect:!0},{id:"opencode",label:"OpenCode",kind:"mcp",bins:["opencode"],mcpTarget:"generic",configKey:"opencode",website:!1,detect:!0},{id:"aider",label:"Aider",kind:"mcp",bins:["aider"],mcpTarget:"generic",configKey:"aider",website:!1,detect:!0},{id:"continue",label:"Continue",kind:"mcp",bins:["continue"],mcpTarget:"vscode",configKey:"continue",website:!1,detect:!0},{id:"goose",label:"Goose",kind:"mcp",bins:["goose"],mcpTarget:"generic",configKey:"goose",website:!1,detect:!0},{id:"amp",label:"Amp",kind:"mcp",bins:["amp"],mcpTarget:"generic",configKey:"amp",website:!1,detect:!0},{id:"generic",label:"Generic MCP",kind:"mcp",bins:[],mcpTarget:"generic",configKey:"genericMcp",website:!0,detect:!1}]);function c(){return s.filter(e=>e.website)}function p(){return s.filter(e=>e.detect!==!1&&(e.bins?.length||e.kind==="oracle"))}function l(e){return s.find(n=>n.id===e)?.mcpTarget||"generic"}function d(e){return e==="oracle"?"oracle chat":`oracle mcp install ${l(e)}`}var I=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.6"},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"},nous:{key:"NOUS_API_KEY",baseUrl:"https://inference-api.nousresearch.com/v1",model:"moonshotai/kimi-k3",protocol:"openai-chat"},qwen:{key:"DASHSCOPE_API_KEY",alternateKey:"QWEN_API_KEY",baseUrl:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",model:"qwen-plus",protocol:"openai-chat"},glm:{key:"ZHIPU_API_KEY",alternateKey:"GLM_API_KEY",baseUrl:"https://open.bigmodel.cn/api/paas/v4",model:"glm-4.5",protocol:"openai-chat"},local:{baseUrl:"http://127.0.0.1:8080/v1",model:"Qwen3-8B-Q4_K_M",protocol:"openai-chat",keyless:!0},ollama:{baseUrl:"http://127.0.0.1:11434/v1",model:"llama3.2",protocol:"openai-chat",keyless:!0}}),L=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.6",protocol:"responses"}});var U=Object.freeze(["xai-oauth","anthropic-oauth","openai-codex"]);function A(){return p().map(e=>({name:e.id,bin:e.bins?.[0]||e.id,label:e.label,kind:e.kind,altBins:(e.bins||[]).slice(1)}))}function h(e){for(let o of(process.env.PATH||"").split(m.delimiter)){let n=m.join(o,e);try{if(k.existsSync(n))return n}catch{}}return null}function _(e){let o=[e.bin,...e.altBins||[]].filter(Boolean);for(let n of o){let r=h(n);if(r)return r}return null}function f(e=process.env){let o=[];for(let r of A()){if(r.kind==="oracle"||r.name==="oracle"){o.push({...r,path:process.argv[1]||"oracle"});continue}let i=_(r);i&&o.push({name:r.name,bin:r.bin,label:r.label,kind:r.kind,path:i})}let n=String(e.ORACLE_HARNESS_EXTRA||e.ORACLE_CLIENT_EXTRA||"").split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){if(o.some(t=>t.bin===r||t.name===r))continue;let i=h(r);i&&o.push({name:r,bin:r,label:r,kind:"mcp",path:i})}return o}function O(e){if(e.kind==="oracle"||e.name==="oracle")return{...e,direction:"native",integrate:"oracle chat",outbound:"oracle chat",inbound:null,plugins:null,backendEnv:null,note:"Oracle native harness. Default. No external harness required."};let o=l(e.name)||"generic",n=e.name==="hermes"?"hermes":e.name;return{...e,direction:"client",integrate:`oracle mcp install ${o}`,outbound:`oracle chat --backend ${n}`,inbound:`oracle mcp install ${o}`,plugins:"oracle plugins install <path|git-url>",backendEnv:`ORACLE_CHAT_BACKEND=${n}`,note:"Use through Oracle (`oracle chat --backend \u2026`) or wire Oracle into this harness (`oracle mcp install`). Detection never auto-selects."}}function w(e){let o=e.map(O),n=o.find(a=>a.direction==="native"),r=o.filter(a=>a.direction!=="native"),i=c().filter(a=>a.kind==="mcp"),t=[];if(t.push(""),t.push("Three ways to run Oracle:"),t.push(` 1) Oracle native harness ${n?n.path:"oracle"}`),t.push(" oracle setup model && oracle chat"),t.push(" 2) Through Oracle attach Hermes / Claude / Codex as the engine"),t.push(" oracle chat --backend hermes"),t.push(" 3) Into your harness wire Oracle MCP into the agent you already use"),t.push(" oracle mcp install <target> | oracle plugins install <path>"),t.push(""),t.push("Oracle native is the default harness. Detection never auto-selects another harness."),t.push(""),t.push("Detected on this machine:"),r.length===0)t.push(" (none, Oracle native is enough)");else for(let a of r)t.push(` ${a.label.padEnd(22)} ${a.path}`),t.push(` ${" ".repeat(22)} \u2192 through Oracle: ${a.outbound}`),t.push(` ${" ".repeat(22)} into harness: ${a.inbound}`);t.push(""),t.push("Supported harness roster (MCP install targets):");for(let a of i){let b=d(a.id),g=r.find(E=>E.name===a.id);t.push(` ${a.label.padEnd(22)} ${b}${g?" [detected]":""}`)}return t.push(""),t.push("Also:"),t.push(" oracle mcp print --target generic"),t.push(" oracle plugins list"),t.push(" ORACLE_HARNESS_EXTRA=foo,bar # detect extra bins"),t.push(""),t.push("Models on the site (Grok, Gemini, DeepSeek, Qwen, Kimi) are providers for"),t.push("Oracle native, configure with oracle setup model / oracle auth, not as harnesses."),t.join(`
2
2
  `)}function u(){return["oracle harness, detect installed agent harnesses",""," oracle harness detect scan PATH + show supported harness roster"," oracle harness list alias of detect","","Modes:"," Oracle native harness oracle chat"," Through Oracle oracle chat --backend hermes|claude|codex|\u2026"," Into your harness oracle mcp install <target>","",`Harness roster: ${c().map(o=>o.id).join(", ")}`,"Extra bins: ORACLE_HARNESS_EXTRA=foo,bar","","Detection never selects a backend."].join(`
3
3
  `)}var M={name:"harness",aliases:["clients"],summary:"detect agent harnesses; use Oracle native or wire MCP into them",usage:u,async run(e,o){let n=e[0];if(n==="help"||n==="--help"||n==="-h")return process.stdout.write(u()+`
4
4
  `),0;if(n&&n!=="detect"&&n!=="list")return process.stderr.write(`oracle harness: unknown subcommand '${n}'