From 9a24995e56e8d3f528add53a5ad2d402f032daa8 Mon Sep 17 00:00:00 2001 From: viettranx Date: Wed, 25 Mar 2026 09:19:36 +0700 Subject: [PATCH] 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. --- internal/store/agent_store.go | 4 ++-- internal/store/session_store.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/store/agent_store.go b/internal/store/agent_store.go index aa5e204a..e7533790 100644 --- a/internal/store/agent_store.go +++ b/internal/store/agent_store.go @@ -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) } diff --git a/internal/store/session_store.go b/internal/store/session_store.go index bf2018b4..3d7bcaf8 100644 --- a/internal/store/session_store.go +++ b/internal/store/session_store.go @@ -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