/** * Agent detection functions for identifying installed AI coding agents. * * Detection is effectful and separated from the pure descriptor registry. * Uses FileSystem service for testability. * * @experimental This API is unstable and may change without notice. * @packageDocumentation */ import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as ServiceMap from "effect/Context"; import type { AgentDescriptor } from "./types.js"; export interface AgentExecutableResolverService { readonly exists: (name: string) => Effect.Effect; } declare const AgentExecutableResolver_base: ServiceMap.ServiceClass; export declare class AgentExecutableResolver extends AgentExecutableResolver_base { } export declare const AgentExecutableResolverLive: Layer.Layer; /** * Check whether an agent can be detected from a single filesystem root. * * Uses the first segment of the agent's skills, MCP servers, and subagents * descriptors. */ export declare const detectAgentInRoot: (agent: AgentDescriptor, rootDir: string) => Effect.Effect; export interface AgentScopeDetection { readonly agent: AgentDescriptor; readonly project: boolean; readonly user: boolean; } /** Detect project and user evidence independently for one agent. */ export declare const detectAgentScopes: (agent: AgentDescriptor, projectDir: string) => Effect.Effect<{ agent: AgentDescriptor; project: boolean; user: boolean; }, import("../app-error/app-error.ts").AppError, Path.Path | FileSystem.FileSystem>; /** * Check if a specific agent is installed by checking project-level and * user-scope roots. * * Returns `true` if any supported location exists. * * @param agent - The agent descriptor to check * @param projectDir - The project directory to check for agent config * @returns Effect that resolves to boolean indicating detection status * * @experimental This API is unstable and may change without notice. */ export declare const detectAgent: (agent: AgentDescriptor, projectDir: string) => Effect.Effect; /** * Detect all installed agents from a single filesystem root. * * @experimental This API is unstable and may change without notice. */ export declare const detectAgentsInRoot: (rootDir: string) => Effect.Effect; /** * Detect all installed agents concurrently. * * Checks all registered agents and returns descriptors for those * that appear to be installed on the system. * * @param projectDir - The project directory to check for agent config * @returns Effect that resolves to array of detected agent descriptors * * @experimental This API is unstable and may change without notice. */ export declare const detectAgents: (projectDir: string) => Effect.Effect; /** Detect all agents while retaining the scope that supplied each signal. */ export declare const detectAgentScopeResults: (projectDir: string) => Effect.Effect<{ agent: AgentDescriptor; project: boolean; user: boolean; }[], import("../app-error/app-error.ts").AppError, Path.Path | FileSystem.FileSystem>; /** Detect agents whose structured evidence satisfies one selected scope. */ export declare const detectAgentsForScope: (projectDir: string, scope: "project" | "user") => Effect.Effect; export {}; //# sourceMappingURL=detection.d.ts.map