import type { DashboardEndpoint, DashboardResult } from './dashboard-endpoint.js'; export declare const DASHBOARD_COMMAND_USAGE = "\u7528\u6CD5:\n botmux dashboard \u83B7\u53D6\u5F53\u524D Dashboard \u767B\u5F55 URL\uFF08\u6CA1\u6709\u5219\u521B\u5EFA\uFF0C\u4E0D\u8F6E\u6362\u5DF2\u6709 token\uFF09\n botmux dashboard current \u83B7\u53D6\u5F53\u524D Dashboard \u767B\u5F55 URL\uFF08\u6CA1\u6709\u5219\u521B\u5EFA\uFF0C\u4E0D\u8F6E\u6362\u5DF2\u6709 token\uFF09\n botmux dashboard rotate \u8F6E\u6362 token\uFF0C\u5E76\u6253\u5370\u65B0\u7684 Dashboard \u767B\u5F55 URL"; export type DashboardCommandExecution = { kind: 'help'; } | { kind: 'invalid'; argument: string; } | { kind: 'endpoint'; action: 'current' | 'rotate'; result: DashboardResult; }; /** * `botmux dashboard` 成功时要打印的每一行,按顺序。 * * ⚠️ 契约:**第 0 行永远是且只是那条 URL**,不带任何前缀、标签或修饰。脚本和用户 * 都靠「取第一行」拿链接(`botmux dashboard | head -1`)。往后追加行可以,动第一行 * 不行。 * * 第二行是工作台直达入口(`/workbench?t=`)——`/workbench` 是 * Dashboard 上一个无 fragment 的入口,会 302 到 `/?t=…#/agent-workbench` * (见 dashboard.ts)。它和第一行同源同 token,所以第一行能用它就能用;拼不出来 * (URL 不可解析)时这一行整行省略,不打印半截链接。 */ export declare function formatDashboardSuccessLines(result: Extract): string[]; export declare function formatDashboardFallbackFailure(action: 'current' | 'rotate', failure: Extract): string; /** * Parse and dispatch the dashboard subcommand without touching process-global * output or credentials. Keeping the endpoint call injected makes the safety * property executable in tests: help/invalid invocations cannot accidentally * reach the token-rotation endpoint. */ export declare function executeDashboardCommand(args: readonly string[], callEndpoint: (path: DashboardEndpoint) => Promise): Promise; //# sourceMappingURL=dashboard-command.d.ts.map