@oracle-agent/oracle 0.7.0 → 0.9.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.
Files changed (36) hide show
  1. package/README.md +6 -4
  2. package/SETUP.md +1 -0
  3. package/bin/desk-server.mjs +2 -2
  4. package/docs/cli.md +2 -2
  5. package/package.json +1 -1
  6. package/profiles/oracle/SOUL.md +2 -2
  7. package/protocols/templates/safe-erc20/README.md +9 -0
  8. package/public/oracle-splash/assets/llms/codex-icon.svg +1 -0
  9. package/public/oracle-splash/assets/llms/gemini-icon.svg +1 -0
  10. package/public/oracle-splash/assets/wordmarks/across-icon.webp +0 -0
  11. package/public/oracle-splash/assets/wordmarks/hop-icon.webp +0 -0
  12. package/public/oracle-splash/assets/wordmarks/markets.svg +1 -0
  13. package/public/oracle-splash/assets/wordmarks/oneinch-icon.webp +0 -0
  14. package/public/oracle-splash/assets/wordmarks/opensea-icon.svg +17 -0
  15. package/public/oracle-splash/assets/wordmarks/satflow-icon.png +0 -0
  16. package/public/oracle-splash/assets/wordmarks/stargate-icon.webp +0 -0
  17. package/public/oracle-splash/assets/wordmarks/zerox-icon.webp +0 -0
  18. package/public/oracle-splash/favicon.ico +0 -0
  19. package/public/oracle-splash/favicon.svg +6 -0
  20. package/public/oracle-splash/index.html +153 -96
  21. package/scripts/check-doc-drift.mjs +1 -0
  22. package/skills/oracle-chat/setup.SKILL.md +2 -2
  23. package/skins/oracle.yaml +45 -41
  24. package/src/cli/commands/bootstrap.mjs +87 -0
  25. package/src/cli/commands/chat.mjs +140 -25
  26. package/src/cli/commands/doctor.mjs +5 -10
  27. package/src/cli/commands/model.mjs +19 -13
  28. package/src/cli/commands/setup.mjs +11 -19
  29. package/src/cli/first-run.mjs +2 -2
  30. package/src/cli/kernel.mjs +5 -4
  31. package/src/cli/messaging-platforms.mjs +1 -1
  32. package/src/cli/oracle-harness.py +226 -70
  33. package/src/cli/runtime.mjs +351 -0
  34. package/src/data/catalog.mjs +17 -2
  35. package/src/public-api/http.mjs +16 -1
  36. package/src/public-control/runtime-config.mjs +11 -1
package/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  ```bash
6
6
  npm i -g @oracle-agent/oracle
7
+ oracle # first run sets up its isolated runtime + model
7
8
  oracle init --apply # lanes + read plane only, no keys
8
9
  oracle data serve # loopback read/prepare plane on 127.0.0.1:8787
9
10
  oracle doctor # verify
@@ -21,8 +22,9 @@ receipts or it didn't happen.
21
22
  Built for [Hermes](https://github.com/NousResearch/hermes-agent), the
22
23
  open-source agent runtime from [Nous Research](https://nousresearch.com).
23
24
 
24
- Oracle itself makes **no model calls and needs no API key**. It is the tool layer
25
- an agent drives. Bring whatever model your Hermes is already using.
25
+ Oracle itself makes **no model calls and needs no API key**. On first chat it
26
+ installs an isolated local agent runtime and opens its model/provider picker.
27
+ An existing compatible runtime is reused when available.
26
28
 
27
29
  This package is **prepare-only**: it never takes a private key and never
28
30
  broadcasts. For agentic trading with **your** keys on **your** machine, install
@@ -367,10 +369,10 @@ Oracle ships an installable 8-lane mesh for Hermes:
367
369
  oracle-init # dry run -- shows exactly what it would do
368
370
  oracle-init --apply # create profiles, install SOULs + skills, wire MCP config
369
371
  npx oracle-data # keep running — MCP tools call the local read plane on :8787
370
- oracle # plain ascii TTY on the same oracle profile as messaging
372
+ oracle # premium boxed TTY on the same oracle profile as messaging
371
373
  oracle model # choose provider/model; persona stays oracle
372
374
  oracle chain use hyperliquid
373
- oracle setup # telegram / discord / slack / other hermes messaging
375
+ oracle setup # telegram / discord / slack messaging
374
376
  ```
375
377
 
376
378
  Terminal and configured messaging channels are transports into the same Hermes
package/SETUP.md CHANGED
@@ -6,6 +6,7 @@ Prefer the root `oracle` command:
6
6
 
7
7
  ```bash
8
8
  npm i -g @oracle-agent/oracle
9
+ oracle
9
10
  oracle init --apply
10
11
  oracle doctor
11
12
  ```
@@ -10,7 +10,7 @@ import { randomBytes } from "node:crypto";
10
10
  import { verifyMessage } from "ethers";
11
11
  import { data, dataCall, dataHealth, dataCatalog, isExecutionProvider } from "../src/data/desk-data.mjs";
12
12
  import { getProvider } from "../src/data/catalog.mjs";
13
- import { csvEnv, env, envEnabled, envFlag } from "../src/oracle-env.mjs";
13
+ import { csvEnv, env, envFlag } from "../src/oracle-env.mjs";
14
14
  import {
15
15
  listTiers,
16
16
  onboardUser,
@@ -21,7 +21,7 @@ import {
21
21
 
22
22
  const HOST = env("ORACLE_DATA_HOST", "MAD_DESK_HOST", "127.0.0.1");
23
23
  const PORT = Number(env("ORACLE_DATA_PORT", "MAD_DESK_PORT", 8787));
24
- const ONBOARD_ENABLED = envEnabled("ORACLE_ONBOARD_HTTP", "MAD_ONBOARD_HTTP", false);
24
+ const ONBOARD_ENABLED = envFlag("ORACLE_ONBOARD_HTTP", "MAD_ONBOARD_HTTP", false);
25
25
  const PUBLIC_API_MODE = envFlag("ORACLE_PUBLIC_API_MODE", "MAD_PUBLIC_API_MODE", false);
26
26
  const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
27
27
  const LOOPBACK_HOSTS = new Set(["127.0.0.1", "localhost", "::1", "[::1]"]);
package/docs/cli.md CHANGED
@@ -21,13 +21,13 @@ See also [connectors.md](./connectors.md).
21
21
  ## Chat surface
22
22
 
23
23
  ```bash
24
- oracle # TTY: one lowercase oracle persona (hermes profile)
24
+ oracle # TTY: premium boxed oracle chat
25
25
  oracle --help # command help
26
26
  oracle model # interactive provider/model picker
27
27
  oracle -m <model> # launch this session on a selected model
28
28
  oracle chain list # working chains
29
29
  oracle chain use hyperliquid
30
- oracle setup # telegram/discord/slack + hermes messaging menu
30
+ oracle setup # telegram/discord/slack messaging menu
31
31
  oracle setup telegram # writes TELEGRAM_BOT_TOKEN into profile .env
32
32
  oracle setup messaging # full hermes gateway setup wizard
33
33
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oracle-agent/oracle",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Oracle: prepare-only multichain agent control plane. Policy-bounded intents for a user-signed wallet. Self-custody by default — the public package never takes your key. Built for Hermes; no model key required.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -57,8 +57,8 @@ the data plane). If it stays ambiguous, ask. Do not guess a chain.
57
57
  owner identity, the venue/destination allowlist, and the exact-grant bind.
58
58
 
59
59
  **Autonomous trading is the one opt-in.** A trigger that fires a trade with
60
- nobody watching requires `ORACLE_AUTONOMOUS=1`. Until then such an action
61
- alerts instead of executing. Say that plainly rather than pretending it fired.
60
+ nobody watching requires `ORACLE_AUTONOMOUS_TRADING=1`. Until then such an
61
+ action alerts instead of executing. Say that plainly rather than pretending it fired.
62
62
  2. **RFQ is a route source, not a permission bypass.** Compare solver/RFQ
63
63
  quotes net of gas/spread where configured, enforce expiry, and keep exact
64
64
  artifact kinds separate.
@@ -0,0 +1,9 @@
1
+ # safe-erc20
2
+
3
+ ```bash
4
+ forge install foundry-rs/forge-std --no-git
5
+ forge install OpenZeppelin/openzeppelin-contracts@v5.0.2 --no-git
6
+ forge test
7
+ ```
8
+
9
+ Libs are not vendored. Gate auto-installs when missing.
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="#fff" fill-rule="evenodd" style="flex:none;line-height:1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Codex</title><path clip-rule="evenodd" d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="296" height="298" viewBox="0 0 296 298" xmlns="http://www.w3.org/2000/svg" fill="none"><mask id="a" width="296" height="298" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#3186FF" d="M141.201 4.886c2.282-6.17 11.042-6.071 13.184.148l5.985 17.37a184.004 184.004 0 0 0 111.257 113.049l19.304 6.997c6.143 2.227 6.156 10.91.02 13.155l-19.35 7.082a184.001 184.001 0 0 0-109.495 109.385l-7.573 20.629c-2.241 6.105-10.869 6.121-13.133.025l-7.908-21.296a184 184 0 0 0-109.02-108.658l-19.698-7.239c-6.102-2.243-6.118-10.867-.025-13.132l20.083-7.467A183.998 183.998 0 0 0 133.291 26.28l7.91-21.394Z"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="163" cy="149" fill="#3689FF" rx="196" ry="159"/></g><g filter="url(#c)"><ellipse cx="33.5" cy="142.5" fill="#F6C013" rx="68.5" ry="72.5"/></g><g filter="url(#d)"><ellipse cx="19.5" cy="148.5" fill="#F6C013" rx="68.5" ry="72.5"/></g><g filter="url(#e)"><path fill="#FA4340" d="M194 10.5C172 82.5 65.5 134.333 22.5 135L144-66l50 76.5Z"/></g><g filter="url(#f)"><path fill="#FA4340" d="M190.5-12.5C168.5 59.5 62 111.333 19 112L140.5-89l50 76.5Z"/></g><g filter="url(#g)"><path fill="#14BB69" d="M194.5 279.5C172.5 207.5 66 155.667 23 155l121.5 201 50-76.5Z"/></g><g filter="url(#h)"><path fill="#14BB69" d="M196.5 320.5C174.5 248.5 68 196.667 25 196l121.5 201 50-76.5Z"/></g></g><defs><filter id="b" width="464" height="390" x="-69" y="-46" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_69_17998" stdDeviation="18"/></filter><filter id="c" width="265" height="273" x="-99" y="6" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_69_17998" stdDeviation="32"/></filter><filter id="d" width="265" height="273" x="-113" y="12" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_69_17998" stdDeviation="32"/></filter><filter id="e" width="299.5" height="329" x="-41.5" y="-130" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_69_17998" stdDeviation="32"/></filter><filter id="f" width="299.5" height="329" x="-45" y="-153" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_69_17998" stdDeviation="32"/></filter><filter id="g" width="299.5" height="329" x="-41" y="91" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_69_17998" stdDeviation="32"/></filter><filter id="h" width="299.5" height="329" x="-39" y="132" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_69_17998" stdDeviation="32"/></filter></defs></svg>
@@ -0,0 +1 @@
1
+ <svg width="240" height="228" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 228"><path fill="#fdfdfd" d="M240 221.115c-.524 1.679-3.536.705-4.715.72-14.483.134-28.986-.263-43.45.288l-1.648-1.093.924-138.355-1.254-.293C149.349 145.255 87.34 195.486 17.09 222.233c-3.635 1.381-12.15 5.121-15.472 5.499-.604.07-1.618-.129-1.618-.661v-51.119c7.811-3.974 16.122-6.995 24.057-10.815 48.345-23.245 91.356-60.33 121.551-104.425 2.088-3.05 5.009-7.064 6.658-10.248.264-.512 1.438-2.315.169-2.315H16.961V.745L17.71 0h221.54l.749.745z"/></svg>
@@ -0,0 +1,17 @@
1
+ <svg width="360" height="360" viewBox="0 0 360 360" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_2_57)">
3
+ <g clip-path="url(#clip1_2_57)">
4
+ <path d="M252.072 212.292C245.826 220.662 232.686 234.558 225.378 234.558H191.412V212.274H218.466C222.336 212.274 226.026 210.708 228.69 207.954C242.586 193.554 250.614 176.418 250.614 158.04C250.614 126.684 227.178 98.964 191.394 82.26V67.284C191.394 60.84 186.174 55.62 179.73 55.62C173.286 55.62 168.066 60.84 168.066 67.284V73.494C158.04 70.56 147.42 68.328 136.332 67.05C154.692 86.994 165.906 113.67 165.906 142.92C165.906 169.146 156.942 193.23 141.876 212.31H168.066V234.63H129.726C124.542 234.63 120.33 230.436 120.33 225.234V215.478C120.33 213.768 118.944 212.364 117.216 212.364H66.672C65.682 212.364 64.836 213.174 64.836 214.164C64.8 254.088 96.39 284.058 134.172 284.058H240.822C266.382 284.058 277.812 251.298 292.788 230.454C298.602 222.39 312.552 215.91 316.782 214.11C317.556 213.786 318.006 213.066 318.006 212.22V199.26C318.006 197.946 316.71 196.956 315.432 197.316C315.432 197.316 253.782 211.482 253.062 211.68C252.342 211.896 252.072 212.31 252.072 212.31V212.292Z" fill="white"/>
5
+ <path d="M146.16 142.83C146.16 122.724 139.266 104.22 127.746 89.586L69.732 189.972H132.138C141.012 176.436 146.178 160.236 146.178 142.848L146.16 142.83Z" fill="white"/>
6
+ <path d="M181.566 -5.19844e-06C80.91 -0.828005 -0.82799 80.91 1.00604e-05 181.566C0.84601 279.306 80.694 359.172 178.416 359.982C279.072 360.846 360.846 279.072 359.982 178.416C359.172 80.712 279.306 0.845995 181.566 -5.19844e-06ZM127.746 89.586C139.266 104.22 146.16 122.742 146.16 142.83C146.16 160.236 140.994 176.436 132.12 189.954H69.714L127.728 89.568L127.746 89.586ZM318.006 199.242V212.202C318.006 213.048 317.556 213.768 316.782 214.092C312.552 215.892 298.602 222.372 292.788 230.436C277.812 251.28 266.382 284.04 240.822 284.04H134.172C96.408 284.04 64.818 254.07 64.836 214.146C64.836 213.156 65.682 212.346 66.672 212.346H117.216C118.962 212.346 120.33 213.75 120.33 215.46V225.216C120.33 230.4 124.524 234.612 129.726 234.612H168.066V212.292H141.876C156.942 193.212 165.906 169.128 165.906 142.902C165.906 113.652 154.692 86.976 136.332 67.032C147.438 68.328 158.058 70.542 168.066 73.476V67.266C168.066 60.822 173.286 55.602 179.73 55.602C186.174 55.602 191.394 60.822 191.394 67.266V82.242C227.178 98.946 250.614 126.666 250.614 158.022C250.614 176.418 242.568 193.536 228.69 207.936C226.026 210.69 222.336 212.256 218.466 212.256H191.412V234.54H225.378C232.704 234.54 245.844 220.644 252.072 212.274C252.072 212.274 252.342 211.86 253.062 211.644C253.782 211.428 315.432 197.28 315.432 197.28C316.728 196.92 318.006 197.91 318.006 199.224V199.242Z" fill="#0086FF"/>
7
+ </g>
8
+ </g>
9
+ <defs>
10
+ <clipPath id="clip0_2_57">
11
+ <rect width="360" height="360" fill="white"/>
12
+ </clipPath>
13
+ <clipPath id="clip1_2_57">
14
+ <rect width="360" height="360" fill="white"/>
15
+ </clipPath>
16
+ </defs>
17
+ </svg>
Binary file
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <rect width="64" height="64" rx="14" fill="#0B1018"/>
3
+ <circle cx="32" cy="32" r="21" fill="none" stroke="#B8F0FF" stroke-width="4"/>
4
+ <circle cx="32" cy="32" r="5" fill="#B8F0FF"/>
5
+ <path d="M12 32h40M32 12v40" stroke="#6FA8FF" stroke-width="2" stroke-linecap="round" opacity=".75"/>
6
+ </svg>