@oracle-agent/oracle 0.13.0 → 0.13.1

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 (366) hide show
  1. package/README.md +525 -13
  2. package/SECURITY.md +114 -0
  3. package/SETUP.md +319 -0
  4. package/artifacts/inscription/oracle-was-here-preview.png +0 -0
  5. package/artifacts/inscription/oracle-was-here.svg +1 -0
  6. package/artifacts/specialist-packs/oracle-full-crypto.json +298 -0
  7. package/dist/action-receipts.mjs +1 -0
  8. package/dist/action-semantics.mjs +1 -0
  9. package/dist/address-book.mjs +2 -0
  10. package/dist/assets/profiles/_template/SOUL.md +54 -0
  11. package/dist/assets/profiles/_template/profile.json +22 -0
  12. package/dist/assets/profiles/bitcoin-agent/SOUL.md +31 -0
  13. package/dist/assets/profiles/bitcoin-agent/profile.json +32 -0
  14. package/dist/assets/profiles/hyperliquid-agent/SOUL.md +34 -0
  15. package/dist/assets/profiles/hyperliquid-agent/profile.json +38 -0
  16. package/dist/assets/profiles/oracle/SOUL.md +134 -0
  17. package/dist/assets/profiles/oracle/profile.json +40 -0
  18. package/dist/assets/profiles/polymarket-agent/SOUL.md +35 -0
  19. package/dist/assets/profiles/polymarket-agent/profile.json +34 -0
  20. package/dist/assets/profiles/profile.schema.json +90 -0
  21. package/dist/assets/profiles/protocol-builder/SOUL.md +57 -0
  22. package/dist/assets/profiles/protocol-builder/profile.json +39 -0
  23. package/dist/assets/profiles/robinhood-agent/SOUL.md +53 -0
  24. package/dist/assets/profiles/robinhood-agent/profile.json +41 -0
  25. package/dist/assets/profiles/solana-agent/SOUL.md +37 -0
  26. package/dist/assets/profiles/solana-agent/profile.json +38 -0
  27. package/dist/assets/profiles/stable-agent/SOUL.md +43 -0
  28. package/dist/assets/profiles/stable-agent/profile.json +38 -0
  29. package/dist/assets/skills/balance/SKILL.md +176 -0
  30. package/dist/assets/skills/bitcoin-l1.md +33 -0
  31. package/dist/assets/skills/chain-defi-ecosystem-profiling.md +27 -0
  32. package/dist/assets/skills/evm-contract-research.md +27 -0
  33. package/dist/assets/skills/hyperliquid.md +26 -0
  34. package/dist/assets/skills/multichain-exec-desk.md +33 -0
  35. package/dist/assets/skills/oracle-action-semantics/SKILL.md +40 -0
  36. package/dist/assets/skills/oracle-best-execution/SKILL.md +127 -0
  37. package/dist/assets/skills/oracle-best-execution.md +27 -0
  38. package/dist/assets/skills/oracle-bitcoin/SKILL.md +53 -0
  39. package/dist/assets/skills/oracle-chain-graphs-telegram-cards/SKILL.md +59 -0
  40. package/dist/assets/skills/oracle-chat/SKILL.md +61 -0
  41. package/dist/assets/skills/oracle-chat/chain.SKILL.md +31 -0
  42. package/dist/assets/skills/oracle-chat/setup.SKILL.md +37 -0
  43. package/dist/assets/skills/oracle-circuit-breaker/SKILL.md +51 -0
  44. package/dist/assets/skills/oracle-contract-research/SKILL.md +55 -0
  45. package/dist/assets/skills/oracle-desk/SKILL.md +58 -0
  46. package/dist/assets/skills/oracle-desk.md +27 -0
  47. package/dist/assets/skills/oracle-dex-launch/SKILL.md +38 -0
  48. package/dist/assets/skills/oracle-equities/SKILL.md +62 -0
  49. package/dist/assets/skills/oracle-grants/SKILL.md +69 -0
  50. package/dist/assets/skills/oracle-hypercore-staking/SKILL.md +57 -0
  51. package/dist/assets/skills/oracle-hyperliquid/SKILL.md +56 -0
  52. package/dist/assets/skills/oracle-meme-token-sniper/SKILL.md +73 -0
  53. package/dist/assets/skills/oracle-multichain-nft-launch/SKILL.md +338 -0
  54. package/dist/assets/skills/oracle-multichain-token-launch/SKILL.md +300 -0
  55. package/dist/assets/skills/oracle-nft-gacha-launch/SKILL.md +48 -0
  56. package/dist/assets/skills/oracle-nft-mint-gas-war/SKILL.md +63 -0
  57. package/dist/assets/skills/oracle-polymarket/SKILL.md +60 -0
  58. package/dist/assets/skills/oracle-protocol-builder/SKILL.md +59 -0
  59. package/dist/assets/skills/oracle-protocol-security/SKILL.md +60 -0
  60. package/dist/assets/skills/oracle-public-product/SKILL.md +44 -0
  61. package/dist/assets/skills/oracle-receipts/SKILL.md +52 -0
  62. package/dist/assets/skills/oracle-receipts.md +29 -0
  63. package/dist/assets/skills/oracle-rfq-tokenized-assets/SKILL.md +69 -0
  64. package/dist/assets/skills/oracle-smart-wallet-scanner/SKILL.md +49 -0
  65. package/dist/assets/skills/oracle-solana/SKILL.md +65 -0
  66. package/dist/assets/skills/oracle-solana-nft/SKILL.md +54 -0
  67. package/dist/assets/skills/oracle-token-research/SKILL.md +67 -0
  68. package/dist/assets/skills/solana.md +22 -0
  69. package/dist/bin/desk-server.mjs +59 -0
  70. package/dist/bin/oracle-data-mcp.mjs +8 -0
  71. package/dist/bin/oracle-equities.mjs +20 -0
  72. package/dist/bin/oracle-init.mjs +24 -0
  73. package/dist/bin/oracle-public-server.mjs +5 -0
  74. package/dist/bin/oracle-route.mjs +22 -0
  75. package/dist/bin/oracle-scan.mjs +18 -0
  76. package/dist/bin/oracle-upgrade.mjs +21 -0
  77. package/dist/bin/oracle.mjs +76 -0
  78. package/dist/chains.mjs +1 -0
  79. package/dist/cli/commands/auth.mjs +16 -0
  80. package/dist/cli/commands/bootstrap.mjs +18 -0
  81. package/dist/cli/commands/chain.mjs +21 -0
  82. package/dist/cli/commands/chat.mjs +45 -0
  83. package/dist/cli/commands/credential.mjs +1 -0
  84. package/dist/cli/commands/data-mcp.mjs +2 -0
  85. package/dist/cli/commands/data.mjs +12 -0
  86. package/dist/cli/commands/doctor.mjs +5 -0
  87. package/dist/cli/commands/equities.mjs +15 -0
  88. package/dist/cli/commands/farm.mjs +59 -0
  89. package/dist/cli/commands/follow.mjs +28 -0
  90. package/dist/cli/commands/gate.mjs +13 -0
  91. package/dist/cli/commands/harness.mjs +15 -0
  92. package/dist/cli/commands/help.mjs +1 -0
  93. package/dist/cli/commands/init.mjs +3 -0
  94. package/dist/cli/commands/mcp.mjs +60 -0
  95. package/dist/cli/commands/model.mjs +54 -0
  96. package/dist/cli/commands/plugins.mjs +38 -0
  97. package/dist/cli/commands/prepare.mjs +2 -0
  98. package/dist/cli/commands/public.mjs +3 -0
  99. package/dist/cli/commands/resolve.mjs +23 -0
  100. package/dist/cli/commands/route.mjs +2 -0
  101. package/dist/cli/commands/runner.mjs +1 -0
  102. package/dist/cli/commands/scan.mjs +2 -0
  103. package/dist/cli/commands/setup.mjs +34 -0
  104. package/dist/cli/commands/sign.mjs +21 -0
  105. package/dist/cli/commands/signer.mjs +1 -0
  106. package/dist/cli/commands/swap.mjs +36 -0
  107. package/dist/cli/commands/upgrade.mjs +2 -0
  108. package/dist/cli/commands/vault.mjs +1 -0
  109. package/dist/cli/commands/version.mjs +2 -0
  110. package/dist/data/desk-data.mjs +55 -0
  111. package/dist/data/names.mjs +2 -0
  112. package/dist/data/providers/farming.mjs +2 -0
  113. package/dist/equities/index.mjs +1 -0
  114. package/dist/index.mjs +60 -0
  115. package/dist/nft-gas-war-guard.mjs +1 -0
  116. package/dist/onboarding/harness-configs.mjs +4 -0
  117. package/dist/portfolio-risk.mjs +1 -0
  118. package/dist/prepare-envelope.mjs +1 -0
  119. package/dist/public-api/agent-grants.mjs +3 -0
  120. package/dist/public-control/policy-schema.mjs +1 -0
  121. package/dist/router/index.mjs +2 -0
  122. package/dist/scanner/index.mjs +4 -0
  123. package/dist/signals/index.mjs +1 -0
  124. package/dist/watch-preferences.mjs +1 -0
  125. package/package.json +66 -16
  126. package/public/agent-connect/app.js +84 -0
  127. package/public/agent-connect/index.html +83 -0
  128. package/public/agent-connect/styles.css +70 -0
  129. package/public/index.html +12 -0
  130. package/public/oracle-console/app.js +272 -0
  131. package/public/oracle-console/bitcoin-wallets.js +206 -0
  132. package/public/oracle-console/index.html +91 -0
  133. package/public/oracle-console/styles.css +239 -0
  134. package/public/oracle-splash/_variants/ice.html +2073 -0
  135. package/public/oracle-splash/_variants/ivory.html +2075 -0
  136. package/public/oracle-splash/assets/agents/claude.png +0 -0
  137. package/public/oracle-splash/assets/agents/codex.png +0 -0
  138. package/public/oracle-splash/assets/cli-chain-hyperliquid.jpg +0 -0
  139. package/public/oracle-splash/assets/desktop-app.jpg +0 -0
  140. package/public/oracle-splash/assets/hero/cli-session-poster.jpg +0 -0
  141. package/public/oracle-splash/assets/hero/cli-session.mp4 +0 -0
  142. package/public/oracle-splash/assets/hero/cli-session.webm +0 -0
  143. package/public/oracle-splash/assets/hero/orb-poster.jpg +0 -0
  144. package/public/oracle-splash/assets/hero/orb.avif +0 -0
  145. package/public/oracle-splash/assets/hero/orb.webm +0 -0
  146. package/public/oracle-splash/assets/hero/risk-session-poster.jpg +0 -0
  147. package/public/oracle-splash/assets/hero/risk-session.mp4 +0 -0
  148. package/public/oracle-splash/assets/hero/risk-session.webm +0 -0
  149. package/public/oracle-splash/assets/hero/route-session-poster.jpg +0 -0
  150. package/public/oracle-splash/assets/hero/route-session.mp4 +0 -0
  151. package/public/oracle-splash/assets/hero/route-session.webm +0 -0
  152. package/public/oracle-splash/assets/llms/claude.svg +1 -0
  153. package/public/oracle-splash/assets/llms/codex-icon.svg +1 -0
  154. package/public/oracle-splash/assets/llms/codex.svg +1 -0
  155. package/public/oracle-splash/assets/llms/cursor-icon.svg +12 -0
  156. package/public/oracle-splash/assets/llms/cursor.svg +17 -0
  157. package/public/oracle-splash/assets/llms/deepseek.svg +1 -0
  158. package/public/oracle-splash/assets/llms/gemini-icon.svg +1 -0
  159. package/public/oracle-splash/assets/llms/gemini.svg +1 -0
  160. package/public/oracle-splash/assets/llms/grok.svg +8 -0
  161. package/public/oracle-splash/assets/llms/hermes.png +0 -0
  162. package/public/oracle-splash/assets/llms/kimi-icon.svg +1 -0
  163. package/public/oracle-splash/assets/llms/kimi.svg +1 -0
  164. package/public/oracle-splash/assets/llms/manus.svg +18 -0
  165. package/public/oracle-splash/assets/llms/openclaw.svg +22 -0
  166. package/public/oracle-splash/assets/llms/perplexity.svg +1 -0
  167. package/public/oracle-splash/assets/llms/qwen.svg +1 -0
  168. package/public/oracle-splash/assets/llms/windsurf.svg +1 -0
  169. package/public/oracle-splash/assets/protocols/abcdex.png +0 -0
  170. package/public/oracle-splash/assets/protocols/across.png +0 -0
  171. package/public/oracle-splash/assets/protocols/aerodrome.png +0 -0
  172. package/public/oracle-splash/assets/protocols/balancer.png +0 -0
  173. package/public/oracle-splash/assets/protocols/cowswap.png +0 -0
  174. package/public/oracle-splash/assets/protocols/curve.png +0 -0
  175. package/public/oracle-splash/assets/protocols/dreamcash.png +0 -0
  176. package/public/oracle-splash/assets/protocols/felix.png +0 -0
  177. package/public/oracle-splash/assets/protocols/gmx.png +0 -0
  178. package/public/oracle-splash/assets/protocols/hyena.png +0 -0
  179. package/public/oracle-splash/assets/protocols/hyperbeat.png +0 -0
  180. package/public/oracle-splash/assets/protocols/hyperliquid.png +0 -0
  181. package/public/oracle-splash/assets/protocols/hyperswap.png +0 -0
  182. package/public/oracle-splash/assets/protocols/jupiter.png +0 -0
  183. package/public/oracle-splash/assets/protocols/kinetiq.png +0 -0
  184. package/public/oracle-splash/assets/protocols/lfj.png +0 -0
  185. package/public/oracle-splash/assets/protocols/lifi.png +0 -0
  186. package/public/oracle-splash/assets/protocols/magic-eden.png +0 -0
  187. package/public/oracle-splash/assets/protocols/morpho.png +0 -0
  188. package/public/oracle-splash/assets/protocols/odos.png +0 -0
  189. package/public/oracle-splash/assets/protocols/oneinch.png +0 -0
  190. package/public/oracle-splash/assets/protocols/opensea.png +0 -0
  191. package/public/oracle-splash/assets/protocols/pancakeswap.png +0 -0
  192. package/public/oracle-splash/assets/protocols/paragon.png +0 -0
  193. package/public/oracle-splash/assets/protocols/paraswap.png +0 -0
  194. package/public/oracle-splash/assets/protocols/pendle.png +0 -0
  195. package/public/oracle-splash/assets/protocols/polymarket.png +0 -0
  196. package/public/oracle-splash/assets/protocols/quickswap.png +0 -0
  197. package/public/oracle-splash/assets/protocols/relay.png +0 -0
  198. package/public/oracle-splash/assets/protocols/stargate.png +0 -0
  199. package/public/oracle-splash/assets/protocols/tradexyz.png +0 -0
  200. package/public/oracle-splash/assets/protocols/uniswap.png +0 -0
  201. package/public/oracle-splash/assets/protocols/velodrome.png +0 -0
  202. package/public/oracle-splash/assets/protocols/ventuals.png +0 -0
  203. package/public/oracle-splash/assets/wordmarks/across-icon.webp +0 -0
  204. package/public/oracle-splash/assets/wordmarks/across.svg +4 -0
  205. package/public/oracle-splash/assets/wordmarks/aerodrome.svg +23 -0
  206. package/public/oracle-splash/assets/wordmarks/balancer.svg +3 -0
  207. package/public/oracle-splash/assets/wordmarks/cowswap.svg +1 -0
  208. package/public/oracle-splash/assets/wordmarks/curve.png +0 -0
  209. package/public/oracle-splash/assets/wordmarks/gmx.svg +13 -0
  210. package/public/oracle-splash/assets/wordmarks/hop-icon.webp +0 -0
  211. package/public/oracle-splash/assets/wordmarks/hyena.svg +7 -0
  212. package/public/oracle-splash/assets/wordmarks/hyperliquid.svg +21 -0
  213. package/public/oracle-splash/assets/wordmarks/hyperswap.svg +13 -0
  214. package/public/oracle-splash/assets/wordmarks/jupiter.svg +35 -0
  215. package/public/oracle-splash/assets/wordmarks/kinetiq.svg +1 -0
  216. package/public/oracle-splash/assets/wordmarks/lfj.webp +0 -0
  217. package/public/oracle-splash/assets/wordmarks/lifi.png +0 -0
  218. package/public/oracle-splash/assets/wordmarks/magic-eden.svg +1 -0
  219. package/public/oracle-splash/assets/wordmarks/markets.svg +1 -0
  220. package/public/oracle-splash/assets/wordmarks/morpho.svg +1 -0
  221. package/public/oracle-splash/assets/wordmarks/odos.svg +3 -0
  222. package/public/oracle-splash/assets/wordmarks/oneinch-icon.webp +0 -0
  223. package/public/oracle-splash/assets/wordmarks/oneinch.svg +6 -0
  224. package/public/oracle-splash/assets/wordmarks/opensea-icon.svg +17 -0
  225. package/public/oracle-splash/assets/wordmarks/opensea.svg +1 -0
  226. package/public/oracle-splash/assets/wordmarks/outcome.svg +16 -0
  227. package/public/oracle-splash/assets/wordmarks/pancakeswap.svg +18 -0
  228. package/public/oracle-splash/assets/wordmarks/paragon.svg +9 -0
  229. package/public/oracle-splash/assets/wordmarks/paraswap.svg +16 -0
  230. package/public/oracle-splash/assets/wordmarks/pendle.png +0 -0
  231. package/public/oracle-splash/assets/wordmarks/polymarket.png +0 -0
  232. package/public/oracle-splash/assets/wordmarks/quickswap.png +0 -0
  233. package/public/oracle-splash/assets/wordmarks/relay.svg +8 -0
  234. package/public/oracle-splash/assets/wordmarks/satflow-icon.png +0 -0
  235. package/public/oracle-splash/assets/wordmarks/stargate-icon.webp +0 -0
  236. package/public/oracle-splash/assets/wordmarks/stargate.svg +15 -0
  237. package/public/oracle-splash/assets/wordmarks/uniswap.svg +18 -0
  238. package/public/oracle-splash/assets/wordmarks/velodrome.svg +84 -0
  239. package/public/oracle-splash/assets/wordmarks/xyz.svg +12 -0
  240. package/public/oracle-splash/assets/wordmarks/zerox-icon.webp +0 -0
  241. package/public/oracle-splash/brand/aave.webp +0 -0
  242. package/public/oracle-splash/brand/aavev2.webp +0 -0
  243. package/public/oracle-splash/brand/aborean.webp +0 -0
  244. package/public/oracle-splash/brand/across.webp +0 -0
  245. package/public/oracle-splash/brand/aerodrome.webp +0 -0
  246. package/public/oracle-splash/brand/afi.webp +0 -0
  247. package/public/oracle-splash/brand/arcus.webp +0 -0
  248. package/public/oracle-splash/brand/aster.webp +0 -0
  249. package/public/oracle-splash/brand/avant.webp +0 -0
  250. package/public/oracle-splash/brand/balancer.webp +0 -0
  251. package/public/oracle-splash/brand/beefy.webp +0 -0
  252. package/public/oracle-splash/brand/benqi.webp +0 -0
  253. package/public/oracle-splash/brand/bestinslot.ico +0 -0
  254. package/public/oracle-splash/brand/bitfi.webp +0 -0
  255. package/public/oracle-splash/brand/bonkswap.webp +0 -0
  256. package/public/oracle-splash/brand/bouncebit.webp +0 -0
  257. package/public/oracle-splash/brand/camelot.webp +0 -0
  258. package/public/oracle-splash/brand/compound.webp +0 -0
  259. package/public/oracle-splash/brand/concrete.webp +0 -0
  260. package/public/oracle-splash/brand/cow.webp +0 -0
  261. package/public/oracle-splash/brand/curve.webp +0 -0
  262. package/public/oracle-splash/brand/derive.webp +0 -0
  263. package/public/oracle-splash/brand/dolomite.webp +0 -0
  264. package/public/oracle-splash/brand/eigenlayer.webp +0 -0
  265. package/public/oracle-splash/brand/ekubo.webp +0 -0
  266. package/public/oracle-splash/brand/ethena.webp +0 -0
  267. package/public/oracle-splash/brand/etherfi.webp +0 -0
  268. package/public/oracle-splash/brand/etherfiborrow.webp +0 -0
  269. package/public/oracle-splash/brand/felix.webp +0 -0
  270. package/public/oracle-splash/brand/fluid.webp +0 -0
  271. package/public/oracle-splash/brand/fluxbeam.webp +0 -0
  272. package/public/oracle-splash/brand/folks.webp +0 -0
  273. package/public/oracle-splash/brand/fortyacres.webp +0 -0
  274. package/public/oracle-splash/brand/gainsnetwork.webp +0 -0
  275. package/public/oracle-splash/brand/gassss.webp +0 -0
  276. package/public/oracle-splash/brand/gmx.webp +0 -0
  277. package/public/oracle-splash/brand/harmonix.webp +0 -0
  278. package/public/oracle-splash/brand/hlorderbook.webp +0 -0
  279. package/public/oracle-splash/brand/hlp.webp +0 -0
  280. package/public/oracle-splash/brand/hop.webp +0 -0
  281. package/public/oracle-splash/brand/hyperbeat.webp +0 -0
  282. package/public/oracle-splash/brand/hyperlend.webp +0 -0
  283. package/public/oracle-splash/brand/hyperliquid.webp +0 -0
  284. package/public/oracle-splash/brand/hyperliquidhpl.webp +0 -0
  285. package/public/oracle-splash/brand/hyperliquidspot.webp +0 -0
  286. package/public/oracle-splash/brand/hyperswap.webp +0 -0
  287. package/public/oracle-splash/brand/hypha.webp +0 -0
  288. package/public/oracle-splash/brand/joedex.webp +0 -0
  289. package/public/oracle-splash/brand/jupiter.webp +0 -0
  290. package/public/oracle-splash/brand/kelp.webp +0 -0
  291. package/public/oracle-splash/brand/kinetiq.webp +0 -0
  292. package/public/oracle-splash/brand/kmhype.webp +0 -0
  293. package/public/oracle-splash/brand/kona.webp +0 -0
  294. package/public/oracle-splash/brand/konalend.webp +0 -0
  295. package/public/oracle-splash/brand/lfj.webp +0 -0
  296. package/public/oracle-splash/brand/lido.webp +0 -0
  297. package/public/oracle-splash/brand/lifi.webp +0 -0
  298. package/public/oracle-splash/brand/lighter.webp +0 -0
  299. package/public/oracle-splash/brand/lista.webp +0 -0
  300. package/public/oracle-splash/brand/loopedhype.webp +0 -0
  301. package/public/oracle-splash/brand/lorenzo.webp +0 -0
  302. package/public/oracle-splash/brand/magic-eden.webp +0 -0
  303. package/public/oracle-splash/brand/magiceden.webp +0 -0
  304. package/public/oracle-splash/brand/mempool.png +0 -0
  305. package/public/oracle-splash/brand/meteora.webp +0 -0
  306. package/public/oracle-splash/brand/morpho.webp +0 -0
  307. package/public/oracle-splash/brand/myriad.webp +0 -0
  308. package/public/oracle-splash/brand/noxa.webp +0 -0
  309. package/public/oracle-splash/brand/odos.webp +0 -0
  310. package/public/oracle-splash/brand/oneinch.webp +0 -0
  311. package/public/oracle-splash/brand/openbook.webp +0 -0
  312. package/public/oracle-splash/brand/opensea.webp +0 -0
  313. package/public/oracle-splash/brand/orca.webp +0 -0
  314. package/public/oracle-splash/brand/ordinals.png +0 -0
  315. package/public/oracle-splash/brand/ostium.webp +0 -0
  316. package/public/oracle-splash/brand/pancakeswap.webp +0 -0
  317. package/public/oracle-splash/brand/pendle.webp +0 -0
  318. package/public/oracle-splash/brand/perena.webp +0 -0
  319. package/public/oracle-splash/brand/pharaoh.webp +0 -0
  320. package/public/oracle-splash/brand/phoenix.webp +0 -0
  321. package/public/oracle-splash/brand/polymarket.webp +0 -0
  322. package/public/oracle-splash/brand/polynomial.webp +0 -0
  323. package/public/oracle-splash/brand/projectx.webp +0 -0
  324. package/public/oracle-splash/brand/pumpfun.webp +0 -0
  325. package/public/oracle-splash/brand/quickswap.webp +0 -0
  326. package/public/oracle-splash/brand/rain.webp +0 -0
  327. package/public/oracle-splash/brand/raydium.webp +0 -0
  328. package/public/oracle-splash/brand/relay.webp +0 -0
  329. package/public/oracle-splash/brand/rocketpool.webp +0 -0
  330. package/public/oracle-splash/brand/saber.webp +0 -0
  331. package/public/oracle-splash/brand/sakuraswap.webp +0 -0
  332. package/public/oracle-splash/brand/sanctum.webp +0 -0
  333. package/public/oracle-splash/brand/satflow.png +0 -0
  334. package/public/oracle-splash/brand/sierra.webp +0 -0
  335. package/public/oracle-splash/brand/sky.webp +0 -0
  336. package/public/oracle-splash/brand/solv.webp +0 -0
  337. package/public/oracle-splash/brand/spark.webp +0 -0
  338. package/public/oracle-splash/brand/sparksavings.webp +0 -0
  339. package/public/oracle-splash/brand/sphere.webp +0 -0
  340. package/public/oracle-splash/brand/ssv.webp +0 -0
  341. package/public/oracle-splash/brand/stabble.webp +0 -0
  342. package/public/oracle-splash/brand/stableswap.webp +0 -0
  343. package/public/oracle-splash/brand/stakewise.webp +0 -0
  344. package/public/oracle-splash/brand/stargate.webp +0 -0
  345. package/public/oracle-splash/brand/sthype.webp +0 -0
  346. package/public/oracle-splash/brand/sushiswap.webp +0 -0
  347. package/public/oracle-splash/brand/unisat.png +0 -0
  348. package/public/oracle-splash/brand/uniswap.webp +0 -0
  349. package/public/oracle-splash/brand/uniswapv2.webp +0 -0
  350. package/public/oracle-splash/brand/uniswapv4.webp +0 -0
  351. package/public/oracle-splash/brand/unit.webp +0 -0
  352. package/public/oracle-splash/brand/velodrome.webp +0 -0
  353. package/public/oracle-splash/brand/velora.webp +0 -0
  354. package/public/oracle-splash/brand/venus.webp +0 -0
  355. package/public/oracle-splash/brand/wbeth.webp +0 -0
  356. package/public/oracle-splash/brand/xsy.webp +0 -0
  357. package/public/oracle-splash/brand/yieldyak.webp +0 -0
  358. package/public/oracle-splash/brand/zerobase.webp +0 -0
  359. package/public/oracle-splash/brand/zerox.webp +0 -0
  360. package/public/oracle-splash/downloads/index.html +241 -0
  361. package/public/oracle-splash/favicon.ico +0 -0
  362. package/public/oracle-splash/favicon.svg +6 -0
  363. package/public/oracle-splash/index.html +2537 -0
  364. package/public/oracle-splash/mesh-graph.png +0 -0
  365. package/public/oracle-splash/mesh-graph.svg +216 -0
  366. package/bin/oracle.mjs +0 -25
package/README.md CHANGED
@@ -1,23 +1,535 @@
1
- # @oracle-agent/oracle
1
+ # Oracle
2
2
 
3
- **This package is a pointer, not the product.**
3
+ ## Quickstart (standalone CLI)
4
4
 
5
- Oracle is distributed to [Locals Only](https://opensea.io/collection/locals-only-hyperevm) holders.
6
- Versions `<=0.12.0` on this registry are deprecated and unmaintained.
5
+ ```bash
6
+ # Oracle is distributed to Locals Only holders. Prove ownership at the gate,
7
+ # then install the artifact it returns:
8
+ oracle gate status # if you already have a build
9
+ curl -fL -o oracle.tgz "$ORACLE_GATE_LINK" && npm i -g ./oracle.tgz
10
+ # Node >= 20.19
11
+ oracle --version
12
+ oracle auth login claude # or codex / grok
13
+ oracle # native Oracle chat
14
+ oracle doctor # verify local posture
15
+ ```
16
+
17
+ Prefer an API key instead? `oracle auth api-key openrouter` accepts hidden
18
+ interactive input. `oracle auth status` reports providers without printing
19
+ credentials. Linux, Windows, and macOS apps are in beta.
20
+
21
+
22
+ **Prepare-only multichain agent control plane.** Policy-bounded intents; your wallet signs.
23
+
24
+ Specialist agent profiles, real protocol intents, self-custody by default,
25
+ receipts or it didn't happen.
26
+
27
+ Built for [Hermes](https://github.com/NousResearch/hermes-agent), the
28
+ open-source agent runtime from [Nous Research](https://nousresearch.com).
29
+ Oracle runs native chat directly — no external agent required.
30
+ `oracle chat` starts the Oracle-native agent loop directly.
31
+
32
+ Hermes remains available as an optional delegate: `ORACLE_CHAT_BACKEND=hermes oracle chat`.
33
+
34
+ Oracle can run standalone model auth directly with API keys or Claude, Codex,
35
+ and Grok OAuth. OAuth credentials use the OS keychain when available, with a
36
+ private `0600` local fallback when keychain storage is unavailable.
37
+
38
+ This package is **prepare-only**: it never takes a private key and never
39
+ broadcasts. The owner-operated signer/executor is private infrastructure, is
40
+ not published on npm, and is not part of holder onboarding. Never paste a seed,
41
+ private key, vault passphrase, or signer token into Oracle chat.
42
+
43
+ ---
44
+
45
+ ## Start safely
46
+
47
+ 1. Install the public CLI and authenticate a model provider as shown above.
48
+ 2. Run `oracle chain list`, then `oracle chain use <name>`.
49
+ 3. Use reads, research, quotes, simulations, and unsigned preparation.
50
+ 4. Review every prepared artifact in the wallet that will sign it.
51
+ 5. Treat only a confirmed transaction hash plus receipt as execution.
52
+
53
+ Hermes is optional. To add its isolated runtime, specialist profiles, and local
54
+ read plane later:
55
+
56
+ ```bash
57
+ oracle bootstrap
58
+ oracle init --apply # writes profiles + local HMAC attestation config; no wallet key
59
+ oracle data serve # loopback only: 127.0.0.1:8787
60
+ oracle doctor
61
+ ```
62
+
63
+ Library users can prepare directly:
7
64
 
8
- ## Get a build
65
+ ```js
66
+ import { data } from "@oracle-agent/oracle";
67
+ const prepared = await data.call("hl-perps", "prepareOrder", {
68
+ /* coin, side, size, owner wallet address */
69
+ });
70
+ // Oracle stops here. The user's wallet reviews, signs, and submits.
71
+ ```
72
+
73
+ See [SETUP.md](SETUP.md) for clean installation and troubleshooting,
74
+ [docs/holder-beta.md](docs/holder-beta.md) for the Locals-only launch gate, and
75
+ [docs/buzz-integration.md](docs/buzz-integration.md) for the Buzz HTTP contract.
76
+
77
+ ---
78
+
79
+ ## What Oracle is
80
+
81
+ Most "AI crypto agent" projects give a model a hot wallet and hope. Oracle does
82
+ the opposite: the model *proposes*, the owner *authorizes*, and the policy layer
83
+ decides what may even be asked.
84
+
85
+ Three properties define it:
86
+
87
+ 1. **Self-custody by default.** The public package never accepts your private
88
+ key. It builds unsigned transactions and typed-data intents; your wallet
89
+ signs them.
90
+ 2. **Bound grants.** A grant is a signed, scoped, expiring permission: max
91
+ value, chain, venue, destination allowlist, TTL. Oracle canonicalizes it,
92
+ renders it for review, and refuses to prepare anything outside it. Runtime
93
+ enforcement is the wallet's or smart account's job — this package never
94
+ signs, so it cannot be the thing that stops a transaction.
95
+ 3. **Receipts or it didn't happen.** A claim without a transaction hash, a
96
+ receipt, and a balance delta is not a result.
97
+
98
+ Default posture is `DISARMED`.
9
99
 
10
- Visit **https://oracle.demi.la**, prove your wallet holds a Locals Only NFT, and install
11
- the artifact the gate returns:
100
+ ## Why it's different
101
+
102
+ The differentiators are **policy, custody, and receipts** — not a smarter chat
103
+ loop.
104
+
105
+ | | Typical agent | Oracle |
106
+ |---|---|---|
107
+ | Custody | house wallet holds keys | user signs, no house custody |
108
+ | Authority | prompt-level "be careful" | signed grant: chain, spend, targets, TTL — enforced by your wallet, not by us |
109
+ | Destinations | whatever the model emits | reviewed per-chain allowlist, fail-closed |
110
+ | Slippage | fixed % | live guard recomputed per leg, hard 100 bps cap |
111
+ | Proof | model says "done" | hash + verified successful on-chain receipt + expected balance delta or it failed |
112
+ | Surface | swap only | swaps, bridges, perps, vaults, yield, NFTs, intents |
113
+
114
+ ## Architecture
12
115
 
13
116
  ```
14
- curl -fL -o oracle.tgz "<link-from-gate>" && npm i -g ./oracle.tgz
117
+ you
118
+ |
119
+ Task
120
+ |
121
+ oracle <- routes, never authorizes custody
122
+ |
123
+ +------+------+------+------+------+------+------+
124
+ | | | | | | | |
125
+ poly hyper robin solana bitcoin stable protocol
126
+ market liquid hood builder
15
127
  ```
16
128
 
17
- Prefer no terminal? The desktop app is at https://oracle.demi.la/downloads/
129
+ Each lane is a Hermes **profile**: its own system prompt, skills, memory, and
130
+ sessions. The `oracle` lane routes intent to the right specialist. Adding a lane
131
+ is adding a directory.
132
+
133
+ Three planes, and the boundary between them is mechanically enforced:
134
+
135
+ - **Data plane** (public) — read/quote across chains and protocols. No keys.
136
+ - **Policy plane** (public) — destination allowlists, slippage guards, route and
137
+ vault attestations, grant schema. Holds no keys; constrains what a signer may
138
+ be asked to do.
139
+ - **Exec plane** (private, optional) — signing and broadcast live only in
140
+ separately operated owner infrastructure. It is not published on npm, not in
141
+ this artifact, and not available to holder installs.
142
+
143
+ `test/custody-boundary.test.mjs` walks the import graph and fails if any public
144
+ module reaches wallet key material or a house signer. The split is a test, not a
145
+ promise.
146
+
147
+ ## Coverage
148
+
149
+ **11 EVM chains** built in: Ethereum, Optimism, BNB, Polygon, Stable, HyperEVM,
150
+ Abstract, Robinhood Chain, Base, Arbitrum, Avalanche. Plus Solana and Bitcoin L1
151
+ lanes. Solana covers Jupiter quote/prepare, SPL account research, live
152
+ simulation of the prepared swap, and Magic Eden NFT reads with unsigned
153
+ buy/list/mint tickets. Bitcoin covers Esplora fee/UTXO reads, Ordinals/runes
154
+ research, Satflow PSBT intents, and inscription PSBT preparation. Hyperliquid
155
+ adds HyperCore HYPE staking: validator reads plus EIP-712 stake, delegate,
156
+ undelegate, and unstake preparation. User wallets sign.
157
+
158
+ **Any other EVM chain is config, not code:**
159
+
160
+ ```js
161
+ import { registerCustomChain } from "@oracle-agent/oracle/scanner";
162
+
163
+ registerCustomChain({
164
+ key: "mychain",
165
+ chainId: 7777,
166
+ name: "My Chain",
167
+ rpcEnv: ["MYCHAIN_RPC_URL"],
168
+ nativeCurrency: { symbol: "MYC", decimals: 18 },
169
+ });
170
+ ```
171
+
172
+ That chain immediately has block reads, balances, on-chain token resolution, log
173
+ scanning, and structural risk checks. See
174
+ [`docs/adding-a-chain.md`](docs/adding-a-chain.md).
175
+
176
+ ```bash
177
+ oracle-scan chains # coverage matrix
178
+ oracle-scan token base 0x8335...2913 # on-chain identity
179
+ oracle-scan pools base 0x4200...0006 # pools ranked by liquidity
180
+ oracle-scan risk base 0x8335...2913 # structural checks + sell simulation
181
+ oracle-scan sell base 0x8335...2913 # round trip: can you actually exit?
182
+ ```
183
+
184
+ **8 of 11 chains ship verified venues**: Ethereum, Optimism, BNB, Polygon, Base,
185
+ Arbitrum, Avalanche, and Robinhood Chain. They have all 10 capabilities including
186
+ live quotes, round-trip sell simulation, and unsigned swap preparation. The remaining
187
+ three (Stable, HyperEVM, Abstract) are at 7 and **fail-closed for routing value** until
188
+ someone verifies a venue: read and research work, moving money does not. That is a safe
189
+ default, not a gap.
190
+
191
+ Every venue address was verified **functionally, not by codesize** — a re-runnable
192
+ prober (`scripts/verify-v3-venues.mjs`) asks each candidate to price a pair with a
193
+ known answer. This matters: the canonical QuoterV2 address also has bytecode on
194
+ Base, but does not price that chain's pairs. A codesize check would have
195
+ allowlisted the wrong contract.
196
+
197
+ **70 provider modules** in the read/quote catalog, covering **219 unique
198
+ protocols/venues** across EVM, Solana, and Bitcoin (115 EVM + cross-chain, 98
199
+ Solana venues backed by 101 verified Jupiter program IDs, 6 Bitcoin surfaces).
200
+ One module can cover many protocols: the Jupiter module alone routes 98 Solana
201
+ venues, so provider-module count and protocol count are different numbers.
202
+
203
+ | Class | Providers |
204
+ |---|---|
205
+ | Chain / explorer | EVM JSON-RPC, Blockscout, Solana RPC, Bitcoin Esplora |
206
+ | Market data | DexScreener, GeckoTerminal, DeFiLlama |
207
+ | DEX / aggregator | Uniswap V3/V4, Aerodrome, Curve, Balancer, LI.FI, ParaSwap, Odos, 0x, 1inch, HyperEVM DEXes |
208
+ | Solana | Jupiter (98 venue labels, 101 verified program IDs) |
209
+ | Intents | CoW Protocol, RFQ |
210
+ | Perps / lending / yield | GMX v2, Morpho, Pendle |
211
+ | Bridges | Across, Hop, Relay |
212
+ | Venues | Hyperliquid (core perps + HIP-3 builder dexs + HIP-4 outcomes), Polymarket (read + local CLOB prepare) |
213
+ | NFT | OpenSea, Satflow, Magic Eden (Solana) |
214
+ | Bitcoin | mempool/Esplora, Ordinals, Runes, UniSat, Best-in-Slot, Satflow |
215
+
216
+ Every provider and every scanner capability declares an honest tier —
217
+ `read-only`, `quote-only`, `prepare`, or `intent`. **API coverage is not execution
218
+ support**, and the catalog says which is which. A chain with no verified venue is
219
+ fail-closed for routing value: read and research work, moving money does not. That
220
+ is a safe default, not a gap.
221
+
222
+ ## Capability pack
223
+
224
+ Oracle's default pack is deliberately broad but disarmed:
225
+
226
+ - **Trader** — best-execution route comparison, quote/prepare, simulation, and
227
+ receipt checks; no set-and-forget custody.
228
+ - **Builder** - chain-family fungible-token and NFT-collection launch plans,
229
+ protocol, gacha, DEX, and launchpad scaffolds with unsigned deploy/admin actions.
230
+ Unsupported chain adapters fail closed instead of pretending one deploy fits all.
231
+ - **Analyzer** — token, contract, venue, portfolio, market, and risk research with
232
+ evidence labels. `/balance` or plain `balance` runs one deterministic snapshot
233
+ across every configured EVM chain plus Solana, Bitcoin, Hyperliquid, and
234
+ discoverable NFTs. Profile-local observations power history and SVG value graphs;
235
+ unavailable values stay null instead of becoming fake zeroes.
236
+ - **On-chain scanner** — chain-config scanners for tokens, pools, launches,
237
+ risk, exits, and smart-wallet boards.
238
+ - **Meme-token sniper** — fast launch/liquidity monitoring across configured
239
+ chains, guarded by identity checks, sell-sim/reverse-route proof, caps, and
240
+ unsigned user-wallet tickets.
241
+ - **Per-chain graphs + Telegram cards** — charted scanner alerts, route cards,
242
+ meme-launch cards, Hyperliquid HIP-3/HIP-4 cards, and Polymarket cards. User
243
+ API-key actions activate only when self-hosted keys are configured.
244
+ - **NFT mint gas-war limits** — public mint bots enforce chain-bound gas caps,
245
+ per-unit fee caps, and optional priority-fee caps before returning unsigned
246
+ mint transactions. Import `validateNftMintGasWar` from the package root or
247
+ `@oracle-agent/oracle/nft-gas-war`.
248
+ - **Cross-chain RFQ + tokenized assets** — RFQ/intent venues are compared across
249
+ supported chains where configured, and tokenized Robinhood-style assets can be
250
+ bought only after exact contract, venue, route, and sellability checks.
251
+ - **Solana** — SPL accounts, Jupiter quotes, unsigned swap transactions, and
252
+ simulation.
253
+ - **Bitcoin** — L1 reads, Ordinals/runes, Satflow PSBT intents, and inscription
254
+ PSBT preparation.
255
+
256
+ Every money-moving path stays prepare/simulate first. Signing and broadcast are
257
+ wallet/grant actions, not model authority. Meme-token sniping defaults to fast
258
+ scan + prepared ticket; blind broadcast requires a separate capped local signer
259
+ loop and explicit opt-in. NFT mint bots must also honor gas-war caps before any
260
+ wallet-signable transaction is returned. RFQ and tokenized-asset routes are
261
+ capability-labeled per chain; unconfigured venues stay unavailable instead of faked.
262
+
263
+ ## Install
264
+
265
+ ```bash
266
+ npm install @oracle-agent/oracle # Node >= 20.19.0
267
+ ```
268
+
269
+ Or from source, if you want to run the suite:
270
+
271
+ ```bash
272
+ git clone https://github.com/demi-hl/oracle.git
273
+ cd oracle
274
+ npm install
275
+ npm test
276
+ ```
277
+
278
+ **→ [SETUP.md](./SETUP.md) covers public data credentials and the separate
279
+ owner-local source lane.** The short version:
280
+
281
+ - Reads and quotes need **no keys**.
282
+ - The public package exposes no signer, key vault, or broadcast path.
283
+ - User wallets authorize prepared actions outside the public data plane.
284
+ - Owner-local signing exists only in separately operated private infrastructure;
285
+ it is not published on npm and is not a holder capability. When installed by
286
+ the owner, its generic signer exposes six policy-bounded surfaces: `hl`,
287
+ `poly`, `evm-swap`, `evm-bridge`, `btc`, and `sol`, with explicit caps and
288
+ fail-closed allowlists.
289
+
290
+ ### Action vocabulary and execution planes
291
+
292
+ Oracle keeps capability and authorization separate:
293
+
294
+ - Public Oracle reads, quotes, simulates, and prepares unsigned artifacts.
295
+ - **Path A:** owner/main, browser, smart-account, hardware, or protocol-native
296
+ wallets sign the prepared artifact. This is the default self-custody path.
297
+ - **Path B:** private owner-local infrastructure may sign on the same host with
298
+ the owner's key and policy. It is deployment-specific, unavailable to holder
299
+ installs, and must never expose a vault passphrase or signer credential to the
300
+ agent process.
301
+ - The generic unattended signer exposes six bounded surfaces: `hl`, `poly`,
302
+ `evm-swap`, `evm-bridge`, `btc`, `sol`. Each surface decodes its own
303
+ envelope, enforces its caps, and refuses while its allowlists are empty.
304
+ - Ordinary EVM preparation remains user-wallet signed unless a trusted
305
+ owner-controlled direct-exec process is explicitly installed and armed.
306
+ - `ORACLE_AUTONOMOUS_TRADING=1` is direct execution for trusted owner-controlled
307
+ local code only. It is never model/agent authority and should not be framed as
308
+ equivalent to the `oracle-signer` agent-process path.
309
+ - A deployment may separately install a same-host, owner-gated EVM executor.
310
+ Oracle must verify that executor before describing bounded EVM execution as
311
+ available. Missing deployment capability means "unavailable here," not
312
+ "Oracle can never execute EVM."
313
+ - `watch`, `watch this`, and `ping me` always create `active: true, actionMode: alert_only`.
314
+ - `arm` creates `active: true, actionMode: execute` only for one exact owner-authorized action. It is never inferred from a watch.
315
+
316
+ The package exports this binding as `@oracle-agent/oracle/action-semantics`. Legacy watch stores can migrate `status: watching|armed` with `migrateLegacyWatchRecord()`; because it is specifically a watch-store migration, both statuses become `alert_only`, never execution authority.
317
+
318
+ Run the read-only data plane:
319
+
320
+ ```bash
321
+ npm run start:data
322
+ npm run health
323
+ ```
324
+
325
+ Run the public console (wallet connect, grant editor, receipts):
326
+
327
+ ```bash
328
+ npm run start:public
329
+ # http://127.0.0.1:8799/
330
+ ```
331
+
332
+ This is an unauthenticated loopback development server, not a holder gate or a
333
+ public deployment. Keep it off LAN/tailnet/public interfaces and place a tested
334
+ admission gateway in front of any hosted beta.
335
+
336
+ ## Model providers
337
+
338
+ Oracle is a library. Drive it with Claude, GPT, Gemini, Grok, a local model, or
339
+ a plain script — the tools are ordinary functions plus an MCP server:
340
+
341
+ ```bash
342
+ npx oracle-data # local read plane on 127.0.0.1:8787
343
+ npx oracle-data-mcp # MCP stdio server (any MCP client); needs oracle-data up
344
+ ```
345
+
346
+ It is better under [Hermes](https://hermes-agent.nousresearch.com/docs), because
347
+ a trading stack is several workloads with opposite needs and **per-profile
348
+ routing** gives each its own model, tools, and key scope: cheap wide context for
349
+ research, a fast model for execution where latency is money, the strongest model
350
+ for risk review, something small for unattended crons. The research profile can
351
+ hold no signing key at all.
352
+
353
+ Oracle's own pre-release audit ran four model lineages — Grok 4.5, Opus 5,
354
+ Fable 5, GPT-5.6 — and **each found a critical bug the others missed**. One
355
+ model reviewing its own work would have shipped three of them.
356
+
357
+
358
+ ## Agent profiles
359
+
360
+ Oracle ships an installable 8-lane mesh for Hermes:
361
+
362
+ ```bash
363
+ oracle-init # dry run -- shows exactly what it would do
364
+ oracle-init --apply # create profiles, install SOULs + skills, wire MCP config
365
+ npx oracle-data # keep running — MCP tools call the local read plane on :8787
366
+ oracle # premium boxed TTY on the same oracle profile as messaging
367
+ oracle model # choose provider/model; persona stays oracle
368
+ oracle chain use hyperliquid
369
+ oracle setup # telegram / discord / slack messaging
370
+ ```
371
+
372
+ Terminal and configured messaging channels are transports into the same Hermes
373
+ `oracle` profile. When a local operator/MCP is configured, an explicit owner
374
+ trade instruction can execute from either interface. The selected model never
375
+ bypasses signer-owned grants, allowlists, caps, MAC checks, simulation, or
376
+ receipt verification.
377
+
378
+ Lanes: `oracle` (router), `polymarket-agent`, `hyperliquid-agent`,
379
+ `robinhood-agent`, `solana-agent`, `bitcoin-agent`, `stable-agent`,
380
+ `protocol-builder`, plus `_template` for your own. Details in
381
+ [`docs/profiles.md`](docs/profiles.md).
382
+
383
+ Every lane installs **DISARMED**. No lane requests a broadcast or signing action —
384
+ only read, simulate, and prepare — and a test enforces that so widening custody
385
+ can't pass review quietly. An existing `SOUL.md` is never overwritten without
386
+ `--force`, and `--force` writes a timestamped backup first.
387
+
388
+ Oracle does not issue its own model credential. Standalone chat uses the OAuth
389
+ login or API key the user configured; Hermes mode uses whichever provider that
390
+ Hermes installation already supports.
391
+
392
+ **Why "built for Hermes" and not just "works anywhere":** Oracle's read plane is
393
+ an MCP server, so any MCP client can call it. But the *mesh* — per-lane memory,
394
+ skills, sessions, and separate model choice per specialist — is Hermes profile
395
+ machinery. You can use Oracle from any agent; you get the architecture in the
396
+ diagram above from Hermes.
397
+
398
+ ## Best-execution routing
399
+
400
+ The highest quote is not the cheapest swap. Oracle ranks on **net received after
401
+ gas and fees**, comparing every available source in parallel:
402
+
403
+ ```bash
404
+ oracle-route swap base 0x4200...0006 0x8335...2913 # WETH -> USDC
405
+ oracle-route bridge arbitrum base # ETH across chains
406
+ ```
407
+
408
+ ```
409
+ source net out gross cost
410
+ * paraswap 1,903.880867 1,903.893053 $0.01
411
+ cow 1,903.693798 1,903.693798 gasless (solver)
412
+ lifi 1,894.432632 1,899.20966 $4.78
413
+ ```
414
+
415
+ Sources: **LI.FI, CoW, ParaSwap, 0x, 1inch** for swaps · **LI.FI, Relay, Across**
416
+ for bridges. 0x and 1inch activate when their API key is present; the rest need
417
+ none.
418
+
419
+ Why net matters:
420
+
421
+ - **Gas is part of the price.** A route quoting 0.2% more but costing $14 more in
422
+ gas loses on a $500 swap and wins on a $50k one. The crossover depends on trade
423
+ size, so any fixed preference is wrong on one side of it.
424
+ - **Intents can beat AMMs.** CoW's solver pays the gas, so a slightly lower gross
425
+ quote often wins on net — the case naive ranking always gets backwards.
426
+ - **Sources disagree about what they mean.** Some report gas in USD, some in native
427
+ wei, some not at all. Oracle normalizes, and marks what was measured.
428
+
429
+ **Unknown cost is never scored as zero.** A source that does not report gas is
430
+ ranked on gross and flagged, because scoring an unknown as free is how the worst
431
+ route wins a comparison. When the top two routes measure cost differently, Oracle
432
+ quotes **no spread at all** rather than a number that compares different things.
433
+
434
+ Then prepare the winner in one step:
435
+
436
+ ```bash
437
+ oracle-route prepare base <tokenIn> <tokenOut> <yourWallet>
438
+ ```
439
+
440
+ You get back an **unsigned transaction** (LI.FI, ParaSwap, 0x) or **EIP-712 typed
441
+ data** for an off-chain order (CoW). `artifactKind` says which — they need different
442
+ wallet actions, and one is not broadcast at all. Prepare **re-quotes** and reports
443
+ `driftBps` against the comparison, because a minimum computed from a stale quote is
444
+ not a minimum.
445
+
446
+ Bridges prepare too:
447
+
448
+ ```bash
449
+ oracle-route prepare-bridge arbitrum base <yourWallet>
450
+ ```
451
+
452
+ Bridge artifacts are always a **list** of transactions — some routes need an approval
453
+ and a deposit signed in order, and signing only the first leaves funds approved but
454
+ not bridged. Both chains are reported, and a transaction whose chain does not match
455
+ the origin is refused. Oracle states plainly that **bridging is not atomic**: the
456
+ origin transaction confirming does not mean funds arrived.
457
+
458
+ Routing never signs. `taker` must be the real wallet; placeholder addresses are
459
+ rejected, since quoting is anonymous but preparing is not. Signing happens in
460
+ the user's wallet or in a separately operated source-only execution lane.
461
+
462
+ Individual source failures degrade the comparison by one source instead of breaking
463
+ it — verified in practice when Odos sunset their public API mid-development
464
+ (HTTP 410); the router kept ranking and the provider was marked `unavailable`.
465
+
466
+ ## On-chain equities — Crossbook (HIP-3 / Arcus / RH / Solana / TON)
467
+
468
+ Tokenized equities span multiple venues. Oracle ranks them the same way as swaps:
469
+ net of known costs, with unknown costs never scored as free.
470
+
471
+ ```bash
472
+ oracle equities venues
473
+ oracle equities quote NVDA --size 1000
474
+ oracle equities quote SPY --size 500 --json
475
+ oracle equities prepare NVDA --recipient 0xYourWallet
476
+ # or: oracle-equities quote NVDA --size 1000
477
+ ```
478
+
479
+ Import surface: `@oracle-agent/oracle/equities` (`bestEquityRoute`, `equityVenues`,
480
+ `prepareEquityRoute`). MCP tools: `equity_venues`, `equity_quote`, `equity_prepare`.
481
+
482
+ Only Robinhood-chain Uniswap is prepare-tier in v1. HIP-3, Arcus, Solana xStocks,
483
+ and TON ston.fi are quote-only discovery. `bestPreparable` is separate from the
484
+ overall winner so a quote-only mid is never presented as actionable.
485
+
486
+ ## Examples
487
+
488
+ ```bash
489
+ node examples/add-a-chain.mjs # register an unseen chain, no code
490
+ node examples/research-a-token.mjs # honest token research on live data
491
+ node examples/oracle-pack-template.mjs # skeleton for a safe Oracle protocol pack
492
+ ```
493
+
494
+ ## MCP
495
+
496
+ Oracle exposes its read plane over the Model Context Protocol, so any MCP client
497
+ (Hermes, Claude Code, others) can use it:
498
+
499
+ ```bash
500
+ oracle-data-mcp
501
+ ```
502
+
503
+ ## Security
504
+
505
+ - Oracle never receives private keys.
506
+ - The router can propose, simulate, explain, and draft. It cannot authorize.
507
+ - Public modules may not import signer or executor code (enforced by test).
508
+ - Destination allowlists are per-chain and fail-closed: an empty allowlist
509
+ refuses everything rather than allowing everything.
510
+ - Report vulnerabilities per [SECURITY.md](SECURITY.md). Please do not open a
511
+ public issue for a live exploit.
512
+
513
+ ## What Oracle is not
514
+
515
+ - Not an autonomous trader. There is no "set and forget."
516
+ - Not custodial. If a design needs your key on our server, that design is wrong.
517
+ - Not a guarantee. Crypto execution carries real risk; read the code you run.
518
+
519
+ ## License
520
+
521
+ [Business Source License 1.1](LICENSE) — source-available, not open source.
522
+
523
+ You may read, modify, self-host, and use Oracle freely for internal use,
524
+ evaluation, research, and personal use. What you may not do is offer Oracle,
525
+ or substantially its functionality, to third parties as a competing product
526
+ or hosted service without a commercial license.
527
+
528
+ Each version converts to **Apache-2.0** on its Change Date (four years after
529
+ release). Versions `0.1.0` through `0.11.0` were published under Apache-2.0
530
+ and remain under those terms.
18
531
 
19
- ## Why
532
+ The **Oracle** name and marks are reserved; please don't imply endorsement by
533
+ an official deployment when shipping a fork.
20
534
 
21
- A holder check that runs on your machine can always be switched off. Serving the
22
- artifact from a server that verifies ownership is the only version of this that means
23
- anything. Keys and signing never live in the public package either way.
535
+ For commercial licensing, contact the maintainer.
package/SECURITY.md ADDED
@@ -0,0 +1,114 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ **Do not open a public issue for a live exploit.**
6
+
7
+ Email **security@demi.la** with:
8
+
9
+ - what the issue is
10
+ - how to reproduce it
11
+ - the impact you believe it has
12
+ - whether funds are at risk right now
13
+
14
+ You'll get an acknowledgement within 72 hours. If funds are actively at risk,
15
+ say so in the subject line and we'll treat it as urgent.
16
+
17
+ Please give us a reasonable window to ship a fix before public disclosure. We
18
+ will credit you unless you'd rather stay anonymous.
19
+
20
+ ## Scope
21
+
22
+ In scope:
23
+
24
+ - custody-boundary escapes (public code reaching a signer or key material)
25
+ - destination-allowlist bypasses
26
+ - slippage/minimum-output guard bypasses
27
+ - grant forgery, replay, or scope escalation
28
+ - route/vault/order attestation forgery
29
+ - secret leakage through an API response or log
30
+ - holder-gate bypass, challenge replay, or cross-user data access in an official
31
+ hosted beta
32
+ - Buzz capability forgery or audit-chain tampering
33
+
34
+ Out of scope:
35
+
36
+ - third-party provider outages and their rate limits
37
+ - economic risk inherent to a protocol you chose to trade
38
+ - issues that require the operator's own machine to already be compromised
39
+ - deployment hardening for an operator's separate private execution service
40
+
41
+ ## Threat model
42
+
43
+ Oracle assumes the language model can be wrong or adversarially steered. The
44
+ model is treated as an untrusted proposer.
45
+
46
+ Consequences of that assumption, which are the invariants worth attacking:
47
+
48
+ 1. **The public package never holds a key.** Signing happens in the user's
49
+ wallet. Source-only operator modules are excluded from public entrypoints and
50
+ the npm artifact.
51
+ 2. **Model output is not authorization.** A grant is authorization, and a grant
52
+ is signed by the owner, scoped, and expiring.
53
+ 3. **Destinations are allowlisted per chain and fail closed.** An empty allowlist
54
+ refuses everything. It never means "allow anything."
55
+ 4. **Model-authored metadata is not trusted for routing.** Dynamic execution
56
+ targets require an attestation minted inside the trusted boundary.
57
+ 5. **Guards are recomputed at sign and broadcast time**, not just at quote time,
58
+ because a stale minimum is not a minimum.
59
+ 6. **The shipped public HTTP server is not a holder-authentication service.** It
60
+ is loopback-only and rate limited, but unauthenticated. A hosted Locals beta
61
+ needs a separate server-side ownership gate and per-user isolation.
62
+
63
+ If you find a path where model-authored text becomes an authorized on-chain
64
+ action without an owner signature and a policy check, that is the bug we most
65
+ want to hear about.
66
+
67
+ ## Enforcement in CI
68
+
69
+ `test/custody-boundary.test.mjs` walks the public import graph, and
70
+ `test/public-release-hardening.test.mjs` inspects the packed npm artifact. The
71
+ build fails if either public surface reaches wallet key material or a house
72
+ signer. The secret scanner also checks current files and Git history. CI runs
73
+ the boundary suite on every push and pull request.
74
+
75
+ A security claim that isn't enforced by a test is just a comment.
76
+
77
+ ## Hosted and operator boundaries
78
+
79
+ These are not public-package custody holes. They are operator constraints that
80
+ still apply after the public boundary hardening:
81
+
82
+ 1. **Owner-local signer modules live in private operator infrastructure.** The
83
+ operator package is not published on npm and is not part of public or holder
84
+ onboarding. Those modules and credentials must not be restored into this
85
+ prepare-only package or its npm artifact. CI fails if a pack of *this* repo
86
+ includes signer or vault paths.
87
+ 2. **Prepare helpers that validate executable routes require an attestation
88
+ secret** (`requireSigned`) so they cannot be used as a softer pre-broadcast
89
+ gate than `enforceTxPolicy`.
90
+ 3. **Live grants have a hard 24-hour ceiling.** Public grant validation with an
91
+ explicit reference time and provider-neutral session grants reject a longer
92
+ TTL. Deployments should choose a shorter lifetime whenever possible.
93
+ 4. **Execution tool routing fails closed.** Sign, send, submit, and broadcast
94
+ operations are owner-only. Unknown operations inside a signer/executor
95
+ namespace also require owner send/execute intent; a new tool name does not
96
+ silently become guest-accessible.
97
+ 5. **Daily spend ledger locks are never reclaimed automatically.** An existing
98
+ lock refuses broadcast, even when it appears stale. After verifying that no
99
+ holder is active, an operator must remove a stale lock out of band. This
100
+ sacrifices unattended recovery to avoid a stale-reclaimer ABA race that can
101
+ defeat aggregate spend accounting.
102
+ 6. **Action records are not chain proof.** `normalizeActionReceipt()` records
103
+ caller-supplied public facts; `recordAudit()` is a process-local, best-effort
104
+ file helper. Neither authorizes execution or proves settlement. Report
105
+ success only after independently verifying the successful chain receipt,
106
+ expected destination/events, and expected balance delta.
107
+ 7. **Repository-host controls are not the custody boundary.** Dependabot alerts
108
+ may be enabled independently, while branch protection, CodeQL, and hosted
109
+ secret scanning depend on repository visibility and account tier. Verify the
110
+ live settings; do not infer them from this document. The local CI boundary,
111
+ packed-artifact, and secret-scan gates remain mandatory.
112
+ 8. **Holder admission is deployment code.** The npm package does not prove
113
+ Locals ownership or isolate hosted tenants. See
114
+ [docs/holder-beta.md](docs/holder-beta.md) before exposing any shared surface.