feat(agentctl): guild sync diagnostics journey for discovery debugging

Add runGuildSyncDiagnosticsJourney to refresh health and export sync
diagnostics after explore join or mesh troubleshooting.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-01 19:41:24 -04:00
co-authored by Cursor
parent 96a1fecc5e
commit acf865ee28
2 changed files with 12 additions and 0 deletions
+2
View File
@@ -15,6 +15,8 @@ Enable autonomous agents (and developers) to drive Pearcord like a real user wit
Both modes use **`pearcord-ui-flow` `dispatchUiMessage`** — the same handler as `apps/pearcord/index.js`.
**v0.8.610 (Phase 638):** Headless `runGuildSyncDiagnosticsJourney(guildId)` — refresh health counts, `getGuildSyncHealth`, `exportGuildSyncDiagnostics` (discovery join debugging). Smoke: `npm run test:agentctl-guild-sync-diagnostics`.
`AgentClient` resolves RPC replies before treating `{ event: "state" | "sidecar" }` push lines as events (fixes `wait-event` responses that include an `event` field).
**v0.8.574 (Phase 611):** Headless `createThreadFromLastMessage` `refreshView` re-verified for threads hub bundle. Bundle: `npm run test:agentctl-phase611-threads` (chains `test:agentctl-phase484-threads`).
+10
View File
@@ -1017,6 +1017,16 @@ class HeadlessSession {
return this.platform.exportGuildSyncDiagnostics(guildId)
}
/** Journey: sync health + diagnostics export (discovery join debugging). */
async runGuildSyncDiagnosticsJourney (guildId) {
if (!this.platform) throw new Error('headless not started')
await this.platform._refreshGuildSyncHealthCounts(guildId).catch(() => {})
const health = await this.getGuildSyncHealth(guildId)
const diagnostics = this.exportGuildSyncDiagnostics(guildId)
await this.refreshView()
return { health, diagnostics }
}
async revokeGuildInvite (code) {
if (!this.platform) throw new Error('headless not started')
const result = await this.platform.revokeInvite(code)