@hedgehog-finance/hedgehog-plugin 1.0.11 → 1.0.12
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/index.ts +1 -1
- package/openclaw.plugin.json +2 -2
- package/package.json +2 -2
- package/src/channel.ts +9 -9
package/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { setHedgehogRuntime } from "./src/runtime";
|
|
|
4
4
|
import { allFeaturesTools } from "./src/features";
|
|
5
5
|
|
|
6
6
|
export default defineChannelPluginEntry({
|
|
7
|
-
id: "
|
|
7
|
+
id: "hedgehog_finance",
|
|
8
8
|
name: "Hedgehog Finance Comprehensive Plugin",
|
|
9
9
|
description: "WebSocket Channel & Watchlist SQLite Tools for Hedgehog App",
|
|
10
10
|
plugin: hedgehogFinancePlugin,
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "hedgehog_finance",
|
|
3
3
|
"kind": "channel",
|
|
4
4
|
"channels": [
|
|
5
|
-
"
|
|
5
|
+
"hedgehog_finance"
|
|
6
6
|
],
|
|
7
7
|
"name": "Hedgehog Finance Comprehensive Plugin",
|
|
8
8
|
"description": "WebSocket Channel & Watchlist SQLite Tools for Hedgehog App",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hedgehog-finance/hedgehog-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "Hedgehog App WebSocket channel and Watchlist Tools for OpenClaw",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bot",
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
"pluginSdkVersion": "2026.4.15"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|
package/src/channel.ts
CHANGED
|
@@ -192,10 +192,10 @@ async function getCurrentTurnUsageAsync(
|
|
|
192
192
|
* Hedgehog Finance Channel Plugin
|
|
193
193
|
*/
|
|
194
194
|
export const hedgehogFinancePlugin: ChannelPlugin<HedgehogFinanceResolvedAccount> = {
|
|
195
|
-
id: "
|
|
195
|
+
id: "hedgehog_finance",
|
|
196
196
|
|
|
197
197
|
meta: {
|
|
198
|
-
id: "
|
|
198
|
+
id: "hedgehog_finance",
|
|
199
199
|
label: "Hedgehog Finance",
|
|
200
200
|
selectionLabel: "Hedgehog Finance",
|
|
201
201
|
blurb: "Custom WebSocket relay channel for Hedgehog App",
|
|
@@ -215,7 +215,7 @@ export const hedgehogFinancePlugin: ChannelPlugin<HedgehogFinanceResolvedAccount
|
|
|
215
215
|
|
|
216
216
|
config: {
|
|
217
217
|
listAccountIds: (cfg: OpenClawConfig): string[] => {
|
|
218
|
-
const channelConfig = (cfg.channels?.['
|
|
218
|
+
const channelConfig = (cfg.channels?.['hedgehog_finance'] || {}) as any;
|
|
219
219
|
|
|
220
220
|
if (channelConfig.accounts) {
|
|
221
221
|
if (Array.isArray(channelConfig.accounts)) {
|
|
@@ -232,7 +232,7 @@ export const hedgehogFinancePlugin: ChannelPlugin<HedgehogFinanceResolvedAccount
|
|
|
232
232
|
},
|
|
233
233
|
|
|
234
234
|
resolveAccount: (cfg: OpenClawConfig, accountId?: string | null): HedgehogFinanceResolvedAccount => {
|
|
235
|
-
const channelConfig = (cfg.channels?.['
|
|
235
|
+
const channelConfig = (cfg.channels?.['hedgehog_finance'] || {}) as any;
|
|
236
236
|
const id = accountId || channelConfig.accountId || "default";
|
|
237
237
|
|
|
238
238
|
let accountInfo: any;
|
|
@@ -267,7 +267,7 @@ export const hedgehogFinancePlugin: ChannelPlugin<HedgehogFinanceResolvedAccount
|
|
|
267
267
|
},
|
|
268
268
|
|
|
269
269
|
defaultAccountId: (cfg: OpenClawConfig): string => {
|
|
270
|
-
const channelConfig = (cfg as any)?.channels?.['
|
|
270
|
+
const channelConfig = (cfg as any)?.channels?.['hedgehog_finance'];
|
|
271
271
|
return channelConfig?.accountId || "default";
|
|
272
272
|
},
|
|
273
273
|
},
|
|
@@ -394,7 +394,7 @@ export const hedgehogFinancePlugin: ChannelPlugin<HedgehogFinanceResolvedAccount
|
|
|
394
394
|
|
|
395
395
|
const route = rt.channel.routing.resolveAgentRoute({
|
|
396
396
|
cfg,
|
|
397
|
-
channel: "
|
|
397
|
+
channel: "hedgehog_finance",
|
|
398
398
|
accountId: String(accountId),
|
|
399
399
|
peer: { kind: "direct", id: chatId },
|
|
400
400
|
});
|
|
@@ -417,7 +417,7 @@ export const hedgehogFinancePlugin: ChannelPlugin<HedgehogFinanceResolvedAccount
|
|
|
417
417
|
AccountId: route.accountId,
|
|
418
418
|
AgentId: agentId,
|
|
419
419
|
AgentWorkspace: (route as any).agentWorkspace,
|
|
420
|
-
Provider: "
|
|
420
|
+
Provider: "hedgehog_finance",
|
|
421
421
|
MessageSid: id,
|
|
422
422
|
});
|
|
423
423
|
|
|
@@ -427,7 +427,7 @@ export const hedgehogFinancePlugin: ChannelPlugin<HedgehogFinanceResolvedAccount
|
|
|
427
427
|
ctx: context,
|
|
428
428
|
updateLastRoute: {
|
|
429
429
|
sessionKey: route.mainSessionKey,
|
|
430
|
-
channel: "
|
|
430
|
+
channel: "hedgehog_finance",
|
|
431
431
|
to: chatId,
|
|
432
432
|
accountId: String(accountId),
|
|
433
433
|
},
|
|
@@ -657,7 +657,7 @@ export const hedgehogFinancePlugin: ChannelPlugin<HedgehogFinanceResolvedAccount
|
|
|
657
657
|
if (!account.configured) {
|
|
658
658
|
return [
|
|
659
659
|
{
|
|
660
|
-
channel: "
|
|
660
|
+
channel: "hedgehog_finance",
|
|
661
661
|
accountId: account.accountId,
|
|
662
662
|
kind: "config" as const,
|
|
663
663
|
message: "Account not configured (missing relay token)",
|