faf-cli 7.16.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,6 +52,20 @@ export interface Milestone {
52
52
  label: string;
53
53
  emoji: string;
54
54
  }
55
+ /**
56
+ * A lineage a reset ended. `faf init --force` starts a fresh certificate, and
57
+ * the life before it is kept here rather than erased — a birth score is the one
58
+ * value in this format that cannot be recreated, so a reset is a REBIRTH, not a
59
+ * deletion. Chains: a project reset twice keeps both earlier lives, oldest first.
60
+ */
61
+ export interface PriorLineage {
62
+ born: string;
63
+ birthDNA: number;
64
+ certificate: string;
65
+ projectDNA: string;
66
+ lastScore: number;
67
+ endedAt: string;
68
+ }
55
69
  export interface FafDNA {
56
70
  birthCertificate: BirthCertificate;
57
71
  versions: VersionEntry[];
@@ -67,6 +81,8 @@ export interface FafDNA {
67
81
  };
68
82
  lastModified: string;
69
83
  format: 'faf-dna-v1';
84
+ /** Lives ended by a reset, oldest first. Absent when there has never been one. */
85
+ priorLineage?: PriorLineage[];
70
86
  }
71
87
  /**
72
88
  * The `.faf-dna` lineage of one project: birth, growth and the journey line.
@@ -110,6 +126,10 @@ export declare class FafDNAManager {
110
126
  * load()), a file that appeared since is refused (SafePathError `changed`)
111
127
  * rather than written over; over a `.faf-dna` that is there, birth starts a
112
128
  * fresh lineage (`faf init --force`). */
129
+ /** The lives this birth is about to end, oldest first — the one already on
130
+ * disk, plus any it had itself inherited. Empty when there is no readable
131
+ * `.faf-dna`, so a first birth writes no `priorLineage` key at all. */
132
+ private endingLineage;
113
133
  birth(birthDNA: number): FafDNA;
114
134
  /** True when `.faf-dna` exists and is one faf wrote — in faf's shape, and
115
135
  * exactly faf's own text — so recordGrowth may add to it. Any other file is
@@ -20,7 +20,7 @@ export declare function getSlotByAnyPath(path: string): SlotDef | undefined;
20
20
  export declare function readSlotValue(data: Record<string, unknown>, slot: SlotDef): unknown;
21
21
  /** Slots grouped by category */
22
22
  export declare function slotsByCategory(category: SlotCategory): SlotDef[];
23
- /** Base-tier slots (1-21) — used by score_faf */
23
+ /** Base-tier slots (1-21) — the slots faf-cli fills; the other 12 are `slotignored` */
24
24
  export declare const BASE_SLOTS: SlotDef[];
25
25
  /** Enterprise-tier slots (1-33) — used by score_faf_enterprise */
26
26
  export declare const ENTERPRISE_SLOTS: SlotDef[];
@@ -108,35 +108,36 @@ export interface FafData {
108
108
  human_context?: Record<string, unknown>;
109
109
  monorepo?: Record<string, unknown>;
110
110
  scores?: Record<string, unknown>;
111
- /** TECH_STACK section content — flat list of technology components */
111
+ /** `tech_stack` chunk — flat list of technology components */
112
112
  tech_stack?: string[];
113
- /** KEY_FILES section — list of important file paths */
113
+ /** `key_files` chunk — list of important file paths */
114
114
  key_files?: string[];
115
- /** COMMANDS section — build/test/lint/dev command map */
115
+ /** `commands` chunk — build/test/lint/dev command map */
116
116
  commands?: Record<string, string>;
117
- /** ARCHITECTURE section — free-form structural description (user-fill) */
117
+ /** `architecture` chunk — free-form structural description (user-fill) */
118
118
  architecture?: string;
119
- /** CONTEXT section — free-form additional signal (user-fill, NOT human_context) */
119
+ /** `context` chunk — free-form additional signal (user-fill, NOT human_context) */
120
120
  context?: string;
121
121
  [key: string]: unknown;
122
122
  }
123
- /** FAFb binary info from kernel */
123
+ /** FAFb v2 info from kernel decompile / fafb_info */
124
124
  export interface FafbInfo {
125
- header: {
126
- magic: string;
127
- version: number;
128
- flags: number;
129
- section_count: number;
130
- crc32: number;
131
- };
125
+ version: string;
126
+ flags: number;
127
+ section_count: number;
128
+ total_size: number;
129
+ source_checksum: string;
130
+ created?: number;
132
131
  sections: Array<{
133
132
  name: string;
133
+ name_index?: number;
134
134
  priority: number;
135
- offset: number;
135
+ offset?: number;
136
136
  length: number;
137
+ token_count?: number;
137
138
  classification: string;
139
+ content?: string;
138
140
  }>;
139
- content?: string;
140
141
  }
141
142
  /** Framework detection result */
142
143
  export interface DetectedFramework {
@@ -89,14 +89,13 @@ export declare function detectHosting(dir: string): string | null;
89
89
  export declare function detectSvelteAdapter(dir: string): string | null;
90
90
  /** Detect build tool */
91
91
  export declare function detectBuildTool(dir: string): string | null;
92
- /** Detect a list of important file paths for the KEY_FILES FAFB section.
92
+ /** Detect a list of important file paths for the `key_files` chunk.
93
93
  * Returns up to ~10 entries, ordered by canonical importance. */
94
94
  export declare function detectKeyFiles(dir: string): string[];
95
- /** Detect build/test/lint commands for the COMMANDS FAFB section.
95
+ /** Detect build/test/lint commands for the `commands` chunk.
96
96
  * Returns a Record<string, string> mapping command name → shell command. */
97
97
  export declare function detectCommands(dir: string, pkg: PackageJson | null): Record<string, string>;
98
- /** Detect a tech-stack list for the TECH_STACK FAFB section.
99
- * Combines language + frameworks + runtime into a flat list of strings
100
- * (matching the canonical xai-faf-rust project.faf shape). */
98
+ /** Detect a tech-stack list for the `tech_stack` chunk.
99
+ * Combines language + frameworks + runtime into a flat list of strings. */
101
100
  export declare function detectTechStack(dir: string, pkg: PackageJson | null, frameworks: DetectedFramework[], language: string): string[];
102
101
  export {};