feat(agentctl): add runEffectivePermDeepLinkRoleFocusJourney for Phase 778

Validates ?effective=1&roleId= deep link parsing and platform
effectivePermFocusRoleId navigation handoff.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-03 15:58:53 -04:00
co-authored by Cursor
parent eed7a374ca
commit 3d3d9b3de8
+29
View File
@@ -5309,6 +5309,35 @@ class HeadlessSession {
return { guildId, channelId: text.id, roleId: role.id }
}
/** Phase 778: guild-channel deep link `?effective=1&roleId=` → effective inspector focus. */
async runEffectivePermDeepLinkRoleFocusJourney () {
if (!this.platform) throw new Error('headless not started')
const { parsePearcordDeepLink } = require('pearcord-shared/deep-links')
await this.registerUser({ username: 'ep778', displayName: 'Eff Perm 778' })
await this.createGuild({ name: 'Eff Perm DL 778', publicListing: false })
await this.wait({ mode: 'guild' }, 45000)
const role = await this.createGuildCustomRole('EffFocusRole', {
color: '#57f287',
permissions: PERMISSION.VIEW_CHANNEL | PERMISSION.SEND_MESSAGES
})
const v0 = await this.refreshView()
const guildId = v0.guild?.id
const text = (v0.channels || []).find((c) => c.type === 'text')
if (!guildId || !text?.id || !role?.id) throw new Error('guild/channel/role missing')
const url = `pearcord://g/${guildId}/c/${text.id}?effective=1&roleId=${encodeURIComponent(role.id)}`
const parsed = parsePearcordDeepLink(url)
const eff = parsed?.editEffectivePermissions
if (!eff?.open || eff.roleId !== role.id) {
throw new Error('deep link parse missing effective roleId')
}
const nav = await this.platform.navigateDeepLink(url)
if (!nav.openEffectivePermissions) throw new Error('nav openEffectivePermissions missing')
if (nav.effectivePermFocusRoleId !== role.id) {
throw new Error('nav effectivePermFocusRoleId mismatch')
}
return { guildId, channelId: text.id, roleId: role.id }
}
/**
* Phase 776: single-session role editor parity — rail, display, permissions,
* reorder, lifecycle delete, channel overwrite, prefs selection.