faf-cli 6.7.0 → 6.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 +41 -5
- package/dist/cli.js +206 -194
- package/dist/cli.js.map +18 -11
- package/dist/core/schema.d.ts +5 -0
- package/dist/core/scorer.d.ts +23 -0
- package/dist/core/slots.d.ts +44 -0
- package/dist/core/tiers.d.ts +19 -0
- package/dist/core/types.d.ts +148 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +4 -4
- package/dist/interop/faf.d.ts +14 -0
- package/dist/interop/projecthtml.d.ts +5 -0
- package/dist/ui/colors.d.ts +11 -0
- package/dist/wasm/kernel.d.ts +22 -0
- package/package.json +8 -5
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FafData } from '../core/types.js';
|
|
2
|
+
/** Read and parse a .faf file */
|
|
3
|
+
export declare function readFaf(path: string): FafData;
|
|
4
|
+
/** Write a .faf file from data.
|
|
5
|
+
*
|
|
6
|
+
* If `data._meta.found` is present, it's stripped before serialization and
|
|
7
|
+
* rendered as a `# found: <list>` YAML comment next to the `type:` field —
|
|
8
|
+
* Glass Hood doctrine: the user sees WHY the cli classified the project as
|
|
9
|
+
* it did. `_meta` is a runtime hint, never a serialized .faf field. */
|
|
10
|
+
export declare function writeFaf(path: string, data: FafData): void;
|
|
11
|
+
/** Read raw YAML text from a .faf file */
|
|
12
|
+
export declare function readFafRaw(path: string): string;
|
|
13
|
+
/** Find the .faf file in a directory (walks up) */
|
|
14
|
+
export declare function findFafFile(dir?: string): string | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FafData, ScoreResult } from '../core/types.js';
|
|
2
|
+
/** Render project.faf data + its score into a self-contained HTML string. */
|
|
3
|
+
export declare function generateProjectHtml(data: FafData, result: ScoreResult, fafPath?: string): string;
|
|
4
|
+
/** Write project.html beside project.faf (repo root). */
|
|
5
|
+
export declare function writeProjectHtml(dir: string, data: FafData, result: ScoreResult, fafPath?: string): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const bold: (s: string) => string;
|
|
2
|
+
export declare const dim: (s: string) => string;
|
|
3
|
+
export declare const italic: (s: string) => string;
|
|
4
|
+
export declare const FAF_HEX: {
|
|
5
|
+
readonly cyan: "#00D4D4";
|
|
6
|
+
readonly cyanDeep: "#0E8C8C";
|
|
7
|
+
readonly orange: "#FF6B35";
|
|
8
|
+
};
|
|
9
|
+
export declare const fafCyan: (s: string) => string;
|
|
10
|
+
export declare const fafCyanDeep: (s: string) => string;
|
|
11
|
+
export declare const orange: (s: string) => string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { KernelScoreResult, FafbInfo } from '../core/types.js';
|
|
2
|
+
/** Score a .faf YAML string (21 base slots) */
|
|
3
|
+
export declare function score(yaml: string): KernelScoreResult;
|
|
4
|
+
/** Score a .faf YAML string (33 enterprise slots) */
|
|
5
|
+
export declare function scoreEnterprise(yaml: string): KernelScoreResult;
|
|
6
|
+
/** Validate .faf YAML */
|
|
7
|
+
export declare function validate(yaml: string): boolean;
|
|
8
|
+
/** Compile .faf YAML to FAFb binary */
|
|
9
|
+
export declare function compile(yaml: string): Uint8Array;
|
|
10
|
+
/** Decompile FAFb binary to JSON info */
|
|
11
|
+
export declare function decompile(bytes: Uint8Array): FafbInfo;
|
|
12
|
+
/** Get FAFb file metadata */
|
|
13
|
+
export declare function fafbInfo(bytes: Uint8Array): FafbInfo;
|
|
14
|
+
/** Get FAFb binary metadata (name, version, source) */
|
|
15
|
+
export interface FafbMeta {
|
|
16
|
+
source: string;
|
|
17
|
+
name: string;
|
|
18
|
+
faf_version: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function scoreFafb(bytes: Uint8Array): FafbMeta;
|
|
21
|
+
/** Get WASM SDK version */
|
|
22
|
+
export declare function sdkVersion(): string;
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "faf-cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.0",
|
|
4
4
|
"description": "Persistent AI Context Standard — project DNA for AI. IANA-registered. Anthropic-approved.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"icon": "https://faf.one/orange-smiley.svg",
|
|
7
7
|
"logo": "https://faf.one/orange-smiley.svg",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
9
10
|
"bin": {
|
|
10
11
|
"faf": "dist/cli.js",
|
|
11
12
|
"faf-cli": "dist/cli.js"
|
|
12
13
|
},
|
|
13
14
|
"exports": {
|
|
14
15
|
".": {
|
|
15
|
-
"
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
16
17
|
"default": "./dist/index.js"
|
|
17
18
|
}
|
|
18
19
|
},
|
|
@@ -24,11 +25,11 @@
|
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|
|
26
27
|
"dev": "bun src/cli.ts",
|
|
27
|
-
"build": "bun build src/cli.ts --outdir dist --target=node --minify --sourcemap=linked --external faf-scoring-kernel --external open && bun build src/index.ts --outdir dist --target=node --minify --sourcemap=linked --external faf-scoring-kernel --external open",
|
|
28
|
+
"build": "bun build src/cli.ts --outdir dist --target=node --minify --sourcemap=linked --external faf-scoring-kernel --external open && bun build src/index.ts --outdir dist --target=node --minify --sourcemap=linked --external faf-scoring-kernel --external open && tsc -p tsconfig.build.json",
|
|
28
29
|
"compile": "bun build src/cli.ts --compile --bytecode --minify --outfile faf",
|
|
29
30
|
"compile:all": "bun build src/cli.ts --compile --bytecode --minify --target=bun-darwin-arm64 --outfile faf-darwin-arm64 && bun build src/cli.ts --compile --bytecode --minify --target=bun-darwin-x64 --outfile faf-darwin-x64 && bun build src/cli.ts --compile --bytecode --minify --target=bun-linux-x64 --outfile faf-linux-x64 && bun build src/cli.ts --compile --bytecode --minify --target=bun-windows-x64 --outfile faf-windows-x64.exe",
|
|
30
|
-
"test": "bun test --timeout=
|
|
31
|
-
"test:watch": "bun test --watch --timeout=
|
|
31
|
+
"test": "bun test --timeout=120000",
|
|
32
|
+
"test:watch": "bun test --watch --timeout=120000",
|
|
32
33
|
"lint": "eslint src/**/*.ts",
|
|
33
34
|
"format": "prettier --write 'src/**/*.ts'",
|
|
34
35
|
"check:no-hardcode": "! grep -rEln '/(Users|home/runner|private/var)/' dist/ || (echo '❌ Hardcoded build-machine path leaked into dist — see grep output above. Externalize the offending dep in the build script.'; exit 1)",
|
|
@@ -69,6 +70,8 @@
|
|
|
69
70
|
"@anthropic-ai/sdk": "^0.91.1"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
73
|
+
"@faf/specification": "github:Wolfe-Jam/faf",
|
|
74
|
+
"ajv": "^8.17.1",
|
|
72
75
|
"@types/node": "^22.15.0",
|
|
73
76
|
"@typescript-eslint/eslint-plugin": "^8.41.0",
|
|
74
77
|
"@typescript-eslint/parser": "^8.41.0",
|