@meet-im/meet 3.2.1 → 3.2.2-beta.0
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/src/channel.js +2 -103
- package/dist/src/config-schema.d.ts +32 -11
- package/dist/src/config-schema.js +9 -6
- package/openclaw.plugin.json +2 -1
- package/package.json +1 -1
package/dist/src/channel.js
CHANGED
|
@@ -6,6 +6,7 @@ import { parseMeetTarget, looksLikeMeetId, formatMeetTarget, } from "./targets.j
|
|
|
6
6
|
import { sendMessageMeet } from "./send.js";
|
|
7
7
|
import { getMeetClient } from "./client.js";
|
|
8
8
|
import { getAllCachedUsers, rememberMeetUser } from "./directory-cache.js";
|
|
9
|
+
import { MeetPluginConfigSchema } from "./config-schema.js";
|
|
9
10
|
const meta = {
|
|
10
11
|
id: "meet",
|
|
11
12
|
label: "Meet",
|
|
@@ -56,109 +57,7 @@ export const meetPlugin = {
|
|
|
56
57
|
},
|
|
57
58
|
},
|
|
58
59
|
reload: { configPrefixes: ["channels.meet"] },
|
|
59
|
-
configSchema:
|
|
60
|
-
schema: {
|
|
61
|
-
type: "object",
|
|
62
|
-
additionalProperties: false,
|
|
63
|
-
properties: {
|
|
64
|
-
enabled: { type: "boolean" },
|
|
65
|
-
defaultAccount: { type: "string" },
|
|
66
|
-
apiEndpoint: { type: "string" },
|
|
67
|
-
apiToken: { type: "string" },
|
|
68
|
-
pollTimeout: { type: "integer", minimum: 1000, maximum: 300000 },
|
|
69
|
-
pollLimit: { type: "integer", minimum: 1, maximum: 1000 },
|
|
70
|
-
dmPolicy: { type: "string", enum: ["open", "pairing", "allowlist"] },
|
|
71
|
-
allowFrom: {
|
|
72
|
-
type: "array",
|
|
73
|
-
items: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
74
|
-
},
|
|
75
|
-
groupPolicy: {
|
|
76
|
-
type: "string",
|
|
77
|
-
enum: ["open", "allowlist", "disabled"],
|
|
78
|
-
},
|
|
79
|
-
groupAllowFrom: {
|
|
80
|
-
type: "array",
|
|
81
|
-
items: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
82
|
-
},
|
|
83
|
-
groups: {
|
|
84
|
-
type: "object",
|
|
85
|
-
additionalProperties: {
|
|
86
|
-
type: "object",
|
|
87
|
-
properties: {
|
|
88
|
-
enabled: { type: "boolean" },
|
|
89
|
-
name: { type: "string" },
|
|
90
|
-
requireMention: { type: "boolean" },
|
|
91
|
-
systemPrompt: { type: "string" },
|
|
92
|
-
users: {
|
|
93
|
-
type: "array",
|
|
94
|
-
items: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
requireMention: { type: "boolean" },
|
|
100
|
-
historyLimit: { type: "integer", minimum: 0 },
|
|
101
|
-
dmHistoryLimit: { type: "integer", minimum: 0 },
|
|
102
|
-
textChunkLimit: { type: "integer", minimum: 1 },
|
|
103
|
-
mediaMaxMb: { type: "number", minimum: 0 },
|
|
104
|
-
accounts: {
|
|
105
|
-
type: "object",
|
|
106
|
-
additionalProperties: {
|
|
107
|
-
type: "object",
|
|
108
|
-
properties: {
|
|
109
|
-
enabled: { type: "boolean" },
|
|
110
|
-
name: { type: "string" },
|
|
111
|
-
apiEndpoint: { type: "string" },
|
|
112
|
-
token: { type: "string" },
|
|
113
|
-
apiToken: { type: "string" },
|
|
114
|
-
pollTimeout: { type: "integer", minimum: 1000, maximum: 300000 },
|
|
115
|
-
pollLimit: { type: "integer", minimum: 1, maximum: 1000 },
|
|
116
|
-
logLevel: { type: "string", enum: ["silent", "info"] },
|
|
117
|
-
dmPolicy: { type: "string", enum: ["open", "pairing", "allowlist"] },
|
|
118
|
-
allowFrom: {
|
|
119
|
-
type: "array",
|
|
120
|
-
items: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
121
|
-
},
|
|
122
|
-
groupPolicy: {
|
|
123
|
-
type: "string",
|
|
124
|
-
enum: ["open", "allowlist", "disabled"],
|
|
125
|
-
},
|
|
126
|
-
groupAllowFrom: {
|
|
127
|
-
type: "array",
|
|
128
|
-
items: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
129
|
-
},
|
|
130
|
-
requireMention: { type: "boolean" },
|
|
131
|
-
systemPrompt: { type: "string" },
|
|
132
|
-
historyLimit: { type: "integer", minimum: 0 },
|
|
133
|
-
dmHistoryLimit: { type: "integer", minimum: 0 },
|
|
134
|
-
textChunkLimit: { type: "integer", minimum: 1 },
|
|
135
|
-
mediaMaxMb: { type: "number", minimum: 0 },
|
|
136
|
-
groups: {
|
|
137
|
-
type: "object",
|
|
138
|
-
additionalProperties: {
|
|
139
|
-
type: "object",
|
|
140
|
-
properties: {
|
|
141
|
-
enabled: { type: "boolean" },
|
|
142
|
-
name: { type: "string" },
|
|
143
|
-
requireMention: { type: "boolean" },
|
|
144
|
-
systemPrompt: { type: "string" },
|
|
145
|
-
users: {
|
|
146
|
-
type: "array",
|
|
147
|
-
items: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
148
|
-
},
|
|
149
|
-
groupPolicy: {
|
|
150
|
-
type: "string",
|
|
151
|
-
enum: ["open", "allowlist", "disabled"],
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
},
|
|
60
|
+
configSchema: MeetPluginConfigSchema,
|
|
162
61
|
config: {
|
|
163
62
|
listAccountIds: (cfg) => listMeetAccountIds(cfg),
|
|
164
63
|
resolveAccount: (cfg, accountId) => resolveMeetAccount({ cfg, accountId }),
|
|
@@ -10,6 +10,11 @@ export declare const MeetGroupConfigSchema: z.ZodObject<{
|
|
|
10
10
|
requireMention: z.ZodOptional<z.ZodBoolean>;
|
|
11
11
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
12
12
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
13
|
+
groupPolicy: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
open: "open";
|
|
15
|
+
allowlist: "allowlist";
|
|
16
|
+
disabled: "disabled";
|
|
17
|
+
}>>;
|
|
13
18
|
}, z.core.$strip>;
|
|
14
19
|
export declare const MeetAccountConfigSchema: z.ZodObject<{
|
|
15
20
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -25,8 +30,8 @@ export declare const MeetAccountConfigSchema: z.ZodObject<{
|
|
|
25
30
|
}>>;
|
|
26
31
|
dmPolicy: z.ZodOptional<z.ZodEnum<{
|
|
27
32
|
open: "open";
|
|
28
|
-
pairing: "pairing";
|
|
29
33
|
allowlist: "allowlist";
|
|
34
|
+
pairing: "pairing";
|
|
30
35
|
}>>;
|
|
31
36
|
allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
32
37
|
groupPolicy: z.ZodOptional<z.ZodEnum<{
|
|
@@ -47,6 +52,11 @@ export declare const MeetAccountConfigSchema: z.ZodObject<{
|
|
|
47
52
|
requireMention: z.ZodOptional<z.ZodBoolean>;
|
|
48
53
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
49
54
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
55
|
+
groupPolicy: z.ZodOptional<z.ZodEnum<{
|
|
56
|
+
open: "open";
|
|
57
|
+
allowlist: "allowlist";
|
|
58
|
+
disabled: "disabled";
|
|
59
|
+
}>>;
|
|
50
60
|
}, z.core.$strip>>>;
|
|
51
61
|
}, z.core.$strip>;
|
|
52
62
|
export declare const MeetConfigSchema: z.ZodObject<{
|
|
@@ -55,23 +65,23 @@ export declare const MeetConfigSchema: z.ZodObject<{
|
|
|
55
65
|
apiEndpoint: z.ZodOptional<z.ZodString>;
|
|
56
66
|
token: z.ZodOptional<z.ZodString>;
|
|
57
67
|
apiToken: z.ZodOptional<z.ZodString>;
|
|
58
|
-
pollTimeout: z.
|
|
59
|
-
pollLimit: z.
|
|
68
|
+
pollTimeout: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
pollLimit: z.ZodOptional<z.ZodNumber>;
|
|
60
70
|
logLevel: z.ZodOptional<z.ZodEnum<{
|
|
61
71
|
silent: "silent";
|
|
62
72
|
info: "info";
|
|
63
73
|
}>>;
|
|
64
|
-
dmPolicy: z.
|
|
74
|
+
dmPolicy: z.ZodOptional<z.ZodEnum<{
|
|
65
75
|
open: "open";
|
|
66
|
-
pairing: "pairing";
|
|
67
76
|
allowlist: "allowlist";
|
|
68
|
-
|
|
77
|
+
pairing: "pairing";
|
|
78
|
+
}>>;
|
|
69
79
|
allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
70
|
-
groupPolicy: z.
|
|
80
|
+
groupPolicy: z.ZodOptional<z.ZodEnum<{
|
|
71
81
|
open: "open";
|
|
72
82
|
allowlist: "allowlist";
|
|
73
83
|
disabled: "disabled";
|
|
74
|
-
}
|
|
84
|
+
}>>;
|
|
75
85
|
groupAllowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
76
86
|
groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
77
87
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -79,8 +89,13 @@ export declare const MeetConfigSchema: z.ZodObject<{
|
|
|
79
89
|
requireMention: z.ZodOptional<z.ZodBoolean>;
|
|
80
90
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
81
91
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
92
|
+
groupPolicy: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
open: "open";
|
|
94
|
+
allowlist: "allowlist";
|
|
95
|
+
disabled: "disabled";
|
|
96
|
+
}>>;
|
|
82
97
|
}, z.core.$strip>>>;
|
|
83
|
-
requireMention: z.
|
|
98
|
+
requireMention: z.ZodOptional<z.ZodBoolean>;
|
|
84
99
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
85
100
|
channels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
86
101
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -90,7 +105,7 @@ export declare const MeetConfigSchema: z.ZodObject<{
|
|
|
90
105
|
historyLimit: z.ZodOptional<z.ZodNumber>;
|
|
91
106
|
dmHistoryLimit: z.ZodOptional<z.ZodNumber>;
|
|
92
107
|
textChunkLimit: z.ZodOptional<z.ZodNumber>;
|
|
93
|
-
mediaMaxMb: z.
|
|
108
|
+
mediaMaxMb: z.ZodOptional<z.ZodNumber>;
|
|
94
109
|
accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
95
110
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
96
111
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -105,8 +120,8 @@ export declare const MeetConfigSchema: z.ZodObject<{
|
|
|
105
120
|
}>>;
|
|
106
121
|
dmPolicy: z.ZodOptional<z.ZodEnum<{
|
|
107
122
|
open: "open";
|
|
108
|
-
pairing: "pairing";
|
|
109
123
|
allowlist: "allowlist";
|
|
124
|
+
pairing: "pairing";
|
|
110
125
|
}>>;
|
|
111
126
|
allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
112
127
|
groupPolicy: z.ZodOptional<z.ZodEnum<{
|
|
@@ -127,6 +142,12 @@ export declare const MeetConfigSchema: z.ZodObject<{
|
|
|
127
142
|
requireMention: z.ZodOptional<z.ZodBoolean>;
|
|
128
143
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
129
144
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
145
|
+
groupPolicy: z.ZodOptional<z.ZodEnum<{
|
|
146
|
+
open: "open";
|
|
147
|
+
allowlist: "allowlist";
|
|
148
|
+
disabled: "disabled";
|
|
149
|
+
}>>;
|
|
130
150
|
}, z.core.$strip>>>;
|
|
131
151
|
}, z.core.$strip>>>;
|
|
132
152
|
}, z.core.$strip>;
|
|
153
|
+
export declare const MeetPluginConfigSchema: import("openclaw/plugin-sdk").ChannelConfigSchema;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
export const MeetChannelConfigSchema = z.object({
|
|
3
4
|
enabled: z.boolean().optional(),
|
|
@@ -10,6 +11,7 @@ export const MeetGroupConfigSchema = z.object({
|
|
|
10
11
|
requireMention: z.boolean().optional(),
|
|
11
12
|
systemPrompt: z.string().optional(),
|
|
12
13
|
users: z.array(z.union([z.string(), z.number()])).optional(),
|
|
14
|
+
groupPolicy: z.enum(["open", "allowlist", "disabled"]).optional(),
|
|
13
15
|
});
|
|
14
16
|
export const MeetAccountConfigSchema = z.object({
|
|
15
17
|
enabled: z.boolean().optional(),
|
|
@@ -38,20 +40,21 @@ export const MeetConfigSchema = z.object({
|
|
|
38
40
|
apiEndpoint: z.string().optional(),
|
|
39
41
|
token: z.string().optional(),
|
|
40
42
|
apiToken: z.string().optional(),
|
|
41
|
-
pollTimeout: z.number().min(1000).max(300000).optional()
|
|
42
|
-
pollLimit: z.number().min(1).max(1000).optional()
|
|
43
|
+
pollTimeout: z.number().min(1000).max(300000).optional(),
|
|
44
|
+
pollLimit: z.number().min(1).max(1000).optional(),
|
|
43
45
|
logLevel: z.enum(["silent", "info"]).optional(),
|
|
44
|
-
dmPolicy: z.enum(["open", "pairing", "allowlist"]).optional()
|
|
46
|
+
dmPolicy: z.enum(["open", "pairing", "allowlist"]).optional(),
|
|
45
47
|
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
46
|
-
groupPolicy: z.enum(["open", "allowlist", "disabled"]).optional()
|
|
48
|
+
groupPolicy: z.enum(["open", "allowlist", "disabled"]).optional(),
|
|
47
49
|
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
48
50
|
groups: z.record(z.string(), MeetGroupConfigSchema).optional(),
|
|
49
|
-
requireMention: z.boolean().optional()
|
|
51
|
+
requireMention: z.boolean().optional(),
|
|
50
52
|
systemPrompt: z.string().optional(),
|
|
51
53
|
channels: z.record(z.string(), MeetChannelConfigSchema).optional(),
|
|
52
54
|
historyLimit: z.number().min(0).optional(),
|
|
53
55
|
dmHistoryLimit: z.number().min(0).optional(),
|
|
54
56
|
textChunkLimit: z.number().min(1).optional(),
|
|
55
|
-
mediaMaxMb: z.number().min(0).optional()
|
|
57
|
+
mediaMaxMb: z.number().min(0).optional(),
|
|
56
58
|
accounts: z.record(z.string(), MeetAccountConfigSchema).optional(),
|
|
57
59
|
});
|
|
60
|
+
export const MeetPluginConfigSchema = buildChannelConfigSchema(MeetConfigSchema);
|
package/openclaw.plugin.json
CHANGED