/**
 * Shared helpers for “root entity + conversation + thread message” submission flows.
 * Issue-specific GitHub logic stays in `services/issues/`; generic submission stays in
 * `entity_submission/`.
 *
 * Append semantics: generic `add_entity_message` uses `standalone_then_part_of` (message row +
 * `PART_OF` link). Guest issue append uses `conversation_extend_batch` (one `store` with
 * `target_id` conversation extension + message) to match existing issue thread behavior; both
 * paths are covered by service + integration tests.
 */
import type { Operations, StoreEntityInput, StoreInput, StoreResult } from "../../core/operations.js";
export declare function entitySnapshotPayload(entity: {
    snapshot?: Record<string, unknown>;
}): Record<string, unknown>;
/**
 * Outbound REFERS_TO from root → linked `conversation` entity (first match).
 */
export declare function resolveConversationForRoot(ops: Operations, rootEntityId: string): Promise<{
    entity_id: string;
    snapshot: Record<string, unknown>;
} | null>;
/**
 * Runs `ops.store` unless callers inject a wrapper (e.g. `runWithExternalActor` for submission).
 */
export declare function storeRootWithThread(ops: Operations, input: StoreInput, options?: {
    runStore?: (inp: StoreInput) => Promise<StoreResult> | StoreResult;
}): Promise<StoreResult>;
export declare function mintGuestReadBackToken(params: {
    entityIds: string[];
    userId: string;
    thumbprint?: string;
}): Promise<string>;
export declare function persistGuestTokenHashOnIssue(ops: Operations, params: {
    issueEntityId: string;
    token: string;
    idempotency_key: string;
}): Promise<void>;
export declare function structuredEntityIdAt(result: StoreResult, index: number): string;
export declare function structuredEntities(result: StoreResult): Array<{
    entity_id?: string;
}>;
/**
 * Append strategies:
 * - `standalone_then_part_of`: store `conversation_message` alone, then `PART_OF` → conversation (generic submission).
 * - `conversation_extend_batch`: extend conversation row + message in one `store` (guest issue append).
 */
export declare function appendMessageToConversation(ops: Operations, params: {
    strategy: "standalone_then_part_of";
    conversationEntityId: string;
    message: StoreEntityInput;
    idempotency_key: string;
    runStore?: (inp: StoreInput) => Promise<StoreResult> | StoreResult;
} | {
    strategy: "conversation_extend_batch";
    conversationExtend: StoreEntityInput;
    message: StoreEntityInput;
    idempotency_key: string;
}): Promise<{
    message_entity_id: string;
}>;
/**
 * Create a new conversation + first message, then link root → conversation via REFERS_TO.
 */
export declare function bootstrapConversationThreadForRoot(ops: Operations, params: {
    rootEntityId: string;
    conversationTitle: string;
    message: StoreEntityInput;
    idempotency_key: string;
    runStore?: (inp: StoreInput) => Promise<StoreResult> | StoreResult;
}): Promise<{
    conversation_id: string;
    message_entity_id: string;
}>;
//# sourceMappingURL=submitted_thread.d.ts.map