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:
parent
33afdaac9a
commit
565521564c
3 changed files with 1563 additions and 347 deletions
|
|
@ -18,6 +18,7 @@ pub mod kernel;
|
||||||
pub mod log;
|
pub mod log;
|
||||||
pub mod nix;
|
pub mod nix;
|
||||||
pub mod opencode;
|
pub mod opencode;
|
||||||
|
pub mod opencode_client;
|
||||||
pub mod opencode_server;
|
pub mod opencode_server;
|
||||||
pub mod portage;
|
pub mod portage;
|
||||||
pub mod probe;
|
pub mod probe;
|
||||||
|
|
|
||||||
1041
installer-rs/crates/phoebus-executor/src/opencode_client.rs
Normal file
1041
installer-rs/crates/phoebus-executor/src/opencode_client.rs
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue