@fractary/core-mcp 0.2.2 → 0.3.0
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/config.d.ts +33 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +113 -116
- package/dist/config.js.map +1 -1
- package/dist/handlers/file.d.ts +15 -0
- package/dist/handlers/file.d.ts.map +1 -1
- package/dist/handlers/file.js +79 -24
- package/dist/handlers/file.js.map +1 -1
- package/dist/handlers/security.d.ts +1 -15
- package/dist/handlers/security.d.ts.map +1 -1
- package/dist/handlers/security.js +4 -42
- package/dist/handlers/security.js.map +1 -1
- package/package.json +2 -3
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { sanitizeSecrets } from '@fractary/core/common/secrets';
|
|
1
2
|
/**
|
|
2
3
|
* Configuration interface for the MCP server
|
|
4
|
+
*
|
|
5
|
+
* This is a flattened view of the SDK's handler-based configuration,
|
|
6
|
+
* designed for simpler tool access patterns.
|
|
3
7
|
*/
|
|
4
8
|
export interface Config {
|
|
5
9
|
work?: {
|
|
@@ -24,17 +28,41 @@ export interface Config {
|
|
|
24
28
|
};
|
|
25
29
|
file?: {
|
|
26
30
|
basePath?: string;
|
|
31
|
+
sources?: Record<string, {
|
|
32
|
+
type: 'local' | 's3' | 'r2' | 'gcs' | 'gdrive';
|
|
33
|
+
bucket?: string;
|
|
34
|
+
prefix?: string;
|
|
35
|
+
region?: string;
|
|
36
|
+
projectId?: string;
|
|
37
|
+
accountId?: string;
|
|
38
|
+
folderId?: string;
|
|
39
|
+
local?: {
|
|
40
|
+
basePath: string;
|
|
41
|
+
};
|
|
42
|
+
auth?: {
|
|
43
|
+
profile?: string;
|
|
44
|
+
accessKeyId?: string;
|
|
45
|
+
secretAccessKey?: string;
|
|
46
|
+
keyFilePath?: string;
|
|
47
|
+
};
|
|
48
|
+
publicUrl?: string;
|
|
49
|
+
}>;
|
|
27
50
|
};
|
|
28
51
|
docs?: {
|
|
29
52
|
docsDir?: string;
|
|
30
53
|
};
|
|
31
54
|
}
|
|
32
55
|
/**
|
|
33
|
-
* Load configuration
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
56
|
+
* Load configuration using the SDK's unified config loader
|
|
57
|
+
*
|
|
58
|
+
* This delegates to @fractary/core's loadConfig which handles:
|
|
59
|
+
* - Loading .env files
|
|
60
|
+
* - Loading YAML config from .fractary/config.yaml or .fractary/core/config.yaml
|
|
61
|
+
* - Environment variable substitution
|
|
62
|
+
* - Token provider creation
|
|
63
|
+
*
|
|
64
|
+
* The SDK config is then converted to MCP's flat format for tool access.
|
|
38
65
|
*/
|
|
39
66
|
export declare function loadConfig(): Promise<Config>;
|
|
67
|
+
export { sanitizeSecrets };
|
|
40
68
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,CAAC,EAAE;QACL,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;QACvC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;QAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,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from 'fs';
|
|
5
|
-
import { sanitizeSecrets } from './handlers/security.js';
|
|
6
|
-
import { loadYamlConfig, findProjectRoot } from '@fractary/core/common/yaml-config';
|
|
1
|
+
import { loadConfig as sdkLoadConfig, loadEnv, } from '@fractary/core/config';
|
|
2
|
+
import { sanitizeSecrets } from '@fractary/core/common/secrets';
|
|
7
3
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Priority:
|
|
10
|
-
* 1. Environment variables
|
|
11
|
-
* 2. Project config: {cwd}/.fractary/core/config.yaml
|
|
12
|
-
* 3. User config: ~/.fractary/core/config.yaml
|
|
4
|
+
* Type guard to safely check if a value is an object
|
|
13
5
|
*/
|
|
14
|
-
|
|
6
|
+
function isObject(value) {
|
|
7
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Convert SDK's LoadedConfig to MCP's flat Config format
|
|
11
|
+
*
|
|
12
|
+
* The SDK uses a handler-based config structure (active_handler + handlers map),
|
|
13
|
+
* while MCP uses a flattened structure for simpler tool access.
|
|
14
|
+
*/
|
|
15
|
+
function convertToMcpConfig(sdkConfig) {
|
|
15
16
|
const config = {};
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (process.env.GITHUB_TOKEN && !config.work) {
|
|
17
|
+
// Convert work config
|
|
18
|
+
if (sdkConfig.work) {
|
|
19
|
+
const activeHandler = sdkConfig.work.active_handler;
|
|
20
|
+
const handlerConfig = sdkConfig.work.handlers?.[activeHandler] || {};
|
|
21
21
|
config.work = {
|
|
22
|
-
platform:
|
|
23
|
-
owner:
|
|
24
|
-
repo:
|
|
25
|
-
token:
|
|
22
|
+
platform: activeHandler,
|
|
23
|
+
owner: handlerConfig.owner,
|
|
24
|
+
repo: handlerConfig.repo,
|
|
25
|
+
token: handlerConfig.token,
|
|
26
|
+
project: handlerConfig.project,
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
// Convert repo config
|
|
30
|
+
if (sdkConfig.repo) {
|
|
31
|
+
const activeHandler = sdkConfig.repo.active_handler;
|
|
32
|
+
const handlerConfig = sdkConfig.repo.handlers?.[activeHandler] || {};
|
|
33
|
+
config.repo = {
|
|
34
|
+
platform: activeHandler,
|
|
35
|
+
owner: handlerConfig.owner,
|
|
36
|
+
repo: handlerConfig.repo,
|
|
37
|
+
token: handlerConfig.token,
|
|
38
|
+
defaultBranch: sdkConfig.repo.defaults?.default_branch,
|
|
33
39
|
};
|
|
34
40
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
// Convert spec config - SDK uses storage-based config
|
|
42
|
+
if (sdkConfig.spec && isObject(sdkConfig.spec)) {
|
|
43
|
+
const storage = sdkConfig.spec.storage;
|
|
44
|
+
config.spec = {
|
|
45
|
+
localPath: storage?.local?.path,
|
|
39
46
|
};
|
|
40
47
|
}
|
|
41
|
-
//
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
repo: process.env.GITHUB_REPO,
|
|
47
|
-
token: process.env.GITHUB_TOKEN,
|
|
48
|
+
// Convert logs config - SDK uses storage-based config
|
|
49
|
+
if (sdkConfig.logs && isObject(sdkConfig.logs)) {
|
|
50
|
+
const storage = sdkConfig.logs.storage;
|
|
51
|
+
config.logs = {
|
|
52
|
+
localPath: storage?.local?.path,
|
|
48
53
|
};
|
|
49
54
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
// Convert file config - SDK uses sources-based config
|
|
56
|
+
if (sdkConfig.file && isObject(sdkConfig.file)) {
|
|
57
|
+
const fileConfig = sdkConfig.file;
|
|
58
|
+
const sources = fileConfig.sources;
|
|
59
|
+
const mcpSources = {};
|
|
60
|
+
if (sources) {
|
|
61
|
+
for (const [name, source] of Object.entries(sources)) {
|
|
62
|
+
if (source && source.type) {
|
|
63
|
+
mcpSources[name] = {
|
|
64
|
+
type: source.type,
|
|
65
|
+
bucket: source.bucket,
|
|
66
|
+
prefix: source.prefix,
|
|
67
|
+
region: source.region,
|
|
68
|
+
projectId: source.projectId,
|
|
69
|
+
accountId: source.accountId,
|
|
70
|
+
folderId: source.folderId,
|
|
71
|
+
local: source.local,
|
|
72
|
+
auth: source.auth,
|
|
73
|
+
publicUrl: source.publicUrl,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
config.file = {
|
|
79
|
+
basePath: fileConfig.global_settings?.basePath,
|
|
80
|
+
sources: Object.keys(mcpSources).length > 0 ? mcpSources : undefined,
|
|
56
81
|
};
|
|
57
82
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
token: process.env.BITBUCKET_TOKEN,
|
|
83
|
+
// Convert docs config - SDK uses output_paths or custom_templates_path
|
|
84
|
+
if (sdkConfig.docs && isObject(sdkConfig.docs)) {
|
|
85
|
+
const docsConfig = sdkConfig.docs;
|
|
86
|
+
config.docs = {
|
|
87
|
+
docsDir: docsConfig.output_paths?.default || docsConfig.custom_templates_path,
|
|
64
88
|
};
|
|
65
89
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
owner: handlerConfig.owner,
|
|
103
|
-
repo: handlerConfig.repo,
|
|
104
|
-
token: handlerConfig.token,
|
|
105
|
-
defaultBranch: fileConfig.repo.defaults?.default_branch,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
if (fileConfig.spec) {
|
|
109
|
-
config.spec = { ...fileConfig.spec, ...config.spec };
|
|
110
|
-
}
|
|
111
|
-
if (fileConfig.logs) {
|
|
112
|
-
config.logs = { ...fileConfig.logs, ...config.logs };
|
|
113
|
-
}
|
|
114
|
-
if (fileConfig.file) {
|
|
115
|
-
config.file = { ...fileConfig.file, ...config.file };
|
|
116
|
-
}
|
|
117
|
-
if (fileConfig.docs) {
|
|
118
|
-
config.docs = { ...fileConfig.docs, ...config.docs };
|
|
119
|
-
}
|
|
120
|
-
// Use first config file found
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
// File doesn't exist or read error - skip to next path
|
|
125
|
-
if (error instanceof Error && 'code' in error && error.code !== 'ENOENT') {
|
|
126
|
-
// Sanitize error message to prevent token/secret exposure (only for non-ENOENT errors)
|
|
127
|
-
// Uses comprehensive secret detection to catch tokens, API keys, bearer auth, etc.
|
|
128
|
-
const sanitizedError = sanitizeSecrets(error.message);
|
|
129
|
-
const sanitizedPath = sanitizeSecrets(configPath);
|
|
130
|
-
console.error(`Failed to load config from ${sanitizedPath}:`, sanitizedError);
|
|
131
|
-
}
|
|
90
|
+
return config;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Sanitize an error for safe logging, including both message and stack trace
|
|
94
|
+
*/
|
|
95
|
+
function sanitizeError(error) {
|
|
96
|
+
const sanitizedMessage = sanitizeSecrets(error.message);
|
|
97
|
+
const sanitizedStack = error.stack ? sanitizeSecrets(error.stack) : undefined;
|
|
98
|
+
return sanitizedStack || sanitizedMessage;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Load configuration using the SDK's unified config loader
|
|
102
|
+
*
|
|
103
|
+
* This delegates to @fractary/core's loadConfig which handles:
|
|
104
|
+
* - Loading .env files
|
|
105
|
+
* - Loading YAML config from .fractary/config.yaml or .fractary/core/config.yaml
|
|
106
|
+
* - Environment variable substitution
|
|
107
|
+
* - Token provider creation
|
|
108
|
+
*
|
|
109
|
+
* The SDK config is then converted to MCP's flat format for tool access.
|
|
110
|
+
*/
|
|
111
|
+
export async function loadConfig() {
|
|
112
|
+
try {
|
|
113
|
+
// Ensure .env is loaded before config
|
|
114
|
+
loadEnv();
|
|
115
|
+
// Use SDK's unified config loader
|
|
116
|
+
const sdkConfig = await sdkLoadConfig({
|
|
117
|
+
warnMissingEnvVars: false, // Don't warn in MCP server context
|
|
118
|
+
});
|
|
119
|
+
// Convert SDK's handler-based config to MCP's flat format
|
|
120
|
+
return convertToMcpConfig(sdkConfig);
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
// Sanitize error message AND stack trace to prevent token/secret exposure
|
|
124
|
+
if (error instanceof Error) {
|
|
125
|
+
console.error(`Failed to load config: ${sanitizeError(error)}`);
|
|
132
126
|
}
|
|
127
|
+
// Return empty config on error - tools will handle missing config gracefully
|
|
128
|
+
return {};
|
|
133
129
|
}
|
|
134
|
-
return config;
|
|
135
130
|
}
|
|
131
|
+
// Re-export sanitizeSecrets for use by handlers
|
|
132
|
+
export { sanitizeSecrets };
|
|
136
133
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,IAAI,aAAa,EAC3B,OAAO,GAER,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC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,SAAS,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,0EAA0E;QAC1E,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,0BAA0B,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClE,CAAC;QACD,6EAA6E;QAC7E,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,gDAAgD;AAChD,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/handlers/file.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Config } from '../config.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function handleFileRead(params: {
|
|
7
7
|
path: string;
|
|
8
|
+
source?: string;
|
|
8
9
|
encoding?: string;
|
|
9
10
|
}, config: Config): Promise<CallToolResult>;
|
|
10
11
|
/**
|
|
@@ -13,6 +14,7 @@ export declare function handleFileRead(params: {
|
|
|
13
14
|
export declare function handleFileWrite(params: {
|
|
14
15
|
path: string;
|
|
15
16
|
content: string;
|
|
17
|
+
source?: string;
|
|
16
18
|
encoding?: string;
|
|
17
19
|
overwrite?: boolean;
|
|
18
20
|
}, config: Config): Promise<CallToolResult>;
|
|
@@ -21,6 +23,7 @@ export declare function handleFileWrite(params: {
|
|
|
21
23
|
*/
|
|
22
24
|
export declare function handleFileList(params: {
|
|
23
25
|
path?: string;
|
|
26
|
+
source?: string;
|
|
24
27
|
pattern?: string;
|
|
25
28
|
recursive?: boolean;
|
|
26
29
|
}, config: Config): Promise<CallToolResult>;
|
|
@@ -29,12 +32,14 @@ export declare function handleFileList(params: {
|
|
|
29
32
|
*/
|
|
30
33
|
export declare function handleFileDelete(params: {
|
|
31
34
|
path: string;
|
|
35
|
+
source?: string;
|
|
32
36
|
}, config: Config): Promise<CallToolResult>;
|
|
33
37
|
/**
|
|
34
38
|
* Handler for fractary_file_exists
|
|
35
39
|
*/
|
|
36
40
|
export declare function handleFileExists(params: {
|
|
37
41
|
path: string;
|
|
42
|
+
source?: string;
|
|
38
43
|
}, config: Config): Promise<CallToolResult>;
|
|
39
44
|
/**
|
|
40
45
|
* Handler for fractary_file_copy
|
|
@@ -42,6 +47,7 @@ export declare function handleFileExists(params: {
|
|
|
42
47
|
export declare function handleFileCopy(params: {
|
|
43
48
|
source: string;
|
|
44
49
|
destination: string;
|
|
50
|
+
sourceStorage?: string;
|
|
45
51
|
overwrite?: boolean;
|
|
46
52
|
}, config: Config): Promise<CallToolResult>;
|
|
47
53
|
/**
|
|
@@ -50,6 +56,15 @@ export declare function handleFileCopy(params: {
|
|
|
50
56
|
export declare function handleFileMove(params: {
|
|
51
57
|
source: string;
|
|
52
58
|
destination: string;
|
|
59
|
+
sourceStorage?: string;
|
|
53
60
|
overwrite?: boolean;
|
|
54
61
|
}, config: Config): Promise<CallToolResult>;
|
|
62
|
+
/**
|
|
63
|
+
* Handler for fractary_file_get_url
|
|
64
|
+
*/
|
|
65
|
+
export declare function handleFileGetUrl(params: {
|
|
66
|
+
path: string;
|
|
67
|
+
source?: string;
|
|
68
|
+
expiresIn?: number;
|
|
69
|
+
}, config: Config): Promise<CallToolResult>;
|
|
55
70
|
//# sourceMappingURL=file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/handlers/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/handlers/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAIpE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAkCtC;;GAEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE;IACN,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MA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AEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE;IACN,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,EACD,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,cAAc,CAAC,CA4BzB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE;IACN,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,EACD,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,cAAc,CAAC,CAczB"}
|
package/dist/handlers/file.js
CHANGED
|
@@ -1,16 +1,40 @@
|
|
|
1
|
-
import { FileManager } from '@fractary/core/file';
|
|
1
|
+
import { FileManager, createStorageFromSource } from '@fractary/core/file';
|
|
2
2
|
import { minimatch } from 'minimatch';
|
|
3
3
|
import { successResult, errorResult } from './helpers.js';
|
|
4
4
|
import { validatePath } from './security.js';
|
|
5
|
+
/**
|
|
6
|
+
* Create a FileManager based on config
|
|
7
|
+
*
|
|
8
|
+
* Supports:
|
|
9
|
+
* 1. Named source from config.file.sources
|
|
10
|
+
* 2. Direct storage config
|
|
11
|
+
* 3. Base path (local storage)
|
|
12
|
+
*/
|
|
13
|
+
function createFileManager(config, options) {
|
|
14
|
+
// If a specific source is requested
|
|
15
|
+
if (options?.source && config.file?.sources?.[options.source]) {
|
|
16
|
+
const storage = createStorageFromSource(options.source, {
|
|
17
|
+
sources: config.file.sources,
|
|
18
|
+
});
|
|
19
|
+
return new FileManager({ storage });
|
|
20
|
+
}
|
|
21
|
+
// If direct storage config is provided
|
|
22
|
+
if (options?.storageConfig) {
|
|
23
|
+
return new FileManager({ storageConfig: options.storageConfig });
|
|
24
|
+
}
|
|
25
|
+
// Default: local storage
|
|
26
|
+
const basePath = config.file?.basePath || '.fractary/files';
|
|
27
|
+
return new FileManager({ basePath });
|
|
28
|
+
}
|
|
5
29
|
/**
|
|
6
30
|
* Handler for fractary_file_read
|
|
7
31
|
*/
|
|
8
32
|
export async function handleFileRead(params, config) {
|
|
9
33
|
try {
|
|
10
34
|
const basePath = config.file?.basePath || '.fractary/files';
|
|
11
|
-
// Validate path to prevent directory traversal
|
|
12
|
-
const safePath = validatePath(params.path, basePath);
|
|
13
|
-
const manager =
|
|
35
|
+
// Validate path to prevent directory traversal (only for local storage)
|
|
36
|
+
const safePath = params.source ? params.path : validatePath(params.path, basePath);
|
|
37
|
+
const manager = createFileManager(config, { source: params.source });
|
|
14
38
|
const content = await manager.read(safePath);
|
|
15
39
|
return successResult({ path: safePath, content });
|
|
16
40
|
}
|
|
@@ -25,9 +49,9 @@ export async function handleFileRead(params, config) {
|
|
|
25
49
|
export async function handleFileWrite(params, config) {
|
|
26
50
|
try {
|
|
27
51
|
const basePath = config.file?.basePath || '.fractary/files';
|
|
28
|
-
// Validate path to prevent directory traversal
|
|
29
|
-
const safePath = validatePath(params.path, basePath);
|
|
30
|
-
const manager =
|
|
52
|
+
// Validate path to prevent directory traversal (only for local storage)
|
|
53
|
+
const safePath = params.source ? params.path : validatePath(params.path, basePath);
|
|
54
|
+
const manager = createFileManager(config, { source: params.source });
|
|
31
55
|
// Check if file exists and overwrite is false
|
|
32
56
|
if (params.overwrite === false) {
|
|
33
57
|
const exists = await manager.exists(safePath);
|
|
@@ -49,9 +73,13 @@ export async function handleFileWrite(params, config) {
|
|
|
49
73
|
export async function handleFileList(params, config) {
|
|
50
74
|
try {
|
|
51
75
|
const basePath = config.file?.basePath || '.fractary/files';
|
|
52
|
-
// Validate path to prevent directory traversal (if provided)
|
|
53
|
-
const safePath = params.path
|
|
54
|
-
|
|
76
|
+
// Validate path to prevent directory traversal (if provided and local storage)
|
|
77
|
+
const safePath = params.path
|
|
78
|
+
? params.source
|
|
79
|
+
? params.path
|
|
80
|
+
: validatePath(params.path, basePath)
|
|
81
|
+
: undefined;
|
|
82
|
+
const manager = createFileManager(config, { source: params.source });
|
|
55
83
|
const files = await manager.list(safePath);
|
|
56
84
|
// Apply pattern filtering if provided using safe minimatch library
|
|
57
85
|
let filteredFiles = files;
|
|
@@ -72,9 +100,9 @@ export async function handleFileList(params, config) {
|
|
|
72
100
|
export async function handleFileDelete(params, config) {
|
|
73
101
|
try {
|
|
74
102
|
const basePath = config.file?.basePath || '.fractary/files';
|
|
75
|
-
// Validate path to prevent directory traversal
|
|
76
|
-
const safePath = validatePath(params.path, basePath);
|
|
77
|
-
const manager =
|
|
103
|
+
// Validate path to prevent directory traversal (only for local storage)
|
|
104
|
+
const safePath = params.source ? params.path : validatePath(params.path, basePath);
|
|
105
|
+
const manager = createFileManager(config, { source: params.source });
|
|
78
106
|
await manager.delete(safePath);
|
|
79
107
|
return successResult({ path: safePath, deleted: true });
|
|
80
108
|
}
|
|
@@ -89,9 +117,9 @@ export async function handleFileDelete(params, config) {
|
|
|
89
117
|
export async function handleFileExists(params, config) {
|
|
90
118
|
try {
|
|
91
119
|
const basePath = config.file?.basePath || '.fractary/files';
|
|
92
|
-
// Validate path to prevent directory traversal
|
|
93
|
-
const safePath = validatePath(params.path, basePath);
|
|
94
|
-
const manager =
|
|
120
|
+
// Validate path to prevent directory traversal (only for local storage)
|
|
121
|
+
const safePath = params.source ? params.path : validatePath(params.path, basePath);
|
|
122
|
+
const manager = createFileManager(config, { source: params.source });
|
|
95
123
|
const exists = await manager.exists(safePath);
|
|
96
124
|
return successResult({ path: safePath, exists });
|
|
97
125
|
}
|
|
@@ -106,10 +134,14 @@ export async function handleFileExists(params, config) {
|
|
|
106
134
|
export async function handleFileCopy(params, config) {
|
|
107
135
|
try {
|
|
108
136
|
const basePath = config.file?.basePath || '.fractary/files';
|
|
109
|
-
// Validate both source and destination paths to prevent directory traversal
|
|
110
|
-
const safeSource =
|
|
111
|
-
|
|
112
|
-
|
|
137
|
+
// Validate both source and destination paths to prevent directory traversal (only for local)
|
|
138
|
+
const safeSource = params.sourceStorage
|
|
139
|
+
? params.source
|
|
140
|
+
: validatePath(params.source, basePath);
|
|
141
|
+
const safeDestination = params.sourceStorage
|
|
142
|
+
? params.destination
|
|
143
|
+
: validatePath(params.destination, basePath);
|
|
144
|
+
const manager = createFileManager(config, { source: params.sourceStorage });
|
|
113
145
|
// Check if destination exists and overwrite is false
|
|
114
146
|
if (params.overwrite === false) {
|
|
115
147
|
const exists = await manager.exists(safeDestination);
|
|
@@ -131,10 +163,14 @@ export async function handleFileCopy(params, config) {
|
|
|
131
163
|
export async function handleFileMove(params, config) {
|
|
132
164
|
try {
|
|
133
165
|
const basePath = config.file?.basePath || '.fractary/files';
|
|
134
|
-
// Validate both source and destination paths to prevent directory traversal
|
|
135
|
-
const safeSource =
|
|
136
|
-
|
|
137
|
-
|
|
166
|
+
// Validate both source and destination paths to prevent directory traversal (only for local)
|
|
167
|
+
const safeSource = params.sourceStorage
|
|
168
|
+
? params.source
|
|
169
|
+
: validatePath(params.source, basePath);
|
|
170
|
+
const safeDestination = params.sourceStorage
|
|
171
|
+
? params.destination
|
|
172
|
+
: validatePath(params.destination, basePath);
|
|
173
|
+
const manager = createFileManager(config, { source: params.sourceStorage });
|
|
138
174
|
// Check if destination exists and overwrite is false
|
|
139
175
|
if (params.overwrite === false) {
|
|
140
176
|
const exists = await manager.exists(safeDestination);
|
|
@@ -150,4 +186,23 @@ export async function handleFileMove(params, config) {
|
|
|
150
186
|
return errorResult(`Error moving file: ${message}`);
|
|
151
187
|
}
|
|
152
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Handler for fractary_file_get_url
|
|
191
|
+
*/
|
|
192
|
+
export async function handleFileGetUrl(params, config) {
|
|
193
|
+
try {
|
|
194
|
+
const manager = createFileManager(config, { source: params.source });
|
|
195
|
+
const url = await manager.getUrl(params.path, params.expiresIn);
|
|
196
|
+
if (url) {
|
|
197
|
+
return successResult({ path: params.path, url });
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
return errorResult('URL generation not supported for this storage type');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
205
|
+
return errorResult(`Error getting file URL: ${message}`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
153
208
|
//# sourceMappingURL=file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/handlers/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/handlers/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;GAOG;AACH,SAAS,iBAAiB,CACxB,MAAc,EACd,OAA4D;IAE5D,oCAAoC;IACpC,IAAI,OAAO,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9D,MAAM,OAAO,GAAG,uBAAuB,CAAC,OAAO,CAAC,MAAM,EAAE;YACtD,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAuC;SAC7D,CAAC,CAAC;QACH,OAAO,IAAI,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,uCAAuC;IACvC,IAAI,OAAO,EAAE,aAAa,EAAE,CAAC;QAC3B,OAAO,IAAI,WAAW,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,yBAAyB;IACzB,M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,CAAC;IACtD,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAIC,EACD,MAAc;IAEd,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,iBAAiB,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACrE,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QAEhE,IAAI,GAAG,EAAE,CAAC;YACR,OAAO,aAAa,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACnD,CAAC;aAAM,CAAC;YACN,OAAO,WAAW,CAAC,oDAAoD,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QACzE,OAAO,WAAW,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { sanitizeSecrets, containsSecrets } from '@fractary/core/common/secrets';
|
|
1
2
|
/**
|
|
2
3
|
* Security helper functions for preventing common vulnerabilities
|
|
3
4
|
*/
|
|
@@ -20,19 +21,4 @@ export declare function validatePath(userPath: string, basePath: string): string
|
|
|
20
21
|
* @throws Error if any path attempts directory traversal
|
|
21
22
|
*/
|
|
22
23
|
export declare function validatePaths(paths: string[], basePath: string): string[];
|
|
23
|
-
/**
|
|
24
|
-
* Sanitizes token/secret values from error messages and logs
|
|
25
|
-
* Replaces common secret patterns with [REDACTED]
|
|
26
|
-
*
|
|
27
|
-
* @param message - Error message or log string
|
|
28
|
-
* @returns Sanitized message with secrets redacted
|
|
29
|
-
*/
|
|
30
|
-
export declare function sanitizeSecrets(message: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* Checks if a string contains potential security-sensitive information
|
|
33
|
-
*
|
|
34
|
-
* @param value - String to check
|
|
35
|
-
* @returns True if string might contain secrets
|
|
36
|
-
*/
|
|
37
|
-
export declare function containsSecrets(value: string): boolean;
|
|
38
24
|
//# sourceMappingURL=security.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/handlers/security.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/handlers/security.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEjF;;GAEG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAevE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAEzE"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { resolve, relative } from 'path';
|
|
2
|
+
// Re-export secrets utilities from SDK for backward compatibility
|
|
3
|
+
// All secret sanitization logic now lives in @fractary/core/common/secrets
|
|
4
|
+
export { sanitizeSecrets, containsSecrets } from '@fractary/core/common/secrets';
|
|
2
5
|
/**
|
|
3
6
|
* Security helper functions for preventing common vulnerabilities
|
|
4
7
|
*/
|
|
@@ -33,47 +36,6 @@ export function validatePath(userPath, basePath) {
|
|
|
33
36
|
* @throws Error if any path attempts directory traversal
|
|
34
37
|
*/
|
|
35
38
|
export function validatePaths(paths, basePath) {
|
|
36
|
-
return paths.map(path => validatePath(path, basePath));
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Sanitizes token/secret values from error messages and logs
|
|
40
|
-
* Replaces common secret patterns with [REDACTED]
|
|
41
|
-
*
|
|
42
|
-
* @param message - Error message or log string
|
|
43
|
-
* @returns Sanitized message with secrets redacted
|
|
44
|
-
*/
|
|
45
|
-
export function sanitizeSecrets(message) {
|
|
46
|
-
return message
|
|
47
|
-
// Redact tokens in key-value patterns (JSON, env vars, config)
|
|
48
|
-
.replace(/(token|key|password|secret|api[_-]?key|access[_-]?token|auth[_-]?token|bearer)["']?\s*[=:]\s*["']?[^\s"',}]+/gi, '$1: [REDACTED]')
|
|
49
|
-
// Redact bearer tokens
|
|
50
|
-
.replace(/Bearer\s+[A-Za-z0-9\-._~+/]+=*/gi, 'Bearer [REDACTED]')
|
|
51
|
-
// Redact Basic auth
|
|
52
|
-
.replace(/Basic\s+[A-Za-z0-9+/=]+/gi, 'Basic [REDACTED]')
|
|
53
|
-
// Redact GitHub tokens (ghp_, gho_, ghs_, ghu_)
|
|
54
|
-
.replace(/gh[pousr]_[A-Za-z0-9]{36,}/gi, '[REDACTED_GITHUB_TOKEN]')
|
|
55
|
-
// Redact GitLab tokens
|
|
56
|
-
.replace(/glpat-[A-Za-z0-9_\-]{20,}/gi, '[REDACTED_GITLAB_TOKEN]')
|
|
57
|
-
// Redact generic API keys (long alphanumeric strings after common keywords)
|
|
58
|
-
.replace(/(api[_-]?key|apikey|access[_-]?key)\s*[=:]\s*["']?[A-Za-z0-9\-._~+/]{20,}["']?/gi, '$1: [REDACTED]');
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Checks if a string contains potential security-sensitive information
|
|
62
|
-
*
|
|
63
|
-
* @param value - String to check
|
|
64
|
-
* @returns True if string might contain secrets
|
|
65
|
-
*/
|
|
66
|
-
export function containsSecrets(value) {
|
|
67
|
-
const secretPatterns = [
|
|
68
|
-
/token/i,
|
|
69
|
-
/password/i,
|
|
70
|
-
/secret/i,
|
|
71
|
-
/api[_-]?key/i,
|
|
72
|
-
/bearer/i,
|
|
73
|
-
/authorization/i,
|
|
74
|
-
/gh[pousr]_/,
|
|
75
|
-
/glpat-/,
|
|
76
|
-
];
|
|
77
|
-
return secretPatterns.some(pattern => pattern.test(value));
|
|
39
|
+
return paths.map((path) => validatePath(path, basePath));
|
|
78
40
|
}
|
|
79
41
|
//# sourceMappingURL=security.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security.js","sourceRoot":"","sources":["../../src/handlers/security.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEzC;;GAEG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,QAAgB;IAC7D,oDAAoD;IACpD,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IAEzD,0DAA0D;IAC1D,MAAM,YAAY,GAAG,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAE9D,yEAAyE;IACzE,IAAI,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,KAAK,YAAY,EAAE,CAAC;QAC5E,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,oCAAoC,CAAC,CAAC;IAC5F,CAAC;IAED,oDAAoD;IACpD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAe,EAAE,QAAgB;IAC7D,OAAO,KAAK,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"security.js","sourceRoot":"","sources":["../../src/handlers/security.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEzC,kEAAkE;AAClE,2EAA2E;AAC3E,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEjF;;GAEG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,QAAgB;IAC7D,oDAAoD;IACpD,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IAEzD,0DAA0D;IAC1D,MAAM,YAAY,GAAG,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAE9D,yEAAyE;IACzE,IAAI,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,KAAK,YAAY,EAAE,CAAC;QAC5E,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,oCAAoC,CAAC,CAAC;IAC5F,CAAC;IAED,oDAAoD;IACpD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAe,EAAE,QAAgB;IAC7D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fractary/core-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "MCP server for Fractary Core SDK - universal tool access for work, repo, spec, logs, file, docs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"homepage": "https://github.com/fractary/core/tree/main/mcp/server#readme",
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@fractary/core": "^0.
|
|
51
|
+
"@fractary/core": "^0.5.0",
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
53
53
|
"js-yaml": "^4.1.1",
|
|
54
54
|
"minimatch": "^10.1.1"
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/jest": "^29.5.11",
|
|
58
58
|
"@types/js-yaml": "^4.0.9",
|
|
59
|
-
"@types/minimatch": "^5.1.2",
|
|
60
59
|
"@types/node": "^20.10.6",
|
|
61
60
|
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
|
62
61
|
"@typescript-eslint/parser": "^6.17.0",
|