* ✨ Add events for account and record update/delete/deactivation
* ✨ Add handle change event
* ✨ Reduce account events to 2 types and record events to 1
* ✨ Store metadata from account, identity and record events
* ✨ Add created event for record
* ✨ Add ndd the new events to allowed types in emitEvent
* ✨ Use string value for record op and add tombstone flag to identity event
* ✨ Add active flag on account events
* ✨ Change accountStatus -> status to match with firehose event
* ✨ Make active flag required
* 🚨 fix prettier style issue
* ✨ Track record/account delete and update data in subject status (#2804)
* ✨ Store deleted/updated event data in subject_status
* 🐛 Fix query for recordDeletedAt and recordUpdatedAt
* ✨ Add tombstoned status
* ✨ Move from record to hosting term
* ✅ Add tests for hosting params
* ✨ Update lexicons for hostingStatuses
* ✅ Update snapshots
* ✅ Update snapshots
* ✅ Update snapshots
* ✨ Adjust hosting statuses
* 📝 Add changeset
* Improve error message when using invalid client_id during code exchange
* Extract SPA example OAuth client in own package
* wip
* remove dependency on get-port
* Properly configure jest to only transpile "get-port" from node_modules
https://jestjs.io/docs/configuration#transformignorepatterns-arraystring
* Use dynamically assigned port number during tests
* use puppeteer to run tests
* remove login input "id" attribute
* code style
* add missing declaration
* tidy
* headless
* remove get-port dependency
* fix tests/proxied/admin.test.ts
* fix tests
* Allow unsecure oauth providers through configuration
* transpile "lande" during ozone tests
* Cache Puppeteer browser binaries
* Use puppeteer cache during all workflow steps
* remove use of set-output
* use get-port in xrpc-server tests
* Renamed to allowHttp
* tidy
* tidy
* Add new postgate lex, hiddeReplies to threadgate, codegen
* Add protobufs
* Add to mock dataplane
* Add matching postgate method to feed hydration methods
* Add to getRecord
* Add to HydrationState
* Fix typo
* Add to mergeStates, fetch embeds in threads
* Integrate into embed views
* Add test for QPs in threads
* Add feed test
* Fix naming convention in protos
* Add #viewRemoved record view, rename postgate.json
* Integrate new view
* Filter hidden replies from feeds
* Filter out replies at the handler level, do not filter for author feeds
* Fix lint
* Move hidden reply check to view layer
* Reduce, reuse, recycle
* Rename to lowercase
* Rename layer vars
* Add quote gate props to postgate (#2693)
* Add quote gate props to postgate
* Consistent naming
* Fix record structure
* Codegen
* Show hidden replies in author feed
* Allow reposts of hidden replies
* Lex and codegen
* Add violates_quote_gate to proto
* Consistent naming, codegen
* Integrate violatesQuotegate and canQuotepost
* Remove rules, codegen
* Hydrate all postgates for all requested posts
* Match other impl
* Add test, need to split these out
* Format
* Hydrate first nested embeds too
* Add postgate test suite
* Add violatesQuoteGate to dataplane
* Ingest and set violatesQuoteGate, return on meta
* Return removed embed for quotes that violate gate
* Add test
* Dedupe URIs before fetching postgates
* Update snaps
* Snap
* Format
* Updating naming conventions for postgate-related attributes
* Correct naming
* Consistency
* Proto too
* Rename to viewDetached
* Codegen
* Rename everything
* Codegen
* Quotes that violate a quote gate can still be quoted themselves
* Couple more renames
* Snaps
* Ensure reply ref is tombstoned for hidden replies
* Split out hidden replies tests and create fresh fixture
* Hydrate threadgates for reply notifications, filter hidden replies
* Remove snap
* Add flaky test
* Rename violatesEmbeddingRules
* Fix flaky test
* Only write to db if violatesEmbeddingRules is true
* DRY up post uri -> gate uri logic
* isThreadgateListRule
* Don't share users object between tests
* No pascal
* Remove default params
* Find -> some
* canQuotepost -> canEmbed, remove optional
* Fix quoteee typo
* await follows
* Throw in post uri -> gate utils
* Ensure fetch threadgates for reply roots
* Don't hydrate threadgates twice
* DRY up uri -> did parsing
* Clean up parsePostgate logic
* Format
* Revert change
* Revert change
* Replace a couple more uri->did conversions
* Only filter replies from feeds if viewer hid them
* Revert, filter out replies that are hidden from feeds
* Remove old test
* Replace uri->did util
* Revert change to unused file
* Only validatePostEmbed and check postgates for post records
* Ensure notifications aren't generated down a hidden reply chain
* Changeset
* Cleanup
* Fix notification filtering logic
* Simplify
* Don't notify for invalid embeds
* Use new APIs
* Add hasPostGate and hasThreadGate flags from dataplane
* Only fetch postgates if post has one
* Only fetch threadgates if post has one or was deleted
* Remove notification filtering
* Don't hydrate threadgates for notifications
* Move hidden replies in feeds to match block handling
* Do no filtering of hidden replies in feeds
* Revert "Don't hydrate threadgates for notifications"
This reverts commit 1dcec0b239a7b9d6800427b26b8ba3e6a54210f9.
* Revert "Remove notification filtering"
This reverts commit 1e7069dfd809d1f18e9f05fd1d422e7399aa1bb0.
* Filter notifications for OP only
* Add additional check to hidden replies test
* Move noty filter logic into method handler
* Update .changeset/perfect-parrots-appear.md
Co-authored-by: devin ivy <devinivy@gmail.com>
* Update packages/bsky/tests/seed/postgates.ts
Co-authored-by: devin ivy <devinivy@gmail.com>
* Another structuredClone
* Update packages/bsky/src/hydration/hydrator.ts
Co-authored-by: devin ivy <devinivy@gmail.com>
* Better comment
* Update packages/bsky/src/data-plane/server/indexing/plugins/post.ts
Co-authored-by: devin ivy <devinivy@gmail.com>
* Regen protos to match dataplane
* Update quotes snap to include embeddingDisabled
* Clarify usage of post uri -> gate utils
---------
Co-authored-by: devin ivy <devinivy@gmail.com>
* add quote count to post_agg, add getPostQuotes
rework schema
rework schema
add getPostQuotes to api
use posts
use posts
codegen
use items instead of quotes
codegen
add getPostQuotes
add quoteCount to response
update lexicon for postview
increment post ags
add quote to post aggs
add quote interface
oops
add quote table migration
* update
* bufgen
* update params
* update to use v2
* logs
* rm comment
* pass cursor
* add index
* Update packages/bsky/src/data-plane/server/db/migrations/20240723T220703655Z-quotes.ts
Co-authored-by: devin ivy <devinivy@gmail.com>
* only if its a post
* tests
* Discard changes to packages/bsky/tests/views/posts.test.ts
* fix client call
* Include new quotes agg in test expectation
* Use new API for headers
* Update packages/bsky/src/data-plane/server/indexing/plugins/post.ts
Co-authored-by: devin ivy <devinivy@gmail.com>
* revert rm
* rm timeout
* cursor test
* Changeset
* Remove pds specific bump
---------
Co-authored-by: devin ivy <devinivy@gmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
* feat(api): support creation of oauth based AtpAgents
* oauth: misc fixes for confidential clients
* fix(xprc): remove ReadableStream.from polyfill
* OAuth docs tweaks (#2679)
* OAuth: clarification about client_name being shown
* OAuth: re-write handle resolution privacy concern
* avoid relying on ReadableStream.from in xrpc-server tests
* feat(oauth-types): expose "ALLOW_UNSECURE_ORIGINS" constant
* feat(handle-resolver): expose "AtprotoIdentityDidMethods" type
* fix(oauth-client): ensure that the oauth metadata document contains client_id_metadata_document_supported
* fix(oauth-types): prevent unknown query string in loopback client id
* fix(identity-resolver): check that handle is in did doc's "alsoKnownAs"
* feat(oauth-client:oauth-resolver): allow logging in using either the PDS URL or Entryway URL
* fix(oauth-client): return better error in case of invalid "oauth-protected-resource" status code
* refactor(did): group atproto specific checks in own
* feat(api): relax typing of "appLabelers" and "labelers" AtpClient properties
* allow any did as labeller (for tests mainly)
* fix(api): allow to override "atproto-proxy" on a per-request basis
* remove release candidate versions from changelog
* update changeset for api and xrpc packages
* Add missing changeset
* revert RC versions
* Proper wording in OAUTH.md api example
* remove "pre" changeset file
* xrpc: restore original behavior of setHEader and unsetHeader
* docs: add comment for XrpcClient 's constructor arg
* feat(api): expose "schemas" publicly
* feat(api): allow customizing the whatwg fetch function of the AtpAgent
* docs(api): improve migration docs
* docs: change reference to BskyAgent to AtpAgent
* docs: mention the breaking change regarding setSessionPersistHandler
* fix(api): better split AtpClient concerns
* fix(xrpc): remove unused import
* refactor(api): simplify class hierarchu by removeing AtpClient
* fix(api): mock proper method for facets detection
* restore ability to restore session asynchronously
* feat(api): allow instantiating Agent with same argument as super class
* docs(api): properly extend Agent class
* style(xrpc): var name
* docs(api): remove "async" to header getter
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: bnewbold <bnewbold@robocracy.org>
Co-authored-by: Hailey <me@haileyok.com>
* present detailed profile view for getSuggestions
* change lexicon to profileViewDetailed
* finish running the codegen
* update snapshot test for getSuggestions
* Revert "change lexicon to profileViewDetailed"
This reverts commit f0b167d180716f8d6d2cd14316b50d29c2690140.
Revert "update snapshot test for getSuggestions"
This reverts commit 21609516afcbcda5f86566eb9053d0b8db3834b0.
Revert "finish running the codegen"
This reverts commit 8bf3150524fd8e479e76e7bf35d5a53cc3ae46e0.
* use basic profile + knownfollowers
* update snapshot test
* add createdAt to snapshot
* 🚧 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
* schemas
* protos
* implementation
* add filtering on ingestion
* test
* add thread viewer state to post views
* update snaps
* changeset
* fix threadgating test
* 🚧 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
* ✨ Detect language from record content if lang property is not set
* ✅ Update test snapshots for auto detected language
* ✅ Update pds test snapshots
* ✅ Adjust test to use the right method
* 🧹 Make list override param optional
* 🧹 Fix import
* 🚨 fix linter issues
* ♻️ Use record type for getting text from record
* ✅ process records for appview to pick it up
* 🧹 Cleanup
* lexicon: add post counts to embed#viewRecord
* appview: hydrate and present aggregations on post embeds
* update snaps for aggregations on post embeds
* remove `neg` on the labels that ozone emits
* no negs in appview either
* no negs on self-labels
* no neg on self labels in ozone either
* fix query labels test
* 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
* 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
* tidy bsky auth
* hook up new auth verifier
* update auth throughout ozone
* handle mod signing keys
* add client proxy heads to pds
* hook up rest of routes
* simplify pipethrough & add some SSRF protection
* tests
* fix bad var
* remove basic auth in ozone
* wip
* fix key parsing in pds
* fix up all ozone tests
* fix admin auth test
* rename test
* fix ozone test
* clean up tokens in pds
* fix up pds tests
* fix up ozone tests
* add pipethrough to write routes
* reenable proxied admin test
* add moderator accounts to ozone in dev-env
* update did doc id values
* null creds string -> `none`
* fix fetchLabels auth check
* ✨ Add a couple more proxied requests that we use in ozone ui
* Add runit to the services/bsky Dockerfile (#2254)
add runit to the services/bsky Dockerfile
* Improve tag detection (#2260)
* Allow tags to lead with and contain only numbers
* Break tags on other whitespace characters
* Export regexes from rich text detection
* Add test
* Add test
* Disallow number-only tags
* Avoid combining enclosing screen chars
* Allow full-width number sign
* Clarify tests
* Fix punctuation edge case
* Reorder
* Simplify, add another test
* Another test, comment
* Version packages (#2261)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* 🐛 Increment attempt count after each attempt to push ozone event (#2239)
* 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
* add dev dep for nodemailer in ozone
* fix auth verifier method
* build branch
* build branch
* fix url check
* better error handling for get account infos
* fix labeler service id
* fix iss on auth headers
* fix dev-env ozone did
* fix tests & another jwt issuer
* fix proxy auth
* ozone: fix ip check
* fix aud check on pds mod service auth
* tidy
* Update packages/pds/tests/proxied/admin.test.ts
Co-authored-by: devin ivy <devinivy@gmail.com>
* fix pipethrough of headers
* fix moderation status tests
* fix auth on ozone routes
* update iss on daemon
---------
Co-authored-by: Foysal Ahamed <foysal@blueskyweb.xyz>
Co-authored-by: Jake Gold <52801504+Jacob2161@users.noreply.github.com>
Co-authored-by: Eric Bailey <git@esb.lol>
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>
* tidy bsky auth
* hook up new auth verifier
* update auth throughout ozone
* handle mod signing keys
* add client proxy heads to pds
* hook up rest of routes
* simplify pipethrough & add some SSRF protection
* tests
* fix bad var
* fix key parsing in pds
* fix admin auth test
* rename test
* add pipethrough to write routes
* update did doc id values
* null creds string -> `none`
* fix fetchLabels auth check
* ✨ Add a couple more proxied requests that we use in ozone ui
* Add runit to the services/bsky Dockerfile (#2254)
add runit to the services/bsky Dockerfile
* Improve tag detection (#2260)
* Allow tags to lead with and contain only numbers
* Break tags on other whitespace characters
* Export regexes from rich text detection
* Add test
* Add test
* Disallow number-only tags
* Avoid combining enclosing screen chars
* Allow full-width number sign
* Clarify tests
* Fix punctuation edge case
* Reorder
* Simplify, add another test
* Another test, comment
* Version packages (#2261)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* 🐛 Increment attempt count after each attempt to push ozone event (#2239)
* 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
* fix auth verifier method
* build branch
* fix url check
* better error handling for get account infos
* fix labeler service id
* fix iss on auth headers
* fix dev-env ozone did
* fix tests & another jwt issuer
* ozone: fix ip check
* fix aud check on pds mod service auth
* tidy
* fix pipethrough of headers
---------
Co-authored-by: Foysal Ahamed <foysal@blueskyweb.xyz>
Co-authored-by: Jake Gold <52801504+Jacob2161@users.noreply.github.com>
Co-authored-by: Eric Bailey <git@esb.lol>
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>
* 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>
* make appview and mod services optional on pds
* pds: allow configuring a reporting service optionally separate from an administrative mod service
* tidy
* ✨ 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
* mv appview
* copy
* finalize copy
* package names
* big WIP
* first pass at mod servce
* some tidy
* tidy & fix compiler errors
* rename to ozone, db migrations, add to dev-env & pds cfg
* getRecord & getRepo mostly working
* fix open handle
* get record tests all working
* moderation events working
* statuses working
* tidy test suite
* search repos
* server & db tests
* moderation tests
* wip daemon + push events
* pds fanout working
* fix db test
* fanning takedowns out to appview
* rm try/catch
* bsky moderation test
* introduce mod subject wrappers
* more tidy
* refactor event reversal
* tidy some db stuff
* tidy
* rename service to mod-service
* fix test
* tidy config
* refactor auth in bsky
* wip patching up auto-mod
* add label ingester in appview
* fix a couple build issues
* fix some timing bugs
* tidy polling logic
* fix up tests
* fix some pds tests
* eslint ignore
* fix ozone tests
* move seeds to dev-env
* move images around
* fix db schemas
* use service auth admin reqs
* fix remaining tests
* auth tests bsky
* another test
* random tidy
* fix up search
* clean up bsky mod service
* more tidy
* default attempts to 0
* tidy old test
* random tidy
* tidy package.json
* tidy logger
* takedownId -> takedownRef
* misc pr feedback
* split daemon out from ozone application
* fix blob takedown mgiration
* refactor ozone config
* do push event fanout on write instead of on read
* make suspend error work again
* add attempts check & add supporting index
* fix takedown test ref
* get tests working
* rm old test
* fix timing bug in event pusher tests
* attempt another fix for timing bug
* await req
* service files
* remove labelerDid cfg
* update snaps for labeler did + some cfg changes
* fix more snaps
* pnpm i
* build ozone images
* build
* make label provider optional
* fix build issues
* fix build
* fix build
* build pds
* build on ghcr
* fix syntax in entry
* another fix
* use correct import
* export logger
* remove event reverser
* adjust push event fanout
* push out multiple
* remove builds
* cleanup repeat process all
* wip
* skip actor search test
* skip actor search test
* tweak processAll
* decrease wait to 1 sec
* repo_blob -> record_blob
* simplify backlink linkTo
* return repo_root to one row
* sequence before updating repo_root
* invite code forUser -> forAccount
* ipld_block -> repo_block
* use lru-cache fetchMethod
* move did_cache to own db
* better error handling on did cache
* drop did_handle
* fix sequencer wait time
* debug
* debug
* more debug
* check something
* fix bday paradox
* fix bday paradox
* tidy up pds service auth
* rm skipped test
* retry http
* tidy
* improve fanout error handling
* fix test
* return signing key in did-web
* more tests
* tidy serivce auth checks
* user_account -> account
* remove inviteNote
* keypair per repo
* use an lru cache for keypairs as well
* clean up repo
* wip
* wrap up accoutn manager
* tidy
* tidy
* fix tests
* fix disabled codes
* fix appview tests
* add note
* set pragmas
* tidy account manager getDb
* rename pref transactor
* user pref -> account pref
* handle blob imports
* tidy imports
* add reserveSigningKey
* wip transferAccount
* clean up transferAccount
* tests
* tidy
* tidy
* configure entryway url on pds
* handle entryway in pds admin endpoints
* make importRepo temp
* fix imports
* make email optional on pds when using entryway
* handle diffs
* handle pds entryway usage for server, identity, admin endpoints
* pds support for credentials from entryway
* setup pds tests w/ entryway service
* tidy
* tidy
* update entryway version
* wip
* test handle updates w/ entryway
* split account table into two
* tidy
* tweak scripts
* tidy tests
* tidy
* better config for actorstore & dbs
* clean up cfg more
* reorg actorstore fs layout
* handle erros on actor db create
* pr tidy & fix accoutn deletion test
* pr feedback
* fix bad merge
* unskip test
* fix subscribe repos tests
* tidy repo root tables
* tidy
* fix tests
* tidy delete tokens
* tidy account getters
* tidy
* bulk deletesg
* increase chunk size
* handle racing refreshes
* wip
* fix auth test
* invert import flow
* clean up actor store on create account failure
* tweak sequencer
* prevent invite code races on createAccount
* rm note
* add back in race protection on getAccountInviteCodes
* start feature branch
* deleted app migration table
* patch up new auth test
* rm note
* g
* create accoutn delegated from entryway
* tidy
* fix test
* change plcOp type to unknown
* small fixes
* sync up w entryway branch
* Use proper error when authed account is not found (#1799)
provide proper error when account not found in access-takedown check
* build branch
* build on ghcr
* tweak service file
* tweak service file
* change where we save reserved keys
* no tmp dir in blobstore either
* fix blobstore temp location again
* handle repeat record_blobs
* create account before submitting plc op & undo if fail
* small tweak
* limit the number of local records
* push out empty commit on transfer
* fix issue with record_blob
* add push blob endpoint
* Set and validate token audiences on pds v2 (#1793)
set and validate token audience on pds v2
* merge
* include entryway did on tests
* build branch
* fix cache issue
* xrpc server blob limit
* put correct bytes
* add auth to routes
* handle quarantining/unquarantining a blob that does not exist
* tidy
* fix transfer tests
* fix email request routes for entryway
* PDS v2 entryway account deletion (#1819)
* add admin lexicon for account deletion
* implement admin account deletion endpoint
* fix entryway proxying on account email checks
* proxy to entryway for acct deletion
* read-after-write sanity check
* tweak
* wip
* finish refactor
* fix test schema
* application retry logic for busy
* pr feedback
* rm lru-cache
* fix test pg schema
* fix transfer test
* Sqlite instrumentation for pds v2 (#1838)
* sqlite instrumentation
* build
* remove build
* dont reimport blobs
* send ticks during import
* close on error
* catch handle validation error
* add log
* fix test
* return emailConfirmedAt on getAccountInfo
* Upgrade sharp on pds v2 (#1863)
upgrade sharp to 0.32.6
* read all bytes before parsing car
* Async car reader (#1867)
* asynchronously read in car
* dont buffer car
* tweak
* Gracefully handle indexing of invalid records (#1853)
* gracefully handle indexing of invalid records
* fix repo tests
* Fix role auth for access-or-role verifier, getBlob check on actor takedowns (#1869)
fix role auth for access-or-role verifier, fix getBlob actor takedown check
* better cleanup of actor-stores
* add ability to not ensure leaves
* tidy
* allow did:web transfer
* Migration utility for actor-store (#1873)
beginnings of helper for migrating all actors
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* base case for findBlobRefs
* App-level retries for sqlite on pds (#1871)
* revamp retry helper to be more flexible re: backoff strategies
* sqlite timeout helper
* ensure sqlite wal on db creation/migration rather than every open
* layer retries for sqlite on writes outside transactions on pds
* tidy
* fix up lockfile
* tidy
* fix lex codegen
* fix timing bug in threadgate test
* No-op update handling (#1916)
do no produce commits on no-op updates
* Retry on all SQLITE_BUSY error codes (#1917)
retry on all sqlite_busy error codes
* Pds v2 ensure sqlite ready (#1918)
ensure sqlite is ready before making queries
* try something
* tidy
* dont build branch
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* 🚧 WIP with proposed lexicons for event based mod architecture
* 🚧 Remove unnecessary moderation action lexicon
* 🚧 Working on event based actions
* ✨ Add escalated subject status
* 🐛 Alright, fixed the error in lexicon
* 🚧 Working through reversal
* ✨ Cleanup build errors
* ✨ Add subject status endpoint
* ✨ Add handler
* ✨ get reports from mod actions table
* :rightwards_twisted_arrows: Merge with upstream
* 🚧 Builds but test network doesnt start
* ✨ Tests passing on event based status change
* ✨ Rename index
* ♻️ Rename takeModerationAction->emitModerationEvent
* ✨ Implement label reversal
* ✅ Auto-revert test working
* ♻️✅ Refactored to event types and tests are passing
* ✨ Add takedown event sequence validation
* ✨ Adds support for blobCid status
* 🧹 Cleanup unnecessary method:
* ✨ Hydrate handles with status and events
* ✨ Re-implement auto reversal
* ✨ Add takendown and mute filters
* ✨ Allow filtering events by type
* ✨ Allow filtering events by creator did
* ✨ Add subjectStatus to record and repoview
* ✨ Add persistent note feature
* ✨ Log send email event
* 🐛 Fix logging send email event
* ✨ Better type
* ✨ Adjust migration to create separate moderation_event table
* 🧹 Cleanup types
* ✅ Adjust tests with mod event emitter
* ✨ Fix more tests around takedowns
* ✅ Get test suite to pass
* ✅ Get test suite to pass for pds
* ✅ Get test suite to pass for pds
* ✅ Update snapshot for feedgen
* ✅ Why are more snapshots updating?
* ♻️ Rename getModerationEvents -> queryModerationEvents
* ♻️ Rename getModerationStatuses -> queryModerationStatuses
* ♻️ Rename persistNote->sticky
* 🐛 Rename subject
* ♻️ Cleanup expiresAt for scheduled actions
* ✨ Add more tests, allow fetching mod history for all content by a user
* ✅ Fix repo and record tests
* ✨ Migrate reports and actions to events
* 🐛 Fix escalated status overwrite
* ✨ Implement direct sql query to create events from actions and reports
* 🚧 Adding keyset pagination for subject statuses
* ✨ Add migration for lastReportedAt
* ✨ Migrate blob cids
* ✨ Fix pagination on mod subject list endpoint
* 🐛 Fix blob actions
* ✅ All tests passing on bsky package
* ✅ Bring back snapshots
* ✅ Skipping timeline test temporarily
* ✅ Skipping some more tests to isolate failing ones
* ✅ Bring back list-feed test
* ✅ Bring back timeline test
* ✅ Fix label action in seeding
* ✅ Enable timeline proxied test
* ✅ Enable search actor proxied test
* ✅ Enable feedgen tests
* ✅ Fix test for admin/get-record
* ✨ Move note to comment for subject status
* ✨ Accept comments in mute event
* ✨ Remap flag event to ack event
* 🐛 Add legacyRef in report union selection
* @atproto/api 0.6.24-next.0
* @atproto/api 0.6.24-next.1
* ✨ Adjust migration export and add index for blobCids column
* ✨ Maintin action ids when migrating
* ✨ Paginate events using createdAt timestamp
* ✅ Update snapshot for pds test with events cursor update
* ✅ Use only events for snapshot testing
* ✅ Use only events for snapshot in the remaining test
* relative paths to lexicons for build
* fix bsky periodic event reversal in service entrypoint
* ✨ Allow comments in takedown and label
* ✨ Only import reports on consecutive run of the migration script
* ✨ Adjust moderation property of blob entries
* determine latest reports to migrate
* ✨ Process new reports for subject status
* ✨ Process unresolved reports on first migration run
* fix transaction error, process just unresolved reports, make reported-at updates safe for reruns
* tidy
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* spec out new simple pds mod routes
* introduce new admin state endpoints
* wire up routes
* clean up pds
* revoke refresh tokens
* getUserAccountInfo
* pr tidy
* fixing some tests
* fixing up more tests
* fanout takedowns to pds
* fanout admin reqs to pds
* tidy
* more tidy & add more pds moderation tests
* getUserAccountInfo -> getAccountInfo
* dont hydrate pds info on searchRepos
* fix build
* port admin tests to bsky package
* clean up old snaps
* tests on fanout
* tweak naming
* missed a rename
* tidy renames
* fix lex name
* tidy & move snap
* fix build
* cleanup repeat process all
* skip actor search test
* fix bday paradox
* tidy up pds service auth
* rm skipped test
* retry http
* tidy
* improve fanout error handling
* fix test
* return signing key in did-web
* more tests
* tidy serivce auth checks
* change takedownId col to takedownRef
* build branch
* fix bsky test
* add service key to indexer
* move signing key to api entry
* dont build