@actagent/feishu 2026.6.2
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 +11 -0
- package/actagent.plugin.json +224 -0
- package/api.ts +33 -0
- package/channel-entry.ts +21 -0
- package/channel-plugin-api.ts +2 -0
- package/contract-api.ts +17 -0
- package/index.ts +83 -0
- package/legacy-state-migrations-api.ts +2 -0
- package/npm-shrinkwrap.json +539 -0
- package/package.json +64 -0
- package/runtime-api.ts +58 -0
- package/runtime-setter-api.ts +3 -0
- package/secret-contract-api.ts +6 -0
- package/security-contract-api.ts +2 -0
- package/session-key-api.ts +2 -0
- package/setup-api.ts +4 -0
- package/setup-entry.test.ts +33 -0
- package/setup-entry.ts +25 -0
- package/skills/feishu-doc/SKILL.md +211 -0
- package/skills/feishu-doc/references/block-types.md +103 -0
- package/skills/feishu-drive/SKILL.md +97 -0
- package/skills/feishu-perm/SKILL.md +119 -0
- package/skills/feishu-wiki/SKILL.md +113 -0
- package/src/accounts.test.ts +481 -0
- package/src/accounts.ts +380 -0
- package/src/agent-config.ts +22 -0
- package/src/app-registration.test.ts +62 -0
- package/src/app-registration.ts +355 -0
- package/src/approval-auth.test.ts +25 -0
- package/src/approval-auth.ts +26 -0
- package/src/async.test.ts +68 -0
- package/src/async.ts +109 -0
- package/src/audio-preflight.runtime.ts +10 -0
- package/src/bitable.test.ts +174 -0
- package/src/bitable.ts +781 -0
- package/src/bot-content.ts +488 -0
- package/src/bot-group-name.test.ts +148 -0
- package/src/bot-runtime-api.ts +13 -0
- package/src/bot-sender-name.test.ts +68 -0
- package/src/bot-sender-name.ts +137 -0
- package/src/bot.broadcast.test.ts +643 -0
- package/src/bot.card-action.test.ts +647 -0
- package/src/bot.checkBotMentioned.test.ts +266 -0
- package/src/bot.helpers.test.ts +136 -0
- package/src/bot.stripBotMention.test.ts +127 -0
- package/src/bot.test.ts +3817 -0
- package/src/bot.ts +1788 -0
- package/src/card-action.ts +515 -0
- package/src/card-interaction.test.ts +132 -0
- package/src/card-interaction.ts +160 -0
- package/src/card-test-helpers.ts +55 -0
- package/src/card-ux-approval.ts +66 -0
- package/src/card-ux-launcher.test.ts +126 -0
- package/src/card-ux-launcher.ts +136 -0
- package/src/card-ux-shared.ts +34 -0
- package/src/channel-runtime-api.ts +17 -0
- package/src/channel.runtime.ts +48 -0
- package/src/channel.test.ts +1337 -0
- package/src/channel.ts +1401 -0
- package/src/chat-schema.ts +30 -0
- package/src/chat.test.ts +295 -0
- package/src/chat.ts +198 -0
- package/src/client-timeout.ts +44 -0
- package/src/client.test.ts +463 -0
- package/src/client.ts +263 -0
- package/src/comment-dispatcher-runtime-api.ts +7 -0
- package/src/comment-dispatcher.test.ts +186 -0
- package/src/comment-dispatcher.ts +108 -0
- package/src/comment-handler-runtime-api.ts +4 -0
- package/src/comment-handler.test.ts +588 -0
- package/src/comment-handler.ts +304 -0
- package/src/comment-reaction.test.ts +139 -0
- package/src/comment-reaction.ts +260 -0
- package/src/comment-shared.test.ts +184 -0
- package/src/comment-shared.ts +405 -0
- package/src/comment-target.ts +45 -0
- package/src/config-schema.test.ts +327 -0
- package/src/config-schema.ts +338 -0
- package/src/conversation-id.test.ts +19 -0
- package/src/conversation-id.ts +199 -0
- package/src/dedup-migrations.test.ts +90 -0
- package/src/dedup-migrations.ts +103 -0
- package/src/dedup.test.ts +95 -0
- package/src/dedup.ts +304 -0
- package/src/dedupe-key.ts +68 -0
- package/src/directory.static.ts +62 -0
- package/src/directory.test.ts +142 -0
- package/src/directory.ts +125 -0
- package/src/doc-schema.ts +183 -0
- package/src/doctor.test.ts +382 -0
- package/src/doctor.ts +876 -0
- package/src/docx-batch-insert.test.ts +117 -0
- package/src/docx-batch-insert.ts +223 -0
- package/src/docx-color-text.ts +154 -0
- package/src/docx-table-ops.test.ts +54 -0
- package/src/docx-table-ops.ts +316 -0
- package/src/docx-types.ts +39 -0
- package/src/docx.account-selection.test.ts +96 -0
- package/src/docx.test.ts +706 -0
- package/src/docx.ts +1598 -0
- package/src/drive-schema.ts +93 -0
- package/src/drive.test.ts +1240 -0
- package/src/drive.ts +830 -0
- package/src/dynamic-agent.test.ts +156 -0
- package/src/dynamic-agent.ts +144 -0
- package/src/event-types.ts +46 -0
- package/src/external-keys.test.ts +21 -0
- package/src/external-keys.ts +20 -0
- package/src/lifecycle.test-support.ts +223 -0
- package/src/media.test.ts +956 -0
- package/src/media.ts +1106 -0
- package/src/mention-target.types.ts +6 -0
- package/src/mention.ts +115 -0
- package/src/message-action-contract.ts +14 -0
- package/src/monitor-state-runtime-api.ts +8 -0
- package/src/monitor-transport-runtime-api.ts +11 -0
- package/src/monitor.account.ts +501 -0
- package/src/monitor.acp-init-failure.lifecycle.test-support.ts +215 -0
- package/src/monitor.bot-identity.ts +87 -0
- package/src/monitor.bot-menu-handler.ts +164 -0
- package/src/monitor.bot-menu.lifecycle.test-support.ts +221 -0
- package/src/monitor.bot-menu.test.ts +200 -0
- package/src/monitor.broadcast.reply-once.lifecycle.test-support.ts +265 -0
- package/src/monitor.card-action.lifecycle.test-support.ts +418 -0
- package/src/monitor.cleanup.test.ts +384 -0
- package/src/monitor.comment-notice-handler.ts +106 -0
- package/src/monitor.comment.test.ts +968 -0
- package/src/monitor.comment.ts +1386 -0
- package/src/monitor.lifecycle.test.ts +5 -0
- package/src/monitor.message-handler.ts +346 -0
- package/src/monitor.reaction.test.ts +770 -0
- package/src/monitor.startup.test.ts +232 -0
- package/src/monitor.startup.ts +76 -0
- package/src/monitor.state.defaults.test.ts +47 -0
- package/src/monitor.state.ts +171 -0
- package/src/monitor.synthetic-error.ts +19 -0
- package/src/monitor.test-mocks.ts +47 -0
- package/src/monitor.transport.ts +451 -0
- package/src/monitor.ts +104 -0
- package/src/monitor.webhook-e2e.test.ts +284 -0
- package/src/monitor.webhook-security.test.ts +394 -0
- package/src/monitor.webhook.test-helpers.ts +138 -0
- package/src/outbound-runtime-api.ts +2 -0
- package/src/outbound.test.ts +1255 -0
- package/src/outbound.ts +742 -0
- package/src/perm-schema.ts +53 -0
- package/src/perm.ts +171 -0
- package/src/pins.ts +109 -0
- package/src/policy.test.ts +224 -0
- package/src/policy.ts +322 -0
- package/src/post.test.ts +106 -0
- package/src/post.ts +276 -0
- package/src/presentation-card.ts +204 -0
- package/src/probe.test.ts +310 -0
- package/src/probe.ts +181 -0
- package/src/processing-claims.ts +60 -0
- package/src/qr-terminal.ts +2 -0
- package/src/reactions.ts +124 -0
- package/src/reasoning-preview.test.ts +114 -0
- package/src/reasoning-preview.ts +29 -0
- package/src/reply-dispatcher-runtime-api.ts +8 -0
- package/src/reply-dispatcher.test.ts +2009 -0
- package/src/reply-dispatcher.ts +865 -0
- package/src/runtime.ts +10 -0
- package/src/secret-contract.ts +146 -0
- package/src/secret-input.ts +2 -0
- package/src/security-audit-shared.ts +70 -0
- package/src/security-audit.test.ts +60 -0
- package/src/security-audit.ts +2 -0
- package/src/send-result.ts +81 -0
- package/src/send-target.test.ts +87 -0
- package/src/send-target.ts +36 -0
- package/src/send.reply-fallback.test.ts +418 -0
- package/src/send.test.ts +661 -0
- package/src/send.ts +860 -0
- package/src/sequential-key.test.ts +73 -0
- package/src/sequential-key.ts +29 -0
- package/src/sequential-queue.test.ts +184 -0
- package/src/sequential-queue.ts +90 -0
- package/src/session-conversation.ts +42 -0
- package/src/session-route.ts +49 -0
- package/src/setup-core.ts +52 -0
- package/src/setup-surface.test.ts +485 -0
- package/src/setup-surface.ts +620 -0
- package/src/streaming-card.test.ts +549 -0
- package/src/streaming-card.ts +611 -0
- package/src/subagent-hooks.test.ts +632 -0
- package/src/subagent-hooks.ts +414 -0
- package/src/targets.ts +98 -0
- package/src/test-support/lifecycle-test-support.ts +459 -0
- package/src/thread-bindings.test.ts +181 -0
- package/src/thread-bindings.ts +332 -0
- package/src/tool-account-routing.test.ts +419 -0
- package/src/tool-account.test.ts +45 -0
- package/src/tool-account.ts +98 -0
- package/src/tool-factory-test-harness.ts +83 -0
- package/src/tool-result.test.ts +33 -0
- package/src/tool-result.ts +17 -0
- package/src/tools-config.test.ts +52 -0
- package/src/tools-config.ts +29 -0
- package/src/types.ts +111 -0
- package/src/typing.test.ts +145 -0
- package/src/typing.ts +215 -0
- package/src/wiki-schema.ts +70 -0
- package/src/wiki.ts +271 -0
- package/subagent-hooks-api.ts +22 -0
- package/tsconfig.json +16 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# ACTAgent Feishu/Lark
|
|
2
|
+
|
|
3
|
+
Official ACTAgent channel plugin for Feishu and Lark workplace chats. Community maintained by @m1heng.
|
|
4
|
+
|
|
5
|
+
Install from ACTAgent:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
actagent plugin add @actagent/feishu
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Configure the Feishu/Lark app credentials in ACTAgent, then connect the plugin to the chats where agents should receive and send messages.
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "feishu",
|
|
3
|
+
"name": "Feishu/Lark",
|
|
4
|
+
"description": "ACTAgent Feishu/Lark channel plugin for chats and workplace tools (community maintained by @m1heng).",
|
|
5
|
+
"activation": {
|
|
6
|
+
"onStartup": false
|
|
7
|
+
},
|
|
8
|
+
"channels": ["feishu"],
|
|
9
|
+
"contracts": {
|
|
10
|
+
"tools": [
|
|
11
|
+
"feishu_app_scopes",
|
|
12
|
+
"feishu_bitable_create_app",
|
|
13
|
+
"feishu_bitable_create_field",
|
|
14
|
+
"feishu_bitable_create_record",
|
|
15
|
+
"feishu_bitable_get_meta",
|
|
16
|
+
"feishu_bitable_get_record",
|
|
17
|
+
"feishu_bitable_list_fields",
|
|
18
|
+
"feishu_bitable_list_records",
|
|
19
|
+
"feishu_bitable_update_record",
|
|
20
|
+
"feishu_chat",
|
|
21
|
+
"feishu_doc",
|
|
22
|
+
"feishu_drive",
|
|
23
|
+
"feishu_perm",
|
|
24
|
+
"feishu_wiki"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"toolMetadata": {
|
|
28
|
+
"feishu_app_scopes": {
|
|
29
|
+
"configSignals": [
|
|
30
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
31
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"feishu_bitable_create_app": {
|
|
35
|
+
"configSignals": [
|
|
36
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
37
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"feishu_bitable_create_field": {
|
|
41
|
+
"configSignals": [
|
|
42
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
43
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"feishu_bitable_create_record": {
|
|
47
|
+
"configSignals": [
|
|
48
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
49
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"feishu_bitable_get_meta": {
|
|
53
|
+
"configSignals": [
|
|
54
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
55
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"feishu_bitable_get_record": {
|
|
59
|
+
"configSignals": [
|
|
60
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
61
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"feishu_bitable_list_fields": {
|
|
65
|
+
"configSignals": [
|
|
66
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
67
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"feishu_bitable_list_records": {
|
|
71
|
+
"configSignals": [
|
|
72
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
73
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"feishu_bitable_update_record": {
|
|
77
|
+
"configSignals": [
|
|
78
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
79
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"feishu_chat": {
|
|
83
|
+
"configSignals": [
|
|
84
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
85
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"feishu_doc": {
|
|
89
|
+
"configSignals": [
|
|
90
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
91
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"feishu_drive": {
|
|
95
|
+
"configSignals": [
|
|
96
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
97
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"feishu_perm": {
|
|
101
|
+
"configSignals": [
|
|
102
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
103
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"feishu_wiki": {
|
|
107
|
+
"configSignals": [
|
|
108
|
+
{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] },
|
|
109
|
+
{ "rootPath": "channels.feishu", "overlayMapPath": "accounts", "required": ["appId", "appSecret"] }
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"channelEnvVars": {
|
|
114
|
+
"feishu": [
|
|
115
|
+
"FEISHU_APP_ID",
|
|
116
|
+
"FEISHU_APP_SECRET",
|
|
117
|
+
"FEISHU_VERIFICATION_TOKEN",
|
|
118
|
+
"FEISHU_ENCRYPT_KEY"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"skills": ["./skills"],
|
|
122
|
+
"configSchema": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": true,
|
|
125
|
+
"$defs": {
|
|
126
|
+
"secretRef": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"properties": {
|
|
130
|
+
"source": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"enum": ["env", "file", "exec"]
|
|
133
|
+
},
|
|
134
|
+
"provider": { "type": "string" },
|
|
135
|
+
"id": { "type": "string" }
|
|
136
|
+
},
|
|
137
|
+
"required": ["source", "provider", "id"]
|
|
138
|
+
},
|
|
139
|
+
"secretInput": {
|
|
140
|
+
"anyOf": [{ "type": "string", "minLength": 1 }, { "$ref": "#/$defs/secretRef" }]
|
|
141
|
+
},
|
|
142
|
+
"account": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"additionalProperties": true,
|
|
145
|
+
"properties": {
|
|
146
|
+
"enabled": { "type": "boolean" },
|
|
147
|
+
"name": { "type": "string" },
|
|
148
|
+
"appId": { "type": "string" },
|
|
149
|
+
"appSecret": { "$ref": "#/$defs/secretInput" },
|
|
150
|
+
"encryptKey": { "$ref": "#/$defs/secretInput" },
|
|
151
|
+
"verificationToken": { "$ref": "#/$defs/secretInput" },
|
|
152
|
+
"domain": {
|
|
153
|
+
"anyOf": [
|
|
154
|
+
{
|
|
155
|
+
"type": "string",
|
|
156
|
+
"enum": ["feishu", "lark"]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"type": "string",
|
|
160
|
+
"format": "uri"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"connectionMode": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"enum": ["websocket", "webhook"]
|
|
167
|
+
},
|
|
168
|
+
"renderMode": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"enum": ["auto", "raw", "card"]
|
|
171
|
+
},
|
|
172
|
+
"streaming": { "type": "boolean" },
|
|
173
|
+
"blockStreaming": { "type": "boolean" },
|
|
174
|
+
"replyInThread": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"enum": ["disabled", "enabled"]
|
|
177
|
+
},
|
|
178
|
+
"typingIndicator": { "type": "boolean" }
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"properties": {
|
|
183
|
+
"enabled": { "type": "boolean" },
|
|
184
|
+
"defaultAccount": { "type": "string" },
|
|
185
|
+
"appId": { "type": "string" },
|
|
186
|
+
"appSecret": { "$ref": "#/$defs/secretInput" },
|
|
187
|
+
"encryptKey": { "$ref": "#/$defs/secretInput" },
|
|
188
|
+
"verificationToken": { "$ref": "#/$defs/secretInput" },
|
|
189
|
+
"domain": {
|
|
190
|
+
"anyOf": [
|
|
191
|
+
{
|
|
192
|
+
"type": "string",
|
|
193
|
+
"enum": ["feishu", "lark"]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"type": "string",
|
|
197
|
+
"format": "uri"
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
"connectionMode": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"enum": ["websocket", "webhook"]
|
|
204
|
+
},
|
|
205
|
+
"renderMode": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"enum": ["auto", "raw", "card"]
|
|
208
|
+
},
|
|
209
|
+
"streaming": { "type": "boolean" },
|
|
210
|
+
"blockStreaming": { "type": "boolean" },
|
|
211
|
+
"replyInThread": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"enum": ["disabled", "enabled"]
|
|
214
|
+
},
|
|
215
|
+
"typingIndicator": { "type": "boolean" },
|
|
216
|
+
"accounts": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"additionalProperties": {
|
|
219
|
+
"$ref": "#/$defs/account"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
package/api.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Feishu API module exposes the plugin public contract.
|
|
2
|
+
export { feishuPlugin } from "./src/channel.js";
|
|
3
|
+
export { registerFeishuDocTools } from "./src/docx.js";
|
|
4
|
+
export { registerFeishuChatTools } from "./src/chat.js";
|
|
5
|
+
export { registerFeishuWikiTools } from "./src/wiki.js";
|
|
6
|
+
export { registerFeishuDriveTools } from "./src/drive.js";
|
|
7
|
+
export { registerFeishuPermTools } from "./src/perm.js";
|
|
8
|
+
export { registerFeishuBitableTools } from "./src/bitable.js";
|
|
9
|
+
export {
|
|
10
|
+
handleFeishuSubagentDeliveryTarget,
|
|
11
|
+
handleFeishuSubagentEnded,
|
|
12
|
+
handleFeishuSubagentSpawning,
|
|
13
|
+
} from "./src/subagent-hooks.js";
|
|
14
|
+
export {
|
|
15
|
+
buildFeishuConversationId,
|
|
16
|
+
buildFeishuModelOverrideParentCandidates,
|
|
17
|
+
type FeishuGroupSessionScope,
|
|
18
|
+
parseFeishuConversationId,
|
|
19
|
+
parseFeishuDirectConversationId,
|
|
20
|
+
parseFeishuTargetId,
|
|
21
|
+
} from "./src/conversation-id.js";
|
|
22
|
+
export { feishuSetupAdapter, setFeishuNamedAccountEnabled } from "./src/setup-core.js";
|
|
23
|
+
export { feishuSetupWizard, runFeishuLogin } from "./src/setup-surface.js";
|
|
24
|
+
export {
|
|
25
|
+
testing as __testing,
|
|
26
|
+
testing,
|
|
27
|
+
createFeishuThreadBindingManager,
|
|
28
|
+
getFeishuThreadBindingManager,
|
|
29
|
+
} from "./src/thread-bindings.js";
|
|
30
|
+
export { testing as feishuThreadBindingTesting } from "./src/thread-bindings.js";
|
|
31
|
+
export { createClackPrompter } from "actagent/plugin-sdk/setup-runtime";
|
|
32
|
+
|
|
33
|
+
export const feishuSessionBindingAdapterChannels = ["feishu"] as const;
|
package/channel-entry.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Feishu plugin module implements channel entry behavior.
|
|
2
|
+
import { defineBundledChannelEntry } from "actagent/plugin-sdk/channel-entry-contract";
|
|
3
|
+
|
|
4
|
+
export default defineBundledChannelEntry({
|
|
5
|
+
id: "feishu",
|
|
6
|
+
name: "Feishu",
|
|
7
|
+
description: "Feishu/Lark channel plugin",
|
|
8
|
+
importMetaUrl: import.meta.url,
|
|
9
|
+
plugin: {
|
|
10
|
+
specifier: "./api.js",
|
|
11
|
+
exportName: "feishuPlugin",
|
|
12
|
+
},
|
|
13
|
+
secrets: {
|
|
14
|
+
specifier: "./secret-contract-api.js",
|
|
15
|
+
exportName: "channelSecrets",
|
|
16
|
+
},
|
|
17
|
+
runtime: {
|
|
18
|
+
specifier: "./runtime-api.js",
|
|
19
|
+
exportName: "setFeishuRuntime",
|
|
20
|
+
},
|
|
21
|
+
});
|
package/contract-api.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Feishu API module exposes the plugin public contract.
|
|
2
|
+
export { createFeishuThreadBindingManager } from "./src/thread-bindings.js";
|
|
3
|
+
export { testing as feishuThreadBindingTesting } from "./src/thread-bindings.js";
|
|
4
|
+
export {
|
|
5
|
+
collectRuntimeConfigAssignments,
|
|
6
|
+
secretTargetRegistryEntries,
|
|
7
|
+
} from "./src/secret-contract.js";
|
|
8
|
+
export { collectFeishuSecurityAuditFindings } from "./src/security-audit.js";
|
|
9
|
+
export { messageActionTargetAliases } from "./src/message-action-contract.js";
|
|
10
|
+
export {
|
|
11
|
+
buildFeishuConversationId,
|
|
12
|
+
parseFeishuConversationId,
|
|
13
|
+
parseFeishuDirectConversationId,
|
|
14
|
+
parseFeishuTargetId,
|
|
15
|
+
} from "./src/conversation-id.js";
|
|
16
|
+
|
|
17
|
+
export const feishuSessionBindingAdapterChannels = ["feishu"] as const;
|
package/index.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Feishu plugin entrypoint registers its ACTAgent integration.
|
|
2
|
+
import {
|
|
3
|
+
defineBundledChannelEntry,
|
|
4
|
+
loadBundledEntryExportSync,
|
|
5
|
+
} from "actagent/plugin-sdk/channel-entry-contract";
|
|
6
|
+
import type { ACTAgentPluginApi } from "actagent/plugin-sdk/channel-entry-contract";
|
|
7
|
+
import { registerFeishuSubagentHooks } from "./subagent-hooks-api.js";
|
|
8
|
+
|
|
9
|
+
function registerFeishuDocTools(api: ACTAgentPluginApi) {
|
|
10
|
+
const register = loadBundledEntryExportSync<(api: ACTAgentPluginApi) => void>(import.meta.url, {
|
|
11
|
+
specifier: "./api.js",
|
|
12
|
+
exportName: "registerFeishuDocTools",
|
|
13
|
+
});
|
|
14
|
+
register(api);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function registerFeishuChatTools(api: ACTAgentPluginApi) {
|
|
18
|
+
const register = loadBundledEntryExportSync<(api: ACTAgentPluginApi) => void>(import.meta.url, {
|
|
19
|
+
specifier: "./api.js",
|
|
20
|
+
exportName: "registerFeishuChatTools",
|
|
21
|
+
});
|
|
22
|
+
register(api);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function registerFeishuWikiTools(api: ACTAgentPluginApi) {
|
|
26
|
+
const register = loadBundledEntryExportSync<(api: ACTAgentPluginApi) => void>(import.meta.url, {
|
|
27
|
+
specifier: "./api.js",
|
|
28
|
+
exportName: "registerFeishuWikiTools",
|
|
29
|
+
});
|
|
30
|
+
register(api);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function registerFeishuDriveTools(api: ACTAgentPluginApi) {
|
|
34
|
+
const register = loadBundledEntryExportSync<(api: ACTAgentPluginApi) => void>(import.meta.url, {
|
|
35
|
+
specifier: "./api.js",
|
|
36
|
+
exportName: "registerFeishuDriveTools",
|
|
37
|
+
});
|
|
38
|
+
register(api);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function registerFeishuPermTools(api: ACTAgentPluginApi) {
|
|
42
|
+
const register = loadBundledEntryExportSync<(api: ACTAgentPluginApi) => void>(import.meta.url, {
|
|
43
|
+
specifier: "./api.js",
|
|
44
|
+
exportName: "registerFeishuPermTools",
|
|
45
|
+
});
|
|
46
|
+
register(api);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function registerFeishuBitableTools(api: ACTAgentPluginApi) {
|
|
50
|
+
const register = loadBundledEntryExportSync<(api: ACTAgentPluginApi) => void>(import.meta.url, {
|
|
51
|
+
specifier: "./api.js",
|
|
52
|
+
exportName: "registerFeishuBitableTools",
|
|
53
|
+
});
|
|
54
|
+
register(api);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export default defineBundledChannelEntry({
|
|
58
|
+
id: "feishu",
|
|
59
|
+
name: "Feishu",
|
|
60
|
+
description: "Feishu/Lark channel plugin",
|
|
61
|
+
importMetaUrl: import.meta.url,
|
|
62
|
+
plugin: {
|
|
63
|
+
specifier: "./channel-plugin-api.js",
|
|
64
|
+
exportName: "feishuPlugin",
|
|
65
|
+
},
|
|
66
|
+
secrets: {
|
|
67
|
+
specifier: "./secret-contract-api.js",
|
|
68
|
+
exportName: "channelSecrets",
|
|
69
|
+
},
|
|
70
|
+
runtime: {
|
|
71
|
+
specifier: "./runtime-api.js",
|
|
72
|
+
exportName: "setFeishuRuntime",
|
|
73
|
+
},
|
|
74
|
+
registerFull(api) {
|
|
75
|
+
registerFeishuSubagentHooks(api);
|
|
76
|
+
registerFeishuDocTools(api);
|
|
77
|
+
registerFeishuChatTools(api);
|
|
78
|
+
registerFeishuWikiTools(api);
|
|
79
|
+
registerFeishuDriveTools(api);
|
|
80
|
+
registerFeishuPermTools(api);
|
|
81
|
+
registerFeishuBitableTools(api);
|
|
82
|
+
},
|
|
83
|
+
});
|