Files
openclaw/src/plugin-sdk/webhook-ingress.ts
T
Vincent Koc 21a767639f fix(plugins): unify HTTP route conflict handling (#118203)
* fix(plugins): unify HTTP route conflict handling

* fix(plugins): preserve source-less route replacement

* test(line): type webhook route source
2026-08-04 02:15:00 +08:00

54 lines
1.8 KiB
TypeScript

/**
* Public SDK subpath for webhook ingress guards, targets, and request helpers.
*/
export {
createBoundedCounter,
createFixedWindowRateLimiter,
createWebhookAnomalyTracker,
WEBHOOK_ANOMALY_COUNTER_DEFAULTS,
WEBHOOK_ANOMALY_STATUS_CODES,
WEBHOOK_RATE_LIMIT_DEFAULTS,
type BoundedCounter,
type FixedWindowRateLimiter,
type WebhookAnomalyTracker,
} from "./webhook-memory-guards.js";
export {
applyBasicWebhookRequestGuards,
beginWebhookRequestPipelineOrReject,
createWebhookInFlightLimiter,
isJsonContentType,
isRequestBodyLimitError,
readRequestBodyWithLimit,
readJsonWebhookBodyOrReject,
readWebhookBodyOrReject,
requestBodyErrorToText,
WEBHOOK_BODY_READ_DEFAULTS,
WEBHOOK_IN_FLIGHT_DEFAULTS,
type WebhookBodyReadProfile,
type WebhookInFlightLimiter,
} from "./webhook-request-guards.js";
export {
canonicalizeWebhookRouteKey,
registerPluginHttpRoute,
registerWebhookTarget,
registerWebhookTargetWithPluginRoute,
resolveSingleWebhookTarget,
resolveSingleWebhookTargetAsync,
normalizeWebhookPath,
resolveWebhookPath,
resolveWebhookTargetWithAuthOrReject,
resolveWebhookTargetWithAuthOrRejectSync,
resolveWebhookTargets,
withResolvedWebhookRequestPipeline,
type RegisterWebhookPluginRouteOptions,
type RegisterWebhookTargetOptions,
type RegisteredWebhookTarget,
type WebhookTargetMatchResult,
} from "./webhook-targets.js";
export { resolveRequestClientIp } from "../gateway/net.js";
export { createAuthRateLimiter } from "../gateway/auth-rate-limit.js";
export type { AuthRateLimiter, RateLimitConfig } from "../gateway/auth-rate-limit.js";
export { rawDataToString } from "../infra/ws.js";
export { normalizePluginHttpPath } from "../plugins/http-path.js";
export { DEFAULT_WEBHOOK_MAX_BODY_BYTES } from "../infra/http-body.js";