declare const XENO_ARTIFACT_SCHEMA_VERSION: 1; declare const XENO_EVIDENCE_GRAPH_SCHEMA_VERSION: 1; type XenoJsonPrimitive = string | number | boolean | null; type XenoJsonValue = XenoJsonPrimitive | XenoJsonObject | XenoJsonValue[]; interface XenoJsonObject { [key: string]: XenoJsonValue; } declare const XENO_BUILTIN_ARTIFACT_KINDS: readonly [ "plan", "requirements", "design", "task-graph", "patch", "diff", "file", "document", "diagram", "screenshot", "recording", "browser-snapshot", "test-report", "review-report", "security-report", "performance-report", "release-report", "sbom", "provenance", "attestation", "page" ]; type XenoArtifactKind = (typeof XENO_BUILTIN_ARTIFACT_KINDS)[number] | `custom:${string}`; declare const XENO_ARTIFACT_STATES: readonly [ "draft", "pending_review", "approved", "rejected", "superseded", "archived" ]; type XenoArtifactState = (typeof XENO_ARTIFACT_STATES)[number]; declare const XENO_ARTIFACT_SENSITIVITIES: readonly [ "public", "internal", "confidential", "restricted" ]; type XenoArtifactSensitivity = (typeof XENO_ARTIFACT_SENSITIVITIES)[number]; interface XenoContentHash { algorithm: "sha256" | `custom:${string}`; value: string; } type XenoArtifactStorageReference = { type: "inline"; text?: string; base64?: string; } | { type: "file"; path: string; } | { type: "blob"; uri: string; } | { type: "git"; commit: string; path: string; repositoryId?: string; } | { type: "url"; url: string; expiresAt?: string; } | { type: "external"; provider: string; locator: string; }; interface XenoArtifactContent { hash: XenoContentHash; sizeBytes: number; storage: XenoArtifactStorageReference; encoding?: "utf8" | "base64" | "binary" | `custom:${string}`; redactedPreview?: string; } interface XenoArtifactIdentity { runId?: string; sessionId?: string; turnId?: string; taskId?: string; agentId?: string; workspaceId?: string; repositoryId?: string; } declare const XENO_ARTIFACT_ACTOR_KINDS: readonly [ "agent", "tool", "user", "system", "integration" ]; type XenoArtifactActorKind = (typeof XENO_ARTIFACT_ACTOR_KINDS)[number]; interface XenoArtifactActor { kind: XenoArtifactActorKind; id: string; displayName?: string; profileFingerprint?: string; } interface XenoArtifactProvenance { producer: XenoArtifactActor; eventId?: string; toolCallId?: string; operationId?: string; executionContractFingerprint?: string; capabilityLeaseIds?: string[]; sourceArtifactIds?: string[]; attributes?: XenoJsonObject; } declare const XENO_EVIDENCE_NODE_TYPES: readonly [ "requirement", "design-decision", "risk", "task", "agent", "run", "tool-call", "edit", "commit", "test-case", "test-run", "finding", "approval", "artifact", "release", "claim" ]; type XenoEvidenceNodeType = (typeof XENO_EVIDENCE_NODE_TYPES)[number] | `custom:${string}`; declare const XENO_EVIDENCE_EDGE_TYPES: readonly [ "decomposes", "depends_on", "implements", "changes", "tests", "verifies", "finds", "fixes", "reviews", "approves", "rejects", "supersedes", "derived_from", "produced_by", "supports_claim", "contradicts_claim", "released_as" ]; type XenoEvidenceEdgeType = (typeof XENO_EVIDENCE_EDGE_TYPES)[number] | `custom:${string}`; interface XenoEvidenceReference { type: XenoEvidenceNodeType; id: string; revision?: number; } interface XenoArtifactRelationship { relation: XenoEvidenceEdgeType; target: XenoEvidenceReference; description?: string; attributes?: XenoJsonObject; } type XenoArtifactAnchor = { kind: "file"; path: string; repositoryId?: string; commit?: string; } | { kind: "source-line"; path: string; startLine: number; endLine?: number; repositoryId?: string; commit?: string; } | { kind: "diff-hunk"; path: string; hunkId: string; artifactId?: string; revision?: number; } | { kind: "symbol"; path: string; symbol: string; repositoryId?: string; commit?: string; } | { kind: "dom-node"; pageId: string; selector?: string; accessibilityId?: string; snapshotArtifactId?: string; } | { kind: "timeline"; startMs: number; endMs?: number; recordingArtifactId: string; } | { kind: "region"; x: number; y: number; width: number; height: number; mediaArtifactId: string; } | { kind: "artifact"; artifactId: string; revision?: number; } | { kind: `custom:${string}`; data: XenoJsonObject; }; interface XenoArtifactRetention { policyId?: string; retainUntil?: string; legalHold?: boolean; } interface XenoArtifactEnvelope { schemaVersion: typeof XENO_ARTIFACT_SCHEMA_VERSION; artifactId: string; revision: number; kind: XenoArtifactKind; title: string; description?: string; state: XenoArtifactState; createdAt: string; updatedAt?: string; mediaType: string; sensitivity: XenoArtifactSensitivity; identity?: XenoArtifactIdentity; content: XenoArtifactContent; provenance: XenoArtifactProvenance; relationships?: XenoArtifactRelationship[]; anchors?: XenoArtifactAnchor[]; predecessorRevision?: number; accessPolicyId?: string; retention?: XenoArtifactRetention; extensions?: Record; } interface XenoArtifactLifecycleEvent { schemaVersion: typeof XENO_ARTIFACT_SCHEMA_VERSION; eventId: string; artifactId: string; revision: number; sequence: number; recordedAt: string; actor: XenoArtifactActor; fromState: XenoArtifactState | null; toState: XenoArtifactState; reason?: string; reviewEventId?: string; } type XenoArtifactReviewDecision = "approved" | "rejected" | "changes_requested"; interface XenoArtifactReviewEventBase { schemaVersion: typeof XENO_ARTIFACT_SCHEMA_VERSION; eventId: string; artifactId: string; artifactRevision: number; artifactHash: XenoContentHash; sequence: number; recordedAt: string; actor: XenoArtifactActor; } type XenoArtifactReviewEvent = (XenoArtifactReviewEventBase & { type: "review-requested"; reviewerIds?: string[]; message?: string; }) | (XenoArtifactReviewEventBase & { type: "comment-added"; commentId: string; body: string; anchor?: XenoArtifactAnchor; parentCommentId?: string; }) | (XenoArtifactReviewEventBase & { type: "comment-resolved" | "comment-reopened"; commentId: string; reason?: string; }) | (XenoArtifactReviewEventBase & { type: "decision-recorded"; decision: XenoArtifactReviewDecision; rationale?: string; scope?: XenoArtifactAnchor; }) | (XenoArtifactReviewEventBase & { type: "review-withdrawn"; reason?: string; }); type XenoArtifactReviewEventInput = Omit, "schemaVersion" | "eventId" | "sequence" | "recordedAt"> | Omit, "schemaVersion" | "eventId" | "sequence" | "recordedAt"> | Omit, "schemaVersion" | "eventId" | "sequence" | "recordedAt"> | Omit, "schemaVersion" | "eventId" | "sequence" | "recordedAt"> | Omit, "schemaVersion" | "eventId" | "sequence" | "recordedAt">; interface XenoArtifactReviewSummary { status: "not_requested" | "pending" | "approved" | "rejected" | "changes_requested" | "withdrawn"; totalComments: number; unresolvedComments: number; latestDecision?: XenoArtifactReviewDecision; latestDecisionEventId?: string; scopedDecisionCount?: number; lastReviewedAt?: string; } interface XenoArtifactRecord { artifact: XenoArtifactEnvelope; recordVersion: number; etag: string; lifecycleEvents: XenoArtifactLifecycleEvent[]; reviewEvents: XenoArtifactReviewEvent[]; reviewSummary: XenoArtifactReviewSummary; } interface XenoArtifactListQuery { artifactIds?: string[]; kinds?: XenoArtifactKind[]; states?: XenoArtifactState[]; runId?: string; sessionId?: string; turnId?: string; taskId?: string; workspaceId?: string; repositoryId?: string; producerId?: string; sensitivity?: XenoArtifactSensitivity[]; includeSuperseded?: boolean; } interface XenoEvidenceNode { id: string; type: XenoEvidenceNodeType; label?: string; artifactRevision?: number; attributes?: XenoJsonObject; } interface XenoEvidenceEdge { id: string; type: XenoEvidenceEdgeType; from: string; to: string; createdAt: string; producer?: XenoArtifactActor; attributes?: XenoJsonObject; } interface XenoEvidenceGraph { schemaVersion: typeof XENO_EVIDENCE_GRAPH_SCHEMA_VERSION; graphId: string; version: number; createdAt: string; updatedAt: string; nodes: XenoEvidenceNode[]; edges: XenoEvidenceEdge[]; } type XenoDiffMode = "working-tree" | "staged" | "turn" | "commit" | "preview"; type XenoDiffFileStatus = "added" | "modified" | "deleted" | "renamed" | "copied" | "binary"; type XenoDiffLineKind = "context" | "addition" | "deletion" | "no-newline"; interface XenoDiffLine { kind: XenoDiffLineKind; text: string; oldLine?: number; newLine?: number; } interface XenoDiffHunk { hunkId: string; header: string; section?: string; oldStart: number; oldLines: number; newStart: number; newLines: number; additions: number; deletions: number; lines: XenoDiffLine[]; } interface XenoDiffFile { oldPath?: string; newPath?: string; displayPath: string; status: XenoDiffFileStatus; additions: number; deletions: number; binary: boolean; headerLines: string[]; hunks: XenoDiffHunk[]; } interface XenoDiffDocument { schemaVersion: 1; mode: XenoDiffMode; repositoryId?: string; baseRef?: string; headRef?: string; files: XenoDiffFile[]; additions: number; deletions: number; rawDiff: string; } interface ParseUnifiedDiffOptions { mode?: XenoDiffMode; repositoryId?: string; baseRef?: string; headRef?: string; maxBytes?: number; maxFiles?: number; maxHunks?: number; maxLines?: number; } interface XenoDiffArtifactContext { kind?: "diff" | "patch"; artifactId?: string; revision?: number; predecessorRevision?: number; createdAt?: string; title?: string; description?: string; producer: XenoArtifactActor; identity?: XenoArtifactIdentity; sensitivity?: XenoArtifactSensitivity; accessPolicyId?: string; mode?: XenoDiffMode; repositoryId?: string; baseRef?: string; headRef?: string; } declare class XenoDiffParseError extends Error { readonly line?: number | undefined; readonly code = "XENO_DIFF_INVALID"; constructor(message: string, line?: number | undefined); } declare function parseUnifiedDiff(diff: string, options?: ParseUnifiedDiffOptions): XenoDiffDocument; declare function unifiedDiffToXenoArtifact(diff: string, context: XenoDiffArtifactContext): XenoArtifactEnvelope; declare function xenoArtifactToDiffDocument(artifact: XenoArtifactEnvelope): XenoDiffDocument; export { type XenoArtifactState as A, type XenoArtifactStorageReference as B, type XenoContentHash as C, type XenoDiffFile as D, type XenoDiffFileStatus as E, type XenoDiffHunk as F, type XenoDiffLine as G, type XenoDiffLineKind as H, type XenoDiffMode as I, type XenoEvidenceEdge as J, type XenoEvidenceEdgeType as K, type XenoEvidenceGraph as L, type XenoEvidenceNode as M, type XenoEvidenceNodeType as N, type XenoEvidenceReference as O, type XenoJsonObject as P, type XenoJsonPrimitive as Q, type XenoJsonValue as R, type ParseUnifiedDiffOptions as S, type XenoDiffArtifactContext as T, XenoDiffParseError as U, parseUnifiedDiff as V, unifiedDiffToXenoArtifact as W, type XenoArtifactEnvelope as X, xenoArtifactToDiffDocument as Y, type XenoDiffDocument as a, XENO_ARTIFACT_ACTOR_KINDS as b, XENO_ARTIFACT_SCHEMA_VERSION as c, XENO_ARTIFACT_SENSITIVITIES as d, XENO_ARTIFACT_STATES as e, XENO_BUILTIN_ARTIFACT_KINDS as f, XENO_EVIDENCE_EDGE_TYPES as g, XENO_EVIDENCE_GRAPH_SCHEMA_VERSION as h, XENO_EVIDENCE_NODE_TYPES as i, type XenoArtifactActor as j, type XenoArtifactActorKind as k, type XenoArtifactAnchor as l, type XenoArtifactContent as m, type XenoArtifactIdentity as n, type XenoArtifactKind as o, type XenoArtifactLifecycleEvent as p, type XenoArtifactListQuery as q, type XenoArtifactProvenance as r, type XenoArtifactRecord as s, type XenoArtifactRelationship as t, type XenoArtifactRetention as u, type XenoArtifactReviewDecision as v, type XenoArtifactReviewEvent as w, type XenoArtifactReviewEventInput as x, type XenoArtifactReviewSummary as y, type XenoArtifactSensitivity as z };