#!/usr/bin/env node import { type DiscordActivityHtmlExportReport } from "./activity-html.js"; import { type DiscordActivityReviewReport } from "./activity-review.js"; import { type DiscordCatalogCheckReport } from "./catalog.js"; import { type DiscordCatalogHtmlExportReport } from "./catalog-html.js"; import { type BotInstallPlan } from "./bot-install.js"; import { type DiscordOnboardingHtmlExportReport } from "./onboarding-html.js"; import { type DiscordHostActivationHtmlExportReport } from "./host-activation-html.js"; import { type DiscordMigrationHtmlExportReport } from "./migration-html.js"; import { type MigrationCatalogReport, type MigrationPlanReport } from "./migration-planner.js"; import { type HostActivationPlan } from "./host-activation.js"; import { type HostAdapterId } from "./host-adapters.js"; import { type HostInspectionReport } from "./host-inspection.js"; import { type ApplyHostChangeOptions, type HostChangeApplyReport, type HostChangePlanReport } from "./host-installation.js"; import { type ConnectorConfig } from "./config.js"; import { type ConfigChangeApplyOptions, type ConfigChangeApplyReport, type ConfigChangePlanOptions, type ConfigChangePlanReport } from "./config-review.js"; import { type DiscordConfigWorkbenchHtmlExportReport } from "./config-workbench-html.js"; import { type ConnectorConfigDocument } from "./config-document.js"; import { type ConfigExplainReport, type ConfigInitOptions, type ConfigShowReport, type ConfigValidationReport, type ConfigWriteReport } from "./config-operator.js"; import { type ConfigRecipeApplyOptions, type ConfigRecipeApplyReport, type ConfigRecipePlanOptions, type ConfigRecipePlanReport } from "./config-recipes.js"; import { type CliFailureCategory, type OperatorRecovery } from "./operator-recovery.js"; import { type DoctorOptions, type DoctorReport, type SetupOptions, type SetupReport, type SmokeOptions, type SmokeReport } from "./operator.js"; import { type ActivatedProfile, type ConnectorProfile, type ProfileLocationOptions, type TrashedProfile } from "./profile.js"; import { type WriteCoordinationList, type WriteCoordinationResolution } from "./write-coordination.js"; import { type SetupPresetSelection } from "./setup-presets.js"; declare const CLI_COMMANDS: readonly ["activity", "catalog", "config", "coordination", "doctor", "help", "host", "migrate", "preset", "profile", "recipe", "serve", "setup", "smoke", "version"]; declare const CLI_COMMAND_ACTIONS: Readonly<{ config: readonly ["init", "validate", "show", "explain", "workbench", "plan", "apply"]; coordination: readonly ["list", "resolve"]; host: readonly ["generate", "plan", "apply"]; migrate: readonly ["list", "plan"]; preset: readonly ["list", "show", "install"]; profile: readonly ["list", "show", "remove", "restore"]; recipe: readonly ["list", "show", "plan", "apply"]; }>; type CliCommand = typeof CLI_COMMANDS[number]; type CliActionCommand = keyof typeof CLI_COMMAND_ACTIONS; type CliCommandAction = typeof CLI_COMMAND_ACTIONS[CliActionCommand][number]; export type ParsedCliArguments = { command: "activity"; configFile?: string; htmlFile?: string; json: boolean; limit: number; profileName?: string; } | { check: boolean; command: "catalog"; htmlFile?: string; json: boolean; } | { action: "apply"; candidateFile: string; command: "config"; confirmation: string; file: string; json: boolean; planDigest: string; } | { action: "explain"; command: "config"; json: boolean; path?: string; } | { action: "init"; applicationId: string; botId: string; channelIds: string[]; command: "config"; credentialFile?: string; credentialVariable?: string; file: string; guildIds: string[]; json: boolean; name: string; overwrite: boolean; preset?: string; } | { action: "plan"; candidateFile: string; command: "config"; file: string; json: boolean; } | { action: "show" | "validate"; command: "config"; file: string; json: boolean; } | { action: "workbench"; command: "config"; file: string; htmlFile: string; json: boolean; } | { action: "list"; command: "coordination"; configFile?: string; json: boolean; profileName?: string; } | { action: "resolve"; claimId: string; command: "coordination"; configFile?: string; confirmation: string; json: boolean; profileName?: string; } | { command: "doctor"; configFile?: string; json: boolean; online: boolean; profileName?: string; verbose: boolean; } | { action?: CliCommandAction; command: "help"; topic: CliCommand | undefined; } | { action: "generate"; adapterId?: HostAdapterId; command: "host"; configFile?: string; htmlFile?: string; inspectHostFile?: string; json: boolean; launcherCommand: string | undefined; packageLaunch?: true; profileName?: string; serverName: string | undefined; } | { action: "plan"; adapterId: HostAdapterId; command: "host"; configFile?: string; hostFile: string; json: boolean; launcherCommand: string | undefined; packageLaunch?: true; profileName?: string; serverName: string | undefined; } | { action: "apply"; adapterId: HostAdapterId; command: "host"; configFile?: string; confirmation: string; hostFile: string; json: boolean; launcherCommand: string | undefined; packageLaunch?: true; planDigest: string; profileName?: string; serverName: string | undefined; } | { action: "list"; command: "migrate"; json: boolean; } | { action: "plan"; command: "migrate"; htmlFile?: string; json: boolean; sourceId: string; } | { action: "install"; applicationId: string; command: "preset"; guildId: string; htmlFile?: string; json: boolean; name: string; } | { action: "list"; command: "preset"; json: boolean; } | { action: "show"; command: "preset"; json: boolean; name: string; } | { action: "list"; command: "profile"; json: boolean; } | { action: "show"; command: "profile"; json: boolean; name: string; } | { action: "remove" | "restore"; command: "profile"; confirmation: string; json: boolean; name: string; } | { action: "list"; command: "recipe"; json: boolean; } | { action: "show"; command: "recipe"; json: boolean; name: string; } | { action: "plan"; channelIds: string[]; command: "recipe"; file: string; guildIds: string[]; json: boolean; name: string; userIds: string[]; } | { action: "apply"; channelIds: string[]; command: "recipe"; confirmation: string; file: string; guildIds: string[]; json: boolean; name: string; planDigest: string; userIds: string[]; } | { command: "serve"; configFile?: string; profileName?: string; } | { command: "setup"; configFile?: string; credentialFile?: string; credentialVariable?: string; json: boolean; launcherCommand: string | undefined; overwrite: boolean; packageLaunch?: true; preset?: SetupPresetSelection; profileName?: string; serverName: string | undefined; } | { command: "smoke"; configFile?: string; json: boolean; profileName?: string; } | { command: "version"; }; export interface CliDependencies { activateProfile(name: string, options: ProfileLocationOptions): Promise; applyHostFile(plan: HostActivationPlan, adapterId: HostAdapterId, file: string, options: ApplyHostChangeOptions): HostChangeApplyReport; applyConfigChange(options: ConfigChangeApplyOptions): Promise; catalog(options: { stderr: Pick; }): unknown; checkCatalog(): Promise; exportActivityHtml(file: string, report: DiscordActivityReviewReport): Promise; exportCatalogHtml(file: string): Promise; exportConfigWorkbenchHtml(activeFile: string, outputFile: string): Promise; exportHostActivationHtml(file: string, plan: HostActivationPlan): Promise; exportMigrationHtml(file: string, plan: MigrationPlanReport): Promise; exportOnboardingHtml(file: string, plan: BotInstallPlan): Promise; diagnose(options: DoctorOptions): Promise; explainConfig(path?: string): ConfigExplainReport; initializeConfig(options: ConfigInitOptions): Promise; inspectHostFile(plan: HostActivationPlan, adapterId: HostAdapterId, file: string): HostInspectionReport; listCoordination(activityFile: string): Promise; listProfiles(options: ProfileLocationOptions): Promise; loadConfig(environment: NodeJS.ProcessEnv): ConnectorConfig; loadConfigDocument(file: string): ConnectorConfigDocument; loadProfile(name: string, options: ProfileLocationOptions): Promise; prepareSetup(options: SetupOptions): Promise; migrationCatalog(): MigrationCatalogReport; migrationPlan(sourceId: string): Promise; reviewActivity(activityFile: string, limit: number): Promise; applyRecipe(options: ConfigRecipeApplyOptions): Promise; planRecipe(options: ConfigRecipePlanOptions): ConfigRecipePlanReport; planConfigChange(options: ConfigChangePlanOptions): ConfigChangePlanReport; planHostFile(plan: HostActivationPlan, adapterId: HostAdapterId, file: string): HostChangePlanReport; resolveCoordination(activityFile: string, claimId: string, confirmation: string): Promise; restoreProfile(name: string, options: ProfileLocationOptions): Promise; serve(options: { config: ConnectorConfig; environment: NodeJS.ProcessEnv; stderr: Pick; }): unknown; smoke(options: SmokeOptions): Promise; showConfig(file: string): ConfigShowReport; trashProfile(name: string, options: ProfileLocationOptions): Promise; validateConfig(file: string): ConfigValidationReport; } export interface CliOptions { args?: readonly string[]; dependencies?: CliDependencies; entrypointPath?: string; environment?: NodeJS.ProcessEnv; executablePath?: string; nodeVersion?: string; stderr?: Pick; stdout?: Pick; } export interface CliErrorReport { error: { category: CliFailureCategory; message: string; recovery: OperatorRecovery; retryAfterMs?: number; }; schemaVersion: number; status: "error"; } export declare function parseCliArguments(args: readonly string[]): ParsedCliArguments; export declare function runCli(options?: CliOptions): Promise; export {}; //# sourceMappingURL=cli.d.ts.map