import { AgentScopeConfig, ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
import "../../types/utility.js";
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
import { OutputContract } from "../../validation/schemas.js";
import { FullAgentDefinition, FullAgentSelectWithRelationIds } from "../../types/entities.js";

//#region src/data-access/manage/agentFull.d.ts

/**
 * Drop require* entries that name a component/artifact the sub-agent no longer
 * declares — a requirement must never outlive the component it points at, or it
 * becomes an unsatisfiable contract. Returns null when no contract is set.
 */
declare function reconcileOutputContract(subAgent: {
  dataComponents?: string[];
  artifactComponents?: string[];
  outputContract?: OutputContract | null;
}, componentNameById: Map<string, string>, artifactNameById: Map<string, string>): OutputContract | null;
declare const createFullAgentServerSide: (db: AgentsManageDatabaseClient) => (scopes: ProjectScopeConfig, agentData: FullAgentDefinition) => Promise<FullAgentDefinition>;
/**
 * Server-side implementation of updateFullAgent that performs actual database operations.
 * This function updates a complete agent with all agents, tools, and relationships.
 */
declare const updateFullAgentServerSide: (db: AgentsManageDatabaseClient) => (scopes: ProjectScopeConfig, agentData: FullAgentDefinition) => Promise<FullAgentDefinition>;
/**
 * Get a complete agent definition by ID
 */
declare const getFullAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
}) => Promise<FullAgentDefinition | null>;
declare const getFullAgentWithRelationIds: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
}) => Promise<FullAgentSelectWithRelationIds | null>;
/**
 * Delete a complete agent and cascade to all related entities
 */
declare const deleteFullAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: AgentScopeConfig;
}) => Promise<boolean>;
//#endregion
export { createFullAgentServerSide, deleteFullAgent, getFullAgent, getFullAgentWithRelationIds, reconcileOutputContract, updateFullAgentServerSide };