Documentation
¶
Index ¶
- Constants
- Variables
- type A2ARuntime
- func (r *A2ARuntime) CancelRun(ctx context.Context, session ExternalSession, run ExternalRun) error
- func (r *A2ARuntime) CloseSession(_ context.Context, _ AgentProfile, session ExternalSession) error
- func (r *A2ARuntime) EnsureSession(ctx context.Context, req EnsureSessionRequest) (*EnsureSessionResult, error)
- func (r *A2ARuntime) Health(ctx context.Context, profile AgentProfile) (*ProfileHealthResult, error)
- func (r *A2ARuntime) StreamRun(_ context.Context, req StreamRunRequest) (RuntimeStream, error)
- func (r *A2ARuntime) SubmitRun(ctx context.Context, req SubmitRunRequest) (*SubmitRunResult, error)
- func (r *A2ARuntime) VerifyProfile(ctx context.Context, profile AgentProfile) (*ProfileVerifyResult, error)
- type ACPRuntime
- func (r *ACPRuntime) CancelRun(ctx context.Context, session ExternalSession, _ ExternalRun) error
- func (r *ACPRuntime) CloseSession(_ context.Context, _ AgentProfile, session ExternalSession) error
- func (r *ACPRuntime) EnsureSession(ctx context.Context, req EnsureSessionRequest) (*EnsureSessionResult, error)
- func (r *ACPRuntime) Health(ctx context.Context, profile AgentProfile) (*ProfileHealthResult, error)
- func (r *ACPRuntime) StreamRun(_ context.Context, req StreamRunRequest) (RuntimeStream, error)
- func (r *ACPRuntime) SubmitRun(ctx context.Context, req SubmitRunRequest) (*SubmitRunResult, error)
- func (r *ACPRuntime) VerifyProfile(ctx context.Context, profile AgentProfile) (*ProfileVerifyResult, error)
- type AgentProfile
- type ClientAuthority
- type CreateSessionParams
- type CredentialResolver
- type EnsureSessionRequest
- type EnsureSessionResult
- type ExternalRun
- type ExternalSession
- type Handler
- func (h *Handler) CancelSession(c echo.Context) error
- func (h *Handler) CloseSession(c echo.Context) error
- func (h *Handler) CreateSession(c echo.Context) error
- func (h *Handler) DeleteProfile(c echo.Context) error
- func (h *Handler) GetHistory(c echo.Context) error
- func (h *Handler) GetSession(c echo.Context) error
- func (h *Handler) HealthProfile(c echo.Context) error
- func (h *Handler) ListProfiles(c echo.Context) error
- func (h *Handler) ListSessions(c echo.Context) error
- func (h *Handler) RegisterProfileRoutes(g *echo.Group)
- func (h *Handler) RegisterRoutes(g *echo.Group)
- func (h *Handler) RegisterSessionRoutes(g *echo.Group)
- func (h *Handler) SaveProfile(c echo.Context) error
- func (h *Handler) SendMessage(c echo.Context) error
- func (h *Handler) StreamEvents(c echo.Context) error
- func (h *Handler) VerifyProfile(c echo.Context) error
- type MaterializedCredentials
- type OAuthCredentialSource
- type ProfileHealthResult
- type ProfileVerifyResult
- type ProtocolKind
- type ProtocolRuntime
- type ProviderPoolCredentialResolver
- type RunEvent
- type RunStatus
- type RuntimeEvent
- type RuntimeStream
- type SQLiteStore
- func (s *SQLiteStore) AppendEvent(sessionID, runID, eventType string, payload interface{}) (*RunEvent, error)
- func (s *SQLiteStore) BuildHistory(sessionID string, limit int) ([]SessionHistoryItem, error)
- func (s *SQLiteStore) DeleteProfile(id string) error
- func (s *SQLiteStore) GetProfile(id string) (*AgentProfile, error)
- func (s *SQLiteStore) GetRun(id string) (*ExternalRun, error)
- func (s *SQLiteStore) GetSession(id string) (*ExternalSession, error)
- func (s *SQLiteStore) LatestActiveRun(sessionID string) (*ExternalRun, error)
- func (s *SQLiteStore) ListEvents(sessionID string, limit int, afterID int64) ([]RunEvent, error)
- func (s *SQLiteStore) ListProfiles() ([]AgentProfile, error)
- func (s *SQLiteStore) ListRuns(sessionID string, limit int) ([]ExternalRun, error)
- func (s *SQLiteStore) ListSessions(limit, offset int, userID string, protocol ProtocolKind) ([]ExternalSession, error)
- func (s *SQLiteStore) ListSessionsByProfileID(profileID string) ([]ExternalSession, error)
- func (s *SQLiteStore) SaveProfile(profile *AgentProfile) error
- func (s *SQLiteStore) SaveRun(run *ExternalRun) error
- func (s *SQLiteStore) SaveSession(session *ExternalSession) error
- func (s *SQLiteStore) WithTx(ctx context.Context, fn func(tx *sql.Tx) error) error
- type SendMessageParams
- type Service
- func (s *Service) CancelSession(ctx context.Context, sessionID string) error
- func (s *Service) CloseSession(ctx context.Context, sessionID string) error
- func (s *Service) CreateSession(ctx context.Context, params CreateSessionParams) (*SessionDetail, error)
- func (s *Service) DeleteProfile(id string) error
- func (s *Service) GetProfile(id string) (*AgentProfile, error)
- func (s *Service) GetSessionDetail(sessionID string, historyLimit int) (*SessionDetail, error)
- func (s *Service) GetSessionHistory(sessionID string, limit int) ([]SessionHistoryItem, error)
- func (s *Service) HealthProfile(ctx context.Context, id string) (*ProfileHealthResult, error)
- func (s *Service) ListEvents(sessionID string, limit int, afterID int64) ([]RunEvent, error)
- func (s *Service) ListProfiles() ([]AgentProfile, error)
- func (s *Service) ListSessions(limit, offset int, userID string, protocol ProtocolKind) ([]ExternalSession, error)
- func (s *Service) SaveProfile(profile *AgentProfile) error
- func (s *Service) SeedBuiltinProfiles() error
- func (s *Service) SendMessage(ctx context.Context, params SendMessageParams) (*ExternalRun, error)
- func (s *Service) SubscribeSession(sessionID string) (<-chan RunEvent, func())
- func (s *Service) VerifyProfile(ctx context.Context, id string, candidate *AgentProfile) (*ProfileVerifyResult, error)
- type SessionDetail
- type SessionHistoryItem
- type SessionStatus
- type StreamRunRequest
- type SubmitRunRequest
- type SubmitRunResult
Constants ¶
View Source
const ( ProfileVerifyMessageCodeProfileVerified = publicagentcore.ProfileVerifyMessageCodeProfileVerified ProfileHealthMessageCodeRuntimeHealthy = publicagentcore.ProfileHealthMessageCodeRuntimeHealthy )
Variables ¶
View Source
var ( ErrBuiltinProfileDeleteDenied = errors.New("built-in profiles cannot be deleted") ErrProfileInUse = errors.New("agent profile is still used by one or more sessions") )
View Source
var ( ErrUnsupportedProtocol = publicagentcore.ErrUnsupportedProtocol ErrProfileNotFound = publicagentcore.ErrProfileNotFound ErrSessionNotFound = publicagentcore.ErrSessionNotFound ErrRunNotFound = publicagentcore.ErrRunNotFound )
Functions ¶
This section is empty.
Types ¶
type A2ARuntime ¶
type A2ARuntime struct {
// contains filtered or unexported fields
}
func NewA2ARuntime ¶
func NewA2ARuntime(logger *zap.Logger) *A2ARuntime
func (*A2ARuntime) CancelRun ¶
func (r *A2ARuntime) CancelRun(ctx context.Context, session ExternalSession, run ExternalRun) error
func (*A2ARuntime) CloseSession ¶
func (r *A2ARuntime) CloseSession(_ context.Context, _ AgentProfile, session ExternalSession) error
func (*A2ARuntime) EnsureSession ¶
func (r *A2ARuntime) EnsureSession(ctx context.Context, req EnsureSessionRequest) (*EnsureSessionResult, error)
func (*A2ARuntime) Health ¶
func (r *A2ARuntime) Health(ctx context.Context, profile AgentProfile) (*ProfileHealthResult, error)
func (*A2ARuntime) StreamRun ¶
func (r *A2ARuntime) StreamRun(_ context.Context, req StreamRunRequest) (RuntimeStream, error)
func (*A2ARuntime) SubmitRun ¶
func (r *A2ARuntime) SubmitRun(ctx context.Context, req SubmitRunRequest) (*SubmitRunResult, error)
func (*A2ARuntime) VerifyProfile ¶
func (r *A2ARuntime) VerifyProfile(ctx context.Context, profile AgentProfile) (*ProfileVerifyResult, error)
type ACPRuntime ¶
type ACPRuntime struct {
// contains filtered or unexported fields
}
func NewACPRuntime ¶
func NewACPRuntime(authority ClientAuthority, logger *zap.Logger, credentials CredentialResolver) *ACPRuntime
func (*ACPRuntime) CancelRun ¶
func (r *ACPRuntime) CancelRun(ctx context.Context, session ExternalSession, _ ExternalRun) error
func (*ACPRuntime) CloseSession ¶
func (r *ACPRuntime) CloseSession(_ context.Context, _ AgentProfile, session ExternalSession) error
func (*ACPRuntime) EnsureSession ¶
func (r *ACPRuntime) EnsureSession(ctx context.Context, req EnsureSessionRequest) (*EnsureSessionResult, error)
func (*ACPRuntime) Health ¶
func (r *ACPRuntime) Health(ctx context.Context, profile AgentProfile) (*ProfileHealthResult, error)
func (*ACPRuntime) StreamRun ¶
func (r *ACPRuntime) StreamRun(_ context.Context, req StreamRunRequest) (RuntimeStream, error)
func (*ACPRuntime) SubmitRun ¶
func (r *ACPRuntime) SubmitRun(ctx context.Context, req SubmitRunRequest) (*SubmitRunResult, error)
func (*ACPRuntime) VerifyProfile ¶
func (r *ACPRuntime) VerifyProfile(ctx context.Context, profile AgentProfile) (*ProfileVerifyResult, error)
type AgentProfile ¶
type AgentProfile = publicagentcore.AgentProfile
type ClientAuthority ¶
type ClientAuthority = publicagentcore.ClientAuthority
type CreateSessionParams ¶
type CreateSessionParams struct {
ProfileID string `json:"profile_id"`
UserID string `json:"user_id,omitempty"`
Name string `json:"name,omitempty"`
CWD string `json:"cwd,omitempty"`
InitialMessage string `json:"initial_message,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
type CredentialResolver ¶
type CredentialResolver interface {
Materialize(ctx context.Context, profile AgentProfile) (*MaterializedCredentials, error)
}
type EnsureSessionRequest ¶
type EnsureSessionRequest = publicagentcore.EnsureSessionRequest
type EnsureSessionResult ¶
type EnsureSessionResult = publicagentcore.EnsureSessionResult
type ExternalRun ¶
type ExternalRun = publicagentcore.ExternalRun
type ExternalSession ¶
type ExternalSession = publicagentcore.ExternalSession
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) RegisterProfileRoutes ¶
func (*Handler) RegisterRoutes ¶
func (*Handler) RegisterSessionRoutes ¶
type MaterializedCredentials ¶
type OAuthCredentialSource ¶
type ProfileHealthResult ¶
type ProfileHealthResult = publicagentcore.ProfileHealthResult
type ProfileVerifyResult ¶
type ProfileVerifyResult = publicagentcore.ProfileVerifyResult
type ProtocolKind ¶
type ProtocolKind = publicagentcore.ProtocolKind
const ( ProtocolACP ProtocolKind = publicagentcore.ProtocolACP ProtocolA2A ProtocolKind = publicagentcore.ProtocolA2A )
func ParseProtocolKind ¶
func ParseProtocolKind(raw string) (ProtocolKind, error)
type ProtocolRuntime ¶
type ProtocolRuntime = publicagentcore.ProtocolAdapter
type ProviderPoolCredentialResolver ¶
type ProviderPoolCredentialResolver struct {
// contains filtered or unexported fields
}
func NewProviderPoolCredentialResolver ¶
func NewProviderPoolCredentialResolver( getOAuthSource func() OAuthCredentialSource, lookupAPIKey func(providerID string) (string, error), logger *zap.Logger, ) *ProviderPoolCredentialResolver
func (*ProviderPoolCredentialResolver) Materialize ¶
func (r *ProviderPoolCredentialResolver) Materialize(_ context.Context, profile AgentProfile) (*MaterializedCredentials, error)
type RunEvent ¶
type RunEvent = publicagentcore.RunEvent
type RunStatus ¶
type RunStatus = publicagentcore.RunStatus
const ( RunStatusQueued RunStatus = publicagentcore.RunStatusQueued RunStatusRunning RunStatus = publicagentcore.RunStatusRunning RunStatusCompleted RunStatus = publicagentcore.RunStatusCompleted RunStatusFailed RunStatus = publicagentcore.RunStatusFailed RunStatusCancelled RunStatus = publicagentcore.RunStatusCancelled )
type RuntimeEvent ¶
type RuntimeEvent = publicagentcore.RuntimeEvent
type RuntimeStream ¶
type RuntimeStream = publicagentcore.RuntimeStream
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func NewSQLiteStore ¶
func NewSQLiteStore(db *sql.DB) (*SQLiteStore, error)
func NewSQLiteStoreWithReadDB ¶
func NewSQLiteStoreWithReadDB(writeDB, readDB *sql.DB) (*SQLiteStore, error)
func (*SQLiteStore) AppendEvent ¶
func (s *SQLiteStore) AppendEvent(sessionID, runID, eventType string, payload interface{}) (*RunEvent, error)
func (*SQLiteStore) BuildHistory ¶
func (s *SQLiteStore) BuildHistory(sessionID string, limit int) ([]SessionHistoryItem, error)
func (*SQLiteStore) DeleteProfile ¶
func (s *SQLiteStore) DeleteProfile(id string) error
func (*SQLiteStore) GetProfile ¶
func (s *SQLiteStore) GetProfile(id string) (*AgentProfile, error)
func (*SQLiteStore) GetRun ¶
func (s *SQLiteStore) GetRun(id string) (*ExternalRun, error)
func (*SQLiteStore) GetSession ¶
func (s *SQLiteStore) GetSession(id string) (*ExternalSession, error)
func (*SQLiteStore) LatestActiveRun ¶
func (s *SQLiteStore) LatestActiveRun(sessionID string) (*ExternalRun, error)
func (*SQLiteStore) ListEvents ¶
func (*SQLiteStore) ListProfiles ¶
func (s *SQLiteStore) ListProfiles() ([]AgentProfile, error)
func (*SQLiteStore) ListRuns ¶
func (s *SQLiteStore) ListRuns(sessionID string, limit int) ([]ExternalRun, error)
func (*SQLiteStore) ListSessions ¶
func (s *SQLiteStore) ListSessions(limit, offset int, userID string, protocol ProtocolKind) ([]ExternalSession, error)
func (*SQLiteStore) ListSessionsByProfileID ¶
func (s *SQLiteStore) ListSessionsByProfileID(profileID string) ([]ExternalSession, error)
func (*SQLiteStore) SaveProfile ¶
func (s *SQLiteStore) SaveProfile(profile *AgentProfile) error
func (*SQLiteStore) SaveRun ¶
func (s *SQLiteStore) SaveRun(run *ExternalRun) error
func (*SQLiteStore) SaveSession ¶
func (s *SQLiteStore) SaveSession(session *ExternalSession) error
type SendMessageParams ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(store *SQLiteStore, logger *zap.Logger, runtimes map[ProtocolKind]ProtocolRuntime) (*Service, error)
func (*Service) CancelSession ¶
func (*Service) CloseSession ¶
func (*Service) CreateSession ¶
func (s *Service) CreateSession(ctx context.Context, params CreateSessionParams) (*SessionDetail, error)
func (*Service) DeleteProfile ¶
func (*Service) GetProfile ¶
func (s *Service) GetProfile(id string) (*AgentProfile, error)
func (*Service) GetSessionDetail ¶
func (s *Service) GetSessionDetail(sessionID string, historyLimit int) (*SessionDetail, error)
func (*Service) GetSessionHistory ¶
func (s *Service) GetSessionHistory(sessionID string, limit int) ([]SessionHistoryItem, error)
func (*Service) HealthProfile ¶
func (*Service) ListEvents ¶
func (*Service) ListProfiles ¶
func (s *Service) ListProfiles() ([]AgentProfile, error)
func (*Service) ListSessions ¶
func (s *Service) ListSessions(limit, offset int, userID string, protocol ProtocolKind) ([]ExternalSession, error)
func (*Service) SaveProfile ¶
func (s *Service) SaveProfile(profile *AgentProfile) error
func (*Service) SeedBuiltinProfiles ¶
func (*Service) SendMessage ¶
func (s *Service) SendMessage(ctx context.Context, params SendMessageParams) (*ExternalRun, error)
func (*Service) SubscribeSession ¶
func (*Service) VerifyProfile ¶
func (s *Service) VerifyProfile(ctx context.Context, id string, candidate *AgentProfile) (*ProfileVerifyResult, error)
type SessionDetail ¶
type SessionDetail struct {
Session ExternalSession `json:"session"`
Profile *AgentProfile `json:"profile,omitempty"`
ActiveRun *ExternalRun `json:"active_run,omitempty"`
History []SessionHistoryItem `json:"history,omitempty"`
}
type SessionHistoryItem ¶
type SessionHistoryItem = publicagentcore.SessionHistoryItem
type SessionStatus ¶
type SessionStatus = publicagentcore.SessionStatus
const ( SessionStatusCreating SessionStatus = publicagentcore.SessionStatusCreating SessionStatusIdle SessionStatus = publicagentcore.SessionStatusIdle SessionStatusRunning SessionStatus = publicagentcore.SessionStatusRunning SessionStatusCancelling SessionStatus = publicagentcore.SessionStatusCancelling SessionStatusClosed SessionStatus = publicagentcore.SessionStatusClosed SessionStatusError SessionStatus = publicagentcore.SessionStatusError )
type StreamRunRequest ¶
type StreamRunRequest = publicagentcore.StreamRunRequest
type SubmitRunRequest ¶
type SubmitRunRequest = publicagentcore.SubmitRunRequest
type SubmitRunResult ¶
type SubmitRunResult = publicagentcore.SubmitRunResult
Click to show internal directories.
Click to hide internal directories.