faf-cli 7.7.0 → 7.8.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.
- package/README.md +35 -10
- package/dist/cli.js +234 -228
- package/dist/cli.js.map +20 -17
- package/dist/core/about.d.ts +22 -0
- package/dist/core/scorer.d.ts +4 -9
- package/dist/core/slots.d.ts +2 -3
- package/dist/core/types.d.ts +7 -8
- package/dist/detect/scanner.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +115 -115
- package/dist/index.js.map +16 -14
- package/dist/interop/cards.d.ts +123 -0
- package/package.json +16 -11
- package/project.faf +3 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** About is a repo role, not an app_type.
|
|
2
|
+
*
|
|
3
|
+
* Signal: the `about:` block with `represents: owner/repo`.
|
|
4
|
+
* Score is inherited (`about.source_score`) or unknown (−1 / —).
|
|
5
|
+
*/
|
|
6
|
+
export declare const REPRESENTS_RE: RegExp;
|
|
7
|
+
export interface AboutDecl {
|
|
8
|
+
represents: string;
|
|
9
|
+
sourceScore: number;
|
|
10
|
+
}
|
|
11
|
+
/** Parsed .faf object: About iff about.represents is a non-empty string. */
|
|
12
|
+
export declare function isAboutFaf(data: {
|
|
13
|
+
about?: {
|
|
14
|
+
represents?: unknown;
|
|
15
|
+
};
|
|
16
|
+
} | null | undefined): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Hot-path YAML detect — no parser.
|
|
19
|
+
* About = an `about:` map that contains `represents:`.
|
|
20
|
+
* `app_type: about` is not a type and does not trigger this.
|
|
21
|
+
*/
|
|
22
|
+
export declare function aboutFromYaml(yaml: string): AboutDecl | null;
|
package/dist/core/scorer.d.ts
CHANGED
|
@@ -4,20 +4,15 @@ export declare function enrichScore(kernel: KernelScoreResult): ScoreResult;
|
|
|
4
4
|
/**
|
|
5
5
|
* Score a .faf YAML string with About-Repo short-circuit.
|
|
6
6
|
*
|
|
7
|
-
* About
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* directly — no slot scoring, no kernel call.
|
|
7
|
+
* About is a repo role, not an app_type. The signal is the `about:` block
|
|
8
|
+
* (`about.represents`). The scorer reads `about.source_score` and emits
|
|
9
|
+
* that directly — no slot scoring, no kernel call.
|
|
11
10
|
*
|
|
12
|
-
* Truth-printing is preserved by owner accountability: the score is
|
|
13
|
-
* their attestation of the source's score; they're on the hook if it's wrong.
|
|
14
|
-
*
|
|
15
|
-
* Required for about: `app_type: about` + `about.represents: <owner>/<repo>`.
|
|
16
11
|
* Optional: `about.source_score: <number>` — without it, score is -1
|
|
17
12
|
* (renders as "—" honest unknown).
|
|
18
13
|
*
|
|
19
14
|
* Doctrine: memory/private-source-public-about-pattern.md.
|
|
20
15
|
*
|
|
21
|
-
* For
|
|
16
|
+
* For apps: delegates to kernel.score() + enrichScore().
|
|
22
17
|
*/
|
|
23
18
|
export declare function scoreFafYaml(yaml: string): ScoreResult;
|
package/dist/core/slots.d.ts
CHANGED
|
@@ -29,9 +29,8 @@ export declare const PLACEHOLDERS: Set<string>;
|
|
|
29
29
|
/** Check if a value is a placeholder (empty) */
|
|
30
30
|
export declare function isPlaceholder(value: unknown): boolean;
|
|
31
31
|
/** App-type to active category mapping. The canonical 24-type ladder —
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* + `intent` (human-intent seed from builder.faf.one, not auto-detected).
|
|
32
|
+
* detectable apps + `encyclopedia` (curated knowledge) + `intent` (seed).
|
|
33
|
+
* About is NOT an app_type — it is a repo role (`about.represents`).
|
|
35
34
|
* (See v6.6.md doctrine memory + fafipedia-vs-grokipedia-architecture.)
|
|
36
35
|
* Sorted ascending by active slot count for readability.
|
|
37
36
|
*
|
package/dist/core/types.d.ts
CHANGED
|
@@ -45,11 +45,10 @@ export interface ScoreResult {
|
|
|
45
45
|
slots: Record<string, SlotState>;
|
|
46
46
|
/**
|
|
47
47
|
* When true, the score is INHERITED from a source codebase (declared via
|
|
48
|
-
* `
|
|
49
|
-
*
|
|
50
|
-
* documentation surfaces, not apps.
|
|
48
|
+
* the `about:` block + `about.source_score`). The scorer did NOT calculate
|
|
49
|
+
* this — the owner attested to it. About is a repo role, not an app_type.
|
|
51
50
|
*
|
|
52
|
-
* Set by scoreFafYaml when the input
|
|
51
|
+
* Set by scoreFafYaml when the input has `about.represents`.
|
|
53
52
|
* Consumers (TAF receipt generation, display logic) should distinguish
|
|
54
53
|
* inherited scores from calculated ones — they're qualitatively different
|
|
55
54
|
* artifacts. See memory/private-source-public-about-pattern.md.
|
|
@@ -81,13 +80,13 @@ export interface FafData {
|
|
|
81
80
|
};
|
|
82
81
|
/**
|
|
83
82
|
* Top-level app_type — drives slot selection in APP_TYPE_CATEGORIES.
|
|
84
|
-
*
|
|
83
|
+
* Must be a real app (cli, library, mcp, …). `about` is not an app_type.
|
|
85
84
|
*/
|
|
86
85
|
app_type?: string;
|
|
87
86
|
/**
|
|
88
|
-
* About Repo declaration
|
|
89
|
-
*
|
|
90
|
-
* `source_score
|
|
87
|
+
* About Repo declaration. The `about:` block is the role signal
|
|
88
|
+
* (`about.represents` required). Scorer short-circuits and emits
|
|
89
|
+
* `source_score`. See memory/private-source-public-about-pattern.md.
|
|
91
90
|
*/
|
|
92
91
|
about?: {
|
|
93
92
|
/** Required: "owner/repo" pointing at the private source codebase. */
|
package/dist/detect/scanner.d.ts
CHANGED
|
@@ -37,8 +37,8 @@ export interface ProjectTypeDetection {
|
|
|
37
37
|
* positive signal that contributed to the classification — used downstream
|
|
38
38
|
* by `writeFaf` to render `# found: <list>` next to `type:` in the .faf.
|
|
39
39
|
*
|
|
40
|
-
* Priority order per v6.6.md doctrine (most-specific first).
|
|
41
|
-
*
|
|
40
|
+
* Priority order per v6.6.md doctrine (most-specific first). About is a
|
|
41
|
+
* repo role (`about.represents`), not an app_type — never matches here.
|
|
42
42
|
* Rule: SDK keyword takes priority (sdk wins over library/cli/wasm). */
|
|
43
43
|
export declare function detectProjectTypeWithRationale(dir: string): ProjectTypeDetection;
|
|
44
44
|
/** Detect the project type for slot mapping. Backward-compatible wrapper —
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export { findFafFile, readFaf, readFafRaw } from './interop/faf.js';
|
|
|
8
8
|
export { generateProjectHtml, writeProjectHtml } from './interop/projecthtml.js';
|
|
9
9
|
export { generateServerCard, writeServerCard, fafContextBlock, registryMeta, registryName, REGISTRY_PUBLISHER_KEY, } from './interop/servercard.js';
|
|
10
10
|
export type { ServerCardOptions } from './interop/servercard.js';
|
|
11
|
+
export { projectCards, readFafa, findFafaFile, generateA2ACard, upsertCatalog, A2A_CONTEXT_URI, } from './interop/cards.js';
|
|
12
|
+
export type { FafaDoc, CardTarget, ProjectedCards } from './interop/cards.js';
|
|
11
13
|
export { Soul as FafmSoul, fromClaudeDir, canonicalPriority, utcNow, PRIORITY_ORDER, PRIORITY_RANK, KNOWLEDGE_TYPES, } from './fafm/index.js';
|
|
12
14
|
export type { Fact as FafmFact, SoulDoc, Profile as FafmProfile } from './fafm/index.js';
|
|
13
15
|
export type { InterviewQuestion, InterviewOption, HumanSlotPath, SourcedSlotPath, GoalSeed, TableOf8, TableOf8Row, BoxStatus } from './core/interview.js';
|