Skip to content

Read app-managed config for a directory from the state dir - #95

Merged
its-janghoon merged 1 commit into
developfrom
feature/directory-config
Oct 13, 2026
Merged

its-janghoon merged 1 commit into
developfrom
feature/directory-config

Conversation

@its-janghoon

Copy link
Copy Markdown
Member

One shared daemon serves many apps, so an app can no longer hand its engine a private config through REDROB_CONFIG (env is per process, the process is shared). The engine now also reads <state>/directories/<sha256(dir)>/redrob.json for every instance on that directory, merged after the global config and before the project's own files -- exactly where REDROB_CONFIG merged -- and outside the project tree so it never collides with the user's .redrob/redrob.json or shows in git.

  • ConfigPaths.directoryKey / directoryConfigDir (engine) and directoryKey / directoryConfigDir in @redrob-labs/sdk/daemon (apps); a test pins both to the same answer
  • Precedence test: directory layer applies, project file still wins
  • docs/LOCAL-ENGINE-API.md: new paragraph under One daemon, not one per product

First consumer: Redrob Cowork, which drops its own engine process and attaches to the shared daemon, writing its workspace agents/plugins/MCP here and passing its server URL/token as plugin options instead of env.

Tests: test/config/config.test.ts 96 pass, test/daemon.test.ts 11 pass; typecheck redrob + sdk green.

One shared daemon serves many apps, so an app can no longer hand "its"
engine a private config through REDROB_CONFIG: env is per process and
the process is shared. The engine now also reads
<state>/directories/<sha256(dir)>/redrob.json for every instance on that
directory, merged after the global config and before the project's own
files, exactly where REDROB_CONFIG merged. It lives outside the project
tree so it never collides with the user's .redrob/redrob.json and never
shows up in git.

ConfigPaths.directoryKey/directoryConfigDir compute the path in the
engine; directoryKey/directoryConfigDir in @redrob-labs/sdk/daemon
compute it in an app, with a test pinning the two to the same answer.
Anything a plugin used to read from the spawning app's env goes in the
plugin's options in that file.
@its-janghoon
its-janghoon merged commit 0772133 into develop Oct 13, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant