feat(executor): implement the OpenCode agent-server adapter

OpenCode is an agent server, not an OpenAI endpoint. Add a session/
message client over the established curl transport that implements
ModelTransport, so the strict proposal parser, facts and review are
reused. The probe enforces the loopback/TLS transport policy, pins the
resolved address, supports basic auth, checks HTTP status before parsing,
and reports truthful connection states (ready is reserved for a validated
response). Accept only completed assistant text parts and delete the
transient session on every path. Tests cover endpoint/policy, auth, a
misleading 500, credential non-leakage and the request shape.
This commit is contained in:
Phoebus 2026-09-22 02:36:22 -07:00
parent 33afdaac9a
commit 565521564c
3 changed files with 1563 additions and 347 deletions

View file

@ -18,6 +18,7 @@ pub mod kernel;
pub mod log;
pub mod nix;
pub mod opencode;
pub mod opencode_client;
pub mod opencode_server;
pub mod portage;
pub mod probe;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff