faf-cli 8.1.0 → 8.1.1

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.
@@ -32,7 +32,8 @@ export interface AiCatalog {
32
32
  [key: string]: unknown;
33
33
  }
34
34
  export interface ProjectedCards {
35
- block: Record<string, unknown>;
35
+ /** faf's context block — only when a project.faf was given (BEST). */
36
+ block?: Record<string, unknown>;
36
37
  a2a?: ProjectedA2A;
37
38
  mcp?: Record<string, unknown>;
38
39
  registry?: {
@@ -50,9 +51,11 @@ export interface ProjectedCards {
50
51
  export declare function readFafa(path: string): FafaDoc;
51
52
  /** Discover agent.fafa / .fafa (cwd, then one parent). */
52
53
  export declare function findFafaFile(dir?: string): string | null;
53
- /** Build the A2A Agent Card (JSON) from a .fafa + .faf: the core card
54
- * ({@link projectA2ACard}) carrying FAF's context extension. */
55
- export declare function buildA2ACard(fafa: FafaDoc, faf: FafData, opts?: ProjectCardsOptions): ProjectedA2A;
54
+ /** Build the A2A Agent Card (JSON) from a .fafa: the core card
55
+ * ({@link projectA2ACard}). With a project.faf (BEST) it carries FAF's
56
+ * context extension; with none (BETTER) it is the plain A2A card — the
57
+ * .fafa is its source, and nothing on it points at a project.faf. */
58
+ export declare function buildA2ACard(fafa: FafaDoc, faf?: FafData, opts?: ProjectCardsOptions): ProjectedA2A;
56
59
  /** @deprecated Use {@link buildA2ACard}. Removed in the next major. */
57
60
  export declare const generateA2ACard: typeof buildA2ACard;
58
61
  /**
@@ -66,7 +69,7 @@ export declare const generateA2ACard: typeof buildA2ACard;
66
69
  * an identifier is a catalog's primary key, and `urn:air:local:…` published to
67
70
  * the world is worse than a refusal a line of YAML fixes.
68
71
  */
69
- export declare function catalogEntriesFor(fafa: FafaDoc, faf: FafData, opts?: ProjectCardsOptions): CatalogEntry[];
72
+ export declare function catalogEntriesFor(fafa: FafaDoc, faf?: FafData, opts?: ProjectCardsOptions): CatalogEntry[];
70
73
  /** Upsert projector entries into an existing catalog. Leaves every other row
71
74
  * alone: a row is faf's only when its identifier is exactly faf's (never by
72
75
  * type or URL). On match, only url / type / updatedAt move — host copy
@@ -90,8 +93,22 @@ export declare function upsertCatalogText(text: string | null, incoming: Catalog
90
93
  text: string;
91
94
  changed: boolean;
92
95
  };
96
+ /** The cards an agent.fafa gives with no project.faf (BETTER): the A2A card
97
+ * (when the .fafa names an A2A door), the AI Catalog and ARD. */
98
+ export declare function betterTargets(fafa: FafaDoc, opts?: ProjectCardsOptions): CardTarget[];
99
+ /** The cards that come from project.faf (BEST): the MCP Server Card and the
100
+ * registry server.json. */
101
+ export declare const BEST_ONLY: CardTarget[];
102
+ /**
103
+ * Project the cards. The ladder: an agent.fafa alone gives BETTER — the plain
104
+ * A2A card, AI Catalog, ARD ({@link betterTargets}). A project.faf, resident
105
+ * and used, gives BEST — the same cards plus FAF's context extension on the
106
+ * A2A card, the MCP Server Card and the registry server.json. With no `faf`,
107
+ * a BEST target throws rather than point at a project.faf that is not there.
108
+ */
93
109
  export declare function projectCards(input: {
94
- faf: FafData;
110
+ /** project.faf — absent means BETTER. */
111
+ faf?: FafData;
95
112
  fafa?: FafaDoc;
96
113
  targets?: CardTarget[];
97
114
  opts?: ProjectCardsOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "faf-cli",
3
- "version": "8.1.0",
3
+ "version": "8.1.1",
4
4
  "description": "Persistent AI context + memory — .faf and .fafm, IANA-registered. Anthropic-merged.",
5
5
  "type": "module",
6
6
  "icon": "https://faf.one/orange-smiley.svg",
package/project.faf CHANGED
@@ -1,8 +1,8 @@
1
1
  faf_version: "3.0"
2
2
  project:
3
3
  name: faf-cli
4
- version: "8.1.0"
5
- goal: "CLI for IANA-registered `.faf` + `.fafm` — context DNA and portable agent memory. TypeScript, Bun-native since v6. package faf-cli v8.1.0 The Always33+ Edition — scored by the always-33 engine."
4
+ version: "8.1.1"
5
+ goal: "CLI for IANA-registered `.faf` + `.fafm` — context DNA and portable agent memory. TypeScript, Bun-native since v6. package faf-cli v8.1.1 The Always33+ Edition — scored by the always-33 engine."
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).
@@ -61,7 +61,7 @@ human_context:
61
61
  what: Persistent AI Context Standard — project DNA for AI. IANA-registered. Anthropic-merged.
62
62
  why: Eliminates 91% context re-discovery tax — define once, AI remembers forever
63
63
  where: npm registry, Homebrew, GitHub
64
- when: Production since September 2025; Bun-native since v6; current package 8.1.0 (always-33 engine)
64
+ when: Production since September 2025; Bun-native since v6; current package 8.1.1 (always-33 engine)
65
65
  how: bunx faf-cli auto, then project.faf versions with your code — faf show renders it human-visible
66
66
  monorepo:
67
67
  packages_count: slotignored