import type { ApplicationStage } from "@onebots/core"; export type FrameworkId = string; export type FrameworkKind = "framework" | "distribution" | "sdk" | "bridge"; export type FrameworkProtocol = "onebot.v11" | "onebot.v12" | "satori.v1" | "milky.v1"; export type FrameworkTransport = "websocket" | "reverse-websocket" | "sse" | "webhook"; export type FrameworkVerificationLevel = "documented" | "handshake" | "messages" | "actions" | "verified"; export interface FrameworkProfile { id: FrameworkId; displayName: string; kind: FrameworkKind; packageName: string | null; protocol: FrameworkProtocol; transport: FrameworkTransport; verification: FrameworkVerificationLevel; evidence?: FrameworkVerificationEvidence; distributionAudit?: DistributionCompatibilityAudit; upstream: string; defaultFrameworkOrigin: string | null; limitations: readonly string[]; applicationStage?: Exclude; } export interface DistributionCompatibilityAudit { sourceRevision: string; auditedAt: string; requiredActions: readonly string[]; supportedActions: readonly string[]; unsupportedActions: readonly string[]; note: string; } export interface FrameworkVerificationEvidence { frameworkVersion: string; adapterVersion: string; lastVerifiedAt: string; command: string; checks: readonly string[]; } export interface FrameworkConnectionRequest { framework: FrameworkId; account: string; onebotsOrigin?: string; frameworkOrigin?: string; } export interface FrameworkConnectionCheck { name: string; command?: string; expected: string; } export interface FrameworkConnectionPlan { schemaVersion: 1; framework: FrameworkProfile; account: { platform: string; accountId: string; key: string; }; protocol: FrameworkProtocol; transport: FrameworkTransport; endpoint: string; onebotsConfig: string; frameworkConfig: string; checks: FrameworkConnectionCheck[]; limitations: string[]; } export interface FrameworkIntegrationContext { profile: FrameworkProfile; onebotsEndpoint: string; frameworkOrigin: URL | null; } export interface FrameworkConfigRenderContext extends FrameworkIntegrationContext { endpoint: string; } export interface FrameworkIntegrationProvider { profile: FrameworkProfile; resolveEndpoint?: (context: FrameworkIntegrationContext) => string; renderFrameworkConfig: (context: FrameworkConfigRenderContext) => string; } export declare function defineFrameworkIntegration(provider: FrameworkIntegrationProvider): FrameworkIntegrationProvider; /** 框架接入是独立于平台 Adapter 与出口 Protocol 的下游方案扩展。 */ export declare class FrameworkIntegrationRegistry { private static providers; static register(provider: FrameworkIntegrationProvider): void; static get(id: string): FrameworkIntegrationProvider | undefined; static list(): readonly FrameworkIntegrationProvider[]; /** @internal 供动态扩展加载事务失败时完整回滚。 */ static capture(): ReadonlyMap; /** @internal 只接受由 capture 产生的进程内快照。 */ static restore(snapshot: ReadonlyMap): void; } //# sourceMappingURL=framework-integration-types.d.ts.map