refactor(orka): remove the harness v1 Orka protocol

Abierto
#69 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github-actions, go, markdown, python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Python
Estrellas
7
Forks
5
Merge medio
3 h 39 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de orka-agents/agentkit

Todos los issues de orka-agents/agentkit

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.