@lansenger-pm/openclaw-lansenger-channel 3.0.4 → 3.1.1
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/setup-wizard.js +58 -41
- package/dist/src/setup-wizard.js.map +1 -1
- package/openclaw.plugin.json +30 -9
- package/package.json +1 -1
package/dist/src/setup-wizard.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
2
|
-
import { createStandardChannelSetupStatus, setSetupChannelEnabled, } from "openclaw/plugin-sdk/setup-runtime";
|
|
2
|
+
import { createStandardChannelSetupStatus, setSetupChannelEnabled, patchChannelConfigForAccount, createAccountScopedAllowFromSection, splitSetupEntries, } from "openclaw/plugin-sdk/setup-runtime";
|
|
3
3
|
import { createTopLevelChannelDmPolicy, formatDocsLink, } from "openclaw/plugin-sdk/channel-setup";
|
|
4
|
+
const CHANNEL = "lansenger";
|
|
4
5
|
function getSection(cfg) {
|
|
5
|
-
return cfg.channels?.[
|
|
6
|
+
return cfg.channels?.[CHANNEL];
|
|
6
7
|
}
|
|
7
|
-
const HELP_LINES = [
|
|
8
|
-
"Lansenger Desktop → Contacts → Bots → Personal Bots / 蓝信桌面端 → 通讯录 → 智能机器人 → 个人机器人",
|
|
9
|
-
"Click the ℹ️ icon to view App ID and App Secret / 点击 ℹ️ 图标查看凭证",
|
|
10
|
-
"Personal Bots only — organization bots not supported / 仅支持个人机器人",
|
|
11
|
-
"Mobile client does NOT support viewing credentials / 移动端不支持查看凭证",
|
|
12
|
-
`Docs: ${formatDocsLink("https://open.e.lanxin.cn/docs", "lansenger")}`,
|
|
13
|
-
];
|
|
14
8
|
function resolveAccountFromCfg(cfg, accountId) {
|
|
15
9
|
const section = getSection(cfg);
|
|
16
10
|
if (!section)
|
|
@@ -31,6 +25,13 @@ function resolveAccountFromCfg(cfg, accountId) {
|
|
|
31
25
|
}
|
|
32
26
|
return section;
|
|
33
27
|
}
|
|
28
|
+
const HELP_LINES = [
|
|
29
|
+
"Lansenger Desktop → Contacts → Bots → Personal Bots / 蓝信桌面端 → 通讯录 → 智能机器人 → 个人机器人",
|
|
30
|
+
"Click the ℹ️ icon to view App ID and App Secret / 点击 ℹ️ 图标查看凭证",
|
|
31
|
+
"Personal Bots only — organization bots not supported / 仅支持个人机器人",
|
|
32
|
+
"Mobile client does NOT support viewing credentials / 移动端不支持查看凭证",
|
|
33
|
+
`Docs: ${formatDocsLink("https://open.e.lanxin.cn/docs", "lansenger")}`,
|
|
34
|
+
];
|
|
34
35
|
function makeInspect(field, envVar) {
|
|
35
36
|
return ({ cfg, accountId }) => {
|
|
36
37
|
const account = resolveAccountFromCfg(cfg, accountId);
|
|
@@ -47,7 +48,7 @@ function makeInspect(field, envVar) {
|
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
export const lansengerSetupWizard = {
|
|
50
|
-
channel:
|
|
51
|
+
channel: CHANNEL,
|
|
51
52
|
status: createStandardChannelSetupStatus({
|
|
52
53
|
channelLabel: "Lansenger",
|
|
53
54
|
configuredLabel: "configured",
|
|
@@ -58,6 +59,10 @@ export const lansengerSetupWizard = {
|
|
|
58
59
|
unconfiguredScore: 10,
|
|
59
60
|
resolveConfigured: ({ cfg }) => {
|
|
60
61
|
const section = getSection(cfg);
|
|
62
|
+
const accounts = section?.accounts;
|
|
63
|
+
if (accounts && Object.keys(accounts).length > 0) {
|
|
64
|
+
return Object.values(accounts).some((a) => Boolean(a?.appId && a?.appSecret));
|
|
65
|
+
}
|
|
61
66
|
return Boolean(section?.appId && section?.appSecret) ||
|
|
62
67
|
Boolean(process.env.LANSENGER_APP_ID && process.env.LANSENGER_APP_SECRET);
|
|
63
68
|
},
|
|
@@ -67,6 +72,10 @@ export const lansengerSetupWizard = {
|
|
|
67
72
|
lines: HELP_LINES,
|
|
68
73
|
shouldShow: ({ cfg }) => {
|
|
69
74
|
const section = getSection(cfg);
|
|
75
|
+
const accounts = section?.accounts;
|
|
76
|
+
if (accounts && Object.keys(accounts).length > 0) {
|
|
77
|
+
return !Object.values(accounts).some((a) => a?.appId && a?.appSecret);
|
|
78
|
+
}
|
|
70
79
|
return !Boolean(section?.appId && section?.appSecret);
|
|
71
80
|
},
|
|
72
81
|
},
|
|
@@ -83,6 +92,10 @@ export const lansengerSetupWizard = {
|
|
|
83
92
|
inputPrompt: "Enter Lansenger App ID / 输入蓝信 App ID",
|
|
84
93
|
allowEnv: ({ accountId }) => !accountId || accountId === "default" || accountId === DEFAULT_ACCOUNT_ID,
|
|
85
94
|
inspect: makeInspect("appId", "LANSENGER_APP_ID"),
|
|
95
|
+
applySet: ({ cfg, accountId, resolvedValue }) => patchChannelConfigForAccount({
|
|
96
|
+
cfg, channel: CHANNEL, accountId,
|
|
97
|
+
patch: { appId: resolvedValue },
|
|
98
|
+
}),
|
|
86
99
|
},
|
|
87
100
|
{
|
|
88
101
|
inputKey: "secret",
|
|
@@ -99,6 +112,10 @@ export const lansengerSetupWizard = {
|
|
|
99
112
|
inputPrompt: "Enter Lansenger App Secret / 输入蓝信 App Secret",
|
|
100
113
|
allowEnv: ({ accountId }) => !accountId || accountId === "default" || accountId === DEFAULT_ACCOUNT_ID,
|
|
101
114
|
inspect: makeInspect("appSecret", "LANSENGER_APP_SECRET"),
|
|
115
|
+
applySet: ({ cfg, accountId, resolvedValue }) => patchChannelConfigForAccount({
|
|
116
|
+
cfg, channel: CHANNEL, accountId,
|
|
117
|
+
patch: { appSecret: resolvedValue },
|
|
118
|
+
}),
|
|
102
119
|
},
|
|
103
120
|
],
|
|
104
121
|
textInputs: [
|
|
@@ -107,49 +124,49 @@ export const lansengerSetupWizard = {
|
|
|
107
124
|
message: "API Gateway URL / API 网关地址(可选,默认蓝信公有云)",
|
|
108
125
|
placeholder: "https://open.e.lanxin.cn/open/apigw",
|
|
109
126
|
required: false,
|
|
110
|
-
initialValue: ({ cfg }) => {
|
|
111
|
-
const
|
|
112
|
-
return
|
|
113
|
-
},
|
|
114
|
-
applySet: ({ cfg, accountId, value }) => {
|
|
115
|
-
const channels = { ...(cfg.channels ?? {}) };
|
|
116
|
-
const current = channels.lansenger ?? {};
|
|
117
|
-
channels.lansenger = { ...current, apiGatewayUrl: value, enabled: true };
|
|
118
|
-
return { ...cfg, channels };
|
|
127
|
+
initialValue: ({ cfg, accountId }) => {
|
|
128
|
+
const account = resolveAccountFromCfg(cfg, accountId);
|
|
129
|
+
return account?.apiGatewayUrl || "https://open.e.lanxin.cn/open/apigw";
|
|
119
130
|
},
|
|
131
|
+
applySet: ({ cfg, accountId, value }) => patchChannelConfigForAccount({
|
|
132
|
+
cfg, channel: CHANNEL, accountId,
|
|
133
|
+
patch: { apiGatewayUrl: value },
|
|
134
|
+
}),
|
|
120
135
|
},
|
|
121
136
|
],
|
|
122
|
-
finalize: async ({ cfg }) => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
137
|
+
finalize: async ({ cfg, accountId }) => {
|
|
138
|
+
return patchChannelConfigForAccount({
|
|
139
|
+
cfg, channel: CHANNEL, accountId,
|
|
140
|
+
patch: { enabled: true, dmSecurity: "paired" },
|
|
141
|
+
});
|
|
127
142
|
},
|
|
143
|
+
allowFrom: createAccountScopedAllowFromSection({
|
|
144
|
+
channel: CHANNEL,
|
|
145
|
+
helpTitle: "Lansenger user ID / 蓝信用户 ID",
|
|
146
|
+
helpLines: [
|
|
147
|
+
"Lansenger user IDs have format: appId-userId (e.g. 2285568-xxxxxxx)",
|
|
148
|
+
"蓝信用户 ID 格式:appId-userId(如 2285568-xxxxxxx)",
|
|
149
|
+
],
|
|
150
|
+
message: "Lansenger allowFrom (user IDs, format: 2285568-xxx)",
|
|
151
|
+
placeholder: "2285568-xxxxxxx",
|
|
152
|
+
invalidWithoutCredentialNote: "Lansenger allowFrom requires user IDs in format appId-userId.",
|
|
153
|
+
parseId: (entry) => entry.trim() || null,
|
|
154
|
+
resolveEntries: async ({ entries }) => entries.map((entry) => ({
|
|
155
|
+
input: entry,
|
|
156
|
+
resolved: Boolean(entry.trim()),
|
|
157
|
+
id: entry.trim(),
|
|
158
|
+
})),
|
|
159
|
+
}),
|
|
128
160
|
dmPolicy: createTopLevelChannelDmPolicy({
|
|
129
161
|
label: "Lansenger",
|
|
130
|
-
channel:
|
|
162
|
+
channel: CHANNEL,
|
|
131
163
|
policyKey: "channels.lansenger.dmSecurity",
|
|
132
164
|
allowFromKey: "channels.lansenger.allowFrom",
|
|
133
165
|
getCurrent: (cfg) => {
|
|
134
166
|
const section = getSection(cfg);
|
|
135
167
|
return (section?.dmSecurity ?? "paired");
|
|
136
168
|
},
|
|
137
|
-
promptAllowFrom: async ({ cfg, prompter, accountId }) => {
|
|
138
|
-
const section = getSection(cfg) ?? {};
|
|
139
|
-
const existing = section.allowFrom ?? [];
|
|
140
|
-
const input = await prompter.text({
|
|
141
|
-
message: "Lansenger user ID (蓝信用户 ID,格式:2285568-xxx)",
|
|
142
|
-
placeholder: "2285568-xxxxxxx",
|
|
143
|
-
initialValue: existing[0] ? String(existing[0]) : undefined,
|
|
144
|
-
});
|
|
145
|
-
const newId = String(input).trim();
|
|
146
|
-
const merged = [...existing.map(String).filter(Boolean), newId];
|
|
147
|
-
const channels = { ...(cfg.channels ?? {}) };
|
|
148
|
-
const current = channels.lansenger ?? {};
|
|
149
|
-
channels.lansenger = { ...current, allowFrom: [...new Set(merged)], dmSecurity: "allowlist" };
|
|
150
|
-
return { ...cfg, channels };
|
|
151
|
-
},
|
|
152
169
|
}),
|
|
153
|
-
disable: (cfg) => setSetupChannelEnabled(cfg,
|
|
170
|
+
disable: (cfg) => setSetupChannelEnabled(cfg, CHANNEL, false),
|
|
154
171
|
};
|
|
155
172
|
//# sourceMappingURL=setup-wizard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-wizard.js","sourceRoot":"","sources":["../../src/setup-wizard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,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KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAC/B,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE;SACjB,CAAC,CAAC;KACJ,CAAC;IAEF,QAAQ,EAAE,6BAA6B,CAAC;QACtC,KAAK,EAAE,WAAW;QAClB,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,+BAA+B;QAC1C,YAAY,EAAE,8BAA8B;QAC5C,UAAU,EAAE,CAAC,GAAQ,EAAE,EAAE;YACvB,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;YAChC,OAAO,CAAC,OAAO,EAAE,UAAU,IAAI,QAAQ,CAAQ,CAAC;QAClD,CAAC;KACF,CAAC;IAEF,OAAO,EAAE,CAAC,GAAQ,EAAE,EAAE,CAAC,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC;CACnE,CAAC"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -71,6 +71,15 @@
|
|
|
71
71
|
"type": "object",
|
|
72
72
|
"additionalProperties": false,
|
|
73
73
|
"properties": {
|
|
74
|
+
"enabled": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"default": true,
|
|
77
|
+
"description": "Enable or disable this channel / 启用或禁用此频道"
|
|
78
|
+
},
|
|
79
|
+
"name": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "Display name for this account / 此账号的显示名称"
|
|
82
|
+
},
|
|
74
83
|
"appId": {
|
|
75
84
|
"type": "string",
|
|
76
85
|
"description": "Lansenger bot App ID / 蓝信机器人 App ID(格式:2285568-xxx)"
|
|
@@ -127,19 +136,28 @@
|
|
|
127
136
|
"additionalProperties": {
|
|
128
137
|
"type": "object",
|
|
129
138
|
"properties": {
|
|
139
|
+
"enabled": { "type": "boolean", "description": "Whether this bot is enabled / 是否启用" },
|
|
140
|
+
"name": { "type": "string", "description": "Display name for this account / 此账号的显示名称" },
|
|
130
141
|
"appId": { "type": "string", "description": "Bot App ID / 机器人 App ID" },
|
|
131
142
|
"appSecret": { "type": "string", "description": "Bot App Secret / 机器人 App Secret" },
|
|
132
143
|
"apiGatewayUrl": { "type": "string", "description": "API Gateway URL / API 网关地址" },
|
|
133
|
-
|
|
134
144
|
"allowFrom": { "type": "array", "items": { "type": "string" }, "description": "Allowed user IDs / 允许的用户 ID 列表" },
|
|
135
|
-
"dmSecurity": { "type": "string", "description": "DM security policy / 私聊安全策略" }
|
|
136
|
-
"enabled": { "type": "boolean", "description": "Whether this bot is enabled / 是否启用" }
|
|
145
|
+
"dmSecurity": { "type": "string", "description": "DM security policy / 私聊安全策略" }
|
|
137
146
|
}
|
|
138
147
|
}
|
|
139
148
|
}
|
|
140
149
|
}
|
|
141
150
|
},
|
|
142
151
|
"uiHints": {
|
|
152
|
+
"enabled": {
|
|
153
|
+
"label": "Enabled / 启用",
|
|
154
|
+
"help": "Enable or disable the Lansenger channel / 启用或禁用蓝信频道"
|
|
155
|
+
},
|
|
156
|
+
"name": {
|
|
157
|
+
"label": "Display Name / 显示名称",
|
|
158
|
+
"placeholder": "e.g. QAX Bot / 奇安信机器人",
|
|
159
|
+
"help": "Optional display name for this channel account / 此频道账号的可选显示名称"
|
|
160
|
+
},
|
|
143
161
|
"appId": {
|
|
144
162
|
"label": "App ID / 蓝信 App ID",
|
|
145
163
|
"placeholder": "e.g. 2285568-10117376",
|
|
@@ -202,7 +220,15 @@
|
|
|
202
220
|
"accounts": {
|
|
203
221
|
"label": "Multi-Bot Accounts / 多机器人账号",
|
|
204
222
|
"sensitive": false,
|
|
205
|
-
"help": "Configure multiple bots with independent App IDs. Route to different agents using top-level bindings config
|
|
223
|
+
"help": "Configure multiple bots with independent App IDs. Route to different agents using top-level bindings config. / 配置多个机器人,每个机器人有独立的 App ID。多 Agent 路由使用顶层 bindings 配置。"
|
|
224
|
+
},
|
|
225
|
+
"accounts.*.enabled": {
|
|
226
|
+
"label": "Enabled / 启用",
|
|
227
|
+
"help": "Enable/disable this bot account / 启用/禁用该机器人账号"
|
|
228
|
+
},
|
|
229
|
+
"accounts.*.name": {
|
|
230
|
+
"label": "Display Name / 显示名称",
|
|
231
|
+
"help": "Display name for this bot account / 此机器人账号的显示名称"
|
|
206
232
|
},
|
|
207
233
|
"accounts.*.appId": {
|
|
208
234
|
"label": "App ID / 蓝信 App ID",
|
|
@@ -232,11 +258,6 @@
|
|
|
232
258
|
"open": "Open to All / 对所有人开放"
|
|
233
259
|
},
|
|
234
260
|
"help": "DM security policy for this bot / 该机器人的私聊安全策略"
|
|
235
|
-
},
|
|
236
|
-
"accounts.*.enabled": {
|
|
237
|
-
"label": "Enabled / 启用",
|
|
238
|
-
"sensitive": false,
|
|
239
|
-
"help": "Enable/disable this bot account / 启用/禁用该机器人账号"
|
|
240
261
|
}
|
|
241
262
|
}
|
|
242
263
|
}
|