Repository navigation
This version adds environments: a resource repository can describe the team's development, test, staging and production environments with their servers and databases, rgd writes them into an environment map for the AI to read, and the MCP tools the AI can use are limited by the environment's tier. This version only describes and filters; there is no access yet: staging and production give the AI no tools, and there is no authorization and no handing out of shared credentials.
What is in it
- Three new resource kinds: environment, server, database (one YAML file each under
envs/,servers/,databases/). An environment has a tier:dev,test,stagingorprod, always these four. All three only describe: where it is, what it is for, how people connect, what must not be done; a password can only be a whole${secret:NAME}reference. An MCP server can be bound to an environment and one of its databases withenvanddatabase, andtools[].statementnames the argument that carries SQL; a secret inrigdepot.yamlcan be markedshared: true. The repository format is stillschema: 1, with new kinds and optional fields only. See docs/environments.md. - The environment map. A sync writes every environment, server and database a person gets into one skill,
rgd-environments: a table inSKILL.mdand one page per environment. It goes into Claude Code and Codex; OpenCode reads Claude Code's. The map holds no password and no${secret:…}.sync --planshows where the map goes and which tools the AI does not get because of a tier. When an agent'sbindsnames an environment, server or database, the instructions delivered with it point to the map. - The AI's tools filtered by tier. For an MCP server bound to an environment, the single entry (
rgd mcp serve) andrgd mcp callgive:devand unbound, every tool as before;test, only the tools markedstatementand notwrites(no write tools, nothing unmarked);stagingandprod(and an unknown tier), none: the server is not started and its secrets are not read. A hidden tool cannot be called by name either; the answer says why. Wherergddoes not stand in between (native-env, or a tool that cannot start a stdio entry), an MCP server bound totestis delivered as an on-demand skill that lists only the tools the AI gets. - No connection details for staging and production. The environment map and
GET /me/envmapshare one rule: for what the AI must not connect to (all of staging and production, and anything at levelnone) they leave out shared accounts, login method, jump host, port, channels and per-call limits, and keep the host, the database name and the purpose. - Twelve check rules instead of eight. New:
envcreds(literal passwords, passwords in addresses and token-like strings in environment resources and MCP servers, and shared secrets used by an MCP server bound to no environment),envref(references point to existing resources of the right kind, jump hosts do not form a loop) andenvtier(what each tier allows, for example only levelnonein production and no write tools on an MCP server bound to staging or production), all must-fix;frontmatter(an agent'sAGENT.mdstarts with another tool's front matter), advisory.dangerousreports two more things:destructive_sql(DROP, TRUNCATE, DELETE / UPDATE without WHERE; advisory) andprod_target(a line in a skill, workflow or agent that names a production environment of the same repository and writes; must-fix). See docs/checks.md. rgd env list/rgd env showshow your environment map on the command line: environments, servers and databases by tier, what the AI can do with each, which secrets are missing. The source is the same as forsync(--repo, the server orrepo.url);--jsonprintsrgd.envs/v1andrgd.env/v1.- Server. Environments, servers and databases are imported from resource repositories, and can be registered on the web: references only to published resources; personal (
me) scope only for development environments; literal passwords are refused and never stored. The newGET /api/v1/me/envmapreturns a person's environment map (no passwords, no secret references).rgdbefore 0.2.0 does not get the MCP servers bound to atest,stagingorprodenvironment (see Needs attention). Migration0019addssharedto secret definitions. - The console's Environments page. A tier bar, environment cards in one lane per tier, tables of servers and databases; a detail drawer with the overview, the map page and tools the AI sees, and the files in the repository; managers can register environments, servers and databases (passwords only as a secret name; there is no password field), either as files to add to the repository or as a draft registered on the web; a delivery preview shows the map and whether each channel tool goes to the AI. Creating a resource under Resources offers the three kinds too.
- The example repository has four environments (shop development, shop test, payments test, shop staging) with their servers and databases, and two optional database channels (MCP servers bound to the test and the staging database).
Fixes
- Signed in to a server with
mcp.mode = direct, a sync wrote anrgd mcp runentry for an MCP server bound to atestenvironment, andrgd mcp runpasses every message through without filtering, so the AI got the test database's write tools (only during 0.2 development; 0.1.0 had no environments). Such servers are now delivered in direct mode as an on-demand skill whose calls go throughrgd mcp call, which filters; andrgd mcp runno longer starts an MCP server bound totestor above, or to an unknown tier, whoever wrote the entry: it lists no tools and every call says why and what to use instead. - An agent whose
AGENT.mdstarts with its own front matter (copied from Claude Code, for example) was delivered with two front matter blocks, the second one read as text. Delivery now drops the entry's own block and keeps the one made frommeta.yaml; the newfrontmatterrule tells the author to move name and description intometa.yaml. - When the home directory (
HOME, on WindowsUSERPROFILE) does not exist or is not a directory,status,sync,uninstall,enableanddisablereported "Internal error"; they now name the directory and the variable to set (--jsonerror codeshome_missing,home_not_dir). - After
sync --repowith no repository configured,rgd statusbegan with "No resource repository configured", as if nothing were installed; it now says which repository the last sync came from and how to compare with it. - When a resource registered or uploaded on the web referred to an unpublished resource,
errors[].fieldin the API error was empty; it now names the field holding the reference (the contract requires it to be non-empty). - Tests: two intermittent failures. A freshly built program's first run on macOS waits for a system check (a dozen to several dozen seconds were measured), which counted against the end-to-end tests' wait for the server; programs are now run once before timing starts, and
RGD_TEST_START_TIMEOUTraises the limit. A server test forged the sign-in state cookie in a way that left it unchanged one time in 64.
Needs attention
- The example repository requires
rgd0.2.0 or later (requires.rgd: ">=0.2.0"inrigdepot.yaml);rgd0.1.x refuses the whole repository and says to upgrade. Your own repository must say the same when it has an MCP server bound to a staging or production environment (envtierreports it otherwise). rgd0.1.x does not get MCP servers bound to atest,stagingorprodenvironment. By default the server acceptsrgdof its own version and the minor version before, so 0.1.x still syncs; but 0.1.x knows nothing of environment bindings and would install such a server like any other, with every tool. So the server leaves them out of what a command line before 0.2.0 gets (as itsUser-Agentsays), together with what only they bring along and the secrets only they need, and its log names them ("withheld from a command line before 0.2.0"). MCP servers bound todevor to no environment, and everything else, still go to 0.1.x. To give everyone the guarded servers, have them upgradergd; raising the minimum version to 0.2.0 under Tool adapters makes 0.1.x stop syncing and say to upgrade.- The check rule set goes from version 1 to 2. Published versions keep the results they were checked with; imports, uploads and web registrations from now on are checked with the new rules, and content that could be published before may be stopped by a new must-fix finding, for example a password in an MCP server's connection address (even as a
${secret:…}reference). Runrgd check --repoon your repository first. - Shared credentials are only recorded in this version. A secret marked
shared: trueis not handed to anyone: everyone who uses it sets it once withrgd secret set <NAME>. rgd mcp runrefuses to start an MCP server bound totestor above (or to an unknown tier), also from entries an older sync wrote. After upgradingrgd, runrgd synconce to replace them with an on-demand skill or the single entry.devand unbound MCP servers are not affected.- The front matter at the top of an agent's
AGENT.mdis dropped on delivery, and with it settings meant for one tool (such astoolsormodel). - Windows is still a preview, as in 0.1.0: this version has no Windows fixes, some tests still fail on GitHub Actions' Windows runner, and nothing was verified on a Windows machine.
go run ./tools/dev checkwas run on macOS and in a Linux container (check-linux); the browser tests were run on macOS only; before publishing, the release workflow runs the full check again on GitHub Actions (Linux). - The other known limitations of 0.1.0 remain: the binaries and
checksums.txtare not signed, the single entry is not verified in OpenCode, there is no unattended server setup, and some server texts are English only.prod_targetandenvtiercompare only with the environments checked together: a production environment registered only on the web is not used to check the skills in a repository.
Upgrading
- Server: replace the program or the image tag and restart; migration
0019(one new column on secret definitions) runs at startup. Make a backup first and have the master key at hand. With SQLite the server writes apre-migrate-…snapshot itself before migrating; with PostgreSQL runpg_dumpfirst. After the migration the older program does not open the database; going back to 0.1.0 means restoring the snapshot from before the migration. See docs/deploy.md. rgd: run the install command again (orbrew upgrade --cask rigdepot,scoop update rigdepot), thenrgd sync. The local manifest and MCP records written by 0.1.0 are read as before, as bound to no environment.- The repository format (
schema: 1) and the API (/api/v1) only gain: new kinds, optional fields,GET /me/envmapand a few new error codes.