Documentation
¶
Overview ¶
Package codexnative implements Codex preflights and bounded task sessions. Production sessions require a verified model-tool boundary, currently absent. Metadata connections have no execution methods.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrProfileMismatch = errors.New("codex reported execution profile mismatch") ErrTaskBoundary = errors.New("codex approved task boundary changed") )
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct {
HostVersion string
PlatformFamily string
PlatformOS string
Selection manifest.Selection
}
Capabilities is catalog/authentication evidence, never an observed execution profile, entitlement proof, sandbox proof or a metrics.Observation.
type IsolationCapabilities ¶
type IsolationCapabilities struct {
HostVersion string
SandboxReady bool
ProfileAllowed bool
ToolsDisabled bool // effective configuration only, never model-tool proof
DisabledMCP int // names and configuration are not retained as evidence
}
IsolationCapabilities reports configuration availability, not containment. No host currently has a verified closed model-tool boundary in this package.
func IsolationPreflight ¶
func IsolationPreflight(ctx context.Context, options Options, layout IsolationPaths, reviewer bool) (capabilities IsolationCapabilities, err error)
IsolationPreflight checks a native profile without model turns or user-file probes. It always refuses model execution until a supported native tool boundary is verified. Sandbox readiness/profile listing alone cannot pass it.
type IsolationPaths ¶
type IsolationPaths struct {
Workspace string
Scratch string
MainCheckout string
ControllerState string
SiblingWorkspaces []string
CredentialPaths []string
}
IsolationPaths must name the complete approved layout. Protected directories may contain one another, but none may overlap the workspace or scratch. Existing Delivery worktrees nested under the main checkout are unsuitable.
type Options ¶
type Options struct {
Executable string // empty resolves codex on PATH
Dir string // required absolute cwd
ClientVersion string
}
Options identifies the installed host and the calling Orch build. It cannot inject credentials, provider settings, a shell command or model-turn args.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session retains one binding and its replay history in memory. Calls are sequential; cancel the execution context to interrupt. There is no arbitrary turn input, steering, fork, tool-response or approval API.
func RunSession ¶
RunSession executes at most one turn. A finite caller deadline is mandatory. Every production path requires both preflights; current hosts always fail the isolation preflight, so this API cannot currently start a production turn.
func (*Session) Result ¶
func (s *Session) Result() SessionResult
Result returns an independent snapshot so caller edits cannot corrupt replay identity or the retained task. These types contain only JSON-safe data.
type SessionOutcome ¶
type SessionOutcome string
const ( SessionSuccessful SessionOutcome = "successful" SessionFailed SessionOutcome = "failed" SessionCancelled SessionOutcome = "cancelled" SessionTimedOut SessionOutcome = "timed-out" SessionDisconnected SessionOutcome = "disconnected" )
type SessionResult ¶
type SessionResult struct {
TaskID string
Workspace string
ThreadID string
NativeSessionID string // native session tree, distinct from the executed thread
TurnID string
Requested manifest.Selection
Observed metrics.Profile
Outcome SessionOutcome
NativeStatus string
Output string
Observations []metrics.Observation
}
SessionResult describes execution only. Successful is neither verification nor review/merge approval. Observed contains native configured-profile reports, not proof of per-turn inference identity; absent fields remain unknown.
type Task ¶
type Task struct {
ID string
RunID string
IssueNumber int
Role string
Attempt string
ReviewCycle int
Selection manifest.Selection
Prompt string
Layout IsolationPaths
}
Task is one caller-approved dispatch, not a request for this package to approve or route work. The engine remains responsible for eligibility and approval. ID and Prompt identify the exact task; Selection is its routed native profile.