@umimoney/clawdbot-relay-plugin 0.1.8 → 0.1.9
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/clawdbot.plugin.json +1 -1
- package/dist/index.d.mts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +20 -0
- package/dist/index.mjs +20 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://clawdbot.dev/schemas/plugin.json",
|
|
3
3
|
"id": "umi-relay",
|
|
4
4
|
"name": "UMI Relay",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.9",
|
|
6
6
|
"description": "Connect to UMI relay server for real-time chat visibility in UMI web UI",
|
|
7
7
|
"type": "channel",
|
|
8
8
|
"main": "index.js",
|
package/dist/index.d.mts
CHANGED
|
@@ -102,6 +102,11 @@ interface ClawdbotPluginApi {
|
|
|
102
102
|
}) => void;
|
|
103
103
|
runtime: any;
|
|
104
104
|
}
|
|
105
|
+
interface AccountInfo {
|
|
106
|
+
accountId: string;
|
|
107
|
+
enabled: boolean;
|
|
108
|
+
configured: boolean;
|
|
109
|
+
}
|
|
105
110
|
interface ChannelPlugin {
|
|
106
111
|
id: string;
|
|
107
112
|
meta: {
|
|
@@ -113,6 +118,18 @@ interface ChannelPlugin {
|
|
|
113
118
|
chatTypes: string[];
|
|
114
119
|
media: boolean;
|
|
115
120
|
};
|
|
121
|
+
configSchema: {
|
|
122
|
+
type: string;
|
|
123
|
+
properties: Record<string, any>;
|
|
124
|
+
additionalProperties: boolean;
|
|
125
|
+
};
|
|
126
|
+
config: {
|
|
127
|
+
listAccountIds: (cfg: any) => string[];
|
|
128
|
+
resolveAccount: (cfg: any, accountId: string) => AccountInfo;
|
|
129
|
+
defaultAccountId: (cfg: any) => string;
|
|
130
|
+
isConfigured: (account: AccountInfo) => boolean;
|
|
131
|
+
describeAccount: (account: AccountInfo) => AccountInfo;
|
|
132
|
+
};
|
|
116
133
|
outbound: {
|
|
117
134
|
deliveryMode: 'direct' | 'queued';
|
|
118
135
|
resolveTarget: (opts: {
|
package/dist/index.d.ts
CHANGED
|
@@ -102,6 +102,11 @@ interface ClawdbotPluginApi {
|
|
|
102
102
|
}) => void;
|
|
103
103
|
runtime: any;
|
|
104
104
|
}
|
|
105
|
+
interface AccountInfo {
|
|
106
|
+
accountId: string;
|
|
107
|
+
enabled: boolean;
|
|
108
|
+
configured: boolean;
|
|
109
|
+
}
|
|
105
110
|
interface ChannelPlugin {
|
|
106
111
|
id: string;
|
|
107
112
|
meta: {
|
|
@@ -113,6 +118,18 @@ interface ChannelPlugin {
|
|
|
113
118
|
chatTypes: string[];
|
|
114
119
|
media: boolean;
|
|
115
120
|
};
|
|
121
|
+
configSchema: {
|
|
122
|
+
type: string;
|
|
123
|
+
properties: Record<string, any>;
|
|
124
|
+
additionalProperties: boolean;
|
|
125
|
+
};
|
|
126
|
+
config: {
|
|
127
|
+
listAccountIds: (cfg: any) => string[];
|
|
128
|
+
resolveAccount: (cfg: any, accountId: string) => AccountInfo;
|
|
129
|
+
defaultAccountId: (cfg: any) => string;
|
|
130
|
+
isConfigured: (account: AccountInfo) => boolean;
|
|
131
|
+
describeAccount: (account: AccountInfo) => AccountInfo;
|
|
132
|
+
};
|
|
116
133
|
outbound: {
|
|
117
134
|
deliveryMode: 'direct' | 'queued';
|
|
118
135
|
resolveTarget: (opts: {
|
package/dist/index.js
CHANGED
|
@@ -282,6 +282,26 @@ var umiRelayChannel = {
|
|
|
282
282
|
chatTypes: ["direct"],
|
|
283
283
|
media: false
|
|
284
284
|
},
|
|
285
|
+
configSchema: {
|
|
286
|
+
type: "object",
|
|
287
|
+
properties: {},
|
|
288
|
+
additionalProperties: false
|
|
289
|
+
},
|
|
290
|
+
config: {
|
|
291
|
+
listAccountIds: () => ["default"],
|
|
292
|
+
resolveAccount: (cfg, accountId) => ({
|
|
293
|
+
accountId: accountId || "default",
|
|
294
|
+
enabled: true,
|
|
295
|
+
configured: true
|
|
296
|
+
}),
|
|
297
|
+
defaultAccountId: () => "default",
|
|
298
|
+
isConfigured: () => true,
|
|
299
|
+
describeAccount: (account) => ({
|
|
300
|
+
accountId: account.accountId,
|
|
301
|
+
enabled: account.enabled,
|
|
302
|
+
configured: account.configured
|
|
303
|
+
})
|
|
304
|
+
},
|
|
285
305
|
outbound: {
|
|
286
306
|
deliveryMode: "direct",
|
|
287
307
|
resolveTarget: ({ to }) => ({ ok: true, to }),
|
package/dist/index.mjs
CHANGED
|
@@ -247,6 +247,26 @@ var umiRelayChannel = {
|
|
|
247
247
|
chatTypes: ["direct"],
|
|
248
248
|
media: false
|
|
249
249
|
},
|
|
250
|
+
configSchema: {
|
|
251
|
+
type: "object",
|
|
252
|
+
properties: {},
|
|
253
|
+
additionalProperties: false
|
|
254
|
+
},
|
|
255
|
+
config: {
|
|
256
|
+
listAccountIds: () => ["default"],
|
|
257
|
+
resolveAccount: (cfg, accountId) => ({
|
|
258
|
+
accountId: accountId || "default",
|
|
259
|
+
enabled: true,
|
|
260
|
+
configured: true
|
|
261
|
+
}),
|
|
262
|
+
defaultAccountId: () => "default",
|
|
263
|
+
isConfigured: () => true,
|
|
264
|
+
describeAccount: (account) => ({
|
|
265
|
+
accountId: account.accountId,
|
|
266
|
+
enabled: account.enabled,
|
|
267
|
+
configured: account.configured
|
|
268
|
+
})
|
|
269
|
+
},
|
|
250
270
|
outbound: {
|
|
251
271
|
deliveryMode: "direct",
|
|
252
272
|
resolveTarget: ({ to }) => ({ ok: true, to }),
|