runtimepath

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const EnvRuntimeRoot = "SESHAT_RUNTIME_ROOT"

Variables

This section is empty.

Functions

func BackendDBPath

func BackendDBPath(root string) string

BackendDBPath is the path of the SQLite database of the runtime (seshat.db) under the runtime root.

func BashTasksDir

func BashTasksDir(root string) string

BashTasksDir is the directory of the output files of background shell commands (tmp/bash-tasks) under the runtime root.

func CacheDir

func CacheDir(root string) string

CacheDir is the directory of the caches under the runtime root.

func CompanionPath

func CompanionPath(root string) string

CompanionPath is the path of the companion state file (companion.json) under the runtime root.

func DataDir

func DataDir(root string) string

DataDir is the directory of the data the runtime keeps (indexes, sessions, databases) under the runtime root.

func DeepDocModelsDir

func DeepDocModelsDir(root string) string

DeepDocModelsDir holds the ONNX models (det.ort, rec.ort, layout.ort, tsr.ort, ocr.res) that back pkg/nativedoc's native OCR/layout/table pipeline - fetched by scripts/install-deepdoc-models.sh from https://huggingface.co/InfiniFlow/deepdoc (Apache-2.0), mirroring docling-serve's own .venv provisioning convention.

func DefaultConfigDir

func DefaultConfigDir(appName string) string

DefaultConfigDir returns the platform-appropriate config directory for the given application name.

  • Linux / BSD: $XDG_CONFIG_HOME/<appName> or ~/.config/<appName>
  • macOS: ~/.config/<appName> (XDG convention — familiar for CLI tools, avoids the space in "Library/Application Support")
  • Windows: %APPDATA%\<appName> (e.g. C:\Users\<user>\AppData\Roaming\<appName>)

SESHAT_RUNTIME_ROOT overrides everything — callers should check that first.

func ExpandTilde

func ExpandTilde(path string) string

ExpandTilde replaces a leading "~" with the current user's home directory. Go's filepath package does not do this automatically.

func HNSWDataDir

func HNSWDataDir(root string) string

HNSWDataDir is the directory of the HNSW vector indexes (data/hnsw) under the runtime root.

func Join

func Join(root string, parts ...string) string

Join builds a path under the runtime root (ResolveRoot(root)) from the given parts.

func LegacySessionsDir

func LegacySessionsDir(root string) string

LegacySessionsDir is where per-session data lived before v1.2.59.

func LogsDir

func LogsDir(root string) string

LogsDir is the directory of the logs under the runtime root.

func MigrateLegacySessionDirs

func MigrateLegacySessionDirs(root string) (int, error)

MigrateLegacySessionDirs moves what older versions wrote under sessions/{id}/ to workspaces/{id}/, and a permissions.json to data/permissions/{id}.json. It never overwrites: a file that already exists at the destination stays, and what could not be moved stays where it was. It is safe to run on every start. It returns how many session directories it moved something out of.

func PlansDir

func PlansDir(root string) string

PlansDir is the directory of the plans under the runtime root.

func RAGSQLiteDBPath

func RAGSQLiteDBPath(root string) string

RAGSQLiteDBPath is the fallback vector store used when the embedded HNSW backend can't be opened, and the store of the installs that ran when HNSW did not build on Windows (before 1.2.73).

func RemoveSessionData

func RemoveSessionData(root, sessionID string) error

RemoveSessionData deletes the directory of a session and its permissions file. It is what deleting a session leaves to the filesystem. An id that is not a plain name is refused rather than followed.

func ResolveRoot

func ResolveRoot(explicit string) string

ResolveRoot returns the runtime root: explicit when it is not blank, otherwise the SESHAT_RUNTIME_ROOT environment variable, otherwise ~/.config/seshat, and a seshat directory under the temporary directory when no home can be found. A leading "~" is expanded and the path is cleaned.

func SessionArtifactsAudioDir

func SessionArtifactsAudioDir(root, sessionID string) string

SessionArtifactsAudioDir holds TTS output and STT input audio files.

func SessionArtifactsDir

func SessionArtifactsDir(root, sessionID string) string

SessionArtifactsDir is the parent for all agent-produced artifacts.

func SessionArtifactsImagesDir

func SessionArtifactsImagesDir(root, sessionID string) string

SessionArtifactsImagesDir holds AI-generated images (not browser screenshots).

func SessionArtifactsWebDir

func SessionArtifactsWebDir(root, sessionID string) string

SessionArtifactsWebDir holds web-scraped/fetched content.

func SessionDir

func SessionDir(root, sessionID string) string

SessionDir is the directory of one session: the per-session directory under WorkspacesDir.

func SessionLogPath

func SessionLogPath(root, sessionID string) string

SessionLogPath is the per-session log file for errors and diagnostics.

func SessionPastesDir

func SessionPastesDir(root, sessionID string) string

SessionPastesDir holds persisted pasted attachments for the session.

func SessionPastesImagesDir

func SessionPastesImagesDir(root, sessionID string) string

SessionPastesImagesDir is the directory of the image pastes of a session.

func SessionPastesOtherDir

func SessionPastesOtherDir(root, sessionID string) string

SessionPastesOtherDir is the directory of the pastes of a session that are neither text nor images.

func SessionPastesTextDir

func SessionPastesTextDir(root, sessionID string) string

SessionPastesTextDir is the directory of the text pastes of a session.

func SessionPermissionsPath

func SessionPermissionsPath(root, sessionID string) string

SessionPermissionsPath is the file of the permissions granted to a session ("always allow this tool"). It is outside the session directory on purpose: the agent can write there, and a grant it could edit would be a grant it could give itself.

func SessionPlansDir

func SessionPlansDir(root, sessionID string) string

SessionPlansDir holds plan-mode markdown files for the session.

func SessionScreenshotsDir

func SessionScreenshotsDir(root, sessionID string) string

SessionScreenshotsDir holds browser screenshots under artifacts/.

func SessionStoreDir

func SessionStoreDir(root string) string

SessionStoreDir is the directory of the persisted sessions (data/sessions) under the runtime root.

func SessionToolsDir

func SessionToolsDir(root, sessionID string) string

SessionToolsDir holds browser downloads and tool-produced output files.

func SessionsDir

func SessionsDir(root string) string

SessionsDir is the directory that holds the per-session directories. The name is kept; the directory is WorkspacesDir.

func SkillsDir

func SkillsDir(root string) string

SkillsDir is the directory of the user's skills under the runtime root.

func StorageDir

func StorageDir(root string) string

StorageDir is the directory of the local object storage under the runtime root.

func TasksDir

func TasksDir(root string) string

TasksDir is the directory of the background task files (tmp/tasks) under the runtime root.

func TitleModelsDir

func TitleModelsDir(root string) string

TitleModelsDir stores tiny local models dedicated to cheap background tasks such as automatic session-title generation.

func TmpDir

func TmpDir(root string) string

TmpDir is the directory of the temporary files of the runtime under the runtime root.

func WorkspacesDir

func WorkspacesDir(root string) string

WorkspacesDir holds the per-session directories.

Types

This section is empty.

Jump to

Keyboard shortcuts

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