Skip to content

Commit a3778b6

Browse files
committed
test: very first version
very first version
1 parent ce28234 commit a3778b6

File tree

18 files changed

+641
-12
lines changed

18 files changed

+641
-12
lines changed

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
"packageManager": "[email protected]",
7474
"pnpm": {
7575
"overrides": {
76-
"router>path-to-regexp": "0.1.12",
77-
"[email protected]>path-to-regexp": "8.2.0",
7876
"@storybook/manager-api>store2": "2.14.4",
7977
"mta-local": "1.0.4",
8078
"axios@<1.12.0": "^1.12.2"

packages/fiori-mcp-server/package.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
"lint": "eslint . --ext .ts",
3434
"lint:fix": "eslint . --ext .ts --fix",
3535
"test": "jest --ci --forceExit --detectOpenHandles --colors",
36-
"inspector": "npx @modelcontextprotocol/inspector node dist/index.js"
36+
"inspector": "npx @modelcontextprotocol/inspector node dist/index.js",
37+
"view": "promptfoo view -y",
38+
"test:promptfoo": "promptfoo eval --config test/prompt-test/promptfooconfig.yaml",
39+
"test:promptfooWithMcp": "promptfoo eval --config test/prompt-test/promptfooWithMcp.yaml",
40+
"test:promptfooWithMcp2": "promptfoo eval --config test/prompt-test/promptfooWithMcp2.yaml"
3741
},
3842
"files": [
3943
"LICENSE",
@@ -65,7 +69,15 @@
6569
"@sap-ux/telemetry": "workspace:*",
6670
"i18next": "25.3.0",
6771
"os-name": "4.0.1",
68-
"zod": "4.1.5"
72+
"zod": "4.1.5",
73+
"@sap-ai-sdk/foundation-models": "2.0.0",
74+
"@sap-ai-sdk/langchain": "2.0.0",
75+
"@sap-cloud-sdk/util": "4.1.2",
76+
"axios": "1.12.2",
77+
"dotenv": "^17.2.1",
78+
"promptfoo": "^0.117.4",
79+
"@langchain/mcp-adapters": "0.6.0",
80+
"@langchain/core": "0.3.75"
6981
},
7082
"dependencies": {
7183
"@sap-ux/fiori-docs-embeddings": "*",

packages/fiori-mcp-server/src/types/input.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,21 @@ export const GetFunctionalityDetailsInputSchema = zod.object({
3838
/**
3939
* Input interface for the 'execute_functionality' functionality
4040
*/
41-
export const ExecuteFunctionalityInputSchema = zod.object({
42-
/** ID or array of IDs of the functionality(ies) to execute */
43-
functionalityId: FunctionalityIdSchema.describe('The ID of the functionality to execute'),
44-
/** Parameters for the functionality execution */
45-
parameters: zod.record(zod.string(), zod.unknown()).describe('Parameters for the functionality execution'),
46-
/** Path to the Fiori application */
47-
appPath: zod.string().describe('Path to the Fiori application. Path should be an absolute path.')
48-
});
41+
export const ExecuteFunctionalityInputSchema = zod
42+
.object({
43+
/** ID or array of IDs of the functionality(ies) to execute */
44+
functionalityId: FunctionalityIdSchema.describe('The ID of the functionality to execute'),
45+
/** Parameters for the functionality execution */
46+
parameters: zod.record(zod.string(), zod.unknown()).describe('Parameters for the functionality execution'),
47+
/** Path to the Fiori application */
48+
appPath: zod.string().describe('Path to the Fiori application. Path should be an absolute path.')
49+
})
50+
.describe(
51+
'Input object for executing a functionality. ' +
52+
'Only three top-level properties are allowed: "functionalityId", "parameters", and "appPath". ' +
53+
'All other dynamic or functionality-specific inputs must be included inside the "parameters" object. ' +
54+
'Do not place any additional fields at the root level.'
55+
);
4956

5057
export const DocSearchInputSchema = zod.object({
5158
query: zod
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
prompts:
2+
- file://src/prompt2.txt
3+
providers:
4+
- id: file://src/AICoreApiProvider.ts
5+
config:
6+
model: "gpt-4o"
7+
8+
tests:
9+
- vars:
10+
appPath: "C:/SAPDevelop/test-projects/ghIssues/35887/project1-2025-10-011325"
11+
assert:
12+
- type: contains
13+
value: add-page
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
prompts:
2+
- file://src/prompt4.txt
3+
providers:
4+
- id: file://src/AICoreApiProvider.ts
5+
config:
6+
model: "gpt-4o"
7+
8+
tests:
9+
- vars:
10+
appPath: "C:/SAPDevelop/test-projects/ghIssues/35887/project1-2025-10-011325"
11+
pageType: ObjectPage
12+
parent: TravelObjectPage
13+
assert:
14+
- type: contains
15+
value: successfully added
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
prompts:
2+
- file://src/prompt1.txt
3+
providers:
4+
- id: file://src/AICoreApiProvider.ts
5+
config:
6+
model: "gpt-4o"
7+
tests:
8+
- vars:
9+
language: French
10+
input: Hello world
11+
assert:
12+
- type: icontains
13+
value: 'bonjour'
14+
- vars:
15+
language: German
16+
input: Good morning
17+
assert:
18+
- type: javascript
19+
value: output.toLowerCase().includes('guten morgen')

0 commit comments

Comments
 (0)