import type { KnowledgeAnalysisManifest, KnowledgeAuthority, KnowledgeReadiness, KnowledgeSourceKind, KnowledgeVersionPolicy, NormalizedKnowledgePage } from '@devflow-tools/sdk'; export type KnowledgeSourceLifecycleState = 'discovered' | 'queued' | 'fetched' | 'compiled' | 'indexed' | 'ready' | 'degraded' | 'stale' | 'failed'; export interface KnowledgeSourceIdentityV1 { schemaVersion: 'knowledge-source-identity.v1'; identityVersion: 1; projectId: string; scope: { kind: 'project'; id: string; }; sourceId: string; sourceKind: KnowledgeSourceKind; normalizedLocator: string; framework?: string; packageName?: string; version?: string; versionRange?: string; authority: KnowledgeAuthority; identityHash: string; } export interface KnowledgeSourceAggregateV1 { schemaVersion: 'knowledge-source-aggregate.v1'; identity: KnowledgeSourceIdentityV1; state: KnowledgeSourceLifecycleState; revision: number; contentHash?: string; readiness?: KnowledgeReadiness; lastEventId: string; updatedAt: number; aggregateHash: string; } export interface KnowledgeSourceTransitionV1 { eventId: string; identityHash: string; sequence: number; from?: KnowledgeSourceLifecycleState; to: KnowledgeSourceLifecycleState; contentHash?: string; reasonCode: string; createdAt: number; } export interface KnowledgeClaimV1 { schemaVersion: 'knowledge-claim.v1'; claimId: string; identityHash: string; sourceId: string; pageId: string; subject: string; predicate: string; object: string; status: 'verified' | 'candidate' | 'contradicted'; effectiveAt: number; sourceSpan: { start: number; end: number; quote: string; hash: string; }; sourceContentHash: string; extractorVersion: string; verificationState: 'source_bound' | 'unverified'; claimHash: string; } export declare function createKnowledgeSourceIdentityV1(input: { projectId: string; sourceId: string; sourceKind: KnowledgeSourceKind; sourceLocator: string; authority: KnowledgeAuthority; framework?: string; packageName?: string; version?: string; versionPolicy?: KnowledgeVersionPolicy; }): KnowledgeSourceIdentityV1; export declare function reduceKnowledgeSource(previous: KnowledgeSourceAggregateV1 | null, input: { identity: KnowledgeSourceIdentityV1; to: KnowledgeSourceLifecycleState; contentHash?: string; readiness?: KnowledgeReadiness; reasonCode: string; createdAt?: number; }): { aggregate: KnowledgeSourceAggregateV1; event: KnowledgeSourceTransitionV1; }; export declare function compileKnowledgeClaims(input: { identity: KnowledgeSourceIdentityV1; page: NormalizedKnowledgePage; manifest: KnowledgeAnalysisManifest; }): KnowledgeClaimV1[]; //# sourceMappingURL=knowledge-source-lifecycle.d.ts.map