/**
 * Permission Checker - Controls what SpecWeave can modify in external tools
 *
 * Provides centralized permission checking for external tool sync operations.
 * All permissions default to false (explicit opt-in required).
 *
 * Usage:
 * ```typescript
 * const checker = await PermissionChecker.load(projectRoot);
 *
 * if (checker.canUpsertInternalItems()) {
 *   await createGitHubIssue(item);
 * }
 *
 * if (checker.canUpdateStatus()) {
 *   await updateIssueStatus(issueNumber, 'Done');
 * }
 * ```
 */
import { SyncSettings } from '../types/sync-settings.js';
/**
 * Configuration structure from .specweave/config.json
 */
export interface SpecWeaveConfig {
    sync?: {
        settings?: Partial<SyncSettings> & {
            syncDirection?: 'bidirectional' | 'one-way';
            autoDetectProject?: boolean;
            defaultTimeRange?: string;
            rateLimitProtection?: boolean;
        };
    };
}
/**
 * Permission checker for external tool sync operations
 */
export declare class PermissionChecker {
    private settings;
    /**
     * Create permission checker with explicit settings
     * @param settings - Sync permission settings
     */
    constructor(settings: SyncSettings);
    /**
     * Load permission settings from .specweave/config.json
     * @param projectRoot - Project root directory
     * @returns Permission checker instance
     */
    static load(projectRoot: string): Promise<PermissionChecker>;
    /**
     * Check if SpecWeave can CREATE and UPDATE internal work items in external tools
     *
     * UPSERT = CREATE initially + UPDATE as work progresses
     * - Controls: Title, Description/Body, Acceptance Criteria for INTERNAL items
     * - Flow: increment → living spec → CREATE external item → UPDATE on task completion
     * - If false: Stops before external item creation (local-only workflow)
     *
     * @returns true if UPSERT (CREATE + UPDATE) is allowed for internal items
     */
    canUpsertInternalItems(): boolean;
    /**
     * Check if SpecWeave can UPDATE work items created externally
     *
     * UPDATE = Full content updates (title, description, ACs, tasks, comments)
     * - Controls: FULL content updates of EXTERNAL items
     * - Flow: increment progress → living spec → UPDATE external tool (full sync)
     * - If false: External items remain read-only snapshots (no sync back)
     *
     * @returns true if UPDATE is allowed for external items (full content updates)
     */
    canUpdateExternalItems(): boolean;
    /**
     * Check if SpecWeave can UPDATE status of work items
     *
     * STATUS = Status field ONLY (for BOTH internal AND external items)
     * - Controls: Status field updates after all ACs/tasks complete
     * - Flow: Both flows (internal and external items)
     * - If false: No status updates regardless of item origin (manual status management)
     *
     * @returns true if status updates are allowed
     */
    canUpdateStatus(): boolean;
    /**
     * Get all permission settings (for logging/debugging)
     * @returns Current permission settings
     */
    getSettings(): Readonly<SyncSettings>;
    /**
     * Get human-readable description of current permissions
     * @returns Permission summary string
     */
    getPermissionSummary(): string;
    /**
     * Validate that operation is allowed, throw error if not
     * @param operation - Operation type
     * @throws Error if operation not allowed
     */
    requirePermission(operation: 'upsert-internal' | 'update-external' | 'update-status'): void;
}
//# sourceMappingURL=permission-checker.d.ts.map