import { Schema } from "effect";
import { ToolId } from "./ids";
declare const ToolNotFoundError_base: Schema.Class<ToolNotFoundError, Schema.TaggedStruct<"ToolNotFoundError", {
    readonly toolId: Schema.brand<Schema.String, "ToolId">;
    readonly suggestions: Schema.optional<Schema.$Array<Schema.brand<Schema.String, "ToolId">>>;
}>, import("effect/Cause").YieldableError>;
export declare class ToolNotFoundError extends ToolNotFoundError_base {
}
declare const ToolInvocationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
    readonly _tag: "ToolInvocationError";
} & Readonly<A>;
export declare class ToolInvocationError extends ToolInvocationError_base<{
    readonly toolId: ToolId;
    readonly message: string;
    readonly cause?: unknown;
}> {
}
declare const PluginNotLoadedError_base: Schema.Class<PluginNotLoadedError, Schema.TaggedStruct<"PluginNotLoadedError", {
    readonly pluginId: Schema.String;
    readonly toolId: Schema.brand<Schema.String, "ToolId">;
}>, import("effect/Cause").YieldableError>;
/** Tool row exists in the DB but its owning plugin isn't loaded. Means
 *  the tool was registered by a plugin that's no longer present in the
 *  current executor config — usually a stale row from an older session. */
export declare class PluginNotLoadedError extends PluginNotLoadedError_base {
}
declare const NoHandlerError_base: Schema.Class<NoHandlerError, Schema.TaggedStruct<"NoHandlerError", {
    readonly toolId: Schema.brand<Schema.String, "ToolId">;
    readonly pluginId: Schema.String;
}>, import("effect/Cause").YieldableError>;
/** Tool was found but its owning plugin has no `invokeTool` handler —
 *  the plugin only declares static tools and this one's id matched
 *  dynamically somehow. Shouldn't happen in practice; guards against
 *  programmer error. */
export declare class NoHandlerError extends NoHandlerError_base {
}
declare const ToolBlockedError_base: Schema.Class<ToolBlockedError, Schema.TaggedStruct<"ToolBlockedError", {
    readonly toolId: Schema.brand<Schema.String, "ToolId">;
    readonly pattern: Schema.String;
}>, import("effect/Cause").YieldableError>;
/** Tool invocation was rejected because a workspace `tool_policy` rule
 *  with `action: "block"` matched. `pattern` is the matched policy
 *  pattern so callers / agents can render a useful "this is blocked
 *  by your `vercel.dns.*` rule" message. */
export declare class ToolBlockedError extends ToolBlockedError_base {
}
declare const SourceNotFoundError_base: Schema.Class<SourceNotFoundError, Schema.TaggedStruct<"SourceNotFoundError", {
    readonly sourceId: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class SourceNotFoundError extends SourceNotFoundError_base {
}
declare const SourceRemovalNotAllowedError_base: Schema.Class<SourceRemovalNotAllowedError, Schema.TaggedStruct<"SourceRemovalNotAllowedError", {
    readonly sourceId: Schema.String;
}>, import("effect/Cause").YieldableError>;
/** `executor.sources.remove({ id, targetScope })` was called on a
 *  source with `canRemove: false` — typically a static source declared
 *  by a plugin at startup. Removing static sources is a bug in the
 *  caller. */
export declare class SourceRemovalNotAllowedError extends SourceRemovalNotAllowedError_base {
}
declare const SecretNotFoundError_base: Schema.Class<SecretNotFoundError, Schema.TaggedStruct<"SecretNotFoundError", {
    readonly secretId: Schema.brand<Schema.String, "SecretId">;
}>, import("effect/Cause").YieldableError>;
export declare class SecretNotFoundError extends SecretNotFoundError_base {
}
declare const SecretResolutionError_base: Schema.Class<SecretResolutionError, Schema.TaggedStruct<"SecretResolutionError", {
    readonly secretId: Schema.brand<Schema.String, "SecretId">;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class SecretResolutionError extends SecretResolutionError_base {
}
declare const SecretOwnedByConnectionError_base: Schema.Class<SecretOwnedByConnectionError, Schema.TaggedStruct<"SecretOwnedByConnectionError", {
    readonly secretId: Schema.brand<Schema.String, "SecretId">;
    readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
}>, import("effect/Cause").YieldableError>;
/** Raised when `secrets.remove({ id, targetScope })` is called on a secret whose row has
 *  `owned_by_connection_id` set. The connection owns the lifecycle —
 *  callers must go through `connections.remove(connectionId)` to
 *  delete it along with its siblings. */
export declare class SecretOwnedByConnectionError extends SecretOwnedByConnectionError_base {
}
declare const SecretInUseError_base: Schema.Class<SecretInUseError, Schema.TaggedStruct<"SecretInUseError", {
    readonly secretId: Schema.brand<Schema.String, "SecretId">;
    readonly usageCount: Schema.Number;
}>, import("effect/Cause").YieldableError>;
/** Raised when `secrets.remove({ id, targetScope })` is called on a secret that's still
 *  referenced by one or more sources / bindings across plugins. The UI's
 *  "Used by" list tells the user which sources to detach first. App-
 *  level RESTRICT — the codebase doesn't enforce DB-level FKs because
 *  composite `(scope_id, id)` PKs make single-column references
 *  impossible to constrain in sqlite. `usageCount` is a hint for the
 *  caller; the full list is queryable via `secrets.usages(id)`. */
export declare class SecretInUseError extends SecretInUseError_base {
}
declare const ConnectionNotFoundError_base: Schema.Class<ConnectionNotFoundError, Schema.TaggedStruct<"ConnectionNotFoundError", {
    readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
}>, import("effect/Cause").YieldableError>;
export declare class ConnectionNotFoundError extends ConnectionNotFoundError_base {
}
declare const ConnectionProviderNotRegisteredError_base: Schema.Class<ConnectionProviderNotRegisteredError, Schema.TaggedStruct<"ConnectionProviderNotRegisteredError", {
    readonly provider: Schema.String;
    readonly connectionId: Schema.optional<Schema.brand<Schema.String, "ConnectionId">>;
}>, import("effect/Cause").YieldableError>;
export declare class ConnectionProviderNotRegisteredError extends ConnectionProviderNotRegisteredError_base {
}
declare const ConnectionRefreshNotSupportedError_base: Schema.Class<ConnectionRefreshNotSupportedError, Schema.TaggedStruct<"ConnectionRefreshNotSupportedError", {
    readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
    readonly provider: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class ConnectionRefreshNotSupportedError extends ConnectionRefreshNotSupportedError_base {
}
declare const ConnectionReauthRequiredError_base: Schema.Class<ConnectionReauthRequiredError, Schema.TaggedStruct<"ConnectionReauthRequiredError", {
    readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
    readonly provider: Schema.String;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
/**
 * Raised by `connections.accessToken(id)` when the provider's refresh
 * handler reported that the stored refresh token is permanently
 * invalid (RFC 6749 §5.2 `invalid_grant` and friends). The caller —
 * typically a tool invocation — surfaces this so the UI can prompt the
 * user to sign in again. Distinct from `ConnectionRefreshError` so
 * "the network flaked, retry later" and "the grant is dead, re-auth"
 * don't collapse into one error tag at the plugin boundary.
 */
export declare class ConnectionReauthRequiredError extends ConnectionReauthRequiredError_base {
}
declare const ConnectionInUseError_base: Schema.Class<ConnectionInUseError, Schema.TaggedStruct<"ConnectionInUseError", {
    readonly connectionId: Schema.brand<Schema.String, "ConnectionId">;
    readonly usageCount: Schema.Number;
}>, import("effect/Cause").YieldableError>;
/** Raised when `connections.remove(id)` is called on a connection that's
 *  still referenced by sources / bindings. Mirrors `SecretInUseError`. */
export declare class ConnectionInUseError extends ConnectionInUseError_base {
}
export type ExecutorError = ToolNotFoundError | ToolInvocationError | PluginNotLoadedError | NoHandlerError | ToolBlockedError | SourceNotFoundError | SourceRemovalNotAllowedError | SecretNotFoundError | SecretResolutionError | SecretOwnedByConnectionError | SecretInUseError | ConnectionNotFoundError | ConnectionProviderNotRegisteredError | ConnectionRefreshNotSupportedError | ConnectionReauthRequiredError | ConnectionInUseError;
export {};
//# sourceMappingURL=errors.d.ts.map