Skip to content

Commit 13115ae

Browse files
authored
Merge branch 'main' into fix-mcp-hang-on-init
2 parents 96b3a6a + 12f14bd commit 13115ae

File tree

329 files changed

+13849
-4893
lines changed

Some content is hidden

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

329 files changed

+13849
-4893
lines changed
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: DevFlow PR Review
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- reopened
8+
- ready_for_review
9+
workflow_dispatch:
10+
inputs:
11+
pr_number:
12+
description: Pull request number to review
13+
required: true
14+
type: string
15+
16+
permissions:
17+
contents: read
18+
issues: write
19+
pull-requests: write
20+
21+
concurrency:
22+
group: devflow-pr-review-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}
23+
cancel-in-progress: true
24+
25+
env:
26+
DEVFLOW_REPOSITORY: ${{ vars.DF_REPO }}
27+
DEVFLOW_REF: main
28+
TARGET_REPO_PATH: ${{ github.workspace }}/target-repo
29+
DEVFLOW_PATH: ${{ github.workspace }}/devflow
30+
31+
jobs:
32+
review:
33+
runs-on: ubuntu-latest
34+
timeout-minutes: 60
35+
if: ${{ github.event_name != 'pull_request_target' || !github.event.pull_request.draft }}
36+
37+
steps:
38+
- name: Resolve PR metadata
39+
id: pr
40+
shell: bash
41+
env:
42+
PR_HTML_URL: ${{ github.event.pull_request.html_url }}
43+
PR_NUMBER_EVENT: ${{ github.event.pull_request.number }}
44+
PR_NUMBER_INPUT: ${{ inputs.pr_number }}
45+
run: |
46+
set -euo pipefail
47+
48+
if [[ "${GITHUB_EVENT_NAME}" == "pull_request_target" ]]; then
49+
pr_number="${PR_NUMBER_EVENT}"
50+
pr_url="${PR_HTML_URL}"
51+
else
52+
pr_number="${PR_NUMBER_INPUT}"
53+
pr_url="https://github.com/${GITHUB_REPOSITORY}/pull/${pr_number}"
54+
fi
55+
56+
if [[ ! "$pr_number" =~ ^[1-9][0-9]*$ ]]; then
57+
echo "Could not determine PR number; for workflow_dispatch runs, the 'pr_number' input is required when not running on pull_request_target." >&2
58+
exit 1
59+
fi
60+
61+
echo "pr_url=${pr_url}" >> "$GITHUB_OUTPUT"
62+
echo "pr_number=${pr_number}" >> "$GITHUB_OUTPUT"
63+
echo "repo=${GITHUB_REPOSITORY}" >> "$GITHUB_OUTPUT"
64+
65+
# Safe checkout: base repo only, not the untrusted PR head.
66+
- name: Checkout target repo base
67+
uses: actions/checkout@v5
68+
with:
69+
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha }}
70+
fetch-depth: 0
71+
persist-credentials: false
72+
path: target-repo
73+
74+
# Private DevFlow checkout: the PAT/token grants access to this repo's code.
75+
- name: Checkout DevFlow
76+
uses: actions/checkout@v5
77+
with:
78+
repository: ${{ env.DEVFLOW_REPOSITORY }}
79+
ref: ${{ env.DEVFLOW_REF }}
80+
token: ${{ secrets.DEVFLOW_TOKEN }}
81+
fetch-depth: 1
82+
persist-credentials: false
83+
path: devflow
84+
85+
- name: Set up Python
86+
uses: actions/setup-python@v5
87+
with:
88+
python-version: "3.13"
89+
90+
- name: Set up uv
91+
uses: astral-sh/setup-uv@v6
92+
with:
93+
version: "0.5.x"
94+
enable-cache: true
95+
96+
- name: Install DevFlow dependencies
97+
working-directory: ${{ env.DEVFLOW_PATH }}
98+
run: uv sync --frozen
99+
100+
- name: Classify PR relevance
101+
id: spam
102+
working-directory: ${{ env.DEVFLOW_PATH }}
103+
env:
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
GH_COPILOT_TOKEN: ${{ secrets.GH_COPILOT_TOKEN }}
106+
SK_REPO_PATH: ${{ env.TARGET_REPO_PATH }}
107+
AGENT_REPO_PATH: ${{ env.TARGET_REPO_PATH }}
108+
PR_REPO: ${{ steps.pr.outputs.repo }}
109+
PR_NUMBER: ${{ steps.pr.outputs.pr_number }}
110+
run: |
111+
uv run python scripts/classify_pr_spam.py \
112+
--repo "$PR_REPO" \
113+
--pr-number "$PR_NUMBER" \
114+
--repo-path "${TARGET_REPO_PATH}" \
115+
--apply-labels
116+
117+
- name: Stop after spam gate
118+
if: ${{ steps.spam.outputs.decision != 'allow' }}
119+
shell: bash
120+
env:
121+
SPAM_DECISION: ${{ steps.spam.outputs.decision }}
122+
run: |
123+
echo "Skipping review because spam gate decided: ${SPAM_DECISION}"
124+
125+
- name: Run PR review
126+
if: ${{ steps.spam.outputs.decision == 'allow' }}
127+
id: review
128+
working-directory: ${{ env.DEVFLOW_PATH }}
129+
env:
130+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131+
GH_COPILOT_TOKEN: ${{ secrets.GH_COPILOT_TOKEN }}
132+
SK_REPO_PATH: ${{ env.TARGET_REPO_PATH }}
133+
AGENT_REPO_PATH: ${{ env.TARGET_REPO_PATH }}
134+
PR_URL: ${{ steps.pr.outputs.pr_url }}
135+
run: |
136+
uv run python scripts/trigger_pr_review.py \
137+
--pr-url "$PR_URL" \
138+
--github-username "$GITHUB_ACTOR" \
139+
--no-require-comment-selection

.github/workflows/python-integration-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ env:
6868
GOOGLE_AI_EMBEDDING_MODEL_ID: ${{ vars.GOOGLE_AI_EMBEDDING_MODEL_ID }}
6969
GOOGLE_AI_API_KEY: ${{ secrets.GOOGLE_AI_API_KEY }}
7070
GOOGLE_AI_CLOUD_PROJECT_ID: ${{ vars.GOOGLE_AI_CLOUD_PROJECT_ID }}
71+
GOOGLE_AI_CLOUD_REGION: ${{ vars.GOOGLE_AI_CLOUD_REGION }}
7172
VERTEX_AI_PROJECT_ID: ${{ vars.VERTEX_AI_PROJECT_ID }}
7273
VERTEX_AI_GEMINI_MODEL_ID: ${{ vars.VERTEX_AI_GEMINI_MODEL_ID }}
7374
VERTEX_AI_EMBEDDING_MODEL_ID: ${{ vars.VERTEX_AI_EMBEDDING_MODEL_ID }}

.github/workflows/python-test-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Install the project
3737
run: uv sync --all-extras --dev -U --prerelease=if-necessary-or-explicit
3838
- name: Test with pytest
39-
run: uv run --frozen pytest -q --junitxml=pytest.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered --cov-report=xml:python-coverage.xml ./tests/unit
39+
run: uv run --frozen pytest -q --junitxml=pytest.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered --cov-report=xml:python-coverage.xml ./tests/unit --ignore=./tests/unit/processes/dapr_runtime
4040
- name: Upload coverage report
4141
uses: actions/upload-artifact@v4
4242
with:

.github/workflows/python-unit-tests.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,17 @@ jobs:
2020
python-version: ["3.10", "3.11", "3.12"]
2121
os: [ubuntu-latest, windows-latest, macos-latest]
2222
experimental: [false]
23+
test-suite: ["unit-all-except-dapr", "dapr"]
24+
exclude:
25+
- python-version: "3.10"
26+
os: macos-latest
27+
- python-version: "3.11"
28+
os: macos-latest
2329
include:
2430
- python-version: "3.13"
2531
os: "ubuntu-latest"
2632
experimental: true
33+
test-suite: "unit-all-except-dapr"
2734
env:
2835
UV_PYTHON: ${{ matrix.python-version }}
2936
permissions:
@@ -40,14 +47,24 @@ jobs:
4047
enable-cache: true
4148
cache-suffix: ${{ runner.os }}-${{ matrix.python-version }}
4249
cache-dependency-glob: "**/uv.lock"
43-
- name: Install the project
50+
- name: Install the project (all extras)
51+
if: matrix.test-suite == 'unit-all-except-dapr'
4452
run: uv sync --all-extras --dev -U --prerelease=if-necessary-or-explicit
45-
- name: Test with pytest
53+
- name: Install the project (dapr tests)
54+
if: matrix.test-suite == 'dapr'
55+
run: uv sync --extra pandas --dev -U --prerelease=if-necessary-or-explicit && uv pip install "dapr>=1.14.0" "dapr-ext-fastapi>=1.14.0" "flask-dapr>=1.14.0"
56+
- name: Test with pytest (all except dapr)
57+
if: matrix.test-suite == 'unit-all-except-dapr'
4658
env:
4759
PYTHON_GIL: ${{ matrix.gil }}
48-
run: uv run --frozen pytest --junitxml=pytest.xml ./tests/unit
60+
run: uv run --frozen pytest --junitxml=pytest.xml ./tests/unit --ignore=tests/unit/processes/dapr_runtime
61+
- name: Test dapr with pytest
62+
if: matrix.test-suite == 'dapr'
63+
env:
64+
PYTHON_GIL: ${{ matrix.gil }}
65+
run: uv run --frozen pytest --junitxml=pytest-dapr.xml ./tests/unit/processes/dapr_runtime
4966
- name: Surface failing tests
50-
if: ${{ !matrix.experimental }}
67+
if: ${{ !matrix.experimental && matrix.test-suite == 'unit-all-except-dapr' }}
5168
uses: pmeier/pytest-results-action@v0.7.2
5269
with:
5370
path: python/pytest.xml

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"esbenp.prettier-vscode",
99
"dbaeumer.vscode-eslint",
1010
"ms-semantic-kernel.semantic-kernel",
11-
"ms-java.vscode-java-pack",
11+
"vscjava.vscode-java-pack",
1212
"ms-azuretools.vscode-dapr"
1313
]
1414
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Semantic Kernel is a model-agnostic SDK that empowers developers to build, orche
2525
- **Agent Framework**: Build modular AI agents with access to tools/plugins, memory, and planning capabilities
2626
- **Multi-Agent Systems**: Orchestrate complex workflows with collaborating specialist agents
2727
- **Plugin Ecosystem**: Extend with native code functions, prompt templates, OpenAPI specs, or Model Context Protocol (MCP)
28-
- **Vector DB Support**: Seamless integration with [Azure AI Search](https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search), [Elasticsearch](https://www.elastic.co/), [Chroma](https://docs.trychroma.com/getting-started), and more
28+
- **Vector DB Support**: Seamless integration with [Azure AI Search](https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search), [Elasticsearch](https://www.elastic.co/), [Chroma](https://docs.trychroma.com/docs/overview/getting-started), and more
2929
- **Multimodal Support**: Process text, vision, and audio inputs
3030
- **Local Deployment**: Run with [Ollama](https://ollama.com/), [LMStudio](https://lmstudio.ai/), or [ONNX](https://onnx.ai/)
3131
- **Process Framework**: Model complex business processes with a structured workflow approach

0 commit comments

Comments
 (0)