feat(automation): Phase 686 hook create and digest relay journeys (v0.8.661)

Add runAutomationHookCreateJourney, runDigestRelayDryRunJourney, and
dryRunGuildDigestWebhookRelay helper. Update README for test:agentctl-
phase686-automation bundle.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-03 00:34:07 -04:00
co-authored by Cursor
parent 5b9f47b20f
commit c90491a97c
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. 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 686 (v0.8.661):** `runAutomationHookCreateJourney`, `runDigestRelayDryRunJourney`; bundle `test:agentctl-phase686-automation`.
**Phase 685 (v0.8.660):** `runWebhookCreateJourney`, `runWebhookExecuteJourney`; bundle `test:agentctl-phase685-webhooks`. **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 684 (v0.8.659):** `runBotInstallJourney`, `runBotMessageJourney`; bundle `test:agentctl-phase684-bots`.
+40
View File
@@ -1499,6 +1499,13 @@ class HeadlessSession {
return out return out
} }
async dryRunGuildDigestWebhookRelay (opts = {}) {
if (!this.platform) throw new Error('headless not started')
const out = await this.platform.dryRunDigestWebhookRelay(opts)
await this.refreshView()
return out
}
async upsertGuildEmoji (opts) { async upsertGuildEmoji (opts) {
if (!this.platform) throw new Error('headless not started') if (!this.platform) throw new Error('headless not started')
const row = await this.platform.upsertGuildEmoji(opts) const row = await this.platform.upsertGuildEmoji(opts)
@@ -3303,6 +3310,39 @@ class HeadlessSession {
} }
} }
async runAutomationHookCreateJourney () {
if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'ah686', displayName: 'Automation Hook 686' })
await this.createGuild({ name: 'Automation Hook 686', publicListing: false })
await this.wait({ mode: 'guild' }, 45000)
const out = await this.upsertGuildAutomationHook({
name: 'Phase686 Hook',
categories: 1,
action: { type: 'log' },
filter: { eventTypes: ['messageCreate'] }
})
if (!out?.id) throw new Error('expected automation hook')
const v = await this.refreshView()
const found = (v.automationHooks || []).find((h) => h.id === out.id)
if (!found) throw new Error('expected hook in view.automationHooks')
return { hookId: out.id, guildAutomationCount: v.automationHooks.length }
}
async runDigestRelayDryRunJourney () {
if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'dr686', displayName: 'Digest Relay 686' })
await this.createGuild({ name: 'Digest Relay 686', publicListing: false })
await this.wait({ mode: 'guild' }, 45000)
const out = await this.dryRunGuildDigestWebhookRelay()
if (!out?.preview) throw new Error('expected digest relay dry-run preview')
const v = await this.refreshView()
return {
hasPreview: true,
transport: out.preview?.transport || out.handoff?.transport || null,
guildAutomationCount: (v.automationHooks || []).length
}
}
async runForumPostSearchJourney () { async runForumPostSearchJourney () {
if (!this.platform) throw new Error('headless not started') if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'fm672', displayName: 'Forum 672' }) await this.registerUser({ username: 'fm672', displayName: 'Forum 672' })