Add agentctl journey for stage speaker DM bridge.
runStageSpeakerDmBridgeJourney validates bridgeStageSpeakerToDmVoice and dm mode switch. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
+26
@@ -1251,6 +1251,32 @@ class HeadlessSession {
|
||||
return { firstId: queued.id, nextId: next.id, nextSendAt: next.sendAt }
|
||||
}
|
||||
|
||||
async runStageSpeakerDmBridgeJourney (peerUserId, peerDisplayName) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
const peer = peerUserId || 'c'.repeat(32)
|
||||
await this.createGuild({ name: 'Stage DM Bridge Guild' })
|
||||
const stageCh = await this.createGuildChannel('Bridge Stage', { type: 'stage' })
|
||||
if (!stageCh?.id) throw new Error('expected stage channel')
|
||||
await this.joinGuildStageChannel(stageCh.id)
|
||||
const guildId = this._lastView?.guild?.id
|
||||
if (!guildId) throw new Error('expected guild id')
|
||||
await this.platform.stage.setRole({
|
||||
guildId,
|
||||
channelId: stageCh.id,
|
||||
userId: peer,
|
||||
role: 'speaker'
|
||||
})
|
||||
const out = await this.platform.bridgeStageSpeakerToDmVoice({
|
||||
userId: peer,
|
||||
displayName: peerDisplayName || 'Stage Peer',
|
||||
startVoiceCall: false
|
||||
})
|
||||
await this.refreshView()
|
||||
if (this._lastView?.mode !== 'dm') throw new Error('expected dm mode after stage bridge')
|
||||
if (!out?.channelId) throw new Error('expected dm channel from stage bridge')
|
||||
return { channelId: out.channelId, peerUserId: peer }
|
||||
}
|
||||
|
||||
async runDmVideoLiveJourney (peerUserId, peerDisplayName) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
await this.openDmWithPeer(peerUserId, peerDisplayName)
|
||||
|
||||
Reference in New Issue
Block a user