import type { ToolDefinition, ToolVerification, ModificationProposal, ModificationApproval, ProposalStatus } from './types.js'; import { ToolVerifier } from './tool-verifier.js'; import { CapabilityRegistryManager } from './capability-registry.js'; export interface PendingApproval { readonly proposal: ModificationProposal; readonly verification: ToolVerification; readonly toolDefinition: ToolDefinition; readonly toolSourceDir: string; } export declare class ToolApprovalManager { private verifier; private registry; private pendingApprovals; private approvalHistoryPath; constructor(registry: CapabilityRegistryManager, verifier?: ToolVerifier, approvalHistoryPath?: string); /** * Propose a new tool. Runs verification and queues for human approval. * Returns the proposal ID and verification result. */ propose(tool: ToolDefinition, toolSourceDir: string, justification: { capability_gap: string; evidence: string[]; expected_impact: string; risk_assessment: string; }): Promise<{ proposalId: string; verification: ToolVerification; status: ProposalStatus; }>; /** * List all pending approvals. */ listPending(): PendingApproval[]; /** * Get a specific pending approval. */ getPending(proposalId: string): PendingApproval | undefined; /** * Approve a pending tool proposal. Activates the tool in the registry. */ approve(proposalId: string, approvedBy: string, reasoning: string, conditions?: string[]): Promise; /** * Reject a pending tool proposal. */ reject(proposalId: string, rejectedBy: string, reasoning: string): Promise; /** * Rollback the last registry change. */ rollback(rolledBackBy: string): Promise; private logApproval; }