Skip to content

Commit ffba589

Browse files
authored
Update yo to 7.0.1 and mdk-tools to 1.17.2 (#133)
* Update yo to 7.0.1 and mdk-tools to 1.17.2 * Add 26.9 schemas * fix: prettier formatting
1 parent 7987c35 commit ffba589

508 files changed

Lines changed: 46186 additions & 9525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ If you're on an Intel Mac, you may need to:
7070
- With Cline open, look below the prompt box and click **Manage MCP Servers**.
7171
- In the dialog, click **Settings**. The MCP Servers page opens.
7272
- Click **Configure MCP Servers**. This will open the `cline_mcp_settings.json` file in your editor.
73-
- In the JSON settings file, add a configuration block for MDK MCP server within the `mcpServers` section, and save the file. The supported schema versions include 26.6 (default), 26.3, 25.9, 25.6, 24.11, and 24.7.
73+
- In the JSON settings file, add a configuration block for MDK MCP server within the `mcpServers` section, and save the file. The supported schema versions include 26.9 (default), 26.6, 26.3, 25.9, 25.6, 24.11, and 24.7.
7474

7575
```json
7676
{
7777
"mcpServers": {
7878
"mdk-mcp": {
7979
"type": "stdio",
8080
"command": "mdk-mcp",
81-
"args": ["--schema-version", "26.6"]
81+
"args": ["--schema-version", "26.9"]
8282
}
8383
}
8484
}
@@ -106,7 +106,7 @@ If you're on an Intel Mac, you may need to:
106106
"mdk-mcp": {
107107
"type": "stdio",
108108
"command": "mdk-mcp",
109-
"args": ["--schema-version", "26.6"]
109+
"args": ["--schema-version", "26.9"]
110110
}
111111
}
112112
}
@@ -138,7 +138,7 @@ If you're on an Intel Mac, you may need to:
138138
"mcp": {
139139
"mdk-mcp": {
140140
"type": "local",
141-
"command": ["mdk-mcp", "--schema-version", "26.6"],
141+
"command": ["mdk-mcp", "--schema-version", "26.9"],
142142
"enabled": true
143143
}
144144
}
@@ -158,7 +158,7 @@ If you're on an Intel Mac, you may need to:
158158
"mdk-mcp": {
159159
"type": "stdio",
160160
"command": "mdk-mcp",
161-
"args": ["--schema-version", "26.6"]
161+
"args": ["--schema-version", "26.9"]
162162
}
163163
}
164164
}
@@ -182,7 +182,7 @@ If you're on an Intel Mac, you may need to:
182182
"mcpServers": {
183183
"mdk-mcp": {
184184
"command": "/usr/local/bin/node",
185-
"args": ["/usr/local/lib/node_modules/@sap/mdk-mcp-server/build/index.js", "--schema-version", "26.6"]
185+
"args": ["/usr/local/lib/node_modules/@sap/mdk-mcp-server/build/index.js", "--schema-version", "26.9"]
186186
}
187187
}
188188
}

‎package-lock.json‎

Lines changed: 11526 additions & 9510 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
"@sap/artifact-management": "^1.53.1",
5555
"@sap/artifact-management-base": "^1.53.1",
5656
"@sap/generator-mdk": "1.2.0",
57-
"@sap/mdk-tools": "^1.16.0",
57+
"@sap/mdk-tools": "^1.17.2",
5858
"axios": "^1.20.0",
5959
"dotenv": "^18.0.0",
6060
"i18next": "26.5.3",
6161
"os-name": "7.0.1",
6262
"xml2js": "^0.6.2",
63-
"yo": "^4.3.1",
63+
"yo": "^7.0.1",
6464
"zod": "^4.1.12"
6565
},
6666
"devDependencies": {
@@ -132,6 +132,6 @@
132132
"js-yaml": "^4.1.0"
133133
},
134134
"mdkConfig": {
135-
"schemaVersion": "26.6"
135+
"schemaVersion": "26.9"
136136
}
137137
}

‎res/schemas/26.9/Action.schema‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "Action",
4+
"title": "Action",
5+
"description": "The following describes the common metadata properties applicable for all action types. Note: Failed actions are events that execute with errors. Invalid actions are events that doesn't get executed at all due to validation errors.",
6+
"properties": {
7+
"ActionResult": {
8+
"description": "Refer to the [MDK Guide](https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/getting-started/mdk/development/action-binding-and-result.html#action-results) to understand what an action result is.\n\nContains a name that can be used to look up an action result via target path or rule. Action results are only available for subsequent actions, given that the preceding action result is stored via `OnSuccess` or `OnFailure` actions.",
9+
"$ref": "definitions/ActionResult"
10+
},
11+
"ActivityIndicatorText": {
12+
"description": "Text that appears on the progress bar.",
13+
"type": "string",
14+
"default": "LOADING"
15+
},
16+
"OnFailure": {
17+
"description": "Action or rule that is executed when an action fails. PLT formatter is supported.",
18+
"$ref": "definitions/ActionOrRule",
19+
"examples": ["$(PLT,'/MDKDevApp/Actions/PLTActions/FailureIOS.action', '/MDKDevApp/Actions/PLTActions/FailureAndroid.action')"]
20+
},
21+
"OnFailureLog": {
22+
"description": "Messages are logged when an action fails.",
23+
"$ref": "definitions/OnActionLog"
24+
},
25+
"OnInvalid": {
26+
"description": "Action or rule that is executed when a validation fails. PLT formatter is supported.",
27+
"$ref": "definitions/ActionOrRule",
28+
"examples": ["$(PLT,'/MDKDevApp/Actions/PLTActions/InvalidIOS.action', '/MDKDevApp/Actions/PLTActions/InvalidAndroid.action')"]
29+
},
30+
"OnInvalidLog": {
31+
"description": "Messages are logged when a validation fails.",
32+
"$ref": "definitions/OnActionLog"
33+
},
34+
"OnSuccess": {
35+
"description": "Action or rule that is executed when an action is successful. PLT formatter is supported.",
36+
"$ref": "definitions/ActionOrRule",
37+
"examples": ["$(PLT,'/MDKDevApp/Actions/PLTActions/SuccessIOS.action', '/MDKDevApp/Actions/PLTActions/SuccessAndroid.action')"]
38+
},
39+
"OnSuccessLog": {
40+
"description": "Messages are logged when an action gets executed successful.",
41+
"$ref": "definitions/OnActionLog"
42+
},
43+
"ShowActivityIndicator": {
44+
"description": "If set to True, every time an activity or action gets executed, a progress bar appears with the execution status, and it’ll automatically disappear once done.",
45+
"type": "boolean"
46+
},
47+
"ValidationRule": {
48+
"description": "Rule that validates the current action. The rule will be run before the action is executed. The rule can check values to make sure properties exist and match business criteria or any other business logic needed before executing the action. Return a boolean value to indicate if the validation has passed. If false or non-boolean value is returned, the action will not be executed and OnInvalid event will be triggered.",
49+
"$ref": "definitions/Rule"
50+
},
51+
"_Type": {
52+
"pattern": "(^Action\\.Type\\.)([A-Z].+)$",
53+
"type": "string"
54+
}
55+
},
56+
"required": [
57+
"_Type"
58+
],
59+
"type": "object"
60+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "Action.Type.AICore.Chat.Completions",
4+
"title": "AICore Chat Completions",
5+
"description": "Chat Completions action is used to send a /chats/completions request to the AI Core service.\n\nAll the properties defined under [Action](../../Action.schema.md) are applicable to this action.",
6+
"properties": {
7+
"APIVersion": {
8+
"description": "Specify the API version. For information about the supported API versions, see Chat completions in the [Microsoft documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions).",
9+
"type": "string",
10+
"default": "2024-02-01"
11+
},
12+
"Headers": {
13+
"type": "object",
14+
"description": "Custom headers to be included as part of the request to the AI Core Service in key/value pair format",
15+
"default": {"content-type": "application/json"}
16+
},
17+
"Path": {
18+
"type": "string",
19+
"description": "The endpoints such as \"/chat/completions\" are not required if if \"/chat/completions\" is already in the full path of destination"
20+
},
21+
"Properties": {
22+
"$ref": "definitions/ChatCompletionsProperties",
23+
"description": "A list of the property names and values in key/value pairs format."
24+
},
25+
"ResourceGroup": {
26+
"description": "Specify the resource group. Resource groups represent a virtual collection of related resources within the scope of your AI runtime environment.",
27+
"type": "string",
28+
"default": "default"
29+
},
30+
"Target": {
31+
"$ref": "definitions/AICoreTarget"
32+
},
33+
"_Type": {
34+
"const": "Action.Type.AICore.Chat.Completions"
35+
}
36+
},
37+
"required": [
38+
"Target",
39+
"Properties",
40+
"_Type"
41+
],
42+
"type": "object"
43+
}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
2+
----
3+
## Action Result
4+
Refer to the [MDK Guide](https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/getting-started/mdk/development/action-binding-and-result.html#action-results) to understand what an action result is.
5+
6+
The success ActionResult of this action is of a JS primitive type, object or a JS array. The failure ActionResult is an error message.
7+
8+
----
9+
## Examples
10+
11+
Please refer to [AI Core Service Guide](https://help.sap.com/doc/c31b38b32a5d4e07a4488cb0f8bb55d9/CLOUD/en-US/f17fa8568d0448c685f2a0301061a6ee.pdf) for the supported models
12+
13+
### Text Input
14+
15+
```json
16+
{
17+
"_Type": "Action.Type.AICore.Chat.Completions",
18+
"ResourceGroup": "default",
19+
"APIVersion": "2023-05-15",
20+
"Target": {
21+
"Service": "/MyMDKApp/Services/MyAICore.service",
22+
"Path": "/chat/completions"
23+
},
24+
"Properties" : {
25+
"Model": "gpt-3.5-turbo",
26+
"Messages": [
27+
{
28+
"role": "user",
29+
"content": "sample input prompt"
30+
}
31+
],
32+
"MaxTokens": 100,
33+
"Temperature": 0.0,
34+
"FrequencyPenalty": 0,
35+
"PresencePenalty": 0,
36+
}
37+
}
38+
```
39+
40+
41+
### Image Input
42+
43+
```json
44+
{
45+
"_Type": "Action.Type.AICore.Chat.Completions",
46+
"APIVersion": "2023-05-15",
47+
"Target": {
48+
"Service": "/MyMDKApp/Services/MyAICore.service",
49+
"Path": "/chat/completions"
50+
},
51+
"Properties" : {
52+
"Model": "gpt-4o",
53+
"Messages": [
54+
{
55+
"role": "user",
56+
"content": [
57+
{
58+
"type": "text",
59+
"text": "Describe this picture:"
60+
},
61+
{
62+
"type": "image_url",
63+
"image_url": {
64+
"url": "https://path/images/image.png"
65+
}
66+
},
67+
{
68+
"type": "image_url",
69+
"image_url": {
70+
"url": "data:image/jpeg;base64,{base64_image}"
71+
}
72+
}
73+
]
74+
},
75+
"MaxTokens": 100
76+
}
77+
}
78+
```
79+
80+
81+
### Tools
82+
83+
Tools and Tool_choice properties are supported by GPT models.
84+
85+
```json
86+
{
87+
"_Type": "Action.Type.AICore.Chat.Completions",
88+
"APIVersion": "2023-05-15",
89+
"Target": {
90+
"Service": "/MyMDKApp/Services/MyAICore.service",
91+
"Path": "/chat/completions"
92+
},
93+
"Properties" : {
94+
"Model": "gpt-4o",
95+
"Messages": [
96+
{
97+
"role": "user",
98+
"content": "Please fetch the weather data for the city of London.",
99+
},
100+
],
101+
"Tools": [
102+
{
103+
"type": "function",
104+
"function": {
105+
"name": "fetch_weather_data",
106+
"description": "Fetch weather data from OpenWeatherMap API",
107+
"parameters": {
108+
"type": "object",
109+
"properties": {
110+
"city": {
111+
"type": "string",
112+
"description": "The name of the city to get weather data for",
113+
},
114+
},
115+
"required": ["city"],
116+
},
117+
},
118+
},
119+
],
120+
"ToolChoice": {
121+
"type": "function",
122+
"function": {
123+
"name": "fetch_weather_data",
124+
},
125+
},
126+
"MaxTokens": 100
127+
}
128+
}
129+
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "Action.Type.AICore.Generate.Content",
4+
"title": "AICore Generate Content",
5+
"description": "Generate Content action is used to send a generateContent request to the AI Core service.\n\nAll the properties defined under [Action](../../Action.schema.md) are applicable to this action.",
6+
"properties": {
7+
"Headers": {
8+
"type": "object",
9+
"description": "Custom headers to be included as part of the request to the AI Core Service in key/value pair format",
10+
"default": {"content-type": "application/json"}
11+
},
12+
"Path": {
13+
"type": "string",
14+
"description": "The endpoints such as \"/models/gemini-1.5-pro:generateContent\" are not required if \"/models/gemini-1.5-pro:generateContent\" is already in the full path of destination"
15+
},
16+
"Properties": {
17+
"$ref": "definitions/GenerateContentProperties",
18+
"description": "A list of the property names and values in key/value pairs format."
19+
},
20+
"ResourceGroup": {
21+
"description": "Specify the resource group. Resource groups represent a virtual collection of related resources within the scope of your AI runtime environment.",
22+
"type": "string",
23+
"default": "default"
24+
},
25+
"Target": {
26+
"$ref": "definitions/AICoreTarget"
27+
},
28+
"_Type": {
29+
"const": "Action.Type.AICore.Generate.Content"
30+
}
31+
},
32+
"required": [
33+
"Target",
34+
"Properties",
35+
"_Type"
36+
],
37+
"type": "object"
38+
}

0 commit comments

Comments
 (0)