Public declaration syntax from forge-ts/packages/forge-agent/src/agent.ts Original source SHA-256: 5160b08ae8f13cf08105c05b2fc067c5a7e62f1f126f988164e264a3bf38378c Function bodies and constant values are omitted. This is not the complete implementation. Source line 43 export interface AgentConfig { /** A human-readable name for this agent. */ readonly name: string; /** The language model to use for inference. */ readonly model: LanguageModel; /** Optional system prompt. */ readonly systemPrompt?: string; /** Maximum tool loop iterations. Defaults to 10. */ readonly maxIterations?: number; /** Generation options for model calls. */ readonly generateOptions?: GenerateOptions; /** The approval handler for tool execution. Defaults to AutoApprove. */ readonly approvalHandler?: ApprovalHandler; /** Custom stop conditions for the tool loop. */ readonly stopConditions?: readonly AgentStopCondition[]; /** Optional agent DID for audit trail integration. */ readonly agentDid?: string; } Source line 94 export class ToolLoopAgent { readonly name: string; readonly agentDid: string | undefined; readonly registry: ToolRegistry; readonly healthProfile: HealthProfile; readonly lifecycle: LifecycleManager; constructor(config: AgentConfig); async initialize(): Promise; async run(userMessage: string): Promise; async pause(): Promise; async resume(): Promise; async terminate(): Promise; get isRunning(): boolean; get isTerminated(): boolean; }