@clowder-ai/connector-feishu 0.0.0-stage → 0.1.0-alpha.5

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.
Files changed (78) hide show
  1. package/README.en.md +54 -0
  2. package/README.md +25 -2
  3. package/assets/icon.svg +3 -0
  4. package/dist/FeishuAdapter.d.ts +250 -0
  5. package/dist/FeishuAdapter.d.ts.map +1 -0
  6. package/dist/FeishuAdapter.js +845 -0
  7. package/dist/FeishuAdapter.js.map +1 -0
  8. package/dist/FeishuQrBindClient.d.ts +23 -0
  9. package/dist/FeishuQrBindClient.d.ts.map +1 -0
  10. package/dist/FeishuQrBindClient.js +97 -0
  11. package/dist/FeishuQrBindClient.js.map +1 -0
  12. package/dist/FeishuTokenManager.d.ts +15 -0
  13. package/dist/FeishuTokenManager.d.ts.map +1 -0
  14. package/dist/FeishuTokenManager.js +35 -0
  15. package/dist/FeishuTokenManager.js.map +1 -0
  16. package/dist/command-ingress.d.ts +10 -0
  17. package/dist/command-ingress.d.ts.map +1 -0
  18. package/dist/command-ingress.js +15 -0
  19. package/dist/command-ingress.js.map +1 -0
  20. package/dist/execution-status.d.ts +27 -0
  21. package/dist/execution-status.d.ts.map +1 -0
  22. package/dist/execution-status.js +48 -0
  23. package/dist/execution-status.js.map +1 -0
  24. package/dist/feishu-card-formatter.d.ts +18 -0
  25. package/dist/feishu-card-formatter.d.ts.map +1 -0
  26. package/dist/feishu-card-formatter.js +58 -0
  27. package/dist/feishu-card-formatter.js.map +1 -0
  28. package/dist/inbound-download.d.ts +13 -0
  29. package/dist/inbound-download.d.ts.map +1 -0
  30. package/dist/inbound-download.js +70 -0
  31. package/dist/inbound-download.js.map +1 -0
  32. package/dist/inbound-media-source.d.ts +25 -0
  33. package/dist/inbound-media-source.d.ts.map +1 -0
  34. package/dist/inbound-media-source.js +111 -0
  35. package/dist/inbound-media-source.js.map +1 -0
  36. package/dist/index.d.ts +9 -0
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/index.js +5 -0
  39. package/dist/index.js.map +1 -0
  40. package/dist/lifecycle-action.d.ts +30 -0
  41. package/dist/lifecycle-action.d.ts.map +1 -0
  42. package/dist/lifecycle-action.js +457 -0
  43. package/dist/lifecycle-action.js.map +1 -0
  44. package/dist/materialize-media.d.ts +7 -0
  45. package/dist/materialize-media.d.ts.map +1 -0
  46. package/dist/materialize-media.js +35 -0
  47. package/dist/materialize-media.js.map +1 -0
  48. package/dist/media-notice.d.ts +6 -0
  49. package/dist/media-notice.d.ts.map +1 -0
  50. package/dist/media-notice.js +50 -0
  51. package/dist/media-notice.js.map +1 -0
  52. package/dist/plugin-entrypoint.d.ts +9 -0
  53. package/dist/plugin-entrypoint.d.ts.map +1 -0
  54. package/dist/plugin-entrypoint.js +347 -0
  55. package/dist/plugin-entrypoint.js.map +1 -0
  56. package/dist/reply-sender-map.d.ts +10 -0
  57. package/dist/reply-sender-map.d.ts.map +1 -0
  58. package/dist/reply-sender-map.js +123 -0
  59. package/dist/reply-sender-map.js.map +1 -0
  60. package/dist/runtime.d.ts +190 -0
  61. package/dist/runtime.d.ts.map +1 -0
  62. package/dist/runtime.js +580 -0
  63. package/dist/runtime.js.map +1 -0
  64. package/dist/settings.d.ts +20 -0
  65. package/dist/settings.d.ts.map +1 -0
  66. package/dist/settings.js +35 -0
  67. package/dist/settings.js.map +1 -0
  68. package/dist/thread-mappings.d.ts +46 -0
  69. package/dist/thread-mappings.d.ts.map +1 -0
  70. package/dist/thread-mappings.js +62 -0
  71. package/dist/thread-mappings.js.map +1 -0
  72. package/dist/types.d.ts +54 -0
  73. package/dist/types.d.ts.map +1 -0
  74. package/dist/types.js +7 -0
  75. package/dist/types.js.map +1 -0
  76. package/npm-shrinkwrap.json +979 -0
  77. package/package.json +58 -4
  78. package/plugin.yaml +118 -0
package/package.json CHANGED
@@ -1,6 +1,60 @@
1
1
  {
2
2
  "name": "@clowder-ai/connector-feishu",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-alpha.5",
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.21",
37
+ "@larksuiteoapi/node-sdk": "1.59.0",
38
+ "qrcode": "1.5.4",
39
+ "@clowder-ai/plugin-contract": "0.1.0-beta.37"
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,118 @@
1
+ pluginId: official.connector.feishu
2
+ version: 0.1.0-alpha.5
3
+ contractVersion: 0.1.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: false
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: false
35
+ requiredWhen:
36
+ key: connectionMode
37
+ value: webhook
38
+ - key: groupBotMentionsJson
39
+ label: Group Bot Mentions (JSON, .env-only)
40
+ kind: string
41
+ required: false
42
+ hidden: true
43
+ - key: feishu_qr_login
44
+ label: 飞书扫码授权
45
+ kind: operation
46
+ required: false
47
+ target: [appId, appSecret, connectionMode]
48
+ actions:
49
+ - id: qr-generate
50
+ label: 生成二维码
51
+ render: button
52
+ resultRender: img
53
+ action:
54
+ method: feishu.qr-generate
55
+ next: qr-status
56
+ - id: qr-status
57
+ label: 等待扫码
58
+ render: polling
59
+ action:
60
+ method: feishu.qr-status
61
+ timeout: 600
62
+ rollback: qr-generate
63
+ next: disconnect
64
+ - id: disconnect
65
+ label: 断开连接
66
+ render: button
67
+ action:
68
+ method: feishu.disconnect
69
+ next: qr-generate
70
+ test:
71
+ action:
72
+ method: feishu.test
73
+ permissions:
74
+ label: 飞书
75
+ steps:
76
+ - text: "在飞书开放平台创建企业自建应用,获取 App ID 和 App Secret"
77
+ - text: "选择连接模式:Webhook(需公网 URL)或 WebSocket(无需公网,推荐内网环境)"
78
+ - text: "在「事件订阅」中配置请求地址并获取 Verification Token"
79
+ mode: webhook
80
+ - text: "在「事件订阅」中选择「使用长连接接收事件」,无需 Verification Token"
81
+ mode: websocket
82
+ contributions:
83
+ - type: identity
84
+ id: feishu-bot
85
+ displayName: Feishu bot
86
+ - type: message-subscription
87
+ id: feishu
88
+ binding: feishu-bot
89
+ action:
90
+ method: feishu.outbound
91
+ presentation: v2
92
+ - type: media-source
93
+ id: feishu-media
94
+ binding: feishu-bot
95
+ - type: webhook
96
+ id: feishu-events
97
+ path: feishu/events
98
+ methods: [POST]
99
+ action:
100
+ method: feishu.webhook
101
+ verificationSecretRef: verificationToken
102
+ features:
103
+ - id: feishu-messaging
104
+ name: Feishu messaging
105
+ resources: []
106
+ contributions:
107
+ - type: identity
108
+ id: feishu-bot
109
+ - type: message-subscription
110
+ id: feishu
111
+ - type: media-source
112
+ id: feishu-media
113
+ - type: webhook
114
+ id: feishu-events
115
+ 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]
116
+ runtime:
117
+ transport: builtin
118
+ entrypoint: dist/plugin-entrypoint.js