Documentation
¶
Index ¶
- func ServeStdio(ctx context.Context, agent Agent, logger *slog.Logger) error
- type Agent
- type AgentInfo
- type AuthenticateRequest
- type CancelSessionRequest
- type CloseSessionRequest
- type ListSessionsRequest
- type ListSessionsResponse
- type NewSessionRequest
- type PromptRequest
- type ResumeSessionRequest
- type SessionID
- type SessionInfo
- type SessionUpdate
- type ToolCallUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent interface {
Info() AgentInfo
Authenticate(ctx AuthenticateRequest) error
NewSession(req NewSessionRequest) (SessionID, error)
ResumeSession(req ResumeSessionRequest) error
ListSessions(req ListSessionsRequest) (ListSessionsResponse, error)
CloseSession(req CloseSessionRequest) error
CancelSession(req CancelSessionRequest) error
Prompt(req PromptRequest, onUpdate func(SessionUpdate)) error
}
type AuthenticateRequest ¶
type AuthenticateRequest struct {
Token string
}
type CancelSessionRequest ¶
type CancelSessionRequest struct {
SessionID SessionID
}
type CloseSessionRequest ¶
type CloseSessionRequest struct {
SessionID SessionID
}
type ListSessionsRequest ¶
type ListSessionsResponse ¶
type ListSessionsResponse struct {
Sessions []SessionInfo
NextCursor string
}
type NewSessionRequest ¶
type PromptRequest ¶
type ResumeSessionRequest ¶
type SessionInfo ¶
type SessionUpdate ¶
type SessionUpdate struct {
Text string
Done bool
ToolCall *ToolCallUpdate
Error string
}
Click to show internal directories.
Click to hide internal directories.