Document AGENTD_WEBUI_PORT + print webui URL in paths#327
Merged
Conversation
Closes #318. - Resolve the localhost web-UI port via a shared `agentd_protocol::paths::local_webui_port()` / `local_webui_url()` helper (default 5746, `AGENTD_WEBUI_PORT` override) instead of inlining the literal in the daemon. - Print a `webui:` line in both `agent paths` and `agentd paths` so the URL no longer only appears in the daemon log. - Document the web-UI port (and the resolved URL) in docs/configuration.md. - Clarify the session-mode rules in docs/harnesses.md: mode is chosen by `--mode`, else by whether the client supplied a PTY size — so every CLI `agent new` session is headless regardless of the prompt; the prompt only decides what the session runs on start.
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.
Closes #318.
What
Two discoverability gaps from an isolated dogfood run:
AGENTD_WEBUI_PORTwas undocumented and the resolved localhost web-UI URL only appeared in the daemon log.5746, overrideAGENTD_WEBUI_PORT) and the resolved URL indocs/configuration.md.agent pathsandagentd pathsnow print awebui:line, e.g.webui: http://127.0.0.1:5746/.agentd_protocol::paths::local_webui_port()/local_webui_url()helper so the daemon and CLI can't drift (the daemon's inline literal is gone).The "prompt ⇒ headless" coupling was undocumented. While documenting it I verified the actual mechanism against the code and an isolated daemon, and it's slightly different from the issue's framing:
--modeif given, otherwise by whether the creating client supplied a PTY size.agent newnever supplies one, so every CLI session isheadlessregardless of the prompt (agent new shell ""andagent new shell "echo hi"both resolve tomode=headless; only--mode interactiveflips it).shellempty →$SHELL -ilinteractive program; non-empty →$SHELL -lc "<prompt>"one-shot).docs/harnesses.mdnow states these rules precisely and how--modeinteracts.Verification
Built the workspace (debug) and ran an isolated daemon with
AGENTD_WEBUI_PORT=5799:Daemon log confirmed the override is honored end-to-end (
local webui ready ... url=http://127.0.0.1:5799/).Binaries
Docs-only behavior except for the
webui:line inpaths, which lives inagent(CLI) andagentd(daemon). Both built clean from the worktree.