declare const XENO_ARTIFACT_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; } declare const XENO_SOURCE_RESEARCH_SCHEMA_VERSION: "xeno.source-research-report.v1"; type XenoRemoteSourceProvider = "github" | "gitlab"; type XenoSourceResearchSeverity = "info" | "low" | "medium" | "high" | "critical"; interface XenoRemoteRepositoryIdentity { provider: XenoRemoteSourceProvider; host: string; repository: string; ref: string; commit: string; url: string; } interface XenoRemoteSourceFile { path: string; contentHash: { algorithm: "sha256"; value: string; }; sizeBytes: number; lineCount: number; blobId?: string; language?: string; truncated?: boolean; } interface XenoSourceResearchExcerpt { excerptId: string; path: string; startLine: number; endLine: number; text: string; contentHash: { algorithm: "sha256"; value: string; }; sourceContentHash: { algorithm: "sha256"; value: string; }; } interface XenoSourceResearchFinding { findingId: string; title: string; summary: string; severity: XenoSourceResearchSeverity; confidence: number; excerptIds: string[]; } interface XenoSourceResearchModelIdentity { providerId: string; model: string; connectionId?: string; } interface XenoSourceResearchReport { schemaVersion: typeof XENO_SOURCE_RESEARCH_SCHEMA_VERSION; reportId: string; runId: string; query: string; queryHash: { algorithm: "sha256"; value: string; }; repository: XenoRemoteRepositoryIdentity; collectedAt: string; completedAt: string; model: XenoSourceResearchModelIdentity; files: XenoRemoteSourceFile[]; excerpts: XenoSourceResearchExcerpt[]; answer: string; answerExcerptIds: string[]; publicRationale: string; findings: XenoSourceResearchFinding[]; limitations: string[]; usage: { inputTokens: number; outputTokens: number; }; } interface CreateXenoSourceResearchReportInput { reportId?: string; runId?: string; query: string; repository: XenoRemoteRepositoryIdentity; collectedAt: string; completedAt?: string; model: XenoSourceResearchModelIdentity; files: XenoRemoteSourceFile[]; excerpts: XenoSourceResearchExcerpt[]; answer: string; answerExcerptIds: string[]; publicRationale: string; findings: XenoSourceResearchFinding[]; limitations?: string[]; usage?: { inputTokens?: number; outputTokens?: number; }; } interface XenoSourceResearchArtifactContext { artifactId?: string; producer: XenoArtifactActor; identity?: XenoArtifactIdentity; sensitivity?: XenoArtifactSensitivity; createdAt?: string; } declare class XenoSourceResearchValidationError extends Error { readonly issues: string[]; readonly code = "XENO_SOURCE_RESEARCH_INVALID"; constructor(issues: string[]); } declare function createXenoSourceResearchReport(input: CreateXenoSourceResearchReportInput): XenoSourceResearchReport; declare function createXenoSourceResearchExcerpt(input: { excerptId: string; path: string; startLine: number; endLine: number; text: string; sourceContentHash: { algorithm: "sha256"; value: string; }; }): XenoSourceResearchExcerpt; declare function assertValidXenoSourceResearchReport(report: XenoSourceResearchReport): void; declare function xenoSourceResearchReportToArtifact(report: XenoSourceResearchReport, context: XenoSourceResearchArtifactContext): XenoArtifactEnvelope; declare function xenoArtifactToSourceResearchReport(artifact: XenoArtifactEnvelope): XenoSourceResearchReport; declare function normalizeSourceText(value: string): string; export { type CreateXenoSourceResearchReportInput, XENO_SOURCE_RESEARCH_SCHEMA_VERSION, type XenoRemoteRepositoryIdentity, type XenoRemoteSourceFile, type XenoRemoteSourceProvider, type XenoSourceResearchArtifactContext, type XenoSourceResearchExcerpt, type XenoSourceResearchFinding, type XenoSourceResearchModelIdentity, type XenoSourceResearchReport, type XenoSourceResearchSeverity, XenoSourceResearchValidationError, assertValidXenoSourceResearchReport, createXenoSourceResearchExcerpt, createXenoSourceResearchReport, normalizeSourceText, xenoArtifactToSourceResearchReport, xenoSourceResearchReportToArtifact };