Documentation
¶
Overview ¶
Package codex is the pilot third-party adapter built on the adapter contract (internal/adapter/structproj) and the TOML codec (internal/tomlutil). It projects declared MCP servers targeting "codex" into ~/.codex/config.toml as [mcp_servers.<name>] tables, surgically and idempotently, without duplicating the Claude/OpenCode control flow — the adapter supplies only its file path, key mapping, and codec; all plan/apply/observe logic lives in the contract.
Index ¶
- Constants
- type Adapter
- func (a *Adapter) Apply(_ *config.Config, cs adapter.ChangeSet, res *secret.Resolver, st *state.State) error
- func (a *Adapter) Name() string
- func (a *Adapter) ObserveHashes(st *state.State) (map[string]string, error)
- func (a *Adapter) Plan(c *config.Config, st *state.State) (adapter.ChangeSet, error)
Constants ¶
const Tool = "codex"
Tool is the adapter/target name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter projects config into Codex's ~/.codex/config.toml.
func (*Adapter) Apply ¶
func (a *Adapter) Apply(_ *config.Config, cs adapter.ChangeSet, res *secret.Resolver, st *state.State) error
Apply writes managed MCP tables into config.toml (only when a managed key changed), preserving unmanaged content, and records state.
func (*Adapter) ObserveHashes ¶
ObserveHashes re-hashes each recorded MCP key still present in config.toml.