@degenly/agent 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 +13 -14
- package/SKILL.md +3 -3
- package/dist/cli.js +4 -6
- package/docs/clients.md +6 -6
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,37 +4,36 @@ Degenly for AI agents: one package with an MCP server, a CLI and a `SKILL.md`.
|
|
|
4
4
|
Your AI app (Claude Code, Gemini CLI, Cursor, Claude Desktop) uses it to look up Solana tokens and trade them on Degenly.
|
|
5
5
|
Demo mode needs nothing; live mode uses a separate agent wallet whose key is created and kept on your computer.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
Live mode trades real SOL from the agent wallet after the 3 setup steps below; every live buy / sell asks for your confirmation first (on by default).
|
|
8
|
+
Spending limits apply to trades made through Degenly. An agent that can read files on this computer could read the agent wallet key and move funds outside Degenly. Fund the agent wallet with only what you can afford to lose.
|
|
9
9
|
|
|
10
|
-
## Demo mode
|
|
10
|
+
## Demo mode
|
|
11
11
|
|
|
12
12
|
10 demo SOL, live Degenly prices, no wallet, no key, no account, no browser step.
|
|
13
13
|
The demo record lives only on your computer in `~/.degenly/demo.json`; nothing about it is sent to Degenly.
|
|
14
14
|
|
|
15
|
-
One command, no wallet: `npx -y @degenly/agent@0.1.
|
|
15
|
+
One command, no wallet: `npx -y @degenly/agent@0.1.1 demo status --json`
|
|
16
16
|
|
|
17
17
|
## Live mode setup (3 steps)
|
|
18
18
|
|
|
19
|
-
1. `npx -y @degenly/agent@0.1.
|
|
19
|
+
1. `npx -y @degenly/agent@0.1.1 setup --owner <main wallet address>`: creates the agent wallet on this computer
|
|
20
20
|
(`~/.degenly/agent-wallet.json`) and prints its address and a pairing code (valid 10 minutes, once).
|
|
21
21
|
2. On degenly.app open `/bot`, sign in with your main wallet, choose "Pair agent" and paste the pairing code.
|
|
22
|
-
The site shows an API key once. Fund the agent wallet with SOL only
|
|
23
|
-
|
|
24
|
-
3. `npx -y @degenly/agent@0.1.0 login --key-file <path>`: stores the API key in `~/.degenly/credentials.json`
|
|
22
|
+
The site shows an API key once. Fund the agent wallet with SOL only with what you can afford to lose.
|
|
23
|
+
3. `npx -y @degenly/agent@0.1.1 login --key-file <path>`: stores the API key in `~/.degenly/credentials.json`
|
|
25
24
|
(or pipe the key on stdin to `login`; the key is never taken as a command argument).
|
|
26
25
|
|
|
27
|
-
Check it: `npx -y @degenly/agent@0.1.
|
|
28
|
-
`npx -y @degenly/agent@0.1.
|
|
26
|
+
Check it: `npx -y @degenly/agent@0.1.1 whoami`. A new pairing code for the same wallet:
|
|
27
|
+
`npx -y @degenly/agent@0.1.1 pair --owner <main wallet address>` (`setup` never overwrites an existing wallet).
|
|
29
28
|
|
|
30
29
|
## Add Degenly to your AI app (one line per client)
|
|
31
30
|
|
|
32
|
-
- Claude Code: `claude mcp add degenly -- npx -y @degenly/agent@0.1.
|
|
33
|
-
- Gemini CLI: `gemini mcp add degenly npx -y @degenly/agent@0.1.
|
|
31
|
+
- Claude Code: `claude mcp add degenly -- npx -y @degenly/agent@0.1.1`
|
|
32
|
+
- Gemini CLI: `gemini mcp add degenly npx -y @degenly/agent@0.1.1`
|
|
34
33
|
- Cursor (`mcp.json`) / Claude Desktop (`claude_desktop_config.json`):
|
|
35
34
|
|
|
36
35
|
```json
|
|
37
|
-
{ "mcpServers": { "degenly": { "command": "npx", "args": ["-y", "@degenly/agent@0.1.
|
|
36
|
+
{ "mcpServers": { "degenly": { "command": "npx", "args": ["-y", "@degenly/agent@0.1.1"] } } }
|
|
38
37
|
```
|
|
39
38
|
|
|
40
39
|
ChatGPT does not support local MCP servers, so it cannot use this package. The Gemini web app: not verified.
|
|
@@ -112,7 +111,7 @@ Errors: non-zero exit (0 ok, 2 usage, 3 rate limited, 4 network / Degenly, 1 oth
|
|
|
112
111
|
| `LOW_SOL` / `NO_HOLD` | demo: not enough demo SOL / no demo position |
|
|
113
112
|
| `RATE_LIMITED` | wait `retryAfterMs`, then retry |
|
|
114
113
|
| `NETWORK` / `BAD_RESPONSE` | Degenly unreachable or unexpected answer |
|
|
115
|
-
| `NOT_FOUND` | the Bot API
|
|
114
|
+
| `NOT_FOUND` | the Bot API answered 404 (off right now): nothing was sent; demo mode still works |
|
|
116
115
|
| `NO_WALLET` / `NOT_LOGGED_IN` / `LIVE_NOT_READY` | run setup, pair on degenly.app/bot, then login |
|
|
117
116
|
| `WALLET_EXISTS` | an agent wallet exists and is never overwritten; use `pair` for a new code |
|
|
118
117
|
| `KEY_ARG_REFUSED` | the API key was given as an argument; use stdin or `--key-file` |
|
package/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: degenly
|
|
3
|
-
description: Use when asked to look up, try or trade Solana tokens on Degenly. Demo mode (degenly_*, 10 demo SOL, no real funds) works now; live mode (degenly_live_*, the agent wallet, real SOL, the human confirms each trade)
|
|
3
|
+
description: Use when asked to look up, try or trade Solana tokens on Degenly. Demo mode (degenly_*, 10 demo SOL, no real funds) works now; live mode (degenly_live_*, the agent wallet, real SOL, the human confirms each trade) works after the human sets it up.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Degenly for agents (skill)
|
|
@@ -10,7 +10,7 @@ description: Use when asked to look up, try or trade Solana tokens on Degenly. D
|
|
|
10
10
|
- **Demo** (`degenly_*` tools, CLI `degenly demo status` and the other `demo` commands): 10 demo SOL at live Degenly prices. The record lives only in
|
|
11
11
|
`~/.degenly/demo.json`. No wallet, no key, no account. Every answer has `"mode":"demo"`.
|
|
12
12
|
- **Live** (`degenly_live_*` tools, CLI `degenly whoami` and the `live` read commands): the agent wallet, REAL SOL. Every answer
|
|
13
|
-
has `"mode":"live"`.
|
|
13
|
+
has `"mode":"live"`. If a live tool answers `NOT_FOUND`, Degenly's Bot API is off right now; say so plainly.
|
|
14
14
|
|
|
15
15
|
Never mix them: a demo result is never a real trade, and a live result is never a demo. Always tell the human which
|
|
16
16
|
mode an answer came from.
|
|
@@ -76,7 +76,7 @@ Read `hint` first. Then:
|
|
|
76
76
|
| `BAD_AMOUNT` / `BAD_PERCENT` / `BAD_ARGS` / `UNKNOWN_COMMAND` | fix the arguments (see `degenly help`); do not guess a different trade |
|
|
77
77
|
| `RATE_LIMITED` | wait `retryAfterMs` once; never retry in a loop |
|
|
78
78
|
| `NETWORK` / `BAD_RESPONSE` | tell the human; retry a read later. Never retry a live buy / sell on your own |
|
|
79
|
-
| `NOT_FOUND` |
|
|
79
|
+
| `NOT_FOUND` | Degenly's Bot API is off right now; nothing was sent; offer demo mode |
|
|
80
80
|
| `NO_WALLET` / `NOT_LOGGED_IN` / `LIVE_NOT_READY` / `KEY_INVALID` / `KEY_WALLET_MISMATCH` | tell the human which setup step is missing; do not run setup or login yourself |
|
|
81
81
|
| `SPEND_LIMIT` / `SPEND_LIMIT_NOT_SET` / `LOCAL_SPEND_LIMIT` / `LOCAL_LIMIT_UNKNOWN` | nothing was sent; tell the human the limit (only they can change it on degenly.app `/bot`) |
|
|
82
82
|
| `TOKEN_BLOCKED` | buying this token through the API is not allowed (see `reason`); do not look for another way |
|
package/dist/cli.js
CHANGED
|
@@ -27,9 +27,9 @@ import { SOL_DECIMALS, SOL_MINT, demoFill, demoNetworkLamports, formatUnits, par
|
|
|
27
27
|
import { DEMO_START_LAMPORTS, loadDemo, resetDemo, saveDemo } from "./demo/store.js";
|
|
28
28
|
import { SYMBOL_MAX_CHARS, cleanText, isMint, showUntrusted, untrustedName, untrustedSymbol } from "./sanitize.js";
|
|
29
29
|
import { createLiveRead } from "./tools/live-read.js";
|
|
30
|
-
export const VERSION = "0.1.
|
|
30
|
+
export const VERSION = "0.1.1";
|
|
31
31
|
export const DEMO_NOTE = "Demo trade. No real funds moved.";
|
|
32
|
-
export const LIVE_NOTICE = "
|
|
32
|
+
export const LIVE_NOTICE = "Demo mode: 10 demo SOL, live prices, record kept only on this computer (~/.degenly/demo.json). For live mode the human runs: degenly setup --owner <main wallet address>";
|
|
33
33
|
export const RECORD_PATH_TEXT = "~/.degenly/demo.json";
|
|
34
34
|
export const TRADES_DEFAULT = 20;
|
|
35
35
|
export const TRADES_MAX = 200;
|
|
@@ -58,7 +58,7 @@ const HINTS = {
|
|
|
58
58
|
NETWORK: "Could not reach degenly.app. Check the connection and retry.",
|
|
59
59
|
BAD_RESPONSE: "degenly.app answered something unexpected. Retry later.",
|
|
60
60
|
SAVE_FAILED: `Could not write ${RECORD_PATH_TEXT}. Check disk space and permissions.`,
|
|
61
|
-
NOT_AVAILABLE_IN_DEMO: "Live
|
|
61
|
+
NOT_AVAILABLE_IN_DEMO: "Live commands do not run here. Demo commands (demo ...) use demo SOL only: no real funds.",
|
|
62
62
|
};
|
|
63
63
|
/** 0 ok · 2 usage · 3 rate limited · 4 network / Degenly side · 1 any other refusal. */
|
|
64
64
|
export function exitCodeFor(error) {
|
|
@@ -528,8 +528,7 @@ export function humanize(title, a) {
|
|
|
528
528
|
const args = (n, r) => r.length === n;
|
|
529
529
|
// ---- live (DGAJ15 core: no trade command yet) --------------------------------------------------
|
|
530
530
|
export const LIVE_NOTE = "Live mode. The agent wallet key stays on this computer and is never sent.";
|
|
531
|
-
export const PAIR_NEXT_STEP =
|
|
532
|
-
`${LIVE_NOT_AVAILABLE} Do not fund the agent wallet until live trading is available.`;
|
|
531
|
+
export const PAIR_NEXT_STEP = 'Next: open https://degenly.app/bot, sign in with your main wallet, choose "Pair agent" and paste the pairing code. Then run login with the API key the site shows once. Fund the agent wallet with SOL only with what you can afford to lose.';
|
|
533
532
|
/** Max wait for piped stdin at `login` (never a prompt: a terminal stdin is not read at all). */
|
|
534
533
|
export const STDIN_WAIT_MS = 5_000;
|
|
535
534
|
function liveOk(fields) {
|
|
@@ -548,7 +547,6 @@ function pairingAnswer(wallet, owner, now, created) {
|
|
|
548
547
|
pairingCodeValidMs: API_PAIR_TS_SKEW_MS,
|
|
549
548
|
walletFile: WALLET_PATH_TEXT,
|
|
550
549
|
warning: AGENT_WALLET_WARNING,
|
|
551
|
-
liveTrading: LIVE_NOT_AVAILABLE,
|
|
552
550
|
next: PAIR_NEXT_STEP,
|
|
553
551
|
});
|
|
554
552
|
}
|
package/docs/clients.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Client setup
|
|
2
2
|
|
|
3
|
-
`@degenly/agent` is a local MCP stdio server. Every client below starts it with `npx -y @degenly/agent@0.1.
|
|
4
|
-
|
|
3
|
+
`@degenly/agent` is a local MCP stdio server. Every client below starts it with `npx -y @degenly/agent@0.1.1`.
|
|
4
|
+
Demo tools use demo SOL only; live tools use the agent wallet after the 3 setup steps in the README.
|
|
5
5
|
|
|
6
6
|
How the confirmation step works in this package: before a live buy / sell is sent, the server asks the human with
|
|
7
7
|
an MCP **form elicitation** (one checkbox, "Confirm this real trade", 120 s). Only a ticked, accepted form sends the
|
|
@@ -13,7 +13,7 @@ documentation or tested it with this package.
|
|
|
13
13
|
## Claude Code
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
claude mcp add degenly -- npx -y @degenly/agent@0.1.
|
|
16
|
+
claude mcp add degenly -- npx -y @degenly/agent@0.1.1
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Source: [Claude Code MCP](https://code.claude.com/docs/en/mcp).
|
|
@@ -28,7 +28,7 @@ Source: [Claude Code MCP](https://code.claude.com/docs/en/mcp).
|
|
|
28
28
|
## Gemini CLI
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
gemini mcp add degenly npx -y @degenly/agent@0.1.
|
|
31
|
+
gemini mcp add degenly npx -y @degenly/agent@0.1.1
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Source: [gemini-cli mcp-server.md](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md)
|
|
@@ -43,7 +43,7 @@ Source: [gemini-cli mcp-server.md](https://github.com/google-gemini/gemini-cli/b
|
|
|
43
43
|
Add to `mcp.json`:
|
|
44
44
|
|
|
45
45
|
```json
|
|
46
|
-
{ "mcpServers": { "degenly": { "command": "npx", "args": ["-y", "@degenly/agent@0.1.
|
|
46
|
+
{ "mcpServers": { "degenly": { "command": "npx", "args": ["-y", "@degenly/agent@0.1.1"] } } }
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
Source: [Cursor MCP](https://cursor.com/docs/context/mcp) (stdio servers; the page lists elicitation support).
|
|
@@ -56,7 +56,7 @@ Source: [Cursor MCP](https://cursor.com/docs/context/mcp) (stdio servers; the pa
|
|
|
56
56
|
Add to `claude_desktop_config.json`:
|
|
57
57
|
|
|
58
58
|
```json
|
|
59
|
-
{ "mcpServers": { "degenly": { "command": "npx", "args": ["-y", "@degenly/agent@0.1.
|
|
59
|
+
{ "mcpServers": { "degenly": { "command": "npx", "args": ["-y", "@degenly/agent@0.1.1"] } } }
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Source: [MCP: connect local servers](https://modelcontextprotocol.io/docs/develop/connect-local-servers)
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@degenly/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@degenly/agent",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@modelcontextprotocol/sdk": "1.32.2"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@degenly/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Degenly for AI agents: MCP server + CLI to look up and trade Solana tokens on Degenly. Demo mode needs no wallet; live mode uses a separate local agent wallet.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|