@gakr-gakr/feishu 0.1.0
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/api.ts +32 -0
- package/autobot.plugin.json +180 -0
- package/channel-entry.ts +20 -0
- package/channel-plugin-api.ts +1 -0
- package/contract-api.ts +16 -0
- package/index.ts +82 -0
- package/package.json +62 -0
- package/runtime-api.ts +55 -0
- package/secret-contract-api.ts +5 -0
- package/security-contract-api.ts +1 -0
- package/session-key-api.ts +1 -0
- package/setup-api.ts +3 -0
- package/setup-entry.ts +13 -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.ts +333 -0
- package/src/agent-config.ts +21 -0
- package/src/app-registration.ts +331 -0
- package/src/approval-auth.ts +25 -0
- package/src/async.ts +104 -0
- package/src/audio-preflight.runtime.ts +9 -0
- package/src/bitable.ts +762 -0
- package/src/bot-content.ts +485 -0
- package/src/bot-runtime-api.ts +12 -0
- package/src/bot-sender-name.ts +125 -0
- package/src/bot.ts +1703 -0
- package/src/card-action.ts +447 -0
- package/src/card-interaction.ts +159 -0
- package/src/card-test-helpers.ts +54 -0
- package/src/card-ux-approval.ts +65 -0
- package/src/card-ux-launcher.ts +121 -0
- package/src/card-ux-shared.ts +33 -0
- package/src/channel-runtime-api.ts +16 -0
- package/src/channel.runtime.ts +47 -0
- package/src/channel.ts +1423 -0
- package/src/chat-schema.ts +25 -0
- package/src/chat.ts +188 -0
- package/src/client-timeout.ts +42 -0
- package/src/client.ts +262 -0
- package/src/comment-dispatcher-runtime-api.ts +6 -0
- package/src/comment-dispatcher.ts +107 -0
- package/src/comment-handler-runtime-api.ts +3 -0
- package/src/comment-handler.ts +303 -0
- package/src/comment-reaction.ts +259 -0
- package/src/comment-shared.ts +406 -0
- package/src/comment-target.ts +44 -0
- package/src/config-schema.ts +335 -0
- package/src/conversation-id.ts +199 -0
- package/src/dedup-runtime-api.ts +1 -0
- package/src/dedup.ts +141 -0
- package/src/dedupe-key.ts +72 -0
- package/src/directory.static.ts +61 -0
- package/src/directory.ts +124 -0
- package/src/doc-schema.ts +182 -0
- package/src/docx-batch-insert.ts +223 -0
- package/src/docx-color-text.ts +154 -0
- package/src/docx-table-ops.ts +316 -0
- package/src/docx-types.ts +38 -0
- package/src/docx.ts +1596 -0
- package/src/drive-schema.ts +92 -0
- package/src/drive.ts +829 -0
- package/src/dynamic-agent.ts +143 -0
- package/src/event-types.ts +45 -0
- package/src/external-keys.ts +19 -0
- package/src/lifecycle.test-support.ts +220 -0
- package/src/media.ts +1105 -0
- package/src/mention-target.types.ts +5 -0
- package/src/mention.ts +114 -0
- package/src/message-action-contract.ts +13 -0
- package/src/monitor-state-runtime-api.ts +7 -0
- package/src/monitor-transport-runtime-api.ts +10 -0
- package/src/monitor.account.ts +492 -0
- package/src/monitor.acp-init-failure.lifecycle.test-support.ts +219 -0
- package/src/monitor.bot-identity.ts +86 -0
- package/src/monitor.bot-menu-handler.ts +165 -0
- package/src/monitor.bot-menu.lifecycle.test-support.ts +224 -0
- package/src/monitor.broadcast.reply-once.lifecycle.test-support.ts +264 -0
- package/src/monitor.card-action.lifecycle.test-support.ts +421 -0
- package/src/monitor.comment-notice-handler.ts +105 -0
- package/src/monitor.comment.ts +1386 -0
- package/src/monitor.message-handler.ts +350 -0
- package/src/monitor.reaction.lifecycle.test-support.ts +68 -0
- package/src/monitor.startup.ts +74 -0
- package/src/monitor.state.ts +170 -0
- package/src/monitor.synthetic-error.ts +18 -0
- package/src/monitor.test-mocks.ts +46 -0
- package/src/monitor.transport.ts +451 -0
- package/src/monitor.ts +100 -0
- package/src/outbound-runtime-api.ts +1 -0
- package/src/outbound.ts +785 -0
- package/src/perm-schema.ts +52 -0
- package/src/perm.ts +170 -0
- package/src/pins.ts +108 -0
- package/src/policy.ts +321 -0
- package/src/post.ts +275 -0
- package/src/probe.ts +166 -0
- package/src/processing-claims.ts +59 -0
- package/src/qr-terminal.ts +1 -0
- package/src/reactions.ts +123 -0
- package/src/reasoning-preview.ts +28 -0
- package/src/reply-dispatcher-runtime-api.ts +7 -0
- package/src/reply-dispatcher.ts +748 -0
- package/src/runtime.ts +9 -0
- package/src/secret-contract.ts +145 -0
- package/src/secret-input.ts +1 -0
- package/src/security-audit-shared.ts +69 -0
- package/src/security-audit.ts +1 -0
- package/src/send-result.ts +80 -0
- package/src/send-target.ts +35 -0
- package/src/send.ts +861 -0
- package/src/sequential-key.ts +28 -0
- package/src/sequential-queue.ts +86 -0
- package/src/session-conversation.ts +42 -0
- package/src/session-route.ts +48 -0
- package/src/setup-core.ts +51 -0
- package/src/setup-surface.ts +618 -0
- package/src/streaming-card.ts +571 -0
- package/src/subagent-hooks.ts +413 -0
- package/src/targets.ts +97 -0
- package/src/thread-bindings.ts +331 -0
- package/src/tool-account.ts +93 -0
- package/src/tool-factory-test-harness.ts +79 -0
- package/src/tool-result.ts +16 -0
- package/src/tools-config.ts +22 -0
- package/src/types.ts +106 -0
- package/src/typing.ts +214 -0
- package/src/wiki-schema.ts +69 -0
- package/src/wiki.ts +270 -0
- package/subagent-hooks-api.ts +31 -0
- package/tsconfig.json +16 -0
package/api.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export { feishuPlugin } from "./src/channel.js";
|
|
2
|
+
export { registerFeishuDocTools } from "./src/docx.js";
|
|
3
|
+
export { registerFeishuChatTools } from "./src/chat.js";
|
|
4
|
+
export { registerFeishuWikiTools } from "./src/wiki.js";
|
|
5
|
+
export { registerFeishuDriveTools } from "./src/drive.js";
|
|
6
|
+
export { registerFeishuPermTools } from "./src/perm.js";
|
|
7
|
+
export { registerFeishuBitableTools } from "./src/bitable.js";
|
|
8
|
+
export {
|
|
9
|
+
handleFeishuSubagentDeliveryTarget,
|
|
10
|
+
handleFeishuSubagentEnded,
|
|
11
|
+
handleFeishuSubagentSpawning,
|
|
12
|
+
} from "./src/subagent-hooks.js";
|
|
13
|
+
export {
|
|
14
|
+
buildFeishuConversationId,
|
|
15
|
+
buildFeishuModelOverrideParentCandidates,
|
|
16
|
+
type FeishuGroupSessionScope,
|
|
17
|
+
parseFeishuConversationId,
|
|
18
|
+
parseFeishuDirectConversationId,
|
|
19
|
+
parseFeishuTargetId,
|
|
20
|
+
} from "./src/conversation-id.js";
|
|
21
|
+
export { feishuSetupAdapter, setFeishuNamedAccountEnabled } from "./src/setup-core.js";
|
|
22
|
+
export { feishuSetupWizard, runFeishuLogin } from "./src/setup-surface.js";
|
|
23
|
+
export {
|
|
24
|
+
testing as __testing,
|
|
25
|
+
testing,
|
|
26
|
+
createFeishuThreadBindingManager,
|
|
27
|
+
getFeishuThreadBindingManager,
|
|
28
|
+
} from "./src/thread-bindings.js";
|
|
29
|
+
export { testing as feishuThreadBindingTesting } from "./src/thread-bindings.js";
|
|
30
|
+
export { createClackPrompter } from "autobot/plugin-sdk/setup-runtime";
|
|
31
|
+
|
|
32
|
+
export const feishuSessionBindingAdapterChannels = ["feishu"] as const;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "feishu",
|
|
3
|
+
"activation": {
|
|
4
|
+
"onStartup": false
|
|
5
|
+
},
|
|
6
|
+
"channels": ["feishu"],
|
|
7
|
+
"contracts": {
|
|
8
|
+
"tools": [
|
|
9
|
+
"feishu_app_scopes",
|
|
10
|
+
"feishu_bitable_create_app",
|
|
11
|
+
"feishu_bitable_create_field",
|
|
12
|
+
"feishu_bitable_create_record",
|
|
13
|
+
"feishu_bitable_get_meta",
|
|
14
|
+
"feishu_bitable_get_record",
|
|
15
|
+
"feishu_bitable_list_fields",
|
|
16
|
+
"feishu_bitable_list_records",
|
|
17
|
+
"feishu_bitable_update_record",
|
|
18
|
+
"feishu_chat",
|
|
19
|
+
"feishu_doc",
|
|
20
|
+
"feishu_drive",
|
|
21
|
+
"feishu_perm",
|
|
22
|
+
"feishu_wiki"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"toolMetadata": {
|
|
26
|
+
"feishu_app_scopes": {
|
|
27
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
28
|
+
},
|
|
29
|
+
"feishu_bitable_create_app": {
|
|
30
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
31
|
+
},
|
|
32
|
+
"feishu_bitable_create_field": {
|
|
33
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
34
|
+
},
|
|
35
|
+
"feishu_bitable_create_record": {
|
|
36
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
37
|
+
},
|
|
38
|
+
"feishu_bitable_get_meta": {
|
|
39
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
40
|
+
},
|
|
41
|
+
"feishu_bitable_get_record": {
|
|
42
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
43
|
+
},
|
|
44
|
+
"feishu_bitable_list_fields": {
|
|
45
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
46
|
+
},
|
|
47
|
+
"feishu_bitable_list_records": {
|
|
48
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
49
|
+
},
|
|
50
|
+
"feishu_bitable_update_record": {
|
|
51
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
52
|
+
},
|
|
53
|
+
"feishu_chat": {
|
|
54
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
55
|
+
},
|
|
56
|
+
"feishu_doc": {
|
|
57
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
58
|
+
},
|
|
59
|
+
"feishu_drive": {
|
|
60
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
61
|
+
},
|
|
62
|
+
"feishu_perm": {
|
|
63
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
64
|
+
},
|
|
65
|
+
"feishu_wiki": {
|
|
66
|
+
"configSignals": [{ "rootPath": "channels.feishu", "required": ["appId", "appSecret"] }]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"channelEnvVars": {
|
|
70
|
+
"feishu": [
|
|
71
|
+
"FEISHU_APP_ID",
|
|
72
|
+
"FEISHU_APP_SECRET",
|
|
73
|
+
"FEISHU_VERIFICATION_TOKEN",
|
|
74
|
+
"FEISHU_ENCRYPT_KEY"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"skills": ["./skills"],
|
|
78
|
+
"configSchema": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": true,
|
|
81
|
+
"$defs": {
|
|
82
|
+
"secretRef": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"properties": {
|
|
86
|
+
"source": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"enum": ["env", "file", "exec"]
|
|
89
|
+
},
|
|
90
|
+
"provider": { "type": "string" },
|
|
91
|
+
"id": { "type": "string" }
|
|
92
|
+
},
|
|
93
|
+
"required": ["source", "provider", "id"]
|
|
94
|
+
},
|
|
95
|
+
"secretInput": {
|
|
96
|
+
"anyOf": [{ "type": "string", "minLength": 1 }, { "$ref": "#/$defs/secretRef" }]
|
|
97
|
+
},
|
|
98
|
+
"account": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": true,
|
|
101
|
+
"properties": {
|
|
102
|
+
"enabled": { "type": "boolean" },
|
|
103
|
+
"name": { "type": "string" },
|
|
104
|
+
"appId": { "type": "string" },
|
|
105
|
+
"appSecret": { "$ref": "#/$defs/secretInput" },
|
|
106
|
+
"encryptKey": { "$ref": "#/$defs/secretInput" },
|
|
107
|
+
"verificationToken": { "$ref": "#/$defs/secretInput" },
|
|
108
|
+
"domain": {
|
|
109
|
+
"anyOf": [
|
|
110
|
+
{
|
|
111
|
+
"type": "string",
|
|
112
|
+
"enum": ["feishu", "lark"]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "string",
|
|
116
|
+
"format": "uri"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"connectionMode": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"enum": ["websocket", "webhook"]
|
|
123
|
+
},
|
|
124
|
+
"renderMode": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"enum": ["auto", "raw", "card"]
|
|
127
|
+
},
|
|
128
|
+
"streaming": { "type": "boolean" },
|
|
129
|
+
"blockStreaming": { "type": "boolean" },
|
|
130
|
+
"replyInThread": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"enum": ["disabled", "enabled"]
|
|
133
|
+
},
|
|
134
|
+
"typingIndicator": { "type": "boolean" }
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"properties": {
|
|
139
|
+
"enabled": { "type": "boolean" },
|
|
140
|
+
"defaultAccount": { "type": "string" },
|
|
141
|
+
"appId": { "type": "string" },
|
|
142
|
+
"appSecret": { "$ref": "#/$defs/secretInput" },
|
|
143
|
+
"encryptKey": { "$ref": "#/$defs/secretInput" },
|
|
144
|
+
"verificationToken": { "$ref": "#/$defs/secretInput" },
|
|
145
|
+
"domain": {
|
|
146
|
+
"anyOf": [
|
|
147
|
+
{
|
|
148
|
+
"type": "string",
|
|
149
|
+
"enum": ["feishu", "lark"]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "string",
|
|
153
|
+
"format": "uri"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"connectionMode": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"enum": ["websocket", "webhook"]
|
|
160
|
+
},
|
|
161
|
+
"renderMode": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"enum": ["auto", "raw", "card"]
|
|
164
|
+
},
|
|
165
|
+
"streaming": { "type": "boolean" },
|
|
166
|
+
"blockStreaming": { "type": "boolean" },
|
|
167
|
+
"replyInThread": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"enum": ["disabled", "enabled"]
|
|
170
|
+
},
|
|
171
|
+
"typingIndicator": { "type": "boolean" },
|
|
172
|
+
"accounts": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"additionalProperties": {
|
|
175
|
+
"$ref": "#/$defs/account"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
package/channel-entry.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineBundledChannelEntry } from "autobot/plugin-sdk/channel-entry-contract";
|
|
2
|
+
|
|
3
|
+
export default defineBundledChannelEntry({
|
|
4
|
+
id: "feishu",
|
|
5
|
+
name: "Feishu",
|
|
6
|
+
description: "Feishu/Lark channel plugin",
|
|
7
|
+
importMetaUrl: import.meta.url,
|
|
8
|
+
plugin: {
|
|
9
|
+
specifier: "./api.js",
|
|
10
|
+
exportName: "feishuPlugin",
|
|
11
|
+
},
|
|
12
|
+
secrets: {
|
|
13
|
+
specifier: "./secret-contract-api.js",
|
|
14
|
+
exportName: "channelSecrets",
|
|
15
|
+
},
|
|
16
|
+
runtime: {
|
|
17
|
+
specifier: "./runtime-api.js",
|
|
18
|
+
exportName: "setFeishuRuntime",
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { feishuPlugin } from "./src/channel.js";
|
package/contract-api.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { createFeishuThreadBindingManager } from "./src/thread-bindings.js";
|
|
2
|
+
export { testing as feishuThreadBindingTesting } from "./src/thread-bindings.js";
|
|
3
|
+
export {
|
|
4
|
+
collectRuntimeConfigAssignments,
|
|
5
|
+
secretTargetRegistryEntries,
|
|
6
|
+
} from "./src/secret-contract.js";
|
|
7
|
+
export { collectFeishuSecurityAuditFindings } from "./src/security-audit.js";
|
|
8
|
+
export { messageActionTargetAliases } from "./src/message-action-contract.js";
|
|
9
|
+
export {
|
|
10
|
+
buildFeishuConversationId,
|
|
11
|
+
parseFeishuConversationId,
|
|
12
|
+
parseFeishuDirectConversationId,
|
|
13
|
+
parseFeishuTargetId,
|
|
14
|
+
} from "./src/conversation-id.js";
|
|
15
|
+
|
|
16
|
+
export const feishuSessionBindingAdapterChannels = ["feishu"] as const;
|
package/index.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineBundledChannelEntry,
|
|
3
|
+
loadBundledEntryExportSync,
|
|
4
|
+
} from "autobot/plugin-sdk/channel-entry-contract";
|
|
5
|
+
import type { AutoBotPluginApi } from "autobot/plugin-sdk/channel-entry-contract";
|
|
6
|
+
import { registerFeishuSubagentHooks } from "./subagent-hooks-api.js";
|
|
7
|
+
|
|
8
|
+
function registerFeishuDocTools(api: AutoBotPluginApi) {
|
|
9
|
+
const register = loadBundledEntryExportSync<(api: AutoBotPluginApi) => void>(import.meta.url, {
|
|
10
|
+
specifier: "./api.js",
|
|
11
|
+
exportName: "registerFeishuDocTools",
|
|
12
|
+
});
|
|
13
|
+
register(api);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function registerFeishuChatTools(api: AutoBotPluginApi) {
|
|
17
|
+
const register = loadBundledEntryExportSync<(api: AutoBotPluginApi) => void>(import.meta.url, {
|
|
18
|
+
specifier: "./api.js",
|
|
19
|
+
exportName: "registerFeishuChatTools",
|
|
20
|
+
});
|
|
21
|
+
register(api);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function registerFeishuWikiTools(api: AutoBotPluginApi) {
|
|
25
|
+
const register = loadBundledEntryExportSync<(api: AutoBotPluginApi) => void>(import.meta.url, {
|
|
26
|
+
specifier: "./api.js",
|
|
27
|
+
exportName: "registerFeishuWikiTools",
|
|
28
|
+
});
|
|
29
|
+
register(api);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function registerFeishuDriveTools(api: AutoBotPluginApi) {
|
|
33
|
+
const register = loadBundledEntryExportSync<(api: AutoBotPluginApi) => void>(import.meta.url, {
|
|
34
|
+
specifier: "./api.js",
|
|
35
|
+
exportName: "registerFeishuDriveTools",
|
|
36
|
+
});
|
|
37
|
+
register(api);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function registerFeishuPermTools(api: AutoBotPluginApi) {
|
|
41
|
+
const register = loadBundledEntryExportSync<(api: AutoBotPluginApi) => void>(import.meta.url, {
|
|
42
|
+
specifier: "./api.js",
|
|
43
|
+
exportName: "registerFeishuPermTools",
|
|
44
|
+
});
|
|
45
|
+
register(api);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function registerFeishuBitableTools(api: AutoBotPluginApi) {
|
|
49
|
+
const register = loadBundledEntryExportSync<(api: AutoBotPluginApi) => void>(import.meta.url, {
|
|
50
|
+
specifier: "./api.js",
|
|
51
|
+
exportName: "registerFeishuBitableTools",
|
|
52
|
+
});
|
|
53
|
+
register(api);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default defineBundledChannelEntry({
|
|
57
|
+
id: "feishu",
|
|
58
|
+
name: "Feishu",
|
|
59
|
+
description: "Feishu/Lark channel plugin",
|
|
60
|
+
importMetaUrl: import.meta.url,
|
|
61
|
+
plugin: {
|
|
62
|
+
specifier: "./channel-plugin-api.js",
|
|
63
|
+
exportName: "feishuPlugin",
|
|
64
|
+
},
|
|
65
|
+
secrets: {
|
|
66
|
+
specifier: "./secret-contract-api.js",
|
|
67
|
+
exportName: "channelSecrets",
|
|
68
|
+
},
|
|
69
|
+
runtime: {
|
|
70
|
+
specifier: "./runtime-api.js",
|
|
71
|
+
exportName: "setFeishuRuntime",
|
|
72
|
+
},
|
|
73
|
+
registerFull(api) {
|
|
74
|
+
registerFeishuSubagentHooks(api);
|
|
75
|
+
registerFeishuDocTools(api);
|
|
76
|
+
registerFeishuChatTools(api);
|
|
77
|
+
registerFeishuWikiTools(api);
|
|
78
|
+
registerFeishuDriveTools(api);
|
|
79
|
+
registerFeishuPermTools(api);
|
|
80
|
+
registerFeishuBitableTools(api);
|
|
81
|
+
},
|
|
82
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gakr-gakr/feishu",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "AutoBot Feishu/Lark channel plugin (community maintained by @m1heng)",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/autobot/autobot"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@larksuiteoapi/node-sdk": "1.64.0",
|
|
12
|
+
"typebox": "1.1.38",
|
|
13
|
+
"zod": "4.4.3"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@gakr-gakr/plugin-sdk": "workspace:*",
|
|
17
|
+
"@gakr-gakr/autobot": "workspace:*",
|
|
18
|
+
"autobot": "workspace:@gakr-gakr/autobot@*"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@gakr-gakr/autobot": ">=0.1.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependenciesMeta": {
|
|
24
|
+
"@gakr-gakr/autobot": {
|
|
25
|
+
"optional": true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"autobot": {
|
|
29
|
+
"extensions": [
|
|
30
|
+
"./index.ts"
|
|
31
|
+
],
|
|
32
|
+
"setupEntry": "./setup-entry.ts",
|
|
33
|
+
"channel": {
|
|
34
|
+
"id": "feishu",
|
|
35
|
+
"label": "Feishu",
|
|
36
|
+
"selectionLabel": "Feishu/Lark (飞书)",
|
|
37
|
+
"docsPath": "/channels/feishu",
|
|
38
|
+
"docsLabel": "feishu",
|
|
39
|
+
"blurb": "飞书/Lark enterprise messaging with doc/wiki/drive tools.",
|
|
40
|
+
"aliases": [
|
|
41
|
+
"lark"
|
|
42
|
+
],
|
|
43
|
+
"order": 35,
|
|
44
|
+
"quickstartAllowFrom": true
|
|
45
|
+
},
|
|
46
|
+
"install": {
|
|
47
|
+
"npmSpec": "@gakr-gakr/feishu",
|
|
48
|
+
"defaultChoice": "npm",
|
|
49
|
+
"minHostVersion": ">=2026.4.25"
|
|
50
|
+
},
|
|
51
|
+
"compat": {
|
|
52
|
+
"pluginApi": ">=2026.5.19"
|
|
53
|
+
},
|
|
54
|
+
"build": {
|
|
55
|
+
"autobotVersion": "2026.5.19"
|
|
56
|
+
},
|
|
57
|
+
"release": {
|
|
58
|
+
"publishToClawHub": true,
|
|
59
|
+
"publishToNpm": true
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
package/runtime-api.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Private runtime barrel for the bundled Feishu extension.
|
|
2
|
+
// Keep this barrel thin and generic-only.
|
|
3
|
+
|
|
4
|
+
export type {
|
|
5
|
+
AllowlistMatch,
|
|
6
|
+
AnyAgentTool,
|
|
7
|
+
BaseProbeResult,
|
|
8
|
+
ChannelGroupContext,
|
|
9
|
+
ChannelMessageActionName,
|
|
10
|
+
ChannelMeta,
|
|
11
|
+
ChannelOutboundAdapter,
|
|
12
|
+
ChannelPlugin,
|
|
13
|
+
HistoryEntry,
|
|
14
|
+
AutoBotConfig,
|
|
15
|
+
AutoBotPluginApi,
|
|
16
|
+
OutboundIdentity,
|
|
17
|
+
PluginRuntime,
|
|
18
|
+
ReplyPayload,
|
|
19
|
+
} from "autobot/plugin-sdk/core";
|
|
20
|
+
export type { AutoBotConfig as ClawdbotConfig } from "autobot/plugin-sdk/core";
|
|
21
|
+
export type { RuntimeEnv } from "autobot/plugin-sdk/runtime";
|
|
22
|
+
export type { GroupToolPolicyConfig } from "autobot/plugin-sdk/config-contracts";
|
|
23
|
+
export {
|
|
24
|
+
DEFAULT_ACCOUNT_ID,
|
|
25
|
+
buildChannelConfigSchema,
|
|
26
|
+
createActionGate,
|
|
27
|
+
createDedupeCache,
|
|
28
|
+
} from "autobot/plugin-sdk/core";
|
|
29
|
+
export {
|
|
30
|
+
PAIRING_APPROVED_MESSAGE,
|
|
31
|
+
buildProbeChannelStatusSummary,
|
|
32
|
+
createDefaultChannelRuntimeState,
|
|
33
|
+
} from "autobot/plugin-sdk/channel-status";
|
|
34
|
+
export { buildAgentMediaPayload } from "autobot/plugin-sdk/agent-media-payload";
|
|
35
|
+
export { createChannelPairingController } from "autobot/plugin-sdk/channel-pairing";
|
|
36
|
+
export { createReplyPrefixContext } from "autobot/plugin-sdk/channel-message";
|
|
37
|
+
export {
|
|
38
|
+
evaluateSupplementalContextVisibility,
|
|
39
|
+
filterSupplementalContextItems,
|
|
40
|
+
resolveChannelContextVisibilityMode,
|
|
41
|
+
} from "autobot/plugin-sdk/context-visibility-runtime";
|
|
42
|
+
export {
|
|
43
|
+
loadSessionStore,
|
|
44
|
+
resolveSessionStoreEntry,
|
|
45
|
+
} from "autobot/plugin-sdk/session-store-runtime";
|
|
46
|
+
export { readJsonFileWithFallback } from "autobot/plugin-sdk/json-store";
|
|
47
|
+
export { createPersistentDedupe } from "autobot/plugin-sdk/persistent-dedupe";
|
|
48
|
+
export { normalizeAgentId } from "autobot/plugin-sdk/routing";
|
|
49
|
+
export { chunkTextForOutbound } from "autobot/plugin-sdk/text-chunking";
|
|
50
|
+
export {
|
|
51
|
+
isRequestBodyLimitError,
|
|
52
|
+
readRequestBodyWithLimit,
|
|
53
|
+
requestBodyErrorToText,
|
|
54
|
+
} from "autobot/plugin-sdk/webhook-ingress";
|
|
55
|
+
export { setFeishuRuntime } from "./src/runtime.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { collectFeishuSecurityAuditFindings } from "./src/security-audit-shared.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { resolveFeishuSessionConversation as resolveSessionConversation } from "./src/session-conversation.js";
|
package/setup-api.ts
ADDED
package/setup-entry.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineBundledChannelSetupEntry } from "autobot/plugin-sdk/channel-entry-contract";
|
|
2
|
+
|
|
3
|
+
export default defineBundledChannelSetupEntry({
|
|
4
|
+
importMetaUrl: import.meta.url,
|
|
5
|
+
plugin: {
|
|
6
|
+
specifier: "./setup-api.js",
|
|
7
|
+
exportName: "feishuPlugin",
|
|
8
|
+
},
|
|
9
|
+
secrets: {
|
|
10
|
+
specifier: "./secret-contract-api.js",
|
|
11
|
+
exportName: "channelSecrets",
|
|
12
|
+
},
|
|
13
|
+
});
|