import type { ConfigManager } from '../../config/manager.js';
import type { ServiceRegistry } from '../../config/service-registry.js';
import type { UserAuthManager } from '@pellux/goodvibes-sdk/platform/security/user-auth';
import type { AgentManager } from '../../tools/agent/index.js';
import { type AutomationManager } from '../../automation/index.js';
import type { ApprovalBroker, ControlPlaneGateway, SharedSessionBroker } from '../../control-plane/index.js';
import type { GatewayMethodCatalog } from '../../control-plane/index.js';
import type { ProviderRegistry } from '../../providers/registry.js';
import type { RouteBindingManager, ChannelPolicyManager, ChannelPluginRegistry, SurfaceRegistry } from '../../channels/index.js';
import type { WatcherRegistry } from '../../watchers/index.js';
import type { DistributedPeerAuth, DistributedRuntimeManager } from '../../runtime/remote/index.js';
import type { KnowledgeGraphqlService, KnowledgeService } from '../../knowledge/index.js';
import type { VoiceService } from '@pellux/goodvibes-sdk/platform/voice/index';
import type { WebSearchService } from '../../web-search/index.js';
import type { ArtifactStore } from '@pellux/goodvibes-sdk/platform/artifacts/index';
import type { MediaProviderRegistry } from '../../media/index.js';
import type { MultimodalService } from '../../multimodal/index.js';
import type { IntegrationHelperService } from '../../runtime/integration/helpers.js';
import type { DomainDispatch, RuntimeStore } from '../../runtime/store/index.js';
import type { RuntimeEventBus } from '../../runtime/events/index.js';
import type { MemoryEmbeddingProviderRegistry, MemoryRegistry } from '../../state/index.js';
import type { GenericWebhookAdapterContext, SurfaceAdapterContext } from '../../adapters/index.js';
import type { PlatformServiceManager } from '../service-manager.js';
import type { JsonRecord } from '../helpers.js';
interface DaemonHttpRouterContext {
    readonly configManager: ConfigManager;
    readonly serviceRegistry: ServiceRegistry;
    readonly userAuth: UserAuthManager;
    readonly agentManager: AgentManager;
    readonly automationManager: AutomationManager;
    readonly approvalBroker: ApprovalBroker;
    readonly controlPlaneGateway: ControlPlaneGateway;
    readonly gatewayMethods: GatewayMethodCatalog;
    readonly providerRegistry: ProviderRegistry;
    readonly sessionBroker: SharedSessionBroker;
    readonly routeBindings: RouteBindingManager;
    readonly channelPolicy: ChannelPolicyManager;
    readonly channelPlugins: ChannelPluginRegistry;
    readonly surfaceRegistry: SurfaceRegistry;
    readonly distributedRuntime: DistributedRuntimeManager;
    readonly watcherRegistry: WatcherRegistry;
    readonly voiceService: VoiceService;
    readonly webSearchService: WebSearchService;
    readonly knowledgeService: KnowledgeService;
    readonly knowledgeGraphqlService: KnowledgeGraphqlService;
    readonly mediaProviders: MediaProviderRegistry;
    readonly multimodalService: MultimodalService;
    readonly artifactStore: ArtifactStore;
    readonly memoryRegistry: MemoryRegistry;
    readonly memoryEmbeddingRegistry: MemoryEmbeddingProviderRegistry;
    readonly platformServiceManager: PlatformServiceManager;
    readonly integrationHelpers: IntegrationHelperService | null;
    readonly runtimeBus: RuntimeEventBus;
    readonly runtimeStore: RuntimeStore | null;
    readonly runtimeDispatch: DomainDispatch | null;
    readonly githubWebhookSecret: string | null;
    readonly authToken: () => string | null;
    readonly buildSurfaceAdapterContext: () => SurfaceAdapterContext;
    readonly buildGenericWebhookAdapterContext: () => GenericWebhookAdapterContext;
    readonly checkAuth: (req: Request) => boolean;
    readonly extractAuthToken: (req: Request) => string;
    readonly requireAuthenticatedSession: (req: Request) => {
        username: string;
        roles: readonly string[];
    } | null;
    readonly requireAdmin: (req: Request) => Response | null;
    readonly requireRemotePeer: (req: Request, scope?: string) => Promise<DistributedPeerAuth | Response>;
    readonly describeAuthenticatedPrincipal: (token: string) => {
        principalId: string;
        principalKind: 'user' | 'bot' | 'service' | 'token';
        admin: boolean;
        scopes: readonly string[];
    } | null;
    readonly invokeGatewayMethodCall: (input: {
        readonly authToken: string;
        readonly methodId: string;
        readonly query?: Record<string, unknown>;
        readonly body?: unknown;
        readonly context?: {
            readonly principalId?: string;
            readonly principalKind?: 'user' | 'bot' | 'service' | 'token' | 'remote-peer';
            readonly admin?: boolean;
            readonly scopes?: readonly string[];
            readonly clientKind?: string;
        };
    }) => Promise<{
        status: number;
        ok: boolean;
        body: unknown;
    }>;
    readonly queueSurfaceReplyFromBinding: (binding: import('@pellux/goodvibes-sdk/platform/automation/routes').AutomationRouteBinding | undefined, input: {
        readonly agentId: string;
        readonly task: string;
        readonly sessionId?: string;
    }) => void;
    readonly surfaceDeliveryEnabled: (surface: 'slack' | 'discord' | 'ntfy' | 'webhook' | 'telegram' | 'google-chat' | 'signal' | 'whatsapp' | 'imessage' | 'msteams' | 'bluebubbles' | 'mattermost' | 'matrix') => boolean;
    readonly syncSpawnedAgentTask: (record: import('../../tools/agent/index.js').AgentRecord, sessionId?: string) => void;
    readonly syncFinishedAgentTask: (record: import('../../tools/agent/index.js').AgentRecord) => void;
    readonly trySpawnAgent: (input: Parameters<AgentManager['spawn']>[0], logLabel?: string, sessionId?: string) => import('../../tools/agent/index.js').AgentRecord | Response;
}
export declare class DaemonHttpRouter {
    private readonly context;
    private readonly telemetryApi;
    constructor(context: DaemonHttpRouterContext);
    dispose(): void;
    handleRequest(req: Request): Promise<Response>;
    dispatchApiRoutes(req: Request): Promise<Response | null>;
    parseJsonBody(req: Request): Promise<JsonRecord | Response>;
    parseOptionalJsonBody(req: Request): Promise<JsonRecord | null | Response>;
    parseJsonText(rawBody: string): JsonRecord | Response;
    recordApiResponse(req: Request, path: string, response: Response, clientKind?: 'web' | 'slack' | 'discord' | 'ntfy' | 'webhook' | 'telegram' | 'google-chat' | 'signal' | 'whatsapp' | 'imessage' | 'msteams' | 'bluebubbles' | 'mattermost' | 'matrix' | 'daemon'): Response;
    private handleLogin;
    private handleGitHubWebhook;
    handleSlackWebhook(req: Request): Promise<Response>;
    handleDiscordWebhook(req: Request): Promise<Response>;
    handleNtfyWebhook(req: Request): Promise<Response>;
    handleGenericWebhook(req: Request): Promise<Response>;
}
export {};
//# sourceMappingURL=router.d.ts.map