small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
albedo robot-docs workspaces.md

# workspaces a session's workspace is the directory its python kernel, `run` jobs, memory, skills and AGENTS.md resolve against. `/cd` in the tui moves a session to another folder; the folder picker browses through the daemon, so it only ever offers folders the daemon itself can see (and works the same once the daemon is remote). ## moving a session `POST /sessions/:id/workspace {"workspace": "/abs/dir"}` answers the session's info. the session must be idle and the target an existing absolute directory. the kernel is dropped (python variables start fresh), the transcript stays, and a note records the move. every descendant of the session (children, their children; open or closed) whose workspace was the same folder follows it. an idle descendant moves at once; a running one moves when its current turn ends. descendants that were working somewhere else keep their own folder. if the session itself cannot move, nobody moves. ## browsing all three routes take `path`: absolute, or starting with `~`, which expands to the daemon's home. anything else is a 400; a path that is not an existing directory is a 404. errors are `{"error": "..."}`. `/health` lists `workspace_browser` when these routes exist. ### `GET /fs/list?path=P` the directories directly inside P, for the picker's list. ```json {"path": "/Users/dawn/proj", "home": "/Users/dawn", "truncated": false, "entries": [{"name": "albedo", "modified": 1790618149, "hidden": false, "vcs": "jj"}]} ``` - `path` is P expanded and normalised (no trailing slash, except `/`). - only directories, symlinks to directories included; sorted by name, case-insensitively. at most 2000; `truncated` says there were more. - `modified` is the directory's mtime in unix seconds. - `hidden` is a leading dot. the picker hides these unless the query asks. - `vcs` is `"jj"` when the entry itself contains `.jj`, else `"git"` when it contains `.git` (file or directory), else `null`. a stat, never a process. ### `GET /fs/repo?path=P` the repository P is in, for list rows: `{"repo…