Documentation
¶
Overview ¶
Package claudenative runs one approved evaluation task through Claude Code in non-interactive print mode with streaming JSON input and output. It launches only under the fixed containment flags below, verifies the session's reported startup state before accepting work, and records session, profile, usage and cleanup evidence. It grants no approval and has no Delivery entry point.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnavailable refuses an attempt before any output is accepted: a missing // flag, a workspace instruction file, or a startup state other than requested. ErrProfileMismatch = errors.New("claude reported execution profile mismatch") ErrTaskBoundary = errors.New("claude approved task boundary changed") ErrMalformedMessage = errors.New("malformed Claude Code stream message") ErrProcessExit = errors.New("claude code exited before its result") )
Functions ¶
This section is empty.
Types ¶
type EvaluationBinding ¶
type EvaluationBinding = nativehost.EvaluationBinding
type InstructionEvidence ¶
type InstructionEvidence = nativehost.InstructionEvidence
type Options ¶
type Options struct {
Executable string // empty resolves claude on PATH
}
Options identifies the installed host only. It cannot add flags, settings, credentials, directories or environment.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session retains one approved binding. Cancel the context to interrupt. There is no extra input, steering, fork, tool-response or approval API.
func RunSession ¶
RunSession runs the approved task once. A finite caller deadline is mandatory. A nil Session means the binding itself was refused.
func (*Session) Result ¶
func (s *Session) Result() SessionResult
Result returns an independent snapshot.
type SessionCleanup ¶
type SessionCleanup = nativehost.SessionCleanup
type SessionOutcome ¶
type SessionOutcome string
const ( SessionSuccessful SessionOutcome = "successful" SessionFailed SessionOutcome = "failed" SessionRefused SessionOutcome = "refused" SessionCancelled SessionOutcome = "cancelled" SessionTimedOut SessionOutcome = "timed-out" SessionDisconnected SessionOutcome = "disconnected" )
type SessionResult ¶
type SessionResult struct {
TaskID string
Workspace string
SessionID string // set once Claude Code was launched with it
HostVersion string
Started bool // reported startup state verified; work could begin
Requested manifest.Selection
Observed metrics.Profile
Outcome SessionOutcome
NativeStatus string
Output string // accepted only from a successful, verified session
Observations []metrics.Observation
Evaluation *EvaluationBinding
Instructions *InstructionEvidence
Cleanup SessionCleanup
Error string
}
SessionResult describes execution only; success is not verification. Observed holds the model the session reported. Claude Code reports no applied effort, so Observed.Effort stays empty (unknown).
type Task ¶
type Task = nativehost.Task
Task is the shared caller-approved dispatch; see nativehost.Task.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package claudefake is a scripted stand-in for Claude Code used only by tests.
|
Package claudefake is a scripted stand-in for Claude Code used only by tests. |