mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
docs: document discord extension sources
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Diagnostics Prometheus tests cover service plugin behavior.
|
||||
import type { DiagnosticEventPrivateData } from "openclaw/plugin-sdk/diagnostic-runtime";
|
||||
// Diagnostics Prometheus tests cover service plugin behavior.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { inspectDiscordAccount } from "./src/account-inspect.js";
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export { handleDiscordAction } from "./src/actions/runtime.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export { discordPlugin } from "./src/channel.js";
|
||||
export { discordSetupPlugin } from "./src/channel.setup.js";
|
||||
export {
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export { DiscordChannelConfigSchema } from "./src/config-schema.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
DiscordConfigSchema,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord helper module supports configured state behavior.
|
||||
export function hasDiscordConfiguredState(params: { env?: NodeJS.ProcessEnv }): boolean {
|
||||
return (
|
||||
typeof params.env?.DISCORD_BOT_TOKEN === "string" &&
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export { createThreadBindingManager } from "./src/monitor/thread-bindings.manager.js";
|
||||
export { testing as discordThreadBindingTesting } from "./src/monitor/thread-bindings.manager.js";
|
||||
export {
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
import {
|
||||
listDiscordDirectoryGroupsFromConfig,
|
||||
listDiscordDirectoryPeersFromConfig,
|
||||
} from "./src/directory-config.js";
|
||||
|
||||
export {
|
||||
listDiscordDirectoryGroupsFromConfig,
|
||||
listDiscordDirectoryPeersFromConfig,
|
||||
};
|
||||
export { listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig };
|
||||
|
||||
export const discordDirectoryContractPlugin = {
|
||||
id: "discord",
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export { normalizeCompatibilityConfig, legacyConfigRules } from "./src/doctor-contract.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover index plugin behavior.
|
||||
import { assertBundledChannelEntries } from "openclaw/plugin-sdk/channel-test-helpers";
|
||||
import { describe } from "vitest";
|
||||
import entry from "./index.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin entrypoint registers its OpenClaw integration.
|
||||
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
||||
import { registerDiscordSubagentHooks } from "./subagent-hooks-api.js";
|
||||
import { discordVoiceTranscriptsSourceProvider } from "./transcripts-source-api.js";
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export { detectDiscordLegacyStateMigrations } from "./src/monitor/model-picker-preferences-migrations.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime api.actions behavior.
|
||||
export { handleDiscordAction } from "./src/actions/runtime.js";
|
||||
export {
|
||||
isDiscordModerationAction,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime api.lookup behavior.
|
||||
export { auditDiscordChannelPermissions, collectDiscordAuditChannelIds } from "./src/audit.js";
|
||||
export {
|
||||
listDiscordDirectoryGroupsLive,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime api.monitor behavior.
|
||||
export {
|
||||
allowListMatches,
|
||||
buildDiscordMediaPayload,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime api.send behavior.
|
||||
export {
|
||||
resolveDiscordOutboundSessionRoute,
|
||||
type ResolveDiscordOutboundSessionRouteParams,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime api.threads behavior.
|
||||
export {
|
||||
testing as __testing,
|
||||
testing,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export {
|
||||
discordMessageActions,
|
||||
handleDiscordAction,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export {
|
||||
collectRuntimeConfigAssignments,
|
||||
secretTargetRegistryEntries,
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export { collectDiscordSecurityAuditFindings } from "./src/security-audit.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export {
|
||||
collectUnsupportedSecretRefConfigCandidates,
|
||||
unsupportedSecretRefSurfacePatterns,
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export { normalizeExplicitDiscordSessionKey } from "./src/session-key-normalization.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover setup entry plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import setupEntry from "./setup-entry.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements setup entry behavior.
|
||||
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
||||
|
||||
export default defineBundledChannelSetupEntry({
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover account inspect plugin behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { inspectDiscordAccount } from "./account-inspect.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements account inspect behavior.
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import { normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
||||
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements account token inspect behavior.
|
||||
import {
|
||||
hasConfiguredSecretInput,
|
||||
normalizeSecretInputString,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover accounts plugin behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import {
|
||||
clearRuntimeConfigSnapshot,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements accounts behavior.
|
||||
import {
|
||||
createAccountActionGate,
|
||||
createAccountListHelpers,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements handle action.guild admin behavior.
|
||||
import type { AgentToolResult } from "openclaw/plugin-sdk/agent-core";
|
||||
import {
|
||||
readNonNegativeIntegerParam,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover handle action plugin behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements handle action behavior.
|
||||
import type { AgentToolResult } from "openclaw/plugin-sdk/agent-core";
|
||||
import {
|
||||
readPositiveIntegerParam,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.guild behavior.
|
||||
import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
|
||||
import type { AgentToolResult } from "openclaw/plugin-sdk/agent-core";
|
||||
import { resolveDefaultDiscordAccountId } from "../accounts.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.messaging.messages behavior.
|
||||
import {
|
||||
jsonResult,
|
||||
readPositiveIntegerParam,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.messaging.reactions behavior.
|
||||
import {
|
||||
jsonResult,
|
||||
readPositiveIntegerParam,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.messaging behavior.
|
||||
import { readDiscordComponentSpec } from "../components.js";
|
||||
import type { OpenClawConfig } from "../runtime-api.js";
|
||||
import { sendDiscordComponentMessage } from "../send.components.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.messaging.send behavior.
|
||||
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
||||
import {
|
||||
assertMediaNotDataUrl,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.messaging.shared behavior.
|
||||
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
||||
import { mergeDiscordAccountConfig, resolveDefaultDiscordAccountId } from "../accounts.js";
|
||||
import { createDiscordRuntimeAccountContext } from "../client.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.messaging behavior.
|
||||
import type { AgentToolResult } from "openclaw/plugin-sdk/agent-core";
|
||||
import type { ActionGate, DiscordActionConfig, OpenClawConfig } from "../runtime-api.js";
|
||||
import { handleDiscordMessageManagementAction } from "./runtime.messaging.messages.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.moderation shared behavior.
|
||||
import { PermissionFlagsBits } from "discord-api-types/v10";
|
||||
import { readNonNegativeIntegerParam, readStringParam } from "../runtime-api.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover runtime.moderation.authz plugin behavior.
|
||||
import { PermissionFlagsBits } from "discord-api-types/v10";
|
||||
import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.moderation behavior.
|
||||
import type { AgentToolResult } from "openclaw/plugin-sdk/agent-core";
|
||||
import {
|
||||
type ActionGate,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover runtime.presence plugin behavior.
|
||||
import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { GatewayPlugin } from "../internal/gateway.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.presence behavior.
|
||||
import type { AgentToolResult } from "openclaw/plugin-sdk/agent-core";
|
||||
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
||||
import type { Activity, UpdatePresenceData } from "../internal/gateway.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime.shared behavior.
|
||||
import {
|
||||
parseAvailableTags,
|
||||
readNonNegativeIntegerParam,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover runtime plugin behavior.
|
||||
import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements runtime behavior.
|
||||
import type { AgentToolResult } from "openclaw/plugin-sdk/agent-core";
|
||||
import { createDiscordActionGate } from "../accounts.js";
|
||||
import { readStringParam, type OpenClawConfig } from "../runtime-api.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover api barrel plugin behavior.
|
||||
import { readFileSync } from "node:fs";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover api plugin behavior.
|
||||
import { MAX_TIMER_TIMEOUT_MS } from "openclaw/plugin-sdk/number-runtime";
|
||||
import { withFetchPreconnect } from "openclaw/plugin-sdk/test-env";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
||||
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover approval handler plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { discordApprovalNativeRuntime } from "./approval-handler.runtime.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements approval handler behavior.
|
||||
import { ButtonStyle } from "discord-api-types/v10";
|
||||
import type {
|
||||
ChannelApprovalCapabilityHandlerContext,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover approval native plugin behavior.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements approval native behavior.
|
||||
import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
||||
import type { ChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime";
|
||||
import { resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements approval runtime behavior.
|
||||
export {
|
||||
isChannelExecApprovalClientEnabledFromConfig,
|
||||
matchesApprovalRequestFilters,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements approval shared behavior.
|
||||
import { doesApprovalRequestMatchChannelAccount } from "openclaw/plugin-sdk/approval-native-runtime";
|
||||
import type {
|
||||
ExecApprovalRequest,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements audit core behavior.
|
||||
import { ChannelType } from "discord-api-types/v10";
|
||||
import type {
|
||||
DiscordGuildChannelConfig,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover audit plugin behavior.
|
||||
import { ChannelType } from "discord-api-types/v10";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements audit behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { inspectDiscordAccount } from "./account-inspect.js";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover channel actions.contract plugin behavior.
|
||||
import { installChannelActionsContractSuite } from "openclaw/plugin-sdk/channel-test-helpers";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { describe } from "vitest";
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Discord plugin module implements channel actions behavior.
|
||||
export { handleDiscordMessageAction } from "./actions/handle-action.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover channel actions plugin behavior.
|
||||
import type { ChannelMessageActionContext } from "openclaw/plugin-sdk/channel-contract";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { withEnv } from "openclaw/plugin-sdk/test-env";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements channel actions behavior.
|
||||
import { createUnionActionGate } from "openclaw/plugin-sdk/channel-actions";
|
||||
import type {
|
||||
ChannelMessageActionAdapter,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord API module exposes the plugin public contract.
|
||||
export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
||||
export {
|
||||
buildTokenChannelStatusSummary,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover channel.conversation plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
matchDiscordAcpConversation,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements channel.conversation behavior.
|
||||
import {
|
||||
normalizeLowercaseStringOrEmpty,
|
||||
normalizeOptionalStringifiedId,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements channel.loaders behavior.
|
||||
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
||||
|
||||
let discordProviderRuntimePromise:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover channel.message adapter plugin behavior.
|
||||
import {
|
||||
verifyChannelMessageAdapterCapabilityProofs,
|
||||
verifyChannelMessageLiveCapabilityAdapterProofs,
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Discord plugin module implements channel behavior.
|
||||
export { discordSetupWizard } from "./setup-surface.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements channel.setup behavior.
|
||||
import type { ResolvedDiscordAccount } from "./accounts.js";
|
||||
import type { ChannelPlugin } from "./channel-api.js";
|
||||
import { discordSetupWizard } from "./channel.runtime.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover channel plugin behavior.
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { resolve } from "node:path";
|
||||
import { ChannelType } from "discord-api-types/v10";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements channel behavior.
|
||||
import {
|
||||
buildLegacyDmAccountAllowlistAdapter,
|
||||
createAccountScopedAllowlistNameResolver,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover chunk plugin behavior.
|
||||
import { countLines, hasBalancedFences } from "openclaw/plugin-sdk/test-fixtures";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { chunkDiscordText, chunkDiscordTextWithMode } from "./chunk.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements chunk behavior.
|
||||
import { resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
||||
import { chunkMarkdownTextWithMode, type ChunkMode } from "openclaw/plugin-sdk/reply-chunking";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover client.proxy plugin behavior.
|
||||
import http from "node:http";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { fetch as undiciFetch } from "undici";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover client plugin behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { createDiscordRestClient } from "./client.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements client behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
||||
import type { RetryConfig, RetryRunner } from "openclaw/plugin-sdk/retry-runtime";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements component custom id behavior.
|
||||
import { parseCustomId, type ComponentParserResult } from "./internal/discord.js";
|
||||
|
||||
export const DISCORD_COMPONENT_CUSTOM_ID_KEY = "occomp";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements components registry behavior.
|
||||
import { resolveGlobalMap } from "openclaw/plugin-sdk/global-singleton";
|
||||
import {
|
||||
asDateTimestampMs,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements components.builders behavior.
|
||||
import crypto from "node:crypto";
|
||||
import { ButtonStyle, MessageFlags } from "discord-api-types/v10";
|
||||
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements components.modal behavior.
|
||||
import {
|
||||
buildDiscordModalCustomId as buildDiscordModalCustomIdImpl,
|
||||
parseDiscordModalCustomIdForInteraction as parseDiscordModalCustomIdForInteractionImpl,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements components.parse behavior.
|
||||
import { ButtonStyle, TextInputStyle } from "discord-api-types/v10";
|
||||
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
||||
import type {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover components plugin behavior.
|
||||
import { ButtonStyle, MessageFlags } from "discord-api-types/v10";
|
||||
import { MAX_DATE_TIMESTAMP_MS } from "openclaw/plugin-sdk/number-runtime";
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements components behavior.
|
||||
export {
|
||||
DISCORD_COMPONENT_CUSTOM_ID_KEY,
|
||||
DISCORD_MODAL_CUSTOM_ID_KEY,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord type declarations define plugin contracts.
|
||||
import type { TopLevelComponents } from "./internal/discord.js";
|
||||
|
||||
export type DiscordComponentButtonStyle = "primary" | "secondary" | "success" | "danger" | "link";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover config schema plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { DiscordConfigSchema } from "../config-api.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord helper module supports config schema behavior.
|
||||
import { buildChannelConfigSchema, DiscordConfigSchema } from "../config-api.js";
|
||||
import { discordChannelConfigUiHints } from "./config-ui-hints.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord helper module supports config ui hints behavior.
|
||||
import type { ChannelConfigUiHint } from "openclaw/plugin-sdk/channel-core";
|
||||
|
||||
export const discordChannelConfigUiHints = {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements conversation identity behavior.
|
||||
import {
|
||||
normalizeOptionalLowercaseString,
|
||||
normalizeOptionalString,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements delivery retry behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import {
|
||||
resolveRetryConfig,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements directory cache behavior.
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
||||
import {
|
||||
normalizeLowercaseStringOrEmpty,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord helper module supports directory config behavior.
|
||||
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import {
|
||||
createResolvedDirectoryEntriesLister,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover directory contract plugin behavior.
|
||||
import type { BaseProbeResult, BaseTokenResolution } from "openclaw/plugin-sdk/channel-contract";
|
||||
import { expectDirectoryIds } from "openclaw/plugin-sdk/channel-test-helpers";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover directory live plugin behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import type { DirectoryConfigParams } from "openclaw/plugin-sdk/directory-runtime";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements directory live behavior.
|
||||
import type {
|
||||
ChannelDirectoryEntry,
|
||||
DirectoryConfigParams,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements doctor contract behavior.
|
||||
import type {
|
||||
ChannelDoctorConfigMutation,
|
||||
ChannelDoctorLegacyConfigRule,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements doctor shared behavior.
|
||||
import type { ChannelDoctorLegacyConfigRule } from "openclaw/plugin-sdk/channel-contract";
|
||||
|
||||
// Runtime config loading already normalizes these aliases without rewriting the
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord tests cover doctor plugin behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Discord plugin module implements doctor behavior.
|
||||
import type { ChannelDoctorAdapter } from "openclaw/plugin-sdk/channel-contract";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { collectProviderDangerousNameMatchingScopes } from "openclaw/plugin-sdk/runtime-doctor";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user