Documentation
¶
Overview ¶
Package jack provides a CLI for managing agentic development sessions.
Index ¶
- func AttachSession(name string) error
- func CreateSession(name, dir, shellCmd string) error
- func Execute()
- func HasSession(name string) bool
- func KillSession(name string) error
- func SessionName(team, repo string) string
- type BoardProvisioner
- type Cloner
- type Config
- type DepartureAnnouncer
- type DescriptionWriter
- type Env
- type FileLinker
- type GitConfig
- type GitHubConfig
- type KeyAdder
- type Lister
- type MatrixConfig
- type Profile
- type ProjectSelector
- type Registry
- type RegistryEntry
- type RegistryLoader
- type RegistrySaver
- type SSHConfig
- type SessionAttacher
- type SessionChecker
- type SessionCreator
- type SessionInfo
- type SessionKiller
- type TeamSelector
- type TmuxSession
- type TokenDecrypter
- type TokenEncrypter
- type TokenReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachSession ¶
AttachSession attaches to an existing tmux session, taking over the terminal.
func CreateSession ¶
CreateSession creates a detached tmux session running the given shell command in the given directory.
func HasSession ¶
HasSession checks whether a tmux session with the given name exists.
func SessionName ¶
SessionName builds the canonical tmux session name for a team and repo.
Types ¶
type BoardProvisioner ¶
BoardProvisioner joins the global board and announces presence.
type Config ¶
type Config struct {
Profiles map[string]Profile `yaml:"profiles"`
Matrix MatrixConfig `yaml:"matrix"`
}
Config represents the top-level YAML configuration.
type DepartureAnnouncer ¶
DepartureAnnouncer posts a departure message to the global board.
type DescriptionWriter ¶
DescriptionWriter writes a session description to a file.
type Env ¶
type Env struct {
ConfigDir string `env:"JACK_CONFIG_DIR" default:"~/.config/jack"`
DataDir string `env:"JACK_DATA_DIR" default:"~/.jack"`
}
Env holds path overrides loaded from environment variables via fig.
type FileLinker ¶
FileLinker symlinks a file from src to dst.
type GitHubConfig ¶
type GitHubConfig struct {
User string `yaml:"user"`
}
GitHubConfig holds GitHub account settings.
type MatrixConfig ¶
type MatrixConfig struct {
Homeserver string `yaml:"homeserver"`
RegistrationToken string `yaml:"registration_token"`
}
MatrixConfig holds Matrix homeserver connection settings.
type Profile ¶
type Profile struct {
Git GitConfig `yaml:"git"`
GitHub GitHubConfig `yaml:"github"`
SSH SSHConfig `yaml:"ssh"`
}
Profile represents a git/GitHub/SSH identity.
type ProjectSelector ¶
ProjectSelector prompts the user to select a project for a team.
type Registry ¶
type Registry struct {
Projects []RegistryEntry `yaml:"projects"`
}
Registry tracks which repos have been cloned for which teams.
func (*Registry) Add ¶
Add records a new project entry, replacing any existing entry for the same team+repo.
func (*Registry) Find ¶
func (r *Registry) Find(team, repo string) *RegistryEntry
Find returns the entry for a given team+repo, or nil if not found.
func (*Registry) ForTeam ¶
func (r *Registry) ForTeam(team string) []RegistryEntry
ForTeam returns all entries for the given team, sorted by repo name.
func (*Registry) ReposForTeam ¶
ReposForTeam returns a sorted list of repo names for the given team.
type RegistryEntry ¶
type RegistryEntry struct {
ClonedAt time.Time `yaml:"cloned_at"`
Team string `yaml:"team"`
Repo string `yaml:"repo"`
URL string `yaml:"url"`
}
RegistryEntry records a cloned project for a team.
type RegistryLoader ¶
RegistryLoader loads the registry from disk.
type RegistrySaver ¶
RegistrySaver persists the registry to disk.
type SSHConfig ¶
type SSHConfig struct {
Key string `yaml:"key"`
}
SSHConfig holds SSH key settings.
type SessionAttacher ¶
SessionAttacher attaches to a tmux session.
type SessionChecker ¶
SessionChecker reports whether a tmux session exists.
type SessionCreator ¶
SessionCreator creates a detached tmux session.
type SessionInfo ¶
type SessionInfo struct {
Team string
Repo string
TmuxSession
}
SessionInfo is a parsed jack-managed session with team and repo extracted.
type SessionKiller ¶
SessionKiller terminates a tmux session.
type TeamSelector ¶
TeamSelector prompts the user to select a team.
type TmuxSession ¶
type TmuxSession struct {
Name string
Created time.Time
Activity time.Time
Path string
Attached bool
Windows int
}
TmuxSession represents a single tmux session as reported by tmux.
func ListSessions ¶
func ListSessions() ([]TmuxSession, error)
ListSessions calls tmux list-sessions and returns all tmux sessions. Returns an empty slice (not an error) if the tmux server is not running.
type TokenDecrypter ¶
TokenDecrypter decrypts an age-encrypted file using an SSH private key and returns the plaintext token.
type TokenEncrypter ¶
TokenEncrypter encrypts a plaintext token using an SSH public key and writes the ciphertext to the given path.
type TokenReader ¶
TokenReader reads the Matrix token for a session from the env file.