import type { ArtifactKind } from "./types/artifact.js"; import type { AssetOwnership } from "./types/governance.js"; import type { Evidence } from "./types/diagnostics.js"; import type { MetadataFieldEvidence } from "./types/metadata.js"; /** Lifecycle state for a skill or context asset. */ export type AssetStatus = "experimental" | "stable" | "suspended" | "revoked" | "deprecated" | "archived"; /** Artifact kinds Renma keeps in the normalized model. */ export type AssetKind = Exclude; /** Relationship kinds used by graph analysis and repository validation. */ export type DependencyKind = "requires" | "optional" | "conflicts" | "extends" | "references" | "applies_to" | "covered_by" | "owns_local_resource" | "statically_references" | "inherits_owner" | "inherits_policy"; /** Normalized shared metadata for cataloged assets. */ export interface AssetMetadata { id?: string; title?: string; type?: string; version?: string; owner?: string; status?: AssetStatus; statusReason?: string; statusChangedAt?: string; purpose?: string; lastReviewedAt?: string; reviewCycle?: string; expiresAt?: string; tokenBudgetOverride?: number; tokenBudgetRationale?: string; tokenBudgetReviewedAt?: string; tags: string[]; whenToUse: string[]; whenNotToUse: string[]; requiresContext: string[]; optionalContext: string[]; conflicts: string[]; supersededBy: string[]; /** Exact Skill continuation declarations from metadata.renma.continues-with. */ continuesWith?: string[]; appliesTo?: string[]; focus?: string[]; expectedOutputs?: string[]; requiresLens?: string[]; optionalLens?: string[]; } /** Repository object Renma can catalog, validate, reference, or report on. */ export interface Asset { id: string; kind: AssetKind; sourcePath: string; contentHash: string; sizeBytes: number; contentClassification: "text" | "binary"; markdownParserEligible: boolean; /** Declared and effective ownership with explicit provenance. */ ownership: AssetOwnership; metadata: AssetMetadata; metadataFields: Record; metadataListItems: Record; } /** Return the deterministic owner used by catalog consumers and Readiness. */ export declare function effectiveAssetOwner(asset: Asset): string | undefined; export interface Skill extends Asset { kind: "skill"; requiredContext: string[]; optionalContext: string[]; requiredLens: string[]; optionalLens: string[]; conflicts: string[]; } export interface SupportAsset extends Asset { kind: Exclude; } /** Backwards-compatible catalog entry name for callers already using catalog output. */ export type CatalogEntry = Skill | SupportAsset; export interface Dependency { /** Asset ID declaring the relationship. */ from: string; /** Asset ID or declared target named by the relationship. */ to: string; kind: DependencyKind; /** Metadata field or other repository declaration that produced the edge. */ declaration?: string; /** Zero-based position within the declaration, retained for duplicate evidence. */ declarationIndex?: number; sourcePath: string; evidence?: Evidence; } /** Deterministic catalog of normalized repository assets and declared or derived edges. */ export interface Catalog { entries: CatalogEntry[]; assets: Asset[]; dependencies: Dependency[]; }