Add repository: - New remote verb `add-repo KEY OWNER/NAME`. Off unless config.toml has [repo_add] (base_url + owners). Only listed owners; the dev box builds the URL itself, checks it with `git ls-remote` (bot access), then appends to [repos] under the lock. No URL crosses the SSH link. - `repos` also reports where adding is allowed, so the page shows the form only when it's on and rejects other hosts before calling SSH. - set_toml_string inserts after the section's last key, not after trailing blank lines / the next section's comments. Responsiveness: - web/static/app.js (progressive enhancement; every form still works without JS): forms go via fetch and get a JSON answer instead of POST-redirect-GET; buttons/cards show the change immediately; the list refreshes itself (15 s, 3 s while something is starting). - `repos` is cached for 5 min (refreshed on add-repo), so a page view is one SSH call instead of two. - `list` reads all unit states with one `systemctl show` instead of one per session: 676 -> 374 ms on the dev box with 21 sessions. - Static assets are content-hashed and cached immutably. Design: slate greys, hairline borders, black primary action, tinted status badges, monospace repo/branch, two columns on desktop, stacked on phones, light and dark. Docs: README security model, AGENTS.md (JS convention, add-repo invariant), config.example.toml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MCUMXh8zZConC75Mptbeou
38 lines
1.7 KiB
TOML
38 lines
1.7 KiB
TOML
# ~/.config/sessions/config.toml — read by sessions-ctl. chmod 600.
|
|
# install.sh copies this file there once and never overwrites it.
|
|
|
|
# Where session checkouts live (one directory per session).
|
|
workspace_root = "~/sessions"
|
|
|
|
# How many sessions may run at once. Each claude process takes a few hundred
|
|
# MB; the unit caps each session at 1.6 GB (MemoryMax). The box has ~4 GB.
|
|
max_running = 2
|
|
|
|
# Remote Control names look like "<prefix>-<session name>" in the Claude app.
|
|
remote_control_prefix = "dev-box"
|
|
|
|
# Repos a session may be created from. The key is what the web app shows and
|
|
# sends; the URL never crosses the SSH link. Being on this list is what makes
|
|
# a checkout trusted by Claude Code, so only list repos you trust.
|
|
[repos]
|
|
sessions = "ssh://git@git.reudy.net:14922/reudy-net/sessions.git"
|
|
|
|
# Optional: let the web page add repos to [repos] ("Add repository").
|
|
# Off while this section is absent. Only repos of the owners listed here can
|
|
# be added, the URL is always <base_url><owner>/<name>.git, and the bot
|
|
# account must already be able to read the repo. Removing one is a manual edit.
|
|
# [repo_add]
|
|
# base_url = "ssh://git@git.reudy.net:14922/"
|
|
# owners = ["reudy-net"]
|
|
|
|
[ssh_access]
|
|
# prod's key may only connect from the address(es) this name resolves to.
|
|
# Re-resolved hourly by sessions-access-refresh.timer.
|
|
allow_from_host = "reudy.net"
|
|
# The public half of the key the web app container uses. Written by
|
|
# `sessions-ctl keygen`; you don't need to edit it by hand.
|
|
# public_key = "ssh-ed25519 AAAA… sessions-web"
|
|
# Printed by keygen as SESSIONS_DEV_HOST / SESSIONS_DEV_PORT. By default it's
|
|
# the address this box uses to reach the internet, and 14922.
|
|
# advertise_host = "2.28.100.223"
|
|
# port = 14922
|