feat: inject the framework refusal-reaction baseline into MCPL child env - #79
Open
slimepriestess wants to merge 1 commit into
Open
Conversation
Host composition serializes agent-framework's REFUSAL_REACTION_BASELINE (comma-joined) into DISCORD_SUPPRESSED_REACTIONS_BASELINE for stdio MCPL children, so never-configured Discord deployments default to suppressing exactly the annotations this host's framework stamps. The env composition moves into composeMcplChildEnv (mcpl-config.ts) for testability: baseline before the spread — an operator-set value on the server entry supersedes the house default, including an explicit empty string — and AGENT_TIMEZONE after it, preserving the existing host-resolved wall-clock behavior. Enforcement precedence below this (file key incl. [] beats legacy env beats baseline; lost config stays stale) is the Discord adapter's, per the composed-baseline spec; the host owns only that the injected value is the framework's exact emitted set, below the model line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Second protective-baseline companion per Sol's #architecture spec (8/4 21:54 + 22:09). Depends on anima-research/agent-framework#88 (the
REFUSAL_REACTION_BASELINEexport) landing and cutting a release; Discord-side precedence/reporting is anima-research/discord-mcpl#19.What it does
Stdio MCPL children now receive
DISCORD_SUPPRESSED_REACTIONS_BASELINE— agent-framework's exported refusal-annotation set, comma-joined — so a never-configured Discord adapter defaults to suppressing exactly the markers this host's framework stamps, instead of defaulting to nothing.The env composition moves out of the inline
finalServersmap intocomposeMcplChildEnv()(mcpl-config.ts) for testability, with deliberate spread order:AGENT_TIMEZONEafter it — unchanged existing behavior: the agent-facing wall clock is host-resolved per recipe, not a per-server knob.Injection is unconditional across stdio children (the var is namespaced; non-Discord adapters ignore it) — judgment call flagged for review: detecting "the Discord server" by command string felt more fragile than an inert env var. Standalone Discord without this composition stays honestly unprotected, per "house markers are Host semantics, not universal Discord truth."
Composed-test coverage (Sol's items, host's share)
test/mcpl-child-env.test.ts, 6 tests: injected value round-trips to the exact framework set (split(',')equalsREFUSAL_REACTION_BASELINE— this is the AF↔host boundary assertion); injection only when the operator didn't set it; operator value (incl. empty string) preserved verbatim; timezone behavior unchanged; nothing injected beyond the two host-owned keys. Items 3–4 of the composed spec (adapter reportssource:"baseline-default"+ digest/count, file[]disables, lost config stays stale) are discord-mcpl#19's suite. The cross-repo digest equality has no code-level home (host can't compute the adapter's normalized-set digest) — it's the deployment verification step viafilters_get, same as #13'ssource=filecheck.Verification
tscshows exactly ONE new error — the not-yet-released export (main has 4 pre-existing: 3 tts-relay + 1 mcpl-admin). Goes green with the AF release; happy to bump the dep floor in this PR once the version exists.(Implementation and this description drafted by Claude at Ra's request.)
🤖 Generated with Claude Code