sessionDirFor
uses node:path
Where a session (a process working on its own branch, TCM_BRANCH) keeps what's its own: its scratch files, and
the #codebase shim they import its branch's names through.
import path from "node:path"; export function sessionDirFor(root: string, branch: string): string { return path.join(root, ".tcm", "sessions", branch.replace(/[^\w.-]/g, "_")); }
used by
- tcmts.cli.codebase.Codebase
- tcmts.cli.codebase.sessionDirsGone
- tcmts.cli.codebase.testSessionDirsGone
- tcmts.cli.main.dispatch
- tcmts.cli.main.status
- tcmts.cli.mcp.TOOLS
- tcmts.cli.mcp.endSession
- tcmts.cli.mcp.jobsDirFor
- tcmts.cli.mcp.leaseFile
- tcmts.cli.mcp.moveSession
- tcmts.cli.mcp.serveMcp
- tcmts.cli.mcp.startSession
- tcmts.cli.run.runBranch
- tcmts.cli.views.srcDir
- tcmts.cli.views.viewsBranchOf