Repository navigation
Read app-managed config for a directory from the state dir - #95
Merged
Merged
Conversation
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.
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.
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.jsonfor every instance on that directory, merged after the global config and before the project's own files -- exactly whereREDROB_CONFIGmerged -- and outside the project tree so it never collides with the user's.redrob/redrob.jsonor shows in git.ConfigPaths.directoryKey/directoryConfigDir(engine) anddirectoryKey/directoryConfigDirin@redrob-labs/sdk/daemon(apps); a test pins both to the same answerFirst 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.ts96 pass,test/daemon.test.ts11 pass; typecheck redrob + sdk green.