import { KeychainOAuthProvider, SecureCredentialStore, StaticTokenCredentialStore, SystemCredentialStore } from "./cli-auth.js"; import { CliCapability, CliToolDescriptor } from "./cli-surface.js"; import { BrandedCliDiscoveryCache, DEFAULT_DISCOVERY_CACHE_TTL_MS, DiscoveryCachePartitionInput, FileDiscoveryCache, MAX_DISCOVERY_CACHE_TTL_MS } from "./cli-discovery-cache.js"; import { CUSTOMER_SKILL_MANIFEST_NAME, CustomerSkillAction, CustomerSkillPlan, CustomerSkillTarget, applyCustomerSkillPlan, planCustomerSkill, synthesizeCustomerSkillFiles } from "./cli-customer-skill.js"; import { COMPLETION_SHELLS, CompletionShell, renderShellCompletions } from "./cli-completions.js"; import { CallToolResult, StreamableHTTPClientTransport } from "@modelcontextprotocol/client"; //#region src/cli-host.d.ts type BrandedCliAuthMode = "oauth" | "token" | "public" | "auto"; interface BrandedCliAuthConfig { readonly mode?: BrandedCliAuthMode; readonly tokenEnvVar?: string; readonly headerName?: string; } interface BrandedCliDiscoveryCacheConfig { readonly ttlMs?: number; } interface BrandedCliConfig { readonly packageName: string; readonly binaryName: string; readonly displayName: string; readonly version: string; readonly endpoint: string; readonly supportUrl?: string; readonly poweredBy?: string; readonly callbackPort?: number; readonly auth?: BrandedCliAuthConfig; readonly discoveryCache?: BrandedCliDiscoveryCacheConfig; } interface BrandedCliConnection { listTools(): Promise<{ tools: readonly CliToolDescriptor[]; }>; callTool(input: { name: string; arguments: Readonly>; }): Promise; close(): Promise; } type ActiveCredentialSource = { readonly kind: "flag-stdin" | "flag-token" | "env"; readonly envVar?: string; } | { readonly kind: "keychain-token"; } | { readonly kind: "keychain-oauth"; readonly issuer: string; } | { readonly kind: "public"; }; interface ActiveCredentialDescriptor { readonly source: ActiveCredentialSource; readonly partitionMaterial: string; } interface BrandedCliConnector { connect(interactive: boolean): Promise; loggedInIssuer(): Promise; logout(): Promise; saveStaticToken?(token: string): Promise; activeCredential?(overrideToken?: string, overrideSource?: "flag-stdin" | "flag-token"): Promise; connectWithToken?(token: string): Promise; } interface BrandedCliIo { readonly stdout: (value: string) => void; readonly stderr: (value: string) => void; readonly isTTY: boolean; readonly stdinIsTTY?: boolean; readonly readStdin?: () => Promise; readonly confirm: (prompt: string) => Promise; } interface BrandedCliDependencies { readonly connector?: BrandedCliConnector; readonly credentialStore?: SecureCredentialStore; readonly discoveryCache?: BrandedCliDiscoveryCache | false; readonly env?: Readonly>; readonly cwd?: string; readonly openAuthorization?: (url: URL) => void | Promise; readonly io?: Partial; } interface BrandedCli { run(argv?: readonly string[]): Promise; } declare function defaultTokenEnvVar(binaryName: string): string; declare function createStaticTokenTransport(endpoint: URL, token: string, headerName?: string): StreamableHTTPClientTransport; declare function createBrandedCli(config: BrandedCliConfig, dependencies?: BrandedCliDependencies): BrandedCli; declare function runBrandedCli(config: BrandedCliConfig, dependencies?: BrandedCliDependencies): Promise; //#endregion export { ActiveCredentialDescriptor, ActiveCredentialSource, BrandedCli, BrandedCliAuthConfig, BrandedCliAuthMode, BrandedCliConfig, BrandedCliConnection, BrandedCliConnector, BrandedCliDependencies, type BrandedCliDiscoveryCache, BrandedCliDiscoveryCacheConfig, BrandedCliIo, COMPLETION_SHELLS, CUSTOMER_SKILL_MANIFEST_NAME, type CliCapability, type CliToolDescriptor, type CompletionShell, type CustomerSkillAction, type CustomerSkillPlan, type CustomerSkillTarget, DEFAULT_DISCOVERY_CACHE_TTL_MS, type DiscoveryCachePartitionInput, FileDiscoveryCache, KeychainOAuthProvider, MAX_DISCOVERY_CACHE_TTL_MS, type SecureCredentialStore, StaticTokenCredentialStore, SystemCredentialStore, applyCustomerSkillPlan, createBrandedCli, createStaticTokenTransport, defaultTokenEnvVar, planCustomerSkill, renderShellCompletions, runBrandedCli, synthesizeCustomerSkillFiles }; //# sourceMappingURL=cli-host.d.ts.map