import { type ReactNode } from 'react'; import { type BotDefaultsRow, type BotSubstituteTarget, type CliOptionsState, type SubstituteTargetResolution } from './bot-defaults.js'; import { type PageDisposer } from './react-mount.js'; type PatchBot = (appId: string, patch: Partial | ((bot: BotDefaultsRow) => BotDefaultsRow)) => void; type CardPrefPatch = Record; type JsonResponse = { ok: boolean; status: number; body: any; }; export type BotDefaultsTab = 'common' | 'sessions' | 'security' | 'cards' | 'advanced'; export declare const BOT_DEFAULTS_TABS: readonly BotDefaultsTab[]; export declare function BotDefaultsTabs(props: { active: BotDefaultsTab; onChange(tab: BotDefaultsTab): void; }): import("react").JSX.Element; export declare function BdTabGrid(props: { children: ReactNode; className?: string; }): import("react").JSX.Element; /** * 模型选择器:下拉候选(静态精选 + live 探测合并,由调用方 mergeModelCandidates 算好) * + 「自定义模型…」自由输入。模型列表会过期,候选永不锁死。 * - value='' 表示跟随 CLI 默认,菜单显示 defaultLabel; * - value 非空但不在候选中时,把当前值作为额外选项插在最前(旧配置/自定义值可见); * - 选中 customLabel 切到自定义输入模式(datalist 仍挂全部候选做自动补全), * 返回按钮切回下拉模式; * - busy(live 探测进行中)只在控件下方显示小转圈,不禁用选择。 */ export declare function ModelPickerField(props: { value: string; onChange(next: string): void; options: readonly string[]; disabled?: boolean; busy?: boolean; dataInput: string; ariaLabel: string; defaultLabel: string; customLabel: string; detectedCount?: number; detectedLabel?: string; /** 下拉菜单样式类:defaults 页传 bd-field-menu,onboarding 传 onboarding-menu。 */ menuClassName?: string; }): React.JSX.Element; type SubstituteTargetIdField = 'email' | 'openId' | 'userId' | 'unionId'; type SubstituteTargetDraft = { key: number; idField: SubstituteTargetIdField; idValue: string; name: string; persisted: BotSubstituteTarget; originalIdField?: SubstituteTargetIdField; resolving?: boolean; resolution?: { ok: boolean; name?: string; avatarUrl?: string; reason?: SubstituteTargetResolution['reason']; }; }; /** * Build the substitute target to PUT for one edited row. Returns null when the id value is * blank. When the id value/field was edited, every carried-over resolved id is dropped so the * server re-resolves the new value — otherwise `persisted` keeps a previously-resolved openId * alongside the email and the server (which prefers openId) would substitute the stale person. * An unchanged row keeps its resolved ids so the stable id is preserved. */ export declare function buildSubstituteTarget(row: Pick): BotSubstituteTarget | null; export declare function BotDefaultsPage(): import("react").JSX.Element; export declare function BotAgentSection(props: { bot: BotDefaultsRow; sessionFallback: string; cliState: CliOptionsState; patchBot: PatchBot; }): import("react").JSX.Element; /** * Node's setTimeout delay caps at a 32-bit signed int of ms; a larger value * wraps to ~1ms. Kept in lockstep with `MAX_TURN_TIMEOUT_MS` in bot-registry * (a browser bundle can't import that Node-side module); a unit test asserts the * two stay equal so this copy can't silently drift. */ export declare const DASHBOARD_MAX_TURN_TIMEOUT_MS = 2147483647; type SandboxTier = 'readWrite' | 'readOnly' | 'deny'; type SandboxTiers = { readWrite: string[]; readOnly: string[]; deny: string[]; }; /** Effective access for `path` under the three tiers: DEEPEST (longest-prefix) * matching rule wins; at equal depth (same path across tiers) the MORE * RESTRICTIVE tier wins — mirrors fs-policy.ts accessForPath + mergeFsRules so * the UI's live labels + path tester agree with what the sandbox enforces. * `home` expands a leading `~` the same way the worker does before matching, so * `~`-relative entries line up with absolute tree nodes. */ export declare function effectiveAccess(tiers: SandboxTiers, path: string, home: string): { access: SandboxTier | 'none'; rule?: string; }; export declare function CardBehaviorSection(props: { bot: BotDefaultsRow; putCardPref(patch: CardPrefPatch): Promise; }): import("react").JSX.Element; export declare function CodexAppDisplaySection(props: { bot: BotDefaultsRow; putCardPref(patch: CardPrefPatch): Promise; }): import("react").JSX.Element; export declare function EnvelopeInjectionSection(props: { bot: BotDefaultsRow; patchBot: PatchBot; }): import("react").JSX.Element; /** 会话群标签行(p2pMode=group 时显示):tag mode 选择器 + 按模式分支的 * 授权 UI(PR review:授权行必须与实际 tagMode 一致)。 * - feed-group(默认):个人侧边栏分组,需一次 OAuth → 显示状态徽标 + 一键授权 * - chat-tag:应用租户身份打企业群标签,无需用户授权(部分租户权限目录无该 * scope)→ 不显示授权按钮 * - off:不打标签 * 一键授权 → 新标签页打开飞书授权 → 回跳 dashboard /oauth/callback 自动完成 * → 本行轮询到 authorized 后徽标变绿。 */ export declare function SessionGroupTagRow(props: { bot: BotDefaultsRow; }): import("react").JSX.Element; export declare function GrantSection(props: { bot: BotDefaultsRow; patchBot: PatchBot; }): import("react").JSX.Element; export declare function renderBotDefaultsPage(root: HTMLElement): PageDisposer; export {}; //# sourceMappingURL=bot-defaults-page.d.ts.map