@arcadia-finance/mcp-server 0.5.1 → 0.6.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.
- package/README.md +58 -52
- package/dist/clients/api.js +52 -11
- package/dist/clients/chain.js +25 -0
- package/dist/config/addresses.js +22 -2
- package/dist/config/chains.js +12 -4
- package/dist/index.js +36 -134
- package/dist/prompts/workflows.js +54 -18
- package/dist/resources/guides.js +1 -1
- package/dist/tools/aero.js +157 -0
- package/dist/tools/dev/send.js +4 -4
- package/dist/tools/index.js +6 -0
- package/dist/tools/output-schemas.js +103 -29
- package/dist/tools/read/account.js +57 -15
- package/dist/tools/read/aero-upgrade.js +53 -0
- package/dist/tools/read/asset-managers.js +9 -9
- package/dist/tools/read/assets.js +9 -9
- package/dist/tools/read/guides.js +4 -4
- package/dist/tools/read/points.js +4 -4
- package/dist/tools/read/pools.js +10 -9
- package/dist/tools/read/shapes.js +48 -0
- package/dist/tools/read/strategy.js +14 -13
- package/dist/tools/read/wallet.js +15 -15
- package/dist/tools/write/account/add-liquidity.js +9 -9
- package/dist/tools/write/account/aero-upgrade.js +124 -0
- package/dist/tools/write/account/borrow.js +5 -5
- package/dist/tools/write/account/close.js +8 -8
- package/dist/tools/write/account/create.js +3 -3
- package/dist/tools/write/account/deleverage.js +4 -4
- package/dist/tools/write/account/deposit.js +4 -4
- package/dist/tools/write/account/format-response.js +1 -1
- package/dist/tools/write/account/remove-liquidity.js +6 -6
- package/dist/tools/write/account/repay.js +4 -4
- package/dist/tools/write/account/stake.js +5 -5
- package/dist/tools/write/account/swap.js +4 -4
- package/dist/tools/write/account/withdraw.js +5 -5
- package/dist/tools/write/asset-managers/automations.js +14 -14
- package/dist/tools/write/asset-managers/intents.js +10 -7
- package/dist/tools/write/pool/deposit.js +5 -5
- package/dist/tools/write/pool/redeem.js +4 -4
- package/dist/tools/write/wallet/approve.js +4 -4
- package/dist/tools/write/wallet/upgrade-velo.js +76 -0
- package/dist/utils/analytics.js +68 -0
- package/dist/utils/http-config.js +4 -4
- package/llms-full.txt +114 -77
- package/llms.txt +47 -44
- package/package.json +8 -4
- package/server.json +10 -4
- package/skills/clamm-liquidity/SKILL.md +101 -83
- package/skills/clamm-liquidity/automation.md +14 -14
- package/skills/clamm-liquidity/selection.md +13 -13
- package/skills/clamm-liquidity/strategies.md +135 -53
- package/skills/openclaw/SKILL.md +3 -3
- package/skills/openclaw/arcadia.sh +24 -45
- package/skills/openclaw/contracts.md +19 -16
- package/dist/utils/tool-naming.js +0 -91
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
const TOOL_NAME_RE = /\b(read|write|dev)\.[a-z_]+(?:\.[a-z_]+)*/g;
|
|
2
|
-
export function convertToolNames(text) {
|
|
3
|
-
return text.replace(TOOL_NAME_RE, (match) => match.replace(/\./g, "_"));
|
|
4
|
-
}
|
|
5
|
-
function deepConvertToolNames(value) {
|
|
6
|
-
if (typeof value === "string")
|
|
7
|
-
return convertToolNames(value);
|
|
8
|
-
if (Array.isArray(value))
|
|
9
|
-
return value.map(deepConvertToolNames);
|
|
10
|
-
if (value !== null && typeof value === "object") {
|
|
11
|
-
const result = {};
|
|
12
|
-
for (const [k, v] of Object.entries(value)) {
|
|
13
|
-
result[k] = deepConvertToolNames(v);
|
|
14
|
-
}
|
|
15
|
-
return result;
|
|
16
|
-
}
|
|
17
|
-
return value;
|
|
18
|
-
}
|
|
19
|
-
export function wrapServerForHttp(server) {
|
|
20
|
-
return new Proxy(server, {
|
|
21
|
-
get(target, prop, receiver) {
|
|
22
|
-
if (prop === "registerTool") {
|
|
23
|
-
return (name, config, cb) => {
|
|
24
|
-
const newName = convertToolNames(name);
|
|
25
|
-
const newConfig = { ...config };
|
|
26
|
-
if (typeof newConfig.description === "string") {
|
|
27
|
-
newConfig.description = convertToolNames(newConfig.description);
|
|
28
|
-
}
|
|
29
|
-
const wrappedCb = async (...args) => {
|
|
30
|
-
const result = (await cb(...args));
|
|
31
|
-
const content = result.content;
|
|
32
|
-
const structuredContent = result.structuredContent;
|
|
33
|
-
return {
|
|
34
|
-
...result,
|
|
35
|
-
...(content && {
|
|
36
|
-
content: content.map((c) => ({
|
|
37
|
-
...c,
|
|
38
|
-
...(typeof c.text === "string" && { text: convertToolNames(c.text) }),
|
|
39
|
-
})),
|
|
40
|
-
}),
|
|
41
|
-
...(structuredContent !== undefined && {
|
|
42
|
-
structuredContent: deepConvertToolNames(structuredContent),
|
|
43
|
-
}),
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
return target.registerTool(newName, newConfig, wrappedCb);
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
if (prop === "registerResource") {
|
|
50
|
-
return (name, uriOrTemplate, config, readCallback) => {
|
|
51
|
-
const wrappedCallback = async (...args) => {
|
|
52
|
-
const result = (await readCallback(...args));
|
|
53
|
-
const contents = result.contents;
|
|
54
|
-
return {
|
|
55
|
-
...result,
|
|
56
|
-
...(contents && {
|
|
57
|
-
contents: contents.map((c) => ({
|
|
58
|
-
...c,
|
|
59
|
-
...(typeof c.text === "string" && { text: convertToolNames(c.text) }),
|
|
60
|
-
})),
|
|
61
|
-
}),
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
return target.registerResource(name, uriOrTemplate, config, wrappedCallback);
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
if (prop === "registerPrompt") {
|
|
68
|
-
return (name, config, cb) => {
|
|
69
|
-
const wrappedCb = async (...args) => {
|
|
70
|
-
const result = (await cb(...args));
|
|
71
|
-
const messages = result.messages;
|
|
72
|
-
return {
|
|
73
|
-
...result,
|
|
74
|
-
...(messages && {
|
|
75
|
-
messages: messages.map((m) => {
|
|
76
|
-
const content = m.content;
|
|
77
|
-
if (content && typeof content.text === "string") {
|
|
78
|
-
return { ...m, content: { ...content, text: convertToolNames(content.text) } };
|
|
79
|
-
}
|
|
80
|
-
return m;
|
|
81
|
-
}),
|
|
82
|
-
}),
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
return target.registerPrompt(name, config, wrappedCb);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
return Reflect.get(target, prop, receiver);
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
}
|