/** * Base agent class with shared functionality. * * Provides common methods for system prompt building, reputation fetching, * and identity loading that all agent implementations can use. */ import type { AgentAdapter, AgentTask, TaskResult, AgentReputation, ManifestoConfig } from "./types.js"; /** Maximum tool call iterations to prevent infinite loops */ export declare const MAX_ITERATIONS = 20; /** Default timeout in milliseconds */ export declare const DEFAULT_TIMEOUT_MS = 60000; /** * Abstract base class for agent implementations. * * Provides shared functionality for: * - Building system prompts from IDENTITY.md and SOUL.md * - Fetching and computing reputation with decay * - Loading agent identity from workspace manifest * * Subclasses must implement the `executeTask` method with their specific * LLM provider logic. */ export declare abstract class BaseAgent implements AgentAdapter { readonly id: string; readonly workspace: string; protected readonly manifesto?: ManifestoConfig | undefined; protected _did: string | null; constructor(id: string, workspace: string, manifesto?: ManifestoConfig | undefined); /** * Get the agent's DID. Must call getIdentity() first. */ get did(): string; /** * Execute a task. Must be implemented by subclasses. */ abstract executeTask(task: AgentTask): Promise; /** * Get the agent's current reputation profile. */ getReputation(): Promise; /** * Get the agent's identity information. */ getIdentity(): Promise<{ name: string; did: string; role?: string; }>; /** * Build the system prompt for the agent from IDENTITY.md and SOUL.md. */ protected buildSystemPrompt(task: AgentTask): Promise; /** * Get the agent's DID from workspace manifest. */ protected getAgentDid(): Promise; /** * Get default reputation for a new agent. */ protected getDefaultReputation(did: string): AgentReputation; } //# sourceMappingURL=base-agent.d.ts.map