Skip to content

feat(launcher): implement workspace removal with remote soft-deletion#359

Merged
zomux merged 1 commit into
openagents-org:developfrom
zhoumzh:feature/workspace-deletion
May 4, 2026
Merged

feat(launcher): implement workspace removal with remote soft-deletion#359
zomux merged 1 commit into
openagents-org:developfrom
zhoumzh:feature/workspace-deletion

Conversation

@zhoumzh
Copy link
Copy Markdown
Contributor

@zhoumzh zhoumzh commented Apr 24, 2026

🚀 Feature: Workspace Deletion with Remote Soft-Delete

Background

As developers and users test the Launcher by frequently joining and creating workspaces, the local daemon.yaml networks list becomes cluttered. Previously, there was no UI mechanism to cleanly disconnect and remove these test environments.

What's Changed

This PR introduces a robust, end-to-end workspace removal flow, encompassing both local cleanup and remote database soft-deletion.

  • UI & IPC (Renderer & Main)
    • Added a "Remove" button with a secondary confirmation dialog to the Settings > Workspaces list.
    • Implemented the workspace:remove IPC handler to bridge the UI action to the core agent manager.
  • Core Connector (agent-connector)
    • Exposed a new deleteWorkspace method in WorkspaceClient to safely invoke the backend's DELETE /v1/workspaces/{workspace_id} endpoint.
    • Implemented the removal logic to dynamically extract the endpoint for the target workspace (supporting both localhost and official endpoints). It executes a best-effort remote soft-delete before performing a hard local cleanup.
  • DX Improvement (agent-manager.js)
    • Fixed a critical bug where loadCore() cached the globally installed @openagents-org/agent-launcher over local source code. The launcher will now correctly prioritize local agent-connector source files during development mode, vastly improving local development workflows without TypeError conflicts.

Verification

  • Clicked "Remove" on a workspace in Settings.
  • Verified the workspace disappears from the UI and local daemon.yaml.
  • Verified previously connected Agents automatically enter a "disconnected" state.
  • Checked backend behavior to ensure DELETE /v1/workspaces/{id} successfully marks the entry as status: "deleted".

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

Someone is attempting to deploy a commit to the Raphael's projects Team on Vercel.

A member of the Team first needs to authorize it.

@zomux zomux merged commit 501eb2e into openagents-org:develop May 4, 2026
10 of 19 checks passed
nebukaga pushed a commit that referenced this pull request May 4, 2026
…am JSON parsing

Fully integrates the Gemini CLI adapter and fixes a critical parsing
bug that caused silent "No response generated" failures.

Bug fix:
- gemini.js was calling split('\\n') (literal backslash-n) instead of
  split('\n') (newline) on the CLI's stream-json output, so all events
  stuck together and never parsed.

Features:
- packages/agent-connector/src/adapters/gemini.js (new, 426 lines):
  full GeminiAdapter following the Hermes/Claude pattern — subprocess
  per message via gemini -p <prompt> -y -o stream-json, per-channel
  session persistence, --resume on subsequent messages, stop control +
  process-tree teardown
- registry.json: builtin: true, support flags, adapter mapping, launch
  args, login_command for native gemini OAuth (replaces forced
  GEMINI_API_KEY input)
- adapters/index.js: register GeminiAdapter in ADAPTER_MAP
- packages/launcher: --headless and --disable-gpu flags for testing
  without a window

Conflict resolution: PR #357 was branched before e358b64 (per-agent
model config), so its agent-manager.js changes would revert that
feature. Took develop's version of agent-manager.js entirely; the local
agent-connector source priority in loadCore() is already in develop via
PR #359 with equivalent logic.

Follow-up will revert the 2s/15s → 1s/3s polling-rate change in
base.js, since that's orthogonal to Gemini integration and warrants its
own load-impact analysis on workspace-endpoint.
nebukaga added a commit that referenced this pull request May 4, 2026
The npm publish workflow has been failing on every push since 0.2.114
(2026-04-30) because the version in package.json wasn't bumped — so
the Stop button fix from PR #368, the Gemini integration from PR #357,
the workspace-removal API from PR #359, and the env-var scrub from
d9f5449 are all on develop but not in users' local launcher installs.

Test fix: stop-control.test.js was written against the old sendStatus
path, but 6cfc575 (post chat reply on shutdown) had already changed
_stopAllProcesses to call sendResponse instead. The two PRs auto-merged
without conflict, leaving the test asserting against the wrong mock.
Updated the test to mock sendResponse and pass the message explicitly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants