Compare commits

...

1 Commits

Author SHA1 Message Date
Pat Sukprasert 2455be533d fix(server): seed goose-native-ui and hermes-native-ui default agents
_ensure_default_agents in server/app.py seeded 9 of the 11 native-ui agents
declared in the harness registry (harness_plugins.native_agents) — goose and
hermes were added to the registry but their startup seeders were never wired
in. So `GET /v1/agents` never listed goose-native-ui / hermes-native-ui, and
anything resolving a native agent by that name (the harness bench, and any
head that relies on the built-in row) failed with "not auto-registered".

Add the two missing seeder pairs (_build_*_native_bundle + _ensure_default_*
_agent), mirroring the kiro pattern exactly, and call them from
_ensure_default_agents. goose/hermes have the required _materialize_*_agent_spec
functions already; only the app.py wiring was missing.

Verified: with this change both goose-native and hermes-native get PAST agent
registration in the harness bench (they now reach terminal provisioning, where
each hits a separate downstream issue — hermes a lazy-chat/first-turn gate,
goose a terminal-ensure 500 — tracked separately). test_native_coding_agents
passes; ruff clean.

Note: the per-harness hardcoded seeder list is itself the seam — a native
plugin is invisible until hand-added here. Making _ensure_default_agents
iterate native_agents() from the registry (which already includes plugins) is
the follow-up that would close it.
2026-07-06 16:06:21 +08:00
+62
View File
@@ -28,6 +28,8 @@ from omnigent.harness_plugins import (
CLAUDE_NATIVE_CODING_AGENT,
CODEX_NATIVE_CODING_AGENT,
CURSOR_NATIVE_CODING_AGENT,
GOOSE_NATIVE_CODING_AGENT,
HERMES_NATIVE_CODING_AGENT,
KIMI_NATIVE_CODING_AGENT,
KIRO_NATIVE_CODING_AGENT,
OPENCODE_NATIVE_CODING_AGENT,
@@ -148,6 +150,8 @@ _PI_NATIVE_AGENT_NAME = PI_NATIVE_CODING_AGENT.agent_name
_OPENCODE_NATIVE_AGENT_NAME = OPENCODE_NATIVE_CODING_AGENT.agent_name
_CURSOR_NATIVE_AGENT_NAME = CURSOR_NATIVE_CODING_AGENT.agent_name
_KIRO_NATIVE_AGENT_NAME = KIRO_NATIVE_CODING_AGENT.agent_name
_GOOSE_NATIVE_AGENT_NAME = GOOSE_NATIVE_CODING_AGENT.agent_name
_HERMES_NATIVE_AGENT_NAME = HERMES_NATIVE_CODING_AGENT.agent_name
_ANTIGRAVITY_NATIVE_AGENT_NAME = ANTIGRAVITY_NATIVE_CODING_AGENT.agent_name
_QWEN_NATIVE_AGENT_NAME = QWEN_NATIVE_CODING_AGENT.agent_name
_KIMI_NATIVE_AGENT_NAME = KIMI_NATIVE_CODING_AGENT.agent_name
@@ -431,6 +435,8 @@ def _ensure_default_agents(
_ensure_default_opencode_agent(agent_store, artifact_store, agent_cache)
_ensure_default_cursor_agent(agent_store, artifact_store, agent_cache)
_ensure_default_kiro_agent(agent_store, artifact_store, agent_cache)
_ensure_default_goose_agent(agent_store, artifact_store, agent_cache)
_ensure_default_hermes_agent(agent_store, artifact_store, agent_cache)
_ensure_default_antigravity_agent(agent_store, artifact_store, agent_cache)
_ensure_default_qwen_agent(agent_store, artifact_store, agent_cache)
_ensure_default_kimi_native_agent(agent_store, artifact_store, agent_cache)
@@ -752,6 +758,62 @@ def _ensure_default_kiro_agent(
)
def _build_goose_native_bundle() -> bytes:
"""Build a gzipped tarball of the goose-native-ui agent spec."""
import tempfile
from omnigent.goose_native import _materialize_goose_agent_spec
from omnigent.spec import materialize_bundle
with tempfile.TemporaryDirectory() as tmpdir:
spec_path = _materialize_goose_agent_spec(Path(tmpdir))
bundle_dir = materialize_bundle(spec_path, Path(tmpdir) / "bundle")
return _tar_gz_dir(bundle_dir)
def _ensure_default_goose_agent(
agent_store: AgentStore,
artifact_store: ArtifactStore,
agent_cache: Any,
) -> None:
"""Register or refresh the goose-native-ui agent."""
_ensure_builtin_agent(
agent_store,
artifact_store,
agent_cache,
name=_GOOSE_NATIVE_AGENT_NAME,
bundle_bytes=_build_goose_native_bundle(),
)
def _build_hermes_native_bundle() -> bytes:
"""Build a gzipped tarball of the hermes-native-ui agent spec."""
import tempfile
from omnigent.hermes_native import _materialize_hermes_agent_spec
from omnigent.spec import materialize_bundle
with tempfile.TemporaryDirectory() as tmpdir:
spec_path = _materialize_hermes_agent_spec(Path(tmpdir))
bundle_dir = materialize_bundle(spec_path, Path(tmpdir) / "bundle")
return _tar_gz_dir(bundle_dir)
def _ensure_default_hermes_agent(
agent_store: AgentStore,
artifact_store: ArtifactStore,
agent_cache: Any,
) -> None:
"""Register or refresh the hermes-native-ui agent."""
_ensure_builtin_agent(
agent_store,
artifact_store,
agent_cache,
name=_HERMES_NATIVE_AGENT_NAME,
bundle_bytes=_build_hermes_native_bundle(),
)
def _ensure_default_antigravity_agent(
agent_store: AgentStore,
artifact_store: ArtifactStore,