feat(agentctl): runDmThreadForkJourney smoke v0.8.637
Headless journey forks a DM message into dm_thread and asserts panel metadata. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
+27
@@ -820,6 +820,33 @@ class HeadlessSession {
|
||||
}
|
||||
|
||||
/** Phase 657: live DM video call (non-stub). */
|
||||
async runDmThreadForkJourney (peerUserId, peerDisplayName) {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
await this.openDmWithPeer(peerUserId, peerDisplayName)
|
||||
await this.ipc({ type: 'send-message', content: 'DM thread fork journey probe' })
|
||||
await this.refreshView()
|
||||
const msgs = this._lastView?.messages || []
|
||||
const last = msgs[msgs.length - 1]
|
||||
if (!last?.id) throw new Error('no message for create-thread')
|
||||
await this.ipc({
|
||||
type: 'create-thread',
|
||||
messageId: last.id,
|
||||
name: 'dm-thread-journey'
|
||||
})
|
||||
await this.refreshView()
|
||||
const active = this._lastView?.activeChannel
|
||||
if (!active || active.type !== 'dm_thread') {
|
||||
throw new Error(`expected dm_thread active, got ${active?.type || 'none'}`)
|
||||
}
|
||||
const parentId = this._lastView?.dmParentChannelId
|
||||
const count = this._lastView?.dmThreadCount
|
||||
if (!parentId) throw new Error('dmParentChannelId missing')
|
||||
if (typeof count !== 'number' || count < 1) {
|
||||
throw new Error(`expected dmThreadCount >= 1, got ${count}`)
|
||||
}
|
||||
return { threadId: active.id, parentId, dmThreadCount: count }
|
||||
}
|
||||
|
||||
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