faf-cli 3.0.5 ā 3.0.6
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 -9
- package/dist/big-orange/bigo-push.d.ts +18 -0
- package/dist/big-orange/bigo-push.d.ts.map +1 -0
- package/dist/big-orange/bigo-push.js +88 -0
- package/dist/big-orange/bigo-push.js.map +1 -0
- package/dist/big-orange/compare.d.ts +11 -0
- package/dist/big-orange/compare.d.ts.map +1 -0
- package/dist/big-orange/compare.js +174 -0
- package/dist/big-orange/compare.js.map +1 -0
- package/dist/big-orange/faf-generator.d.ts +22 -0
- package/dist/big-orange/faf-generator.d.ts.map +1 -0
- package/dist/big-orange/faf-generator.js +215 -0
- package/dist/big-orange/faf-generator.js.map +1 -0
- package/dist/big-orange/index.d.ts +7 -0
- package/dist/big-orange/index.d.ts.map +1 -0
- package/dist/big-orange/index.js +96 -0
- package/dist/big-orange/index.js.map +1 -0
- package/dist/big-orange/types.d.ts +62 -0
- package/dist/big-orange/types.d.ts.map +1 -0
- package/dist/big-orange/types.js +7 -0
- package/dist/big-orange/types.js.map +1 -0
- package/dist/cli.js +0 -0
- package/package.json +4 -1
- package/dist/commands/create.d.ts +0 -13
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -78
- package/dist/commands/create.js.map +0 -1
- package/dist/core/platform-adapters.d.ts +0 -76
- package/dist/core/platform-adapters.d.ts.map +0 -1
- package/dist/core/platform-adapters.js +0 -407
- package/dist/core/platform-adapters.js.map +0 -1
- package/dist/core/universal-intelligence-generator.d.ts +0 -156
- package/dist/core/universal-intelligence-generator.d.ts.map +0 -1
- package/dist/core/universal-intelligence-generator.js +0 -352
- package/dist/core/universal-intelligence-generator.js.map +0 -1
- package/dist/enrichment/auto-corrector.d.ts +0 -28
- package/dist/enrichment/auto-corrector.d.ts.map +0 -1
- package/dist/enrichment/auto-corrector.js +0 -106
- package/dist/enrichment/auto-corrector.js.map +0 -1
- package/dist/enrichment/n8n-analyzer.d.ts +0 -259
- package/dist/enrichment/n8n-analyzer.d.ts.map +0 -1
- package/dist/enrichment/n8n-analyzer.js +0 -346
- package/dist/enrichment/n8n-analyzer.js.map +0 -1
- package/dist/enrichment/n8n-faf-generator.d.ts +0 -68
- package/dist/enrichment/n8n-faf-generator.d.ts.map +0 -1
- package/dist/enrichment/n8n-faf-generator.js +0 -354
- package/dist/enrichment/n8n-faf-generator.js.map +0 -1
- package/dist/enrichment/question-asker.d.ts +0 -22
- package/dist/enrichment/question-asker.d.ts.map +0 -1
- package/dist/enrichment/question-asker.js +0 -113
- package/dist/enrichment/question-asker.js.map +0 -1
- package/dist/enrichment/slot-filler.d.ts +0 -73
- package/dist/enrichment/slot-filler.d.ts.map +0 -1
- package/dist/enrichment/slot-filler.js +0 -253
- package/dist/enrichment/slot-filler.js.map +0 -1
- package/dist/scoring/championship-scorer.d.ts +0 -114
- package/dist/scoring/championship-scorer.d.ts.map +0 -1
- package/dist/scoring/championship-scorer.js +0 -380
- package/dist/scoring/championship-scorer.js.map +0 -1
- package/dist/scoring/score-calculator.d.ts +0 -29
- package/dist/scoring/score-calculator.d.ts.map +0 -1
- package/dist/scoring/score-calculator.js +0 -520
- package/dist/scoring/score-calculator.js.map +0 -1
- package/dist/tests/manual-validation.d.ts +0 -8
- package/dist/tests/manual-validation.d.ts.map +0 -1
- package/dist/tests/manual-validation.js +0 -114
- package/dist/tests/manual-validation.js.map +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* BIG ORANGE š - CLI Command
|
|
5
|
+
* Compare AI responses at different .faf scores
|
|
6
|
+
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
const commander_1 = require("commander");
|
|
12
|
+
const compare_1 = require("./compare");
|
|
13
|
+
const bigo_push_1 = require("./bigo-push");
|
|
14
|
+
const faf_generator_1 = require("./faf-generator");
|
|
15
|
+
const open_1 = __importDefault(require("open"));
|
|
16
|
+
const program = new commander_1.Command();
|
|
17
|
+
program
|
|
18
|
+
.name('big-orange')
|
|
19
|
+
.description('š Compare AI responses at different .faf context levels')
|
|
20
|
+
.version('1.0.0');
|
|
21
|
+
program
|
|
22
|
+
.command('compare')
|
|
23
|
+
.description('Run side-by-side comparison')
|
|
24
|
+
.argument('[project-path]', 'Path to project to analyze', process.cwd())
|
|
25
|
+
.option('-l, --left <score>', 'Left window .faf score (0-100)', '0')
|
|
26
|
+
.option('-r, --right <score>', 'Right window .faf score (0-100)', '99')
|
|
27
|
+
.option('-p, --prompt <text>', 'Instruction to give both AI instances', 'Build me a color picker component')
|
|
28
|
+
.option('--no-visualize', 'Skip opening browser to view results')
|
|
29
|
+
.action(async (projectPath, options) => {
|
|
30
|
+
console.log('\nš BIG ORANGE - Context Matters\n');
|
|
31
|
+
console.log('ā'.repeat(60));
|
|
32
|
+
try {
|
|
33
|
+
// Parse scores
|
|
34
|
+
const leftScore = parseInt(options.left);
|
|
35
|
+
const rightScore = parseInt(options.right);
|
|
36
|
+
// Validate
|
|
37
|
+
if (isNaN(leftScore) || leftScore < 0 || leftScore > 100) {
|
|
38
|
+
throw new Error('Left score must be 0-100');
|
|
39
|
+
}
|
|
40
|
+
if (isNaN(rightScore) || rightScore < 0 || rightScore > 100) {
|
|
41
|
+
throw new Error('Right score must be 0-100');
|
|
42
|
+
}
|
|
43
|
+
// Analyze project (if path provided)
|
|
44
|
+
if (projectPath && projectPath !== process.cwd()) {
|
|
45
|
+
console.log(`\nAnalyzing project: ${projectPath}`);
|
|
46
|
+
const birthScore = await (0, faf_generator_1.calculateBirthScore)(projectPath);
|
|
47
|
+
console.log(`Birth score: ${birthScore}%`);
|
|
48
|
+
}
|
|
49
|
+
console.log('\n');
|
|
50
|
+
// Run comparison
|
|
51
|
+
const results = await (0, compare_1.compareContexts)({
|
|
52
|
+
projectPath,
|
|
53
|
+
leftScore,
|
|
54
|
+
rightScore,
|
|
55
|
+
prompt: options.prompt
|
|
56
|
+
});
|
|
57
|
+
// Push to Bigš
|
|
58
|
+
console.log('Pushing to Bigš...');
|
|
59
|
+
const url = await (0, bigo_push_1.pushToBigO)(results);
|
|
60
|
+
// Display results
|
|
61
|
+
console.log('\nā'.repeat(60));
|
|
62
|
+
console.log('\nā
COMPARISON COMPLETE\n');
|
|
63
|
+
console.log(`Session ID: ${results.sessionId}`);
|
|
64
|
+
console.log(`\nResults:`);
|
|
65
|
+
console.log(` Left (${leftScore}%): ${results.leftWindow.emoji} ${results.leftWindow.timeToComplete.toFixed(1)}s`);
|
|
66
|
+
console.log(` Right (${rightScore}%): ${results.rightWindow.emoji} ${results.rightWindow.timeToComplete.toFixed(1)}s`);
|
|
67
|
+
console.log(`\nDelta: ${results.delta.verdict}`);
|
|
68
|
+
console.log(`\nView at: ${url}\n`);
|
|
69
|
+
// Open browser
|
|
70
|
+
if (options.visualize) {
|
|
71
|
+
console.log('Opening Bigš in browser...\n');
|
|
72
|
+
await (0, open_1.default)(url);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
console.error('\nā Error:', error instanceof Error ? error.message : error);
|
|
77
|
+
process.exit(1);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
program
|
|
81
|
+
.command('demo')
|
|
82
|
+
.description('Run demo comparison with default settings')
|
|
83
|
+
.action(async () => {
|
|
84
|
+
console.log('\nš Running Big Orange Demo\n');
|
|
85
|
+
const results = await (0, compare_1.compareContexts)({
|
|
86
|
+
leftScore: 0,
|
|
87
|
+
rightScore: 99,
|
|
88
|
+
prompt: 'Build me a color picker component'
|
|
89
|
+
});
|
|
90
|
+
const url = await (0, bigo_push_1.pushToBigO)(results);
|
|
91
|
+
console.log(`\nā
Demo complete!\n`);
|
|
92
|
+
console.log(`View at: ${url}\n`);
|
|
93
|
+
await (0, open_1.default)(url);
|
|
94
|
+
});
|
|
95
|
+
program.parse();
|
|
96
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/big-orange/index.ts"],"names":[],"mappings":";;AACA;;;GAGG;;;;;AAEH,yCAAoC;AACpC,uCAA4C;AAC5C,2CAAyC;AACzC,mDAAsD;AACtD,gDAAwB;AAExB,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,WAAW,CAAC,0DAA0D,CAAC;KACvE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,6BAA6B,CAAC;KAC1C,QAAQ,CAAC,gBAAgB,EAAE,4BAA4B,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;KACvE,MAAM,CAAC,oBAAoB,EAAE,gCAAgC,EAAE,GAAG,CAAC;KACnE,MAAM,CAAC,qBAAqB,EAAE,iCAAiC,EAAE,IAAI,CAAC;KACtE,MAAM,CAAC,qBAAqB,EAAE,uCAAuC,EAAE,mCAAmC,CAAC;KAC3G,MAAM,CAAC,gBAAgB,EAAE,sCAAsC,CAAC;KAChE,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE;IAErC,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IACnD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAE5B,IAAI,CAAC;QACH,eAAe;QACf,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAE3C,WAAW;QACX,IAA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IAEtC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAEjC,MAAM,IAAA,cAAI,EAAC,GAAG,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BIG ORANGE š - Core Types
|
|
3
|
+
* Domain model for .faf context comparison
|
|
4
|
+
*/
|
|
5
|
+
export interface ProjectAnalysis {
|
|
6
|
+
path: string;
|
|
7
|
+
birthScore: number;
|
|
8
|
+
championshipScore: number;
|
|
9
|
+
gaps: Gap[];
|
|
10
|
+
timestamp: Date;
|
|
11
|
+
}
|
|
12
|
+
export interface Gap {
|
|
13
|
+
category: string;
|
|
14
|
+
severity: 'critical' | 'major' | 'minor';
|
|
15
|
+
description: string;
|
|
16
|
+
impact: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ComparisonRequest {
|
|
19
|
+
projectPath?: string;
|
|
20
|
+
leftScore: number;
|
|
21
|
+
rightScore: number;
|
|
22
|
+
prompt: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ComparisonResults {
|
|
25
|
+
sessionId: string;
|
|
26
|
+
timestamp: Date;
|
|
27
|
+
projectAnalysis?: ProjectAnalysis;
|
|
28
|
+
leftWindow: WindowResults;
|
|
29
|
+
rightWindow: WindowResults;
|
|
30
|
+
delta: DeltaMetrics;
|
|
31
|
+
}
|
|
32
|
+
export interface WindowResults {
|
|
33
|
+
fafScore: number;
|
|
34
|
+
aiResponse: string;
|
|
35
|
+
timeToComplete: number;
|
|
36
|
+
emoji: string;
|
|
37
|
+
fafMetadata?: {
|
|
38
|
+
filled: number;
|
|
39
|
+
total: number;
|
|
40
|
+
checksum: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface DeltaMetrics {
|
|
44
|
+
timeSaved: number;
|
|
45
|
+
scoreImprovement: number;
|
|
46
|
+
verdict: string;
|
|
47
|
+
}
|
|
48
|
+
export interface FafInstance {
|
|
49
|
+
score: number;
|
|
50
|
+
content: string;
|
|
51
|
+
metadata: {
|
|
52
|
+
framework?: string;
|
|
53
|
+
language?: string;
|
|
54
|
+
styling?: string;
|
|
55
|
+
patterns?: string[];
|
|
56
|
+
conventions?: string[];
|
|
57
|
+
quality_bar?: string;
|
|
58
|
+
slots_filled?: number;
|
|
59
|
+
total_slots?: number;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/big-orange/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,EAAE,aAAa,CAAC;IAC1B,WAAW,EAAE,aAAa,CAAC;IAC3B,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/big-orange/types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "faf-cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "Anthropic-Approved codebase that powers claude-faf-mcp ⢠Persistent project context, on-demand ⢠Format-driven CLI ⢠Open Source Universal Standard ⢠MIT License",
|
|
5
5
|
"icon": "https://faf.one/orange-smiley.svg",
|
|
6
6
|
"logo": "https://faf.one/orange-smiley.svg",
|
|
@@ -111,7 +111,10 @@
|
|
|
111
111
|
"url": "https://github.com/Wolfe-Jam/faf-cli/issues"
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
|
+
"@anthropic-ai/sdk": "^0.67.0",
|
|
115
|
+
"commander": "^14.0.1",
|
|
114
116
|
"inquirer": "^12.9.4",
|
|
117
|
+
"open": "^10.2.0",
|
|
115
118
|
"yaml": "^2.4.1"
|
|
116
119
|
},
|
|
117
120
|
"devDependencies": {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* šļø faf create - Conversational .faf Creation
|
|
3
|
-
* Transform workflow files (n8n, etc.) into RICH .faf documentation
|
|
4
|
-
*/
|
|
5
|
-
export interface CreateOptions {
|
|
6
|
-
output?: string;
|
|
7
|
-
quiet?: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Main create command - detects file type and generates .faf
|
|
11
|
-
*/
|
|
12
|
-
export declare function createCommand(workflowFile: string, options?: CreateOptions): Promise<void>;
|
|
13
|
-
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,iBAiEpF"}
|
package/dist/commands/create.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* šļø faf create - Conversational .faf Creation
|
|
4
|
-
* Transform workflow files (n8n, etc.) into RICH .faf documentation
|
|
5
|
-
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.createCommand = createCommand;
|
|
11
|
-
const colors_1 = require("../fix-once/colors");
|
|
12
|
-
const fs_1 = require("fs");
|
|
13
|
-
const path_1 = __importDefault(require("path"));
|
|
14
|
-
const championship_style_1 = require("../utils/championship-style");
|
|
15
|
-
const n8n_faf_generator_1 = require("../enrichment/n8n-faf-generator");
|
|
16
|
-
const n8n_analyzer_1 = require("../enrichment/n8n-analyzer");
|
|
17
|
-
/**
|
|
18
|
-
* Main create command - detects file type and generates .faf
|
|
19
|
-
*/
|
|
20
|
-
async function createCommand(workflowFile, options = {}) {
|
|
21
|
-
const startTime = Date.now();
|
|
22
|
-
try {
|
|
23
|
-
// Resolve full path
|
|
24
|
-
const resolvedPath = path_1.default.resolve(workflowFile);
|
|
25
|
-
// Check if file exists
|
|
26
|
-
const fileExists = await fs_1.promises.stat(resolvedPath).then(() => true).catch(() => false);
|
|
27
|
-
if (!fileExists) {
|
|
28
|
-
console.log();
|
|
29
|
-
console.log(championship_style_1.FAF_COLORS.fafOrange(`ā ļø File not found: ${workflowFile}`));
|
|
30
|
-
console.log(championship_style_1.FAF_COLORS.fafWhite(' Please provide a valid workflow file path'));
|
|
31
|
-
console.log();
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
// Detect file type
|
|
35
|
-
const isN8nWorkflow = await n8n_analyzer_1.N8nWorkflowAnalyzer.detect(resolvedPath);
|
|
36
|
-
if (!isN8nWorkflow) {
|
|
37
|
-
console.log();
|
|
38
|
-
console.log(championship_style_1.FAF_COLORS.fafOrange(`ā ļø Unsupported file type`));
|
|
39
|
-
console.log(championship_style_1.FAF_COLORS.fafWhite(' Currently supported:'));
|
|
40
|
-
console.log(championship_style_1.FAF_COLORS.fafCyan(' ⢠n8n workflow JSON files'));
|
|
41
|
-
console.log();
|
|
42
|
-
console.log(championship_style_1.FAF_COLORS.fafWhite(' Coming soon: OpenAI GPT configs, Google OPAL, Make.com'));
|
|
43
|
-
console.log();
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
// Generate .faf for n8n workflow
|
|
47
|
-
if (!options.quiet) {
|
|
48
|
-
console.log();
|
|
49
|
-
console.log(championship_style_1.FAF_COLORS.fafCyan(`${championship_style_1.FAF_ICONS.rocket} Creating championship .faf from n8n workflow...`));
|
|
50
|
-
}
|
|
51
|
-
const generator = new n8n_faf_generator_1.N8nFafGenerator();
|
|
52
|
-
const outputPath = await generator.generate({
|
|
53
|
-
workflowFile: resolvedPath,
|
|
54
|
-
outputFile: options.output,
|
|
55
|
-
quiet: options.quiet
|
|
56
|
-
});
|
|
57
|
-
const elapsedTime = Date.now() - startTime;
|
|
58
|
-
if (!options.quiet) {
|
|
59
|
-
console.log(championship_style_1.FAF_COLORS.fafGreen(`${championship_style_1.FAF_ICONS.party} Success!`));
|
|
60
|
-
console.log();
|
|
61
|
-
console.log(championship_style_1.FAF_COLORS.fafWhite(`ā”ļø Created in ${elapsedTime}ms`));
|
|
62
|
-
console.log();
|
|
63
|
-
console.log(championship_style_1.FAF_COLORS.fafOrange(`${championship_style_1.FAF_ICONS.magic_wand} Next Steps:`));
|
|
64
|
-
console.log(championship_style_1.FAF_COLORS.fafCyan(' 1. faf score # See your championship score'));
|
|
65
|
-
console.log(championship_style_1.FAF_COLORS.fafCyan(' 2. faf bi-sync # Enable context mirroring'));
|
|
66
|
-
console.log(championship_style_1.FAF_COLORS.fafCyan(' 3. faf trust # Build AI confidence'));
|
|
67
|
-
console.log();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
console.log();
|
|
72
|
-
console.log(championship_style_1.FAF_COLORS.fafOrange(`ā ļø Creation failed:`));
|
|
73
|
-
console.log(colors_1.chalk.red(error instanceof Error ? error.message : String(error)));
|
|
74
|
-
console.log();
|
|
75
|
-
process.exit(1);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;AAiBH,sCAiEC;AAhFD,+CAA2C;AAC3C,2BAAoC;AACpC,gDAAwB;AACxB,oEAAoE;AACpE,uEAAkE;AAClE,6DAAiE;AAOjE;;GAEG;AACI,KAAK,UAAU,aAAa,CAAC,YAAoB,EAAE,UAAyB,EAAE;IACnF,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,oBAAoB;QACpB,MAAM,YAAY,GAAG,cAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAEhD,uBAAuB;QACvB,MAAM,UAAU,GAAG,MAAM,aAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QACnF,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,+BAAU,CAAC,SAAS,CAAC,sBAAsB,YAAY,EAAE,CAAC,CAAC,CAAC;YACxE,OAAO,CAAC,GAAG,CAAC,+BAAU,CAAC,QAAQ,CAAC,8CAA8C,CAAC,CAAC,CAAC;YACjF,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO;QACT,CAAC;QAED,mBAAmB;QACnB,MAAM,aAAa,GAAG,MAAM,kCAAmB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAErE,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,+BAAU,CAAC,SAAS,CAAC,0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AC,SAAS,CAAC,GAAG,8BAAS,CAAC,UAAU,cAAc,CAAC,CAAC,CAAC;YACzE,OAAO,CAAC,GAAG,CAAC,+BAAU,CAAC,OAAO,CAAC,uDAAuD,CAAC,CAAC,CAAC;YACzF,OAAO,CAAC,GAAG,CAAC,+BAAU,CAAC,OAAO,CAAC,oDAAoD,CAAC,CAAC,CAAC;YACtF,OAAO,CAAC,GAAG,CAAC,+BAAU,CAAC,OAAO,CAAC,+CAA+C,CAAC,CAAC,CAAC;YACjF,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;IAEH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,+BAAU,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,cAAK,CAAC,GAAG,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/E,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* š PLATFORM ADAPTERS
|
|
3
|
-
*
|
|
4
|
-
* Each platform (Opal, Make.com, etc.) is just an input adapter
|
|
5
|
-
* The pattern is ALWAYS the same: interrogation ā extraction ā filtering ā generation
|
|
6
|
-
* The output is ALWAYS .faf
|
|
7
|
-
*
|
|
8
|
-
* FOUNDATIONAL FIRST, UNIVERSAL BY DEFAULT
|
|
9
|
-
*/
|
|
10
|
-
import { UniversalIntelligenceGenerator, RawIntelligence, StructuredIntelligence } from './universal-intelligence-generator';
|
|
11
|
-
/**
|
|
12
|
-
* Google Opal Mini-App Generator
|
|
13
|
-
*
|
|
14
|
-
* Opal format: Visual node-based mini-apps
|
|
15
|
-
* Architecture: User inputs ā prompts ā AI model calls ā outputs
|
|
16
|
-
*/
|
|
17
|
-
export declare class OpalMiniAppGenerator extends UniversalIntelligenceGenerator {
|
|
18
|
-
detect(filePath: string): Promise<boolean>;
|
|
19
|
-
extract(filePath: string): Promise<RawIntelligence>;
|
|
20
|
-
filter(raw: RawIntelligence): Promise<StructuredIntelligence>;
|
|
21
|
-
private detectOpalPattern;
|
|
22
|
-
private extractInputs;
|
|
23
|
-
private extractOutputs;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Make.com Scenario Generator
|
|
27
|
-
*
|
|
28
|
-
* Make format: Blueprint JSON with 'name', 'flow', and 'metadata'
|
|
29
|
-
* Architecture: Triggers ā modules (in flow array) ā actions
|
|
30
|
-
*
|
|
31
|
-
* Actual Make.com Blueprint Structure (validated 2025-10-10):
|
|
32
|
-
* {
|
|
33
|
-
* "name": "Scenario Name",
|
|
34
|
-
* "flow": [ // Array of module objects
|
|
35
|
-
* {
|
|
36
|
-
* "id": 1,
|
|
37
|
-
* "module": "gateway:CustomWebHook",
|
|
38
|
-
* "version": 1,
|
|
39
|
-
* "metadata": { "designer": { "x": 0, "y": 0 } }
|
|
40
|
-
* }
|
|
41
|
-
* ],
|
|
42
|
-
* "metadata": {
|
|
43
|
-
* "version": 1,
|
|
44
|
-
* "scenario": { "roundtrips": 1, "maxErrors": 3, ... },
|
|
45
|
-
* "designer": { "orphans": [] }
|
|
46
|
-
* },
|
|
47
|
-
* "scheduling": { "type": "indefinitely", "interval": 15 },
|
|
48
|
-
* "created": "ISO timestamp",
|
|
49
|
-
* "last_edit": "ISO timestamp"
|
|
50
|
-
* }
|
|
51
|
-
*/
|
|
52
|
-
export declare class MakeScenarioGenerator extends UniversalIntelligenceGenerator {
|
|
53
|
-
detect(filePath: string): Promise<boolean>;
|
|
54
|
-
extract(filePath: string): Promise<RawIntelligence>;
|
|
55
|
-
filter(raw: RawIntelligence): Promise<StructuredIntelligence>;
|
|
56
|
-
private detectMakePattern;
|
|
57
|
-
private extractTriggers;
|
|
58
|
-
private extractActions;
|
|
59
|
-
private extractIntegrations;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Code Project Generator
|
|
63
|
-
*
|
|
64
|
-
* Handles traditional code projects (package.json, requirements.txt, etc.)
|
|
65
|
-
* This is what FAF already does well - just formalizing it in the universal pattern
|
|
66
|
-
*/
|
|
67
|
-
export declare class CodeProjectGenerator extends UniversalIntelligenceGenerator {
|
|
68
|
-
detect(filePath: string): Promise<boolean>;
|
|
69
|
-
extract(filePath: string): Promise<RawIntelligence>;
|
|
70
|
-
filter(raw: RawIntelligence): Promise<StructuredIntelligence>;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Export all adapters for registration
|
|
74
|
-
*/
|
|
75
|
-
export declare const PLATFORM_ADAPTERS: readonly [typeof OpalMiniAppGenerator, typeof MakeScenarioGenerator, typeof CodeProjectGenerator];
|
|
76
|
-
//# sourceMappingURL=platform-adapters.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-adapters.d.ts","sourceRoot":"","sources":["../../src/core/platform-adapters.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,8BAA8B,EAC9B,eAAe,EACf,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAE5C;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,8BAA8B;IAEhE,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAc1C,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAuBnD,MAAM,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAgDnE,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;CAGvB;AAED;;;;;;;;;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