feat(webhooks): Phase 685 runWebhookCreateJourney and runWebhookExecuteJourney (v0.8.660)

Add headless webhook create and execute journeys for agentctl regression.
Update README for test:agentctl-phase685-webhooks bundle.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-03 00:26:52 -04:00
co-authored by Cursor
parent 6a1e31a124
commit 5b9f47b20f
2 changed files with 42 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@
Agent control plane for Pearcord — send the same IPC messages the UI sends, read `view` snapshots, and run scripted journeys against a **live worker** or an in-process **headless** session.
**Phase 685 (v0.8.660):** `runWebhookCreateJourney`, `runWebhookExecuteJourney`; bundle `test:agentctl-phase685-webhooks`.
**Phase 684 (v0.8.659):** `runBotInstallJourney`, `runBotMessageJourney`; bundle `test:agentctl-phase684-bots`.
**Phase 683 (v0.8.658):** `runSlashCommandCreateJourney`, `runSlashCommandInvokeJourney`; bundle `test:agentctl-phase683-slash`.
+40
View File
@@ -3263,6 +3263,46 @@ class HeadlessSession {
return { botId: out.bot.id, messageId: msg.id, guildBotCount: v.bots.length }
}
async runWebhookCreateJourney () {
if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'wh685', displayName: 'Webhook Create 685' })
await this.createGuild({ name: 'Webhook Create 685', publicListing: false })
await this.wait({ mode: 'guild' }, 45000)
const v0 = await this.refreshView()
const ch = (v0.channels || []).find((c) => c.type === 'text' || c.type === 'announcement')
if (!ch?.id) throw new Error('expected text channel')
const out = await this.createGuildChannelWebhook(ch.id, 'Phase685 Hook')
if (!out?.webhook?.id || !out?.token) throw new Error('expected webhook create result')
const v = await this.refreshView()
const found = (v.guildWebhooks || []).find((h) => h.id === out.webhook.id)
if (!found) throw new Error('expected webhook in view.guildWebhooks')
return {
webhookId: out.webhook.id,
guildWebhookCount: v.guildWebhooks.length,
tokenLen: out.token.length
}
}
async runWebhookExecuteJourney () {
if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'we685', displayName: 'Webhook Execute 685' })
await this.createGuild({ name: 'Webhook Execute 685', publicListing: false })
await this.wait({ mode: 'guild' }, 45000)
const v0 = await this.refreshView()
const ch = (v0.channels || []).find((c) => c.type === 'text' || c.type === 'announcement')
if (!ch?.id) throw new Error('expected text channel')
const out = await this.createGuildChannelWebhook(ch.id, 'Execute685 Hook')
if (!out?.token) throw new Error('expected webhook token')
const msg = await this.executeGuildChannelWebhook(out.token, 'phase685 webhook execute journey')
if (!msg?.id) throw new Error('expected webhook message')
const v = await this.refreshView()
return {
webhookId: out.webhook?.id,
messageId: msg.id,
guildWebhookCount: (v.guildWebhooks || []).length
}
}
async runForumPostSearchJourney () {
if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'fm672', displayName: 'Forum 672' })