Files
openclaw/extensions/zalo/src/runtime-api.ts
T
Peter Steinberger 0e792b6de3 refactor(channels): centralize inbound orchestration and remove internal compat (#109716)
* refactor(channels): centralize inbound turn orchestration

* refactor(runtime): remove stale compatibility paths

* chore(guards): reject internal deprecated API use

* refactor(channels): simplify core turn planning

* chore(guards): keep deprecated checks boundary-focused

* refactor(memory): keep modern config off compat barrel

* fix(msteams): preserve feedback learning

* test(channels): align modern inbound fixtures

* refactor(channels): finish modern inbound migration

* refactor(channels): tighten core inbound kernel

* fix(channels): preserve turn assembly narrowing

* test(sdk): keep runtime mock binding immutable

* test(matrix): isolate read policy runtime

* test(msteams): mock canonical reply factory

* test(slack): mock core inbound turn dispatch

* test(telegram): inject core session recorder

* test(signal): inject core session recorder

* test(googlechat): assert canonical inbound routing

* test(synology-chat): align core turn fixture

* fix(sdk): preserve direct DM runtime compat

* refactor(channels): own inbound envelope compat in core

* refactor(channels): trim inbound dispatch seams

* refactor(channels): remove redundant async wrappers

* test(synology-chat): type canonical dispatcher mock

* refactor(channels): remove remaining dead compat seams

* chore(sdk): refresh API baseline after rebase

* fix(channels): preserve direct DM identity metadata
2026-07-17 00:56:46 -07:00

82 lines
2.6 KiB
TypeScript

// Zalo API module exposes the plugin public contract.
export {
type BaseProbeResult,
type BaseTokenResolution,
type ChannelAccountSnapshot,
type ChannelMessageActionAdapter,
type ChannelMessageActionName,
type ChannelPlugin,
type ChannelStatusIssue,
type GroupPolicy,
type MarkdownTableMode,
type OpenClawConfig,
type OutboundReplyPayload,
type PluginRuntime,
type RegisterWebhookPluginRouteOptions,
type RegisterWebhookTargetOptions,
type ReplyPayload,
type RuntimeEnv,
type SecretInput,
type WizardPrompter,
} from "./runtime-support.js";
export {
DEFAULT_ACCOUNT_ID,
buildChannelConfigSchema,
createDedupeCache,
formatPairingApproveHint,
jsonResult,
normalizeAccountId,
readStringParam,
resolveClientIp,
} from "./runtime-support.js";
export {
addWildcardAllowFrom,
applyAccountNameToChannelSection,
applySetupAccountConfigPatch,
buildSingleChannelSecretPromptState,
mergeAllowFromEntries,
migrateBaseNameToDefaultAccount,
promptSingleChannelSecretInput,
runSingleChannelSecretStep,
setTopLevelChannelDmPolicyWithAllowFrom,
} from "./runtime-support.js";
export {
buildSecretInputSchema,
hasConfiguredSecretInput,
normalizeResolvedSecretInputString,
normalizeSecretInputString,
} from "./runtime-support.js";
export { buildTokenChannelStatusSummary, PAIRING_APPROVED_MESSAGE } from "./runtime-support.js";
export { buildBaseAccountStatusSnapshot } from "./runtime-support.js";
export { chunkTextForOutbound } from "./runtime-support.js";
export { formatAllowFromLowercase, isNormalizedSenderAllowed } from "./runtime-support.js";
export {
resolveDefaultGroupPolicy,
resolveOpenProviderRuntimeGroupPolicy,
warnMissingProviderGroupPolicyFallbackOnce,
} from "./runtime-support.js";
export { createChannelPairingController } from "./runtime-support.js";
export { createChannelMessageReplyPipeline } from "./runtime-support.js";
export { logTypingFailure } from "./runtime-support.js";
export {
deliverTextOrMediaReply,
isNumericTargetId,
sendPayloadWithChunkedTextAndMedia,
} from "./runtime-support.js";
export { waitForAbortSignal } from "./runtime-support.js";
export {
WEBHOOK_ANOMALY_COUNTER_DEFAULTS,
WEBHOOK_RATE_LIMIT_DEFAULTS,
applyBasicWebhookRequestGuards,
createFixedWindowRateLimiter,
createWebhookAnomalyTracker,
readJsonWebhookBodyOrReject,
registerPluginHttpRoute,
registerWebhookTarget,
registerWebhookTargetWithPluginRoute,
resolveWebhookPath,
resolveWebhookTargetWithAuthOrRejectSync,
withResolvedWebhookRequestPipeline,
} from "./runtime-support.js";
export { setZaloRuntime } from "./runtime.js";