@aka_openclaw_plugin/mychat 0.1.1 → 0.1.3
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/api.js +5 -19
- package/channel-Dbv-np-3.js +5177 -0
- package/channel-plugin-api.js +2 -9
- package/index.js +16 -19
- package/package.json +7 -7
- package/runtime-7z_VfQ27.js +53 -0
- package/runtime-api.js +4 -14
- package/setup-entry.js +2 -9
- package/chunk-5KQQEVLS.js +0 -60
- package/chunk-PNKVD2UK.js +0 -26
- package/chunk-VJXCCUPC.js +0 -41
- package/chunk-ZECSAALT.js +0 -853
- package/config-api.js +0 -11
- package/runtime-setter-api.js +0 -11
package/channel-plugin-api.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-ZECSAALT.js";
|
|
4
|
-
import "./chunk-5KQQEVLS.js";
|
|
5
|
-
import "./chunk-VJXCCUPC.js";
|
|
6
|
-
import "./chunk-PNKVD2UK.js";
|
|
7
|
-
export {
|
|
8
|
-
mychatPlugin
|
|
9
|
-
};
|
|
1
|
+
import { t as mychatPlugin } from "./channel-Dbv-np-3.js";
|
|
2
|
+
export { mychatPlugin };
|
package/index.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import "./chunk-PNKVD2UK.js";
|
|
2
|
-
|
|
3
|
-
// index.ts
|
|
4
1
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
//#region index.ts
|
|
3
|
+
var mychat_default = defineBundledChannelEntry({
|
|
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
|
+
}
|
|
18
16
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { mychat_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aka_openclaw_plugin/mychat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "OpenClaw MyChat channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"exports": {
|
|
11
|
-
".": "./index.
|
|
12
|
-
"./channel-plugin-api.js": "./channel-plugin-api.
|
|
13
|
-
"./runtime-setter-api.js": "./runtime-setter-api.
|
|
14
|
-
"./runtime-api.js": "./runtime-api.
|
|
15
|
-
"./config-api.js": "./config-api.
|
|
11
|
+
".": "./index.ts",
|
|
12
|
+
"./channel-plugin-api.js": "./channel-plugin-api.ts",
|
|
13
|
+
"./runtime-setter-api.js": "./runtime-setter-api.ts",
|
|
14
|
+
"./runtime-api.js": "./runtime-api.ts",
|
|
15
|
+
"./config-api.js": "./config-api.ts"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"zod": "4.4.3"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"openclaw": {
|
|
29
29
|
"extensions": [
|
|
30
|
-
"./index.
|
|
30
|
+
"./index.ts"
|
|
31
31
|
],
|
|
32
32
|
"channel": {
|
|
33
33
|
"id": "mychat",
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
8
|
+
var __exportAll = (all, no_symbols) => {
|
|
9
|
+
let target = {};
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
15
|
+
return target;
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
|
+
key = keys[i];
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: ((k) => from[k]).bind(null, key),
|
|
22
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return to;
|
|
26
|
+
};
|
|
27
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/runtime.ts
|
|
30
|
+
var runtime_exports = /* @__PURE__ */ __exportAll({
|
|
31
|
+
getMychatRuntime: () => getMychatRuntime,
|
|
32
|
+
mychatRuntimeStore: () => mychatRuntimeStore,
|
|
33
|
+
setMychatRuntime: () => setMychatRuntime,
|
|
34
|
+
tryGetMychatRuntime: () => tryGetMychatRuntime
|
|
35
|
+
});
|
|
36
|
+
function setMychatRuntime(runtime) {
|
|
37
|
+
mychatRuntimeStore.setRuntime(runtime);
|
|
38
|
+
}
|
|
39
|
+
function getMychatRuntime() {
|
|
40
|
+
return mychatRuntimeStore.getRuntime();
|
|
41
|
+
}
|
|
42
|
+
function tryGetMychatRuntime() {
|
|
43
|
+
return mychatRuntimeStore.tryGetRuntime();
|
|
44
|
+
}
|
|
45
|
+
var mychatRuntimeStore;
|
|
46
|
+
var init_runtime = __esmMin((() => {
|
|
47
|
+
mychatRuntimeStore = createPluginRuntimeStore({
|
|
48
|
+
pluginId: "mychat",
|
|
49
|
+
errorMessage: "MyChat runtime not initialized. Ensure the plugin is registered."
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
//#endregion
|
|
53
|
+
export { tryGetMychatRuntime as a, setMychatRuntime as i, init_runtime as n, __toCommonJS as o, runtime_exports as r, getMychatRuntime as t };
|
package/runtime-api.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
init_runtime,
|
|
4
|
-
setMychatRuntime,
|
|
5
|
-
tryGetMychatRuntime
|
|
6
|
-
} from "./chunk-VJXCCUPC.js";
|
|
7
|
-
import "./chunk-PNKVD2UK.js";
|
|
8
|
-
|
|
9
|
-
// runtime-api.ts
|
|
1
|
+
import { a as tryGetMychatRuntime, i as setMychatRuntime, n as init_runtime, t as getMychatRuntime } from "./runtime-7z_VfQ27.js";
|
|
2
|
+
//#region runtime-api.ts
|
|
10
3
|
init_runtime();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
setMychatRuntime,
|
|
14
|
-
tryGetMychatRuntime
|
|
15
|
-
};
|
|
4
|
+
//#endregion
|
|
5
|
+
export { getMychatRuntime, setMychatRuntime, tryGetMychatRuntime };
|
package/setup-entry.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-ZECSAALT.js";
|
|
4
|
-
import "./chunk-5KQQEVLS.js";
|
|
5
|
-
import "./chunk-VJXCCUPC.js";
|
|
6
|
-
import "./chunk-PNKVD2UK.js";
|
|
7
|
-
export {
|
|
8
|
-
mychatPlugin
|
|
9
|
-
};
|
|
1
|
+
import { t as mychatPlugin } from "./channel-Dbv-np-3.js";
|
|
2
|
+
export { mychatPlugin };
|
package/chunk-5KQQEVLS.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// src/config-schema.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-core";
|
|
4
|
-
var MychatAccountConfigSchema = z.object({
|
|
5
|
-
enabled: z.boolean().optional(),
|
|
6
|
-
name: z.string().optional(),
|
|
7
|
-
baseUrl: z.string(),
|
|
8
|
-
wsUrl: z.string().optional(),
|
|
9
|
-
token: z.string().optional(),
|
|
10
|
-
defaultTo: z.string().optional(),
|
|
11
|
-
defaultAccountId: z.string().optional(),
|
|
12
|
-
dmPolicy: z.enum(["open", "allowlist", "disabled"]).optional(),
|
|
13
|
-
groupPolicy: z.enum(["open", "allowlist", "disabled"]).optional(),
|
|
14
|
-
allowFrom: z.array(z.string()).optional(),
|
|
15
|
-
groupAllowFrom: z.array(z.string()).optional(),
|
|
16
|
-
requireMention: z.boolean().optional(),
|
|
17
|
-
historyLimit: z.number().optional(),
|
|
18
|
-
mediaMaxMb: z.number().optional(),
|
|
19
|
-
actions: z.object({
|
|
20
|
-
messages: z.boolean().optional(),
|
|
21
|
-
threads: z.boolean().optional(),
|
|
22
|
-
reactions: z.boolean().optional()
|
|
23
|
-
}).optional(),
|
|
24
|
-
groups: z.record(z.string(), z.any()).optional(),
|
|
25
|
-
reconnect: z.object({
|
|
26
|
-
initialDelayMs: z.number().optional(),
|
|
27
|
-
maxDelayMs: z.number().optional(),
|
|
28
|
-
backoffMultiplier: z.number().optional()
|
|
29
|
-
}).optional(),
|
|
30
|
-
accounts: z.record(z.string(), z.any()).optional()
|
|
31
|
-
});
|
|
32
|
-
var mychatConfigSchema = buildChannelConfigSchema(MychatAccountConfigSchema, {
|
|
33
|
-
uiHints: {
|
|
34
|
-
baseUrl: { label: "API base URL", placeholder: "http://localhost:3000" },
|
|
35
|
-
wsUrl: { label: "WebSocket URL", placeholder: "ws://localhost:3000/ws" },
|
|
36
|
-
token: { label: "Bot token", sensitive: true, placeholder: "bot_xxxxxxxxxxxx" },
|
|
37
|
-
defaultTo: { label: "Default destination", placeholder: "user-id or group-id" },
|
|
38
|
-
dmPolicy: { label: "DM policy" },
|
|
39
|
-
groupPolicy: { label: "Group policy" },
|
|
40
|
-
allowFrom: { label: "Allowed senders" },
|
|
41
|
-
groupAllowFrom: { label: "Allowed group senders" },
|
|
42
|
-
groups: { label: "Group overrides" },
|
|
43
|
-
actions: { label: "Enabled actions" },
|
|
44
|
-
"actions.messages": { label: "Message actions" },
|
|
45
|
-
"actions.threads": { label: "Thread actions" },
|
|
46
|
-
"actions.reactions": { label: "Reaction actions" },
|
|
47
|
-
requireMention: { label: "Require @mention in groups" },
|
|
48
|
-
historyLimit: { label: "History message limit" },
|
|
49
|
-
mediaMaxMb: { label: "Max media size (MB)" },
|
|
50
|
-
reconnect: { label: "Reconnection settings" },
|
|
51
|
-
accounts: { label: "Accounts" },
|
|
52
|
-
defaultAccountId: { label: "Default account" },
|
|
53
|
-
enabled: { label: "Enabled" },
|
|
54
|
-
name: { label: "Display name" }
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
export {
|
|
59
|
-
mychatConfigSchema
|
|
60
|
-
};
|
package/chunk-PNKVD2UK.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __esm = (fn, res) => function __init() {
|
|
6
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
7
|
-
};
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
__esm,
|
|
24
|
-
__export,
|
|
25
|
-
__toCommonJS
|
|
26
|
-
};
|
package/chunk-VJXCCUPC.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__esm,
|
|
3
|
-
__export
|
|
4
|
-
} from "./chunk-PNKVD2UK.js";
|
|
5
|
-
|
|
6
|
-
// src/runtime.ts
|
|
7
|
-
var runtime_exports = {};
|
|
8
|
-
__export(runtime_exports, {
|
|
9
|
-
getMychatRuntime: () => getMychatRuntime,
|
|
10
|
-
mychatRuntimeStore: () => mychatRuntimeStore,
|
|
11
|
-
setMychatRuntime: () => setMychatRuntime,
|
|
12
|
-
tryGetMychatRuntime: () => tryGetMychatRuntime
|
|
13
|
-
});
|
|
14
|
-
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
15
|
-
function setMychatRuntime(runtime) {
|
|
16
|
-
mychatRuntimeStore.setRuntime(runtime);
|
|
17
|
-
}
|
|
18
|
-
function getMychatRuntime() {
|
|
19
|
-
return mychatRuntimeStore.getRuntime();
|
|
20
|
-
}
|
|
21
|
-
function tryGetMychatRuntime() {
|
|
22
|
-
return mychatRuntimeStore.tryGetRuntime();
|
|
23
|
-
}
|
|
24
|
-
var mychatRuntimeStore;
|
|
25
|
-
var init_runtime = __esm({
|
|
26
|
-
"src/runtime.ts"() {
|
|
27
|
-
"use strict";
|
|
28
|
-
mychatRuntimeStore = createPluginRuntimeStore({
|
|
29
|
-
pluginId: "mychat",
|
|
30
|
-
errorMessage: "MyChat runtime not initialized. Ensure the plugin is registered."
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export {
|
|
36
|
-
setMychatRuntime,
|
|
37
|
-
getMychatRuntime,
|
|
38
|
-
tryGetMychatRuntime,
|
|
39
|
-
runtime_exports,
|
|
40
|
-
init_runtime
|
|
41
|
-
};
|