/** * Agent-directory scanner: enumerates per-agent skill and subagent * directories declared by the existing `AgentRegistry`. Each occurrence * carries an `agent-dir` discriminator parameterized by `agentId` and the * subject `type`. * * Subject coverage in v1: * * - skill — every agent with a non-empty `agent.skills.dir`. * - subagent — every agent with `agent.subagents?.dir`. Single-file * subagent surfaces (`isFile === true`, e.g., `roo`'s `.roomodes`) emit one * occurrence per file path; the file itself is the materialization. * * Rules: no agent in the v1 `AgentRegistry` exposes a rules directory, so the * scanner emits no rule occurrences. * * Each occurrence carries structural fields the subject modules need for * cross-platform path handling — `pathSegments` (the absolute path split via * the `Path` service) and `subjectFile` (the canonical primary file inside * the subject directory) — plus a probed `subjectFileExists` flag so subject * modules do not hardcode presence. * * Per Decision 5, scanner output is occurrence-shaped. The public effect * carries no `FileSystem | Path` requirement; per-file partial failures * publish diagnostic warnings rather than failing the cell. * * The scanner avoids `fs.stat` and uses only `fs.exists` / `fs.readDirectory` * so it remains compatible with the fixture builder's in-memory `FileSystem`. */ import * as Effect from "effect/Effect"; import type * as FileSystem from "effect/FileSystem"; import type * as Path from "effect/Path"; import type { AgentDescriptor, AgentId } from "../../../agents/types.js"; import type { Diagnostics } from "../diagnostics.js"; import type { Scope } from "../types.js"; import type { AgentDirOccurrence } from "./types.js"; export interface AgentDirScannerDeps { readonly fs: FileSystem.FileSystem; readonly path: Path.Path; readonly workspaceRoot: string; readonly scope: Scope; readonly diagnostics: Diagnostics; readonly agentRegistry?: Readonly>>; } /** * Closure helper: returns the dependency-closed scanner effect. */ export declare const makeAgentDirScanner: (deps: AgentDirScannerDeps) => Effect.Effect>; //# sourceMappingURL=agent-dir.d.ts.map