Repository navigation
docs: derive the MCP endpoint and owner from the primary connection; server-neutral gateway text - #5982
Merged
Conversation
…server-neutral gateway text - dotspace: each built-in DotSpace names its mcp_url (the registry is the one place a per-server endpoint is written down; vendored copy synced). - docs/codex-core.md: take the MCP URL from the primary connection's DotSpace instead of a fixed ag2.space endpoint. - skill-usage-report: the manifest declares AG2_CLOUD_ORIGIN empty, so the default is dotspace.default_cloud_origin() rather than a pinned server that outranked it. - schedule-crons: the cron-room owner is the primary row's owner_mxid; created rooms carry their own server. - gateway-bridge launchd installer, plist and wrapper headers no longer name one server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
liususan091219
requested changes
Oct 28, 2026
liususan091219
left a comment
Collaborator
There was a problem hiding this comment.
Requesting changes: the new Codex MCP lookup quietly prints an empty URL when there is no primary connection, and the doc then tells the reader to paste it.
- Repro: I ran the
docs/codex-core.mdsnippet at head against a workspace with no connections record.servercame out empty,python3 src/dotspace.py ""returned"mcp_url": "", andecho "$mcp_url"printed nothing, with no error. The next steps writeurl = ""or runcodex mcp add ag2-space --url "". That section is for "a Codex core set up without the app", the install least likely to have a primary row. The literal it replaces worked there. Please guard the empty case: say there is no primary connection and what to do, as theschedule-cronstext already does for an emptyOWNER. - Non-blocking: with
AG2_CLOUD_ORIGINnow"",skill-usage-reportwith core absent resolves no origin and skips reporting. Before, it posted to the manifest URL. That is consistent with_cloud_fallback's docstring, but the PR body doesn't name it as a behaviour change. - Checked, fine:
DEFAULT_INSTANCESmcp_urlvalues match the endpoints listed in the evidence. The new dotspace test callsregistered_instances/dotspace_forfor real. The literal-guard allowlist entry is correctly dropped. No added line has a hardcoded workspace path. The touched tests pass locally at head. - CI: shard 1/9 (
remote-gateway-bridge) is fixed on main by #5984, so rebase. Shard 4/9 (pool-restart-deliveries) passes locally at head, and this PR touches nothing in worker-pool, so it looks flaky (unverified). license/cla is present. - There are no approvals yet.
— Sutando (susans-MacBook-Pro)
…instead of printing an empty URL Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Addressed in 3e4436c (merged main in at a10ae15, which carries the #5984 fix):
|
Contributor
|
@cla-assistant check |
Contributor
Coverage Gate✅ Diff coverage PASSES the 95% bar. Whole-tree (informational): 94%. Diff CoverageDiff: origin/main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. |
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.
What changed, and why
The owner's rule after the ag2.space → s.space move: derive every server-specific value from the connection record or the homeserver's DotSpace entry, never from a literal, for any number of servers (ag2.space + s.space + dev.s.space). This PR removes the remaining docs/manifest literals.
src/dotspace.pyDEFAULT_INSTANCES: every built-in DotSpace now names itsmcp_url(mcp./dev-mcp.under ag2.space and s.space, path/mcp). The registry is the one place a per-server literal is allowed. Vendored copy regenerated withpackages/ag2-sparrow/tools/sync_from_src.py.docs/codex-core.md: no longer tells agents to use a fixedmcp.ag2.space/mcp. It shows how to take the primary connection's server fromconnections.py list --jsonand read that server'smcp_urlfromsrc/dotspace.py.skills/skill-usage-report/manifest.json:AG2_CLOUD_ORIGINis declared empty. The manifest value outranks the computed default, so a pinnedhttps://sutando.ag2.spaceoverrodedotspace.default_cloud_origin()on every install.skills/schedule-crons/SKILL.md: the cron-room owner is the primary row'sowner_mxid, not@<owner>:ag2.space. Created rooms are described as!id:<server>.docs/src-map.mdregenerated from those headers). The user-facing health-check messages are reworded in the companion health/status PR, because that PR already rewrites those same lines.Where to look first
src/dotspace.py(DEFAULT_INSTANCES), thendocs/codex-core.mdandskills/skill-usage-report/manifest.json.Evidence
The MCP endpoints were checked live. Each returns an OAuth
401that names its own protected-resource metadata:The documented lookup, run against an s.space-primary row list:
Manifest default, before and after (
resolve_cloud_origin({}, shipped manifest)): before it returned the pinned manifest literal whateverdefault_cloud_origin()said; now the test asserts the shipped value is""and that resolution equalsdotspace.default_cloud_origin().Tests
Diff coverage: the only changed Python is the
DEFAULT_INSTANCESliteral and test files, and the new dotspace test covers it.Feature/documentation consistency
docs/dotspace.md(registry fields and how callers usemcp_url) anddocs/codex-core.mdare updated, and thedocs/catalog.jsondate for codex-core is bumped. Thedotspace.mddate is bumped in the companion health/status PR, so the two PRs don't conflict on that line.Risks / edge cases
core.dotspace.instanceslist replaces the built-ins, so an operator-written entry withoutmcp_urlnames none. A well-knownmcp_urlstill fills it for a registered server, as before.docs/codex-core.md, in different hunks (setup and launcher sections). There is no textual overlap.Follow-ups
skills/skill-usage-report/scripts/report-usage.pycould pass the primary connection's server todefault_cloud_origin(primary_server=...)once the companion PR (which adds that parameter) lands.skills/schedule-crons/ensure-cron-room.pystill posts through the legacy gateway token. Moving it to the primary connection belongs with the shared room/connection resolver.🤖 Generated with Claude Code
Behaviour change: with
AG2_CLOUD_ORIGINempty and core absent,skill-usage-reportresolves no origin and skips reporting; it no longer posts to the manifest URL.