Documentation
¶
Overview ¶
Package codex implements app-server RPC and durable native-history recovery.
Index ¶
- func Normalize(thread Thread, completed map[string]bool, outputs map[string]Output, limit int, ...) harness.Snapshot
- type Driver
- func (d *Driver) AccountLimitsDirty() bool
- func (d *Driver) AccountLimitsEvents() <-chan struct{}
- func (d *Driver) Attach(ctx context.Context, pid int) error
- func (d *Driver) Close() error
- func (d *Driver) Committed()
- func (d *Driver) HasUpdates() bool
- func (d *Driver) Initialize(ctx context.Context, source session.Credentials, login bool) error
- func (d *Driver) Interrupt(ctx context.Context, thread, turn string) error
- func (d *Driver) Launch(ctx context.Context, env map[string]string, cwd string, ...) (int, error)
- func (d *Driver) OpenContext(ctx context.Context, agent session.AgentConfiguration, cwd string, id *string) (harness.Context, error)
- func (d *Driver) ReadAccountLimits(ctx context.Context) (accountlimits.Snapshot, error)
- func (d *Driver) Recover(ctx context.Context, id, path, home *string) (harness.Snapshot, error)
- func (d *Driver) Snapshot(ctx context.Context, thread string, path *string, offset int64) (harness.Snapshot, error)
- func (d *Driver) Start(ctx context.Context, agent session.AgentConfiguration, thread string, ...) (string, error)
- func (d *Driver) StateDir(ctx context.Context) (string, error)
- func (d *Driver) Steer(ctx context.Context, thread, turn, text string) error
- type NativeItem
- type NativeTurn
- type Output
- type RPC
- func (r *RPC) Attach(ctx context.Context, pid int) error
- func (r *RPC) Call(ctx context.Context, method string, params any, dest any) error
- func (r *RPC) Close() error
- func (r *RPC) Initialize(ctx context.Context) error
- func (r *RPC) Launch(ctx context.Context, command string, env map[string]string, cwd string) (int, error)
- type RPCError
- type Result
- type Thread
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) AccountLimitsDirty ¶ added in v0.1.7
func (*Driver) AccountLimitsEvents ¶ added in v0.1.7
func (d *Driver) AccountLimitsEvents() <-chan struct{}
func (*Driver) HasUpdates ¶
func (*Driver) Initialize ¶
func (*Driver) OpenContext ¶
func (*Driver) ReadAccountLimits ¶ added in v0.1.7
type NativeItem ¶
type NativeItem struct {
ID string `json:"id"`
Type string `json:"type"`
Content []struct {
Text string `json:"text"`
} `json:"content"`
Text string `json:"text"`
Phase string `json:"phase"`
Tool string `json:"tool"`
Status string `json:"status"`
AggregatedOutput *string `json:"aggregatedOutput"`
Result json.RawMessage `json:"result"`
Arguments json.RawMessage `json:"arguments"`
Command json.RawMessage `json:"command"`
Changes json.RawMessage `json:"changes"`
ExitCode *int `json:"exitCode"`
}
type NativeTurn ¶
type NativeTurn struct {
ID string `json:"id"`
Status string `json:"status"`
Items []NativeItem `json:"items"`
Error json.RawMessage `json:"error"`
}
type Output ¶
type Output struct {
Result json.RawMessage `json:"result"`
Completeness string `json:"completeness"`
Reason *string `json:"reason"`
}
type RPCError ¶
func (*RPCError) UnmarshalJSON ¶
type Result ¶
type Result struct {
Type string `json:"type"`
Text *string `json:"text,omitzero"`
Value json.RawMessage `json:"value,omitzero"`
Head *string `json:"head,omitzero"`
Tail *string `json:"tail,omitzero"`
SourceType string `json:"source_type,omitzero"`
ExitCode *int `json:"exit_code"`
OriginalBytes *int `json:"original_bytes"`
}
type Thread ¶
type Thread struct {
ID string `json:"id"`
Path *string `json:"path"`
Turns []NativeTurn `json:"turns"`
}
Click to show internal directories.
Click to hide internal directories.