feat(agentctl): guild slash headless helpers (Phase 538)

Expose registerGuildSlashCommands, deleteGuildSlashCommand, and
executeGuildSlashCommand for slash automation and document phase538 bundle.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 12:35:35 -04:00
co-authored by Cursor
parent 86f6d3801f
commit 33b4018c7c
2 changed files with 23 additions and 0 deletions
+2
View File
@@ -17,6 +17,8 @@ Both modes use **`pearcord-ui-flow` `dispatchUiMessage`** — the same handler a
`AgentClient` resolves RPC replies before treating `{ event: "state" | "sidecar" }` push lines as events (fixes `wait-event` responses that include an `event` field).
**v0.8.501 (Phase 538):** Headless `registerGuildSlashCommands`/`deleteGuildSlashCommand`/`executeGuildSlashCommand` for slash automation. Bundle: `npm run test:agentctl-phase538-slash` (chains `test:agentctl-phase489-slash`).
**v0.8.500 (Phase 537):** Headless `createGuildChannelWebhook`/`deleteGuildChannelWebhook`/`executeGuildChannelWebhook` for webhook automation. Bundle: `npm run test:agentctl-phase537-webhooks` (chains `test:agentctl-phase488-webhooks`).
**v0.8.499 (Phase 536):** Headless `exportGuildAuditLog(opts)` wraps `platform.exportAuditLog` for compliance automation. Bundle: `npm run test:agentctl-phase536-compliance` (chains `test:agentctl-phase487-compliance`).
+21
View File
@@ -655,6 +655,27 @@ class HeadlessSession {
return msg
}
async registerGuildSlashCommands (commands) {
if (!this.platform) throw new Error('headless not started')
const rows = await this.platform.registerSlashCommands(commands)
await this.refreshView()
return rows
}
async deleteGuildSlashCommand (name) {
if (!this.platform) throw new Error('headless not started')
const removed = await this.platform.deleteSlashCommand(name)
await this.refreshView()
return removed
}
async executeGuildSlashCommand (content, opts = {}) {
if (!this.platform) throw new Error('headless not started')
const msg = await this.platform.executeSlashCommand(content, opts)
await this.refreshView()
return msg
}
async banGuildMember (userId, reason) {
if (!this.platform) throw new Error('headless not started')
const ban = await this.platform.banMember({ userId, reason })