Remove AI config approval flow

This commit is contained in:
npc0-hue
2026-09-22 15:33:32 +08:00
parent 20008b4043
commit a8b5d483a3
54 changed files with 364 additions and 875 deletions
-21
View File
@@ -147,13 +147,6 @@ type PluginLifecycleRepository interface {
Update(domain.PluginLifecycleInstallation) error
}
type AIConfigDiffRepository interface {
Create(domain.AIConfigDiffPreview) error
Get(id string) (domain.AIConfigDiffPreview, error)
List(domain.AIConfigDiffFilter) ([]domain.AIConfigDiffPreview, error)
Update(domain.AIConfigDiffPreview) error
}
type GameClientBridgeCommandRepository interface {
Create(domain.GameClientBridgeCommand) error
Get(id string) (domain.GameClientBridgeCommand, error)
@@ -247,7 +240,6 @@ type Store interface {
MetricSamples() MetricSampleRepository
Backups() BackupRepository
PluginLifecycles() PluginLifecycleRepository
AIConfigDiffs() AIConfigDiffRepository
GameClientBridgeCommands() GameClientBridgeCommandRepository
GameClientBridgeSnapshots() GameClientBridgeSnapshotRepository
GameClientBridgeSnapshotStreams() GameClientBridgeSnapshotStreamRepository
@@ -278,7 +270,6 @@ type MemoryStore struct {
metricSamples *memoryRepository[domain.MetricSample, domain.MetricSampleFilter]
backups *memoryRepository[domain.BackupRecord, domain.BackupFilter]
pluginLifecycle *memoryRepository[domain.PluginLifecycleInstallation, domain.PluginLifecycleFilter]
aiConfigDiffs *memoryRepository[domain.AIConfigDiffPreview, domain.AIConfigDiffFilter]
bridgeCommands *memoryGameClientBridgeCommandRepository
bridgeSnapshots *memoryGameClientBridgeSnapshotRepository
bridgeStreams *memoryRepository[domain.GameClientBridgeSnapshotStream, domain.GameClientBridgeSnapshotStreamFilter]
@@ -378,11 +369,6 @@ func NewMemoryStore() *MemoryStore {
domain.CopyPluginLifecycleInstallation,
matchPluginLifecycle,
),
aiConfigDiffs: newMemoryRepository(
func(preview domain.AIConfigDiffPreview) string { return preview.ID },
domain.CopyAIConfigDiffPreview,
matchAIConfigDiff,
),
bridgeCommands: newMemoryGameClientBridgeCommandRepository(),
bridgeSnapshots: newMemoryGameClientBridgeSnapshotRepository(),
bridgeStreams: newMemoryRepository(
@@ -421,7 +407,6 @@ func (store *MemoryStore) Backups() BackupRepository { retu
func (store *MemoryStore) PluginLifecycles() PluginLifecycleRepository {
return store.pluginLifecycle
}
func (store *MemoryStore) AIConfigDiffs() AIConfigDiffRepository { return store.aiConfigDiffs }
func (store *MemoryStore) GameClientBridgeCommands() GameClientBridgeCommandRepository {
return store.bridgeCommands
}
@@ -722,12 +707,6 @@ func matchPluginLifecycle(installation domain.PluginLifecycleInstallation, filte
(filter.CurrentState == "" || installation.CurrentState == filter.CurrentState)
}
func matchAIConfigDiff(preview domain.AIConfigDiffPreview, filter domain.AIConfigDiffFilter) bool {
return (filter.ServerInstanceID == "" || preview.ServerInstanceID == filter.ServerInstanceID) &&
(filter.PluginID == "" || preview.PluginID == filter.PluginID) &&
(filter.State == "" || preview.State == filter.State)
}
func matchGameClientBridgeCommand(command domain.GameClientBridgeCommand, filter domain.GameClientBridgeCommandFilter) bool {
return (filter.ServerInstanceID == "" || command.ServerInstanceID == filter.ServerInstanceID) &&
(filter.PluginID == "" || command.PluginID == filter.PluginID) &&