feat(agentctl): add setGuildActivity and clearGuildActivity headless helpers

Phase 528 presence automation for activity set/clear roundtrips.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 11:42:25 -04:00
co-authored by Cursor
parent fed0475879
commit c6b137d57d
2 changed files with 12 additions and 0 deletions
+2
View File
@@ -124,6 +124,8 @@ See [docs/AGENTCTL.md](../../docs/AGENTCTL.md) for full reference, security note
- Optional `PEARCORD_AGENTCTL_TOKEN` shared secret; still localhost-only. - Optional `PEARCORD_AGENTCTL_TOKEN` shared secret; still localhost-only.
- Can execute any UI IPC type (moderation, guild admin, etc.) — same power as the logged-in user session. - Can execute any UI IPC type (moderation, guild admin, etc.) — same power as the logged-in user session.
**v0.8.491 (Phase 528):** Headless helpers `setGuildActivity(activity)` and `clearGuildActivity()` for rich-presence automation (plus existing `setPresenceStatus`, `setCustomStatus`). Bundle: `npm run test:phase528-presence` (app repo).
**v0.8.490 (Phase 527):** Headless helpers `playGuildSoundboardSound`, `upsertGuildSound`, `removeGuildSound` for soundboard roundtrip automation. Bundle: `npm run test:phase527-soundboard` (app repo). **v0.8.490 (Phase 527):** Headless helpers `playGuildSoundboardSound`, `upsertGuildSound`, `removeGuildSound` for soundboard roundtrip automation. Bundle: `npm run test:phase527-soundboard` (app repo).
**v0.8.489 (Phase 526):** Headless helpers `startGuildScreenShare`, `stopGuildScreenShare` for screen share roundtrip automation. Bundle: `npm run test:phase526-screen` (app repo). **v0.8.489 (Phase 526):** Headless helpers `startGuildScreenShare`, `stopGuildScreenShare` for screen share roundtrip automation. Bundle: `npm run test:phase526-screen` (app repo).
+10
View File
@@ -574,6 +574,16 @@ class HeadlessSession {
return this.platform.setPresence(status, text) return this.platform.setPresence(status, text)
} }
async setGuildActivity (activity) {
if (!this.platform) throw new Error('headless not started')
return this.platform.setActivity(activity ?? null)
}
async clearGuildActivity () {
if (!this.platform) throw new Error('headless not started')
return this.platform.setActivity(null)
}
async searchGuildMessages (query, opts = {}) { async searchGuildMessages (query, opts = {}) {
if (!this.platform) throw new Error('headless not started') if (!this.platform) throw new Error('headless not started')
const guildId = opts.guildId || this.platform.guild?.guild?.id const guildId = opts.guildId || this.platform.guild?.guild?.id