Documentation
¶
Index ¶
- Variables
- func RegisterBackend(name string, factory BackendFactory)
- func WithRecordOwner(ctx context.Context, owner RecordOwner) context.Context
- type AudioAsset
- type AudioAssetInput
- type AudioAssetStore
- type AudioStorageKind
- type BackendFactory
- type DeleteResult
- type ListOpts
- type PostgresStore
- func (s *PostgresStore) Close() error
- func (s *PostgresStore) DB() *sql.DB
- func (s *PostgresStore) DeleteQuickNote(ctx context.Context, id int64) error
- func (s *PostgresStore) DeleteScope(_ context.Context, _ speechstorage.Scope) (DeleteResult, error)
- func (s *PostgresStore) ExportScope(_ context.Context, _ speechstorage.Scope) (*ScopeExport, error)
- func (s *PostgresStore) GetAudioAsset(ctx context.Context, ownerKind string, ownerID int64) (*AudioAsset, error)
- func (s *PostgresStore) GetQuickNote(ctx context.Context, id int64) (*QuickNote, error)
- func (s *PostgresStore) GetTranscription(ctx context.Context, id int64) (*Transcription, error)
- func (s *PostgresStore) GetVoiceAgentSession(ctx context.Context, id int64) (*VoiceAgentSession, error)
- func (s *PostgresStore) ListQuickNotes(ctx context.Context, opts ListOpts) ([]QuickNote, error)
- func (s *PostgresStore) ListTranscriptions(ctx context.Context, opts ListOpts) ([]Transcription, error)
- func (s *PostgresStore) ListUserDictionaryEntries(ctx context.Context, language string) ([]UserDictionaryEntry, error)
- func (s *PostgresStore) ListVoiceAgentSessions(ctx context.Context, opts ListOpts) ([]VoiceAgentSession, error)
- func (s *PostgresStore) PinQuickNote(ctx context.Context, id int64, pinned bool) error
- func (s *PostgresStore) QuickNoteCount(ctx context.Context) (int, error)
- func (s *PostgresStore) RecordUserDictionaryUsage(ctx context.Context, canonical, language string) error
- func (s *PostgresStore) ReplaceUserDictionaryEntries(ctx context.Context, language string, entries []UserDictionaryEntry) error
- func (s *PostgresStore) SaveQuickNote(ctx context.Context, text, language, provider string, ...) (int64, error)
- func (s *PostgresStore) SaveTranscription(ctx context.Context, text, language, provider, model string, ...) error
- func (s *PostgresStore) SaveTranscriptionWithAudio(ctx context.Context, text, language, provider, model string, ...) error
- func (s *PostgresStore) SaveVoiceAgentSession(ctx context.Context, session VoiceAgentSession) (int64, error)
- func (s *PostgresStore) SemanticCapabilities(context.Context) SemanticCapabilities
- func (s *PostgresStore) Stats(ctx context.Context) (Stats, error)
- func (s *PostgresStore) TranscriptionCount(ctx context.Context) (int, error)
- func (s *PostgresStore) UpdateQuickNote(ctx context.Context, id int64, text string) error
- func (s *PostgresStore) UpdateQuickNoteCapture(ctx context.Context, id int64, text, provider string, ...) error
- type QuickNote
- type RecordOwner
- type SQLiteStore
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) DB() *sql.DB
- func (s *SQLiteStore) DeleteQuickNote(ctx context.Context, id int64) error
- func (s *SQLiteStore) DeleteScope(ctx context.Context, scope speechstorage.Scope) (DeleteResult, error)
- func (s *SQLiteStore) ExportScope(ctx context.Context, scope speechstorage.Scope) (*ScopeExport, error)
- func (s *SQLiteStore) GetAudioAsset(ctx context.Context, ownerKind string, ownerID int64) (*AudioAsset, error)
- func (s *SQLiteStore) GetQuickNote(ctx context.Context, id int64) (*QuickNote, error)
- func (s *SQLiteStore) GetTranscription(ctx context.Context, id int64) (*Transcription, error)
- func (s *SQLiteStore) GetVoiceAgentSession(ctx context.Context, id int64) (*VoiceAgentSession, error)
- func (s *SQLiteStore) ListQuickNotes(ctx context.Context, opts ListOpts) ([]QuickNote, error)
- func (s *SQLiteStore) ListTranscriptions(ctx context.Context, opts ListOpts) ([]Transcription, error)
- func (s *SQLiteStore) ListUserDictionaryEntries(ctx context.Context, language string) ([]UserDictionaryEntry, error)
- func (s *SQLiteStore) ListVoiceAgentSessions(ctx context.Context, opts ListOpts) ([]VoiceAgentSession, error)
- func (s *SQLiteStore) PinQuickNote(ctx context.Context, id int64, pinned bool) error
- func (s *SQLiteStore) QuickNoteCount(ctx context.Context) (int, error)
- func (s *SQLiteStore) RecordUserDictionaryUsage(ctx context.Context, canonical, language string) error
- func (s *SQLiteStore) ReplaceUserDictionaryEntries(ctx context.Context, language string, entries []UserDictionaryEntry) error
- func (s *SQLiteStore) SaveQuickNote(ctx context.Context, text, language, provider string, ...) (int64, error)
- func (s *SQLiteStore) SaveTranscription(ctx context.Context, text, language, provider, model string, ...) error
- func (s *SQLiteStore) SaveTranscriptionWithAudio(ctx context.Context, text, language, provider, model string, ...) error
- func (s *SQLiteStore) SaveVoiceAgentSession(ctx context.Context, session VoiceAgentSession) (int64, error)
- func (s *SQLiteStore) SemanticCapabilities(context.Context) SemanticCapabilities
- func (s *SQLiteStore) Stats(ctx context.Context) (Stats, error)
- func (s *SQLiteStore) TranscriptionCount(ctx context.Context) (int, error)
- func (s *SQLiteStore) UpdateQuickNote(ctx context.Context, id int64, text string) error
- func (s *SQLiteStore) UpdateQuickNoteCapture(ctx context.Context, id int64, text, provider string, ...) error
- type Scope
- type ScopeExport
- type ScopePrivacyStore
- type SemanticCapabilities
- type SemanticCapabilityProvider
- type SemanticProvider
- type Stats
- type Store
- type StoreConfig
- type Transcription
- type TranscriptionAudioStore
- type UserDictionaryEntry
- type UserDictionaryStore
- type VoiceAgentSession
- type VoiceAgentSessionStore
- type VoiceAgentSessionSummary
- type VoiceAgentTurn
Constants ¶
This section is empty.
Variables ¶
var ErrPrivacyNotImplementedForBackend = errors.New(
"privacy: not implemented for postgres backend (Phase-2 follow-up, cpv.2.4)")
ErrPrivacyNotImplementedForBackend is returned by the Postgres stubs for ExportScope and DeleteScope. Customer install path defaults to SQLite; Postgres subject-rights support is planned for Phase 2.
Functions ¶
func RegisterBackend ¶
func RegisterBackend(name string, factory BackendFactory)
RegisterBackend allows external modules (e.g. kombify) to register custom backends. Called from init() in private modules -- SpeechKit itself never knows about kombify.
func WithRecordOwner ¶ added in v0.30.0
func WithRecordOwner(ctx context.Context, owner RecordOwner) context.Context
Types ¶
type AudioAsset ¶
type AudioAsset struct {
StorageKind AudioStorageKind `json:"storageKind"`
Path string `json:"-"`
MimeType string `json:"mimeType"`
SizeBytes int64 `json:"sizeBytes"`
DurationMs int64 `json:"durationMs"`
}
type AudioAssetInput ¶ added in v0.30.0
type AudioAssetStore ¶ added in v0.31.0
type AudioAssetStore interface {
GetAudioAsset(ctx context.Context, ownerKind string, ownerID int64) (*AudioAsset, error)
}
AudioAssetStore is an optional extension for backends that persist first-class audio asset metadata alongside legacy audio_path columns.
type AudioStorageKind ¶
type AudioStorageKind string
const (
AudioStorageLocalFile AudioStorageKind = "local-file"
)
type BackendFactory ¶
type BackendFactory func(cfg StoreConfig) (Store, error)
BackendFactory creates a Store from config.
type DeleteResult ¶ added in v0.35.0
type DeleteResult struct {
RowsDeleted int `json:"rows_deleted"`
AudioFilePaths []string `json:"audio_file_paths"`
}
DeleteResult is returned by DeleteScope. The caller is responsible for unlinking AudioFilePaths from disk; the store only removes DB rows.
type ListOpts ¶
type ListOpts struct {
Limit int
Offset int
Language string
After time.Time
OwnerUserID string
OwnerOrgID string
IncludeOwnerless bool
IncludeAllOwners bool
}
ListOpts controls pagination and filtering for list queries.
type PostgresStore ¶
type PostgresStore struct {
// contains filtered or unexported fields
}
PostgresStore implements Store using PostgreSQL for metadata and the local filesystem for optional raw WAV persistence.
func NewPostgresStore ¶
func NewPostgresStore(cfg StoreConfig) (*PostgresStore, error)
NewPostgresStore creates a PostgreSQL-backed store.
func (*PostgresStore) Close ¶
func (s *PostgresStore) Close() error
func (*PostgresStore) DB ¶ added in v0.29.0
func (s *PostgresStore) DB() *sql.DB
DB exposes the underlying *sql.DB for adjacent table-scoped persisters. The caller must not close the returned handle.
func (*PostgresStore) DeleteQuickNote ¶
func (s *PostgresStore) DeleteQuickNote(ctx context.Context, id int64) error
func (*PostgresStore) DeleteScope ¶ added in v0.35.0
func (s *PostgresStore) DeleteScope(_ context.Context, _ speechstorage.Scope) (DeleteResult, error)
func (*PostgresStore) ExportScope ¶ added in v0.35.0
func (s *PostgresStore) ExportScope(_ context.Context, _ speechstorage.Scope) (*ScopeExport, error)
func (*PostgresStore) GetAudioAsset ¶ added in v0.31.0
func (s *PostgresStore) GetAudioAsset(ctx context.Context, ownerKind string, ownerID int64) (*AudioAsset, error)
func (*PostgresStore) GetQuickNote ¶
func (*PostgresStore) GetTranscription ¶
func (s *PostgresStore) GetTranscription(ctx context.Context, id int64) (*Transcription, error)
func (*PostgresStore) GetVoiceAgentSession ¶ added in v0.30.0
func (s *PostgresStore) GetVoiceAgentSession(ctx context.Context, id int64) (*VoiceAgentSession, error)
func (*PostgresStore) ListQuickNotes ¶
func (*PostgresStore) ListTranscriptions ¶
func (s *PostgresStore) ListTranscriptions(ctx context.Context, opts ListOpts) ([]Transcription, error)
func (*PostgresStore) ListUserDictionaryEntries ¶ added in v0.22.4
func (s *PostgresStore) ListUserDictionaryEntries(ctx context.Context, language string) ([]UserDictionaryEntry, error)
func (*PostgresStore) ListVoiceAgentSessions ¶ added in v0.24.0
func (s *PostgresStore) ListVoiceAgentSessions(ctx context.Context, opts ListOpts) ([]VoiceAgentSession, error)
func (*PostgresStore) PinQuickNote ¶
func (*PostgresStore) QuickNoteCount ¶
func (s *PostgresStore) QuickNoteCount(ctx context.Context) (int, error)
func (*PostgresStore) RecordUserDictionaryUsage ¶ added in v0.22.4
func (s *PostgresStore) RecordUserDictionaryUsage(ctx context.Context, canonical, language string) error
func (*PostgresStore) ReplaceUserDictionaryEntries ¶ added in v0.22.4
func (s *PostgresStore) ReplaceUserDictionaryEntries(ctx context.Context, language string, entries []UserDictionaryEntry) error
func (*PostgresStore) SaveQuickNote ¶
func (*PostgresStore) SaveTranscription ¶
func (*PostgresStore) SaveTranscriptionWithAudio ¶ added in v0.30.0
func (s *PostgresStore) SaveTranscriptionWithAudio(ctx context.Context, text, language, provider, model string, durationMs, latencyMs int64, audio AudioAssetInput) error
func (*PostgresStore) SaveVoiceAgentSession ¶ added in v0.24.0
func (s *PostgresStore) SaveVoiceAgentSession(ctx context.Context, session VoiceAgentSession) (int64, error)
func (*PostgresStore) SemanticCapabilities ¶
func (s *PostgresStore) SemanticCapabilities(context.Context) SemanticCapabilities
func (*PostgresStore) TranscriptionCount ¶
func (s *PostgresStore) TranscriptionCount(ctx context.Context) (int, error)
func (*PostgresStore) UpdateQuickNote ¶
func (*PostgresStore) UpdateQuickNoteCapture ¶
type QuickNote ¶
type QuickNote struct {
ID int64
Text string
Language string
Provider string
DurationMs int64
LatencyMs int64
AudioPath string
Audio *AudioAsset
Pinned bool
CreatedAt time.Time
UpdatedAt time.Time
}
QuickNote represents a user-created dictation note.
type RecordOwner ¶ added in v0.30.0
RecordOwner captures the caller identity persisted with server-owned records. Store does not import server middleware, so HTTP handlers translate auth identity into this small value.
func RecordOwnerFromContext ¶ added in v0.30.0
func RecordOwnerFromContext(ctx context.Context) (RecordOwner, bool)
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
SQLiteStore implements Store using a local SQLite database. Uses modernc.org/sqlite (pure Go, no CGo required).
func NewSQLiteStore ¶
func NewSQLiteStore(cfg StoreConfig) (*SQLiteStore, error)
NewSQLiteStore opens or creates a SQLite feedback database.
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
func (*SQLiteStore) DB ¶ added in v0.26.0
func (s *SQLiteStore) DB() *sql.DB
DB exposes the underlying *sql.DB so adjacent packages can build their own table-scoped persisters (e.g. the persona catalog in internal/server/persona) without the base Store interface needing to enumerate every optional capability. Callers must treat the returned handle as read-mostly: it is owned by the Store and must not be closed.
func (*SQLiteStore) DeleteQuickNote ¶
func (s *SQLiteStore) DeleteQuickNote(ctx context.Context, id int64) error
func (*SQLiteStore) DeleteScope ¶ added in v0.35.0
func (s *SQLiteStore) DeleteScope(ctx context.Context, scope speechstorage.Scope) (DeleteResult, error)
DeleteScope removes all user-owned DB rows for the given scope across every scoped table and returns a DeleteResult with the total count of deleted rows and the distinct audio file paths that were stored under that scope (GDPR Art. 17).
Deletion order respects foreign-key constraints:
- Collect audio file paths (before rows are gone)
- Link tables (transcription_audio_assets, quick_note_audio_assets)
- audio_assets
- voice_agent_session_turns, voice_agent_session_summary_items
- voice_agent_sessions
- transcriptions
- quick_notes
- user_dictionary_entries
- store_stats row (reset to zero counts)
NOTE: Audio files on disk are NOT deleted here; only DB rows are removed. The caller receives AudioFilePaths in the returned DeleteResult and is responsible for unlinking them.
func (*SQLiteStore) ExportScope ¶ added in v0.35.0
func (s *SQLiteStore) ExportScope(ctx context.Context, scope speechstorage.Scope) (*ScopeExport, error)
ExportScope returns all user-owned records for the given scope (GDPR Art. 15).
Implementation notes:
- Fetches all rows for the scope without pagination (no LIMIT imposed).
- Audio file paths are collected from audio_assets so the caller can stream raw bytes alongside the exported JSON if needed.
- Read-only; never modifies data.
func (*SQLiteStore) GetAudioAsset ¶ added in v0.31.0
func (s *SQLiteStore) GetAudioAsset(ctx context.Context, ownerKind string, ownerID int64) (*AudioAsset, error)
func (*SQLiteStore) GetQuickNote ¶
func (*SQLiteStore) GetTranscription ¶
func (s *SQLiteStore) GetTranscription(ctx context.Context, id int64) (*Transcription, error)
func (*SQLiteStore) GetVoiceAgentSession ¶ added in v0.30.0
func (s *SQLiteStore) GetVoiceAgentSession(ctx context.Context, id int64) (*VoiceAgentSession, error)
func (*SQLiteStore) ListQuickNotes ¶
func (*SQLiteStore) ListTranscriptions ¶
func (s *SQLiteStore) ListTranscriptions(ctx context.Context, opts ListOpts) ([]Transcription, error)
func (*SQLiteStore) ListUserDictionaryEntries ¶ added in v0.22.4
func (s *SQLiteStore) ListUserDictionaryEntries(ctx context.Context, language string) ([]UserDictionaryEntry, error)
func (*SQLiteStore) ListVoiceAgentSessions ¶ added in v0.24.0
func (s *SQLiteStore) ListVoiceAgentSessions(ctx context.Context, opts ListOpts) ([]VoiceAgentSession, error)
func (*SQLiteStore) PinQuickNote ¶
func (*SQLiteStore) QuickNoteCount ¶
func (s *SQLiteStore) QuickNoteCount(ctx context.Context) (int, error)
func (*SQLiteStore) RecordUserDictionaryUsage ¶ added in v0.22.4
func (s *SQLiteStore) RecordUserDictionaryUsage(ctx context.Context, canonical, language string) error
func (*SQLiteStore) ReplaceUserDictionaryEntries ¶ added in v0.22.4
func (s *SQLiteStore) ReplaceUserDictionaryEntries(ctx context.Context, language string, entries []UserDictionaryEntry) error
func (*SQLiteStore) SaveQuickNote ¶
func (*SQLiteStore) SaveTranscription ¶
func (*SQLiteStore) SaveTranscriptionWithAudio ¶ added in v0.30.0
func (s *SQLiteStore) SaveTranscriptionWithAudio(ctx context.Context, text, language, provider, model string, durationMs, latencyMs int64, audio AudioAssetInput) error
func (*SQLiteStore) SaveVoiceAgentSession ¶ added in v0.24.0
func (s *SQLiteStore) SaveVoiceAgentSession(ctx context.Context, session VoiceAgentSession) (int64, error)
func (*SQLiteStore) SemanticCapabilities ¶
func (s *SQLiteStore) SemanticCapabilities(context.Context) SemanticCapabilities
func (*SQLiteStore) TranscriptionCount ¶
func (s *SQLiteStore) TranscriptionCount(ctx context.Context) (int, error)
func (*SQLiteStore) UpdateQuickNote ¶
func (*SQLiteStore) UpdateQuickNoteCapture ¶
type Scope ¶ added in v0.35.0
type Scope = speechstorage.Scope
Scope is an alias for the public speechkit storage Scope, re-exported so callers within this package (and callers that only import store) do not need to reference the pkg/speechkit/storage sub-package directly.
type ScopeExport ¶ added in v0.35.0
type ScopeExport struct {
Scope Scope `json:"scope"`
Transcriptions []Transcription `json:"transcriptions"`
QuickNotes []QuickNote `json:"quick_notes"`
VoiceAgentSessions []VoiceAgentSession `json:"voice_agent_sessions"`
DictionaryEntries []UserDictionaryEntry `json:"dictionary_entries,omitempty"`
AudioAssetPaths []string `json:"audio_asset_paths"`
}
ScopeExport is the structured payload returned by ExportScope (GDPR Art. 15).
type ScopePrivacyStore ¶ added in v0.35.0
type ScopePrivacyStore interface {
// ExportScope returns all user-owned records for the given scope. The
// returned ScopeExport includes audio asset paths; the caller is
// responsible for streaming the raw audio bytes if needed.
ExportScope(ctx context.Context, scope Scope) (*ScopeExport, error)
// DeleteScope removes all user-owned DB rows for the given scope across
// every scoped table. Returns a DeleteResult with the total row count and
// the distinct audio file paths that were associated with those rows.
// The caller must unlink AudioFilePaths from disk; the store does not.
DeleteScope(ctx context.Context, scope Scope) (DeleteResult, error)
}
ScopePrivacyStore is an optional extension for backends that implement GDPR Subject-Rights operations scoped to a Storage-3.0 scope.
Both methods operate entirely within the scope boundaries — no cross-scope data is ever returned or deleted. Audio files on disk are NOT removed by DeleteScope (only the database rows are deleted). The caller receives the paths in DeleteResult and is responsible for unlinking them. Disk cleanup for ExportScope is the caller's responsibility (stream the paths returned in AudioAssetPaths alongside the JSON).
type SemanticCapabilities ¶
type SemanticCapabilities struct {
Provider SemanticProvider `json:"provider"`
FullText bool `json:"fullText"`
Embeddings bool `json:"embeddings"`
VectorSearch bool `json:"vectorSearch"`
}
type SemanticCapabilityProvider ¶
type SemanticCapabilityProvider interface {
SemanticCapabilities(ctx context.Context) SemanticCapabilities
}
SemanticCapabilityProvider is an optional extension for stores that can advertise indexing/vector capabilities without forcing every backend to implement semantic features immediately.
type SemanticProvider ¶
type SemanticProvider string
const (
SemanticProviderNone SemanticProvider = "none"
)
type Store ¶
type Store interface {
// Transcriptions
SaveTranscription(ctx context.Context, text, language, provider, model string, durationMs, latencyMs int64, audioData []byte) error
GetTranscription(ctx context.Context, id int64) (*Transcription, error)
ListTranscriptions(ctx context.Context, opts ListOpts) ([]Transcription, error)
TranscriptionCount(ctx context.Context) (int, error)
// Quick Notes
SaveQuickNote(ctx context.Context, text, language, provider string, durationMs, latencyMs int64, audioData []byte) (int64, error)
GetQuickNote(ctx context.Context, id int64) (*QuickNote, error)
ListQuickNotes(ctx context.Context, opts ListOpts) ([]QuickNote, error)
UpdateQuickNote(ctx context.Context, id int64, text string) error
UpdateQuickNoteCapture(ctx context.Context, id int64, text, provider string, durationMs, latencyMs int64, audioData []byte) error
PinQuickNote(ctx context.Context, id int64, pinned bool) error
DeleteQuickNote(ctx context.Context, id int64) error
QuickNoteCount(ctx context.Context) (int, error)
Stats(ctx context.Context) (Stats, error)
// Lifecycle
Close() error
}
Store is the central storage abstraction. Each backend (SQLite, PostgreSQL, kombify Cloud) implements this interface.
func New ¶
func New(cfg StoreConfig) (Store, error)
New creates a Store backend based on the config.
type StoreConfig ¶
type StoreConfig struct {
Backend string `toml:"backend"` // "sqlite" | "postgres" | registered name
SQLitePath string `toml:"sqlite_path"`
PostgresDSN string `toml:"postgres_dsn"`
SaveAudio bool `toml:"save_audio"`
AudioRetentionDays int `toml:"audio_retention_days"`
MaxAudioStorageMB int `toml:"max_audio_storage_mb"`
TranscriptionModelHints map[string]string
DefaultScope speechstorage.Scope
ScopePolicy speechstorage.ScopePolicy
}
StoreConfig holds configuration for store backend selection.
type Transcription ¶
type Transcription struct {
ID int64 `json:"id"`
Text string `json:"text"`
Language string `json:"language"`
Provider string `json:"provider"`
Model string `json:"model"`
DurationMs int64 `json:"durationMs"`
LatencyMs int64 `json:"latencyMs"`
AudioPath string `json:"audioPath,omitempty"`
Audio *AudioAsset `json:"audio,omitempty"`
CreatedAt time.Time `json:"createdAt"`
OwnerUserID string `json:"ownerUserId,omitempty"`
OwnerOrgID string `json:"ownerOrgId,omitempty"`
OwnerSource string `json:"ownerSource,omitempty"`
}
Transcription represents a saved transcription record.
type TranscriptionAudioStore ¶ added in v0.30.0
type TranscriptionAudioStore interface {
SaveTranscriptionWithAudio(ctx context.Context, text, language, provider, model string, durationMs, latencyMs int64, audio AudioAssetInput) error
}
TranscriptionAudioStore is implemented by stores that can persist transcription audio with accurate source metadata.
type UserDictionaryEntry ¶ added in v0.22.4
type UserDictionaryStore ¶ added in v0.22.4
type UserDictionaryStore interface {
ReplaceUserDictionaryEntries(ctx context.Context, language string, entries []UserDictionaryEntry) error
ListUserDictionaryEntries(ctx context.Context, language string) ([]UserDictionaryEntry, error)
RecordUserDictionaryUsage(ctx context.Context, canonical, language string) error
}
UserDictionaryStore is an optional extension for stores that persist user-specific dictation terms outside config.toml.
type VoiceAgentSession ¶ added in v0.24.0
type VoiceAgentSession struct {
ID int64 `json:"id"`
StartedAt time.Time `json:"startedAt"`
EndedAt time.Time `json:"endedAt"`
Language string `json:"language"`
ProviderProfileID string `json:"providerProfileId,omitempty"`
RuntimeKind string `json:"runtimeKind,omitempty"`
Transcript string `json:"transcript,omitempty"`
Turns []VoiceAgentTurn `json:"turns,omitempty"`
Summary VoiceAgentSessionSummary `json:"summary"`
CreatedAt time.Time `json:"createdAt"`
OwnerUserID string `json:"ownerUserId,omitempty"`
OwnerOrgID string `json:"ownerOrgId,omitempty"`
OwnerSource string `json:"ownerSource,omitempty"`
}
type VoiceAgentSessionStore ¶ added in v0.24.0
type VoiceAgentSessionStore interface {
SaveVoiceAgentSession(ctx context.Context, session VoiceAgentSession) (int64, error)
GetVoiceAgentSession(ctx context.Context, id int64) (*VoiceAgentSession, error)
ListVoiceAgentSessions(ctx context.Context, opts ListOpts) ([]VoiceAgentSession, error)
}
VoiceAgentSessionStore is an optional extension for backends that persist Voice Agent dialogue summaries.
type VoiceAgentSessionSummary ¶ added in v0.24.0
type VoiceAgentSessionSummary struct {
Title string `json:"title,omitempty"`
Summary string `json:"summary"`
Ideas []string `json:"ideas,omitempty"`
Decisions []string `json:"decisions,omitempty"`
OpenQuestions []string `json:"openQuestions,omitempty"`
NextSteps []string `json:"nextSteps,omitempty"`
RawText string `json:"rawText,omitempty"`
}