@clowder-ai/connector-feishu 0.0.0-stage → 0.1.0-alpha.8
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.en.md +54 -0
- package/README.md +25 -2
- package/assets/icon.svg +3 -0
- package/dist/FeishuAdapter.d.ts +250 -0
- package/dist/FeishuAdapter.d.ts.map +1 -0
- package/dist/FeishuAdapter.js +845 -0
- package/dist/FeishuAdapter.js.map +1 -0
- package/dist/FeishuQrBindClient.d.ts +23 -0
- package/dist/FeishuQrBindClient.d.ts.map +1 -0
- package/dist/FeishuQrBindClient.js +97 -0
- package/dist/FeishuQrBindClient.js.map +1 -0
- package/dist/FeishuTokenManager.d.ts +15 -0
- package/dist/FeishuTokenManager.d.ts.map +1 -0
- package/dist/FeishuTokenManager.js +35 -0
- package/dist/FeishuTokenManager.js.map +1 -0
- package/dist/command-ingress.d.ts +10 -0
- package/dist/command-ingress.d.ts.map +1 -0
- package/dist/command-ingress.js +15 -0
- package/dist/command-ingress.js.map +1 -0
- package/dist/execution-status.d.ts +27 -0
- package/dist/execution-status.d.ts.map +1 -0
- package/dist/execution-status.js +48 -0
- package/dist/execution-status.js.map +1 -0
- package/dist/feishu-card-formatter.d.ts +18 -0
- package/dist/feishu-card-formatter.d.ts.map +1 -0
- package/dist/feishu-card-formatter.js +58 -0
- package/dist/feishu-card-formatter.js.map +1 -0
- package/dist/inbound-download.d.ts +13 -0
- package/dist/inbound-download.d.ts.map +1 -0
- package/dist/inbound-download.js +70 -0
- package/dist/inbound-download.js.map +1 -0
- package/dist/inbound-media-source.d.ts +25 -0
- package/dist/inbound-media-source.d.ts.map +1 -0
- package/dist/inbound-media-source.js +111 -0
- package/dist/inbound-media-source.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/lifecycle-action.d.ts +30 -0
- package/dist/lifecycle-action.d.ts.map +1 -0
- package/dist/lifecycle-action.js +457 -0
- package/dist/lifecycle-action.js.map +1 -0
- package/dist/materialize-media.d.ts +7 -0
- package/dist/materialize-media.d.ts.map +1 -0
- package/dist/materialize-media.js +35 -0
- package/dist/materialize-media.js.map +1 -0
- package/dist/media-notice.d.ts +6 -0
- package/dist/media-notice.d.ts.map +1 -0
- package/dist/media-notice.js +50 -0
- package/dist/media-notice.js.map +1 -0
- package/dist/plugin-entrypoint.d.ts +9 -0
- package/dist/plugin-entrypoint.d.ts.map +1 -0
- package/dist/plugin-entrypoint.js +347 -0
- package/dist/plugin-entrypoint.js.map +1 -0
- package/dist/reply-sender-map.d.ts +10 -0
- package/dist/reply-sender-map.d.ts.map +1 -0
- package/dist/reply-sender-map.js +123 -0
- package/dist/reply-sender-map.js.map +1 -0
- package/dist/runtime.d.ts +190 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +580 -0
- package/dist/runtime.js.map +1 -0
- package/dist/settings.d.ts +20 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +35 -0
- package/dist/settings.js.map +1 -0
- package/dist/thread-mappings.d.ts +46 -0
- package/dist/thread-mappings.d.ts.map +1 -0
- package/dist/thread-mappings.js +62 -0
- package/dist/thread-mappings.js.map +1 -0
- package/dist/types.d.ts +54 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/npm-shrinkwrap.json +979 -0
- package/package.json +58 -4
- package/plugin.yaml +128 -0
package/package.json
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clowder-ai/connector-feishu",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
|
+
"description": "Feishu and Lark enterprise messaging connector for Clowder AI hosts",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./manifest": "./plugin.yaml"
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"plugin.yaml",
|
|
19
|
+
"README.md",
|
|
20
|
+
"assets",
|
|
21
|
+
"npm-shrinkwrap.json",
|
|
22
|
+
"README.en.md"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=20.0.0"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "pnpm clean && tsc -p tsconfig.build.json",
|
|
29
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.test.json",
|
|
30
|
+
"test": "node --import tsx --test src/**/*.test.ts",
|
|
31
|
+
"lint": "tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.test.json",
|
|
32
|
+
"clean": "rm -rf dist",
|
|
33
|
+
"prepack": "pnpm build"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@clowder-ai/plugin-sdk": "0.2.0-beta.24",
|
|
37
|
+
"@larksuiteoapi/node-sdk": "1.59.0",
|
|
38
|
+
"qrcode": "1.5.4",
|
|
39
|
+
"@clowder-ai/plugin-contract": "0.2.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "^20.17.0",
|
|
43
|
+
"@types/qrcode": "^1.5.5",
|
|
44
|
+
"tsx": "^4.19.0",
|
|
45
|
+
"typescript": "^5.7.0",
|
|
46
|
+
"yaml": "2.9.0"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"clowder-ai",
|
|
50
|
+
"connector",
|
|
51
|
+
"feishu",
|
|
52
|
+
"lark",
|
|
53
|
+
"messaging"
|
|
54
|
+
],
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "https://github.com/zts212653/clowder-ai-plugins.git",
|
|
58
|
+
"directory": "packages/connector-feishu"
|
|
59
|
+
}
|
|
60
|
+
}
|
package/plugin.yaml
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
pluginId: official.connector.feishu
|
|
2
|
+
version: 0.1.0-alpha.8
|
|
3
|
+
contractVersion: 0.2.0
|
|
4
|
+
name: Feishu / Lark Connector
|
|
5
|
+
description:
|
|
6
|
+
default: Receive and send Feishu or Lark messages through a Host-owned connector binding.
|
|
7
|
+
translations:
|
|
8
|
+
zh-CN: 通过宿主所有的连接器绑定接收和发送飞书或 Lark 消息。
|
|
9
|
+
icon:
|
|
10
|
+
type: svg
|
|
11
|
+
src: assets/icon.svg
|
|
12
|
+
configuration:
|
|
13
|
+
- key: appId
|
|
14
|
+
label: App ID
|
|
15
|
+
kind: string
|
|
16
|
+
required: true
|
|
17
|
+
- key: appSecret
|
|
18
|
+
label: App Secret
|
|
19
|
+
kind: secret
|
|
20
|
+
required: true
|
|
21
|
+
- key: connectionMode
|
|
22
|
+
label: 连接模式
|
|
23
|
+
kind: select
|
|
24
|
+
required: true
|
|
25
|
+
default: webhook
|
|
26
|
+
options:
|
|
27
|
+
- value: webhook
|
|
28
|
+
label: Webhook(需公网 URL)
|
|
29
|
+
- value: websocket
|
|
30
|
+
label: WebSocket(无需公网,推荐内网)
|
|
31
|
+
- key: verificationToken
|
|
32
|
+
label: Verification Token
|
|
33
|
+
kind: secret
|
|
34
|
+
required: true
|
|
35
|
+
- key: groupBotMentionsJson
|
|
36
|
+
label: Group Bot Mentions (JSON, .env-only)
|
|
37
|
+
kind: string
|
|
38
|
+
required: false
|
|
39
|
+
hidden: true
|
|
40
|
+
- key: feishu_qr_login
|
|
41
|
+
label: 飞书扫码授权
|
|
42
|
+
kind: operation
|
|
43
|
+
required: false
|
|
44
|
+
target: [appId, appSecret, connectionMode]
|
|
45
|
+
actions:
|
|
46
|
+
- id: qr-generate
|
|
47
|
+
label: 生成二维码
|
|
48
|
+
render: button
|
|
49
|
+
resultRender: img
|
|
50
|
+
action:
|
|
51
|
+
method: feishu.qr-generate
|
|
52
|
+
next: qr-status
|
|
53
|
+
- id: qr-status
|
|
54
|
+
label: 等待扫码
|
|
55
|
+
render: polling
|
|
56
|
+
action:
|
|
57
|
+
method: feishu.qr-status
|
|
58
|
+
timeout: 600
|
|
59
|
+
rollback: qr-generate
|
|
60
|
+
next: disconnect
|
|
61
|
+
- id: disconnect
|
|
62
|
+
label: 断开连接
|
|
63
|
+
render: button
|
|
64
|
+
action:
|
|
65
|
+
method: feishu.disconnect
|
|
66
|
+
next: qr-generate
|
|
67
|
+
configurationVariants:
|
|
68
|
+
discriminator: connectionMode
|
|
69
|
+
branches:
|
|
70
|
+
- id: webhook
|
|
71
|
+
when:
|
|
72
|
+
properties:
|
|
73
|
+
connectionMode: { const: webhook }
|
|
74
|
+
fields: [verificationToken]
|
|
75
|
+
- id: websocket
|
|
76
|
+
when:
|
|
77
|
+
properties:
|
|
78
|
+
connectionMode: { const: websocket }
|
|
79
|
+
fields: []
|
|
80
|
+
test:
|
|
81
|
+
action:
|
|
82
|
+
method: feishu.test
|
|
83
|
+
permissions:
|
|
84
|
+
label: 飞书
|
|
85
|
+
steps:
|
|
86
|
+
- text: "在飞书开放平台创建企业自建应用,获取 App ID 和 App Secret"
|
|
87
|
+
- text: "选择连接模式:Webhook(需公网 URL)或 WebSocket(无需公网,推荐内网环境)"
|
|
88
|
+
- text: "在「事件订阅」中配置请求地址并获取 Verification Token"
|
|
89
|
+
mode: webhook
|
|
90
|
+
- text: "在「事件订阅」中选择「使用长连接接收事件」,无需 Verification Token"
|
|
91
|
+
mode: websocket
|
|
92
|
+
contributions:
|
|
93
|
+
- type: identity
|
|
94
|
+
id: feishu-bot
|
|
95
|
+
displayName: Feishu bot
|
|
96
|
+
- type: message-subscription
|
|
97
|
+
id: feishu
|
|
98
|
+
binding: feishu-bot
|
|
99
|
+
action:
|
|
100
|
+
method: feishu.outbound
|
|
101
|
+
presentation: v2
|
|
102
|
+
- type: media-source
|
|
103
|
+
id: feishu-media
|
|
104
|
+
binding: feishu-bot
|
|
105
|
+
- type: webhook
|
|
106
|
+
id: feishu-events
|
|
107
|
+
path: feishu/events
|
|
108
|
+
methods: [POST]
|
|
109
|
+
action:
|
|
110
|
+
method: feishu.webhook
|
|
111
|
+
verificationSecretRef: verificationToken
|
|
112
|
+
features:
|
|
113
|
+
- id: feishu-messaging
|
|
114
|
+
name: Feishu messaging
|
|
115
|
+
resources: []
|
|
116
|
+
contributions:
|
|
117
|
+
- type: identity
|
|
118
|
+
id: feishu-bot
|
|
119
|
+
- type: message-subscription
|
|
120
|
+
id: feishu
|
|
121
|
+
- type: media-source
|
|
122
|
+
id: feishu-media
|
|
123
|
+
- type: webhook
|
|
124
|
+
id: feishu-events
|
|
125
|
+
capabilities: [plugin.config.read, plugin.state.get, plugin.state.set, streams.read, message.event.subscribe, messaging.send, secret.read, thread.readContent, thread.listMetadata, thread.write]
|
|
126
|
+
runtime:
|
|
127
|
+
transport: builtin
|
|
128
|
+
entrypoint: dist/plugin-entrypoint.js
|