fa-mcp-sdk 0.2.203 → 0.2.204

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/bin/fa-mcp.js CHANGED
@@ -142,12 +142,12 @@ const removeIfExists = async (targetPath, relPath, options = {}) => {
142
142
  finalOptions = { ...finalOptions, recursive: true };
143
143
  }
144
144
  } catch {
145
- // lstat упадёт, если файла/папки нет это ок, просто пойдем в rm с теми же опциями
145
+ // lstat will crash if there is no file/folder that's ok, just go to rm with the same options
146
146
  }
147
147
 
148
148
  await fs.rm(fullPath, finalOptions);
149
149
  } catch {
150
- // игнорируем любые ошибки удаления
150
+ // ignore any deletion errors
151
151
  }
152
152
  };
153
153
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fa-mcp-sdk",
3
3
  "productName": "FA MCP SDK",
4
- "version": "0.2.203",
4
+ "version": "0.2.204",
5
5
  "description": "Core infrastructure and templates for building Model Context Protocol (MCP) servers with TypeScript",
6
6
  "type": "module",
7
7
  "main": "dist/core/index.js",
@@ -1,45 +1,45 @@
1
1
  /**
2
- * Пример расширения конфигурации fa-mcp-sdk кастомным блоком настроек.
2
+ * An example of extending the fa-mcp-sdk configuration with a custom settings block.
3
3
  *
4
- * Этот файл демонстрирует, как добавить собственные настройки
5
- * (например, для проверки членства пользователя в AD-группе).
4
+ * This file demonstrates how to add your own settings
5
+ * (for example, to check the user's membership in an AEC group).
6
6
  */
7
7
 
8
8
  import { AppConfig } from '../../core/index.js';
9
9
 
10
10
  /**
11
- * Настройки проверки членства в AD-группе
11
+ * AD Group Membership Verification Settings
12
12
  */
13
13
  export interface IGroupAccessConfig {
14
14
  groupAccess: {
15
- /** AD-группа, членство в которой требуется для доступа */
15
+ /** AD Group whose membership is required for access */
16
16
  requiredGroup: string;
17
17
 
18
- /** Опционально: разрешить доступ без проверки группы (для отладки) */
18
+ /** Optional: Allow access without checking the group (for debugging) */
19
19
  bypassGroupCheck?: boolean;
20
20
 
21
- /** Опционально: кэшировать результат проверки (секунды) */
21
+ /** Optional: cache the result of the check (seconds) */
22
22
  cacheTtlSeconds?: number;
23
23
 
24
- /** Опционально: список групп с разными уровнями доступа */
24
+ /** Optional: List of groups with different access levels */
25
25
  accessLevels?: {
26
- /** Группа для полного доступа (read/write) */
26
+ /** Full access group (read/write) */
27
27
  fullAccess?: string;
28
- /** Группа только для чтения */
28
+ /** Read-only group */
29
29
  readOnly?: string;
30
- /** Группа администраторов */
30
+ /** Administrators group */
31
31
  admin?: string;
32
32
  };
33
33
  };
34
34
  }
35
35
 
36
36
  /**
37
- * Расширенный конфиг приложения с настройками проверки групп
37
+ * Extended app config with group checking settings
38
38
  */
39
39
  export interface CustomAppConfig extends AppConfig, IGroupAccessConfig {}
40
40
 
41
41
  // ========================================================================
42
- // ПРИМЕР YAML-КОНФИГУРАЦИИ (config/default.yaml)
42
+ // YAML CONFIGURATION EXAMPLE (config/default.yaml)
43
43
  // ========================================================================
44
44
  /*
45
45
  groupAccess:
@@ -53,18 +53,18 @@ groupAccess:
53
53
  */
54
54
 
55
55
  // ========================================================================
56
- // ПРИМЕР ИСПОЛЬЗОВАНИЯ В КОДЕ
56
+ // EXAMPLE OF USE IN CODE
57
57
  // ========================================================================
58
58
  /*
59
59
  import { appConfig } from '../core/index.js';
60
60
 
61
- // Типизированный доступ к кастомным настройкам
61
+ // TYPED ACCESS TO CUSTOM SETTINGS
62
62
  const config = appConfig as CustomAppConfig;
63
63
 
64
64
  const requiredGroup = config.groupAccess.requiredGroup;
65
65
  const shouldBypass = config.groupAccess.bypassGroupCheck;
66
66
 
67
- // Проверка уровня доступа из payload
67
+ // Checking the Access Level from Payload
68
68
  function getUserAccessLevel(payload: { user: string; groups?: string[] }): 'admin' | 'full' | 'readonly' | 'none' {
69
69
  const { accessLevels } = config.groupAccess;
70
70
  const userGroups = payload.groups || [];