feat(agentctl): Phase 721 invite link and role override export JSON journeys
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
+45
@@ -4515,6 +4515,51 @@ class HeadlessSession {
|
||||
}
|
||||
}
|
||||
|
||||
async runInviteLinkExportJsonJourney () {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
await this.registerUser({ username: 'il721', displayName: 'Invite 721' })
|
||||
await this.createGuild({ name: 'Invite 721', publicListing: false })
|
||||
await this.wait({ mode: 'guild' }, 45000)
|
||||
await this.platform.createInvite({ ttlMs: 86400000, maxUses: 5 })
|
||||
await this.refreshView()
|
||||
const pushed = await this.platform.pushInviteLinkJsonToMesh()
|
||||
const v = await this.refreshView()
|
||||
if (!pushed?.signature && !v.inviteLinkJsonMeta?.signature) {
|
||||
throw new Error('expected signed invite link export JSON after mesh push')
|
||||
}
|
||||
return {
|
||||
guildInviteLinkJsonCount: v.guildInviteLinkJsonCount || (v.inviteLinkJsonRows || []).length,
|
||||
hasMeta: v.inviteLinkJsonMeta != null
|
||||
}
|
||||
}
|
||||
|
||||
async runRoleOverrideExportJsonJourney () {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
await this.registerUser({ username: 'ro721', displayName: 'Role 721' })
|
||||
await this.createGuild({ name: 'Role 721', publicListing: false })
|
||||
await this.wait({ mode: 'guild' }, 45000)
|
||||
const roles = await this.platform.guildRoles.listRoles(this.platform.guild.guild.id)
|
||||
const custom = roles.find((r) => r.name !== '@everyone')
|
||||
if (custom) {
|
||||
await this.platform.upsertChannelPermissionOverwrite(this.platform.activeChannelId, {
|
||||
targetType: 'role',
|
||||
targetId: custom.id,
|
||||
allow: 0,
|
||||
deny: 2048
|
||||
})
|
||||
}
|
||||
await this.refreshView()
|
||||
const pushed = await this.platform.pushRoleOverrideJsonToMesh()
|
||||
const v = await this.refreshView()
|
||||
if (!pushed?.signature && !v.roleOverrideJsonMeta?.signature) {
|
||||
throw new Error('expected signed role override export JSON after mesh push')
|
||||
}
|
||||
return {
|
||||
guildRoleOverrideJsonCount: v.guildRoleOverrideJsonCount || (v.roleOverrideJsonRows || []).length,
|
||||
hasMeta: v.roleOverrideJsonMeta != null
|
||||
}
|
||||
}
|
||||
|
||||
async runForumPostSearchJourney () {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
await this.registerUser({ username: 'fm672', displayName: 'Forum 672' })
|
||||
|
||||
Reference in New Issue
Block a user