session

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActiveSession added in v0.1.7

func GetActiveSession(store *kvstore.Store, agentName, projectKey, workspaceName, projectDir string) (string, error)

GetActiveSession reads the active session name from the KV store, falling back to the filesystem.

func ListNames

func ListNames(workspaceName, agentName, projectDir string) ([]string, error)

ListNames returns all named sessions for a workspace/agent/project.

func ListNamesKV added in v0.1.7

func ListNamesKV(store *kvstore.Store, agentName, projectKey, workspaceName, projectDir string) ([]string, error)

ListNamesKV returns all named sessions from the KV store for an agent/project, falling back to the filesystem when KV has no entries.

func LoadResumeToken added in v0.1.7

func LoadResumeToken(store *kvstore.Store, agentName, projectKey, sessionKey, workspaceName, projectDir string) (string, error)

LoadResumeToken reads a resume token from the KV store, falling back to the filesystem for backward compatibility.

func ProjectResumeDir

func ProjectResumeDir(workspaceName, agentName, projectDir string) string

ProjectResumeDir returns the project-scoped resume directory for a workspace/agent.

func ProjectSessionsDir

func ProjectSessionsDir(workspaceName, agentName, projectDir string) string

ProjectSessionsDir returns the project-scoped sessions directory.

func RemoveByName

func RemoveByName(workspaceName, agentName, projectDir, sessionName string) (bool, error)

RemoveByName removes all stored instances of a named session. Returns true when at least one session directory was removed.

func RemoveByNameKV added in v0.1.7

func RemoveByNameKV(store *kvstore.Store, agentName, projectKey, workspaceName, projectDir, sessionName string) (bool, error)

RemoveByNameKV removes a named session from the KV store and filesystem.

func ResolveSelector

func ResolveSelector(workspaceName, agentName, projectDir, selector string) (string, bool, error)

ResolveSelector resolves a session selector to the canonical session name. Selector may be:

  1. exact session name
  2. exact session directory key/id
  3. unique prefix of a session directory key/id

func SaveResumeToken added in v0.1.7

func SaveResumeToken(store *kvstore.Store, agentName, projectKey, sessionKey, token string) error

SaveResumeToken writes a resume token to the KV store for the given session.

func SaveSessionName added in v0.1.7

func SaveSessionName(store *kvstore.Store, agentName, projectKey, sessionKey, name string) error

SaveSessionName writes the session name to the KV store for a given session key.

func SetActiveSession added in v0.1.7

func SetActiveSession(store *kvstore.Store, agentName, projectKey, name string) error

SetActiveSession writes the active session name to the KV store.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL