315 Commits

Author SHA1 Message Date
Paul Frazee
bc861a2c25
Add new preference and api for bsky app state; also put preference updates within transactional lock regions (#2492)
* Add bskyAppState preference and api for dismissed nudges

* Add tests

* Wrap preference updates in an lock region to avoid clobbering updates

* Move to queuedNudges and activeProgressGuide

* Fix type error

* Update test

* Add changeset
2024-07-01 18:23:21 -07:00
devin ivy
af7d3912a3
Starter packs (#2553)
* lexicon: initial starter pack record lexicons

* lexicon: first pass on views for starter packs

* lexicon: add starter pack query endpoints, misc fixes

* lexicon: add starter pack related fields to profile views

* lexicon: codegen

* api prerelease

* bsky: protos for starter packs

* appview: implement starter pack endpoints in dataplane, protos update

* appview: starter pack hydration and view, mock dataplane indexing

* appview: wire-up starter pack graph endpoints

* appview: test basic starter packs functionality, update dev-env

* fix snaps for profile createdAt

* appview: fix list item count for starter packs in dataplane

* fix ozone snaps, tidy

* appview: reorg list aggs for starter packs

* appview: starter pack lexicon and proto tweaks, move around aggregations

* appview: fix views and snaps

* api prerelease

* fix snaps

* appview: misc proto updates for starter packs, snaps

* appview: add starter pack counts to profile detail

* build

* api prerelease

* pds: starter pack slur detection

* lexicon: starter pack notifications and batch fetch

* appview: starter pack notification and batch fetch

* appview: add starterpack-joined notif to dataplane and test

* api prerelease

* ozone: fix snaps

* pds build

*  Proxy starterpack requests through ozone and include takedowns (#2594)

*  Proxy starterpack requests through ozone and include takedowns

* 🧹 Cleanup

*  Commit snapshots

*  Update snapshot

* lexicon: move starterpacks back to TIDs

* changeset

---------

Co-authored-by: Foysal Ahamed <foysal@blueskyweb.xyz>
2024-06-24 21:04:33 -04:00
Ryan Barrett
aed98cc7a5
fix typo in com.atproto.sync.listBlobs lexicon description (#2597)
thanks!
2024-06-23 22:48:33 -07:00
Foysal Ahamed
3ad0519961
Ozone team member manager (#2460)
* 🚧 Proposal for moderator manager lexicons

*  CRUD for moderator management works

*  Add profile view to moderator user list

*  Seed mod users from env var to db

*  Adjust tests

*  Update snapshots

*  Fix type and lexicon token issues

*  Add pagination to listUsers

*  Use sort order in pagination

* 📝 Change error name

*  Update snapshots

*  seed mods in sync to avoid re-order

* 🧹 Remove unnecessary import

* 🐛 Re-run codegen

* 🧹 Some cleanup

* 🧹 Cleanup unnecessary properties on auth-verifier

*  Rename terminologies from moderator to team and member

* 🧹 Cleanup

*  Allow admin tokens to update/add member

*  Delete members in transaction

*  Use db transactions and move profile hydration to the service layer

*  Add test for addMember endpoint

* 🐛 wait on adding admin DID

*  Do not allow updating/deleting service owner and always give service owner admin access

* 🧹 Cleanup

*  Make timestamp columns non null

* 🧹 Cleanup

*  Update mod role definition in getConfig

*  Deletion and update guards

* 🐛 don't prefill service did

* 📝 Add changeset
2024-06-18 18:47:20 -04:00
Daniel Holmgren
7c1973841d
Thread mutes (#2558)
* schemas

* protos

* implementation

* add filtering on ingestion

* test

* add thread viewer state to post views

* update snaps

* changeset

* fix threadgating test
2024-06-13 15:30:49 -05:00
Eric Bailey
58abcbd8b6
Social proof (#2557)
* lexicon: initial social proof lexicons

* Social proof (#2548)

* Update deactivation through updateSubjectStatus (#2539)

* attach hosting status to entryway session responses

* integrate account deactivation in with entryway

* tidy

* tidy

* chnageset

* update changeset

* Version packages (#2546)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* lexicon: initial social proof lexicons

* feat: add generated types for social proof

* feat: social proof implementation

---------

Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Devin Ivy <devinivy@gmail.com>

* Rename

* Codegen

* Implementation, renaming

* Remove only

* Add depth resolution param, update snaps

* Be smart like Devin

* Snaps

* Revert lock changes

* Snaps

* Snaps

* Snaps

* Add changeset

* Snaps

* Revert lock changes

* Add test for basic profile

* Add getKnownFollowersEndpoint

* Make it zero

* Return max of 5

* Remove isNoHosted

* Use array and index

* Clarify ternary

* Remove includeKnownFollowers from views

* Revert "Return max of 5"

This reverts commit 1a27eb74a2d327e094c30dbe8e4314472c0d7aa7.

* Ope missed a param

* Rename view method

* Don't return viewer if undefined

* Format

* Clean up hydrator

* Snaps

* Update proto, use batch endpoint

* Format

* Fix proto, codegen

* Remove unneeded promise

* Move hydrator into route handler

* Add hydrationLogger

* Handle failures of dataplane getKnownFollowers

* Use .at(), defer to params.limit

* Create instance of FollowsFollowing for better type support

* Support knownFollowers in mergeStates

* Add back fat-fingered deleted imports

* Filter out blocks

* Codegen lex

* Naive block filtering

* Remove whitespace edits

* Update changeset desc

* Remove whitespace

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: dirkmc <dirkmdev@gmail.com>
Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-11 12:34:32 -05:00
Foysal Ahamed
2b21b5be29
Search accounts by normalized email (#2426)
*  Search accounts by email domain works

*  Add Search against normalized email column

* 🐛 Fix pagination

*  Make email field optional in the response

* 🧹 Cleanup implementation

* 🧹 More cleanup

* 🧹 Cleanup and reuse accountView for searchAccounts response

* 📝 Add changeset

*  Add min max and default to limit
2024-06-05 11:40:16 -04:00
Foysal Ahamed
8d2d3ac9e0
Add server.getConfig endpoint to ozone (#2494)
*  Add server.getConfig endpoint to ozone

*  Fix tests

*  Cleanup snapshot

* 🧹 Tidy up lexicons

*  Change role values to match with upcoming mod-manager roles

*  Add chat service config

* Update lexicons/tools/ozone/server/getConfig.json

Co-authored-by: devin ivy <devinivy@gmail.com>

*  Update lexicons

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2024-06-05 11:05:21 -04:00
Daniel Holmgren
9495af23bd
Update deactivation through updateSubjectStatus (#2539)
* attach hosting status to entryway session responses

* integrate account deactivation in with entryway

* tidy

* tidy

* chnageset

* update changeset
2024-06-04 10:33:47 -05:00
Daniel Holmgren
255d5ea1f0
Account deactivation (#2531)
* subscribe repos lex: new #account event type

* lex: getAccountStatus endpoint

* lex: add account status errors to sync methods

* tweak type of token union

* fix getAccountStatus parameter name

* codegen

* Account -> Repo

* re-codegen

* update errors in sync methods

* add getRepoStatus route

* add account events to sequencer

* emit account evts

* fix test + small bugfixin

* handle evt on bsky side

* codegen

* loggable message

* schema tweaks

* build errors & tidy

* tidy account deactivation tests

* more subscribe repos tests

* identity evt tests + tidy

* return optional did doc on identity evts

* update identity evt

* update impl for identity evt handles

* add description to handle field

* status on listRepos & notate deprecated firehose events

* return status on listRepos

* pr feedback

* tests

* protos

* add status to session schemas

* codegen

* revamp auth-verifier

* thread through agent

* fix tests

* fix account deletion test

* fix more tests

* fix type error in repo.test

* bsky index account evts

* apply in appview

* add to admin route

* add deactivatedAt to ozone views

* pds tests

* appview tests

* ozone test

* fix bsky test

* fix agent test

* fix indexing test

* tweak session schemas

* update session routes & clean up status handling in pds & agent

* changeset

* patch pds test

* rm active from knownValues

---------

Co-authored-by: bryan newbold <bnewbold@robocracy.org>
2024-05-31 16:39:21 -05:00
bnewbold
ee0e6356df
sync lex: #account firehose event; account status errors; and getAccountStatus endpoint (#2263)
* subscribe repos lex: new #account event type

* lex: getAccountStatus endpoint

* lex: add account status errors to sync methods

* tweak type of token union

* fix getAccountStatus parameter name

* Account -> Repo

* codegen

* schema tweaks

* update identity evt

* add description to handle field

* status on listRepos & notate deprecated firehose events

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2024-05-29 15:40:39 -05:00
devin ivy
c4af6a409e
Lexicon: support for post embeds on chat messages (#2533)
* lexicon: record embed views on chat messages

* lexicon: support for post embeds on chat messages
2024-05-29 11:19:26 -04:00
Daniel Holmgren
0cc5ef70f4
Privileged app passwords (#2515)
* schemas

* impl

* hook up migration

* tests

* make column not null

* comments to clarify

* changeset
2024-05-23 16:05:46 -05:00
devin ivy
06d2328eeb
Lexicon: misc fixes to chat lexicons (#2499)
* lexicon: misc chat-related tweaks/fixes

* ozone: track convo ids on chat message reports

* add changeset

* fix tests

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2024-05-20 10:13:12 -04:00
Daniel Holmgren
265ce86e15
Ozone chat integration (#2490)
* wip

* schema tweaks

* room -> chat

* missed one

* missed another

* deleted messages + incoming message settings

* add schemas for blocking users

* chat update schemas

* make updateUserSettings more generic

* fix dangling ref

* fix dangling refs

* mute chats & leave chats

* schema consistency, naming

* lexicon for updating chat read state

* dm lexicon updates, add batch send endpoint

* dm sender on deleted message

* Add codegen for temp lex

* lexicon: switch temp.dm to chat.bsky namespace, misc fixes

* lexicon: codegen

* lexicon: fix some chat/convo terminology

* lexicon: codegen

* moderator schemas

* codegen

* lexicon: consistency in chat lexicons

* lexicon: add chat to associated profile info

* add ref to updateActorAccess

* add annotation on convoView for disabled members

* codegen

* ozone lexicons

* scaffold routes

* hook up chat moderation routes to ozone

* add message subject for reports/events

* remove dm references from ozone schemas

* ensure report exists before serving getMessageContext

* 🐛 Fix typo in column name

* adjust before/after instead of throwing

* add dev script

* add dev-env introspection server

* hook up chat mod routes to pds & ozone

*  Add message ref subject in eventView def

* fix typo

* add chat reporting test

* fix test

* update dev-env chat did

* update dms server routes name

* pr feedback

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: Foysal Ahamed <foysal@blueskyweb.xyz>
2024-05-15 18:52:47 -05:00
devin ivy
d32f7215f6
Lexicon: add lexicons for chat.bsky namespace (#2485)
* wip

* schema tweaks

* room -> chat

* missed one

* missed another

* deleted messages + incoming message settings

* add schemas for blocking users

* chat update schemas

* make updateUserSettings more generic

* fix dangling ref

* fix dangling refs

* mute chats & leave chats

* schema consistency, naming

* lexicon for updating chat read state

* dm lexicon updates, add batch send endpoint

* dm sender on deleted message

* Add codegen for temp lex

* lexicon: switch temp.dm to chat.bsky namespace, misc fixes

* lexicon: codegen

* lexicon: fix some chat/convo terminology

* lexicon: codegen

* moderator schemas

* codegen

* lexicon: consistency in chat lexicons

* lexicon: add chat to associated profile info

* add ref to updateActorAccess

* add annotation on convoView for disabled members

* codegen

* remove dm references from ozone schemas

* lexicon: chat account deletion, data export, and profile state

* lexicon typo

* lexicon typo

* lexicon: mark chat senders as required

* add changeset

* appview: proper support for chat.bsky lexicons

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-13 14:22:58 -04:00
devin ivy
ec40af0c96
Appview: add grandparent author to reply ref, ensure no replies to blocked grandparent in feeds (#2461)
* lexicon: add parent reply author to #replyRef

* lexicon: tweak to naming in reply ref

* appview: hydrate and present grandparent author in feed items

* appview: ensure replies to blocked users don't appear in feeds via reply parents

* fix snaps

* fix snaps
2024-05-02 15:25:43 -04:00
noriaki watanabe
24761c8bfa
Resolve duplicate refs in lexicon of ozone (#2451)
* Resolve duplicate refs

* Fix order of refs of "tools.ozone.moderation.emitEvent"
2024-04-30 11:32:43 -07:00
Foysal Ahamed
58551bbe05
Allow muting reporter (#2390)
*  Allow muting reporter

*  Allow fetching ONLY muted subjects

* 🚨 re-run linter on fixed main

*  Track muted reports

*  Adjust snapshot

*  Adjust snapshot

*  Adjust snapshot

* 📝 Add changesets

* ♻️ Refactor muted reporter check

*  Use new event type for muting/unmuting reporter

* 🧹 Cleanup
2024-04-25 10:43:04 -04:00
Eric Bailey
b9b7c58219
Add savedFeedsPrefV2 and new methods (#2427)
* Preview

* Double write v2 -> v1

* Add savedFeeds output

* Tightening up

* Revise and clean up APIs, update tests

* Codegen

* Enforce sort order

* Fix unrelated tests

* Reduce edits by using old naming

* Remove redundant test, fix title

* Add changeset

* Ensure unique constraints preserve insertion order if duplicates are found

* Adds addSavedFeeds as a convenience

* Use pluralized interfaces

* Update deprecation notices

* Update method naming

* Update deprecation comments

* Filter invalid types during migration

* Change uri of default timeline

* Fix typo
2024-04-24 11:48:50 -05:00
devin ivy
93a4a4df9c
Lexicons: email auth factor (#2416)
* lexicon: email auth factor

* add changeset
2024-04-17 19:57:18 -04:00
Daniel Holmgren
45981de5c1
getSuggestionsSkeleton lexicon (#2399)
* schema

* codegen

* add skeletonActor def

* add optional viewer param

* codegen

* make move route to unspecced

* use unspecced skeleton actor
2024-04-16 13:50:17 -05:00
devin ivy
c6d758b8b6
Appview: support new post search params, viewer context in search (#2409)
* remove viewer param from searchActorsTypeahead

* appview: pass new search params to search service, add viewer

* add changeset
2024-04-16 14:10:30 -04:00
bnewbold
a2d5658f28
lexicons: add more search parameters (#2396)
* lex: add account to actor search, for following boost

* lex: addition post search query params

* lex: add tag to post search; set default for sort

* lex: fix formats and skeleton consistency

* lex: searchPosts 'until' should be exclusive

* lex: relax post time range syntax

* lex: allow multiple tags ('AND') as search params

* make fmt

* lex: use 'viewer' for account DID making profile search

* lex: no viewer param in searchActor (only skeleton); do include in post skeleton

* codegen search param additions
2024-04-11 16:45:13 -07:00
Daniel Holmgren
0edef0ec01
Feed interactions schema (#2383)
* first pass schemas

* requestFeedback boolean

* rewrite schemas

* tidy

* tidy

* tweaks

* pr feedback

* codegen + lint

* changeset

* rm default
2024-04-10 19:27:17 -05:00
devin ivy
84cdc5b65a
Appview: include like/repost/reply counts on post embed (#2395)
* lexicon: add post counts to embed#viewRecord

* appview: hydrate and present aggregations on post embeds

* update snaps for aggregations on post embeds
2024-04-09 21:24:47 -04:00
bnewbold
2f62faab6f
lex: limit createReport size (#2362)
* lex: limit createReport size

This has actually be limited on the *output* for a long time, apparently
as a mistake/typo when locking down string length fields earlier.

Going with the existing length there (2000 graphemes). 1200 might also
be good; a longer description could be a future additional field or
out-of-band or something.

* codegen lex changes
2024-03-22 21:04:02 +00:00
bnewbold
6e552a26da
lexicon nits: use string format uri in more places (#2348)
* lexicons: use format=uri for more bsky URLs

* lexicons: use format=uri for URLs in server description (links to policies)

* codegen lex changes
2024-03-20 10:17:28 -07:00
bnewbold
f8dffa23eb
lex: deprecate getRecord commit param (#2349)
* lexicons: mark getRecord commit param as deprecated

* codgen lex description tweak
2024-03-20 10:17:09 -07:00
devin ivy
c28e374868
Appview: add associated.labeler info to all profile views (#2341)
* lexicon: add associated field to profile and profile-basic views, for indicating whether labeler

* appview: add associated.labeler to profile and profile-basic views

* dev-env: downgrade get-port, non-esm-only version
2024-03-19 12:26:14 -04:00
devin ivy
722d4173ee
PDS contact email address (#2313)
* lexicon: add pds server contact email

* pds: configuration for contact email address
2024-03-13 19:05:47 -04:00
Paul Frazee
00a567daa0
Additional 3p labeler updates (#2286)
* Rename bsky_labeler_did

* Use labeldef default setting

* Add definedBy to interpretted label defs

* Improve dev-env mocks for labels

* Remove global label defs for dmca-violation, doxxing, and !no-promote

* Change nudity global label def to default to ignore and no longer be adult-only

* Remove old !no-promote tests

* Add mod authorities header and move bsky labeler into it

* Rename modsPref and addModService/removeModService to labelersPref and add/removeLabeler

* Add defaultSetting and adultOnly to custom label value definitions

* Rename InterprettedLabelValueDefinition to InterpretedLabelValueDefinition

* Update dev-env mock

* Move muted words and hidden posts into moderationPrefs

* Add muted word and hidden post handling to moderatePost

* Add mutewords tests

* Finish muteword tests

* Add mod-authority.test to dev-env

* Rename global label value def gore to graphic-media

* Fix typo

* Stop converting old label values

* Update label target=profile behaviors: dont filter content on hide, dont blur display names, but do show the info cards

* Update label target=account behaviors: dont blur media of content

* Add muteword moderation behaviors

* Fix mock label defs

* Implement quote-post moderation handling

* Add adult content test

* Handle sync legacy labels (#2291)

* Handle sync legacy labels

* Remap values on read

* Filter out double-written legacy label values

* Better naming, fix types

* Fix test

* Update moderation docs in sdk

* Update to new atproto-accept-labelers header behavior

* Add getLabelDefinitions() helper method

* Add proxy header support to agent

* Update mock moderation

* lint

* Implement moderation for userlists and feedgens

* Add another test label

* fix labeler in dev-env agents

* fix label hydration test

* fix lint error

* fix agent test

* fix takedown labels test

---------

Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: dholms <dtholmgren@gmail.com>
2024-03-12 21:10:19 -07:00
Daniel Holmgren
2ea27e340a
Ozone lexicons (#2288)
* lexicons

* clean up old admin schemas

* codegen

* renaming all routes

* fix more

* fix snaps

* fix test

* format

* hook up ozone routes on pds

* publish next version

* build branch

* dont build branch
2024-03-12 18:42:11 -05:00
devin ivy
8dd67f5c81
Appview: labels on feed gens and list views (#2298)
* lexicon: add labels to feedgen and list views

* appview: hydrate labels onto lists, feedgens

* test hydration of labels on lists and feedgens

* update pds snap
2024-03-12 16:04:02 -05:00
Foysal Ahamed
2802880a97
Add modEventDivertBlobs event to send blobs to abyss (#2238)
* 🚧 Working through an nullable review state

*  Update snapshots on some tests

*  Update snapshots on some tests

*  Add test for reviewOptional status mutation

*  Add divertBlobs event to send blobs to abyss

* ♻️ Rename reviewOptional -> reviewNone

* ♻️ Rename modEventDivertBlobs -> modEventDivert

* 🐛 Rename event type checker

*  Use pds resolver to get blob straight from pds

*  Use FOR UPDATE to respect db transactions

* ♻️ Refactor to use event_pusher table instead of new table

*  Bring back missing lines in pnpm-lock

* 🔨 Rebuild?

* 🚨 Formatting

* ♻️ Refactor to divert blob sync

* 🧹 Cleanup

*  Use modClient seed client in blob-divert test

* update divert blob config to use basic admin auth

* fix

* build

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2024-03-12 10:40:32 -04:00
Daniel Holmgren
38656e71ff
Label expiration (#2241)
* sketching out label sequencer

* refactor sequencer

* sequencer tests

* tests

* add query labels endpoint & tests

* add pagination

* fix label formatting on temp

* tidy

* format labels

* make use listen/notify for sequencer

* ensure sig on all outgoing labels from ozone

* fixing up tests

* fix sequencer tests

* fix hanging server test

* add log on failure to update label

* update description for sig

* add expiration to labels

* fix test

* use bytes for label sigs

* fix tests

* add ver to labels

* tidy up background queue

* store signing keys as ids

* fix sequencer teest
2024-03-08 19:48:45 -06:00
Daniel Holmgren
cc11adda87
Ozone: Add sigs to all labels (#2236)
* sketching out label sequencer

* refactor sequencer

* sequencer tests

* tests

* add query labels endpoint & tests

* add pagination

* fix label formatting on temp

* tidy

* format labels

* make use listen/notify for sequencer

* ensure sig on all outgoing labels from ozone

* fixing up tests

* fix sequencer tests

* fix hanging server test

* add log on failure to update label

* update description for sig

* use bytes for label sigs

* fix tests

* add ver to labels

* tidy up background queue

* store signing keys as ids

* fix sequencer teest
2024-03-08 19:41:31 -06:00
Daniel Holmgren
3988543258
Feature - 3rd party labelers (#2032)
* adding some basic views

* feed hydration, add blocks to post hydration

* pass over notification hydration

* tidy

* merge

* implement getProfile

* hydrate post aggregation and viewer state

* fix

* fix codegen

* get some tests passing!

* add takedowns & some like bugfixing

* all profile tests passing!

* likes test

* follow endpoints using data plane

* reorg follow block rules

* reposts

* post views!

* implement getList w/ dataplane caveat

* adjust dataplane getListMembers to return listitem uris

* implement getListMutes and -Blocks w/ dataplane

* suggestions

* timeline

* misc view fixes

* view fixes for mutes, self-mute/block

* author feed

* feed gen routes

* tidy

* misc block/mute fixes

* list feed & actor likes

* implement getLists, fix some empty cursors

* implement getMutes, empty profile description fix

* implement getBlocks, block application fix

* implement getSuggestedFollowsByActor, needs some fixes

* feed generation

* search routes

* threads

* tidy

* fix some snaps

* fix getSuggestedFollowsByActor

* implement listNotifications

* implement getUnreadCount w/ dataplane

* implement notifications.updateSeen w/ dataplane

* 3rd party blocking tests

* blocked profile viewer

* add search mocks

* refactor getFeed

* createPipeline -> createPipelineNew

* basic replygating functionality on dataplane w/o filtering violating replies

* hack threadgates into dataplane, apply gates

* deterministic thread orders in dataplane

* misc cleanup around dataplane

* upgrade typescript to v5.3

* update typescript linter deps

* sync bsky proto, codegen

* update dataplane, sync with bsky proto updates

* remove indexer, ingester, daemon, moderation services from appview

* convert more bsky internals to dataplane, remove custom feedgens, implement mute/unmuting in mock dataplane

* remove bsky services. db and indexing logic into mock dataplane.

* remove tests not needed by appview v2, misc reorg

* add basic in-mem repo subscription to dataplane mock

* fix dev-env, bsky tests, bsky build

* cull bsky service entrypoint

* add bsky service readme

* build

* tidy

* tidy, fix pds proxy tests

* fix

* fix bsky entrypoint deps

* support http2 grpc client

* build

* fix dataplane bad tls config/default

* support multiple dataplane urls, retry when unavailable

* build

* tidy/fix

* move dataplane mock tests into their own dir

* cover label hydration through timeline test

* bring back labels in appview tests

* remove unused db primary/replica/coordinator from bsky dataplane

* bsky proto add cids to contracts, buf codegen

* sync-up bsky data-plane w/ codegen updates

* start using dataplane interaction endpoints

* add file

* avoid overfetching from dataplane, plumb feed items and cids

* pass refs through for post viewer state

* Lexicons: Add labeler prefs, labeler declaration, and get labeler routes

* Add labelerViewBasic and update embed views

* Fix typo

* switch list feeds to use feed item in dataplane

* handle not found err on get-thread dataplane call

* support use of search service rather than dataplane methods

* mark some appview v2 todos

* tidy

* still use dataplane on search endpoints when search service is not configured

* fix pds test

* Switch to labelerViewDetailed

* Move label and report values to refs

* Add getActorLabelers

* lint

* fix up bsky tests & snaps

* small diff to open pr

* rm new line

* codegen schemas

* tidy migrations

* table + indexing

* protos

* rename lexicons

* views, hydration + rename lexicons

* rest of routes

* data plane routes

* parse labelers from req

* fix appview-v2 docker build

* Support label issuer tied to appview v2 (#2033)

support label issuer tied to appview

* hydrate context

* tidy header logic

* integrating into more routes

* more routes

* wrap up rest

* add mock labeler

* rework labelerlexicons

* tidy lexs

* codegen new lexicons

* integrate lexicon rework

* add proxy logic

* forward labeler headers through pds

* tweak label header parsing

* remove did from scheams

* update indexing for lexs

* tests for mod service views

* label hydration test

* Add 'associated' to profileViewDetailed

* Rename labelers to mods in preferences

* Change uri to did in mod preferences

* couple more

* syntax tweaks

* integrate updated lexicons

* update view snap

* handle mod service embeds

* tidy

* fix mock

* lint

* base default labels of config var

* fix label hydration

* Appview v2: handle empty cursor on list notifications (#2017)

handle empty cursor on appview listnotifs

* Update appview v2 to use author feed enum (#2047)

* update bsky protos with author feed enum, misc feed item changes

* support new author feed enums in dataplane

* fix build

* Appview v2: utilize sorted-at field in bsky protos (#2050)

utilize new sorted-at field in bsky protos

* remove all dataplane usage of GetLikeCounts, switch to GetInteractionCounts

* Appview v2, sync w/ changes to protos (#2071)

* sync bsky protos

* sync-up bsky implementation w/ proto changes

* Appview v2 initial implementation for getPopularFeedGenerators (#2072)

add an initial implementation for getPopularFeedGenerators on appview v2

* merge

* fixes

* fix feed tests

* fix bsync mock

* format

* remove unused config

* fix lockfile

* another lockfile fix

* fix duplicate type

* fix dupplicate test

* Appview v2 handling clearly bad cursors (#2092)

* make mock dataplane cursors different from v1 cursors

* fail open on clearly bad appview cursors

* fix pds appview proxy snaps

* Appview v2 no notifs seen behavior (#2096)

* alter behavior for presenting notifications w/ no last-seen time

* fix pds proxy tests

* Appview v2 dataplane retries based on client host (#2098)

choose dataplane client for retries based on host when possible/relevant

* don't apply negated labels

* display suspensions on actor profile in appview v2

* Appview v2 use dataplane for identity lookups (#2095)

* update bsky proto w/ identity methods

* setup identity endpoints on mock dataplane

* move from idresolver to dataplane for identity lookups on appview

* tidy

* Appview v2: apply safe takedown refs to records, actors (#2107)

apply safe takedown refs to records, actors

* Fix timing on appview v2 repo rev header (#2113)

fix timing on appview repo rev

* fix post thread responses

* Appview v2 don't apply 3p self blocks (#2112)

do not apply 3p self-blocks

* Appview v2 search for feed generators (#2118)

* add protos for feedgen search

* support feed search on getPopularFeedGenerators

* Appview v2 config tidy (#2117)

* remove mod and triage roles from appview

* rename cdn and search config

* remove custom feed harness from appview v2

* Appview v2: don't apply missing modlists (#2122)

* dont apply missing mod lists

* update mock dataplane

* Update packages/bsky/src/hydration/hydrator.ts

Co-authored-by: devin ivy <devinivy@gmail.com>

* refactor & document a bit better

* fix up other routes

---------

Co-authored-by: devin ivy <devinivy@gmail.com>

* Appview v2 enforce post thread root boundary (#2120)

* enforce post thread root boundary

* test thread root boundary

* Appview v2 fix admin environment variable (#2137)

fix admin env in appview v2

* Remove re-pagination from getSuggestions (#2145)

* remove re-pagination from getSuggestions

* fix test

* Adjust wording for account suspension (#2153)

adjust wording for account suspension

* Appview v2: fix not-found and blocked uris in threads (#2201)

* fix uris of not-found and blocked posts in threads

* update snaps

*  Show author feed of takendown author to admins only (#2197)

* fold in cid, auth, tracing, node version changes

* remove dead config from bsky service entrypoint

* build

* remove ozone test codepaths for appview v2

* tidy, docs fix

* fix test

* add additional user counts

* add associated data to profiles

* update snaps

* update to is_mod_service

* format

* tidy

* 3p labeler sdk updates (#2176)

* Update sdk to support 3p labeler preferences

* Stick with intolerance instead of hate for the label group id

* wip expand labels and label groups

* Output moderationOpts (computed) and modsPref (unaltered)

* Add tests for enabling/disabling mod services

* Add atproto-labelers header config

* Expand labels and label groups in definitions

* Fix tests

* Tweaks to labels

* Remove label descriptions and improve output types on labels and label groups

* Add mocker to exported API

* Improve types of label and label group definitions

* Rework moderation prefs to continue using global labelgroup settings and only disable label groups per moderator

* Simplify encoding of the label preferences in definitions

* Add target constraints to labels

* Refactor the moderation sdk to derive more behaviors from the definition files

* Small cleanup

* Add hiding tool to modsdk

* Track filter causes

* Make mute state an alert

* Fix: dont blur profileview for blocks

* Prioritize causes by severity

* Add moderateNotification() and drop quote post moderation code

* Add mocker functions for notifications

* Improve mock data

* Lexicon: Add custom label definitions and remove modservice descriptions

* Lexicon: Update moderation prefs

* SDK updates: remove label groups, reduce builtin labels, update mod-preference apis

* Lexicon: Update global labels with new reduced set

* Lexicon: Remove moderation.getService and add detailed option to getServices

* Lexicons: add severity=none to custom label value defs

* Implement custom label-value definition tooling

* All custom labels are no-self

* Backend impl for labeler lexicon updates (#2258)

* codegen

* clean up impl

* fix up tests

* Lexicon: modservice -> labeler

* Remove x- prefix behavior; add label value syntax rules; add custom label precedence rules

* Lexicon: Remove the ability to choose a defaultSetting from custom labels

* Rework test suites

* Give behaviors to all labels regardless of target

* sync up backend with lex changes

* fix labelers in dev-env agent

* lint protos

* update protos & views

* small bugfix & update tests

* tweak protos

* fix build issue from merge

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Co-authored-by: Foysal Ahamed <foysal@blueskyweb.xyz>
2024-03-06 17:56:34 -06:00
Foysal Ahamed
bae2ce3809
Introduce #reviewOptional as reviewState for non-impactful events on a subject (#2235)
* 🚧 Working through an nullable review state

*  Update snapshots on some tests

*  Update snapshots on some tests

*  Add test for reviewOptional status mutation

* ♻️ Rename reviewOptional -> reviewNone

*  Use FOR UPDATE to respect db transactions
2024-03-06 15:30:23 -05:00
dan
192223f127
Show only replies from people you follow in Following by default (#2279)
* Show only replies from people you follow by default in Following

* Patch
2024-03-06 16:55:58 +00:00
devin ivy
c7e6ef0907
Ozone delegates email sending to actor's pds (#2272)
* ozone delegates email sending to user's pds

* lexicon: add content field to mod email event

* test email sending via mod event
2024-03-05 13:27:25 -06:00
bnewbold
d643b5bb13
lex: tweak deprecation note (#2222)
* lex: tweak deprecation note

The motivation with this is that the docs site hides deprecated
endpoint, and the behavior was updated to only do this when
"deprecation" is the first word of the description (to avoid hiding some
endpoints which just talk about deprecation).

* make codegen
2024-02-23 14:59:47 -08:00
Eric Bailey
514aab92d2
Add missing getPreferences union return types (#2215)
* Add missing getPreferences union types

* Add changeset
2024-02-22 09:43:58 -06:00
Daniel Holmgren
87d59ff541
Admin: updateAccountPassword (#2212)
* add update account password route

* add test
2024-02-21 23:58:25 -06:00
Eric Bailey
b60719480f
Muted items prefs (#2195)
* Muted items prefs

* Add hidden posts

* Enhance

* Update to use smart objects

* Add 'any'

* Codegen

* Enhance

* Muted words methods

* Dry it up

* Format

* Add hidden posts methods

* Who codegens the codegens

* Sanitize tags, always compare bare strings

* Moar test

* Simplify

* Add test

* Add changeset
2024-02-21 19:32:09 -06:00
Daniel Holmgren
1a12c7e34b
Firehose Identity event (#2208)
* add new identity event

* add note for tombstone

* send identity evts

* add emission of identity evts

* emit handle event on activate account & fix subscribeRepos

* add time to evt

* update indexer for tests

* rm logs
2024-02-21 15:10:12 -06:00
Daniel Holmgren
30b05a7d4b
Account migration (#2179)
* draft of account migration lexicons

* format

* clean up schemas

* codegen

* second pass on schemas

* small fix

* move around checkImportStatus

* re-codegen

* getServiceAuth

* getServiceAuth impl

* importRepo impl

* handle uploadBlob for import

* allow bringing your own did on createAccount

* working on test flow

* fleshing out flow

* fix up sendPlcOP

* small fixes

* activate/deactivate account

* full flow working!

* schema tweaks

* format

* update schemas

* moar codegen

* match impl to new schemas

* email flow for signed plc operation

* add email flow for plc operations

* impl plc op request email

* proxy to entryway

* tidy activate account

* integrating account deactivated state

* fix up tests

* friendly parse on optional did auth

* admin activate/deactivate routes

* proxy relevant requests to entryway

* remove admin activation routes

* do not proxy acitvaition to entryway

* cfg for disallowing imports

* buff up test

* refactor listMissingBlobs a bit

* add validDid & activated to accoutn status

* emit event on account activation

* test creating a post after migrating

* account deactivation tests

* test name

* tests on plc operations

* fix recommended did creds

* codegen

* turn off accepting imports on createAccount

* undo prev change

* increment version

* build branch

* pr feedback

* handle errs in p-queue

* handle blob upload outside of txn

* Clean old temp account migration lexicons (#2187)

* clean old temp lexicons

* rm old test

* fix agent session test

* fix bsky test

* dont build branch
2024-02-20 19:29:49 -06:00
Daniel Holmgren
4c511b3d9d
Account migration schemas (#2170)
* draft of account migration lexicons

* format

* clean up schemas

* second pass on schemas

* small fix

* move around checkImportStatus

* getServiceAuth

* schema tweaks

* format

* update schemas

* email flow for signed plc operation

* refactor listMissingBlobs a bit

* codegen

* return did in describeServer

* changeset
2024-02-20 19:23:56 -06:00
Foysal Ahamed
d81573232b
Allow filtering moderation queue by language (#2161)
*  Store languages on subjects from record data

*  Fetch lang from author feed for repo subject

*  Regenerate lex

*  Add lang to profile subject

*  Move lang to flag

*  Add comment to flag event

*  Update pds test snapshot

* 🐛 Fix broken import

*  Rename flag to tag

*  Update snapshot for event by id

*  Bring back skipped test

*  Move tags to dedicated columns

*  Update test snapshots, use logger

*  Change lang:unknown to lang:und

*  Update test snapshots

* 🧹 Cleanup

*  Add filter params for tags on queryModerationEvents endpoint

*  Add tags property to subject status model

*  Update test code

*  Add filter to get subjects that do not have certain tags
2024-02-19 10:35:03 -05:00
Daniel Holmgren
8c94979f73
Timeline index pref (#2188)
* add following index pref

* added changeset

* change pref name

* update changeset
2024-02-15 20:12:39 -06:00