fraim-framework 2.0.185 → 2.0.187
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/dist/src/ai-hub/conversation-store.js +97 -6
- package/dist/src/ai-hub/hosts.js +127 -15
- package/dist/src/ai-hub/openclaw-bridge.js +17 -6
- package/dist/src/ai-hub/server.js +215 -38
- package/dist/src/cli/commands/add-ide.js +3 -2
- package/dist/src/cli/commands/add-provider.js +7 -1
- package/dist/src/cli/commands/sync.js +2 -1
- package/dist/src/cli/mcp/ide-formats.js +36 -1
- package/dist/src/cli/setup/auto-mcp-setup.js +1 -1
- package/dist/src/cli/setup/ide-detector.js +29 -1
- package/dist/src/cli/setup/ide-global-integration.js +1 -1
- package/dist/src/cli/setup/mcp-config-generator.js +12 -1
- package/dist/src/cli/utils/agent-adapters.js +8 -2
- package/dist/src/first-run/types.js +1 -1
- package/package.json +1 -1
- package/public/ai-hub/script.js +484 -28
- package/public/ai-hub/styles.css +30 -0
|
@@ -121,6 +121,9 @@ const detectWindsurf = () => {
|
|
|
121
121
|
const detectGeminiCli = () => {
|
|
122
122
|
return availableByVersionProbe('gemini');
|
|
123
123
|
};
|
|
124
|
+
const detectCopilotCli = () => {
|
|
125
|
+
return availableByVersionProbe('copilot');
|
|
126
|
+
};
|
|
124
127
|
const detectGeminiSurface = () => {
|
|
125
128
|
const paths = [
|
|
126
129
|
'~/.gemini',
|
|
@@ -130,6 +133,15 @@ const detectGeminiSurface = () => {
|
|
|
130
133
|
];
|
|
131
134
|
return checkMultiplePaths(paths);
|
|
132
135
|
};
|
|
136
|
+
const detectCopilotSurface = () => {
|
|
137
|
+
const paths = [
|
|
138
|
+
process.env.COPILOT_HOME ? path_1.default.join(process.env.COPILOT_HOME, 'mcp-config.json') : '',
|
|
139
|
+
process.env.COPILOT_HOME || '',
|
|
140
|
+
'~/.copilot',
|
|
141
|
+
'~/.copilot/mcp-config.json'
|
|
142
|
+
].filter(Boolean);
|
|
143
|
+
return detectCopilotCli() || checkMultiplePaths(paths);
|
|
144
|
+
};
|
|
133
145
|
const detectCodexSurface = () => {
|
|
134
146
|
const paths = [
|
|
135
147
|
'~/.codex',
|
|
@@ -204,6 +216,20 @@ exports.IDE_CONFIGS = [
|
|
|
204
216
|
description: 'Google Gemini CLI local settings',
|
|
205
217
|
downloadUrl: 'https://github.com/google-gemini/gemini-cli',
|
|
206
218
|
},
|
|
219
|
+
{
|
|
220
|
+
name: 'GitHub Copilot CLI',
|
|
221
|
+
configPath: process.env.COPILOT_HOME
|
|
222
|
+
? path_1.default.join(process.env.COPILOT_HOME, 'mcp-config.json')
|
|
223
|
+
: '~/.copilot/mcp-config.json',
|
|
224
|
+
configFormat: 'json',
|
|
225
|
+
configType: 'copilot-cli',
|
|
226
|
+
invocationProfile: 'instructions-only',
|
|
227
|
+
detectMethod: detectCopilotSurface,
|
|
228
|
+
supportsConfigBootstrap: true,
|
|
229
|
+
aliases: ['copilot', 'copilot-cli', 'github copilot', 'github copilot cli'],
|
|
230
|
+
description: 'GitHub Copilot CLI local MCP settings',
|
|
231
|
+
downloadUrl: 'https://docs.github.com/copilot/how-tos/use-copilot-agents/use-copilot-cli',
|
|
232
|
+
},
|
|
207
233
|
{
|
|
208
234
|
name: 'Kiro',
|
|
209
235
|
configPath: '~/.kiro/settings/mcp.json',
|
|
@@ -305,7 +331,7 @@ const _cacheTimestamps = new Map();
|
|
|
305
331
|
const _cacheHomeDirs = new Map();
|
|
306
332
|
const DETECT_CACHE_TTL_MS = 5000;
|
|
307
333
|
/** configTypes that require a binary probe in cli-runnable mode; config folder alone is insufficient. */
|
|
308
|
-
exports.CLI_PROBE_CONFIGTYPES = new Set(['claude-code', 'codex', 'grok', 'gemini-cli']);
|
|
334
|
+
exports.CLI_PROBE_CONFIGTYPES = new Set(['claude-code', 'codex', 'grok', 'gemini-cli', 'copilot-cli']);
|
|
309
335
|
const isDetectedForMode = (ide, mode) => {
|
|
310
336
|
if (mode === 'cli-runnable') {
|
|
311
337
|
switch (ide.configType) {
|
|
@@ -317,6 +343,8 @@ const isDetectedForMode = (ide, mode) => {
|
|
|
317
343
|
return availableByVersionProbe('grok');
|
|
318
344
|
case 'gemini-cli':
|
|
319
345
|
return detectGeminiCli();
|
|
346
|
+
case 'copilot-cli':
|
|
347
|
+
return detectCopilotCli();
|
|
320
348
|
default:
|
|
321
349
|
return false;
|
|
322
350
|
}
|
|
@@ -55,7 +55,7 @@ async function installSlashCommands(homeDir) {
|
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Install FRAIM invocation artifacts for non-Claude IDEs.
|
|
58
|
-
* Supports: Cursor, Codex, Grok, Gemini CLI, Windsurf, Kiro
|
|
58
|
+
* Supports: Cursor, Codex, Grok, Gemini CLI, Copilot CLI, Windsurf, Kiro
|
|
59
59
|
* Does not overwrite existing files.
|
|
60
60
|
*/
|
|
61
61
|
async function installGlobalRules(homeDir) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateMCPConfig = exports.generateWindsurfMCPServers = exports.generateGeminiCliMCPServers = exports.generateVSCodeMCPServers = exports.generateGrokMCPServers = exports.generateCodexMCPServers = exports.generateKiroMCPServers = exports.generateClaudeCodeMCPServers = exports.generateClaudeMCPServers = exports.generateStandardMCPServers = exports.mergeTomlMCPServers = exports.extractTomlMcpServerBlock = void 0;
|
|
3
|
+
exports.generateMCPConfig = exports.generateWindsurfMCPServers = exports.generateCopilotCliMCPServers = exports.generateGeminiCliMCPServers = exports.generateVSCodeMCPServers = exports.generateGrokMCPServers = exports.generateCodexMCPServers = exports.generateKiroMCPServers = exports.generateClaudeCodeMCPServers = exports.generateClaudeMCPServers = exports.generateStandardMCPServers = exports.mergeTomlMCPServers = exports.extractTomlMcpServerBlock = void 0;
|
|
4
4
|
const mcp_server_builder_1 = require("../mcp/mcp-server-builder");
|
|
5
5
|
const ide_formats_1 = require("../mcp/ide-formats");
|
|
6
6
|
const normalizeTokens = (tokenInput) => {
|
|
@@ -178,6 +178,15 @@ const generateGeminiCliMCPServers = async (fraimKey, tokenInput, providerConfigs
|
|
|
178
178
|
return format.transform(builder.getServers());
|
|
179
179
|
};
|
|
180
180
|
exports.generateGeminiCliMCPServers = generateGeminiCliMCPServers;
|
|
181
|
+
const generateCopilotCliMCPServers = async (fraimKey, tokenInput, providerConfigs) => {
|
|
182
|
+
const tokens = normalizeTokens(tokenInput);
|
|
183
|
+
const builder = new mcp_server_builder_1.MCPServerBuilder();
|
|
184
|
+
builder.addBaseServers(fraimKey);
|
|
185
|
+
await addProviderServers(builder, tokens, providerConfigs);
|
|
186
|
+
const format = (0, ide_formats_1.getIDEFormat)('copilot-cli');
|
|
187
|
+
return format.transform(builder.getServers());
|
|
188
|
+
};
|
|
189
|
+
exports.generateCopilotCliMCPServers = generateCopilotCliMCPServers;
|
|
181
190
|
const generateWindsurfMCPServers = async (fraimKey, tokenInput, providerConfigs) => {
|
|
182
191
|
const tokens = normalizeTokens(tokenInput);
|
|
183
192
|
const builder = new mcp_server_builder_1.MCPServerBuilder();
|
|
@@ -201,6 +210,8 @@ const generateMCPConfig = async (configType, fraimKey, tokenInput, providerConfi
|
|
|
201
210
|
return await (0, exports.generateVSCodeMCPServers)(fraimKey, tokenInput, providerConfigs);
|
|
202
211
|
case 'gemini-cli':
|
|
203
212
|
return await (0, exports.generateGeminiCliMCPServers)(fraimKey, tokenInput, providerConfigs);
|
|
213
|
+
case 'copilot-cli':
|
|
214
|
+
return await (0, exports.generateCopilotCliMCPServers)(fraimKey, tokenInput, providerConfigs);
|
|
204
215
|
case 'codex':
|
|
205
216
|
return await (0, exports.generateCodexMCPServers)(fraimKey, tokenInput, providerConfigs);
|
|
206
217
|
case 'grok':
|
|
@@ -21,6 +21,9 @@ const GEMINI_FRAIM_COMMAND_PATH = path_1.default.join('.gemini', 'commands', 'fr
|
|
|
21
21
|
const GEMINI_PROJECT_INSTRUCTIONS_PATH = path_1.default.join('.gemini', 'GEMINI.md');
|
|
22
22
|
const WINDSURF_FRAIM_COMMAND_PATH = path_1.default.join('.windsurf', 'commands', 'fraim.md');
|
|
23
23
|
const KIRO_FRAIM_COMMAND_PATH = path_1.default.join('.kiro', 'commands', 'fraim.md');
|
|
24
|
+
function adapterConfigTypes(file) {
|
|
25
|
+
return Array.isArray(file.configType) ? file.configType : [file.configType];
|
|
26
|
+
}
|
|
24
27
|
function buildManagedSection(body) {
|
|
25
28
|
return `${START_MARKER}
|
|
26
29
|
${body.trim()}
|
|
@@ -113,7 +116,7 @@ ${(0, ide_invocation_surfaces_1.buildFraimInvocationBody)('generic-tool-discover
|
|
|
113
116
|
const all = [
|
|
114
117
|
{ path: 'AGENTS.md', content: markdownBody, configType: 'standard' },
|
|
115
118
|
{ path: 'CLAUDE.md', content: markdownBody, configType: 'standard' },
|
|
116
|
-
{ path: path_1.default.join('.github', 'copilot-instructions.md'), content: copilotBody, configType: 'vscode' },
|
|
119
|
+
{ path: path_1.default.join('.github', 'copilot-instructions.md'), content: copilotBody, configType: ['vscode', 'copilot-cli'] },
|
|
117
120
|
{ path: CURSOR_RULE_PATH, content: cursorManagedBody, configType: 'cursor' },
|
|
118
121
|
{ path: VSCODE_FRAIM_PROMPT_PATH, content: vscodePrompt, configType: 'vscode' },
|
|
119
122
|
{ path: path_1.default.join(project_fraim_paths_1.WORKSPACE_FRAIM_DIRNAME, 'README.md'), content: fraimReadme, configType: 'standard' },
|
|
@@ -129,7 +132,10 @@ ${(0, ide_invocation_surfaces_1.buildFraimInvocationBody)('generic-tool-discover
|
|
|
129
132
|
if (allowedConfigTypes === null) {
|
|
130
133
|
return all;
|
|
131
134
|
}
|
|
132
|
-
return all.filter(f =>
|
|
135
|
+
return all.filter((f) => {
|
|
136
|
+
const types = adapterConfigTypes(f);
|
|
137
|
+
return types.includes('standard') || types.some((type) => allowedConfigTypes.includes(type));
|
|
138
|
+
});
|
|
133
139
|
}
|
|
134
140
|
function getAdapterConfigTypes() {
|
|
135
141
|
const result = {};
|
|
@@ -53,7 +53,7 @@ exports.FIRST_RUN_AGENT_OPTIONS = [
|
|
|
53
53
|
{
|
|
54
54
|
id: 'copilot-cli',
|
|
55
55
|
label: 'GitHub Copilot',
|
|
56
|
-
detectAliases: ['copilot'],
|
|
56
|
+
detectAliases: ['copilot', 'copilot-cli', 'github copilot cli'],
|
|
57
57
|
loginCommand: 'copilot login',
|
|
58
58
|
launchCommand: 'copilot',
|
|
59
59
|
installPackage: '@github/copilot',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fraim-framework",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.187",
|
|
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": {
|