Skip to content

feat(compass-agent): org-management comms tools + spawn role/persona (RIG-2673) - #632

Closed
rigel-mintaka wants to merge 3 commits into
compass-server/rig-2724-org-mgmt-protofrom
compass-agent/rig-2673-org-mgmt-tools
Closed

feat(compass-agent): org-management comms tools + spawn role/persona (RIG-2673)#632
rigel-mintaka wants to merge 3 commits into
compass-server/rig-2724-org-mgmt-protofrom
compass-agent/rig-2673-org-mgmt-tools

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

Add the T6 TS tool-surface consuming compass-server's org-management gateway
arms (RIG-2673 T1, #628). Three new native comms tools plus required
role/persona args on the existing spawn tool.

  • comms_create_channel — create a channel (born open, ownerless); optional
    group_id, kind (channel/dm/group_dm → ChannelKind), member_account_ids seed.
  • comms_update_members — add/remove members and flip subscribe opt-in on a
    channel.
  • comms_create_channel_group — create a channel group; optional
    parent_group_id, visibility (owner/shared → ChannelGroupVisibility).
  • agents_spawn_peer — role and persona now REQUIRED (non-blank) tool args,
    threaded into SpawnPeerRequest. Set-at-creation-only: a spawn onto an existing
    handle keeps the stored role/persona. persona is the peer's stable working
    context, not per-issue detail.

All three comms tools are approval: "write", mirror the comms_post_message
execute/guard shape (protocol-violation guard on result-case mismatch,
in-band CommsCallError → thrown tool failure), map string params onto their
proto enums at construction, and render server values through the render-guard
attr/flat split. The reused CreateChannelRequest/UpdateChannelMembersRequest/
CreateChannelGroupRequest carry no client_request_id, so none is sent (the
envelope callId still flows); SpawnPeerRequest keeps its idempotency key.

Barrel (compassv1.ts) re-exports the new payload schemas + enums. Tests cover
each tool's wire shape, enum mapping, injection-guard render, and required-field
rejection; the native-tool count asserts move 5→8 comms / 17→20 total.

Co-authored-by: Matt Wilkinson matt@rigel.build

rigel-mintaka and others added 2 commits August 25, 2026 19:04
…-2673)

Add the three org-management comms-call arms (create_channel=7,
update_members=8, create_channel_group=9 on CommsCallRequest.call; the
matching results =8/=9/=10 on CommsCallResult.result) and the Manager-
creation role=5/persona=6 fields on SpawnPeerRequest, reusing the existing
comms.proto payload messages verbatim. Regenerated the internal Go
(go/internal/gen) and agent TS (packages/compass-agent/src/gen) lanes.

T1 of the frozen org-management-tools record (RIG-2673, #589); the single
additive proto+regen commit both compass-server and compass-agent consume.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
…(RIG-2673)

Add the T6 TS tool-surface consuming compass-server's org-management gateway
arms (RIG-2673 T1, #628). Three new native comms tools plus required
role/persona args on the existing spawn tool.

- `comms_create_channel` — create a channel (born open, ownerless); optional
  group_id, kind (channel/dm/group_dm → ChannelKind), member_account_ids seed.
- `comms_update_members` — add/remove members and flip subscribe opt-in on a
  channel.
- `comms_create_channel_group` — create a channel group; optional
  parent_group_id, visibility (owner/shared → ChannelGroupVisibility).
- `agents_spawn_peer` — role and persona now REQUIRED (non-blank) tool args,
  threaded into SpawnPeerRequest. Set-at-creation-only: a spawn onto an existing
  handle keeps the stored role/persona. persona is the peer's stable working
  context, not per-issue detail.

All three comms tools are `approval: "write"`, mirror the `comms_post_message`
execute/guard shape (protocol-violation guard on result-case mismatch,
in-band CommsCallError → thrown tool failure), map string params onto their
proto enums at construction, and render server values through the render-guard
`attr`/`flat` split. The reused CreateChannelRequest/UpdateChannelMembersRequest/
CreateChannelGroupRequest carry no client_request_id, so none is sent (the
envelope callId still flows); SpawnPeerRequest keeps its idempotency key.

Barrel (compassv1.ts) re-exports the new payload schemas + enums. Tests cover
each tool's wire shape, enum mapping, injection-guard render, and required-field
rejection; the native-tool count asserts move 5→8 comms / 17→20 total.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Aug 25, 2026

Copy link
Copy Markdown

RIG-2673

@rigel-mintaka rigel-mintaka changed the title feat(proto): org-management comms + spawn arms for agent gateway (RIG-2673) feat(compass-agent): org-management comms tools + spawn role/persona (RIG-2673) Aug 25, 2026
@rigel-mintaka
rigel-mintaka changed the base branch from main to compass-server/rig-2724-org-mgmt-proto August 25, 2026 23:17
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-agent-rig-2673-org-m.compass-eng-docs.pages.dev

Deployed from compass-agent/rig-2673-org-mgmt-tools at 35250c0.

Changed pages:

…st (RIG-2673)

Review-fix child for PR #632 (T6 org-management tools). Two low findings,
both mechanical, zero production-behavior change.

- L1: three comments described role/persona as "proto3-optional strings".
  They are plain proto3 `string` fields with no field presence (unset is
  indistinguishable from ""), which is exactly why presence is enforced at
  the tool. Corrected the wording at all three sites (lifecycle.ts schema
  comment, lifecycle.ts execute comment, lifecycle.test.ts test comment).
- L2: create_channel_group renders flat(group.name), the same free-text
  injection surface as create_channel, but had no newline-injection
  reddening test. Added one mirroring the create_channel case.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka marked this pull request as draft August 26, 2026 03:11
@rigel-mintaka
rigel-mintaka force-pushed the compass-server/rig-2724-org-mgmt-proto branch 2 times, most recently from 8374738 to c5f84cd Compare August 30, 2026 15:00
An error occurred while trying to automatically change base from compass-server/rig-2724-org-mgmt-proto to main August 30, 2026 17:23
@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

Superseded. This draft was built against the pre-merge account-id contract and bundled its own proto (base compass-server/rig-2724-org-mgmt-proto). The proto/server half landed independently as #628 (dd4f291) + #630 (bca111c); the member fields went handle-based + server-resolved, not account-id. Matt ruled (2026-08-30) agent tools surface names/handles only (never ids, inputs + outputs) and the roster account_id render is dropped (its @handle->id bridge purpose is obsolete under handle-based members). RIG-2726 is being re-shaped on clean main 7d896c4: spawn role/persona ships now; the 3 comms tools ship in full once compass-server adds viewer-scoped name->id resolution for channel_id/group_id/parent_group_id (RIG-3030). Closing this and its review-fix child #633.

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.

1 participant