@utaba/ucm-mcp-server 6.5.1 → 6.6.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/clients/UcmLocalApiClient.d.ts +174 -2
- package/dist/clients/UcmLocalApiClient.js +203 -3
- package/dist/mcp-server/clients/UcmLocalApiClient.d.ts +399 -0
- package/dist/mcp-server/clients/UcmLocalApiClient.js +719 -0
- package/dist/mcp-server/index.d.ts +3 -0
- package/dist/mcp-server/index.js +68 -0
- package/dist/mcp-server/interfaces/ILogger.d.ts +8 -0
- package/dist/mcp-server/interfaces/ILogger.js +4 -0
- package/dist/mcp-server/interfaces/IMcpTool.d.ts +7 -0
- package/dist/mcp-server/interfaces/IMcpTool.js +3 -0
- package/dist/mcp-server/logging/ConsoleLogger.d.ts +16 -0
- package/dist/mcp-server/logging/ConsoleLogger.js +45 -0
- package/dist/mcp-server/logging/LoggerFactory.d.ts +9 -0
- package/dist/mcp-server/logging/LoggerFactory.js +12 -0
- package/dist/mcp-server/server/McpConfig.d.ts +26 -0
- package/dist/mcp-server/server/McpConfig.js +90 -0
- package/dist/mcp-server/server/McpHandler.d.ts +12 -0
- package/dist/mcp-server/server/McpHandler.js +84 -0
- package/dist/mcp-server/server/McpServer.d.ts +15 -0
- package/dist/mcp-server/server/McpServer.js +49 -0
- package/dist/mcp-server/server/ToolRegistry.d.ts +23 -0
- package/dist/mcp-server/server/ToolRegistry.js +169 -0
- package/dist/mcp-server/tools/authorization/ListAuthorizationsTool.d.ts +21 -0
- package/dist/mcp-server/tools/authorization/ListAuthorizationsTool.js +146 -0
- package/dist/mcp-server/tools/authorization/SignOutTool.d.ts +23 -0
- package/dist/mcp-server/tools/authorization/SignOutTool.js +128 -0
- package/dist/mcp-server/tools/base/BaseToolController.d.ts +19 -0
- package/dist/mcp-server/tools/base/BaseToolController.js +58 -0
- package/dist/mcp-server/tools/connections/AccessConnectionTool.d.ts +21 -0
- package/dist/mcp-server/tools/connections/AccessConnectionTool.js +107 -0
- package/dist/mcp-server/tools/connections/CallRemoteToolTool.d.ts +22 -0
- package/dist/mcp-server/tools/connections/CallRemoteToolTool.js +124 -0
- package/dist/mcp-server/tools/core/DeleteArtifactTool.d.ts +11 -0
- package/dist/mcp-server/tools/core/DeleteArtifactTool.js +83 -0
- package/dist/mcp-server/tools/core/EditArtifactMetadataTool.d.ts +12 -0
- package/dist/mcp-server/tools/core/EditArtifactMetadataTool.js +173 -0
- package/dist/mcp-server/tools/core/GetArtifactTool.d.ts +13 -0
- package/dist/mcp-server/tools/core/GetArtifactTool.js +124 -0
- package/dist/mcp-server/tools/core/GetArtifactVersionsTool.d.ts +11 -0
- package/dist/mcp-server/tools/core/GetArtifactVersionsTool.js +63 -0
- package/dist/mcp-server/tools/core/GetChunkTool.d.ts +11 -0
- package/dist/mcp-server/tools/core/GetChunkTool.js +56 -0
- package/dist/mcp-server/tools/core/ListArtifactsTool.d.ts +11 -0
- package/dist/mcp-server/tools/core/ListArtifactsTool.js +84 -0
- package/dist/mcp-server/tools/core/MoveArtifactTool.d.ts +12 -0
- package/dist/mcp-server/tools/core/MoveArtifactTool.js +104 -0
- package/dist/mcp-server/tools/core/PublishArtifactFromFileTool.d.ts +15 -0
- package/dist/mcp-server/tools/core/PublishArtifactFromFileTool.js +277 -0
- package/dist/mcp-server/tools/core/PublishArtifactTool.d.ts +13 -0
- package/dist/mcp-server/tools/core/PublishArtifactTool.js +218 -0
- package/dist/mcp-server/tools/core/SearchArtifactsTool.d.ts +11 -0
- package/dist/mcp-server/tools/core/SearchArtifactsTool.js +137 -0
- package/dist/mcp-server/tools/list/ListNamespaceController.d.ts +1 -0
- package/dist/mcp-server/tools/list/ListNamespaceController.js +8 -0
- package/dist/mcp-server/tools/memory-graph/GraphCreateEntitiesTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphCreateEntitiesTool.js +58 -0
- package/dist/mcp-server/tools/memory-graph/GraphCreateRelationshipsTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphCreateRelationshipsTool.js +57 -0
- package/dist/mcp-server/tools/memory-graph/GraphCreateTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphCreateTool.js +64 -0
- package/dist/mcp-server/tools/memory-graph/GraphDeleteEntitiesTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphDeleteEntitiesTool.js +45 -0
- package/dist/mcp-server/tools/memory-graph/GraphDeleteRelationshipsTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphDeleteRelationshipsTool.js +45 -0
- package/dist/mcp-server/tools/memory-graph/GraphExploreTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphExploreTool.js +73 -0
- package/dist/mcp-server/tools/memory-graph/GraphFindEntitiesTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphFindEntitiesTool.js +68 -0
- package/dist/mcp-server/tools/memory-graph/GraphFindPathsTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphFindPathsTool.js +62 -0
- package/dist/mcp-server/tools/memory-graph/GraphGetEntityTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphGetEntityTool.js +49 -0
- package/dist/mcp-server/tools/memory-graph/GraphGetRelationshipsTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphGetRelationshipsTool.js +62 -0
- package/dist/mcp-server/tools/memory-graph/GraphListTemplatesTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphListTemplatesTool.js +34 -0
- package/dist/mcp-server/tools/memory-graph/GraphListTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphListTool.js +45 -0
- package/dist/mcp-server/tools/memory-graph/GraphOpenTool.d.ts +15 -0
- package/dist/mcp-server/tools/memory-graph/GraphOpenTool.js +50 -0
- package/dist/mcp-server/tools/memory-graph/GraphProposeVocabularyTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphProposeVocabularyTool.js +108 -0
- package/dist/mcp-server/tools/memory-graph/GraphSearchTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphSearchTool.js +94 -0
- package/dist/mcp-server/tools/memory-graph/GraphTraverseTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphTraverseTool.js +114 -0
- package/dist/mcp-server/tools/memory-graph/GraphUpdateEntitiesTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/GraphUpdateEntitiesTool.js +58 -0
- package/dist/mcp-server/tools/memory-graph/KnowledgeSetListTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/KnowledgeSetListTool.js +25 -0
- package/dist/mcp-server/tools/memory-graph/KnowledgeSetOpenTool.d.ts +14 -0
- package/dist/mcp-server/tools/memory-graph/KnowledgeSetOpenTool.js +31 -0
- package/dist/mcp-server/tools/repository/CreateRepositoryTool.d.ts +12 -0
- package/dist/mcp-server/tools/repository/CreateRepositoryTool.js +116 -0
- package/dist/mcp-server/tools/repository/GetRepositoryTool.d.ts +12 -0
- package/dist/mcp-server/tools/repository/GetRepositoryTool.js +85 -0
- package/dist/mcp-server/tools/repository/UpdateRepositoryTool.d.ts +12 -0
- package/dist/mcp-server/tools/repository/UpdateRepositoryTool.js +115 -0
- package/dist/mcp-server/tools/sharepoint/SharePointListConnectionsTool.d.ts +19 -0
- package/dist/mcp-server/tools/sharepoint/SharePointListConnectionsTool.js +90 -0
- package/dist/mcp-server/tools/sharepoint/SharePointListFoldersTool.d.ts +21 -0
- package/dist/mcp-server/tools/sharepoint/SharePointListFoldersTool.js +133 -0
- package/dist/mcp-server/tools/sharepoint/SharePointReadFileTool.d.ts +22 -0
- package/dist/mcp-server/tools/sharepoint/SharePointReadFileTool.js +146 -0
- package/dist/mcp-server/tools/sharepoint/SharePointReadRelatedFileTool.d.ts +18 -0
- package/dist/mcp-server/tools/sharepoint/SharePointReadRelatedFileTool.js +108 -0
- package/dist/mcp-server/tools/sharepoint/SharePointSearchTool.d.ts +22 -0
- package/dist/mcp-server/tools/sharepoint/SharePointSearchTool.js +125 -0
- package/dist/mcp-server/tools/utility/AuthorIndexTool.d.ts +11 -0
- package/dist/mcp-server/tools/utility/AuthorIndexTool.js +49 -0
- package/dist/mcp-server/tools/utility/AuthorRecentsTool.d.ts +11 -0
- package/dist/mcp-server/tools/utility/AuthorRecentsTool.js +49 -0
- package/dist/mcp-server/tools/utility/ListRepositoriesTool.d.ts +11 -0
- package/dist/mcp-server/tools/utility/ListRepositoriesTool.js +68 -0
- package/dist/mcp-server/tools/utility/QuickstartTool.d.ts +11 -0
- package/dist/mcp-server/tools/utility/QuickstartTool.js +36 -0
- package/dist/mcp-server/types/UcmApiTypes.d.ts +40 -0
- package/dist/mcp-server/types/UcmApiTypes.js +4 -0
- package/dist/mcp-server/utils/McpErrorHandler.d.ts +25 -0
- package/dist/mcp-server/utils/McpErrorHandler.js +67 -0
- package/dist/mcp-server/utils/PathUtils.d.ts +61 -0
- package/dist/mcp-server/utils/PathUtils.js +178 -0
- package/dist/mcp-server/utils/ResponseChunker.d.ts +25 -0
- package/dist/mcp-server/utils/ResponseChunker.js +79 -0
- package/dist/mcp-server/utils/SharePointErrorHandler.d.ts +34 -0
- package/dist/mcp-server/utils/SharePointErrorHandler.js +55 -0
- package/dist/schemas/memory-graph-tool-schemas.d.ts +789 -0
- package/dist/schemas/memory-graph-tool-schemas.js +181 -0
- package/dist/server/ToolRegistry.js +42 -8
- package/dist/tools/authorization/ListAuthorizationsTool.js +2 -2
- package/dist/tools/authorization/SignOutTool.js +2 -2
- package/dist/tools/connections/AccessConnectionTool.js +2 -2
- package/dist/tools/connections/CallRemoteToolTool.js +3 -3
- package/dist/tools/core/DeleteArtifactTool.js +5 -4
- package/dist/tools/core/EditArtifactMetadataTool.js +1 -1
- package/dist/tools/core/GetArtifactTool.js +1 -1
- package/dist/tools/core/GetArtifactVersionsTool.js +1 -1
- package/dist/tools/core/GetChunkTool.js +1 -1
- package/dist/tools/core/ListArtifactsTool.js +1 -1
- package/dist/tools/core/MoveArtifactTool.js +1 -1
- package/dist/tools/core/PublishArtifactFromFileTool.js +1 -1
- package/dist/tools/core/PublishArtifactTool.js +2 -2
- package/dist/tools/core/SearchArtifactsTool.js +7 -6
- package/dist/tools/memory-graph/GraphCreateEntitiesTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphCreateEntitiesTool.js +56 -0
- package/dist/tools/memory-graph/GraphCreateRelationshipsTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphCreateRelationshipsTool.js +55 -0
- package/dist/tools/memory-graph/GraphCreateTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphCreateTool.js +62 -0
- package/dist/tools/memory-graph/GraphDeleteEntitiesTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphDeleteEntitiesTool.js +43 -0
- package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.js +43 -0
- package/dist/tools/memory-graph/GraphExploreTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphExploreTool.js +71 -0
- package/dist/tools/memory-graph/GraphFindEntitiesTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphFindEntitiesTool.js +66 -0
- package/dist/tools/memory-graph/GraphFindPathsTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphFindPathsTool.js +60 -0
- package/dist/tools/memory-graph/GraphGetEntityTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphGetEntityTool.js +47 -0
- package/dist/tools/memory-graph/GraphGetRelationshipsTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphGetRelationshipsTool.js +60 -0
- package/dist/tools/memory-graph/GraphGetStatsTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphGetStatsTool.js +42 -0
- package/dist/tools/memory-graph/GraphListTemplatesTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphListTemplatesTool.js +32 -0
- package/dist/tools/memory-graph/GraphListTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphListTool.js +43 -0
- package/dist/tools/memory-graph/GraphOpenTool.d.ts +12 -0
- package/dist/tools/memory-graph/GraphOpenTool.js +48 -0
- package/dist/tools/memory-graph/GraphProposeVocabularyTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphProposeVocabularyTool.js +104 -0
- package/dist/tools/memory-graph/GraphRemoveRelationshipsTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphRemoveRelationshipsTool.js +47 -0
- package/dist/tools/memory-graph/GraphSearchTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphSearchTool.js +92 -0
- package/dist/tools/memory-graph/GraphTraverseTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphTraverseTool.js +112 -0
- package/dist/tools/memory-graph/GraphUpdateEntitiesTool.d.ts +11 -0
- package/dist/tools/memory-graph/GraphUpdateEntitiesTool.js +56 -0
- package/dist/tools/memory-graph/KnowledgeSetListTool.d.ts +11 -0
- package/dist/tools/memory-graph/KnowledgeSetListTool.js +23 -0
- package/dist/tools/memory-graph/KnowledgeSetOpenTool.d.ts +11 -0
- package/dist/tools/memory-graph/KnowledgeSetOpenTool.js +29 -0
- package/dist/tools/repository/CreateRepositoryTool.js +10 -9
- package/dist/tools/repository/GetRepositoryTool.js +15 -15
- package/dist/tools/repository/UpdateRepositoryTool.js +10 -9
- package/dist/tools/sharepoint/SharePointListConnectionsTool.js +1 -1
- package/dist/tools/sharepoint/SharePointListFoldersTool.js +1 -1
- package/dist/tools/utility/AuthorIndexTool.js +6 -5
- package/dist/tools/utility/AuthorRecentsTool.js +6 -5
- package/dist/tools/utility/ListRepositoriesTool.js +5 -4
- package/dist/utils/McpErrorHandler.js +1 -1
- package/package.json +1 -1
- package/package.json.backup +1 -1
|
@@ -3,9 +3,8 @@ export declare class UcmLocalApiClient {
|
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private authToken?;
|
|
5
5
|
private authorId?;
|
|
6
|
-
private organizationId?;
|
|
7
6
|
private client;
|
|
8
|
-
constructor(baseUrl: string, authToken?: string | undefined, timeout?: number, authorId?: string | undefined
|
|
7
|
+
constructor(baseUrl: string, authToken?: string | undefined, timeout?: number, authorId?: string | undefined);
|
|
9
8
|
private setupInterceptors;
|
|
10
9
|
private ensureClient;
|
|
11
10
|
getAuthors(): Promise<AuthorData[]>;
|
|
@@ -223,5 +222,178 @@ export declare class UcmLocalApiClient {
|
|
|
223
222
|
* @param connectionType - Optional filter: 'sharepoint' | 'remote-mcp' | 'all' (default: 'all')
|
|
224
223
|
*/
|
|
225
224
|
listAuthorizations(connectionType?: string): Promise<any>;
|
|
225
|
+
/**
|
|
226
|
+
* List memory graphs, optionally filtered by scope
|
|
227
|
+
* @param scope - 'organization' | 'personal' | 'all' (default: 'all')
|
|
228
|
+
*/
|
|
229
|
+
listMemoryGraphs(scope?: string): Promise<any>;
|
|
230
|
+
/**
|
|
231
|
+
* Create a new Memory Graph for the authenticated user
|
|
232
|
+
*/
|
|
233
|
+
createMemoryGraph(data: {
|
|
234
|
+
label: string;
|
|
235
|
+
templateId: string;
|
|
236
|
+
description?: string;
|
|
237
|
+
scope?: string;
|
|
238
|
+
}): Promise<any>;
|
|
239
|
+
/**
|
|
240
|
+
* List available vocabulary templates for Memory Graph creation
|
|
241
|
+
*/
|
|
242
|
+
listMemoryGraphTemplates(): Promise<any>;
|
|
243
|
+
/**
|
|
244
|
+
* Semantic vector search across multiple Memory Graphs
|
|
245
|
+
*/
|
|
246
|
+
graphSearchMultiple(query: string, options?: {
|
|
247
|
+
graphIds?: string[];
|
|
248
|
+
entityTypes?: string[];
|
|
249
|
+
limit?: number;
|
|
250
|
+
similarityThreshold?: number;
|
|
251
|
+
}): Promise<any>;
|
|
252
|
+
/**
|
|
253
|
+
* List knowledge sets for an organization
|
|
254
|
+
*/
|
|
255
|
+
listKnowledgeSets(): Promise<any>;
|
|
256
|
+
/**
|
|
257
|
+
* List knowledge set summary (markdown) for an organization
|
|
258
|
+
*/
|
|
259
|
+
listKnowledgeSetSummary(): Promise<string>;
|
|
260
|
+
/**
|
|
261
|
+
* Open a knowledge set — returns markdown summary with contents and tool guidance
|
|
262
|
+
*/
|
|
263
|
+
openKnowledgeSet(knowledgeSetId: string): Promise<string>;
|
|
264
|
+
/**
|
|
265
|
+
* Open a memory graph — returns vocabulary, stats, instructions, policies, and metadata
|
|
266
|
+
*/
|
|
267
|
+
graphOpen(graphId: string): Promise<any>;
|
|
268
|
+
/**
|
|
269
|
+
* Find entities with filters and pagination
|
|
270
|
+
*/
|
|
271
|
+
graphFindEntities(graphId: string, query: {
|
|
272
|
+
entityTypes?: string[];
|
|
273
|
+
searchTerm?: string;
|
|
274
|
+
detailLevel?: string;
|
|
275
|
+
offset?: number;
|
|
276
|
+
limit?: number;
|
|
277
|
+
}): Promise<any>;
|
|
278
|
+
/**
|
|
279
|
+
* Get a single entity by ID
|
|
280
|
+
*/
|
|
281
|
+
graphGetEntity(graphId: string, entityId: string, detailLevel?: string): Promise<any>;
|
|
282
|
+
/**
|
|
283
|
+
* Get relationships for an entity
|
|
284
|
+
*/
|
|
285
|
+
graphGetRelationships(graphId: string, entityId: string, options?: {
|
|
286
|
+
direction?: string;
|
|
287
|
+
relationshipTypes?: string[];
|
|
288
|
+
limit?: number;
|
|
289
|
+
}): Promise<any>;
|
|
290
|
+
/**
|
|
291
|
+
* Explore neighbourhood around an entity (BFS, 1-3 hops)
|
|
292
|
+
*/
|
|
293
|
+
graphExplore(graphId: string, options: {
|
|
294
|
+
entityId: string;
|
|
295
|
+
maxDepth?: number;
|
|
296
|
+
relationshipTypes?: string[];
|
|
297
|
+
entityTypes?: string[];
|
|
298
|
+
limit?: number;
|
|
299
|
+
}): Promise<any>;
|
|
300
|
+
/**
|
|
301
|
+
* Find paths between two entities
|
|
302
|
+
*/
|
|
303
|
+
graphFindPaths(graphId: string, options: {
|
|
304
|
+
sourceEntityId: string;
|
|
305
|
+
targetEntityId: string;
|
|
306
|
+
maxDepth?: number;
|
|
307
|
+
relationshipTypes?: string[];
|
|
308
|
+
}): Promise<any>;
|
|
309
|
+
/**
|
|
310
|
+
* Structured graph traversal with a JSON spec
|
|
311
|
+
*/
|
|
312
|
+
graphTraverse(graphId: string, spec: {
|
|
313
|
+
start: Record<string, any>;
|
|
314
|
+
steps: Array<Record<string, any>>;
|
|
315
|
+
returnMode?: string;
|
|
316
|
+
limit?: number;
|
|
317
|
+
detailLevel?: string;
|
|
318
|
+
}): Promise<any>;
|
|
319
|
+
/**
|
|
320
|
+
* Semantic vector search on entity embeddings
|
|
321
|
+
*/
|
|
322
|
+
graphSearch(graphId: string, query: string, options?: {
|
|
323
|
+
entityTypes?: string[];
|
|
324
|
+
limit?: number;
|
|
325
|
+
similarityThreshold?: number;
|
|
326
|
+
}): Promise<any>;
|
|
327
|
+
/**
|
|
328
|
+
* Create one or more entities
|
|
329
|
+
*/
|
|
330
|
+
graphCreateEntities(graphId: string, entities: Array<{
|
|
331
|
+
entityType: string;
|
|
332
|
+
label: string;
|
|
333
|
+
summary?: string;
|
|
334
|
+
properties?: Record<string, unknown>;
|
|
335
|
+
data?: unknown;
|
|
336
|
+
}>): Promise<any>;
|
|
337
|
+
/**
|
|
338
|
+
* Update one or more entities
|
|
339
|
+
*/
|
|
340
|
+
graphUpdateEntities(graphId: string, updates: Array<{
|
|
341
|
+
entityId: string;
|
|
342
|
+
label?: string;
|
|
343
|
+
summary?: string;
|
|
344
|
+
properties?: Record<string, unknown>;
|
|
345
|
+
data?: unknown;
|
|
346
|
+
}>): Promise<any>;
|
|
347
|
+
/**
|
|
348
|
+
* Delete one or more entities
|
|
349
|
+
*/
|
|
350
|
+
graphDeleteEntities(graphId: string, entityIds: string[]): Promise<any>;
|
|
351
|
+
/**
|
|
352
|
+
* Create one or more relationships
|
|
353
|
+
*/
|
|
354
|
+
graphCreateRelationships(graphId: string, relationships: Array<{
|
|
355
|
+
sourceEntityId: string;
|
|
356
|
+
targetEntityId: string;
|
|
357
|
+
relationshipType: string;
|
|
358
|
+
properties?: Record<string, unknown>;
|
|
359
|
+
}>): Promise<any>;
|
|
360
|
+
/**
|
|
361
|
+
* Delete one or more relationships
|
|
362
|
+
*/
|
|
363
|
+
graphDeleteRelationships(graphId: string, relationshipIds: string[]): Promise<any>;
|
|
364
|
+
/**
|
|
365
|
+
* Delete an entire memory graph (SQL record + CosmosDB repository)
|
|
366
|
+
*/
|
|
367
|
+
graphDelete(graphId: string): Promise<any>;
|
|
368
|
+
/**
|
|
369
|
+
* Propose vocabulary extensions (entity types / relationship types)
|
|
370
|
+
*/
|
|
371
|
+
graphProposeVocabulary(graphId: string, proposals: {
|
|
372
|
+
entityTypes?: Array<{
|
|
373
|
+
type: string;
|
|
374
|
+
description: string;
|
|
375
|
+
justification: string;
|
|
376
|
+
properties?: Array<{
|
|
377
|
+
name: string;
|
|
378
|
+
type: string;
|
|
379
|
+
required: boolean;
|
|
380
|
+
description?: string;
|
|
381
|
+
}>;
|
|
382
|
+
}>;
|
|
383
|
+
relationshipTypes?: Array<{
|
|
384
|
+
type: string;
|
|
385
|
+
description: string;
|
|
386
|
+
justification: string;
|
|
387
|
+
allowedSourceTypes: string[];
|
|
388
|
+
allowedTargetTypes: string[];
|
|
389
|
+
bidirectional?: boolean;
|
|
390
|
+
properties?: Array<{
|
|
391
|
+
name: string;
|
|
392
|
+
type: string;
|
|
393
|
+
required: boolean;
|
|
394
|
+
description?: string;
|
|
395
|
+
}>;
|
|
396
|
+
}>;
|
|
397
|
+
}): Promise<any>;
|
|
226
398
|
}
|
|
227
399
|
//# sourceMappingURL=UcmLocalApiClient.d.ts.map
|
|
@@ -3,13 +3,11 @@ export class UcmLocalApiClient {
|
|
|
3
3
|
baseUrl;
|
|
4
4
|
authToken;
|
|
5
5
|
authorId;
|
|
6
|
-
organizationId;
|
|
7
6
|
client;
|
|
8
|
-
constructor(baseUrl, authToken, timeout = 600000, authorId
|
|
7
|
+
constructor(baseUrl, authToken, timeout = 600000, authorId) {
|
|
9
8
|
this.baseUrl = baseUrl;
|
|
10
9
|
this.authToken = authToken;
|
|
11
10
|
this.authorId = authorId;
|
|
12
|
-
this.organizationId = organizationId;
|
|
13
11
|
this.client = axios.create({
|
|
14
12
|
baseURL: this.baseUrl,
|
|
15
13
|
timeout,
|
|
@@ -515,5 +513,207 @@ export class UcmLocalApiClient {
|
|
|
515
513
|
const response = await client.get('/api/v1/oauth/authorizations', { params });
|
|
516
514
|
return response.data;
|
|
517
515
|
}
|
|
516
|
+
// ─── Memory Graph API Methods ───────────────────────────────────────
|
|
517
|
+
/**
|
|
518
|
+
* List memory graphs, optionally filtered by scope
|
|
519
|
+
* @param scope - 'organization' | 'personal' | 'all' (default: 'all')
|
|
520
|
+
*/
|
|
521
|
+
async listMemoryGraphs(scope) {
|
|
522
|
+
const client = this.ensureClient();
|
|
523
|
+
const params = {};
|
|
524
|
+
if (scope && scope !== 'all') {
|
|
525
|
+
params.scope = scope;
|
|
526
|
+
}
|
|
527
|
+
const response = await client.get(`/api/v1/memory-graphs`, { params });
|
|
528
|
+
return response.data;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Create a new Memory Graph for the authenticated user
|
|
532
|
+
*/
|
|
533
|
+
async createMemoryGraph(data) {
|
|
534
|
+
const client = this.ensureClient();
|
|
535
|
+
const response = await client.post(`/api/v1/memory-graphs`, data);
|
|
536
|
+
return response.data;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* List available vocabulary templates for Memory Graph creation
|
|
540
|
+
*/
|
|
541
|
+
async listMemoryGraphTemplates() {
|
|
542
|
+
const client = this.ensureClient();
|
|
543
|
+
const response = await client.get(`/api/v1/memory-graphs/templates`);
|
|
544
|
+
return response.data;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Semantic vector search across multiple Memory Graphs
|
|
548
|
+
*/
|
|
549
|
+
async graphSearchMultiple(query, options) {
|
|
550
|
+
const client = this.ensureClient();
|
|
551
|
+
const response = await client.post(`/api/v1/memory-graphs/search`, {
|
|
552
|
+
query,
|
|
553
|
+
...options
|
|
554
|
+
});
|
|
555
|
+
return response.data;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* List knowledge sets for an organization
|
|
559
|
+
*/
|
|
560
|
+
async listKnowledgeSets() {
|
|
561
|
+
const client = this.ensureClient();
|
|
562
|
+
const response = await client.get(`/api/v1/knowledge-sets`);
|
|
563
|
+
return response.data;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* List knowledge set summary (markdown) for an organization
|
|
567
|
+
*/
|
|
568
|
+
async listKnowledgeSetSummary() {
|
|
569
|
+
const client = this.ensureClient();
|
|
570
|
+
const response = await client.get(`/api/v1/knowledge-sets/summary`);
|
|
571
|
+
return response.data.markdown;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Open a knowledge set — returns markdown summary with contents and tool guidance
|
|
575
|
+
*/
|
|
576
|
+
async openKnowledgeSet(knowledgeSetId) {
|
|
577
|
+
const client = this.ensureClient();
|
|
578
|
+
const response = await client.get(`/api/v1/knowledge-sets/${knowledgeSetId}/summary`);
|
|
579
|
+
return response.data.markdown;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Open a memory graph — returns vocabulary, stats, instructions, policies, and metadata
|
|
583
|
+
*/
|
|
584
|
+
async graphOpen(graphId) {
|
|
585
|
+
const client = this.ensureClient();
|
|
586
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/open`);
|
|
587
|
+
return response.data;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Find entities with filters and pagination
|
|
591
|
+
*/
|
|
592
|
+
async graphFindEntities(graphId, query) {
|
|
593
|
+
const client = this.ensureClient();
|
|
594
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/entities/find`, query);
|
|
595
|
+
return response.data;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Get a single entity by ID
|
|
599
|
+
*/
|
|
600
|
+
async graphGetEntity(graphId, entityId, detailLevel) {
|
|
601
|
+
const client = this.ensureClient();
|
|
602
|
+
const params = {};
|
|
603
|
+
if (detailLevel)
|
|
604
|
+
params.detailLevel = detailLevel;
|
|
605
|
+
const response = await client.get(`/api/v1/memory-graphs/${graphId}/entities/${entityId}`, { params });
|
|
606
|
+
return response.data;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Get relationships for an entity
|
|
610
|
+
*/
|
|
611
|
+
async graphGetRelationships(graphId, entityId, options) {
|
|
612
|
+
const client = this.ensureClient();
|
|
613
|
+
const params = {};
|
|
614
|
+
if (options?.direction)
|
|
615
|
+
params.direction = options.direction;
|
|
616
|
+
if (options?.relationshipTypes)
|
|
617
|
+
params.relationshipTypes = options.relationshipTypes.join(',');
|
|
618
|
+
if (options?.limit)
|
|
619
|
+
params.limit = String(options.limit);
|
|
620
|
+
const response = await client.get(`/api/v1/memory-graphs/${graphId}/entities/${entityId}/relationships`, { params });
|
|
621
|
+
return response.data;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Explore neighbourhood around an entity (BFS, 1-3 hops)
|
|
625
|
+
*/
|
|
626
|
+
async graphExplore(graphId, options) {
|
|
627
|
+
const client = this.ensureClient();
|
|
628
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/explore`, options);
|
|
629
|
+
return response.data;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Find paths between two entities
|
|
633
|
+
*/
|
|
634
|
+
async graphFindPaths(graphId, options) {
|
|
635
|
+
const client = this.ensureClient();
|
|
636
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/find-paths`, options);
|
|
637
|
+
return response.data;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Structured graph traversal with a JSON spec
|
|
641
|
+
*/
|
|
642
|
+
async graphTraverse(graphId, spec) {
|
|
643
|
+
const client = this.ensureClient();
|
|
644
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/traverse`, spec);
|
|
645
|
+
return response.data;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Semantic vector search on entity embeddings
|
|
649
|
+
*/
|
|
650
|
+
async graphSearch(graphId, query, options) {
|
|
651
|
+
const client = this.ensureClient();
|
|
652
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/search`, {
|
|
653
|
+
query,
|
|
654
|
+
...options
|
|
655
|
+
});
|
|
656
|
+
return response.data;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Create one or more entities
|
|
660
|
+
*/
|
|
661
|
+
async graphCreateEntities(graphId, entities) {
|
|
662
|
+
const client = this.ensureClient();
|
|
663
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/entities`, { entities });
|
|
664
|
+
return response.data;
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Update one or more entities
|
|
668
|
+
*/
|
|
669
|
+
async graphUpdateEntities(graphId, updates) {
|
|
670
|
+
const client = this.ensureClient();
|
|
671
|
+
const response = await client.put(`/api/v1/memory-graphs/${graphId}/entities`, { updates });
|
|
672
|
+
return response.data;
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Delete one or more entities
|
|
676
|
+
*/
|
|
677
|
+
async graphDeleteEntities(graphId, entityIds) {
|
|
678
|
+
const client = this.ensureClient();
|
|
679
|
+
const response = await client.delete(`/api/v1/memory-graphs/${graphId}/entities`, {
|
|
680
|
+
data: { entityIds }
|
|
681
|
+
});
|
|
682
|
+
return response.data;
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Create one or more relationships
|
|
686
|
+
*/
|
|
687
|
+
async graphCreateRelationships(graphId, relationships) {
|
|
688
|
+
const client = this.ensureClient();
|
|
689
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/relationships`, { relationships });
|
|
690
|
+
return response.data;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Delete one or more relationships
|
|
694
|
+
*/
|
|
695
|
+
async graphDeleteRelationships(graphId, relationshipIds) {
|
|
696
|
+
const client = this.ensureClient();
|
|
697
|
+
const response = await client.delete(`/api/v1/memory-graphs/${graphId}/relationships`, {
|
|
698
|
+
data: { relationshipIds }
|
|
699
|
+
});
|
|
700
|
+
return response.data;
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Delete an entire memory graph (SQL record + CosmosDB repository)
|
|
704
|
+
*/
|
|
705
|
+
async graphDelete(graphId) {
|
|
706
|
+
const client = this.ensureClient();
|
|
707
|
+
const response = await client.delete(`/api/v1/memory-graphs/${graphId}`);
|
|
708
|
+
return response.data;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Propose vocabulary extensions (entity types / relationship types)
|
|
712
|
+
*/
|
|
713
|
+
async graphProposeVocabulary(graphId, proposals) {
|
|
714
|
+
const client = this.ensureClient();
|
|
715
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/vocabulary/propose`, proposals);
|
|
716
|
+
return response.data;
|
|
717
|
+
}
|
|
518
718
|
}
|
|
519
719
|
//# sourceMappingURL=UcmLocalApiClient.js.map
|