Documentation
¶
Overview ¶
Package codexnative implements Codex preflights and bounded task sessions. Production sessions require supported native enforcement and verified controls. 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 EvaluationBinding ¶ added in v0.12.0
type EvaluationBinding = nativehost.EvaluationBinding
The evaluation binding and evidence types are shared with every host bridge.
type InstructionEvidence ¶ added in v0.12.0
type InstructionEvidence = nativehost.InstructionEvidence
The evaluation binding and evidence types are shared with every host bridge.
type InstructionSource ¶ added in v0.12.0
type InstructionSource = nativehost.InstructionSource
The evaluation binding and evidence types are shared with every host bridge.
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
ModelToolsVerified bool // supported native enforcement plus actual-connection controls
}
IsolationCapabilities reports checked controls, not live inference evidence.
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. Supported native enforcement and actual-connection controls are both required; success does not authorize a task or enable this metadata connection.
type IsolationPaths ¶
type IsolationPaths = nativehost.IsolationPaths
IsolationPaths is the shared approved layout; see nativehost.IsolationPaths.
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 start and resume requires both preflights and the actual execution connection's controls. Unreviewed native enforcement remains unavailable.
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 SessionCleanup ¶ added in v0.12.0
type SessionCleanup = nativehost.SessionCleanup
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
Evaluation *EvaluationBinding
Eligibility *IsolationCapabilities
Instructions *InstructionEvidence
Cleanup SessionCleanup
Error string
}
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 = nativehost.Task
Task is the shared caller-approved dispatch; see nativehost.Task.