@oracle-agent/oracle 0.24.5 → 0.24.7
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 +36 -30
- package/SETUP.md +23 -2
- package/dist/assets/profiles/protocol-builder/SOUL.md +6 -1
- package/dist/assets/profiles/protocol-builder/profile.json +1 -1
- package/dist/assets/skills/oracle-desk-product/SKILL.md +1 -1
- package/dist/assets/skills/oracle-multichain-nft-launch/SKILL.md +2 -2
- package/dist/assets/skills/oracle-multichain-token-launch/SKILL.md +2 -2
- package/dist/assets/skills/oracle-protocol-builder/SKILL.md +44 -8
- package/dist/bin/desk-server.mjs +147 -17
- package/dist/bin/oracle-data-mcp.mjs +7 -7
- package/dist/bin/oracle-public-server.mjs +4 -4
- package/dist/cli/commands/chat.mjs +93 -93
- package/dist/cli/commands/doctor.mjs +5 -5
- package/dist/cli/commands/model.mjs +100 -100
- package/dist/cli/commands/receipt.mjs +3 -3
- package/dist/cli/commands/sign.mjs +12 -12
- package/dist/cli/commands/signer.mjs +14 -8
- package/dist/cli/commands/venues.mjs +3 -3
- package/dist/data/desk-data.mjs +145 -15
- package/dist/index.mjs +150 -20
- package/dist/local-signer/index.mjs +1 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,12 +46,13 @@ and Grok OAuth. OAuth credentials use the OS keychain when available, with a
|
|
|
46
46
|
private `0600` local fallback when keychain storage is unavailable.
|
|
47
47
|
|
|
48
48
|
Oracle is **prepare-only by default and on hosted surfaces**. A self-hoster may
|
|
49
|
-
explicitly initialize the optional encrypted local vault
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
explicitly initialize the optional encrypted local vault. The private `@oracle-agent/agent` admin package
|
|
50
|
+
remains separate and is not included here. The public package can then run a
|
|
51
|
+
short-lived, loopback-only signer. Every normal action requires exact one-use
|
|
52
|
+
human confirmation and policy checks; autonomous trading additionally requires
|
|
53
|
+
`ORACLE_AUTONOMOUS_TRADING=1` and a short-lived Ed25519 attestation from a
|
|
54
|
+
separately provisioned trigger authority (the signer holds only its public key).
|
|
55
|
+
Never paste a seed, key, passphrase, or signer token into Oracle chat or argv.
|
|
55
56
|
|
|
56
57
|
---
|
|
57
58
|
|
|
@@ -97,14 +98,15 @@ decides what may even be asked.
|
|
|
97
98
|
|
|
98
99
|
Three properties define it:
|
|
99
100
|
|
|
100
|
-
1. **Self-custody by default.**
|
|
101
|
-
key.
|
|
102
|
-
signs them.
|
|
101
|
+
1. **Self-custody by default.** Hosted/public-plane code never accepts your
|
|
102
|
+
private key. Oracle builds unsigned transactions and typed-data intents; your
|
|
103
|
+
wallet signs them. A self-hoster may separately import their key into the
|
|
104
|
+
encrypted local vault; it never reaches the model or public HTTP process.
|
|
103
105
|
2. **Bound grants.** A grant is a signed, scoped, expiring permission: max
|
|
104
106
|
value, chain, venue, destination allowlist, TTL. Oracle canonicalizes it,
|
|
105
107
|
renders it for review, and refuses to prepare anything outside it. Runtime
|
|
106
|
-
enforcement is the wallet's
|
|
107
|
-
|
|
108
|
+
enforcement is the wallet's, smart account's, or self-hosted local signer's
|
|
109
|
+
job. Every local signer action still requires the exact policy-bound artifact.
|
|
108
110
|
3. **Receipts or it didn't happen.** A claim without a transaction hash, a
|
|
109
111
|
receipt, and a balance delta is not a result.
|
|
110
112
|
|
|
@@ -149,13 +151,14 @@ Three planes, and the boundary between them is mechanically enforced:
|
|
|
149
151
|
- **Policy plane** (public) — destination allowlists, slippage guards, route and
|
|
150
152
|
vault attestations, grant schema. Holds no keys; constrains what a signer may
|
|
151
153
|
be asked to do.
|
|
152
|
-
- **Exec plane** (
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
- **Exec plane** (self-hosted, optional) — the public package can run an
|
|
155
|
+
encrypted, short-lived loopback signer for the user's own key. It is isolated
|
|
156
|
+
from the public HTTP/data plane and requires exact confirmation plus policy
|
|
157
|
+
checks. The broader Admin executor remains a separate private package.
|
|
155
158
|
|
|
156
|
-
`test/custody-boundary.test.mjs` walks the import graph and fails if
|
|
157
|
-
|
|
158
|
-
promise.
|
|
159
|
+
`test/custody-boundary.test.mjs` walks the public-plane import graph and fails if
|
|
160
|
+
it reaches local vault material, private Admin modules, or a house signer. The
|
|
161
|
+
split is a test, not a promise.
|
|
159
162
|
|
|
160
163
|
## Coverage
|
|
161
164
|
|
|
@@ -301,13 +304,14 @@ npm test
|
|
|
301
304
|
owner-local source lane.** The short version:
|
|
302
305
|
|
|
303
306
|
- Reads and quotes need **no keys**.
|
|
304
|
-
-
|
|
305
|
-
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
307
|
+
- Hosted public surfaces expose no signer, key vault, or house-key broadcast path.
|
|
308
|
+
- The self-hosted public package includes an optional encrypted, loopback-only
|
|
309
|
+
local signer for the user's own key. Once its vault exists, user-initiated
|
|
310
|
+
swaps and bridges are armed equally; exact one-use confirmation, sealed policy
|
|
311
|
+
rails, caps, and non-empty allowlists still gate every broadcast.
|
|
312
|
+
- User wallets may instead authorize prepared transaction sequences directly.
|
|
313
|
+
- The separate private Admin package adds operator-only venue surfaces and is
|
|
314
|
+
not published on npm.
|
|
311
315
|
|
|
312
316
|
### Action vocabulary and execution planes
|
|
313
317
|
|
|
@@ -316,15 +320,17 @@ Oracle keeps capability and authorization separate:
|
|
|
316
320
|
- Public Oracle reads, quotes, simulates, and prepares unsigned artifacts.
|
|
317
321
|
- **Path A:** owner/main, browser, smart-account, hardware, or protocol-native
|
|
318
322
|
wallets sign the prepared artifact. This is the default self-custody path.
|
|
319
|
-
- **Path B:**
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
+
- **Path B:** a self-hoster may initialize the public package's encrypted local
|
|
324
|
+
vault and short-lived loopback signer. Key presence arms both swaps and bridges;
|
|
325
|
+
policy decides what is allowed, and exact human confirmation remains mandatory.
|
|
326
|
+
- **Path C:** the separate private Admin package may sign additional bounded
|
|
327
|
+
venue actions on the owner's machine. It must never expose a vault passphrase
|
|
328
|
+
or signer credential to the model process.
|
|
323
329
|
- The generic unattended signer exposes six bounded surfaces: `hl`, `poly`,
|
|
324
330
|
`evm-swap`, `evm-bridge`, `btc`, `sol`. Each surface decodes its own
|
|
325
331
|
envelope, enforces its caps, and refuses while its allowlists are empty.
|
|
326
|
-
- Ordinary EVM preparation remains user-wallet signed unless
|
|
327
|
-
|
|
332
|
+
- Ordinary EVM preparation remains user-wallet signed unless the self-hoster has
|
|
333
|
+
initialized and unlocked their own local signer. No Oracle-hosted key exists.
|
|
328
334
|
- `ORACLE_AUTONOMOUS_TRADING=1` is direct execution for trusted owner-controlled
|
|
329
335
|
local code only. It is never model/agent authority and should not be framed as
|
|
330
336
|
equivalent to the `oracle-signer` agent-process path.
|
package/SETUP.md
CHANGED
|
@@ -32,8 +32,29 @@ oracle sign lock
|
|
|
32
32
|
Configure and HMAC-seal `~/.config/oracle/signer/signer-policy.json` with non-empty surface, action, chain,
|
|
33
33
|
destination, selector, spender, and owner allowlists plus explicit value,
|
|
34
34
|
approval, gas/fee, slippage, expiry, and RPC bounds. Empty allowlists fail
|
|
35
|
-
closed. Exact one-use confirmation binds the final gas-populated artifact
|
|
36
|
-
|
|
35
|
+
closed. Exact one-use confirmation binds the final gas-populated artifact. For
|
|
36
|
+
reviewed EVM swap/bridge batches the TTY review is decoded from calldata and
|
|
37
|
+
shows each approval's token/spender/amount, the reviewed provider, input/output
|
|
38
|
+
tokens, amount in, minimum out, recipient, bridge destination chain/asset, and
|
|
39
|
+
aggregate gas/value/maximum fee before asking for the digest. Caller summary
|
|
40
|
+
metadata is never used for this review. The decoded minimum out must exactly
|
|
41
|
+
match a fresh HMAC-authenticated auto-slippage quote bound to the full calldata;
|
|
42
|
+
the caller's `slippageBps` label is not authority. Swap and allowance selectors
|
|
43
|
+
known elsewhere in Oracle either use this strict decoded batch path or fail
|
|
44
|
+
closed on generic/unversioned EVM surfaces. Generic approvals are refused rather
|
|
45
|
+
than prompting without the exact token, spender, and amount. The artifact is checked again
|
|
46
|
+
immediately before broadcast. Lock/disarm always wins.
|
|
47
|
+
|
|
48
|
+
Autonomous mode additionally requires an Ed25519 trigger authority that is
|
|
49
|
+
separate from the signer and its HMAC policy-integrity key. Provision only that
|
|
50
|
+
authority's PEM public key as owner-only
|
|
51
|
+
`~/.config/oracle/signer/trigger-attestation-authority.pub`; keep the private key
|
|
52
|
+
outside the signer config and signer process. A trigger authority signs canonical
|
|
53
|
+
JSON containing exactly `triggerId`, `issuedAtMs`, `expiresAtMs`, and the final
|
|
54
|
+
`artifactDigest`, and sends `algorithm: "ed25519-canonical-json-v1"` plus the
|
|
55
|
+
base64 signature. `ORACLE_AUTONOMOUS_TRADING=1` does not bypass this verification.
|
|
56
|
+
The public `@oracle-agent/oracle/local-signer` export contains neither attestation
|
|
57
|
+
minting nor filesystem key-reading helpers.
|
|
37
58
|
|
|
38
59
|
Service templates ship under `public/service/` for Linux systemd, macOS
|
|
39
60
|
launchd, and Windows Task Scheduler/PowerShell. Linux/macOS can retrieve the
|
|
@@ -7,7 +7,8 @@ adapters fail closed.
|
|
|
7
7
|
|
|
8
8
|
## What you own
|
|
9
9
|
|
|
10
|
-
Chain-family token/NFT launch manifests, contract
|
|
10
|
+
Chain-family token/NFT launch manifests, EVM contract scaffolding, Solana Rust/Anchor
|
|
11
|
+
program bundles, Bitcoin Miniscript/Tapscript policy bundles,
|
|
11
12
|
NFT/gacha mint mechanics, DEX/pool/launchpad design, security review, deploy and
|
|
12
13
|
verify scripts, and **unsigned** deploy transactions. Research of existing
|
|
13
14
|
protocols before cloning them.
|
|
@@ -50,6 +51,10 @@ what an attacker gains from each privileged function.
|
|
|
50
51
|
`GUIDED_BUILD`, `RESEARCH_ONLY`, or `UNSUPPORTED`. RPC reachability is not deploy support.
|
|
51
52
|
7. **One approval per side effect.** Deploy, metadata upload, mint, liquidity,
|
|
52
53
|
authority transfer/revoke, reveal, and verification remain separate.
|
|
54
|
+
8. **Bitcoin is not EVM.** Build UTXO policies, descriptors, scripts, and PSBT plans;
|
|
55
|
+
never call them contracts or imply arbitrary mutable state.
|
|
56
|
+
9. **Solana identity stays public-only.** A program id and authority pubkey may enter
|
|
57
|
+
the builder; program keypairs, seeds, and private keys may not.
|
|
53
58
|
|
|
54
59
|
## Voice
|
|
55
60
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"label": "protocol builder",
|
|
5
5
|
"role": "builder",
|
|
6
6
|
"color": "#ff8c5a",
|
|
7
|
-
"description": "Builder lane for
|
|
7
|
+
"description": "Builder lane for EVM contracts, Solana programs, Bitcoin spending policies, chain-family token/NFT collections, gacha, DEX, scanner, and unsigned preparation.",
|
|
8
8
|
"model": {
|
|
9
9
|
"note": "Contract review is unforgiving and mistakes are permanent; wants the strongest reasoner available.",
|
|
10
10
|
"suggested": "strong-reasoner"
|
|
@@ -97,7 +97,7 @@ does not prove npm users receive it. A locally hosted model/data/policy loop doe
|
|
|
97
97
|
a bundled signer. A merged feature is not public until the npm artifact containing it is
|
|
98
98
|
published and inspected.
|
|
99
99
|
|
|
100
|
-
**
|
|
100
|
+
**Candidate release in this source tree:** public package `@oracle-agent/oracle@0.24.7`
|
|
101
101
|
ships the optional encrypted local vault + short-lived loopback signer. Hosted/default
|
|
102
102
|
Oracle stays prepare-only. Self-host after `oracle sign init|import` is **auto-armed**
|
|
103
103
|
for user-initiated actions. Public still charges the disclosed fee card; Administrator
|
|
@@ -47,8 +47,8 @@ three separate capabilities.
|
|
|
47
47
|
| Family | Collection primitive | Default status | Required path |
|
|
48
48
|
|---|---|---|---|
|
|
49
49
|
| EVM | ERC-721, ERC-1155, ERC-2981 | `GUIDED_BUILD` until a gated Oracle collection template ships | Foundry tests, metadata/reveal tests, fork simulation, unsigned deploy |
|
|
50
|
-
| Solana | Metaplex Core, Token Metadata collection, Candy Machine/drop programs | `GUIDED_BUILD` |
|
|
51
|
-
| Bitcoin | Ordinals parent/child inscriptions
|
|
50
|
+
| Solana | Metaplex Core, Token Metadata collection, Candy Machine/drop programs, custom Anchor programs | `GUIDED_BUILD` | Native Anchor scaffolds are available; select one standard, validate authorities, compile/test, and simulate ordered unsigned transactions |
|
|
51
|
+
| Bitcoin | Ordinals parent/child inscriptions, indexer collection manifests, and Taproot policy components | `GUIDED_BUILD` for content, policy, and commit/reveal planning; adapter evidence required for `ADAPTER_READY` | Provenance manifest, parent link, descriptor/script review, UTXO/fee/reveal safety |
|
|
52
52
|
| Cosmos | CW721 or chain-native NFT module | `RESEARCH_ONLY` by default | Verify chain-specific instantiate/execute messages and migration admin |
|
|
53
53
|
| Sui | object-based collection and kiosk ecosystem | `RESEARCH_ONLY` by default | Move package, object capabilities, display metadata, testnet publish |
|
|
54
54
|
| Aptos | Digital Asset standard or chain-native collection objects | `RESEARCH_ONLY` by default | Collection/mint refs, mutation permissions, testnet publish |
|
|
@@ -43,8 +43,8 @@ simulation, fee estimate, and source/program verification path.
|
|
|
43
43
|
| Family | Common standards | Default status | Required path |
|
|
44
44
|
|---|---|---|---|
|
|
45
45
|
| EVM | ERC-20 | `TEMPLATE_READY` only for Oracle `safe-erc20`; custom tax, mint, proxy, or hook designs are `GUIDED_BUILD` | Foundry gate, chain-id proof, unsigned deploy, source verification |
|
|
46
|
-
| Solana | SPL Token, Token-2022 | `GUIDED_BUILD` |
|
|
47
|
-
| Bitcoin | Runes | `RESEARCH_ONLY` until an etch adapter is present |
|
|
46
|
+
| Solana | SPL Token, Token-2022, custom Anchor programs | `GUIDED_BUILD` | Native program scaffolds are available through `buildNative`; deployment still requires Anchor compile/test/simulation and unsigned transaction preparation |
|
|
47
|
+
| Bitcoin | Runes and Taproot spending protocols | `GUIDED_BUILD` for `bitcoin-tapscript-vault`; Runes stay `RESEARCH_ONLY` until an etch adapter is present | Build reviewed policy/descriptor artifacts; compile and satisfy on regtest/signet; funding and PSBT preparation stay separate |
|
|
48
48
|
| Cosmos | tokenfactory, CW20 | `RESEARCH_ONLY` by default | Resolve the chain's module or CosmWasm messages; EVM-enabled Cosmos chains use the EVM path only when verified |
|
|
49
49
|
| Sui | Coin, regulated coin primitives | `RESEARCH_ONLY` by default | Move package, treasury capability model, devnet/testnet publish first |
|
|
50
50
|
| Aptos | Coin, Fungible Asset | `RESEARCH_ONLY` by default | Move module/object model, upgrade policy, testnet publish first |
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oracle-protocol-builder
|
|
3
|
-
description: Use when the user wants Oracle to
|
|
3
|
+
description: Use when the user wants Oracle to build EVM, Solana, or Bitcoin protocol artifacts. Chain-native gates; prepare-only; not a firm audit.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Protocol builder
|
|
7
7
|
|
|
8
|
-
Oracle scaffolds
|
|
8
|
+
Oracle scaffolds EVM contracts, Solana programs, and Bitcoin spending policies, then
|
|
9
|
+
prepares unsigned side effects only after the matching chain gate is green. The user
|
|
10
|
+
signs. Custody boundary unchanged.
|
|
9
11
|
|
|
10
12
|
## Security gate (v1)
|
|
11
13
|
|
|
@@ -30,6 +32,40 @@ data.call("protocol-templates", "prepareDeploy", {
|
|
|
30
32
|
|
|
31
33
|
CLI: `npm run protocol:gate -- safe-erc20`
|
|
32
34
|
|
|
35
|
+
## Native protocol builders
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
// Native catalog
|
|
39
|
+
data.call("protocol-templates", "listNative")
|
|
40
|
+
|
|
41
|
+
// Solana Anchor program scaffold. programId is caller-generated public identity;
|
|
42
|
+
// Oracle never accepts or emits its secret key.
|
|
43
|
+
data.call("protocol-templates", "buildNative", {
|
|
44
|
+
templateId: "solana-safe-vault",
|
|
45
|
+
projectName: "treasury_vault",
|
|
46
|
+
network: "devnet",
|
|
47
|
+
programId,
|
|
48
|
+
authority,
|
|
49
|
+
unlockDelaySlots: 1200,
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
// Bitcoin Taproot policy scaffold. Returns descriptor/address/scripts, not a PSBT.
|
|
53
|
+
data.call("protocol-templates", "buildNative", {
|
|
54
|
+
templateId: "bitcoin-tapscript-vault",
|
|
55
|
+
projectName: "cold_treasury",
|
|
56
|
+
network: "signet",
|
|
57
|
+
threshold: 2,
|
|
58
|
+
signerPubkeys,
|
|
59
|
+
recoveryPubkey,
|
|
60
|
+
recoveryDelayBlocks: 144,
|
|
61
|
+
})
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Both are `GUIDED_BUILD`, not `ADAPTER_READY`: the result is a hashed source/policy
|
|
65
|
+
bundle. Solana still requires `anchor build`, `anchor test`, and cluster simulation.
|
|
66
|
+
Bitcoin still requires descriptor compilation and spend-path tests on regtest or
|
|
67
|
+
signet before funding. Neither operation deploys, funds, signs, or broadcasts.
|
|
68
|
+
|
|
33
69
|
## Shipped template: `safe-erc20`
|
|
34
70
|
|
|
35
71
|
- Fixed supply, mint once in constructor (no hidden mint)
|
|
@@ -39,7 +75,7 @@ CLI: `npm run protocol:gate -- safe-erc20`
|
|
|
39
75
|
|
|
40
76
|
## Honesty
|
|
41
77
|
|
|
42
|
-
**Reviewed templates + automated tests ≠ paid Solidity audit.**
|
|
78
|
+
**Reviewed templates + automated tests ≠ a paid Solidity, Solana, or Bitcoin audit.**
|
|
43
79
|
|
|
44
80
|
Docs and prepare envelopes always set `firmAudit: false` and carry the disclaimer.
|
|
45
81
|
Mainnet TVL → independent firm audit.
|
|
@@ -48,11 +84,11 @@ Mainnet TVL → independent firm audit.
|
|
|
48
84
|
|
|
49
85
|
1. Authority model
|
|
50
86
|
2. Threat model
|
|
51
|
-
3.
|
|
52
|
-
4. Static analysis when available
|
|
53
|
-
5. Gate green
|
|
54
|
-
6. Prepare unsigned only
|
|
55
|
-
7. User signs + verify source
|
|
87
|
+
3. Chain-native tests (Foundry, Anchor, or regtest/signet policy vectors)
|
|
88
|
+
4. Static analysis when available
|
|
89
|
+
5. Gate green
|
|
90
|
+
6. Prepare unsigned only
|
|
91
|
+
7. User signs + verify source
|
|
56
92
|
|
|
57
93
|
## Refusal line
|
|
58
94
|
|