import { type PlatformBinding } from './binding.js'; /** 本机一个 botmux bot 的概要(上报给平台,供团队页「人→机器→bot」展示 + 拉群)。 */ export interface PlatformBotInfo { appId: string; openId: string | null; name: string; avatar?: string; cli?: string; /** 团队页是否展示这个 bot(默认 true,按 bot 配置 showInTeam 上报)。 */ showInTeam?: boolean; /** bot 自己的租户稳定 union_id(自家消息回声学到,见 bot-union-ids-store)。 * 平台按团队聚合成 roster 随 team-sync 下发,成员机器据此免 /grant 互信。 */ unionId?: string; /** 团队维度 Agent 互查(additive,交接契约):owner 预配的专长标签, * 发现/拉群的匹配依据。**agent 自报 → 仅展示、不可信**,绝不当能力凭据。 * 不报 = 空默认值(平台侧 additive 接受)。 */ specialties?: string[]; /** 是否有飞书传输身份能被 @(core-only/apiOnly → false)。**自报 → 仅展示、不可信**。 */ mentionable?: boolean; } /** 平台 team-sync 下发的原始负载(校验/落盘在 platform-team-store)。 */ export interface PlatformTeamSyncMessage { rev: string; teams: unknown[]; } export interface TunnelClientOptions { binding: PlatformBinding; /** 实际绑定的 dashboard 端口(探测后可能与配置不同) */ getDashboardPort: () => number; /** 当前 dashboard token(会轮转,每次读最新) */ getDashboardToken: () => string | null; getVersion: () => string; /** 本机的 bot 清单(每次读最新;随心跳上报) */ getBots?: () => PlatformBotInfo[]; /** 本机已应用的 team-sync rev(每次读最新;随 register/heartbeat 上报,平台 * 据此做版本比对:不一致才下发全量 team-sync)。 */ getTeamSyncRev?: () => string; /** 平台下发 team-sync(团队 bot roster + 团队群清单)时回调;落盘与公告由 * dashboard 侧处理,tunnel-client 只做传输。 */ onTeamSync?: (payload: PlatformTeamSyncMessage) => void; log: (msg: string, extra?: Record) => void; } export interface TunnelClientHandle { stop(): void; } export declare function startPlatformTunnelClient(opts: TunnelClientOptions): TunnelClientHandle; //# sourceMappingURL=tunnel-client.d.ts.map