/**
 * Policy Command - Standalone CRUD Command for Policy Management
 *
 * ARCHITECTURE:
 * - This is a TERMINAL command with its own control flow
 * - Does NOT participate in orchestration pipelines
 * - Uses local file-based persistence in .agentics/policies/
 * - Has its own error handling and exit codes
 *
 * SUBCOMMANDS:
 * - list      List all policies
 * - inspect   Inspect a specific policy by ID
 * - create    Create a new policy
 * - edit      Edit an existing policy
 * - delete    Delete a policy
 * - enable    Enable a policy
 * - disable   Disable a policy
 */
import type { CommandOptions } from '../types/index.js';
export declare const POLICY_EXIT_CODES: {
    readonly SUCCESS: 0;
    readonly INPUT_ERROR: 100;
    readonly NOT_FOUND: 100;
    readonly ALREADY_EXISTS: 100;
    readonly INVALID_STATE: 100;
    readonly IO_ERROR: 74;
    readonly UNEXPECTED_ERROR: 1;
};
export interface Policy {
    id: string;
    name: string;
    description: string;
    type: PolicyType;
    status: PolicyStatus;
    rules: PolicyRule[];
    created_at: string;
    updated_at: string;
    version: number;
    metadata?: Record<string, unknown>;
}
export type PolicyType = 'access-control' | 'rate-limit' | 'cost-limit' | 'compliance' | 'security' | 'custom';
export type PolicyStatus = 'enabled' | 'disabled' | 'draft';
export interface PolicyRule {
    id: string;
    condition: string;
    action: 'allow' | 'deny' | 'warn' | 'log';
    priority: number;
}
export interface PolicyListInput {
    status?: PolicyStatus;
    type?: PolicyType;
    limit?: number;
}
export interface PolicyListResult {
    policies: Policy[];
    count: number;
    timing: number;
}
export interface PolicyInspectInput {
    id: string;
}
export interface PolicyInspectResult {
    policy: Policy | null;
    found: boolean;
    timing: number;
}
export interface PolicyCreateInput {
    name: string;
    description?: string;
    type?: PolicyType;
    rules?: PolicyRule[];
    metadata?: Record<string, unknown>;
}
export interface PolicyCreateResult {
    policy: Policy;
    timing: number;
}
export interface PolicyEditInput {
    id: string;
    name?: string;
    description?: string;
    type?: PolicyType;
    rules?: PolicyRule[];
    metadata?: Record<string, unknown>;
}
export interface PolicyEditResult {
    policy: Policy;
    timing: number;
}
export interface PolicyDeleteInput {
    id: string;
}
export interface PolicyDeleteResult {
    deleted: boolean;
    id: string;
    timing: number;
}
export interface PolicyToggleInput {
    id: string;
}
export interface PolicyToggleResult {
    policy: Policy;
    previous_status: PolicyStatus;
    timing: number;
}
export declare function formatPolicyForDisplay(policy: Policy): string;
export declare function formatPoliciesListForDisplay(policies: Policy[]): string;
/**
 * List all policies with optional filtering
 */
export declare function executePolicyListCommand(input: PolicyListInput, _options: CommandOptions): Promise<PolicyListResult>;
/**
 * Inspect a specific policy by ID
 */
export declare function executePolicyInspectCommand(input: PolicyInspectInput, _options: CommandOptions): Promise<PolicyInspectResult>;
/**
 * Create a new policy
 */
export declare function executePolicyCreateCommand(input: PolicyCreateInput, options: CommandOptions): Promise<PolicyCreateResult>;
/**
 * Edit an existing policy
 */
export declare function executePolicyEditCommand(input: PolicyEditInput, options: CommandOptions): Promise<PolicyEditResult>;
/**
 * Delete a policy
 */
export declare function executePolicyDeleteCommand(input: PolicyDeleteInput, options: CommandOptions): Promise<PolicyDeleteResult>;
/**
 * Enable a policy
 */
export declare function executePolicyEnableCommand(input: PolicyToggleInput, options: CommandOptions): Promise<PolicyToggleResult>;
/**
 * Disable a policy
 */
export declare function executePolicyDisableCommand(input: PolicyToggleInput, options: CommandOptions): Promise<PolicyToggleResult>;
export interface PolicyDryRunInput {
    id: string;
    context?: Record<string, unknown>;
}
export interface PolicyDryRunResult {
    policy: Policy;
    evaluation: PolicyEvaluation;
    timing: number;
}
export interface PolicyEvaluation {
    rules_evaluated: number;
    rules_matched: number;
    actions: PolicyRuleAction[];
    outcome: 'allow' | 'deny' | 'warn';
}
export interface PolicyRuleAction {
    rule_id: string;
    condition: string;
    matched: boolean;
    action: 'allow' | 'deny' | 'warn' | 'log';
    priority: number;
}
export interface PolicyScopeInput {
    id: string;
}
export interface PolicyScopeResult {
    policy: Policy;
    scope: PolicyScopeInfo;
    timing: number;
}
export interface PolicyScopeInfo {
    applies_to: string[];
    commands_affected: string[];
    environments: string[];
    effective_since: string;
}
/**
 * Dry-run a policy against a simulated context.
 * Evaluates all rules and returns what would happen without applying changes.
 */
export declare function executePolicyDryRunCommand(input: PolicyDryRunInput, options: CommandOptions): Promise<PolicyDryRunResult>;
/**
 * Format dry-run result for human-readable display
 */
export declare function formatDryRunForDisplay(result: PolicyDryRunResult): string;
/**
 * Show the scope of a policy - what it applies to and affects.
 */
export declare function executePolicyScopeCommand(input: PolicyScopeInput, options: CommandOptions): Promise<PolicyScopeResult>;
/**
 * Format scope result for human-readable display
 */
export declare function formatScopeForDisplay(result: PolicyScopeResult): string;
//# sourceMappingURL=policy.d.ts.map