Documentation
¶
Overview ¶
Package onboardingclient prepares complete assistant settings in a private, isolated home. It never installs a candidate or writes an active config.
Index ¶
- Variables
- type Candidate
- type Client
- type CodexSnapshot
- type Command
- type Options
- type Report
- type Runner
- type Validation
- func CheckLive(ctx context.Context, options Options) (Validation, error)
- func CheckLiveBaseline(ctx context.Context, options Options) (Validation, error)
- func Validate(ctx context.Context, options Options, data []byte) (Validation, error)
- func ValidateBaseline(ctx context.Context, options Options, data []byte) (Validation, error)
- func ValidateCandidate(ctx context.Context, c *Candidate) (Validation, error)
Constants ¶
This section is empty.
Variables ¶
var ErrManagedProfileMismatch = errors.New("configured Questlock command differs from selected managed profile")
ErrManagedProfileMismatch identifies an existing command that differs from selected managed defaults. It does not establish whether that custom worker is available or correctly configured.
Functions ¶
This section is empty.
Types ¶
type Candidate ¶
type Candidate struct {
Client Client `json:"client"`
ActivePath string `json:"active_path"`
Path string `json:"path"`
IsolationDir string `json:"isolation_dir"`
OriginalSHA256 string `json:"original_sha256"`
CandidateSHA256 string `json:"candidate_sha256"`
OriginalExists bool `json:"original_exists"`
Validation Validation `json:"validation"`
// contains filtered or unexported fields
}
type CodexSnapshot ¶
type Options ¶
type Options struct {
Client Client
HomeDir string
CodexHome string
ConfigPath string
Executable string
QuestlockPath string
Workspace string
StateDir string
Runner Runner // Optional test/host injection; nil runs native binaries.
// SkipNativeMCPRead keeps Inspect from running Claude's MCP get command.
// Exact static settings are still checked; native validation stays false.
SkipNativeMCPRead bool
// contains filtered or unexported fields
}
type Report ¶
type Report struct {
Client Client `json:"client"`
ConfigPath string `json:"config_path"`
Executable string `json:"executable,omitempty"`
ClientAvailable bool `json:"client_available"`
ConfigExists bool `json:"config_exists"`
ConfigSHA256 string `json:"config_sha256,omitempty"`
ServerPresent bool `json:"server_present"`
OtherServers int `json:"other_servers"`
NotifyArguments int `json:"notify_arguments,omitempty"`
Status string `json:"status"`
Validation Validation `json:"validation"`
}
Report contains redacted facts only. Native command output and settings values must never appear in diagnostic output, including native command failures.
type Runner ¶
type Runner interface {
Run(context.Context, Command) ([]byte, error)
CodexRead(context.Context, Command) (CodexSnapshot, error)
}
Runner runs only configuration commands. CodexRead performs initialize, initialized, then config/read with includeLayers=true; it starts no thread.
type Validation ¶
type Validation struct {
Status string `json:"status"`
NativeValidated bool `json:"native_validated"`
PreservedSettings bool `json:"preserved_settings"`
ExactServer bool `json:"exact_server"`
NotifyPreserved bool `json:"notify_preserved"`
RequiresNativeRead bool `json:"requires_native_read"`
}
Validation separates a syntactically preserved candidate from a native client read. Desktop has no documented isolated config reader and always requires native application verification before an active-file transaction can commit.
func CheckLive ¶
func CheckLive(ctx context.Context, options Options) (Validation, error)
CheckLive asks a CLI to read the actual installed file without generating or installing settings. Unlike Inspect, Claude Code's native command may perform its own bookkeeping or start the configured local MCP server. No model turn or paid API is requested. Call only during an explicit config transaction.
func CheckLiveBaseline ¶
func CheckLiveBaseline(ctx context.Context, options Options) (Validation, error)
CheckLiveBaseline verifies a restored complete live configuration without requiring the newly generated Questlock command. Codex can read the complete user layer directly. Claude Code and Desktop do not expose a documented non-mutating native whole-config reader for an arbitrary prior configuration; restoration must remain explicitly unverified until native evidence exists. In particular, this method never adds or removes a live validation probe.
func Validate ¶
Validate independently stages complete candidate bytes and requires the exact Questlock command. It does not compare a baseline; Plan/ValidateCandidate do.
func ValidateBaseline ¶
ValidateBaseline asks the native client to read a complete existing config without requiring a Questlock server to have already been installed.
func ValidateCandidate ¶
func ValidateCandidate(ctx context.Context, c *Candidate) (Validation, error)