@aka_openclaw_plugin/mychat 0.1.17 → 0.1.19
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/account-inspect-api.js +29 -0
- package/api.js +8 -3
- package/channel-plugin-api.js +1 -1
- package/index.js +18 -14
- package/openclaw.plugin.json +6 -2
- package/package.json +6 -3
- package/runtime-api.js +7 -2
- package/runtime-setter-api.js +2 -2
- package/setup-entry.js +11 -2
- package/setup-plugin-api.js +50 -0
- package/channel-BQOyywVd.js +0 -4550
- package/config-api.js +0 -3
- package/config-schema-C42X7OSY.js +0 -4234
- package/runtime-PfFuZ2Rm.js +0 -62
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { t as resolveMychatAccount } from "../../accounts-BTbj82XM.js";
|
|
2
|
+
//#region extensions/mychat/src/account-inspect.ts
|
|
3
|
+
function inspectMychatAccount(params) {
|
|
4
|
+
const account = resolveMychatAccount({
|
|
5
|
+
cfg: params.cfg,
|
|
6
|
+
accountId: params.accountId,
|
|
7
|
+
});
|
|
8
|
+
if (!account)
|
|
9
|
+
return {
|
|
10
|
+
accountId: params.accountId,
|
|
11
|
+
enabled: false,
|
|
12
|
+
baseUrl: "",
|
|
13
|
+
tokenSource: "none",
|
|
14
|
+
tokenStatus: "missing",
|
|
15
|
+
};
|
|
16
|
+
let tokenSource = "none";
|
|
17
|
+
if (params.cfg.channels?.mychat?.accounts?.[params.accountId]?.token) tokenSource = "config";
|
|
18
|
+
else if (params.envToken) tokenSource = "env";
|
|
19
|
+
return {
|
|
20
|
+
accountId: account.accountId,
|
|
21
|
+
enabled: account.enabled,
|
|
22
|
+
name: account.name,
|
|
23
|
+
baseUrl: account.baseUrl,
|
|
24
|
+
tokenSource,
|
|
25
|
+
tokenStatus: account.token ? "configured" : "missing",
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { inspectMychatAccount };
|
package/api.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { t as mychatPlugin } from "../../channel-CVeSfVdX.js";
|
|
2
|
+
import {
|
|
3
|
+
a as tryGetMychatRuntime,
|
|
4
|
+
i as setMychatRuntime,
|
|
5
|
+
n as init_runtime,
|
|
6
|
+
t as getMychatRuntime,
|
|
7
|
+
} from "../../runtime-COgwNLVk.js";
|
|
8
|
+
//#region extensions/mychat/api.ts
|
|
4
9
|
init_runtime();
|
|
5
10
|
//#endregion
|
|
6
11
|
export { getMychatRuntime, mychatPlugin, setMychatRuntime, tryGetMychatRuntime };
|
package/channel-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as mychatPlugin } from "
|
|
1
|
+
import { t as mychatPlugin } from "../../channel-CVeSfVdX.js";
|
|
2
2
|
export { mychatPlugin };
|
package/index.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { defineBundledChannelEntry } from "
|
|
2
|
-
//#region index.ts
|
|
1
|
+
import { t as defineBundledChannelEntry } from "../../channel-entry-contract-BO_RLNVM.js";
|
|
2
|
+
//#region extensions/mychat/index.ts
|
|
3
3
|
var mychat_default = defineBundledChannelEntry({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
id: "mychat",
|
|
5
|
+
name: "MyChat",
|
|
6
|
+
description: "MyChat channel plugin",
|
|
7
|
+
importMetaUrl: import.meta.url,
|
|
8
|
+
plugin: {
|
|
9
|
+
specifier: "./channel-plugin-api.js",
|
|
10
|
+
exportName: "mychatPlugin",
|
|
11
|
+
},
|
|
12
|
+
runtime: {
|
|
13
|
+
specifier: "./runtime-setter-api.js",
|
|
14
|
+
exportName: "setMychatRuntime",
|
|
15
|
+
},
|
|
16
|
+
accountInspect: {
|
|
17
|
+
specifier: "./account-inspect-api.js",
|
|
18
|
+
exportName: "inspectMychatAccount",
|
|
19
|
+
},
|
|
16
20
|
});
|
|
17
21
|
//#endregion
|
|
18
22
|
export { mychat_default as default };
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aka_openclaw_plugin/mychat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "OpenClaw MyChat channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "https://github.com/
|
|
7
|
+
"url": "https://github.com/openclaw/openclaw.git",
|
|
8
|
+
"directory": "extensions/mychat"
|
|
8
9
|
},
|
|
9
10
|
"type": "module",
|
|
10
11
|
"exports": {
|
|
@@ -12,7 +13,9 @@
|
|
|
12
13
|
"./channel-plugin-api.js": "./channel-plugin-api.js",
|
|
13
14
|
"./runtime-setter-api.js": "./runtime-setter-api.js",
|
|
14
15
|
"./runtime-api.js": "./runtime-api.js",
|
|
15
|
-
"./config-api.js": "./config-api.js"
|
|
16
|
+
"./config-api.js": "./config-api.js",
|
|
17
|
+
"./account-inspect-api.js": "./account-inspect-api.js",
|
|
18
|
+
"./setup-plugin-api.js": "./setup-plugin-api.js"
|
|
16
19
|
},
|
|
17
20
|
"dependencies": {
|
|
18
21
|
"zod": "4.4.3"
|
package/runtime-api.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
a as tryGetMychatRuntime,
|
|
3
|
+
i as setMychatRuntime,
|
|
4
|
+
n as init_runtime,
|
|
5
|
+
t as getMychatRuntime,
|
|
6
|
+
} from "../../runtime-COgwNLVk.js";
|
|
7
|
+
//#region extensions/mychat/runtime-api.ts
|
|
3
8
|
init_runtime();
|
|
4
9
|
//#endregion
|
|
5
10
|
export { getMychatRuntime, setMychatRuntime, tryGetMychatRuntime };
|
package/runtime-setter-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as setMychatRuntime, n as init_runtime } from "
|
|
2
|
-
//#region runtime-setter-api.ts
|
|
1
|
+
import { i as setMychatRuntime, n as init_runtime } from "../../runtime-COgwNLVk.js";
|
|
2
|
+
//#region extensions/mychat/runtime-setter-api.ts
|
|
3
3
|
init_runtime();
|
|
4
4
|
//#endregion
|
|
5
5
|
export { setMychatRuntime };
|
package/setup-entry.js
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { n as defineBundledChannelSetupEntry } from "../../channel-entry-contract-BO_RLNVM.js";
|
|
2
|
+
//#region extensions/mychat/setup-entry.ts
|
|
3
|
+
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
4
|
+
importMetaUrl: import.meta.url,
|
|
5
|
+
plugin: {
|
|
6
|
+
specifier: "./setup-plugin-api.js",
|
|
7
|
+
exportName: "mychatSetupPlugin",
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { setup_entry_default as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { n as resolveMychatAccounts, t as resolveMychatAccount } from "../../accounts-BTbj82XM.js";
|
|
2
|
+
import { t as mychatConfigSchema } from "../../config-schema-BmMH1S6B.js";
|
|
3
|
+
//#region extensions/mychat/src/channel.setup.ts
|
|
4
|
+
/**
|
|
5
|
+
* Setup-specific plugin for the MyChat setup wizard.
|
|
6
|
+
* This is separate from the main plugin to keep setup-only surfaces
|
|
7
|
+
* out of lightweight channel plugin loads.
|
|
8
|
+
*/
|
|
9
|
+
const mychatSetupPlugin = {
|
|
10
|
+
id: "mychat",
|
|
11
|
+
meta: {
|
|
12
|
+
label: "MyChat",
|
|
13
|
+
docsPath: "docs/plugins/mychat",
|
|
14
|
+
blurb: "Connect to MyChat server via bot token",
|
|
15
|
+
aliases: ["mychat"],
|
|
16
|
+
},
|
|
17
|
+
capabilities: {
|
|
18
|
+
chatTypes: ["direct", "group", "thread"],
|
|
19
|
+
reactions: true,
|
|
20
|
+
media: true,
|
|
21
|
+
threads: true,
|
|
22
|
+
},
|
|
23
|
+
reload: { configPrefixes: ["channels.mychat"] },
|
|
24
|
+
configSchema: mychatConfigSchema,
|
|
25
|
+
config: {
|
|
26
|
+
listAccountIds(cfg) {
|
|
27
|
+
return resolveMychatAccounts(cfg).map((a) => a.accountId);
|
|
28
|
+
},
|
|
29
|
+
resolveAccount(cfg, accountId) {
|
|
30
|
+
return resolveMychatAccount({
|
|
31
|
+
cfg,
|
|
32
|
+
accountId,
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
async inspectAccount(account) {
|
|
36
|
+
return {
|
|
37
|
+
accountId: account.accountId,
|
|
38
|
+
enabled: account.enabled,
|
|
39
|
+
label: account.name ?? account.baseUrl,
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
setup: {
|
|
44
|
+
applyAccountConfig(params) {
|
|
45
|
+
return params.cfg;
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { mychatSetupPlugin };
|