refactor(orka): remove the harness v1 Orka protocol

オープン
#69 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, go, markdown, python

調査の方向性

Wait until orka-agents/orka#568 merges, then read the listed removal steps and inspect the shared callers with git grep before deleting helpers. Start with the Python runtime, Go CLI/catalog, CI scripts, and docs named in the issue; run the specified git grep check and the listed test, lint, and e2e commands. Done means the grep is empty, v1 startup is rejected, and the required checks pass.

索引モデルが issue の本文から書いたものです。

説明

area/build area/orka area/runtime blocked enhancement

Start after orka-agents/orka#568 merges. That issue removes harness v1 from Orka. Removing it here first would break anyone still running an Orka that uses v1.

Problem

AgentKit can run under Orka in two ways. Orka calls each way a "harness":

  • Harness v1 (AGENTKIT_PROTOCOL=orka). AgentKit runs its own HTTP server, and Orka sends it work over HTTP with server-sent events. The code is runtimes/common/agentkit_serve_common/orka.py, about 1,800 lines.
  • Harness v2 (--protocol acp). Orka's supervisor starts AgentKit as a child process and talks to it over stdin and stdout using ACP, the Agent Client Protocol. The code is acp.py.

Orka is removing harness v1 completely, with no fallback (orka-agents/orka#568). After that, nothing calls AgentKit's v1 mode, but AgentKit will still:

  • ship and test about 1,800 lines of code that nothing uses;
  • explain how to set up v1 in the README, docs/orka.md and AGENTS.md, even though that setup fails against a current Orka;
  • offer agentkit render --target orka-agentruntime, which writes a contractVersion: orka.harness.v1 registration that Orka will reject;
  • run the orka-v1-conformance CI job (.github/workflows/ci.yml, around line 611). It runs Orka's TestExternalAgentKitServe test, which orka-agents/orka#568 deletes. The job breaks the next time we update the pinned Orka revision in test/orka-harness-v2/orka-revision.

What

Remove harness v1 support. ACP mode (harness v2) becomes the only way to run AgentKit under Orka. AGENTKIT_PROTOCOL=orka should then fail at startup with the normal unknown-protocol error.

Keep these. They look related but are still in use:

  • acp.py and everything it uses.
  • tool_errors.py (orka_tool_error_details). Despite the name, the MAF adapter and the Foundry code use it.
  • AGENTKIT_ORKA_OFFLINE_ECHO. ACP mode uses it too.
  • scripts/orka-harness-v2-e2e.sh and the v2 CI jobs.

Out of scope:

  • A render target for v2 registrations. File it separately if we want one. docs/orka.md already explains the v2 setup.
  • ACP, Foundry, and the openai and agentsessions protocols.
  • Any compatibility layer that quietly maps orka to something else.

Why

  • AgentKit offers one supported way to run under Orka, the same one Orka supports.
  • There is less to maintain: about 1,800 lines of runtime code plus its tests, parity checks, a CLI command and a CI job.
  • The docs stop pointing people at a setup that no longer works.

How

Work through the list below. Before deleting a shared helper, git grep for its other callers.

Python runtime

  1. Delete runtimes/common/agentkit_serve_common/orka.py and runtimes/common/tests/test_orka_protocol.py.
  2. runtimes/common/agentkit_serve_common/cli.py: remove orka from _PROTOCOLS (line 60), the create_orka_app import (line 54), the protocol == "orka" branches (around lines 126, 140 and 185), and the orka line in the module docstring.
  3. runtimes/common/agentkit_serve_common/parity.py: remove the v1 checks that import from .orka (around lines 343 and 362).
  4. runtimes/common/agentkit_serve_common/runtime.py: in offline_orka_echo_enabled() (line 29), change {"acp", "orka"} to only "acp".

Go build and CLI

  1. Delete pkg/agentkit/render/, whose only target is orka-agentruntime, and the render subcommand in cmd/frontend/main.go (line 16).
  2. pkg/agentkit/runtimes/catalog.go: remove CapabilityOrkaHarnessV1, CapabilityOrkaObservedTools and the reserved CapabilityOrkaBrokeredTools (lines 41 to 49) and their uses. Remove orka-harness-v1 and orka-observed-tools from runtimes/catalog/*.yaml. The catalog consistency test checks that the two stay in sync.
  3. pkg/agentkit2llb/agent/image.go: remove orka from imageProtocols (line 19) and stop writing the ai.orka.harness.version image label (lines 20 and 68). Remove ImageLabelOrkaHarnessVersion from pkg/agentkit/config/labels.go. Orka never reads this label.

CI and scripts

  1. .github/workflows/ci.yml: delete the orka-v1-conformance job (around line 611). In the Smoke test built agent images step of the container-build job, remove the AGENTKIT_PROTOCOL=orka checks (around lines 405 to 500) and keep the rest.
  2. scripts/parity-container-smoke.sh: remove the v1 request (around line 108).

Docs

  1. README.md: remove the AGENTKIT_PROTOCOL=orka example (line 78), the orka row of the protocol table (line 93), the agentkit render example and v1 JSON examples (lines 97 to 126), and the offline v1 smoke paragraph (around line 138). Keep the harness v2 paragraph. Update the docs/orka.md link description (line 412).
  2. docs/orka.md: delete the v1 sections from "Harness v1 observed mode" (line 180) to the end of the file. Before deleting "Offline Orka conformance/demo mode", move any part that still applies to ACP mode into the v2 sections.
  3. Remove v1 mentions from docs/architecture.md (around lines 141 to 170), docs/runtime-adapters.md (lines 18 and 66) and docs/runtime-capabilities.md (line 25).
  4. AGENTS.md: the "Orka harness protocol" section only describes v1 (/v1/turns, StartTurnRequest, contextRefs, input.env). Replace it with the rules that apply to ACP mode, checked against acp.py, or with a short pointer to docs/orka.md.

To check that nothing is left, run this. It should print nothing:

git grep -n -iE 'orka\.harness\.v1|AGENTKIT_PROTOCOL=orka|orka-harness-v1|orka-observed-tools|create_orka_app|orka-agentruntime'

Done when

  • AGENTKIT_PROTOCOL=orka and --protocol orka fail at startup with the unknown-protocol error.
  • The git grep above prints nothing.
  • bash scripts/orka-harness-v2-e2e.sh offline <adapter> passes for pydantic-ai and microsoft-agent-framework. langgraph behaves the same as before; its known failure is #47.
  • uv run --directory runtimes/common --extra dev pytest -q, go test ./..., make lint and go run github.com/rhysd/actionlint/cmd/[email protected] .github/workflows/*.yml pass.
主要言語
Python
スター
7
フォーク
5
平均マージ
3時間 39分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

orka-agents/agentkit のほかの issue

orka-agents/agentkit の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。