Documentation
¶
Index ¶
- Constants
- func WriteFakePi(dir string) (string, error)
- type AnalysisReport
- type ExportBundle
- type ExportOptions
- type LocalRelay
- func (r *LocalRelay) HandleDaemonWS(w http.ResponseWriter, req *http.Request)
- func (r *LocalRelay) HandleUIWS(w http.ResponseWriter, req *http.Request)
- func (r *LocalRelay) SendRawToDaemon(ctx context.Context, data []byte) error
- func (r *LocalRelay) SendToDaemon(ctx context.Context, payload any) error
- type LocalRelayOptions
- type PreflightCheck
- type PreflightOptions
- type PreflightResult
- type RedactEvent
- type Redactor
- type Runner
- type RunnerOptions
- type Scenario
- type Server
- type ServerOptions
- type SessionConfig
- type SessionEvent
- type SessionStore
- type SessionStoreOptions
Constants ¶
View Source
const ExportSchemaVersion = 1
Variables ¶
This section is empty.
Functions ¶
func WriteFakePi ¶
Types ¶
type AnalysisReport ¶
type AnalysisReport struct {
SchemaVersion int `json:"schemaVersion"`
Provider string `json:"provider"`
Model string `json:"model"`
EventCount int `json:"eventCount"`
ErrorCount int `json:"errorCount"`
ToolCallCount int `json:"toolCallCount"`
QuestionCount int `json:"questionCount"`
TerminalCount int `json:"terminalCount"`
PlanCallCount int `json:"planCallCount"`
}
func AnalyzeBundle ¶
func AnalyzeBundle(bundle ExportBundle) (AnalysisReport, error)
type ExportBundle ¶
type ExportBundle struct {
SchemaVersion int `json:"schemaVersion"`
ExportedAt string `json:"exportedAt"`
Config SessionConfig `json:"config"`
Events []SessionEvent `json:"events"`
}
type ExportOptions ¶
type ExportOptions struct {
IncludeSensitive bool `json:"includeSensitive"`
}
type LocalRelay ¶
type LocalRelay struct {
// contains filtered or unexported fields
}
func NewLocalRelay ¶
func NewLocalRelay(opts LocalRelayOptions) *LocalRelay
func (*LocalRelay) HandleDaemonWS ¶
func (r *LocalRelay) HandleDaemonWS(w http.ResponseWriter, req *http.Request)
func (*LocalRelay) HandleUIWS ¶
func (r *LocalRelay) HandleUIWS(w http.ResponseWriter, req *http.Request)
func (*LocalRelay) SendRawToDaemon ¶
func (r *LocalRelay) SendRawToDaemon(ctx context.Context, data []byte) error
func (*LocalRelay) SendToDaemon ¶
func (r *LocalRelay) SendToDaemon(ctx context.Context, payload any) error
type LocalRelayOptions ¶
type LocalRelayOptions struct {
MachineID string
AuthToken string
Store *SessionStore
}
type PreflightCheck ¶
type PreflightOptions ¶
type PreflightResult ¶
type PreflightResult struct {
OK bool `json:"ok"`
Checks []PreflightCheck `json:"checks"`
}
func RunPreflight ¶
func RunPreflight(opts PreflightOptions) PreflightResult
type RedactEvent ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func NewRunner ¶
func NewRunner(opts RunnerOptions) *Runner
func (*Runner) WriteConfig ¶
type RunnerOptions ¶
type Scenario ¶
type Scenario struct {
ID string `json:"id"`
Label string `json:"label"`
Prompt string `json:"prompt"`
}
func BuiltInScenarios ¶
func BuiltInScenarios() []Scenario
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(opts ServerOptions) *Server
type ServerOptions ¶
type ServerOptions struct {
Store *SessionStore
Relay *LocalRelay
CWD string
}
type SessionConfig ¶
type SessionConfig struct {
CWD string `json:"cwd"`
Provider string `json:"provider"`
Model string `json:"model"`
Effort string `json:"effort"`
PermissionMode string `json:"permissionMode"`
FakeMode bool `json:"fakeMode"`
PiBinary string `json:"piBinary,omitempty"`
WarmWorkers *bool `json:"warmWorkers,omitempty"`
}
type SessionEvent ¶
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
func NewSessionStore ¶
func NewSessionStore(opts SessionStoreOptions) (*SessionStore, error)
func (*SessionStore) Config ¶
func (s *SessionStore) Config() SessionConfig
func (*SessionStore) Dir ¶
func (s *SessionStore) Dir() string
func (*SessionStore) Export ¶
func (s *SessionStore) Export(opts ExportOptions) (ExportBundle, error)
type SessionStoreOptions ¶
type SessionStoreOptions struct {
RootDir string
Config SessionConfig
}
Click to show internal directories.
Click to hide internal directories.