fraim 2.0.130 → 2.0.132
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.
|
@@ -660,6 +660,7 @@ const runSetup = async (options) => {
|
|
|
660
660
|
console.log(chalk_1.default.gray(' legal, product, hiring, customer development, and more.'));
|
|
661
661
|
// Ask how the user wants to work with their AI employees.
|
|
662
662
|
// Skip prompt when the user already chose on a previous run (R2.2/R3.2/R4.6).
|
|
663
|
+
// Also skip in non-interactive environments (CI, tests, automated installs).
|
|
663
664
|
const { writeSetupHandoffChoice, readSetupHandoffChoice } = await Promise.resolve().then(() => __importStar(require('../../core/utils/setup-preferences')));
|
|
664
665
|
const storedChoice = readSetupHandoffChoice();
|
|
665
666
|
let choice;
|
|
@@ -667,6 +668,11 @@ const runSetup = async (options) => {
|
|
|
667
668
|
console.log(chalk_1.default.gray(`\n Using your saved preference: ${storedChoice === 'ide' ? 'In my IDE' : 'In FRAIM Hub'}`));
|
|
668
669
|
choice = storedChoice;
|
|
669
670
|
}
|
|
671
|
+
else if (process.env.FRAIM_NON_INTERACTIVE || process.env.CI) {
|
|
672
|
+
// In non-interactive environments, default to IDE mode (no browser launch)
|
|
673
|
+
console.log(chalk_1.default.gray('\n Non-interactive mode: defaulting to IDE setup'));
|
|
674
|
+
choice = 'ide';
|
|
675
|
+
}
|
|
670
676
|
else {
|
|
671
677
|
const userTypeResponse = await (0, prompts_1.default)({
|
|
672
678
|
type: 'select',
|
|
@@ -290,8 +290,17 @@ class FirstRunSessionService {
|
|
|
290
290
|
}
|
|
291
291
|
const fraimRow = this.getRow('fraim');
|
|
292
292
|
if (commandVersion('npx') !== null) {
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
// Only mark ok if setup has previously completed (config.json is written after autoConfigureMCP).
|
|
294
|
+
// Without this, the wizard skips runFraimRow entirely and autoConfigureMCP never runs for IDEs.
|
|
295
|
+
const globalConfigPath = path_1.default.join((0, script_sync_utils_1.getUserFraimDir)(), 'config.json');
|
|
296
|
+
if (fs_1.default.existsSync(globalConfigPath)) {
|
|
297
|
+
fraimRow.status = 'ok';
|
|
298
|
+
fraimRow.verb = 'ready';
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
fraimRow.status = 'pending';
|
|
302
|
+
fraimRow.verb = "we'll configure your IDEs";
|
|
303
|
+
}
|
|
295
304
|
persistShellPath();
|
|
296
305
|
}
|
|
297
306
|
else {
|
|
@@ -521,11 +530,14 @@ class FirstRunSessionService {
|
|
|
521
530
|
await runProcess('npm', ['install', '-g', 'fraim-framework@latest'], { npm_config_prefix: prefix });
|
|
522
531
|
}
|
|
523
532
|
persistShellPath();
|
|
524
|
-
(0, setup_1.saveGlobalConfig)(this.key, 'conversational', {}, {});
|
|
525
533
|
const detectedIDEs = (0, ide_detector_1.detectInstalledIDEs)();
|
|
526
534
|
if (detectedIDEs.length > 0) {
|
|
527
535
|
await (0, auto_mcp_setup_1.autoConfigureMCP)(this.key, {}, detectedIDEs.map((ide) => ide.name), {});
|
|
528
536
|
}
|
|
537
|
+
// Write config.json after autoConfigureMCP so detectRowsOnLoad can use its
|
|
538
|
+
// existence as a signal that IDE setup completed. Writing it before would cause
|
|
539
|
+
// the wizard to mark this row 'ok' on retry before IDEs are actually configured.
|
|
540
|
+
(0, setup_1.saveGlobalConfig)(this.key, 'conversational', {}, {});
|
|
529
541
|
const { syncUserLevelArtifacts } = await Promise.resolve().then(() => __importStar(require('../cli/setup/user-level-sync')));
|
|
530
542
|
await syncUserLevelArtifacts();
|
|
531
543
|
const { installSlashCommands, installGlobalRules } = await Promise.resolve().then(() => __importStar(require('../cli/setup/ide-global-integration')));
|