/** * Gateway REST helpers for multi-agent management. */ import type { AgentEntry, AgentModelsOverride, EffectiveAgentConfig, SkillOverride } from '../agent-config/index.js'; export type GatewayAgentRow = { id: string; name?: string; description?: string; language?: string; /** Avatar reference from the structured Agent profile. */ avatar?: string; workspace: string; /** Absolute directory for profile Markdown (`SOUL.md`, …) and gateway avatars: `agents//profile/`. */ profileDir: string; override: AgentEntry; effective: EffectiveAgentConfig; sources: Record; isDefault: boolean; }; export type GatewayAgentsListResponse = { defaultId: string; agents: GatewayAgentRow[]; builtinToolIds: string[]; }; export type GatewayAgentEffectiveConfigResponse = { config: EffectiveAgentConfig; sources: Record; }; export declare function listGatewayAgents(_options?: { locale?: string; }): Promise; export declare function getGatewayAgentEffectiveConfig(agentIdRaw: string): AgentAdminResult; export type CreateAgentBody = { /** Optional id seed; normalized agent id defaults from the profile name when omitted. */ id?: string; workspace?: string; profile: NonNullable; }; export type AgentAdminHttpStatus = 400 | 404 | 409; export type AgentAdminResult = { ok: true; data: T; } | { ok: false; error: string; status?: AgentAdminHttpStatus; }; export declare function createGatewayAgent(body: CreateAgentBody): Promise>; export type UpdateAgentBody = { workspace?: string | null; profile?: AgentEntry['profile'] | null; models?: AgentModelsOverride | null; setDefault?: boolean; skills?: SkillOverride | null; tools?: AgentEntry['tools'] | null; toolAllowlist?: AgentEntry['toolAllowlist'] | null; workflows?: AgentEntry['workflows'] | null; runtime?: AgentEntry['runtime'] | null; }; export declare function updateGatewayAgent(agentIdRaw: string, body: UpdateAgentBody): Promise>; export declare function deleteGatewayAgent(agentIdRaw: string, options?: { purge?: boolean; }): Promise>; export type AgentFileEntry = { name: string; missing: boolean; size?: number; updatedAtMs?: number; }; export declare function listAgentProfileFiles(agentId: string): Promise>; export declare function readAgentProfileFile(agentId: string, name: string): Promise>; export declare function writeAgentProfileFile(agentId: string, name: string, content: string): Promise>; export declare function readAgentAvatarFile(agentId: string): Promise>; export declare function writeAgentAvatarFromBase64(agentId: string, base64: string, mimeType: string): Promise>; /** Remove any `agent-avatar.*` in the agent profile markdown root. Idempotent: ok even when no file existed. */ export declare function deleteAgentAvatarFile(agentId: string): Promise>;