Repository navigation
feat(coder/agent-relay-cursor): serve management endpoints and report session attachment - #1211
Merged
Merged
Conversation
… session attachment
Contributor
Module Scorecard Check
|
| Theme | Before | After |
|---|---|---|
| Presentation & Onboarding | 6 / 17 | 6 / 17 |
| Integration | 5 / 25 | 5 / 25 |
| Credential Hygiene | 20 / 20 | 12 / 20 |
| Restricted-Environment | 12 / 20 | 13.5 / 20 |
| Engineering Quality | 10 / 10 | 10 / 10 |
| Overall | 58 / 100 | 51 / 100 |
Full scorecard for this PR
| Presentation & Onboarding | Agent Integration | Credential Hygiene | Restricted-Environment Readiness | Engineering Quality | Overall |
|---|---|---|---|---|---|
| 6 / 17 | 5 / 25 | 12 / 20 | 13.5 / 20 | 10 / 10 | 51 / 100 |
Drilldown
Presentation & Onboarding — 6 / 17
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Configuration-mode examples | 12 | 6 | README shows examples for install_cli = true, additional_args, and management_addr. No example for computer_use / share_desktop modes, which are documented only in prose under Requirements. |
| Visual preview | 5 | 0 | No image, GIF, or video embedded in the README. |
Credential Hygiene — 12 / 20
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Secrets marked sensitive | 16 | 8 | README examples avoid inline secrets)Skip. The agent_relay_credential parameter is ephemeral = true and mask_input = true, but it is not marked sensitive = true. |
| Non-hardcoded auth path | 4 | 4 | README documents that the pool's service-account API key never leaves Agent Relay; Cursor mints a session token stamped as an ephemeral parameter)Skip. No raw keys are pasted into templates. |
Restricted-Environment Readiness — 13.5 / 20
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Mirrorable artifact source | 5 | 0 | The install path hardcodes curl https://cursor.com/install -fsSL | bash in install.sh.tftpl. No module input variable overrides the download URL. install_cli is a boolean skip toggle, not a URL override. |
| Bring-your-own binary | 10 | 10 | install_cli = false is documented and implemented; cli_binary overrides the binary path. The install step is a no-op when the CLI is already on PATH. |
| Egress transparency | 3 | 1.5 | No dedicated network/offline/air-gapped README section. Endpoints like cursor.com/install, cursor.com/agents, and the cursor:// deeplink appear only in scattered examples and variable descriptions. |
| Runs without sudo | 2 | 2 | install.sh.tftpl, start.sh.tftpl, status.sh.tftpl, and session_attached.sh.tftpl never invoke sudo; all paths use $HOME and unprivileged operations. |
Engineering Quality — 10 / 10
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Input quality | 6 | 6 | All variables have clear descriptions and sensible defaults. Validations cover cli_binary, share_desktop, management_addr, serving_log_pattern, and additional_args. |
| Test coverage | 4 | 4 | main.tftest.hcl covers the parameter contract, worker wiring, and script rendering. main.test.ts exercises the supervisor lifecycle, token handling, and metadata scripts in containers. |
Agent Integration — 5 / 25
| Criterion | Max | Score | Notes |
|---|---|---|---|
| AI governance | 10 | 0 | No documentation of Coder AI Gateway or Agent Firewall. Agent Relay is mentioned, but it is not the same as either governance product. |
| Dashboard entry point | 5 | 5 | coder_app resources cursor_web and cursor_desktop are built in and documented in the README. |
| Session continuity | 5 | 0 | No documented resume/session ID support or persistent session manager (boo, tmux, screen). The worker lifecycle is documented, but not session continuation across reconnects or relaunches. |
| Managed configuration | 5 | 0 | No managed MCP, settings, policies, or workdir config. agent_relay_cursor_repo_url is a parameter, but the README says the template must clone it; the module does not manage it. |
Overall — 51 / 100
Raw 46.5 / 92 → round(46.5 / 92 × 100) = 51
Tip
You can run this locally by telling your agent: "review this module against .github/scorecard/SCORECARD.md".
Scored against SCORECARD.md with solstice-1. Language-model scores are advisory.
Emyrk
marked this pull request as ready for review
October 27, 2026 13:27
matifali
approved these changes
Oct 27, 2026
Emyrk
enabled auto-merge (squash)
October 27, 2026 14:38
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.
Refs RELAY-56.
Serves the worker's management endpoints by default and adds a metadata script that reports whether the worker is running and holds a session.
management_addrvariable, default127.0.0.1:3287, passed as--management-addr; empty disables the server.session_attached_metadata_scriptoutput reads thecursor_self_hosted_worker_session_activegauge from/metricsand prints one state from the table below.management_urloutput gives a URL reachable from inside the workspace; wildcard binds map to loopback.--management-addrjoins the reservedadditional_argsflags.agent_relay_session_attachedattachedcursor_self_hosted_worker_session_active > 0unattached0: waiting for its claimed session, or released and still alivestoppeddone,failed,idle,pending, or missing, or the recorded pid is dead or no longer the CLIdisabledmanagement_addr = ""/metricsunreachable or has no session gaugeRunning means the supervisor recorded
working <pid>,kill -0 <pid>succeeds, and/proc/<pid>/cmdlinestill names the CLI. The supervisor replaces that line withdone <code>when the worker exits, including the normal idle release.Agent context
127.0.0.1:3287by default. Setmanagement_addr = ""to opt out.agent_relay_statusstays separate: it reports worker lifecycle for reaping, while this key reports live attachment for keep-alive.management_addris validated ashost:port(hostname, IPv4, or bracketed IPv6; port 1 to 65535) because it is rendered into the supervisor.1while a session is running and0when idle. It is unverified whether the idle-release window after a turn reads1or0. If it reads0, keep-alive lapses during the user's reading and typing time.attachedsample.terraform test24/24,bun test25/25, shellcheck clean on the rendered script. The gauge shape comes from Cursor's pool docs. The management server only starts after the worker authenticates, so it was not observed live.Coder Agents on behalf of @Emyrk.