You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(clients): register Factory Droid during setup - #2309
Registers Factory Droid (the droid CLI) as a supported client during npx rea-agents setup, following the Qoder registration (#1572). After this change, Droid users can install REA with one command: setup writes the rea MCP server into the user-level ~/.factory/mcp.json and installs the skill copy into ~/.factory/skills. No linked issue; I found no existing issue or PR for Droid support.
Problem and expected behavior
Factory Droid is not among the clients setup recognizes, so Droid users have to hand-edit ~/.factory/mcp.json and copy the skill themselves. Expected: after rea setup --client droid, mcpServers.rea exists in ~/.factory/mcp.json, the skill is installed under ~/.factory/skills/reverse-engineer-anything, doctor reports the registration as aligned, and uninstall removes exactly the rea entry and the skill copy.
Droid's configuration, per the official docs (MCP, skills):
User-level MCP servers live under the top-level mcpServers key of ~/.factory/mcp.json. A project-level .factory/mcp.json also exists; it is out of scope here.
Droid's own entries usually carry type (stdio or http), command, args, env and disabled. REA's existing json format writes command/args (plus env when needed) without type. With the real Droid CLI, such an entry is listed as a stdio server and connects (see Evidence).
Personal skills are discovered from ~/.factory/skills/<name>/SKILL.md.
Change and scope
SupportedClients: droid definition (display name "Factory Droid"): config path ~/.factory/mcp.json, marker ~/.factory, skills ~/.factory/skills, format json. No new dialect or code path.
Tests: new tests/boundary/filesystem/droidClientConfiguration.test.ts (6 cases); the clientLifecycle.test.ts expected detection list includes droid.
Docs: a row in the Supported agents table, a "Factory Droid" section in docs/client-configuration.md, and the client id in the skill's references/connection-and-recovery.md.
Intentionally out of scope: the project-level .factory/mcp.json, and a home-directory override variable (I found none documented by Factory, so none is honored).
The client id droid matches the CLI name; happy to rename it (for example factory_droid) if you prefer.
Contribution scope: a setup registration within existing boundaries, following the Qoder (#1572) and Qwen Code (#1415) registrations; maintainer scope decision not applicable.
Contribution scope fit and linked maintainer decision: not applicable (see above).
CLI and MCP/tool-catalog contract: no tools added or changed; --client droid becomes a valid value.
Provider, bridge, target-format, or platform compatibility: adds the droid client, reusing the existing json configuration format.
Evidence, artifact, provenance, or reconstruction contract: not applicable.
Target selection, authority, upstream behavior, and cleanup details (if applicable): setup writes only mcpServers.rea; unrelated servers and Droid's top-level persistentPermissions are preserved. Uninstall removes only the rea entry and the skill copy.
Expected effects (check known effects; use documentation-only on its own).
Read existing files or captured data.
Launch or attach to a process.
Inject instrumentation or run scripts/code.
Change process memory, registers, files, or configuration.
Contact network services.
Recover protected code or work around protections.
Documentation or usability only; no target interaction.
Not sure yet; investigation or maintainer guidance needed.
The two checked effects are setup's existing behavior (reading and writing the client's MCP config with a backup), now applied to ~/.factory/mcp.json.
Evidence and regression coverage
Tests added or updated: droidClientConfiguration.test.ts covers config path resolution on linux/darwin/win32; the skill destination; an upsert that preserves an unrelated mcpServers entry and a Droid-shaped top-level persistentPermissions object; an idempotent re-run that reports unchanged with registration status aligned; creating mcpServers in an existing file without servers; an empty file; and uninstall removing only rea. clientLifecycle.test.ts now expects droid in the detected list.
Base reproduction or other evidence: end-to-end with the real Droid CLI 0.235.0 on macOS 26.7.1, in a throwaway HOME that contained only an empty .factory directory, using the CLI built from this branch:
rea setup --client droid --yes wrote mcpServers.rea = {"command": "<checkout>/scripts/rea.mjs", "args": ["mcp"]} (no type) and installed .factory/skills/reverse-engineer-anything.
rea doctor --json: the droid registration reports state: "aligned" and remediation: null. doctor itself exits 1 in such an empty HOME; it does the same in an empty HOME without .factory, so that status comes from the other unconfigured checks, not from this client.
droid mcp list: rea stdio connected [user].
rea uninstall removed the Droid registration and the skill copy; mcp.json became {"mcpServers": {}}.
User-visible CLI/MCP output (if applicable): setup, doctor and uninstall list "Factory Droid" / droid.
Remaining proof gaps: only macOS was run (path resolution for Linux and Windows is covered by the boundary test). The project-level .factory/mcp.json is not handled. The test fixture matches the real persistentPermissions shape by key and type only, with fake values.
For evidence-bearing changes: not applicable (setup registration; no Evidence contract change).
Toolchain: Node 26.9.0 and npm 11.19.1 on main 0365454 (.nvmrc pins 24.18.0, so CI covers the pinned toolchain)
Compatibility, safety, and release
Breaking changes or migration steps: none.
Real Hopper/Ghidra, browser, or OS coverage: not applicable. macOS 26.7.1 with Droid CLI 0.235.0 for the end-to-end run; config I/O is covered by filesystem boundary tests.
Package or release metadata impact: none.
Security, privacy, process, or containment review: setup writes only the rea entry into ~/.factory/mcp.json, preserving all unrelated content; no network access or process execution added.
Before merge
This PR addresses a concrete problem or an agreed enhancement.
Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
The PR has one focused outcome and the title follows type(scope): outcome.
Related issue is linked, or the reason for not linking one is stated above.
Tests cover changed observable behavior and meaningful failure paths.
Owning docs, contracts, and generated metadata are updated where needed.
User-visible CLI/MCP changes include representative output.
I checked the final diff for secrets, unrelated cleanup, and unsupported claims.
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.
[Medium impact] The PR appears safe to merge; no actionable defects were found.
Summary
Adds Factory Droid to setup through the existing JSON client support.
Factory Droid setup installs REA’s server and skill in its user folders.
No actionable defects or new security issues were found. Local history showed no separate superseding Droid registration. GitHub status and discussion could not be checked because authentication was unavailable.
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
area: cliCLI adapter and one-shot commandsarea: setupSetup, packaging, upgrade, install, Doctor, and client registrationenhancementNew feature or request
2 participants
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.
Summary
Registers Factory Droid (the
droidCLI) as a supported client duringnpx rea-agents setup, following the Qoder registration (#1572). After this change, Droid users can install REA with one command: setup writes thereaMCP server into the user-level~/.factory/mcp.jsonand installs the skill copy into~/.factory/skills. No linked issue; I found no existing issue or PR for Droid support.Problem and expected behavior
Factory Droid is not among the clients setup recognizes, so Droid users have to hand-edit
~/.factory/mcp.jsonand copy the skill themselves. Expected: afterrea setup --client droid,mcpServers.reaexists in~/.factory/mcp.json, the skill is installed under~/.factory/skills/reverse-engineer-anything,doctorreports the registration as aligned, and uninstall removes exactly thereaentry and the skill copy.Droid's configuration, per the official docs (MCP, skills):
mcpServerskey of~/.factory/mcp.json. A project-level.factory/mcp.jsonalso exists; it is out of scope here.type(stdioorhttp),command,args,envanddisabled. REA's existingjsonformat writescommand/args(plusenvwhen needed) withouttype. With the real Droid CLI, such an entry is listed as a stdio server and connects (see Evidence).~/.factory/skills/<name>/SKILL.md.Change and scope
SupportedClients:droiddefinition (display name "Factory Droid"): config path~/.factory/mcp.json, marker~/.factory, skills~/.factory/skills, formatjson. No new dialect or code path.tests/boundary/filesystem/droidClientConfiguration.test.ts(6 cases); theclientLifecycle.test.tsexpected detection list includesdroid.docs/client-configuration.md, and the client id in the skill'sreferences/connection-and-recovery.md..factory/mcp.json, and a home-directory override variable (I found none documented by Factory, so none is honored).droidmatches the CLI name; happy to rename it (for examplefactory_droid) if you prefer.Contribution scope: a setup registration within existing boundaries, following the Qoder (#1572) and Qwen Code (#1415) registrations; maintainer scope decision not applicable.
Contract and boundary impact
SupportedClients).--client droidbecomes a valid value.droidclient, reusing the existingjsonconfiguration format.mcpServers.rea; unrelated servers and Droid's top-levelpersistentPermissionsare preserved. Uninstall removes only thereaentry and the skill copy.docs/public/product-catalog.json), package, or installation impact: none authored; generated catalogs stay CI-owned.Expected effects (check known effects; use documentation-only on its own).
The two checked effects are setup's existing behavior (reading and writing the client's MCP config with a backup), now applied to
~/.factory/mcp.json.Evidence and regression coverage
droidClientConfiguration.test.tscovers config path resolution on linux/darwin/win32; the skill destination; an upsert that preserves an unrelatedmcpServersentry and a Droid-shaped top-levelpersistentPermissionsobject; an idempotent re-run that reportsunchangedwith registration statusaligned; creatingmcpServersin an existing file without servers; an empty file; and uninstall removing onlyrea.clientLifecycle.test.tsnow expectsdroidin the detected list.HOMEthat contained only an empty.factorydirectory, using the CLI built from this branch:rea setup --client droid --yeswrotemcpServers.rea = {"command": "<checkout>/scripts/rea.mjs", "args": ["mcp"]}(notype) and installed.factory/skills/reverse-engineer-anything.rea doctor --json: thedroidregistration reportsstate: "aligned"andremediation: null.doctoritself exits 1 in such an emptyHOME; it does the same in an emptyHOMEwithout.factory, so that status comes from the other unconfigured checks, not from this client.droid mcp list:rea stdio connected [user].rea uninstallremoved the Droid registration and the skill copy;mcp.jsonbecame{"mcpServers": {}}.droid..factory/mcp.jsonis not handled. The test fixture matches the realpersistentPermissionsshape by key and type only, with fake values.For evidence-bearing changes: not applicable (setup registration; no Evidence contract change).
Validation performed
npx vitest run tests/boundary/filesystem/droidClientConfiguration.test.ts tests/boundary/filesystem/clientLifecycle.test.ts— 2 files, 59 tests passednpm run check— passed (architecture guards across 1227 source files)npm run check:fast— typecheck and lint passednpm run verify:test-discovery— all 963 test files discovered exactly oncenpm run docs:check— passednpm run verify:package— passed (skill and its 6 references installed with Skills 1.7.2; setup planned-then-idempotent; 185 MCP tools)npm pack --dry-run— passed (1473 files)~/.factory/mcp.jsonand~/.factory/skills/<skill-name>/SKILL.md0365454(.nvmrcpins 24.18.0, so CI covers the pinned toolchain)Compatibility, safety, and release
reaentry into~/.factory/mcp.json, preserving all unrelated content; no network access or process execution added.Before merge
type(scope): outcome.