Repository navigation
HostSpark v0.4.2
HostSpark v0.4.2
A feature release adding per-chat project directories, simplified model/effort
selection, and a fix for /cancel (and every other command) being blocked while
a task is running. All 124 tests pass.
New: named project directories via /new [name]
Every chat previously ran agy from an anonymous, auto-assigned
workspaces/chat-{chat_id} folder with no way to see or choose it, and /new
only reset the conversation.
/new <name>creates-or-selects a single-segment directory under
AGY_WORKSPACE_ROOT(confined via a newvalidate_project_dir_name()
allowlist plus the existingsafe_join()path-traversal guard) and uses it
as the chat's working directory going forward, replacing the anonymous
folder. Picking a project also starts a fresh conversation./newwith no argument lists existing project directories as buttons
(current one checkmarked), mirroring the/modelpicker. The button
callback validates the name too, not just the typed-argument path./clearis decoupled from/newand keeps the old "just reset the
conversation, keep the working directory" behavior.- Switching to a genuinely different project directory also clears any
/add_direntries from the previous one -- those are absolute paths with
no per-project scoping and would otherwise silently keep granting agy
access to a now-unrelated project. - Chats that never call
/neware completely unaffected. - New
.envvars:AGY_DEFAULT_PROJECT_DIR(pre-seeds one directory, default
initial, so the picker isn't empty on a fresh install).AGY_WORKSPACE_ROOT
is reused as the parent directory/newis confined to.
Two bugs were found and fixed while building this, both confirmed by tracing
a real conversation transcript and testing the agy binary directly:
- agy doesn't recognize a directory as its "Active Workspace" just because
the subprocesscwdpoints at it -- without--add-dir <dir>it silently
falls back to its own internal scratch location
(~/.gemini/antigravity-cli/scratch) regardless ofcwd.run_agy()now
always passes--add-dirfor whatever directory it resolves. /newand/clearweren't actually starting a fresh agy session.
HostSpark never persisted aconversation_idback from agy's replies, so it
was alreadyNoneon every ordinary turn -- meaning every message fell
through to the--continuebranch regardless of what/new//clearhad
just reset, silently resuming agy's own last session from whatever
directory that was. Fixed with a one-shot in-memory marker that suppresses
--continue/--conversationfor exactly the next turn after a switch or
/clear, kept deliberately separate from the pre-existing, sticky
/new_project on|offtoggle so that manual setting can't be broken by it
(caught by a dedicated regression test before shipping).
New: simplified model + effort selection
/modelused to list every model x effort combination as separate
suffixed buttons (gemini-3.8-flash-high,-medium,-low, ...). It now
lists just the 3 base model names, with/effort(now with its own
low/medium/high inline picker, not just a typed argument) controlling
reasoning depth independently.- These base names have no unsuffixed form in agy's own model catalog, so a
newresolve_model_and_effort_args()recombines them into the real
--modelvalue agy expects (e.g.gemini-3.8-flash+medium->
--model gemini-3.8-flash-medium) instead of sending--model/--effort
separately, which agy rejects as conflicting. - Both pickers mark the chat's current selection with a checkmark, including
normalizing legacy stored values from before this change.
New: reorganized quick-action keyboard (3-3-2 layout)
[ /status ] [ /model ] [ /effort ]
[ /session ] [ /new ] [ /clear ]
[ /schedule_list ] [ /cancel ]
Fixed: /cancel (and everything else) could be blocked for a task's entire duration
python-telegram-bot processes one update at a time by default, and the
message handler blocked on the job's completion after enqueueing it. Sending
/cancel while a long task was running would sit undelivered until that task
finished on its own -- by which point there was nothing left to cancel.
Enabled concurrent_updates and stopped the handler from blocking; the queue
worker already reports back via the status message on its own.
Security
AGY_WORKSPACE_ROOT/AGY_WORKDIR previously defaulted to the entire home
directory when left blank, which is also the boundary used for attachment
uploads, /add_dir, and auto-detected output media. If you haven't already,
point both at a dedicated directory (e.g. /home/ubuntu/projects) rather
than leaving them blank.
Upgrade notes
chat_state.dbgains aworkspace_dircolumn via an idempotent migration
that runs automatically on startup (guarded by aPRAGMA table_info
check, so it's safe to restart repeatedly). Verified against a snapshot of
a live database before release; back upchat_state.dbbefore upgrading
as a precaution regardless.- Re-run
./install.shto pick up the new package version and restart the
service. - If
AGY_WORKSPACE_ROOT/AGY_WORKDIRare still blank in your.env,
create a dedicated directory and set both before relying on/new--
the target directory must already exist or the service will fail to start. - Existing chats keep using their old anonymous working directory until they
run/newthemselves; nothing is migrated automatically.