mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-06-18 09:31:43 +00:00
6895e369f6
- Remove standalone mode code: file-based stores, standalone gateway, heartbeat service, SQLite memory, standalone docker-compose - Rename docker-compose.managed.yml → docker-compose.postgres.yml - Clean up ~130 Go comments referencing "managed mode" qualifier - Simplify docker-compose.yml env vars (providers/channels via web UI) - Update .env.example to essential vars only (token + encryption key) - Add setup wizard UI (provider → agent → channel bootstrap flow) - Add logs.tail WebSocket handler for live log streaming - Add cursor-pointer to interactive UI components - Clean up config page (remove standalone-only sections) - Update README and docs for managed-only architecture
35 lines
1.3 KiB
Go
35 lines
1.3 KiB
Go
package store
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
// BuiltinToolDef represents a built-in tool definition in the database.
|
|
// Built-in tools are seeded at startup and can be enabled/disabled or configured
|
|
// via the settings JSONB column.
|
|
type BuiltinToolDef struct {
|
|
Name string `json:"name"`
|
|
DisplayName string `json:"display_name"`
|
|
Description string `json:"description"`
|
|
Category string `json:"category"`
|
|
Enabled bool `json:"enabled"`
|
|
Settings json.RawMessage `json:"settings"`
|
|
Requires []string `json:"requires,omitempty"`
|
|
Metadata json.RawMessage `json:"metadata"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
// BuiltinToolStore manages built-in tool definitions.
|
|
// Built-in tools are seeded on startup; only enabled/settings are user-editable.
|
|
type BuiltinToolStore interface {
|
|
List(ctx context.Context) ([]BuiltinToolDef, error)
|
|
Get(ctx context.Context, name string) (*BuiltinToolDef, error)
|
|
Update(ctx context.Context, name string, updates map[string]any) error
|
|
Seed(ctx context.Context, tools []BuiltinToolDef) error
|
|
ListEnabled(ctx context.Context) ([]BuiltinToolDef, error)
|
|
GetSettings(ctx context.Context, name string) (json.RawMessage, error)
|
|
}
|