@temporalabs/treasury 0.1.0 → 0.1.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.
- package/README.md +82 -109
- package/dist/mcp/server.d.ts +0 -25
- package/dist/mcp/server.js +25 -3
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp-server.mjs +22 -9
- package/dist/registry.js +4 -3
- package/dist/registry.js.map +1 -1
- package/dist/version.js +6 -3
- package/dist/version.js.map +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -1,153 +1,126 @@
|
|
|
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 Tempora-curated vaults on Base, track USDC positions, and prepare deposits and
|
|
15
|
+
withdrawals. It ships as an agent plugin, an MCP server, and a TypeScript/JavaScript library.
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
deciding what must stay available, controlling how it moves, and putting genuine surplus to work
|
|
22
|
-
within a risk budget. Agent Treasury gives an agent that discipline as tools, with the rule a
|
|
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 signer executes them.** It never holds private keys, signs,
|
|
18
|
+
or sends transactions. You decide how much capital an agent may put to work.
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
> **Experimental — pre-1.0. Real funds, real risk.** Returns are variable, capital is at risk,
|
|
21
|
+
> and withdrawals depend on available liquidity. Review every transaction before signing and
|
|
22
|
+
> read the [risks](docs/risks.md) before depositing.
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
manage the position.
|
|
24
|
+
## What you can do
|
|
30
25
|
|
|
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.
|
|
26
|
+
- **Inspect vaults:** check assets, fees, and deposit access.
|
|
27
|
+
- **Prepare a deposit:** review terms and simulate access before building unsigned calls.
|
|
28
|
+
- **Track a position:** see its value, deposits, and earnings from on-chain records.
|
|
29
|
+
- **Prepare a withdrawal:** check how much is withdrawable now and build unsigned calls.
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
**unsigned** transactions for the agent's own signer:
|
|
31
|
+
Earn currently supports **USDC in, USDC out** through Tempora's ERC-4626 vaults on Base.
|
|
32
|
+
See the [eight `earn_*` tools](docs/tools.md) for inputs, outputs, and limits.
|
|
42
33
|
|
|
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
|
|
34
|
+
## Quick start
|
|
55
35
|
|
|
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.
|
|
36
|
+
**Requires Node.js 22+ on your `PATH`.** Use a keyed Base RPC; the public fallback rate-limits quickly.
|
|
61
37
|
|
|
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) |
|
|
38
|
+
### Claude Code
|
|
66
39
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
40
|
+
```bash
|
|
41
|
+
export TREASURY_RPC_BASE=https://... # replace with your Base RPC URL
|
|
42
|
+
claude plugin marketplace add TemporaLabs/treasury@v0.1.1
|
|
43
|
+
claude plugin install treasury@treasury
|
|
44
|
+
```
|
|
72
45
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
46
|
+
Restart your Claude Code session after installing so the MCP tools connect. Keep the `TemporaLabs/treasury@v0.1.1` ref
|
|
47
|
+
explicit so the install stays on a release rather than tracking the default branch. Upgrading an
|
|
48
|
+
earlier install? Run `claude plugin marketplace remove treasury` first, then the two `claude plugin` lines above
|
|
49
|
+
([details](docs/install.md#upgrading-an-earlier-install)).
|
|
76
50
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
2026-09-17 through Morpho's public API — by a human, not by this client, which quotes no rate at
|
|
80
|
-
all. The skill reports the share price and what your own position has earned, from the vault's
|
|
81
|
-
events. The live rate is
|
|
82
|
-
on-chain, and a yield is always a measurement of the past, not a promise.
|
|
51
|
+
The plugin is the [`plugin/`](plugin/) folder of this repository: its manifests, the Earn skill, and a
|
|
52
|
+
copy of this repository's own server bundle, made in the same commit.
|
|
83
53
|
|
|
84
|
-
|
|
85
|
-
— none was set at the last measurement — and Tempora can set them as curator. Agent Treasury offers it
|
|
86
|
-
because it is Tempora's, not because it is the best-yielding vault available.
|
|
54
|
+
### Other MCP hosts
|
|
87
55
|
|
|
88
|
-
|
|
56
|
+
```bash
|
|
57
|
+
npm install @temporalabs/treasury@0.1.1
|
|
58
|
+
```
|
|
89
59
|
|
|
60
|
+
Add the server to your host's MCP configuration, replacing the path and RPC URL:
|
|
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
|
+
}
|
|
90
72
|
```
|
|
91
|
-
you Put 25 USDC to work.
|
|
92
73
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{ requires_signature: true, status: "unsigned",
|
|
96
|
-
calls: [ approve(USDC → vault, 25 USDC), deposit(25 USDC, account) ] }
|
|
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).
|
|
97
76
|
|
|
98
|
-
|
|
77
|
+
### Try it
|
|
99
78
|
|
|
100
|
-
|
|
79
|
+
Ask your agent:
|
|
101
80
|
|
|
102
|
-
|
|
81
|
+
> Show me the available vaults and their risks. Then prepare a 25 USDC deposit into the default vault.
|
|
103
82
|
|
|
104
|
-
|
|
105
|
-
|
|
83
|
+
OAT returns unsigned calls for your signer to review and execute. Preparing a deposit moves no money.
|
|
84
|
+
Later, ask: **“What is my position worth, and how much can I withdraw now?”**
|
|
106
85
|
|
|
107
|
-
##
|
|
86
|
+
## Vaults
|
|
108
87
|
|
|
109
|
-
|
|
88
|
+
The default, **Cash Plus USDC (Test 2)**, uses Morpho Vault V2 and is open to any account.
|
|
110
89
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
90
|
+
Explore the default vault in the [Morpho dashboard](https://app.morpho.org/base/vault/0x040fCA12673778FEED5DA7b2ccFbbAb0cc0134Cf/tempora-labs-cash-plus-usdc-test-2#overview) for a visual overview.
|
|
91
|
+
|
|
92
|
+
**Cash Plus USDC (Test 2A)** uses IPOR Fusion and requires whitelist access. Both are experimental
|
|
93
|
+
vaults using real USDC, not bank savings accounts. Neither currently has a lock-up, but liquidity
|
|
94
|
+
can limit withdrawals.
|
|
116
95
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
96
|
+
Tempora Labs curates these vaults and can set fees. OAT offers Tempora's vaults; it does not compare
|
|
97
|
+
them against the market or promise the best yield. It reports your position's value and earnings,
|
|
98
|
+
not a quoted APY.
|
|
120
99
|
|
|
121
|
-
|
|
122
|
-
from this repository's releases. Any other MCP host runs the same bundled server —
|
|
123
|
-
[`docs/install.md`](docs/install.md).
|
|
100
|
+
See [vault details](docs/vaults.md) for addresses, access rules, fees, and dated measurements.
|
|
124
101
|
|
|
125
102
|
## Security
|
|
126
103
|
|
|
127
|
-
- **No keys
|
|
128
|
-
- **
|
|
129
|
-
|
|
130
|
-
- **
|
|
131
|
-
carries a provenance attestation you can check —
|
|
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.
|
|
104
|
+
- **No keys or custody:** your wallet holds the position; only your signer can move funds.
|
|
105
|
+
- **Direct RPC access:** no Tempora service in the request path and no telemetry. Keyed RPC URLs are redacted.
|
|
106
|
+
- **Verifiable builds:** CI checks the committed bundle; [verify its provenance](docs/runbooks/verify_the_bundle.md).
|
|
107
|
+
- **Private vulnerability reporting:** follow [SECURITY.md](SECURITY.md), not a public issue.
|
|
134
108
|
|
|
135
109
|
## Documentation
|
|
136
110
|
|
|
137
|
-
[
|
|
138
|
-
|
|
139
|
-
|
|
111
|
+
- [Tool reference](docs/tools.md) · [Configuration](docs/configuration.md)
|
|
112
|
+
- [Risks](docs/risks.md) · [Security model](docs/security-model.md)
|
|
113
|
+
- [Signing and sending](docs/runbooks/sign_and_send.md) · [All docs](docs/README.md) · [Changelog](CHANGELOG.md)
|
|
140
114
|
|
|
141
115
|
## Contributing
|
|
142
116
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
[
|
|
117
|
+
Feedback and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for development,
|
|
118
|
+
testing, and contribution guidelines. Every commit needs a `Signed-off-by` trailer (`git commit -s`)
|
|
119
|
+
certifying the [Developer Certificate of Origin](DCO.md).
|
|
146
120
|
|
|
147
121
|
## Licence
|
|
148
122
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
part of this repository. More: [`docs/licensing.md`](docs/licensing.md).
|
|
123
|
+
[Apache-2.0](LICENSE). Keep [LICENSE](LICENSE) and [NOTICE](NOTICE) when redistributing.
|
|
124
|
+
The licence does not grant rights to Tempora's names or marks; forks must not claim to be the
|
|
125
|
+
official distribution. Tempora's fund-operations infrastructure is separate from this repository.
|
|
126
|
+
See [licensing](docs/licensing.md) for details.
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent Treasury — MCP server (earn skill).
|
|
3
|
-
*
|
|
4
|
-
* Read tools, quotes, and UNSIGNED call builders only. There is no `sign` and no `send` tool, and
|
|
5
|
-
* there will not be one here: the skill supplies intent, the consumer supplies the signer. Anything
|
|
6
|
-
* that holds a key lives outside this process and receives the calls this server emits.
|
|
7
|
-
*
|
|
8
|
-
* Eight tools, all `earn_`-prefixed so later skills can sit beside them
|
|
9
|
-
* in one namespace:
|
|
10
|
-
*
|
|
11
|
-
* earn_vaults earn_terms earn_quote (direction) earn_status (no args = health)
|
|
12
|
-
* earn_balance earn_claim earn_prepare_deposit earn_prepare_withdraw
|
|
13
|
-
*
|
|
14
|
-
* Two contracts worth stating here because they are easy to erode:
|
|
15
|
-
*
|
|
16
|
-
* 1. `earn_prepare_*` return an ENVELOPE, `{ requires_signature, status: "unsigned", calls }`,
|
|
17
|
-
* not a bare array. This cannot stop a model reporting "deposited" — nothing at this boundary
|
|
18
|
-
* can — but it makes an unsigned build structurally distinguishable from a completed one, so a
|
|
19
|
-
* consumer or a test can assert on it. Wrapped HERE only: `buildDeposit`/`buildWithdraw` still
|
|
20
|
-
* return arrays, so a direct library consumer (see docs/runbooks/sign_and_send.md) gets the
|
|
21
|
-
* naked calls exactly as before.
|
|
22
|
-
* 2. The address argument is `account` everywhere. It was `depositor`, `owner` and `principal` in
|
|
23
|
-
* three different tools. `receiver` stays distinct because it genuinely is: `account` owns the
|
|
24
|
-
* shares, `receiver` is where the money lands.
|
|
25
|
-
*/
|
|
26
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
27
2
|
/**
|
|
28
3
|
* What a signer must do for these calls to land exactly once. Each rule is a failure measured on a
|
package/dist/mcp/server.js
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
* three different tools. `receiver` stays distinct because it genuinely is: `account` owns the
|
|
24
24
|
* shares, `receiver` is where the money lands.
|
|
25
25
|
*/
|
|
26
|
+
import { realpathSync } from "node:fs";
|
|
27
|
+
import { fileURLToPath } from "node:url";
|
|
26
28
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
27
29
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
28
30
|
import { z } from "zod";
|
|
@@ -228,7 +230,7 @@ export function buildServer() {
|
|
|
228
230
|
}));
|
|
229
231
|
server.registerTool("earn_quote", {
|
|
230
232
|
title: "Quote a deposit or a withdrawal",
|
|
231
|
-
description: "Pre-trade quote, in USDC. direction=deposit: expected shares (previewDeposit), share price, and the access verdict from a simulated deposit(). This client quotes no rate: an ERC-4626 vault exposes none, and it calls no yield API. direction=withdraw: shares burned (previewWithdraw), shares held, a simulated withdraw() verdict, maxWithdraw advisory only (Morpho V2 returns 0 by design), and queue depth. Run before the matching earn_prepare_* tool.",
|
|
233
|
+
description: "Pre-trade quote, in USDC. direction=deposit: expected shares (previewDeposit), share price, and the access verdict from a simulated deposit(). This client quotes no rate: an ERC-4626 vault exposes none, and it calls no yield API. direction=withdraw: shares burned (previewWithdraw), shares held, a simulated withdraw() verdict, `instantLiquidity` — the vault's own liquid balance of the asset, which is chassis-specific in BOTH directions: a Fusion vault without instant-withdrawal fuses pays only from it, so there it is the ceiling maxWithdraw() does not know; a Morpho V2 vault holds almost none and still pays out of its markets, so there it is near zero and NOT a ceiling — the simulated verdict is what decides — maxWithdraw advisory only (Morpho V2 returns 0 by design), and queue depth. Run before the matching earn_prepare_* tool.",
|
|
232
234
|
inputSchema: {
|
|
233
235
|
vault: vaultArg,
|
|
234
236
|
account: accountArg,
|
|
@@ -293,7 +295,7 @@ export function buildServer() {
|
|
|
293
295
|
}));
|
|
294
296
|
server.registerTool("earn_balance", {
|
|
295
297
|
title: "Earn position",
|
|
296
|
-
description: "Shares held (exact string + display), current USDC value, WHAT CAN ACTUALLY BE WITHDRAWN NOW (`exit`, measured by simulating the withdrawal — `usdcValue` is what the position is worth, `exit.exitableNow` is what the vault can pay
|
|
298
|
+
description: "Shares held (exact string + display), current USDC value, WHAT CAN ACTUALLY BE WITHDRAWN NOW (`exit`, measured by simulating the withdrawal — `usdcValue` is what the position is worth, `exit.exitableNow` is what the vault can pay, `exit.instantLiquidity` is the vault's own liquid balance of the asset, chassis-specific in both directions — a Fusion vault without instant-withdrawal fuses pays only from it, so there it is the ceiling and `usdcValue` can exceed `exitableNow` by 10x while `maxWithdraw()` — `exit.maxWithdrawSays` — reports the larger one; a Morpho V2 vault holds almost none and still pays out of its markets, so there a near-zero `instantLiquidity` is not a ceiling and `exitableNow` is the verdict), entry basis and accrued yield derived from the vault's own Deposit/Withdraw events for this account, and share price. `scan.complete` says whether the event window covered the whole position; `sharesExact` is what earn_prepare_withdraw({ all }) needs. `scan.depositTxs` and `scan.withdrawTxs` carry the transactions behind those events — `{ txHash, blockNumber, amountUsdc }`, oldest first — so an operator can be shown an explorer link without anyone rebuilding the log query; each list holds at most the 100 most recent, while `scan.deposits`/`scan.withdrawals` stay the totals.",
|
|
297
299
|
inputSchema: {
|
|
298
300
|
vault: vaultArg,
|
|
299
301
|
account: accountArg,
|
|
@@ -334,7 +336,27 @@ async function main() {
|
|
|
334
336
|
const server = buildServer();
|
|
335
337
|
await server.connect(new StdioServerTransport());
|
|
336
338
|
}
|
|
337
|
-
|
|
339
|
+
/**
|
|
340
|
+
* True only when THIS module is the file Node was asked to run. The comparison is by resolved path,
|
|
341
|
+
* not by name: an earlier guard tested `process.argv[1]` against `/server\.(ts|mjs|js)$/`, which is
|
|
342
|
+
* the basename of whatever was invoked — so the published bin (`treasury-mcp`, a symlink npm makes)
|
|
343
|
+
* never matched and exited silently (#22), while any unrelated script named `*server.mjs` that merely
|
|
344
|
+
* imported this module matched and seized stdio. Node resolves the main module's symlink before
|
|
345
|
+
* evaluating it, so `import.meta.url` is already the real path and the two sides agree for a bin.
|
|
346
|
+
* Anything unresolvable is treated as "not the entry point": the module loads and does nothing.
|
|
347
|
+
*/
|
|
348
|
+
function isEntryPoint() {
|
|
349
|
+
const invoked = process.argv[1];
|
|
350
|
+
if (!invoked)
|
|
351
|
+
return false;
|
|
352
|
+
try {
|
|
353
|
+
return realpathSync(invoked) === realpathSync(fileURLToPath(import.meta.url));
|
|
354
|
+
}
|
|
355
|
+
catch {
|
|
356
|
+
return false;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (isEntryPoint()) {
|
|
338
360
|
main().catch((e) => {
|
|
339
361
|
// Defence-in-depth: HARDENED, NOT TESTED. main() only builds the server and connects a stdio
|
|
340
362
|
// transport — every RPC URL is resolved inside a handler body, so nothing reachable here can
|
package/dist/mcp/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAClL,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzG,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE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EAAE,kBAAkB;QAC1B,IAAI,EAAE,kLAAkL;KACzL,CAAC,CAAC,CACN,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,WAAW,EAAE,CAAC;IAC7B,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,YAAY;IACnB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAChC,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,OAAO,CAAC,KAAK,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAChF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,IAAI,YAAY,EAAE,EAAE,CAAC;IACnB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QACjB,6FAA6F;QAC7F,6FAA6F;QAC7F,wEAAwE;QACxE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -17061,6 +17061,10 @@ var init_call = __esm({
|
|
|
17061
17061
|
}
|
|
17062
17062
|
});
|
|
17063
17063
|
|
|
17064
|
+
// src/mcp/server.ts
|
|
17065
|
+
import { realpathSync as realpathSync3 } from "fs";
|
|
17066
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
17067
|
+
|
|
17064
17068
|
// node_modules/zod/v3/helpers/util.js
|
|
17065
17069
|
var util;
|
|
17066
17070
|
(function(util2) {
|
|
@@ -55121,8 +55125,8 @@ function publicRpcHint(chainId) {
|
|
|
55121
55125
|
}
|
|
55122
55126
|
|
|
55123
55127
|
// src/registry.ts
|
|
55124
|
-
import { readFileSync } from "fs";
|
|
55125
|
-
import { fileURLToPath } from "url";
|
|
55128
|
+
import { readFileSync, realpathSync } from "fs";
|
|
55129
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
55126
55130
|
|
|
55127
55131
|
// src/registry-schema.ts
|
|
55128
55132
|
var address = external_exports.string().refine((s) => isAddress(s, { strict: true }), { message: "not a checksummed EVM address" }).transform((s) => getAddress(s));
|
|
@@ -55240,7 +55244,7 @@ var EARN = {
|
|
|
55240
55244
|
};
|
|
55241
55245
|
|
|
55242
55246
|
// src/registry.ts
|
|
55243
|
-
var REGISTRY_URL = new URL("../registry/vaults.json", import.meta.url);
|
|
55247
|
+
var REGISTRY_URL = new URL("../registry/vaults.json", pathToFileURL(realpathSync(fileURLToPath(import.meta.url))));
|
|
55244
55248
|
var cached2;
|
|
55245
55249
|
function loadRegistry() {
|
|
55246
55250
|
if (cached2) return cached2;
|
|
@@ -55291,9 +55295,9 @@ function linksFor(vault) {
|
|
|
55291
55295
|
}
|
|
55292
55296
|
|
|
55293
55297
|
// src/version.ts
|
|
55294
|
-
import { readFileSync as readFileSync2 } from "fs";
|
|
55295
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
55296
|
-
var PACKAGE_JSON_URL = new URL("../package.json", import.meta.url);
|
|
55298
|
+
import { readFileSync as readFileSync2, realpathSync as realpathSync2 } from "fs";
|
|
55299
|
+
import { fileURLToPath as fileURLToPath2, pathToFileURL as pathToFileURL2 } from "url";
|
|
55300
|
+
var PACKAGE_JSON_URL = new URL("../package.json", pathToFileURL2(realpathSync2(fileURLToPath2(import.meta.url))));
|
|
55297
55301
|
var PACKAGE_VERSION = JSON.parse(readFileSync2(fileURLToPath2(PACKAGE_JSON_URL), "utf8")).version;
|
|
55298
55302
|
|
|
55299
55303
|
// src/abi/erc4626.ts
|
|
@@ -56145,7 +56149,7 @@ function buildServer() {
|
|
|
56145
56149
|
"earn_quote",
|
|
56146
56150
|
{
|
|
56147
56151
|
title: "Quote a deposit or a withdrawal",
|
|
56148
|
-
description: "Pre-trade quote, in USDC. direction=deposit: expected shares (previewDeposit), share price, and the access verdict from a simulated deposit(). This client quotes no rate: an ERC-4626 vault exposes none, and it calls no yield API. direction=withdraw: shares burned (previewWithdraw), shares held, a simulated withdraw() verdict, maxWithdraw advisory only (Morpho V2 returns 0 by design), and queue depth. Run before the matching earn_prepare_* tool.",
|
|
56152
|
+
description: "Pre-trade quote, in USDC. direction=deposit: expected shares (previewDeposit), share price, and the access verdict from a simulated deposit(). This client quotes no rate: an ERC-4626 vault exposes none, and it calls no yield API. direction=withdraw: shares burned (previewWithdraw), shares held, a simulated withdraw() verdict, `instantLiquidity` \u2014 the vault's own liquid balance of the asset, which is chassis-specific in BOTH directions: a Fusion vault without instant-withdrawal fuses pays only from it, so there it is the ceiling maxWithdraw() does not know; a Morpho V2 vault holds almost none and still pays out of its markets, so there it is near zero and NOT a ceiling \u2014 the simulated verdict is what decides \u2014 maxWithdraw advisory only (Morpho V2 returns 0 by design), and queue depth. Run before the matching earn_prepare_* tool.",
|
|
56149
56153
|
inputSchema: {
|
|
56150
56154
|
vault: vaultArg,
|
|
56151
56155
|
account: accountArg,
|
|
@@ -56210,7 +56214,7 @@ function buildServer() {
|
|
|
56210
56214
|
"earn_balance",
|
|
56211
56215
|
{
|
|
56212
56216
|
title: "Earn position",
|
|
56213
|
-
description: "Shares held (exact string + display), current USDC value, WHAT CAN ACTUALLY BE WITHDRAWN NOW (`exit`, measured by simulating the withdrawal \u2014 `usdcValue` is what the position is worth, `exit.exitableNow` is what the vault can pay
|
|
56217
|
+
description: "Shares held (exact string + display), current USDC value, WHAT CAN ACTUALLY BE WITHDRAWN NOW (`exit`, measured by simulating the withdrawal \u2014 `usdcValue` is what the position is worth, `exit.exitableNow` is what the vault can pay, `exit.instantLiquidity` is the vault's own liquid balance of the asset, chassis-specific in both directions \u2014 a Fusion vault without instant-withdrawal fuses pays only from it, so there it is the ceiling and `usdcValue` can exceed `exitableNow` by 10x while `maxWithdraw()` \u2014 `exit.maxWithdrawSays` \u2014 reports the larger one; a Morpho V2 vault holds almost none and still pays out of its markets, so there a near-zero `instantLiquidity` is not a ceiling and `exitableNow` is the verdict), entry basis and accrued yield derived from the vault's own Deposit/Withdraw events for this account, and share price. `scan.complete` says whether the event window covered the whole position; `sharesExact` is what earn_prepare_withdraw({ all }) needs. `scan.depositTxs` and `scan.withdrawTxs` carry the transactions behind those events \u2014 `{ txHash, blockNumber, amountUsdc }`, oldest first \u2014 so an operator can be shown an explorer link without anyone rebuilding the log query; each list holds at most the 100 most recent, while `scan.deposits`/`scan.withdrawals` stay the totals.",
|
|
56214
56218
|
inputSchema: {
|
|
56215
56219
|
vault: vaultArg,
|
|
56216
56220
|
account: accountArg,
|
|
@@ -56255,7 +56259,16 @@ async function main() {
|
|
|
56255
56259
|
const server = buildServer();
|
|
56256
56260
|
await server.connect(new StdioServerTransport());
|
|
56257
56261
|
}
|
|
56258
|
-
|
|
56262
|
+
function isEntryPoint() {
|
|
56263
|
+
const invoked = process.argv[1];
|
|
56264
|
+
if (!invoked) return false;
|
|
56265
|
+
try {
|
|
56266
|
+
return realpathSync3(invoked) === realpathSync3(fileURLToPath3(import.meta.url));
|
|
56267
|
+
} catch {
|
|
56268
|
+
return false;
|
|
56269
|
+
}
|
|
56270
|
+
}
|
|
56271
|
+
if (isEntryPoint()) {
|
|
56259
56272
|
main().catch((e) => {
|
|
56260
56273
|
process.stderr.write(`treasury mcp: ${redactEndpoints(String(e))}
|
|
56261
56274
|
`);
|
package/dist/registry.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
1
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
2
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
3
|
import { registrySchema, erc4626Chassis } from "./registry-schema.js";
|
|
4
4
|
import { EARN } from "./config/earn.js";
|
|
5
|
-
|
|
5
|
+
// From this file's real path, not a symlink's: see PACKAGE_JSON_URL in version.ts.
|
|
6
|
+
const REGISTRY_URL = new URL("../registry/vaults.json", pathToFileURL(realpathSync(fileURLToPath(import.meta.url))));
|
|
6
7
|
let cached;
|
|
7
8
|
/** Parses and validates the shipped registry. Throws on any schema violation — a registry that does not parse is not a registry. */
|
|
8
9
|
export function loadRegistry() {
|
package/dist/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAkC,MAAM,sBAAsB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,mFAAmF;AACnF,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,yBAAyB,EAAE,aAAa,CAAC,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAErH,IAAI,MAA4B,CAAC;AAEjC,oIAAoI;AACpI,MAAM,UAAU,YAAY;IAC1B,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,CA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MAAM,UAAU,YAAY,CAAC,MAAe;IAC1C,OAAO,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,YAAY,EAAE,CAAC,MAAM,CAAC,MAAM,CACjC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,CAC3D,CAAC;AACJ,CAAC"}
|
package/dist/version.js
CHANGED
|
@@ -6,9 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Same resolution trick as registry.ts: this file sits at src/ top level and the bundle at dist/
|
|
8
8
|
* top level, so `../package.json` is the package manifest at the repository root from both.
|
|
9
|
+
* Resolved from this file's REAL path: under `--preserve-symlinks-main`, `import.meta.url` is the
|
|
10
|
+
* path of a symlink to the bundle (npm's `.bin/treasury-mcp`), and `../package.json` from there is a
|
|
11
|
+
* file in whatever directory holds the link.
|
|
9
12
|
*/
|
|
10
|
-
import { readFileSync } from "node:fs";
|
|
11
|
-
import { fileURLToPath } from "node:url";
|
|
12
|
-
const PACKAGE_JSON_URL = new URL("../package.json", import.meta.url);
|
|
13
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
14
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
15
|
+
const PACKAGE_JSON_URL = new URL("../package.json", pathToFileURL(realpathSync(fileURLToPath(import.meta.url))));
|
|
13
16
|
export const PACKAGE_VERSION = JSON.parse(readFileSync(fileURLToPath(PACKAGE_JSON_URL), "utf8")).version;
|
|
14
17
|
//# sourceMappingURL=version.js.map
|
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,iBAAiB,EAAE,aAAa,CAAC,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAEjH,MAAM,CAAC,MAAM,eAAe,GAAY,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAyB,CAAC,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporalabs/treasury",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,14 +34,16 @@
|
|
|
34
34
|
"node": ">=22"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"prepack": "npm run build && git diff --exit-code -- dist/mcp-server.mjs",
|
|
38
|
-
"build": "tsc -b && tsup && tsx scripts/third-party-notices.ts --write",
|
|
37
|
+
"prepack": "npm run build && git diff --exit-code -- dist/mcp-server.mjs THIRD_PARTY_NOTICES.md",
|
|
38
|
+
"build": "tsc -b && tsup && tsx scripts/third-party-notices.ts --write && bash scripts/sync-plugin.sh",
|
|
39
39
|
"typecheck": "tsc -b && tsc -p tsconfig.scripts.json",
|
|
40
40
|
"test": "tsc -b && tsc -p tsconfig.scripts.json && vitest run",
|
|
41
41
|
"test:fork": "tsc -b && TREASURY_FORK=1 vitest run --testTimeout 300000 tests/fork.test.ts",
|
|
42
42
|
"mcp": "tsx src/mcp/server.ts",
|
|
43
43
|
"registry:check": "tsx scripts/registry-check.ts",
|
|
44
|
-
"notices:check": "tsx scripts/third-party-notices.ts"
|
|
44
|
+
"notices:check": "tsx scripts/third-party-notices.ts",
|
|
45
|
+
"plugin:check": "bash scripts/sync-plugin.sh --check && bash scripts/check-versions.sh",
|
|
46
|
+
"lint:skill": "bash scripts/lint-skill.sh"
|
|
45
47
|
},
|
|
46
48
|
"dependencies": {
|
|
47
49
|
"@modelcontextprotocol/sdk": "^1.20.0",
|