@utaba/ucm-mcp-server 6.6.0 → 6.7.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.
Files changed (215) hide show
  1. package/dist/clients/UcmLocalApiClient.d.ts +48 -1
  2. package/dist/clients/UcmLocalApiClient.js +8 -0
  3. package/dist/index.js +1 -1
  4. package/dist/interfaces/IMcpTool.d.ts +2 -2
  5. package/dist/server/ToolRegistry.js +2 -0
  6. package/dist/tools/base/BaseToolController.d.ts +7 -4
  7. package/dist/tools/base/BaseToolController.js +28 -11
  8. package/dist/tools/core/MoveArtifactTool.d.ts +1 -1
  9. package/dist/tools/core/MoveArtifactTool.js +1 -1
  10. package/dist/tools/memory-graph/GraphCreateEntitiesTool.d.ts +5 -2
  11. package/dist/tools/memory-graph/GraphCreateEntitiesTool.js +2 -0
  12. package/dist/tools/memory-graph/GraphCreateRelationshipsTool.d.ts +5 -2
  13. package/dist/tools/memory-graph/GraphCreateRelationshipsTool.js +2 -0
  14. package/dist/tools/memory-graph/GraphCreateTool.d.ts +5 -2
  15. package/dist/tools/memory-graph/GraphCreateTool.js +2 -0
  16. package/dist/tools/memory-graph/GraphDeleteEntitiesTool.d.ts +5 -2
  17. package/dist/tools/memory-graph/GraphDeleteEntitiesTool.js +2 -0
  18. package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.d.ts +5 -2
  19. package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.js +2 -0
  20. package/dist/tools/memory-graph/GraphExploreTool.d.ts +5 -2
  21. package/dist/tools/memory-graph/GraphExploreTool.js +2 -0
  22. package/dist/tools/memory-graph/GraphFindEntitiesTool.d.ts +5 -2
  23. package/dist/tools/memory-graph/GraphFindEntitiesTool.js +2 -0
  24. package/dist/tools/memory-graph/GraphFindPathsTool.d.ts +5 -2
  25. package/dist/tools/memory-graph/GraphFindPathsTool.js +2 -0
  26. package/dist/tools/memory-graph/GraphGetEntityTool.d.ts +5 -2
  27. package/dist/tools/memory-graph/GraphGetEntityTool.js +2 -0
  28. package/dist/tools/memory-graph/GraphGetRelationshipsTool.d.ts +5 -2
  29. package/dist/tools/memory-graph/GraphGetRelationshipsTool.js +2 -0
  30. package/dist/tools/memory-graph/GraphListTemplatesTool.d.ts +5 -2
  31. package/dist/tools/memory-graph/GraphListTemplatesTool.js +2 -0
  32. package/dist/tools/memory-graph/GraphListTool.d.ts +5 -2
  33. package/dist/tools/memory-graph/GraphListTool.js +2 -0
  34. package/dist/tools/memory-graph/GraphOpenTool.d.ts +5 -2
  35. package/dist/tools/memory-graph/GraphOpenTool.js +3 -1
  36. package/dist/tools/memory-graph/GraphProposeVocabularyTool.d.ts +5 -2
  37. package/dist/tools/memory-graph/GraphProposeVocabularyTool.js +51 -6
  38. package/dist/tools/memory-graph/GraphSearchTool.d.ts +5 -2
  39. package/dist/tools/memory-graph/GraphSearchTool.js +2 -0
  40. package/dist/tools/memory-graph/GraphTraverseTool.d.ts +5 -2
  41. package/dist/tools/memory-graph/GraphTraverseTool.js +2 -0
  42. package/dist/tools/memory-graph/GraphUpdateEntitiesTool.d.ts +5 -2
  43. package/dist/tools/memory-graph/GraphUpdateEntitiesTool.js +2 -0
  44. package/dist/{mcp-server/tools/memory-graph/GraphSearchTool.d.ts → tools/memory-graph/GraphUpdateTool.d.ts} +4 -4
  45. package/dist/tools/memory-graph/GraphUpdateTool.js +59 -0
  46. package/dist/tools/memory-graph/KnowledgeSetListTool.d.ts +5 -2
  47. package/dist/tools/memory-graph/KnowledgeSetListTool.js +2 -0
  48. package/dist/tools/memory-graph/KnowledgeSetOpenTool.d.ts +5 -2
  49. package/dist/tools/memory-graph/KnowledgeSetOpenTool.js +2 -0
  50. package/package.json +1 -1
  51. package/package.json.backup +1 -1
  52. package/dist/clients/UcmApiClient.d.ts +0 -157
  53. package/dist/clients/UcmApiClient.js +0 -443
  54. package/dist/mcp-server/clients/UcmLocalApiClient.d.ts +0 -399
  55. package/dist/mcp-server/clients/UcmLocalApiClient.js +0 -719
  56. package/dist/mcp-server/index.d.ts +0 -3
  57. package/dist/mcp-server/index.js +0 -68
  58. package/dist/mcp-server/interfaces/ILogger.d.ts +0 -8
  59. package/dist/mcp-server/interfaces/ILogger.js +0 -4
  60. package/dist/mcp-server/interfaces/IMcpTool.d.ts +0 -7
  61. package/dist/mcp-server/interfaces/IMcpTool.js +0 -3
  62. package/dist/mcp-server/logging/ConsoleLogger.d.ts +0 -16
  63. package/dist/mcp-server/logging/ConsoleLogger.js +0 -45
  64. package/dist/mcp-server/logging/LoggerFactory.d.ts +0 -9
  65. package/dist/mcp-server/logging/LoggerFactory.js +0 -12
  66. package/dist/mcp-server/server/McpConfig.d.ts +0 -26
  67. package/dist/mcp-server/server/McpConfig.js +0 -90
  68. package/dist/mcp-server/server/McpHandler.d.ts +0 -12
  69. package/dist/mcp-server/server/McpHandler.js +0 -84
  70. package/dist/mcp-server/server/McpServer.d.ts +0 -15
  71. package/dist/mcp-server/server/McpServer.js +0 -49
  72. package/dist/mcp-server/server/ToolRegistry.d.ts +0 -23
  73. package/dist/mcp-server/server/ToolRegistry.js +0 -169
  74. package/dist/mcp-server/tools/authorization/ListAuthorizationsTool.d.ts +0 -21
  75. package/dist/mcp-server/tools/authorization/ListAuthorizationsTool.js +0 -146
  76. package/dist/mcp-server/tools/authorization/SignOutTool.d.ts +0 -23
  77. package/dist/mcp-server/tools/authorization/SignOutTool.js +0 -128
  78. package/dist/mcp-server/tools/base/BaseToolController.d.ts +0 -19
  79. package/dist/mcp-server/tools/base/BaseToolController.js +0 -58
  80. package/dist/mcp-server/tools/connections/AccessConnectionTool.d.ts +0 -21
  81. package/dist/mcp-server/tools/connections/AccessConnectionTool.js +0 -107
  82. package/dist/mcp-server/tools/connections/CallRemoteToolTool.d.ts +0 -22
  83. package/dist/mcp-server/tools/connections/CallRemoteToolTool.js +0 -124
  84. package/dist/mcp-server/tools/core/DeleteArtifactTool.d.ts +0 -11
  85. package/dist/mcp-server/tools/core/DeleteArtifactTool.js +0 -83
  86. package/dist/mcp-server/tools/core/EditArtifactMetadataTool.d.ts +0 -12
  87. package/dist/mcp-server/tools/core/EditArtifactMetadataTool.js +0 -173
  88. package/dist/mcp-server/tools/core/GetArtifactTool.d.ts +0 -13
  89. package/dist/mcp-server/tools/core/GetArtifactTool.js +0 -124
  90. package/dist/mcp-server/tools/core/GetArtifactVersionsTool.d.ts +0 -11
  91. package/dist/mcp-server/tools/core/GetArtifactVersionsTool.js +0 -63
  92. package/dist/mcp-server/tools/core/GetChunkTool.d.ts +0 -11
  93. package/dist/mcp-server/tools/core/GetChunkTool.js +0 -56
  94. package/dist/mcp-server/tools/core/ListArtifactsTool.d.ts +0 -11
  95. package/dist/mcp-server/tools/core/ListArtifactsTool.js +0 -84
  96. package/dist/mcp-server/tools/core/MoveArtifactTool.d.ts +0 -12
  97. package/dist/mcp-server/tools/core/MoveArtifactTool.js +0 -104
  98. package/dist/mcp-server/tools/core/PublishArtifactFromFileTool.d.ts +0 -15
  99. package/dist/mcp-server/tools/core/PublishArtifactFromFileTool.js +0 -277
  100. package/dist/mcp-server/tools/core/PublishArtifactTool.d.ts +0 -13
  101. package/dist/mcp-server/tools/core/PublishArtifactTool.js +0 -218
  102. package/dist/mcp-server/tools/core/SearchArtifactsTool.d.ts +0 -11
  103. package/dist/mcp-server/tools/core/SearchArtifactsTool.js +0 -137
  104. package/dist/mcp-server/tools/list/ListNamespaceController.d.ts +0 -1
  105. package/dist/mcp-server/tools/list/ListNamespaceController.js +0 -8
  106. package/dist/mcp-server/tools/memory-graph/GraphCreateEntitiesTool.d.ts +0 -14
  107. package/dist/mcp-server/tools/memory-graph/GraphCreateEntitiesTool.js +0 -58
  108. package/dist/mcp-server/tools/memory-graph/GraphCreateRelationshipsTool.d.ts +0 -14
  109. package/dist/mcp-server/tools/memory-graph/GraphCreateRelationshipsTool.js +0 -57
  110. package/dist/mcp-server/tools/memory-graph/GraphCreateTool.d.ts +0 -14
  111. package/dist/mcp-server/tools/memory-graph/GraphCreateTool.js +0 -64
  112. package/dist/mcp-server/tools/memory-graph/GraphDeleteEntitiesTool.d.ts +0 -14
  113. package/dist/mcp-server/tools/memory-graph/GraphDeleteEntitiesTool.js +0 -45
  114. package/dist/mcp-server/tools/memory-graph/GraphDeleteRelationshipsTool.d.ts +0 -14
  115. package/dist/mcp-server/tools/memory-graph/GraphDeleteRelationshipsTool.js +0 -45
  116. package/dist/mcp-server/tools/memory-graph/GraphExploreTool.d.ts +0 -14
  117. package/dist/mcp-server/tools/memory-graph/GraphExploreTool.js +0 -73
  118. package/dist/mcp-server/tools/memory-graph/GraphFindEntitiesTool.d.ts +0 -14
  119. package/dist/mcp-server/tools/memory-graph/GraphFindEntitiesTool.js +0 -68
  120. package/dist/mcp-server/tools/memory-graph/GraphFindPathsTool.d.ts +0 -14
  121. package/dist/mcp-server/tools/memory-graph/GraphFindPathsTool.js +0 -62
  122. package/dist/mcp-server/tools/memory-graph/GraphGetEntityTool.d.ts +0 -14
  123. package/dist/mcp-server/tools/memory-graph/GraphGetEntityTool.js +0 -49
  124. package/dist/mcp-server/tools/memory-graph/GraphGetRelationshipsTool.d.ts +0 -14
  125. package/dist/mcp-server/tools/memory-graph/GraphGetRelationshipsTool.js +0 -62
  126. package/dist/mcp-server/tools/memory-graph/GraphListTemplatesTool.d.ts +0 -14
  127. package/dist/mcp-server/tools/memory-graph/GraphListTemplatesTool.js +0 -34
  128. package/dist/mcp-server/tools/memory-graph/GraphListTool.d.ts +0 -14
  129. package/dist/mcp-server/tools/memory-graph/GraphListTool.js +0 -45
  130. package/dist/mcp-server/tools/memory-graph/GraphOpenTool.d.ts +0 -15
  131. package/dist/mcp-server/tools/memory-graph/GraphOpenTool.js +0 -50
  132. package/dist/mcp-server/tools/memory-graph/GraphProposeVocabularyTool.d.ts +0 -14
  133. package/dist/mcp-server/tools/memory-graph/GraphProposeVocabularyTool.js +0 -108
  134. package/dist/mcp-server/tools/memory-graph/GraphSearchTool.js +0 -94
  135. package/dist/mcp-server/tools/memory-graph/GraphTraverseTool.d.ts +0 -14
  136. package/dist/mcp-server/tools/memory-graph/GraphTraverseTool.js +0 -114
  137. package/dist/mcp-server/tools/memory-graph/GraphUpdateEntitiesTool.d.ts +0 -14
  138. package/dist/mcp-server/tools/memory-graph/GraphUpdateEntitiesTool.js +0 -58
  139. package/dist/mcp-server/tools/memory-graph/KnowledgeSetListTool.d.ts +0 -14
  140. package/dist/mcp-server/tools/memory-graph/KnowledgeSetListTool.js +0 -25
  141. package/dist/mcp-server/tools/memory-graph/KnowledgeSetOpenTool.d.ts +0 -14
  142. package/dist/mcp-server/tools/memory-graph/KnowledgeSetOpenTool.js +0 -31
  143. package/dist/mcp-server/tools/repository/CreateRepositoryTool.d.ts +0 -12
  144. package/dist/mcp-server/tools/repository/CreateRepositoryTool.js +0 -116
  145. package/dist/mcp-server/tools/repository/GetRepositoryTool.d.ts +0 -12
  146. package/dist/mcp-server/tools/repository/GetRepositoryTool.js +0 -85
  147. package/dist/mcp-server/tools/repository/UpdateRepositoryTool.d.ts +0 -12
  148. package/dist/mcp-server/tools/repository/UpdateRepositoryTool.js +0 -115
  149. package/dist/mcp-server/tools/sharepoint/SharePointListConnectionsTool.d.ts +0 -19
  150. package/dist/mcp-server/tools/sharepoint/SharePointListConnectionsTool.js +0 -90
  151. package/dist/mcp-server/tools/sharepoint/SharePointListFoldersTool.d.ts +0 -21
  152. package/dist/mcp-server/tools/sharepoint/SharePointListFoldersTool.js +0 -133
  153. package/dist/mcp-server/tools/sharepoint/SharePointReadFileTool.d.ts +0 -22
  154. package/dist/mcp-server/tools/sharepoint/SharePointReadFileTool.js +0 -146
  155. package/dist/mcp-server/tools/sharepoint/SharePointReadRelatedFileTool.d.ts +0 -18
  156. package/dist/mcp-server/tools/sharepoint/SharePointReadRelatedFileTool.js +0 -108
  157. package/dist/mcp-server/tools/sharepoint/SharePointSearchTool.d.ts +0 -22
  158. package/dist/mcp-server/tools/sharepoint/SharePointSearchTool.js +0 -125
  159. package/dist/mcp-server/tools/utility/AuthorIndexTool.d.ts +0 -11
  160. package/dist/mcp-server/tools/utility/AuthorIndexTool.js +0 -49
  161. package/dist/mcp-server/tools/utility/AuthorRecentsTool.d.ts +0 -11
  162. package/dist/mcp-server/tools/utility/AuthorRecentsTool.js +0 -49
  163. package/dist/mcp-server/tools/utility/ListRepositoriesTool.d.ts +0 -11
  164. package/dist/mcp-server/tools/utility/ListRepositoriesTool.js +0 -68
  165. package/dist/mcp-server/tools/utility/QuickstartTool.d.ts +0 -11
  166. package/dist/mcp-server/tools/utility/QuickstartTool.js +0 -36
  167. package/dist/mcp-server/types/UcmApiTypes.d.ts +0 -40
  168. package/dist/mcp-server/types/UcmApiTypes.js +0 -4
  169. package/dist/mcp-server/utils/McpErrorHandler.d.ts +0 -25
  170. package/dist/mcp-server/utils/McpErrorHandler.js +0 -67
  171. package/dist/mcp-server/utils/PathUtils.d.ts +0 -61
  172. package/dist/mcp-server/utils/PathUtils.js +0 -178
  173. package/dist/mcp-server/utils/ResponseChunker.d.ts +0 -25
  174. package/dist/mcp-server/utils/ResponseChunker.js +0 -79
  175. package/dist/mcp-server/utils/SharePointErrorHandler.d.ts +0 -34
  176. package/dist/mcp-server/utils/SharePointErrorHandler.js +0 -55
  177. package/dist/publish/package.json +0 -37
  178. package/dist/schemas/memory-graph-tool-schemas.d.ts +0 -789
  179. package/dist/schemas/memory-graph-tool-schemas.js +0 -181
  180. package/dist/tools/artifacts/GetArtifactController.d.ts +0 -34
  181. package/dist/tools/artifacts/GetArtifactController.js +0 -397
  182. package/dist/tools/artifacts/GetLatestController.d.ts +0 -39
  183. package/dist/tools/artifacts/GetLatestController.js +0 -469
  184. package/dist/tools/artifacts/ListVersionsController.d.ts +0 -43
  185. package/dist/tools/artifacts/ListVersionsController.js +0 -530
  186. package/dist/tools/artifacts/PublishArtifactController.d.ts +0 -37
  187. package/dist/tools/artifacts/PublishArtifactController.js +0 -605
  188. package/dist/tools/discovery/BrowseCategoriesController.d.ts +0 -25
  189. package/dist/tools/discovery/BrowseCategoriesController.js +0 -400
  190. package/dist/tools/discovery/FindByPurposeController.d.ts +0 -12
  191. package/dist/tools/discovery/FindByPurposeController.js +0 -131
  192. package/dist/tools/discovery/ListAuthorsController.d.ts +0 -20
  193. package/dist/tools/discovery/ListAuthorsController.js +0 -274
  194. package/dist/tools/discovery/SearchArtifactsController.d.ts +0 -14
  195. package/dist/tools/discovery/SearchArtifactsController.js +0 -226
  196. package/dist/tools/memory-graph/GraphGetStatsTool.d.ts +0 -11
  197. package/dist/tools/memory-graph/GraphGetStatsTool.js +0 -42
  198. package/dist/tools/memory-graph/GraphRemoveRelationshipsTool.d.ts +0 -11
  199. package/dist/tools/memory-graph/GraphRemoveRelationshipsTool.js +0 -47
  200. package/dist/tools/navigation/ExploreNamespaceController.d.ts +0 -35
  201. package/dist/tools/navigation/ExploreNamespaceController.js +0 -548
  202. package/dist/tools/repository/DeleteRepositoryGuidanceTool.d.ts +0 -13
  203. package/dist/tools/repository/DeleteRepositoryGuidanceTool.js +0 -93
  204. package/dist/tools/sharepoint/SharePointSignOutTool.d.ts +0 -22
  205. package/dist/tools/sharepoint/SharePointSignOutTool.js +0 -114
  206. package/dist/tools/utility/HealthCheckController.d.ts +0 -11
  207. package/dist/tools/utility/HealthCheckController.js +0 -60
  208. package/dist/tools/utility/SubmitFeedbackTool.d.ts +0 -16
  209. package/dist/tools/utility/SubmitFeedbackTool.js +0 -68
  210. package/dist/tools/utility/ValidatePathController.d.ts +0 -30
  211. package/dist/tools/utility/ValidatePathController.js +0 -465
  212. package/dist/utils/HttpsAgentFactory.d.ts +0 -21
  213. package/dist/utils/HttpsAgentFactory.js +0 -50
  214. package/dist/utils/ValidationUtils.d.ts +0 -10
  215. package/dist/utils/ValidationUtils.js +0 -50
@@ -1,49 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- export class AuthorRecentsTool extends BaseToolController {
3
- constructor(ucmClient, logger, publishingAuthorId) {
4
- super(ucmClient, logger, publishingAuthorId);
5
- }
6
- get name() {
7
- return 'ucm_workspace_get_recents';
8
- }
9
- get description() {
10
- return 'Generate workspace activity tracking showing the 20 most recently modified artifacts within a workspace.';
11
- }
12
- get inputSchema() {
13
- return {
14
- type: 'object',
15
- properties: {
16
- workspace: {
17
- type: 'string',
18
- description: `Workspace identifier: ${this.publishingAuthorId || '1234567890'}`
19
- }
20
- },
21
- required: ['workspace']
22
- };
23
- }
24
- async handleExecute(params) {
25
- const { workspace } = params;
26
- const author = workspace;
27
- this.logger.debug('AuthorRecentsTool', `Retrieving author recents for: ${author}`);
28
- try {
29
- // Get author recent activity content from API
30
- const authorRecentsContent = await this.ucmClient.getAuthorRecents(author);
31
- this.logger.info('AuthorRecentsTool', 'Author recents retrieved successfully', '', {
32
- author,
33
- contentLength: authorRecentsContent.length,
34
- source: `UCM API /api/v1/resources/author/${author}/recents`
35
- });
36
- return authorRecentsContent;
37
- }
38
- catch (error) {
39
- let errorMessage = `Failed to retrieve author recents for ${author}.`;
40
- if (this.publishingAuthorId && author != this.publishingAuthorId) {
41
- errorMessage += ` did you mean '${this.publishingAuthorId}'?`;
42
- error.message = error.message += ` did you mean '${this.publishingAuthorId}'?`;
43
- }
44
- this.logger.error('AuthorRecentsTool', `${errorMessage}`, '', error);
45
- throw error;
46
- }
47
- }
48
- }
49
- //# sourceMappingURL=AuthorRecentsTool.js.map
@@ -1,11 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
- import { ILogger } from '../../interfaces/ILogger.js';
4
- export declare class ListRepositoriesTool extends BaseToolController {
5
- constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
- get name(): string;
7
- get description(): string;
8
- get inputSchema(): any;
9
- protected handleExecute(params: any): Promise<any>;
10
- }
11
- //# sourceMappingURL=ListRepositoriesTool.d.ts.map
@@ -1,68 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- export class ListRepositoriesTool extends BaseToolController {
3
- constructor(ucmClient, logger, publishingAuthorId) {
4
- super(ucmClient, logger, publishingAuthorId);
5
- }
6
- get name() {
7
- return 'ucm_workspace_list_repos';
8
- }
9
- get description() {
10
- return 'List all repositories for a specific workspace with pagination and statistics';
11
- }
12
- get inputSchema() {
13
- return {
14
- type: 'object',
15
- properties: {
16
- workspace: {
17
- type: 'string',
18
- description: `Workspace identifier (e.g., "${this.publishingAuthorId || '1234567890'}")`,
19
- minLength: 1,
20
- maxLength: 50
21
- },
22
- offset: {
23
- type: 'number',
24
- description: 'Number of items to skip for pagination (default: 0)',
25
- minimum: 0
26
- },
27
- limit: {
28
- type: 'number',
29
- description: 'Maximum number of items to return (default: 20, max: 100)',
30
- minimum: 1,
31
- maximum: 100
32
- }
33
- },
34
- required: ['workspace']
35
- };
36
- }
37
- async handleExecute(params) {
38
- const { workspace, offset, limit } = params;
39
- const author = workspace;
40
- this.logger.debug('ListRepositoriesTool', `Listing repositories for author: ${author}`, '', {
41
- offset: offset || 0,
42
- limit: limit || 'default'
43
- });
44
- try {
45
- // Use listRepositories to get repositories for the author
46
- const response = await this.ucmClient.listRepositories(author, offset, limit);
47
- this.logger.info('ListRepositoriesTool', `Listed ${response.data.length} repositories for author: ${author}`, '', {
48
- total: response.pagination?.total,
49
- offset: response.pagination?.offset,
50
- limit: response.pagination?.limit
51
- });
52
- // Return the full response with pagination metadata and context
53
- return {
54
- author,
55
- listingType: 'repositories',
56
- data: response.data,
57
- pagination: response.pagination,
58
- hasMore: response.pagination.offset + response.pagination.limit < response.pagination.total,
59
- _links: response._links
60
- };
61
- }
62
- catch (error) {
63
- this.logger.error('ListRepositoriesTool', `Failed to list repositories for author: ${author}`, '', error);
64
- throw error;
65
- }
66
- }
67
- }
68
- //# sourceMappingURL=ListRepositoriesTool.js.map
@@ -1,11 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
- import { ILogger } from '../../interfaces/ILogger.js';
4
- export declare class QuickstartTool extends BaseToolController {
5
- constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
- get name(): string;
7
- get description(): string;
8
- get inputSchema(): any;
9
- protected handleExecute(params: any): Promise<any>;
10
- }
11
- //# sourceMappingURL=QuickstartTool.d.ts.map
@@ -1,36 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- export class QuickstartTool extends BaseToolController {
3
- constructor(ucmClient, logger, publishingAuthorId) {
4
- super(ucmClient, logger, publishingAuthorId);
5
- }
6
- get name() {
7
- return 'ucm_connect';
8
- }
9
- get description() {
10
- return 'Connect to UCM and initialise operational context for the conversation. Call this tool FIRST at the start of every conversation — it loads your personalized account information, workspace IDs, repositories, policies, and connected services. Required for conversation initialisation before using any other UCM tools.';
11
- }
12
- get inputSchema() {
13
- return {
14
- type: 'object',
15
- properties: {},
16
- required: []
17
- };
18
- }
19
- async handleExecute(params) {
20
- this.logger.debug('QuickstartTool', 'Retrieving UCM quickstart guide');
21
- try {
22
- // Get quickstart content from API
23
- const quickstartContent = await this.ucmClient.getQuickstart();
24
- this.logger.info('QuickstartTool', 'Quickstart guide retrieved successfully', '', {
25
- contentLength: quickstartContent.length,
26
- source: 'UCM API /api/v1/quickstart'
27
- });
28
- return quickstartContent;
29
- }
30
- catch (error) {
31
- this.logger.error('QuickstartTool', 'Failed to retrieve quickstart guide', '', error);
32
- throw error;
33
- }
34
- }
35
- }
36
- //# sourceMappingURL=QuickstartTool.js.map
@@ -1,40 +0,0 @@
1
- export interface ArtifactMetadata {
2
- name: string;
3
- description: string;
4
- version: string;
5
- contractVersion?: string;
6
- author: string;
7
- repository: string;
8
- category: string;
9
- subcategory: string;
10
- technology?: string;
11
- tags?: string[];
12
- dependencies?: {
13
- services?: string[];
14
- commands?: string[];
15
- external?: Record<string, string>;
16
- };
17
- }
18
- export interface ArtifactData {
19
- id: string;
20
- path: string;
21
- metadata: ArtifactMetadata;
22
- content?: string;
23
- examples?: any[];
24
- lastUpdated: string;
25
- publishedAt: string;
26
- }
27
- export interface AuthorData {
28
- id: string;
29
- name: string;
30
- email?: string;
31
- createdAt: string;
32
- artifactCount?: number;
33
- }
34
- export interface UcmApiResponse<T = any> {
35
- data: T;
36
- success: boolean;
37
- message?: string;
38
- error?: string;
39
- }
40
- //# sourceMappingURL=UcmApiTypes.d.ts.map
@@ -1,4 +0,0 @@
1
- // Source: Duplicated from ../types/Artifact.ts for MCP Server independence
2
- // Sync with Next.js app types when schema changes are made
3
- export {};
4
- //# sourceMappingURL=UcmApiTypes.js.map
@@ -1,25 +0,0 @@
1
- export declare enum McpErrorCode {
2
- ParseError = -32700,// Invalid JSON received
3
- InvalidRequest = -32600,// Request is not valid MCP
4
- MethodNotFound = -32601,// Method does not exist
5
- InvalidParams = -32602,// Invalid method parameters
6
- InternalError = -32603,// Internal server error
7
- ExternalServiceUnavailable = -32001
8
- }
9
- export interface McpErrorResponse {
10
- error: {
11
- code: McpErrorCode;
12
- message: string;
13
- data?: any;
14
- };
15
- }
16
- export declare class McpError extends Error {
17
- code: McpErrorCode;
18
- data?: any | undefined;
19
- constructor(code: McpErrorCode, message: string, data?: any | undefined);
20
- toResponse(): McpErrorResponse;
21
- }
22
- export declare class McpErrorHandler {
23
- static formatError(error: any): McpError;
24
- }
25
- //# sourceMappingURL=McpErrorHandler.d.ts.map
@@ -1,67 +0,0 @@
1
- // MCP-specific error handling following MCP standards
2
- export var McpErrorCode;
3
- (function (McpErrorCode) {
4
- McpErrorCode[McpErrorCode["ParseError"] = -32700] = "ParseError";
5
- McpErrorCode[McpErrorCode["InvalidRequest"] = -32600] = "InvalidRequest";
6
- McpErrorCode[McpErrorCode["MethodNotFound"] = -32601] = "MethodNotFound";
7
- McpErrorCode[McpErrorCode["InvalidParams"] = -32602] = "InvalidParams";
8
- McpErrorCode[McpErrorCode["InternalError"] = -32603] = "InternalError";
9
- McpErrorCode[McpErrorCode["ExternalServiceUnavailable"] = -32001] = "ExternalServiceUnavailable"; // External resource offline/unavailable
10
- })(McpErrorCode || (McpErrorCode = {}));
11
- export class McpError extends Error {
12
- code;
13
- data;
14
- constructor(code, message, data) {
15
- super(message);
16
- this.code = code;
17
- this.data = data;
18
- this.name = 'McpError';
19
- }
20
- toResponse() {
21
- return {
22
- error: {
23
- code: this.code,
24
- message: this.message,
25
- data: this.data
26
- }
27
- };
28
- }
29
- }
30
- export class McpErrorHandler {
31
- static formatError(error) {
32
- if (error instanceof McpError) {
33
- return error;
34
- }
35
- if (error.error) {
36
- error = error.error;
37
- }
38
- if (error instanceof McpError) {
39
- return error;
40
- }
41
- // Extract error message from various sources
42
- let message = error.message || error.toString();
43
- if (!message) {
44
- message = JSON.stringify(error);
45
- }
46
- // Map common errors to MCP error codes
47
- if (message?.includes('not found')) {
48
- return new McpError(McpErrorCode.InvalidParams, message, { originalError: error });
49
- }
50
- if (message?.includes('validation')) {
51
- return new McpError(McpErrorCode.InvalidParams, 'Parameter validation failed', { originalError: error });
52
- }
53
- if (message?.includes('ECONNREFUSED')) {
54
- return new McpError(McpErrorCode.ExternalServiceUnavailable, 'External API is unavailable, try ucm_connect to verify your connection', { originalError: error });
55
- }
56
- if (message?.includes('validation') || message?.includes('invalid') ||
57
- message?.includes('required') || message?.includes('must be')) {
58
- return new McpError(McpErrorCode.InvalidParams, message, { originalError: error });
59
- }
60
- if (message?.includes('UCM API server error')) {
61
- return new McpError(McpErrorCode.InternalError, message, { originalError: error });
62
- }
63
- // Don't leak internal errors
64
- return new McpError(McpErrorCode.InternalError, message || 'An internal error occurred');
65
- }
66
- }
67
- //# sourceMappingURL=McpErrorHandler.js.map
@@ -1,61 +0,0 @@
1
- /**
2
- * Utility functions for parsing UCM paths into component parts
3
- */
4
- export interface ParsedPath {
5
- author?: string | undefined;
6
- repository?: string | undefined;
7
- category?: string | undefined;
8
- subcategory?: string | undefined;
9
- filename?: string;
10
- version?: string;
11
- }
12
- /**
13
- * Parse a UCM path into its component parts
14
- * Supports formats like:
15
- * - "utaba/main/commands/user" (namespace only)
16
- * - "utaba/main/commands/user/CreateUserCommand.ts" (with filename)
17
- * - "utaba/main/commands/user/CreateUserCommand.ts@1.0.0" (with version)
18
- */
19
- export declare function parsePath(path: string): ParsedPath;
20
- /**
21
- * Build a namespace path from components (author/repository/category/subcategory)
22
- */
23
- export declare function buildNamespacePath(author: string, repository: string, category: string, subcategory: string): string;
24
- /**
25
- * Build a full path with filename and optional version
26
- */
27
- export declare function buildFullPath(author: string, repository: string, category: string, subcategory: string, filename?: string, version?: string): string;
28
- /**
29
- * Extract namespace from a full path
30
- */
31
- export declare function extractNamespace(path: string): string;
32
- /**
33
- * Validate if a path follows UCM naming conventions
34
- */
35
- export declare function validatePath(path: string): {
36
- isValid: boolean;
37
- errors: string[];
38
- };
39
- /**
40
- * Compare two semantic versions
41
- * Returns: -1 if version1 < version2, 0 if equal, 1 if version1 > version2
42
- */
43
- export declare function compareVersions(version1: string, version2: string): number;
44
- /**
45
- * Check if a version is greater than another version
46
- */
47
- export declare function isVersionGreater(version1: string, version2: string): boolean;
48
- /**
49
- * Check if a version is less than another version
50
- */
51
- export declare function isVersionLess(version1: string, version2: string): boolean;
52
- /**
53
- * Check if two versions are equal
54
- */
55
- export declare function isVersionEqual(version1: string, version2: string): boolean;
56
- /**
57
- * Increment the patch version of a semantic version
58
- * Examples: 1.0.0 -> 1.0.1, 2.1.5 -> 2.1.6
59
- */
60
- export declare function incrementPatchVersion(version: string): string;
61
- //# sourceMappingURL=PathUtils.d.ts.map
@@ -1,178 +0,0 @@
1
- /**
2
- * Utility functions for parsing UCM paths into component parts
3
- */
4
- /**
5
- * Parse a UCM path into its component parts
6
- * Supports formats like:
7
- * - "utaba/main/commands/user" (namespace only)
8
- * - "utaba/main/commands/user/CreateUserCommand.ts" (with filename)
9
- * - "utaba/main/commands/user/CreateUserCommand.ts@1.0.0" (with version)
10
- */
11
- export function parsePath(path) {
12
- if (!path)
13
- path = "";
14
- // Remove leading/trailing slashes
15
- const cleanPath = path.replace(/^\/+|\/+$/g, '');
16
- // Split into parts
17
- const parts = cleanPath.split('/');
18
- const result = {
19
- author: parts.length > 0 ? parts[0] : undefined,
20
- repository: parts.length > 1 ? parts[1] : undefined,
21
- category: parts.length > 2 ? parts[2] : undefined,
22
- subcategory: parts.length > 3 ? parts[3] : undefined,
23
- };
24
- if (parts.length > 4) {
25
- let filenameParts = parts[4].split('@');
26
- //filename
27
- result.filename = filenameParts[0];
28
- if (filenameParts.length > 1) {
29
- result.version = filenameParts[1];
30
- }
31
- }
32
- return result;
33
- }
34
- /**
35
- * Build a namespace path from components (author/repository/category/subcategory)
36
- */
37
- export function buildNamespacePath(author, repository, category, subcategory) {
38
- return `${author}/${repository}/${category}/${subcategory}`;
39
- }
40
- /**
41
- * Build a full path with filename and optional version
42
- */
43
- export function buildFullPath(author, repository, category, subcategory, filename, version) {
44
- let path = buildNamespacePath(author, repository, category, subcategory);
45
- if (filename) {
46
- path += `/${filename}`;
47
- if (version) {
48
- path += `@${version}`;
49
- }
50
- }
51
- return path;
52
- }
53
- /**
54
- * Extract namespace from a full path
55
- */
56
- export function extractNamespace(path) {
57
- const parsed = parsePath(path);
58
- return buildNamespacePath(parsed.author || '', parsed.repository || '', parsed.category || '', parsed.subcategory || '');
59
- }
60
- /**
61
- * Validate if a path follows UCM naming conventions
62
- */
63
- export function validatePath(path) {
64
- const errors = [];
65
- try {
66
- const parsed = parsePath(path);
67
- // Validate author (lowercase alphanumeric and hyphens)
68
- if (!/^[a-z0-9-]+$/.test(parsed.author || '')) {
69
- errors.push('Author must contain only lowercase letters, numbers, and hyphens');
70
- }
71
- // Validate repository (lowercase alphanumeric and hyphens)
72
- if (!/^[a-z0-9-]+$/.test(parsed.repository || '')) {
73
- errors.push('Repository must contain only lowercase letters, numbers, and hyphens');
74
- }
75
- // Validate category (must be valid UCM category)
76
- const validCategories = ['commands', 'services', 'patterns', 'implementations', 'contracts', 'guidance', 'project'];
77
- if (!validCategories.includes(parsed.category || '')) {
78
- errors.push(`Category must be one of: ${validCategories.join(', ')}`);
79
- }
80
- // Validate subcategory (lowercase alphanumeric and hyphens)
81
- if (!/^[a-z0-9-]+$/.test(parsed.subcategory || '')) {
82
- errors.push('Subcategory must contain only lowercase letters, numbers, and hyphens');
83
- }
84
- // Validate filename if present
85
- if (parsed.filename) {
86
- if (!/^[a-zA-Z0-9._-]+\.[a-z]+$/.test(parsed.filename)) {
87
- errors.push('Filename must be valid with an extension');
88
- }
89
- }
90
- // Validate version if present
91
- if (parsed.version) {
92
- if (!/^v?\d+\.\d+\.\d+(-[a-z0-9-]+)?(\+[a-z0-9-]+)?$/.test(parsed.version)) {
93
- errors.push('Version must follow semantic versioning (e.g., 1.0.0, v2.1.0)');
94
- }
95
- }
96
- }
97
- catch (error) {
98
- errors.push(error instanceof Error ? error.message : 'Invalid path format');
99
- }
100
- return {
101
- isValid: errors.length === 0,
102
- errors
103
- };
104
- }
105
- /**
106
- * Compare two semantic versions
107
- * Returns: -1 if version1 < version2, 0 if equal, 1 if version1 > version2
108
- */
109
- export function compareVersions(version1, version2) {
110
- // Normalize versions by removing 'v' prefix if present
111
- const v1 = version1.replace(/^v/, '');
112
- const v2 = version2.replace(/^v/, '');
113
- // Split versions into parts
114
- const parts1 = v1.split(/[.-]/);
115
- const parts2 = v2.split(/[.-]/);
116
- // Compare major, minor, patch
117
- for (let i = 0; i < 3; i++) {
118
- const num1 = parseInt(parts1[i] || '0', 10);
119
- const num2 = parseInt(parts2[i] || '0', 10);
120
- if (num1 > num2)
121
- return 1;
122
- if (num1 < num2)
123
- return -1;
124
- }
125
- // If major.minor.patch are equal, compare pre-release versions
126
- const preRelease1 = parts1.slice(3).join('.');
127
- const preRelease2 = parts2.slice(3).join('.');
128
- // No pre-release is greater than pre-release
129
- if (!preRelease1 && preRelease2)
130
- return 1;
131
- if (preRelease1 && !preRelease2)
132
- return -1;
133
- if (!preRelease1 && !preRelease2)
134
- return 0;
135
- // Compare pre-release versions lexically
136
- return preRelease1.localeCompare(preRelease2);
137
- }
138
- /**
139
- * Check if a version is greater than another version
140
- */
141
- export function isVersionGreater(version1, version2) {
142
- return compareVersions(version1, version2) > 0;
143
- }
144
- /**
145
- * Check if a version is less than another version
146
- */
147
- export function isVersionLess(version1, version2) {
148
- return compareVersions(version1, version2) < 0;
149
- }
150
- /**
151
- * Check if two versions are equal
152
- */
153
- export function isVersionEqual(version1, version2) {
154
- return compareVersions(version1, version2) === 0;
155
- }
156
- /**
157
- * Increment the patch version of a semantic version
158
- * Examples: 1.0.0 -> 1.0.1, 2.1.5 -> 2.1.6
159
- */
160
- export function incrementPatchVersion(version) {
161
- // Normalize version by removing 'v' prefix if present
162
- const normalized = version.replace(/^v/, '');
163
- // Split version into parts
164
- const parts = normalized.split('.');
165
- if (parts.length < 3) {
166
- throw new Error(`Invalid semantic version format: ${version}`);
167
- }
168
- // Parse major, minor, patch
169
- const major = parseInt(parts[0], 10);
170
- const minor = parseInt(parts[1], 10);
171
- const patch = parseInt(parts[2].split('-')[0], 10); // Handle pre-release versions
172
- if (isNaN(major) || isNaN(minor) || isNaN(patch)) {
173
- throw new Error(`Invalid semantic version format: ${version}`);
174
- }
175
- // Increment patch version
176
- return `${major}.${minor}.${patch + 1}`;
177
- }
178
- //# sourceMappingURL=PathUtils.js.map
@@ -1,25 +0,0 @@
1
- export interface ChunkedResponse {
2
- chunk: {
3
- id: string;
4
- sequence: number;
5
- total: number;
6
- data: string;
7
- };
8
- hasMore: boolean;
9
- }
10
- export declare class ResponseChunker {
11
- private static readonly MAX_CHUNK_SIZE;
12
- private static chunks;
13
- private static readonly CHUNK_TTL;
14
- private static chunkTimestamps;
15
- static chunk(data: any, chunkId?: string): ChunkedResponse | any;
16
- static getNextChunk(chunkId: string, sequence: number): ChunkedResponse | null;
17
- static cleanup(chunkId: string): void;
18
- static cleanupExpired(): void;
19
- static getChunkInfo(chunkId: string): {
20
- exists: boolean;
21
- total?: number;
22
- expires?: number;
23
- };
24
- }
25
- //# sourceMappingURL=ResponseChunker.d.ts.map
@@ -1,79 +0,0 @@
1
- export class ResponseChunker {
2
- static MAX_CHUNK_SIZE = 20000; // ~20k characters to stay under token limit
3
- static chunks = new Map();
4
- static CHUNK_TTL = 5 * 60 * 1000; // 5 minutes
5
- static chunkTimestamps = new Map();
6
- static chunk(data, chunkId) {
7
- const serialized = typeof data === 'string' ? data : JSON.stringify(data, null, 2);
8
- // If small enough, return as-is
9
- if (serialized.length < this.MAX_CHUNK_SIZE) {
10
- return data;
11
- }
12
- // Generate chunk ID if not provided
13
- const id = chunkId || `ucm_chunk_${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;
14
- // Split into chunks
15
- const chunks = [];
16
- for (let i = 0; i < serialized.length; i += this.MAX_CHUNK_SIZE) {
17
- chunks.push(serialized.slice(i, i + this.MAX_CHUNK_SIZE));
18
- }
19
- // Store chunks for retrieval with timestamp
20
- this.chunks.set(id, chunks);
21
- this.chunkTimestamps.set(id, Date.now());
22
- // Schedule cleanup after TTL
23
- setTimeout(() => {
24
- this.cleanup(id);
25
- }, this.CHUNK_TTL);
26
- // Return first chunk with metadata
27
- return {
28
- chunk: {
29
- id,
30
- sequence: 0,
31
- total: chunks.length,
32
- data: chunks[0]
33
- },
34
- hasMore: chunks.length > 1
35
- };
36
- }
37
- static getNextChunk(chunkId, sequence) {
38
- const chunks = this.chunks.get(chunkId);
39
- if (!chunks || sequence >= chunks.length || sequence < 0) {
40
- return null;
41
- }
42
- // Update timestamp to extend TTL
43
- this.chunkTimestamps.set(chunkId, Date.now());
44
- return {
45
- chunk: {
46
- id: chunkId,
47
- sequence,
48
- total: chunks.length,
49
- data: chunks[sequence]
50
- },
51
- hasMore: sequence < chunks.length - 1
52
- };
53
- }
54
- static cleanup(chunkId) {
55
- this.chunks.delete(chunkId);
56
- this.chunkTimestamps.delete(chunkId);
57
- }
58
- static cleanupExpired() {
59
- const now = Date.now();
60
- for (const [id, timestamp] of this.chunkTimestamps.entries()) {
61
- if (now - timestamp > this.CHUNK_TTL) {
62
- this.cleanup(id);
63
- }
64
- }
65
- }
66
- static getChunkInfo(chunkId) {
67
- const chunks = this.chunks.get(chunkId);
68
- const timestamp = this.chunkTimestamps.get(chunkId);
69
- if (!chunks || !timestamp) {
70
- return { exists: false };
71
- }
72
- return {
73
- exists: true,
74
- total: chunks.length,
75
- expires: timestamp + this.CHUNK_TTL
76
- };
77
- }
78
- }
79
- //# sourceMappingURL=ResponseChunker.js.map