@fased/fased 0.1.68 → 0.1.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +20 -22
- package/config/sat-runtime.env +6 -2
- package/config/signer-protocol-v2.json +6 -0
- package/dist/agents/tools/wallet-action-tool.js +2 -0
- package/dist/agents/tools/wallet-tool.js +5 -3
- package/dist/brand.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/cli/program/register.wallet.js +88 -5
- package/dist/commands/wallet.js +842 -57
- package/dist/config/sat-runtime-ids.js +6 -1
- package/dist/control-ui/assets/{app-DyPTS0oM.js → app-BLFLoFPk.js} +8 -8
- package/dist/control-ui/assets/{federation-DgA9e-Pn.js → federation-SGMAnM_8.js} +2 -2
- package/dist/control-ui/assets/{index-Cu13yYHr.js → index-S88kp5ZQ.js} +3 -3
- package/dist/control-ui/assets/{mining-Dg-3ll0F.js → mining-ClI8RW4u.js} +2 -2
- package/dist/control-ui/assets/{wallet-ByKBcYhm.js → wallet-CRIhDQbW.js} +201 -116
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -1
- package/dist/gateway/server-http.js +46 -9
- package/dist/mining/mainnet-sync.js +67 -5
- package/dist/operator/operator-readiness.js +1 -1
- package/dist/plugin-sdk/{audio-preflight-_FVQjR1r.js → audio-preflight-CS7Q_7-R.js} +2 -2
- package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
- package/dist/plugin-sdk/{chunk-items-LH4uKSnh.js → chunk-items-BLBZNORg.js} +1 -1
- package/dist/plugin-sdk/command-status.js +2 -2
- package/dist/plugin-sdk/{config-schema-DjU_uD-6.js → config-schema-BiBOUW89.js} +255 -47
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/discord.d.ts +4 -4
- package/dist/plugin-sdk/index.d.ts +16 -16
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{monitor-DUMMbG4h.js → monitor-WXdn4mR-.js} +4 -4
- package/dist/plugin-sdk/{monitor-DXIM16Hj.js → monitor-xzVAPbg2.js} +6 -6
- package/dist/plugin-sdk/{openresponses-http-C8lKwta1.js → openresponses-http-DnI1LFgq.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-mKO92L-M.d.ts → pairing-message-CiTcdD6m.d.ts} +1 -1
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
- package/dist/plugin-sdk/{pw-ai-DJ_gTc4M.js → pw-ai-DZYLDC-S.js} +1 -1
- package/dist/plugin-sdk/{runtime-dependency-nup8niQL.js → runtime-dependency-DczkvPxn.js} +9 -9
- package/dist/plugin-sdk/sat-runtime.d.ts +89 -10
- package/dist/plugin-sdk/sat-runtime.js +2 -2
- package/dist/plugin-sdk/{slack-B-nOOLM0.js → slack-CkIRVDUK.js} +4 -4
- package/dist/plugin-sdk/slack.d.ts +4 -4
- package/dist/plugin-sdk/{sticker-cache-BLiId8Em.js → sticker-cache-Dpap5ce_.js} +2 -2
- package/dist/plugin-sdk/{telegram-actions-1X9A32Dn.js → telegram-actions-Cewdga8H.js} +3 -3
- package/dist/plugin-sdk/telegram.d.ts +4 -4
- package/dist/plugin-sdk/{tmp-fased-dir-BkpWlGUe.d.ts → tmp-fased-dir-BSEHc8MQ.d.ts} +2 -2
- package/dist/plugin-sdk/{types-DtCOO_hW.d.ts → types-BakzIzGN.d.ts} +1 -1
- package/dist/plugin-sdk/{types-B-zL9gSv.d.ts → types-CzF0YQqK.d.ts} +2 -2
- package/dist/plugin-sdk/{web-BvjNyYBz.js → web-DGWi7i3B.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +9 -9
- package/dist/plugin-sdk/{zod-schema.providers-core-BCDlgtls.d.ts → zod-schema.providers-core-CIzCjXH9.d.ts} +63 -63
- package/dist/wallet/local-socket-signer-lifecycle.js +79 -3
- package/dist/wallet/local-socket-signer-protocol.js +70 -10
- package/dist/wallet/mining-wallet-retirement.js +256 -0
- package/dist/wallet/providers/local-socket-signer-adapter.js +2 -0
- package/dist/wallet/signer-protocol-v2.generated.js +6 -0
- package/dist/wallet/wallet-agent-selection.js +6 -10
- package/dist/wallet/wallet-provider-registry.js +70 -29
- package/dist/wallet/wallet-send-approvals.js +6 -2
- package/dist/wallet/wallet-status.js +56 -1
- package/dist/wizard/onboarding.js +32 -30
- package/dist/wizard/onboarding.wallet.js +10 -1
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/fased-federation/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +6 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/install.sh +276 -103
- package/package.json +4 -3
- package/scripts/install-fased-signerd.sh +4 -8
- package/scripts/install-runtime-profile.sh +27 -0
- package/scripts/start-managed.sh +13 -1
- package/scripts/fased-signer-wallet-import-hosting.sh +0 -78
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as DEFAULT_ACCOUNT_ID, r as normalizeAccountId } from "./session-key--_1zVBRB.js";
|
|
2
2
|
import { At as FasedAgentConfig, F as ChannelAccountSnapshot, J as ChannelMessageActionAdapter, it as ChannelStatusIssue, n as ChannelPlugin, on as DiscordAccountConfig, r as ChannelOnboardingAdapter, u as ChannelMessageActionName, ut as getChatChannelMeta } from "./types.plugin-BcSBq42x.js";
|
|
3
|
-
import { Bt as resolveDefaultGroupPolicy, Cn as readStringParam, Gt as listSlackDirectoryGroupsFromConfig, Jt as listTelegramDirectoryPeersFromConfig, Kt as listSlackDirectoryPeersFromConfig, Ut as listDiscordDirectoryGroupsFromConfig, Vt as resolveOpenProviderRuntimeGroupPolicy, Wt as listDiscordDirectoryPeersFromConfig, Xt as listWhatsAppDirectoryPeersFromConfig, Yt as listWhatsAppDirectoryGroupsFromConfig, Zt as collectDiscordAuditChannelIds, _ as FasedAgentPluginApi, qt as listTelegramDirectoryGroupsFromConfig, t as PluginRuntime, yn as createActionGate, zt as resolveAllowlistProviderRuntimeGroupPolicy } from "./types-
|
|
4
|
-
import { D as normalizeE164 } from "./types-
|
|
5
|
-
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-
|
|
3
|
+
import { Bt as resolveDefaultGroupPolicy, Cn as readStringParam, Gt as listSlackDirectoryGroupsFromConfig, Jt as listTelegramDirectoryPeersFromConfig, Kt as listSlackDirectoryPeersFromConfig, Ut as listDiscordDirectoryGroupsFromConfig, Vt as resolveOpenProviderRuntimeGroupPolicy, Wt as listDiscordDirectoryPeersFromConfig, Xt as listWhatsAppDirectoryPeersFromConfig, Yt as listWhatsAppDirectoryGroupsFromConfig, Zt as collectDiscordAuditChannelIds, _ as FasedAgentPluginApi, qt as listTelegramDirectoryGroupsFromConfig, t as PluginRuntime, yn as createActionGate, zt as resolveAllowlistProviderRuntimeGroupPolicy } from "./types-BakzIzGN.js";
|
|
4
|
+
import { D as normalizeE164 } from "./types-CzF0YQqK.js";
|
|
5
|
+
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-CiTcdD6m.js";
|
|
6
6
|
import { _ as buildTokenChannelStatusSummary, i as resolveDiscordGroupToolPolicy, r as resolveDiscordGroupRequireMention } from "./group-mentions-q3hUTCt7.js";
|
|
7
|
-
import { t as DiscordConfigSchema } from "./zod-schema.providers-core-
|
|
7
|
+
import { t as DiscordConfigSchema } from "./zod-schema.providers-core-CIzCjXH9.js";
|
|
8
8
|
|
|
9
9
|
//#region src/discord/accounts.d.ts
|
|
10
10
|
type ResolvedDiscordAccount = {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as ChatType } from "./chat-type-CK5stkc4.js";
|
|
2
2
|
import { n as DEFAULT_ACCOUNT_ID, r as normalizeAccountId, t as resolveThreadSessionKeys } from "./session-key--_1zVBRB.js";
|
|
3
3
|
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";
|
|
4
|
-
import { $ as RealtimeVoiceBridge, $t as extensionForMime, A as ProviderPlugin, At as LineAccountConfig, B as GeneratedVideoAsset, Bt as resolveDefaultGroupPolicy, C as ProviderAuthContext, Cn as readStringParam, Ct as ImageGenerationSourceImage, D as ProviderCatalogContext, Dn as SessionEntry, Dt as normalizeAccountId$1, E as ProviderAuthResult, En as SessionAcpMeta, Et as listLineAccountIds, F as RealtimeTranscriptionProviderPlugin, Ft as formatLocationText, G as VideoGenerationProviderCapabilities, H as VideoGenerationMode, Ht as warnMissingProviderGroupPolicyFallbackOnce, I as RealtimeVoiceProviderPlugin, It as toLocationContext, J as VideoGenerationResolution, K as VideoGenerationProviderConfiguredContext, L as VideoGenerationProviderPlugin, M as ProviderPluginWizard, Mt as LineConfig, N as ProviderPluginWizardModelPicker, Nt as ResolvedLineAccount, O as ProviderCatalogOrder, On as SessionSystemPromptReport, Ot as resolveDefaultLineAccountId, P as ProviderPluginWizardSetup, Pt as NormalizedLocation, Qt as detectMime, Rt as GROUP_POLICY_BLOCKED_LABEL, S as PluginLogger, Sn as readReactionParams, St as ImageGenerationResult, T as ProviderAuthMethod, Tn as SessionAcpIdentity, Tt as ChannelDock, U as VideoGenerationModeCapabilities, V as VideoGenerationIgnoredOverride, Vt as resolveOpenProviderRuntimeGroupPolicy, W as VideoGenerationProvider, X as VideoGenerationSourceAsset, Y as VideoGenerationResult, Z as VideoGenerationTransformCapabilities, _ as FasedAgentPluginApi, _n as createTypingCallbacks, _t as GeneratedImageAsset, a as PluginRuntimeSessionGetParams, an as resolveControlCommandGate, at as RealtimeVoiceProviderId, b as FasedAgentPluginServiceContext, bn as jsonResult, bt as ImageGenerationRequest, c as PluginRuntimeSessionListResult, cn as AckReactionScope, ct as RealtimeVoiceTool, d as PluginRuntimeAdminRpcAuditSink, dn as shouldAckReaction, dt as RealtimeTranscriptionProviderConfiguredContext, en as getFileExtension, et as RealtimeVoiceBridgeCallbacks, f as PluginRuntimeAdminRpcCallContext, fn as shouldAckReactionForWhatsApp, ft as RealtimeTranscriptionProviderId, g as PluginRegistry, gn as ResponsePrefixContext, gt as RealtimeTranscriptionSessionCreateRequest, h as PluginRuntimeAdminRpcInvoker, hn as resolveAckReaction, ht as RealtimeTranscriptionSessionCallbacks, i as PluginRuntimeSessionAuditSink, in as formatInboundFromLabel, it as RealtimeVoiceProviderConfiguredContext, j as ProviderPluginCatalog, jt as LineChannelData, k as ProviderCatalogResult, kt as resolveLineAccount, l as PluginRuntimeSessionStatus, ln as WhatsAppAckReactionMode, lt as RealtimeVoiceToolCallEvent, m as PluginRuntimeAdminRpcInvocation, mn as RoutePeerKind, mt as RealtimeTranscriptionSession, n as RuntimeLogger, nn as loadWebMedia, nt as RealtimeVoiceCloseReason, o as PluginRuntimeSessionHelpers, on as resolveToolsBySender, ot as RealtimeVoiceProviderResolveConfigContext, p as PluginRuntimeAdminRpcHelpers, pn as extractOriginalFilename, pt as RealtimeTranscriptionProviderResolveConfigContext, q as VideoGenerationRequest, r as PluginRuntimeSessionAuditEvent, rn as recordInboundSession, rt as RealtimeVoiceProviderConfig, s as PluginRuntimeSessionListParams, sn as AckReactionGateParams, st as RealtimeVoiceRole, t as PluginRuntime, tn as WebMediaResult, tt as RealtimeVoiceBridgeCreateRequest, u as PluginRuntimeAdminRpcAuditEvent, un as removeAckReactionAfterReply, ut as RealtimeTranscriptionProviderConfig, v as FasedAgentPluginConfigSchema, vn as AnyAgentTool, vt as ImageGenerationProvider, w as ProviderAuthKind, wn as AcpSessionRuntimeOptions, wt as HookEntry, x as ImageGenerationProviderPlugin, xn as readNumberParam, xt as ImageGenerationResolution, y as FasedAgentPluginService, yn as createActionGate, yt as ImageGenerationProviderConfiguredContext, zt as resolveAllowlistProviderRuntimeGroupPolicy } from "./types-
|
|
5
|
-
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-
|
|
4
|
+
import { $ as RealtimeVoiceBridge, $t as extensionForMime, A as ProviderPlugin, At as LineAccountConfig, B as GeneratedVideoAsset, Bt as resolveDefaultGroupPolicy, C as ProviderAuthContext, Cn as readStringParam, Ct as ImageGenerationSourceImage, D as ProviderCatalogContext, Dn as SessionEntry, Dt as normalizeAccountId$1, E as ProviderAuthResult, En as SessionAcpMeta, Et as listLineAccountIds, F as RealtimeTranscriptionProviderPlugin, Ft as formatLocationText, G as VideoGenerationProviderCapabilities, H as VideoGenerationMode, Ht as warnMissingProviderGroupPolicyFallbackOnce, I as RealtimeVoiceProviderPlugin, It as toLocationContext, J as VideoGenerationResolution, K as VideoGenerationProviderConfiguredContext, L as VideoGenerationProviderPlugin, M as ProviderPluginWizard, Mt as LineConfig, N as ProviderPluginWizardModelPicker, Nt as ResolvedLineAccount, O as ProviderCatalogOrder, On as SessionSystemPromptReport, Ot as resolveDefaultLineAccountId, P as ProviderPluginWizardSetup, Pt as NormalizedLocation, Qt as detectMime, Rt as GROUP_POLICY_BLOCKED_LABEL, S as PluginLogger, Sn as readReactionParams, St as ImageGenerationResult, T as ProviderAuthMethod, Tn as SessionAcpIdentity, Tt as ChannelDock, U as VideoGenerationModeCapabilities, V as VideoGenerationIgnoredOverride, Vt as resolveOpenProviderRuntimeGroupPolicy, W as VideoGenerationProvider, X as VideoGenerationSourceAsset, Y as VideoGenerationResult, Z as VideoGenerationTransformCapabilities, _ as FasedAgentPluginApi, _n as createTypingCallbacks, _t as GeneratedImageAsset, a as PluginRuntimeSessionGetParams, an as resolveControlCommandGate, at as RealtimeVoiceProviderId, b as FasedAgentPluginServiceContext, bn as jsonResult, bt as ImageGenerationRequest, c as PluginRuntimeSessionListResult, cn as AckReactionScope, ct as RealtimeVoiceTool, d as PluginRuntimeAdminRpcAuditSink, dn as shouldAckReaction, dt as RealtimeTranscriptionProviderConfiguredContext, en as getFileExtension, et as RealtimeVoiceBridgeCallbacks, f as PluginRuntimeAdminRpcCallContext, fn as shouldAckReactionForWhatsApp, ft as RealtimeTranscriptionProviderId, g as PluginRegistry, gn as ResponsePrefixContext, gt as RealtimeTranscriptionSessionCreateRequest, h as PluginRuntimeAdminRpcInvoker, hn as resolveAckReaction, ht as RealtimeTranscriptionSessionCallbacks, i as PluginRuntimeSessionAuditSink, in as formatInboundFromLabel, it as RealtimeVoiceProviderConfiguredContext, j as ProviderPluginCatalog, jt as LineChannelData, k as ProviderCatalogResult, kt as resolveLineAccount, l as PluginRuntimeSessionStatus, ln as WhatsAppAckReactionMode, lt as RealtimeVoiceToolCallEvent, m as PluginRuntimeAdminRpcInvocation, mn as RoutePeerKind, mt as RealtimeTranscriptionSession, n as RuntimeLogger, nn as loadWebMedia, nt as RealtimeVoiceCloseReason, o as PluginRuntimeSessionHelpers, on as resolveToolsBySender, ot as RealtimeVoiceProviderResolveConfigContext, p as PluginRuntimeAdminRpcHelpers, pn as extractOriginalFilename, pt as RealtimeTranscriptionProviderResolveConfigContext, q as VideoGenerationRequest, r as PluginRuntimeSessionAuditEvent, rn as recordInboundSession, rt as RealtimeVoiceProviderConfig, s as PluginRuntimeSessionListParams, sn as AckReactionGateParams, st as RealtimeVoiceRole, t as PluginRuntime, tn as WebMediaResult, tt as RealtimeVoiceBridgeCreateRequest, u as PluginRuntimeAdminRpcAuditEvent, un as removeAckReactionAfterReply, ut as RealtimeTranscriptionProviderConfig, v as FasedAgentPluginConfigSchema, vn as AnyAgentTool, vt as ImageGenerationProvider, w as ProviderAuthKind, wn as AcpSessionRuntimeOptions, wt as HookEntry, x as ImageGenerationProviderPlugin, xn as readNumberParam, xt as ImageGenerationResolution, y as FasedAgentPluginService, yn as createActionGate, yt as ImageGenerationProviderConfiguredContext, zt as resolveAllowlistProviderRuntimeGroupPolicy } from "./types-BakzIzGN.js";
|
|
5
|
+
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-CzF0YQqK.js";
|
|
6
6
|
import { a as VerboseLevel, i as ThinkLevel, n as SkillSnapshot, r as ReasoningLevel } from "./types-D0kDG8l0.js";
|
|
7
|
-
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-
|
|
7
|
+
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-CiTcdD6m.js";
|
|
8
8
|
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";
|
|
9
9
|
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";
|
|
10
|
-
import { a as SignalConfigSchema, i as MSTeamsConfigSchema, n as GoogleChatConfigSchema, r as IMessageConfigSchema } from "./zod-schema.providers-core-
|
|
11
|
-
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-
|
|
10
|
+
import { a as SignalConfigSchema, i as MSTeamsConfigSchema, n as GoogleChatConfigSchema, r as IMessageConfigSchema } from "./zod-schema.providers-core-CIzCjXH9.js";
|
|
11
|
+
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-BSEHc8MQ.js";
|
|
12
12
|
import { ImageContent } from "@mariozechner/pi-ai";
|
|
13
13
|
import { AgentMessage } from "@mariozechner/pi-agent-core";
|
|
14
14
|
import * as _sinclair_typebox0 from "@sinclair/typebox";
|
|
@@ -221,7 +221,7 @@ declare const BLUEBUBBLES_ACTIONS: {
|
|
|
221
221
|
};
|
|
222
222
|
};
|
|
223
223
|
declare const BLUEBUBBLES_ACTION_NAMES: (keyof typeof BLUEBUBBLES_ACTIONS)[];
|
|
224
|
-
declare const BLUEBUBBLES_GROUP_ACTIONS: Set<"
|
|
224
|
+
declare const BLUEBUBBLES_GROUP_ACTIONS: Set<"search" | "reactions" | "sticker" | "permissions" | "edit" | "unsend" | "reply" | "sendWithEffect" | "renameGroup" | "setGroupIcon" | "addParticipant" | "removeParticipant" | "leaveGroup" | "sendAttachment" | "timeout" | "broadcast" | "send" | "poll" | "react" | "read" | "delete" | "pin" | "unpin" | "list-pins" | "thread-create" | "thread-list" | "thread-reply" | "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">;
|
|
225
225
|
//#endregion
|
|
226
226
|
//#region src/plugins/http-path.d.ts
|
|
227
227
|
declare function normalizePluginHttpPath(path?: string | null, fallback?: string | null): string | null;
|
|
@@ -302,14 +302,14 @@ declare const DmConfigSchema: z.ZodObject<{
|
|
|
302
302
|
historyLimit: z.ZodOptional<z.ZodNumber>;
|
|
303
303
|
}, z.core.$strict>;
|
|
304
304
|
declare const GroupPolicySchema: z.ZodEnum<{
|
|
305
|
-
allowlist: "allowlist";
|
|
306
305
|
open: "open";
|
|
307
306
|
disabled: "disabled";
|
|
307
|
+
allowlist: "allowlist";
|
|
308
308
|
}>;
|
|
309
309
|
declare const DmPolicySchema: z.ZodEnum<{
|
|
310
|
-
allowlist: "allowlist";
|
|
311
310
|
open: "open";
|
|
312
311
|
disabled: "disabled";
|
|
312
|
+
allowlist: "allowlist";
|
|
313
313
|
pairing: "pairing";
|
|
314
314
|
}>;
|
|
315
315
|
declare const BlockStreamingCoalesceSchema: z.ZodObject<{
|
|
@@ -339,19 +339,19 @@ declare const ReplyRuntimeConfigSchemaShape: {
|
|
|
339
339
|
};
|
|
340
340
|
declare const MarkdownTableModeSchema: z.ZodEnum<{
|
|
341
341
|
off: "off";
|
|
342
|
-
code: "code";
|
|
343
342
|
bullets: "bullets";
|
|
343
|
+
code: "code";
|
|
344
344
|
}>;
|
|
345
345
|
declare const MarkdownConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
346
346
|
tables: z.ZodOptional<z.ZodEnum<{
|
|
347
347
|
off: "off";
|
|
348
|
-
code: "code";
|
|
349
348
|
bullets: "bullets";
|
|
349
|
+
code: "code";
|
|
350
350
|
}>>;
|
|
351
351
|
}, z.core.$strict>>;
|
|
352
352
|
declare const TtsProviderSchema: z.ZodEnum<{
|
|
353
|
-
openai: "openai";
|
|
354
353
|
elevenlabs: "elevenlabs";
|
|
354
|
+
openai: "openai";
|
|
355
355
|
edge: "edge";
|
|
356
356
|
}>;
|
|
357
357
|
declare const TtsModeSchema: z.ZodEnum<{
|
|
@@ -377,8 +377,8 @@ declare const TtsConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
377
377
|
final: "final";
|
|
378
378
|
}>>;
|
|
379
379
|
provider: z.ZodOptional<z.ZodEnum<{
|
|
380
|
-
openai: "openai";
|
|
381
380
|
elevenlabs: "elevenlabs";
|
|
381
|
+
openai: "openai";
|
|
382
382
|
edge: "edge";
|
|
383
383
|
}>>;
|
|
384
384
|
summaryModel: z.ZodOptional<z.ZodString>;
|
|
@@ -2413,15 +2413,15 @@ declare const LineConfigSchema: z.ZodObject<{
|
|
|
2413
2413
|
allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
2414
2414
|
groupAllowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
2415
2415
|
dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2416
|
-
allowlist: "allowlist";
|
|
2417
2416
|
open: "open";
|
|
2418
2417
|
disabled: "disabled";
|
|
2418
|
+
allowlist: "allowlist";
|
|
2419
2419
|
pairing: "pairing";
|
|
2420
2420
|
}>>>;
|
|
2421
2421
|
groupPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2422
|
-
allowlist: "allowlist";
|
|
2423
2422
|
open: "open";
|
|
2424
2423
|
disabled: "disabled";
|
|
2424
|
+
allowlist: "allowlist";
|
|
2425
2425
|
}>>>;
|
|
2426
2426
|
responsePrefix: z.ZodOptional<z.ZodString>;
|
|
2427
2427
|
mediaMaxMb: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2436,15 +2436,15 @@ declare const LineConfigSchema: z.ZodObject<{
|
|
|
2436
2436
|
allowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
2437
2437
|
groupAllowFrom: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
2438
2438
|
dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2439
|
-
allowlist: "allowlist";
|
|
2440
2439
|
open: "open";
|
|
2441
2440
|
disabled: "disabled";
|
|
2441
|
+
allowlist: "allowlist";
|
|
2442
2442
|
pairing: "pairing";
|
|
2443
2443
|
}>>>;
|
|
2444
2444
|
groupPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2445
|
-
allowlist: "allowlist";
|
|
2446
2445
|
open: "open";
|
|
2447
2446
|
disabled: "disabled";
|
|
2447
|
+
allowlist: "allowlist";
|
|
2448
2448
|
}>>>;
|
|
2449
2449
|
responsePrefix: z.ZodOptional<z.ZodString>;
|
|
2450
2450
|
mediaMaxMb: z.ZodOptional<z.ZodNumber>;
|
package/dist/plugin-sdk/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as resolveFederationHandle, $r as resolveSingleWebhookTargetAsync, Ai as normalizeRealtimeVoiceProviderId, B as logAckFailure, Bi as downloadDashscopeGeneratedVideos, Bn as requestBodyErrorToText, Br as createImageCard, C as resolveEffectiveToolInventory, Ci as resolveEffectiveAllowFromLists, D as runEmbeddedPiAgent, Di as canonicalizeRealtimeVoiceProviderId, E as ACPX_PUSH_TEST_WRAPPER_ID, Ei as evaluateSenderGroupAccess, En as AcpRuntimeError, F as resolveMentionGatingWithBypass, Fi as DEFAULT_VIDEO_GENERATION_DURATION_SECONDS, Fn as RequestBodyLimitError, Fr as hasMarkdownToConvert, Gi as formatAllowlistMatchMeta, Gr as waitForAbortSignal, H as logTypingFailure, Hi as pollDashscopeVideoTaskUntilComplete, Hn as resolveChannelMediaMaxBytes, Hr as createListCard, I as listLineAccountIds, Ii as DEFAULT_VIDEO_GENERATION_TIMEOUT_MS, In as installRequestBodyLimitGuard, Ir as processLineMessage, J as shouldAckReaction, Ji as BLUEBUBBLES_ACTION_NAMES, Jr as createDedupeCache, K as recordInboundSession, Ki as resolveAllowlistMatchSimple, Kr as createLoggerBackedRuntime, L as normalizeAccountId$1, Li as DEFAULT_VIDEO_RESOLUTION_TO_SIZE, Ln as isRequestBodyLimitError, Lr as stripMarkdown, M as issuePairingChallenge, Mi as getRealtimeTranscriptionProvider, N as createTypingCallbacks, Ni as listRealtimeTranscriptionProviders, Nn as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, Oi as getRealtimeVoiceProvider, P as resolveMentionGating, Pi as normalizeRealtimeTranscriptionProviderId, Pn as DEFAULT_WEBHOOK_MAX_BODY_BYTES, Qn as resolveFederationBaseUrl, Qr as resolveSingleWebhookTarget, R as resolveDefaultLineAccountId, Ri as buildDashscopeVideoGenerationInput, Rn as readJsonBodyWithLimit, Rr as createReceiptCard, S as getPublicGatewayIdentity, Si as resolveDmGroupAccessWithLists, T as ACPX_PUSH_TEST_METHOD, Ti as resolveControlCommandGate, Tn as unregisterAcpRuntimeBackend, Ui as resolveVideoGenerationReferenceUrls, Un as runFederationAutoConnectOnce, V as logInboundDrop, Vi as extractDashscopeVideoUrls, Vr as createInfoCard, Wi as registerPluginHttpRoute, Wn as startFederationAutoConnect, Xi as CHANNEL_MESSAGE_ACTION_NAMES, Xn as normalizeHandle, Xr as registerWebhookTarget, Y as shouldAckReactionForWhatsApp, Yi as BLUEBUBBLES_GROUP_ACTIONS, Yn as DEFAULT_FEDERATION_BASE_URL, Zn as resolveAgentPublicOrigin, Zr as rejectNonPostWebhookRequest, _ as getGatewayUpdateStatus, _i as resolveChannelAccountConfigBasePath, a as normalizeIMessageMessagingTarget, ai as buildHostnameAllowlistPolicyFromSuffixAllowlist, b as getStatusSummary, bi as readStoreAllowFromForDmPolicy, ci as createNormalizedOutboundDeliverer, cn as DEFAULT_GROUP_HISTORY_LIMIT, d as mergeAllowlist, di as sendMediaWithLeadingCaption, dn as clearHistoryEntries, ei as resolveWebhookTargets, fi as buildOauthProviderAuthResult, fn as clearHistoryEntriesIfEnabled, g as buildCommandsListResult, gi as chunkTextForOutbound, h as getAcpStatusSnapshot, hi as buildAgentMediaPayload, hn as recordPendingHistoryEntryIfEnabled, i as looksLikeIMessageTargetId, ii as withTempDownloadPath, in as stringEnum, ji as canonicalizeRealtimeTranscriptionProviderId, ki as listRealtimeVoiceProviders, li as formatTextWithAttachmentLinks, m as pushHandlers, mi as fetchWithBearerAuthScopeFallback, mn as recordPendingHistoryEntry, n as collectBlueBubblesStatusIssues, ni as resolveWebhookPath, nt as formatInboundFromLabel, o as imessageOnboardingAdapter, oi as isHttpsUrlAllowedByHostnameSuffixAllowlist, p as summarizeMapping, pi as createScopedPairingAccess, pn as evictOldHistoryKeys, q as removeAckReactionAfterReply, qi as BLUEBUBBLES_ACTIONS, qr as createPersistentDedupe, r as signalOnboardingAdapter, ri as extractToolSend, rn as optionalStringEnum, s as buildMediaPayload, si as normalizeHostnameSuffixAllowlist, t as LineConfigSchema, ti as normalizeWebhookPath, ui as resolveOutboundMediaUrls, un as buildPendingHistoryContextFromMap, v as buildModelCatalogStatus, vi as resolveSenderCommandAuthorization, w as executeAcpxPushTestRequest, wn as registerAcpRuntimeBackend, x as isDangerousNameMatchingEnabled, xi as resolveDmGroupAccessWithCommandGate, y as loadGatewayModelCatalog, yi as DM_GROUP_ACCESS_REASON, z as resolveLineAccount, zi as buildDashscopeVideoGenerationParameters, zn as readRequestBodyWithLimit, zr as createActionCard } from "./config-schema-
|
|
1
|
+
import { $n as resolveFederationHandle, $r as resolveSingleWebhookTargetAsync, Ai as normalizeRealtimeVoiceProviderId, B as logAckFailure, Bi as downloadDashscopeGeneratedVideos, Bn as requestBodyErrorToText, Br as createImageCard, C as resolveEffectiveToolInventory, Ci as resolveEffectiveAllowFromLists, D as runEmbeddedPiAgent, Di as canonicalizeRealtimeVoiceProviderId, E as ACPX_PUSH_TEST_WRAPPER_ID, Ei as evaluateSenderGroupAccess, En as AcpRuntimeError, F as resolveMentionGatingWithBypass, Fi as DEFAULT_VIDEO_GENERATION_DURATION_SECONDS, Fn as RequestBodyLimitError, Fr as hasMarkdownToConvert, Gi as formatAllowlistMatchMeta, Gr as waitForAbortSignal, H as logTypingFailure, Hi as pollDashscopeVideoTaskUntilComplete, Hn as resolveChannelMediaMaxBytes, Hr as createListCard, I as listLineAccountIds, Ii as DEFAULT_VIDEO_GENERATION_TIMEOUT_MS, In as installRequestBodyLimitGuard, Ir as processLineMessage, J as shouldAckReaction, Ji as BLUEBUBBLES_ACTION_NAMES, Jr as createDedupeCache, K as recordInboundSession, Ki as resolveAllowlistMatchSimple, Kr as createLoggerBackedRuntime, L as normalizeAccountId$1, Li as DEFAULT_VIDEO_RESOLUTION_TO_SIZE, Ln as isRequestBodyLimitError, Lr as stripMarkdown, M as issuePairingChallenge, Mi as getRealtimeTranscriptionProvider, N as createTypingCallbacks, Ni as listRealtimeTranscriptionProviders, Nn as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, Oi as getRealtimeVoiceProvider, P as resolveMentionGating, Pi as normalizeRealtimeTranscriptionProviderId, Pn as DEFAULT_WEBHOOK_MAX_BODY_BYTES, Qn as resolveFederationBaseUrl, Qr as resolveSingleWebhookTarget, R as resolveDefaultLineAccountId, Ri as buildDashscopeVideoGenerationInput, Rn as readJsonBodyWithLimit, Rr as createReceiptCard, S as getPublicGatewayIdentity, Si as resolveDmGroupAccessWithLists, T as ACPX_PUSH_TEST_METHOD, Ti as resolveControlCommandGate, Tn as unregisterAcpRuntimeBackend, Ui as resolveVideoGenerationReferenceUrls, Un as runFederationAutoConnectOnce, V as logInboundDrop, Vi as extractDashscopeVideoUrls, Vr as createInfoCard, Wi as registerPluginHttpRoute, Wn as startFederationAutoConnect, Xi as CHANNEL_MESSAGE_ACTION_NAMES, Xn as normalizeHandle, Xr as registerWebhookTarget, Y as shouldAckReactionForWhatsApp, Yi as BLUEBUBBLES_GROUP_ACTIONS, Yn as DEFAULT_FEDERATION_BASE_URL, Zn as resolveAgentPublicOrigin, Zr as rejectNonPostWebhookRequest, _ as getGatewayUpdateStatus, _i as resolveChannelAccountConfigBasePath, a as normalizeIMessageMessagingTarget, ai as buildHostnameAllowlistPolicyFromSuffixAllowlist, b as getStatusSummary, bi as readStoreAllowFromForDmPolicy, ci as createNormalizedOutboundDeliverer, cn as DEFAULT_GROUP_HISTORY_LIMIT, d as mergeAllowlist, di as sendMediaWithLeadingCaption, dn as clearHistoryEntries, ei as resolveWebhookTargets, fi as buildOauthProviderAuthResult, fn as clearHistoryEntriesIfEnabled, g as buildCommandsListResult, gi as chunkTextForOutbound, h as getAcpStatusSnapshot, hi as buildAgentMediaPayload, hn as recordPendingHistoryEntryIfEnabled, i as looksLikeIMessageTargetId, ii as withTempDownloadPath, in as stringEnum, ji as canonicalizeRealtimeTranscriptionProviderId, ki as listRealtimeVoiceProviders, li as formatTextWithAttachmentLinks, m as pushHandlers, mi as fetchWithBearerAuthScopeFallback, mn as recordPendingHistoryEntry, n as collectBlueBubblesStatusIssues, ni as resolveWebhookPath, nt as formatInboundFromLabel, o as imessageOnboardingAdapter, oi as isHttpsUrlAllowedByHostnameSuffixAllowlist, p as summarizeMapping, pi as createScopedPairingAccess, pn as evictOldHistoryKeys, q as removeAckReactionAfterReply, qi as BLUEBUBBLES_ACTIONS, qr as createPersistentDedupe, r as signalOnboardingAdapter, ri as extractToolSend, rn as optionalStringEnum, s as buildMediaPayload, si as normalizeHostnameSuffixAllowlist, t as LineConfigSchema, ti as normalizeWebhookPath, ui as resolveOutboundMediaUrls, un as buildPendingHistoryContextFromMap, v as buildModelCatalogStatus, vi as resolveSenderCommandAuthorization, w as executeAcpxPushTestRequest, wn as registerAcpRuntimeBackend, x as isDangerousNameMatchingEnabled, xi as resolveDmGroupAccessWithCommandGate, y as loadGatewayModelCatalog, yi as DM_GROUP_ACCESS_REASON, z as resolveLineAccount, zi as buildDashscopeVideoGenerationParameters, zn as readRequestBodyWithLimit, zr as createActionCard } from "./config-schema-BiBOUW89.js";
|
|
2
2
|
import { Bt as resolveBlueBubblesGroupRequireMention, Gt as resolveGoogleChatGroupToolPolicy, Kt as resolveIMessageGroupRequireMention, Nn as getChatChannelMeta, Rt as looksLikeSignalTargetId, Vt as resolveBlueBubblesGroupToolPolicy, Wt as resolveGoogleChatGroupRequireMention, Xn as normalizePluginHttpPath, dn as resolveDefaultSignalAccountId, fn as resolveSignalAccount, hn as resolveIMessageAccount, mn as resolveDefaultIMessageAccountId, pn as listIMessageAccountIds, qt as resolveIMessageGroupToolPolicy, un as listSignalAccountIds, yn as resolveToolsBySender, zt as normalizeSignalMessagingTarget } from "./runtime-CXSQwMaR.js";
|
|
3
3
|
import { n as stripAnsi } from "./subsystem-DBPNbQDQ.js";
|
|
4
4
|
import { g as registerLogTransport, w as resolvePreferredFasedAgentTmpDir } from "./globals-B_jjtAje.js";
|
|
@@ -39,7 +39,7 @@ import "./manager-BegWxNYX.js";
|
|
|
39
39
|
import "./query-expansion-BG3FgzF7.js";
|
|
40
40
|
import { a as jsonResult, c as readReactionParams, d as readStringParam, n as createActionGate, s as readNumberParam } from "./common-HCcXU-NR.js";
|
|
41
41
|
import "./commands-registry-G5KXSi_y.js";
|
|
42
|
-
import { X as rawDataToString } from "./runtime-dependency-
|
|
42
|
+
import { X as rawDataToString } from "./runtime-dependency-DczkvPxn.js";
|
|
43
43
|
import "./path-alias-guards-DjgDArrp.js";
|
|
44
44
|
import "./fs-safe-g4g7GT02.js";
|
|
45
45
|
import "./qr-image-B4MlMG4N.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as createInboundDebouncer, $t as formatReasoningMessage, B as logAckFailure, Cn as modelSupportsVision, Dt as registerUnhandledRejectionHandler, F as resolveMentionGatingWithBypass, G as sleepWithAbort, Gr as waitForAbortSignal, H as logTypingFailure, J as shouldAckReaction, Jr as createDedupeCache, K as recordInboundSession, Lt as hasControlCommand, N as createTypingCallbacks, Rn as readJsonBodyWithLimit, Sn as loadModelCatalog, Ti as resolveControlCommandGate, U as buildPairingReply, Ut as buildCommandsMessagePaginated, V as logInboundDrop, Vt as enqueueSystemEvent, W as computeBackoff, Wr as resolveTelegramInlineButtonsScope, X as dispatchReplyWithBufferedBlockDispatcher, _n as matchesMentionWithExplicit, _t as formatDurationPrecise, cn as DEFAULT_GROUP_HISTORY_LIMIT, ct as resolveStoredModelOverride, dt as buildModelsKeyboard, en as stripReasoningTagsFromText, et as resolveInboundDebounceMs, fn as clearHistoryEntriesIfEnabled, ft as buildProviderKeyboard, gn as buildMentionRegexes, gt as buildCommandsPaginationKeyboard, hn as recordPendingHistoryEntryIfEnabled, ht as parseModelCallbackData, lt as buildModelsProviderData, mt as getModelsPageSize, nn as isInsideCode, pt as calculateTotalPages, q as removeAckReactionAfterReply, rt as resolveEnvelopeFormatOptions, tn as findCodeRegions, tt as formatInboundEnvelope, un as buildPendingHistoryContextFromMap, ut as formatModelsAvailableHeader, wi as resolveCommandAuthorizedFromAuthorizers, xn as findModelInCatalog, yt as resolveChannelConfigWrites, zt as isAbortRequestText } from "./config-schema-
|
|
1
|
+
import { $ as createInboundDebouncer, $t as formatReasoningMessage, B as logAckFailure, Cn as modelSupportsVision, Dt as registerUnhandledRejectionHandler, F as resolveMentionGatingWithBypass, G as sleepWithAbort, Gr as waitForAbortSignal, H as logTypingFailure, J as shouldAckReaction, Jr as createDedupeCache, K as recordInboundSession, Lt as hasControlCommand, N as createTypingCallbacks, Rn as readJsonBodyWithLimit, Sn as loadModelCatalog, Ti as resolveControlCommandGate, U as buildPairingReply, Ut as buildCommandsMessagePaginated, V as logInboundDrop, Vt as enqueueSystemEvent, W as computeBackoff, Wr as resolveTelegramInlineButtonsScope, X as dispatchReplyWithBufferedBlockDispatcher, _n as matchesMentionWithExplicit, _t as formatDurationPrecise, cn as DEFAULT_GROUP_HISTORY_LIMIT, ct as resolveStoredModelOverride, dt as buildModelsKeyboard, en as stripReasoningTagsFromText, et as resolveInboundDebounceMs, fn as clearHistoryEntriesIfEnabled, ft as buildProviderKeyboard, gn as buildMentionRegexes, gt as buildCommandsPaginationKeyboard, hn as recordPendingHistoryEntryIfEnabled, ht as parseModelCallbackData, lt as buildModelsProviderData, mt as getModelsPageSize, nn as isInsideCode, pt as calculateTotalPages, q as removeAckReactionAfterReply, rt as resolveEnvelopeFormatOptions, tn as findCodeRegions, tt as formatInboundEnvelope, un as buildPendingHistoryContextFromMap, ut as formatModelsAvailableHeader, wi as resolveCommandAuthorizedFromAuthorizers, xn as findModelInCatalog, yt as resolveChannelConfigWrites, zt as isAbortRequestText } from "./config-schema-BiBOUW89.js";
|
|
2
2
|
import { C as recordSessionMetaFromInbound, Gn as getPluginCommandSpecs, S as readSessionUpdatedAt, Wn as executePluginCommand, _n as resolveChannelGroupRequireMention, gn as resolveChannelGroupPolicy, in as resolveTelegramAccount, qn as matchPluginCommand, x as loadSessionStore } from "./runtime-CXSQwMaR.js";
|
|
3
3
|
import { i as defaultRuntime, r as createNonExitingRuntime, t as createSubsystemLogger } from "./subsystem-DBPNbQDQ.js";
|
|
4
4
|
import { i as logVerbose, l as warn, p as getChildLogger, s as shouldLogVerbose, t as danger } from "./globals-B_jjtAje.js";
|
|
@@ -37,7 +37,7 @@ import "./manager-BegWxNYX.js";
|
|
|
37
37
|
import "./query-expansion-BG3FgzF7.js";
|
|
38
38
|
import "./common-HCcXU-NR.js";
|
|
39
39
|
import { C as isNativeCommandsExplicitlyDisabled, E as resolveNativeSkillsEnabled, T as resolveNativeCommandsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody } from "./commands-registry-G5KXSi_y.js";
|
|
40
|
-
import "./runtime-dependency-
|
|
40
|
+
import "./runtime-dependency-DczkvPxn.js";
|
|
41
41
|
import "./path-alias-guards-DjgDArrp.js";
|
|
42
42
|
import "./fs-safe-g4g7GT02.js";
|
|
43
43
|
import "./qr-image-B4MlMG4N.js";
|
|
@@ -61,7 +61,7 @@ import "./shared-D1AD2Ejn.js";
|
|
|
61
61
|
import "./retry-policy-CXh1owkc.js";
|
|
62
62
|
import { _ as splitTelegramCaption, d as isRecoverableTelegramNetworkError, f as markdownToTelegramChunks, g as resolveTelegramFetch, h as wrapFileReferencesInHtml, i as editMessageTelegram, l as resolveTelegramVoiceSend, m as renderTelegramHtmlText, p as markdownToTelegramHtml, t as buildInlineKeyboard, u as wasSentByBot, v as withTelegramApiErrorLogging } from "./send-DWKm6yay.js";
|
|
63
63
|
import { t as makeProxyFetch } from "./proxy-CLRUdShp.js";
|
|
64
|
-
import { i as getCachedSticker, n as describeStickerImage, t as cacheSticker } from "./sticker-cache-
|
|
64
|
+
import { i as getCachedSticker, n as describeStickerImage, t as cacheSticker } from "./sticker-cache-Dpap5ce_.js";
|
|
65
65
|
import { i as createStatusReactionController, n as DEFAULT_EMOJIS, t as createFinalizableDraftLifecycle } from "./draft-stream-controls-CMNdKSx-.js";
|
|
66
66
|
import path from "node:path";
|
|
67
67
|
import os from "node:os";
|
|
@@ -2045,7 +2045,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
|
|
|
2045
2045
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
2046
2046
|
let preflightTranscript;
|
|
2047
2047
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
2048
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
2048
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CS7Q_7-R.js");
|
|
2049
2049
|
preflightTranscript = await transcribeFirstAudio({
|
|
2050
2050
|
ctx: {
|
|
2051
2051
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as createInboundDebouncer, A as parseTtsDirectives, B as logAckFailure, Er as buildGatewayConnectionDetails, F as resolveMentionGatingWithBypass, Gi as formatAllowlistMatchMeta, Gn as resolveAgentAvatar, H as logTypingFailure, J as shouldAckReaction, K as recordInboundSession, Lt as hasControlCommand, N as createTypingCallbacks, O as resolveTtsConfig, Or as GatewayClient, Si as resolveDmGroupAccessWithLists, St as normalizeMediaAttachments, Ti as resolveControlCommandGate, Tt as runCapability, U as buildPairingReply, V as logInboundDrop, Vt as enqueueSystemEvent, X as dispatchReplyWithBufferedBlockDispatcher, Z as dispatchReplyWithDispatcher, _n as matchesMentionWithExplicit, at as createReplyDispatcherWithTyping, bi as readStoreAllowFromForDmPolicy, bn as agentCommand, bt as buildProviderRegistry, c as addAllowlistUserEntriesFromConfigEntry, ct as resolveStoredModelOverride, en as stripReasoningTagsFromText, et as resolveInboundDebounceMs, f as patchAllowlistUsersInConfigEntries, fn as clearHistoryEntriesIfEnabled, gn as buildMentionRegexes, hn as recordPendingHistoryEntryIfEnabled, it as dispatchInboundMessage, k as textToSpeech, l as buildAllowlistResolutionSummary, lt as buildModelsProviderData, ot as EmbeddedBlockChunker, p as summarizeMapping, rt as resolveEnvelopeFormatOptions, s as buildMediaPayload, tt as formatInboundEnvelope, u as canonicalizeAllowlistWithResolvedIds, un as buildPendingHistoryContextFromMap, vt as formatDurationSeconds, wi as resolveCommandAuthorizedFromAuthorizers, x as isDangerousNameMatchingEnabled, xt as createMediaAttachmentCache } from "./config-schema-
|
|
1
|
+
import { $ as createInboundDebouncer, A as parseTtsDirectives, B as logAckFailure, Er as buildGatewayConnectionDetails, F as resolveMentionGatingWithBypass, Gi as formatAllowlistMatchMeta, Gn as resolveAgentAvatar, H as logTypingFailure, J as shouldAckReaction, K as recordInboundSession, Lt as hasControlCommand, N as createTypingCallbacks, O as resolveTtsConfig, Or as GatewayClient, Si as resolveDmGroupAccessWithLists, St as normalizeMediaAttachments, Ti as resolveControlCommandGate, Tt as runCapability, U as buildPairingReply, V as logInboundDrop, Vt as enqueueSystemEvent, X as dispatchReplyWithBufferedBlockDispatcher, Z as dispatchReplyWithDispatcher, _n as matchesMentionWithExplicit, at as createReplyDispatcherWithTyping, bi as readStoreAllowFromForDmPolicy, bn as agentCommand, bt as buildProviderRegistry, c as addAllowlistUserEntriesFromConfigEntry, ct as resolveStoredModelOverride, en as stripReasoningTagsFromText, et as resolveInboundDebounceMs, f as patchAllowlistUsersInConfigEntries, fn as clearHistoryEntriesIfEnabled, gn as buildMentionRegexes, hn as recordPendingHistoryEntryIfEnabled, it as dispatchInboundMessage, k as textToSpeech, l as buildAllowlistResolutionSummary, lt as buildModelsProviderData, ot as EmbeddedBlockChunker, p as summarizeMapping, rt as resolveEnvelopeFormatOptions, s as buildMediaPayload, tt as formatInboundEnvelope, u as canonicalizeAllowlistWithResolvedIds, un as buildPendingHistoryContextFromMap, vt as formatDurationSeconds, wi as resolveCommandAuthorizedFromAuthorizers, x as isDangerousNameMatchingEnabled, xt as createMediaAttachmentCache } from "./config-schema-BiBOUW89.js";
|
|
2
2
|
import { Dn as normalizeMessageChannel, Dt as getChannelDock, Mn as GATEWAY_CLIENT_NAMES, S as readSessionUpdatedAt, jn as GATEWAY_CLIENT_MODES, x as loadSessionStore } from "./runtime-CXSQwMaR.js";
|
|
3
3
|
import { r as createNonExitingRuntime, t as createSubsystemLogger } from "./subsystem-DBPNbQDQ.js";
|
|
4
4
|
import { i as logVerbose, l as warn, p as getChildLogger, s as shouldLogVerbose, t as danger, w as resolvePreferredFasedAgentTmpDir } from "./globals-B_jjtAje.js";
|
|
@@ -39,7 +39,7 @@ import "./manager-BegWxNYX.js";
|
|
|
39
39
|
import "./query-expansion-BG3FgzF7.js";
|
|
40
40
|
import "./common-HCcXU-NR.js";
|
|
41
41
|
import { C as isNativeCommandsExplicitlyDisabled, E as resolveNativeSkillsEnabled, T as resolveNativeCommandsEnabled, a as listChatCommands, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as shouldHandleTextCommands, h as serializeCommandArgs, p as resolveCommandArgMenu, r as findCommandByNativeName, t as buildCommandTextFromArgs } from "./commands-registry-G5KXSi_y.js";
|
|
42
|
-
import "./runtime-dependency-
|
|
42
|
+
import "./runtime-dependency-DczkvPxn.js";
|
|
43
43
|
import "./path-alias-guards-DjgDArrp.js";
|
|
44
44
|
import "./fs-safe-g4g7GT02.js";
|
|
45
45
|
import "./qr-image-B4MlMG4N.js";
|
|
@@ -67,7 +67,7 @@ import { o as createNoopThreadBindingManager, r as reconcileAcpThreadBindingsOnS
|
|
|
67
67
|
import { a as setPresence, n as registerGateway, r as unregisterGateway } from "./gateway-registry-Bgl2GFgy.js";
|
|
68
68
|
import { t as createReplyReferencePlanner } from "./reply-reference-BnAk5Wjb.js";
|
|
69
69
|
import { i as createStatusReactionController, r as DEFAULT_TIMING, t as createFinalizableDraftLifecycle } from "./draft-stream-controls-CMNdKSx-.js";
|
|
70
|
-
import { n as buildUntrustedChannelMetadata, t as chunkItems } from "./chunk-items-
|
|
70
|
+
import { n as buildUntrustedChannelMetadata, t as chunkItems } from "./chunk-items-BLBZNORg.js";
|
|
71
71
|
import { t as fetchDiscordApplicationId } from "./probe-oVp12D6L.js";
|
|
72
72
|
import { t as DiscordUiContainer } from "./ui-GQDYm_jw.js";
|
|
73
73
|
import "./guilds-Dkwl0yHv.js";
|
|
@@ -80,7 +80,7 @@ import { inspect } from "node:util";
|
|
|
80
80
|
import fs from "node:fs/promises";
|
|
81
81
|
import { randomUUID } from "node:crypto";
|
|
82
82
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
83
|
-
import WebSocket
|
|
83
|
+
import WebSocket from "ws";
|
|
84
84
|
import { ApplicationCommandOptionType, ButtonStyle, ChannelType, Routes, StickerFormatType } from "discord-api-types/v10";
|
|
85
85
|
import { Button, ChannelSelectMenu, ChannelType as ChannelType$1, Client, Command, CommandWithSubcommands, Container, MentionableSelectMenu, MessageCreateListener, MessageReactionAddListener, MessageReactionRemoveListener, MessageType, Modal, PresenceUpdateListener, ReadyListener, RoleSelectMenu, Row, Separator, StringSelectMenu, TextDisplay, UserSelectMenu, serializePayload } from "@buape/carbon";
|
|
86
86
|
import { GatewayCloseCodes, GatewayIntents, GatewayPlugin } from "@buape/carbon/gateway";
|
|
@@ -1398,7 +1398,7 @@ async function preflightDiscordMessage(params) {
|
|
|
1398
1398
|
let preflightTranscript;
|
|
1399
1399
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
1400
1400
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
1401
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
1401
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-CS7Q_7-R.js");
|
|
1402
1402
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
1403
1403
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
1404
1404
|
ctx: {
|
|
@@ -6880,7 +6880,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
6880
6880
|
return super.registerClient(client);
|
|
6881
6881
|
}
|
|
6882
6882
|
createWebSocket(url) {
|
|
6883
|
-
return new WebSocket
|
|
6883
|
+
return new WebSocket(url, { agent: wsAgent });
|
|
6884
6884
|
}
|
|
6885
6885
|
}
|
|
6886
6886
|
return new ProxyGatewayPlugin();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { An as sendJson, At as DEFAULT_INPUT_MAX_REDIRECTS, Dn as createDefaultDeps, Ft as resolveInputFileLimits, Mn as writeDone, Mt as extractFileContentFromSource, Nt as extractImageContentFromSource, On as resolveAgentIdForRequest, Ot as DEFAULT_INPUT_IMAGE_MAX_BYTES, Pt as normalizeMimeList, Tr as onAgentEvent, bn as agentCommand, jn as setSseHeaders, jt as DEFAULT_INPUT_TIMEOUT_MS, kn as resolveSessionKey, kt as DEFAULT_INPUT_IMAGE_MIMES, on as handleGatewayPostJsonEndpoint, sn as buildAgentMessageFromConversationEntries, wr as emitAgentEvent, yn as resolveAssistantStreamDeltaText } from "./config-schema-
|
|
1
|
+
import { An as sendJson, At as DEFAULT_INPUT_MAX_REDIRECTS, Dn as createDefaultDeps, Ft as resolveInputFileLimits, Mn as writeDone, Mt as extractFileContentFromSource, Nt as extractImageContentFromSource, On as resolveAgentIdForRequest, Ot as DEFAULT_INPUT_IMAGE_MAX_BYTES, Pt as normalizeMimeList, Tr as onAgentEvent, bn as agentCommand, jn as setSseHeaders, jt as DEFAULT_INPUT_TIMEOUT_MS, kn as resolveSessionKey, kt as DEFAULT_INPUT_IMAGE_MIMES, on as handleGatewayPostJsonEndpoint, sn as buildAgentMessageFromConversationEntries, wr as emitAgentEvent, yn as resolveAssistantStreamDeltaText } from "./config-schema-BiBOUW89.js";
|
|
2
2
|
import "./runtime-CXSQwMaR.js";
|
|
3
3
|
import { i as defaultRuntime } from "./subsystem-DBPNbQDQ.js";
|
|
4
4
|
import "./globals-B_jjtAje.js";
|
|
@@ -36,7 +36,7 @@ import "./manager-BegWxNYX.js";
|
|
|
36
36
|
import "./query-expansion-BG3FgzF7.js";
|
|
37
37
|
import "./common-HCcXU-NR.js";
|
|
38
38
|
import "./commands-registry-G5KXSi_y.js";
|
|
39
|
-
import "./runtime-dependency-
|
|
39
|
+
import "./runtime-dependency-DczkvPxn.js";
|
|
40
40
|
import "./path-alias-guards-DjgDArrp.js";
|
|
41
41
|
import "./fs-safe-g4g7GT02.js";
|
|
42
42
|
import "./qr-image-B4MlMG4N.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { At as FasedAgentConfig, t as ChannelConfigSchema } from "./types.plugin-BcSBq42x.js";
|
|
2
|
-
import { v as FasedAgentPluginConfigSchema } from "./types-
|
|
2
|
+
import { v as FasedAgentPluginConfigSchema } from "./types-BakzIzGN.js";
|
|
3
3
|
import { ZodTypeAny } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/config-schema.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { At as FasedAgentConfig } from "./types.plugin-BcSBq42x.js";
|
|
2
|
-
import { Q as RuntimeWebSearchMetadata, R as WebSearchProviderPlugin, z as WebSearchProviderToolDefinition } from "./types-
|
|
2
|
+
import { Q as RuntimeWebSearchMetadata, R as WebSearchProviderPlugin, z as WebSearchProviderToolDefinition } from "./types-BakzIzGN.js";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin-sdk/provider-web-search-config-contract.d.ts
|
|
5
5
|
type WebSearchCredentialResolutionSource = "config" | "env" | "none";
|
|
@@ -11,7 +11,7 @@ import "./github-copilot-token-CUK__1s1.js";
|
|
|
11
11
|
import "./retry-DstNBhDW.js";
|
|
12
12
|
import "./ssrf-fG4UHKBw.js";
|
|
13
13
|
import "./optional-runtime-dependency-0dznm3ZO.js";
|
|
14
|
-
import { A as fetchJson, C as normalizeCdpWsUrl, D as assertBrowserNavigationResultAllowed, E as assertBrowserNavigationAllowed, M as getHeadersWithAuth, N as withCdpSocket, O as withBrowserNavigationPolicy, S as formatAriaSnapshot, c as resolveStrictExistingPathsWithinRoot, f as getChromeWebSocketUrl, k as appendCdpPath, n as loadPlaywrightCore, o as DEFAULT_UPLOAD_DIR, u as DEFAULT_FILL_FIELD_TYPE } from "./runtime-dependency-
|
|
14
|
+
import { A as fetchJson, C as normalizeCdpWsUrl, D as assertBrowserNavigationResultAllowed, E as assertBrowserNavigationAllowed, M as getHeadersWithAuth, N as withCdpSocket, O as withBrowserNavigationPolicy, S as formatAriaSnapshot, c as resolveStrictExistingPathsWithinRoot, f as getChromeWebSocketUrl, k as appendCdpPath, n as loadPlaywrightCore, o as DEFAULT_UPLOAD_DIR, u as DEFAULT_FILL_FIELD_TYPE } from "./runtime-dependency-DczkvPxn.js";
|
|
15
15
|
import "./path-alias-guards-DjgDArrp.js";
|
|
16
16
|
import "./fs-safe-g4g7GT02.js";
|
|
17
17
|
import path from "node:path";
|
|
@@ -13,7 +13,7 @@ import fs$1 from "node:fs/promises";
|
|
|
13
13
|
import { execFileSync, spawn } from "node:child_process";
|
|
14
14
|
import { createHmac } from "node:crypto";
|
|
15
15
|
import { createServer } from "node:http";
|
|
16
|
-
import WebSocket
|
|
16
|
+
import WebSocket, { WebSocketServer } from "ws";
|
|
17
17
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
18
18
|
import net from "node:net";
|
|
19
19
|
|
|
@@ -275,7 +275,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
275
275
|
let extensionWs = null;
|
|
276
276
|
const cdpClients = /* @__PURE__ */ new Set();
|
|
277
277
|
const connectedTargets = /* @__PURE__ */ new Map();
|
|
278
|
-
const extensionConnected = () => extensionWs?.readyState === WebSocket
|
|
278
|
+
const extensionConnected = () => extensionWs?.readyState === WebSocket.OPEN;
|
|
279
279
|
let extensionDisconnectCleanupTimer = null;
|
|
280
280
|
const extensionReconnectWaiters = /* @__PURE__ */ new Set();
|
|
281
281
|
const flushExtensionReconnectWaiters = (connected) => {
|
|
@@ -326,7 +326,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
326
326
|
let nextExtensionId = 1;
|
|
327
327
|
const sendToExtension = async (payload) => {
|
|
328
328
|
const ws = extensionWs;
|
|
329
|
-
if (!ws || ws.readyState !== WebSocket
|
|
329
|
+
if (!ws || ws.readyState !== WebSocket.OPEN) throw new Error("Chrome extension not connected");
|
|
330
330
|
ws.send(JSON.stringify(payload));
|
|
331
331
|
return await new Promise((resolve, reject) => {
|
|
332
332
|
const timer = setTimeout(() => {
|
|
@@ -343,12 +343,12 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
343
343
|
const broadcastToCdpClients = (evt) => {
|
|
344
344
|
const msg = JSON.stringify(evt);
|
|
345
345
|
for (const ws of cdpClients) {
|
|
346
|
-
if (ws.readyState !== WebSocket
|
|
346
|
+
if (ws.readyState !== WebSocket.OPEN) continue;
|
|
347
347
|
ws.send(msg);
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
350
|
const sendResponseToCdp = (ws, res) => {
|
|
351
|
-
if (ws.readyState !== WebSocket
|
|
351
|
+
if (ws.readyState !== WebSocket.OPEN) return;
|
|
352
352
|
ws.send(JSON.stringify(res));
|
|
353
353
|
};
|
|
354
354
|
const ensureTargetEventsForClient = (ws, mode) => {
|
|
@@ -558,7 +558,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
558
558
|
rejectUpgrade(socket, 401, "Unauthorized");
|
|
559
559
|
return;
|
|
560
560
|
}
|
|
561
|
-
if (extensionWs && extensionWs.readyState !== WebSocket
|
|
561
|
+
if (extensionWs && extensionWs.readyState !== WebSocket.OPEN) {
|
|
562
562
|
try {
|
|
563
563
|
extensionWs.terminate();
|
|
564
564
|
} catch {}
|
|
@@ -595,7 +595,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
595
595
|
clearExtensionDisconnectCleanupTimer();
|
|
596
596
|
flushExtensionReconnectWaiters(true);
|
|
597
597
|
const ping = setInterval(() => {
|
|
598
|
-
if (ws.readyState !== WebSocket
|
|
598
|
+
if (ws.readyState !== WebSocket.OPEN) return;
|
|
599
599
|
ws.send(JSON.stringify({ method: "ping" }));
|
|
600
600
|
}, 5e3);
|
|
601
601
|
ws.on("message", (data) => {
|
|
@@ -937,7 +937,7 @@ async function fetchOk(url, timeoutMs = 1500, init) {
|
|
|
937
937
|
}
|
|
938
938
|
async function withCdpSocket(wsUrl, fn, opts) {
|
|
939
939
|
const headers = getHeadersWithAuth(wsUrl, opts?.headers ?? {});
|
|
940
|
-
const ws = new WebSocket
|
|
940
|
+
const ws = new WebSocket(wsUrl, {
|
|
941
941
|
handshakeTimeout: typeof opts?.handshakeTimeoutMs === "number" && Number.isFinite(opts.handshakeTimeoutMs) ? Math.max(1, Math.floor(opts.handshakeTimeoutMs)) : 5e3,
|
|
942
942
|
...Object.keys(headers).length ? { headers } : {}
|
|
943
943
|
});
|
|
@@ -1863,7 +1863,7 @@ async function getChromeWebSocketUrl(cdpUrl, timeoutMs = 500) {
|
|
|
1863
1863
|
async function canOpenWebSocket(wsUrl, timeoutMs = 800) {
|
|
1864
1864
|
return await new Promise((resolve) => {
|
|
1865
1865
|
const headers = getHeadersWithAuth(wsUrl);
|
|
1866
|
-
const ws = new WebSocket
|
|
1866
|
+
const ws = new WebSocket(wsUrl, {
|
|
1867
1867
|
handshakeTimeout: timeoutMs,
|
|
1868
1868
|
...Object.keys(headers).length ? { headers } : {}
|
|
1869
1869
|
});
|