Documentation
¶
Overview ¶
Package controlplane wires the public HTTP resource semantics to the PostgreSQL ledger and Temporal admission boundary.
Index ¶
- type EventService
- type MessageFileReader
- type OutcomeRubricReader
- type SessionOrchestrator
- type SessionService
- func (s *SessionService) Archive(ctx context.Context, id string) (domain.Session, error)
- func (s *SessionService) Create(ctx context.Context, input app.CreateSessionInput) (domain.Session, error)
- func (s *SessionService) Delete(ctx context.Context, id string) error
- func (s *SessionService) EnableFileMessageContent(reader MessageFileReader)
- func (s *SessionService) EnableFileOutcomeRubrics(reader OutcomeRubricReader)
- func (s *SessionService) EnableMemoryStoreResources(reader interface{ ... })
- func (s *SessionService) EnableVaults()
- func (s *SessionService) Get(ctx context.Context, id string) (domain.Session, error)
- func (s *SessionService) List(ctx context.Context, query app.ListPage) (app.SessionListPage, error)
- func (s *SessionService) SendEvent(ctx context.Context, id string, drafts []domain.EventDraft) ([]domain.Event, error)
- func (s *SessionService) Update(ctx context.Context, id string, update domain.SessionUpdate) (domain.Session, error)
- type SessionThreadService
- func (s *SessionThreadService) Archive(ctx context.Context, sessionID string, threadID string) (domain.SessionThread, error)
- func (s *SessionThreadService) Get(ctx context.Context, sessionID string, threadID string) (domain.SessionThread, error)
- func (s *SessionThreadService) List(ctx context.Context, sessionID string, query app.SessionThreadListQuery) ([]domain.SessionThread, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventService ¶
type EventService struct {
// contains filtered or unexported fields
}
EventService exposes filtered reads from the authoritative PostgreSQL event ledger.
func NewEventService ¶
func NewEventService(store *pg.Store) *EventService
type MessageFileReader ¶
type MessageFileReader interface {
ReadMessageFile(context.Context, string) (domain.FileMessageContent, error)
}
MessageFileReader resolves one top-level File into a bounded UTF-8 snapshot before event admission.
type OutcomeRubricReader ¶
OutcomeRubricReader resolves and validates one reusable Files API rubric.
type SessionOrchestrator ¶
type SessionOrchestrator interface {
CreateAPISession(
context.Context,
domain.Session,
[]domain.EventDraft,
...[]app.PreparedSessionResource,
) (domain.Session, []domain.Event, error)
Admit(context.Context, string, []domain.EventDraft) ([]domain.Event, error)
TerminateSession(context.Context, string) error
}
type SessionService ¶
type SessionService struct {
// contains filtered or unexported fields
}
SessionService owns public Session validation and delegates the atomic session/event admission boundary to PostgreSQL plus the Temporal outbox.
func NewSessionService ¶
func NewSessionService( store *pg.Store, agents app.AgentRepository, environments app.EnvironmentRepository, orchestrator SessionOrchestrator, ids domain.IDGenerator, clock domain.Clock, skillRef app.SkillReferenceResolver, ) *SessionService
func (*SessionService) Create ¶
func (s *SessionService) Create( ctx context.Context, input app.CreateSessionInput, ) (domain.Session, error)
func (*SessionService) Delete ¶
func (s *SessionService) Delete(ctx context.Context, id string) error
func (*SessionService) EnableFileMessageContent ¶
func (s *SessionService) EnableFileMessageContent(reader MessageFileReader)
EnableFileMessageContent installs the internal Files reader used to resolve and snapshot text-only document sources before event admission.
func (*SessionService) EnableFileOutcomeRubrics ¶
func (s *SessionService) EnableFileOutcomeRubrics(reader OutcomeRubricReader)
EnableFileOutcomeRubrics installs the internal Files reader used to resolve and snapshot reusable rubric text before event admission. This capability is independent of sandbox File mounts.
func (*SessionService) EnableMemoryStoreResources ¶
func (s *SessionService) EnableMemoryStoreResources(reader interface { GetStore(context.Context, string) (domain.MemoryStore, error) })
EnableMemoryStoreResources installs the deployment's Memory Store reader. Self-hosted workers synchronize admitted Stores through the public API.
func (*SessionService) EnableVaults ¶
func (s *SessionService) EnableVaults()
EnableVaults permits Session Vault attachments for deployments whose API and worker share a configured credential keyring.
func (*SessionService) List ¶
func (s *SessionService) List( ctx context.Context, query app.ListPage, ) (app.SessionListPage, error)
func (*SessionService) SendEvent ¶
func (s *SessionService) SendEvent( ctx context.Context, id string, drafts []domain.EventDraft, ) ([]domain.Event, error)
func (*SessionService) Update ¶
func (s *SessionService) Update( ctx context.Context, id string, update domain.SessionUpdate, ) (domain.Session, error)
Update applies the documented session update body. Validation of the merged result and the idle precondition for mid-session agent changes both run inside the store transaction that holds the session's admission lock, so a concurrent turn admission cannot slip between the check and the write.
type SessionThreadService ¶
type SessionThreadService struct {
// contains filtered or unexported fields
}
SessionThreadService exposes independently persisted execution projections. Child creation and execution remain a separate multi-agent runtime slice.
func NewSessionThreadService ¶
func NewSessionThreadService(store *pg.Store) *SessionThreadService
func (*SessionThreadService) Archive ¶
func (s *SessionThreadService) Archive( ctx context.Context, sessionID string, threadID string, ) (domain.SessionThread, error)
Archive maps the primary Thread lifecycle to the Session lifecycle and gives a child its independent PostgreSQL/Temporal shutdown path. A child must never archive the aggregate Session.
func (*SessionThreadService) Get ¶
func (s *SessionThreadService) Get( ctx context.Context, sessionID string, threadID string, ) (domain.SessionThread, error)
func (*SessionThreadService) List ¶
func (s *SessionThreadService) List( ctx context.Context, sessionID string, query app.SessionThreadListQuery, ) ([]domain.SessionThread, error)