44 lines
1.5 KiB
Go
44 lines
1.5 KiB
Go
package artifacts
|
|
|
|
import "path/filepath"
|
|
|
|
// SessionPaths contains canonical local paths for one session work directory.
|
|
type SessionPaths struct {
|
|
WorkspaceRoot string
|
|
Root string
|
|
InputsDir string
|
|
AudioDir string
|
|
TranscriptsDir string
|
|
TranscriptsRawDir string
|
|
TranscriptsTrimmedDir string
|
|
ArtifactsDir string
|
|
ConfigDir string
|
|
LogsDir string
|
|
ManifestPath string
|
|
LockPath string
|
|
}
|
|
|
|
// SessionWorkDir returns the work directory for one session.
|
|
func SessionWorkDir(rootDir, sessionID string) string {
|
|
return filepath.Join(rootDir, "work", sessionID)
|
|
}
|
|
|
|
func buildSessionPaths(workspaceRoot, sessionID string) SessionPaths {
|
|
root := SessionWorkDir(workspaceRoot, sessionID)
|
|
transcripts := filepath.Join(root, "transcripts")
|
|
return SessionPaths{
|
|
WorkspaceRoot: workspaceRoot,
|
|
Root: root,
|
|
InputsDir: filepath.Join(root, "inputs"),
|
|
AudioDir: filepath.Join(root, "audio"),
|
|
TranscriptsDir: transcripts,
|
|
TranscriptsRawDir: filepath.Join(transcripts, "raw"),
|
|
TranscriptsTrimmedDir: filepath.Join(transcripts, "trimmed"),
|
|
ArtifactsDir: filepath.Join(root, "artifacts"),
|
|
ConfigDir: filepath.Join(root, "config"),
|
|
LogsDir: filepath.Join(root, "logs"),
|
|
ManifestPath: filepath.Join(root, "manifest.json"),
|
|
LockPath: filepath.Join(root, ".lock"),
|
|
}
|
|
}
|