appdir

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

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

func EnsureSessionDir(sessionID string) error

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 LogsDir

func LogsDir() string

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 SessionArtifactsAudioDir

func SessionArtifactsAudioDir(sessionID string) string

func SessionArtifactsDir

func SessionArtifactsDir(sessionID string) string

Artifact subdirectories — agent-produced content, session-scoped.

func SessionArtifactsImagesDir

func SessionArtifactsImagesDir(sessionID string) string

func SessionArtifactsWebDir

func SessionArtifactsWebDir(sessionID string) string

func SessionDir

func SessionDir(sessionID string) string

func SessionLogPath

func SessionLogPath(sessionID string) string

func SessionPastesDir

func SessionPastesDir(sessionID string) string

func SessionPastesImagesDir

func SessionPastesImagesDir(sessionID string) string

func SessionPastesOtherDir

func SessionPastesOtherDir(sessionID string) string

func SessionPastesTextDir

func SessionPastesTextDir(sessionID string) string

func SessionPlansDir

func SessionPlansDir(sessionID string) string

func SessionScreenshotsDir

func SessionScreenshotsDir(sessionID string) string

func SessionToolsDir

func SessionToolsDir(sessionID string) string

func SessionsDir

func SessionsDir() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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