pub struct OpenCodeAdapter;Trait Implementations§
Source§impl HarnessAdapter for OpenCodeAdapter
impl HarnessAdapter for OpenCodeAdapter
Source§fn label(&self) -> &'static str
fn label(&self) -> &'static str
The kebab-case identifier used in CLI flags,
dispatch.json, and the
staged conditions.json.Source§fn skills_dir(&self, repo_root: &Path) -> PathBuf
fn skills_dir(&self, repo_root: &Path) -> PathBuf
The project-local directory staged skills live under for this harness.
Source§fn rewrites_frontmatter_name(&self) -> bool
fn rewrites_frontmatter_name(&self) -> bool
Whether a staged skill’s frontmatter
name: is rewritten to its slug so
the harness’s repo-local discovery resolves the staged copy.Source§fn advertises_staged_slug_name(&self) -> bool
fn advertises_staged_slug_name(&self) -> bool
Whether the skill-under-test is advertised in the available-skills block
under its staged slug (vs. its natural name). True for Codex, whose
repo-local discovery keys on the rewritten frontmatter name. (OpenCode
also rewrites the frontmatter to the slug yet still advertises the natural
name — a known inconsistency tracked for a separate fix.)
Source§fn render_available_skills_block(&self, skills: &[AvailableSkill]) -> String
fn render_available_skills_block(&self, skills: &[AvailableSkill]) -> String
Render the discoverable skills the way this harness natively surfaces
them (e.g. Claude Code’s Skill-tool list, Codex’s
## Skills, OpenCode’s
<available_skills> XML).Source§fn skill_surface_phrase(&self) -> &'static str
fn skill_surface_phrase(&self) -> &'static str
How a staged skill is described as discoverable in the neutral
slug-disambiguation line (e.g. “via the Skill tool”).
Source§fn skill_unresolved_phrase(&self) -> &'static str
fn skill_unresolved_phrase(&self) -> &'static str
The lead-in for the fallback “read the skill from
<path>” instruction
when the staged identifier can’t be resolved.Source§fn plan_mode_profile(&self) -> &'static str
fn plan_mode_profile(&self) -> &'static str
The verbatim plan-mode procedure profile bundled for this harness.
Source§fn cli_next_steps(&self, ctx: CliDispatchContext<'_>) -> String
fn cli_next_steps(&self, ctx: CliDispatchContext<'_>) -> String
The
Next: guidance printed after run for a
Cli-dispatch harness: how to
dispatch each task through this harness’s one-shot CLI and then ingest.
Empty for in-session harnesses (their guidance is the mechanism’s, not the
adapter’s).Source§fn parse_transcript(&self, path: &Path) -> Result<Vec<ToolInvocation>>
fn parse_transcript(&self, path: &Path) -> Result<Vec<ToolInvocation>>
Parse a persisted transcript into its ordered tool invocations.
Source§fn parse_transcript_full(&self, path: &Path) -> Result<TranscriptSummary>
fn parse_transcript_full(&self, path: &Path) -> Result<TranscriptSummary>
Parse a persisted transcript into the full summary: tool invocations,
deduped token usage, duration, and final message text.
Source§fn install_guard(
&self,
_stage_root: &Path,
_workspace_root: &Path,
_guard_exe: &Path,
_ttl: Option<Duration>,
) -> Result<PathBuf>
fn install_guard( &self, _stage_root: &Path, _workspace_root: &Path, _guard_exe: &Path, _ttl: Option<Duration>, ) -> Result<PathBuf>
Arm the write guard using this harness’s native pre-tool hook surface,
returning the staged marker path.
Source§fn render_plan_mode_context(&self, profile_text: &str) -> String
fn render_plan_mode_context(&self, profile_text: &str) -> String
Wrap a plan-mode profile as a
<system-reminder> operating-context
layer. The default usually suffices.Source§fn cli_events_filename(&self) -> Option<&'static str>
fn cli_events_filename(&self) -> Option<&'static str>
For a
Cli-dispatch harness, the
filename (under a task’s outputs/ dir) its one-shot CLI writes the
transcript to. None when the harness dispatches in-session (no local
transcript) or has no Cli-mechanism transcript wired yet.Source§fn cli_model_flag(&self) -> Option<&'static str>
fn cli_model_flag(&self) -> Option<&'static str>
For a
Cli-dispatch harness, the
native model-selection flag accepted by the harness CLI. None means the
adapter has no model-selection support wired yet.Source§fn cli_manifest_section(
&self,
_ctx: CliManifestContext<'_>,
) -> Option<Vec<String>>
fn cli_manifest_section( &self, _ctx: CliManifestContext<'_>, ) -> Option<Vec<String>>
Extra
dispatch-manifest.md lines describing this harness’s Cli dispatch
recipe (command template, parallel recipe, ingest note). None when the
harness contributes no Cli-specific manifest section.Source§fn cli_judge_next_steps(&self, _ctx: CliJudgeContext) -> Option<String>
fn cli_judge_next_steps(&self, _ctx: CliJudgeContext) -> Option<String>
The post-
grade / post-ingest judge dispatch guidance for a
Cli-dispatch harness. None
leaves the generic in-session-style judge handoff in place.Auto Trait Implementations§
impl Freeze for OpenCodeAdapter
impl RefUnwindSafe for OpenCodeAdapter
impl Send for OpenCodeAdapter
impl Sync for OpenCodeAdapter
impl Unpin for OpenCodeAdapter
impl UnsafeUnpin for OpenCodeAdapter
impl UnwindSafe for OpenCodeAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more