chore: import upstream snapshot with attribution
CodeQL / Analyze (csharp) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run

This commit is contained in:
wehub-resource-sync
2026-07-13 13:21:23 +08:00
commit b957a53def
5423 changed files with 863745 additions and 0 deletions
@@ -0,0 +1,12 @@
name: TestFunction
template_format: semantic-kernel
template: |
{{$input}}
description: A test function from a yaml file.
execution_settings:
default:
temperature: 0.6
max_tokens: 123
top_p: 1.0
presence_penalty: 0.0
frequency_penalty: 2.0
@@ -0,0 +1,12 @@
name: TestFunctionHandlebars
template_format: handlebars
template: |
{{#each chat_history}}{{#message role=role}}{{~content~}}{{/message}}{{/each}}
description: A test function from a yaml file.
execution_settings:
default:
temperature: 0.6
max_tokens: 123
top_p: 1.0
presence_penalty: 0.0
frequency_penalty: 2.0
@@ -0,0 +1,12 @@
name: TestFunctionJinja2
template_format: jinja2
template: |
Repeat {% for item in chat_history %}{{ message(item) }}{% endfor %}
description: A test function from a yaml file.
execution_settings:
default:
temperature: 0.6
max_tokens: 123
top_p: 1.0
presence_penalty: 0.0
frequency_penalty: 2.0
@@ -0,0 +1,28 @@
# Copyright (c) Microsoft. All rights reserved.
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Echo")
@mcp.resource("echo://{message}")
def echo_resource(message: str) -> str:
"""Echo a message as a resource"""
return f"Resource echo: {message}"
@mcp.tool()
def echo_tool(message: str) -> str:
"""Echo a message as a tool"""
return f"Tool echo: {message}"
@mcp.prompt()
def echo_prompt(message: str) -> str:
"""Create an echo prompt"""
return f"Please process this message: {message}"
if __name__ == "__main__":
# Initialize and run the server
mcp.run(transport="stdio")
@@ -0,0 +1,13 @@
{
"schema": 1,
"description": "Test Description",
"execution_settings": {
"default": {
"max_tokens": 123,
"temperature": 0.0,
"top_p": 1.0,
"presence_penalty": 0.0,
"frequency_penalty": 2.0
}
}
}
@@ -0,0 +1,5 @@
{{$input}}
==
Test prompt.
==
@@ -0,0 +1,26 @@
# Copyright (c) Microsoft. All rights reserved.
from typing import Annotated
from semantic_kernel.functions.kernel_function_decorator import kernel_function
class TestNativeEchoBotPlugin:
"""Description: Test Native Plugin for testing purposes"""
@kernel_function(
description="Echo for input text",
name="echoAsync",
)
async def echo(self, text: Annotated[str, "The text to echo"]) -> str:
"""Echo for input text
Example:
"hello world" => "hello world"
Args:
text -- The text to echo
Returns:
input text
"""
return text
@@ -0,0 +1,12 @@
name: TestFunctionYaml
template_format: semantic-kernel
template: |
{{$input}}
description: A test function from a yaml file.
execution_settings:
default:
temperature: 0.6
max_tokens: 123
top_p: 1.0
presence_penalty: 0.0
frequency_penalty: 2.0
@@ -0,0 +1,20 @@
{
"schema_version": "v1",
"name_for_model": "AzureKeyVault",
"name_for_human": "AzureKeyVault",
"description_for_model": "An Azure Key Vault plugin for interacting with secrets.",
"description_for_human": "An Azure Key Vault plugin for interacting with secrets.",
"auth": {
"type": "oauth",
"scope": "https://vault.azure.net/.default",
"authorization_url": "https://login.microsoftonline.com/e80e3e25-bb8d-4b4d-ab3f-b91669dd8ae4/oauth2/v2.0/token",
"authorization_content_type": "application/x-www-form-urlencoded"
},
"api": {
"type": "openapi",
"url": "file:///./tests/assets/test_plugins/TestPlugin/TestOpenAPIPlugin/akv-openapi.yaml"
},
"logo_url": "",
"contact_email": "",
"legal_info_url": ""
}
@@ -0,0 +1,133 @@
openapi: 3.1.0
info:
title: Azure Key Vault [Sample]
description: "A sample connector for the Azure Key Vault service. This connector is built for the Azure Key Vault REST API. You can see the details of the API here: https://docs.microsoft.com/rest/api/keyvault/."
version: "1.0"
servers:
- url: https://my-key-vault.vault.azure.net/
paths:
/secrets/{secret-name}:
get:
summary: Get secret
description: "Get a specified secret from a given key vault. For details, see: https://learn.microsoft.com/en-us/rest/api/keyvault/secrets/get-secret/get-secret."
operationId: GetSecret
parameters:
- name: secret-name
in: path
required: true
schema:
type: string
- name: api-version
in: query
required: true
schema:
type: string
default: "7.0"
x-ms-visibility: internal
responses:
'200':
description: default
content:
application/json:
schema:
type: object
properties:
attributes:
type: object
properties:
created:
type: integer
format: int32
description: created
enabled:
type: boolean
description: enabled
recoverylevel:
type: string
description: recoverylevel
updated:
type: integer
format: int32
description: updated
id:
type: string
description: id
value:
type: string
format: byte
description: value
put:
summary: Create or update secret value
description: "Sets a secret in a specified key vault. This operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/set permission. For details, see: https://learn.microsoft.com/en-us/rest/api/keyvault/secrets/set-secret/set-secret."
operationId: SetSecret
parameters:
- name: secret-name
in: path
required: true
schema:
type: string
- name: api-version
in: query
required: true
schema:
type: string
default: "7.0"
x-ms-visibility: internal
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
attributes:
type: object
properties:
enabled:
type: boolean
description: Determines whether the object is enabled.
value:
type: string
description: The value of the secret.
required:
- value
responses:
'200':
description: default
content:
application/json:
schema:
type: object
properties:
attributes:
type: object
properties:
created:
type: integer
format: int32
description: created
enabled:
type: boolean
description: enabled
recoverylevel:
type: string
description: recoverylevel
updated:
type: integer
format: int32
description: updated
id:
type: string
description: id
value:
type: string
description: value
components:
securitySchemes:
oauth2_auth:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://login.windows.net/common/oauth2/authorize
tokenUrl: https://login.windows.net/common/oauth2/token
scopes: {}
@@ -0,0 +1,13 @@
{
"schema": 1,
"description": "Test Description",
"execution_settings": {
"default": {
"max_tokens": 123,
"temperature": 0.0,
"top_p": 1.0,
"presence_penalty": 0.0,
"frequency_penalty": 2.0
}
}
}
@@ -0,0 +1,5 @@
{{$input}}
==
Test prompt.
==
@@ -0,0 +1,13 @@
{
"schema": 1,
"description": "Test Description",
"execution_settings": {
"default": {
"max_tokens": 123,
"temperature": 0.0,
"top_p": 1.0,
"presence_penalty": 0.0,
"frequency_penalty": 2.0
}
}
}
@@ -0,0 +1,14 @@
{
"schema": 1,
"description": "Test Description",
"template_format": "handlebars",
"execution_settings": {
"default": {
"max_tokens": 123,
"temperature": 0.0,
"top_p": 1.0,
"presence_penalty": 0.0,
"frequency_penalty": 2.0
}
}
}
@@ -0,0 +1,5 @@
{{input}}
==
Test prompt.
==
@@ -0,0 +1,5 @@
{{$input}}
==
Test prompt.
==