@rosa-mcp/server 1.12.6
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/LICENSE +21 -0
- package/README.md +190 -0
- package/dist/constants.d.ts +43 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +114 -0
- package/dist/constants.js.map +1 -0
- package/dist/handlers/api-handlers.d.ts +205 -0
- package/dist/handlers/api-handlers.d.ts.map +1 -0
- package/dist/handlers/api-handlers.js +456 -0
- package/dist/handlers/api-handlers.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +144 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/oauth.d.ts +14 -0
- package/dist/middleware/oauth.d.ts.map +1 -0
- package/dist/middleware/oauth.js +105 -0
- package/dist/middleware/oauth.js.map +1 -0
- package/dist/routes/api-routes.d.ts +3 -0
- package/dist/routes/api-routes.d.ts.map +1 -0
- package/dist/routes/api-routes.js +298 -0
- package/dist/routes/api-routes.js.map +1 -0
- package/dist/schemas/common.d.ts +40 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +115 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/services/abbreviation-dictionary.d.ts +45 -0
- package/dist/services/abbreviation-dictionary.d.ts.map +1 -0
- package/dist/services/abbreviation-dictionary.js +196 -0
- package/dist/services/abbreviation-dictionary.js.map +1 -0
- package/dist/services/data-loader.d.ts +20 -0
- package/dist/services/data-loader.d.ts.map +1 -0
- package/dist/services/data-loader.js +289 -0
- package/dist/services/data-loader.js.map +1 -0
- package/dist/services/search.d.ts +64 -0
- package/dist/services/search.d.ts.map +1 -0
- package/dist/services/search.js +391 -0
- package/dist/services/search.js.map +1 -0
- package/dist/tools/register-tools.d.ts +22 -0
- package/dist/tools/register-tools.d.ts.map +1 -0
- package/dist/tools/register-tools.js +561 -0
- package/dist/tools/register-tools.js.map +1 -0
- package/dist/types.d.ts +136 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +90 -0
- package/sap_abbreviation_dictionary.json +966 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/** Raw JSON structure from objectReleaseInfoLatest.json and PCE files */
|
|
2
|
+
export interface RawReleaseInfoFile {
|
|
3
|
+
formatVersion: string;
|
|
4
|
+
objectReleaseInfo: RawObjectEntry[];
|
|
5
|
+
}
|
|
6
|
+
/** Raw JSON structure from objectClassifications_SAP.json */
|
|
7
|
+
export interface RawClassificationsFile {
|
|
8
|
+
formatVersion: string;
|
|
9
|
+
objectReleaseInfo?: RawObjectEntry[];
|
|
10
|
+
objectClassifications?: RawObjectEntry[];
|
|
11
|
+
}
|
|
12
|
+
/** Single object entry from SAP JSON files */
|
|
13
|
+
export interface RawObjectEntry {
|
|
14
|
+
tadirObject: string;
|
|
15
|
+
tadirObjName: string;
|
|
16
|
+
objectType: string;
|
|
17
|
+
objectKey: string;
|
|
18
|
+
softwareComponent?: string;
|
|
19
|
+
applicationComponent?: string;
|
|
20
|
+
state: string;
|
|
21
|
+
successorClassification?: string;
|
|
22
|
+
successors?: RawSuccessor[];
|
|
23
|
+
successorConceptName?: string;
|
|
24
|
+
}
|
|
25
|
+
/** Successor reference */
|
|
26
|
+
export interface RawSuccessor {
|
|
27
|
+
tadirObject: string;
|
|
28
|
+
tadirObjName: string;
|
|
29
|
+
objectType: string;
|
|
30
|
+
objectKey: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Clean Core Level classification:
|
|
34
|
+
* - A: Released APIs only (ABAP Cloud, upgrade-safe)
|
|
35
|
+
* - B: Classic APIs (upgrade-stable, governance recommended)
|
|
36
|
+
* - C: Internal objects, unclassified (risk manageable, changelog needed)
|
|
37
|
+
* - D: noAPI objects (not Clean Core, remediate first)
|
|
38
|
+
*/
|
|
39
|
+
export type CleanCoreLevel = "A" | "B" | "C" | "D";
|
|
40
|
+
/**
|
|
41
|
+
* SAP system type determines which JSON files are available.
|
|
42
|
+
* - public_cloud: S/4HANA Cloud Public Edition (Level A only)
|
|
43
|
+
* - btp: BTP ABAP Environment / Steampunk (Level A only, separate dataset)
|
|
44
|
+
* - private_cloud: S/4HANA Cloud Private Edition (Levels A-D, versioned)
|
|
45
|
+
* - on_premise: S/4HANA on-premise (Levels A-D, versioned)
|
|
46
|
+
*/
|
|
47
|
+
export type SystemType = "public_cloud" | "btp" | "private_cloud" | "on_premise";
|
|
48
|
+
/** Object states as they appear in JSON files, mapped to Clean Core Levels */
|
|
49
|
+
export type ObjectState = "released" | "deprecated" | "notToBeReleased" | "noAPI" | "classicAPI" | "stable";
|
|
50
|
+
/** Normalized object after processing */
|
|
51
|
+
export interface SAPObject {
|
|
52
|
+
/** TADIR object type (CLAS, INTF, DTEL, TABL, CDS, BDEF, SRVB, etc.) */
|
|
53
|
+
objectType: string;
|
|
54
|
+
/** Object name */
|
|
55
|
+
objectName: string;
|
|
56
|
+
/** Software component (SAP_BASIS, SAPSCORE, etc.) */
|
|
57
|
+
softwareComponent: string;
|
|
58
|
+
/** Application component (BC-DWB, MM-PUR, etc.) */
|
|
59
|
+
applicationComponent: string;
|
|
60
|
+
/** Raw state from JSON */
|
|
61
|
+
state: string;
|
|
62
|
+
/** Derived Clean Core Level */
|
|
63
|
+
cleanCoreLevel: CleanCoreLevel;
|
|
64
|
+
/** Source file this object came from */
|
|
65
|
+
source: "released" | "classicApi";
|
|
66
|
+
/** Successor info if available */
|
|
67
|
+
successor?: SuccessorInfo;
|
|
68
|
+
}
|
|
69
|
+
/** Successor information */
|
|
70
|
+
export interface SuccessorInfo {
|
|
71
|
+
classification: string;
|
|
72
|
+
objects?: Array<{
|
|
73
|
+
objectType: string;
|
|
74
|
+
objectName: string;
|
|
75
|
+
}>;
|
|
76
|
+
conceptName?: string;
|
|
77
|
+
}
|
|
78
|
+
/** Pre-computed token index for an object (built once at data-load time) */
|
|
79
|
+
export interface IndexedObject {
|
|
80
|
+
object: SAPObject;
|
|
81
|
+
/** Tokens extracted from objectName */
|
|
82
|
+
nameTokens: string[];
|
|
83
|
+
/** Tokens extracted from applicationComponent */
|
|
84
|
+
componentTokens: string[];
|
|
85
|
+
}
|
|
86
|
+
export interface DataStore {
|
|
87
|
+
/** All objects indexed by "objectType:objectName" */
|
|
88
|
+
objectsMap: Map<string, SAPObject>;
|
|
89
|
+
/** Objects indexed by objectType for filtering */
|
|
90
|
+
byType: Map<string, SAPObject[]>;
|
|
91
|
+
/** Objects indexed by Clean Core Level */
|
|
92
|
+
byLevel: Map<CleanCoreLevel, SAPObject[]>;
|
|
93
|
+
/** Objects indexed by application component */
|
|
94
|
+
byAppComponent: Map<string, SAPObject[]>;
|
|
95
|
+
/** Pre-computed token index — all objects */
|
|
96
|
+
allIndexed: IndexedObject[];
|
|
97
|
+
/** Pre-computed token index — grouped by objectType */
|
|
98
|
+
indexedByType: Map<string, IndexedObject[]>;
|
|
99
|
+
/** Timestamp of last data load */
|
|
100
|
+
loadedAt: Date;
|
|
101
|
+
/** Source file identifier */
|
|
102
|
+
sourceId: string;
|
|
103
|
+
}
|
|
104
|
+
/** Cache entry for loaded data */
|
|
105
|
+
export interface CacheEntry {
|
|
106
|
+
store: DataStore;
|
|
107
|
+
expiresAt: number;
|
|
108
|
+
}
|
|
109
|
+
/** GitHub Contents API response entry */
|
|
110
|
+
export interface GitHubContentEntry {
|
|
111
|
+
name: string;
|
|
112
|
+
type: string;
|
|
113
|
+
size: number;
|
|
114
|
+
}
|
|
115
|
+
export interface SearchResult {
|
|
116
|
+
total: number;
|
|
117
|
+
count: number;
|
|
118
|
+
offset: number;
|
|
119
|
+
objects: SAPObject[];
|
|
120
|
+
hasMore: boolean;
|
|
121
|
+
nextOffset?: number;
|
|
122
|
+
query: string;
|
|
123
|
+
filters: Record<string, string>;
|
|
124
|
+
}
|
|
125
|
+
export interface ObjectStatistics {
|
|
126
|
+
totalObjects: number;
|
|
127
|
+
byLevel: Record<CleanCoreLevel, number>;
|
|
128
|
+
byObjectType: Record<string, number>;
|
|
129
|
+
byState: Record<string, number>;
|
|
130
|
+
topApplicationComponents: Array<{
|
|
131
|
+
component: string;
|
|
132
|
+
count: number;
|
|
133
|
+
}>;
|
|
134
|
+
sourceFile: string;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,cAAc,EAAE,CAAC;CACrC;AAED,6DAA6D;AAC7D,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,cAAc,EAAE,CAAC;IACrC,qBAAqB,CAAC,EAAE,cAAc,EAAE,CAAC;CAC1C;AAED,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,0BAA0B;AAC1B,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,GAAG,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AAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtE,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,mDAAmD;AACnD,+EAA+E"}
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rosa-mcp/server",
|
|
3
|
+
"version": "1.12.6",
|
|
4
|
+
"description": "ROSA — Released Objects Search Assistant. MCP server and REST API for the SAP Cloudification Repository: search released objects, classic APIs, and successors with Clean Core Level filtering (A/B/C/D).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"rosa": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"sap_abbreviation_dictionary.json",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=20"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"start": "node dist/index.js",
|
|
25
|
+
"start:http": "node dist/index.js --http",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"dev": "tsc --watch",
|
|
29
|
+
"sync-version": "node scripts/sync-version.js",
|
|
30
|
+
"prepack": "npm run build",
|
|
31
|
+
"bundle": "npm run build && esbuild dist/index.js --bundle --platform=node --target=node20 --format=cjs --outfile=bundle/index.cjs && node -e \"require('fs').copyFileSync('sap_abbreviation_dictionary.json','bundle/sap_abbreviation_dictionary.json')\"",
|
|
32
|
+
"pkg:win": "npm run bundle && pkg bundle/index.cjs --targets node20-win-x64 --output bin/rosa-win.exe",
|
|
33
|
+
"pkg:linux": "npm run bundle && pkg bundle/index.cjs --targets node20-linux-x64 --output bin/rosa-linux",
|
|
34
|
+
"pkg:macos": "npm run bundle && pkg bundle/index.cjs --targets node20-macos-x64 --output bin/rosa-macos",
|
|
35
|
+
"pkg:all": "npm run bundle && pkg bundle/index.cjs --targets node20-win-x64,node20-linux-x64,node20-macos-x64 --out-path bin/",
|
|
36
|
+
"version": "node scripts/sync-version.js && git add mta.yaml README.md"
|
|
37
|
+
},
|
|
38
|
+
"pkg": {
|
|
39
|
+
"assets": [
|
|
40
|
+
"sap_abbreviation_dictionary.json"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"mcp",
|
|
45
|
+
"model-context-protocol",
|
|
46
|
+
"sap",
|
|
47
|
+
"abap",
|
|
48
|
+
"abap-cloud",
|
|
49
|
+
"clean-core",
|
|
50
|
+
"cloudification-repository",
|
|
51
|
+
"released-apis",
|
|
52
|
+
"released-objects",
|
|
53
|
+
"rap",
|
|
54
|
+
"rest-api"
|
|
55
|
+
],
|
|
56
|
+
"author": "Clément Ringot",
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"homepage": "https://github.com/ClementRingot/ROSA#readme",
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "git+https://github.com/ClementRingot/ROSA.git"
|
|
62
|
+
},
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/ClementRingot/ROSA/issues"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@arc-mcp/xsuaa-auth": "^0.1.4",
|
|
68
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
69
|
+
"cors": "^2.8.6",
|
|
70
|
+
"express": "^5.2.1",
|
|
71
|
+
"express-rate-limit": "^8.5.2",
|
|
72
|
+
"helmet": "^8.2.0",
|
|
73
|
+
"jose": "^6.2.3",
|
|
74
|
+
"zod": "^3.25.0"
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@types/cors": "^2.8.19",
|
|
78
|
+
"@types/express": "^5.0.6",
|
|
79
|
+
"@types/node": "^22.0.0",
|
|
80
|
+
"@yao-pkg/pkg": "^6.14.1",
|
|
81
|
+
"esbuild": "^0.27.3",
|
|
82
|
+
"typescript": "^5.7.0",
|
|
83
|
+
"vitest": "^3.2.4"
|
|
84
|
+
},
|
|
85
|
+
"overrides": {
|
|
86
|
+
"@yao-pkg/pkg": {
|
|
87
|
+
"into-stream": "6.0.0"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|