Repository navigation
feat(admin): one-click Cursor worker install - #263
Merged
Merged
Conversation
The Cursor worker tab asked for a machine name, an API key, a binary path and extra directories, and told the admin to run a curl | bash command on the host. Everything except the personal Cursor API key can be derived. - POST /api/v1/cursor-worker/install: saves the key if given, picks the node (leader by default, any online worker node via the cluster executor), installs the Cursor CLI into <data>/cursor-worker/home when missing, (re)starts `agent worker start` on every cloned project, then verifies the process and its /readyz probe. Returns per-step results. - Name defaults to the node name; binary is found on PATH or in the managed install; repos come from projects; empty fallback workspace when nothing is cloned yet; auto-start is enabled by the install. - API key is passed via CURSOR_API_KEY (never argv / logs); also accepts a server-side CURSOR_API_KEY so nothing has to be typed at all. - Start/stop/restart and boot auto-start work on remote nodes too. - UI: one primary button, a confirm modal that only asks for the key when none is stored (node choice behind "Changer"), status tiles (worker + auto-start switch, repos, advanced), details and settings in modals. - Tests: arg building, scripts (incl. end-to-end with a fake agent), parsing, node selection, UI summary helpers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Worker Cursor admin tab asked for 4 fields (machine name, Cursor API key, agent binary path, extra directories) plus an auto-start switch, and told the admin to run
curl https://cursor.com/install -fsS | bashon the host before anything worked. Only the personal Cursor API key truly needs the user.What
One button: « Installer le worker Cursor » → confirm modal → DevForge does the rest:
<data>/cursor-worker/home(persistent volume) on the chosen nodeCURSOR_API_KEYenv var is also accepted, so nothing has to be typedPOST /api/v1/cursor-worker/installreturns per-step results (settings, CLI, start, verify). Verification = process alive +/readyzprobe on the worker's local management address./internal/exec). Choice behind « Changer » in the modal; the previous node's worker is stopped when moving.CURSOR_API_KEYin the process environment, no longer as--api-key(visible inps). It is never echoed by the scripts (tested).Tests
agentbinary.workerSummary/installNeedshelpers.Nothing was installed on real nodes; not deployed.