feat(agentctl): forum search and mark-channel-read scenario steps
Add selectFirstForumChannel and markActiveChannelRead headless steps for agentctl-forum-search and agentctl-mark-channel-read scenarios. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -144,10 +144,12 @@ Bundled scenarios under `apps/pearcord/scenarios/`:
|
||||
| `agentctl-composer-channel-mention.json` | Send `@channel` message (v0.8.258) |
|
||||
| `agentctl-guild-search.json` | Guild-wide `update-search` hit (v0.8.260) |
|
||||
| `agentctl-thread-mesh.json` | Host thread + reply; guest mesh sync (v0.8.260) |
|
||||
| `agentctl-forum-search.json` | Forum channel + post + forum-scoped search (v0.8.261) |
|
||||
| `agentctl-mark-channel-read.json` | `markActiveChannelRead` on guild text channel (v0.8.261) |
|
||||
|
||||
`mesh.connectGuildMeshThread(scenarioPath)` — host steps + invite + `create-thread` + reply; guest must receive `threadReply` token.
|
||||
|
||||
Scenario step extras (headless + attached `run`): `joinFirstVoice`, `openDmPeer`, `messagesMin`, `messageContentIncludes`, `searchResultsMin` on `wait`.
|
||||
Scenario step extras (headless + attached `run`): `joinFirstVoice`, `openDmPeer`, `selectFirstForumChannel`, `markActiveChannelRead`, `messagesMin`, `messageContentIncludes`, `searchResultsMin` on `wait`.
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
||||
+12
@@ -119,6 +119,18 @@ class HeadlessSession {
|
||||
})
|
||||
results.push({ openDmPeer: peer, view })
|
||||
}
|
||||
if (step.selectFirstForumChannel) {
|
||||
const ch = (this._lastView?.channels || []).find((c) => c.type === 'forum')
|
||||
if (!ch) throw new Error('no forum channel in view')
|
||||
const view = await this.ipc({ type: 'select-channel', channelId: ch.id })
|
||||
results.push({ selectFirstForumChannel: true, channelId: ch.id, view })
|
||||
}
|
||||
if (step.markActiveChannelRead) {
|
||||
const chId = this._lastView?.activeChannelId
|
||||
if (!chId) throw new Error('no active channel for mark-channel-read')
|
||||
const view = await this.ipc({ type: 'mark-channel-read', channelId: chId })
|
||||
results.push({ markActiveChannelRead: true, channelId: chId, view })
|
||||
}
|
||||
if (step.wait) {
|
||||
const view = await this.wait(step.wait, step.timeoutMs)
|
||||
results.push({ wait: step.wait, view })
|
||||
|
||||
Reference in New Issue
Block a user