Files
LangBot/.github/workflows/plugins-runner-tests.yml
T
532b8ce204 feat(agent): add cross-platform interactive cards for QQ, WeCom, Feishu and DingTalk (#2787)
* feat(agent): add cross-platform interactive card tool

* fix(agent): create pipelines with selected runner defaults

* fix(agent): enable reliable cross-platform card interactions

* feat(dingtalk): deliver A2UI cards and restore agent replies

* Fix DingTalk A2UI form submissions and agent replies

* Restore LangBot branding on DingTalk A2UI cards

* Use compatible Markdown link in DingTalk A2UI branding

* Place LangBot branding above DingTalk card content

* Stream DingTalk replies without a source message

* Move DingTalk branding into compact card footer

* fix(wecombot): handle native select card callbacks

* fix(wecombot): stream replies after HITL cards

* fix(dingtalk): show submitted HITL choices in cards

* fix(lark): stream replies after HITL submissions

* fix(plugins): refresh LocalAgent source hashes

* fix(dify): merge HITL resume streaming into in-tree plugin

* feat(interactions): resume runner in place after card submission

* fix(interactions): respect live adapter APIs and preserve deadlines

* fix(ci): lock blocking interaction SDK for dependent checks

* test(runner): keep legacy SDK probe importable

* fix(interactions): align adapter manifests and close timed-out streams

* fix(agent): avoid duplicate replies and enable LocalAgent cards

* chore(plugins): sync LocalAgent catalog version

* refactor(agent): unify blocking interaction callbacks and adapters

* chore(deps): pin blocking interaction SDK revision

* test(agent): remove obsolete async fixture mark

* test(interaction): update legacy admission assertions

* fix(qqofficial): keep card callbacks responsive

* fix(runner): keep blocking card interactions alive

* ci(plugins): expect SDK 0.7.20 in Runner workflows

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

* ci(plugins): test coding Runners against SDK 0.7.20

Claude Code and Codex now call ctx.request_interaction, first released in 0.7.20.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

* fix(discord): deliver guild interaction cards to the originating channel

Pipeline group conversations are keyed by guild id, so send_interaction
targeted the guild and Discord returned Unknown Channel. Resolve the channel
from the message being answered, edit cards in that channel, and report the
card's conversation on callbacks so the Host scope check matches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

---------

Co-authored-by: RockChinQ <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
2026-11-03 21:45:49 +08:00

86 lines
4.2 KiB
YAML

name: Plugins / Runner tests
on:
push:
paths:
- "plugins/pytest.ini"
- "plugins/Runner/**"
- ".github/workflows/plugins-runner-tests.yml"
pull_request:
paths:
- "plugins/pytest.ini"
- "plugins/Runner/**"
- ".github/workflows/plugins-runner-tests.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: plugins/Runner
steps:
- name: Checkout plugins
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Keep environment outside the checkout
run: |
printf 'UV_PROJECT_ENVIRONMENT=%s/runner-venv\n' "$RUNNER_TEMP" >> "$GITHUB_ENV"
printf 'RUNNER_EVIDENCE_DIR=%s/runner-evidence\n' "$RUNNER_TEMP" >> "$GITHUB_ENV"
- name: Install dependencies
run: uv sync --locked --dev
- name: Verify SDK snapshot
run: uv run --no-sync python -c 'from importlib.metadata import version; assert version("langbot-plugin") == "0.7.20"; print("langbot-plugin", version("langbot-plugin"))'
- name: Prepare isolated certified coding Runner SDK environment
run: |
uv venv "$RUNNER_TEMP/coding-sdk"
# Coding Runners call ctx.request_interaction, first released in SDK 0.7.20.
uv pip install --python "$RUNNER_TEMP/coding-sdk/bin/python" \
'langbot-plugin==0.7.20' \
-r acp-agent-runner/requirements.txt -r claude-code-agent/requirements.txt -r codex-agent/requirements.txt pytest pyyaml packaging
"$RUNNER_TEMP/coding-sdk/bin/python" -c 'from importlib.metadata import version; assert version("langbot-plugin") == "0.7.20"'
printf 'CODING_RUNNER_TEST_PYTHON=%s/coding-sdk/bin/python\n' "$RUNNER_TEMP" >> "$GITHUB_ENV"
- name: Prepare isolated LocalAgent environment with the latest stable SDK
run: |
UV_PROJECT_ENVIRONMENT="$RUNNER_TEMP/localagent-latest" uv sync --project LocalAgent --extra dev --upgrade-package langbot-plugin
"$RUNNER_TEMP/localagent-latest/bin/python" -c 'from importlib.metadata import version; print("langbot-plugin", version("langbot-plugin")); from inspect import signature; from langbot_plugin.api.entities.builtin.runner.context import RunnerContext; assert "paths" in signature(RunnerContext.export_box_files).parameters'
printf 'LOCALAGENT_TEST_PYTHON=%s/localagent-latest/bin/python\n' "$RUNNER_TEMP" >> "$GITHUB_ENV"
# Preserve the external Runner lint scope; LocalAgent has its own Ruff config.
# RunnerDemo did not have a Ruff gate before consolidation.
- name: Ruff check
run: uv run --no-sync ruff check tests http-certification-tests ./*-agent acp-agent-runner
- name: Ruff format check
run: uv run --no-sync ruff format --check tests http-certification-tests ./*-agent acp-agent-runner
- name: LocalAgent Ruff check
run: uv run --no-sync ruff check LocalAgent
- name: LocalAgent Ruff format check
run: uv run --no-sync ruff format --check LocalAgent
- name: All Runner tests, including isolated plugin suites (LocalAgent, RunnerDemo, shared agents)
run: uv run --no-sync python -m pytest --junitxml="${RUNNER_EVIDENCE_DIR}/runner.xml"
# Generic pkg/test module names require a fresh pytest interpreter.
- name: HTTP Runner certification regressions
run: uv run --no-sync python -m pytest http-certification-tests -q --junitxml="${RUNNER_EVIDENCE_DIR}/http-certification.xml"
- name: Certified RunnerDemo SDK admission and package tests
run: |
"$RUNNER_TEMP/coding-sdk/bin/python" certification-tests/test_runner_demo_dependency_admission.py -v
cd RunnerDemo
"$RUNNER_TEMP/coding-sdk/bin/python" -m unittest discover -s tests -v
- name: Upload test evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: runner-test-evidence
path: ${{ runner.temp }}/runner-evidence
if-no-files-found: warn