faf-cli 7.8.0 → 7.10.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 +18 -15
- package/dist/cli.js +235 -235
- package/dist/cli.js.map +20 -17
- package/dist/core/types.d.ts +2 -0
- package/dist/detect/relentless.d.ts +8 -2
- package/dist/detect/scanner.d.ts +27 -0
- package/dist/index.js +109 -109
- package/dist/index.js.map +15 -12
- package/dist/interrogate/build-files.d.ts +10 -0
- package/dist/interrogate/compose.d.ts +11 -0
- package/dist/interrogate/env.d.ts +8 -0
- package/dist/interrogate/index.d.ts +12 -5
- package/dist/interrogate/types.d.ts +17 -0
- package/package.json +1 -1
- package/project.faf +3 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Makefile / justfile / Taskfile interrogation — the real project commands.
|
|
3
|
+
*
|
|
4
|
+
* `detectCommands` in scanner.ts only reads root package.json scripts + language
|
|
5
|
+
* defaults. Many repos (esp. polyglot ones) drive test/build/lint through a
|
|
6
|
+
* Makefile — `make test`, `make check-all`. Read the target names and map the
|
|
7
|
+
* obvious ones. Facts from files, not README prose.
|
|
8
|
+
*/
|
|
9
|
+
import type { ExtractedContext } from './types.js';
|
|
10
|
+
export declare function interrogateBuildFiles(dir: string): ExtractedContext;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* docker-compose interrogation — the services a repo runs ARE its stack.
|
|
3
|
+
*
|
|
4
|
+
* A polyglot / platform repo declares Postgres, Redis, ClickHouse, MinIO, Kafka…
|
|
5
|
+
* in compose and nowhere the root-only detectors look. We read the `image:` lines
|
|
6
|
+
* (naive regex — same style as cargo.ts's TOML reader) and map well-known infra
|
|
7
|
+
* images onto stack slots. Facts, not prose — so these win over README guesses.
|
|
8
|
+
*/
|
|
9
|
+
import type { ExtractedContext } from './types.js';
|
|
10
|
+
/** Read every compose file and map service images onto stack slots. */
|
|
11
|
+
export declare function interrogateCompose(dir: string): ExtractedContext;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .env.example interrogation — where secrets live.
|
|
3
|
+
*
|
|
4
|
+
* A repo that ships `.env.example` (or `.env.sample`) is telling you: secrets go
|
|
5
|
+
* in `.env`, this file is the template. Fills `security.secrets` + `.example`.
|
|
6
|
+
*/
|
|
7
|
+
import type { ExtractedContext } from './types.js';
|
|
8
|
+
export declare function interrogateEnv(dir: string): ExtractedContext;
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Repo interrogation orchestrator — runs all extractors and merges results.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* because its prose is most likely
|
|
7
|
-
* (
|
|
4
|
+
* Two classes of extractor:
|
|
5
|
+
* - PROSE (README, Cargo.toml description) → `project.goal` + `human_context`.
|
|
6
|
+
* README wins on overlap because its prose is most likely hand-curated.
|
|
7
|
+
* - FILE-FACTS (docker-compose services, Makefile targets, .env.example) →
|
|
8
|
+
* `stack.*` + `commands.*` + `security.*`. These are ground truth pulled
|
|
9
|
+
* straight from config — they win over README guesses and over the
|
|
10
|
+
* presence-only detectors in scanner.ts (wired in assemble.ts).
|
|
8
11
|
*
|
|
9
|
-
* The orchestrator never overwrites with empty —
|
|
12
|
+
* The orchestrator never overwrites with a non-empty value — earlier extractors
|
|
13
|
+
* win; later ones fill empties only.
|
|
10
14
|
*/
|
|
11
15
|
import type { ExtractedContext } from './types.js';
|
|
12
16
|
export type { ExtractedContext } from './types.js';
|
|
13
17
|
export { interrogateReadme } from './readme.js';
|
|
14
18
|
export { interrogateCargo } from './cargo.js';
|
|
19
|
+
export { interrogateCompose } from './compose.js';
|
|
20
|
+
export { interrogateBuildFiles } from './build-files.js';
|
|
21
|
+
export { interrogateEnv } from './env.js';
|
|
15
22
|
/** Run all repo interrogators and return merged context. */
|
|
16
23
|
export declare function interrogateRepo(dir: string): ExtractedContext;
|
|
@@ -35,6 +35,23 @@ export interface ExtractedContext {
|
|
|
35
35
|
/** Approach — "## Architecture" / "## How it works" */
|
|
36
36
|
how?: string;
|
|
37
37
|
};
|
|
38
|
+
/** Stack facts pulled from real config files (docker-compose services, …).
|
|
39
|
+
* Higher-precedence than README prose or presence-only guesses for these. */
|
|
40
|
+
stack?: {
|
|
41
|
+
database?: string;
|
|
42
|
+
cache?: string;
|
|
43
|
+
search?: string;
|
|
44
|
+
storage?: string;
|
|
45
|
+
hosting?: string;
|
|
46
|
+
runtime?: string;
|
|
47
|
+
};
|
|
48
|
+
/** Real project commands from Makefile / justfile / Taskfile targets. */
|
|
49
|
+
commands?: Record<string, string>;
|
|
50
|
+
/** Secrets handling — from .env.example / .env.sample presence. */
|
|
51
|
+
security?: {
|
|
52
|
+
secrets?: string;
|
|
53
|
+
example?: string;
|
|
54
|
+
};
|
|
38
55
|
}
|
|
39
56
|
/** Confidence threshold rules for extracted text — empty if violated */
|
|
40
57
|
export declare const EXTRACTION_LIMITS: {
|
package/package.json
CHANGED
package/project.faf
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
faf_version: "3.0"
|
|
2
2
|
project:
|
|
3
3
|
name: faf-cli
|
|
4
|
-
version: "7.
|
|
5
|
-
goal: "CLI for IANA-registered `.faf` + `.fafm` — context DNA and portable agent memory. TypeScript, Bun-native since v6. package faf-cli v7.
|
|
4
|
+
version: "7.10.0"
|
|
5
|
+
goal: "CLI for IANA-registered `.faf` + `.fafm` — context DNA and portable agent memory. TypeScript, Bun-native since v6. package faf-cli v7.10.0 The Full-Facts Edition."
|
|
6
6
|
main_language: TypeScript
|
|
7
7
|
type: cli # found: package.json bin
|
|
8
8
|
# Commands + key_files feed `faf export --agents` (hand values win over detection).
|
|
@@ -58,7 +58,7 @@ human_context:
|
|
|
58
58
|
what: Persistent AI Context Standard — project DNA for AI. IANA-registered. Anthropic-merged.
|
|
59
59
|
why: Eliminates 91% context re-discovery tax — define once, AI remembers forever
|
|
60
60
|
where: npm registry, Homebrew, GitHub
|
|
61
|
-
when: Production since September 2025; Bun-native since v6; current package 7.
|
|
61
|
+
when: Production since September 2025; Bun-native since v6; current package 7.10.0
|
|
62
62
|
how: bunx faf-cli auto, then project.faf versions with your code — faf show renders it human-visible
|
|
63
63
|
monorepo:
|
|
64
64
|
packages_count: slotignored
|