mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-13 04:14:56 +00:00
docs(store): restore inline doc comments on interface methods
Restore 3 godoc comments that were accidentally dropped during AgentStore/SessionStore interface split: GetDefault hint, CanAccess return values, and Get vs GetOrCreate distinction.
This commit is contained in:
1 parent
382ec9aa51
commit
9a24995e56
2 files changed
+3
-2
No files matched your search
@@ -322,7 +322,7 @@ type AgentCRUDStore interface {
|
||||
Update(ctx context.Context, id uuid.UUID, updates map[string]any) error
|
||||
Delete(ctx context.Context, id uuid.UUID) error
|
||||
List(ctx context.Context, ownerID string) ([]AgentData, error)
|
||||
GetDefault(ctx context.Context) (*AgentData, error)
|
||||
GetDefault(ctx context.Context) (*AgentData, error) // agent with is_default=true, or first available
|
||||
}
|
||||
|
||||
// AgentAccessStore manages agent sharing and access control.
|
||||
@@ -330,7 +330,7 @@ type AgentAccessStore interface {
|
||||
ShareAgent(ctx context.Context, agentID uuid.UUID, userID, role, grantedBy string) error
|
||||
RevokeShare(ctx context.Context, agentID uuid.UUID, userID string) error
|
||||
ListShares(ctx context.Context, agentID uuid.UUID) ([]AgentShareData, error)
|
||||
CanAccess(ctx context.Context, agentID uuid.UUID, userID string) (bool, string, error)
|
||||
CanAccess(ctx context.Context, agentID uuid.UUID, userID string) (bool, string, error) // (allowed, role, err)
|
||||
ListAccessible(ctx context.Context, userID string) ([]AgentData, error)
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ type SessionListRichResult struct {
|
||||
// SessionCoreStore manages session lifecycle, messages, and history.
|
||||
type SessionCoreStore interface {
|
||||
GetOrCreate(ctx context.Context, key string) *SessionData
|
||||
// Get returns the session if it exists (cache or DB), nil otherwise. Never creates.
|
||||
Get(ctx context.Context, key string) *SessionData
|
||||
AddMessage(ctx context.Context, key string, msg providers.Message)
|
||||
GetHistory(ctx context.Context, key string) []providers.Message
|
||||
|
||||
Reference in new issue
Block a user