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

Method createSession

internal/daemon/server.go:322–333  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

320}
321
322func (s Server) createSession(w http.ResponseWriter, r *http.Request) {
323 var req struct {
324 LeaseID string `json:"lease_id"`
325 }
326 if !decodeJSON(w, r, &req) {
327 return
328 }
329 s.lockWrites()
330 defer s.unlockWrites()
331 id, err := s.control().CreateSession(req.LeaseID)
332 writeResult(w, map[string]any{"session_id": id}, err)
333}
334
335func (s Server) listSessions(w http.ResponseWriter, r *http.Request) {
336 items, err := s.control().ListSessions()

Callers

nothing calls this directly

Calls 6

lockWritesMethod · 0.95
unlockWritesMethod · 0.95
controlMethod · 0.95
decodeJSONFunction · 0.85
writeResultFunction · 0.85
CreateSessionMethod · 0.65

Tested by

no test coverage detected