docs: document channel extension sources

This commit is contained in:
Peter Steinberger
2026-06-04 21:59:00 -04:00
parent 6868cde4d4
commit 58912f8fd8
843 changed files with 847 additions and 14 deletions

View File

@@ -1,3 +1,4 @@
// Feishu API module exposes the plugin public contract.
export { feishuPlugin } from "./src/channel.js";
export { registerFeishuDocTools } from "./src/docx.js";
export { registerFeishuChatTools } from "./src/chat.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements channel entry behavior.
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
export default defineBundledChannelEntry({

View File

@@ -1 +1,2 @@
// Feishu API module exposes the plugin public contract.
export { feishuPlugin } from "./src/channel.js";

View File

@@ -1,3 +1,4 @@
// Feishu API module exposes the plugin public contract.
export { createFeishuThreadBindingManager } from "./src/thread-bindings.js";
export { testing as feishuThreadBindingTesting } from "./src/thread-bindings.js";
export {

View File

@@ -1,3 +1,4 @@
// Feishu plugin entrypoint registers its OpenClaw integration.
import {
defineBundledChannelEntry,
loadBundledEntryExportSync,

View File

@@ -1 +1,2 @@
// Feishu API module exposes the plugin public contract.
export { detectFeishuLegacyStateMigrations } from "./src/dedup-migrations.js";

View File

@@ -1,3 +1,4 @@
// Feishu API module exposes the plugin public contract.
export {
channelSecrets,
collectRuntimeConfigAssignments,

View File

@@ -1 +1,2 @@
// Feishu API module exposes the plugin public contract.
export { collectFeishuSecurityAuditFindings } from "./src/security-audit-shared.js";

View File

@@ -1 +1,2 @@
// Feishu API module exposes the plugin public contract.
export { resolveFeishuSessionConversation as resolveSessionConversation } from "./src/session-conversation.js";

View File

@@ -1,3 +1,4 @@
// Feishu API module exposes the plugin public contract.
export { feishuPlugin } from "./src/channel.js";
export { feishuSetupAdapter } from "./src/setup-core.js";
export { feishuSetupWizard } from "./src/setup-surface.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover setup entry plugin behavior.
import { afterAll, describe, expect, it, vi } from "vitest";
vi.mock("@larksuiteoapi/node-sdk", () => {

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements setup entry behavior.
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
export default defineBundledChannelSetupEntry({

View File

@@ -1,3 +1,4 @@
// Feishu tests cover accounts plugin behavior.
import { describe, expect, it } from "vitest";
import {
FeishuSecretRefUnavailableError,

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements accounts behavior.
import {
DEFAULT_ACCOUNT_ID,
type OpenClawConfig as ClawdbotConfig,

View File

@@ -1,3 +1,4 @@
// Feishu helper module supports agent config behavior.
import type { ClawdbotConfig } from "./bot-runtime-api.js";
type ReasoningDefault = "on" | "stream" | "off";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover app registration plugin behavior.
import { MAX_TIMER_TIMEOUT_MS } from "openclaw/plugin-sdk/number-runtime";
import { afterEach, describe, expect, it, vi } from "vitest";
import { beginAppRegistration, pollAppRegistration } from "./app-registration.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements app registration behavior.
import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
/**
* Feishu app registration via OAuth device-code flow.

View File

@@ -1,3 +1,4 @@
// Feishu tests cover approval auth plugin behavior.
import { describe, expect, it } from "vitest";
import { feishuApprovalAuth } from "./approval-auth.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements approval auth behavior.
import {
createResolvedApproverActionAuthAdapter,
resolveApprovalApprovers,

View File

@@ -1,3 +1,4 @@
// Feishu tests cover async plugin behavior.
import { MAX_TIMER_TIMEOUT_MS } from "openclaw/plugin-sdk/number-runtime";
import { afterEach, describe, expect, it, vi } from "vitest";
import { raceWithTimeoutAndAbort, waitForAbortableDelay } from "./async.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements async behavior.
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
const RACE_TIMEOUT = Symbol("race-timeout");

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements audio preflight behavior.
import { transcribeFirstAudio as transcribeFirstAudioImpl } from "openclaw/plugin-sdk/media-runtime";
type TranscribeFirstAudio = typeof import("openclaw/plugin-sdk/media-runtime").transcribeFirstAudio;

View File

@@ -1,3 +1,4 @@
// Feishu tests cover bitable plugin behavior.
import type * as Lark from "@larksuiteoapi/node-sdk";
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawPluginApi } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements bitable behavior.
import type * as Lark from "@larksuiteoapi/node-sdk";
import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements bot content behavior.
import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
import type { ClawdbotConfig } from "../runtime-api.js";
import { buildFeishuConversationId } from "./conversation-id.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover bot group name plugin behavior.
import { afterAll, describe, it, expect, vi, beforeEach } from "vitest";
import { resolveGroupName, clearGroupNameCache } from "./bot.js";
import type { ResolvedFeishuAccount } from "./types.js";

View File

@@ -1,3 +1,4 @@
// Feishu API module exposes the plugin public contract.
export {
buildAgentMediaPayload,
resolveChannelContextVisibilityMode,

View File

@@ -1,3 +1,4 @@
// Feishu tests cover bot sender name plugin behavior.
import { afterEach, describe, expect, it, vi } from "vitest";
import { resolveFeishuSenderName } from "./bot-sender-name.js";
import { FeishuConfigSchema } from "./config-schema.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements bot sender name behavior.
import {
asDateTimestampMs,
resolveExpiresAtMsFromDurationMs,

View File

@@ -1,3 +1,4 @@
// Feishu tests cover bot.broadcast plugin behavior.
import type { EnvelopeFormatOptions } from "openclaw/plugin-sdk/channel-inbound";
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
import type { ClawdbotConfig, PluginRuntime } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover bot.card action plugin behavior.
import { createRuntimeEnv } from "openclaw/plugin-sdk/plugin-test-runtime";
import { afterAll, afterEach, describe, it, expect, vi, beforeEach } from "vitest";
import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover bot.checkBotMentioned plugin behavior.
import { describe, it, expect } from "vitest";
import { parseFeishuMessageEvent, type FeishuMessageEvent } from "./bot.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover bot.helpers plugin behavior.
import { describe, expect, it } from "vitest";
import type { ClawdbotConfig } from "../runtime-api.js";
import { parseMessageContent } from "./bot-content.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover bot.stripBotMention plugin behavior.
import { describe, expect, it } from "vitest";
import { parseFeishuMessageEvent, type FeishuMessageEvent } from "./bot.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover bot plugin behavior.
import type * as ConversationRuntime from "openclaw/plugin-sdk/conversation-runtime";
import { createRuntimeEnv } from "openclaw/plugin-sdk/plugin-test-runtime";
import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements bot behavior.
import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes";
import {
buildChannelInboundEventContext,

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements card action behavior.
import {
asDateTimestampMs,
isFutureDateTimestampMs,

View File

@@ -1,3 +1,4 @@
// Feishu tests cover card interaction plugin behavior.
import { describe, expect, it } from "vitest";
import {
buildFeishuCardActionTextFallback,

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements card interaction behavior.
import { isRecord } from "./comment-shared.js";
export const FEISHU_CARD_INTERACTION_VERSION = "ocf1";

View File

@@ -1,3 +1,4 @@
// Feishu helper module supports card test helpers behavior.
import { expect } from "vitest";
type MockCalls = {

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements card ux approval behavior.
import { createFeishuCardInteractionEnvelope } from "./card-interaction.js";
import { buildFeishuCardButton, buildFeishuCardInteractionContext } from "./card-ux-shared.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover card ux launcher plugin behavior.
import { createRuntimeEnv } from "openclaw/plugin-sdk/plugin-test-runtime";
import { afterAll, describe, expect, it, vi, beforeEach } from "vitest";
import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements card ux launcher behavior.
import {
asDateTimestampMs,
resolveExpiresAtMsFromDurationMs,

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements card ux shared behavior.
import type { FeishuCardInteractionEnvelope } from "./card-interaction.js";
export function buildFeishuCardButton(params: {

View File

@@ -1,3 +1,4 @@
// Feishu API module exposes the plugin public contract.
export type {
ChannelMessageActionName,
ChannelMeta,

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements channel behavior.
import {
getChatInfo as getChatInfoImpl,
getChatMembers as getChatMembersImpl,

View File

@@ -1,3 +1,4 @@
// Feishu tests cover channel plugin behavior.
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../runtime-api.js";
import { feishuPlugin } from "./channel.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements channel behavior.
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
import {

View File

@@ -1,3 +1,4 @@
// Feishu helper module supports chat schema behavior.
import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
import { Type, type Static } from "typebox";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover chat plugin behavior.
import { createTestPluginApi } from "openclaw/plugin-sdk/plugin-test-api";
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawPluginApi, PluginRuntime } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements chat behavior.
import type * as Lark from "@larksuiteoapi/node-sdk";
import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
import type { OpenClawPluginApi } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements client timeout behavior.
import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
import type { FeishuConfig } from "./types.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover client plugin behavior.
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { FeishuConfigSchema } from "./config-schema.js";
import type { ResolvedFeishuAccount } from "./types.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements client behavior.
import type { Agent } from "node:https";
import { createRequire } from "node:module";
import * as Lark from "@larksuiteoapi/node-sdk";

View File

@@ -1,3 +1,4 @@
// Feishu API module exposes the plugin public contract.
export {
createReplyPrefixContext,
type ClawdbotConfig,

View File

@@ -1,3 +1,4 @@
// Feishu tests cover comment dispatcher plugin behavior.
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
const resolveFeishuRuntimeAccountMock = vi.hoisted(() => vi.fn());

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements comment dispatcher behavior.
import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
import { resolveFeishuRuntimeAccount } from "./accounts.js";
import { createFeishuClient } from "./client.js";

View File

@@ -1,3 +1,4 @@
// Feishu API module exposes the plugin public contract.
export type { OpenClawConfig as ClawdbotConfig } from "openclaw/plugin-sdk/config-contracts";
export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime";
export { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover comment handler plugin behavior.
import type { PreparedInboundReply } from "openclaw/plugin-sdk/channel-inbound";
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
import type { ClawdbotConfig, PluginRuntime } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements comment handler behavior.
import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes";
import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover comment reaction plugin behavior.
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
import type { ClawdbotConfig } from "../runtime-api.js";
import {

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements comment reaction behavior.
import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";
import { resolveFeishuRuntimeAccount } from "./accounts.js";
import { createFeishuClient } from "./client.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover comment shared plugin behavior.
import { describe, expect, it } from "vitest";
import {
parseCommentContentElements,

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements comment shared behavior.
import {
isRecord as sharedIsRecord,
normalizeOptionalString,

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements comment target behavior.
export const FEISHU_COMMENT_FILE_TYPES = ["doc", "docx", "file", "sheet", "slides"] as const;
export type CommentFileType = (typeof FEISHU_COMMENT_FILE_TYPES)[number];

View File

@@ -1,3 +1,4 @@
// Feishu tests cover config schema plugin behavior.
import { describe, expect, it } from "vitest";
import { FeishuConfigSchema, FeishuGroupSchema } from "./config-schema.js";

View File

@@ -1,3 +1,4 @@
// Feishu helper module supports config schema behavior.
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
import { z } from "zod";
export { z };

View File

@@ -1,3 +1,4 @@
// Feishu tests cover conversation id plugin behavior.
import { describe, expect, it } from "vitest";
import { buildFeishuModelOverrideParentCandidates } from "./conversation-id.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements conversation id behavior.
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
export type FeishuGroupSessionScope =

View File

@@ -1,3 +1,4 @@
// Feishu tests cover dedup migrations plugin behavior.
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements dedup migrations behavior.
import { createHash } from "node:crypto";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover dedup plugin behavior.
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements dedup behavior.
import { createHash } from "node:crypto";
import type { PluginStateSyncKeyedStore } from "openclaw/plugin-sdk/plugin-state-runtime";
import {

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements dedupe key behavior.
import { asNullableRecord as readRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
import type { FeishuMessageEvent } from "./event-types.js";
import { normalizeFeishuExternalKey } from "./external-keys.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements directory.static behavior.
import {
listDirectoryGroupEntriesFromMapKeysAndAllowFrom,
listDirectoryUserEntriesFromAllowFromAndMapKeys,

View File

@@ -1,3 +1,4 @@
// Feishu tests cover directory plugin behavior.
import { importFreshModule } from "openclaw/plugin-sdk/test-fixtures";
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
import type { ClawdbotConfig } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements directory behavior.
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
import type { ClawdbotConfig } from "../runtime-api.js";
import { resolveFeishuAccount } from "./accounts.js";

View File

@@ -1,3 +1,4 @@
// Feishu helper module supports doc schema behavior.
import { Type, type Static } from "typebox";
const tableCreationProperties = {

View File

@@ -1,3 +1,4 @@
// Feishu tests cover doctor plugin behavior.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements doctor behavior.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover docx batch insert plugin behavior.
import type * as Lark from "@larksuiteoapi/node-sdk";
import { describe, expect, it, vi } from "vitest";
import { BATCH_SIZE, insertBlocksInBatches } from "./docx-batch-insert.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover docx table ops plugin behavior.
import { describe, expect, it } from "vitest";
import { cleanBlocksForDescendant } from "./docx-table-ops.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements docx types behavior.
type FeishuBlockText = {
elements?: Array<{
text_run?: {

View File

@@ -1,3 +1,4 @@
// Feishu tests cover docx.account selection plugin behavior.
import { afterAll, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import type { OpenClawPluginApi } from "../runtime-api.js";
import { createToolFactoryHarness } from "./tool-factory-test-harness.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover docx plugin behavior.
import { mkdirSync, rmSync, writeFileSync } from "node:fs";
import path from "node:path";
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements docx behavior.
import { existsSync } from "node:fs";
import { homedir } from "node:os";
import { isAbsolute, resolve } from "node:path";

View File

@@ -1,3 +1,4 @@
// Feishu helper module supports drive schema behavior.
import { Type, type Static } from "typebox";
const FileType = Type.Union([

View File

@@ -1,3 +1,4 @@
// Feishu tests cover drive plugin behavior.
import { createTestPluginApi } from "openclaw/plugin-sdk/plugin-test-api";
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawPluginApi, PluginRuntime } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements drive behavior.
import type * as Lark from "@larksuiteoapi/node-sdk";
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
import type { OpenClawPluginApi } from "../runtime-api.js";

View File

@@ -1,3 +1,4 @@
// Feishu tests cover dynamic agent plugin behavior.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements dynamic agent behavior.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements event types behavior.
export type FeishuMessageEvent = {
sender: {
sender_id: {

View File

@@ -1,3 +1,4 @@
// Feishu tests cover external keys plugin behavior.
import { describe, expect, it } from "vitest";
import { normalizeFeishuExternalKey } from "./external-keys.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements external keys behavior.
const CONTROL_CHARS_RE = /\p{Cc}/u;
const MAX_EXTERNAL_KEY_LENGTH = 512;

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements lifecycle support behavior.
import { vi, type Mock } from "vitest";
type BoundConversation = {

View File

@@ -1,3 +1,4 @@
// Feishu tests cover media plugin behavior.
import { realpathSync } from "node:fs";
import fs from "node:fs/promises";
import os from "node:os";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements media behavior.
import fs from "node:fs";
import path from "node:path";
import { Readable } from "node:stream";

View File

@@ -1,3 +1,4 @@
// Feishu type declarations define plugin contracts.
export type MentionTarget = {
openId: string;
name: string;

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements mention behavior.
import type { FeishuMessageEvent } from "./event-types.js";
import type { MentionTarget } from "./mention-target.types.js";
import { isFeishuGroupChatType } from "./types.js";

View File

@@ -1,3 +1,4 @@
// Feishu plugin module implements message action contract behavior.
import type { ChannelMessageActionName } from "openclaw/plugin-sdk/channel-contract";
type MessageActionTargetAliasSpec = {

Some files were not shown because too many files have changed in this diff Show More