import { t as ChatType } from "./chat-type-CK5stkc4.js"; import { n as DEFAULT_ACCOUNT_ID, r as normalizeAccountId, t as resolveThreadSessionKeys } from "./session-key--_1zVBRB.js"; import { $ as ChannelPollContext, $t as MSTeamsReplyStyle, A as ChannelSecurityAdapter, An as SafeBinProfileFixture, At as FasedAgentConfig, B as ChannelCapabilities, C as ChannelLogoutResult, Cn as BlockStreamingCoalesceConfig, Ct as RuntimeEnv, D as ChannelResolveKind, Dn as MarkdownConfig, Dt as resolveIMessageAccount, E as ChannelPairingAdapter, Et as resolveDefaultIMessageAccountId, F as ChannelAccountSnapshot, G as ChannelId, H as ChannelDirectoryEntryKind, I as ChannelAccountState, J as ChannelMessageActionAdapter, K as ChannelLogSink, M as ChannelStatusAdapter, Mn as ReplyPayload, N as BaseProbeResult, Nn as CHANNEL_MESSAGE_ACTION_NAMES, O as ChannelResolveResult, On as MarkdownTableMode, P as BaseTokenResolution, Pt as ModelProviderConfig, Q as ChannelOutboundTargetMode, Qt as MSTeamsConfig, R as ChannelAgentTool, S as ChannelLogoutContext, T as ChannelOutboundContext, Tn as GroupPolicy, Tt as listIMessageAccountIds, U as ChannelGroupContext, V as ChannelDirectoryEntry, W as ChannelHeartbeatDeps, X as ChannelMessagingAdapter, Xt as SignalAccountConfig, Y as ChannelMessageActionContext, Z as ChannelMeta, Zt as MSTeamsChannelConfig, _ as ChannelGatewayContext, a as PromptAccountId, an as GoogleChatGroupConfig, at as ChannelStreamingAdapter, b as ChannelLoginWithQrStartResult, bn as GroupToolPolicyBySenderConfig, ct as ChannelThreadingToolContext, d as ChannelAuthAdapter, dt as OutboundDeliveryResult, en as MSTeamsTeamConfig, et as ChannelPollResult, f as ChannelCommandAdapter, g as ChannelGatewayAdapter, h as ChannelElevatedAdapter, i as ChannelOnboardingDmPolicy, in as GoogleChatDmConfig, it as ChannelStatusIssue, j as ChannelSetupAdapter, jn as GetReplyOptions, k as ChannelResolverAdapter, ln as ChunkMode, lt as ChannelToolSend, m as ChannelDirectoryAdapter, n as ChannelPlugin, nn as GoogleChatActionConfig, nt as ChannelSecurityDmPolicy, o as WizardPrompter, ot as ChannelThreadingAdapter, p as ChannelConfigAdapter, q as ChannelMentionAdapter, r as ChannelOnboardingAdapter, rn as GoogleChatConfig, rt as ChannelSetupInput, s as loadConfig, sn as DmConfig, st as ChannelThreadingContext, t as ChannelConfigSchema, tn as GoogleChatAccountConfig, tt as ChannelSecurityContext, u as ChannelMessageActionName, ut as getChatChannelMeta, v as ChannelGroupAdapter, w as ChannelOutboundAdapter, wn as DmPolicy, wt as ResolvedIMessageAccount, x as ChannelLoginWithQrWaitResult, xn as GroupToolPolicyConfig, y as ChannelHeartbeatAdapter, yn as PollInput, z as ChannelAgentToolFactory } from "./types.plugin-BcSBq42x.js"; import { $ as VideoGenerationResult, A as ProviderAuthResult, An as SessionAcpMeta, At as listLineAccountIds, B as RealtimeVoiceProviderPlugin, Bt as toLocationContext, C as FasedAgentPluginToolFactory, Cn as createActionGate, Ct as ImageGenerationProviderConfiguredContext, D as ProviderAuthContext, Dn as readStringParam, Dt as ImageGenerationSourceImage, E as PluginLogger, En as readReactionParams, Et as ImageGenerationResult, F as ProviderPluginCatalog, Ft as LineChannelData, G as VideoGenerationIgnoredOverride, Gt as resolveOpenProviderRuntimeGroupPolicy, Ht as GROUP_POLICY_BLOCKED_LABEL, I as ProviderPluginWizard, It as LineConfig, J as VideoGenerationProvider, K as VideoGenerationMode, Kt as warnMissingProviderGroupPolicyFallbackOnce, L as ProviderPluginWizardModelPicker, Lt as ResolvedLineAccount, M as ProviderCatalogOrder, Mn as SessionSystemPromptReport, Mt as resolveDefaultLineAccountId, N as ProviderCatalogResult, Nt as resolveLineAccount, O as ProviderAuthKind, On as AcpSessionRuntimeOptions, Ot as HookEntry, P as ProviderPlugin, Pt as LineAccountConfig, Q as VideoGenerationResolution, R as ProviderPluginWizardSetup, Rt as NormalizedLocation, S as FasedAgentPluginToolContext, Sn as AnyAgentTool, St as ImageGenerationProvider, T as ImageGenerationProviderPlugin, Tn as readNumberParam, Tt as ImageGenerationResolution, Ut as resolveAllowlistProviderRuntimeGroupPolicy, V as VideoGenerationProviderPlugin, W as GeneratedVideoAsset, Wt as resolveDefaultGroupPolicy, X as VideoGenerationProviderConfiguredContext, Y as VideoGenerationProviderCapabilities, Z as VideoGenerationRequest, _ as FasedAgentPluginApi, _n as extractOriginalFilename, _t as RealtimeTranscriptionProviderResolveConfigContext, a as PluginRuntimeSessionGetParams, an as WebMediaResult, at as RealtimeVoiceBridgeCreateRequest, b as FasedAgentPluginServiceContext, bn as ResponsePrefixContext, bt as RealtimeTranscriptionSessionCreateRequest, c as PluginRuntimeSessionListResult, cn as formatInboundFromLabel, ct as RealtimeVoiceProviderConfiguredContext, d as PluginRuntimeAdminRpcAuditSink, dn as AckReactionGateParams, dt as RealtimeVoiceRole, et as VideoGenerationSourceAsset, f as PluginRuntimeAdminRpcCallContext, fn as AckReactionScope, ft as RealtimeVoiceTool, g as PluginRegistry, gn as shouldAckReactionForWhatsApp, gt as RealtimeTranscriptionProviderId, h as PluginRuntimeAdminRpcInvoker, hn as shouldAckReaction, ht as RealtimeTranscriptionProviderConfiguredContext, i as PluginRuntimeSessionAuditSink, in as getFileExtension, it as RealtimeVoiceBridgeCallbacks, j as ProviderCatalogContext, jn as SessionEntry, jt as normalizeAccountId$1, k as ProviderAuthMethod, kn as SessionAcpIdentity, kt as ChannelDock, l as PluginRuntimeSessionStatus, ln as resolveControlCommandGate, lt as RealtimeVoiceProviderId, m as PluginRuntimeAdminRpcInvocation, mn as removeAckReactionAfterReply, mt as RealtimeTranscriptionProviderConfig, n as RuntimeLogger, nn as detectMime, o as PluginRuntimeSessionHelpers, on as loadWebMedia, ot as RealtimeVoiceCloseReason, p as PluginRuntimeAdminRpcHelpers, pn as WhatsAppAckReactionMode, pt as RealtimeVoiceToolCallEvent, q as VideoGenerationModeCapabilities, r as PluginRuntimeSessionAuditEvent, rn as extensionForMime, rt as RealtimeVoiceBridge, s as PluginRuntimeSessionListParams, sn as recordInboundSession, st as RealtimeVoiceProviderConfig, t as PluginRuntime, tt as VideoGenerationTransformCapabilities, u as PluginRuntimeAdminRpcAuditEvent, un as resolveToolsBySender, ut as RealtimeVoiceProviderResolveConfigContext, v as FasedAgentPluginConfigSchema, vn as RoutePeerKind, vt as RealtimeTranscriptionSession, w as FasedAgentPluginToolOptions, wn as jsonResult, wt as ImageGenerationRequest, x as FasedAgentPluginTool, xn as createTypingCallbacks, xt as GeneratedImageAsset, y as FasedAgentPluginService, yn as resolveAckReaction, yt as RealtimeTranscriptionSessionCallbacks, z as RealtimeTranscriptionProviderPlugin, zt as formatLocationText } from "./types-CHm_inlK.js"; import { B as ExecTarget, D as normalizeE164, E as escapeRegExp, F as isBlockedHostname, I as isBlockedHostnameOrIp, L as isPrivateIpAddress, M as LookupFn, N as SsrFBlockedError, O as safeParseJson, P as SsrFPolicy, R as ExecAsk, T as clamp, _ as PushTestParams, a as GatewayClient, c as GatewayRequestHandlerOptions, d as GatewayStartupTraceSnapshot, f as ModelCatalogEntry, g as ErrorShape, h as CommandsListResult, k as sleep, l as GatewayRequestHandlers, o as GatewayRequestContext, p as ModelFeature, s as GatewayRequestHandler, u as RespondFn, z as ExecSecurity } from "./types-jHuiH7-5.js"; import { a as VerboseLevel, i as ThinkLevel, n as SkillSnapshot, r as ReasoningLevel } from "./types-D0kDG8l0.js"; import { a as buildChannelConfigSchema, c as emptyPluginConfigSchema, i as setAccountEnabledInConfigSection, n as formatPairingApproveHint, o as applyAccountNameToChannelSection, r as deleteAccountFromConfigSection, s as migrateBaseNameToDefaultAccount, t as PAIRING_APPROVED_MESSAGE } from "./pairing-message-CQJ3plrh.js"; import { a as listDevicePairing, i as approveDevicePairing, n as resolveTailnetHostWithRunner, o as rejectDevicePairing, r as resolveGatewayBindUrl, t as runPluginCommandWithTimeout } from "./run-command-i_W6EFb1.js"; import { _ as buildTokenChannelStatusSummary, a as resolveGoogleChatGroupRequireMention, c as resolveIMessageGroupToolPolicy, g as buildBaseChannelStatusSummary, h as buildBaseAccountStatusSnapshot, n as resolveBlueBubblesGroupToolPolicy, o as resolveGoogleChatGroupToolPolicy, s as resolveIMessageGroupRequireMention, t as resolveBlueBubblesGroupRequireMention, v as collectStatusIssuesFromLastError, y as createDefaultChannelRuntimeState } from "./group-mentions-q3hUTCt7.js"; import { a as SignalConfigSchema, i as MSTeamsConfigSchema, n as GoogleChatConfigSchema, r as IMessageConfigSchema } from "./zod-schema.providers-core-DVdlSg2z.js"; import { d as FileLockHandle, f as FileLockOptions, m as withFileLock, n as fetchWithSsrFGuard, p as acquireFileLock, r as listAgentIds, s as resolveDefaultAgentId, t as resolvePreferredFasedAgentTmpDir } from "./tmp-fased-dir-97JFoPtV.js"; import { ImageContent } from "@mariozechner/pi-ai"; import { AgentMessage } from "@mariozechner/pi-agent-core"; import * as _sinclair_typebox0 from "@sinclair/typebox"; import { z } from "zod"; import { IncomingMessage, ServerResponse } from "node:http"; import { messagingApi } from "@line/bot-sdk"; import WebSocket from "ws"; //#region src/agents/sandbox/backend.d.ts type SandboxBackendExecSpec = { argv: string[]; env: NodeJS.ProcessEnv; stdinMode: "pipe-open" | "pipe-closed"; }; //#endregion //#region src/agents/bash-tools.shared.d.ts type BashSandboxConfig = { containerName: string; workspaceDir: string; containerWorkdir: string; env?: Record; buildExecSpec?: (params: { command: string; workdir?: string; env: Record; usePty: boolean; }) => Promise; finalizeExec?: (params: { status: "completed" | "failed"; exitCode: number | null; timedOut: boolean; token?: unknown; }) => Promise; }; //#endregion //#region src/agents/bash-tools.exec-types.d.ts type ExecToolDefaults = { hasCronTool?: boolean; host?: ExecTarget; security?: ExecSecurity; ask?: ExecAsk; trigger?: string; node?: string; pathPrepend?: string[]; safeBins?: string[]; strictInlineEval?: boolean; safeBinTrustedDirs?: string[]; safeBinProfiles?: Record; agentId?: string; backgroundMs?: number; timeoutSec?: number; approvalRunningNoticeMs?: number; sandbox?: BashSandboxConfig; elevated?: ExecElevatedDefaults; allowBackground?: boolean; scopeKey?: string; sessionKey?: string; messageProvider?: string; currentChannelId?: string; currentThreadTs?: string; accountId?: string; notifyOnExit?: boolean; notifyOnExitEmptySuccess?: boolean; cwd?: string; }; type ExecElevatedDefaults = { enabled: boolean; allowed: boolean; defaultLevel: "on" | "off" | "ask" | "full"; }; //#endregion //#region src/channels/allowlist-match.d.ts type AllowlistMatchSource = "wildcard" | "id" | "name" | "tag" | "username" | "prefixed-id" | "prefixed-user" | "prefixed-name" | "slug" | "localpart"; type AllowlistMatch = { allowed: boolean; matchKey?: string; matchSource?: TSource; }; declare function formatAllowlistMatchMeta(match?: { matchKey?: string; matchSource?: string; } | null): string; declare function resolveAllowlistMatchSimple(params: { allowFrom: Array; senderId: string; senderName?: string | null; allowNameMatching?: boolean; }): AllowlistMatch<"wildcard" | "id" | "name">; //#endregion //#region src/channels/channel-config.d.ts type ChannelMatchSource = "direct" | "parent" | "wildcard"; type ChannelEntryMatch = { entry?: T; key?: string; wildcardEntry?: T; wildcardKey?: string; parentEntry?: T; parentKey?: string; matchKey?: string; matchSource?: ChannelMatchSource; }; declare function normalizeChannelSlug(value: string): string; declare function buildChannelKeyCandidates(...keys: Array): string[]; declare function resolveChannelEntryMatch(params: { entries?: Record; keys: string[]; wildcardKey?: string; }): ChannelEntryMatch; declare function resolveChannelEntryMatchWithFallback(params: { entries?: Record; keys: string[]; parentKeys?: string[]; wildcardKey?: string; normalizeKey?: (value: string) => string; }): ChannelEntryMatch; declare function resolveNestedAllowlistDecision(params: { outerConfigured: boolean; outerMatched: boolean; innerConfigured: boolean; innerMatched: boolean; }): boolean; //#endregion //#region src/auto-reply/reply/history.d.ts declare const DEFAULT_GROUP_HISTORY_LIMIT = 50; /** * Evict oldest keys from a history map when it exceeds MAX_HISTORY_KEYS. * Uses Map's insertion order for LRU-like behavior. */ declare function evictOldHistoryKeys(historyMap: Map, maxKeys?: number): void; type HistoryEntry = { sender: string; body: string; timestamp?: number; messageId?: string; }; declare function recordPendingHistoryEntry(params: { historyMap: Map; historyKey: string; entry: T; limit: number; }): T[]; declare function recordPendingHistoryEntryIfEnabled(params: { historyMap: Map; historyKey: string; entry?: T | null; limit: number; }): T[]; declare function buildPendingHistoryContextFromMap(params: { historyMap: Map; historyKey: string; limit: number; currentMessage: string; formatEntry: (entry: HistoryEntry) => string; lineBreak?: string; }): string; declare function clearHistoryEntries(params: { historyMap: Map; historyKey: string; }): void; declare function clearHistoryEntriesIfEnabled(params: { historyMap: Map; historyKey: string; limit: number; }): void; //#endregion //#region src/auto-reply/tokens.d.ts declare const SILENT_REPLY_TOKEN = "NO_REPLY"; declare function isSilentReplyText(text: string | undefined, token?: string): boolean; //#endregion //#region src/channels/plugins/bluebubbles-actions.d.ts declare const BLUEBUBBLES_ACTIONS: { readonly react: { readonly gate: "reactions"; }; readonly edit: { readonly gate: "edit"; readonly unsupportedOnMacOS26: true; }; readonly unsend: { readonly gate: "unsend"; }; readonly reply: { readonly gate: "reply"; }; readonly sendWithEffect: { readonly gate: "sendWithEffect"; }; readonly renameGroup: { readonly gate: "renameGroup"; readonly groupOnly: true; }; readonly setGroupIcon: { readonly gate: "setGroupIcon"; readonly groupOnly: true; }; readonly addParticipant: { readonly gate: "addParticipant"; readonly groupOnly: true; }; readonly removeParticipant: { readonly gate: "removeParticipant"; readonly groupOnly: true; }; readonly leaveGroup: { readonly gate: "leaveGroup"; readonly groupOnly: true; }; readonly sendAttachment: { readonly gate: "sendAttachment"; }; }; declare const BLUEBUBBLES_ACTION_NAMES: (keyof typeof BLUEBUBBLES_ACTIONS)[]; declare const BLUEBUBBLES_GROUP_ACTIONS: Set<"reactions" | "permissions" | "search" | "timeout" | "broadcast" | "send" | "poll" | "react" | "read" | "edit" | "unsend" | "reply" | "sendWithEffect" | "renameGroup" | "setGroupIcon" | "addParticipant" | "removeParticipant" | "leaveGroup" | "sendAttachment" | "delete" | "pin" | "unpin" | "list-pins" | "thread-create" | "thread-list" | "thread-reply" | "sticker" | "sticker-search" | "member-info" | "role-info" | "emoji-list" | "emoji-upload" | "sticker-upload" | "role-add" | "role-remove" | "channel-info" | "channel-list" | "channel-create" | "channel-edit" | "channel-delete" | "channel-move" | "category-create" | "category-edit" | "category-delete" | "topic-create" | "voice-status" | "event-list" | "event-create" | "kick" | "ban" | "set-presence">; //#endregion //#region src/plugins/http-path.d.ts declare function normalizePluginHttpPath(path?: string | null, fallback?: string | null): string | null; //#endregion //#region src/plugins/http-registry.d.ts type PluginHttpRouteHandler = (req: IncomingMessage, res: ServerResponse) => Promise | void; declare function registerPluginHttpRoute(params: { path?: string | null; fallbackPath?: string | null; handler: PluginHttpRouteHandler; pluginId?: string; source?: string; accountId?: string; log?: (message: string) => void; registry?: PluginRegistry; }): () => void; //#endregion //#region src/video-generation/dashscope-compatible.d.ts declare const DEFAULT_VIDEO_GENERATION_DURATION_SECONDS = 5; declare const DEFAULT_VIDEO_GENERATION_TIMEOUT_MS = 120000; declare const DEFAULT_VIDEO_RESOLUTION_TO_SIZE: Record; type DashscopeVideoGenerationResponse = { output?: { task_id?: string; task_status?: string; submit_time?: string; results?: Array<{ video_url?: string; orig_prompt?: string; actual_prompt?: string; }>; video_url?: string; code?: string; message?: string; }; request_id?: string; code?: string; message?: string; }; declare function buildDashscopeVideoGenerationInput(params: { providerLabel: string; req: VideoGenerationRequest; }): Record; declare function resolveVideoGenerationReferenceUrls(inputImages: VideoGenerationSourceAsset[] | undefined, inputVideos: VideoGenerationSourceAsset[] | undefined): string[]; declare function buildDashscopeVideoGenerationParameters(req: VideoGenerationRequest, resolutionToSize?: Record): Record | undefined; declare function extractDashscopeVideoUrls(payload: DashscopeVideoGenerationResponse): string[]; declare function pollDashscopeVideoTaskUntilComplete(params: { providerLabel: string; taskId: string; headers: Headers; timeoutMs?: number; fetchFn: typeof fetch; baseUrl: string; defaultTimeoutMs?: number; }): Promise; declare function downloadDashscopeGeneratedVideos(params: { providerLabel: string; urls: string[]; timeoutMs?: number; fetchFn: typeof fetch; defaultTimeoutMs?: number; }): Promise; //#endregion //#region src/realtime-transcription/provider-registry.d.ts declare function normalizeRealtimeTranscriptionProviderId(providerId: string | undefined): RealtimeTranscriptionProviderId | undefined; declare function listRealtimeTranscriptionProviders(cfg?: FasedAgentConfig): RealtimeTranscriptionProviderPlugin[]; declare function getRealtimeTranscriptionProvider(providerId: string | undefined, cfg?: FasedAgentConfig): RealtimeTranscriptionProviderPlugin | undefined; declare function canonicalizeRealtimeTranscriptionProviderId(providerId: string | undefined, cfg?: FasedAgentConfig): RealtimeTranscriptionProviderId | undefined; //#endregion //#region src/realtime-voice/provider-registry.d.ts declare function normalizeRealtimeVoiceProviderId(providerId: string | undefined): RealtimeVoiceProviderId | undefined; declare function listRealtimeVoiceProviders(cfg?: FasedAgentConfig): RealtimeVoiceProviderPlugin[]; declare function getRealtimeVoiceProvider(providerId: string | undefined, cfg?: FasedAgentConfig): RealtimeVoiceProviderPlugin | undefined; declare function canonicalizeRealtimeVoiceProviderId(providerId: string | undefined, cfg?: FasedAgentConfig): RealtimeVoiceProviderId | undefined; //#endregion //#region src/config/zod-schema.core.d.ts declare const DmConfigSchema: z.ZodObject<{ historyLimit: z.ZodOptional; }, z.core.$strict>; declare const GroupPolicySchema: z.ZodEnum<{ allowlist: "allowlist"; open: "open"; disabled: "disabled"; }>; declare const DmPolicySchema: z.ZodEnum<{ pairing: "pairing"; allowlist: "allowlist"; open: "open"; disabled: "disabled"; }>; declare const BlockStreamingCoalesceSchema: z.ZodObject<{ minChars: z.ZodOptional; maxChars: z.ZodOptional; idleMs: z.ZodOptional; }, z.core.$strict>; declare const ReplyRuntimeConfigSchemaShape: { historyLimit: z.ZodOptional; dmHistoryLimit: z.ZodOptional; dms: z.ZodOptional; }, z.core.$strict>>>>; textChunkLimit: z.ZodOptional; chunkMode: z.ZodOptional>; blockStreaming: z.ZodOptional; blockStreamingCoalesce: z.ZodOptional; maxChars: z.ZodOptional; idleMs: z.ZodOptional; }, z.core.$strict>>; responsePrefix: z.ZodOptional; mediaMaxMb: z.ZodOptional; }; declare const MarkdownTableModeSchema: z.ZodEnum<{ off: "off"; bullets: "bullets"; code: "code"; }>; declare const MarkdownConfigSchema: z.ZodOptional>; }, z.core.$strict>>; declare const TtsProviderSchema: z.ZodEnum<{ openai: "openai"; elevenlabs: "elevenlabs"; edge: "edge"; }>; declare const TtsModeSchema: z.ZodEnum<{ all: "all"; final: "final"; }>; declare const TtsAutoSchema: z.ZodEnum<{ off: "off"; always: "always"; inbound: "inbound"; tagged: "tagged"; }>; declare const TtsConfigSchema: z.ZodOptional>; enabled: z.ZodOptional; mode: z.ZodOptional>; provider: z.ZodOptional>; summaryModel: z.ZodOptional; modelOverrides: z.ZodOptional; allowText: z.ZodOptional; allowProvider: z.ZodOptional; allowVoice: z.ZodOptional; allowModelId: z.ZodOptional; allowVoiceSettings: z.ZodOptional; allowNormalization: z.ZodOptional; allowSeed: z.ZodOptional; }, z.core.$strict>>; elevenlabs: z.ZodOptional; baseUrl: z.ZodOptional; voiceId: z.ZodOptional; modelId: z.ZodOptional; seed: z.ZodOptional; applyTextNormalization: z.ZodOptional>; languageCode: z.ZodOptional; voiceSettings: z.ZodOptional; similarityBoost: z.ZodOptional; style: z.ZodOptional; useSpeakerBoost: z.ZodOptional; speed: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>>; openai: z.ZodOptional; model: z.ZodOptional; voice: z.ZodOptional; }, z.core.$strict>>; edge: z.ZodOptional; voice: z.ZodOptional; lang: z.ZodOptional; outputFormat: z.ZodOptional; pitch: z.ZodOptional; rate: z.ZodOptional; volume: z.ZodOptional; saveSubtitles: z.ZodOptional; proxy: z.ZodOptional; timeoutMs: z.ZodOptional; }, z.core.$strict>>; prefsPath: z.ZodOptional; maxTextLength: z.ZodOptional; timeoutMs: z.ZodOptional; }, z.core.$strict>>; declare const normalizeAllowFrom: (values?: Array) => string[]; declare const requireOpenAllowFrom: (params: { policy?: string; allowFrom?: Array; ctx: z.RefinementCtx; path: Array; message: string; }) => void; //#endregion //#region src/config/zod-schema.agent-runtime.d.ts declare const ToolPolicySchema: z.ZodOptional>; alsoAllow: z.ZodOptional>; deny: z.ZodOptional>; }, z.core.$strict>>; //#endregion //#region src/plugin-sdk/allow-from.d.ts declare function formatAllowFromLowercase(params: { allowFrom: Array; stripPrefixRe?: RegExp; }): string[]; declare function isNormalizedSenderAllowed(params: { senderId: string | number; allowFrom: Array; stripPrefixRe?: RegExp; }): boolean; type ParsedChatAllowTarget = { kind: "chat_id"; chatId: number; } | { kind: "chat_guid"; chatGuid: string; } | { kind: "chat_identifier"; chatIdentifier: string; } | { kind: "handle"; handle: string; }; declare function isAllowedParsedChatSender(params: { allowFrom: Array; sender: string; chatId?: number | null; chatGuid?: string | null; chatIdentifier?: string | null; normalizeSender: (sender: string) => string; parseAllowTarget: (entry: string) => TParsed; }): boolean; //#endregion //#region src/plugin-sdk/group-access.d.ts type SenderGroupAccessReason = "allowed" | "disabled" | "empty_allowlist" | "sender_not_allowlisted"; type SenderGroupAccessDecision = { allowed: boolean; groupPolicy: GroupPolicy; providerMissingFallbackApplied: boolean; reason: SenderGroupAccessReason; }; declare function evaluateSenderGroupAccess(params: { providerConfigPresent: boolean; configuredGroupPolicy?: GroupPolicy; defaultGroupPolicy?: GroupPolicy; groupAllowFrom: string[]; senderId: string; isSenderAllowed: (senderId: string, allowFrom: string[]) => boolean; }): SenderGroupAccessDecision; //#endregion //#region src/plugin-sdk/command-auth.d.ts type ResolveSenderCommandAuthorizationParams = { cfg: FasedAgentConfig; rawBody: string; isGroup: boolean; dmPolicy: string; configuredAllowFrom: string[]; configuredGroupAllowFrom?: string[]; senderId: string; isSenderAllowed: (senderId: string, allowFrom: string[]) => boolean; readAllowFromStore: () => Promise; shouldComputeCommandAuthorized: (rawBody: string, cfg: FasedAgentConfig) => boolean; resolveCommandAuthorizedFromAuthorizers: (params: { useAccessGroups: boolean; authorizers: Array<{ configured: boolean; allowed: boolean; }>; }) => boolean; }; declare function resolveSenderCommandAuthorization(params: ResolveSenderCommandAuthorizationParams): Promise<{ shouldComputeAuth: boolean; effectiveAllowFrom: string[]; effectiveGroupAllowFrom: string[]; senderAllowedForCommands: boolean; commandAuthorized: boolean | undefined; }>; //#endregion //#region src/plugin-sdk/config-paths.d.ts declare function resolveChannelAccountConfigBasePath(params: { cfg: FasedAgentConfig; channelKey: string; accountId: string; }): string; //#endregion //#region src/plugin-sdk/text-chunking.d.ts declare function chunkTextForOutbound(text: string, limit: number): string[]; //#endregion //#region src/plugin-sdk/agent-media-payload.d.ts type AgentMediaPayload = { MediaPath?: string; MediaType?: string; MediaUrl?: string; MediaPaths?: string[]; MediaUrls?: string[]; MediaTypes?: string[]; }; declare function buildAgentMediaPayload(mediaList: Array<{ path: string; contentType?: string | null; }>): AgentMediaPayload; //#endregion //#region src/plugin-sdk/fetch-auth.d.ts type ScopeTokenProvider = { getAccessToken: (scope: string) => Promise; }; declare function fetchWithBearerAuthScopeFallback(params: { url: string; scopes: readonly string[]; tokenProvider?: ScopeTokenProvider; fetchFn?: typeof fetch; requestInit?: RequestInit; requireHttps?: boolean; shouldAttachAuth?: (url: string) => boolean; shouldRetry?: (response: Response) => boolean; }): Promise; //#endregion //#region src/plugin-sdk/json-store.d.ts declare function readJsonFileWithFallback(filePath: string, fallback: T): Promise<{ value: T; exists: boolean; }>; declare function writeJsonFileAtomically(filePath: string, value: unknown): Promise; //#endregion //#region src/plugin-sdk/pairing-access.d.ts type PairingApi = PluginRuntime["channel"]["pairing"]; type ScopedUpsertInput = Omit[0], "channel" | "accountId">; declare function createScopedPairingAccess(params: { core: PluginRuntime; channel: ChannelId; accountId: string; }): { accountId: string; readAllowFromStore: () => Promise; readStoreForDmPolicy: (provider: ChannelId, accountId: string) => Promise; upsertPairingRequest: (input: ScopedUpsertInput) => Promise<{ code: string; created: boolean; }>; }; //#endregion //#region src/plugin-sdk/provider-auth-result.d.ts declare function buildOauthProviderAuthResult(params: { providerId: string; defaultModel: string; access: string; refresh?: string | null; expires?: number | null; email?: string | null; profilePrefix?: string; credentialExtra?: Record; configPatch?: Partial; notes?: string[]; }): ProviderAuthResult; //#endregion //#region src/plugin-sdk/reply-payload.d.ts type OutboundReplyPayload = { text?: string; mediaUrls?: string[]; mediaUrl?: string; replyToId?: string; }; declare function createNormalizedOutboundDeliverer(handler: (payload: OutboundReplyPayload) => Promise): (payload: unknown) => Promise; declare function resolveOutboundMediaUrls(payload: { mediaUrls?: string[]; mediaUrl?: string; }): string[]; declare function formatTextWithAttachmentLinks(text: string | undefined, mediaUrls: string[]): string; declare function sendMediaWithLeadingCaption(params: { mediaUrls: string[]; caption: string; send: (payload: { mediaUrl: string; caption?: string; }) => Promise; onError?: (error: unknown, mediaUrl: string) => void; }): Promise; //#endregion //#region src/plugin-sdk/ssrf-policy.d.ts declare function normalizeHostnameSuffixAllowlist(input?: readonly string[], defaults?: readonly string[]): string[]; declare function isHttpsUrlAllowedByHostnameSuffixAllowlist(url: string, allowlist: readonly string[]): boolean; /** * Converts suffix-style host allowlists (for example "example.com") into SSRF * hostname allowlist patterns used by the shared fetch guard. * * Suffix semantics: * - "example.com" allows "example.com" and "*.example.com" * - "*" disables hostname allowlist restrictions */ declare function buildHostnameAllowlistPolicyFromSuffixAllowlist(allowHosts?: readonly string[]): SsrFPolicy | undefined; //#endregion //#region src/plugin-sdk/temp-path.d.ts declare function withTempDownloadPath(params: { prefix: string; fileName?: string; tmpDir?: string; }, fn: (tmpPath: string) => Promise): Promise; //#endregion //#region src/plugin-sdk/tool-send.d.ts declare function extractToolSend(args: Record, expectedAction?: string): { to: string; accountId?: string; } | null; //#endregion //#region src/plugin-sdk/webhook-path.d.ts declare function normalizeWebhookPath(raw: string): string; declare function resolveWebhookPath(params: { webhookPath?: string; webhookUrl?: string; defaultPath?: string | null; }): string | null; //#endregion //#region src/plugin-sdk/webhook-targets.d.ts type RegisteredWebhookTarget = { target: T; unregister: () => void; }; declare function registerWebhookTarget(targetsByPath: Map, target: T): RegisteredWebhookTarget; declare function resolveWebhookTargets(req: IncomingMessage, targetsByPath: Map): { path: string; targets: T[]; } | null; type WebhookTargetMatchResult = { kind: "none"; } | { kind: "single"; target: T; } | { kind: "ambiguous"; }; declare function resolveSingleWebhookTarget(targets: readonly T[], isMatch: (target: T) => boolean): WebhookTargetMatchResult; declare function resolveSingleWebhookTargetAsync(targets: readonly T[], isMatch: (target: T) => Promise): Promise>; declare function rejectNonPostWebhookRequest(req: IncomingMessage, res: ServerResponse): boolean; //#endregion //#region src/plugin-sdk/persistent-dedupe.d.ts type PersistentDedupeOptions = { ttlMs: number; memoryMaxSize: number; fileMaxEntries: number; resolveFilePath: (namespace: string) => string; lockOptions?: Partial; onDiskError?: (error: unknown) => void; }; type PersistentDedupeCheckOptions = { namespace?: string; now?: number; onDiskError?: (error: unknown) => void; }; type PersistentDedupe = { checkAndRecord: (key: string, options?: PersistentDedupeCheckOptions) => Promise; clearMemory: () => void; memorySize: () => number; }; declare function createPersistentDedupe(options: PersistentDedupeOptions): PersistentDedupe; //#endregion //#region src/plugin-sdk/runtime.d.ts type LoggerLike = { info: (message: string) => void; error: (message: string) => void; }; declare function createLoggerBackedRuntime(params: { logger: LoggerLike; exitError?: (code: number) => Error; }): RuntimeEnv; //#endregion //#region src/infra/dedupe.d.ts type DedupeCache = { check: (key: string | undefined | null, now?: number) => boolean; peek: (key: string | undefined | null, now?: number) => boolean; clear: () => void; size: () => number; }; type DedupeCacheOptions = { ttlMs: number; maxSize: number; }; declare function createDedupeCache(options: DedupeCacheOptions): DedupeCache; //#endregion //#region src/infra/abort-signal.d.ts declare function waitForAbortSignal(signal?: AbortSignal): Promise; //#endregion //#region src/infra/errors.d.ts declare function formatErrorMessage(err: unknown): string; //#endregion //#region src/logging/redact.d.ts type RedactSensitiveMode = "off" | "tools"; type RedactOptions = { mode?: RedactSensitiveMode; patterns?: string[]; }; declare function redactSensitiveText(text: string, options?: RedactOptions): string; //#endregion //#region src/shared/net/redact-sensitive-url.d.ts declare function redactSensitiveUrl(value: string): string; declare function redactSensitiveUrlLikeString(value: string): string; //#endregion //#region src/agents/pi-embedded-messaging.d.ts type MessagingToolSend = { tool: string; provider: string; accountId?: string; to?: string; threadId?: string; }; //#endregion //#region src/process/command-queue.d.ts declare function enqueueCommand(task: () => Promise, opts?: { warnAfterMs?: number; onWait?: (waitMs: number, queuedAhead: number) => void; }): Promise; //#endregion //#region src/agents/pi-embedded-runner/types.d.ts type EmbeddedPiAgentMeta = { sessionId: string; provider: string; model: string; compactionCount?: number; promptTokens?: number; usage?: { input?: number; output?: number; cacheRead?: number; cacheWrite?: number; total?: number; }; /** * Usage from the last individual API call (not accumulated across tool-use * loops or compaction retries). Used for context-window utilization display * (`totalTokens` in sessions.json) because the accumulated `usage.input` * sums input tokens from every API call in the run, which overstates the * actual context size. */ lastCallUsage?: { input?: number; output?: number; cacheRead?: number; cacheWrite?: number; total?: number; }; /** * Token count estimate after the most recent successful auto-compaction. * Used as the freshest context snapshot when the follow-up model call omits * usage metadata. */ compactionTokensAfter?: number; }; type EmbeddedPiRunMeta = { durationMs: number; agentMeta?: EmbeddedPiAgentMeta; aborted?: boolean; systemPromptReport?: SessionSystemPromptReport; error?: { kind: "context_overflow" | "compaction_failure" | "role_ordering" | "image_size" | "retry_limit"; message: string; }; /** Stop reason for the agent run (e.g., "completed", "tool_calls"). */ stopReason?: string; /** Pending tool calls when stopReason is "tool_calls". */ pendingToolCalls?: Array<{ id: string; name: string; arguments: string; }>; }; type EmbeddedPiRunResult = { payloads?: Array<{ text?: string; mediaUrl?: string; mediaUrls?: string[]; replyToId?: string; isError?: boolean; }>; meta: EmbeddedPiRunMeta; didSendViaMessagingTool?: boolean; messagingToolSentTexts?: string[]; messagingToolSentMediaUrls?: string[]; messagingToolSentTargets?: MessagingToolSend[]; successfulCronAdds?: number; }; //#endregion //#region src/sessions/input-provenance.d.ts declare const INPUT_PROVENANCE_KIND_VALUES: readonly ["external_user", "inter_session", "internal_system"]; type InputProvenanceKind = (typeof INPUT_PROVENANCE_KIND_VALUES)[number]; type InputProvenance = { kind: InputProvenanceKind; sourceSessionKey?: string; sourceChannel?: string; sourceTool?: string; }; //#endregion //#region src/commands/agent/types.d.ts type AgentStreamParams = { /** Provider stream params override (best-effort). */temperature?: number; maxTokens?: number; }; //#endregion //#region src/agents/pi-embedded-payloads.d.ts type BlockReplyPayload = { text?: string; mediaUrls?: string[]; audioAsVoice?: boolean; isReasoning?: boolean; replyToId?: string; replyToTag?: boolean; replyToCurrent?: boolean; }; //#endregion //#region src/agents/pi-embedded-block-chunker.d.ts type BlockReplyChunking = { minChars: number; maxChars: number; breakPreference?: "paragraph" | "newline" | "sentence"; /** When true, prefer \n\n paragraph boundaries once minChars has been satisfied. */ flushOnParagraph?: boolean; }; //#endregion //#region src/agents/pi-embedded-subscribe.types.d.ts type ToolResultFormat = "markdown" | "plain"; //#endregion //#region src/agents/pi-embedded-runner/run/params.d.ts type ClientToolDefinition = { type: "function"; function: { name: string; description?: string; parameters?: Record; }; }; type EmbeddedRunTrigger = "cron" | "heartbeat" | "manual" | "memory" | "overflow" | "user"; type RunEmbeddedPiAgentParams = { sessionId: string; sessionKey?: string; agentId?: string; messageChannel?: string; messageProvider?: string; agentAccountId?: string; /** What initiated this agent run. */ trigger?: EmbeddedRunTrigger; /** Delivery target (e.g. telegram:group:123:topic:456) for topic/thread routing. */ messageTo?: string; /** Thread/topic identifier for routing replies to the originating thread. */ messageThreadId?: string | number; /** Group id for channel-level tool policy resolution. */ groupId?: string | null; /** Group channel label (e.g. #general) for channel-level tool policy resolution. */ groupChannel?: string | null; /** Group space label (e.g. guild/team id) for channel-level tool policy resolution. */ groupSpace?: string | null; /** Parent session key for subagent policy inheritance. */ spawnedBy?: string | null; senderId?: string | null; senderName?: string | null; senderUsername?: string | null; senderE164?: string | null; /** Whether the sender is an owner (required for owner-only tools). */ senderIsOwner?: boolean; /** Current channel ID for auto-threading (Slack). */ currentChannelId?: string; /** Current thread timestamp for auto-threading (Slack). */ currentThreadTs?: string; /** Current inbound message id for action fallbacks (e.g. Telegram react). */ currentMessageId?: string | number; /** Reply-to mode for Slack auto-threading. */ replyToMode?: "off" | "first" | "all"; /** Mutable ref to track if a reply was sent (for "first" mode). */ hasRepliedRef?: { value: boolean; }; /** Require explicit message tool targets (no implicit last-route sends). */ requireExplicitMessageTarget?: boolean; /** If true, omit the message tool from the tool list. */ disableMessageTool?: boolean; sessionFile: string; workspaceDir: string; agentDir?: string; config?: FasedAgentConfig; skillsSnapshot?: SkillSnapshot; prompt: string; images?: ImageContent[]; /** Optional client-provided tools (OpenResponses hosted tools). */ clientTools?: ClientToolDefinition[]; /** Disable built-in tools for this run (LLM-only mode). */ disableTools?: boolean; /** Exact tool names to deny after normal tool policy resolution. */ disabledToolNames?: string[]; /** If true, clear loaded transcript messages before sending this prompt. */ omitPriorMessages?: boolean; provider?: string; model?: string; authProfileId?: string; authProfileIdSource?: "auto" | "user"; /** Allow one explicit probe when every auth profile is inside a cooldown/disabled window. */ allowTransientCooldownProbe?: boolean; thinkLevel?: ThinkLevel; verboseLevel?: VerboseLevel; reasoningLevel?: ReasoningLevel; toolResultFormat?: ToolResultFormat; /** If true, suppress tool error warning payloads for this run (including mutating tools). */ suppressToolErrorWarnings?: boolean; execOverrides?: Pick; bashElevated?: ExecElevatedDefaults; timeoutMs: number; runId: string; abortSignal?: AbortSignal; shouldEmitToolResult?: () => boolean; shouldEmitToolOutput?: () => boolean; onPartialReply?: (payload: { text?: string; mediaUrls?: string[]; }) => void | Promise; onAssistantMessageStart?: () => void | Promise; onBlockReply?: (payload: BlockReplyPayload) => void | Promise; onBlockReplyFlush?: () => void | Promise; blockReplyBreak?: "text_end" | "message_end"; blockReplyChunking?: BlockReplyChunking; onReasoningStream?: (payload: { text?: string; mediaUrls?: string[]; }) => void | Promise; onReasoningEnd?: () => void | Promise; onToolResult?: (payload: { text?: string; mediaUrls?: string[]; }) => void | Promise; onAgentEvent?: (evt: { stream: string; data: Record; }) => void; lane?: string; enqueue?: typeof enqueueCommand; extraSystemPrompt?: string; inputProvenance?: InputProvenance; streamParams?: AgentStreamParams; ownerNumbers?: string[]; enforceFinalTag?: boolean; /** Legacy test/runtime flag; bundle MCP cleanup is now handled by run lifecycle. */ cleanupBundleMcpOnRunEnd?: boolean; }; //#endregion //#region src/agents/pi-embedded-runner/run.d.ts declare function runEmbeddedPiAgent(params: RunEmbeddedPiAgentParams): Promise; //#endregion //#region src/federation/runtime.d.ts declare const DEFAULT_FEDERATION_BASE_URL = "https://ff1.fased.app"; declare function normalizeHandle(raw: string, domain: string): string; declare function resolveFederationBaseUrl(env?: NodeJS.ProcessEnv): string; declare function resolveAgentPublicOrigin(env?: NodeJS.ProcessEnv): string; declare function resolveFederationHandle(params?: { env?: NodeJS.ProcessEnv; fallbackDomain?: string; nodeId?: string; }): string; //#endregion //#region src/federation/auto-connect.d.ts type FederationLogger = { info?: (message: string) => void; warn?: (message: string) => void; error?: (message: string) => void; }; type AutoConnectResult = { enabled: boolean; handle?: string; baseUrl?: string; nodeEndpoint?: string; reason?: string; }; declare function runFederationAutoConnectOnce(opts?: { env?: NodeJS.ProcessEnv; log?: FederationLogger; }): Promise; declare function startFederationAutoConnect(opts?: { env?: NodeJS.ProcessEnv; log?: FederationLogger; }): { stop: () => void; state: AutoConnectResult; } | null; //#endregion //#region src/gateway/mutating-admin-rpc-rate-limit.d.ts type MutatingAdminRpcRateLimitMethod = "chat.inject" | "doctor.memory.repair.execute" | "push.test" | "secrets.reload" | "web.login.start" | "web.login.wait"; //#endregion //#region src/acp/acpx-mutating-wrapper-policy.d.ts type AcpxMutatingWrapperGate = "operator-scope" | "operator-confirmation" | "plugin-admin-rpc-grant" | "plugin-source-allowlist" | "audit" | "rate-limit" | "gateway-token" | "explicit-wrapper-enable"; type AcpxMutatingWrapperForbiddenSurface = "generic-gateway-dispatcher" | "client-supplied-mcpServers" | "cli-mcp" | "untrusted-plugin-source" | "bulk-enable-all-admin-rpcs"; type AcpxMutatingWrapperGateState = Partial>; type AcpxMutatingWrapperForbiddenSurfaceState = Partial>; type AcpxMutatingWrapperRuntimeGateDecision = { wrapperId: string; method?: MutatingAdminRpcRateLimitMethod; allowed: boolean; reason: "allowed" | "unknown-wrapper" | "denied-wrapper" | "not-allowlisted" | "forbidden-surface" | "missing-gates"; missingGates: AcpxMutatingWrapperGate[]; activeForbiddenSurfaces: AcpxMutatingWrapperForbiddenSurface[]; }; //#endregion //#region src/acp/acpx-push-test-approval-contract.d.ts declare const ACPX_PUSH_TEST_WRAPPER_ID = "fased_push_test_request"; declare const ACPX_PUSH_TEST_METHOD = "push.test"; type AcpxPushTestApprovalContractSchemaVersion = 1; type AcpxPushTestOperatorApproval = { confirmation: "none"; acceptedRequestFingerprint?: string; operatorId?: string; approvedAt?: string; } | { confirmation: "operator-confirmed"; acceptedRequestFingerprint: string; operatorId?: string; approvedAt: string; }; type AcpxPushTestApprovalContractRequest = { schemaVersion: AcpxPushTestApprovalContractSchemaVersion; kind: "acpx.mutating-wrapper.push-test.execution.request"; wrapperId: typeof ACPX_PUSH_TEST_WRAPPER_ID; method: typeof ACPX_PUSH_TEST_METHOD; dryRun: true; requestId: string; createdAt: string; params: PushTestParams; approval: AcpxPushTestOperatorApproval; gate: { gates?: AcpxMutatingWrapperGateState; forbiddenSurfaces?: AcpxMutatingWrapperForbiddenSurfaceState; allowWrappers?: readonly string[]; denyWrappers?: readonly string[]; }; }; type AcpxPushTestApprovalContractResponseStage = "request" | "operator-approval" | "runtime-gate" | "admitted"; type AcpxPushTestApprovalContractResponse = { schemaVersion: AcpxPushTestApprovalContractSchemaVersion; kind: "acpx.mutating-wrapper.push-test.execution.response"; wrapperId: typeof ACPX_PUSH_TEST_WRAPPER_ID; method: typeof ACPX_PUSH_TEST_METHOD; dryRun: true; noExecutionPerformed: true; requestId: string; createdAt: string; status: "admitted" | "denied"; stage: AcpxPushTestApprovalContractResponseStage; requestFingerprint: string; reasons: string[]; safeSummary: { nodeId: string | null; environment: "sandbox" | "production" | null; titleProvided: boolean; bodyProvided: boolean; }; gate?: AcpxMutatingWrapperRuntimeGateDecision; }; //#endregion //#region src/acp/acpx-push-test-execution-adapter.d.ts type AcpxPushTestExecutionGate = { enabled: boolean; allowExecution: boolean; gatewayHandlerRegistered: boolean; }; type AcpxPushTestExecutionAdapterInput = { request: AcpxPushTestApprovalContractRequest; executionGate: AcpxPushTestExecutionGate; handler?: GatewayRequestHandler; context: GatewayRequestContext; client: GatewayClient | null; isWebchatConnect?: GatewayRequestHandlerOptions["isWebchatConnect"]; }; type AcpxPushTestExecutionAdapterResult = { schemaVersion: 1; kind: "acpx.mutating-wrapper.push-test.execution.result"; wrapperId: typeof ACPX_PUSH_TEST_WRAPPER_ID; method: typeof ACPX_PUSH_TEST_METHOD; requestId: string; status: "executed" | "denied" | "failed"; executionPerformed: boolean; noGenericDispatcher: true; contract: AcpxPushTestApprovalContractResponse; reasons: string[]; safeSummary: AcpxPushTestApprovalContractResponse["safeSummary"]; result?: { ok?: boolean; status?: number; reason?: string; environment?: string; apnsId?: string; tokenSuffix?: string; topic?: string; }; error?: { code?: ErrorShape["code"]; message: string; }; }; declare function executeAcpxPushTestRequest(input: AcpxPushTestExecutionAdapterInput): Promise; //#endregion //#region src/agents/tools-effective-inventory.d.ts type EffectiveToolSource = "core" | "plugin" | "channel"; type EffectiveToolInventoryEntry = { id: string; label: string; description: string; rawDescription: string; source: EffectiveToolSource; pluginId?: string; channelId?: string; }; type EffectiveToolInventoryGroup = { id: EffectiveToolSource; label: string; source: EffectiveToolSource; tools: EffectiveToolInventoryEntry[]; }; type EffectiveToolInventoryResult = { agentId: string; profile: string; groups: EffectiveToolInventoryGroup[]; }; type ResolveEffectiveToolInventoryParams = { cfg: FasedAgentConfig; agentId?: string; sessionKey?: string; workspaceDir?: string; agentDir?: string; messageProvider?: string; senderIsOwner?: boolean; senderId?: string | null; senderName?: string | null; senderUsername?: string | null; senderE164?: string | null; accountId?: string | null; modelProvider?: string; modelId?: string; currentChannelId?: string; currentThreadTs?: string; currentMessageId?: string | number; groupId?: string | null; groupChannel?: string | null; groupSpace?: string | null; replyToMode?: "off" | "first" | "all" | "batched"; modelHasVision?: boolean; requireExplicitMessageTarget?: boolean; disableMessageTool?: boolean; }; declare function resolveEffectiveToolInventory(params: ResolveEffectiveToolInventoryParams): EffectiveToolInventoryResult; //#endregion //#region src/gateway/gateway-identity.d.ts type PublicGatewayIdentity = { deviceId: string; publicKey: string; }; declare function getPublicGatewayIdentity(): PublicGatewayIdentity; //#endregion //#region src/commands/status.acpx-bridge.d.ts declare const ACPX_PUSH_TEST_TOOL_NAME = "fased_push_test_request"; type AcpxMcpBridgeModeStatus = "disabled" | "status-only" | "read-only-tools" | "operator-approved-mutating-tools"; type AcpxMcpBridgeStatus = { pluginId: "acpx"; enabled: boolean; mode: AcpxMcpBridgeModeStatus; configuredMode: Exclude; allowTools: string[]; denyTools: string[]; fasedPushTestRequest: { toolName: typeof ACPX_PUSH_TEST_TOOL_NAME; enabled: boolean; allowed: boolean; denied: boolean; reason: string; }; }; //#endregion //#region src/commands/status.strict-agentic.d.ts type StrictAgenticPolicyMode = "off" | "warn"; type StrictAgenticPolicySource = "agent-config" | "default-config" | "environment" | "implicit-default"; type StrictAgenticPolicyStatus = { mode: StrictAgenticPolicyMode; source: StrictAgenticPolicySource; envFlagSet: boolean; enforcementAvailable: false; warningAgents: number; totalAgents: number; agents: Array<{ agentId: string; mode: StrictAgenticPolicyMode; source: StrictAgenticPolicySource; override: boolean; }>; }; //#endregion //#region src/commands/status.types.d.ts type SessionStatus = { agentId?: string; key: string; kind: "direct" | "group" | "global" | "unknown"; sessionId?: string; updatedAt: number | null; age: number | null; thinkingLevel?: string; verboseLevel?: string; reasoningLevel?: string; elevatedLevel?: string; systemSent?: boolean; abortedLastRun?: boolean; inputTokens?: number; outputTokens?: number; totalTokens: number | null; totalTokensFresh: boolean; cacheRead?: number; cacheWrite?: number; remainingTokens: number | null; percentUsed: number | null; model: string | null; contextTokens: number | null; flags: string[]; }; type HeartbeatStatus = { agentId: string; enabled: boolean; every: string; everyMs: number | null; }; type StatusSummary = { gatewayStartup?: GatewayStartupTraceSnapshot | null; acpxMcpBridge?: AcpxMcpBridgeStatus; strictAgentic?: StrictAgenticPolicyStatus; linkChannel?: { id: ChannelId; label: string; linked: boolean; authAgeMs: number | null; }; heartbeat: { defaultAgentId: string; agents: HeartbeatStatus[]; }; channelSummary: string[]; queuedSystemEvents: string[]; sessions: { paths: string[]; count: number; defaults: { model: string | null; contextTokens: number | null; }; recent: SessionStatus[]; byAgent: Array<{ agentId: string; path: string; count: number; recent: SessionStatus[]; }>; }; }; //#endregion //#region src/commands/status.summary.d.ts declare function getStatusSummary(options?: { includeSensitive?: boolean; }): Promise; //#endregion //#region src/gateway/server-model-catalog.d.ts type GatewayModelChoice = ModelCatalogEntry; type LoadModelCatalog = (params: { config: FasedAgentConfig; readOnly?: boolean; useCache?: boolean; }) => Promise; type LoadGatewayModelCatalogParams = { getConfig?: () => FasedAgentConfig; loadModelCatalog?: LoadModelCatalog; readOnly?: boolean; }; declare function loadGatewayModelCatalog(params?: LoadGatewayModelCatalogParams): Promise; //#endregion //#region src/providers/health.d.ts type ProviderHealthState = "ok" | "fail" | "unknown"; type ProviderHealth = { provider: string; reachable: ProviderHealthState; auth: ProviderHealthState; modelsDiscovered: number; privateNetworkApproved: boolean; checkedAtMs?: number; detail?: string; }; //#endregion //#region src/agents/provider-extension-catalog-index.d.ts type ProviderExtensionCatalogSource = "bundled" | "workspace" | "global" | "config"; type ProviderExtensionCatalogEntryStatus = { id: string; source: ProviderExtensionCatalogSource; trusted: boolean; providerIds: string[]; loadedProviderIds: string[]; modelCount: number; status: "loaded" | "skipped-untrusted" | "empty" | "error"; error?: string; }; type ProviderExtensionCatalogIndex = { providers: Record; entries: ProviderExtensionCatalogEntryStatus[]; }; //#endregion //#region src/agents/model-catalog-status.d.ts type ModelCatalogCapabilityCounts = Record<`${ModelFeature}Models`, number>; declare function buildModelCatalogStatus(params: { catalog: ModelCatalogEntry[]; cfg: FasedAgentConfig; providerExtensionCatalog?: ProviderExtensionCatalogIndex; providerHealth?: Record; checkedAtMs?: number; }): { checkedAtMs: number; cache: { modelCatalog: string; providerExtensionCatalog: string; }; totalProviders: number; totalModels: number; configuredProviders: number; availableProviders: number; reasoningModels: number; visionModels: number; capabilityCounts: ModelCatalogCapabilityCounts; sourceCounts: Record; providers: { maxOutputTokens?: number | undefined; maxContextWindow?: number | undefined; health?: { detail?: string | undefined; checkedAtMs?: number | undefined; reachable: ProviderHealthState; auth: ProviderHealthState; modelsDiscovered: number; privateNetworkApproved: boolean; } | undefined; provider: string; totalModels: number; configured: boolean; reasoningModels: number; visionModels: number; sources: string[]; sourceConfidence: string; capabilityCounts: ModelCatalogCapabilityCounts; authModes: string[]; privateNetwork: { models: number; allowed: number; blocked: number; }; probeStatus: string; }[]; providerExtensionCatalog: { totalEntries: number; loadedEntries: number; skippedUntrustedEntries: number; emptyEntries: number; errorEntries: number; modelCount: number; loadedProviderIds: string[]; warnings: { error?: string | undefined; id: string; source: ProviderExtensionCatalogSource; trusted: boolean; providerIds: string[]; loadedProviderIds: string[]; modelCount: number; status: "error" | "loaded" | "skipped-untrusted" | "empty"; }[]; entries: { error?: string | undefined; id: string; source: ProviderExtensionCatalogSource; trusted: boolean; providerIds: string[]; loadedProviderIds: string[]; modelCount: number; status: "error" | "loaded" | "skipped-untrusted" | "empty"; }[]; }; providerExtensionManifest: { upstreamProviderCount: number; mappedProviderCount: number; deferredProviderCount: number; mappedProviderIds: string[]; deferredProviderIds: string[]; missingMappedProviderIds: string[]; }; }; //#endregion //#region src/infra/update-channels.d.ts type UpdateChannel = "stable" | "beta" | "dev"; type UpdateChannelSource = "config" | "git-tag" | "git-branch" | "default"; //#endregion //#region src/infra/update-check.d.ts type PackageManager = "pnpm" | "bun" | "npm" | "unknown"; type GitUpdateStatus = { root: string; sha: string | null; tag: string | null; branch: string | null; upstream: string | null; dirty: boolean | null; ahead: number | null; behind: number | null; fetchOk: boolean | null; error?: string; }; type DepsStatus = { manager: PackageManager; status: "ok" | "missing" | "stale" | "unknown"; lockfilePath: string | null; markerPath: string | null; reason?: string; }; type RegistryStatus = { latestVersion: string | null; error?: string; }; type UpdateCheckResult = { root: string | null; installKind: "git" | "package" | "unknown"; packageManager: PackageManager; git?: GitUpdateStatus; deps?: DepsStatus; registry?: RegistryStatus; }; //#endregion //#region src/commands/status.update.d.ts type UpdateAvailability = { available: boolean; hasGitUpdate: boolean; hasRegistryUpdate: boolean; latestVersion: string | null; gitBehind: number | null; }; declare function resolveUpdateAvailability(update: UpdateCheckResult, opts?: { channel?: UpdateChannel; }): UpdateAvailability; //#endregion //#region src/gateway/update-status.d.ts type GatewayUpdateStatusResult = { ok: true; update: UpdateCheckResult; availability: ReturnType; channel: { channel: UpdateChannel; source: UpdateChannelSource; label: string; config: UpdateChannel | null; }; probes: { fetchGit: boolean; includeRegistry: boolean; timeoutMs: number; }; summary: string; }; declare function getGatewayUpdateStatus(params?: { timeoutMs?: unknown; fetchGit?: unknown; includeRegistry?: unknown; }): Promise; //#endregion //#region src/gateway/server-methods/commands.d.ts declare function buildCommandsListResult(params: { cfg: ReturnType; agentId: string; provider?: string; scope?: "native" | "text" | "both"; includeArgs?: boolean; }): CommandsListResult; //#endregion //#region src/acp/runtime/types.d.ts type AcpRuntimePromptMode = "prompt" | "steer"; type AcpRuntimeSessionMode = "persistent" | "oneshot"; type AcpRuntimeControl = "session/set_mode" | "session/set_config_option" | "session/status"; type AcpRuntimeHandle = { sessionKey: string; backend: string; runtimeSessionName: string; /** Effective runtime working directory for this ACP session, if exposed by adapter/runtime. */ cwd?: string; /** Backend-local record identifier, if exposed by adapter/runtime (for example acpx record id). */ acpxRecordId?: string; /** Backend-level ACP session identifier, if exposed by adapter/runtime. */ backendSessionId?: string; /** Upstream harness session identifier, if exposed by adapter/runtime. */ agentSessionId?: string; }; type AcpRuntimeEnsureInput = { sessionKey: string; agent: string; mode: AcpRuntimeSessionMode; cwd?: string; env?: Record; }; type AcpRuntimeTurnInput = { handle: AcpRuntimeHandle; text: string; mode: AcpRuntimePromptMode; requestId: string; signal?: AbortSignal; }; type AcpRuntimeCapabilities = { controls: AcpRuntimeControl[]; /** * Optional backend-advertised option keys for session/set_config_option. * Empty/undefined means "backend accepts keys, but did not advertise a strict list". */ configOptionKeys?: string[]; }; type AcpRuntimeStatus = { summary?: string; /** Backend-local record identifier, if exposed by adapter/runtime. */ acpxRecordId?: string; /** Backend-level ACP session identifier, if known at status time. */ backendSessionId?: string; /** Upstream harness session identifier, if known at status time. */ agentSessionId?: string; details?: Record; }; type AcpRuntimeDoctorReport = { ok: boolean; code?: string; message: string; installCommand?: string; details?: string[]; }; type AcpRuntimeEvent = { type: "text_delta"; text: string; stream?: "output" | "thought"; } | { type: "status"; text: string; } | { type: "tool_call"; text: string; } | { type: "done"; stopReason?: string; } | { type: "error"; message: string; code?: string; retryable?: boolean; }; interface AcpRuntime { ensureSession(input: AcpRuntimeEnsureInput): Promise; runTurn(input: AcpRuntimeTurnInput): AsyncIterable; getCapabilities?(input: { handle?: AcpRuntimeHandle; }): Promise | AcpRuntimeCapabilities; getStatus?(input: { handle: AcpRuntimeHandle; }): Promise; setMode?(input: { handle: AcpRuntimeHandle; mode: string; }): Promise; setConfigOption?(input: { handle: AcpRuntimeHandle; key: string; value: string; }): Promise; doctor?(): Promise; cancel(input: { handle: AcpRuntimeHandle; reason?: string; }): Promise; close(input: { handle: AcpRuntimeHandle; reason: string; }): Promise; } //#endregion //#region src/acp/runtime/errors.d.ts declare const ACP_ERROR_CODES: readonly ["ACP_BACKEND_MISSING", "ACP_BACKEND_UNAVAILABLE", "ACP_BACKEND_UNSUPPORTED_CONTROL", "ACP_DISPATCH_DISABLED", "ACP_INVALID_RUNTIME_OPTION", "ACP_SESSION_INIT_FAILED", "ACP_TURN_FAILED"]; type AcpRuntimeErrorCode = (typeof ACP_ERROR_CODES)[number]; declare class AcpRuntimeError extends Error { readonly code: AcpRuntimeErrorCode; readonly cause?: unknown; constructor(code: AcpRuntimeErrorCode, message: string, options?: { cause?: unknown; }); } //#endregion //#region src/acp/runtime/registry.d.ts type AcpRuntimeBackend = { id: string; runtime: AcpRuntime; healthy?: () => boolean; }; declare function registerAcpRuntimeBackend(backend: AcpRuntimeBackend): void; declare function unregisterAcpRuntimeBackend(id: string): void; declare function requireAcpRuntimeBackend(id?: string): AcpRuntimeBackend; //#endregion //#region src/acp/runtime/session-meta.d.ts type AcpSessionStoreEntry = { cfg: FasedAgentConfig; storePath: string; sessionKey: string; storeSessionKey: string; entry?: SessionEntry; acp?: SessionAcpMeta; storeReadFailed?: boolean; }; declare function readAcpSessionEntry(params: { sessionKey: string; cfg?: FasedAgentConfig; }): AcpSessionStoreEntry | null; declare function listAcpSessionEntries(params: { cfg?: FasedAgentConfig; }): Promise; declare function upsertAcpSessionMeta(params: { sessionKey: string; cfg?: FasedAgentConfig; mutate: (current: SessionAcpMeta | undefined, entry: SessionEntry | undefined) => SessionAcpMeta | null | undefined; }): Promise; //#endregion //#region src/acp/control-plane/manager.types.d.ts type AcpSessionResolution = { kind: "none"; sessionKey: string; } | { kind: "stale"; sessionKey: string; error: AcpRuntimeError; } | { kind: "ready"; sessionKey: string; meta: SessionAcpMeta; }; type AcpInitializeSessionInput = { cfg: FasedAgentConfig; sessionKey: string; agent: string; mode: AcpRuntimeSessionMode; cwd?: string; backendId?: string; }; type AcpRunTurnInput = { cfg: FasedAgentConfig; sessionKey: string; text: string; mode: AcpRuntimePromptMode; requestId: string; signal?: AbortSignal; onEvent?: (event: AcpRuntimeEvent) => Promise | void; }; type AcpCloseSessionInput = { cfg: FasedAgentConfig; sessionKey: string; reason: string; clearMeta?: boolean; allowBackendUnavailable?: boolean; requireAcpSession?: boolean; }; type AcpCloseSessionResult = { runtimeClosed: boolean; runtimeNotice?: string; metaCleared: boolean; }; type AcpSessionStatus = { sessionKey: string; backend: string; agent: string; identity?: SessionAcpIdentity; state: SessionAcpMeta["state"]; mode: AcpRuntimeSessionMode; runtimeOptions: AcpSessionRuntimeOptions; capabilities: AcpRuntimeCapabilities; runtimeStatus?: AcpRuntimeStatus; lastActivityAt: number; lastError?: string; }; type AcpManagerObservabilitySnapshot = { runtimeCache: { activeSessions: number; idleTtlMs: number; evictedTotal: number; lastEvictedAt?: number; }; turns: { active: number; queueDepth: number; completed: number; failed: number; averageLatencyMs: number; maxLatencyMs: number; }; errorsByCode: Record; }; type AcpStartupIdentityReconcileResult = { checked: number; resolved: number; failed: number; }; type AcpSessionManagerDeps = { listAcpSessions: typeof listAcpSessionEntries; readSessionEntry: typeof readAcpSessionEntry; upsertSessionMeta: typeof upsertAcpSessionMeta; requireRuntimeBackend: typeof requireAcpRuntimeBackend; }; //#endregion //#region src/acp/control-plane/manager.core.d.ts declare class AcpSessionManager { private readonly deps; private readonly actorQueue; private readonly actorTailBySession; private readonly runtimeCache; private readonly activeTurnBySession; private readonly turnLatencyStats; private readonly errorCountsByCode; private evictedRuntimeCount; private lastEvictedAt; constructor(deps?: AcpSessionManagerDeps); resolveSession(params: { cfg: FasedAgentConfig; sessionKey: string; }): AcpSessionResolution; getObservabilitySnapshot(cfg: FasedAgentConfig): AcpManagerObservabilitySnapshot; reconcilePendingSessionIdentities(params: { cfg: FasedAgentConfig; }): Promise; initializeSession(input: AcpInitializeSessionInput): Promise<{ runtime: AcpRuntime; handle: AcpRuntimeHandle; meta: SessionAcpMeta; }>; getSessionStatus(params: { cfg: FasedAgentConfig; sessionKey: string; }): Promise; setSessionRuntimeMode(params: { cfg: FasedAgentConfig; sessionKey: string; runtimeMode: string; }): Promise; setSessionConfigOption(params: { cfg: FasedAgentConfig; sessionKey: string; key: string; value: string; }): Promise; updateSessionRuntimeOptions(params: { cfg: FasedAgentConfig; sessionKey: string; patch: Partial; }): Promise; resetSessionRuntimeOptions(params: { cfg: FasedAgentConfig; sessionKey: string; }): Promise; runTurn(input: AcpRunTurnInput): Promise; cancelSession(params: { cfg: FasedAgentConfig; sessionKey: string; reason?: string; }): Promise; closeSession(input: AcpCloseSessionInput): Promise; private ensureRuntimeHandle; private persistRuntimeOptions; private enforceConcurrentSessionLimit; private recordTurnCompletion; private recordErrorCode; private evictIdleRuntimeHandles; private resolveRuntimeCapabilities; private applyRuntimeControls; private setSessionState; private reconcileRuntimeSessionIdentifiers; private writeSessionMeta; private withSessionActor; private getCachedRuntimeState; private setCachedRuntimeState; private clearCachedRuntimeState; } //#endregion //#region src/acp/control-plane/manager.d.ts declare function getAcpSessionManager(): AcpSessionManager; //#endregion //#region src/acp/status-snapshot.d.ts type AcpStatusSnapshotSession = { sessionKey: string; backend: string; agent: string; mode: "persistent" | "oneshot"; state: "idle" | "running" | "error"; lastActivityAt: number; lastError?: string; identity?: { state: "pending" | "resolved"; source: "ensure" | "status" | "event"; acpxRecordId?: string; acpxSessionId?: string; agentSessionId?: string; lastUpdatedAt: number; }; runtimeOptions: { runtimeMode?: string; model?: string; permissionProfile?: string; timeoutSeconds?: number; backendExtrasKeys?: string[]; cwdConfigured: boolean; }; }; type AcpStatusSnapshot = { policy: { enabled: boolean; dispatchEnabled: boolean; backend: string; defaultAgent: string | null; allowedAgents: string[]; maxConcurrentSessions: number | null; }; runtimeBackend: { requestedId: string; registered: boolean; selectedId: string | null; healthy: boolean | null; }; manager: ReturnType["getObservabilitySnapshot"]>; sessions: { total: number; returned: number; limit: number; items: AcpStatusSnapshotSession[]; }; }; declare function getAcpStatusSnapshot(params: { cfg: FasedAgentConfig; limit?: number; }): Promise; //#endregion //#region src/gateway/server-methods/push.d.ts declare const pushHandlers: GatewayRequestHandlers; //#endregion //#region src/infra/http-body.d.ts declare const DEFAULT_WEBHOOK_MAX_BODY_BYTES: number; declare const DEFAULT_WEBHOOK_BODY_TIMEOUT_MS = 30000; type RequestBodyLimitErrorCode = "PAYLOAD_TOO_LARGE" | "REQUEST_BODY_TIMEOUT" | "CONNECTION_CLOSED"; type RequestBodyLimitErrorInit = { code: RequestBodyLimitErrorCode; message?: string; }; declare class RequestBodyLimitError extends Error { readonly code: RequestBodyLimitErrorCode; readonly statusCode: number; constructor(init: RequestBodyLimitErrorInit); } declare function isRequestBodyLimitError(error: unknown, code?: RequestBodyLimitErrorCode): error is RequestBodyLimitError; declare function requestBodyErrorToText(code: RequestBodyLimitErrorCode): string; type ReadRequestBodyOptions = { maxBytes: number; timeoutMs?: number; encoding?: BufferEncoding; }; declare function readRequestBodyWithLimit(req: IncomingMessage, options: ReadRequestBodyOptions): Promise; type ReadJsonBodyResult = { ok: true; value: unknown; } | { ok: false; error: string; code: RequestBodyLimitErrorCode | "INVALID_JSON"; }; type ReadJsonBodyOptions = ReadRequestBodyOptions & { emptyObjectOnEmpty?: boolean; }; declare function readJsonBodyWithLimit(req: IncomingMessage, options: ReadJsonBodyOptions): Promise; type RequestBodyLimitGuard = { dispose: () => void; isTripped: () => boolean; code: () => RequestBodyLimitErrorCode | null; }; type RequestBodyLimitGuardOptions = { maxBytes: number; timeoutMs?: number; responseFormat?: "json" | "text"; responseText?: Partial>; }; declare function installRequestBodyLimitGuard(req: IncomingMessage, res: ServerResponse, options: RequestBodyLimitGuardOptions): RequestBodyLimitGuard; //#endregion //#region src/infra/wsl.d.ts declare function isWSLEnv(): boolean; /** * Synchronously check if running in WSL. * Checks env vars first, then /proc/version. */ declare function isWSLSync(): boolean; /** * Synchronously check if running in WSL2. */ declare function isWSL2Sync(): boolean; //#endregion //#region src/infra/env.d.ts declare function isTruthyEnvValue(value?: string): boolean; //#endregion //#region src/security/dm-policy-shared.d.ts declare function resolveEffectiveAllowFromLists(params: { allowFrom?: Array | null; groupAllowFrom?: Array | null; storeAllowFrom?: Array | null; dmPolicy?: string | null; groupAllowFromFallbackToAllowFrom?: boolean | null; }): { effectiveAllowFrom: string[]; effectiveGroupAllowFrom: string[]; }; type DmGroupAccessDecision = "allow" | "block" | "pairing"; declare const DM_GROUP_ACCESS_REASON: { readonly GROUP_POLICY_ALLOWED: "group_policy_allowed"; readonly GROUP_POLICY_DISABLED: "group_policy_disabled"; readonly GROUP_POLICY_EMPTY_ALLOWLIST: "group_policy_empty_allowlist"; readonly GROUP_POLICY_NOT_ALLOWLISTED: "group_policy_not_allowlisted"; readonly DM_POLICY_OPEN: "dm_policy_open"; readonly DM_POLICY_DISABLED: "dm_policy_disabled"; readonly DM_POLICY_ALLOWLISTED: "dm_policy_allowlisted"; readonly DM_POLICY_PAIRING_REQUIRED: "dm_policy_pairing_required"; readonly DM_POLICY_NOT_ALLOWLISTED: "dm_policy_not_allowlisted"; }; type DmGroupAccessReasonCode = (typeof DM_GROUP_ACCESS_REASON)[keyof typeof DM_GROUP_ACCESS_REASON]; declare function readStoreAllowFromForDmPolicy(params: { provider: ChannelId; accountId: string; dmPolicy?: string | null; shouldRead?: boolean | null; readStore?: (provider: ChannelId, accountId: string) => Promise; }): Promise; declare function resolveDmGroupAccessWithLists(params: { isGroup: boolean; dmPolicy?: string | null; groupPolicy?: string | null; allowFrom?: Array | null; groupAllowFrom?: Array | null; storeAllowFrom?: Array | null; groupAllowFromFallbackToAllowFrom?: boolean | null; isSenderAllowed: (allowFrom: string[]) => boolean; }): { decision: DmGroupAccessDecision; reasonCode: DmGroupAccessReasonCode; reason: string; effectiveAllowFrom: string[]; effectiveGroupAllowFrom: string[]; }; declare function resolveDmGroupAccessWithCommandGate(params: { isGroup: boolean; dmPolicy?: string | null; groupPolicy?: string | null; allowFrom?: Array | null; groupAllowFrom?: Array | null; storeAllowFrom?: Array | null; groupAllowFromFallbackToAllowFrom?: boolean | null; isSenderAllowed: (allowFrom: string[]) => boolean; command?: { useAccessGroups: boolean; allowTextCommands: boolean; hasControlCommand: boolean; }; }): { decision: DmGroupAccessDecision; reason: string; effectiveAllowFrom: string[]; effectiveGroupAllowFrom: string[]; commandAuthorized: boolean; shouldBlockControlCommand: boolean; }; //#endregion //#region src/channels/allowlists/resolve-utils.d.ts declare function mergeAllowlist(params: { existing?: Array; additions: string[]; }): string[]; declare function summarizeMapping(label: string, mapping: string[], unresolved: string[], runtime: RuntimeEnv): void; //#endregion //#region src/channels/mention-gating.d.ts type MentionGateParams = { requireMention: boolean; canDetectMention: boolean; wasMentioned: boolean; implicitMention?: boolean; shouldBypassMention?: boolean; }; type MentionGateResult = { effectiveWasMentioned: boolean; shouldSkip: boolean; }; type MentionGateWithBypassParams = { isGroup: boolean; requireMention: boolean; canDetectMention: boolean; wasMentioned: boolean; implicitMention?: boolean; hasAnyMention?: boolean; allowTextCommands: boolean; hasControlCommand: boolean; commandAuthorized: boolean; }; type MentionGateWithBypassResult = MentionGateResult & { shouldBypassMention: boolean; }; declare function resolveMentionGating(params: MentionGateParams): MentionGateResult; declare function resolveMentionGatingWithBypass(params: MentionGateWithBypassParams): MentionGateWithBypassResult; //#endregion //#region src/channels/reply-prefix.d.ts type ModelSelectionContext = Parameters>[0]; type ReplyPrefixContextBundle = { prefixContext: ResponsePrefixContext; responsePrefix?: string; responsePrefixContextProvider: () => ResponsePrefixContext; onModelSelected: (ctx: ModelSelectionContext) => void; }; type ReplyPrefixOptions = Pick; declare function createReplyPrefixContext(params: { cfg: FasedAgentConfig; agentId: string; channel?: string; accountId?: string; }): ReplyPrefixContextBundle; declare function createReplyPrefixOptions(params: { cfg: FasedAgentConfig; agentId: string; channel?: string; accountId?: string; }): ReplyPrefixOptions; //#endregion //#region src/channels/logging.d.ts type LogFn = (message: string) => void; declare function logInboundDrop(params: { log: LogFn; channel: string; reason: string; target?: string; }): void; declare function logTypingFailure(params: { log: LogFn; channel: string; target?: string; action?: "start" | "stop"; error: unknown; }): void; declare function logAckFailure(params: { log: LogFn; channel: string; target?: string; error: unknown; }): void; //#endregion //#region src/channels/plugins/media-limits.d.ts declare function resolveChannelMediaMaxBytes(params: { cfg: FasedAgentConfig; resolveChannelLimitMb: (params: { cfg: FasedAgentConfig; accountId: string; }) => number | undefined; accountId?: string | null; }): number | undefined; //#endregion //#region src/agents/schema/typebox.d.ts type StringEnumOptions = { description?: string; title?: string; default?: T[number]; }; declare function stringEnum(values: T, options?: StringEnumOptions): _sinclair_typebox0.TUnsafe; declare function optionalStringEnum(values: T, options?: StringEnumOptions): _sinclair_typebox0.TOptional<_sinclair_typebox0.TUnsafe>; //#endregion //#region src/channels/plugins/media-payload.d.ts type MediaPayloadInput = { path: string; contentType?: string; }; type MediaPayload = { MediaPath?: string; MediaType?: string; MediaUrl?: string; MediaPaths?: string[]; MediaUrls?: string[]; MediaTypes?: string[]; }; declare function buildMediaPayload(mediaList: MediaPayloadInput[], opts?: { preserveMediaTypeCardinality?: boolean; }): MediaPayload; //#endregion //#region src/channels/plugins/onboarding/helpers.d.ts declare const promptAccountId: PromptAccountId; declare function addWildcardAllowFrom(allowFrom?: Array | null): string[]; declare function mergeAllowFromEntries(current: Array | null | undefined, additions: Array): string[]; //#endregion //#region src/channels/plugins/onboarding/channel-access.d.ts type ChannelAccessPolicy = "allowlist" | "open" | "disabled"; declare function promptChannelAccessConfig(params: { prompter: WizardPrompter; label: string; currentPolicy?: ChannelAccessPolicy; currentEntries?: string[]; placeholder?: string; allowOpen?: boolean; allowDisabled?: boolean; defaultPrompt?: boolean; updatePrompt?: boolean; }): Promise<{ policy: ChannelAccessPolicy; entries: string[]; } | null>; //#endregion //#region src/terminal/links.d.ts declare function formatDocsLink(path: string, label?: string, opts?: { fallback?: string; force?: boolean; }): string; //#endregion //#region src/terminal/ansi.d.ts declare function stripAnsi(input: string): string; //#endregion //#region src/infra/outbound/target-errors.d.ts declare function missingTargetError(provider: string, hint?: string): Error; //#endregion //#region src/logging/logger.d.ts type LogTransportRecord = Record; type LogTransport = (logObj: LogTransportRecord) => void; declare function registerLogTransport(transport: LogTransport): () => void; //#endregion //#region src/infra/diagnostic-events.d.ts type DiagnosticSessionState = "idle" | "processing" | "waiting"; type DiagnosticBaseEvent = { ts: number; seq: number; }; type DiagnosticUsageEvent = DiagnosticBaseEvent & { type: "model.usage"; sessionKey?: string; sessionId?: string; channel?: string; provider?: string; model?: string; usage: { input?: number; output?: number; cacheRead?: number; cacheWrite?: number; promptTokens?: number; total?: number; }; lastCallUsage?: { input?: number; output?: number; cacheRead?: number; cacheWrite?: number; total?: number; }; context?: { limit?: number; used?: number; }; costUsd?: number; durationMs?: number; }; type DiagnosticWebhookReceivedEvent = DiagnosticBaseEvent & { type: "webhook.received"; channel: string; updateType?: string; chatId?: number | string; }; type DiagnosticWebhookProcessedEvent = DiagnosticBaseEvent & { type: "webhook.processed"; channel: string; updateType?: string; chatId?: number | string; durationMs?: number; }; type DiagnosticWebhookErrorEvent = DiagnosticBaseEvent & { type: "webhook.error"; channel: string; updateType?: string; chatId?: number | string; error: string; }; type DiagnosticMessageQueuedEvent = DiagnosticBaseEvent & { type: "message.queued"; sessionKey?: string; sessionId?: string; channel?: string; source: string; queueDepth?: number; }; type DiagnosticMessageProcessedEvent = DiagnosticBaseEvent & { type: "message.processed"; channel: string; messageId?: number | string; chatId?: number | string; sessionKey?: string; sessionId?: string; durationMs?: number; outcome: "completed" | "skipped" | "error"; reason?: string; error?: string; }; type DiagnosticSessionStateEvent = DiagnosticBaseEvent & { type: "session.state"; sessionKey?: string; sessionId?: string; prevState?: DiagnosticSessionState; state: DiagnosticSessionState; reason?: string; queueDepth?: number; }; type DiagnosticSessionStuckEvent = DiagnosticBaseEvent & { type: "session.stuck"; sessionKey?: string; sessionId?: string; state: DiagnosticSessionState; ageMs: number; queueDepth?: number; }; type DiagnosticLaneEnqueueEvent = DiagnosticBaseEvent & { type: "queue.lane.enqueue"; lane: string; queueSize: number; }; type DiagnosticLaneDequeueEvent = DiagnosticBaseEvent & { type: "queue.lane.dequeue"; lane: string; queueSize: number; waitMs: number; }; type DiagnosticRunAttemptEvent = DiagnosticBaseEvent & { type: "run.attempt"; sessionKey?: string; sessionId?: string; runId: string; attempt: number; }; type DiagnosticHeartbeatEvent = DiagnosticBaseEvent & { type: "diagnostic.heartbeat"; webhooks: { received: number; processed: number; errors: number; }; active: number; waiting: number; queued: number; }; type DiagnosticToolLoopEvent = DiagnosticBaseEvent & { type: "tool.loop"; sessionKey?: string; sessionId?: string; toolName: string; level: "warning" | "critical"; action: "warn" | "block"; detector: "generic_repeat" | "known_poll_no_progress" | "global_circuit_breaker" | "ping_pong"; count: number; message: string; pairedToolName?: string; }; type DiagnosticEventPayload = DiagnosticUsageEvent | DiagnosticWebhookReceivedEvent | DiagnosticWebhookProcessedEvent | DiagnosticWebhookErrorEvent | DiagnosticMessageQueuedEvent | DiagnosticMessageProcessedEvent | DiagnosticSessionStateEvent | DiagnosticSessionStuckEvent | DiagnosticLaneEnqueueEvent | DiagnosticLaneDequeueEvent | DiagnosticRunAttemptEvent | DiagnosticHeartbeatEvent | DiagnosticToolLoopEvent; type DiagnosticEventInput = DiagnosticEventPayload extends infer Event ? Event extends DiagnosticEventPayload ? Omit : never : never; declare function isDiagnosticsEnabled(config?: FasedAgentConfig): boolean; declare function emitDiagnosticEvent(event: DiagnosticEventInput): void; declare function onDiagnosticEvent(listener: (evt: DiagnosticEventPayload) => void): () => void; //#endregion //#region src/pairing/pairing-challenge.d.ts type PairingMeta = Record; type PairingChallengeParams = { channel: string; senderId: string; senderIdLine: string; meta?: PairingMeta; upsertPairingRequest: (params: { id: string; meta?: PairingMeta; }) => Promise<{ code: string; created: boolean; }>; sendPairingReply: (text: string) => Promise; buildReplyText?: (params: { code: string; senderIdLine: string; }) => string; onCreated?: (params: { code: string; }) => void; onReplyError?: (err: unknown) => void; }; /** * Shared pairing challenge issuance for DM pairing policy pathways. * Ensures every channel follows the same create-if-missing + reply flow. */ declare function issuePairingChallenge(params: PairingChallengeParams): Promise<{ created: boolean; code?: string; }>; //#endregion //#region src/infra/ws.d.ts declare function rawDataToString(data: WebSocket.RawData, encoding?: BufferEncoding): string; //#endregion //#region src/config/dangerous-name-matching.d.ts type DangerousNameMatchingConfig = { dangerouslyAllowNameMatching?: boolean; }; declare function isDangerousNameMatchingEnabled(config: DangerousNameMatchingConfig | null | undefined): boolean; //#endregion //#region src/channels/plugins/onboarding/imessage.d.ts declare const imessageOnboardingAdapter: ChannelOnboardingAdapter; //#endregion //#region src/channels/plugins/normalize/imessage.d.ts declare function normalizeIMessageMessagingTarget(raw: string): string | undefined; declare function looksLikeIMessageTargetId(raw: string): boolean; //#endregion //#region src/imessage/target-parsing-helpers.d.ts type ServicePrefix = { prefix: string; service: TService; }; type ChatTargetPrefixesParams = { trimmed: string; lower: string; chatIdPrefixes: string[]; chatGuidPrefixes: string[]; chatIdentifierPrefixes: string[]; }; type ParsedChatTarget = { kind: "chat_id"; chatId: number; } | { kind: "chat_guid"; chatGuid: string; } | { kind: "chat_identifier"; chatIdentifier: string; }; declare function resolveServicePrefixedTarget(params: { trimmed: string; lower: string; servicePrefixes: Array>; isChatTarget: (remainderLower: string) => boolean; parseTarget: (remainder: string) => TTarget; }): ({ kind: "handle"; to: string; service: TService; } | TTarget) | null; declare function parseChatTargetPrefixesOrThrow(params: ChatTargetPrefixesParams): ParsedChatTarget | null; declare function resolveServicePrefixedAllowTarget(params: { trimmed: string; lower: string; servicePrefixes: Array<{ prefix: string; }>; parseAllowTarget: (remainder: string) => TAllowTarget; }): (TAllowTarget | { kind: "handle"; handle: string; }) | null; declare function parseChatAllowTargetPrefixes(params: ChatTargetPrefixesParams): ParsedChatTarget | null; //#endregion //#region src/signal/accounts.d.ts type ResolvedSignalAccount = { accountId: string; enabled: boolean; name?: string; baseUrl: string; configured: boolean; config: SignalAccountConfig; }; declare const listSignalAccountIds: (cfg: FasedAgentConfig) => string[]; declare const resolveDefaultSignalAccountId: (cfg: FasedAgentConfig) => string; declare function resolveSignalAccount(params: { cfg: FasedAgentConfig; accountId?: string | null; }): ResolvedSignalAccount; //#endregion //#region src/channels/plugins/onboarding/signal.d.ts declare const signalOnboardingAdapter: ChannelOnboardingAdapter; //#endregion //#region src/channels/plugins/normalize/signal.d.ts declare function normalizeSignalMessagingTarget(raw: string): string | undefined; declare function looksLikeSignalTargetId(raw: string, normalized?: string): boolean; //#endregion //#region src/channels/plugins/status-issues/bluebubbles.d.ts declare function collectBlueBubblesStatusIssues(accounts: ChannelAccountSnapshot[]): ChannelStatusIssue[]; //#endregion //#region src/line/config-schema.d.ts declare const LineConfigSchema: z.ZodObject<{ enabled: z.ZodOptional; channelAccessToken: z.ZodOptional; channelSecret: z.ZodOptional; tokenFile: z.ZodOptional; secretFile: z.ZodOptional; name: z.ZodOptional; allowFrom: z.ZodOptional>>; groupAllowFrom: z.ZodOptional>>; dmPolicy: z.ZodDefault>>; groupPolicy: z.ZodDefault>>; responsePrefix: z.ZodOptional; mediaMaxMb: z.ZodOptional; webhookPath: z.ZodOptional; accounts: z.ZodOptional; channelAccessToken: z.ZodOptional; channelSecret: z.ZodOptional; tokenFile: z.ZodOptional; secretFile: z.ZodOptional; name: z.ZodOptional; allowFrom: z.ZodOptional>>; groupAllowFrom: z.ZodOptional>>; dmPolicy: z.ZodDefault>>; groupPolicy: z.ZodDefault>>; responsePrefix: z.ZodOptional; mediaMaxMb: z.ZodOptional; webhookPath: z.ZodOptional; groups: z.ZodOptional; allowFrom: z.ZodOptional>>; requireMention: z.ZodOptional; systemPrompt: z.ZodOptional; skills: z.ZodOptional>; }, z.core.$strict>>>>; }, z.core.$strict>>>>; groups: z.ZodOptional; allowFrom: z.ZodOptional>>; requireMention: z.ZodOptional; systemPrompt: z.ZodOptional; skills: z.ZodOptional>; }, z.core.$strict>>>>; }, z.core.$strict>; //#endregion //#region src/line/flex-templates/types.d.ts type FlexBubble = messagingApi.FlexBubble; type Action = messagingApi.Action; interface ListItem { title: string; subtitle?: string; action?: Action; } interface CardAction { label: string; action: Action; } //#endregion //#region src/line/flex-templates/basic-cards.d.ts /** * Create an info card with title, body, and optional footer * * Editorial design: Clean hierarchy with accent bar, generous spacing, * and subtle background zones for visual separation. */ declare function createInfoCard(title: string, body: string, footer?: string): FlexBubble; /** * Create a list card with title and multiple items * * Editorial design: Numbered/bulleted list with clear visual hierarchy, * accent dots for each item, and generous spacing. */ declare function createListCard(title: string, items: ListItem[]): FlexBubble; /** * Create an image card with image, title, and optional body text */ declare function createImageCard(imageUrl: string, title: string, body?: string, options?: { aspectRatio?: "1:1" | "1.51:1" | "1.91:1" | "4:3" | "16:9" | "20:13" | "2:1" | "3:1"; aspectMode?: "cover" | "fit"; action?: Action; }): FlexBubble; /** * Create an action card with title, body, and action buttons */ declare function createActionCard(title: string, body: string, actions: CardAction[], options?: { imageUrl?: string; aspectRatio?: "1:1" | "1.51:1" | "1.91:1" | "4:3" | "16:9" | "20:13" | "2:1" | "3:1"; }): FlexBubble; //#endregion //#region src/line/flex-templates/schedule-cards.d.ts /** * Create a receipt/summary card (for orders, transactions, data tables) * * Editorial design: Clean table layout with alternating row backgrounds, * prominent total section, and clear visual hierarchy. */ declare function createReceiptCard(params: { title: string; subtitle?: string; items: Array<{ name: string; value: string; highlight?: boolean; }>; total?: { label: string; value: string; }; footer?: string; }): FlexBubble; //#endregion //#region src/line/markdown-to-line.d.ts type FlexMessage = messagingApi.FlexMessage; interface ProcessedLineMessage { /** The processed text with markdown stripped */ text: string; /** Flex messages extracted from tables/code blocks */ flexMessages: FlexMessage[]; } /** * Strip markdown formatting from text (for plain text output) * Handles: bold, italic, strikethrough, headers, blockquotes, horizontal rules */ declare function stripMarkdown(text: string): string; /** * Main function: Process text for LINE output * - Extracts tables → Flex Messages * - Extracts code blocks → Flex Messages * - Strips remaining markdown * - Returns processed text + Flex Messages */ declare function processLineMessage(text: string): ProcessedLineMessage; /** * Check if text contains markdown that needs conversion */ declare function hasMarkdownToConvert(text: string): boolean; //#endregion export { ACPX_PUSH_TEST_METHOD, ACPX_PUSH_TEST_WRAPPER_ID, type AckReactionGateParams, type AckReactionScope, type AcpRuntime, type AcpRuntimeCapabilities, type AcpRuntimeDoctorReport, type AcpRuntimeEnsureInput, AcpRuntimeError, type AcpRuntimeErrorCode, type AcpRuntimeEvent, type AcpRuntimeHandle, type AcpRuntimeStatus, type AcpRuntimeTurnInput, type AcpxPushTestApprovalContractRequest, type AcpxPushTestExecutionAdapterResult, type AllowlistMatch, type AnyAgentTool, BLUEBUBBLES_ACTIONS, BLUEBUBBLES_ACTION_NAMES, BLUEBUBBLES_GROUP_ACTIONS, type BaseProbeResult, type BaseTokenResolution, type BlockStreamingCoalesceConfig, BlockStreamingCoalesceSchema, CHANNEL_MESSAGE_ACTION_NAMES, type CardAction, type ChannelAccountSnapshot, type ChannelAccountState, type ChannelAgentTool, type ChannelAgentToolFactory, type ChannelAuthAdapter, type ChannelCapabilities, type ChannelCommandAdapter, type ChannelConfigAdapter, type ChannelConfigSchema, type ChannelDirectoryAdapter, type ChannelDirectoryEntry, type ChannelDirectoryEntryKind, type ChannelDock, type ChannelElevatedAdapter, type ChannelGatewayAdapter, type ChannelGatewayContext, type ChannelGroupAdapter, type ChannelGroupContext, type ChannelHeartbeatAdapter, type ChannelHeartbeatDeps, type ChannelId, type ChannelLogSink, type ChannelLoginWithQrStartResult, type ChannelLoginWithQrWaitResult, type ChannelLogoutContext, type ChannelLogoutResult, type ChannelMentionAdapter, type ChannelMessageActionAdapter, type ChannelMessageActionContext, type ChannelMessageActionName, type ChannelMessagingAdapter, type ChannelMeta, type ChannelOnboardingAdapter, type ChannelOnboardingDmPolicy, type ChannelOutboundAdapter, type ChannelOutboundContext, type ChannelOutboundTargetMode, type ChannelPairingAdapter, type ChannelPlugin, type ChannelPollContext, type ChannelPollResult, type ChannelResolveKind, type ChannelResolveResult, type ChannelResolverAdapter, type ChannelSecurityAdapter, type ChannelSecurityContext, type ChannelSecurityDmPolicy, type ChannelSetupAdapter, type ChannelSetupInput, type ChannelStatusAdapter, type ChannelStatusIssue, type ChannelStreamingAdapter, type ChannelThreadingAdapter, type ChannelThreadingContext, type ChannelThreadingToolContext, type ChannelToolSend, type ChatType, type ChunkMode, DEFAULT_ACCOUNT_ID, DEFAULT_FEDERATION_BASE_URL, DEFAULT_GROUP_HISTORY_LIMIT, DEFAULT_VIDEO_GENERATION_DURATION_SECONDS, DEFAULT_VIDEO_GENERATION_TIMEOUT_MS, DEFAULT_VIDEO_RESOLUTION_TO_SIZE, DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, DEFAULT_WEBHOOK_MAX_BODY_BYTES, DM_GROUP_ACCESS_REASON, DashscopeVideoGenerationResponse, type DedupeCache, type DiagnosticEventPayload, type DiagnosticHeartbeatEvent, type DiagnosticLaneDequeueEvent, type DiagnosticLaneEnqueueEvent, type DiagnosticMessageProcessedEvent, type DiagnosticMessageQueuedEvent, type DiagnosticRunAttemptEvent, type DiagnosticSessionState, type DiagnosticSessionStateEvent, type DiagnosticSessionStuckEvent, type DiagnosticUsageEvent, type DiagnosticWebhookErrorEvent, type DiagnosticWebhookProcessedEvent, type DiagnosticWebhookReceivedEvent, type DmConfig, DmConfigSchema, type DmPolicy, DmPolicySchema, type FasedAgentConfig, type FasedAgentPluginApi, type FasedAgentPluginConfigSchema, type FasedAgentPluginService, type FasedAgentPluginServiceContext, type FasedAgentPluginTool, type FasedAgentPluginToolContext, type FasedAgentPluginToolFactory, type FasedAgentPluginToolOptions, type FileLockHandle, type FileLockOptions, GROUP_POLICY_BLOCKED_LABEL, type GatewayClient, type GatewayRequestContext, type GatewayRequestHandler, type GatewayRequestHandlerOptions, GeneratedImageAsset, GeneratedVideoAsset, type GoogleChatAccountConfig, type GoogleChatActionConfig, type GoogleChatConfig, GoogleChatConfigSchema, type GoogleChatDmConfig, type GoogleChatGroupConfig, type GroupPolicy, GroupPolicySchema, type GroupToolPolicyBySenderConfig, type GroupToolPolicyConfig, type HistoryEntry, type HookEntry, IMessageConfigSchema, ImageGenerationProvider, ImageGenerationProviderConfiguredContext, ImageGenerationProviderPlugin, ImageGenerationRequest, ImageGenerationResolution, ImageGenerationResult, ImageGenerationSourceImage, type LineAccountConfig, type LineChannelData, type LineConfig, LineConfigSchema, type ListItem, type LogTransport, type LogTransportRecord, type LookupFn, type MSTeamsChannelConfig, type MSTeamsConfig, MSTeamsConfigSchema, type MSTeamsReplyStyle, type MSTeamsTeamConfig, type MarkdownConfig, MarkdownConfigSchema, type MarkdownTableMode, MarkdownTableModeSchema, type NormalizedLocation, type OutboundDeliveryResult, type OutboundReplyPayload, PAIRING_APPROVED_MESSAGE, type PluginLogger, type PluginRuntime, type PluginRuntimeAdminRpcAuditEvent, type PluginRuntimeAdminRpcAuditSink, type PluginRuntimeAdminRpcCallContext, type PluginRuntimeAdminRpcHelpers, type PluginRuntimeAdminRpcInvocation, type PluginRuntimeAdminRpcInvoker, type PluginRuntimeSessionAuditEvent, type PluginRuntimeSessionAuditSink, type PluginRuntimeSessionGetParams, type PluginRuntimeSessionHelpers, type PluginRuntimeSessionListParams, type PluginRuntimeSessionListResult, type PluginRuntimeSessionStatus, type PollInput, type ProcessedLineMessage, type ProviderAuthContext, type ProviderAuthKind, type ProviderAuthMethod, type ProviderAuthResult, type ProviderCatalogContext, type ProviderCatalogOrder, type ProviderCatalogResult, type ProviderPlugin, type ProviderPluginCatalog, type ProviderPluginWizard, type ProviderPluginWizardModelPicker, type ProviderPluginWizardSetup, type RealtimeTranscriptionProviderConfig, type RealtimeTranscriptionProviderConfiguredContext, type RealtimeTranscriptionProviderId, type RealtimeTranscriptionProviderPlugin, type RealtimeTranscriptionProviderResolveConfigContext, type RealtimeTranscriptionSession, type RealtimeTranscriptionSessionCallbacks, type RealtimeTranscriptionSessionCreateRequest, type RealtimeVoiceBridge, type RealtimeVoiceBridgeCallbacks, type RealtimeVoiceBridgeCreateRequest, type RealtimeVoiceCloseReason, type RealtimeVoiceProviderConfig, type RealtimeVoiceProviderConfiguredContext, type RealtimeVoiceProviderId, type RealtimeVoiceProviderPlugin, type RealtimeVoiceProviderResolveConfigContext, type RealtimeVoiceRole, type RealtimeVoiceTool, type RealtimeVoiceToolCallEvent, type ReplyPayload, ReplyRuntimeConfigSchemaShape, RequestBodyLimitError, type ResolvedIMessageAccount, type ResolvedLineAccount, type ResolvedSignalAccount, type RespondFn, type RoutePeerKind, type RuntimeEnv, type RuntimeLogger, SILENT_REPLY_TOKEN, type SenderGroupAccessDecision, SignalConfigSchema, SsrFBlockedError, type SsrFPolicy, ToolPolicySchema, TtsAutoSchema, TtsConfigSchema, TtsModeSchema, TtsProviderSchema, VideoGenerationIgnoredOverride, VideoGenerationMode, VideoGenerationModeCapabilities, VideoGenerationProvider, VideoGenerationProviderCapabilities, VideoGenerationProviderConfiguredContext, VideoGenerationProviderPlugin, VideoGenerationRequest, VideoGenerationResolution, VideoGenerationResult, VideoGenerationSourceAsset, VideoGenerationTransformCapabilities, type WebMediaResult, type WhatsAppAckReactionMode, type WizardPrompter, acquireFileLock, addWildcardAllowFrom, applyAccountNameToChannelSection, approveDevicePairing, buildAgentMediaPayload, buildBaseAccountStatusSnapshot, buildBaseChannelStatusSummary, buildChannelConfigSchema, buildChannelKeyCandidates, buildCommandsListResult, buildDashscopeVideoGenerationInput, buildDashscopeVideoGenerationParameters, buildHostnameAllowlistPolicyFromSuffixAllowlist, buildMediaPayload, buildModelCatalogStatus, buildOauthProviderAuthResult, buildPendingHistoryContextFromMap, buildTokenChannelStatusSummary, canonicalizeRealtimeTranscriptionProviderId, canonicalizeRealtimeVoiceProviderId, chunkTextForOutbound, clamp, clearHistoryEntries, clearHistoryEntriesIfEnabled, collectBlueBubblesStatusIssues, collectStatusIssuesFromLastError, createActionCard, createActionGate, createDedupeCache, createDefaultChannelRuntimeState, createImageCard, createInfoCard, createListCard, createLoggerBackedRuntime, createNormalizedOutboundDeliverer, createPersistentDedupe, createReceiptCard, createReplyPrefixContext, createReplyPrefixOptions, createScopedPairingAccess, createTypingCallbacks, deleteAccountFromConfigSection, detectMime, downloadDashscopeGeneratedVideos, emitDiagnosticEvent, emptyPluginConfigSchema, escapeRegExp, evaluateSenderGroupAccess, evictOldHistoryKeys, executeAcpxPushTestRequest, extensionForMime, extractDashscopeVideoUrls, extractOriginalFilename, extractToolSend, fetchWithBearerAuthScopeFallback, fetchWithSsrFGuard, formatAllowFromLowercase, formatAllowlistMatchMeta, formatDocsLink, formatErrorMessage, formatInboundFromLabel, formatLocationText, formatPairingApproveHint, formatTextWithAttachmentLinks, getAcpStatusSnapshot, getChatChannelMeta, getFileExtension, getGatewayUpdateStatus, getPublicGatewayIdentity, getRealtimeTranscriptionProvider, getRealtimeVoiceProvider, getStatusSummary, hasMarkdownToConvert, imessageOnboardingAdapter, installRequestBodyLimitGuard, isAllowedParsedChatSender, isBlockedHostname, isBlockedHostnameOrIp, isDangerousNameMatchingEnabled, isDiagnosticsEnabled, isHttpsUrlAllowedByHostnameSuffixAllowlist, isNormalizedSenderAllowed, isPrivateIpAddress, isRequestBodyLimitError, isSilentReplyText, isTruthyEnvValue, isWSL2Sync, isWSLEnv, isWSLSync, issuePairingChallenge, jsonResult, listAgentIds, listDevicePairing, listIMessageAccountIds, listLineAccountIds, listRealtimeTranscriptionProviders, listRealtimeVoiceProviders, listSignalAccountIds, loadGatewayModelCatalog, loadWebMedia, logAckFailure, logInboundDrop, logTypingFailure, looksLikeIMessageTargetId, looksLikeSignalTargetId, mergeAllowFromEntries, mergeAllowlist, migrateBaseNameToDefaultAccount, missingTargetError, normalizeAccountId, normalizeAllowFrom, normalizeChannelSlug, normalizeE164, normalizeHandle, normalizeHostnameSuffixAllowlist, normalizeIMessageMessagingTarget, normalizeAccountId$1 as normalizeLineAccountId, normalizePluginHttpPath, normalizeRealtimeTranscriptionProviderId, normalizeRealtimeVoiceProviderId, normalizeSignalMessagingTarget, normalizeWebhookPath, onDiagnosticEvent, optionalStringEnum, parseChatAllowTargetPrefixes, parseChatTargetPrefixesOrThrow, pollDashscopeVideoTaskUntilComplete, processLineMessage, promptAccountId, promptChannelAccessConfig, pushHandlers, rawDataToString, readJsonBodyWithLimit, readJsonFileWithFallback, readNumberParam, readReactionParams, readRequestBodyWithLimit, readStoreAllowFromForDmPolicy, readStringParam, recordInboundSession, recordPendingHistoryEntry, recordPendingHistoryEntryIfEnabled, redactSensitiveText, redactSensitiveUrl, redactSensitiveUrlLikeString, registerAcpRuntimeBackend, registerLogTransport, registerPluginHttpRoute, registerWebhookTarget, rejectDevicePairing, rejectNonPostWebhookRequest, removeAckReactionAfterReply, requestBodyErrorToText, requireOpenAllowFrom, resolveAckReaction, resolveAgentPublicOrigin, resolveAllowlistMatchSimple, resolveAllowlistProviderRuntimeGroupPolicy, resolveBlueBubblesGroupRequireMention, resolveBlueBubblesGroupToolPolicy, resolveChannelAccountConfigBasePath, resolveChannelEntryMatch, resolveChannelEntryMatchWithFallback, resolveChannelMediaMaxBytes, resolveControlCommandGate, resolveDefaultAgentId, resolveDefaultGroupPolicy, resolveDefaultIMessageAccountId, resolveDefaultLineAccountId, resolveDefaultSignalAccountId, resolveDmGroupAccessWithCommandGate, resolveDmGroupAccessWithLists, resolveEffectiveAllowFromLists, resolveEffectiveToolInventory, resolveFederationBaseUrl, resolveFederationHandle, resolveGatewayBindUrl, resolveGoogleChatGroupRequireMention, resolveGoogleChatGroupToolPolicy, resolveIMessageAccount, resolveIMessageGroupRequireMention, resolveIMessageGroupToolPolicy, resolveLineAccount, resolveMentionGating, resolveMentionGatingWithBypass, resolveNestedAllowlistDecision, resolveOpenProviderRuntimeGroupPolicy, resolveOutboundMediaUrls, resolvePreferredFasedAgentTmpDir, resolveSenderCommandAuthorization, resolveServicePrefixedAllowTarget, resolveServicePrefixedTarget, resolveSignalAccount, resolveSingleWebhookTarget, resolveSingleWebhookTargetAsync, resolveTailnetHostWithRunner, resolveThreadSessionKeys, resolveToolsBySender, resolveVideoGenerationReferenceUrls, resolveWebhookPath, resolveWebhookTargets, runEmbeddedPiAgent, runFederationAutoConnectOnce, runPluginCommandWithTimeout, safeParseJson, sendMediaWithLeadingCaption, setAccountEnabledInConfigSection, shouldAckReaction, shouldAckReactionForWhatsApp, signalOnboardingAdapter, sleep, startFederationAutoConnect, stringEnum, stripAnsi, stripMarkdown, summarizeMapping, toLocationContext, unregisterAcpRuntimeBackend, waitForAbortSignal, warnMissingProviderGroupPolicyFallbackOnce, withFileLock, withTempDownloadPath, writeJsonFileAtomically };