@larksuite/openclaw-lark 2026.3.9
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/LICENSE +10 -0
- package/README.md +283 -0
- package/index.d.ts +37 -0
- package/index.d.ts.map +1 -0
- package/index.js +119 -0
- package/index.js.map +1 -0
- package/openclaw.plugin.json +10 -0
- package/package.json +47 -0
- package/skills/feishu-bitable/SKILL.md +248 -0
- package/skills/feishu-bitable/references/examples.md +813 -0
- package/skills/feishu-bitable/references/field-properties.md +763 -0
- package/skills/feishu-bitable/references/record-values.md +911 -0
- package/skills/feishu-calendar/SKILL.md +244 -0
- package/skills/feishu-channel-rules/SKILL.md +18 -0
- package/skills/feishu-channel-rules/references/markdown-syntax.md +138 -0
- package/skills/feishu-create-doc/SKILL.md +719 -0
- package/skills/feishu-fetch-doc/SKILL.md +93 -0
- package/skills/feishu-im-read/SKILL.md +163 -0
- package/skills/feishu-task/SKILL.md +293 -0
- package/skills/feishu-troubleshoot/SKILL.md +70 -0
- package/skills/feishu-update-doc/SKILL.md +285 -0
- package/src/card/builder.d.ts +100 -0
- package/src/card/builder.d.ts.map +1 -0
- package/src/card/builder.js +381 -0
- package/src/card/builder.js.map +1 -0
- package/src/card/cardkit.d.ts +91 -0
- package/src/card/cardkit.d.ts.map +1 -0
- package/src/card/cardkit.js +182 -0
- package/src/card/cardkit.js.map +1 -0
- package/src/card/flush-controller.d.ts +46 -0
- package/src/card/flush-controller.d.ts.map +1 -0
- package/src/card/flush-controller.js +135 -0
- package/src/card/flush-controller.js.map +1 -0
- package/src/card/markdown-style.d.ts +17 -0
- package/src/card/markdown-style.d.ts.map +1 -0
- package/src/card/markdown-style.js +98 -0
- package/src/card/markdown-style.js.map +1 -0
- package/src/card/reply-dispatcher-types.d.ts +121 -0
- package/src/card/reply-dispatcher-types.d.ts.map +1 -0
- package/src/card/reply-dispatcher-types.js +58 -0
- package/src/card/reply-dispatcher-types.js.map +1 -0
- package/src/card/reply-dispatcher.d.ts +16 -0
- package/src/card/reply-dispatcher.d.ts.map +1 -0
- package/src/card/reply-dispatcher.js +293 -0
- package/src/card/reply-dispatcher.js.map +1 -0
- package/src/card/reply-mode.d.ts +39 -0
- package/src/card/reply-mode.d.ts.map +1 -0
- package/src/card/reply-mode.js +66 -0
- package/src/card/reply-mode.js.map +1 -0
- package/src/card/streaming-card-controller.d.ts +88 -0
- package/src/card/streaming-card-controller.d.ts.map +1 -0
- package/src/card/streaming-card-controller.js +717 -0
- package/src/card/streaming-card-controller.js.map +1 -0
- package/src/card/unavailable-guard.d.ts +36 -0
- package/src/card/unavailable-guard.d.ts.map +1 -0
- package/src/card/unavailable-guard.js +84 -0
- package/src/card/unavailable-guard.js.map +1 -0
- package/src/channel/abort-detect.d.ts +35 -0
- package/src/channel/abort-detect.d.ts.map +1 -0
- package/src/channel/abort-detect.js +125 -0
- package/src/channel/abort-detect.js.map +1 -0
- package/src/channel/chat-queue.d.ts +42 -0
- package/src/channel/chat-queue.d.ts.map +1 -0
- package/src/channel/chat-queue.js +59 -0
- package/src/channel/chat-queue.js.map +1 -0
- package/src/channel/config-adapter.d.ts +24 -0
- package/src/channel/config-adapter.d.ts.map +1 -0
- package/src/channel/config-adapter.js +102 -0
- package/src/channel/config-adapter.js.map +1 -0
- package/src/channel/directory.d.ts +58 -0
- package/src/channel/directory.d.ts.map +1 -0
- package/src/channel/directory.js +192 -0
- package/src/channel/directory.js.map +1 -0
- package/src/channel/event-handlers.d.ts +16 -0
- package/src/channel/event-handlers.d.ts.map +1 -0
- package/src/channel/event-handlers.js +222 -0
- package/src/channel/event-handlers.js.map +1 -0
- package/src/channel/monitor.d.ts +18 -0
- package/src/channel/monitor.d.ts.map +1 -0
- package/src/channel/monitor.js +128 -0
- package/src/channel/monitor.js.map +1 -0
- package/src/channel/onboarding-config.d.ts +18 -0
- package/src/channel/onboarding-config.d.ts.map +1 -0
- package/src/channel/onboarding-config.js +89 -0
- package/src/channel/onboarding-config.js.map +1 -0
- package/src/channel/onboarding-migrate.d.ts +26 -0
- package/src/channel/onboarding-migrate.d.ts.map +1 -0
- package/src/channel/onboarding-migrate.js +68 -0
- package/src/channel/onboarding-migrate.js.map +1 -0
- package/src/channel/onboarding.d.ts +13 -0
- package/src/channel/onboarding.d.ts.map +1 -0
- package/src/channel/onboarding.js +297 -0
- package/src/channel/onboarding.js.map +1 -0
- package/src/channel/plugin.d.ts +14 -0
- package/src/channel/plugin.d.ts.map +1 -0
- package/src/channel/plugin.js +279 -0
- package/src/channel/plugin.js.map +1 -0
- package/src/channel/probe.d.ts +15 -0
- package/src/channel/probe.d.ts.map +1 -0
- package/src/channel/probe.js +22 -0
- package/src/channel/probe.js.map +1 -0
- package/src/channel/types.d.ts +37 -0
- package/src/channel/types.d.ts.map +1 -0
- package/src/channel/types.js +8 -0
- package/src/channel/types.js.map +1 -0
- package/src/commands/auth.d.ts +16 -0
- package/src/commands/auth.d.ts.map +1 -0
- package/src/commands/auth.js +85 -0
- package/src/commands/auth.js.map +1 -0
- package/src/commands/diagnose.d.ts +70 -0
- package/src/commands/diagnose.d.ts.map +1 -0
- package/src/commands/diagnose.js +808 -0
- package/src/commands/diagnose.js.map +1 -0
- package/src/commands/doctor.d.ts +18 -0
- package/src/commands/doctor.d.ts.map +1 -0
- package/src/commands/doctor.js +439 -0
- package/src/commands/doctor.js.map +1 -0
- package/src/commands/index.d.ts +9 -0
- package/src/commands/index.d.ts.map +1 -0
- package/src/commands/index.js +208 -0
- package/src/commands/index.js.map +1 -0
- package/src/core/accounts.d.ts +38 -0
- package/src/core/accounts.d.ts.map +1 -0
- package/src/core/accounts.js +179 -0
- package/src/core/accounts.js.map +1 -0
- package/src/core/agent-config.d.ts +101 -0
- package/src/core/agent-config.d.ts.map +1 -0
- package/src/core/agent-config.js +140 -0
- package/src/core/agent-config.js.map +1 -0
- package/src/core/api-error.d.ts +49 -0
- package/src/core/api-error.d.ts.map +1 -0
- package/src/core/api-error.js +113 -0
- package/src/core/api-error.js.map +1 -0
- package/src/core/app-owner-fallback.d.ts +22 -0
- package/src/core/app-owner-fallback.d.ts.map +1 -0
- package/src/core/app-owner-fallback.js +39 -0
- package/src/core/app-owner-fallback.js.map +1 -0
- package/src/core/app-scope-checker.d.ts +88 -0
- package/src/core/app-scope-checker.d.ts.map +1 -0
- package/src/core/app-scope-checker.js +191 -0
- package/src/core/app-scope-checker.js.map +1 -0
- package/src/core/auth-errors.d.ts +143 -0
- package/src/core/auth-errors.d.ts.map +1 -0
- package/src/core/auth-errors.js +156 -0
- package/src/core/auth-errors.js.map +1 -0
- package/src/core/chat-info-cache.d.ts +58 -0
- package/src/core/chat-info-cache.d.ts.map +1 -0
- package/src/core/chat-info-cache.js +153 -0
- package/src/core/chat-info-cache.js.map +1 -0
- package/src/core/config-schema.d.ts +449 -0
- package/src/core/config-schema.d.ts.map +1 -0
- package/src/core/config-schema.js +201 -0
- package/src/core/config-schema.js.map +1 -0
- package/src/core/device-flow.d.ts +78 -0
- package/src/core/device-flow.d.ts.map +1 -0
- package/src/core/device-flow.js +213 -0
- package/src/core/device-flow.js.map +1 -0
- package/src/core/feishu-fetch.d.ts +19 -0
- package/src/core/feishu-fetch.d.ts.map +1 -0
- package/src/core/feishu-fetch.js +26 -0
- package/src/core/feishu-fetch.js.map +1 -0
- package/src/core/footer-config.d.ts +25 -0
- package/src/core/footer-config.d.ts.map +1 -0
- package/src/core/footer-config.js +40 -0
- package/src/core/footer-config.js.map +1 -0
- package/src/core/lark-client.d.ts +109 -0
- package/src/core/lark-client.d.ts.map +1 -0
- package/src/core/lark-client.js +354 -0
- package/src/core/lark-client.js.map +1 -0
- package/src/core/lark-logger.d.ts +24 -0
- package/src/core/lark-logger.d.ts.map +1 -0
- package/src/core/lark-logger.js +155 -0
- package/src/core/lark-logger.js.map +1 -0
- package/src/core/lark-ticket.d.ts +30 -0
- package/src/core/lark-ticket.d.ts.map +1 -0
- package/src/core/lark-ticket.js +36 -0
- package/src/core/lark-ticket.js.map +1 -0
- package/src/core/message-unavailable.d.ts +54 -0
- package/src/core/message-unavailable.d.ts.map +1 -0
- package/src/core/message-unavailable.js +131 -0
- package/src/core/message-unavailable.js.map +1 -0
- package/src/core/owner-policy.d.ts +32 -0
- package/src/core/owner-policy.d.ts.map +1 -0
- package/src/core/owner-policy.js +53 -0
- package/src/core/owner-policy.js.map +1 -0
- package/src/core/permission-url.d.ts +23 -0
- package/src/core/permission-url.d.ts.map +1 -0
- package/src/core/permission-url.js +73 -0
- package/src/core/permission-url.js.map +1 -0
- package/src/core/raw-request.d.ts +28 -0
- package/src/core/raw-request.d.ts.map +1 -0
- package/src/core/raw-request.js +63 -0
- package/src/core/raw-request.js.map +1 -0
- package/src/core/scope-manager.d.ts +169 -0
- package/src/core/scope-manager.d.ts.map +1 -0
- package/src/core/scope-manager.js +214 -0
- package/src/core/scope-manager.js.map +1 -0
- package/src/core/security-check.d.ts +73 -0
- package/src/core/security-check.d.ts.map +1 -0
- package/src/core/security-check.js +175 -0
- package/src/core/security-check.js.map +1 -0
- package/src/core/shutdown-hooks.d.ts +23 -0
- package/src/core/shutdown-hooks.d.ts.map +1 -0
- package/src/core/shutdown-hooks.js +57 -0
- package/src/core/shutdown-hooks.js.map +1 -0
- package/src/core/targets.d.ts +50 -0
- package/src/core/targets.d.ts.map +1 -0
- package/src/core/targets.js +128 -0
- package/src/core/targets.js.map +1 -0
- package/src/core/token-store.d.ts +55 -0
- package/src/core/token-store.d.ts.map +1 -0
- package/src/core/token-store.js +315 -0
- package/src/core/token-store.js.map +1 -0
- package/src/core/tool-client.d.ts +177 -0
- package/src/core/tool-client.d.ts.map +1 -0
- package/src/core/tool-client.js +381 -0
- package/src/core/tool-client.js.map +1 -0
- package/src/core/tool-scopes.d.ts +154 -0
- package/src/core/tool-scopes.d.ts.map +1 -0
- package/src/core/tool-scopes.js +326 -0
- package/src/core/tool-scopes.js.map +1 -0
- package/src/core/tools-config.d.ts +35 -0
- package/src/core/tools-config.d.ts.map +1 -0
- package/src/core/tools-config.js +88 -0
- package/src/core/tools-config.js.map +1 -0
- package/src/core/types.d.ts +88 -0
- package/src/core/types.d.ts.map +1 -0
- package/src/core/types.js +12 -0
- package/src/core/types.js.map +1 -0
- package/src/core/uat-client.d.ts +47 -0
- package/src/core/uat-client.d.ts.map +1 -0
- package/src/core/uat-client.js +173 -0
- package/src/core/uat-client.js.map +1 -0
- package/src/core/version.d.ts +26 -0
- package/src/core/version.d.ts.map +1 -0
- package/src/core/version.js +50 -0
- package/src/core/version.js.map +1 -0
- package/src/messaging/converters/audio.d.ts +9 -0
- package/src/messaging/converters/audio.d.ts.map +1 -0
- package/src/messaging/converters/audio.js +22 -0
- package/src/messaging/converters/audio.js.map +1 -0
- package/src/messaging/converters/calendar.d.ts +14 -0
- package/src/messaging/converters/calendar.d.ts.map +1 -0
- package/src/messaging/converters/calendar.js +51 -0
- package/src/messaging/converters/calendar.js.map +1 -0
- package/src/messaging/converters/content-converter.d.ts +42 -0
- package/src/messaging/converters/content-converter.d.ts.map +1 -0
- package/src/messaging/converters/content-converter.js +107 -0
- package/src/messaging/converters/content-converter.js.map +1 -0
- package/src/messaging/converters/file.d.ts +9 -0
- package/src/messaging/converters/file.d.ts.map +1 -0
- package/src/messaging/converters/file.js +21 -0
- package/src/messaging/converters/file.js.map +1 -0
- package/src/messaging/converters/folder.d.ts +9 -0
- package/src/messaging/converters/folder.d.ts.map +1 -0
- package/src/messaging/converters/folder.js +21 -0
- package/src/messaging/converters/folder.js.map +1 -0
- package/src/messaging/converters/hongbao.d.ts +9 -0
- package/src/messaging/converters/hongbao.d.ts.map +1 -0
- package/src/messaging/converters/hongbao.js +17 -0
- package/src/messaging/converters/hongbao.js.map +1 -0
- package/src/messaging/converters/image.d.ts +9 -0
- package/src/messaging/converters/image.d.ts.map +1 -0
- package/src/messaging/converters/image.js +19 -0
- package/src/messaging/converters/image.js.map +1 -0
- package/src/messaging/converters/index.d.ts +9 -0
- package/src/messaging/converters/index.d.ts.map +1 -0
- package/src/messaging/converters/index.js +51 -0
- package/src/messaging/converters/index.js.map +1 -0
- package/src/messaging/converters/interactive/card-converter.d.ts +77 -0
- package/src/messaging/converters/interactive/card-converter.d.ts.map +1 -0
- package/src/messaging/converters/interactive/card-converter.js +1174 -0
- package/src/messaging/converters/interactive/card-converter.js.map +1 -0
- package/src/messaging/converters/interactive/card-utils.d.ts +10 -0
- package/src/messaging/converters/interactive/card-utils.d.ts.map +1 -0
- package/src/messaging/converters/interactive/card-utils.js +43 -0
- package/src/messaging/converters/interactive/card-utils.js.map +1 -0
- package/src/messaging/converters/interactive/index.d.ts +9 -0
- package/src/messaging/converters/interactive/index.d.ts.map +1 -0
- package/src/messaging/converters/interactive/index.js +22 -0
- package/src/messaging/converters/interactive/index.js.map +1 -0
- package/src/messaging/converters/interactive/legacy.d.ts +12 -0
- package/src/messaging/converters/interactive/legacy.d.ts.map +1 -0
- package/src/messaging/converters/interactive/legacy.js +58 -0
- package/src/messaging/converters/interactive/legacy.js.map +1 -0
- package/src/messaging/converters/interactive/types.d.ts +24 -0
- package/src/messaging/converters/interactive/types.d.ts.map +1 -0
- package/src/messaging/converters/interactive/types.js +25 -0
- package/src/messaging/converters/interactive/types.js.map +1 -0
- package/src/messaging/converters/location.d.ts +9 -0
- package/src/messaging/converters/location.d.ts.map +1 -0
- package/src/messaging/converters/location.js +20 -0
- package/src/messaging/converters/location.js.map +1 -0
- package/src/messaging/converters/merge-forward.d.ts +33 -0
- package/src/messaging/converters/merge-forward.d.ts.map +1 -0
- package/src/messaging/converters/merge-forward.js +226 -0
- package/src/messaging/converters/merge-forward.js.map +1 -0
- package/src/messaging/converters/post.d.ts +12 -0
- package/src/messaging/converters/post.d.ts.map +1 -0
- package/src/messaging/converters/post.js +136 -0
- package/src/messaging/converters/post.js.map +1 -0
- package/src/messaging/converters/share.d.ts +10 -0
- package/src/messaging/converters/share.d.ts.map +1 -0
- package/src/messaging/converters/share.js +24 -0
- package/src/messaging/converters/share.js.map +1 -0
- package/src/messaging/converters/sticker.d.ts +9 -0
- package/src/messaging/converters/sticker.d.ts.map +1 -0
- package/src/messaging/converters/sticker.js +19 -0
- package/src/messaging/converters/sticker.js.map +1 -0
- package/src/messaging/converters/system.d.ts +13 -0
- package/src/messaging/converters/system.d.ts.map +1 -0
- package/src/messaging/converters/system.js +33 -0
- package/src/messaging/converters/system.js.map +1 -0
- package/src/messaging/converters/text.d.ts +9 -0
- package/src/messaging/converters/text.d.ts.map +1 -0
- package/src/messaging/converters/text.js +15 -0
- package/src/messaging/converters/text.js.map +1 -0
- package/src/messaging/converters/todo.d.ts +9 -0
- package/src/messaging/converters/todo.d.ts.map +1 -0
- package/src/messaging/converters/todo.js +42 -0
- package/src/messaging/converters/todo.js.map +1 -0
- package/src/messaging/converters/types.d.ts +108 -0
- package/src/messaging/converters/types.d.ts.map +1 -0
- package/src/messaging/converters/types.js +8 -0
- package/src/messaging/converters/types.js.map +1 -0
- package/src/messaging/converters/unknown.d.ts +9 -0
- package/src/messaging/converters/unknown.d.ts.map +1 -0
- package/src/messaging/converters/unknown.js +17 -0
- package/src/messaging/converters/unknown.js.map +1 -0
- package/src/messaging/converters/utils.d.ts +23 -0
- package/src/messaging/converters/utils.d.ts.map +1 -0
- package/src/messaging/converters/utils.js +52 -0
- package/src/messaging/converters/utils.js.map +1 -0
- package/src/messaging/converters/video-chat.d.ts +9 -0
- package/src/messaging/converters/video-chat.d.ts.map +1 -0
- package/src/messaging/converters/video-chat.js +24 -0
- package/src/messaging/converters/video-chat.js.map +1 -0
- package/src/messaging/converters/video.d.ts +9 -0
- package/src/messaging/converters/video.d.ts.map +1 -0
- package/src/messaging/converters/video.js +33 -0
- package/src/messaging/converters/video.js.map +1 -0
- package/src/messaging/converters/vote.d.ts +9 -0
- package/src/messaging/converters/vote.d.ts.map +1 -0
- package/src/messaging/converters/vote.js +25 -0
- package/src/messaging/converters/vote.js.map +1 -0
- package/src/messaging/inbound/dedup.d.ts +60 -0
- package/src/messaging/inbound/dedup.d.ts.map +1 -0
- package/src/messaging/inbound/dedup.js +117 -0
- package/src/messaging/inbound/dedup.js.map +1 -0
- package/src/messaging/inbound/dispatch-builders.d.ts +84 -0
- package/src/messaging/inbound/dispatch-builders.d.ts.map +1 -0
- package/src/messaging/inbound/dispatch-builders.js +153 -0
- package/src/messaging/inbound/dispatch-builders.js.map +1 -0
- package/src/messaging/inbound/dispatch-commands.d.ts +28 -0
- package/src/messaging/inbound/dispatch-commands.d.ts.map +1 -0
- package/src/messaging/inbound/dispatch-commands.js +113 -0
- package/src/messaging/inbound/dispatch-commands.js.map +1 -0
- package/src/messaging/inbound/dispatch-context.d.ts +68 -0
- package/src/messaging/inbound/dispatch-context.d.ts.map +1 -0
- package/src/messaging/inbound/dispatch-context.js +137 -0
- package/src/messaging/inbound/dispatch-context.js.map +1 -0
- package/src/messaging/inbound/dispatch.d.ts +48 -0
- package/src/messaging/inbound/dispatch.d.ts.map +1 -0
- package/src/messaging/inbound/dispatch.js +193 -0
- package/src/messaging/inbound/dispatch.js.map +1 -0
- package/src/messaging/inbound/enrich.d.ts +103 -0
- package/src/messaging/inbound/enrich.d.ts.map +1 -0
- package/src/messaging/inbound/enrich.js +228 -0
- package/src/messaging/inbound/enrich.js.map +1 -0
- package/src/messaging/inbound/gate-effects.d.ts +24 -0
- package/src/messaging/inbound/gate-effects.d.ts.map +1 -0
- package/src/messaging/inbound/gate-effects.js +44 -0
- package/src/messaging/inbound/gate-effects.js.map +1 -0
- package/src/messaging/inbound/gate.d.ts +61 -0
- package/src/messaging/inbound/gate.d.ts.map +1 -0
- package/src/messaging/inbound/gate.js +234 -0
- package/src/messaging/inbound/gate.js.map +1 -0
- package/src/messaging/inbound/handler.d.ts +36 -0
- package/src/messaging/inbound/handler.d.ts.map +1 -0
- package/src/messaging/inbound/handler.js +174 -0
- package/src/messaging/inbound/handler.js.map +1 -0
- package/src/messaging/inbound/media-resolver.d.ts +33 -0
- package/src/messaging/inbound/media-resolver.d.ts.map +1 -0
- package/src/messaging/inbound/media-resolver.js +88 -0
- package/src/messaging/inbound/media-resolver.js.map +1 -0
- package/src/messaging/inbound/mention.d.ts +40 -0
- package/src/messaging/inbound/mention.d.ts.map +1 -0
- package/src/messaging/inbound/mention.js +82 -0
- package/src/messaging/inbound/mention.js.map +1 -0
- package/src/messaging/inbound/parse-io.d.ts +51 -0
- package/src/messaging/inbound/parse-io.d.ts.map +1 -0
- package/src/messaging/inbound/parse-io.js +82 -0
- package/src/messaging/inbound/parse-io.js.map +1 -0
- package/src/messaging/inbound/parse.d.ts +29 -0
- package/src/messaging/inbound/parse.d.ts.map +1 -0
- package/src/messaging/inbound/parse.js +107 -0
- package/src/messaging/inbound/parse.js.map +1 -0
- package/src/messaging/inbound/permission.d.ts +18 -0
- package/src/messaging/inbound/permission.d.ts.map +1 -0
- package/src/messaging/inbound/permission.js +41 -0
- package/src/messaging/inbound/permission.js.map +1 -0
- package/src/messaging/inbound/policy.d.ts +95 -0
- package/src/messaging/inbound/policy.d.ts.map +1 -0
- package/src/messaging/inbound/policy.js +161 -0
- package/src/messaging/inbound/policy.js.map +1 -0
- package/src/messaging/inbound/reaction-handler.d.ts +62 -0
- package/src/messaging/inbound/reaction-handler.d.ts.map +1 -0
- package/src/messaging/inbound/reaction-handler.js +221 -0
- package/src/messaging/inbound/reaction-handler.js.map +1 -0
- package/src/messaging/inbound/user-name-cache.d.ts +83 -0
- package/src/messaging/inbound/user-name-cache.d.ts.map +1 -0
- package/src/messaging/inbound/user-name-cache.js +242 -0
- package/src/messaging/inbound/user-name-cache.js.map +1 -0
- package/src/messaging/outbound/actions.d.ts +17 -0
- package/src/messaging/outbound/actions.d.ts.map +1 -0
- package/src/messaging/outbound/actions.js +310 -0
- package/src/messaging/outbound/actions.js.map +1 -0
- package/src/messaging/outbound/chat-manage.d.ts +65 -0
- package/src/messaging/outbound/chat-manage.d.ts.map +1 -0
- package/src/messaging/outbound/chat-manage.js +112 -0
- package/src/messaging/outbound/chat-manage.js.map +1 -0
- package/src/messaging/outbound/deliver.d.ts +156 -0
- package/src/messaging/outbound/deliver.d.ts.map +1 -0
- package/src/messaging/outbound/deliver.js +299 -0
- package/src/messaging/outbound/deliver.js.map +1 -0
- package/src/messaging/outbound/fetch.d.ts +13 -0
- package/src/messaging/outbound/fetch.d.ts.map +1 -0
- package/src/messaging/outbound/fetch.js +13 -0
- package/src/messaging/outbound/fetch.js.map +1 -0
- package/src/messaging/outbound/forward.d.ts +27 -0
- package/src/messaging/outbound/forward.d.ts.map +1 -0
- package/src/messaging/outbound/forward.js +49 -0
- package/src/messaging/outbound/forward.js.map +1 -0
- package/src/messaging/outbound/media-url-utils.d.ts +30 -0
- package/src/messaging/outbound/media-url-utils.d.ts.map +1 -0
- package/src/messaging/outbound/media-url-utils.js +131 -0
- package/src/messaging/outbound/media-url-utils.js.map +1 -0
- package/src/messaging/outbound/media.d.ts +256 -0
- package/src/messaging/outbound/media.d.ts.map +1 -0
- package/src/messaging/outbound/media.js +749 -0
- package/src/messaging/outbound/media.js.map +1 -0
- package/src/messaging/outbound/outbound.d.ts +90 -0
- package/src/messaging/outbound/outbound.d.ts.map +1 -0
- package/src/messaging/outbound/outbound.js +112 -0
- package/src/messaging/outbound/outbound.js.map +1 -0
- package/src/messaging/outbound/reactions.d.ts +125 -0
- package/src/messaging/outbound/reactions.d.ts.map +1 -0
- package/src/messaging/outbound/reactions.js +379 -0
- package/src/messaging/outbound/reactions.js.map +1 -0
- package/src/messaging/outbound/send.d.ts +136 -0
- package/src/messaging/outbound/send.d.ts.map +1 -0
- package/src/messaging/outbound/send.js +289 -0
- package/src/messaging/outbound/send.js.map +1 -0
- package/src/messaging/outbound/typing.d.ts +61 -0
- package/src/messaging/outbound/typing.d.ts.map +1 -0
- package/src/messaging/outbound/typing.js +136 -0
- package/src/messaging/outbound/typing.js.map +1 -0
- package/src/messaging/shared/message-lookup.d.ts +55 -0
- package/src/messaging/shared/message-lookup.d.ts.map +1 -0
- package/src/messaging/shared/message-lookup.js +118 -0
- package/src/messaging/shared/message-lookup.js.map +1 -0
- package/src/messaging/types.d.ts +177 -0
- package/src/messaging/types.d.ts.map +1 -0
- package/src/messaging/types.js +11 -0
- package/src/messaging/types.js.map +1 -0
- package/src/tools/auto-auth.d.ts +57 -0
- package/src/tools/auto-auth.d.ts.map +1 -0
- package/src/tools/auto-auth.js +925 -0
- package/src/tools/auto-auth.js.map +1 -0
- package/src/tools/helpers.d.ts +220 -0
- package/src/tools/helpers.d.ts.map +1 -0
- package/src/tools/helpers.js +298 -0
- package/src/tools/helpers.js.map +1 -0
- package/src/tools/mcp/doc/create.d.ts +13 -0
- package/src/tools/mcp/doc/create.d.ts.map +1 -0
- package/src/tools/mcp/doc/create.js +45 -0
- package/src/tools/mcp/doc/create.js.map +1 -0
- package/src/tools/mcp/doc/fetch.d.ts +13 -0
- package/src/tools/mcp/doc/fetch.d.ts.map +1 -0
- package/src/tools/mcp/doc/fetch.js +37 -0
- package/src/tools/mcp/doc/fetch.js.map +1 -0
- package/src/tools/mcp/doc/index.d.ts +13 -0
- package/src/tools/mcp/doc/index.d.ts.map +1 -0
- package/src/tools/mcp/doc/index.js +42 -0
- package/src/tools/mcp/doc/index.js.map +1 -0
- package/src/tools/mcp/doc/update.d.ts +13 -0
- package/src/tools/mcp/doc/update.d.ts.map +1 -0
- package/src/tools/mcp/doc/update.js +62 -0
- package/src/tools/mcp/doc/update.js.map +1 -0
- package/src/tools/mcp/shared.d.ts +58 -0
- package/src/tools/mcp/shared.d.ts.map +1 -0
- package/src/tools/mcp/shared.js +224 -0
- package/src/tools/mcp/shared.js.map +1 -0
- package/src/tools/oapi/bitable/app-table-field.d.ts +17 -0
- package/src/tools/oapi/bitable/app-table-field.d.ts.map +1 -0
- package/src/tools/oapi/bitable/app-table-field.js +224 -0
- package/src/tools/oapi/bitable/app-table-field.js.map +1 -0
- package/src/tools/oapi/bitable/app-table-record.d.ts +21 -0
- package/src/tools/oapi/bitable/app-table-record.d.ts.map +1 -0
- package/src/tools/oapi/bitable/app-table-record.js +449 -0
- package/src/tools/oapi/bitable/app-table-record.js.map +1 -0
- package/src/tools/oapi/bitable/app-table-view.d.ts +18 -0
- package/src/tools/oapi/bitable/app-table-view.d.ts.map +1 -0
- package/src/tools/oapi/bitable/app-table-view.js +197 -0
- package/src/tools/oapi/bitable/app-table-view.js.map +1 -0
- package/src/tools/oapi/bitable/app-table.d.ts +20 -0
- package/src/tools/oapi/bitable/app-table.d.ts.map +1 -0
- package/src/tools/oapi/bitable/app-table.js +249 -0
- package/src/tools/oapi/bitable/app-table.js.map +1 -0
- package/src/tools/oapi/bitable/app.d.ts +19 -0
- package/src/tools/oapi/bitable/app.d.ts.map +1 -0
- package/src/tools/oapi/bitable/app.js +188 -0
- package/src/tools/oapi/bitable/app.js.map +1 -0
- package/src/tools/oapi/bitable/index.d.ts +10 -0
- package/src/tools/oapi/bitable/index.d.ts.map +1 -0
- package/src/tools/oapi/bitable/index.js +10 -0
- package/src/tools/oapi/bitable/index.js.map +1 -0
- package/src/tools/oapi/calendar/calendar.d.ts +16 -0
- package/src/tools/oapi/calendar/calendar.d.ts.map +1 -0
- package/src/tools/oapi/calendar/calendar.js +124 -0
- package/src/tools/oapi/calendar/calendar.js.map +1 -0
- package/src/tools/oapi/calendar/event-attendee.d.ts +17 -0
- package/src/tools/oapi/calendar/event-attendee.d.ts.map +1 -0
- package/src/tools/oapi/calendar/event-attendee.js +275 -0
- package/src/tools/oapi/calendar/event-attendee.js.map +1 -0
- package/src/tools/oapi/calendar/event.d.ts +17 -0
- package/src/tools/oapi/calendar/event.d.ts.map +1 -0
- package/src/tools/oapi/calendar/event.js +721 -0
- package/src/tools/oapi/calendar/event.js.map +1 -0
- package/src/tools/oapi/calendar/freebusy.d.ts +14 -0
- package/src/tools/oapi/calendar/freebusy.d.ts.map +1 -0
- package/src/tools/oapi/calendar/freebusy.js +113 -0
- package/src/tools/oapi/calendar/freebusy.js.map +1 -0
- package/src/tools/oapi/calendar/index.d.ts +9 -0
- package/src/tools/oapi/calendar/index.d.ts.map +1 -0
- package/src/tools/oapi/calendar/index.js +9 -0
- package/src/tools/oapi/calendar/index.js.map +1 -0
- package/src/tools/oapi/chat/chat.d.ts +17 -0
- package/src/tools/oapi/chat/chat.d.ts.map +1 -0
- package/src/tools/oapi/chat/chat.js +126 -0
- package/src/tools/oapi/chat/chat.js.map +1 -0
- package/src/tools/oapi/chat/index.d.ts +11 -0
- package/src/tools/oapi/chat/index.d.ts.map +1 -0
- package/src/tools/oapi/chat/index.js +16 -0
- package/src/tools/oapi/chat/index.js.map +1 -0
- package/src/tools/oapi/chat/members.d.ts +12 -0
- package/src/tools/oapi/chat/members.d.ts.map +1 -0
- package/src/tools/oapi/chat/members.js +83 -0
- package/src/tools/oapi/chat/members.js.map +1 -0
- package/src/tools/oapi/common/get-user.d.ts +13 -0
- package/src/tools/oapi/common/get-user.d.ts.map +1 -0
- package/src/tools/oapi/common/get-user.js +108 -0
- package/src/tools/oapi/common/get-user.js.map +1 -0
- package/src/tools/oapi/common/index.d.ts +7 -0
- package/src/tools/oapi/common/index.d.ts.map +1 -0
- package/src/tools/oapi/common/index.js +7 -0
- package/src/tools/oapi/common/index.js.map +1 -0
- package/src/tools/oapi/common/search-user.d.ts +12 -0
- package/src/tools/oapi/common/search-user.d.ts.map +1 -0
- package/src/tools/oapi/common/search-user.js +75 -0
- package/src/tools/oapi/common/search-user.js.map +1 -0
- package/src/tools/oapi/drive/doc-comments.d.ts +16 -0
- package/src/tools/oapi/drive/doc-comments.d.ts.map +1 -0
- package/src/tools/oapi/drive/doc-comments.js +288 -0
- package/src/tools/oapi/drive/doc-comments.js.map +1 -0
- package/src/tools/oapi/drive/doc-media.d.ts +20 -0
- package/src/tools/oapi/drive/doc-media.d.ts.map +1 -0
- package/src/tools/oapi/drive/doc-media.js +337 -0
- package/src/tools/oapi/drive/doc-media.js.map +1 -0
- package/src/tools/oapi/drive/file.d.ts +20 -0
- package/src/tools/oapi/drive/file.d.ts.map +1 -0
- package/src/tools/oapi/drive/file.js +485 -0
- package/src/tools/oapi/drive/file.js.map +1 -0
- package/src/tools/oapi/drive/index.d.ts +13 -0
- package/src/tools/oapi/drive/index.d.ts.map +1 -0
- package/src/tools/oapi/drive/index.js +37 -0
- package/src/tools/oapi/drive/index.js.map +1 -0
- package/src/tools/oapi/helpers.d.ts +174 -0
- package/src/tools/oapi/helpers.d.ts.map +1 -0
- package/src/tools/oapi/helpers.js +341 -0
- package/src/tools/oapi/helpers.js.map +1 -0
- package/src/tools/oapi/im/format-messages.d.ts +51 -0
- package/src/tools/oapi/im/format-messages.d.ts.map +1 -0
- package/src/tools/oapi/im/format-messages.js +166 -0
- package/src/tools/oapi/im/format-messages.js.map +1 -0
- package/src/tools/oapi/im/index.d.ts +11 -0
- package/src/tools/oapi/im/index.d.ts.map +1 -0
- package/src/tools/oapi/im/index.js +18 -0
- package/src/tools/oapi/im/index.js.map +1 -0
- package/src/tools/oapi/im/message-read.d.ts +14 -0
- package/src/tools/oapi/im/message-read.d.ts.map +1 -0
- package/src/tools/oapi/im/message-read.js +412 -0
- package/src/tools/oapi/im/message-read.js.map +1 -0
- package/src/tools/oapi/im/message.d.ts +17 -0
- package/src/tools/oapi/im/message.d.ts.map +1 -0
- package/src/tools/oapi/im/message.js +171 -0
- package/src/tools/oapi/im/message.js.map +1 -0
- package/src/tools/oapi/im/resource.d.ts +14 -0
- package/src/tools/oapi/im/resource.d.ts.map +1 -0
- package/src/tools/oapi/im/resource.js +152 -0
- package/src/tools/oapi/im/resource.js.map +1 -0
- package/src/tools/oapi/im/time-utils.d.ts +47 -0
- package/src/tools/oapi/im/time-utils.d.ts.map +1 -0
- package/src/tools/oapi/im/time-utils.js +202 -0
- package/src/tools/oapi/im/time-utils.js.map +1 -0
- package/src/tools/oapi/im/user-name-uat.d.ts +24 -0
- package/src/tools/oapi/im/user-name-uat.d.ts.map +1 -0
- package/src/tools/oapi/im/user-name-uat.js +128 -0
- package/src/tools/oapi/im/user-name-uat.js.map +1 -0
- package/src/tools/oapi/index.d.ts +12 -0
- package/src/tools/oapi/index.d.ts.map +1 -0
- package/src/tools/oapi/index.js +59 -0
- package/src/tools/oapi/index.js.map +1 -0
- package/src/tools/oapi/sdk-types.d.ts +97 -0
- package/src/tools/oapi/sdk-types.d.ts.map +1 -0
- package/src/tools/oapi/sdk-types.js +13 -0
- package/src/tools/oapi/sdk-types.js.map +1 -0
- package/src/tools/oapi/search/doc-search.d.ts +14 -0
- package/src/tools/oapi/search/doc-search.d.ts.map +1 -0
- package/src/tools/oapi/search/doc-search.js +203 -0
- package/src/tools/oapi/search/doc-search.js.map +1 -0
- package/src/tools/oapi/search/index.d.ts +13 -0
- package/src/tools/oapi/search/index.d.ts.map +1 -0
- package/src/tools/oapi/search/index.js +34 -0
- package/src/tools/oapi/search/index.js.map +1 -0
- package/src/tools/oapi/sheets/index.d.ts +13 -0
- package/src/tools/oapi/sheets/index.d.ts.map +1 -0
- package/src/tools/oapi/sheets/index.js +32 -0
- package/src/tools/oapi/sheets/index.js.map +1 -0
- package/src/tools/oapi/sheets/sheet.d.ts +17 -0
- package/src/tools/oapi/sheets/sheet.d.ts.map +1 -0
- package/src/tools/oapi/sheets/sheet.js +652 -0
- package/src/tools/oapi/sheets/sheet.js.map +1 -0
- package/src/tools/oapi/task/comment.d.ts +16 -0
- package/src/tools/oapi/task/comment.d.ts.map +1 -0
- package/src/tools/oapi/task/comment.js +142 -0
- package/src/tools/oapi/task/comment.js.map +1 -0
- package/src/tools/oapi/task/index.d.ts +9 -0
- package/src/tools/oapi/task/index.d.ts.map +1 -0
- package/src/tools/oapi/task/index.js +9 -0
- package/src/tools/oapi/task/index.js.map +1 -0
- package/src/tools/oapi/task/subtask.d.ts +15 -0
- package/src/tools/oapi/task/subtask.d.ts.map +1 -0
- package/src/tools/oapi/task/subtask.js +164 -0
- package/src/tools/oapi/task/subtask.js.map +1 -0
- package/src/tools/oapi/task/task.d.ts +17 -0
- package/src/tools/oapi/task/task.d.ts.map +1 -0
- package/src/tools/oapi/task/task.js +346 -0
- package/src/tools/oapi/task/task.js.map +1 -0
- package/src/tools/oapi/task/tasklist.d.ts +22 -0
- package/src/tools/oapi/task/tasklist.d.ts.map +1 -0
- package/src/tools/oapi/task/tasklist.js +323 -0
- package/src/tools/oapi/task/tasklist.js.map +1 -0
- package/src/tools/oapi/wiki/index.d.ts +13 -0
- package/src/tools/oapi/wiki/index.d.ts.map +1 -0
- package/src/tools/oapi/wiki/index.js +35 -0
- package/src/tools/oapi/wiki/index.js.map +1 -0
- package/src/tools/oapi/wiki/space-node.d.ts +18 -0
- package/src/tools/oapi/wiki/space-node.d.ts.map +1 -0
- package/src/tools/oapi/wiki/space-node.js +253 -0
- package/src/tools/oapi/wiki/space-node.js.map +1 -0
- package/src/tools/oapi/wiki/space.d.ts +16 -0
- package/src/tools/oapi/wiki/space.d.ts.map +1 -0
- package/src/tools/oapi/wiki/space.js +132 -0
- package/src/tools/oapi/wiki/space.js.map +1 -0
- package/src/tools/oauth-batch-auth.d.ts +12 -0
- package/src/tools/oauth-batch-auth.d.ts.map +1 -0
- package/src/tools/oauth-batch-auth.js +142 -0
- package/src/tools/oauth-batch-auth.js.map +1 -0
- package/src/tools/oauth-cards.d.ts +27 -0
- package/src/tools/oauth-cards.d.ts.map +1 -0
- package/src/tools/oauth-cards.js +251 -0
- package/src/tools/oauth-cards.js.map +1 -0
- package/src/tools/oauth.d.ts +48 -0
- package/src/tools/oauth.d.ts.map +1 -0
- package/src/tools/oauth.js +619 -0
- package/src/tools/oauth.js.map +1 -0
- package/src/tools/onboarding-auth.d.ts +28 -0
- package/src/tools/onboarding-auth.d.ts.map +1 -0
- package/src/tools/onboarding-auth.js +131 -0
- package/src/tools/onboarding-auth.js.map +1 -0
- package/src/tools/tat/im/index.d.ts +16 -0
- package/src/tools/tat/im/index.d.ts.map +1 -0
- package/src/tools/tat/im/index.js +19 -0
- package/src/tools/tat/im/index.js.map +1 -0
- package/src/tools/tat/im/resource.d.ts +16 -0
- package/src/tools/tat/im/resource.d.ts.map +1 -0
- package/src/tools/tat/im/resource.js +158 -0
- package/src/tools/tat/im/resource.js.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lark Technologies Pte. Ltd.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# OpenClaw Feishu/Lark Plugin
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://www.npmjs.com/package/@larksuiteoapi/feishu-openclaw-plugin)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
|
|
7
|
+
[中文版](./README.zh.md) | English
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
The official Feishu/Lark plugin for OpenClaw, developed and maintained by the Lark Open Platform team. It seamlessly connects your OpenClaw Agent to your Feishu/Lark workspace, empowering it to directly read from and write to messages, documents, sheets, calendars, tasks, and more.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
This plugin provides comprehensive Feishu/Lark integration for OpenClaw, including:
|
|
16
|
+
|
|
17
|
+
| Category | Capabilities |
|
|
18
|
+
|----------|--------------|
|
|
19
|
+
| 💬 Messages | Message reading (group/DM history, topic replies), message sending, message replies, message search, image/file download |
|
|
20
|
+
| 📄 Docs | Create cloud docs, update cloud docs, read cloud doc content |
|
|
21
|
+
| 📊 Bitable | Create/manage bitables, data tables, fields, records (CRUD, batch operations, advanced filtering), views |
|
|
22
|
+
| 📅 Calendar | Calendar management, event management (create/query/update/delete/search), attendee management, free/busy lookup |
|
|
23
|
+
| ✅ Tasks | Task management (create/query/update/complete), tasklist management, subtasks, comments |
|
|
24
|
+
|
|
25
|
+
Additionally, the plugin supports:
|
|
26
|
+
- **📱 Interactive Cards**: Real-time status updates (thinking/streaming/complete states), confirmation buttons for sensitive operations
|
|
27
|
+
- **🌊 Streaming Replies**: Real-time streaming responses in message cards
|
|
28
|
+
- **🔒 Permission Policies**: Flexible access control policies for DMs and group chats
|
|
29
|
+
- **⚙️ Advanced Group Configuration**: Per-group settings including whitelists, skill bindings, and custom system prompts
|
|
30
|
+
|
|
31
|
+
For a complete list of features, please see [FEATURES.md](./openclaw/feishu/FEATURES.md).
|
|
32
|
+
|
|
33
|
+
## Important Security & Risk Warnings (Read Before Use)
|
|
34
|
+
|
|
35
|
+
**Core Risk:** This plugin connects to your workspace data through Feishu APIs — messages, documents, calendars, contacts. Anything the AI can read has the potential to be exposed. While we've implemented security measures, AI systems are not yet fully mature or stable, so we cannot guarantee absolute security.
|
|
36
|
+
|
|
37
|
+
**Strong Recommendation:** DO NOT use company/enterprise Feishu accounts at this stage! Please use personal accounts for testing and exploration only.
|
|
38
|
+
|
|
39
|
+
- This application is intended for personal use only and should NOT be shared with multiple users.
|
|
40
|
+
- Avoid using this plugin in group chats. Since it runs under your personal identity, other members may prompt it into accessing or sending your data, increasing the risk of data leakage.
|
|
41
|
+
|
|
42
|
+
**Other Operational Risks**
|
|
43
|
+
- AI is not perfect and may experience "hallucinations": It may sometimes misunderstand your intent or generate content that appears reasonable but is inaccurate.
|
|
44
|
+
- Some operations are irreversible: For example, messages sent by the AI on your behalf are sent in your name and become factual once sent.
|
|
45
|
+
- **Mitigation Advice:** For important operations involving sending, modifying, or writing data, please always **"preview first, then confirm"**. Never let the AI operate in a fully autonomous "self-driving" mode without human oversight.
|
|
46
|
+
|
|
47
|
+
**Disclaimer:** This plugin is provided "as is" without any warranties. Users are solely responsible for any data loss, security breaches, or other damages resulting from the use of this plugin. Please ensure you understand the risks before using this plugin.
|
|
48
|
+
|
|
49
|
+
## Requirements & Installation
|
|
50
|
+
|
|
51
|
+
Before you start, please ensure you have the following:
|
|
52
|
+
|
|
53
|
+
- **Node.js**: `v22` or higher.
|
|
54
|
+
- **OpenClaw**: A working installation of OpenClaw. For details, visit the [OpenClaw official website](https://openclaw.ai).
|
|
55
|
+
|
|
56
|
+
> **Note**: OpenClaw version must be **2026.2.26** or higher. Check with `openclaw -v`. If below this version, upgrade with:
|
|
57
|
+
> ```bash
|
|
58
|
+
> npm install -g openclaw
|
|
59
|
+
> ```
|
|
60
|
+
|
|
61
|
+
### Create Feishu Application
|
|
62
|
+
|
|
63
|
+
1. Log in to [Feishu Open Platform](https://open.feishu.cn/app), click "Create Enterprise Self-built App".
|
|
64
|
+
2. Configure app name, description, and icon, then click "Create".
|
|
65
|
+
3. Add Bot capability: In the left navigation, go to "App Capabilities > Add App Capability", select "Add by Capability" tab, click "Add" on the "Bot" capability card.
|
|
66
|
+
4. Import required permissions: In the left navigation, go to "Development Config > Permission Management", click "Batch Import/Export Permissions", and import the complete permission list.
|
|
67
|
+
|
|
68
|
+
> **Note**: Importing the complete permission list is very important for full functionality!
|
|
69
|
+
|
|
70
|
+
5. Publish and approve the app: Click "Create Version", configure version number and update notes, click "Save", then click "Confirm Publish".
|
|
71
|
+
6. Get app credentials: In the left navigation, go to "Basic Info > Credentials and Basic Info", get App ID and App Secret.
|
|
72
|
+
|
|
73
|
+
### Install Feishu Plugin
|
|
74
|
+
|
|
75
|
+
Execute the following commands in your terminal:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Set npm registry
|
|
79
|
+
npm config set registry https://registry.npmjs.org
|
|
80
|
+
|
|
81
|
+
# Download plugin installer
|
|
82
|
+
curl -o /tmp/feishu-openclaw-plugin-onboard-cli.tgz https://sf3-cn.feishucdn.com/obj/open-platform-opendoc/4d184b1ba733bae2423a89e196a2ef8f_QATOjKH1WN.tgz
|
|
83
|
+
|
|
84
|
+
# Install plugin
|
|
85
|
+
npm install /tmp/feishu-openclaw-plugin-onboard-cli.tgz -g
|
|
86
|
+
|
|
87
|
+
# Clean up installer
|
|
88
|
+
rm /tmp/feishu-openclaw-plugin-onboard-cli.tgz
|
|
89
|
+
|
|
90
|
+
# Run installation wizard
|
|
91
|
+
feishu-plugin-onboard install
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
During installation:
|
|
95
|
+
- If you previously linked a Feishu app, you can choose to use the existing app or create a new one
|
|
96
|
+
- If no Feishu app is linked, enter the appId and appSecret created in the previous steps
|
|
97
|
+
|
|
98
|
+
Start the plugin:
|
|
99
|
+
```bash
|
|
100
|
+
openclaw gateway run
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Verify success:
|
|
104
|
+
- After running the above command, if you see "started listening to Feishu events" in the logs, the plugin has started successfully
|
|
105
|
+
- Run `openclaw plugins list`, if **feishu-openclaw-plugin** Status is loaded and **feishu** Status is disabled, the plugin is successfully enabled
|
|
106
|
+
|
|
107
|
+
## Quick Start
|
|
108
|
+
|
|
109
|
+
1. **Configure `openclaw.json`**
|
|
110
|
+
|
|
111
|
+
After installation, edit your OpenClaw configuration file (`~/.openclaw/openclaw.json`) to enable the `feishu` channel and add your app credentials.
|
|
112
|
+
|
|
113
|
+
Here is a minimal configuration example:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"channels": {
|
|
118
|
+
"feishu": {
|
|
119
|
+
"enabled": true,
|
|
120
|
+
"appId": "cli_xxxxxxxxxxxxxx",
|
|
121
|
+
"appSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
122
|
+
"domain": "feishu",
|
|
123
|
+
"connectionMode": "websocket"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"plugins": {
|
|
127
|
+
"allow": ["feishu-openclaw-plugin"]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
*Make sure to replace `appId` and `appSecret` with your own app credentials.*
|
|
132
|
+
|
|
133
|
+
2. **Run the OpenClaw Gateway**
|
|
134
|
+
|
|
135
|
+
Save the configuration and start the OpenClaw gateway:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
openclaw gateway run
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
3. **Pair the Bot**
|
|
142
|
+
|
|
143
|
+
- Send any message to the bot in Feishu, and the system will generate a pairing code (letters + numbers)
|
|
144
|
+
- The pairing code is valid for 5 minutes; if it expires, trigger again
|
|
145
|
+
- Run the following command on the server to complete the binding:
|
|
146
|
+
```bash
|
|
147
|
+
openclaw pairing approve feishu <pairing_code> --notify
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
4. **Complete Authorization**
|
|
151
|
+
|
|
152
|
+
Follow the prompts in Feishu to complete authorization, so OpenClaw can perform tasks like reading messages, docs, bitables, and calendars on your behalf.
|
|
153
|
+
|
|
154
|
+
> If you don't want to authorize now, you can start the conversation directly and enter `/feishu auth` later to complete batch authorization.
|
|
155
|
+
|
|
156
|
+
5. **Start Chatting**
|
|
157
|
+
|
|
158
|
+
Your bot is now ready. To verify installation, enter `/feishu start` in the dialog; if it returns version info, the installation is successful.
|
|
159
|
+
|
|
160
|
+
To teach the bot new skills, tell it: "Learn about my new Feishu plugin, list what capabilities it has"
|
|
161
|
+
|
|
162
|
+
## Configuration
|
|
163
|
+
|
|
164
|
+
The plugin offers several configuration options to tailor its behavior. All settings are located under the `channels.feishu` key in your `openclaw.json`.
|
|
165
|
+
|
|
166
|
+
- `replyMode` (string | object): Controls how the AI delivers responses.
|
|
167
|
+
- `"auto"` (default): Uses streaming replies for DMs and static replies for group chats.
|
|
168
|
+
- `"streaming"`: Always use streaming card replies.
|
|
169
|
+
- `"static"`: Always send the response after it's fully generated.
|
|
170
|
+
|
|
171
|
+
- `dmPolicy` (string): Access policy for direct messages.
|
|
172
|
+
- `"open"` (default): Responds to all DMs.
|
|
173
|
+
- `"pairing"`: Requires users to pair with a code before they can interact with the bot.
|
|
174
|
+
- `"allowlist"`: Only responds to whitelisted users.
|
|
175
|
+
|
|
176
|
+
- `groupPolicy` (string): Access policy for group chats.
|
|
177
|
+
- `"open"`: Allows interaction in any group chat when the bot is @mentioned.
|
|
178
|
+
- `"allowlist"` (recommended): Only works in whitelisted group chats.
|
|
179
|
+
- `"disabled"`: Disables all group chat interactions.
|
|
180
|
+
|
|
181
|
+
- `requireMention` (boolean): If `true` (default), the bot will only respond in group chats when it is @mentioned.
|
|
182
|
+
|
|
183
|
+
For more detailed configuration options, see [FEATURES.md](./openclaw/feishu/FEATURES.md).
|
|
184
|
+
|
|
185
|
+
## Common Commands
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# View current configuration
|
|
189
|
+
openclaw config get channels.feishu
|
|
190
|
+
|
|
191
|
+
# Set to require @ mention to reply
|
|
192
|
+
openclaw config set channels.feishu.requireMention true --json
|
|
193
|
+
|
|
194
|
+
# Set to reply to all messages
|
|
195
|
+
openclaw config set channels.feishu.requireMention open --json
|
|
196
|
+
|
|
197
|
+
# Set specific group to require @ mention
|
|
198
|
+
openclaw config set channels.feishu.groups.群ID.requireMention true --json
|
|
199
|
+
|
|
200
|
+
# Enable streaming output
|
|
201
|
+
openclaw config set channels.feishu.streaming true
|
|
202
|
+
|
|
203
|
+
# Enable elapsed time display in streaming
|
|
204
|
+
openclaw config set channels.feishu.footer.elapsed true
|
|
205
|
+
|
|
206
|
+
# Enable status display in streaming
|
|
207
|
+
openclaw config set channels.feishu.footer.status true
|
|
208
|
+
|
|
209
|
+
# View channel status
|
|
210
|
+
openclaw channels status
|
|
211
|
+
|
|
212
|
+
# Upgrade plugin
|
|
213
|
+
feishu-plugin-onboard update
|
|
214
|
+
|
|
215
|
+
# Diagnose issues
|
|
216
|
+
feishu-plugin-onboard doctor
|
|
217
|
+
|
|
218
|
+
# Fix issues
|
|
219
|
+
feishu-plugin-onboard doctor --fix
|
|
220
|
+
|
|
221
|
+
# View version info
|
|
222
|
+
feishu-plugin-onboard info
|
|
223
|
+
|
|
224
|
+
# View detailed config info
|
|
225
|
+
feishu-plugin-onboard info --all
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Group Chat Reply Modes
|
|
229
|
+
|
|
230
|
+
**Mode 1: Only reply when @ mentioned (default)**
|
|
231
|
+
```bash
|
|
232
|
+
openclaw config set channels.feishu.requireMention true --json
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Mode 2: Reply to all messages**
|
|
236
|
+
```bash
|
|
237
|
+
openclaw config set channels.feishu.requireMention false --json
|
|
238
|
+
```
|
|
239
|
+
> Note: This mode can spam in large groups, use with caution!
|
|
240
|
+
|
|
241
|
+
**Mode 3: Only specific groups require @ mention (advanced)**
|
|
242
|
+
```bash
|
|
243
|
+
# First set default to not require @ for all groups
|
|
244
|
+
openclaw config set channels.feishu.requireMention open --json
|
|
245
|
+
# Then set specific group to require @
|
|
246
|
+
openclaw config set channels.feishu.groups.oc_xxxxxxxx.requireMention true --json
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## FAQ
|
|
250
|
+
|
|
251
|
+
1. **Why isn't Windows supported?**
|
|
252
|
+
* This is a known issue in the OpenClaw core. You can track its progress at [openclaw/openclaw#7631](https://github.com/openclaw/openclaw/issues/7631).
|
|
253
|
+
|
|
254
|
+
2. **I see a `Cannot find module 'xxx'` error on startup.**
|
|
255
|
+
* This usually means the plugin's dependencies were not installed correctly. Navigate to the plugin directory at `~/.openclaw/extensions/feishu-openclaw-plugin` and run `npm install --production` to manually install them.
|
|
256
|
+
|
|
257
|
+
3. **The bot reports "insufficient permissions" when trying to read a doc or send a message.**
|
|
258
|
+
* Log in to the Feishu/Lark Developer Console and ensure your application has been granted the necessary API permissions. For example, reading a document requires the `docx:document:readonly` scope, and sending messages requires `im:message:send_as_bot` permission.
|
|
259
|
+
|
|
260
|
+
4. **How to quickly complete user authorization?**
|
|
261
|
+
* Tell the AI: "I want to grant all user permissions" to complete batch authorization.
|
|
262
|
+
* Or enter `/feishu auth` to complete batch user authorization.
|
|
263
|
+
|
|
264
|
+
5. **How to verify installation success?**
|
|
265
|
+
* Enter `/feishu start` in the dialog; if it returns version info, installation is successful.
|
|
266
|
+
* Enter `/feishu doctor` to check if configuration is normal.
|
|
267
|
+
|
|
268
|
+
6. **How to update the plugin?**
|
|
269
|
+
* Run the following command:
|
|
270
|
+
```bash
|
|
271
|
+
feishu-plugin-onboard update
|
|
272
|
+
```
|
|
273
|
+
* If you cannot find this command, you need to install the installer first (see installation steps).
|
|
274
|
+
|
|
275
|
+
## Contributing
|
|
276
|
+
|
|
277
|
+
Contributions from the community are welcome! If you find a bug or have a feature request, please open an [Issue](https://github.com/larksuite/openclaw-larksuite/issues) or submit a [Pull Request](https://github.com/larksuite/openclaw-larksuite/pulls).
|
|
278
|
+
|
|
279
|
+
For major changes, please open an issue first to discuss what you would like to change.
|
|
280
|
+
|
|
281
|
+
## License
|
|
282
|
+
|
|
283
|
+
This project is licensed under the **MIT License**. See the [LICENSE](./openclaw/feishu/LICENSE) file for details.
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 ByteDance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
5
|
+
* OpenClaw Feishu/Lark plugin entry point.
|
|
6
|
+
*
|
|
7
|
+
* Registers the Feishu channel and all tool families:
|
|
8
|
+
* doc, wiki, drive, perm, bitable, task, calendar.
|
|
9
|
+
*/
|
|
10
|
+
import type { OpenClawPluginApi } from 'openclaw/plugin-sdk';
|
|
11
|
+
export { monitorFeishuProvider } from './src/channel/monitor';
|
|
12
|
+
export { sendMessageFeishu, sendCardFeishu, updateCardFeishu, editMessageFeishu } from './src/messaging/outbound/send';
|
|
13
|
+
export { getMessageFeishu } from './src/messaging/outbound/fetch';
|
|
14
|
+
export { uploadImageLark, uploadFileLark, sendImageLark, sendFileLark, sendAudioLark, uploadAndSendMediaLark, } from './src/messaging/outbound/media';
|
|
15
|
+
export { sendTextLark, sendCardLark, sendMediaLark, type SendTextLarkParams, type SendCardLarkParams, type SendMediaLarkParams, } from './src/messaging/outbound/deliver';
|
|
16
|
+
export { type FeishuChannelData } from './src/messaging/outbound/outbound';
|
|
17
|
+
export { probeFeishu } from './src/channel/probe';
|
|
18
|
+
export { addReactionFeishu, removeReactionFeishu, listReactionsFeishu, FeishuEmoji, VALID_FEISHU_EMOJI_TYPES, } from './src/messaging/outbound/reactions';
|
|
19
|
+
export { forwardMessageFeishu } from './src/messaging/outbound/forward';
|
|
20
|
+
export { updateChatFeishu, addChatMembersFeishu, removeChatMembersFeishu, listChatMembersFeishu, } from './src/messaging/outbound/chat-manage';
|
|
21
|
+
export { feishuMessageActions } from './src/messaging/outbound/actions';
|
|
22
|
+
export { mentionedBot, nonBotMentions, extractMessageBody, formatMentionForText, formatMentionForCard, formatMentionAllForText, formatMentionAllForCard, buildMentionedMessage, buildMentionedCardContent, type MentionInfo, } from './src/messaging/inbound/mention';
|
|
23
|
+
export { feishuPlugin } from './src/channel/plugin';
|
|
24
|
+
export type { MessageContext, RawMessage, RawSender, FeishuMessageContext, FeishuReactionCreatedEvent, } from './src/messaging/types';
|
|
25
|
+
export { handleFeishuReaction } from './src/messaging/inbound/reaction-handler';
|
|
26
|
+
export { parseMessageEvent } from './src/messaging/inbound/parse';
|
|
27
|
+
export { checkMessageGate } from './src/messaging/inbound/gate';
|
|
28
|
+
export { isMessageExpired } from './src/messaging/inbound/dedup';
|
|
29
|
+
declare const plugin: {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
configSchema: import("openclaw/plugin-sdk").OpenClawPluginConfigSchema;
|
|
34
|
+
register(api: OpenClawPluginApi): void;
|
|
35
|
+
};
|
|
36
|
+
export default plugin;
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAyB7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACL,eAAe,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,aAAa,EACb,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,wBAAwB,GACzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EACL,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,WAAW,GACjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,YAAY,EACV,cAAc,EACd,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,QAAA,MAAM,MAAM;;;;;kBAKI,iBAAiB;CAgFhC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/index.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 ByteDance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
5
|
+
* OpenClaw Feishu/Lark plugin entry point.
|
|
6
|
+
*
|
|
7
|
+
* Registers the Feishu channel and all tool families:
|
|
8
|
+
* doc, wiki, drive, perm, bitable, task, calendar.
|
|
9
|
+
*/
|
|
10
|
+
import { emptyPluginConfigSchema } from 'openclaw/plugin-sdk';
|
|
11
|
+
import { feishuPlugin } from './src/channel/plugin';
|
|
12
|
+
import { LarkClient } from './src/core/lark-client';
|
|
13
|
+
import { registerOapiTools } from './src/tools/oapi/index';
|
|
14
|
+
import { registerFeishuMcpDocTools } from './src/tools/mcp/doc/index';
|
|
15
|
+
import { registerFeishuOAuthTool } from './src/tools/oauth';
|
|
16
|
+
import { registerFeishuOAuthBatchAuthTool } from './src/tools/oauth-batch-auth';
|
|
17
|
+
import { runDiagnosis, formatDiagReportCli, traceByMessageId, formatTraceOutput, analyzeTrace, } from './src/commands/diagnose';
|
|
18
|
+
import { registerCommands } from './src/commands/index';
|
|
19
|
+
import { larkLogger } from './src/core/lark-logger';
|
|
20
|
+
import { emitSecurityWarnings } from './src/core/security-check';
|
|
21
|
+
const log = larkLogger('plugin');
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
// Re-exports for external consumers
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
export { monitorFeishuProvider } from './src/channel/monitor';
|
|
26
|
+
export { sendMessageFeishu, sendCardFeishu, updateCardFeishu, editMessageFeishu } from './src/messaging/outbound/send';
|
|
27
|
+
export { getMessageFeishu } from './src/messaging/outbound/fetch';
|
|
28
|
+
export { uploadImageLark, uploadFileLark, sendImageLark, sendFileLark, sendAudioLark, uploadAndSendMediaLark, } from './src/messaging/outbound/media';
|
|
29
|
+
export { sendTextLark, sendCardLark, sendMediaLark, } from './src/messaging/outbound/deliver';
|
|
30
|
+
export { probeFeishu } from './src/channel/probe';
|
|
31
|
+
export { addReactionFeishu, removeReactionFeishu, listReactionsFeishu, FeishuEmoji, VALID_FEISHU_EMOJI_TYPES, } from './src/messaging/outbound/reactions';
|
|
32
|
+
export { forwardMessageFeishu } from './src/messaging/outbound/forward';
|
|
33
|
+
export { updateChatFeishu, addChatMembersFeishu, removeChatMembersFeishu, listChatMembersFeishu, } from './src/messaging/outbound/chat-manage';
|
|
34
|
+
export { feishuMessageActions } from './src/messaging/outbound/actions';
|
|
35
|
+
export { mentionedBot, nonBotMentions, extractMessageBody, formatMentionForText, formatMentionForCard, formatMentionAllForText, formatMentionAllForCard, buildMentionedMessage, buildMentionedCardContent, } from './src/messaging/inbound/mention';
|
|
36
|
+
export { feishuPlugin } from './src/channel/plugin';
|
|
37
|
+
export { handleFeishuReaction } from './src/messaging/inbound/reaction-handler';
|
|
38
|
+
export { parseMessageEvent } from './src/messaging/inbound/parse';
|
|
39
|
+
export { checkMessageGate } from './src/messaging/inbound/gate';
|
|
40
|
+
export { isMessageExpired } from './src/messaging/inbound/dedup';
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
// Plugin definition
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
const plugin = {
|
|
45
|
+
id: 'feishu-openclaw-plugin',
|
|
46
|
+
name: 'Feishu',
|
|
47
|
+
description: 'Feishu/Lark channel plugin with im/doc/wiki/drive/task/calendar tools',
|
|
48
|
+
configSchema: emptyPluginConfigSchema(),
|
|
49
|
+
register(api) {
|
|
50
|
+
LarkClient.setRuntime(api.runtime);
|
|
51
|
+
api.registerChannel({ plugin: feishuPlugin });
|
|
52
|
+
// ========================================
|
|
53
|
+
// Register OAPI tools (calendar, task - using Feishu Open API directly)
|
|
54
|
+
registerOapiTools(api);
|
|
55
|
+
// Register MCP doc tools (using Model Context Protocol)
|
|
56
|
+
registerFeishuMcpDocTools(api);
|
|
57
|
+
// Register OAuth tool (UAT device flow authorization)
|
|
58
|
+
registerFeishuOAuthTool(api);
|
|
59
|
+
// Register OAuth batch auth tool (batch authorization for all app scopes)
|
|
60
|
+
registerFeishuOAuthBatchAuthTool(api);
|
|
61
|
+
// ---- Tool call hooks (auto-trace AI tool invocations) ----
|
|
62
|
+
api.on('before_tool_call', (event) => {
|
|
63
|
+
log.info(`tool call: ${event.toolName} params=${JSON.stringify(event.params)}`);
|
|
64
|
+
});
|
|
65
|
+
api.on('after_tool_call', (event) => {
|
|
66
|
+
if (event.error) {
|
|
67
|
+
log.error(`tool fail: ${event.toolName} ${event.error} (${event.durationMs ?? 0}ms)`);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
log.info(`tool done: ${event.toolName} ok (${event.durationMs ?? 0}ms)`);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
// ---- Diagnostic commands ----
|
|
74
|
+
// CLI: openclaw feishu-diagnose [--trace <messageId>]
|
|
75
|
+
api.registerCli((ctx) => {
|
|
76
|
+
ctx.program
|
|
77
|
+
.command('feishu-diagnose')
|
|
78
|
+
.description('运行飞书插件诊断,检查配置、连通性和权限状态')
|
|
79
|
+
.option('--trace <messageId>', '按 message_id 追踪完整处理链路')
|
|
80
|
+
.option('--analyze', '分析追踪日志(需配合 --trace 使用)')
|
|
81
|
+
.action(async (opts) => {
|
|
82
|
+
try {
|
|
83
|
+
if (opts.trace) {
|
|
84
|
+
const lines = await traceByMessageId(opts.trace);
|
|
85
|
+
// eslint-disable-next-line no-console -- CLI 命令直接输出到终端
|
|
86
|
+
console.log(formatTraceOutput(lines, opts.trace));
|
|
87
|
+
if (opts.analyze && lines.length > 0) {
|
|
88
|
+
// eslint-disable-next-line no-console -- CLI 命令直接输出到终端
|
|
89
|
+
console.log(analyzeTrace(lines, opts.trace));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
const report = await runDiagnosis({
|
|
94
|
+
config: ctx.config,
|
|
95
|
+
logger: ctx.logger,
|
|
96
|
+
});
|
|
97
|
+
// eslint-disable-next-line no-console -- CLI 命令直接输出到终端
|
|
98
|
+
console.log(formatDiagReportCli(report));
|
|
99
|
+
if (report.overallStatus === 'unhealthy') {
|
|
100
|
+
process.exitCode = 1;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
catch (err) {
|
|
105
|
+
ctx.logger.error(`诊断命令执行失败: ${err}`);
|
|
106
|
+
process.exitCode = 1;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}, { commands: ['feishu-diagnose'] });
|
|
110
|
+
// Chat commands: /feishu_diagnose, /feishu_doctor, /feishu_auth, /feishu
|
|
111
|
+
registerCommands(api);
|
|
112
|
+
// ---- Multi-account security checks ----
|
|
113
|
+
if (api.config) {
|
|
114
|
+
emitSecurityWarnings(api.config, api.logger);
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
export default plugin;
|
|
119
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@larksuite/openclaw-lark",
|
|
3
|
+
"version": "2026.3.9",
|
|
4
|
+
"description": "OpenClaw Feishu/Lark channel plugin (official by Feishu team)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"**/*"
|
|
8
|
+
],
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@larksuiteoapi/node-sdk": "^1.59.0",
|
|
11
|
+
"@sinclair/typebox": "0.34.48",
|
|
12
|
+
"image-size": "^2.0.2",
|
|
13
|
+
"zod": "^4.3.6"
|
|
14
|
+
},
|
|
15
|
+
"openclaw": {
|
|
16
|
+
"extensions": [
|
|
17
|
+
"./index.js"
|
|
18
|
+
],
|
|
19
|
+
"channel": {
|
|
20
|
+
"id": "feishu-openclaw-plugin",
|
|
21
|
+
"label": "Feishu",
|
|
22
|
+
"selectionLabel": "Feishu/Lark (飞书)",
|
|
23
|
+
"docsPath": "/channels/feishu",
|
|
24
|
+
"docsLabel": "feishu",
|
|
25
|
+
"blurb": "飞书/Lark enterprise messaging with doc/wiki/drive/task/calendar tools.",
|
|
26
|
+
"aliases": [
|
|
27
|
+
"lark"
|
|
28
|
+
],
|
|
29
|
+
"order": 35,
|
|
30
|
+
"quickstartAllowFrom": true
|
|
31
|
+
},
|
|
32
|
+
"install": {
|
|
33
|
+
"npmSpec": "@larksuiteoapi/feishu-openclaw-plugin",
|
|
34
|
+
"localPath": "extensions/feishu",
|
|
35
|
+
"defaultChoice": "npm"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"main": "index.js",
|
|
39
|
+
"types": "index.d.ts",
|
|
40
|
+
"exports": {
|
|
41
|
+
".": {
|
|
42
|
+
"types": "./index.d.ts",
|
|
43
|
+
"import": "./index.js",
|
|
44
|
+
"default": "./index.js"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|