@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/src/wiki.ts
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
// Feishu plugin module implements wiki behavior.
|
|
2
|
+
import type * as Lark from "@larksuiteoapi/node-sdk";
|
|
3
|
+
import type { ACTAgentPluginApi } from "../runtime-api.js";
|
|
4
|
+
import { listEnabledFeishuAccounts } from "./accounts.js";
|
|
5
|
+
import { createFeishuToolClient, resolveAnyEnabledFeishuToolsConfig } from "./tool-account.js";
|
|
6
|
+
import {
|
|
7
|
+
jsonToolResult,
|
|
8
|
+
toolExecutionErrorResult,
|
|
9
|
+
unknownToolActionResult,
|
|
10
|
+
} from "./tool-result.js";
|
|
11
|
+
import { FeishuWikiSchema, type FeishuWikiParams } from "./wiki-schema.js";
|
|
12
|
+
|
|
13
|
+
type ObjType = "doc" | "sheet" | "mindnote" | "bitable" | "file" | "docx" | "slides";
|
|
14
|
+
|
|
15
|
+
// ============ Actions ============
|
|
16
|
+
|
|
17
|
+
const WIKI_ACCESS_HINT =
|
|
18
|
+
"To grant wiki access: Open wiki space → Settings → Members → Add the bot. " +
|
|
19
|
+
"See: https://open.feishu.cn/document/server-docs/docs/wiki-v2/wiki-qa#a40ad4ca";
|
|
20
|
+
|
|
21
|
+
function requireWikiSpaceId(value: unknown, fieldName: string): string {
|
|
22
|
+
if (typeof value !== "string") {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`${fieldName} must be a string. Feishu wiki space IDs are opaque identifiers; pass them quoted to avoid JavaScript number precision loss.`,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const trimmed = value.trim();
|
|
29
|
+
if (!trimmed) {
|
|
30
|
+
throw new Error(`${fieldName} must not be empty.`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return trimmed;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function optionalWikiSpaceId(value: unknown, fieldName: string): string | undefined {
|
|
37
|
+
if (value === undefined || value === null || value === "") {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
return requireWikiSpaceId(value, fieldName);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function listSpaces(client: Lark.Client) {
|
|
44
|
+
const res = await client.wiki.space.list({});
|
|
45
|
+
if (res.code !== 0) {
|
|
46
|
+
throw new Error(res.msg);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const spaces =
|
|
50
|
+
res.data?.items?.map((s) => ({
|
|
51
|
+
space_id: s.space_id,
|
|
52
|
+
name: s.name,
|
|
53
|
+
description: s.description,
|
|
54
|
+
visibility: s.visibility,
|
|
55
|
+
})) ?? [];
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
spaces,
|
|
59
|
+
...(spaces.length === 0 && { hint: WIKI_ACCESS_HINT }),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function listNodes(client: Lark.Client, spaceId: string, parentNodeToken?: string) {
|
|
64
|
+
const res = await client.wiki.spaceNode.list({
|
|
65
|
+
path: { space_id: spaceId },
|
|
66
|
+
params: { parent_node_token: parentNodeToken },
|
|
67
|
+
});
|
|
68
|
+
if (res.code !== 0) {
|
|
69
|
+
throw new Error(res.msg);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
nodes:
|
|
74
|
+
res.data?.items?.map((n) => ({
|
|
75
|
+
node_token: n.node_token,
|
|
76
|
+
obj_token: n.obj_token,
|
|
77
|
+
obj_type: n.obj_type,
|
|
78
|
+
title: n.title,
|
|
79
|
+
has_child: n.has_child,
|
|
80
|
+
})) ?? [],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async function getNode(client: Lark.Client, token: string) {
|
|
85
|
+
const res = await client.wiki.space.getNode({
|
|
86
|
+
params: { token },
|
|
87
|
+
});
|
|
88
|
+
if (res.code !== 0) {
|
|
89
|
+
throw new Error(res.msg);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const node = res.data?.node;
|
|
93
|
+
return {
|
|
94
|
+
node_token: node?.node_token,
|
|
95
|
+
space_id: node?.space_id,
|
|
96
|
+
obj_token: node?.obj_token,
|
|
97
|
+
obj_type: node?.obj_type,
|
|
98
|
+
title: node?.title,
|
|
99
|
+
parent_node_token: node?.parent_node_token,
|
|
100
|
+
has_child: node?.has_child,
|
|
101
|
+
creator: node?.creator,
|
|
102
|
+
create_time: node?.node_create_time,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function createNode(
|
|
107
|
+
client: Lark.Client,
|
|
108
|
+
spaceId: string,
|
|
109
|
+
title: string,
|
|
110
|
+
objType?: string,
|
|
111
|
+
parentNodeToken?: string,
|
|
112
|
+
) {
|
|
113
|
+
const res = await client.wiki.spaceNode.create({
|
|
114
|
+
path: { space_id: spaceId },
|
|
115
|
+
data: {
|
|
116
|
+
obj_type: (objType as ObjType) || "docx",
|
|
117
|
+
node_type: "origin" as const,
|
|
118
|
+
title,
|
|
119
|
+
parent_node_token: parentNodeToken,
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
if (res.code !== 0) {
|
|
123
|
+
throw new Error(res.msg);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const node = res.data?.node;
|
|
127
|
+
return {
|
|
128
|
+
node_token: node?.node_token,
|
|
129
|
+
obj_token: node?.obj_token,
|
|
130
|
+
obj_type: node?.obj_type,
|
|
131
|
+
title: node?.title,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
async function moveNode(
|
|
136
|
+
client: Lark.Client,
|
|
137
|
+
spaceId: string,
|
|
138
|
+
nodeToken: string,
|
|
139
|
+
targetSpaceId?: string,
|
|
140
|
+
targetParentToken?: string,
|
|
141
|
+
) {
|
|
142
|
+
const res = await client.wiki.spaceNode.move({
|
|
143
|
+
path: { space_id: spaceId, node_token: nodeToken },
|
|
144
|
+
data: {
|
|
145
|
+
target_space_id: targetSpaceId || spaceId,
|
|
146
|
+
target_parent_token: targetParentToken,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
if (res.code !== 0) {
|
|
150
|
+
throw new Error(res.msg);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return {
|
|
154
|
+
success: true,
|
|
155
|
+
node_token: res.data?.node?.node_token,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
async function renameNode(client: Lark.Client, spaceId: string, nodeToken: string, title: string) {
|
|
160
|
+
const res = await client.wiki.spaceNode.updateTitle({
|
|
161
|
+
path: { space_id: spaceId, node_token: nodeToken },
|
|
162
|
+
data: { title },
|
|
163
|
+
});
|
|
164
|
+
if (res.code !== 0) {
|
|
165
|
+
throw new Error(res.msg);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
success: true,
|
|
170
|
+
node_token: nodeToken,
|
|
171
|
+
title,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// ============ Tool Registration ============
|
|
176
|
+
|
|
177
|
+
export function registerFeishuWikiTools(api: ACTAgentPluginApi) {
|
|
178
|
+
if (!api.config) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const accounts = listEnabledFeishuAccounts(api.config);
|
|
183
|
+
if (accounts.length === 0) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const toolsCfg = resolveAnyEnabledFeishuToolsConfig(accounts);
|
|
188
|
+
if (!toolsCfg.wiki) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
type FeishuWikiExecuteParams = FeishuWikiParams & { accountId?: string };
|
|
193
|
+
|
|
194
|
+
api.registerTool(
|
|
195
|
+
(ctx) => {
|
|
196
|
+
const defaultAccountId = ctx.agentAccountId;
|
|
197
|
+
return {
|
|
198
|
+
name: "feishu_wiki",
|
|
199
|
+
label: "Feishu Wiki",
|
|
200
|
+
description:
|
|
201
|
+
"Feishu knowledge base operations. Actions: spaces, nodes, get, create, move, rename",
|
|
202
|
+
parameters: FeishuWikiSchema,
|
|
203
|
+
async execute(_toolCallId, params) {
|
|
204
|
+
const p = params as FeishuWikiExecuteParams;
|
|
205
|
+
try {
|
|
206
|
+
const createClient = () =>
|
|
207
|
+
createFeishuToolClient({
|
|
208
|
+
api,
|
|
209
|
+
executeParams: p,
|
|
210
|
+
defaultAccountId,
|
|
211
|
+
});
|
|
212
|
+
switch (p.action) {
|
|
213
|
+
case "spaces":
|
|
214
|
+
return jsonToolResult(await listSpaces(createClient()));
|
|
215
|
+
case "nodes": {
|
|
216
|
+
const spaceId = requireWikiSpaceId(p.space_id, "space_id");
|
|
217
|
+
return jsonToolResult(
|
|
218
|
+
await listNodes(createClient(), spaceId, p.parent_node_token),
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
case "get":
|
|
222
|
+
return jsonToolResult(await getNode(createClient(), p.token));
|
|
223
|
+
case "search":
|
|
224
|
+
optionalWikiSpaceId(p.space_id, "space_id");
|
|
225
|
+
createClient();
|
|
226
|
+
return jsonToolResult({
|
|
227
|
+
error:
|
|
228
|
+
"Search is not available. Use feishu_wiki with action: 'nodes' to browse or action: 'get' to lookup by token.",
|
|
229
|
+
});
|
|
230
|
+
case "create": {
|
|
231
|
+
const spaceId = requireWikiSpaceId(p.space_id, "space_id");
|
|
232
|
+
return jsonToolResult(
|
|
233
|
+
await createNode(
|
|
234
|
+
createClient(),
|
|
235
|
+
spaceId,
|
|
236
|
+
p.title,
|
|
237
|
+
p.obj_type,
|
|
238
|
+
p.parent_node_token,
|
|
239
|
+
),
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
case "move": {
|
|
243
|
+
const spaceId = requireWikiSpaceId(p.space_id, "space_id");
|
|
244
|
+
return jsonToolResult(
|
|
245
|
+
await moveNode(
|
|
246
|
+
createClient(),
|
|
247
|
+
spaceId,
|
|
248
|
+
p.node_token,
|
|
249
|
+
optionalWikiSpaceId(p.target_space_id, "target_space_id"),
|
|
250
|
+
p.target_parent_token,
|
|
251
|
+
),
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
case "rename": {
|
|
255
|
+
const spaceId = requireWikiSpaceId(p.space_id, "space_id");
|
|
256
|
+
return jsonToolResult(
|
|
257
|
+
await renameNode(createClient(), spaceId, p.node_token, p.title),
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
default:
|
|
261
|
+
return unknownToolActionResult((p as { action?: unknown }).action);
|
|
262
|
+
}
|
|
263
|
+
} catch (err) {
|
|
264
|
+
return toolExecutionErrorResult(err);
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
},
|
|
269
|
+
{ name: "feishu_wiki" },
|
|
270
|
+
);
|
|
271
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Feishu API module exposes the plugin public contract.
|
|
2
|
+
import type { ACTAgentPluginApi } from "actagent/plugin-sdk/channel-entry-contract";
|
|
3
|
+
|
|
4
|
+
type FeishuSubagentHooksModule = typeof import("./src/subagent-hooks.js");
|
|
5
|
+
|
|
6
|
+
let feishuSubagentHooksPromise: Promise<FeishuSubagentHooksModule> | null = null;
|
|
7
|
+
|
|
8
|
+
function loadFeishuSubagentHooksModule() {
|
|
9
|
+
feishuSubagentHooksPromise ??= import("./src/subagent-hooks.js");
|
|
10
|
+
return feishuSubagentHooksPromise;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function registerFeishuSubagentHooks(api: ACTAgentPluginApi): void {
|
|
14
|
+
api.on("subagent_delivery_target", async (event) => {
|
|
15
|
+
const { handleFeishuSubagentDeliveryTarget } = await loadFeishuSubagentHooksModule();
|
|
16
|
+
return handleFeishuSubagentDeliveryTarget(event);
|
|
17
|
+
});
|
|
18
|
+
api.on("subagent_ended", async (event) => {
|
|
19
|
+
const { handleFeishuSubagentEnded } = await loadFeishuSubagentHooksModule();
|
|
20
|
+
handleFeishuSubagentEnded(event);
|
|
21
|
+
});
|
|
22
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.package-boundary.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": "."
|
|
5
|
+
},
|
|
6
|
+
"include": ["./*.ts", "./src/**/*.ts"],
|
|
7
|
+
"exclude": [
|
|
8
|
+
"./**/*.test.ts",
|
|
9
|
+
"./dist/**",
|
|
10
|
+
"./node_modules/**",
|
|
11
|
+
"./src/test-support/**",
|
|
12
|
+
"./src/**/*test-helpers.ts",
|
|
13
|
+
"./src/**/*test-harness.ts",
|
|
14
|
+
"./src/**/*test-support.ts"
|
|
15
|
+
]
|
|
16
|
+
}
|