import type { GenerativeModality, MswarmGenericJobOpsJobSummary, MswarmGenericJobOpsSummary, SelfHostedGenerativeOperation } from "@mcoda/core"; export type McodaRuntimeMode = "programmatic" | "cli_fallback" | "custom"; export interface McodaRuntimeInfo { mode: McodaRuntimeMode; requiresMcodaCli: boolean; } export type McodaAgentSource = "local_registry" | "cloud_catalog" | "self_hosted_catalog" | "worker_catalog"; export type McodaAgentManagedKind = "cloud" | "self_hosted" | "self_hosted_load_balanced" | "worker" | null; export type McodaSelfHostedRoutingMode = "direct" | "auto"; export type McodaSelfHostedClientIdentityKind = "domain" | "ip" | "uuid" | string; export interface McodaSelfHostedClientIdentity { kind: McodaSelfHostedClientIdentityKind; value: string; addedAt?: string | null; added_at?: string | null; } export type McodaPreferredSource = "cloud" | "self_hosted" | "worker" | "cloud_or_self_hosted" | null; export type McodaLocalRunnerKind = "vllm" | "llama-cpp" | "llama-cpp-python" | "stable-diffusion-cpp" | "lm-studio" | "localai" | "sglang" | "tgi" | "custom"; export type McodaLocalRunnerAuthMode = "none" | "bearer" | "dummy-bearer"; export type McodaLocalRunnerResponseFormatStrategy = "openai" | "json-object" | "json-schema" | "gbnf" | "prompt-only" | "none"; export interface McodaLocalRunnerCatalogMetadata { baseUrl: string | null; publicModelId?: string | null; inputModalities?: GenerativeModality[]; outputModalities?: GenerativeModality[]; operations?: SelfHostedGenerativeOperation[]; runnerKind: McodaLocalRunnerKind | string | null; authMode: McodaLocalRunnerAuthMode | string | null; responseFormatStrategy: McodaLocalRunnerResponseFormatStrategy | string | null; healthPath: string | null; modelsPath: string | null; requireModelInRequest: boolean | null; supportsStreaming: boolean | null; supportsTools: boolean | null; supportsJsonSchema: boolean | null; supportsGbnf: boolean | null; } export interface McodaSelfHostedRelayMetadata { gatewayBaseUrl: string | null; jobsPollPath: string | null; jobsStartPathTemplate: string | null; jobsEventsPathTemplate: string | null; jobsResultPathTemplate: string | null; } export interface McodaSelfHostedLifecycleMetadata { compatible: boolean | null; reason: string | null; missingRoute: string | null; missingRoutes: string[]; checkedAt: string | null; runtimePackageVersion: string | null; relay: McodaSelfHostedRelayMetadata | null; } export type McodaMswarmConnectionValidationMode = "auto" | "required" | "skip"; export type McodaMswarmConnectionValidationStatus = "unverified" | "verified" | "mismatch"; export interface McodaMswarmConnectionInput { tenantId?: string | null; productSlug?: string | null; apiKeyId?: string | null; ownerUserId?: string | null; ownerKeycloakUserId?: string | null; featureKey?: string | null; installationId?: string | null; installationStatus?: string | null; validationMode?: McodaMswarmConnectionValidationMode; } export interface McodaMswarmConnectionMetadata { tenantId: string | null; productSlug: string | null; apiKeyId: string | null; ownerUserId: string | null; ownerKeycloakUserId: string | null; featureKey: string | null; installationId: string | null; installationStatus: string | null; validationStatus: McodaMswarmConnectionValidationStatus; validationErrors: string[]; validatedAt: string | null; } export interface McodaStageDefinition { stageKey: string; displayName: string; description?: string; defaultAgentSlug?: string | null; recommendedUsage?: string | null; preferredSource?: McodaPreferredSource; fallbackStageKey?: string | null; nullable?: boolean; } export interface McodaAgentCatalogEntry { slug: string; source: McodaAgentSource; synced: boolean; remoteSlug: string | null; managedKind?: McodaAgentManagedKind; routingMode?: McodaSelfHostedRoutingMode | null; loadBalancedGroupId?: string | null; nodeId?: string | null; serverName?: string | null; serverId?: string | null; serverLabel?: string | null; displayName: string | null; provider: string | null; adapter: string | null; model: string | null; defaultModel: string | null; publicModelId?: string | null; inputModalities?: GenerativeModality[]; outputModalities?: GenerativeModality[]; operations?: SelfHostedGenerativeOperation[]; healthStatus: string | null; healthReason?: string | null; clientIdentity?: string | null; clientAllowlist?: McodaSelfHostedClientIdentity[]; clientAllowlistCount?: number | null; supportsTools: boolean | null; rating: number | null; reasoningRating: number | null; maxComplexity: number | null; costPerMillion: number | null; contextWindow?: number | null; maxOutputTokens?: number | null; bestUsage?: string | null; localRunner?: McodaLocalRunnerCatalogMetadata | null; selfHostedLifecycle?: McodaSelfHostedLifecycleMetadata | null; capabilities?: string[]; metadata?: Record; } export interface McodaSelfHostedServer { id: string; label: string; nodeId?: string | null; serverName?: string | null; routingMode?: McodaSelfHostedRoutingMode | null; loadBalancedGroupId?: string | null; status?: string | null; statusReason?: string | null; clientIdentity?: string | null; clientAllowlist?: McodaSelfHostedClientIdentity[]; clientAllowlistCount?: number | null; lifecycle?: McodaSelfHostedLifecycleMetadata | null; remoteSlugPrefix?: string | null; agentCount: number; agents: McodaAgentCatalogEntry[]; } export interface McodaAgentCatalog { localAgents: McodaAgentCatalogEntry[]; cloudAgents: McodaAgentCatalogEntry[]; selfHostedAgents: McodaAgentCatalogEntry[]; workerAgents: McodaAgentCatalogEntry[]; selfHostedServers: McodaSelfHostedServer[]; errors: Record; generatedAt: string; } export interface McodaAgentSetupSnapshot { provider: "mcoda_mswarm" | string; runtime: McodaRuntimeInfo; mswarmApiKeyConfigured: boolean; mswarmApiKeyLast4: string | null; mswarmConfiguredAt: string | null; mswarmConnection: McodaMswarmConnectionMetadata | null; stages: McodaStageDefinition[]; assignments: Record; catalog: McodaAgentCatalog; updatedAt: string | null; fetchedAt: string; } export type McodaGpuJobOpsPanelData = MswarmGenericJobOpsSummary; export type McodaGpuJobOpsPanelJob = MswarmGenericJobOpsJobSummary; export interface McodaAgentTestResult { slug: string; ok: boolean; output?: string; model?: string; adapter?: string; metadata?: Record; error?: string; } export interface McodaAgentSetupClient { fetchSnapshot(): Promise; configureMswarmApiKey(input: { apiKey: string; connection?: McodaMswarmConnectionInput; reasonCode?: string; metadata?: Record; }): Promise; syncAgents(input?: { reasonCode?: string; metadata?: Record; }): Promise; updateAssignments(input: { assignments: Record; reasonCode?: string; metadata?: Record; }): Promise; testAgent?(input: { slug: string; prompt?: string; timeoutMs?: number; }): Promise; } export interface McodaAgentListInput { provider?: string; refreshHealth?: boolean; includeUnreachable?: boolean; includeLoadBalanced?: boolean; clientIdentity?: string; } export interface McodaAgentSyncInput extends McodaAgentListInput { pruneMissing?: boolean; } export interface McodaRuntimeAdapter { runtime: McodaRuntimeInfo; configureMswarmApiKey(input: { apiKey: string; connection?: McodaMswarmConnectionInput; actor?: string; reasonCode?: string; metadata?: Record; }): Promise; listCloudAgents(input?: McodaAgentListInput): Promise; syncCloudAgents(input?: McodaAgentSyncInput): Promise; listSelfHostedAgents(input?: McodaAgentListInput): Promise; syncSelfHostedAgents(input?: McodaAgentSyncInput): Promise; listWorkerAgents(input?: McodaAgentListInput): Promise; syncWorkerAgents(input?: McodaAgentSyncInput): Promise; listLocalAgents(input?: McodaAgentListInput): Promise; testAgent?(input: { slug: string; prompt?: string; timeoutMs?: number; }): Promise; } export interface McodaAgentSettingsSnapshot { assignments: Record; mswarmApiKeyConfigured: boolean; mswarmApiKeyLast4: string | null; mswarmConfiguredAt: string | null; mswarmConnection?: McodaMswarmConnectionMetadata | null; updatedAt: string | null; } export interface McodaAgentSettingsStore { load(): Promise; saveMswarmKeyMetadata(input: { configured: boolean; last4: string | null; configuredAt: string; connection?: McodaMswarmConnectionMetadata | null; actor?: string; reasonCode?: string; }): Promise; saveAssignments(input: { assignments: Record; actor?: string; reasonCode?: string; }): Promise; } export interface McodaSetupLogger { info?(message: string, metadata?: Record): void; warn?(message: string, metadata?: Record): void; error?(message: string, metadata?: Record): void; } export interface McodaAgentSetupServerOptions { settingsStore: McodaAgentSettingsStore; authorize?: (request: unknown) => Promise | void; mcoda?: McodaRuntimeAdapter; logger?: McodaSetupLogger; defaultStages?: McodaStageDefinition[]; operationTimeoutMs?: number; provider?: string; } export interface McodaAgentSetupService { fetchSnapshot(request?: unknown): Promise; configureMswarmApiKey(input: { apiKey: string; connection?: McodaMswarmConnectionInput; actor?: string; reasonCode?: string; metadata?: Record; }, request?: unknown): Promise; syncAgents(input?: { actor?: string; reasonCode?: string; metadata?: Record; }, request?: unknown): Promise; updateAssignments(input: { assignments: Record; actor?: string; reasonCode?: string; metadata?: Record; }, request?: unknown): Promise; testAgent(input: { slug: string; prompt?: string; timeoutMs?: number; }, request?: unknown): Promise; } export interface McodaAgentSetupHttpRequest { method: string; path?: string; url?: string; body?: unknown; raw?: unknown; } export interface McodaAgentSetupHttpResponse { status: number; headers: Record; body: unknown; } //# sourceMappingURL=types.d.ts.map