/** * Architect Policy Tools - ADR-0004 Oversight Pack * * Provides tools for creating and managing policy atoms: * - architect_createPolicy: Create a new policy atom * - architect_listPolicies: List all policies for a project * - architect_getPolicy: Get a specific policy by ID * - architect_compileOversight: Compile policies into documentation */ import { type StoreMetaFields } from './shared/storeRead.js'; export type PolicySeverity = 'critical' | 'high' | 'medium' | 'low'; export interface PolicyRule { key: string; description: string; check?: string; } export interface PolicyException { reason: string; scope?: string; expires?: string; approved_by?: string; } export interface PolicyExamples { compliant?: string[]; violation?: string[]; } export interface CreatePolicyInput { projectId?: string; title: string; rationale: string; scope: string; rules: PolicyRule[]; severity: PolicySeverity; enforcement_hooks?: string[]; exceptions?: PolicyException[]; examples?: PolicyExamples; tags?: string[]; } export interface CreatePolicyOutput { policy_id: string; timestamp: string; path: string; title: string; } export interface ListPoliciesInput { projectId?: string; severity?: PolicySeverity; tags?: string[]; } export interface PolicySummary { id: string; title: string; severity: PolicySeverity; scope: string; rule_count: number; tags: string[]; } export interface ListPoliciesOutput extends StoreMetaFields { policies: PolicySummary[]; total: number; } export interface GetPolicyInput { projectId?: string; policy_id: string; } export interface Policy { id: string; title: string; rationale: string; scope: string; rules: PolicyRule[]; severity: PolicySeverity; enforcement_hooks: string[]; exceptions: PolicyException[]; examples: PolicyExamples; tags: string[]; created_at: string; updated_at?: string; } export interface GetPolicyOutput { policy: Policy | null; path?: string; error?: string; } export interface CompileOversightInput { projectId?: string; output_format?: 'markdown' | 'json' | 'both'; include_inherited?: boolean; } export interface CompileOversightOutput { markdown_path?: string; json_path?: string; policies_compiled: number; profiles_resolved: string[]; timestamp: string; } export interface PolicyError { error: string; message: string; suggestion?: string; } declare function isError(result: unknown): result is PolicyError; /** * Create a new policy atom */ export declare function createPolicy(input: CreatePolicyInput): Promise; /** * List all policies for a project */ export declare function listPolicies(input: ListPoliciesInput): Promise; /** * Get a specific policy by ID */ export declare function getPolicy(input: GetPolicyInput): Promise; /** * Compile policies into documentation */ export declare function compileOversight(input: CompileOversightInput): Promise; export { isError as isPolicyError }; //# sourceMappingURL=policy.d.ts.map