type Host struct{}
func (Host) WriteWorkspace(workdir string, allowedTools []string, cfg host.WorkspaceConfig) error {
// Write host-specific config files into the workspace.
// For a Batch host, this can be a no-op (return nil).
return nil
}
func (Host) Bootstrap(task, baseBranch, contract string) host.BootstrapResult {
// Return the task file name and initial prompt.
// FileName can be "" if the host doesn't use file-based contracts.
return host.BootstrapResult{
FileName: "", // or "TASK.md", etc.
InitialPrompt: "Execute: " + task,
}
}
func (Host) BuildBatchCommand(prompt, model, resumeToken string) host.CommandSpec {
return host.CommandSpec{
Command: "your-cli",
Args: []string{"--prompt", prompt},
}
}
func (Host) ParseBatchOutput(stdout []byte, waitErr error) (host.Result, error) {
// Parse your CLI's output into a host.Result.
return host.Result{Output: string(stdout)}, nil
}
func (Host) StartStream(workdir, model, logPath string) (host.StreamSession, error) {
// Return ErrStreamNotSupported for Batch-only hosts.
return nil, host.ErrStreamNotSupported
}
func (Host) Capabilities() host.Capabilities {
return host.Capabilities{
Stream: false,
AgentMCP: false,
ToolPermissions: false,
ResumeToken: false,
}
}