Documentation
¶
Overview ¶
Package appdir is the single source of truth for the CLI's filesystem layout.
All persistent data lives under Root() (~/.config/seshat-tui/ by default, or the value of SESHAT_RUNTIME_ROOT). Session-scoped data is isolated under sessions/{session_id}/ so deleting a session is a single os.RemoveAll call.
Directory layout:
~/.config/seshat-tui/
├── logs/
├── documents/ ← user-uploaded PDFs and docs (global, persistent)
├── rag/ ← RAG-indexed documents (global, persistent)
└── sessions/
└── {session_id}/
├── artifacts/
│ ├── screenshots/ ← browser screenshots
│ ├── images/ ← AI-generated images
│ ├── web/ ← web-scraped content
│ └── audio/ ← TTS / STT audio
├── pastes/
│ ├── text/
│ ├── images/
│ └── other/
├── plans/ ← plan-mode markdown files
└── tools/ ← browser downloads
Index ¶
- func DeleteSessionDir(sessionID string)
- func EnsureAppDirs() error
- func EnsureSessionDir(sessionID string) error
- func GlobalConfigPath() string
- func LogsDir() string
- func Root() string
- func SessionArtifactsAudioDir(sessionID string) string
- func SessionArtifactsDir(sessionID string) string
- func SessionArtifactsImagesDir(sessionID string) string
- func SessionArtifactsWebDir(sessionID string) string
- func SessionDir(sessionID string) string
- func SessionLogPath(sessionID string) string
- func SessionPastesDir(sessionID string) string
- func SessionPastesImagesDir(sessionID string) string
- func SessionPastesOtherDir(sessionID string) string
- func SessionPastesTextDir(sessionID string) string
- func SessionPlansDir(sessionID string) string
- func SessionScreenshotsDir(sessionID string) string
- func SessionToolsDir(sessionID string) string
- func SessionsDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteSessionDir ¶
func DeleteSessionDir(sessionID string)
DeleteSessionDir removes sessions/{id}/ and all its contents in one call. Covers screenshots, plans, tools, artifacts, logs — everything. Errors are intentionally ignored; DB cleanup is the authoritative deletion.
func EnsureAppDirs ¶
func EnsureAppDirs() error
EnsureAppDirs creates the top-level directories required at startup and seeds seshat.json with an empty object if the file does not yet exist. Safe to call multiple times (os.MkdirAll and the existence check are both idempotent).
func EnsureSessionDir ¶
EnsureSessionDir creates sessions/{id}/ and all standard subdirectories. Call this when a session starts, before any tools run. Safe to call multiple times.
func GlobalConfigPath ¶
func GlobalConfigPath() string
GlobalConfigPath returns the path to the global TUI config file (seshat.json).
func Root ¶
func Root() string
Root returns the application root directory, resolved via SESHAT_RUNTIME_ROOT or the platform default (~/.config/seshat-tui/ on Linux/macOS).
func SessionArtifactsDir ¶
Artifact subdirectories — agent-produced content, session-scoped.
func SessionArtifactsWebDir ¶
func SessionDir ¶
func SessionLogPath ¶
func SessionPastesDir ¶
func SessionPastesImagesDir ¶
func SessionPastesOtherDir ¶
func SessionPastesTextDir ¶
func SessionPlansDir ¶
func SessionScreenshotsDir ¶
func SessionToolsDir ¶
func SessionsDir ¶
func SessionsDir() string
Types ¶
This section is empty.