import { Schema } from "effect";
import type { ToolAnnotations } from "./core-schema";
export interface Source {
    readonly id: string;
    /** Owning scope of the visible source row. Present for dynamic
     *  sources; static sources omit it. */
    readonly scopeId?: string;
    readonly kind: string;
    readonly name: string;
    readonly url?: string;
    /** Which plugin owns this source. */
    readonly pluginId: string;
    /** Whether the user can remove this source via
     *  `executor.sources.remove({ id, targetScope })`. `false` for
     *  static / built-in sources declared by plugins at startup. */
    readonly canRemove: boolean;
    /** Whether the plugin supports `executor.sources.refresh({ id, targetScope })`. */
    readonly canRefresh: boolean;
    /** Whether the source has editable config (headers, base url, etc.).
     *  Editing is done via plugin-specific extension methods
     *  (`executor.openapi.updateSource(id, patch)` etc.) — this flag is
     *  just a UI signal. */
    readonly canEdit: boolean;
    /** True if the source was declared statically by a plugin at startup
     *  (in-memory only, no DB row). False if it was added at runtime via
     *  `ctx.core.sources.register(...)`. UI differentiates built-in vs
     *  user-added with this. */
    readonly runtime: boolean;
}
export interface RemoveSourceInput {
    readonly id: string;
    readonly targetScope: string;
}
export interface RefreshSourceInput {
    readonly id: string;
    readonly targetScope: string;
}
export interface Tool {
    readonly id: string;
    readonly sourceId: string;
    /** Which plugin owns this tool. Matches the owning source's `pluginId`. */
    readonly pluginId: string;
    readonly name: string;
    readonly description: string;
    readonly inputSchema?: unknown;
    readonly outputSchema?: unknown;
    readonly annotations?: ToolAnnotations;
}
export declare const ToolSchema: Schema.Struct<{
    readonly id: Schema.brand<Schema.String, "ToolId">;
    readonly name: Schema.optional<Schema.String>;
    readonly description: Schema.optional<Schema.String>;
    readonly inputSchema: Schema.optional<Schema.Unknown>;
    readonly outputSchema: Schema.optional<Schema.Unknown>;
    readonly schemaDefinitions: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
    readonly inputTypeScript: Schema.optional<Schema.String>;
    readonly outputTypeScript: Schema.optional<Schema.String>;
    readonly typeScriptDefinitions: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
}>;
export type ToolSchema = typeof ToolSchema.Type;
export declare const SourceDetectionResult: Schema.Struct<{
    /** Plugin id that recognized the URL (e.g. "openapi", "graphql"). */
    readonly kind: Schema.String;
    /** Confidence tier — UI uses this to pick a winner when multiple
     *  plugins claim a URL. */
    readonly confidence: Schema.Literals<readonly ["high", "medium", "low"]>;
    /** The (possibly normalized) endpoint the plugin will use. */
    readonly endpoint: Schema.String;
    /** Human-readable name suggestion, typically derived from spec title
     *  or URL hostname. */
    readonly name: Schema.String;
    /** Namespace suggestion — the plugin's recommendation for the source
     *  id. UI may override. */
    readonly namespace: Schema.String;
}>;
export type SourceDetectionResult = typeof SourceDetectionResult.Type;
export interface ToolListFilter {
    /** Only tools under this source id. */
    readonly sourceId?: string;
    /** Case-insensitive substring match against `name` OR `description`. */
    readonly query?: string;
    /** Resolve plugin-derived annotations. Defaults to true. */
    readonly includeAnnotations?: boolean;
    /** Include tools whose effective `tool_policy` is `block`. Defaults to
     *  `false` so the agent-facing surfaces (`searchTools`, sandbox `tools.list`)
     *  silently omit blocked tools. The settings UI for managing policies
     *  should pass `true` so users can author rules against blocked tools. */
    readonly includeBlocked?: boolean;
}
//# sourceMappingURL=types.d.ts.map