Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
},
"category": "Developer Tools"
},
{
"name": "mcp-tasks",
"source": {
"source": "local",
"path": "./polyfills/tasks/codex/plugin"
},
"policy": {
"installation": "AVAILABLE"
},
"category": "Developer Tools"
},
{
"name": "ard-discovery",
"source": {
Expand Down
6 changes: 6 additions & 0 deletions .github/plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
"version": "0.1.0",
"source": "./polyfills/events/copilot/plugin"
},
{
"name": "mcp-tasks",
"description": "MCP Tasks (SEP-2663): start long-running tools, follow their progress and answer task questions in an interactive Copilot terminal.",
"version": "0.1.0",
"source": "./polyfills/tasks/copilot/plugin"
},
{
"name": "mcp-server-cards",
"description": "MCP Server Cards (SEP-2127): Copilot finds the MCP servers a domain publishes, checks their Server Cards, and adds one to its configuration once you approve it in a form",
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/a2a-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: A2A delegation
on:
push:
paths:
- 'polyfills/a2a/**'
- 'polyfills/tasks/**'
- 'polyfills/server-cards/antigravity/src/gate.ts'
- '.github/workflows/a2a-test.yml'
pull_request:
paths:
- 'polyfills/a2a/**'
- 'polyfills/tasks/**'
- 'polyfills/server-cards/antigravity/src/gate.ts'
- '.github/workflows/a2a-test.yml'
permissions:
contents: read
jobs:
client:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
timeout-minutes: 12
defaults:
run:
working-directory: polyfills/a2a
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 22
- run: pipx install uv==0.11.16
- run: uv sync --locked --python 3.12 --extra setup
- run: .venv/bin/python -m unittest discover -s tests -v
- name: Verify checkout installation and removal in a fresh profile
run: |
export CODEX_HOME="$RUNNER_TEMP/a2a-codex"
./install codex --name demo --url https://agent.example.org
./install codex --name demo --url https://agent.example.org
./install codex --name demo --remove
- name: Verify the two-question replay with official A2A Serve
run: |
mkdir -p "$RUNNER_TEMP/serve"
cd "$RUNNER_TEMP/serve"
curl --fail --silent --show-error --location --retry 3 -o serve.tgz \
https://github.com/a2aproject/a2a-serve/releases/download/v0.1.0/a2a-serve_0.1.0_linux_amd64.tar.gz
echo 'b2a07326990f89027cb00337e8976e035e0b6c740c6e8557ece94a21ac1ebcb4 serve.tgz' | sha256sum --check
tar -xzf serve.tgz
cd "$GITHUB_WORKSPACE/polyfills/a2a"
.venv/bin/python tests/interop/serve.py "$RUNNER_TEMP/serve/a2a-serve"
- run: uv build --wheel --out-dir "$RUNNER_TEMP/dist"
12 changes: 6 additions & 6 deletions .github/workflows/codex-tasks-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ on:
branches: ["**"]
paths:
- "polyfills/tasks/**"
- ".agents/plugins/marketplace.json"
- "tools/bundle-notices.mjs"
- ".github/workflows/codex-tasks-test.yml"
# Pull requests from forks; a branch of this repository is checked by its
# pushes (see each job's `if`), so each change runs once.
pull_request:
paths:
- "polyfills/tasks/**"
- ".agents/plugins/marketplace.json"
- "tools/bundle-notices.mjs"
- ".github/workflows/codex-tasks-test.yml"

Expand Down Expand Up @@ -108,7 +110,7 @@ jobs:
grep -q 'None of your MCP servers offers the Tasks extension' "$RUNNER_TEMP/out.jsonl"

codex:
name: codex plugin add, from a marketplace holding this folder
name: codex plugin add, from the AgentPolyfill marketplace
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
Expand All @@ -124,11 +126,9 @@ jobs:
env:
CODEX_HOME: ${{ runner.temp }}/codex-home
run: |
mkdir -p "$CODEX_HOME" "$RUNNER_TEMP/mkt/.agents/plugins"
cp -R plugin "$RUNNER_TEMP/mkt/mcp-tasks-plugin"
printf '%s' '{"name":"ci","owner":{"name":"ci"},"plugins":[{"name":"mcp-tasks","source":{"source":"local","path":"./mcp-tasks-plugin"},"policy":{"installation":"AVAILABLE"},"category":"Developer Tools"}]}' > "$RUNNER_TEMP/mkt/.agents/plugins/marketplace.json"
codex plugin marketplace add "$RUNNER_TEMP/mkt"
codex plugin add mcp-tasks@ci
mkdir -p "$CODEX_HOME"
codex plugin marketplace add "$GITHUB_WORKSPACE"
codex plugin add mcp-tasks@agent-polyfill
codex mcp list | tee "$RUNNER_TEMP/mcp.txt"
grep -q 'mcp-tasks' "$RUNNER_TEMP/mcp.txt"
grep -q 'dist/helper.js' "$RUNNER_TEMP/mcp.txt"
12 changes: 11 additions & 1 deletion .github/workflows/hermes-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
branches: ["**"]
paths:
- "polyfills/*/hermes/**"
- "polyfills/tasks/core/**"
- "polyfills/events/core/**"
- "polyfills/skills/core/**"
- "polyfills/skills/codex/src/**"
Expand All @@ -27,6 +28,7 @@ on:
pull_request:
paths:
- "polyfills/*/hermes/**"
- "polyfills/tasks/core/**"
- "tools/hermes/**"
- ".github/workflows/hermes-test.yml"

Expand All @@ -53,9 +55,16 @@ jobs:
node-version: 22
- name: Dependencies
run: |
for d in polyfills/events/core polyfills/skills/core polyfills/skills/codex polyfills/server-cards/codex polyfills/events/hermes polyfills/skills/hermes polyfills/server-cards/hermes polyfills/ard/hermes; do
for d in polyfills/events/core polyfills/skills/core polyfills/skills/codex polyfills/server-cards/codex polyfills/events/hermes polyfills/skills/hermes polyfills/server-cards/hermes polyfills/ard/hermes polyfills/tasks/core polyfills/tasks/hermes; do
(cd "$d" && npm ci --no-audit --no-fund)
done
- name: Tasks helper
working-directory: polyfills/tasks/hermes
run: |
npm run typecheck
npm run build
git diff --exit-code -- plugin
node ../../../tools/bundle-notices.mjs . --plugin plugin --entry src/helper.ts --bundle dist/helper.mjs --check
- name: Shared Python modules
run: python3 -m unittest discover -s tools/hermes/shared -p 'test_*.py' -v
- name: Events
Expand Down Expand Up @@ -110,3 +119,4 @@ jobs:
(cd polyfills/skills/hermes && "$HERMES_PYTHON" test/e2e_test.py -v)
(cd polyfills/server-cards/hermes && python3 ../../../tools/hermes/run_card_e2e.py)
(cd polyfills/ard/hermes && python3 ../../../tools/hermes/run_card_e2e.py)
(cd polyfills/tasks/hermes && python3 test/gateway.py)
50 changes: 50 additions & 0 deletions .github/workflows/pi-tasks-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Pi MCP Tasks
on:
push:
paths:
- 'polyfills/tasks/**'
- 'polyfills/events/pi/**'
- 'tools/bundle-notices.mjs'
- '.github/workflows/pi-tasks-test.yml'
pull_request:
paths:
- 'polyfills/tasks/**'
- 'polyfills/events/pi/**'
- 'tools/bundle-notices.mjs'
- '.github/workflows/pi-tasks-test.yml'
permissions:
contents: read
jobs:
pi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 22
- run: npm ci --prefix polyfills/tasks/core
- run: npm ci --prefix polyfills/events/pi
- run: npm ci --prefix polyfills/tasks/pi
- run: npm run typecheck --prefix polyfills/tasks/pi
- run: node tools/bundle-notices.mjs polyfills/tasks/pi --plugin extension --entry src/index.ts --check
- name: Install the independent Tasks test server
run: |
python3 -m venv "$RUNNER_TEMP/fastmcp"
"$RUNNER_TEMP/fastmcp/bin/python" -m pip install --quiet --require-hashes \
-r polyfills/tasks/codex/test/interop/requirements.txt
- name: Check the packaged extension in isolated Pi sessions
run: |
test_root=$(mktemp -d)
trap 'rm -rf "$test_root"' EXIT
mkdir -p "$test_root/bin" "$test_root/home" "$test_root/tmp" "$test_root/config" "$test_root/data" "$test_root/cache" "$test_root/state"
ln -s "$(command -v node)" "$test_root/bin/node"
cd polyfills/tasks/pi
env -i HOME="$test_root/home" TMPDIR="$test_root/tmp" PATH="$test_root/bin" \
XDG_CONFIG_HOME="$test_root/config" XDG_DATA_HOME="$test_root/data" \
XDG_CACHE_HOME="$test_root/cache" XDG_STATE_HOME="$test_root/state" \
node --test --no-warnings --test-concurrency=1 'test/*-test.ts'
env -i HOME="$test_root/home" TMPDIR="$test_root/tmp" PATH="$test_root/bin" \
XDG_CONFIG_HOME="$test_root/config" XDG_DATA_HOME="$test_root/data" \
XDG_CACHE_HOME="$test_root/cache" XDG_STATE_HOME="$test_root/state" \
MCP_TASKS_INTEROP_PYTHON="$RUNNER_TEMP/fastmcp/bin/python" \
node --test --no-warnings test/interop/fastmcp-test.ts
44 changes: 44 additions & 0 deletions .github/workflows/tasks-host-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: MCP Tasks for Copilot and OpenCode
on:
push:
paths:
- 'polyfills/tasks/**'
- 'polyfills/events/copilot/src/**'
- 'polyfills/events/opencode/src/**'
- 'tools/opencode/**'
- 'tools/bundle-notices.mjs'
- '.github/workflows/tasks-host-test.yml'
pull_request:
paths:
- 'polyfills/tasks/**'
- 'polyfills/events/copilot/src/**'
- 'polyfills/events/opencode/src/**'
- 'tools/opencode/**'
- 'tools/bundle-notices.mjs'
- '.github/workflows/tasks-host-test.yml'
permissions:
contents: read
jobs:
adapter:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
strategy:
matrix:
host: [copilot, opencode]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 22
- run: npm ci --prefix polyfills/tasks/core
- run: npm ci --prefix polyfills/tasks/${{ matrix.host }}
- if: matrix.host == 'opencode'
run: npm ci --prefix tools/opencode
- run: npm run typecheck --prefix polyfills/tasks/${{ matrix.host }}
- run: npm run build --prefix polyfills/tasks/${{ matrix.host }}
- run: git diff --exit-code -- polyfills/tasks/${{ matrix.host }}/plugin
- if: matrix.host == 'copilot'
run: node tools/bundle-notices.mjs polyfills/tasks/copilot --plugin plugin --entry src/extension.ts --bundle extensions/mcp-tasks/extension.mjs --check
- if: matrix.host == 'opencode'
run: node tools/bundle-notices.mjs polyfills/tasks/opencode --plugin plugin --entry src/server.ts --bundle server.js --check
- run: npm test --prefix polyfills/tasks/${{ matrix.host }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Select a host adapter for its install commands, examples and limits.
| [**Events**](https://agentpolyfill.com/guide/events) | Wake an idle agent when a deployment fails. | [Claude Code](polyfills/events/claude-code) · [Codex](polyfills/events/codex) · [Pi](polyfills/events/pi) · [OpenCode](polyfills/events/opencode) · [Antigravity](polyfills/events/antigravity) · [Copilot CLI](polyfills/events/copilot) · [Hermes](polyfills/events/hermes) · [T3 Code](polyfills/events/t3) |
| [**Skills**](https://agentpolyfill.com/guide/skills) | Load a skill from Hugging Face to choose a model quantization. | [Codex](polyfills/skills/codex) · [Pi](polyfills/skills/pi) · [OpenCode](polyfills/skills/opencode) · [Antigravity](polyfills/skills/antigravity) · [Hermes](polyfills/skills/hermes) |
| [**Server Cards**](https://agentpolyfill.com/guide/server-cards) | Find the MCP servers published by `neon.com` and add Neon Docs. | [Claude Code](polyfills/server-cards/claude-code) · [Codex](polyfills/server-cards/codex) · [Cursor IDE](polyfills/server-cards/codex/README.md#cursor-ide) · [Pi](polyfills/server-cards/pi) · [OpenCode](polyfills/server-cards/opencode) · [Antigravity](polyfills/server-cards/antigravity) · [Copilot CLI](polyfills/server-cards/copilot) · [Hermes](polyfills/server-cards/hermes) |
| [**A2A delegation**](polyfills/a2a) | Delegate work to a configured Agent2Agent peer, answer its questions, and receive the result in the same chat. | [Setup and verified host surfaces](polyfills/a2a#host-verification) |
| [**Tasks**](polyfills/tasks/core) | Run an MCP tool in the background and return when it needs input or finishes. | [Host adapters and native support](polyfills/tasks/host-coverage.md) |
| [**ARD**](https://agentpolyfill.com/guide/ard) | Find Buildkite’s MCP server by domain or search an ARD registry. | [Claude Code](polyfills/ard/claude-code) · [Codex](polyfills/ard/codex) · [Pi](polyfills/ard/pi) · [OpenCode](polyfills/ard/opencode) · [Antigravity](polyfills/ard/antigravity) · [Copilot CLI](polyfills/ard/copilot) · [Hermes](polyfills/ard/hermes) |

Agentic Resource Discovery (ARD) is a separate draft protocol. Its plugin asks before sending your query to a registry.
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "agent-polyfill",
"private": true,
"description": "This repository as a Pi package: `pi install git:github.com/idosal/AgentPolyfill` installs the Pi forms of Events, Skills and Server Cards. ARD is installed on its own, from a clone.",
"description": "This repository as a Pi package: `pi install git:github.com/idosal/AgentPolyfill` installs the Pi forms of Events, Skills, Server Cards and Tasks. ARD is installed on its own, from a clone.",
"license": "Apache-2.0",
"repository": "github:idosal/AgentPolyfill",
"pi": {
"extensions": [
"./polyfills/events/pi/extension/dist/index.js",
"./polyfills/skills/pi/extension/dist/index.js",
"./polyfills/server-cards/pi/extension/dist/index.js"
"./polyfills/server-cards/pi/extension/dist/index.js",
"./polyfills/tasks/pi/extension/dist/index.js"
],
"skills": [],
"prompts": [],
Expand Down
6 changes: 6 additions & 0 deletions polyfills/a2a/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__pycache__/
.ruff_cache/
*.egg-info/
.venv/
build/
dist/
Loading