solana-traderclaw 1.0.56 → 1.0.58
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/dist/index.js +8 -6
- package/openclaw.plugin.json +20 -1
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -780,6 +780,7 @@ function parseConfig(raw) {
|
|
|
780
780
|
const gatewayBaseUrl = typeof obj.gatewayBaseUrl === "string" ? obj.gatewayBaseUrl : void 0;
|
|
781
781
|
const gatewayToken = typeof obj.gatewayToken === "string" ? obj.gatewayToken : void 0;
|
|
782
782
|
const forwardTelegramRecipient = typeof obj.forwardTelegramRecipient === "string" ? obj.forwardTelegramRecipient : typeof obj.forwardTelegramChatId === "string" ? obj.forwardTelegramChatId : void 0;
|
|
783
|
+
const telegramBotToken = typeof obj.telegramBotToken === "string" ? obj.telegramBotToken : void 0;
|
|
783
784
|
const dataDir = typeof obj.dataDir === "string" ? obj.dataDir : void 0;
|
|
784
785
|
const workspaceDir = typeof obj.workspaceDir === "string" ? obj.workspaceDir : void 0;
|
|
785
786
|
const bootstrapDecisionCount = typeof obj.bootstrapDecisionCount === "number" ? obj.bootstrapDecisionCount : 10;
|
|
@@ -803,6 +804,7 @@ function parseConfig(raw) {
|
|
|
803
804
|
gatewayBaseUrl,
|
|
804
805
|
gatewayToken,
|
|
805
806
|
forwardTelegramRecipient,
|
|
807
|
+
telegramBotToken,
|
|
806
808
|
dataDir,
|
|
807
809
|
workspaceDir,
|
|
808
810
|
bootstrapDecisionCount,
|
|
@@ -1035,12 +1037,12 @@ var solanaTraderPlugin = {
|
|
|
1035
1037
|
onUnauthorized
|
|
1036
1038
|
});
|
|
1037
1039
|
};
|
|
1038
|
-
const
|
|
1040
|
+
const getTelegramBotToken = () => String(config.telegramBotToken || "").trim();
|
|
1039
1041
|
const resolveForwardTelegramDestination = async () => {
|
|
1040
|
-
const raw = String(config.forwardTelegramRecipient || "").trim()
|
|
1042
|
+
const raw = String(config.forwardTelegramRecipient || "").trim();
|
|
1041
1043
|
if (!raw) return "";
|
|
1042
1044
|
if (looksLikeTelegramChatId(raw)) return raw;
|
|
1043
|
-
const botToken =
|
|
1045
|
+
const botToken = getTelegramBotToken();
|
|
1044
1046
|
try {
|
|
1045
1047
|
return await resolveTelegramRecipientToChatId({ botToken, raw });
|
|
1046
1048
|
} catch (e) {
|
|
@@ -2080,7 +2082,7 @@ var solanaTraderPlugin = {
|
|
|
2080
2082
|
});
|
|
2081
2083
|
api.registerTool({
|
|
2082
2084
|
name: "solana_gateway_credentials_set",
|
|
2083
|
-
description: "Register or update your OpenClaw Gateway credentials with the orchestrator. This enables event-to-agent forwarding \u2014 when subscriptions include agentId, the orchestrator delivers each stream event to your Gateway via /v1/responses. Call this once during initial setup (Step 0). The gatewayBaseUrl is your self-hosted OpenClaw Gateway's public URL. The gatewayToken is the Bearer token for authenticating forwarded events. Use forwardTelegramRecipient with your @username or numeric chat id \u2014 the plugin resolves usernames via Telegram getChat when
|
|
2085
|
+
description: "Register or update your OpenClaw Gateway credentials with the orchestrator. This enables event-to-agent forwarding \u2014 when subscriptions include agentId, the orchestrator delivers each stream event to your Gateway via /v1/responses. Call this once during initial setup (Step 0). The gatewayBaseUrl is your self-hosted OpenClaw Gateway's public URL. The gatewayToken is the Bearer token for authenticating forwarded events. Use forwardTelegramRecipient with your @username or numeric chat id \u2014 the plugin resolves usernames via Telegram getChat when plugin config telegramBotToken is set. Alternatively pass forwardTelegramChatId (numeric) or null to clear.",
|
|
2084
2086
|
parameters: Type.Object({
|
|
2085
2087
|
gatewayBaseUrl: Type.String({ description: "Your OpenClaw Gateway's public HTTPS URL (e.g., 'https://gateway.example.com')" }),
|
|
2086
2088
|
gatewayToken: Type.String({ description: "Bearer token for authenticating forwarded events to your Gateway" }),
|
|
@@ -2088,7 +2090,7 @@ var solanaTraderPlugin = {
|
|
|
2088
2090
|
active: Type.Optional(Type.Boolean({ description: "Whether forwarding is active (default: true)" })),
|
|
2089
2091
|
forwardTelegramRecipient: Type.Optional(
|
|
2090
2092
|
Type.String({
|
|
2091
|
-
description: "Telegram @username or numeric chat id. Resolved to chat id via Bot API when not numeric (requires
|
|
2093
|
+
description: "Telegram @username or numeric chat id. Resolved to chat id via Bot API when not numeric (requires telegramBotToken in plugin config)."
|
|
2092
2094
|
})
|
|
2093
2095
|
),
|
|
2094
2096
|
forwardTelegramChatId: Type.Optional(
|
|
@@ -2108,7 +2110,7 @@ var solanaTraderPlugin = {
|
|
|
2108
2110
|
const recipientRaw = params.forwardTelegramRecipient;
|
|
2109
2111
|
if (recipientRaw !== void 0 && recipientRaw !== null && String(recipientRaw).trim()) {
|
|
2110
2112
|
const id = await resolveTelegramRecipientToChatId({
|
|
2111
|
-
botToken:
|
|
2113
|
+
botToken: getTelegramBotToken(),
|
|
2112
2114
|
raw: String(recipientRaw)
|
|
2113
2115
|
});
|
|
2114
2116
|
body.forwardTelegramChatId = id;
|
package/openclaw.plugin.json
CHANGED
|
@@ -59,9 +59,17 @@
|
|
|
59
59
|
"type": "string",
|
|
60
60
|
"description": "Bearer token used by orchestrator when calling your Gateway /v1/responses."
|
|
61
61
|
},
|
|
62
|
+
"forwardTelegramRecipient": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Telegram @username or numeric chat id for orchestrator reply forwarding (optional). Legacy key forwardTelegramChatId is also accepted."
|
|
65
|
+
},
|
|
66
|
+
"telegramBotToken": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "Telegram bot token from @BotFather. Required only to resolve @username to chat id via Bot API. Set in plugin config (not environment variables) for OpenClaw compatibility."
|
|
69
|
+
},
|
|
62
70
|
"workspaceDir": {
|
|
63
71
|
"type": "string",
|
|
64
|
-
"description": "Override workspace directory path. Defaults to ~/.openclaw/workspace/
|
|
72
|
+
"description": "Override workspace directory path. Defaults to ~/.openclaw/workspace/ when unset."
|
|
65
73
|
},
|
|
66
74
|
"bootstrapDecisionCount": {
|
|
67
75
|
"type": "integer",
|
|
@@ -178,6 +186,17 @@
|
|
|
178
186
|
"sensitive": true,
|
|
179
187
|
"advanced": true
|
|
180
188
|
},
|
|
189
|
+
"forwardTelegramRecipient": {
|
|
190
|
+
"label": "Telegram recipient",
|
|
191
|
+
"placeholder": "@username or numeric chat id",
|
|
192
|
+
"advanced": true
|
|
193
|
+
},
|
|
194
|
+
"telegramBotToken": {
|
|
195
|
+
"label": "Telegram bot token",
|
|
196
|
+
"placeholder": "from @BotFather",
|
|
197
|
+
"sensitive": true,
|
|
198
|
+
"advanced": true
|
|
199
|
+
},
|
|
181
200
|
"workspaceDir": {
|
|
182
201
|
"label": "Workspace Directory",
|
|
183
202
|
"placeholder": "~/.openclaw/workspace",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solana-traderclaw",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58",
|
|
4
4
|
"description": "TraderClaw V1-Upgraded — Solana trading for OpenClaw with intelligence lab, tool envelopes, prompt scrubbing, read-only X social intel, and split skill docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "node build.mjs",
|
|
20
|
-
"prepublishOnly": "npm run build"
|
|
20
|
+
"prepublishOnly": "npm run build",
|
|
21
|
+
"sync-cli": "node scripts/sync-cli-version.mjs",
|
|
22
|
+
"release:patch": "node scripts/release-patch.mjs"
|
|
21
23
|
},
|
|
22
24
|
"keywords": [
|
|
23
25
|
"traderclaw",
|
|
@@ -55,7 +57,6 @@
|
|
|
55
57
|
"openclaw": {
|
|
56
58
|
"extensions": [
|
|
57
59
|
"./dist/index.js"
|
|
58
|
-
]
|
|
59
|
-
"hooks": []
|
|
60
|
+
]
|
|
60
61
|
}
|
|
61
62
|
}
|