/** * Shared subagent sync helpers for coding-agent service implementations. * * Provides common logic for writing and removing subagent files in agent * subagents directories. Each agent adapter delegates to these helpers. * * @experimental This API is unstable and may change without notice. */ import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; import { type AppError } from "../app-error/index.js"; import type { AddSubagentArgs, RemoveSubagentArgs, ResolveSubagentsDirOutcome, SubagentSyncOutcome } from "./coding-agent.js"; /** Render the exact managed bytes written by the standard file adapter. */ export declare const renderManagedSubagentOutputs: (args: AddSubagentArgs) => import("../subagents/rendering/types.ts").SubagentSkipped | { outputs: { content: string; path: import("../utils/path-types.ts").RelativePath; }[]; _tag: "Rendered"; warnings: ReadonlyArray; } | undefined; /** * Write rendered subagent files to an agent's subagents directory. * * Handles directory creation and file writing. * Returns a `SubagentSyncOutcome` with the rendered file paths and any warnings. */ export declare const writeSubagentFiles: (subagentsDir: string, args: AddSubagentArgs) => Effect.Effect; /** * Remove subagent files from an agent's subagents directory. * * Handles file-not-found gracefully. */ export declare const removeSubagentFiles: (args: RemoveSubagentArgs) => Effect.Effect; /** * Convert a non-supported ResolveSubagentsDirOutcome to a SubagentSyncOutcome. */ export declare const dirOutcomeToSubagentSyncOutcome: (outcome: Exclude) => SubagentSyncOutcome; /** * Add a subagent using a resolve function. * * Common pattern used by most agent adapters. */ export declare const addSubagentViaResolve: (resolve: Effect.Effect, args: AddSubagentArgs) => Effect.Effect; /** * Remove a subagent using a resolve function. * * Common pattern used by most agent adapters. */ export declare const removeSubagentViaResolve: (resolve: Effect.Effect, args: RemoveSubagentArgs) => Effect.Effect; /** * Add a subagent as a Roo Code mode entry via read-modify-write. * * Reads the existing `.roomodes` file, builds a mode entry from the render * input, merges it with existing modes, and writes back. */ export declare const addRooSubagent: (roomodesPath: string, args: AddSubagentArgs) => Effect.Effect; /** * Remove a subagent mode entry from a Roo Code modes file. */ export declare const removeRooSubagent: (roomodesPath: string, subagentName: string) => Effect.Effect; //# sourceMappingURL=subagent-sync.d.ts.map