@temporalabs/treasury 0.1.0 → 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 +108 -111
- 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 +80 -16
- package/dist/registry.js.map +1 -1
- package/dist/{mcp-server.mjs → treasury.mjs} +29289 -44702
- package/dist/version.js +6 -3
- package/dist/version.js.map +1 -1
- package/package.json +9 -7
- package/registry/vaults.json +105 -4
- package/dist/mcp/server.d.ts +0 -33
- package/dist/mcp/server.js +0 -346
- 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
|
@@ -1,153 +1,150 @@
|
|
|
1
|
-
# Agent Treasury
|
|
1
|
+
# Open Agent Treasury
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**The open-source treasury management system (TMS) for AI agents.** Built by Tempora Labs and contributors.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/TemporaLabs/treasury/actions/workflows/ci.yml)
|
|
6
6
|
[](https://github.com/TemporaLabs/treasury/actions/workflows/dco.yml)
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
withdrawals. The agent's own wallet stays the account and the agent's own signer stays the only
|
|
12
|
-
thing that can move money — Agent Treasury prepares unsigned transactions; it never signs.
|
|
8
|
+
<p align="center">
|
|
9
|
+
<img src="docs/assets/oat-mascot.svg" alt="Open Agent Treasury mascot: a blue pirate robot holding a purple treasure chest" width="320" height="320">
|
|
10
|
+
</p>
|
|
13
11
|
|
|
14
|
-
> **Experimental — pre-1.0.** Behaviour may change between versions. Review every transaction before
|
|
15
|
-
> signing it, and read [`docs/risks.md`](docs/risks.md) before a first deposit.
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
Open Agent Treasury (OAT) helps agents manage on-chain capital. Its first skill, **Earn**, lets
|
|
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.
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
treasurer works under built in: it can measure, decide and prepare, and only the owner's signer can
|
|
24
|
-
execute.
|
|
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.
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
> **Experimental — pre-1.0. Real funds, real risk.** Returns are variable, capital is at risk,
|
|
23
|
+
> and withdrawals depend on available liquidity. Review every transaction before signing and
|
|
24
|
+
> read the [risks](docs/risks.md) before depositing.
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
manage the position.
|
|
26
|
+
## What you can do
|
|
30
27
|
|
|
31
|
-
- **
|
|
32
|
-
|
|
33
|
-
- **
|
|
34
|
-
|
|
35
|
-
- **Withdraw.** Some or all, subject to the vault's available liquidity. No vault offered today has a
|
|
36
|
-
lock-up or queues withdrawals: a withdrawal settles in the same transaction, and the skill
|
|
37
|
-
measures what can be withdrawn *right now* before you sign.
|
|
28
|
+
- **Inspect vaults:** check assets, fees, and deposit access.
|
|
29
|
+
- **Prepare a deposit:** review terms and simulate access before building unsigned calls.
|
|
30
|
+
- **Track a position:** see its value, deposits, and earnings from on-chain records.
|
|
31
|
+
- **Prepare a withdrawal:** check how much is withdrawable now and build unsigned calls.
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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.
|
|
42
38
|
|
|
43
|
-
|
|
44
|
-
agent ──▶ Agent Treasury ──▶ { requires_signature: true, status: "unsigned", calls: [...] }
|
|
45
|
-
│
|
|
46
|
-
your signer — a wallet, a policy engine, a token-bound account
|
|
47
|
-
│
|
|
48
|
-
Base
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Agent Treasury cannot sign, send or transfer, and there is no tool that would let it. A test fails
|
|
52
|
-
the build if anything in this package reads a private key.
|
|
53
|
-
|
|
54
|
-
## Where the money goes
|
|
39
|
+
## Quick start
|
|
55
40
|
|
|
56
|
-
|
|
57
|
-
on-chain lending markets. **Cash Plus USDC** is the offering: stablecoin only, no lock-up, yield
|
|
58
|
-
from lending, positions readable on-chain by anyone. These are experimental, yield-bearing vault
|
|
59
|
-
positions, not bank savings accounts: returns are variable, capital is at risk, and a withdrawal
|
|
60
|
-
depends on the liquidity available when it is made.
|
|
41
|
+
**Requires Node.js 22+ on your `PATH`.** Use a keyed RPC for each chain you use; the public fallbacks rate-limit quickly.
|
|
61
42
|
|
|
62
|
-
|
|
63
|
-
|---|---|---|---|
|
|
64
|
-
| **Cash Plus USDC (Test 2)** — the default | Morpho Vault V2 | open to any account | [`0x040fCA…134Cf`](https://basescan.org/address/0x040fCA12673778FEED5DA7b2ccFbbAb0cc0134Cf) |
|
|
65
|
-
| Cash Plus USDC (Test 2A) | IPOR Fusion | whitelist-gated | [`0x1516D2…299ef`](https://basescan.org/address/0x1516D2c082b9cc9af852B1Ebc828f168F27299ef) |
|
|
66
|
-
|
|
67
|
-
**The default is Cash Plus USDC (Test 2).** It lends through Morpho on Base, keeps a liquid balance
|
|
68
|
-
for withdrawals, and any account can deposit. "Test" is in the name on purpose: these are the
|
|
69
|
-
test-series vaults — real contracts, real USDC, real positions — operated by Tempora while the
|
|
70
|
-
product is proven. The full detail, with the block each fact was measured at, is in
|
|
71
|
-
[`docs/vaults.md`](docs/vaults.md).
|
|
43
|
+
### Claude Code
|
|
72
44
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
45
|
+
```bash
|
|
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
|
|
50
|
+
claude plugin install treasury@treasury
|
|
51
|
+
```
|
|
76
52
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
events. The live rate is
|
|
82
|
-
on-chain, and a yield is always a measurement of the past, not a promise.
|
|
53
|
+
Start a new Claude Code session after installing so the Earn skill loads. Keep the `TemporaLabs/treasury@v0.1.2` ref
|
|
54
|
+
explicit so the install stays on a release rather than tracking the default branch. Upgrading an
|
|
55
|
+
earlier install? Run `claude plugin marketplace remove treasury` first, then the two `claude plugin` lines above
|
|
56
|
+
([details](docs/install.md#upgrading-an-earlier-install)).
|
|
83
57
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
58
|
+
The plugin is the [`plugin/`](plugin/) folder of this repository: its manifests, the Earn skill, and a
|
|
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.
|
|
87
61
|
|
|
88
|
-
|
|
62
|
+
### Any agent with a shell
|
|
89
63
|
|
|
64
|
+
```bash
|
|
65
|
+
npm install --save-exact @temporalabs/treasury@0.1.2
|
|
66
|
+
npx --no-install treasury earn --help # every command and flag, as JSON
|
|
90
67
|
```
|
|
91
|
-
you Put 25 USDC to work.
|
|
92
68
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{ requires_signature: true, status: "unsigned",
|
|
96
|
-
calls: [ approve(USDC → vault, 25 USDC), deposit(25 USDC, account) ] }
|
|
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).
|
|
97
71
|
|
|
98
|
-
|
|
72
|
+
### Try it
|
|
99
73
|
|
|
100
|
-
|
|
74
|
+
Ask your agent:
|
|
101
75
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
agent 25.09 USDC; 25.09 withdrawable now. Put in 25.00, earned 0.09.
|
|
105
|
-
```
|
|
76
|
+
> Show me the available vaults and their risks. Then prepare a 25 USDC deposit into the default vault.
|
|
106
77
|
|
|
107
|
-
|
|
78
|
+
To try the demo vault or another chain, name it: *“…into the demo vault”*, or *“…on Arbitrum”*.
|
|
108
79
|
|
|
109
|
-
|
|
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.
|
|
83
|
+
Later, ask: **“What is my position worth, and how much can I withdraw now?”**
|
|
110
84
|
|
|
111
|
-
|
|
112
|
-
claude plugin marketplace add TemporaLabs/treasury-plugin@v0.1.0
|
|
113
|
-
claude plugin install treasury@treasury
|
|
114
|
-
export TREASURY_RPC_BASE=https://... # a keyed Base RPC; unset = the public RPC, which rate-limits quickly
|
|
115
|
-
```
|
|
85
|
+
## Vaults
|
|
116
86
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
suffix tracks the plugin repository's default branch.
|
|
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.
|
|
120
89
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
|
120
|
+
them against the market or promise the best yield. It reports your position's value and earnings,
|
|
121
|
+
not a quoted APY.
|
|
122
|
+
|
|
123
|
+
See [vault details](docs/vaults.md) for addresses, access rules, fees, and dated measurements.
|
|
124
124
|
|
|
125
125
|
## Security
|
|
126
126
|
|
|
127
|
-
- **No keys
|
|
128
|
-
- **
|
|
129
|
-
|
|
130
|
-
- **
|
|
131
|
-
|
|
132
|
-
[`docs/runbooks/verify_the_bundle.md`](docs/runbooks/verify_the_bundle.md).
|
|
133
|
-
- **Found a vulnerability?** [`SECURITY.md`](SECURITY.md) — privately, never as a public issue.
|
|
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.
|
|
130
|
+
- **Verifiable builds:** CI checks the committed bundle; [verify its provenance](docs/runbooks/verify_the_bundle.md).
|
|
131
|
+
- **Private vulnerability reporting:** follow [SECURITY.md](SECURITY.md), not a public issue.
|
|
134
132
|
|
|
135
133
|
## Documentation
|
|
136
134
|
|
|
137
|
-
[
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
- [Command reference](docs/tools.md) · [Configuration](docs/configuration.md)
|
|
136
|
+
- [Risks](docs/risks.md) · [Security model](docs/security-model.md)
|
|
137
|
+
- [Signing and sending](docs/runbooks/sign_and_send.md) · [All docs](docs/README.md) · [Changelog](CHANGELOG.md)
|
|
140
138
|
|
|
141
139
|
## Contributing
|
|
142
140
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
[
|
|
141
|
+
Feedback and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for development,
|
|
142
|
+
testing, and contribution guidelines. Every commit needs a `Signed-off-by` trailer (`git commit -s`)
|
|
143
|
+
certifying the [Developer Certificate of Origin](DCO.md).
|
|
146
144
|
|
|
147
145
|
## Licence
|
|
148
146
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
part of this repository. More: [`docs/licensing.md`](docs/licensing.md).
|
|
147
|
+
[Apache-2.0](LICENSE). Keep [LICENSE](LICENSE) and [NOTICE](NOTICE) when redistributing.
|
|
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.
|
|
150
|
+
See [licensing](docs/licensing.md) for details.
|