faf-cli 3.0.2 → 3.0.3
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 +30 -13
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +46 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/fam.d.ts +15 -0
- package/dist/commands/fam.d.ts.map +1 -0
- package/dist/commands/fam.js +247 -0
- package/dist/commands/fam.js.map +1 -0
- package/dist/family/detectors/n8n.d.ts +10 -0
- package/dist/family/detectors/n8n.d.ts.map +1 -0
- package/dist/family/detectors/n8n.js +95 -0
- package/dist/family/detectors/n8n.js.map +1 -0
- package/dist/family/detectors/next.d.ts +8 -0
- package/dist/family/detectors/next.d.ts.map +1 -0
- package/dist/family/detectors/next.js +86 -0
- package/dist/family/detectors/next.js.map +1 -0
- package/dist/family/detectors/react.d.ts +8 -0
- package/dist/family/detectors/react.d.ts.map +1 -0
- package/dist/family/detectors/react.js +73 -0
- package/dist/family/detectors/react.js.map +1 -0
- package/dist/family/detectors/svelte.d.ts +8 -0
- package/dist/family/detectors/svelte.d.ts.map +1 -0
- package/dist/family/detectors/svelte.js +90 -0
- package/dist/family/detectors/svelte.js.map +1 -0
- package/dist/family/detectors/typescript.d.ts +8 -0
- package/dist/family/detectors/typescript.d.ts.map +1 -0
- package/dist/family/detectors/typescript.js +102 -0
- package/dist/family/detectors/typescript.js.map +1 -0
- package/dist/family/detectors/vite.d.ts +8 -0
- package/dist/family/detectors/vite.d.ts.map +1 -0
- package/dist/family/detectors/vite.js +89 -0
- package/dist/family/detectors/vite.js.map +1 -0
- package/dist/family/index.d.ts +21 -0
- package/dist/family/index.d.ts.map +1 -0
- package/dist/family/index.js +73 -0
- package/dist/family/index.js.map +1 -0
- package/dist/family/registry.d.ts +57 -0
- package/dist/family/registry.d.ts.map +1 -0
- package/dist/family/registry.js +154 -0
- package/dist/family/registry.js.map +1 -0
- package/dist/family/types.d.ts +94 -0
- package/dist/family/types.d.ts.map +1 -0
- package/dist/family/types.js +8 -0
- package/dist/family/types.js.map +1 -0
- package/package.json +20 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FAF Integration System
|
|
3
|
+
*
|
|
4
|
+
* Championship-grade integration detection and context generation
|
|
5
|
+
*
|
|
6
|
+
* Phase 1: Core integrations (React, Next, Svelte, TypeScript, Vite, n8n)
|
|
7
|
+
* Minimum quality: 85% (Bronze tier)
|
|
8
|
+
*/
|
|
9
|
+
export type { FafFile, IntegrationDetector, IntegrationRegistry } from './types.js';
|
|
10
|
+
export { FafIntegrationRegistry, integrationRegistry } from './registry.js';
|
|
11
|
+
export { reactDetector } from './detectors/react.js';
|
|
12
|
+
export { nextDetector } from './detectors/next.js';
|
|
13
|
+
export { svelteDetector } from './detectors/svelte.js';
|
|
14
|
+
export { typescriptDetector } from './detectors/typescript.js';
|
|
15
|
+
export { viteDetector } from './detectors/vite.js';
|
|
16
|
+
export { n8nDetector } from './detectors/n8n.js';
|
|
17
|
+
export declare function detectAndGenerate(projectPath: string): Promise<{
|
|
18
|
+
detected: import("./types.js").IntegrationDetector[];
|
|
19
|
+
context: Partial<import("./types.js").FafFile>;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/family/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,YAAY,EAAE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGpF,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAG5E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM;;;GAS1D"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* FAF Integration System
|
|
4
|
+
*
|
|
5
|
+
* Championship-grade integration detection and context generation
|
|
6
|
+
*
|
|
7
|
+
* Phase 1: Core integrations (React, Next, Svelte, TypeScript, Vite, n8n)
|
|
8
|
+
* Minimum quality: 85% (Bronze tier)
|
|
9
|
+
*/
|
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
27
|
+
var ownKeys = function(o) {
|
|
28
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
29
|
+
var ar = [];
|
|
30
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
31
|
+
return ar;
|
|
32
|
+
};
|
|
33
|
+
return ownKeys(o);
|
|
34
|
+
};
|
|
35
|
+
return function (mod) {
|
|
36
|
+
if (mod && mod.__esModule) return mod;
|
|
37
|
+
var result = {};
|
|
38
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
39
|
+
__setModuleDefault(result, mod);
|
|
40
|
+
return result;
|
|
41
|
+
};
|
|
42
|
+
})();
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.n8nDetector = exports.viteDetector = exports.typescriptDetector = exports.svelteDetector = exports.nextDetector = exports.reactDetector = exports.integrationRegistry = exports.FafIntegrationRegistry = void 0;
|
|
45
|
+
exports.detectAndGenerate = detectAndGenerate;
|
|
46
|
+
// Export registry (primary interface)
|
|
47
|
+
var registry_js_1 = require("./registry.js");
|
|
48
|
+
Object.defineProperty(exports, "FafIntegrationRegistry", { enumerable: true, get: function () { return registry_js_1.FafIntegrationRegistry; } });
|
|
49
|
+
Object.defineProperty(exports, "integrationRegistry", { enumerable: true, get: function () { return registry_js_1.integrationRegistry; } });
|
|
50
|
+
// Export individual detectors (for direct use)
|
|
51
|
+
var react_js_1 = require("./detectors/react.js");
|
|
52
|
+
Object.defineProperty(exports, "reactDetector", { enumerable: true, get: function () { return react_js_1.reactDetector; } });
|
|
53
|
+
var next_js_1 = require("./detectors/next.js");
|
|
54
|
+
Object.defineProperty(exports, "nextDetector", { enumerable: true, get: function () { return next_js_1.nextDetector; } });
|
|
55
|
+
var svelte_js_1 = require("./detectors/svelte.js");
|
|
56
|
+
Object.defineProperty(exports, "svelteDetector", { enumerable: true, get: function () { return svelte_js_1.svelteDetector; } });
|
|
57
|
+
var typescript_js_1 = require("./detectors/typescript.js");
|
|
58
|
+
Object.defineProperty(exports, "typescriptDetector", { enumerable: true, get: function () { return typescript_js_1.typescriptDetector; } });
|
|
59
|
+
var vite_js_1 = require("./detectors/vite.js");
|
|
60
|
+
Object.defineProperty(exports, "viteDetector", { enumerable: true, get: function () { return vite_js_1.viteDetector; } });
|
|
61
|
+
var n8n_js_1 = require("./detectors/n8n.js");
|
|
62
|
+
Object.defineProperty(exports, "n8nDetector", { enumerable: true, get: function () { return n8n_js_1.n8nDetector; } });
|
|
63
|
+
// Convenience function: Detect and generate context in one call
|
|
64
|
+
async function detectAndGenerate(projectPath) {
|
|
65
|
+
const { integrationRegistry } = await Promise.resolve().then(() => __importStar(require('./registry.js')));
|
|
66
|
+
const detected = await integrationRegistry.detectAll(projectPath);
|
|
67
|
+
const context = await integrationRegistry.generateContext(projectPath);
|
|
68
|
+
return {
|
|
69
|
+
detected,
|
|
70
|
+
context,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/family/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBH,8CASC;AArBD,sCAAsC;AACtC,6CAA4E;AAAnE,qHAAA,sBAAsB,OAAA;AAAE,kHAAA,mBAAmB,OAAA;AAEpD,+CAA+C;AAC/C,iDAAqD;AAA5C,yGAAA,aAAa,OAAA;AACtB,+CAAmD;AAA1C,uGAAA,YAAY,OAAA;AACrB,mDAAuD;AAA9C,2GAAA,cAAc,OAAA;AACvB,2DAA+D;AAAtD,mHAAA,kBAAkB,OAAA;AAC3B,+CAAmD;AAA1C,uGAAA,YAAY,OAAA;AACrB,6CAAiD;AAAxC,qGAAA,WAAW,OAAA;AAEpB,gEAAgE;AACzD,KAAK,UAAU,iBAAiB,CAAC,WAAmB;IACzD,MAAM,EAAE,mBAAmB,EAAE,GAAG,wDAAa,eAAe,GAAC,CAAC;IAC9D,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAClE,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;IAEvE,OAAO;QACL,QAAQ;QACR,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FAF Integration Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for all approved FAF integrations
|
|
5
|
+
* Orchestrates detection and context generation
|
|
6
|
+
*/
|
|
7
|
+
import { IntegrationDetector, IntegrationRegistry, FafFile } from './types.js';
|
|
8
|
+
import { reactDetector } from './detectors/react.js';
|
|
9
|
+
import { nextDetector } from './detectors/next.js';
|
|
10
|
+
import { svelteDetector } from './detectors/svelte.js';
|
|
11
|
+
import { typescriptDetector } from './detectors/typescript.js';
|
|
12
|
+
import { viteDetector } from './detectors/vite.js';
|
|
13
|
+
import { n8nDetector } from './detectors/n8n.js';
|
|
14
|
+
/**
|
|
15
|
+
* FAF Integration Registry
|
|
16
|
+
*
|
|
17
|
+
* Championship standard: Only integrations with 85+ quality score
|
|
18
|
+
*/
|
|
19
|
+
export declare class FafIntegrationRegistry implements IntegrationRegistry {
|
|
20
|
+
integrations: Map<string, IntegrationDetector>;
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Register a new integration
|
|
24
|
+
*/
|
|
25
|
+
register(detector: IntegrationDetector): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get integration by name
|
|
28
|
+
*/
|
|
29
|
+
get(name: string): IntegrationDetector | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Detect all integrations present in a project
|
|
32
|
+
*/
|
|
33
|
+
detectAll(projectPath: string): Promise<IntegrationDetector[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Generate combined .faf context from all detected integrations
|
|
36
|
+
*/
|
|
37
|
+
generateContext(projectPath: string): Promise<Partial<FafFile>>;
|
|
38
|
+
/**
|
|
39
|
+
* Generate human-readable summary of detected integrations
|
|
40
|
+
*/
|
|
41
|
+
private generateSummary;
|
|
42
|
+
/**
|
|
43
|
+
* Get all integration names
|
|
44
|
+
*/
|
|
45
|
+
list(): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Get integration statistics
|
|
48
|
+
*/
|
|
49
|
+
getStats(): {
|
|
50
|
+
total: number;
|
|
51
|
+
byTier: Record<string, number>;
|
|
52
|
+
totalWeeklyAdoption: number;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export declare const integrationRegistry: FafIntegrationRegistry;
|
|
56
|
+
export { reactDetector, nextDetector, svelteDetector, typescriptDetector, viteDetector, n8nDetector };
|
|
57
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/family/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,sBAAuB,YAAW,mBAAmB;IAChE,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;;IAc/C;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI;IAI7C;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAIlD;;OAEG;IACG,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAiBpE;;OAEG;IACG,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAmDrE;;OAEG;IACH,OAAO,CAAC,eAAe;IAavB;;OAEG;IACH,IAAI,IAAI,MAAM,EAAE;IAIhB;;OAEG;IACH,QAAQ,IAAI;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/B,mBAAmB,EAAE,MAAM,CAAC;KAC7B;CAiBF;AAGD,eAAO,MAAM,mBAAmB,wBAA+B,CAAC;AAGhE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* FAF Integration Registry
|
|
4
|
+
*
|
|
5
|
+
* Central registry for all approved FAF integrations
|
|
6
|
+
* Orchestrates detection and context generation
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.n8nDetector = exports.viteDetector = exports.typescriptDetector = exports.svelteDetector = exports.nextDetector = exports.reactDetector = exports.integrationRegistry = exports.FafIntegrationRegistry = void 0;
|
|
10
|
+
const react_js_1 = require("./detectors/react.js");
|
|
11
|
+
Object.defineProperty(exports, "reactDetector", { enumerable: true, get: function () { return react_js_1.reactDetector; } });
|
|
12
|
+
const next_js_1 = require("./detectors/next.js");
|
|
13
|
+
Object.defineProperty(exports, "nextDetector", { enumerable: true, get: function () { return next_js_1.nextDetector; } });
|
|
14
|
+
const svelte_js_1 = require("./detectors/svelte.js");
|
|
15
|
+
Object.defineProperty(exports, "svelteDetector", { enumerable: true, get: function () { return svelte_js_1.svelteDetector; } });
|
|
16
|
+
const typescript_js_1 = require("./detectors/typescript.js");
|
|
17
|
+
Object.defineProperty(exports, "typescriptDetector", { enumerable: true, get: function () { return typescript_js_1.typescriptDetector; } });
|
|
18
|
+
const vite_js_1 = require("./detectors/vite.js");
|
|
19
|
+
Object.defineProperty(exports, "viteDetector", { enumerable: true, get: function () { return vite_js_1.viteDetector; } });
|
|
20
|
+
const n8n_js_1 = require("./detectors/n8n.js");
|
|
21
|
+
Object.defineProperty(exports, "n8nDetector", { enumerable: true, get: function () { return n8n_js_1.n8nDetector; } });
|
|
22
|
+
/**
|
|
23
|
+
* FAF Integration Registry
|
|
24
|
+
*
|
|
25
|
+
* Championship standard: Only integrations with 85+ quality score
|
|
26
|
+
*/
|
|
27
|
+
class FafIntegrationRegistry {
|
|
28
|
+
integrations;
|
|
29
|
+
constructor() {
|
|
30
|
+
this.integrations = new Map();
|
|
31
|
+
// Phase 1: Core integrations (85+ quality score)
|
|
32
|
+
this.register(react_js_1.reactDetector);
|
|
33
|
+
this.register(next_js_1.nextDetector);
|
|
34
|
+
this.register(svelte_js_1.svelteDetector);
|
|
35
|
+
this.register(typescript_js_1.typescriptDetector);
|
|
36
|
+
this.register(vite_js_1.viteDetector);
|
|
37
|
+
this.register(n8n_js_1.n8nDetector);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Register a new integration
|
|
41
|
+
*/
|
|
42
|
+
register(detector) {
|
|
43
|
+
this.integrations.set(detector.name, detector);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get integration by name
|
|
47
|
+
*/
|
|
48
|
+
get(name) {
|
|
49
|
+
return this.integrations.get(name);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Detect all integrations present in a project
|
|
53
|
+
*/
|
|
54
|
+
async detectAll(projectPath) {
|
|
55
|
+
const detected = [];
|
|
56
|
+
for (const detector of this.integrations.values()) {
|
|
57
|
+
try {
|
|
58
|
+
const isPresent = await detector.detect(projectPath);
|
|
59
|
+
if (isPresent) {
|
|
60
|
+
detected.push(detector);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.error(`Error detecting ${detector.name}:`, error);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return detected;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Generate combined .faf context from all detected integrations
|
|
71
|
+
*/
|
|
72
|
+
async generateContext(projectPath) {
|
|
73
|
+
const detected = await this.detectAll(projectPath);
|
|
74
|
+
// Merge contexts from all detected integrations
|
|
75
|
+
let combinedContext = {
|
|
76
|
+
stack: {},
|
|
77
|
+
project: {},
|
|
78
|
+
integration: {
|
|
79
|
+
detected_frameworks: [],
|
|
80
|
+
mcp_servers: [],
|
|
81
|
+
recommended_tools: [],
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
for (const detector of detected) {
|
|
85
|
+
try {
|
|
86
|
+
const context = await detector.generateContext(projectPath);
|
|
87
|
+
// Merge stack information
|
|
88
|
+
if (context.stack) {
|
|
89
|
+
combinedContext.stack = {
|
|
90
|
+
...combinedContext.stack,
|
|
91
|
+
...context.stack,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
// Merge project information
|
|
95
|
+
if (context.project) {
|
|
96
|
+
combinedContext.project = {
|
|
97
|
+
...combinedContext.project,
|
|
98
|
+
...context.project,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
// Accumulate integration information
|
|
102
|
+
if (context.integration) {
|
|
103
|
+
combinedContext.integration.detected_frameworks.push(detector.name);
|
|
104
|
+
combinedContext.integration.mcp_servers.push(...(context.integration.mcp_servers || []));
|
|
105
|
+
combinedContext.integration.recommended_tools.push(...(context.integration.recommended_tools || []));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
console.error(`Error generating context for ${detector.name}:`, error);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
// Add integration summary
|
|
113
|
+
combinedContext.integration.summary = this.generateSummary(detected);
|
|
114
|
+
return combinedContext;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Generate human-readable summary of detected integrations
|
|
118
|
+
*/
|
|
119
|
+
generateSummary(detected) {
|
|
120
|
+
if (detected.length === 0) {
|
|
121
|
+
return 'No FAF integrations detected';
|
|
122
|
+
}
|
|
123
|
+
const tiers = detected.map((d) => `${d.displayName} (${d.tier})`);
|
|
124
|
+
const frameworks = detected.map((d) => d.displayName).join(', ');
|
|
125
|
+
return `Fully integrated with: ${frameworks} | ${detected.length} championship-grade integration${detected.length > 1 ? 's' : ''}`;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get all integration names
|
|
129
|
+
*/
|
|
130
|
+
list() {
|
|
131
|
+
return Array.from(this.integrations.keys());
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Get integration statistics
|
|
135
|
+
*/
|
|
136
|
+
getStats() {
|
|
137
|
+
const stats = {
|
|
138
|
+
total: this.integrations.size,
|
|
139
|
+
byTier: {},
|
|
140
|
+
totalWeeklyAdoption: 0,
|
|
141
|
+
};
|
|
142
|
+
for (const detector of this.integrations.values()) {
|
|
143
|
+
// Count by tier
|
|
144
|
+
stats.byTier[detector.tier] = (stats.byTier[detector.tier] || 0) + 1;
|
|
145
|
+
// Sum weekly adoption
|
|
146
|
+
stats.totalWeeklyAdoption += detector.weeklyAdoption;
|
|
147
|
+
}
|
|
148
|
+
return stats;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.FafIntegrationRegistry = FafIntegrationRegistry;
|
|
152
|
+
// Export singleton instance
|
|
153
|
+
exports.integrationRegistry = new FafIntegrationRegistry();
|
|
154
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/family/registry.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,mDAAqD;AAwK5C,8FAxKA,wBAAa,OAwKA;AAvKtB,iDAAmD;AAuK3B,6FAvKf,sBAAY,OA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ACH,QAAQ;QAKN,MAAM,KAAK,GAAG;YACZ,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI;YAC7B,MAAM,EAAE,EAA4B;YACpC,mBAAmB,EAAE,CAAC;SACvB,CAAC;QAEF,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC;YAClD,gBAAgB;YAChB,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YAErE,sBAAsB;YACtB,KAAK,CAAC,mBAAmB,IAAI,QAAQ,CAAC,cAAc,CAAC;QACvD,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAtJD,wDAsJC;AAED,4BAA4B;AACf,QAAA,mBAAmB,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FAF Integration System - Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Defines the integration quality model for smart stack detection
|
|
5
|
+
*/
|
|
6
|
+
export interface FafFile {
|
|
7
|
+
project?: {
|
|
8
|
+
name?: string;
|
|
9
|
+
goal?: string;
|
|
10
|
+
main_language?: string;
|
|
11
|
+
architecture?: string;
|
|
12
|
+
typescript_config?: {
|
|
13
|
+
strict?: boolean;
|
|
14
|
+
target?: string;
|
|
15
|
+
module_resolution?: string;
|
|
16
|
+
};
|
|
17
|
+
build_config?: {
|
|
18
|
+
tool?: string;
|
|
19
|
+
plugins?: string[];
|
|
20
|
+
hmr?: string;
|
|
21
|
+
optimization?: string;
|
|
22
|
+
};
|
|
23
|
+
automation?: {
|
|
24
|
+
platform?: string;
|
|
25
|
+
custom_nodes?: number;
|
|
26
|
+
node_packages?: string[];
|
|
27
|
+
has_config?: boolean;
|
|
28
|
+
};
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
};
|
|
31
|
+
stack?: {
|
|
32
|
+
frontend?: string;
|
|
33
|
+
backend?: string;
|
|
34
|
+
runtime?: string;
|
|
35
|
+
build?: string;
|
|
36
|
+
package_manager?: string;
|
|
37
|
+
api_type?: string;
|
|
38
|
+
main_language?: string;
|
|
39
|
+
ui_library?: string;
|
|
40
|
+
state_management?: string;
|
|
41
|
+
hosting?: string;
|
|
42
|
+
type_system?: string;
|
|
43
|
+
automation_platform?: string;
|
|
44
|
+
workflow_engine?: string;
|
|
45
|
+
integration_layer?: string;
|
|
46
|
+
api_orchestration?: string;
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
};
|
|
49
|
+
integration?: {
|
|
50
|
+
framework?: string;
|
|
51
|
+
detected_frameworks?: string[];
|
|
52
|
+
mcp_servers?: string[];
|
|
53
|
+
recommended_tools?: string[];
|
|
54
|
+
summary?: string;
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
};
|
|
57
|
+
scores?: {
|
|
58
|
+
foundation?: number;
|
|
59
|
+
architecture?: number;
|
|
60
|
+
deployment?: number;
|
|
61
|
+
};
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
}
|
|
64
|
+
export interface IntegrationDetector {
|
|
65
|
+
/** Integration name (e.g., 'react', 'next', 'svelte') */
|
|
66
|
+
name: string;
|
|
67
|
+
/** Display name for user messaging */
|
|
68
|
+
displayName: string;
|
|
69
|
+
/** Quality tier (based on evaluation) */
|
|
70
|
+
tier: 'trophy' | 'gold' | 'silver' | 'bronze';
|
|
71
|
+
/** Quality score (0-100) */
|
|
72
|
+
qualityScore: number;
|
|
73
|
+
/** Weekly adoption (npm downloads) */
|
|
74
|
+
weeklyAdoption: number;
|
|
75
|
+
/** Available MCP servers for this integration */
|
|
76
|
+
mcpServers: string[];
|
|
77
|
+
/** Detect if this integration is used in a project */
|
|
78
|
+
detect: (projectPath: string) => boolean | Promise<boolean>;
|
|
79
|
+
/** Generate .faf context from detected integration */
|
|
80
|
+
generateContext: (projectPath: string) => Partial<FafFile> | Promise<Partial<FafFile>>;
|
|
81
|
+
/** Context slots filled by this integration */
|
|
82
|
+
contextContribution: string[];
|
|
83
|
+
}
|
|
84
|
+
export interface IntegrationRegistry {
|
|
85
|
+
/** All approved integrations */
|
|
86
|
+
integrations: Map<string, IntegrationDetector>;
|
|
87
|
+
/** Get integration by name */
|
|
88
|
+
get(name: string): IntegrationDetector | undefined;
|
|
89
|
+
/** Detect all integrations in a project */
|
|
90
|
+
detectAll(projectPath: string): Promise<IntegrationDetector[]>;
|
|
91
|
+
/** Generate combined .faf context from all detected integrations */
|
|
92
|
+
generateContext(projectPath: string): Promise<Partial<FafFile>>;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/family/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,iBAAiB,CAAC,EAAE;YAClB,MAAM,CAAC,EAAE,OAAO,CAAC;YACjB,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;SAC5B,CAAC;QACF,YAAY,CAAC,EAAE;YACb,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;YACnB,GAAG,CAAC,EAAE,MAAM,CAAC;YACb,YAAY,CAAC,EAAE,MAAM,CAAC;SACvB,CAAC;QACF,UAAU,CAAC,EAAE;YACX,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,EAAE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
2
|
"name": "faf-cli",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "😽 TURBO-CAT: The Rapid Catalytic Converter • Project DNA ✨ for ANY AI •
|
|
3
|
+
"version": "3.0.3",
|
|
4
|
+
"description": "😽 TURBO-CAT: The Rapid Catalytic Converter • Project DNA ✨ for ANY AI • Fully Integrated with React, Next.js, Svelte, TypeScript, Vite & n8n • FREE FOREVER • 10,000+ developers • Championship Edition",
|
|
5
5
|
"icon": "https://faf.one/orange-smiley.svg",
|
|
6
6
|
"logo": "https://faf.one/orange-smiley.svg",
|
|
7
7
|
"banner": "https://raw.githubusercontent.com/Wolfe-Jam/faf/main/cli/faf-banner.png",
|
|
@@ -81,7 +81,24 @@
|
|
|
81
81
|
"cursor",
|
|
82
82
|
"ai-tools",
|
|
83
83
|
"developer-productivity",
|
|
84
|
-
"anti-faff"
|
|
84
|
+
"anti-faff",
|
|
85
|
+
"react",
|
|
86
|
+
"nextjs",
|
|
87
|
+
"next",
|
|
88
|
+
"svelte",
|
|
89
|
+
"sveltekit",
|
|
90
|
+
"typescript",
|
|
91
|
+
"vite",
|
|
92
|
+
"n8n",
|
|
93
|
+
"workflow-automation",
|
|
94
|
+
"stack-detection",
|
|
95
|
+
"framework-detection",
|
|
96
|
+
"react-tools",
|
|
97
|
+
"typescript-tools",
|
|
98
|
+
"integration-system",
|
|
99
|
+
"mcp",
|
|
100
|
+
"model-context-protocol",
|
|
101
|
+
"mcp-server"
|
|
85
102
|
],
|
|
86
103
|
"author": "🏎️⚡️_wolfejam.dev",
|
|
87
104
|
"license": "MIT",
|