fraim 2.0.203 → 2.0.205
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 +3 -3
- package/bin/fraim.js +8 -18
- package/dist/src/cli/commands/first-run.js +2 -37
- package/dist/src/cli/doctor/checks/mcp-connectivity-checks.js +1 -1
- package/dist/src/cli/fraim.js +0 -2
- package/dist/src/cli/setup/ide-invocation-surfaces.js +6 -6
- package/dist/src/cli/utils/managed-agent-paths.js +76 -6
- package/dist/src/cli/utils/version-utils.js +2 -2
- package/dist/src/config/persona-capability-bundles.js +3 -3
- package/dist/src/core/job-phases.js +168 -0
- package/dist/src/core/utils/ports.js +32 -0
- package/dist/src/core/utils/stub-generator.js +24 -2
- package/dist/src/first-run/session-service.js +106 -24
- package/dist/src/local-mcp-server/learning-context-builder.js +1 -1
- package/dist/src/local-mcp-server/stdio-server.js +41 -9
- package/dist/src/routes/analytics.js +2 -2
- package/dist/src/services/registry-service.js +2 -2
- package/index.js +1 -1
- package/package.json +61 -181
- package/dist/src/ai-hub/catalog.js +0 -406
- package/dist/src/ai-hub/cert-store.js +0 -70
- package/dist/src/ai-hub/conversation-store.js +0 -359
- package/dist/src/ai-hub/desktop-main.js +0 -449
- package/dist/src/ai-hub/hosts.js +0 -1664
- package/dist/src/ai-hub/hub-latest-version.js +0 -52
- package/dist/src/ai-hub/hub-launch-decision.js +0 -57
- package/dist/src/ai-hub/hub-runtime-file.js +0 -43
- package/dist/src/ai-hub/managed-browser.js +0 -269
- package/dist/src/ai-hub/manager-turns.js +0 -64
- package/dist/src/ai-hub/office-sideload.js +0 -156
- package/dist/src/ai-hub/openclaw-bridge.js +0 -250
- package/dist/src/ai-hub/preferences.js +0 -201
- package/dist/src/ai-hub/remote-hub-gateway.js +0 -88
- package/dist/src/ai-hub/server.js +0 -3827
- package/dist/src/ai-hub/types.js +0 -2
- package/dist/src/ai-hub/word-sideload.js +0 -95
- package/dist/src/cli/commands/hub.js +0 -238
- package/dist/src/cli/commands/test-mcp.js +0 -171
- package/dist/src/cli/setup/first-run.js +0 -242
- package/dist/src/core/config-writer.js +0 -75
- package/dist/src/core/utils/job-aliases.js +0 -47
- package/dist/src/core/utils/workflow-parser.js +0 -174
- package/dist/src/services/email-service-clean.js +0 -782
- package/extensions/office-word/favicon.ico +0 -0
- package/extensions/office-word/icon-64.png +0 -0
- package/extensions/office-word/manifest.xml +0 -33
- package/extensions/office-word/taskpane.html +0 -242
- package/public/ai-hub/index.html +0 -894
- package/public/ai-hub/powerpoint-taskpane/icon-64.png +0 -0
- package/public/ai-hub/powerpoint-taskpane/index.html +0 -236
- package/public/ai-hub/powerpoint-taskpane/manifest.xml +0 -30
- package/public/ai-hub/review.css +0 -381
- package/public/ai-hub/script.js +0 -11015
- package/public/ai-hub/styles.css +0 -4873
- package/public/portfolio/ashley.html +0 -523
- package/public/portfolio/auditya.html +0 -83
- package/public/portfolio/banke.html +0 -83
- package/public/portfolio/beza.html +0 -659
- package/public/portfolio/careena.html +0 -632
- package/public/portfolio/casey.html +0 -568
- package/public/portfolio/celia.html +0 -490
- package/public/portfolio/deidre.html +0 -642
- package/public/portfolio/gautam.html +0 -597
- package/public/portfolio/hari.html +0 -469
- package/public/portfolio/huxley.html +0 -1354
- package/public/portfolio/index.html +0 -741
- package/public/portfolio/maestro.html +0 -518
- package/public/portfolio/mandy.html +0 -590
- package/public/portfolio/mona.html +0 -597
- package/public/portfolio/pam.html +0 -887
- package/public/portfolio/procella.html +0 -107
- package/public/portfolio/qasm.html +0 -569
- package/public/portfolio/ricardo.html +0 -489
- package/public/portfolio/sade.html +0 -560
- package/public/portfolio/sam.html +0 -654
- package/public/portfolio/sechar.html +0 -580
- package/public/portfolio/sreya.html +0 -599
- package/public/portfolio/swen.html +0 -601
- /package/dist/src/{ai-hub → core}/brand-store.js +0 -0
|
@@ -48,6 +48,7 @@ const auto_mcp_setup_1 = require("../cli/setup/auto-mcp-setup");
|
|
|
48
48
|
const setup_1 = require("../cli/commands/setup");
|
|
49
49
|
const script_sync_utils_1 = require("../cli/utils/script-sync-utils");
|
|
50
50
|
const managed_agent_paths_1 = require("../cli/utils/managed-agent-paths");
|
|
51
|
+
const ports_1 = require("../core/utils/ports");
|
|
51
52
|
const types_1 = require("./types");
|
|
52
53
|
Object.defineProperty(exports, "FIRST_RUN_ROW_IDS", { enumerable: true, get: function () { return types_1.FIRST_RUN_ROW_IDS; } });
|
|
53
54
|
const install_state_1 = require("./install-state");
|
|
@@ -60,17 +61,15 @@ function getFakeStateMode() {
|
|
|
60
61
|
}
|
|
61
62
|
return 'default';
|
|
62
63
|
}
|
|
63
|
-
function commandVersion(command, extraBinDirs) {
|
|
64
|
+
function commandVersion(command, extraBinDirs, basePath) {
|
|
64
65
|
const executable = process.platform === 'win32' ? 'cmd.exe' : command;
|
|
65
66
|
const args = process.platform === 'win32'
|
|
66
67
|
? ['/d', '/s', '/c', `${command} --version`]
|
|
67
68
|
: ['--version'];
|
|
68
|
-
const
|
|
69
|
-
?
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
: undefined;
|
|
69
|
+
const pathValue = extraBinDirs && extraBinDirs.length > 0
|
|
70
|
+
? (0, managed_agent_paths_1.appendBinDirsToPath)(basePath ?? process.env.PATH, extraBinDirs)
|
|
71
|
+
: basePath;
|
|
72
|
+
const env = pathValue === undefined ? undefined : { ...process.env, PATH: pathValue };
|
|
74
73
|
const result = (0, child_process_1.spawnSync)(executable, args, {
|
|
75
74
|
encoding: 'utf8',
|
|
76
75
|
timeout: 5000,
|
|
@@ -85,24 +84,29 @@ function ensureOutputDirs() {
|
|
|
85
84
|
fs_1.default.mkdirSync((0, script_sync_utils_1.getUserFraimDir)(), { recursive: true });
|
|
86
85
|
fs_1.default.mkdirSync(path_1.default.join((0, script_sync_utils_1.getUserFraimDir)(), 'last-install'), { recursive: true });
|
|
87
86
|
}
|
|
88
|
-
//
|
|
87
|
+
// Append the portable Node bin dir to process PATH once at module load so
|
|
89
88
|
// every spawnSync call (detection, login probe, change-agent) finds binaries
|
|
90
|
-
// installed there without
|
|
89
|
+
// installed there without shadowing user/system installs.
|
|
91
90
|
(function bootstrapFraimNodeBin() {
|
|
92
|
-
(0, managed_agent_paths_1.
|
|
91
|
+
(0, managed_agent_paths_1.appendManagedAgentBinDirsToProcessPath)();
|
|
93
92
|
})();
|
|
94
93
|
function persistShellPath() {
|
|
95
94
|
const marker = '# FRAIM managed binaries';
|
|
96
|
-
const
|
|
95
|
+
const legacyExportLine = 'export PATH="$HOME/.fraim/node/bin:$PATH"';
|
|
96
|
+
const exportLine = 'export PATH="$PATH:$HOME/.fraim/node/bin"';
|
|
97
97
|
const stanza = `\n${marker}\n${exportLine}\n`;
|
|
98
98
|
if (process.platform === 'win32') {
|
|
99
99
|
const bins = (0, managed_agent_paths_1.getManagedAgentBinDirs)();
|
|
100
100
|
const assignments = bins.map((entry, index) => `$bin${index} = '${entry.replace(/'/g, "''")}'`);
|
|
101
|
-
const
|
|
101
|
+
const removals = bins.map((_, index) => `$parts = @($parts | Where-Object { $_ -ne $bin${index} })`);
|
|
102
|
+
const additions = bins.map((_, index) => `$parts += $bin${index}`);
|
|
102
103
|
const psCmd = [
|
|
103
104
|
...assignments,
|
|
104
105
|
`$cur = [Environment]::GetEnvironmentVariable('PATH', 'User')`,
|
|
105
|
-
|
|
106
|
+
`$parts = @($cur -split ';' | Where-Object { $_ })`,
|
|
107
|
+
...removals,
|
|
108
|
+
...additions,
|
|
109
|
+
`$cur = ($parts | Select-Object -Unique) -join ';'`,
|
|
106
110
|
`[Environment]::SetEnvironmentVariable('PATH', $cur, 'User')`,
|
|
107
111
|
].join('; ');
|
|
108
112
|
(0, child_process_1.spawnSync)('powershell', ['-NoProfile', '-NonInteractive', '-Command', psCmd], { encoding: 'utf8' });
|
|
@@ -122,6 +126,10 @@ function persistShellPath() {
|
|
|
122
126
|
if (!fs_1.default.existsSync(profile))
|
|
123
127
|
continue;
|
|
124
128
|
const content = fs_1.default.readFileSync(profile, 'utf8');
|
|
129
|
+
if (content.includes(legacyExportLine)) {
|
|
130
|
+
fs_1.default.writeFileSync(profile, content.replace(legacyExportLine, exportLine), 'utf8');
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
125
133
|
if (content.includes(marker))
|
|
126
134
|
continue;
|
|
127
135
|
fs_1.default.appendFileSync(profile, stanza, 'utf8');
|
|
@@ -146,8 +154,15 @@ function runProcess(command, args, env) {
|
|
|
146
154
|
const [realCmd, realArgs] = process.platform === 'win32'
|
|
147
155
|
? ['cmd.exe', ['/d', '/s', '/c', command, ...args]]
|
|
148
156
|
: [command, args];
|
|
157
|
+
const childEnv = { ...process.env };
|
|
158
|
+
for (const [key, value] of Object.entries(env || {})) {
|
|
159
|
+
if (value === undefined)
|
|
160
|
+
delete childEnv[key];
|
|
161
|
+
else
|
|
162
|
+
childEnv[key] = value;
|
|
163
|
+
}
|
|
149
164
|
const child = (0, child_process_1.spawn)(realCmd, realArgs, {
|
|
150
|
-
env:
|
|
165
|
+
env: childEnv,
|
|
151
166
|
shell: false,
|
|
152
167
|
});
|
|
153
168
|
let stdout = '';
|
|
@@ -379,7 +394,7 @@ class FirstRunSessionService {
|
|
|
379
394
|
if (mode === 'all-detected') {
|
|
380
395
|
setStatus('node', 'ok', 'v20.11.1 detected');
|
|
381
396
|
setStatus('git', 'ok', 'git version 2.45 detected');
|
|
382
|
-
setStatus('fraim', 'ok', 'fraim
|
|
397
|
+
setStatus('fraim', 'ok', 'fraim detected');
|
|
383
398
|
setStatus('agent', 'ok', '1 local AI agent ready', 'Claude Code');
|
|
384
399
|
this.state.setupResult = {
|
|
385
400
|
mode: 'conversational',
|
|
@@ -409,7 +424,7 @@ class FirstRunSessionService {
|
|
|
409
424
|
if (mode === 'agent-install-fails') {
|
|
410
425
|
setStatus('node', 'ok', 'v20.11.1 installed');
|
|
411
426
|
setStatus('git', 'ok', '2.45 installed');
|
|
412
|
-
setStatus('fraim', 'ok', 'fraim
|
|
427
|
+
setStatus('fraim', 'ok', 'fraim installed');
|
|
413
428
|
setStatus('agent', 'pending', "we'll check for local AI agents");
|
|
414
429
|
delete this.state.setupResult;
|
|
415
430
|
return;
|
|
@@ -743,15 +758,67 @@ class FirstRunSessionService {
|
|
|
743
758
|
};
|
|
744
759
|
}
|
|
745
760
|
try {
|
|
761
|
+
const systemPath = (0, managed_agent_paths_1.stripManagedAgentBinDirsFromPath)(process.env.PATH);
|
|
762
|
+
const existingVersion = commandVersion(option.launchCommand, undefined, systemPath);
|
|
763
|
+
if (existingVersion) {
|
|
764
|
+
this.setAgentInstallStatus(agentId, 'needs-sign-in', `Sign in to ${option.label} to activate it.`);
|
|
765
|
+
appendInstallLog(`agent-reused ${agentId}`);
|
|
766
|
+
this.persist();
|
|
767
|
+
return {
|
|
768
|
+
ok: true,
|
|
769
|
+
message: `${option.label} is already installed.`,
|
|
770
|
+
needsLogin: true,
|
|
771
|
+
loginCommand: option.loginCommand,
|
|
772
|
+
loginHint: `Sign in to ${option.label} to activate it. A terminal window will open with the sign-in command — complete sign-in there, then return here and click "Check if Ready".`,
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
let standardInstallError = null;
|
|
776
|
+
try {
|
|
777
|
+
await runProcess('npm', ['install', '-g', option.installPackage], {
|
|
778
|
+
PATH: systemPath,
|
|
779
|
+
npm_config_prefix: undefined,
|
|
780
|
+
NPM_CONFIG_PREFIX: undefined,
|
|
781
|
+
});
|
|
782
|
+
const standardVersion = commandVersion(option.launchCommand, undefined, systemPath);
|
|
783
|
+
const npmGlobalBinDirs = standardVersion
|
|
784
|
+
? []
|
|
785
|
+
: (0, managed_agent_paths_1.resolveNpmGlobalBinDirs)(systemPath, {
|
|
786
|
+
npm_config_prefix: undefined,
|
|
787
|
+
NPM_CONFIG_PREFIX: undefined,
|
|
788
|
+
});
|
|
789
|
+
const standardVersionWithNpmBin = standardVersion
|
|
790
|
+
|| (npmGlobalBinDirs.length > 0
|
|
791
|
+
? commandVersion(option.launchCommand, npmGlobalBinDirs, systemPath)
|
|
792
|
+
: null);
|
|
793
|
+
if (standardVersionWithNpmBin) {
|
|
794
|
+
if (npmGlobalBinDirs.length > 0) {
|
|
795
|
+
process.env.PATH = (0, managed_agent_paths_1.appendBinDirsToPath)(systemPath, npmGlobalBinDirs);
|
|
796
|
+
}
|
|
797
|
+
this.setAgentInstallStatus(agentId, 'needs-sign-in', `Sign in to ${option.label} to activate it.`);
|
|
798
|
+
appendInstallLog(`agent-installed-standard ${agentId}`);
|
|
799
|
+
this.persist();
|
|
800
|
+
return {
|
|
801
|
+
ok: true,
|
|
802
|
+
message: `${option.label} installed successfully.`,
|
|
803
|
+
needsLogin: true,
|
|
804
|
+
loginCommand: option.loginCommand,
|
|
805
|
+
loginHint: `Sign in to ${option.label} to activate it. A terminal window will open with the sign-in command — complete sign-in there, then return here and click "Check if Ready".`,
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
standardInstallError = `${option.label} standard install completed, but the CLI is not runnable from the user PATH.`;
|
|
809
|
+
}
|
|
810
|
+
catch (error) {
|
|
811
|
+
standardInstallError = error instanceof Error ? error.message : 'Unknown error';
|
|
812
|
+
}
|
|
746
813
|
const prefix = path_1.default.join((0, script_sync_utils_1.getUserFraimDir)(), 'node');
|
|
747
814
|
fs_1.default.mkdirSync(prefix, { recursive: true });
|
|
748
815
|
await runProcess('npm', ['install', '-g', option.installPackage], { npm_config_prefix: prefix });
|
|
749
816
|
const ver = commandVersion(option.launchCommand, (0, managed_agent_paths_1.getManagedAgentBinDirs)());
|
|
750
817
|
if (!ver) {
|
|
751
|
-
throw new Error(`${option.label} install completed, but the CLI is not runnable from FRAIM's managed PATH
|
|
818
|
+
throw new Error(`${option.label} install completed, but the CLI is not runnable from FRAIM's managed PATH. Standard install failure: ${standardInstallError}`);
|
|
752
819
|
}
|
|
753
820
|
this.setAgentInstallStatus(agentId, 'needs-sign-in', `Sign in to ${option.label} to activate it.`);
|
|
754
|
-
appendInstallLog(`agent-installed ${agentId}`);
|
|
821
|
+
appendInstallLog(`agent-installed-managed ${agentId}`);
|
|
755
822
|
this.persist();
|
|
756
823
|
return {
|
|
757
824
|
ok: true,
|
|
@@ -880,15 +947,30 @@ class FirstRunSessionService {
|
|
|
880
947
|
};
|
|
881
948
|
}
|
|
882
949
|
try {
|
|
883
|
-
const
|
|
884
|
-
const
|
|
885
|
-
const
|
|
886
|
-
|
|
950
|
+
const port = await (0, ports_1.findAvailablePort)(43091);
|
|
951
|
+
const npxBinary = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
952
|
+
const projectPath = this.state.workspacePath || process.cwd();
|
|
953
|
+
const child = (0, child_process_1.spawn)(npxBinary, [
|
|
954
|
+
'-y',
|
|
955
|
+
'fraim-hub@latest',
|
|
956
|
+
'--browser',
|
|
957
|
+
'--port',
|
|
958
|
+
String(port),
|
|
959
|
+
'--project-path',
|
|
960
|
+
projectPath,
|
|
961
|
+
], {
|
|
962
|
+
detached: true,
|
|
963
|
+
stdio: 'ignore',
|
|
964
|
+
});
|
|
965
|
+
child.once('error', (spawnError) => {
|
|
966
|
+
appendInstallLog(`hub-open-spawn-error ${spawnError instanceof Error ? spawnError.message : String(spawnError)}`);
|
|
967
|
+
});
|
|
968
|
+
child.unref();
|
|
887
969
|
const hubUrl = `http://127.0.0.1:${port}/ai-hub/`;
|
|
888
970
|
appendInstallLog(`hub-opened ${hubUrl}`);
|
|
889
971
|
return {
|
|
890
972
|
ok: true,
|
|
891
|
-
message: `Hub is
|
|
973
|
+
message: `Hub is opening at ${hubUrl}. From now on, run \`npx fraim-hub@latest --browser\` to launch it again.`,
|
|
892
974
|
hubUrl,
|
|
893
975
|
};
|
|
894
976
|
}
|
|
@@ -897,7 +979,7 @@ class FirstRunSessionService {
|
|
|
897
979
|
appendInstallLog(`hub-open-failed ${detail}`);
|
|
898
980
|
return {
|
|
899
981
|
ok: false,
|
|
900
|
-
message: `Could not open the Hub automatically: ${detail}. Run \`npx fraim@latest
|
|
982
|
+
message: `Could not open the Hub automatically: ${detail}. Run \`npx fraim-hub@latest --browser\` from a terminal to open it manually.`,
|
|
901
983
|
};
|
|
902
984
|
}
|
|
903
985
|
}
|
|
@@ -23,7 +23,7 @@ exports.isTruthyFlag = isTruthyFlag;
|
|
|
23
23
|
const fs_1 = require("fs");
|
|
24
24
|
const path_1 = require("path");
|
|
25
25
|
const project_fraim_paths_1 = require("../core/utils/project-fraim-paths");
|
|
26
|
-
const brand_store_1 = require("../
|
|
26
|
+
const brand_store_1 = require("../core/brand-store");
|
|
27
27
|
const REPO_LEARNINGS_REL = (0, project_fraim_paths_1.getWorkspaceFraimDisplayPath)('personalized-employee/learnings').replace(/\/$/, '');
|
|
28
28
|
const DEFAULT_THRESHOLD = 3.0;
|
|
29
29
|
const AGING_HORIZON_DAYS = 7;
|
|
@@ -161,7 +161,7 @@ class FraimTemplateEngine {
|
|
|
161
161
|
if (deliveryValues) {
|
|
162
162
|
result = result.replace(/\{\{proxy\.delivery\.([^}]+)\}\}/g, (match, key) => {
|
|
163
163
|
const value = deliveryValues[`proxy.delivery.${key.trim()}`];
|
|
164
|
-
return value !== undefined ? value : match;
|
|
164
|
+
return value !== undefined ? this.renderDeliveryTemplateValue(value, notices, blockingRequirements) : match;
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
// Third, substitute platform-specific action templates
|
|
@@ -349,6 +349,26 @@ class FraimTemplateEngine {
|
|
|
349
349
|
// in FraimLocalMCPServer. Do not read framework/project registry files directly.
|
|
350
350
|
return null;
|
|
351
351
|
}
|
|
352
|
+
renderDeliveryTemplateValue(template, notices, blockingRequirements) {
|
|
353
|
+
let result = template.replace(/\{\{\s*proxy\.config\.([^}]+?)\s*\}\}/g, (match, expression) => {
|
|
354
|
+
return this.resolveConfigTemplate(match, expression, notices, blockingRequirements);
|
|
355
|
+
});
|
|
356
|
+
result = result.replace(/\{\{\s*proxy\.repository\.([^}]+?)\s*\}\}/g, (match, repoPath) => {
|
|
357
|
+
const trimmedPath = repoPath.trim();
|
|
358
|
+
if (this.repoInfo) {
|
|
359
|
+
const value = (0, object_utils_1.getNestedValue)(this.repoInfo, trimmedPath);
|
|
360
|
+
if (value !== undefined)
|
|
361
|
+
return String(value);
|
|
362
|
+
}
|
|
363
|
+
if (this.config?.repository) {
|
|
364
|
+
const value = (0, object_utils_1.getNestedValue)(this.config.repository, trimmedPath);
|
|
365
|
+
if (value !== undefined)
|
|
366
|
+
return String(value);
|
|
367
|
+
}
|
|
368
|
+
return match;
|
|
369
|
+
});
|
|
370
|
+
return result;
|
|
371
|
+
}
|
|
352
372
|
renderActionTemplate(template) {
|
|
353
373
|
if (!this.repoInfo && !this.config?.repository && !this.config?.issueTracking) {
|
|
354
374
|
return template;
|
|
@@ -912,15 +932,14 @@ class FraimLocalMCPServer {
|
|
|
912
932
|
stdio: ['pipe', 'pipe', 'pipe']
|
|
913
933
|
}).trim();
|
|
914
934
|
}
|
|
915
|
-
catch
|
|
916
|
-
|
|
917
|
-
if (this.config?.repository?.defaultBranch) {
|
|
918
|
-
branch = this.config.repository.defaultBranch;
|
|
919
|
-
}
|
|
935
|
+
catch {
|
|
936
|
+
branch = '';
|
|
920
937
|
}
|
|
938
|
+
const defaultBranch = this.config?.repository?.defaultBranch || '';
|
|
921
939
|
const repoInfo = {
|
|
922
940
|
url: repoUrl,
|
|
923
941
|
name: name || 'unknown',
|
|
942
|
+
...(defaultBranch && { defaultBranch }),
|
|
924
943
|
...(organization && { organization }),
|
|
925
944
|
...(project && { project }),
|
|
926
945
|
...(namespace && { namespace }),
|
|
@@ -964,6 +983,21 @@ class FraimLocalMCPServer {
|
|
|
964
983
|
}
|
|
965
984
|
return 'PR';
|
|
966
985
|
}
|
|
986
|
+
hasConfiguredRepository() {
|
|
987
|
+
const repository = this.config?.repository;
|
|
988
|
+
if (!repository || typeof repository !== 'object')
|
|
989
|
+
return false;
|
|
990
|
+
return Boolean(repository.url || repository.owner || repository.name || repository.projectPath || repository.organization || repository.project);
|
|
991
|
+
}
|
|
992
|
+
resolveDeliveryProviderFilename() {
|
|
993
|
+
if (this.getWorkingStyle() === 'Conversation')
|
|
994
|
+
return 'delivery-conversation.json';
|
|
995
|
+
const repoInfo = this.repoInfo || this.detectRepoInfo();
|
|
996
|
+
const hasGitRemote = !!(repoInfo?.url && /(?:github\.com|dev\.azure\.com|gitlab|\.git$)/i.test(String(repoInfo.url)));
|
|
997
|
+
if (!this.hasConfiguredRepository() && !hasGitRemote)
|
|
998
|
+
return 'delivery-conversation.json';
|
|
999
|
+
return 'delivery-pr.json';
|
|
1000
|
+
}
|
|
967
1001
|
getHomeDir() {
|
|
968
1002
|
const homeDir = process.env.HOME || process.env.USERPROFILE || '';
|
|
969
1003
|
return homeDir || null;
|
|
@@ -1150,9 +1184,7 @@ class FraimLocalMCPServer {
|
|
|
1150
1184
|
// treat missing required keys as stale cache and refresh from the server.
|
|
1151
1185
|
if (currentTemplates && this.deliveryTemplatesCoverPlaceholders(currentTemplates, response))
|
|
1152
1186
|
return;
|
|
1153
|
-
const filename = this.
|
|
1154
|
-
? 'delivery-conversation.json'
|
|
1155
|
-
: 'delivery-pr.json';
|
|
1187
|
+
const filename = this.resolveDeliveryProviderFilename();
|
|
1156
1188
|
const cached = this.readCachedTemplateFile(filename);
|
|
1157
1189
|
if (cached && this.deliveryTemplatesCoverPlaceholders(cached, response)) {
|
|
1158
1190
|
engine.setDeliveryTemplates(cached);
|
|
@@ -9,7 +9,7 @@ const usage_analytics_service_js_1 = require("../services/usage-analytics-servic
|
|
|
9
9
|
const db_service_js_1 = require("../fraim/db-service.js");
|
|
10
10
|
const mcp_service_js_1 = require("../services/mcp-service.js");
|
|
11
11
|
const git_utils_js_1 = require("../core/utils/git-utils.js");
|
|
12
|
-
const
|
|
12
|
+
const job_phases_1 = require("../core/job-phases");
|
|
13
13
|
const router = express_1.default.Router();
|
|
14
14
|
/**
|
|
15
15
|
* GET /api/analytics/stats
|
|
@@ -357,7 +357,7 @@ router.get('/jobs/:jobName/phases', async (req, res) => {
|
|
|
357
357
|
return res.status(400).json({ error: 'jobName parameter is required' });
|
|
358
358
|
}
|
|
359
359
|
const discriminant = typeof req.query.discriminant === 'string' ? req.query.discriminant : 'feature';
|
|
360
|
-
const phases = (0,
|
|
360
|
+
const phases = (0, job_phases_1.loadJobPhases)(jobName, process.cwd(), discriminant).map(phase => ({
|
|
361
361
|
key: phase.id,
|
|
362
362
|
label: phase.label
|
|
363
363
|
}));
|
|
@@ -337,8 +337,8 @@ class RegistryService {
|
|
|
337
337
|
continue;
|
|
338
338
|
}
|
|
339
339
|
const content = (0, fs_1.readFileSync)(job.fullPath, 'utf8');
|
|
340
|
-
const { intent, outcome, steps } = (0, stub_generator_1.parseRegistryJob)(content);
|
|
341
|
-
const stub = (0, stub_generator_1.generateJobStub)(job.name, relativePath, intent, outcome, steps);
|
|
340
|
+
const { intent, outcome, steps, displayName } = (0, stub_generator_1.parseRegistryJob)(content);
|
|
341
|
+
const stub = (0, stub_generator_1.generateJobStub)(job.name, relativePath, intent, outcome, steps, displayName);
|
|
342
342
|
files.push({
|
|
343
343
|
path: relativePath,
|
|
344
344
|
content: stub,
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,181 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fraim",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "FRAIM CLI
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"fraim": "bin/fraim.js"
|
|
8
|
-
},
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"validate:template-namespaces": "tsx scripts/validate-template-namespaces.ts",
|
|
63
|
-
"validate:config-fallbacks": "tsx scripts/validate-config-fallbacks.ts",
|
|
64
|
-
"validate:bootstrap-config-coverage": "tsx scripts/validate-bootstrap-config-coverage.ts",
|
|
65
|
-
"validate:provider-action-mappings": "tsx scripts/validate-provider-action-mappings.ts",
|
|
66
|
-
"validate:fidelity": "tsx scripts/validate-fidelity.ts",
|
|
67
|
-
"validate:config-tokens": "tsx scripts/validate-config-tokens.ts",
|
|
68
|
-
"validate:workspace-config": "tsx scripts/validate-workspace-config.ts",
|
|
69
|
-
"validate:template-syntax": "tsx scripts/validate-template-syntax.ts",
|
|
70
|
-
"validate:backup": "bash scripts/backup/validate-pitr-restore.sh"
|
|
71
|
-
},
|
|
72
|
-
"repository": {
|
|
73
|
-
"type": "git",
|
|
74
|
-
"url": "git+https://github.com/mathursrus/FRAIM.git"
|
|
75
|
-
},
|
|
76
|
-
"keywords": [
|
|
77
|
-
"fraim",
|
|
78
|
-
"ai-management",
|
|
79
|
-
"ai-coordination",
|
|
80
|
-
"ai-agents",
|
|
81
|
-
"multi-agent",
|
|
82
|
-
"github",
|
|
83
|
-
"automation",
|
|
84
|
-
"gitops",
|
|
85
|
-
"cursor",
|
|
86
|
-
"claude",
|
|
87
|
-
"windsurf",
|
|
88
|
-
"rigor",
|
|
89
|
-
"enterprise",
|
|
90
|
-
"framework",
|
|
91
|
-
"ai-managers"
|
|
92
|
-
],
|
|
93
|
-
"author": "Sid Mathur <sid.mathur@gmail.com>",
|
|
94
|
-
"license": "MIT",
|
|
95
|
-
"bugs": {
|
|
96
|
-
"url": "https://github.com/mathursrus/FRAIM/issues"
|
|
97
|
-
},
|
|
98
|
-
"homepage": "https://github.com/mathursrus/FRAIM#readme",
|
|
99
|
-
"engines": {
|
|
100
|
-
"node": ">=16.0.0"
|
|
101
|
-
},
|
|
102
|
-
"devDependencies": {
|
|
103
|
-
"@playwright/test": "^1.58.2",
|
|
104
|
-
"@types/adm-zip": "^0.5.7",
|
|
105
|
-
"@types/cors": "^2.8.19",
|
|
106
|
-
"@types/express": "^5.0.6",
|
|
107
|
-
"@types/node": "^20.0.0",
|
|
108
|
-
"@types/node-cron": "^3.0.11",
|
|
109
|
-
"@types/node-fetch": "^2.6.13",
|
|
110
|
-
"@types/prompts": "^2.4.9",
|
|
111
|
-
"@types/semver": "^7.7.1",
|
|
112
|
-
"fast-glob": "^3.3.3",
|
|
113
|
-
"markdown-it": "^14.1.1",
|
|
114
|
-
"markdown-it-highlightjs": "^4.3.0",
|
|
115
|
-
"playwright": "^1.58.2",
|
|
116
|
-
"pptxgenjs": "^4.0.1",
|
|
117
|
-
"promptfoo": "^0.121.17",
|
|
118
|
-
"puppeteer": "^24.36.1",
|
|
119
|
-
"qrcode": "^1.5.4",
|
|
120
|
-
"sharp": "^0.34.5",
|
|
121
|
-
"tsx": "^4.0.0",
|
|
122
|
-
"typescript": "^5.0.0"
|
|
123
|
-
},
|
|
124
|
-
"files": [
|
|
125
|
-
"dist/src/local-mcp-server/",
|
|
126
|
-
"dist/src/cli/",
|
|
127
|
-
"dist/src/ai-hub/",
|
|
128
|
-
"dist/src/first-run/",
|
|
129
|
-
"dist/src/core/",
|
|
130
|
-
"dist/src/config/",
|
|
131
|
-
"dist/src/fraim/",
|
|
132
|
-
"dist/src/db/",
|
|
133
|
-
"dist/src/routes/",
|
|
134
|
-
"dist/src/services/",
|
|
135
|
-
"dist/src/api/",
|
|
136
|
-
"dist/src/middleware/",
|
|
137
|
-
"dist/src/models/",
|
|
138
|
-
"dist/src/types/",
|
|
139
|
-
"dist/src/utils/",
|
|
140
|
-
"bin/fraim.js",
|
|
141
|
-
"bin/fraim-mcp.js",
|
|
142
|
-
"extensions/office-word/",
|
|
143
|
-
"public/ai-hub/",
|
|
144
|
-
"public/first-run/",
|
|
145
|
-
"public/portfolio/",
|
|
146
|
-
"index.js",
|
|
147
|
-
"README.md",
|
|
148
|
-
"CHANGELOG.md",
|
|
149
|
-
"LICENSE",
|
|
150
|
-
"package.json"
|
|
151
|
-
],
|
|
152
|
-
"publishConfig": {
|
|
153
|
-
"access": "public"
|
|
154
|
-
},
|
|
155
|
-
"overrides": {
|
|
156
|
-
"uuid": "^14.0.0"
|
|
157
|
-
},
|
|
158
|
-
"dependencies": {
|
|
159
|
-
"@octokit/rest": "^22.0.1",
|
|
160
|
-
"adm-zip": "^0.5.16",
|
|
161
|
-
"axios": "^1.7.0",
|
|
162
|
-
"chalk": "4.1.2",
|
|
163
|
-
"commander": "^14.0.2",
|
|
164
|
-
"cors": "^2.8.5",
|
|
165
|
-
"dotenv": "^16.4.7",
|
|
166
|
-
"electron": "^41.2.2",
|
|
167
|
-
"express": "^5.2.1",
|
|
168
|
-
"mongodb": "^7.0.0",
|
|
169
|
-
"node-cron": "4.2.1",
|
|
170
|
-
"node-edge-tts": "^1.2.10",
|
|
171
|
-
"nodemailer": "^8.0.3",
|
|
172
|
-
"prompts": "^2.4.2",
|
|
173
|
-
"resend": "^6.9.3",
|
|
174
|
-
"selfsigned": "^5.5.0",
|
|
175
|
-
"semver": "^7.7.4",
|
|
176
|
-
"stripe": "^20.3.1",
|
|
177
|
-
"toml": "^3.0.0",
|
|
178
|
-
"tree-kill": "^1.2.2",
|
|
179
|
-
"xml2js": "^0.6.2"
|
|
180
|
-
}
|
|
181
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "fraim",
|
|
3
|
+
"version": "2.0.205",
|
|
4
|
+
"description": "FRAIM core CLI and MCP package.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"fraim": "bin/fraim.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/src/local-mcp-server/",
|
|
11
|
+
"dist/src/cli/",
|
|
12
|
+
"!dist/src/cli/fraim-hub.js",
|
|
13
|
+
"dist/src/first-run/",
|
|
14
|
+
"dist/src/core/",
|
|
15
|
+
"dist/src/config/",
|
|
16
|
+
"dist/src/fraim/",
|
|
17
|
+
"dist/src/db/",
|
|
18
|
+
"dist/src/routes/",
|
|
19
|
+
"dist/src/services/",
|
|
20
|
+
"dist/src/api/",
|
|
21
|
+
"dist/src/middleware/",
|
|
22
|
+
"dist/src/models/",
|
|
23
|
+
"dist/src/types/",
|
|
24
|
+
"dist/src/utils/",
|
|
25
|
+
"bin/fraim.js",
|
|
26
|
+
"public/first-run/",
|
|
27
|
+
"index.js",
|
|
28
|
+
"README.md",
|
|
29
|
+
"CHANGELOG.md",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"package.json"
|
|
32
|
+
],
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=16.0.0"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@octokit/rest": "^22.0.1",
|
|
41
|
+
"adm-zip": "^0.5.16",
|
|
42
|
+
"axios": "^1.7.0",
|
|
43
|
+
"chalk": "4.1.2",
|
|
44
|
+
"commander": "^14.0.2",
|
|
45
|
+
"cors": "^2.8.5",
|
|
46
|
+
"dotenv": "^16.4.7",
|
|
47
|
+
"express": "^5.2.1",
|
|
48
|
+
"mongodb": "^7.0.0",
|
|
49
|
+
"node-cron": "4.2.1",
|
|
50
|
+
"node-edge-tts": "^1.2.10",
|
|
51
|
+
"nodemailer": "^8.0.3",
|
|
52
|
+
"prompts": "^2.4.2",
|
|
53
|
+
"resend": "^6.9.3",
|
|
54
|
+
"selfsigned": "^5.5.0",
|
|
55
|
+
"semver": "^7.7.4",
|
|
56
|
+
"stripe": "^20.3.1",
|
|
57
|
+
"toml": "^3.0.0",
|
|
58
|
+
"tree-kill": "^1.2.2",
|
|
59
|
+
"xml2js": "^0.6.2"
|
|
60
|
+
}
|
|
61
|
+
}
|