Skip to content

Commit 1c616b0

Browse files
authored
Configure labeler service account in dev-env (#2363)
* 🚧 WIP attempting to make ozone work with local * ✨ Labeler service set up works * Renmae account details for mod authority * 🧹 Clean up createOzoneDid signature * 🚨 Fix typedef * ✅ Adjust snapshot * ✅ Fix test with invite code * 🚧 WIP * 🚧 WIP * 🚧 bring back test * 🚧 bring back test * ✅ Update ozone snapshots * ✅ Update ozone snapshots
1 parent 79f8e1e commit 1c616b0

File tree

8 files changed

+495
-331
lines changed

8 files changed

+495
-331
lines changed

packages/dev-env/src/bin.ts

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const run = async () => {
3737
`🌞 Personal Data server started http://localhost:${network.pds.port}`,
3838
)
3939
console.log(`🗼 Ozone server started http://localhost:${network.ozone.port}`)
40+
console.log(`🗼 Ozone service DID ${network.ozone.ctx.cfg.service.did}`)
4041
console.log(`🌅 Bsky Appview started http://localhost:${network.bsky.port}`)
4142
for (const fg of network.feedGens) {
4243
console.log(`🤖 Feed Generator started http://localhost:${fg.port}`)

packages/dev-env/src/mock/index.ts

-322
Original file line numberDiff line numberDiff line change
@@ -350,328 +350,6 @@ export async function generateMockSetup(env: TestNetwork) {
350350
},
351351
)
352352

353-
// create the dev-env moderator
354-
{
355-
const res = await clients.loggedout.api.com.atproto.server.createAccount({
356-
357-
handle: 'mod-authority.test',
358-
password: 'hunter2',
359-
})
360-
const agent = env.pds.getClient()
361-
agent.api.setHeader('Authorization', `Bearer ${res.data.accessJwt}`)
362-
await agent.api.app.bsky.actor.profile.create(
363-
{ repo: res.data.did },
364-
{
365-
displayName: 'Dev-env Moderation',
366-
description: `The pretend version of mod.bsky.app`,
367-
},
368-
)
369-
370-
await agent.api.app.bsky.labeler.service.create(
371-
{ repo: res.data.did, rkey: 'self' },
372-
{
373-
policies: {
374-
labelValues: [
375-
'!hide',
376-
'!warn',
377-
'porn',
378-
'sexual',
379-
'nudity',
380-
'sexual-figurative',
381-
'graphic-media',
382-
'self-harm',
383-
'sensitive',
384-
'extremist',
385-
'intolerant',
386-
'threat',
387-
'rude',
388-
'illicit',
389-
'security',
390-
'unsafe-link',
391-
'impersonation',
392-
'misinformation',
393-
'scam',
394-
'engagement-farming',
395-
'spam',
396-
'rumor',
397-
'misleading',
398-
'inauthentic',
399-
],
400-
labelValueDefinitions: [
401-
{
402-
identifier: 'spam',
403-
blurs: 'content',
404-
severity: 'inform',
405-
defaultSetting: 'hide',
406-
adultOnly: false,
407-
locales: [
408-
{
409-
lang: 'en',
410-
name: 'Spam',
411-
description:
412-
'Unwanted, repeated, or unrelated actions that bother users.',
413-
},
414-
],
415-
},
416-
{
417-
identifier: 'impersonation',
418-
blurs: 'none',
419-
severity: 'inform',
420-
defaultSetting: 'hide',
421-
adultOnly: false,
422-
locales: [
423-
{
424-
lang: 'en',
425-
name: 'Impersonation',
426-
description:
427-
'Pretending to be someone else without permission.',
428-
},
429-
],
430-
},
431-
{
432-
identifier: 'scam',
433-
blurs: 'content',
434-
severity: 'alert',
435-
defaultSetting: 'hide',
436-
adultOnly: false,
437-
locales: [
438-
{
439-
lang: 'en',
440-
name: 'Scam',
441-
description: 'Scams, phishing & fraud.',
442-
},
443-
],
444-
},
445-
{
446-
identifier: 'intolerant',
447-
blurs: 'content',
448-
severity: 'alert',
449-
defaultSetting: 'warn',
450-
adultOnly: false,
451-
locales: [
452-
{
453-
lang: 'en',
454-
name: 'Intolerance',
455-
description: 'Discrimination against protected groups.',
456-
},
457-
],
458-
},
459-
{
460-
identifier: 'self-harm',
461-
blurs: 'content',
462-
severity: 'alert',
463-
defaultSetting: 'warn',
464-
adultOnly: false,
465-
locales: [
466-
{
467-
lang: 'en',
468-
name: 'Self-Harm',
469-
description:
470-
'Promotes self-harm, including graphic images, glorifying discussions, or triggering stories.',
471-
},
472-
],
473-
},
474-
{
475-
identifier: 'security',
476-
blurs: 'content',
477-
severity: 'alert',
478-
defaultSetting: 'hide',
479-
adultOnly: false,
480-
locales: [
481-
{
482-
lang: 'en',
483-
name: 'Security Concerns',
484-
description:
485-
'May be unsafe and could harm your device, steal your info, or get your account hacked.',
486-
},
487-
],
488-
},
489-
{
490-
identifier: 'misleading',
491-
blurs: 'content',
492-
severity: 'alert',
493-
defaultSetting: 'warn',
494-
adultOnly: false,
495-
locales: [
496-
{
497-
lang: 'en',
498-
name: 'Misleading',
499-
description:
500-
'Altered images/videos, deceptive links, or false statements.',
501-
},
502-
],
503-
},
504-
{
505-
identifier: 'threat',
506-
blurs: 'content',
507-
severity: 'inform',
508-
defaultSetting: 'hide',
509-
adultOnly: false,
510-
locales: [
511-
{
512-
lang: 'en',
513-
name: 'Threats',
514-
description:
515-
'Promotes violence or harm towards others, including threats, incitement, or advocacy of harm.',
516-
},
517-
],
518-
},
519-
{
520-
identifier: 'unsafe-link',
521-
blurs: 'content',
522-
severity: 'alert',
523-
defaultSetting: 'hide',
524-
adultOnly: false,
525-
locales: [
526-
{
527-
lang: 'en',
528-
name: 'Unsafe link',
529-
description:
530-
'Links to harmful sites with malware, phishing, or violating content that risk security and privacy.',
531-
},
532-
],
533-
},
534-
{
535-
identifier: 'illicit',
536-
blurs: 'content',
537-
severity: 'alert',
538-
defaultSetting: 'hide',
539-
adultOnly: false,
540-
locales: [
541-
{
542-
lang: 'en',
543-
name: 'Illicit',
544-
description:
545-
'Promoting or selling potentially illicit goods, services, or activities.',
546-
},
547-
],
548-
},
549-
{
550-
identifier: 'misinformation',
551-
blurs: 'content',
552-
severity: 'inform',
553-
defaultSetting: 'warn',
554-
adultOnly: false,
555-
locales: [
556-
{
557-
lang: 'en',
558-
name: 'Misinformation',
559-
description:
560-
'Spreading false or misleading info, including unverified claims and harmful conspiracy theories.',
561-
},
562-
],
563-
},
564-
{
565-
identifier: 'rumor',
566-
blurs: 'content',
567-
severity: 'inform',
568-
defaultSetting: 'warn',
569-
adultOnly: false,
570-
locales: [
571-
{
572-
lang: 'en',
573-
name: 'Rumor',
574-
description:
575-
'Approach with caution, as these claims lack evidence from credible sources.',
576-
},
577-
],
578-
},
579-
{
580-
identifier: 'rude',
581-
blurs: 'content',
582-
severity: 'inform',
583-
defaultSetting: 'hide',
584-
adultOnly: false,
585-
locales: [
586-
{
587-
lang: 'en',
588-
name: 'Rude',
589-
description:
590-
'Rude or impolite, including crude language and disrespectful comments, without constructive purpose.',
591-
},
592-
],
593-
},
594-
{
595-
identifier: 'extremist',
596-
blurs: 'content',
597-
severity: 'alert',
598-
defaultSetting: 'hide',
599-
adultOnly: false,
600-
locales: [
601-
{
602-
lang: 'en',
603-
name: 'Extremist',
604-
description:
605-
'Radical views advocating violence, hate, or discrimination against individuals or groups.',
606-
},
607-
],
608-
},
609-
{
610-
identifier: 'sensitive',
611-
blurs: 'content',
612-
severity: 'alert',
613-
defaultSetting: 'warn',
614-
adultOnly: false,
615-
locales: [
616-
{
617-
lang: 'en',
618-
name: 'Sensitive',
619-
description:
620-
'May be upsetting, covering topics like substance abuse or mental health issues, cautioning sensitive viewers.',
621-
},
622-
],
623-
},
624-
{
625-
identifier: 'engagement-farming',
626-
blurs: 'content',
627-
severity: 'alert',
628-
defaultSetting: 'hide',
629-
adultOnly: false,
630-
locales: [
631-
{
632-
lang: 'en',
633-
name: 'Engagement Farming',
634-
description:
635-
'Insincere content or bulk actions aimed at gaining followers, including frequent follows, posts, and likes.',
636-
},
637-
],
638-
},
639-
{
640-
identifier: 'inauthentic',
641-
blurs: 'content',
642-
severity: 'alert',
643-
defaultSetting: 'hide',
644-
adultOnly: false,
645-
locales: [
646-
{
647-
lang: 'en',
648-
name: 'Inauthentic Account',
649-
description: 'Bot or a person pretending to be someone else.',
650-
},
651-
],
652-
},
653-
{
654-
identifier: 'sexual-figurative',
655-
blurs: 'media',
656-
severity: 'none',
657-
defaultSetting: 'show',
658-
adultOnly: true,
659-
locales: [
660-
{
661-
lang: 'en',
662-
name: 'Sexually Suggestive (Cartoon)',
663-
description:
664-
'Art with explicit or suggestive sexual themes, including provocative imagery or partial nudity.',
665-
},
666-
],
667-
},
668-
],
669-
},
670-
createdAt: date.next().value,
671-
},
672-
)
673-
}
674-
675353
// create a labeler account
676354
{
677355
const res = await clients.loggedout.api.com.atproto.server.createAccount({

0 commit comments

Comments
 (0)