fraim-framework 2.0.180 → 2.0.182

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.
@@ -345,7 +345,7 @@ const runAddIDE = async (options) => {
345
345
  // Check if any provider tokens exist
346
346
  const allProviderIds = await (0, provider_registry_1.getAllProviderIds)();
347
347
  const hasAnyToken = allProviderIds.some(id => platformTokens[id]);
348
- if (!hasAnyToken && !isConversationalMode) {
348
+ if (!hasAnyToken && !isConversationalMode && !options.skipTokenPrompts) {
349
349
  console.log(chalk_1.default.yellow('⚠️ No provider tokens found in configuration.'));
350
350
  // Prompt for first integrated provider as default
351
351
  const integratedProviders = await (0, provider_registry_1.getProvidersWithCapability)('integrated');
@@ -434,7 +434,14 @@ const runAddIDE = async (options) => {
434
434
  });
435
435
  }
436
436
  if (results.successful.length > 0) {
437
- const { describeConfiguredInvocationSurfaces } = await Promise.resolve().then(() => __importStar(require('../setup/ide-global-integration')));
437
+ const { installSlashCommands, installGlobalRules, describeConfiguredInvocationSurfaces } = await Promise.resolve().then(() => __importStar(require('../setup/ide-global-integration')));
438
+ try {
439
+ await installSlashCommands();
440
+ await installGlobalRules();
441
+ }
442
+ catch (e) {
443
+ console.log(chalk_1.default.yellow(`⚠️ IDE surface installation encountered issues: ${e.message}`));
444
+ }
438
445
  const successfulIDEs = idesToConfigure.filter(ide => results.successful.includes(ide.name));
439
446
  const invocationSummaries = describeConfiguredInvocationSurfaces(successfulIDEs);
440
447
  console.log(chalk_1.default.blue('\n🔄 Next steps:'));
@@ -43,7 +43,7 @@ const chalk_1 = __importDefault(require("chalk"));
43
43
  const prompts_1 = __importDefault(require("prompts"));
44
44
  const fs_1 = __importDefault(require("fs"));
45
45
  const path_1 = __importDefault(require("path"));
46
- const auto_mcp_setup_1 = require("../setup/auto-mcp-setup");
46
+ const add_ide_1 = require("./add-ide");
47
47
  const provider_registry_1 = require("../providers/provider-registry");
48
48
  const script_sync_utils_1 = require("../utils/script-sync-utils");
49
49
  function parseModeOption(mode) {
@@ -252,7 +252,7 @@ const runSetup = async (options) => {
252
252
  console.log(chalk_1.default.blue('\n💾 Saving global configuration...'));
253
253
  (0, exports.saveGlobalConfig)(fraimKey, mode);
254
254
  console.log(chalk_1.default.blue('\n🔌 Configuring MCP servers...'));
255
- await (0, auto_mcp_setup_1.autoConfigureMCP)(fraimKey, options.ide ? [options.ide] : undefined);
255
+ await (0, add_ide_1.runAddIDE)({ ide: options.ide, all: !options.ide, skipTokenPrompts: true });
256
256
  console.log(chalk_1.default.green('\n🎯 Reconfiguration complete!'));
257
257
  console.log(chalk_1.default.cyan('\n💡 To connect platforms, run: fraim add-provider <github|gitlab|ado|jira>'));
258
258
  return;
@@ -280,39 +280,19 @@ const runSetup = async (options) => {
280
280
  // Save global configuration (key + mode only; provider tokens live in IDE MCP configs)
281
281
  console.log(chalk_1.default.blue('💾 Saving global configuration...'));
282
282
  (0, exports.saveGlobalConfig)(fraimKey, mode);
283
- // Configure MCP servers
284
- if (!isUpdate) {
285
- console.log(chalk_1.default.blue('\n🔌 Configuring MCP servers...'));
286
- if (mode === 'conversational') {
287
- console.log(chalk_1.default.yellow('ℹ️ Conversational mode: Configuring FRAIM MCP server'));
288
- console.log(chalk_1.default.gray(' FRAIM jobs will work; platform-specific features are added via fraim add-provider\n'));
289
- }
290
- try {
291
- await (0, auto_mcp_setup_1.autoConfigureMCP)(fraimKey, options.ide ? [options.ide] : undefined);
292
- }
293
- catch (e) {
294
- console.log(chalk_1.default.yellow('⚠️ MCP configuration encountered issues'));
295
- console.log(chalk_1.default.gray(' You can configure MCP manually or run setup again later\n'));
296
- }
283
+ // Configure MCP servers and install IDE surfaces (slash commands, rules)
284
+ // Delegates entirely to add-ide so there is one implementation of this logic.
285
+ console.log(chalk_1.default.blue(isUpdate ? '\n🔄 Updating IDE MCP configurations...' : '\n🔌 Configuring MCP servers...'));
286
+ if (!isUpdate && mode === 'conversational') {
287
+ console.log(chalk_1.default.yellow('ℹ️ Conversational mode: Configuring FRAIM MCP server'));
288
+ console.log(chalk_1.default.gray(' FRAIM jobs will work; platform-specific features are added via fraim add-provider\n'));
297
289
  }
298
- else {
299
- console.log(chalk_1.default.blue('\n🔄 Updating IDE MCP configurations...'));
300
- try {
301
- const { detectInstalledIDEs } = await Promise.resolve().then(() => __importStar(require('../setup/ide-detector')));
302
- const installedIDEs = detectInstalledIDEs();
303
- if (installedIDEs.length === 0) {
304
- console.log(chalk_1.default.gray(' No IDE configurations found to update'));
305
- }
306
- else {
307
- const ideNames = installedIDEs.map(ide => ide.name);
308
- await (0, auto_mcp_setup_1.autoConfigureMCP)(fraimKey, ideNames);
309
- console.log(chalk_1.default.green(`✅ Updated MCP configs for: ${ideNames.join(', ')}`));
310
- }
311
- }
312
- catch (e) {
313
- console.log(chalk_1.default.yellow('⚠️ Failed to update IDE MCP configurations'));
314
- console.log(chalk_1.default.gray(' You can update them manually with: fraim add-ide <ide-name>\n'));
315
- }
290
+ try {
291
+ await (0, add_ide_1.runAddIDE)({ ide: options.ide, all: isUpdate || !options.ide, skipTokenPrompts: true });
292
+ }
293
+ catch (e) {
294
+ console.log(chalk_1.default.yellow('⚠️ MCP configuration encountered issues'));
295
+ console.log(chalk_1.default.gray(' You can configure MCP manually or run setup again later\n'));
316
296
  }
317
297
  // Sync user-level FRAIM artifacts (always, on both initial and update)
318
298
  try {
@@ -324,16 +304,6 @@ const runSetup = async (options) => {
324
304
  console.log(chalk_1.default.yellow(`⚠️ User-level content sync encountered issues: ${e.message}`));
325
305
  console.log(chalk_1.default.gray(' You can sync later with: fraim sync --global'));
326
306
  }
327
- // Install IDE slash commands and global rules
328
- try {
329
- const { installSlashCommands, installGlobalRules } = await Promise.resolve().then(() => __importStar(require('../setup/ide-global-integration')));
330
- console.log(chalk_1.default.blue('\n🔗 Installing IDE integrations...'));
331
- await installSlashCommands();
332
- await installGlobalRules();
333
- }
334
- catch (e) {
335
- console.log(chalk_1.default.yellow(`⚠️ IDE integration encountered issues: ${e.message}`));
336
- }
337
307
  // Show mode-aware summary with clear value prop and next steps
338
308
  console.log(chalk_1.default.green('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
339
309
  console.log(chalk_1.default.green(' FRAIM is ready!'));
@@ -161,14 +161,19 @@ exports.IDE_CONFIGS = [
161
161
  },
162
162
  {
163
163
  name: 'Claude Desktop / Cowork',
164
- configPath: '~/AppData/Roaming/Claude/claude_desktop_config.json',
164
+ configPath: process.platform === 'win32'
165
+ ? '~/AppData/Roaming/Claude/claude_desktop_config.json'
166
+ : process.platform === 'darwin'
167
+ ? '~/Library/Application Support/Claude/claude_desktop_config.json'
168
+ : '~/.config/Claude/claude_desktop_config.json',
165
169
  configFormat: 'json',
166
170
  configType: 'claude',
167
171
  invocationProfile: 'launch-phrase',
168
172
  detectMethod: guiAppDetect(detectClaude, 'Claude'),
169
173
  aliases: ['claude', 'claude-desktop', 'claude desktop', 'claude-cowork', 'cowork', 'claude cowork'],
170
174
  alternativePaths: [
171
- '~/Library/Application Support/Claude/claude_desktop_config.json'
175
+ '~/AppData/Roaming/Claude/claude_desktop_config.json',
176
+ '~/Library/Application Support/Claude/claude_desktop_config.json',
172
177
  ],
173
178
  description: 'Anthropic Claude Desktop chat and Cowork surfaces',
174
179
  downloadUrl: 'https://claude.ai/download',
@@ -46,17 +46,18 @@ function normalizeAutomation(config) {
46
46
  const support = config?.automation?.support;
47
47
  if (!support || typeof support !== 'object')
48
48
  return undefined;
49
+ const playbooks = support.playbooks && typeof support.playbooks === 'object'
50
+ ? support.playbooks
51
+ : {};
49
52
  return {
50
53
  support: {
51
54
  startMode: support.startMode,
52
55
  defaultDecisionMode: support.defaultDecisionMode,
53
- playbooks: support.playbooks && typeof support.playbooks === 'object'
54
- ? {
55
- directory: support.playbooks.directory,
56
- decisionCommand: support.playbooks.decisionCommand,
57
- decisionTimeoutMs: support.playbooks.decisionTimeoutMs
58
- }
59
- : undefined,
56
+ playbooks: {
57
+ directory: playbooks.directory || types_1.DEFAULT_SUPPORT_PLAYBOOKS_DIRECTORY,
58
+ decisionCommand: playbooks.decisionCommand,
59
+ decisionTimeoutMs: playbooks.decisionTimeoutMs
60
+ },
60
61
  actionAdapters: support.actionAdapters && typeof support.actionAdapters === 'object'
61
62
  ? support.actionAdapters
62
63
  : undefined,
@@ -71,7 +72,8 @@ function normalizeAutomation(config) {
71
72
  pollIntervalSeconds: support.queue.pollIntervalSeconds,
72
73
  successState: support.queue.successState,
73
74
  failureState: support.queue.failureState,
74
- closeState: support.queue.closeState
75
+ closeState: support.queue.closeState,
76
+ accessScript: support.queue.accessScript
75
77
  }
76
78
  : undefined,
77
79
  requestTypes: support.requestTypes && typeof support.requestTypes === 'object'
@@ -4,7 +4,8 @@
4
4
  * TypeScript types for the workspace FRAIM config file.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.DEFAULT_FRAIM_CONFIG = void 0;
7
+ exports.DEFAULT_FRAIM_CONFIG = exports.DEFAULT_SUPPORT_PLAYBOOKS_DIRECTORY = void 0;
8
+ exports.DEFAULT_SUPPORT_PLAYBOOKS_DIRECTORY = 'playbooks/support';
8
9
  /**
9
10
  * Default configuration values
10
11
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fraim-framework",
3
- "version": "2.0.180",
3
+ "version": "2.0.182",
4
4
  "description": "FRAIM: AI Workforce Infrastructure — the organizational capability that turns AI agents into an accountable workforce, their operators into capable AI managers, and executives into leaders with clear optics on AI proficiency.",
5
5
  "main": "index.js",
6
6
  "bin": {