omp

package
v0.14.4-dev.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func Account(ctx context.Context) base.Account

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

func AgentExtras(source map[string]any) (map[string]any, []string)

AgentExtras preserves native task fields and translates cross-harness tool restrictions.

func ConfigInputs

func ConfigInputs(workspace string) []string

ConfigInputs lists native configuration that can change discovery, excluding credentials and runtime databases. OMP continues to load these files itself.

func Login added in v0.14.1

func Login(method string) (base.LoginFlow, error)

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 New

func New() base.Harness

func OverlayPath added in v0.14.1

func OverlayPath() (string, error)

OverlayPath is the --config overlay the gateway writes from the replicated omp_settings table.

func ReadLimits

func ReadLimits(ctx context.Context) base.LimitSnapshot

func RenderMCP

func RenderMCP(entries mcp.Entries) ([]byte, []string, error)

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.

func Settings added in v0.14.1

func Settings(ctx context.Context) (version string, values map[string]json.RawMessage, err error)

Settings reports this machine's OMP version and its effective values for the schema keys. An absent CLI returns an empty version and no error.

func Support

func Support(event hooks.Event, handler hooks.Handler) hooks.Support

func Validate added in v0.14.1

func Validate(ctx context.Context, key string, value json.RawMessage) error

Validate asks OMP to store the value in a throwaway agent directory and returns OMP's own complaint. Without OMP on this machine only the schema type is checked.

Types

type HookRenderer

type HookRenderer struct{}

func (HookRenderer) Render

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 Lookup added in v0.14.1

func Lookup(key string) (Setting, bool)

Lookup finds a schema entry by key.

func RecordEntry added in v0.14.1

func RecordEntry(key string) (Setting, bool)

RecordEntry finds the record setting that key names one entry of, like modelRoles.default, so a role is changed and reset on its own.

func Schema added in v0.14.1

func Schema() []Setting

Schema lists the settings agentpack can apply network-wide.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL