MCPcopy Create free account
hub / github.com/ByteYellow/AgentProvenance / listSessions

Function listSessions

internal/cli/session_cmd.go:155–169  ·  view source on GitHub ↗
(dataDir, daemonURL string)

Source from the content-addressed store, hash-verified

153}
154
155func listSessions(dataDir, daemonURL string) ([]control.SessionInfo, error) {
156 if client, ok := daemonClient(daemonURL); ok {
157 return client.ListSessions()
158 }
159 paths, err := store.Init(dataDir)
160 if err != nil {
161 return nil, err
162 }
163 db, err := store.Open(paths)
164 if err != nil {
165 return nil, err
166 }
167 defer db.Close()
168 return control.Service{DB: db, Paths: paths}.ListSessions()
169}
170
171func inspectSession(dataDir, daemonURL, sessionID string) (control.SessionInfo, error) {
172 if client, ok := daemonClient(daemonURL); ok {

Callers 1

sessionCmdFunction · 0.85

Calls 5

InitFunction · 0.92
OpenFunction · 0.92
daemonClientFunction · 0.85
ListSessionsMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected