@karmaniverous/jeeves-watcher
    Preparing search index...

    Interface DocumentProcessorInterface

    Abstraction for document processing operations.

    Enables factories and consumers to depend on an interface (DIP).

    interface DocumentProcessorInterface {
        deleteFile(filePath: string): Promise<void>;
        processFile(filePath: string): Promise<void>;
        processMetadataUpdate(
            filePath: string,
            metadata: Record<string, unknown>,
        ): Promise<Record<string, unknown> | null>;
        processRulesUpdate(
            filePath: string,
        ): Promise<Record<string, unknown> | null>;
        updateRules(
            compiledRules: CompiledRule[],
            templateEngine?: TemplateEngine,
            customMapLib?: Record<string, (...args: unknown[]) => unknown>,
        ): void;
    }

    Implemented by

    Index

    Methods

    • Process a file through the full pipeline (extract/embed/upsert).

      Parameters

      • filePath: string

      Returns Promise<void>

    • Process a metadata sidecar update for a file (payload update only).

      Parameters

      • filePath: string
      • metadata: Record<string, unknown>

      Returns Promise<Record<string, unknown> | null>

    • Process a rules update for a file (rebuild merged metadata, payload update only).

      Parameters

      • filePath: string

      Returns Promise<Record<string, unknown> | null>