GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(mcpx): live add/remove for adapter declarations (#2118) by dezren39 · Pull Request #2565 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Slice of #2118 (generalised live add + generated declarations for bare binaries; parent #1875, queue task 3104). The OpenAPI first-class slice already landed as #2514 (merged). This PR lands the adapters third of the generalised live add; APIs/recipes live add and mcpx adapter generate remain on #2118 for the next slice.

What

Mirror servers_add/servers_remove for adapter declarations:

  • POST /v1/adapters — body is the declaration itself (name, command, runtime/args/env/description/tools, replace). Validated with adapter.Spec.Validate, written to the first file paths.adapters names via the new config.AddAdapterEntry, then the daemon reloads — callable immediately, still there after a restart. When paths.adapters names no file the request is refused with the remedy, rather than written somewhere a reload would never find.
  • DELETE /v1/adapters/{name} — removes the declaration from whichever configured file defines it (config.AdapterDefinedIn), then reloads.
  • config.RemoveAdapterEntry + writer tests: both declaration-file shapes ({"adapters": [...]} and bare array) are preserved on edit; duplicate names are refused unless replace (same rule as AddServer).
  • Ops table: adapters_add / adapters_remove declared (CLI/MCP parity), plugin ops regenerated.
  • CLI parity: mcpx adapter add <name> [--tool <sub>]... -- <command> [args...] and mcpx adapter remove <name>, through the daemon like servers add/remove.

Verification

  • Laptop: go build + go vet clean for config/api/daemon/cli; new internal/config writer tests pass; internal/api parity: the only failure is the pre-existing GET /v1/dashboard/ route/op trailing-slash mismatch, present on clean origin/main and unrelated (the new adapter routes are declared). Full daemon suite does not complete on this branch or on clean main (pre-existing signal: terminated noted by earlier lanes) — CI is the arbiter.

Refs #2118, parent #1875.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
feat(mcpx): live add/remove for adapter declarations (#2118)
40939aa
POST /v1/adapters and DELETE /v1/adapters/{name} mirror servers_add/servers_remove: the declaration is written to the first file paths.adapters names (config.AddAdapterEntry/RemoveAdapterEntry, preserving object or bare-array shape) and the daemon reloads, so the adapter is callable at once and persists across restarts. Refused with the remedy when paths.adapters names no file. CLI parity: mcpx adapter add/remove through the daemon. Ops table entries added and plugin ops regenerated.
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 04:57
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b56f082e-02d5-406b-ae1f-12a4f1ff3c63
Commits

Reviewing files that changed from the base of the PR and between 2508d73 and 6c21adb.

Files selected for processing: 11
  • pkgs/mcpx/docs/parity.md
  • pkgs/mcpx/internal/api/ops_settings.go
  • pkgs/mcpx/internal/cli/adapter.go
  • pkgs/mcpx/internal/cli/adapter_add_test.go
  • pkgs/mcpx/internal/cli/manual.go
  • pkgs/mcpx/internal/cli/plugin.go
  • pkgs/mcpx/internal/config/write.go
  • pkgs/mcpx/internal/config/write_adapters_test.go
  • pkgs/mcpx/internal/daemon/adapter_routes_test.go
  • pkgs/mcpx/internal/daemon/routes_settings.go
  • pkgs/mcpx/plugin/opencode/mcpx/ops.gen.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T09:33:49.071013Z 6c21adb New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 30, 2026
mcpx: generalised live add + generated declarations for bare binaries (split of #1875) #2118
Closed
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 30, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40939aae18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/daemon/routes_settings.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/daemon/routes_settings.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/cli/adapter.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/cli/adapter.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/daemon/routes_settings.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 30, 2026
mcpx: anything as an MCP server -- scripts, bare binaries, recipes, plugins, as first-class namespaces #1875
Closed
@dezren39
fix(mcpx): disposition the five Codex findings on live adapter add (#…
3d8c6ec
…2118)

- P1: adapter add looks the name up across every configured file
  before writing; a duplicate is refused, a replacement edits the
  file that defines it (was: duplicate persisted into the first
  file, breaking reload and daemon start).
- P2: both adapter handlers hold reloadMu over lookup+write+reload,
  so concurrent live adds/removes cannot overwrite each other.
- P2: replacing a declaration restarts the adapter: augmentAdapters
  now carries MCPX_ADAPTER_DECLARATION_SHA256 in the generated
  server env (PoolID hashes env), the shape augmentAPIs uses.
- P2: --tool is a valued flag for hoisting, so --tool status stays
  paired after the adapter name.
- P2: generated tools carry their subcommand as fixed Args, so a
  tool runs git status, not bare git.

Also fixes the PR's two pre-existing parity failures: adapter is no
longer declared Local now that add/remove reach /v1 operations,
adapters_add description truthed up, docs/parity.md regenerated.

Tests (laptop): new daemon handler tests (cross-file refuse, replace
edits defining file, 8 concurrent adds all land), new cli tests
(hoist pairing, tool entries, fingerprint moves). go test
./internal/cli ./internal/daemon ./internal/config ./internal/adapter
pass. Pre-existing unrelated failure left alone: internal/api
route-coverage for GET /v1/dashboard/ fails on the clean PR head too.
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 30, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d8c6ec01b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/daemon/routes_settings.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/config/write.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
mcpx: disposition round-2 Codex P1s on live adapter add (#2118)
056726f
- handleAdaptersAdd refuses a name a non-adapter server namespace
  already owns (409) before persisting: augmentAdapters rejects such
  an adapter at load, so the write would 500 on reload and strand a
  declaration that breaks later reloads and daemon starts
- adapter file edits preserve sibling sections of combined documents:
  AddAdapterEntry/RemoveAdapterEntry now keep the parsed document and
  replace only its adapters field instead of rewriting the file as
  {adapters: [...]} and deleting mcpServers/paths/apis sections

Regression tests: TestAdapterAddRefusesServerNamespaceCollision
(daemon), TestAdapterEditsPreserveSiblingSections (config). Laptop:
go test ./internal/config/ ./internal/daemon/ pass.
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 30, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 056726f38b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/daemon/routes_settings.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
mcpx: refuse adapter adds that collide on the RESOLVED namespace (#2118)
f6e0c7c
The server-collision check compared map keys, so a configured
foo-bar did not stop an adapter named foo_bar even though both
resolve to namespace foo_bar through config.SanitizeNamespace and
the reload rejects the pair -- after the declaration was persisted.
The check now scans configured servers by sanitized namespace; the
adapter-generated exemption applies only to the adapters own exact
name, which a replace legitimately redefines.

Regression test: TestAdapterAddRefusesResolvedNamespaceCollision.
@dezren39 dezren39 mentioned this pull request Oct 30, 2026
ci: Actions check runs stuck in queued across PRs — no runner pickup since ~05:00Z 2026-10-28 #1599
Closed
@dezren39
Merge remote-tracking branch 'origin/main' into queue/3104-2118-live-add
6c21adb
@dezren39
dezren39 merged commit 2aec81c into main Oct 30, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/3104-2118-live-add branch October 30, 2026 09:36
This was referenced Oct 30, 2026
mcpx(daemon): POST/DELETE /v1/servers handlers never hold reloadMu — concurrent adds lose servers while reporting success #2674
Closed
mcpx: dogfood .opencode plugin copy drifted again (ops.gen.ts adapters ops + instructions.test.ts missing) — sync guard runs push-only, so it now fails main and skips the whole mcpx test job #2795
Closed
fix(mcpx/daemon): hold reloadMu in servers add/remove handlers (#2674) #3135
Merged
feat(mcpx): live API-spec add/remove over /v1 + CLI parity (#2118 item a) #4637
Merged
@dezren39
dezren39 restored the queue/3104-2118-live-add branch November 8, 2026 04:09
@dezren39
dezren39 deleted the queue/3104-2118-live-add branch November 8, 2026 13:21
dezren39 added a commit that referenced this pull request Nov 11, 2026
@dezren39 repo-worker-tmp-code-b
feat(mcpx): live API-spec add/remove over /v1 + CLI parity (#2118 ite…
9bd6dd3
…m a)

Add apis_add (POST /v1/apis) and apis_remove (DELETE /v1/apis/{name})
following the adapters_add pattern from PR #2565: persist the
declaration into the first paths.apis file that names API files and
reload, so the API is callable immediately and survives restart;
refuse with a remedy when no API file is configured, on cross-file
duplicates, and on server-namespace collisions.

CLI: mcpx api add <name> --spec <doc> [...] and mcpx api remove
<name> go through the daemon like adapter add/remove. Regenerated
ops.gen.ts and docs/parity.md; the api manual entry now lists
add/remove and drops the stale local-only note.
@dezren39 dezren39 added the audit:completed-later Gap completed by later merged PR label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:completed-later Gap completed by later merged PR

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.