@mcp-abap-adt/calm-server 0.1.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/CHANGELOG.md +53 -0
- package/LICENSE +22 -0
- package/README.md +213 -0
- package/dist/bin/stdio.d.ts +3 -0
- package/dist/bin/stdio.d.ts.map +1 -0
- package/dist/bin/stdio.js +15 -0
- package/dist/bin/stdio.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/registry/CalmToolRegistry.d.ts +27 -0
- package/dist/registry/CalmToolRegistry.d.ts.map +1 -0
- package/dist/registry/CalmToolRegistry.js +62 -0
- package/dist/registry/CalmToolRegistry.js.map +1 -0
- package/dist/registry/HandlerGroup.d.ts +14 -0
- package/dist/registry/HandlerGroup.d.ts.map +1 -0
- package/dist/registry/HandlerGroup.js +24 -0
- package/dist/registry/HandlerGroup.js.map +1 -0
- package/dist/registry/index.d.ts +5 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +10 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/jsonSchemaToZod.d.ts +13 -0
- package/dist/registry/jsonSchemaToZod.d.ts.map +1 -0
- package/dist/registry/jsonSchemaToZod.js +57 -0
- package/dist/registry/jsonSchemaToZod.js.map +1 -0
- package/dist/registry/types.d.ts +59 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +3 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/server/BaseCalmMcpServer.d.ts +37 -0
- package/dist/server/BaseCalmMcpServer.d.ts.map +1 -0
- package/dist/server/BaseCalmMcpServer.js +44 -0
- package/dist/server/BaseCalmMcpServer.js.map +1 -0
- package/dist/server/buildClient.d.ts +10 -0
- package/dist/server/buildClient.d.ts.map +1 -0
- package/dist/server/buildClient.js +74 -0
- package/dist/server/buildClient.js.map +1 -0
- package/dist/server/config.d.ts +18 -0
- package/dist/server/config.d.ts.map +1 -0
- package/dist/server/config.js +58 -0
- package/dist/server/config.js.map +1 -0
- package/dist/server/index.d.ts +5 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +13 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/runStdio.d.ts +12 -0
- package/dist/server/runStdio.d.ts.map +1 -0
- package/dist/server/runStdio.js +48 -0
- package/dist/server/runStdio.js.map +1 -0
- package/dist/tools/analytics/index.d.ts +8 -0
- package/dist/tools/analytics/index.d.ts.map +1 -0
- package/dist/tools/analytics/index.js +16 -0
- package/dist/tools/analytics/index.js.map +1 -0
- package/dist/tools/analytics/listAnalyticsProviders.d.ts +5 -0
- package/dist/tools/analytics/listAnalyticsProviders.d.ts.map +1 -0
- package/dist/tools/analytics/listAnalyticsProviders.js +16 -0
- package/dist/tools/analytics/listAnalyticsProviders.js.map +1 -0
- package/dist/tools/analytics/queryAnalytics.d.ts +15 -0
- package/dist/tools/analytics/queryAnalytics.d.ts.map +1 -0
- package/dist/tools/analytics/queryAnalytics.js +61 -0
- package/dist/tools/analytics/queryAnalytics.js.map +1 -0
- package/dist/tools/documents/getDocument.d.ts +7 -0
- package/dist/tools/documents/getDocument.d.ts.map +1 -0
- package/dist/tools/documents/getDocument.js +34 -0
- package/dist/tools/documents/getDocument.js.map +1 -0
- package/dist/tools/documents/index.d.ts +9 -0
- package/dist/tools/documents/index.d.ts.map +1 -0
- package/dist/tools/documents/index.js +16 -0
- package/dist/tools/documents/index.js.map +1 -0
- package/dist/tools/documents/listDocuments.d.ts +16 -0
- package/dist/tools/documents/listDocuments.d.ts.map +1 -0
- package/dist/tools/documents/listDocuments.js +85 -0
- package/dist/tools/documents/listDocuments.js.map +1 -0
- package/dist/tools/features/createFeature.d.ts +5 -0
- package/dist/tools/features/createFeature.d.ts.map +1 -0
- package/dist/tools/features/createFeature.js +55 -0
- package/dist/tools/features/createFeature.js.map +1 -0
- package/dist/tools/features/deleteFeature.d.ts +10 -0
- package/dist/tools/features/deleteFeature.d.ts.map +1 -0
- package/dist/tools/features/deleteFeature.js +35 -0
- package/dist/tools/features/deleteFeature.js.map +1 -0
- package/dist/tools/features/getFeature.d.ts +7 -0
- package/dist/tools/features/getFeature.d.ts.map +1 -0
- package/dist/tools/features/getFeature.js +37 -0
- package/dist/tools/features/getFeature.js.map +1 -0
- package/dist/tools/features/getFeatureByDisplayId.d.ts +7 -0
- package/dist/tools/features/getFeatureByDisplayId.d.ts.map +1 -0
- package/dist/tools/features/getFeatureByDisplayId.js +37 -0
- package/dist/tools/features/getFeatureByDisplayId.js.map +1 -0
- package/dist/tools/features/index.d.ts +21 -0
- package/dist/tools/features/index.d.ts.map +1 -0
- package/dist/tools/features/index.js +40 -0
- package/dist/tools/features/index.js.map +1 -0
- package/dist/tools/features/listFeaturePriorities.d.ts +7 -0
- package/dist/tools/features/listFeaturePriorities.d.ts.map +1 -0
- package/dist/tools/features/listFeaturePriorities.js +23 -0
- package/dist/tools/features/listFeaturePriorities.js.map +1 -0
- package/dist/tools/features/listFeatureStatuses.d.ts +7 -0
- package/dist/tools/features/listFeatureStatuses.d.ts.map +1 -0
- package/dist/tools/features/listFeatureStatuses.js +23 -0
- package/dist/tools/features/listFeatureStatuses.js.map +1 -0
- package/dist/tools/features/listFeatures.d.ts +19 -0
- package/dist/tools/features/listFeatures.d.ts.map +1 -0
- package/dist/tools/features/listFeatures.js +123 -0
- package/dist/tools/features/listFeatures.js.map +1 -0
- package/dist/tools/features/updateFeature.d.ts +7 -0
- package/dist/tools/features/updateFeature.d.ts.map +1 -0
- package/dist/tools/features/updateFeature.js +44 -0
- package/dist/tools/features/updateFeature.js.map +1 -0
- package/dist/tools/hierarchy/getHierarchyWithChildren.d.ts +10 -0
- package/dist/tools/hierarchy/getHierarchyWithChildren.d.ts.map +1 -0
- package/dist/tools/hierarchy/getHierarchyWithChildren.js +45 -0
- package/dist/tools/hierarchy/getHierarchyWithChildren.js.map +1 -0
- package/dist/tools/hierarchy/index.d.ts +9 -0
- package/dist/tools/hierarchy/index.d.ts.map +1 -0
- package/dist/tools/hierarchy/index.js +16 -0
- package/dist/tools/hierarchy/index.js.map +1 -0
- package/dist/tools/hierarchy/listHierarchy.d.ts +16 -0
- package/dist/tools/hierarchy/listHierarchy.d.ts.map +1 -0
- package/dist/tools/hierarchy/listHierarchy.js +74 -0
- package/dist/tools/hierarchy/listHierarchy.js.map +1 -0
- package/dist/tools/index.d.ts +16 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +45 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/logs/getLogs.d.ts +15 -0
- package/dist/tools/logs/getLogs.d.ts.map +1 -0
- package/dist/tools/logs/getLogs.js +55 -0
- package/dist/tools/logs/getLogs.js.map +1 -0
- package/dist/tools/logs/index.d.ts +7 -0
- package/dist/tools/logs/index.d.ts.map +1 -0
- package/dist/tools/logs/index.js +10 -0
- package/dist/tools/logs/index.js.map +1 -0
- package/dist/tools/processMonitoring/index.d.ts +7 -0
- package/dist/tools/processMonitoring/index.d.ts.map +1 -0
- package/dist/tools/processMonitoring/index.js +12 -0
- package/dist/tools/processMonitoring/index.js.map +1 -0
- package/dist/tools/processMonitoring/listBusinessProcesses.d.ts +10 -0
- package/dist/tools/processMonitoring/listBusinessProcesses.d.ts.map +1 -0
- package/dist/tools/processMonitoring/listBusinessProcesses.js +36 -0
- package/dist/tools/processMonitoring/listBusinessProcesses.js.map +1 -0
- package/dist/tools/projects/getProject.d.ts +7 -0
- package/dist/tools/projects/getProject.d.ts.map +1 -0
- package/dist/tools/projects/getProject.js +32 -0
- package/dist/tools/projects/getProject.js.map +1 -0
- package/dist/tools/projects/index.d.ts +9 -0
- package/dist/tools/projects/index.d.ts.map +1 -0
- package/dist/tools/projects/index.js +16 -0
- package/dist/tools/projects/index.js.map +1 -0
- package/dist/tools/projects/listProjects.d.ts +16 -0
- package/dist/tools/projects/listProjects.d.ts.map +1 -0
- package/dist/tools/projects/listProjects.js +69 -0
- package/dist/tools/projects/listProjects.js.map +1 -0
- package/dist/tools/tasks/getTask.d.ts +7 -0
- package/dist/tools/tasks/getTask.d.ts.map +1 -0
- package/dist/tools/tasks/getTask.js +34 -0
- package/dist/tools/tasks/getTask.js.map +1 -0
- package/dist/tools/tasks/index.d.ts +11 -0
- package/dist/tools/tasks/index.d.ts.map +1 -0
- package/dist/tools/tasks/index.js +20 -0
- package/dist/tools/tasks/index.js.map +1 -0
- package/dist/tools/tasks/listTaskComments.d.ts +11 -0
- package/dist/tools/tasks/listTaskComments.d.ts.map +1 -0
- package/dist/tools/tasks/listTaskComments.js +46 -0
- package/dist/tools/tasks/listTaskComments.js.map +1 -0
- package/dist/tools/tasks/listTasks.d.ts +17 -0
- package/dist/tools/tasks/listTasks.d.ts.map +1 -0
- package/dist/tools/tasks/listTasks.js +89 -0
- package/dist/tools/tasks/listTasks.js.map +1 -0
- package/dist/tools/testCases/getTestCase.d.ts +7 -0
- package/dist/tools/testCases/getTestCase.d.ts.map +1 -0
- package/dist/tools/testCases/getTestCase.js +34 -0
- package/dist/tools/testCases/getTestCase.js.map +1 -0
- package/dist/tools/testCases/index.d.ts +9 -0
- package/dist/tools/testCases/index.d.ts.map +1 -0
- package/dist/tools/testCases/index.js +16 -0
- package/dist/tools/testCases/index.js.map +1 -0
- package/dist/tools/testCases/listTestCases.d.ts +16 -0
- package/dist/tools/testCases/listTestCases.d.ts.map +1 -0
- package/dist/tools/testCases/listTestCases.js +69 -0
- package/dist/tools/testCases/listTestCases.js.map +1 -0
- package/dist/utils/errorMapping.d.ts +28 -0
- package/dist/utils/errorMapping.d.ts.map +1 -0
- package/dist/utils/errorMapping.js +88 -0
- package/dist/utils/errorMapping.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/odataFilter.d.ts +15 -0
- package/dist/utils/odataFilter.d.ts.map +1 -0
- package/dist/utils/odataFilter.js +24 -0
- package/dist/utils/odataFilter.js.map +1 -0
- package/dist/utils/tokenEconomy.d.ts +36 -0
- package/dist/utils/tokenEconomy.d.ts.map +1 -0
- package/dist/utils/tokenEconomy.js +37 -0
- package/dist/utils/tokenEconomy.js.map +1 -0
- package/package.json +86 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listFeaturesTool = void 0;
|
|
4
|
+
const calm_client_1 = require("@mcp-abap-adt/calm-client");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Fields returned by default — chosen to be compact while useful in
|
|
8
|
+
* the vast majority of report/lookup workflows. Callers can override
|
|
9
|
+
* via `fields`.
|
|
10
|
+
*/
|
|
11
|
+
const DEFAULT_FIELDS = [
|
|
12
|
+
'uuid',
|
|
13
|
+
'displayId',
|
|
14
|
+
'title',
|
|
15
|
+
'statusCode',
|
|
16
|
+
'priorityCode',
|
|
17
|
+
'modifiedAt',
|
|
18
|
+
];
|
|
19
|
+
const ALLOWED_FIELDS = [
|
|
20
|
+
'uuid',
|
|
21
|
+
'displayId',
|
|
22
|
+
'title',
|
|
23
|
+
'description',
|
|
24
|
+
'projectId',
|
|
25
|
+
'statusCode',
|
|
26
|
+
'priorityCode',
|
|
27
|
+
'releaseId',
|
|
28
|
+
'scopeId',
|
|
29
|
+
'responsibleId',
|
|
30
|
+
'modifiedAt',
|
|
31
|
+
'createdAt',
|
|
32
|
+
'type',
|
|
33
|
+
'workstreamId',
|
|
34
|
+
'tags',
|
|
35
|
+
];
|
|
36
|
+
const definition = {
|
|
37
|
+
name: 'calm_features_list',
|
|
38
|
+
description: 'List Cloud ALM features for a given project. Returns a compact record per feature (by default: uuid, displayId, title, statusCode, priorityCode, modifiedAt). Use `status` or `priorityCode` to filter, `limit` (max 200) + `offset` to paginate, `fields` to add/narrow columns, `withCount` to get the total matching count.',
|
|
39
|
+
inputSchema: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
required: ['projectId'],
|
|
42
|
+
properties: {
|
|
43
|
+
projectId: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'Cloud ALM project identifier. Get candidates via calm_projects_list.',
|
|
46
|
+
},
|
|
47
|
+
status: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'Filter by statusCode (e.g. "OPEN", "IN_PROGRESS", "CLOSED"). Use calm_features_list_statuses to discover valid values.',
|
|
50
|
+
},
|
|
51
|
+
priorityCode: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
description: 'Filter by priority (string code as the API expects on write; on read priority comes back as a number).',
|
|
54
|
+
},
|
|
55
|
+
responsibleId: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: 'Filter by the responsibleId (assignee) field.',
|
|
58
|
+
},
|
|
59
|
+
fields: {
|
|
60
|
+
type: 'array',
|
|
61
|
+
description: 'Subset of feature fields to return. Use this to trim payload or include non-default fields like description or tags.',
|
|
62
|
+
items: { type: 'string', enum: [...ALLOWED_FIELDS] },
|
|
63
|
+
},
|
|
64
|
+
limit: {
|
|
65
|
+
type: 'integer',
|
|
66
|
+
description: `Max items to return (default ${utils_1.DEFAULT_LIST_LIMIT}, capped at ${utils_1.MAX_LIST_LIMIT}).`,
|
|
67
|
+
minimum: 1,
|
|
68
|
+
maximum: utils_1.MAX_LIST_LIMIT,
|
|
69
|
+
},
|
|
70
|
+
offset: {
|
|
71
|
+
type: 'integer',
|
|
72
|
+
description: 'Zero-based offset for pagination.',
|
|
73
|
+
minimum: 0,
|
|
74
|
+
},
|
|
75
|
+
withCount: {
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
description: 'Include total matching count in the response.',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
function buildQuery(args) {
|
|
83
|
+
const limit = (0, utils_1.clampListLimit)(args.limit);
|
|
84
|
+
const offset = args.offset && args.offset > 0 ? Math.floor(args.offset) : 0;
|
|
85
|
+
const filter = (0, utils_1.joinAndFilters)(`projectId eq '${(0, utils_1.escapeODataString)(args.projectId)}'`, args.status
|
|
86
|
+
? `statusCode eq '${(0, utils_1.escapeODataString)(args.status)}'`
|
|
87
|
+
: undefined, args.priorityCode
|
|
88
|
+
? `priorityCode eq '${(0, utils_1.escapeODataString)(args.priorityCode)}'`
|
|
89
|
+
: undefined, args.responsibleId
|
|
90
|
+
? `responsibleId eq '${(0, utils_1.escapeODataString)(args.responsibleId)}'`
|
|
91
|
+
: undefined);
|
|
92
|
+
const fields = args.fields && args.fields.length > 0 ? args.fields : DEFAULT_FIELDS;
|
|
93
|
+
let query = calm_client_1.ODataQuery.new()
|
|
94
|
+
.select([...fields])
|
|
95
|
+
.top(limit)
|
|
96
|
+
.skip(offset);
|
|
97
|
+
if (filter)
|
|
98
|
+
query = query.filter(filter);
|
|
99
|
+
if (args.withCount)
|
|
100
|
+
query = query.count();
|
|
101
|
+
return { query, limit, offset };
|
|
102
|
+
}
|
|
103
|
+
const handler = async (ctx, args) => {
|
|
104
|
+
if (!args?.projectId) {
|
|
105
|
+
throw new utils_1.CalmToolError({
|
|
106
|
+
code: 'INVALID_ARGUMENT',
|
|
107
|
+
message: 'projectId is required',
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
const { query, limit, offset } = buildQuery(args);
|
|
111
|
+
try {
|
|
112
|
+
const collection = await ctx.calm.getFeatures().list(query);
|
|
113
|
+
return (0, utils_1.toListResponse)(collection, { limit, offset });
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
throw (0, utils_1.mapCalmErrorForTool)(err);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
exports.listFeaturesTool = {
|
|
120
|
+
toolDefinition: definition,
|
|
121
|
+
handler,
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=listFeatures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listFeatures.js","sourceRoot":"","sources":["../../../src/tools/features/listFeatures.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IFeature, IUpdateFeatureParams } from '@mcp-abap-adt/calm-client';
|
|
2
|
+
import type { ICalmHandlerEntry } from '../../registry/types';
|
|
3
|
+
export interface IUpdateFeatureArgs extends IUpdateFeatureParams {
|
|
4
|
+
uuid: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const updateFeatureTool: ICalmHandlerEntry<IUpdateFeatureArgs, IFeature>;
|
|
7
|
+
//# sourceMappingURL=updateFeature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateFeature.d.ts","sourceRoot":"","sources":["../../../src/tools/features/updateFeature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D,IAAI,EAAE,MAAM,CAAC;CACd;AA0CD,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAC/C,kBAAkB,EAClB,QAAQ,CAIT,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateFeatureTool = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const definition = {
|
|
6
|
+
name: 'calm_features_update',
|
|
7
|
+
description: 'Update fields on an existing Cloud ALM feature (PATCH — only fields you pass are modified). Destructive. Identify the feature by `uuid`. Returns the updated feature.',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
required: ['uuid'],
|
|
11
|
+
properties: {
|
|
12
|
+
uuid: { type: 'string', description: 'Feature UUID.' },
|
|
13
|
+
title: { type: 'string', description: 'New title (if changing).' },
|
|
14
|
+
description: { type: 'string', description: 'New description.' },
|
|
15
|
+
priorityCode: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
description: 'New priority code (string).',
|
|
18
|
+
},
|
|
19
|
+
statusCode: { type: 'string', description: 'New status code.' },
|
|
20
|
+
releaseId: { type: 'string', description: 'New release id.' },
|
|
21
|
+
scopeId: { type: 'string', description: 'New scope id.' },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
const handler = async (ctx, args) => {
|
|
26
|
+
if (!args?.uuid) {
|
|
27
|
+
throw new utils_1.CalmToolError({
|
|
28
|
+
code: 'INVALID_ARGUMENT',
|
|
29
|
+
message: 'uuid is required',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const { uuid, ...patch } = args;
|
|
33
|
+
try {
|
|
34
|
+
return await ctx.calm.getFeatures().update(uuid, patch);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
throw (0, utils_1.mapCalmErrorForTool)(err);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.updateFeatureTool = {
|
|
41
|
+
toolDefinition: definition,
|
|
42
|
+
handler,
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=updateFeature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateFeature.js","sourceRoot":"","sources":["../../../src/tools/features/updateFeature.ts"],"names":[],"mappings":";;;AAMA,uCAAiE;AAMjE,MAAM,UAAU,GAAwB;IACtC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,uKAAuK;IACzK,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,MAAM,CAAC;QAClB,UAAU,EAAE;YACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE;YACtD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0BAA0B,EAAE;YAClE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;YAChE,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;YAC/D,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE;YAC7D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE;SAC1D;KACF;CACF,CAAC;AAEF,MAAM,OAAO,GAAkD,KAAK,EAClE,GAAG,EACH,IAAI,EACJ,EAAE;IACF,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;QAChB,MAAM,IAAI,qBAAa,CAAC;YACtB,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC;IACL,CAAC;IACD,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC;IAChC,IAAI,CAAC;QACH,OAAO,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAA,2BAAmB,EAAC,GAAG,CAAC,CAAC;IACjC,CAAC;AACH,CAAC,CAAC;AAEW,QAAA,iBAAiB,GAG1B;IACF,cAAc,EAAE,UAAU;IAC1B,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ICalmHandlerEntry } from '../../registry/types';
|
|
2
|
+
export interface IGetHierarchyWithChildrenArgs {
|
|
3
|
+
uuid: string;
|
|
4
|
+
relations?: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface IGetHierarchyWithChildrenResult {
|
|
7
|
+
node: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export declare const getHierarchyWithChildrenTool: ICalmHandlerEntry<IGetHierarchyWithChildrenArgs, IGetHierarchyWithChildrenResult>;
|
|
10
|
+
//# sourceMappingURL=getHierarchyWithChildren.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getHierarchyWithChildren.d.ts","sourceRoot":"","sources":["../../../src/tools/hierarchy/getHierarchyWithChildren.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AA6CD,eAAO,MAAM,4BAA4B,EAAE,iBAAiB,CAC1D,6BAA6B,EAC7B,+BAA+B,CAIhC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHierarchyWithChildrenTool = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const definition = {
|
|
6
|
+
name: 'calm_hierarchy_get_with_children',
|
|
7
|
+
description: 'Fetch a hierarchy node and its expanded relations in a single call. Default expand is `toChildNodes,toParentNode`; override via `relations`. Returns the raw expanded node payload (shape depends on which relations were requested).',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
required: ['uuid'],
|
|
11
|
+
properties: {
|
|
12
|
+
uuid: { type: 'string', description: 'Hierarchy node UUID.' },
|
|
13
|
+
relations: {
|
|
14
|
+
type: 'array',
|
|
15
|
+
description: 'OData navigation properties to expand. Default: ["toChildNodes","toParentNode"].',
|
|
16
|
+
items: { type: 'string' },
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const handler = async (ctx, args) => {
|
|
22
|
+
if (!args?.uuid) {
|
|
23
|
+
throw new utils_1.CalmToolError({
|
|
24
|
+
code: 'INVALID_ARGUMENT',
|
|
25
|
+
message: 'uuid is required',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
const relations = args.relations && args.relations.length > 0
|
|
29
|
+
? args.relations
|
|
30
|
+
: ['toChildNodes', 'toParentNode'];
|
|
31
|
+
try {
|
|
32
|
+
const node = await ctx.calm
|
|
33
|
+
.getHierarchy()
|
|
34
|
+
.getWithExpand(args.uuid, relations);
|
|
35
|
+
return { node };
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
throw (0, utils_1.mapCalmErrorForTool)(err);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.getHierarchyWithChildrenTool = {
|
|
42
|
+
toolDefinition: definition,
|
|
43
|
+
handler,
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=getHierarchyWithChildren.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getHierarchyWithChildren.js","sourceRoot":"","sources":["../../../src/tools/hierarchy/getHierarchyWithChildren.ts"],"names":[],"mappings":";;;AAKA,uCAAiE;AAWjE,MAAM,UAAU,GAAwB;IACtC,IAAI,EAAE,kCAAkC;IACxC,WAAW,EACT,uOAAuO;IACzO,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,MAAM,CAAC;QAClB,UAAU,EAAE;YACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sBAAsB,EAAE;YAC7D,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,WAAW,EACT,kFAAkF;gBACpF,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC1B;SACF;KACF;CACF,CAAC;AAEF,MAAM,OAAO,GAGT,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;IACtB,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;QAChB,MAAM,IAAI,qBAAa,CAAC;YACtB,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC;IACL,CAAC;IACD,MAAM,SAAS,GACb,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;QACzC,CAAC,CAAC,IAAI,CAAC,SAAS;QAChB,CAAC,CAAC,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACvC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI;aACxB,YAAY,EAAE;aACd,aAAa,CAA0B,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAChE,OAAO,EAAE,IAAI,EAAE,CAAC;IAClB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAA,2BAAmB,EAAC,GAAG,CAAC,CAAC;IACjC,CAAC;AACH,CAAC,CAAC;AAEW,QAAA,4BAA4B,GAGrC;IACF,cAAc,EAAE,UAAU;IAC1B,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HandlerGroup } from '../../registry/HandlerGroup';
|
|
2
|
+
import type { ICalmHandlerEntry } from '../../registry/types';
|
|
3
|
+
export type { IGetHierarchyWithChildrenArgs, IGetHierarchyWithChildrenResult, } from './getHierarchyWithChildren';
|
|
4
|
+
export { getHierarchyWithChildrenTool } from './getHierarchyWithChildren';
|
|
5
|
+
export type { IListHierarchyArgs } from './listHierarchy';
|
|
6
|
+
export { listHierarchyTool } from './listHierarchy';
|
|
7
|
+
export declare const HIERARCHY_HANDLERS: readonly ICalmHandlerEntry[];
|
|
8
|
+
export declare const HIERARCHY_GROUP: HandlerGroup;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/hierarchy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI9D,YAAY,EACV,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,eAAO,MAAM,kBAAkB,EAAE,SAAS,iBAAiB,EAG1D,CAAC;AAEF,eAAO,MAAM,eAAe,cAG3B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HIERARCHY_GROUP = exports.HIERARCHY_HANDLERS = exports.listHierarchyTool = exports.getHierarchyWithChildrenTool = void 0;
|
|
4
|
+
const HandlerGroup_1 = require("../../registry/HandlerGroup");
|
|
5
|
+
const getHierarchyWithChildren_1 = require("./getHierarchyWithChildren");
|
|
6
|
+
const listHierarchy_1 = require("./listHierarchy");
|
|
7
|
+
var getHierarchyWithChildren_2 = require("./getHierarchyWithChildren");
|
|
8
|
+
Object.defineProperty(exports, "getHierarchyWithChildrenTool", { enumerable: true, get: function () { return getHierarchyWithChildren_2.getHierarchyWithChildrenTool; } });
|
|
9
|
+
var listHierarchy_2 = require("./listHierarchy");
|
|
10
|
+
Object.defineProperty(exports, "listHierarchyTool", { enumerable: true, get: function () { return listHierarchy_2.listHierarchyTool; } });
|
|
11
|
+
exports.HIERARCHY_HANDLERS = [
|
|
12
|
+
listHierarchy_1.listHierarchyTool,
|
|
13
|
+
getHierarchyWithChildren_1.getHierarchyWithChildrenTool,
|
|
14
|
+
];
|
|
15
|
+
exports.HIERARCHY_GROUP = new HandlerGroup_1.HandlerGroup('hierarchy', exports.HIERARCHY_HANDLERS);
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/hierarchy/index.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAE3D,yEAA0E;AAC1E,mDAAoD;AAMpD,uEAA0E;AAAjE,wIAAA,4BAA4B,OAAA;AAErC,iDAAoD;AAA3C,kHAAA,iBAAiB,OAAA;AAEb,QAAA,kBAAkB,GAAiC;IAC9D,iCAAiB;IACjB,uDAA4B;CAC7B,CAAC;AAEW,QAAA,eAAe,GAAG,IAAI,2BAAY,CAC7C,WAAW,EACX,0BAAkB,CACnB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type IHierarchyNode } from '@mcp-abap-adt/calm-client';
|
|
2
|
+
import type { ICalmHandlerEntry } from '../../registry/types';
|
|
3
|
+
import { type IListResponse } from '../../utils';
|
|
4
|
+
declare const ALLOWED_FIELDS: readonly ["uuid", "displayId", "title", "description", "hierarchyLevel", "sequence", "parentTitles", "parentNodeUuid", "rootNodeUuid", "modifiedAt", "createdAt"];
|
|
5
|
+
type AllowedField = (typeof ALLOWED_FIELDS)[number];
|
|
6
|
+
export interface IListHierarchyArgs {
|
|
7
|
+
rootNodeUuid?: string;
|
|
8
|
+
parentNodeUuid?: string;
|
|
9
|
+
fields?: AllowedField[];
|
|
10
|
+
limit?: number;
|
|
11
|
+
offset?: number;
|
|
12
|
+
withCount?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const listHierarchyTool: ICalmHandlerEntry<IListHierarchyArgs, IListResponse<Partial<IHierarchyNode>>>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=listHierarchy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listHierarchy.d.ts","sourceRoot":"","sources":["../../../src/tools/hierarchy/listHierarchy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAc,MAAM,2BAA2B,CAAC;AAC5E,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,aAAa,EAKnB,MAAM,aAAa,CAAC;AAWrB,QAAA,MAAM,cAAc,mKAYV,CAAC;AACX,KAAK,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAqDD,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAC/C,kBAAkB,EAClB,aAAa,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAIvC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listHierarchyTool = void 0;
|
|
4
|
+
const calm_client_1 = require("@mcp-abap-adt/calm-client");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
const DEFAULT_FIELDS = [
|
|
7
|
+
'uuid',
|
|
8
|
+
'displayId',
|
|
9
|
+
'title',
|
|
10
|
+
'hierarchyLevel',
|
|
11
|
+
'parentNodeUuid',
|
|
12
|
+
'rootNodeUuid',
|
|
13
|
+
];
|
|
14
|
+
const ALLOWED_FIELDS = [
|
|
15
|
+
'uuid',
|
|
16
|
+
'displayId',
|
|
17
|
+
'title',
|
|
18
|
+
'description',
|
|
19
|
+
'hierarchyLevel',
|
|
20
|
+
'sequence',
|
|
21
|
+
'parentTitles',
|
|
22
|
+
'parentNodeUuid',
|
|
23
|
+
'rootNodeUuid',
|
|
24
|
+
'modifiedAt',
|
|
25
|
+
'createdAt',
|
|
26
|
+
];
|
|
27
|
+
const definition = {
|
|
28
|
+
name: 'calm_hierarchy_list',
|
|
29
|
+
description: 'List process hierarchy nodes. Filter by rootNodeUuid (scope to a hierarchy) or parentNodeUuid (direct children). Returns compact records.',
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
rootNodeUuid: { type: 'string' },
|
|
34
|
+
parentNodeUuid: { type: 'string' },
|
|
35
|
+
fields: {
|
|
36
|
+
type: 'array',
|
|
37
|
+
items: { type: 'string', enum: [...ALLOWED_FIELDS] },
|
|
38
|
+
},
|
|
39
|
+
limit: { type: 'integer', minimum: 1, maximum: utils_1.MAX_LIST_LIMIT },
|
|
40
|
+
offset: { type: 'integer', minimum: 0 },
|
|
41
|
+
withCount: { type: 'boolean' },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
const handler = async (ctx, args) => {
|
|
46
|
+
const limit = (0, utils_1.clampListLimit)(args?.limit);
|
|
47
|
+
const offset = args?.offset && args.offset > 0 ? Math.floor(args.offset) : 0;
|
|
48
|
+
const filter = (0, utils_1.joinAndFilters)(args?.rootNodeUuid
|
|
49
|
+
? `rootNodeUuid eq '${(0, utils_1.escapeODataString)(args.rootNodeUuid)}'`
|
|
50
|
+
: undefined, args?.parentNodeUuid
|
|
51
|
+
? `parentNodeUuid eq '${(0, utils_1.escapeODataString)(args.parentNodeUuid)}'`
|
|
52
|
+
: undefined);
|
|
53
|
+
const fields = args?.fields && args.fields.length > 0 ? args.fields : DEFAULT_FIELDS;
|
|
54
|
+
let query = calm_client_1.ODataQuery.new()
|
|
55
|
+
.select([...fields])
|
|
56
|
+
.top(limit)
|
|
57
|
+
.skip(offset);
|
|
58
|
+
if (filter)
|
|
59
|
+
query = query.filter(filter);
|
|
60
|
+
if (args?.withCount)
|
|
61
|
+
query = query.count();
|
|
62
|
+
try {
|
|
63
|
+
const collection = await ctx.calm.getHierarchy().list(query);
|
|
64
|
+
return (0, utils_1.toListResponse)(collection, { limit, offset });
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
throw (0, utils_1.mapCalmErrorForTool)(err);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
exports.listHierarchyTool = {
|
|
71
|
+
toolDefinition: definition,
|
|
72
|
+
handler,
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=listHierarchy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listHierarchy.js","sourceRoot":"","sources":["../../../src/tools/hierarchy/listHierarchy.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ICalmHandlerEntry, ICalmHandlerGroup } from '../registry/types';
|
|
2
|
+
import { ANALYTICS_GROUP, ANALYTICS_HANDLERS } from './analytics';
|
|
3
|
+
import { DOCUMENTS_GROUP, DOCUMENTS_HANDLERS } from './documents';
|
|
4
|
+
import { FEATURES_GROUP, FEATURES_HANDLERS } from './features';
|
|
5
|
+
import { HIERARCHY_GROUP, HIERARCHY_HANDLERS } from './hierarchy';
|
|
6
|
+
import { LOGS_GROUP, LOGS_HANDLERS } from './logs';
|
|
7
|
+
import { PROCESSMONITORING_GROUP, PROCESSMONITORING_HANDLERS } from './processMonitoring';
|
|
8
|
+
import { PROJECTS_GROUP, PROJECTS_HANDLERS } from './projects';
|
|
9
|
+
import { TASKS_GROUP, TASKS_HANDLERS } from './tasks';
|
|
10
|
+
import { TESTCASES_GROUP, TESTCASES_HANDLERS } from './testCases';
|
|
11
|
+
export { ANALYTICS_GROUP, ANALYTICS_HANDLERS, DOCUMENTS_GROUP, DOCUMENTS_HANDLERS, FEATURES_GROUP, FEATURES_HANDLERS, HIERARCHY_GROUP, HIERARCHY_HANDLERS, LOGS_GROUP, LOGS_HANDLERS, PROCESSMONITORING_GROUP, PROCESSMONITORING_HANDLERS, PROJECTS_GROUP, PROJECTS_HANDLERS, TASKS_GROUP, TASKS_HANDLERS, TESTCASES_GROUP, TESTCASES_HANDLERS, };
|
|
12
|
+
/** All handler groups in one list — the default tool surface. */
|
|
13
|
+
export declare const ALL_GROUPS: readonly ICalmHandlerGroup[];
|
|
14
|
+
/** Flattened handler entries across all groups. */
|
|
15
|
+
export declare const ALL_HANDLERS: readonly ICalmHandlerEntry[];
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAElE,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,UAAU,EAAE,SAAS,iBAAiB,EAUlD,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,YAAY,EAAE,SAAS,iBAAiB,EAEpD,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ALL_HANDLERS = exports.ALL_GROUPS = exports.TESTCASES_HANDLERS = exports.TESTCASES_GROUP = exports.TASKS_HANDLERS = exports.TASKS_GROUP = exports.PROJECTS_HANDLERS = exports.PROJECTS_GROUP = exports.PROCESSMONITORING_HANDLERS = exports.PROCESSMONITORING_GROUP = exports.LOGS_HANDLERS = exports.LOGS_GROUP = exports.HIERARCHY_HANDLERS = exports.HIERARCHY_GROUP = exports.FEATURES_HANDLERS = exports.FEATURES_GROUP = exports.DOCUMENTS_HANDLERS = exports.DOCUMENTS_GROUP = exports.ANALYTICS_HANDLERS = exports.ANALYTICS_GROUP = void 0;
|
|
4
|
+
const analytics_1 = require("./analytics");
|
|
5
|
+
Object.defineProperty(exports, "ANALYTICS_GROUP", { enumerable: true, get: function () { return analytics_1.ANALYTICS_GROUP; } });
|
|
6
|
+
Object.defineProperty(exports, "ANALYTICS_HANDLERS", { enumerable: true, get: function () { return analytics_1.ANALYTICS_HANDLERS; } });
|
|
7
|
+
const documents_1 = require("./documents");
|
|
8
|
+
Object.defineProperty(exports, "DOCUMENTS_GROUP", { enumerable: true, get: function () { return documents_1.DOCUMENTS_GROUP; } });
|
|
9
|
+
Object.defineProperty(exports, "DOCUMENTS_HANDLERS", { enumerable: true, get: function () { return documents_1.DOCUMENTS_HANDLERS; } });
|
|
10
|
+
const features_1 = require("./features");
|
|
11
|
+
Object.defineProperty(exports, "FEATURES_GROUP", { enumerable: true, get: function () { return features_1.FEATURES_GROUP; } });
|
|
12
|
+
Object.defineProperty(exports, "FEATURES_HANDLERS", { enumerable: true, get: function () { return features_1.FEATURES_HANDLERS; } });
|
|
13
|
+
const hierarchy_1 = require("./hierarchy");
|
|
14
|
+
Object.defineProperty(exports, "HIERARCHY_GROUP", { enumerable: true, get: function () { return hierarchy_1.HIERARCHY_GROUP; } });
|
|
15
|
+
Object.defineProperty(exports, "HIERARCHY_HANDLERS", { enumerable: true, get: function () { return hierarchy_1.HIERARCHY_HANDLERS; } });
|
|
16
|
+
const logs_1 = require("./logs");
|
|
17
|
+
Object.defineProperty(exports, "LOGS_GROUP", { enumerable: true, get: function () { return logs_1.LOGS_GROUP; } });
|
|
18
|
+
Object.defineProperty(exports, "LOGS_HANDLERS", { enumerable: true, get: function () { return logs_1.LOGS_HANDLERS; } });
|
|
19
|
+
const processMonitoring_1 = require("./processMonitoring");
|
|
20
|
+
Object.defineProperty(exports, "PROCESSMONITORING_GROUP", { enumerable: true, get: function () { return processMonitoring_1.PROCESSMONITORING_GROUP; } });
|
|
21
|
+
Object.defineProperty(exports, "PROCESSMONITORING_HANDLERS", { enumerable: true, get: function () { return processMonitoring_1.PROCESSMONITORING_HANDLERS; } });
|
|
22
|
+
const projects_1 = require("./projects");
|
|
23
|
+
Object.defineProperty(exports, "PROJECTS_GROUP", { enumerable: true, get: function () { return projects_1.PROJECTS_GROUP; } });
|
|
24
|
+
Object.defineProperty(exports, "PROJECTS_HANDLERS", { enumerable: true, get: function () { return projects_1.PROJECTS_HANDLERS; } });
|
|
25
|
+
const tasks_1 = require("./tasks");
|
|
26
|
+
Object.defineProperty(exports, "TASKS_GROUP", { enumerable: true, get: function () { return tasks_1.TASKS_GROUP; } });
|
|
27
|
+
Object.defineProperty(exports, "TASKS_HANDLERS", { enumerable: true, get: function () { return tasks_1.TASKS_HANDLERS; } });
|
|
28
|
+
const testCases_1 = require("./testCases");
|
|
29
|
+
Object.defineProperty(exports, "TESTCASES_GROUP", { enumerable: true, get: function () { return testCases_1.TESTCASES_GROUP; } });
|
|
30
|
+
Object.defineProperty(exports, "TESTCASES_HANDLERS", { enumerable: true, get: function () { return testCases_1.TESTCASES_HANDLERS; } });
|
|
31
|
+
/** All handler groups in one list — the default tool surface. */
|
|
32
|
+
exports.ALL_GROUPS = [
|
|
33
|
+
features_1.FEATURES_GROUP,
|
|
34
|
+
documents_1.DOCUMENTS_GROUP,
|
|
35
|
+
testCases_1.TESTCASES_GROUP,
|
|
36
|
+
hierarchy_1.HIERARCHY_GROUP,
|
|
37
|
+
analytics_1.ANALYTICS_GROUP,
|
|
38
|
+
processMonitoring_1.PROCESSMONITORING_GROUP,
|
|
39
|
+
tasks_1.TASKS_GROUP,
|
|
40
|
+
projects_1.PROJECTS_GROUP,
|
|
41
|
+
logs_1.LOGS_GROUP,
|
|
42
|
+
];
|
|
43
|
+
/** Flattened handler entries across all groups. */
|
|
44
|
+
exports.ALL_HANDLERS = exports.ALL_GROUPS.flatMap((g) => g.getHandlers());
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AACA,2CAAkE;AAchE,gGAdO,2BAAe,OAcP;AACf,mGAfwB,8BAAkB,OAexB;AAdpB,2CAAkE;AAehE,gGAfO,2BAAe,OAeP;AACf,mGAhBwB,8BAAkB,OAgBxB;AAfpB,yCAA+D;AAgB7D,+FAhBO,yBAAc,OAgBP;AACd,kGAjBuB,4BAAiB,OAiBvB;AAhBnB,2CAAkE;AAiBhE,gGAjBO,2BAAe,OAiBP;AACf,mGAlBwB,8BAAkB,OAkBxB;AAjBpB,iCAAmD;AAkBjD,2FAlBO,iBAAU,OAkBP;AACV,8FAnBmB,oBAAa,OAmBnB;AAlBf,2DAG6B;AAgB3B,wGAlBA,2CAAuB,OAkBA;AACvB,2GAlBA,8CAA0B,OAkBA;AAhB5B,yCAA+D;AAiB7D,+FAjBO,yBAAc,OAiBP;AACd,kGAlBuB,4BAAiB,OAkBvB;AAjBnB,mCAAsD;AAkBpD,4FAlBO,mBAAW,OAkBP;AACX,+FAnBoB,sBAAc,OAmBpB;AAlBhB,2CAAkE;AAmBhE,gGAnBO,2BAAe,OAmBP;AACf,mGApBwB,8BAAkB,OAoBxB;AAGpB,iEAAiE;AACpD,QAAA,UAAU,GAAiC;IACtD,yBAAc;IACd,2BAAe;IACf,2BAAe;IACf,2BAAe;IACf,2BAAe;IACf,2CAAuB;IACvB,mBAAW;IACX,yBAAc;IACd,iBAAU;CACX,CAAC;AAEF,mDAAmD;AACtC,QAAA,YAAY,GAAiC,kBAAU,CAAC,OAAO,CAC1E,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CACvB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ICalmHandlerEntry } from '../../registry/types';
|
|
2
|
+
export interface IGetLogsArgs {
|
|
3
|
+
provider: string;
|
|
4
|
+
serviceId?: string;
|
|
5
|
+
from?: string;
|
|
6
|
+
to?: string;
|
|
7
|
+
period?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
offset?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface IGetLogsResult {
|
|
12
|
+
records: unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare const getLogsTool: ICalmHandlerEntry<IGetLogsArgs, IGetLogsResult>;
|
|
15
|
+
//# sourceMappingURL=getLogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLogs.d.ts","sourceRoot":"","sources":["../../../src/tools/logs/getLogs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;CAClB;AAuDD,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,YAAY,EAAE,cAAc,CAGvE,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLogsTool = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const definition = {
|
|
6
|
+
name: 'calm_logs_get',
|
|
7
|
+
description: 'Fetch application logs from Cloud ALM Logs (OpenTelemetry-style). Unlike other Cloud ALM services, Logs uses a domain-specific REST query (not OData). `provider` is required; filter by `serviceId`, or a time window via `from`/`to` (ISO timestamps) or `period`. Returns the raw `records` payload.',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
required: ['provider'],
|
|
11
|
+
properties: {
|
|
12
|
+
provider: { type: 'string', description: 'Log provider name.' },
|
|
13
|
+
serviceId: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Optional service id filter (emitted as `logsFilters[serviceId]`).',
|
|
16
|
+
},
|
|
17
|
+
from: { type: 'string', description: 'ISO timestamp, inclusive start.' },
|
|
18
|
+
to: { type: 'string', description: 'ISO timestamp, exclusive end.' },
|
|
19
|
+
period: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'Period shorthand (e.g. "1h", "24h"). Alternative to from/to.',
|
|
22
|
+
},
|
|
23
|
+
limit: { type: 'integer', minimum: 1, maximum: 1000 },
|
|
24
|
+
offset: { type: 'integer', minimum: 0 },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const handler = async (ctx, args) => {
|
|
29
|
+
if (!args?.provider) {
|
|
30
|
+
throw new utils_1.CalmToolError({
|
|
31
|
+
code: 'INVALID_ARGUMENT',
|
|
32
|
+
message: 'provider is required',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const records = await ctx.calm.getLogs().get({
|
|
37
|
+
provider: args.provider,
|
|
38
|
+
serviceId: args.serviceId,
|
|
39
|
+
from: args.from,
|
|
40
|
+
to: args.to,
|
|
41
|
+
period: args.period,
|
|
42
|
+
limit: args.limit,
|
|
43
|
+
offset: args.offset,
|
|
44
|
+
});
|
|
45
|
+
return { records };
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
throw (0, utils_1.mapCalmErrorForTool)(err);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.getLogsTool = {
|
|
52
|
+
toolDefinition: definition,
|
|
53
|
+
handler,
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=getLogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLogs.js","sourceRoot":"","sources":["../../../src/tools/logs/getLogs.ts"],"names":[],"mappings":";;;AAKA,uCAAiE;AAgBjE,MAAM,UAAU,GAAwB;IACtC,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,ySAAyS;IAC3S,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,UAAU,CAAC;QACtB,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;YAC/D,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,mEAAmE;aACtE;YACD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iCAAiC,EAAE;YACxE,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+BAA+B,EAAE;YACpE,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,8DAA8D;aACjE;YACD,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;YACrD,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;SACxC;KACF;CACF,CAAC;AAEF,MAAM,OAAO,GAAkD,KAAK,EAClE,GAAG,EACH,IAAI,EACJ,EAAE;IACF,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC;QACpB,MAAM,IAAI,qBAAa,CAAC;YACtB,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,sBAAsB;SAChC,CAAC,CAAC;IACL,CAAC;IACD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC;YAC3C,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAA,2BAAmB,EAAC,GAAG,CAAC,CAAC;IACjC,CAAC;AACH,CAAC,CAAC;AAEW,QAAA,WAAW,GAAoD;IAC1E,cAAc,EAAE,UAAU;IAC1B,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HandlerGroup } from '../../registry/HandlerGroup';
|
|
2
|
+
import type { ICalmHandlerEntry } from '../../registry/types';
|
|
3
|
+
export type { IGetLogsArgs, IGetLogsResult } from './getLogs';
|
|
4
|
+
export { getLogsTool } from './getLogs';
|
|
5
|
+
export declare const LOGS_HANDLERS: readonly ICalmHandlerEntry[];
|
|
6
|
+
export declare const LOGS_GROUP: HandlerGroup;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/logs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,SAAS,iBAAiB,EAAkB,CAAC;AAEzE,eAAO,MAAM,UAAU,cAA0C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LOGS_GROUP = exports.LOGS_HANDLERS = exports.getLogsTool = void 0;
|
|
4
|
+
const HandlerGroup_1 = require("../../registry/HandlerGroup");
|
|
5
|
+
const getLogs_1 = require("./getLogs");
|
|
6
|
+
var getLogs_2 = require("./getLogs");
|
|
7
|
+
Object.defineProperty(exports, "getLogsTool", { enumerable: true, get: function () { return getLogs_2.getLogsTool; } });
|
|
8
|
+
exports.LOGS_HANDLERS = [getLogs_1.getLogsTool];
|
|
9
|
+
exports.LOGS_GROUP = new HandlerGroup_1.HandlerGroup('logs', exports.LOGS_HANDLERS);
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/logs/index.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAE3D,uCAAwC;AAGxC,qCAAwC;AAA/B,sGAAA,WAAW,OAAA;AAEP,QAAA,aAAa,GAAiC,CAAC,qBAAW,CAAC,CAAC;AAE5D,QAAA,UAAU,GAAG,IAAI,2BAAY,CAAC,MAAM,EAAE,qBAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HandlerGroup } from '../../registry/HandlerGroup';
|
|
2
|
+
import type { ICalmHandlerEntry } from '../../registry/types';
|
|
3
|
+
export type { IListBusinessProcessesArgs, IListBusinessProcessesResult, } from './listBusinessProcesses';
|
|
4
|
+
export { listBusinessProcessesTool } from './listBusinessProcesses';
|
|
5
|
+
export declare const PROCESSMONITORING_HANDLERS: readonly ICalmHandlerEntry[];
|
|
6
|
+
export declare const PROCESSMONITORING_GROUP: HandlerGroup;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/processMonitoring/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,YAAY,EACV,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,eAAO,MAAM,0BAA0B,EAAE,SAAS,iBAAiB,EAElE,CAAC;AAEF,eAAO,MAAM,uBAAuB,cAGnC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PROCESSMONITORING_GROUP = exports.PROCESSMONITORING_HANDLERS = exports.listBusinessProcessesTool = void 0;
|
|
4
|
+
const HandlerGroup_1 = require("../../registry/HandlerGroup");
|
|
5
|
+
const listBusinessProcesses_1 = require("./listBusinessProcesses");
|
|
6
|
+
var listBusinessProcesses_2 = require("./listBusinessProcesses");
|
|
7
|
+
Object.defineProperty(exports, "listBusinessProcessesTool", { enumerable: true, get: function () { return listBusinessProcesses_2.listBusinessProcessesTool; } });
|
|
8
|
+
exports.PROCESSMONITORING_HANDLERS = [
|
|
9
|
+
listBusinessProcesses_1.listBusinessProcessesTool,
|
|
10
|
+
];
|
|
11
|
+
exports.PROCESSMONITORING_GROUP = new HandlerGroup_1.HandlerGroup('processMonitoring', exports.PROCESSMONITORING_HANDLERS);
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/processMonitoring/index.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAE3D,mEAAoE;AAMpE,iEAAoE;AAA3D,kIAAA,yBAAyB,OAAA;AAErB,QAAA,0BAA0B,GAAiC;IACtE,iDAAyB;CAC1B,CAAC;AAEW,QAAA,uBAAuB,GAAG,IAAI,2BAAY,CACrD,mBAAmB,EACnB,kCAA0B,CAC3B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ICalmHandlerEntry } from '../../registry/types';
|
|
2
|
+
export interface IListBusinessProcessesArgs {
|
|
3
|
+
limit?: number;
|
|
4
|
+
offset?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface IListBusinessProcessesResult {
|
|
7
|
+
rows: unknown[];
|
|
8
|
+
}
|
|
9
|
+
export declare const listBusinessProcessesTool: ICalmHandlerEntry<IListBusinessProcessesArgs, IListBusinessProcessesResult>;
|
|
10
|
+
//# sourceMappingURL=listBusinessProcesses.d.ts.map
|