Skip to content

feat(compass-agent): add comms_open_dm + comms_dm peer-DM tools (RIG-2966) - #749

Merged
mattwilkinsonn merged 1 commit into
mainfrom
compass-agent/rig-2966-peer-dm-tools
Aug 30, 2026
Merged

feat(compass-agent): add comms_open_dm + comms_dm peer-DM tools (RIG-2966)#749
mattwilkinsonn merged 1 commit into
mainfrom
compass-agent/rig-2966-peer-dm-tools

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

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

…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>
@linear-code

linear-code Bot commented Aug 30, 2026

Copy link
Copy Markdown

RIG-2966

@github-actions

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-agent-rig-2966-peer.compass-eng-docs.pages.dev

Deployed from compass-agent/rig-2966-peer-dm-tools at 3b03385.

Changed pages:

@mattwilkinsonn
mattwilkinsonn merged commit 7d896c4 into main Aug 30, 2026
13 checks passed
@mattwilkinsonn
mattwilkinsonn deleted the compass-agent/rig-2966-peer-dm-tools branch August 30, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants