@ycodium-ai/plugin-im 0.2.2554 → 0.2.2566
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/README.md +3 -3
- package/dist/index.js +47 -40
- package/locales/en.json +2 -1
- package/locales/zh-CN.json +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -56,9 +56,9 @@ switch threads this plugin opened, since the host lets a plugin send only into
|
|
|
56
56
|
its own threads.
|
|
57
57
|
|
|
58
58
|
The **Reply language** setting (Chinese by default, or English) picks the
|
|
59
|
-
language of everything the bot says itself
|
|
60
|
-
lives in `locales/en.json` and
|
|
61
|
-
only work in Chinese.
|
|
59
|
+
language of everything the bot says itself. The settings card follows the
|
|
60
|
+
interface language instead. The copy lives in `locales/en.json` and
|
|
61
|
+
`locales/zh-CN.json`; Chinese shortcut commands only work in Chinese.
|
|
62
62
|
|
|
63
63
|
## Requirements
|
|
64
64
|
|
package/dist/index.js
CHANGED
|
@@ -132147,8 +132147,13 @@ var startLarkInbound = (input) => {
|
|
|
132147
132147
|
// src/larkAdapter.ts
|
|
132148
132148
|
var TOKEN_CACHE_MAX_AGE_MS = 30 * 6e4;
|
|
132149
132149
|
var COLUMNS = [
|
|
132150
|
-
{
|
|
132151
|
-
|
|
132150
|
+
{
|
|
132151
|
+
key: "larkAppId",
|
|
132152
|
+
kind: "text",
|
|
132153
|
+
labelKey: "column.larkAppId.label",
|
|
132154
|
+
placeholderKey: "column.larkAppId.placeholder"
|
|
132155
|
+
},
|
|
132156
|
+
{ key: "larkAppSecret", kind: "password", labelKey: "column.larkAppSecret.label" }
|
|
132152
132157
|
];
|
|
132153
132158
|
var credentials = (binding) => ({
|
|
132154
132159
|
appId: binding.values["larkAppId"] ?? "",
|
|
@@ -132328,7 +132333,8 @@ var en_default = {
|
|
|
132328
132333
|
label: "Platform"
|
|
132329
132334
|
},
|
|
132330
132335
|
larkAppId: {
|
|
132331
|
-
label: "Lark app ID"
|
|
132336
|
+
label: "Lark app ID",
|
|
132337
|
+
placeholder: "cli_\u2026"
|
|
132332
132338
|
},
|
|
132333
132339
|
larkAppSecret: {
|
|
132334
132340
|
label: "Lark app secret"
|
|
@@ -132534,7 +132540,8 @@ var zh_CN_default = {
|
|
|
132534
132540
|
label: "\u5E73\u53F0"
|
|
132535
132541
|
},
|
|
132536
132542
|
larkAppId: {
|
|
132537
|
-
label: "\u98DE\u4E66\u5E94\u7528 ID"
|
|
132543
|
+
label: "\u98DE\u4E66\u5E94\u7528 ID",
|
|
132544
|
+
placeholder: "cli_\u2026"
|
|
132538
132545
|
},
|
|
132539
132546
|
larkAppSecret: {
|
|
132540
132547
|
label: "\u98DE\u4E66\u5E94\u7528\u5BC6\u94A5"
|
|
@@ -132983,7 +132990,7 @@ var makeTelegramApi = (input) => {
|
|
|
132983
132990
|
|
|
132984
132991
|
// src/telegramAdapter.ts
|
|
132985
132992
|
var COLUMNS2 = [
|
|
132986
|
-
{ key: "telegramToken", kind: "password",
|
|
132993
|
+
{ key: "telegramToken", kind: "password", labelKey: "column.telegramToken.label" }
|
|
132987
132994
|
];
|
|
132988
132995
|
var BACKOFF_START_MS = 1e3;
|
|
132989
132996
|
var BACKOFF_MAX_MS = 6e4;
|
|
@@ -133499,8 +133506,8 @@ var runWecomClient = (input) => {
|
|
|
133499
133506
|
var BACKOFF_START_MS2 = 1e3;
|
|
133500
133507
|
var BACKOFF_MAX_MS2 = 6e4;
|
|
133501
133508
|
var COLUMNS3 = [
|
|
133502
|
-
{ key: "wecomBotId", kind: "text",
|
|
133503
|
-
{ key: "wecomBotSecret", kind: "password",
|
|
133509
|
+
{ key: "wecomBotId", kind: "text", labelKey: "column.wecomBotId.label" },
|
|
133510
|
+
{ key: "wecomBotSecret", kind: "password", labelKey: "column.wecomBotSecret.label" }
|
|
133504
133511
|
];
|
|
133505
133512
|
var defaultSleep2 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
133506
133513
|
var credentials2 = (binding) => ({
|
|
@@ -133695,99 +133702,99 @@ var imPlugin = definePlugin({
|
|
|
133695
133702
|
const platformColumn = {
|
|
133696
133703
|
key: "platform",
|
|
133697
133704
|
kind: "select",
|
|
133698
|
-
|
|
133705
|
+
labelKey: "column.platform.label",
|
|
133699
133706
|
options: adapters.map((adapter) => ({
|
|
133700
133707
|
value: adapter.platform,
|
|
133701
|
-
//
|
|
133702
|
-
|
|
133708
|
+
// 平台名在目录里有本地叫法(飞书、企业微信)。
|
|
133709
|
+
labelKey: `platform.${adapter.platform}`,
|
|
133703
133710
|
icon: adapter.icon
|
|
133704
133711
|
}))
|
|
133705
133712
|
};
|
|
133706
133713
|
const credentialColumns = adapters.flatMap(
|
|
133707
133714
|
(adapter) => adapter.columns.map((column) => ({
|
|
133708
133715
|
...column,
|
|
133709
|
-
// 凭据列的字也走目录;适配器自己写的英文只是目录里没有这个键时的回落。
|
|
133710
|
-
label: t.optional(`column.${column.key}.label`) ?? column.label,
|
|
133711
133716
|
showWhen: { key: platformColumn.key, equals: [adapter.platform] }
|
|
133712
133717
|
}))
|
|
133713
133718
|
);
|
|
133714
133719
|
ctx.settingsCard({
|
|
133715
|
-
|
|
133716
|
-
|
|
133720
|
+
titleKey: "settings.title",
|
|
133721
|
+
descriptionKey: "settings.description",
|
|
133717
133722
|
fields: [
|
|
133718
133723
|
{
|
|
133719
133724
|
key: REPLY_LANGUAGE_FIELD,
|
|
133720
133725
|
kind: "select",
|
|
133721
|
-
|
|
133722
|
-
|
|
133726
|
+
labelKey: "settings.language.label",
|
|
133727
|
+
descriptionKey: "settings.language.description",
|
|
133723
133728
|
options: [
|
|
133724
|
-
{ value: "zh-CN",
|
|
133725
|
-
{ value: "en",
|
|
133729
|
+
{ value: "zh-CN", labelKey: "settings.language.zhCN" },
|
|
133730
|
+
{ value: "en", labelKey: "settings.language.en" }
|
|
133726
133731
|
]
|
|
133727
133732
|
},
|
|
133728
133733
|
{
|
|
133729
133734
|
key: GROUPS_FIELD,
|
|
133730
133735
|
kind: "table",
|
|
133731
|
-
|
|
133736
|
+
labelKey: "settings.groups",
|
|
133732
133737
|
columns: [
|
|
133733
133738
|
{
|
|
133734
133739
|
key: "displayName",
|
|
133735
133740
|
kind: "text",
|
|
133736
|
-
|
|
133737
|
-
|
|
133741
|
+
labelKey: "column.displayName.label",
|
|
133742
|
+
placeholderKey: "column.displayName.placeholder"
|
|
133738
133743
|
},
|
|
133739
133744
|
platformColumn,
|
|
133740
133745
|
...credentialColumns,
|
|
133741
133746
|
{
|
|
133742
133747
|
key: "chatId",
|
|
133743
133748
|
kind: "text",
|
|
133744
|
-
|
|
133745
|
-
|
|
133749
|
+
labelKey: "column.chatId.label",
|
|
133750
|
+
descriptionKey: "column.chatId.description"
|
|
133746
133751
|
},
|
|
133747
133752
|
{
|
|
133748
133753
|
key: "allowedSenders",
|
|
133749
133754
|
kind: "text",
|
|
133750
|
-
|
|
133751
|
-
|
|
133755
|
+
labelKey: "column.allowedSenders.label",
|
|
133756
|
+
descriptionKey: "column.allowedSenders.description"
|
|
133752
133757
|
},
|
|
133753
133758
|
{
|
|
133754
133759
|
// 选项由宿主填,连三态一起——插件只声明「这个格子装的是代理」,宿主因此
|
|
133755
133760
|
// 也就认得出这一行引用了哪个代理,删代理时拦得住(路线图 #64)。
|
|
133756
133761
|
key: "proxy",
|
|
133757
133762
|
kind: "proxy",
|
|
133758
|
-
|
|
133759
|
-
|
|
133763
|
+
labelKey: "column.proxy.label",
|
|
133764
|
+
descriptionKey: "column.proxy.description"
|
|
133760
133765
|
},
|
|
133761
133766
|
{
|
|
133762
133767
|
key: "projectId",
|
|
133763
133768
|
kind: "select",
|
|
133764
|
-
|
|
133765
|
-
|
|
133769
|
+
labelKey: "column.projectId.label",
|
|
133770
|
+
descriptionKey: "column.projectId.description",
|
|
133766
133771
|
options: [
|
|
133767
|
-
{ value: "",
|
|
133772
|
+
{ value: "", labelKey: "settings.reportOnly" },
|
|
133773
|
+
// 项目名是数据,只能写成字面量;已归档的那段后缀宿主翻不了(选项没有带参数的
|
|
133774
|
+
// 键),所以仍按回话语言取。
|
|
133768
133775
|
...imProjectOptions(projects, boundProjectIds, t("settings.archivedSuffix"))
|
|
133769
133776
|
]
|
|
133770
133777
|
},
|
|
133771
133778
|
{
|
|
133772
133779
|
key: "runtimeMode",
|
|
133773
133780
|
kind: "select",
|
|
133774
|
-
|
|
133775
|
-
|
|
133781
|
+
labelKey: "column.runtimeMode.label",
|
|
133782
|
+
descriptionKey: "column.runtimeMode.description",
|
|
133776
133783
|
options: [
|
|
133777
|
-
{ value: "approval-required",
|
|
133778
|
-
{ value: "auto-accept-edits",
|
|
133779
|
-
{ value: "auto",
|
|
133780
|
-
{ value: "full-access",
|
|
133784
|
+
{ value: "approval-required", labelKey: "settings.runtimeMode.approvalRequired" },
|
|
133785
|
+
{ value: "auto-accept-edits", labelKey: "settings.runtimeMode.autoAcceptEdits" },
|
|
133786
|
+
{ value: "auto", labelKey: "settings.runtimeMode.auto" },
|
|
133787
|
+
{ value: "full-access", labelKey: "settings.runtimeMode.fullAccess" }
|
|
133781
133788
|
]
|
|
133782
133789
|
},
|
|
133783
133790
|
{
|
|
133784
133791
|
key: "mode",
|
|
133785
133792
|
kind: "select",
|
|
133786
|
-
|
|
133787
|
-
|
|
133793
|
+
labelKey: "column.mode.label",
|
|
133794
|
+
descriptionKey: "column.mode.description",
|
|
133788
133795
|
options: [
|
|
133789
|
-
{ value: "turn",
|
|
133790
|
-
{ value: "message",
|
|
133796
|
+
{ value: "turn", labelKey: "settings.notifyMode.turn" },
|
|
133797
|
+
{ value: "message", labelKey: "settings.notifyMode.message" }
|
|
133791
133798
|
]
|
|
133792
133799
|
}
|
|
133793
133800
|
]
|
package/locales/en.json
CHANGED
package/locales/zh-CN.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/plugin-im",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2566",
|
|
4
4
|
"description": "Talk to your agents from Telegram, WeCom or Lark.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"im",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"esbuild": "0.28.1",
|
|
28
28
|
"markdown-it": "^15.0.2",
|
|
29
29
|
"vite-plus": "0.2.2",
|
|
30
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
30
|
+
"@ycodium-ai/plugin-api": "0.2.2566"
|
|
31
31
|
},
|
|
32
32
|
"ycodium": {
|
|
33
33
|
"plugin": "./dist/index.js",
|