Documentation
¶
Index ¶
- Variables
- func Account(ctx context.Context) base.Account
- func AgentExtras(source map[string]any) (map[string]any, []string)
- func ConfigInputs(workspace string) []string
- func Login(method string) (base.LoginFlow, error)
- func Models(ctx context.Context) ([]json.RawMessage, error)
- func New() base.Harness
- func OverlayPath() (string, error)
- func ReadLimits(ctx context.Context) base.LimitSnapshot
- func RenderMCP(entries mcp.Entries) ([]byte, []string, error)
- func RenderOverlay(values map[string]json.RawMessage) ([]byte, error)
- func Settings(ctx context.Context) (version string, values map[string]json.RawMessage, err error)
- func Support(event hooks.Event, handler hooks.Handler) hooks.Support
- func Validate(ctx context.Context, key string, value json.RawMessage) error
- type HookRenderer
- type Option
- type Setting
Constants ¶
This section is empty.
Variables ¶
var LoginMethods = []base.LoginMethod{
{ID: "anthropic", Label: "Claude Pro/Max"},
{ID: "openai-codex", Label: "ChatGPT Plus/Pro"},
{ID: "google-gemini-cli", Label: "Gemini CLI"},
{ID: "openrouter", Label: "OpenRouter"},
}
LoginMethods are the subscriptions OMP signs in to with a browser link. Each prints its link; the ones that redirect to localhost get the landed-on address replayed on the machine.
Functions ¶
func Account ¶ added in v0.14.1
Account lists the providers OMP can use: `omp models` lists only their models. OMP also finds logins it doesn't store (Claude Code's, for one), so its own credential table isn't enough. Running it refreshes OMP's model cache, as any omp run does.
func AgentExtras ¶
AgentExtras preserves native task fields and translates cross-harness tool restrictions.
func ConfigInputs ¶
ConfigInputs lists native configuration that can change discovery, excluding credentials and runtime databases. OMP continues to load these files itself.
func Models ¶ added in v0.14.1
func Models(ctx context.Context) ([]json.RawMessage, error)
Models lists every model kind this machine's OMP can use, as `omp models --json` reports them.
func OverlayPath ¶ added in v0.14.1
OverlayPath is the --config overlay the gateway writes from the replicated omp_settings table.
func ReadLimits ¶
func ReadLimits(ctx context.Context) base.LimitSnapshot
func RenderOverlay ¶ added in v0.14.1
func RenderOverlay(values map[string]json.RawMessage) ([]byte, error)
RenderOverlay writes the values as an OMP config.yml overlay; dotted keys become nested maps, and an entry like modelRoles.default lands inside the modelRoles record, replacing its value.
Types ¶
type HookRenderer ¶
type HookRenderer struct{}
func (HookRenderer) Render ¶
func (HookRenderer) Render(bundle hooks.Bundle, ctx hooks.RenderContext) (hooks.RenderOutput, error)
func (HookRenderer) Target ¶
func (HookRenderer) Target() base.Target
type Option ¶ added in v0.14.1
type Option struct {
Value string `json:"value"`
Label string `json:"label"`
Description string `json:"description,omitempty"`
}
Option is a labelled choice from the panel's submenu.
type Setting ¶ added in v0.14.1
type Setting struct {
Key string `json:"key"`
Tab string `json:"tab"`
Group string `json:"group,omitempty"`
Label string `json:"label"`
Description string `json:"description"`
Warning string `json:"warning,omitempty"`
Type string `json:"type"`
Values []string `json:"values,omitempty"`
Options []Option `json:"options,omitempty"`
Default json.RawMessage `json:"default"`
}
Setting is one row of OMP's /settings panel, plus the model keys its model selector edits.
func RecordEntry ¶ added in v0.14.1
RecordEntry finds the record setting that key names one entry of, like modelRoles.default, so a role is changed and reset on its own.