feat(wrapper): opt-in repo-qualified tmux sessions and per-agent env overrides - #92
Open
maxlamagna wants to merge 1 commit into
Open
feat(wrapper): opt-in repo-qualified tmux sessions and per-agent env overrides#92maxlamagna wants to merge 1 commit into
maxlamagna wants to merge 1 commit into
Conversation
…overrides Shared installs collide. Each project's server issues its own slot counter from 1, so the first wrapper for an agent in any project asks for the same `agentchattr-<agent>` tmux session, and wrapper_unix kills a pre-existing session of that name before creating its own. Two onboarded projects therefore evict each other. Two opt-in mechanisms, both no-ops when unset: - `AGENTCHATTR_AGENT_<KEY>` overlays one agent's config, so a per-project launcher need not edit the shared config.toml. Whitelisted to `cwd` and `mcp_settings_path` so a committed project env file cannot redirect security-sensitive keys such as `command` or `mcp_inject`. - `AGENTCHATTR_REPO_SLUG` qualifies the tmux session name. Both are extracted into named helpers so they can be tested directly. The config overlay keeps its original in-place update semantics, so this stays a testability refactor rather than a second behavioural change. 17 behavioural tests; six critical guard mutations, 6/6 killed. README documents both variables alongside the existing AGENTCHATTR_* list. Refs bcurts#67
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.
Closes #67.
Implements the proposal in #67, which has been open since May.
Shared installs collide. Each project's server issues its own slot counter from 1, so the first wrapper for an agent in any project asks for the same
agentchattr-<agent>tmux session, andwrapper_unixkills a pre-existing session of that name before creating its own. Two onboarded projects therefore evict each other.Two opt-in mechanisms, both no-ops when unset:
AGENTCHATTR_AGENT_<KEY>overlays one agent's config, so a per-project launcher need not edit the sharedconfig.toml. Whitelisted tocwdandmcp_settings_pathso a committed project env file cannot redirect security-sensitive keys such ascommandormcp_inject.AGENTCHATTR_REPO_SLUGqualifies the tmux session name.Both are extracted into named helpers so they can be tested directly. The config overlay keeps its original in-place update semantics, so this stays a testability refactor rather than a second behavioural change.
README documents both variables alongside the existing
AGENTCHATTR_*list.Tests: 17 behavioural tests; six critical guard mutations, 6/6 killed. No source-text assertions.
Correction to the issue text: #67 says "Tests included (11 tests) … available in our local checkout", including "structural presence". That was written before the tests existed. What is actually here is 17 behavioural tests and no structural assertions.
Ordering: #91 fixes an intermittent 502 in
ProxyHeaderForwardingTeststhat is unrelated to this change but can make a full-suite run here fail at random. Merging that first makes this one read cleanly. This PR does not otherwise depend on it.