Intelligence
Artifacts
Browse the repository, read documents, and manage the governance folders. Source, runtime, and infrastructure are read-only.
Repository
repositories/aaf-holdings/hq01/lib/assets/types.ts
1.8 KB
import type {
Assignment,
Mission,
Objective,
Report,
WorkOrder,
} from "@/lib/missions/types";
/** Types of durable assets the organization owns. */
export type AssetType =
| "Code"
| "Document"
| "PDF"
| "Image"
| "Video"
| "Research"
| "Prompt"
| "Template"
| "Architecture"
| "Configuration"
| "Policy"
| "Other";
export type AssetStatus = "Active" | "Archived" | "Deprecated";
export interface Asset {
asset_id: string; // ASSET-000001 (global, sequential)
name: string;
type: AssetType;
// --- Immutable origin lineage (never changes after creation) ---
mission_id: string;
objective_id: string;
work_order_id: string;
assignment_id: string;
report_id: string;
repository: string;
relative_path: string;
created_at: string;
created_by_executive: string;
// --- Mutable metadata ---
status: AssetStatus;
tags: string[];
description: string;
}
export type AssetEventType = "asset_registered" | "asset_updated" | "state_changed";
export interface AssetEvent {
type: AssetEventType;
at: string;
detail?: string;
}
/** An asset plus its resolved upward lineage. */
export interface AssetView {
asset: Asset;
history: AssetEvent[];
mission: Mission | null;
objective: Objective | null;
work_order: WorkOrder | null;
assignment: Assignment | null;
report: Report | null;
}
export interface RegisterAssetInput {
mission_id: string;
assignment_id: string;
report_id: string;
relative_path: string;
name?: string;
type?: AssetType;
tags?: string[];
description?: string;
}
export interface UpdateAssetInput {
name?: string;
type?: AssetType;
tags?: string[];
description?: string;
status?: AssetStatus;
}
export interface AssetFilters {
mission?: string;
type?: string;
repository?: string;
executive?: string;
tag?: string;
status?: string;
}
root · /srv/aaf