faf-cli 7.6.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.
@@ -0,0 +1,123 @@
1
+ import type { FafData } from '../core/types.js';
2
+ import { type ServerCardOptions } from './servercard.js';
3
+ /** A2A extension URI — dereference, not the MCP `_meta` key `one.faf/context`. */
4
+ export declare const A2A_CONTEXT_URI = "https://faf.one/context";
5
+ export declare const A2A_PROTOCOL_BINDING = "JSONRPC";
6
+ export declare const A2A_PROTOCOL_VERSION = "1.0";
7
+ export type CardTarget = 'a2a' | 'mcp' | 'registry' | 'catalog';
8
+ export declare const CARD_TARGETS: CardTarget[];
9
+ export interface FafaAgent {
10
+ name?: string;
11
+ displayName?: string;
12
+ id?: string;
13
+ vendor?: string;
14
+ version?: string;
15
+ description?: string;
16
+ homepage?: string;
17
+ }
18
+ export interface FafaCapability {
19
+ name?: string;
20
+ description?: string;
21
+ tags?: unknown;
22
+ }
23
+ export interface FafaEndpoint {
24
+ protocol?: string;
25
+ transport?: string;
26
+ location?: string;
27
+ version?: string;
28
+ }
29
+ export interface FafaDoc {
30
+ agent?: FafaAgent;
31
+ capabilities?: FafaCapability[];
32
+ endpoints?: FafaEndpoint[];
33
+ provenance?: Record<string, unknown>;
34
+ metadata?: {
35
+ persona?: string;
36
+ };
37
+ [key: string]: unknown;
38
+ }
39
+ export interface ProjectCardsOptions extends ServerCardOptions {
40
+ /** Public URL of the emitted A2A card (catalog row). */
41
+ a2aCardUrl?: string;
42
+ /** Caller-supplied A2A door when `.fafa` has no `endpoints[].protocol: a2a`. */
43
+ doorUrl?: string;
44
+ }
45
+ export interface ProjectedA2A {
46
+ name: string;
47
+ description: string;
48
+ supportedInterfaces: Array<{
49
+ url: string;
50
+ protocolBinding: string;
51
+ protocolVersion: string;
52
+ }>;
53
+ provider: {
54
+ organization: string;
55
+ url: string;
56
+ };
57
+ version: string;
58
+ capabilities: {
59
+ streaming: boolean;
60
+ pushNotifications: boolean;
61
+ extendedAgentCard: boolean;
62
+ extensions: Array<{
63
+ uri: string;
64
+ description: string;
65
+ required: boolean;
66
+ params: Record<string, unknown>;
67
+ }>;
68
+ };
69
+ defaultInputModes: string[];
70
+ defaultOutputModes: string[];
71
+ skills: Array<{
72
+ id: string;
73
+ name: string;
74
+ description: string;
75
+ tags: string[];
76
+ }>;
77
+ }
78
+ export interface CatalogEntry {
79
+ identifier: string;
80
+ displayName?: string;
81
+ type: string;
82
+ description?: string;
83
+ url: string;
84
+ updatedAt?: string;
85
+ }
86
+ export interface AiCatalog {
87
+ specVersion: string;
88
+ host?: Record<string, unknown>;
89
+ entries: CatalogEntry[];
90
+ [key: string]: unknown;
91
+ }
92
+ export interface ProjectedCards {
93
+ block: Record<string, unknown>;
94
+ a2a?: ProjectedA2A;
95
+ mcp?: Record<string, unknown>;
96
+ registry?: {
97
+ name: string;
98
+ title?: string;
99
+ _meta: Record<string, unknown>;
100
+ };
101
+ catalog?: CatalogEntry[];
102
+ }
103
+ export declare function readFafa(path: string): FafaDoc;
104
+ /** Discover agent.fafa / .fafa (cwd, then one parent). */
105
+ export declare function findFafaFile(dir?: string): string | null;
106
+ export declare function a2aEndpoints(fafa: FafaDoc): FafaEndpoint[];
107
+ /** Authored A2A endpoints, else a single `doorUrl`. Never invents a door. */
108
+ export declare function a2aDoors(fafa: FafaDoc, opts?: ProjectCardsOptions): FafaEndpoint[];
109
+ export declare function generateA2ACard(fafa: FafaDoc, faf: FafData, opts?: ProjectCardsOptions): ProjectedA2A;
110
+ export declare function catalogEntriesFor(fafa: FafaDoc, faf: FafData, opts?: ProjectCardsOptions): CatalogEntry[];
111
+ /** Upsert projector entries into an existing catalog. Leaves unknown rows alone.
112
+ * On match, only url / type / updatedAt move — host copy (title, tags) stays. */
113
+ export declare function upsertCatalog(existing: AiCatalog | undefined, incoming: CatalogEntry[]): AiCatalog;
114
+ export declare function projectCards(input: {
115
+ faf: FafData;
116
+ fafa?: FafaDoc;
117
+ targets?: CardTarget[];
118
+ opts?: ProjectCardsOptions;
119
+ }): ProjectedCards;
120
+ /** Byte-identical context block on every emitted door. */
121
+ export declare function assertSameBlock(cards: ProjectedCards): void;
122
+ export declare function writeJson(path: string, value: unknown): void;
123
+ export declare function parseTargets(raw?: string): CardTarget[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "faf-cli",
3
- "version": "7.6.0",
3
+ "version": "7.8.0",
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",
@@ -69,10 +69,10 @@
69
69
  "url": "https://github.com/Wolfe-Jam/faf-cli/issues"
70
70
  },
71
71
  "dependencies": {
72
- "commander": "^14.0.1",
72
+ "commander": "^14.0.3",
73
73
  "faf-scoring-kernel": "^2.0.3",
74
74
  "open": "^11.0.0",
75
- "yaml": "^2.4.1"
75
+ "yaml": "^2.9.0"
76
76
  },
77
77
  "optionalDependencies": {
78
78
  "@anthropic-ai/sdk": "^0.91.1"
@@ -80,14 +80,19 @@
80
80
  "devDependencies": {
81
81
  "@faf/specification": "github:Wolfe-Jam/faf",
82
82
  "@types/bun": "^1.3.14",
83
- "@types/node": "^22.15.0",
84
- "@typescript-eslint/eslint-plugin": "^8.41.0",
85
- "@typescript-eslint/parser": "^8.41.0",
86
- "ajv": "^8.17.1",
87
- "eslint": "^9.39.2",
88
- "prettier": "^3.2.5",
89
- "typescript": "^5.3.3",
90
- "typescript-eslint": "^8.59.1"
83
+ "@types/node": "^22.20.1",
84
+ "@typescript-eslint/eslint-plugin": "^8.66.0",
85
+ "@typescript-eslint/parser": "^8.66.0",
86
+ "ajv": "^8.20.0",
87
+ "eslint": "^9.39.5",
88
+ "prettier": "^3.9.6",
89
+ "typescript": "^5.9.3",
90
+ "typescript-eslint": "^8.66.0"
91
+ },
92
+ "overrides": {
93
+ "brace-expansion": "^1.1.18",
94
+ "fast-uri": "^3.1.5",
95
+ "picomatch": "^4.0.5"
91
96
  },
92
97
  "engines": {
93
98
  "node": ">=18.0.0"
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.6.0"
5
- goal: "CLI for IANA-registered `.faf` + `.fafm` — context DNA and portable agent memory. TypeScript, Bun-native since v6. package faf-cli v7.6.0 The Ruby Edition."
4
+ version: "7.8.0"
5
+ goal: "CLI for IANA-registered `.faf` + `.fafm` — context DNA and portable agent memory. TypeScript, Bun-native since v6. package faf-cli v7.8.0 The Projector 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.6.0
61
+ when: Production since September 2025; Bun-native since v6; current package 7.8.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