Documentation
¶
Index ¶
- func IsDefaultTitle(title string) bool
- func RecordSnapshot(sessionID, description string)
- func SetEvaluator(e evaluatorService)
- func SetIPCPublisher(p IPCPublisher)
- func SetLuaManager(fm *luaengine.FilterManager)
- func SetSnapshotCreator(sc SnapshotCreator)
- func TitleFromPrompt(prompt string) string
- type IPCPublisher
- type Service
- type Session
- type SnapshotCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDefaultTitle ¶ added in v0.647.5
IsDefaultTitle reports whether the title is one of the placeholder titles assigned at session creation time.
func RecordSnapshot ¶ added in v0.647.5
func RecordSnapshot(sessionID, description string)
RecordSnapshot asynchronously records a delta snapshot for a session. It is the hook used by the agent loop after every completed turn, so the session history contains the incremental changes the agent made instead of only the baseline captured at session start. It is a no-op when no snapshot creator is registered, and never blocks the caller.
func SetEvaluator ¶ added in v0.26.2
func SetEvaluator(e evaluatorService)
SetEvaluator sets the evaluator service used to trigger self-evaluation at session end.
func SetIPCPublisher ¶ added in v0.294.1
func SetIPCPublisher(p IPCPublisher)
SetIPCPublisher sets the ZMQ IPC publisher for cross-instance event broadcasting. Call this from app.go after the Bus is started (only for the primary instance).
func SetLuaManager ¶ added in v0.8.0
func SetLuaManager(fm *luaengine.FilterManager)
SetLuaManager sets the Lua filter manager used for session lifecycle hooks.
func SetSnapshotCreator ¶ added in v0.26.2
func SetSnapshotCreator(sc SnapshotCreator)
SetSnapshotCreator sets the snapshot creator used for session lifecycle snapshots.
func TitleFromPrompt ¶ added in v0.647.5
TitleFromPrompt builds a fallback title from the first user prompt: the first line, whitespace-collapsed, truncated to 100 runes with an ellipsis.
Types ¶
type IPCPublisher ¶ added in v0.294.1
IPCPublisher is the minimal interface used by session to publish ZMQ events. A local interface is used to avoid import cycles between session and ipc packages.
type Service ¶
type Service interface {
pubsub.Suscriber[Session]
Create(ctx context.Context, title string) (Session, error)
CreateTitleSession(ctx context.Context, parentSessionID string) (Session, error)
CreateTaskSession(ctx context.Context, toolCallID, parentSessionID, title string) (Session, error)
GetACPSessionState(ctx context.Context, sessionID string) (string, error)
Get(ctx context.Context, id string) (Session, error)
List(ctx context.Context) ([]Session, error)
SaveACPSessionState(ctx context.Context, sessionID string, state string) error
Save(ctx context.Context, session Session) (Session, error)
Delete(ctx context.Context, id string) error
EndSession(ctx context.Context, id string) error
}