Files
goclaw/internal/store/sqlitestore/subagent_tasks.go
T
viettranx d8fc97ec63 feat(store): persist subagent tasks to PostgreSQL (#600)
- Migration 000034: subagent_tasks table with tenant scope, JSONB
  metadata + GIN index, partial index for archival candidates
- SubagentTaskStore interface with Create/Get/UpdateStatus/List/Archive
- PG implementation with parameterized queries and tenant isolation
- SQLite schema v3→4 migration + no-op stub for Lite edition
- Wire into store.Stores and factories
2026-03-31 11:45:03 +07:00

39 lines
1.3 KiB
Go

//go:build sqlite || sqliteonly
package sqlitestore
import (
"context"
"time"
"github.com/google/uuid"
"github.com/nextlevelbuilder/goclaw/internal/store"
)
// SQLiteSubagentTaskStore is a no-op implementation for the desktop/lite edition.
// Subagent task persistence is a standard-edition feature.
type SQLiteSubagentTaskStore struct{}
func NewSQLiteSubagentTaskStore() *SQLiteSubagentTaskStore { return &SQLiteSubagentTaskStore{} }
func (s *SQLiteSubagentTaskStore) Create(context.Context, *store.SubagentTaskData) error { return nil }
func (s *SQLiteSubagentTaskStore) Get(context.Context, uuid.UUID) (*store.SubagentTaskData, error) {
return nil, nil
}
func (s *SQLiteSubagentTaskStore) UpdateStatus(context.Context, uuid.UUID, string, *string, int, int64, int64) error {
return nil
}
func (s *SQLiteSubagentTaskStore) ListByParent(context.Context, string, string) ([]store.SubagentTaskData, error) {
return nil, nil
}
func (s *SQLiteSubagentTaskStore) ListBySession(context.Context, string) ([]store.SubagentTaskData, error) {
return nil, nil
}
func (s *SQLiteSubagentTaskStore) Archive(context.Context, time.Duration) (int64, error) {
return 0, nil
}
func (s *SQLiteSubagentTaskStore) UpdateMetadata(context.Context, uuid.UUID, map[string]any) error {
return nil
}