@cnvlabskoxyz/celina-mcp 0.0.0-stage → 1.0.0

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 (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +512 -2
  3. package/assets/logo-black.png +0 -0
  4. package/assets/logo-yellow.png +0 -0
  5. package/assets/logo.png +0 -0
  6. package/bin/cli.js +2 -0
  7. package/build/a2a/create-handler.d.ts +11 -0
  8. package/build/a2a/create-handler.js +34 -0
  9. package/build/a2a/create-handler.js.map +1 -0
  10. package/build/a2a/executor.d.ts +14 -0
  11. package/build/a2a/executor.js +95 -0
  12. package/build/a2a/executor.js.map +1 -0
  13. package/build/a2a/handler.d.ts +2 -0
  14. package/build/a2a/handler.js +44 -0
  15. package/build/a2a/handler.js.map +1 -0
  16. package/build/a2a/index.d.ts +3 -0
  17. package/build/a2a/index.js +4 -0
  18. package/build/a2a/index.js.map +1 -0
  19. package/build/analytics/install-device-id.d.ts +9 -0
  20. package/build/analytics/install-device-id.js +43 -0
  21. package/build/analytics/install-device-id.js.map +1 -0
  22. package/build/clients/celo-client.d.ts +24 -0
  23. package/build/clients/celo-client.js +109 -0
  24. package/build/clients/celo-client.js.map +1 -0
  25. package/build/clients/ens-client.d.ts +10 -0
  26. package/build/clients/ens-client.js +23 -0
  27. package/build/clients/ens-client.js.map +1 -0
  28. package/build/config/env.d.ts +12 -0
  29. package/build/config/env.js +22 -0
  30. package/build/config/env.js.map +1 -0
  31. package/build/config/load-env.d.ts +1 -0
  32. package/build/config/load-env.js +4 -0
  33. package/build/config/load-env.js.map +1 -0
  34. package/build/context/app-context.d.ts +72 -0
  35. package/build/context/app-context.js +98 -0
  36. package/build/context/app-context.js.map +1 -0
  37. package/build/index.d.ts +3 -0
  38. package/build/index.js +18 -0
  39. package/build/index.js.map +1 -0
  40. package/build/schemas/common.d.ts +1 -0
  41. package/build/schemas/common.js +2 -0
  42. package/build/schemas/common.js.map +1 -0
  43. package/build/server/create-server.d.ts +15 -0
  44. package/build/server/create-server.js +32 -0
  45. package/build/server/create-server.js.map +1 -0
  46. package/build/server/instructions.d.ts +1 -0
  47. package/build/server/instructions.js +43 -0
  48. package/build/server/instructions.js.map +1 -0
  49. package/build/server/version.d.ts +1 -0
  50. package/build/server/version.js +3 -0
  51. package/build/server/version.js.map +1 -0
  52. package/build/services/aave.service.d.ts +27 -0
  53. package/build/services/aave.service.js +43 -0
  54. package/build/services/aave.service.js.map +1 -0
  55. package/build/services/account-write.service.d.ts +16 -0
  56. package/build/services/account-write.service.js +17 -0
  57. package/build/services/account-write.service.js.map +1 -0
  58. package/build/services/contract-write.service.d.ts +24 -0
  59. package/build/services/contract-write.service.js +30 -0
  60. package/build/services/contract-write.service.js.map +1 -0
  61. package/build/services/execute-prepared-flow.d.ts +18 -0
  62. package/build/services/execute-prepared-flow.js +65 -0
  63. package/build/services/execute-prepared-flow.js.map +1 -0
  64. package/build/services/gooddollar-face-verification.service.d.ts +14 -0
  65. package/build/services/gooddollar-face-verification.service.js +22 -0
  66. package/build/services/gooddollar-face-verification.service.js.map +1 -0
  67. package/build/services/gooddollar-identity-write.service.d.ts +25 -0
  68. package/build/services/gooddollar-identity-write.service.js +24 -0
  69. package/build/services/gooddollar-identity-write.service.js.map +1 -0
  70. package/build/services/gooddollar.service.d.ts +65 -0
  71. package/build/services/gooddollar.service.js +82 -0
  72. package/build/services/gooddollar.service.js.map +1 -0
  73. package/build/services/governance-write.service.d.ts +82 -0
  74. package/build/services/governance-write.service.js +54 -0
  75. package/build/services/governance-write.service.js.map +1 -0
  76. package/build/services/mento-fx.service.d.ts +33 -0
  77. package/build/services/mento-fx.service.js +33 -0
  78. package/build/services/mento-fx.service.js.map +1 -0
  79. package/build/services/staking-write.service.d.ts +50 -0
  80. package/build/services/staking-write.service.js +42 -0
  81. package/build/services/staking-write.service.js.map +1 -0
  82. package/build/services/transaction.service.d.ts +29 -0
  83. package/build/services/transaction.service.js +30 -0
  84. package/build/services/transaction.service.js.map +1 -0
  85. package/build/services/uniswap.service.d.ts +22 -0
  86. package/build/services/uniswap.service.js +34 -0
  87. package/build/services/uniswap.service.js.map +1 -0
  88. package/build/tools/create-runtime.d.ts +3 -0
  89. package/build/tools/create-runtime.js +160 -0
  90. package/build/tools/create-runtime.js.map +1 -0
  91. package/build/tools/helpers.d.ts +7 -0
  92. package/build/tools/helpers.js +70 -0
  93. package/build/tools/helpers.js.map +1 -0
  94. package/build/tools/index.d.ts +7 -0
  95. package/build/tools/index.js +6 -0
  96. package/build/tools/index.js.map +1 -0
  97. package/build/tools/resolve-wallet.d.ts +3 -0
  98. package/build/tools/resolve-wallet.js +26 -0
  99. package/build/tools/resolve-wallet.js.map +1 -0
  100. package/build/tools/sdk-register.d.ts +8 -0
  101. package/build/tools/sdk-register.js +36 -0
  102. package/build/tools/sdk-register.js.map +1 -0
  103. package/build/tools/types.d.ts +6 -0
  104. package/build/tools/types.js +2 -0
  105. package/build/tools/types.js.map +1 -0
  106. package/build/utils/format-date.d.ts +1 -0
  107. package/build/utils/format-date.js +12 -0
  108. package/build/utils/format-date.js.map +1 -0
  109. package/package.json +82 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andrew Kim Joseph
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,513 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/andrewkimjoseph/celina/main/assets/celina-banner.svg" alt="Celina — Give your LLM a wallet on Celo">
3
+ </p>
2
4
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
5
+ <h1 align="center">Celina — Celo MCP Server</h1>
6
+
7
+ <p align="center">
8
+ <strong>Celina</strong> is a third-party, open-source stack that gives an LLM read, prepare, and execute access to Celo mainnet through an SDK, an MCP server, and a REST API. This package is the <a href="https://modelcontextprotocol.io">Model Context Protocol</a> server — it registers the shared <a href="https://www.npmjs.com/package/@cnvlabskoxyz/celina-sdk"><code>@cnvlabskoxyz/celina-sdk/tools</code></a> catalog — the same Zod schemas and handlers that power browser wallet apps — so MCP and agent hosts stay in sync with the SDK and REST API.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://celina.andrewkimjoseph.com">Website</a>
13
+ ·
14
+ <a href="https://www.npmjs.com/package/@cnvlabskoxyz/celina-mcp">npm</a>
15
+ ·
16
+ <a href="https://mcp.usecelina.xyz/mcp">Hosted (reads + prepare)</a>
17
+ ·
18
+ <a href="https://docs.celo.org/build-on-celo/build-with-ai/mcp/celina">Celo docs</a>
19
+ </p>
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ npm i -g @cnvlabskoxyz/celina-mcp@latest
25
+ ```
26
+
27
+ Full setup guide (Windows paths, troubleshooting): **[usecelina.xyz/mcp/local](https://www.usecelina.xyz/mcp/local)**.
28
+
29
+ ## Migration
30
+
31
+ If you still use `@cnvlabskoxyz/celina`, update your MCP config `args` to `@cnvlabskoxyz/celina-mcp` and rename the server key to `celina-mcp`. The old package name remains published as a wrapper through one release cycle.
32
+
33
+ ## Quick start
34
+
35
+ **Recommended:** install globally and connect over stdio — full tool catalog with execute/write when you set `CELO_PRIVATE_KEY`, fast startup, and keys stay on your machine.
36
+
37
+ Your MCP client (Cursor, Claude Desktop, LM Studio, etc.) runs the **`celina-mcp`** binary over stdio. Tools register from `@cnvlabskoxyz/celina-sdk/tools` via `registerSdkTools`. See [Local stdio (recommended)](#local-stdio-recommended) or the [website install guide](https://www.usecelina.xyz/mcp/local).
38
+
39
+ For chain reads without a local install, use the hosted Streamable HTTP endpoint at [https://mcp.usecelina.xyz/mcp](https://mcp.usecelina.xyz/mcp) — see [Hosted (reads + prepare)](#hosted-reads--prepare).
40
+
41
+ ## MCP setup
42
+
43
+ Pick your client, install the package, paste the config, restart. Celina shows up as MCP tools your LLM can call.
44
+
45
+ ### Local stdio (recommended)
46
+
47
+ Install globally, then add Celina to your MCP config. Your client runs the **`celina-mcp`** binary over stdio. Works in any stdio client (Cursor, Claude Desktop, LM Studio, Continue, MCP Inspector). Use **Node.js 20 or 22 LTS** (≥ 20 supported).
48
+
49
+ > **Why not `npx -y`?** Cold `npx` starts can exceed Claude Desktop's ~60s MCP handshake on some Windows machines. Global install + an absolute `celina-mcp` path avoids that.
50
+
51
+ GUI clients (Cursor, Claude Desktop) often spawn MCP servers with a minimal PATH that does not include nvm, fnm, Homebrew, or npm’s global bin. Bare `"command": "celina-mcp"` then fails with `spawn celina-mcp ENOENT` and the client reconnects in a loop. Paste the absolute path from the commands below into `"command"` before you first connect.
52
+
53
+ 1. Run `npm i -g @cnvlabskoxyz/celina-mcp@latest`
54
+ 2. **Find the binary path** (copy the output into `"command"` in step 3):
55
+ - **macOS / Linux:** `which celina-mcp`
56
+ - **Windows (cmd):** `where celina-mcp`
57
+ - **Windows (PowerShell):** `(Get-Command celina-mcp).Source`
58
+ 3. Open your MCP config (e.g. `claude_desktop_config.json`, Cursor **Settings → MCP**) and merge a snippet below into `mcpServers`
59
+ 4. Fully quit and restart the client
60
+
61
+ **macOS / Linux example:**
62
+
63
+ ```json
64
+ {
65
+ "mcpServers": {
66
+ "celina-mcp": {
67
+ "type": "stdio",
68
+ "command": "/path/to/celina-mcp",
69
+ "args": [],
70
+ "env": {
71
+ "CELO_PRIVATE_KEY": "0x...",
72
+ "SELF_AGENT_PRIVATE_KEY": "0x..."
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ **Windows example** (use the `.cmd` shim path from `where` / `Get-Command`; escape backslashes in JSON):
80
+
81
+ ```json
82
+ {
83
+ "mcpServers": {
84
+ "celina-mcp": {
85
+ "type": "stdio",
86
+ "command": "C:\\Users\\YourName\\AppData\\Roaming\\npm\\celina-mcp.cmd",
87
+ "args": [],
88
+ "env": {
89
+ "CELO_PRIVATE_KEY": "0x...",
90
+ "SELF_AGENT_PRIVATE_KEY": "0x..."
91
+ }
92
+ }
93
+ }
94
+ }
95
+ ```
96
+
97
+ Replace `"command"` with your `which` / `where` / `Get-Command` output. `"command": "celina-mcp"` only works if the GUI app inherits npm’s global bin — often false on macOS and Windows. If path lookup is empty, install globally first, or as a last resort use `"command": "node"` and `"args": ["<npm root -g>/@cnvlabskoxyz/celina-mcp/build/index.js"]` (run `npm root -g` to find the path; use Windows path separators in the arg on Windows).
98
+
99
+ Keep `CELO_PRIVATE_KEY` and `SELF_AGENT_PRIVATE_KEY` out of source control — they stay on your machine. Omit both for read-only chain queries.
100
+
101
+ Private keys accept **64 hex characters with or without a `0x` prefix** (normalized at startup). Invalid or placeholder values like `0x...` are ignored at startup so read-only tools still load; write tools return a clear config error until you fix or remove the key. **Self-only** setups can use **`SELF_AGENT_PRIVATE_KEY` alone** (omit `CELO_PRIVATE_KEY`) for governance/staking when the Self agent passes humanness.
102
+
103
+ **Read telemetry:** Off-chain tool usage is always logged via the bundled Celina SDK to [celina-stats-api](https://api.stats.usecelina.xyz) `POST /telemetry`, which forwards each event to Amplitude. The daily export cron copies those events into the stats store. Each MCP install gets a stable `device_id` (`~/.config/celina/install-id`) so stats can distinguish hosts; wallet-scoped reads also set `user_id` to the public wallet address (from tool args or the `CELO_PRIVATE_KEY` signer). Override the device id with `createServer({ analyticsDeviceId: "..." })` when embedding the server programmatically. Anyone who does not want telemetry can fork the repository.
104
+
105
+ ### Claude Desktop
106
+
107
+ Use the same stdio config in `claude_desktop_config.json`:
108
+
109
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
110
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
111
+
112
+ Requires Node.js ≥ 20 (20 or 22 LTS recommended).
113
+
114
+ ```json
115
+ {
116
+ "mcpServers": {
117
+ "celina-mcp": {
118
+ "type": "stdio",
119
+ "command": "/path/to/celina-mcp",
120
+ "args": [],
121
+ "env": {
122
+ "CELO_PRIVATE_KEY": "0x...",
123
+ "SELF_AGENT_PRIVATE_KEY": "0x..."
124
+ }
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+ Replace `"command"` with your `which` / `where` / `Get-Command` output. Fully quit and relaunch Claude Desktop after editing the config (closing the window is not enough).
131
+
132
+ ### Local stdio (from source)
133
+
134
+ For development from a cloned repo, point at your local `build/index.js`:
135
+
136
+ ```json
137
+ {
138
+ "mcpServers": {
139
+ "celina-mcp": {
140
+ "type": "stdio",
141
+ "command": "node",
142
+ "args": ["/absolute/path/to/celina-mcp/build/index.js"],
143
+ "env": {
144
+ "CELO_PRIVATE_KEY": "0x...",
145
+ "SELF_AGENT_PRIVATE_KEY": "0x..."
146
+ }
147
+ }
148
+ }
149
+ }
150
+ ```
151
+
152
+ ## Run Celina with your own model
153
+
154
+ Celina is a plain MCP server. Pair it with any MCP-aware local stack — Ollama, LM Studio, llama.cpp — through a client that supports tool calling.
155
+
156
+ Read-only tools (balances, blocks, GoodDollar status, etc.) work out of the box. For write tools, set `CELO_PRIVATE_KEY` in the MCP server `env` block. Stdio writes simulate each prepared step before broadcast to catch reverts before gas is spent.
157
+
158
+ ### LM Studio (0.3.17+)
159
+
160
+ Native MCP hosting via `mcp.json`.
161
+
162
+ 1. **Program** → **Install** → **Edit mcp.json**
163
+ 2. Add Celina under `mcpServers`
164
+ 3. Enable **Allow calling servers from mcp.json**
165
+ 4. Chat with a tool-capable model (Qwen 2.5, Llama 3.1+)
166
+
167
+ ```json
168
+ {
169
+ "mcpServers": {
170
+ "celina-mcp": {
171
+ "type": "stdio",
172
+ "command": "/path/to/celina-mcp",
173
+ "args": [],
174
+ "env": {
175
+ "CELO_PRIVATE_KEY": "0x...",
176
+ "SELF_AGENT_PRIVATE_KEY": "0x..."
177
+ }
178
+ }
179
+ }
180
+ }
181
+ ```
182
+
183
+ Replace `"command"` with your `which` / `where` / `Get-Command` output. Omit `CELO_PRIVATE_KEY` for read-only.
184
+
185
+ ### Continue · VS Code
186
+
187
+ Agent mode in your editor. Drop a YAML file into your workspace and Continue picks it up in agent mode.
188
+
189
+ 1. Create `.continue/mcpServers/celina-mcp.yaml`
190
+ 2. Paste the snippet below
191
+ 3. Switch Continue to agent mode and prompt
192
+
193
+ ```yaml
194
+ name: Celina
195
+ version: 0.0.1
196
+ schema: v1
197
+ mcpServers:
198
+ - name: celina-mcp
199
+ type: stdio
200
+ command: /path/to/celina-mcp
201
+ args: []
202
+ ```
203
+
204
+ Replace `command` with your `which` / `where` / `Get-Command` output.
205
+
206
+ Alternatively, copy the [local stdio JSON](#local-stdio-recommended) into `.continue/mcpServers/mcp.json` — Continue picks up Claude/Cursor-style configs automatically.
207
+
208
+ ### Test without an LLM
209
+
210
+ Use MCP Inspector to call Celina tools directly over stdio:
211
+
212
+ ```bash
213
+ npm run build
214
+ npm run inspect
215
+ ```
216
+
217
+ ### Tips
218
+
219
+ - Use models with reliable tool-calling support; small or older models may skip tools or call them incorrectly.
220
+ - Start with read-only prompts, e.g. *"What's the USDm balance of 0x…?"*, *"Is this wallet GoodDollar whitelisted?"*, or *"Can this address claim GoodDollar UBI today?"*
221
+ - Keep private keys in env vars only — never commit them to config files in git.
222
+
223
+ ## Hosted (reads + prepare)
224
+
225
+ A public hosted endpoint is available at **https://mcp.usecelina.xyz/mcp**. Use this when you need chain reads without a local install.
226
+
227
+ **Local stdio remains the recommended setup** — it supports write tools with your own keys, Self Agent ID flows, and avoids serverless cold starts.
228
+
229
+ **Client config (hosted, no local install):**
230
+
231
+ ```json
232
+ {
233
+ "mcpServers": {
234
+ "celina-mcp": {
235
+ "url": "https://mcp.usecelina.xyz/mcp"
236
+ }
237
+ }
238
+ }
239
+ ```
240
+
241
+ The hosted service runs on Cloudflare Workers via [celina-mcp-remote](../celina-mcp-remote/). Do **not** send private keys to the hosted endpoint — writes are disabled server-side.
242
+
243
+ **Works without keys:** all hosted `get_*` reads — including `check_humanness`, governance reads (`get_governance_proposals`, `get_queued_proposals`, `get_actionable_governance_proposals`, `get_locked_celo_balance`, `get_pending_withdrawals`, `get_votable_proposals`, `get_governance_votes`), staking reads (`get_stake_eligibility`, `get_delegation_info`, `get_governance_delegates`, `get_governance_delegate_details`), `get_celo_account_registration`, `get_gooddollar_identity_link`, Aave/GoodDollar quotes, Self verify/lookup, AgentKarma, NFT/contract reads, etc.
244
+
245
+ **Hosted MCP:** **50 tools** — reads, oracle/AMM quotes, swap pair lists, attribution check/verify, humanness check, governance/staking reads, and AgentKarma reputation (read-only external API; explicit `address` required — no signer fallback). **`estimate_*`**, server-key writes (`send_token`, `execute_lock_celo`, `execute_stake`, `execute_gooddollar_reserve_swap`, etc.), `get_wallet_address`, GoodDollar connect/disconnect/claim writes, and Self lifecycle/registration tools require **local stdio** with `CELO_PRIVATE_KEY` / `SELF_AGENT_PRIVATE_KEY`.
246
+
247
+ **Unreliable on serverless:** `register_self_agent` / `check_self_registration` — Self sessions are in-memory and do not persist across stateless function invocations.
248
+
249
+ See [celina-mcp-remote/README.md](../celina-mcp-remote/README.md) if you want to deploy your own instance.
250
+
251
+ ## Write tools
252
+
253
+ Set `CELO_PRIVATE_KEY` and/or `SELF_AGENT_PRIVATE_KEY` in your MCP server `env` block for on-chain writes. Pass optional `signer: "celo" | "self_agent"` when both keys are configured. Stdio writes include: `send_token`, DeFi executes (`execute_mento_fx`, `execute_uniswap_swap`, `execute_gooddollar_reserve_swap`, `supply_aave`, `withdraw_aave`), governance (`execute_lock_celo`, `execute_vote`, `execute_upvote`, …), staking (`execute_stake`, `execute_activate_stake`, …), `execute_register_celo_account`, GoodDollar UBI/identity writes, and `execute_contract_function`. Humanness-gated governance/staking executes require `check_humanness` to pass first. Keys stay on your machine and are not sent to Celina's authors.
254
+
255
+ ## Session wallet (local stdio)
256
+
257
+ When a signing key is configured, the server derives session wallet(s) at startup. Agents should use them like this:
258
+
259
+ 1. **`get_wallet_address`** — with no `signer`, returns the default address plus **`wallets.celo`** and **`wallets.self_agent`** when both keys are set; pass `signer` to look up one wallet.
260
+ 2. **Default signer:** `celo` when `CELO_PRIVATE_KEY` is set (even if Self key is also set); `self_agent` when only `SELF_AGENT_PRIVATE_KEY` is configured.
261
+ 3. **Omit `address` / `wallet_address` / `from`** on wallet-scoped reads for “my” balances and activity (uses default signer).
262
+ 4. **Pass `signer: "celo" | "self_agent"`** on execute tools (send, governance, staking, account register, GoodDollar connect/disconnect) to choose which configured wallet acts.
263
+ 5. **Never** derive addresses from shell or read `.env`.
264
+
265
+ Wallet-scoped tools with optional address: `get_account`, token balance tools, staking/governance reads, GoodDollar reads, `get_nft_balance`, `estimate_transaction` (`from` only), contract reads (`fromAddress`).
266
+
267
+ On **hosted** MCP (no key), pass explicit addresses. `get_wallet_address` is omitted from the hosted tool list.
268
+
269
+ Browser apps using [`@cnvlabskoxyz/celina-sdk`](https://www.npmjs.com/package/@cnvlabskoxyz/celina-sdk) filter the same tool catalog with `surface: "browser"` and pass the user’s connected wallet on each call — see [tool catalog guide](https://github.com/andrewkimjoseph/celina-sdk/blob/main/docs/guides/tool-catalog.md) and [MCP session wallet guide](https://github.com/andrewkimjoseph/celina-sdk/blob/main/docs/guides/mcp-session-wallet.md).
270
+
271
+ ## Environment variables
272
+
273
+ | Variable | Default | Description |
274
+ |----------|---------|-------------|
275
+ | `CELO_PRIVATE_KEY` | — | Main wallet for writes (send, DeFi, governance, staking, GoodDollar UBI). 64 hex chars, optional `0x` prefix. |
276
+ | `SELF_AGENT_PRIVATE_KEY` | — | Self Agent ID wallet (separate from CELO). Can be used alone for humanness-gated governance/staking. Optional `0x` prefix. |
277
+ | `SELF_AGENT_API_BASE` | `https://app.ai.self.xyz` | Override Self Agent ID REST API base URL |
278
+ | `CELO_RPC_URL_MAINNET` | Forno public RPC | Override mainnet RPC |
279
+ | `ETH_RPC_URL_MAINNET` | — | Ethereum RPC for ENS resolution |
280
+
281
+ **Account Abstraction / gas sponsorship:** Celina MCP does **not** take a Pimlico (or other) sponsorship API key. Sponsored UserOps use `@cnvlabskoxyz/celina-sdk` [`createAAClient`](https://github.com/andrewkimjoseph/celina-sdk/blob/main/docs/guides/account-abstraction.md) in your app with **your** `gasSponsorship` provider credentials. Stdio `execute_*` remains EOA-only via `CELO_PRIVATE_KEY`.
282
+
283
+ Copy `.env.example` to `.env` for local development.
284
+
285
+ ## Known tokens
286
+
287
+ All supported tokens live in the [`celina-sdk`](https://www.npmjs.com/package/@cnvlabskoxyz/celina-sdk) token registry:
288
+
289
+ | Category | Symbols |
290
+ |----------|---------|
291
+ | Native | `CELO` |
292
+ | Mento stablecoins | `USDm`, `EURm`, `BRLm`, `XOFm`, `KESm`, `PHPm`, `COPm`, `GBPm`, `CADm`, `AUDm`, `ZARm`, `GHSm`, `NGNm`, `JPYm`, `CHFm` |
293
+ | Bridged / third-party | `USDT`, `USDC`, `USAT`, `vEUR`, `vGBP`, `vCHF`, `USDM`, `USDA`, `EURA`, `USDGLO`, `BRLA`, `COPM` |
294
+ | GoodDollar | `GoodDollar`, `G$` (`0x62B8B11039FcfE5aB0C56E502b1C372A3d2a9c7A`) |
295
+
296
+ Token symbols are resolved case-insensitively. Mento legacy tickers (`cUSD`, `cEUR`, `cKES`, `PUSO`, `cREAL`, `eXOF`, etc.) map to the current `XXXm` names. You can also pass a known registry contract address.
297
+
298
+ - `get_celo_balances` — named registry tokens (defaults to `CELO` + `USDm`)
299
+ - `get_stablecoin_balances` — scan all registry stablecoins in one call (omits zero balances by default)
300
+
301
+ ## Tools
302
+
303
+ Full schemas and handlers live in [`@cnvlabskoxyz/celina-sdk/tools`](../celina-sdk/docs/guides/tool-catalog.md). MCP registers them via `registerSdkTools` — no per-tool files in this repo.
304
+
305
+ ### Core
306
+
307
+ | Tools | Notes |
308
+ |-------|-------|
309
+ | `get_network_status`, `get_block`, `get_latest_blocks`, `get_transaction` | Chain reads |
310
+ | `check_attribution_tag`, `verify_attribution_tag` | ERC-8021 attribution on txs |
311
+ | `get_wallet_address` | Stdio only — default + dual-wallet addresses |
312
+ | `get_account`, `get_celo_account_registration`, `execute_register_celo_account` | Account balance, nonce, Celo Accounts registration |
313
+ | `resolve_ens` | Celo + Ethereum ENS |
314
+
315
+ ### Tokens and DeFi
316
+
317
+ | Tools | Notes |
318
+ |-------|-------|
319
+ | `get_celo_balances`, `get_stablecoin_balances`, `get_token_info`, `get_token_balance` | Registry token reads |
320
+ | `get_gas_fee_data`, `estimate_transaction`, `estimate_send`, `send_token` | Sends (stdio writes) |
321
+ | `get_mento_swap_pairs`, `get_mento_fx_quote`, `estimate_mento_fx`, `execute_mento_fx` | Mento FX |
322
+ | `get_uniswap_swap_pairs`, `get_uniswap_quote`, `estimate_uniswap_swap`, `execute_uniswap_swap` | Uniswap v3 and v4 |
323
+ | `get_aave_balances`, `supply_aave`, `withdraw_aave` | Aave V3 Celo |
324
+ | `get_gooddollar_*`, `claim_daily_gooddollar_ubi`, `execute_gooddollar_reserve_swap`, `get_gooddollar_face_verification_link`, `execute_connect_gooddollar_identity`, `execute_disconnect_gooddollar_identity` | GoodDollar identity, UBI, reserve — see [GoodDollar](#gooddollar) |
325
+
326
+ ### Governance (humanness-gated writes)
327
+
328
+ | Reads | Stdio executes |
329
+ |-------|----------------|
330
+ | `get_governance_proposals`, `get_proposal_details`, `get_queued_proposals`, `get_actionable_governance_proposals`, `get_votable_proposals`, `get_governance_votes`, `get_locked_celo_balance`, `get_pending_withdrawals` | `execute_lock_celo`, `execute_unlock_celo`, `execute_relock_celo`, `execute_withdraw_celo`, `execute_vote`, `execute_upvote`, `execute_dequeue_proposals_if_ready`, `execute_revoke_governance_votes`, `execute_revoke_governance_upvote` |
331
+
332
+ Discover: `get_queued_proposals` (Queue), `get_votable_proposals` (Referendum), or `get_actionable_governance_proposals` (both). Optional: `get_proposal_details(proposal_id)` for CGP title and markdown before acting. When `dequeueReady`, call `execute_dequeue_proposals_if_ready` before upvoting proposals with `upvoteable=false`. Queue flow: `get_queued_proposals` → `execute_upvote` (or dequeue first if overdue). Referendum flow: `get_votable_proposals` → `execute_vote`. Call `check_humanness` before humanness-gated executes (dequeue is not humanness-gated).
333
+
334
+ ### Staking (humanness-gated writes)
335
+
336
+ | Reads | Stdio executes |
337
+ |-------|----------------|
338
+ | `get_staking_balances`, `get_activatable_stakes`, `get_validator_groups`, `get_validator_group_details`, `get_total_staking_info`, `get_delegation_info`, `get_governance_delegates`, `get_governance_delegate_details`, `get_stake_eligibility` | `execute_stake`, `execute_activate_stake`, `execute_unstake`, `execute_delegate_power`, `execute_undelegate_power` |
339
+
340
+ Call `get_stake_eligibility` before `execute_stake` — groups at capacity (e.g. cLabs) will fail.
341
+
342
+ ### Governance delegation discovery
343
+
344
+ When the user asks who to delegate to: `get_governance_delegates` → pick a delegatee `address` → `get_governance_delegate_details` (optional profile lookup) → `get_delegation_info` + `get_locked_celo_balance` → `execute_delegate_power`. When they already have an address: start with `get_governance_delegate_details`. The Celo Mondo directory is curated off-chain (not an on-chain registry); any address can receive delegation.
345
+
346
+ ### Humanness
347
+
348
+ | Tool | Notes |
349
+ |------|-------|
350
+ | `check_humanness` | Passes if Self Agent ID **or** GoodDollar whitelist succeeds for the address; gates governance/staking executes |
351
+
352
+ ### NFT and contract
353
+
354
+ | Tools | Notes |
355
+ |-------|-------|
356
+ | `get_nft_info`, `get_nft_balance` | ERC-721 / ERC-1155 |
357
+ | `call_contract_function`, `estimate_contract_gas`, `execute_contract_function` | Caller-supplied ABI |
358
+
359
+ ### Self Agent ID
360
+
361
+ | Reads | Stdio session / signing |
362
+ |-------|-------------------------|
363
+ | `verify_self_agent`, `lookup_self_agent`, `verify_self_request` | `register_self_agent`, `check_self_registration`, `refresh_self_proof`, `deregister_self_agent`, `get_self_identity`, `sign_self_request`, `authenticated_self_fetch` |
364
+
365
+ See [Self Agent ID notes](#self-agent-id-notes) below.
366
+
367
+ ### AgentKarma
368
+
369
+ | Tools | Notes |
370
+ |-------|-------|
371
+ | `get_agentkarma_reputation`, `get_agentkarma_celo_agent`, `check_agentkarma_counterparty` | Read-only external API; hosted requires explicit `address` |
372
+
373
+ ### Swap routing (Mento FX, GoodDollar reserve, Uniswap v3 and v4)
374
+
375
+ Three swap routes are available. Pick based on the token pair. Call `get_mento_swap_pairs` / `get_uniswap_swap_pairs` when the pair is unknown — do not invent pairs.
376
+
377
+ | Route | Best for | Quote tool | Execute (MCP) |
378
+ |-------|----------|------------|---------------|
379
+ | **Mento FX** | Mento oracle stables (USDm, EURm, CELO, …) | `get_mento_swap_pairs` then `get_mento_fx_quote` | `estimate_mento_fx` → `execute_mento_fx` |
380
+ | **GoodDollar reserve** | **G$ ↔ USDm** (bonding curve) | `get_gooddollar_reserve_quote` | `estimate_gooddollar_reserve_swap` → `execute_gooddollar_reserve_swap` |
381
+ | **Uniswap v3 / v4** | AMM pairs (e.g. G$ → USDT, USDC → USDT). The quote keeps the higher output. | `get_uniswap_swap_pairs` then `get_uniswap_quote` | `estimate_uniswap_swap` → `execute_uniswap_swap` |
382
+
383
+ **G$ ↔ USDm** uses the GoodDollar reserve — not Uniswap (pools are typically illiquid). **G$ → USDT** and similar AMM pairs use Uniswap when Mento FX has no route. CELO swaps on Uniswap route through WCELO pools — the signer needs WCELO (wrapped CELO) balance, not native CELO. All on-chain steps include Celina ERC-8021 Schema 0 attribution (`celina` + optional app codes). Prefer `check_attribution_tag` to confirm tx tags on a tx hash. Sponsored UserOps use the SDK [`createAAClient`](https://andrewkimjoseph.gitbook.io/celina-sdk/guides/account-abstraction) in your app — Celina MCP does not host Pimlico/gas sponsorship keys.
384
+
385
+ Recommended LLM flow: quote the relevant route(s), compare `expectedOut`, then estimate and execute on the better route (or use SDK `prepareReserveSwap` / `prepare_swap` for user wallet signing on reserve swaps).
386
+
387
+ ### GoodDollar
388
+
389
+ #### UBI
390
+
391
+ Daily G$ claims via UBISchemeV2 on Celo (`0x43d72Ff17701B2DA814620735C39C620Ce0ea4A1`). Identity must be whitelisted; connected wallets resolve to their verified root. Balance and reserve tools use the literal wallet address only. **One claim per identity per UBI period.**
392
+
393
+ | Tool | Type | Notes |
394
+ |------|------|-------|
395
+ | `get_gooddollar_identity_link` | read | Root vs connected-wallet link |
396
+ | `get_gooddollar_whitelisting_info` | read | IdentityV4 status, reverification timeline (root-resolved) |
397
+ | `get_gooddollar_ubi_entitlement` | read | Claimable G$, whitelist root, eligibility reasons |
398
+ | `claim_daily_gooddollar_ubi` | write | Claims for MCP server wallet (`CELO_PRIVATE_KEY`); stdio only |
399
+
400
+ Recommended flow: `get_gooddollar_ubi_entitlement` → `claim_daily_gooddollar_ubi` (or use SDK `prepareClaimUbi` + wagmi for user wallet signing).
401
+
402
+ #### Reserve swaps (G$ ↔ USDm)
403
+
404
+ On-chain **MentoBroker** bonding curve — the canonical route for GoodDollar ↔ USDm. MCP can **quote**, **estimate**, and **execute** on stdio with `CELO_PRIVATE_KEY`. Browser apps use `prepare_gooddollar_reserve_swap` or `prepare_swap`.
405
+
406
+ | Tool | Type | Notes |
407
+ |------|------|-------|
408
+ | `get_gooddollar_reserve_quote` | read | Hosted + stdio; pair-limited to G$ ↔ USDm |
409
+ | `estimate_gooddollar_reserve_swap` | read* | Gas estimate (*needs `CELO_PRIVATE_KEY`) |
410
+ | `execute_gooddollar_reserve_swap` | write | Stdio only; signs approve + broker `swapIn` |
411
+
412
+ Details: [celina-sdk GoodDollar guide](../celina-sdk/docs/guides/gooddollar.md).
413
+
414
+ ### Self Agent ID notes
415
+
416
+ - **Registration lifecycle APIs** (`register_self_agent`, `refresh_self_proof`, `deregister_self_agent`) use `network: "mainnet"` in the Self REST API request body.
417
+ - **Demo and gated HTTP endpoints** (e.g. `https://app.ai.self.xyz/api/demo/verify`) require the query param **`network=celo-mainnet`**, not `network=mainnet`.
418
+ - **QR scan URLs** use `/scan/{sessionToken}`, not `/qr/...`.
419
+ - **`refresh_self_proof`** only starts after on-chain proof expiry (`isProofFresh` is false); while fresh it returns a clear error instead of a QR that will fail on-chain. The 30-day `is_expiring_soon` flag (matching Self SDK `isProofExpiringSoon`) is for warnings only. Self SDK also documents deregister → re-register as an alternative renewal path.
420
+
421
+ Example authenticated demo call:
422
+
423
+ ```text
424
+ authenticated_self_fetch
425
+ method: POST
426
+ url: https://app.ai.self.xyz/api/demo/verify?network=celo-mainnet
427
+ body: {}
428
+ ```
429
+
430
+ ## Adding a new tool
431
+
432
+ 1. Add a `ToolDefinition` in **celina-sdk** `src/tools/domains/` and export it from `ALL_TOOL_DEFINITIONS` (see [`@cnvlabskoxyz/celina-sdk/tools`](https://github.com/andrewkimjoseph/celina-sdk/blob/main/docs/guides/tool-catalog.md)).
433
+ 2. MCP picks it up automatically via `registerSdkTools` in `src/tools/sdk-register.ts` — no per-tool MCP file required.
434
+ 3. Add domain logic in celina-sdk services if the handler needs new client methods.
435
+ 4. Rebuild both packages: `npm run build` in celina-sdk, then celina-mcp.
436
+
437
+ Set `surfaces` on the definition (`"mcp"`, `"browser"`, or both) and use `filterToolDefinitions` options (`serverKeyToolsEnabled`, `estimateToolsEnabled`) to control hosted vs stdio exposure.
438
+
439
+ ## For developers
440
+
441
+ ### Architecture split
442
+
443
+ Chain logic comes from [`@cnvlabskoxyz/celina-sdk`](https://www.npmjs.com/package/@cnvlabskoxyz/celina-sdk) via [`src/context/app-context.ts`](src/context/app-context.ts). Write tools call SDK `prepare*` methods, then [`executePreparedFlow`](src/services/execute-prepared-flow.ts) simulates each step with [`simulatePreparedStep`](https://www.npmjs.com/package/@cnvlabskoxyz/celina-sdk/simulation) before signing:
444
+
445
+ | Layer | Source | Examples |
446
+ |-------|--------|----------|
447
+ | Reads | celina-sdk | balances, blocks, quotes, governance/staking reads, GoodDollar, ENS, humanness |
448
+ | DeFi writes | SDK `prepare*` + local executor | `send_token`, Mento/Uniswap/reserve/Aave executes |
449
+ | Governance / staking writes | `governanceWrite`, `stakingWrite` | `execute_lock_celo`, `execute_stake`, … (humanness-gated) |
450
+ | Account / GoodDollar identity | `accountWrite`, `gooddollarIdentityWrite`, `gooddollarFaceVerification` | `execute_register_celo_account`, connect/disconnect, face verification link |
451
+ | Self Agent ID | celina-sdk `client.self` | registration, proof refresh, authenticated fetch (`SELF_AGENT_PRIVATE_KEY`) |
452
+
453
+ Before each `wallet.sendTransaction`, `executePreparedFlow` calls `simulatePreparedStep` from `@cnvlabskoxyz/celina-sdk/simulation`. Reverts are caught **before gas is spent**; a post-mine `receipt.status` check remains as a safety net. No `feeCurrency` — the server wallet pays CELO gas.
454
+
455
+ Mento FX routing uses `@mento-protocol/mento-sdk` transitively through celina-sdk — MCP does not import it directly.
456
+
457
+ Self Agent ID is implemented in [`@cnvlabskoxyz/celina-sdk`](https://www.npmjs.com/package/@cnvlabskoxyz/celina-sdk) (`client.self`). For browser-first Self UIs, also see [`@selfxyz/agent-sdk`](https://www.npmjs.com/package/@selfxyz/agent-sdk).
458
+
459
+ ### Directory map
460
+
461
+ | Path | Purpose |
462
+ |------|---------|
463
+ | `src/index.ts` | stdio MCP bootstrap — loads env, connects transport |
464
+ | `src/server/` | `createServer()` factory and LLM instructions |
465
+ | `src/context/` | Composes SDK client + MCP runtime (wallet, executors, hooks) |
466
+ | `src/tools/` | `registerSdkTools` — registers filtered `ALL_TOOL_DEFINITIONS` from celina-sdk |
467
+ | `src/services/` | Wallet executor (`execute-prepared-flow.ts`) for signed broadcasts |
468
+ | `src/config/` | Env, token registry, Self constants |
469
+
470
+ Tool schemas, descriptions, and handlers live in **celina-sdk** `src/tools/domains/`. MCP only wires them to `@modelcontextprotocol/sdk` — see [Adding a new tool](#adding-a-new-tool).
471
+
472
+ ### Local development
473
+
474
+ ```bash
475
+ npm run dev # watch TypeScript → build/
476
+ npm run inspect # MCP Inspector UI over stdio
477
+ ```
478
+
479
+ Point your MCP client at the built entry for source development:
480
+
481
+ ```json
482
+ "args": ["/absolute/path/to/celina-mcp/build/index.js"]
483
+ ```
484
+
485
+ Copy `.env.example` to `.env` for `CELO_PRIVATE_KEY`, `SELF_AGENT_PRIVATE_KEY`, and RPC overrides.
486
+
487
+ ## Troubleshooting
488
+
489
+ | Symptom | Likely cause | What to do |
490
+ |---------|--------------|------------|
491
+ | MCP disconnects after ~60s; logs show `notifications/cancelled` | Cold `npx -y` or slow first import exceeds Claude Desktop handshake timeout | `npm i -g @cnvlabskoxyz/celina-mcp@latest`; set `"command"` to absolute path from `which` / `where` / `Get-Command`; Node 20/22 LTS — see [usecelina.xyz/mcp/local](https://www.usecelina.xyz/mcp/local) |
492
+ | Cursor reconnect loop; logs show `spawn celina-mcp ENOENT` | GUI PATH missing npm’s global bin (nvm/fnm/Homebrew on macOS; npm global prefix on Windows), or binary not installed | Run `which` / `where` / `Get-Command` (see [Local stdio](#local-stdio-recommended)) and paste that absolute path into `"command"`. If lookup is empty, install globally first, or as a last resort use `"command": "node"` and `"args": ["<npm root -g>/@cnvlabskoxyz/celina-mcp/build/index.js"]` |
493
+ | `Cannot find package 'ox'` from `permissionless` on MCP start | npm hoisted `permissionless` without `ox` at the same level | Run `npm i -g ox`, or upgrade to `@cnvlabskoxyz/celina-mcp@0.18.7`+ with `@cnvlabskoxyz/celina-sdk@0.25.0`+ |
494
+ | `ERESOLVE overriding peer dependency` for `permissionless` / `ox` on install | `permissionless@0.2.57` optional peer wants `ox@^0.8.0`; Celina pins `ox@^0.10.0` | Safe to ignore on 0.18.11+; or `npm i -g @cnvlabskoxyz/celina-mcp --legacy-peer-deps`; if you have `~/package.json`, add `legacy-peer-deps=true` to `~/.npmrc` |
495
+ | MCP server never connects / Shared MCP process crash on start | Stale npx cache, wrong command, or GUI PATH miss | Set `"command"` to absolute path from `which` / `where` / `Get-Command`; fully quit and restart your MCP client; for dev, point `args` at your local `build/index.js` |
496
+ | `EPIPE: broken pipe` in logs | Client closed stdio before late `initialize` response | Fix slow startup (global install + `celina-mcp` command) |
497
+ | Write tools fail immediately | Invalid or placeholder `CELO_PRIVATE_KEY` / `SELF_AGENT_PRIVATE_KEY` | Use 64 hex chars (with or without `0x`); remove placeholder values like `0x...`. Invalid keys no longer block startup — fix the env value and restart for writes |
498
+
499
+ ## Roadmap
500
+
501
+ - [x] Mento FX routing (`get_mento_swap_pairs`, `get_mento_fx_quote`, `estimate_mento_fx`, `execute_mento_fx`)
502
+ - [x] Uniswap v3 and v4 swaps (`get_uniswap_swap_pairs`, `get_uniswap_quote`, `estimate_uniswap_swap`, `execute_uniswap_swap`)
503
+ - [x] Aave tools (`get_aave_balances`, `supply_aave`, `withdraw_aave`) — USDT, WETH, USDm, USDC, CELO, EURm
504
+ - [x] Self proof verification (`verify_self_agent`, `verify_self_request`, `ai.self.xyz`)
505
+ - [x] Self Agent ID check (`lookup_self_agent`, registration & lifecycle tools)
506
+ - [x] Governance executes (`execute_lock_celo`, `execute_vote`, `execute_upvote`, …)
507
+ - [x] Staking executes (`execute_stake`, `execute_activate_stake`, delegate/undelegate)
508
+ - [x] Governance delegate discovery (`get_governance_delegates`, `get_governance_delegate_details` — Celo Mondo directory)
509
+ - [x] Humanness gate (`check_humanness`) and GoodDollar identity connect/disconnect
510
+
511
+ ## License
512
+
513
+ MIT
Binary file
Binary file
Binary file
package/bin/cli.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "../build/index.js";
@@ -0,0 +1,11 @@
1
+ import type { AgentCard } from "@a2a-js/sdk";
2
+ import { type A2ARequestHandler } from "@a2a-js/sdk/server";
3
+ export interface CreateA2ARequestHandlerOptions {
4
+ /** Public remote MCP base URL, e.g. https://mcp.usecelina.xyz */
5
+ baseUrl?: string;
6
+ /** Version string on the agent card (defaults to celina-mcp package version) */
7
+ cardVersion?: string;
8
+ }
9
+ export declare function createHostedA2AAgentCard(options?: CreateA2ARequestHandlerOptions): AgentCard;
10
+ export declare function createA2ARequestHandler(options?: CreateA2ARequestHandlerOptions): A2ARequestHandler;
11
+ export declare function getA2ARequestHandler(options?: CreateA2ARequestHandlerOptions): A2ARequestHandler;
@@ -0,0 +1,34 @@
1
+ import { DefaultRequestHandler, InMemoryTaskStore, } from "@a2a-js/sdk/server";
2
+ import { buildCelinaAgentCard } from "@cnvlabskoxyz/celina-sdk/a2a";
3
+ import { CeloClientFactory } from "../clients/celo-client.js";
4
+ import { loadConfig } from "../config/env.js";
5
+ import { createAppContext } from "../context/app-context.js";
6
+ import { createMcpRuntime } from "../tools/create-runtime.js";
7
+ import { CELINA_MCP_VERSION as mcpVersion } from "../server/version.js";
8
+ import { CelinaA2AExecutor } from "./executor.js";
9
+ let cachedHandler;
10
+ export function createHostedA2AAgentCard(options = {}) {
11
+ const baseUrl = options.baseUrl ??
12
+ process.env.CELINA_A2A_BASE_URL ??
13
+ "https://mcp.usecelina.xyz";
14
+ return buildCelinaAgentCard({
15
+ baseUrl,
16
+ version: options.cardVersion ?? mcpVersion,
17
+ });
18
+ }
19
+ export function createA2ARequestHandler(options = {}) {
20
+ const agentCard = createHostedA2AAgentCard(options);
21
+ const config = loadConfig();
22
+ const clientFactory = new CeloClientFactory(config);
23
+ const ctx = createAppContext(clientFactory, config);
24
+ const runtime = createMcpRuntime(ctx);
25
+ const executor = new CelinaA2AExecutor(runtime);
26
+ return new DefaultRequestHandler(agentCard, new InMemoryTaskStore(), executor);
27
+ }
28
+ export function getA2ARequestHandler(options = {}) {
29
+ if (!cachedHandler) {
30
+ cachedHandler = createA2ARequestHandler(options);
31
+ }
32
+ return cachedHandler;
33
+ }
34
+ //# sourceMappingURL=create-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-handler.js","sourceRoot":"","sources":["../../src/a2a/create-handler.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAElB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AASlD,IAAI,aAA4C,CAAC;AAEjD,MAAM,UAAU,wBAAwB,CACtC,UAA0C,EAAE;IAE5C,MAAM,OAAO,GACX,OAAO,CAAC,OAAO;QACf,OAAO,CAAC,GAAG,CAAC,mBAAmB;QAC/B,2BAA2B,CAAC;IAE9B,OAAO,oBAAoB,CAAC;QAC1B,OAAO;QACP,OAAO,EAAE,OAAO,CAAC,WAAW,IAAI,UAAU;KAC3C,CAAc,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,UAA0C,EAAE;IAE5C,MAAM,SAAS,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,MAAM,aAAa,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACpD,MAAM,GAAG,GAAG,gBAAgB,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,QAAQ,GAAG,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAEhD,OAAO,IAAI,qBAAqB,CAC9B,SAAS,EACT,IAAI,iBAAiB,EAAE,EACvB,QAAQ,CACT,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,UAA0C,EAAE;IAE5C,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,aAAa,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Message } from "@a2a-js/sdk";
2
+ import type { AgentExecutor, ExecutionEventBus, RequestContext } from "@a2a-js/sdk/server";
3
+ import { type ToolRuntime } from "@cnvlabskoxyz/celina-sdk/tools";
4
+ export interface CelinaToolInvocation {
5
+ tool: string;
6
+ arguments: Record<string, unknown>;
7
+ }
8
+ export declare function parseCelinaToolInvocation(message: Message): CelinaToolInvocation;
9
+ export declare class CelinaA2AExecutor implements AgentExecutor {
10
+ private readonly runtime;
11
+ constructor(runtime: ToolRuntime);
12
+ execute(requestContext: RequestContext, eventBus: ExecutionEventBus): Promise<void>;
13
+ cancelTask: () => Promise<void>;
14
+ }