feat(agentctl): runForumDmBridgeJourney v0.8.638
Add / update the Phase 658 batch 2 headless journey to validate the forum→DM bridge composer prefill flow in CI-style agentctl runs. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
+28
@@ -847,6 +847,34 @@ class HeadlessSession {
|
|||||||
return { threadId: active.id, parentId, dmThreadCount: count }
|
return { threadId: active.id, parentId, dmThreadCount: count }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Phase 658: forum → sealed DM bridge with composer prefill. */
|
||||||
|
async runForumDmBridgeJourney (peerUserId, peerDisplayName) {
|
||||||
|
if (!this.platform) throw new Error('headless not started')
|
||||||
|
const g = await this.createGuild({ name: 'Forum DM Bridge' })
|
||||||
|
const guildId = g?.guild?.id || g?.id
|
||||||
|
if (!guildId) throw new Error('expected guild after create')
|
||||||
|
await this.loadGuild(guildId)
|
||||||
|
await this.refreshView()
|
||||||
|
await this.createGuildChannel('Forum A', { type: 'forum' })
|
||||||
|
const active = this._lastView?.activeChannel
|
||||||
|
if (!active || active.type !== 'forum') throw new Error('expected active forum channel')
|
||||||
|
await this.ipc({
|
||||||
|
type: 'bridge-forum-to-dm',
|
||||||
|
authorUserId: peerUserId,
|
||||||
|
peerDisplayName,
|
||||||
|
excerpt: 'Phase 658 forum bridge excerpt',
|
||||||
|
messageId: null
|
||||||
|
})
|
||||||
|
const v = await this.refreshView()
|
||||||
|
if (v.mode !== 'dm') throw new Error(`expected dm mode, got ${v.mode}`)
|
||||||
|
if (!v.activeChannelId) throw new Error('no active dm channel after bridge')
|
||||||
|
const pre = v.dmComposerPrefill || ''
|
||||||
|
if (!String(pre).includes('forum bridge')) {
|
||||||
|
throw new Error(`expected composer prefill, got ${JSON.stringify(pre)}`)
|
||||||
|
}
|
||||||
|
return { channelId: v.activeChannelId, prefill: pre }
|
||||||
|
}
|
||||||
|
|
||||||
async runDmVideoLiveJourney (peerUserId, peerDisplayName) {
|
async runDmVideoLiveJourney (peerUserId, peerDisplayName) {
|
||||||
if (!this.platform) throw new Error('headless not started')
|
if (!this.platform) throw new Error('headless not started')
|
||||||
await this.openDmWithPeer(peerUserId, peerDisplayName)
|
await this.openDmWithPeer(peerUserId, peerDisplayName)
|
||||||
|
|||||||
Reference in New Issue
Block a user