Skip to content

v0.3.94 — Teammate Delegated Sessions

Latest

Choose a tag to compare

@chyuen-devsentient chyuen-devsentient released this 10 Feb 22:43
· 10 commits to main since this release
a2c4512

New Feature: Teammate Delegated Sessions

Teammates can now start OpenCode sessions on behalf of the session owner by tagging both @kaji and the owner in a shared channel.

Setup

The session owner adds teammates via DM with Kaji:

!team add @bonnie
!team add @yiran
!team list

How It Works

In any channel where Kaji, the owner, and the teammate are all members, the teammate tags both:

@kaji @christine please fix the login bug on line 42

This creates a session owned by @christine, using her Kaji instance. The teammate is auto-approved and can keep sending prompts and approve others to collaborate in the thread.

Session Announcement

🚀 OpenCode Session Started

Owner: @christine
Started by: @bonnie
Project: my-project
Session: a1b2c3d4

Scenarios

Who Message Result
Team member @kaji @owner in shared channel Delegated session created under owner's Kaji
Team member @kaji only (without owner) Owner's Kaji stays silent; teammate's own Kaji may respond
Non-team-member @kaji @owner Owner's Kaji does not respond
Owner @kaji only Standard session creation (ownership confirmation)
Owner @kaji @another_user Owner's Kaji stays silent; other user's Kaji handles it
Anyone @kaji @owner in channel owner isn't in Nothing happens

Access Tiers

Tier Who Can do
Owner Set via MATTERMOST_OWNER_USER_ID Full access — create sessions, manage team, approve guests
Team members Added via !team add Bypass guest approval, initiate delegated sessions, approve guests in threads
Everyone else Anyone not above Need per-session approval from owner or team member

Team Management Commands

Command Description
!team add @user Add a teammate
!team remove @user Remove a teammate
!team list List all current teammates
!team Show team status and settings

Changes

  • session-ownership-handler.ts: Added detectMentionedUsers() for @mention parsing
  • connect.ts: Delegation detection, channel membership check, owner-only solo session creation
  • index.ts: createNewSessionFromDm supports delegation flags, auto-approves initiator
  • thread-manager.ts: delegatedByUsername shown in session announcements
  • models/index.ts: delegatedByUsername added to ThreadRootPostContent
  • README.md: Added Team Management and Teammate Delegation usage sections