@rosa-mcp/server 1.14.2 → 1.15.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/README.md +22 -24
- package/dist/http-app.d.ts +20 -0
- package/dist/http-app.d.ts.map +1 -0
- package/dist/http-app.js +104 -0
- package/dist/http-app.js.map +1 -0
- package/dist/index.js +7 -78
- package/dist/index.js.map +1 -1
- package/dist/middleware/cache.d.ts +12 -0
- package/dist/middleware/cache.d.ts.map +1 -0
- package/dist/middleware/cache.js +42 -0
- package/dist/middleware/cache.js.map +1 -0
- package/dist/middleware/oauth.d.ts +8 -0
- package/dist/middleware/oauth.d.ts.map +1 -1
- package/dist/middleware/oauth.js +37 -7
- package/dist/middleware/oauth.js.map +1 -1
- package/dist/services/abbreviation-dictionary.d.ts +9 -1
- package/dist/services/abbreviation-dictionary.d.ts.map +1 -1
- package/dist/services/abbreviation-dictionary.js +18 -11
- package/dist/services/abbreviation-dictionary.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -27,56 +27,53 @@ business logic — no feature gap between them:
|
|
|
27
27
|
|
|
28
28
|
## Quick start
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
The quickest path is **npx** — no install, runs in stdio mode (what MCP clients
|
|
36
|
-
expect). Add this to your client config (Claude Code `.mcp.json`, Claude Desktop
|
|
37
|
-
`claude_desktop_config.json`, or Cursor `~/.cursor/mcp.json`):
|
|
30
|
+
A **free public instance** runs at **[`https://rosa.abaper.app`](https://rosa.abaper.app/health)**
|
|
31
|
+
(read-only, no sign-up, hosted on Vercel). The quickest path is to point your MCP
|
|
32
|
+
client at it — Claude Code `.mcp.json`, Claude Desktop `claude_desktop_config.json`,
|
|
33
|
+
or Cursor `~/.cursor/mcp.json`:
|
|
38
34
|
|
|
39
35
|
```json
|
|
40
36
|
{
|
|
41
37
|
"mcpServers": {
|
|
42
38
|
"rosa": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
39
|
+
"type": "url",
|
|
40
|
+
"url": "https://rosa.abaper.app/mcp"
|
|
45
41
|
}
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
```
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
Prefer to run it locally? **npx** needs no install and runs in stdio mode (what
|
|
47
|
+
MCP clients expect):
|
|
52
48
|
|
|
53
49
|
```json
|
|
54
50
|
{
|
|
55
51
|
"mcpServers": {
|
|
56
52
|
"rosa": {
|
|
57
|
-
"
|
|
58
|
-
"
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["-y", "@rosa-mcp/server"]
|
|
59
55
|
}
|
|
60
56
|
}
|
|
61
57
|
}
|
|
62
58
|
```
|
|
63
59
|
|
|
60
|
+
Running your own instance (self-hosted, BTP, your own Vercel project…)? Use its
|
|
61
|
+
URL instead: `https://<your-instance>/mcp`.
|
|
62
|
+
|
|
64
63
|
### REST API
|
|
65
64
|
|
|
66
|
-
All endpoints are `GET`, return JSON, and support CORS
|
|
67
|
-
with your own host):
|
|
65
|
+
All endpoints are `GET`, return JSON, and support CORS:
|
|
68
66
|
|
|
69
67
|
```bash
|
|
70
|
-
curl "https
|
|
71
|
-
curl "https
|
|
72
|
-
curl "https
|
|
68
|
+
curl "https://rosa.abaper.app/api/search?query=purchase+order"
|
|
69
|
+
curl "https://rosa.abaper.app/api/object?object_type=TABL&object_name=MARA"
|
|
70
|
+
curl "https://rosa.abaper.app/api/compliance?object_names=MARA,BSEG,I_PRODUCT"
|
|
73
71
|
```
|
|
74
72
|
|
|
75
|
-
For LLM-skill usage, the full API reference is available as a skill
|
|
76
|
-
your instance:
|
|
73
|
+
For LLM-skill usage, the full API reference is available as a skill:
|
|
77
74
|
|
|
78
|
-
- [`skills/
|
|
79
|
-
- [`skills/
|
|
75
|
+
- [`skills/sap-released-objects/SKILL.md`](./skills/sap-released-objects/SKILL.md) — ready to use, wired to the public instance `https://rosa.abaper.app`.
|
|
76
|
+
- [`skills/rosa-global/SKILL.md`](./skills/rosa-global/SKILL.md) — template for your own instance: replace the `{{ROSA_BASE_URL}}` placeholder with its URL.
|
|
80
77
|
|
|
81
78
|
---
|
|
82
79
|
|
|
@@ -88,6 +85,7 @@ your instance:
|
|
|
88
85
|
| Run without Node.js installed | **Native executable** | download from [Releases](https://github.com/ClementRingot/ROSA/releases/latest) |
|
|
89
86
|
| Run as a server / self-host | **Docker** | `docker run -p 3001:3001 ghcr.io/clementringot/rosa` |
|
|
90
87
|
| Deploy on a generic Node host | **Node PaaS** | Railway / Render / Fly.io — set `TRANSPORT=http` |
|
|
88
|
+
| Deploy serverless | **Vercel** | [](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FClementRingot%2FROSA&project-name=rosa&repository-name=rosa) — see [DEPLOYMENT](./docs/DEPLOYMENT.md#vercel-serverless) |
|
|
91
89
|
| Deploy on SAP BTP Cloud Foundry | **MTA** or **npm wrapper** | see [DEPLOYMENT](./docs/DEPLOYMENT.md#sap-btp-cloud-foundry-two-paths) |
|
|
92
90
|
| Deploy on classic Cloud Foundry | **`cf push`** | see [cloud-foundry-classic](./docs/cloud-foundry-classic.md) |
|
|
93
91
|
|
|
@@ -159,7 +157,7 @@ authentication modes from the environment — **public**, **OIDC / OAuth 2.1**,
|
|
|
159
157
|
| Public | no auth env vars |
|
|
160
158
|
| OIDC / OAuth 2.1 | `OAUTH_ISSUER` + `OAUTH_AUDIENCE` |
|
|
161
159
|
| XSUAA | `VCAP_SERVICES` xsuaa binding (SAP BTP) |
|
|
162
|
-
| API keys | `API_KEYS` (alongside
|
|
160
|
+
| API keys | `API_KEYS` (alone, or alongside OIDC / XSUAA) |
|
|
163
161
|
|
|
164
162
|
How transports, auth auto-detection, the auth × deployment matrix, and the
|
|
165
163
|
system diagram work: **[docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md)**.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { type Express } from "express";
|
|
3
|
+
export declare const version: string;
|
|
4
|
+
/** Create a fully registered MCP server instance. */
|
|
5
|
+
export declare function createMcpServer(): McpServer;
|
|
6
|
+
export interface CreateAppOptions {
|
|
7
|
+
/** Port the app is reachable on locally (used to derive the XSUAA app URL). */
|
|
8
|
+
port: number;
|
|
9
|
+
}
|
|
10
|
+
export interface RosaApp {
|
|
11
|
+
app: Express;
|
|
12
|
+
/** Detected auth mode: public, xsuaa, oidc… */
|
|
13
|
+
authMode: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Build the Express app. Does not listen: callers either `app.listen(port)` or
|
|
17
|
+
* hand the app to a serverless runtime (Vercel: server.ts).
|
|
18
|
+
*/
|
|
19
|
+
export declare function createApp({ port }: CreateAppOptions): RosaApp;
|
|
20
|
+
//# sourceMappingURL=http-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-app.d.ts","sourceRoot":"","sources":["../src/http-app.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAgB,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAkChD,eAAO,MAAM,OAAO,QAAmB,CAAC;AAMxC,qDAAqD;AACrD,wBAAgB,eAAe,IAAI,SAAS,CAI3C;AAMD,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,OAAO,CAAC;IACb,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,GAAG,OAAO,CAyE7D"}
|
package/dist/http-app.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// ROSA — HTTP application factory
|
|
3
|
+
//
|
|
4
|
+
// Builds the Express app (MCP on /mcp, REST on /api, /health) WITHOUT binding a
|
|
5
|
+
// port, so the same app serves:
|
|
6
|
+
// - the long-running HTTP server (src/index.ts → app.listen), and
|
|
7
|
+
// - serverless hosts that take an exported app (Vercel: ../server.ts).
|
|
8
|
+
// ============================================================================
|
|
9
|
+
import { createRequire } from "node:module";
|
|
10
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
11
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
12
|
+
import express from "express";
|
|
13
|
+
import helmet from "helmet";
|
|
14
|
+
import rateLimit from "express-rate-limit";
|
|
15
|
+
import { registerTools } from "./tools/register-tools.js";
|
|
16
|
+
import { createApiRouter } from "./routes/api-routes.js";
|
|
17
|
+
import { configureAuth } from "./middleware/oauth.js";
|
|
18
|
+
import { apiCacheSeconds, publicApiCache } from "./middleware/cache.js";
|
|
19
|
+
function resolveVersion() {
|
|
20
|
+
// `typeof` on a possibly-undeclared identifier is the one read that never
|
|
21
|
+
// throws; it is a string only when esbuild injected it (bundled context).
|
|
22
|
+
if (typeof __ROSA_VERSION__ === "string")
|
|
23
|
+
return __ROSA_VERSION__;
|
|
24
|
+
try {
|
|
25
|
+
const require = createRequire(import.meta.url);
|
|
26
|
+
return require("../package.json").version;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return "0.0.0-dev";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export const version = resolveVersion();
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
// MCP server
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
/** Create a fully registered MCP server instance. */
|
|
37
|
+
export function createMcpServer() {
|
|
38
|
+
const server = new McpServer({ name: "rosa", version });
|
|
39
|
+
registerTools(server);
|
|
40
|
+
return server;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Build the Express app. Does not listen: callers either `app.listen(port)` or
|
|
44
|
+
* hand the app to a serverless runtime (Vercel: server.ts).
|
|
45
|
+
*/
|
|
46
|
+
export function createApp({ port }) {
|
|
47
|
+
const app = express();
|
|
48
|
+
// Security headers (no restrictive COOP — popup OAuth requires it unset)
|
|
49
|
+
app.use(helmet({
|
|
50
|
+
contentSecurityPolicy: false,
|
|
51
|
+
crossOriginOpenerPolicy: false,
|
|
52
|
+
}));
|
|
53
|
+
app.disable("x-powered-by");
|
|
54
|
+
app.set("trust proxy", 1);
|
|
55
|
+
app.use(express.json());
|
|
56
|
+
// Health check endpoint (always public, before auth)
|
|
57
|
+
app.get("/health", (_req, res) => {
|
|
58
|
+
res.json({ status: "ok", server: "rosa" });
|
|
59
|
+
});
|
|
60
|
+
// Rate limiters (in-memory: per process / per serverless instance)
|
|
61
|
+
const mcpLimiter = rateLimit({
|
|
62
|
+
windowMs: 60_000,
|
|
63
|
+
max: parseInt(process.env.MCP_RATE_LIMIT || "600"),
|
|
64
|
+
standardHeaders: true,
|
|
65
|
+
legacyHeaders: false,
|
|
66
|
+
});
|
|
67
|
+
const apiLimiter = rateLimit({
|
|
68
|
+
windowMs: 60_000,
|
|
69
|
+
max: parseInt(process.env.API_RATE_LIMIT || "600"),
|
|
70
|
+
standardHeaders: true,
|
|
71
|
+
legacyHeaders: false,
|
|
72
|
+
});
|
|
73
|
+
// Authentication (auto-detects XSUAA / OIDC / public)
|
|
74
|
+
const { middleware: authMiddleware, mode: authMode } = configureAuth(app, port);
|
|
75
|
+
// Apply auth middleware to protected routes (when auth is configured)
|
|
76
|
+
if (authMiddleware) {
|
|
77
|
+
app.use("/api", authMiddleware);
|
|
78
|
+
app.use("/mcp", authMiddleware);
|
|
79
|
+
}
|
|
80
|
+
// Public instance only: let a CDN serve repeated REST GETs (public data).
|
|
81
|
+
// Never with auth — a shared cache must not serve credentialed responses.
|
|
82
|
+
if (!authMiddleware) {
|
|
83
|
+
app.use("/api", publicApiCache(apiCacheSeconds()));
|
|
84
|
+
}
|
|
85
|
+
// REST API endpoints
|
|
86
|
+
app.use("/api", apiLimiter, createApiRouter());
|
|
87
|
+
// MCP endpoint — stateless: one server + transport per request, so
|
|
88
|
+
// concurrent requests never share (and fight over) a single connection.
|
|
89
|
+
app.post("/mcp", mcpLimiter, async (req, res) => {
|
|
90
|
+
const server = createMcpServer();
|
|
91
|
+
const transport = new StreamableHTTPServerTransport({
|
|
92
|
+
sessionIdGenerator: undefined,
|
|
93
|
+
enableJsonResponse: true,
|
|
94
|
+
});
|
|
95
|
+
res.on("close", () => {
|
|
96
|
+
void transport.close();
|
|
97
|
+
void server.close();
|
|
98
|
+
});
|
|
99
|
+
await server.connect(transport);
|
|
100
|
+
await transport.handleRequest(req, res, req.body);
|
|
101
|
+
});
|
|
102
|
+
return { app, authMode };
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=http-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-app.js","sourceRoot":"","sources":["../src/http-app.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,kCAAkC;AAClC,EAAE;AACF,gFAAgF;AAChF,gCAAgC;AAChC,oEAAoE;AACpE,yEAAyE;AACzE,+EAA+E;AAE/E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,OAAyB,MAAM,SAAS,CAAC;AAChD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE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C;QACjC,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC;YAClD,kBAAkB,EAAE,SAAS;YAC7B,kBAAkB,EAAE,IAAI;SACzB,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACnB,KAAK,SAAS,CAAC,KAAK,EAAE,CAAC;YACvB,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAChC,MAAM,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC3B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,31 +14,12 @@
|
|
|
14
14
|
// - OIDC (self-hosted private) — activated by OAUTH_ISSUER env var
|
|
15
15
|
// - API keys — activated by API_KEYS (alongside any mode)
|
|
16
16
|
// - Public (no auth) — when none of the above is configured
|
|
17
|
+
//
|
|
18
|
+
// The HTTP app is built in ./http-app.ts (also exported for serverless hosts such
|
|
19
|
+
// as Vercel — see server.ts at the repository root).
|
|
17
20
|
// ============================================================================
|
|
18
|
-
import { createRequire } from "node:module";
|
|
19
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
20
21
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
21
|
-
import {
|
|
22
|
-
import express from "express";
|
|
23
|
-
import helmet from "helmet";
|
|
24
|
-
import rateLimit from "express-rate-limit";
|
|
25
|
-
import { registerTools } from "./tools/register-tools.js";
|
|
26
|
-
import { createApiRouter } from "./routes/api-routes.js";
|
|
27
|
-
import { configureAuth } from "./middleware/oauth.js";
|
|
28
|
-
function resolveVersion() {
|
|
29
|
-
// `typeof` on a possibly-undeclared identifier is the one read that never
|
|
30
|
-
// throws; it is a string only when esbuild injected it (bundled context).
|
|
31
|
-
if (typeof __ROSA_VERSION__ === "string")
|
|
32
|
-
return __ROSA_VERSION__;
|
|
33
|
-
try {
|
|
34
|
-
const require = createRequire(import.meta.url);
|
|
35
|
-
return require("../package.json").version;
|
|
36
|
-
}
|
|
37
|
-
catch {
|
|
38
|
-
return "0.0.0-dev";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const version = resolveVersion();
|
|
22
|
+
import { createApp, createMcpServer } from "./http-app.js";
|
|
42
23
|
// ---------------------------------------------------------------------------
|
|
43
24
|
// CLI flags — `--http`, `--port <n>` (env vars TRANSPORT / PORT still work)
|
|
44
25
|
// ---------------------------------------------------------------------------
|
|
@@ -53,72 +34,20 @@ function flagValue(name) {
|
|
|
53
34
|
const useHttp = argv.includes("--http") || process.env.TRANSPORT === "http";
|
|
54
35
|
const port = parseInt(flagValue("--port") || process.env.PORT || "3001", 10);
|
|
55
36
|
// ---------------------------------------------------------------------------
|
|
56
|
-
// Create and configure the MCP server
|
|
57
|
-
// ---------------------------------------------------------------------------
|
|
58
|
-
const server = new McpServer({
|
|
59
|
-
name: "rosa",
|
|
60
|
-
version,
|
|
61
|
-
});
|
|
62
|
-
// Register all tools
|
|
63
|
-
registerTools(server);
|
|
64
|
-
// ---------------------------------------------------------------------------
|
|
65
37
|
// Transport: stdio (default)
|
|
66
38
|
// ---------------------------------------------------------------------------
|
|
67
39
|
async function runStdio() {
|
|
68
40
|
console.error("[ROSA] Starting in stdio mode...");
|
|
41
|
+
const server = createMcpServer();
|
|
69
42
|
const transport = new StdioServerTransport();
|
|
70
43
|
await server.connect(transport);
|
|
71
44
|
console.error("[ROSA] Server connected via stdio");
|
|
72
45
|
}
|
|
73
46
|
// ---------------------------------------------------------------------------
|
|
74
|
-
// Transport: Streamable HTTP
|
|
47
|
+
// Transport: Streamable HTTP (the app itself lives in ./http-app.ts)
|
|
75
48
|
// ---------------------------------------------------------------------------
|
|
76
49
|
async function runHTTP(httpPort) {
|
|
77
|
-
const app =
|
|
78
|
-
// Security headers (no restrictive COOP — popup OAuth requires it unset)
|
|
79
|
-
app.use(helmet({
|
|
80
|
-
contentSecurityPolicy: false,
|
|
81
|
-
crossOriginOpenerPolicy: false,
|
|
82
|
-
}));
|
|
83
|
-
app.disable("x-powered-by");
|
|
84
|
-
app.set("trust proxy", 1);
|
|
85
|
-
app.use(express.json());
|
|
86
|
-
// Health check endpoint (always public, before auth)
|
|
87
|
-
app.get("/health", (_req, res) => {
|
|
88
|
-
res.json({ status: "ok", server: "rosa" });
|
|
89
|
-
});
|
|
90
|
-
// Rate limiters
|
|
91
|
-
const mcpLimiter = rateLimit({
|
|
92
|
-
windowMs: 60_000,
|
|
93
|
-
max: parseInt(process.env.MCP_RATE_LIMIT || "600"),
|
|
94
|
-
standardHeaders: true,
|
|
95
|
-
legacyHeaders: false,
|
|
96
|
-
});
|
|
97
|
-
const apiLimiter = rateLimit({
|
|
98
|
-
windowMs: 60_000,
|
|
99
|
-
max: parseInt(process.env.API_RATE_LIMIT || "600"),
|
|
100
|
-
standardHeaders: true,
|
|
101
|
-
legacyHeaders: false,
|
|
102
|
-
});
|
|
103
|
-
// Authentication (auto-detects XSUAA / OIDC / public)
|
|
104
|
-
const { middleware: authMiddleware, mode: authMode } = configureAuth(app, httpPort);
|
|
105
|
-
// Apply auth middleware to protected routes (when auth is configured)
|
|
106
|
-
if (authMiddleware) {
|
|
107
|
-
app.use("/api", authMiddleware);
|
|
108
|
-
app.use("/mcp", authMiddleware);
|
|
109
|
-
}
|
|
110
|
-
// REST API endpoints
|
|
111
|
-
app.use("/api", apiLimiter, createApiRouter());
|
|
112
|
-
// MCP endpoint
|
|
113
|
-
app.post("/mcp", mcpLimiter, async (req, res) => {
|
|
114
|
-
const transport = new StreamableHTTPServerTransport({
|
|
115
|
-
sessionIdGenerator: undefined,
|
|
116
|
-
enableJsonResponse: true,
|
|
117
|
-
});
|
|
118
|
-
res.on("close", () => transport.close());
|
|
119
|
-
await server.connect(transport);
|
|
120
|
-
await transport.handleRequest(req, res, req.body);
|
|
121
|
-
});
|
|
50
|
+
const { app, authMode } = createApp({ port: httpPort });
|
|
122
51
|
app.listen(httpPort, () => {
|
|
123
52
|
console.error(`[ROSA] HTTP server running on http://localhost:${httpPort}`);
|
|
124
53
|
console.error(` MCP endpoint: http://localhost:${httpPort}/mcp`);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,+EAA+E;AAC/E,2CAA2C;AAC3C,6DAA6D;AAC7D,oDAAoD;AACpD,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,kEAAkE;AAClE,0EAA0E;AAC1E,EAAE;AACF,6DAA6D;AAC7D,mEAAmE;AACnE,qEAAqE;AACrE,8EAA8E;AAC9E,wEAAwE;AACxE,+EAA+E;AAE/E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,+EAA+E;AAC/E,2CAA2C;AAC3C,6DAA6D;AAC7D,oDAAoD;AACpD,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,kEAAkE;AAClE,0EAA0E;AAC1E,EAAE;AACF,6DAA6D;AAC7D,mEAAmE;AACnE,qEAAqE;AACrE,8EAA8E;AAC9E,wEAAwE;AACxE,EAAE;AACF,kFAAkF;AAClF,qDAAqD;AACrD,+EAA+E;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE3D,8EAA8E;AAC9E,4EAA4E;AAC5E,8EAA8E;AAE9E,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,GAAG,GAAG,IAA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AExD,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE;QACxB,OAAO,CAAC,KAAK,CAAC,kDAAkD,QAAQ,EAAE,CAAC,CAAC;QAC5E,OAAO,CAAC,KAAK,CAAC,oCAAoC,QAAQ,MAAM,CAAC,CAAC;QAClE,OAAO,CAAC,KAAK,CAAC,oCAAoC,QAAQ,MAAM,CAAC,CAAC;QAClE,OAAO,CAAC,KAAK,CAAC,oCAAoC,QAAQ,SAAS,CAAC,CAAC;QACrE,OAAO,CAAC,KAAK,CAAC,mBAAmB,QAAQ,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC;AAED,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,IAAI,OAAO,EAAE,CAAC;IACZ,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;KAAM,CAAC;IACN,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACzB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RequestHandler } from "express";
|
|
2
|
+
/** Default CDN cache lifetime for /api responses, in seconds (1 hour). */
|
|
3
|
+
export declare const DEFAULT_API_CACHE_SECONDS = 3600;
|
|
4
|
+
/** Read API_CACHE_SECONDS; 0 disables the header, invalid values fall back. */
|
|
5
|
+
export declare function apiCacheSeconds(env?: NodeJS.ProcessEnv): number;
|
|
6
|
+
/**
|
|
7
|
+
* Mark successful GET responses as cacheable by shared caches for `seconds`.
|
|
8
|
+
* Browsers keep revalidating (max-age=0); errors are never marked cacheable,
|
|
9
|
+
* so a transient failure (e.g. GitHub unreachable) is not pinned in the CDN.
|
|
10
|
+
*/
|
|
11
|
+
export declare function publicApiCache(seconds: number): RequestHandler;
|
|
12
|
+
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/middleware/cache.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAK5E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAmB9D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Shared-cache headers for the public REST API
|
|
3
|
+
//
|
|
4
|
+
// The data is public, read-only and changes rarely, so a CDN (Vercel's, or any
|
|
5
|
+
// reverse proxy) may serve repeated GETs without invoking ROSA. Only mounted
|
|
6
|
+
// when no authentication is configured: a shared cache must never serve a
|
|
7
|
+
// response that required credentials.
|
|
8
|
+
// ============================================================================
|
|
9
|
+
/** Default CDN cache lifetime for /api responses, in seconds (1 hour). */
|
|
10
|
+
export const DEFAULT_API_CACHE_SECONDS = 3600;
|
|
11
|
+
/** Read API_CACHE_SECONDS; 0 disables the header, invalid values fall back. */
|
|
12
|
+
export function apiCacheSeconds(env = process.env) {
|
|
13
|
+
const raw = env.API_CACHE_SECONDS;
|
|
14
|
+
if (raw === undefined || raw.trim() === "")
|
|
15
|
+
return DEFAULT_API_CACHE_SECONDS;
|
|
16
|
+
const n = Number(raw);
|
|
17
|
+
return Number.isInteger(n) && n >= 0 ? n : DEFAULT_API_CACHE_SECONDS;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Mark successful GET responses as cacheable by shared caches for `seconds`.
|
|
21
|
+
* Browsers keep revalidating (max-age=0); errors are never marked cacheable,
|
|
22
|
+
* so a transient failure (e.g. GitHub unreachable) is not pinned in the CDN.
|
|
23
|
+
*/
|
|
24
|
+
export function publicApiCache(seconds) {
|
|
25
|
+
const value = `public, max-age=0, s-maxage=${seconds}, ` +
|
|
26
|
+
`stale-while-revalidate=${seconds * 24}`;
|
|
27
|
+
return (req, res, next) => {
|
|
28
|
+
if (seconds <= 0 || (req.method !== "GET" && req.method !== "HEAD")) {
|
|
29
|
+
next();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const json = res.json.bind(res);
|
|
33
|
+
res.json = (body) => {
|
|
34
|
+
if (res.statusCode < 400 && !res.getHeader("Cache-Control")) {
|
|
35
|
+
res.setHeader("Cache-Control", value);
|
|
36
|
+
}
|
|
37
|
+
return json(body);
|
|
38
|
+
};
|
|
39
|
+
next();
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/middleware/cache.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,+CAA+C;AAC/C,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,0EAA0E;AAC1E,sCAAsC;AACtC,+EAA+E;AAI/E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAE9C,+EAA+E;AAC/E,MAAM,UAAU,eAAe,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IAClE,MAAM,GAAG,GAAG,GAAG,CAAC,iBAAiB,CAAC;IAClC,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,yBAAyB,CAAC;IAC7E,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC;AACvE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,MAAM,KAAK,GACT,+BAA+B,OAAO,IAAI;QAC1C,0BAA0B,OAAO,GAAG,EAAE,EAAE,CAAC;IAE3C,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QACxB,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,EAAE,CAAC;YACpE,IAAI,EAAE,CAAC;YACP,OAAO;QACT,CAAC;QACD,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE;YAClB,IAAI,GAAG,CAAC,UAAU,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC;gBAC5D,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;YACxC,CAAC;YACD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC,CAAC;QACF,IAAI,EAAE,CAAC;IACT,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { Express, RequestHandler } from "express";
|
|
2
|
+
import { type ApiKeyEntry } from "@arc-mcp/xsuaa-auth";
|
|
3
|
+
/**
|
|
4
|
+
* Parse API_KEYS (`key:profile,key2:profile2`, or bare `key`) into entries.
|
|
5
|
+
* Passing the raw string to @arc-mcp/xsuaa-auth would make the whole string
|
|
6
|
+
* a single key. ROSA has no scopes: the profile only labels the caller
|
|
7
|
+
* (clientId `api-key:<profile>`) in logs.
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseApiKeys(raw: string): ApiKeyEntry[];
|
|
2
10
|
/**
|
|
3
11
|
* Wire authentication onto the Express app and return bearer middleware.
|
|
4
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/middleware/oauth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/middleware/oauth.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EACL,KAAK,WAAW,EAKjB,MAAM,qBAAqB,CAAC;AA6D7B;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,EAAE,CAavD;AAMD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,MAAM,GACX;IAAE,UAAU,EAAE,cAAc,GAAG,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAgE1D"}
|
package/dist/middleware/oauth.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// ============================================================================
|
|
2
|
-
// Authentication middleware — config-driven, supports
|
|
2
|
+
// Authentication middleware — config-driven, supports 4 auth modes:
|
|
3
3
|
//
|
|
4
4
|
// 1. XSUAA (BTP Cloud Foundry) — auto-detected from VCAP_SERVICES
|
|
5
5
|
// 2. Generic OIDC (Docker private) — activated by OAUTH_ISSUER env var
|
|
6
|
-
// 3.
|
|
6
|
+
// 3. API keys only — activated by API_KEYS when neither of the above is set
|
|
7
|
+
// (API_KEYS also layers on top of XSUAA / OIDC)
|
|
8
|
+
// 4. No auth (public) — when none is configured
|
|
7
9
|
//
|
|
8
10
|
// Uses @arc-mcp/xsuaa-auth for all auth wiring (XSUAA OAuth proxy, OIDC
|
|
9
11
|
// verifier, chained token verification, MCP auth router).
|
|
@@ -36,10 +38,38 @@ function detectAuthMode() {
|
|
|
36
38
|
}
|
|
37
39
|
return { kind: "oidc", issuer, audience };
|
|
38
40
|
}
|
|
39
|
-
// 3.
|
|
41
|
+
// 3. API keys only — every /mcp and /api call needs a key
|
|
42
|
+
if (parseApiKeys(process.env.API_KEYS ?? "").length > 0) {
|
|
43
|
+
return { kind: "api-keys" };
|
|
44
|
+
}
|
|
45
|
+
// 4. No auth — public mode
|
|
40
46
|
return { kind: "none" };
|
|
41
47
|
}
|
|
42
48
|
// ---------------------------------------------------------------------------
|
|
49
|
+
// API keys
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
/**
|
|
52
|
+
* Parse API_KEYS (`key:profile,key2:profile2`, or bare `key`) into entries.
|
|
53
|
+
* Passing the raw string to @arc-mcp/xsuaa-auth would make the whole string
|
|
54
|
+
* a single key. ROSA has no scopes: the profile only labels the caller
|
|
55
|
+
* (clientId `api-key:<profile>`) in logs.
|
|
56
|
+
*/
|
|
57
|
+
export function parseApiKeys(raw) {
|
|
58
|
+
return raw
|
|
59
|
+
.split(",")
|
|
60
|
+
.map((part) => part.trim())
|
|
61
|
+
.filter((part) => part.length > 0)
|
|
62
|
+
.map((part) => {
|
|
63
|
+
const sep = part.lastIndexOf(":");
|
|
64
|
+
if (sep <= 0)
|
|
65
|
+
return { key: part, clientId: "api-key" };
|
|
66
|
+
const key = part.slice(0, sep).trim();
|
|
67
|
+
const profile = part.slice(sep + 1).trim();
|
|
68
|
+
return { key, clientId: profile ? `api-key:${profile}` : "api-key" };
|
|
69
|
+
})
|
|
70
|
+
.filter((entry) => entry.key.length > 0);
|
|
71
|
+
}
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
43
73
|
// Public API
|
|
44
74
|
// ---------------------------------------------------------------------------
|
|
45
75
|
/**
|
|
@@ -85,11 +115,11 @@ export function configureAuth(app, port) {
|
|
|
85
115
|
console.error(` Issuer: ${authMode.issuer}`);
|
|
86
116
|
console.error(` Audience: ${authMode.audience}`);
|
|
87
117
|
}
|
|
88
|
-
// API keys (
|
|
89
|
-
const apiKeys = process.env.API_KEYS;
|
|
90
|
-
if (apiKeys) {
|
|
118
|
+
// API keys (alone, or alongside XSUAA / OIDC)
|
|
119
|
+
const apiKeys = parseApiKeys(process.env.API_KEYS ?? "");
|
|
120
|
+
if (apiKeys.length > 0) {
|
|
91
121
|
options.apiKeys = apiKeys;
|
|
92
|
-
console.error(
|
|
122
|
+
console.error(`[ROSA] API key auth enabled (${apiKeys.length} key(s))`);
|
|
93
123
|
}
|
|
94
124
|
// CORS origins (for browser-based MCP clients)
|
|
95
125
|
const corsOrigins = process.env.CORS_ALLOWED_ORIGINS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../src/middleware/oauth.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oEAAoE;AACpE,EAAE;AACF,kEAAkE;AAClE,uEAAuE;AACvE,mDAAmD;AACnD,EAAE;AACF,wEAAwE;AACxE,0DAA0D;AAC1D,+EAA+E;AAG/E,OAAO,
|
|
1
|
+
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../src/middleware/oauth.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oEAAoE;AACpE,EAAE;AACF,kEAAkE;AAClE,uEAAuE;AACvE,4EAA4E;AAC5E,mDAAmD;AACnD,gDAAgD;AAChD,EAAE;AACF,wEAAwE;AACxE,0DAA0D;AAC1D,+EAA+E;AAG/E,OAAO,EAGL,oBAAoB,EACpB,aAAa,EACb,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,8EAA8E;AAC9E,wEAAwE;AACxE,8EAA8E;AAE9E,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,CAAC,GAAW,EAAE,IAA8B,EAAE,EAAE,CACrD,OAAO,CAAC,KAAK,CA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,CAAC,CAAC;QAChD,OAAO,CAAC,KAAK,CAAC,eAAe,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,8CAA8C;IAC9C,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;IACzD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;QAC1B,OAAO,CAAC,KAAK,CAAC,gCAAgC,OAAO,CAAC,MAAM,UAAU,CAAC,CAAC;IAC1E,CAAC;IAED,+CAA+C;IAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IACrD,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CAAC,cAAc,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,UAAU,GAAG,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAEvD,OAAO;QACL,UAAU;QACV,IAAI,EAAE,QAAQ,CAAC,IAAI;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -4,11 +4,19 @@ export interface ExpandedToken {
|
|
|
4
4
|
/** Alternative forms: abbreviations if original is a word, or words if original is an abbreviation */
|
|
5
5
|
alternatives: Set<string>;
|
|
6
6
|
}
|
|
7
|
+
export interface DictionaryJson {
|
|
8
|
+
abbreviation_to_word: Record<string, string>;
|
|
9
|
+
word_to_abbreviations: Record<string, string[]>;
|
|
10
|
+
}
|
|
7
11
|
/**
|
|
8
12
|
* Load the abbreviation dictionary JSON once. Safe to call multiple times.
|
|
9
13
|
* On failure (file not found), logs a warning and leaves maps empty.
|
|
14
|
+
*
|
|
15
|
+
* `preloaded` skips the file lookup: hosts whose bundler cannot see a runtime
|
|
16
|
+
* `readFileSync` (Vercel — see server.ts) import the JSON statically and pass
|
|
17
|
+
* it in before the first search.
|
|
10
18
|
*/
|
|
11
|
-
export declare function loadAbbreviationDictionary(): void;
|
|
19
|
+
export declare function loadAbbreviationDictionary(preloaded?: DictionaryJson): void;
|
|
12
20
|
/**
|
|
13
21
|
* Expand a list of query tokens with their abbreviation alternatives.
|
|
14
22
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abbreviation-dictionary.d.ts","sourceRoot":"","sources":["../../src/services/abbreviation-dictionary.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,sGAAsG;IACtG,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B;
|
|
1
|
+
{"version":3,"file":"abbreviation-dictionary.d.ts","sourceRoot":"","sources":["../../src/services/abbreviation-dictionary.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,sGAAsG;IACtG,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACjD;AAkED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,CAAC,EAAE,cAAc,GAAG,IAAI,CA4D3E;AAMD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAuBnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EAAE,EAChB,UAAU,EAAE,MAAM,GACjB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAgBpD;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,GACZ,MAAM,EAAE,EAAE,GAAG,IAAI,CASnB;AAMD,4CAA4C;AAC5C,wBAAgB,gBAAgB,IAAI,IAAI,CAMvC"}
|
|
@@ -19,15 +19,8 @@ let loaded = false;
|
|
|
19
19
|
// ---------------------------------------------------------------------------
|
|
20
20
|
// Dictionary loading
|
|
21
21
|
// ---------------------------------------------------------------------------
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
* On failure (file not found), logs a warning and leaves maps empty.
|
|
25
|
-
*/
|
|
26
|
-
export function loadAbbreviationDictionary() {
|
|
27
|
-
if (loaded)
|
|
28
|
-
return;
|
|
29
|
-
loaded = true;
|
|
30
|
-
let json = null;
|
|
22
|
+
/** Find and parse sap_abbreviation_dictionary.json next to the code, or null. */
|
|
23
|
+
function readDictionaryFile() {
|
|
31
24
|
const candidatePaths = [];
|
|
32
25
|
try {
|
|
33
26
|
// Determine __dirname equivalent for ESM
|
|
@@ -51,13 +44,27 @@ export function loadAbbreviationDictionary() {
|
|
|
51
44
|
for (const p of candidatePaths) {
|
|
52
45
|
try {
|
|
53
46
|
const raw = readFileSync(p, "utf-8");
|
|
54
|
-
|
|
55
|
-
break;
|
|
47
|
+
return JSON.parse(raw);
|
|
56
48
|
}
|
|
57
49
|
catch {
|
|
58
50
|
// Try next path
|
|
59
51
|
}
|
|
60
52
|
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Load the abbreviation dictionary JSON once. Safe to call multiple times.
|
|
57
|
+
* On failure (file not found), logs a warning and leaves maps empty.
|
|
58
|
+
*
|
|
59
|
+
* `preloaded` skips the file lookup: hosts whose bundler cannot see a runtime
|
|
60
|
+
* `readFileSync` (Vercel — see server.ts) import the JSON statically and pass
|
|
61
|
+
* it in before the first search.
|
|
62
|
+
*/
|
|
63
|
+
export function loadAbbreviationDictionary(preloaded) {
|
|
64
|
+
if (loaded)
|
|
65
|
+
return;
|
|
66
|
+
loaded = true;
|
|
67
|
+
const json = preloaded ?? readDictionaryFile();
|
|
61
68
|
if (!json) {
|
|
62
69
|
console.warn("[abbreviation-dictionary] Dictionary file not found. Abbreviation expansion disabled.");
|
|
63
70
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abbreviation-dictionary.js","sourceRoot":"","sources":["../../src/services/abbreviation-dictionary.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,4DAA4D;AAC5D,+EAA+E;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAkBzC,8EAA8E;AAC9E,wCAAwC;AACxC,8EAA8E;AAE9E,qDAAqD;AACrD,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAoB,CAAC;AAExD,qDAAqD;AACrD,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAoB,CAAC;AAExD,iFAAiF;AACjF,MAAM,uBAAuB,GAAG,IAAI,GAAG,EAAoB,CAAC;AAE5D,yDAAyD;AACzD,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAsB,CAAC;AAE7D,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E;AAE9E
|
|
1
|
+
{"version":3,"file":"abbreviation-dictionary.js","sourceRoot":"","sources":["../../src/services/abbreviation-dictionary.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,4DAA4D;AAC5D,+EAA+E;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,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
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "ROSA \u2014 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
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"LICENSE"
|
|
15
15
|
],
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": "
|
|
17
|
+
"node": "^22 || ^24"
|
|
18
18
|
},
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|