feat(compass-agent): add comms_open_dm + comms_dm peer-DM tools (RIG-2966) - #749
Merged
Merged
Conversation
…2966) Adds the two agent-facing peer-DM tools from the frozen peer-DM design (T5), built on the merged OpenDM proto contract (RIG-2962, #738): - `comms_open_dm{peer_handle}` — resolve-or-create a two-party DM channel with a peer by handle; renders the resolved channel name (Opened vs Resumed). - `comms_dm{peer_handle, topic, text, create_topic?}` — a composite that opens (resolve-or-create) the DM then posts a message into it in one call. The idempotency key rides the post leg only (the write); `OpenDMRequest` carries none. A first-leg failure short-circuits before the post; a second-leg failure surfaces in-band. Both tools guard every model-facing interpolation through `attr` (the DM name `dm--<lo>--<hi>` and message ids are id-shaped), matching the existing `comms_post_message` return. Caller input is never echoed into model-facing text. Also: barrel re-exports the OpenDM/Channel gen types; the native tool-set grows five -> seven (comms.ts header, createCommsTools doc, cli.ts count assertions 17 -> 19); AGENTS.md and the comms-playbook skill name the tools on the DM-first routing guidance. Tests mirror comms.test.ts: open_dm wire shape + created/resumed render; the comms_dm composite (open-then-post ordering, per-leg wire shape, idempotency-key-on-post-only, first-leg short-circuit, second-leg in-band); create_topic pass-through; schema non-blank/length bounds. Spec-impact: none. Refs RIG-2966 Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
Compass engineering docs preview: https://compass-agent-rig-2966-peer.compass-eng-docs.pages.dev Deployed from Changed pages: |
mattwilkinsonn
approved these changes
Aug 30, 2026
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.
Adds the two agent-facing peer-DM tools from the frozen peer-DM design
(T5), built on the merged OpenDM proto contract (RIG-2962, #738):
comms_open_dm{peer_handle}— resolve-or-create a two-party DM channelwith a peer by handle; renders the resolved channel name (Opened vs
Resumed).
comms_dm{peer_handle, topic, text, create_topic?}— a composite thatopens (resolve-or-create) the DM then posts a message into it in one
call. The idempotency key rides the post leg only (the write);
OpenDMRequestcarries none. A first-leg failure short-circuits beforethe post; a second-leg failure surfaces in-band.
Both tools guard every model-facing interpolation through
attr(theDM name
dm--<lo>--<hi>and message ids are id-shaped), matching theexisting
comms_post_messagereturn. Caller input is never echoed intomodel-facing text.
Also: barrel re-exports the OpenDM/Channel gen types; the native
tool-set grows five -> seven (comms.ts header, createCommsTools doc,
cli.ts count assertions 17 -> 19); AGENTS.md and the comms-playbook
skill name the tools on the DM-first routing guidance.
Tests mirror comms.test.ts: open_dm wire shape + created/resumed
render; the comms_dm composite (open-then-post ordering, per-leg wire
shape, idempotency-key-on-post-only, first-leg short-circuit, second-leg
in-band); create_topic pass-through; schema non-blank/length bounds.
Spec-impact: none. Refs RIG-2966
Co-authored-by: Matt Wilkinson matt@rigel.build