MCPcopy Create free account
hub / github.com/compozy/agh / GetSession

Method GetSession

internal/cli/client.go:2771–2790  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

2769}
2770
2771func (c *unixSocketClient) GetSession(ctx context.Context, id string) (SessionRecord, error) {
2772 var response struct {
2773 Session SessionRecord `json:"session"`
2774 }
2775 path, err := c.sessionScopedPath(ctx, id, "")
2776 if err != nil {
2777 return SessionRecord{}, err
2778 }
2779 if err := c.doJSON(
2780 ctx,
2781 http.MethodGet,
2782 path,
2783 nil,
2784 nil,
2785 &response,
2786 ); err != nil {
2787 return SessionRecord{}, err
2788 }
2789 return response.Session, nil
2790}
2791
2792func (c *unixSocketClient) GetSessionHealth(ctx context.Context, id string) (SessionHealthRecord, error) {
2793 var response struct {

Callers 1

Calls 2

sessionScopedPathMethod · 0.95
doJSONMethod · 0.95

Tested by 1