Documentation
¶
Index ¶
- type Account
- type Bridge
- func (b *Bridge) CancelLogin(ctx context.Context, loginID string) error
- func (b *Bridge) EnsureStarted(ctx context.Context) error
- func (b *Bridge) InjectThreadItems(ctx context.Context, threadID string, items []map[string]any) error
- func (b *Bridge) RecentDiagnosticSummary(limit int) string
- func (b *Bridge) RecentEvents(limit int) []Event
- func (b *Bridge) RecentStderr(limit int) []string
- func (b *Bridge) Snapshot() Snapshot
- func (b *Bridge) StartDeviceCodeLogin(ctx context.Context) (DeviceCodeLoginResult, error)
- func (b *Bridge) StartThread(ctx context.Context, params ThreadStartParams) (ThreadStartResult, error)
- func (b *Bridge) StartTurn(ctx context.Context, params TurnStartParams) (TurnStartResult, error)
- func (b *Bridge) Stop(ctx context.Context) error
- func (b *Bridge) Subscribe(ctx context.Context) <-chan Event
- func (b *Bridge) Warmup()
- type DeviceCodeLoginResult
- type Event
- type InitializeInfo
- type LoginState
- type Snapshot
- type ThreadStartParams
- type ThreadStartResult
- type ThreadState
- type TurnStartParams
- type TurnStartResult
- type TurnState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
func (*Bridge) CancelLogin ¶
func (*Bridge) InjectThreadItems ¶
func (*Bridge) RecentDiagnosticSummary ¶
func (*Bridge) RecentEvents ¶
func (*Bridge) RecentStderr ¶
func (*Bridge) StartDeviceCodeLogin ¶
func (b *Bridge) StartDeviceCodeLogin(ctx context.Context) (DeviceCodeLoginResult, error)
func (*Bridge) StartThread ¶
func (b *Bridge) StartThread(ctx context.Context, params ThreadStartParams) (ThreadStartResult, error)
func (*Bridge) StartTurn ¶
func (b *Bridge) StartTurn(ctx context.Context, params TurnStartParams) (TurnStartResult, error)
type DeviceCodeLoginResult ¶
type Event ¶
type Event struct {
Seq int64 `json:"seq"`
Time time.Time `json:"time"`
Source string `json:"source,omitempty"`
Method string `json:"method,omitempty"`
ThreadID string `json:"thread_id,omitempty"`
TurnID string `json:"turn_id,omitempty"`
ItemID string `json:"item_id,omitempty"`
Summary string `json:"summary,omitempty"`
Delta string `json:"delta,omitempty"`
Payload json.RawMessage `json:"payload,omitempty"`
}
type InitializeInfo ¶
type LoginState ¶
type LoginState struct {
Pending bool `json:"pending"`
Type string `json:"type,omitempty"`
LoginID string `json:"login_id,omitempty"`
VerificationURL string `json:"verification_url,omitempty"`
UserCode string `json:"user_code,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
LastError string `json:"last_error,omitempty"`
}
type Snapshot ¶
type Snapshot struct {
Command string `json:"command"`
CommandArgs []string `json:"command_args,omitempty"`
CommandCWD string `json:"command_cwd,omitempty"`
PID int `json:"pid,omitempty"`
Running bool `json:"running"`
Starting bool `json:"starting"`
Ready bool `json:"ready"`
Initialized bool `json:"initialized"`
LastError string `json:"last_error,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
LastExitAt time.Time `json:"last_exit_at,omitempty"`
InitializeInfo InitializeInfo `json:"initialize_info,omitempty"`
AuthMethod string `json:"auth_method,omitempty"`
RequiresOpenAIAuth *bool `json:"requires_openai_auth,omitempty"`
Account *Account `json:"account,omitempty"`
Login *LoginState `json:"login,omitempty"`
Thread *ThreadState `json:"thread,omitempty"`
Turn *TurnState `json:"turn,omitempty"`
}
type ThreadStartParams ¶
type ThreadStartResult ¶
type ThreadStartResult struct {
ThreadID string `json:"thread_id"`
CWD string `json:"cwd,omitempty"`
Model string `json:"model,omitempty"`
ModelProvider string `json:"model_provider,omitempty"`
ApprovalPolicy string `json:"approval_policy,omitempty"`
Sandbox string `json:"sandbox,omitempty"`
ThreadPreview string `json:"thread_preview,omitempty"`
}
type ThreadState ¶
type ThreadState struct {
ID string `json:"id,omitempty"`
Preview string `json:"preview,omitempty"`
CWD string `json:"cwd,omitempty"`
Model string `json:"model,omitempty"`
ModelProvider string `json:"model_provider,omitempty"`
ApprovalPolicy string `json:"approval_policy,omitempty"`
Sandbox string `json:"sandbox,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type TurnStartParams ¶
type TurnStartResult ¶
Click to show internal directories.
Click to hide internal directories.