@temporalabs/treasury 0.1.1 → 0.1.2
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/NOTICE +4 -2
- package/README.md +68 -44
- package/THIRD_PARTY_NOTICES.connect-page.md +7420 -0
- package/THIRD_PARTY_NOTICES.md +4 -196
- package/dist/cli.d.ts +6 -0
- package/dist/cli.js +220 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.d.ts +224 -239
- package/dist/client.js +147 -25
- package/dist/client.js.map +1 -1
- package/dist/config/earn.d.ts +33 -12
- package/dist/config/earn.js +33 -12
- package/dist/config/earn.js.map +1 -1
- package/dist/connect/ack.d.ts +59 -0
- package/dist/connect/ack.js +111 -0
- package/dist/connect/ack.js.map +1 -0
- package/dist/connect/commands.d.ts +78 -0
- package/dist/connect/commands.js +411 -0
- package/dist/connect/commands.js.map +1 -0
- package/dist/connect/config.d.ts +22 -0
- package/dist/connect/config.js +33 -0
- package/dist/connect/config.js.map +1 -0
- package/dist/connect/gate.d.ts +37 -0
- package/dist/connect/gate.js +115 -0
- package/dist/connect/gate.js.map +1 -0
- package/dist/connect/http.d.ts +54 -0
- package/dist/connect/http.js +205 -0
- package/dist/connect/http.js.map +1 -0
- package/dist/connect/open.d.ts +2 -0
- package/dist/connect/open.js +35 -0
- package/dist/connect/open.js.map +1 -0
- package/dist/connect/page.d.ts +5 -0
- package/dist/connect/page.js +69 -0
- package/dist/connect/page.js.map +1 -0
- package/dist/connect/session.d.ts +16 -0
- package/dist/connect/session.js +73 -0
- package/dist/connect/session.js.map +1 -0
- package/dist/connect/verify.d.ts +37 -0
- package/dist/connect/verify.js +89 -0
- package/dist/connect/verify.js.map +1 -0
- package/dist/connect-page.js +5141 -0
- package/dist/disclosures.d.ts +21 -6
- package/dist/disclosures.js +32 -7
- package/dist/disclosures.js.map +1 -1
- package/dist/earn/commands.d.ts +46 -0
- package/dist/earn/commands.js +483 -0
- package/dist/earn/commands.js.map +1 -0
- package/dist/links.d.ts +2 -0
- package/dist/links.js +38 -14
- package/dist/links.js.map +1 -1
- package/dist/position.d.ts +7 -5
- package/dist/position.js +35 -18
- package/dist/position.js.map +1 -1
- package/dist/preflight.d.ts +9 -0
- package/dist/preflight.js +14 -3
- package/dist/preflight.js.map +1 -1
- package/dist/quote.js +24 -7
- package/dist/quote.js.map +1 -1
- package/dist/redact.d.ts +3 -3
- package/dist/redact.js +3 -3
- package/dist/redact.js.map +1 -1
- package/dist/registry-schema.d.ts +5 -5
- package/dist/registry-schema.js +30 -16
- package/dist/registry-schema.js.map +1 -1
- package/dist/registry.d.ts +29 -6
- package/dist/registry.js +76 -13
- package/dist/registry.js.map +1 -1
- package/dist/{mcp-server.mjs → treasury.mjs} +29276 -44702
- package/dist/version.js +1 -1
- package/package.json +5 -5
- package/registry/vaults.json +105 -4
- package/dist/mcp/server.d.ts +0 -8
- package/dist/mcp/server.js +0 -368
- package/dist/mcp/server.js.map +0 -1
package/NOTICE
CHANGED
|
@@ -3,8 +3,10 @@ Copyright 2026 Tempora Labs
|
|
|
3
3
|
|
|
4
4
|
This product includes software developed by Tempora Labs.
|
|
5
5
|
|
|
6
|
-
The third-party components bundled into dist/
|
|
7
|
-
reproduced in full, for the exact version bundled, in THIRD_PARTY_NOTICES.md.
|
|
6
|
+
The third-party components bundled into dist/treasury.mjs keep their own licences. Each is
|
|
7
|
+
reproduced in full, for the exact version bundled, in THIRD_PARTY_NOTICES.md. The same holds for
|
|
8
|
+
dist/connect-page.js, the page `treasury connect` serves, whose components are reproduced in
|
|
9
|
+
THIRD_PARTY_NOTICES.connect-page.md.
|
|
8
10
|
|
|
9
11
|
"Tempora", "Tempora Labs" and "Agent Treasury" are names of Tempora Labs. The Apache License
|
|
10
12
|
(section 6) does not grant permission to use them beyond describing where the work came from.
|
package/README.md
CHANGED
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
Open Agent Treasury (OAT) helps agents manage on-chain capital. Its first skill, **Earn**, lets
|
|
14
|
-
agents inspect
|
|
15
|
-
withdrawals. It ships as an agent plugin,
|
|
14
|
+
agents inspect vaults curated by Tempora Labs on Base, Arbitrum One and Robinhood Chain, track positions, and prepare deposits and
|
|
15
|
+
withdrawals. It ships as an agent plugin, a command-line program, and a TypeScript/JavaScript library.
|
|
16
16
|
|
|
17
|
-
**OAT prepares transactions. Your
|
|
18
|
-
|
|
17
|
+
**OAT prepares transactions. Your wallet executes them.** It never holds private keys or signs: with
|
|
18
|
+
`treasury connect` your agent opens a page where you connect your own wallet — a browser wallet, or
|
|
19
|
+
an email or social login — and confirm each transaction; or it hands you unsigned calls for any signer.
|
|
20
|
+
A transaction goes out only from your own wallet, after you approve it there. You decide how much capital an agent may put to work.
|
|
19
21
|
|
|
20
22
|
> **Experimental — pre-1.0. Real funds, real risk.** Returns are variable, capital is at risk,
|
|
21
23
|
> and withdrawals depend on available liquidity. Review every transaction before signing and
|
|
@@ -28,51 +30,44 @@ or sends transactions. You decide how much capital an agent may put to work.
|
|
|
28
30
|
- **Track a position:** see its value, deposits, and earnings from on-chain records.
|
|
29
31
|
- **Prepare a withdrawal:** check how much is withdrawable now and build unsigned calls.
|
|
30
32
|
|
|
31
|
-
Earn currently supports **USDC in, USDC out** through Tempora'
|
|
32
|
-
|
|
33
|
+
Earn currently supports **USDC in, USDC out** through Tempora Labs' ERC-4626 vaults on Base and
|
|
34
|
+
Arbitrum One, and **USDG in, USDG out** on Robinhood Chain. Base is the default chain, and Test 2B its
|
|
35
|
+
default vault; the agent asks which chain when you have not said, and the funds have to be on that
|
|
36
|
+
chain already. See [Vaults](#vaults).
|
|
37
|
+
See the [command reference](docs/tools.md), the eight `earn` commands and the five `connect` commands, for inputs, outputs, and limits.
|
|
33
38
|
|
|
34
39
|
## Quick start
|
|
35
40
|
|
|
36
|
-
**Requires Node.js 22+ on your `PATH`.** Use a keyed
|
|
41
|
+
**Requires Node.js 22+ on your `PATH`.** Use a keyed RPC for each chain you use; the public fallbacks rate-limit quickly.
|
|
37
42
|
|
|
38
43
|
### Claude Code
|
|
39
44
|
|
|
40
45
|
```bash
|
|
41
|
-
export TREASURY_RPC_BASE=https://...
|
|
42
|
-
|
|
46
|
+
export TREASURY_RPC_BASE=https://... # replace with your Base RPC URL
|
|
47
|
+
export TREASURY_RPC_ARBITRUM=https://... # only if you will use a vault on Arbitrum One
|
|
48
|
+
export TREASURY_RPC_ROBINHOOD=https://... # only if you will use a vault on Robinhood Chain
|
|
49
|
+
claude plugin marketplace add TemporaLabs/treasury@v0.1.2
|
|
43
50
|
claude plugin install treasury@treasury
|
|
44
51
|
```
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
Start a new Claude Code session after installing so the Earn skill loads. Keep the `TemporaLabs/treasury@v0.1.2` ref
|
|
47
54
|
explicit so the install stays on a release rather than tracking the default branch. Upgrading an
|
|
48
55
|
earlier install? Run `claude plugin marketplace remove treasury` first, then the two `claude plugin` lines above
|
|
49
56
|
([details](docs/install.md#upgrading-an-earlier-install)).
|
|
50
57
|
|
|
51
58
|
The plugin is the [`plugin/`](plugin/) folder of this repository: its manifests, the Earn skill, and a
|
|
52
|
-
copy of this repository's own
|
|
59
|
+
copy of this repository's own CLI bundle and the page `treasury connect` serves, made in the same commit. The skill runs it with `node`, one
|
|
60
|
+
command at a time; nothing stays running.
|
|
53
61
|
|
|
54
|
-
###
|
|
62
|
+
### Any agent with a shell
|
|
55
63
|
|
|
56
64
|
```bash
|
|
57
|
-
npm install @temporalabs/treasury@0.1.
|
|
65
|
+
npm install --save-exact @temporalabs/treasury@0.1.2
|
|
66
|
+
npx --no-install treasury earn --help # every command and flag, as JSON
|
|
58
67
|
```
|
|
59
68
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"mcpServers": {
|
|
65
|
-
"treasury": {
|
|
66
|
-
"command": "node",
|
|
67
|
-
"args": ["<absolute-project-path>/node_modules/@temporalabs/treasury/dist/mcp-server.mjs"],
|
|
68
|
-
"env": { "TREASURY_RPC_BASE": "https://..." }
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Running the bundle by path, as shown, works for every version; from v0.1.1 the `treasury-mcp` command also starts the server.
|
|
75
|
-
For library usage, host setup, and troubleshooting, see [installation](docs/install.md).
|
|
69
|
+
Each command prints one JSON document; a refusal exits 1 with `{ "error": … }` on stderr.
|
|
70
|
+
For library usage, other hosts, and troubleshooting, see [installation](docs/install.md).
|
|
76
71
|
|
|
77
72
|
### Try it
|
|
78
73
|
|
|
@@ -80,20 +75,48 @@ Ask your agent:
|
|
|
80
75
|
|
|
81
76
|
> Show me the available vaults and their risks. Then prepare a 25 USDC deposit into the default vault.
|
|
82
77
|
|
|
83
|
-
|
|
78
|
+
To try the demo vault or another chain, name it: *“…into the demo vault”*, or *“…on Arbitrum”*.
|
|
79
|
+
|
|
80
|
+
With a browser on the machine, you sign in once with `treasury connect`. For each deposit the agent first
|
|
81
|
+
shows you a fixed confirmation text, and only on your yes opens a page where you confirm each call in your
|
|
82
|
+
own wallet. Otherwise OAT returns unsigned calls for your signer. Preparing a deposit moves no money.
|
|
84
83
|
Later, ask: **“What is my position worth, and how much can I withdraw now?”**
|
|
85
84
|
|
|
86
85
|
## Vaults
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
A command that names no vault or chain uses **Cash Plus USDC (Test 2B)** on Base; the agent still asks
|
|
88
|
+
which chain first when you have not said. There are other options, and a demo.
|
|
89
|
+
|
|
90
|
+
| | vault | chain | choose it by |
|
|
91
|
+
|---|---|---|---|
|
|
92
|
+
| **Default** | **Cash Plus USDC (Test 2B)** | Base | naming nothing, or `--chain base` |
|
|
93
|
+
| **Demo** | **Cash Plus USDC (Test 2)** | Base | `--vault tlCashPlusUSDC2` |
|
|
94
|
+
| Option | **Cash Plus USDC (Test 2C)** | Arbitrum One | `--chain arbitrum` |
|
|
95
|
+
| Option | **Cash Plus USDG (Test 2D)** | Robinhood Chain | `--chain robinhood` |
|
|
96
|
+
| Option | **Cash Plus USDC (Test 2A)** | Base | `--vault tlCashPlusUSDC2A` (whitelist only) |
|
|
97
|
+
|
|
98
|
+
- **Test 2B, the default.** A Morpho Vault V2 on Base, open to any account. Its first position is a
|
|
99
|
+
savings-rate token rather than a lending vault, and its other two positions differ from Test 2's too
|
|
100
|
+
([how](docs/vaults.md#offered-today)). [BaseScan](https://basescan.org/address/0x91BcEbA5feCB9E92d80F1845B55cC56621E9352F);
|
|
101
|
+
Morpho's own app has no page for it.
|
|
102
|
+
- **Test 2, the demo.** The same kind of vault, and the one to show people: it has a page on Morpho's
|
|
103
|
+
app, [here](https://app.morpho.org/base/vault/0x040fCA12673778FEED5DA7b2ccFbbAb0cc0134Cf/tempora-labs-cash-plus-usdc-test-2#overview).
|
|
104
|
+
Its three positions are different vaults from Test 2B's, and the first is a lending vault. Open to any
|
|
105
|
+
account, but an agent uses it only when it is named.
|
|
106
|
+
- **Test 2C, Arbitrum One.** A Morpho Vault V2 over native USDC, open to any account.
|
|
107
|
+
[Arbiscan](https://arbiscan.io/address/0x4057a63953142Ac2b3E5dB1954Fc14d578662587). The USDC has to
|
|
108
|
+
be on Arbitrum already; OAT does not bridge.
|
|
109
|
+
- **Test 2D, Robinhood Chain.** A Morpho Vault V2 over **USDG**, not USDC, open to any account.
|
|
110
|
+
[Blockscout](https://robinhoodchain.blockscout.com/address/0x758f00731943aA88e8C7fB709e0B727903B4F833).
|
|
111
|
+
The USDG has to be on Robinhood Chain already.
|
|
112
|
+
- **Test 2A.** IPOR Fusion, listed so an admitted account can read and exit its position.
|
|
113
|
+
|
|
114
|
+
When you have not said which chain, the agent shows these and asks before it prepares a deposit.
|
|
115
|
+
|
|
116
|
+
All of them are experimental vaults using real funds (USDC, or USDG on Robinhood Chain), not bank savings accounts. None currently has a
|
|
117
|
+
lock-up, but liquidity can limit withdrawals.
|
|
118
|
+
|
|
119
|
+
Tempora Labs curates these vaults and can set fees. OAT offers Tempora Labs' vaults; it does not compare
|
|
97
120
|
them against the market or promise the best yield. It reports your position's value and earnings,
|
|
98
121
|
not a quoted APY.
|
|
99
122
|
|
|
@@ -101,14 +124,15 @@ See [vault details](docs/vaults.md) for addresses, access rules, fees, and dated
|
|
|
101
124
|
|
|
102
125
|
## Security
|
|
103
126
|
|
|
104
|
-
- **No keys or custody:** your wallet holds the position;
|
|
105
|
-
- **Direct RPC access:** no Tempora service in the request path and no telemetry. Keyed RPC URLs are redacted.
|
|
127
|
+
- **No keys or custody:** your wallet holds the position; Treasury never holds a key. With an email or social login, that wallet's keys are managed by Privy; see [risks](docs/risks.md).
|
|
128
|
+
- **Direct RPC access:** the `earn` commands talk only to the chain's RPC (yours, or the chain's public endpoint when none is set or a history scan needs it; see [configuration](docs/configuration.md)), with no Tempora Labs service in the request path and no telemetry. Keyed RPC URLs are redacted.
|
|
129
|
+
- **Sign-in through Privy:** `treasury connect` signs you in through [Privy](https://privy.io), using Tempora Labs' Privy app unless you set `PRIVY_APP_ID`. Privy, and Tempora Labs as that app's owner, see your login and wallet address, and Privy's script on the page sends its own analytics. The page also loads Cloudflare's bot check (challenges.cloudflare.com) for Privy's sign-in.
|
|
106
130
|
- **Verifiable builds:** CI checks the committed bundle; [verify its provenance](docs/runbooks/verify_the_bundle.md).
|
|
107
131
|
- **Private vulnerability reporting:** follow [SECURITY.md](SECURITY.md), not a public issue.
|
|
108
132
|
|
|
109
133
|
## Documentation
|
|
110
134
|
|
|
111
|
-
- [
|
|
135
|
+
- [Command reference](docs/tools.md) · [Configuration](docs/configuration.md)
|
|
112
136
|
- [Risks](docs/risks.md) · [Security model](docs/security-model.md)
|
|
113
137
|
- [Signing and sending](docs/runbooks/sign_and_send.md) · [All docs](docs/README.md) · [Changelog](CHANGELOG.md)
|
|
114
138
|
|
|
@@ -121,6 +145,6 @@ certifying the [Developer Certificate of Origin](DCO.md).
|
|
|
121
145
|
## Licence
|
|
122
146
|
|
|
123
147
|
[Apache-2.0](LICENSE). Keep [LICENSE](LICENSE) and [NOTICE](NOTICE) when redistributing.
|
|
124
|
-
The licence does not grant rights to Tempora'
|
|
125
|
-
official distribution. Tempora'
|
|
148
|
+
The licence does not grant rights to Tempora Labs' names or marks ("Tempora", "Tempora Labs" and "Agent Treasury", as NOTICE lists them); forks must not claim to be the
|
|
149
|
+
official distribution. Tempora Labs' fund-operations infrastructure is separate from this repository.
|
|
126
150
|
See [licensing](docs/licensing.md) for details.
|