/**
 * WikiProcessService — bundles "claim a pending item + build the
 * system-context the agent's LLM needs to classify it."
 *
 * Per Steve's 2026-05-22 redesign:
 *   - the skill DOES NOT pick a target folder. The agent picks.
 *   - there is NO preset taxonomy beyond the frozen folders (sop/,
 *     team-norm/, memory/, sop-overrides/). Everything under
 *     llm-curated/* is fair game; the agent invents folder names.
 *   - the agent reads the queue item's `reason` (which we forced it to
 *     write at queue-add time) PLUS the existing vault state (so it
 *     doesn't re-classify into a duplicate of an existing page).
 *
 * Lifecycle this service participates in:
 *   pending → (this service)  → claimed + context payload returned
 *           → (agent's LLM, outside the skill) picks target path
 *           → (agent calls wiki-ingest)         → page written
 *           → (agent calls queue/:id/process)   → status=processed
 *
 * @module services/wiki/wiki-process.service
 */
import { WikiQueueService, WikiQueueItem } from './wiki-queue.service.js';
import { WikiQueryService, WikiQuerySystemContext } from './wiki-query.service.js';
export interface WikiProcessClaimInput {
    /** Agent session claiming the item. */
    claimedBy: string;
    /** Filter the queue to a specific vault (default: any). */
    vaultPath?: string;
    /** Skip this many leading pending items. Lets the agent re-roll after a skip. */
    offset?: number;
    /** For the vault context: how many candidate pages to include. */
    topK?: number;
    /** For the vault context: how many recent log entries. */
    recentLogEntries?: number;
}
export interface WikiProcessClaimResult {
    /** The claimed queue item. */
    item: WikiQueueItem;
    /**
     * System-context the agent's LLM should classify against. Includes the
     * vault SCHEMA, frozen-path list, recent log, and top-K candidate pages
     * by keyword overlap with the queue item's content.
     *
     * `null` if the vault has no SCHEMA.md (rare — vault wasn't initialized).
     */
    vaultContext: WikiQuerySystemContext | null;
    /** Synthesis instructions for the agent's LLM. */
    classifierNotes: string[];
}
export type WikiProcessClaimOutcome = {
    ok: true;
    result: WikiProcessClaimResult;
} | {
    ok: false;
    reason: 'no_pending_items' | 'vault_query_failed';
    message: string;
};
/**
 * Stateless façade — both backing services (queue, query) are singletons.
 */
export declare class WikiProcessService {
    private readonly queue;
    private readonly query;
    private static instance;
    private readonly logger;
    constructor(queue?: WikiQueueService, query?: WikiQueryService);
    static getInstance(): WikiProcessService;
    /** Test-only reset. */
    static _resetForTesting(): void;
    /**
     * Claim the next pending item + return the vault context the agent
     * needs to classify it. The caller (agent runtime) then runs an LLM
     * call against this context + the item's content/reason, picks a
     * target page, and calls `wiki-ingest` + `/queue/:id/process` to
     * commit.
     */
    claimNext(input: WikiProcessClaimInput): Promise<WikiProcessClaimOutcome>;
    /**
     * The contract the agent's LLM must honor when classifying. Kept
     * short so it can be inlined into the runtime's task-instruction.
     */
    private classifierNotes;
}
//# sourceMappingURL=wiki-process.service.d.ts.map