import type { OrgXClient } from "../contracts/client.js"; export type ArtifactEntityType = "initiative" | "workstream" | "milestone" | "task" | "decision" | "project"; export interface RegisterArtifactInput { /** Optional deterministic artifact id (UUID). Enables idempotent retries/outbox replay. */ artifact_id?: string | null; entity_type: ArtifactEntityType; entity_id: string; name: string; artifact_type: string; confidence_score?: number | null; /** * Required by OrgX work_artifacts schema. * If omitted, defaults to "human" (safe default for user-scoped oxk_ keys). */ created_by_type?: "human" | "agent" | null; /** * Optional explicit creator id. OrgX can typically infer this from auth context, * but allow callers to supply it when they have a stable UUID. */ created_by_id?: string | null; description?: string | null; external_url?: string | null; preview_markdown?: string | null; status?: string; metadata?: Record | null; /** * When true, do a read-after-write check against: * - GET /api/client/artifacts/:id * - GET /api/client/artifacts/by-entity */ validate_persistence?: boolean; } export interface RegisterArtifactResult { ok: boolean; artifact_id: string | null; artifact_url: string | null; created: boolean; persistence: { checked: boolean; artifact_detail_ok: boolean; linked_ok: boolean; attempts: number; last_error: string | null; }; warnings: string[]; } export declare function validateRegisterArtifactInput(input: RegisterArtifactInput): string[]; export declare function registerArtifact(client: OrgXClient, baseUrl: string, input: RegisterArtifactInput): Promise;