/**
 * Pure mapper that projects a `StoredFeedback` onto the `neotoma_feedback`
 * entity payload shape expected by Neotoma's `/store` endpoint.
 *
 * Canonical home for both the hosted Netlify forwarder and the local
 * `mirrorLocalFeedbackToEntity` helper. The Netlify path re-exports from
 * here via `services/agent-site/netlify/lib/neotoma_payload.ts`.
 *
 * Deliberately NOT included in the entity payload:
 *   - The raw `access_token` (never persisted on the Netlify side anyway).
 *   - Internal mirror bookkeeping (`mirrored_*`, `mirror_attempts`).
 *   - Any bearer / service-token / webhook secret values.
 *
 * Relationships are emitted separately in `relationships_from` so the
 * caller can spread them into the outer `store_structured` call (entity
 * first, then REFERS_TO edges to any `related_entity_ids`).
 */
import type { LocalFeedbackRecord } from "./local_store.js";
import type { VerificationCountsByOutcome } from "./types.js";
export interface EnvironmentBlock {
    neotoma_version: string;
    mcp_server_version?: string;
    client_name: string;
    client_version?: string;
    os: string;
    os_version?: string;
    node_version?: string;
    runtime_locale?: string;
    tool_name?: string;
    invocation_shape?: string[];
    error_type?: string;
    error_message?: string;
    retry_behavior?: string;
    error_class?: string;
    hit_count?: number;
    consent_mode_at_submit?: "proactive" | "consent" | "off_with_user_request";
    prior_similar_errors?: boolean;
    fallback_outcome?: string;
}
export interface StoredFeedback {
    id: string;
    submitter_id: string;
    kind: string;
    title: string;
    body: string;
    metadata: Record<string, unknown>;
    submitted_at: string;
    status: string;
    status_updated_at: string;
    classification: string | null;
    resolution_links: {
        github_issue_urls: string[];
        pull_request_urls: string[];
        commit_shas: string[];
        duplicate_of_feedback_id: string | null;
        related_entity_ids: string[];
        notes_markdown: string;
        verifications?: string[];
    };
    upgrade_guidance: unknown | null;
    triage_notes: string | null;
    last_activity_at: string | null;
    next_check_suggested_at: string | null;
    access_token_hash: string;
    prefer_human_draft?: boolean;
    redaction_applied: boolean;
    redaction_backstop_hits: string[];
    consecutive_same_status_polls: number;
    parent_feedback_id?: string;
    verification_outcome?: string;
    verified_at_version?: string;
    verification_count_by_outcome?: VerificationCountsByOutcome | null;
    resolution_confidence?: string | null;
    first_verification_at?: string | null;
    last_verification_at?: string | null;
    regression_candidate?: boolean;
    regression_detected_at?: string | null;
    regression_count?: number;
    superseded_by_version?: string | null;
}
export interface NeotomaFeedbackEntityPayload {
    entity_type: "neotoma_feedback";
    canonical_name: string;
    [key: string]: unknown;
}
export interface StoredFeedbackMirrorPayload {
    entity: NeotomaFeedbackEntityPayload;
    related_entity_ids: string[];
    idempotency_key: string;
    canonical_name: string;
}
/**
 * Project a `StoredFeedback` onto the entity payload for
 * `store_structured`. Pure: no IO, no clock reads beyond the record's own
 * timestamps.
 */
export declare function storedFeedbackToEntity(record: StoredFeedback, options?: {
    dataSource?: string;
    sourceFile?: string | null;
}): StoredFeedbackMirrorPayload;
/**
 * Adapt a `LocalFeedbackRecord` into the `StoredFeedback` shape the
 * shared projector expects. The two types are structurally near-identical;
 * this adapter exists so `src/services/feedback/` never imports from
 * `services/agent-site/...`.
 */
export declare function localRecordToStoredFeedback(record: LocalFeedbackRecord, submitterIdOverride?: string): StoredFeedback;
//# sourceMappingURL=neotoma_payload.d.ts.map