@oracle-agent/oracle 0.35.34 → 0.35.36
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 +43 -8
- package/artifacts/specialist-packs/oracle-full-crypto.json +11 -0
- package/dist/address-book.mjs +2 -2
- package/dist/agent-sessions.mjs +8 -8
- package/dist/assets/profiles/canton-agent/SOUL.md +44 -0
- package/dist/assets/profiles/canton-agent/profile.json +30 -0
- package/dist/assets/profiles/oracle/SOUL.md +1 -0
- package/dist/assets/skills/oracle-canton/SKILL.md +49 -0
- package/dist/assets/skills/oracle-desk-product/SKILL.md +1 -1
- package/dist/bin/desk-server.mjs +35 -35
- package/dist/bin/oracle-data-mcp.mjs +17 -17
- package/dist/bin/oracle-gateway.mjs +14 -14
- package/dist/bin/oracle-launch-radar-shadow.mjs +4 -4
- package/dist/bin/oracle-mev-arb-shadow.mjs +4 -4
- package/dist/bin/oracle-mev-shadow.mjs +4 -4
- package/dist/bin/oracle-public-server.mjs +4 -4
- package/dist/bin/oracle-route.mjs +8 -8
- package/dist/bin/oracle-scan.mjs +10 -10
- package/dist/bin/oracle.mjs +8 -6
- package/dist/cli/commands/agent-session.mjs +10 -10
- package/dist/cli/commands/airdrop.mjs +16 -0
- package/dist/cli/commands/chain.mjs +1 -1
- package/dist/cli/commands/chat.mjs +215 -204
- package/dist/cli/commands/doctor.mjs +5 -5
- package/dist/cli/commands/eval.mjs +151 -141
- package/dist/cli/commands/extension-policy.mjs +3 -3
- package/dist/cli/commands/farm.mjs +22 -22
- package/dist/cli/commands/mint.mjs +22 -0
- package/dist/cli/commands/model.mjs +219 -208
- package/dist/cli/commands/plugins.mjs +42 -39
- package/dist/cli/commands/quickstart.mjs +6 -6
- package/dist/cli/commands/session-vault.mjs +1 -1
- package/dist/cli/commands/sign.mjs +12 -12
- package/dist/cli/commands/signer.mjs +25 -23
- package/dist/cli/commands/snipe.mjs +6 -6
- package/dist/cli/commands/swap.mjs +12 -12
- package/dist/cli/commands/venues.mjs +2 -2
- package/dist/control/receipt-lineage.mjs +1 -0
- package/dist/data/desk-data.mjs +33 -33
- package/dist/data/providers/farming.mjs +2 -2
- package/dist/data/providers/lp-destination-discovery.mjs +4 -4
- package/dist/index.mjs +50 -49
- package/dist/launch-radar/index.mjs +4 -4
- package/dist/local-signer/anvil-attestation-worker.mjs +1 -1
- package/dist/local-signer/index.mjs +3 -3
- package/dist/local-signer/runtime.mjs +22 -20
- package/dist/router/index.mjs +3 -3
- package/dist/router/prepare-bridge.mjs +1 -1
- package/dist/scanner/index.mjs +4 -4
- package/dist/task.mjs +2 -2
- package/dist/teams/index.mjs +3 -1
- package/dist/tui/standalone-client.mjs +85 -75
- package/package.json +3 -2
- package/public/eval-report.json +6 -6
- package/public/oracle-splash/assets/desktop-app.jpg +0 -0
- package/public/oracle-splash/assets/hero/agent-session-poster.jpg +0 -0
- package/public/oracle-splash/assets/hero/agent-session.mp4 +0 -0
- package/public/oracle-splash/assets/hero/agent-session.webm +0 -0
- package/public/oracle-splash/assets/oracle-cli-v03535-poster.jpg +0 -0
- package/public/oracle-splash/assets/oracle-cli-v03535.gif +0 -0
- package/public/oracle-splash/assets/protocol-build-time.jpg +0 -0
- package/public/oracle-splash/downloads/index.html +2 -2
- package/public/oracle-splash/index.html +132 -54
- package/server.json +2 -2
|
@@ -1,43 +1,46 @@
|
|
|
1
|
-
import a from"node:fs";import l from"node:path";import{spawnSync as
|
|
2
|
-
`)}function
|
|
3
|
-
`),1;let s=$(
|
|
4
|
-
`),s.errors)for(let
|
|
5
|
-
`);return 1}let
|
|
6
|
-
`),1;if(a.cpSync(
|
|
7
|
-
|
|
8
|
-
`),
|
|
9
|
-
`)
|
|
10
|
-
`)
|
|
1
|
+
import a from"node:fs";import l from"node:path";import{spawnSync as k}from"node:child_process";import v from"node:fs";import R from"node:os";import m from"node:path";import{fileURLToPath as C}from"node:url";var b=m.dirname(C(import.meta.url)),X=m.resolve(b,"../..");function j(){return process.env.ORACLE_FAKE_HOME||R.homedir()}function x(){return process.env.ORACLE_PUBLIC_DESKTOP==="1"}function y(){return x()?process.env.ORACLE_CONFIG_DIR||m.join(j(),".config","oracle"):m.join(j(),".config","oracle")}function D(){return m.join(y(),"desk.json")}function O(){return m.join(y(),"env")}function d({force:n=!1}={}){if(d._done&&!n)return d._result||null;d._done=!0;let e={},t=(s,i)=>{if(i==null)return;let o=String(i).trim();o&&(process.env[s]!=null&&String(process.env[s]).trim()!==""||(process.env[s]=o,e[s]=o))};try{let s=O();if(v.existsSync(s))for(let i of v.readFileSync(s,"utf8").split(/\r?\n/)){let o=i.match(/^\s*([A-Z0-9_]+)\s*=\s*(.*?)\s*$/);if(!o||o[2].startsWith("#"))continue;let c=o[2];(c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'"))&&(c=c.slice(1,-1)),t(o[1],c)}}catch{}try{let s=D();if(v.existsSync(s)){let i=JSON.parse(v.readFileSync(s,"utf8"));i&&typeof i=="object"&&(t("ORACLE_DESK_URL",i.deskUrl||i.dataUrl||i.url),t("ORACLE_DATA_URL",i.dataUrl||i.deskUrl||i.url),t("ORACLE_API_URL",i.apiUrl||i.dataUrl||i.deskUrl),t("ORACLE_PUBLIC_URL",i.publicUrl||i.deskUrl||i.dataUrl),t("ORACLE_EXEC_URL",i.execUrl),t("MAD_DESK_URL",i.deskUrl||i.dataUrl))}}catch{}let r=process.env.ORACLE_DESK_URL||process.env.ORACLE_DATA_URL||"";return r&&(t("ORACLE_DESK_URL",r),t("ORACLE_DATA_URL",r),t("ORACLE_API_URL",r),t("ORACLE_PUBLIC_URL",r),t("MAD_DESK_URL",r)),d._result=Object.keys(e).length?e:null,d._result}try{d()}catch{}import u from"node:fs";import f from"node:path";var g="https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",P=/^[a-z0-9]+(?:[._-][a-z0-9]+)*(?:\.[a-z0-9]+(?:[._-][a-z0-9]+)*)*$/;function h(n){try{let e=u.lstatSync(n);return e.isDirectory()&&!e.isSymbolicLink()}catch{return!1}}function U(){return u.constants.O_NOFOLLOW||0}function w(n){try{let e=u.lstatSync(n);return e.isFile()&&!e.isSymbolicLink()}catch{return!1}}function A(n){if(!w(n))return null;let e=u.openSync(n,u.constants.O_RDONLY|U());try{return u.readFileSync(e,"utf8")}finally{u.closeSync(e)}}function F(n){let e=[],t=[];if(!n||typeof n!="object"||Array.isArray(n))return e.push("plugin.json must be a JSON object"),{valid:!1,errors:e,warnings:t};n.$schema!==g&&(n.$schema?e.push(`unsupported $schema: ${n.$schema} (expected ${g})`):e.push("$schema is required \u2014 must be "+g)),!n.name||typeof n.name!="string"?e.push("name is required (string)"):P.test(n.name)||e.push(`name "${n.name}" must be kebab-case dot-separated (e.g. deployment.tools)`),(n.version===void 0||n.version===null||n.version==="")&&t.push("version is missing \u2014 semantic versioning recommended"),n.description!==void 0&&typeof n.description!="string"&&t.push("description must be a string"),n.author!==void 0&&(typeof n.author!="object"||Array.isArray(n.author))&&t.push("author must be an object with optional name, email, url"),n.keywords!==void 0&&(Array.isArray(n.keywords)||t.push("keywords must be an array")),n.license!==void 0&&typeof n.license!="string"&&t.push("license must be a string");let r=new Set(["$schema","name","version","description","author","homepage","repository","license","keywords","extensions"]);for(let s of Object.keys(n))r.has(s)||t.push(`unknown field "${s}" \u2014 will be ignored (use extensions.<namespace> for client data)`);return{valid:e.length===0,errors:e,warnings:t}}function N(n){let e=f.join(n,"skills"),t=[];if(!h(e))return t;function r(s,i=""){for(let o of u.readdirSync(s,{withFileTypes:!0})){let c=f.join(s,o.name);if(o.isDirectory()){if(!h(c))continue;r(c,i?`${i}/${o.name}`:o.name)}else if(o.name.endsWith(".md")){if(!w(c))continue;let p=i?`${i}/${o.name.replace(/\.md$/,"")}`:o.name.replace(/\.md$/,"");t.push({name:p,path:c,relativePath:f.relative(e,c)})}}}return r(e),t}function I(n){let e=f.join(n,"mcp"),t=[];if(!h(e))return t;for(let r of u.readdirSync(e,{withFileTypes:!0})){if(!r.isFile()||!r.name.endsWith(".json"))continue;let s=f.join(e,r.name);if(w(s))try{let i=A(s);if(i===null)continue;let o=JSON.parse(i);t.push({name:r.name.replace(/\.json$/,""),path:s,config:o})}catch(i){t.push({name:r.name.replace(/\.json$/,""),path:s,error:`invalid JSON: ${i.message}`})}}return t}function $(n){let e=f.resolve(n);if(!h(e))return{ok:!1,error:`plugin directory not found: ${e}`};let t=f.join(e,"plugin.json");if(!u.existsSync(t))return{ok:!1,error:`missing plugin.json in ${e}`};let r;try{let c=A(t);if(c===null)return{ok:!1,error:`plugin.json must be a regular file in ${e}`};r=JSON.parse(c)}catch(c){return{ok:!1,error:`invalid plugin.json: ${c.message}`}}let s=F(r);if(!s.valid)return{ok:!1,error:"manifest validation failed",errors:s.errors};let i=N(e),o=I(e);return{ok:!0,plugin:{name:r.name,version:r.version||"0.0.0",description:r.description||"",author:r.author||{},license:r.license||"UNLICENSED",root:e,manifest:r,skills:i,mcpServers:o,warnings:[...s.warnings]}}}function E(n){let e=[];if(!h(n))return e;for(let t of u.readdirSync(n,{withFileTypes:!0})){if(!t.isDirectory())continue;let r=f.join(n,t.name),s=$(r);s.ok&&e.push(s.plugin)}return e}var M=/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/;function S(){let n=l.join(y(),"plugins");return a.existsSync(n)||a.mkdirSync(n,{recursive:!0}),n}function _(){return["oracle plugins \u2014 manage Agent Plugins (https://agent-plugins.org/)",""," oracle plugins install <path> install from a local directory"," oracle plugins install <git-url#commit> clone and verify an immutable commit"," oracle plugins list show installed plugins"," oracle plugins remove <name> uninstall a plugin"," oracle plugins scan <path> validate without installing"," oracle plugins setup interactive setup wizard","","plugins are installed to ~/.config/oracle/plugins/<name>/",`schema: ${g}`].join(`
|
|
2
|
+
`)}function L(n,{name:e,provenance:t=null}={}){let r=l.resolve(n);if(!a.existsSync(r)||!a.statSync(r).isDirectory())return process.stderr.write(`error: ${n} is not a directory
|
|
3
|
+
`),1;let s=$(r);if(!s.ok){if(process.stderr.write(`error: invalid plugin at ${r}
|
|
4
|
+
`),s.errors)for(let p of s.errors)process.stderr.write(` - ${p}
|
|
5
|
+
`);return 1}let i=s.plugin,o=e||i.name.replace(/\//g,"-"),c=l.join(S(),o);if(a.existsSync(c))return process.stderr.write(`plugin "${o}" already installed. use oracle plugins remove first.
|
|
6
|
+
`),1;if(a.cpSync(r,c,{recursive:!0}),t&&a.writeFileSync(l.join(c,".oracle-provenance.json"),`${JSON.stringify(t,null,2)}
|
|
7
|
+
`,{encoding:"utf8",mode:384,flag:"wx"}),process.stdout.write(`installed ${i.name} (v${i.version}) to ${c}
|
|
8
|
+
`),process.stdout.write(` ${i.skills.length} skills, ${i.mcpServers.length} MCP servers
|
|
9
|
+
`),i.warnings.length)for(let p of i.warnings)process.stdout.write(` warning: ${p}
|
|
10
|
+
`);return 0}function W(n){let e=String(n||"").match(/^(.*)#([0-9a-fA-F]{40})$/);if(!e||!e[1])return null;let t=e[1];if(t.startsWith("git@"))return/\s/.test(t)?null:{url:t,commit:e[2].toLowerCase()};try{let r=new URL(t);return!["https:","ssh:"].includes(r.protocol)||r.username||r.password||r.search?null:{url:r.toString(),commit:e[2].toLowerCase()}}catch{return null}}function T(n){let e=W(n);if(!e)return process.stderr.write(`error: remote plugin installs require an immutable #<40-hex-commit> pin
|
|
11
|
+
`),1;let t=l.join(S(),".tmp-"+Date.now());try{if(k("git",["clone","--no-checkout","--filter=blob:none",e.url,t],{stdio:"pipe",timeout:6e4,shell:!1}).status!==0)return process.stderr.write(`error: git clone failed (details withheld to avoid leaking source credentials)
|
|
12
|
+
`),1;let s=k("git",["-C",t,"checkout","--detach",e.commit],{stdio:"pipe",timeout:3e4,shell:!1}),i=k("git",["-C",t,"rev-parse","HEAD"],{encoding:"utf8",stdio:["ignore","pipe","pipe"],timeout:1e4,shell:!1});return s.status!==0||i.status!==0||i.stdout.trim().toLowerCase()!==e.commit?(process.stderr.write(`error: pinned plugin commit could not be verified
|
|
13
|
+
`),1):L(t,{provenance:{type:"git",source:e.url,commit:e.commit}})}finally{try{a.rmSync(t,{recursive:!0,force:!0})}catch{}}}function H(){let n=E(S());if(!n.length)return process.stdout.write(`no plugins installed
|
|
11
14
|
`),process.stdout.write(`install with: oracle plugins install <path|url>
|
|
12
|
-
`),0;process.stdout.write(`${
|
|
15
|
+
`),0;process.stdout.write(`${n.length} plugin(s) installed
|
|
13
16
|
|
|
14
|
-
`);for(let
|
|
15
|
-
`),process.stdout.write(` path: ${
|
|
16
|
-
`),
|
|
17
|
-
`),process.stdout.write(` ${
|
|
18
|
-
`),
|
|
17
|
+
`);for(let e of n){let t=l.basename(e.root);process.stdout.write(` ${e.name} (v${e.version})
|
|
18
|
+
`),process.stdout.write(` path: ${e.root}
|
|
19
|
+
`),e.description&&process.stdout.write(` desc: ${e.description}
|
|
20
|
+
`),process.stdout.write(` ${e.skills.length} skills, ${e.mcpServers.length} MCP servers
|
|
21
|
+
`),e.license!=="UNLICENSED"&&process.stdout.write(` license: ${e.license}
|
|
19
22
|
`),process.stdout.write(`
|
|
20
|
-
`)}return 0}function
|
|
21
|
-
`),1;if(!M.test(
|
|
22
|
-
`),1;let
|
|
23
|
-
`),1;let
|
|
24
|
-
`),1;if(!a.existsSync(
|
|
25
|
-
`),1;let i=a.lstatSync(
|
|
26
|
-
`),1;let o=a.realpathSync(
|
|
27
|
-
`),1):(a.rmSync(
|
|
28
|
-
`),0)}function
|
|
29
|
-
`),t.errors)for(let
|
|
30
|
-
`);return 1}let
|
|
31
|
-
`),process.stdout.write(` schema: ${
|
|
32
|
-
`),process.stdout.write(` skills: ${
|
|
33
|
-
`);for(let
|
|
34
|
-
`);process.stdout.write(` mcp servers: ${
|
|
35
|
-
`);for(let
|
|
36
|
-
`)}if(
|
|
37
|
-
`);for(let
|
|
38
|
-
`)}return 0}function
|
|
39
|
-
`)),0}var
|
|
40
|
-
`),0;if(t==="list"||t==="ls")return
|
|
41
|
-
`),1)}return t==="remove"||t==="rm"||t==="uninstall"?
|
|
23
|
+
`)}return 0}function K(n){if(!n)return process.stderr.write(`usage: oracle plugins remove <name>
|
|
24
|
+
`),1;if(!M.test(n)||l.basename(n)!==n||l.isAbsolute(n))return process.stderr.write(`invalid plugin name "${n}"
|
|
25
|
+
`),1;let e=S(),t=a.lstatSync(e);if(t.isSymbolicLink()||!t.isDirectory())return process.stderr.write(`refusing to remove plugin: plugin root is not a regular directory
|
|
26
|
+
`),1;let r=l.resolve(e,n),s=l.relative(e,r);if(!s||s===".."||s.startsWith(`..${l.sep}`)||l.isAbsolute(s))return process.stderr.write(`invalid plugin name "${n}"
|
|
27
|
+
`),1;if(!a.existsSync(r))return process.stderr.write(`plugin "${n}" not found
|
|
28
|
+
`),1;let i=a.lstatSync(r);if(i.isSymbolicLink()||!i.isDirectory())return process.stderr.write(`refusing to remove plugin "${n}": path is not a regular plugin directory
|
|
29
|
+
`),1;let o=a.realpathSync(e),c=a.realpathSync(r),p=l.relative(o,c);return!p||p===".."||p.startsWith(`..${l.sep}`)||l.isAbsolute(p)?(process.stderr.write(`refusing to remove plugin "${n}": path escapes the plugin directory
|
|
30
|
+
`),1):(a.rmSync(r,{recursive:!0,force:!0}),process.stdout.write(`removed plugin "${n}"
|
|
31
|
+
`),0)}function z(n){let e=l.resolve(n),t=$(e);if(!t.ok){if(process.stderr.write(`invalid plugin: ${t.error}
|
|
32
|
+
`),t.errors)for(let s of t.errors)process.stderr.write(` error: ${s}
|
|
33
|
+
`);return 1}let r=t.plugin;process.stdout.write(`valid plugin: ${r.name} (v${r.version})
|
|
34
|
+
`),process.stdout.write(` schema: ${r.manifest.$schema}
|
|
35
|
+
`),process.stdout.write(` skills: ${r.skills.length} found
|
|
36
|
+
`);for(let s of r.skills)process.stdout.write(` - ${s.name} (${s.relativePath})
|
|
37
|
+
`);process.stdout.write(` mcp servers: ${r.mcpServers.length} found
|
|
38
|
+
`);for(let s of r.mcpServers){let i=s.error?`ERROR: ${s.error}`:"ok";process.stdout.write(` - ${s.name}: ${i}
|
|
39
|
+
`)}if(r.warnings.length){process.stdout.write(` warnings:
|
|
40
|
+
`);for(let s of r.warnings)process.stdout.write(` - ${s}
|
|
41
|
+
`)}return 0}function J(){return process.stdout.write(["oracle plugins setup","","Agent Plugins (https://agent-plugins.org/) is an open standard for","portable AI agent tooling. Plugins ship skills and MCP servers in a","standard package format that works across compatible clients.","","To create a plugin:"," 1. Create a directory with a plugin.json manifest"," 2. Add skills as .md files in skills/"," 3. Add MCP server configs as .json files in mcp/"," 4. Validate: oracle plugins scan <dir>"," 5. Install: oracle plugins install <dir>","","To install an existing plugin:"," oracle plugins install <path> local directory"," oracle plugins install <git-url#commit> pinned git repository","",`schema: ${g}`,""].join(`
|
|
42
|
+
`)),0}var oe={name:"plugins",summary:"manage Agent Plugins (open-standard portable agent tooling)",group:"read",usage:_(),async run(n){let e=[...n.argv],t=(e[0]||"help").toLowerCase(),r=e.slice(1);if(t==="-h"||t==="--help"||t==="help")return process.stdout.write(_()+`
|
|
43
|
+
`),0;if(t==="list"||t==="ls")return H();if(t==="install"||t==="add"){let s=r[0];return s?s.startsWith("https://")||s.startsWith("ssh://")||s.startsWith("git@")?T(s):L(s):(process.stderr.write(`usage: oracle plugins install <path|url>
|
|
44
|
+
`),1)}return t==="remove"||t==="rm"||t==="uninstall"?K(r[0]):t==="scan"||t==="validate"?z(r[0]||"."):t==="setup"?J():(process.stderr.write(`oracle plugins: unknown verb '${t}'
|
|
42
45
|
${_()}
|
|
43
|
-
`),1)}};export{
|
|
46
|
+
`),1)}};export{oe as default,W as parsePinnedGitSource};
|