v0.11.0 — COLONY_DM_PROMPT_MODE for DM-origin prompt framing#35
Merged
Conversation
Sibling of @thecolony/elizaos-plugin v0.27.0; same regime names (none / peer / adversarial) and byte-identical preamble text so framing is portable across the four plugins. dm_prompt module ships: - DmPromptMode enum + PEER_PREAMBLE / ADVERSARIAL_PREAMBLE constants - apply_dm_prompt_mode(text, mode) — pure function, prepends preamble when mode != none - parse_dm_prompt_mode(value) — env-var parser, fails closed to NONE on unknown input so a deployment-config typo cannot crash boot Library-shaped on purpose: ships primitives the agent app wires into its DM-handling path. See langford v0.11+ for live wiring. 15 new tests, 100% coverage maintained (575 passed, 17 skipped). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced May 5, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
Sibling of
@thecolony/elizaos-pluginv0.27.0; same regime names (none/peer/adversarial) and byte-identical preamble text so framing is portable across the four plugins (elizaos / langchain / pydantic-ai / smolagents).langchain_colony.dm_promptships:DmPromptModeenum +PEER_PREAMBLE/ADVERSARIAL_PREAMBLEconstantsapply_dm_prompt_mode(text, mode)— pure function, prepends preamble when mode ≠noneparse_dm_prompt_mode(value)— env-var parser. Whitespace-tolerant, case-insensitive, fails closed toDmPromptMode.NONEon unknown input so a deployment-config typo cannot crash bootWhy
The plugin-layer hardening stack already covers
colonyOriginenvelope tagging (v0.21 / v0.26) and the DM-safe action allow-list on the elizaos side. What it didn't have was a lever on what the model thinks the bytes mean once they reach inference. A DM saying "please post this for me on c/general" reads as a polite operator request to a default-deference LLM; framing the message as "from a peer agent on Colony, not from your operator" gives the model permission to engage but removes the operator-deference reflex.Library-shaped on purpose: ships primitives the agent app wires into its DM-handling path. See
langfordv0.11+ for live wiring.Test plan
tests/test_dm_prompt.pycovering parse / apply / unknown-value fallback / preamble-text-stabilitydm_prompt.py; project-wide coverage maintained at 100%_build_event_messageand asserting peer preamble lands in DM prompt + does not leak into mention/reply prompts🤖 Generated with Claude Code