Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
# 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).
## locations
every workspace is a location (`src/albedo/harness/location.gleam`):
- **local**: a plain absolute path, stored exactly as it always was. no
prefix anywhere, on the wire or on screen. `~` (the daemon's home) parses
as local too; whether a folder exists is the caller's question.
- **remote**: `[user@]host:/abs/path` (an IPv6 host in brackets). a text is
remote when it does not start with `/` or `~` and the part before the
first `:` holds no `/`. user and host start with a letter or digit, so
neither is ever an ssh option. the path must be absolute and is
normalised (`//`, `.`, `..`, trailing slash), so one remote directory has
one key. a stored remote path is always absolute: `host:~` and
`host:~/x` given to create or move a session are resolved against that
host's home (one probe over ssh, bounded, kernel.md) and stored absolute;
an unreachable host refuses with ssh's words.
session info carries the parsed location beside the `workspace` string:
```json
{"workspace": "mayer@chernobog:/home/mayer/proj/albedo",
"location": {"host": "chernobog", "user": "mayer",
"path": "/home/mayer/proj/albedo", "label": "chernobog"}}
{"workspace": "/Users/dawn/proj", "location":
{"host": null, "user": null, "path": "/Users/dawn/proj", "label": null}}
```
`label` is how clients show the host: the alias, with `user@` dropped when
it is the user `ssh -G <host>` reports (local config only, no network),
cached per host for the daemon's life. without ssh the user stays.
a remote session's python kernel and `run` jobs run on its host
(kernel.md, "remote kernels"). what is only a key works as it is: the work
ledger and paperclips scope, workspace links, rec…