@oracle-agent/oracle 0.35.35 → 0.35.37

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 (49) hide show
  1. package/README.md +34 -1
  2. package/dist/address-book.mjs +2 -2
  3. package/dist/agent-sessions.mjs +71 -8
  4. package/dist/assets/skills/oracle-desk-product/SKILL.md +1 -1
  5. package/dist/bin/desk-server.mjs +36 -36
  6. package/dist/bin/oracle-data-mcp.mjs +17 -17
  7. package/dist/bin/oracle-public-server.mjs +5 -5
  8. package/dist/bin/oracle-route.mjs +11 -11
  9. package/dist/bin/oracle.mjs +8 -6
  10. package/dist/cli/commands/agent-session.mjs +73 -10
  11. package/dist/cli/commands/airdrop.mjs +16 -0
  12. package/dist/cli/commands/chat.mjs +242 -225
  13. package/dist/cli/commands/doctor.mjs +3 -3
  14. package/dist/cli/commands/eval.mjs +162 -147
  15. package/dist/cli/commands/extension-policy.mjs +3 -3
  16. package/dist/cli/commands/farm.mjs +9 -9
  17. package/dist/cli/commands/mint.mjs +22 -0
  18. package/dist/cli/commands/model.mjs +246 -229
  19. package/dist/cli/commands/quickstart.mjs +4 -4
  20. package/dist/cli/commands/session-vault.mjs +1 -1
  21. package/dist/cli/commands/sign.mjs +4 -4
  22. package/dist/cli/commands/signer.mjs +14 -14
  23. package/dist/cli/commands/swap.mjs +24 -24
  24. package/dist/cli/commands/venues.mjs +2 -2
  25. package/dist/control/receipt-lineage.mjs +1 -0
  26. package/dist/data/desk-data.mjs +34 -34
  27. package/dist/data/providers/farming.mjs +2 -2
  28. package/dist/data/providers/lp-destination-discovery.mjs +4 -4
  29. package/dist/index.mjs +53 -52
  30. package/dist/local-signer/anvil-attestation-worker.mjs +1 -1
  31. package/dist/local-signer/index.mjs +2 -2
  32. package/dist/local-signer/runtime.mjs +8 -8
  33. package/dist/router/index.mjs +3 -3
  34. package/dist/router/prepare-bridge.mjs +2 -2
  35. package/dist/router/prepare-route.mjs +4 -0
  36. package/dist/teams/index.mjs +5 -3
  37. package/dist/tui/standalone-client.mjs +111 -96
  38. package/package.json +3 -1
  39. package/public/eval-report.json +2 -2
  40. package/public/oracle-splash/assets/desktop-app.jpg +0 -0
  41. package/public/oracle-splash/assets/hero/agent-session-poster.jpg +0 -0
  42. package/public/oracle-splash/assets/hero/agent-session.mp4 +0 -0
  43. package/public/oracle-splash/assets/hero/agent-session.webm +0 -0
  44. package/public/oracle-splash/assets/oracle-cli-v03535-poster.jpg +0 -0
  45. package/public/oracle-splash/assets/oracle-cli-v03535.gif +0 -0
  46. package/public/oracle-splash/assets/protocol-build-time.jpg +0 -0
  47. package/public/oracle-splash/downloads/index.html +2 -2
  48. package/public/oracle-splash/index.html +129 -51
  49. package/server.json +2 -2
package/README.md CHANGED
@@ -295,7 +295,7 @@ known answer. This matters: the canonical QuoterV2 address also has bytecode on
295
295
  Base, but does not price that chain's pairs. A codesize check would have
296
296
  allowlisted the wrong contract.
297
297
 
298
- **134 provider modules** and **593 operations** in the read/quote catalog, covering **221 unique
298
+ **134 provider modules** and **594 operations** in the read/quote catalog, covering **221 unique
299
299
  protocols/venues** across EVM, Solana, Bitcoin, and Canton (115 EVM + cross-chain, 98
300
300
  Solana venues backed by 101 verified Jupiter program IDs, 6 Bitcoin surfaces).
301
301
  One module can cover many protocols: the Jupiter module alone routes 98 Solana
@@ -525,6 +525,39 @@ skills, sessions, and a separate model choice per specialist — is profile
525
525
  machinery from a multi-profile harness such as Hermes. Use Oracle from any
526
526
  agent, or on its own; add a profile mesh only if you want that topology.
527
527
 
528
+ ## Teams
529
+
530
+ A team is a compiled, hash-pinned pipeline of specialist agents that turns public
531
+ evidence into an operator handoff. It never signs and never broadcasts.
532
+
533
+ ```js
534
+ import { TEAM_TEMPLATES, compileTeamDefinition } from "@oracle-agent/oracle";
535
+
536
+ const compiled = compileTeamDefinition(TEAM_TEMPLATES[0], { nowMs: Date.now() });
537
+ compiled.team.agents.map((a) => a.role);
538
+ // scanner -> sentiment -> strategy -> risk -> executor
539
+ ```
540
+
541
+ Seven templates ship in the box (`hyperliquid-alpha`, `perp-market-breadth`,
542
+ `perp-technical-strategy`, `basket-relative-value`, `wallet-watch`,
543
+ `evm-launch-radar`, `nft-mint-guard`) across six modes: `draft`, `shadow`,
544
+ `confirm`, `armed`, `autonomous`, `halted`.
545
+
546
+ The shape is enforced at compile time. A definition is refused if the executor is
547
+ not the terminal agent, if any non-executor holds executor tools, if the policy
548
+ omits wallet confirmation or a kill switch, if the chain allowlist is unbounded,
549
+ if the policy has already expired, or if `autonomous` is requested without an
550
+ explicit opt-in. Secret-like values and DAG cycles are rejected outright.
551
+
552
+ Compilation is deterministic: key insertion order does not change the `teamHash`,
553
+ so the same team is the same identity across machines. Every handoff reports
554
+ `executionAllowed: false`, `backendSigner: false`, `signingReady: false`, and
555
+ `broadcastReady: false`.
556
+
557
+ Teams are a library surface. They run in the **Oracle desktop app** — the CLI
558
+ stays a single-agent shell. Drive them from the desktop, your own harness, or a
559
+ service. Full reference in [`docs/teams.md`](docs/teams.md).
560
+
528
561
  ## Best-execution routing
529
562
 
530
563
  The highest quote is not the cheapest swap. Oracle ranks on **net received after
@@ -1,2 +1,2 @@
1
- import c from"node:fs";import l from"node:path";import{homedir as m}from"node:os";import{join as p}from"node:path";var k=process.env.ORACLE_PUBLIC_DESKTOP==="1",S=k?process.env.ORACLE_CONFIG_DIR||p(m(),".config","oracle"):p(m(),".config","oracle"),z=k?S:p(m(),".config","mad-desk");function A(e,r,t=""){let o=process.env[e];if(o!=null&&String(o).trim()!=="")return o;let s=r?process.env[r]:void 0;return s!=null&&String(s).trim()!==""?s:t}var E=/^0x[0-9a-fA-F]{40}$/,x=new Set(["privatekey","private_key","secret","seed","mnemonic","passphrase","signature","keystore"]),D=["privatekey","privkey","secretkey","secret","seedphrase","seed","mnemonic","passphrase","password","keystore","keymaterial","signature","wif","xprv","xpriv","apikey","bearer","credential"],I=[/\b[5KL][1-9A-HJ-NP-Za-km-z]{50,51}\b/,/\bxprv[0-9A-Za-z]{50,}\b/,/\b(?:[a-z]{3,8}\s+){11,}[a-z]{3,8}\b/i],L=/^\s*(?:0x)?[0-9a-fA-F]{64}\s*$/;function y(e){return String(e).toLowerCase().replace(/[^a-z0-9]/g,"")}function R(e,r){let t=y(e);if(x.has(String(e).toLowerCase())||D.some(o=>t.includes(o)))throw new Error(`address-book: ${r} is forbidden; the book stores labels, never key material`)}function N(e,r){if(typeof e=="string"&&(I.some(t=>t.test(e))||L.test(e)))throw new Error(`address-book: ${r} looks like key material; the book stores labels, never key material`)}function C(){let e=A("ORACLE_ADDRESS_BOOK","MAD_ADDRESS_BOOK","");if(e)return l.resolve(e);let r=A("ORACLE_CONFIG_DIR","MAD_CONFIG_DIR",S);return l.join(r,"address-book.json")}function b(e,r="field"){if(Array.isArray(e)){e.forEach((t,o)=>b(t,`${r}[${o}]`));return}if(!e||typeof e!="object"){N(e,r);return}for(let[t,o]of Object.entries(e))R(t,t),b(o,t)}function h(e){let r=String(e||"").trim();if(!E.test(r))throw new Error("address-book: address must be 0x + 40 hex characters");return r.toLowerCase()}function a(e,r){return e==null||e===""?null:String(e).slice(0,r)}function g(){return{version:1,updatedAt:null,entries:[]}}function _(e){return{address:String(e.address).toLowerCase(),label:a(e.label,80)||"unknown",who:a(e.who,120),role:a(e.role,40),chainIds:Array.isArray(e.chainIds)?e.chainIds.map(Number).filter(Number.isFinite):[],notes:a(e.notes,500),source:a(e.source,80),firstSeenAt:e.firstSeenAt||null,lastSeenAt:e.lastSeenAt||null}}function d(){try{let e=JSON.parse(c.readFileSync(C(),"utf8"));if(!e||typeof e!="object")return g();let r=Array.isArray(e.entries)?e.entries:[];return{version:1,updatedAt:e.updatedAt||null,entries:r.filter(t=>t&&typeof t=="object"&&E.test(String(t.address||""))).map(_)}}catch{return g()}}function O(e){let r=C();c.mkdirSync(l.dirname(r),{recursive:!0,mode:448});let t={...e,version:1,updatedAt:new Date().toISOString()},o=l.join(l.dirname(r),`.address-book.${process.pid}.tmp`);c.writeFileSync(o,`${JSON.stringify(t,null,2)}
2
- `,{mode:384}),c.renameSync(o,r);try{c.chmodSync(r,384)}catch{}return t}function G(e={}){let r=d(),t=r.entries;if(e.role&&(t=t.filter(o=>o.role===String(e.role))),e.who){let o=String(e.who).toLowerCase();t=t.filter(s=>(s.who||"").toLowerCase().includes(o)||(s.label||"").toLowerCase().includes(o))}if(e.q){let o=String(e.q).toLowerCase();t=t.filter(s=>s.address.includes(o)||(s.label||"").toLowerCase().includes(o)||(s.who||"").toLowerCase().includes(o)||(s.notes||"").toLowerCase().includes(o))}return{updatedAt:r.updatedAt,count:t.length,entries:t}}function q(e){let r=h(e),t=d().entries.filter(o=>o.address===r);return{address:r,found:t.length>0,entries:t}}function T(e={}){b(e);let r=h(e.address),t=a(e.label??e.role,80)||"wallet",o=new Date().toISOString(),s=d(),i=s.entries.findIndex(n=>n.address===r&&n.label===t),u=_({address:r,label:t,who:e.who,role:e.role,chainIds:e.chainIds,notes:e.notes,source:e.source||"agent",firstSeenAt:i>=0&&s.entries[i].firstSeenAt||o,lastSeenAt:o});i>=0?s.entries[i]=u:s.entries.push(u);let w=n=>n==="agent"?0:n==="owner"?1:2;s.entries.sort((n,f)=>w(n.role)-w(f.role)||n.label.localeCompare(f.label)||n.address.localeCompare(f.address));let v=O(s);return{ok:!0,entry:u,count:v.entries.length}}function Y(e,r=null){let t=h(e),o=d(),s=o.entries.length;return o.entries=o.entries.filter(i=>i.address!==t?!0:r==null?!1:i.label!==String(r)),O(o),{ok:!0,removed:s-o.entries.length,count:o.entries.length}}export{C as addressBookPath,Y as forgetAddress,G as listAddresses,q as lookupAddress,d as readAddressBook,T as rememberAddress};
1
+ import c from"node:fs";import l from"node:path";import{homedir as m}from"node:os";import{join as p}from"node:path";var k=process.env.ORACLE_PUBLIC_DESKTOP==="1",S=k?process.env.ORACLE_CONFIG_DIR||p(m(),".config","oracle"):p(m(),".config","oracle"),z=k?S:p(m(),".config","mad-desk");function A(e,r,t=""){let o=process.env[e];if(o!=null&&String(o).trim()!=="")return o;let n=r?process.env[r]:void 0;return n!=null&&String(n).trim()!==""?n:t}var E=/^0x[0-9a-fA-F]{40}$/,x=new Set(["privatekey","private_key","secret","seed","mnemonic","passphrase","signature","keystore"]),D=["privatekey","privkey","secretkey","secret","seedphrase","seed","mnemonic","passphrase","password","keystore","keymaterial","signature","wif","xprv","xpriv","apikey","bearer","credential"],I=[/\b[5KL][1-9A-HJ-NP-Za-km-z]{50,51}\b/,/\bxprv[0-9A-Za-z]{50,}\b/,/\b(?:[a-z]{3,8}\s+){11,}[a-z]{3,8}\b/i],L=/^\s*(?:0x)?[0-9a-fA-F]{64}\s*$/;function y(e){return String(e).toLowerCase().replace(/[^a-z0-9]/g,"")}function R(e,r){let t=y(e);if(x.has(String(e).toLowerCase())||D.some(o=>t.includes(o)))throw new Error(`address-book: ${r} is forbidden; the book stores labels, never key material`)}function N(e,r){if(typeof e=="string"&&(I.some(t=>t.test(e))||L.test(e)))throw new Error(`address-book: ${r} looks like key material; the book stores labels, never key material`)}function v(){let e=A("ORACLE_ADDRESS_BOOK","MAD_ADDRESS_BOOK","");if(e)return l.resolve(e);let r=A("ORACLE_CONFIG_DIR","MAD_CONFIG_DIR",S);return l.join(r,"address-book.json")}function b(e,r="field"){if(Array.isArray(e)){e.forEach((t,o)=>b(t,`${r}[${o}]`));return}if(!e||typeof e!="object"){N(e,r);return}for(let[t,o]of Object.entries(e))R(t,t),b(o,t)}function h(e){let r=String(e||"").trim();if(!E.test(r))throw new Error("address-book: address must be 0x + 40 hex characters");return r.toLowerCase()}function a(e,r){return e==null||e===""?null:String(e).slice(0,r)}function g(){return{version:1,updatedAt:null,entries:[]}}function C(e){return{address:String(e.address).toLowerCase(),label:a(e.label,80)||"unknown",who:a(e.who,120),role:a(e.role,40),chainIds:Array.isArray(e.chainIds)?e.chainIds.map(Number).filter(Number.isFinite):[],notes:a(e.notes,500),source:a(e.source,80),firstSeenAt:e.firstSeenAt||null,lastSeenAt:e.lastSeenAt||null}}function d(){try{let e=JSON.parse(c.readFileSync(v(),"utf8"));if(!e||typeof e!="object")return g();let r=Array.isArray(e.entries)?e.entries:[];return{version:1,updatedAt:e.updatedAt||null,entries:r.filter(t=>t&&typeof t=="object"&&E.test(String(t.address||""))).map(C)}}catch{return g()}}function _(e){let r=v();c.mkdirSync(l.dirname(r),{recursive:!0,mode:448});let t={...e,version:1,updatedAt:new Date().toISOString()},o=l.join(l.dirname(r),`.address-book.${process.pid}.tmp`);c.writeFileSync(o,`${JSON.stringify(t,null,2)}
2
+ `,{mode:384}),c.renameSync(o,r);try{c.chmodSync(r,384)}catch{}return t}function G(e={}){let r=d(),t=r.entries;if(e.role&&(t=t.filter(o=>o.role===String(e.role))),e.who){let o=String(e.who).toLowerCase();t=t.filter(n=>(n.who||"").toLowerCase().includes(o)||(n.label||"").toLowerCase().includes(o))}if(e.q){let o=String(e.q).toLowerCase();t=t.filter(n=>n.address.includes(o)||(n.label||"").toLowerCase().includes(o)||(n.who||"").toLowerCase().includes(o)||(n.notes||"").toLowerCase().includes(o))}return{updatedAt:r.updatedAt,count:t.length,entries:t}}function q(e){let r=h(e),t=d().entries.filter(o=>o.address===r);return{address:r,found:t.length>0,entries:t}}function T(e={}){b(e);let r=h(e.address),t=a(e.label??e.role,80)||"wallet",o=new Date().toISOString(),n=d(),i=n.entries.findIndex(s=>s.address===r&&s.label===t),u=C({address:r,label:t,who:e.who,role:e.role,chainIds:e.chainIds,notes:e.notes,source:e.source||"agent",firstSeenAt:i>=0&&n.entries[i].firstSeenAt||o,lastSeenAt:o});i>=0?n.entries[i]=u:n.entries.push(u);let w=s=>s==="agent"?0:s==="owner"?1:2;n.entries.sort((s,f)=>w(s.role)-w(f.role)||s.label.localeCompare(f.label)||s.address.localeCompare(f.address));let O=_(n);return{ok:!0,entry:u,count:O.entries.length}}function Y(e,r=null){let t=h(e),o=d(),n=o.entries.length;return o.entries=o.entries.filter(i=>i.address!==t?!0:r==null?!1:i.label!==String(r)),_(o),{ok:!0,removed:n-o.entries.length,count:o.entries.length}}export{v as addressBookPath,Y as forgetAddress,G as listAddresses,q as lookupAddress,d as readAddressBook,T as rememberAddress};