Keep every bot's computer work in its own workspace folder
Computers now mount only /home/gem/workspace from DATA_DIR/computers/<id>, so only the workspace persists and goes into the data archive. An older computer's whole home is moved aside to <id>-home-<ts> (kept, never archived) and its container recreated once by sync-computers. Each run works in bots/<bot>/users/<user> (also its cwd and HOME), with bots/<bot> for work every user shares and workspaces/<id> shared by a workspace's bots; the coordinator reaches the whole workspace. Computer tools are gated by withComputerDirs: bash and code start there, file tool paths and file: URLs outside the run's folders are refused, and so is sudo. search_computers, import_file and script tools start there too. The files browser shows members only the bots' folders they reach, their own user folder in each and their workspaces', with names on the id folders. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -37,6 +37,13 @@ export default async function writeDataBackupArchive(): Promise<CreatedDataBacku
|
||||
// after it and an extract drops a single folder.
|
||||
"--transform",
|
||||
`s,^\\.$,${archive_root},;s,^\\./,${archive_root}/,`,
|
||||
// A computer's old whole home, moved aside when only its
|
||||
// workspace became the mount (`prepareComputerDataDir`),
|
||||
// is kept on disk but never archived: only workspaces are.
|
||||
// `*` stops at `/`, so a file inside a workspace whose name
|
||||
// happens to hold the suffix is still archived.
|
||||
"--no-wildcards-match-slash",
|
||||
`--exclude=./${AppData.ComputerDataDir}/*${AppData.ComputerOldHomeSuffix}*`,
|
||||
"-C",
|
||||
DATA_DIR,
|
||||
".",
|
||||
|
||||
Reference in New Issue
Block a user