* Add lexicon for getProfiles
* Split out presentation of profiles, implement getProfiles, test
* Cull actor/profile view lexicons down to three variants
* Map viewer in profile view, mark todos, lex tweak
* Apply basic profile view to methods, lex fix
* Switch searchTypeahead to actor-with-info view
* Switch getVotes to actor-with-info view
* Switch getMutes to actor-with-info view
* Switch getFollows and getFollowers to actor-with-info view
* Switch getRepostedBy to actor-with-info view
* Switch feed and notification views to use updated actor-with-info view
* change pkey on user table to did & rename to user_account
* migration
* tidy
* fixes suggested by bryn
* missed merge thing
* some updating hanldes
scheams
* impl + passing test
* more handle tests
* tidy
* update did doc + some new tests
* one more test
* test handle casing
* Fix did pkey down migration
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* Scaffold xrpc-stream
* Write and test stream frames
* Write and test stream server
* Test bad stream frame parsing cases
* Proof of concept streaming on xrpc-server
* Test bad streaming endpoint
* Make frame stream to fix buffering frame bytes together
* reorg
* some lex-cli things
* better codegen for subscriptions
* scaffolding repo subscriptions
* wip
* remove repo ops
* setup notify/listen for db
* end pool to fix hanging test
* small comment in test
* basic sequencer
* some refactoring
* switch to event emitter
* reconnect on listener error
* rename notifyClient
* remove payload on channels
* pr feedback
* subscribeRepo outbox
* some cleanup
* wip
* wip
* bugfixin
* only send msgs after tx is committed
* better handle event-emitter -> generator
* max buffer size
* cleanup
* Sync-up xrpc subscriptions with current iteration of the spec
* Allow missing encoding for subscriptions
* track sequencedAt & eventType as well
* Resolve streaming type codes, streaming tests
* Fix interface for hooking into http server for streaming, fix stream routing
* Minor reorg how streaming is enabled in xrpc-server
* Server codegen for xrpc subscriptions, supporting types in xrpc-server
* fix up buffer overloading
* Rename data frame to message frame, rename subscription lex output to message
* Move body param first for streaming frames
* Tidy
* clean up evt types
* buff up tests
* missed merge conflict
* new schema
* blobs on subscriptions
* rm genned client subscription methods
* backfill limits
* testing subscription route & quick outbox bugfix
* fix up migration
* cascade on delete
* comments & naming
* fix dev env
* delete seqs on account deletion
* tidy
* fixing things up with db notify system for schemas
* fix duplicates in outbox
* tidy
* Break out of stream handler when socket closes
* fixing up some timing issues
* tidy
* terminate ws after using
* bump up timer on async reader
* fixing up NOTIFY in txns
* pr feedback
* pr bugfixes
* make order asc explicit
* bringing tests up to speed w atpagent
* bump up max listeners on sequencer
* increase timeouts for reading from generators
---------
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* Refactor @atproto/api to use the simplified AtpAgent API
* xrpc package: Export the defaultFetchHandler to reuse in api
* api package: Use the defaultFetchHandler defined in xrpc
* Update all usages of the api for the new AtpAgent
* Clear promise on thrown codepath
* Avoid updating the atpagent session until ready to return
* Lexicon updates for moderating blobs
* Add tracking of blob takedowns to moderation system
* Handle blobs in record takedown reversal
* Apply blob takedowns w/ image invalidation
* Test blob takedowns
* Implement cloudfront image invalidator
* Update lexicons for current moderation action on records and blobs
* Fix migration for postgres
* Enforce single current action per repo and blob, present current action on repo and blob
* Test single active mod action per repo, record, and blob
* Continue to resolve handles for moderated repos
* Model mod actions for actor takedowns
* Add administration lex schemas for moderation actions
* Initial implementation of takedown mod action and reversal
* Refactor admin actions into a service
* Check for account takedown when creating new session or refreshing session
* Sweep usage of getUser() and getUserByEmail() for takedowns
* Begin sweep for account takedowns
* Tidy takedown checks
* Handle post author takedowns
* Fix tests and migrations for mod takedown
* Fix xrpc-server delayed read of blob payloads
* Test takedown mod action, misc fixes
* Remodel lex schemas for admin moderation actions
* Remove delcaration cid from actor takedowns, lex schema tidy
* Add notes
* Move moderation methods to com.atproto, based around repo rather than actor
* Moderation reports of repos and records
* Implement moderation report resolution method
* Tidy
* Place moderation-init migration after mute-init
* Allow services to reference each other
* Model record takedowns in db
* Lex schemas for record takedowns
* Service/methods for record takedowns, fix report view subject
* Apply record takedown to posts in feeds
* Test record takedown effects, fix reversal
* Support server moderation flag and acknowledge actions, fix action/report resolution for records
* Track repo takedowns on repo_root rather than did_handle
* Move repo/record reporting under com.atproto.report
* Colocate all moderation functionality into moderation service, combine from admin and repo services
* Tidy
* Tidy
* Unify mod report and action methods with new repo/record ref schemas
* Schemas for admin moderation views
* Tidy/codegen
* Fix test snapshot
* Break pds admin methods into separate files
* Implment admin repo search method
* Reorganize existing moderation views into the ModerationViews
* Lex schemas for admin get repo/record, implement get repo
* Implement admin get record view
* Tidy/codegen
* Tidy, fix snapshot
* Tidy, swap filenames
* Implement admin get moderation action view
* Implement admin get moderation report view
* Implement and test admin views for mod actions and reports
* Dry-up some admin and moderation-related seeds in the tests
* Fix xrpc fetch usage for newly required duplex option
* Admin view of repo and record details (#463)
* Reorganize existing moderation views into the ModerationViews
* Lex schemas for admin get repo/record, implement get repo
* Implement admin get record view
* Tidy/codegen
* Tidy, fix snapshot
* Model mod actions for actor takedowns
* Add administration lex schemas for moderation actions
* Initial implementation of takedown mod action and reversal
* Refactor admin actions into a service
* Check for account takedown when creating new session or refreshing session
* Sweep usage of getUser() and getUserByEmail() for takedowns
* Begin sweep for account takedowns
* Tidy takedown checks
* Handle post author takedowns
* Fix tests and migrations for mod takedown
* Fix xrpc-server delayed read of blob payloads
* Test takedown mod action, misc fixes
* Remodel lex schemas for admin moderation actions
* Remove delcaration cid from actor takedowns, lex schema tidy
* Add notes
* Move moderation methods to com.atproto, based around repo rather than actor
* Moderation reports of repos and records
* Implement moderation report resolution method
* Tidy
* Place moderation-init migration after mute-init
* Allow services to reference each other
* Model record takedowns in db
* Lex schemas for record takedowns
* Service/methods for record takedowns, fix report view subject
* Apply record takedown to posts in feeds
* Test record takedown effects, fix reversal
* Support server moderation flag and acknowledge actions, fix action/report resolution for records
* Track repo takedowns on repo_root rather than did_handle
* Move repo/record reporting under com.atproto.report
* Colocate all moderation functionality into moderation service, combine from admin and repo services
* Tidy
* Tidy
* Unify mod report and action methods with new repo/record ref schemas
* Procedures and view for user muting
* Update profile and feed/thread methods for muting, update tests
* Tidy
* Test muting for timeline, actor feed, thread, profile views, misc fixes
* Test mute views, misc fixes
* Add missing file
* Add per-user notification index
* Omit mention and reply notifications from muted users
* Test timing leeway
* introducing appcontext & pds class
* revamp rest of server + auth
* revamp tests
* add to dev-env
* fix api test
* add start method to pds
* hook up terminator before
* PLC AppContext (#425)
* convert plc server to app context
* add start method to plc
* hooke up terminator on server setup
* fix test
* cleanup & pr feedback
* fix up one more test
* Fix typo
* Add failing test for attaching image to a post
* Tidy failing test
* Fix
* Expand the available image resize fit modes
* Add proper validation of glob-prefixed mimes (eg image/*)
* Detect and handle blobs in post embeds
* evert "Expand the available image resize fit modes"
This reverts commit 3390fbe4d091a04f9b67a2885eae19d025747fc4.
* Use fit: inside for post media
* Update tests
* Make the thumbnail optional in external embeds
Co-authored-by: Devin Ivy <devinivy@gmail.com>
* Fix the generated type for encoding when the value is */* (close#391)
* Add 'toKnownError' test and fix named error for updateProfile
* Improve blob errors
* adding in banners & some lex codegen improvements for server
* fix up spacing
* couple small fixes
* client codegen & remove media embed schemas
* hook up banners
* missed a couple of lexicons
* fix byte streaming from mem blobstore
* Enlarge avatar maxSize to 300kb
* Skip the cache on empty files
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Add auth to xrpc-server, refactor to use per-route middleware stack
* Add xrpc-server error middleware, tidy
* Tests in xrpc for for catchall errors and auth
* Tidy
* Update lex-cli for new xrpc-server auth interface
* Update pds lexicon w/ codegen for xrpc auth
* Use xrpc-server auth in pds
* Update tests for newly-required auth
* Update LexXrpcBody encoding to always be a single string with comma-separated values
* Update lexicon union-type to use as a discriminator, and add closed flag to establish if new union members may be added
* Fix to generated code for open unions
* Factor out app.bsky.system.declRef
* Factor out app.bsky.actor.ref and app.bsky.feed.embed
* Factor out com.atproto.repo.strongRef and use app.bsky.actor.ref in more places
* Modify app.bsky.actor.ref to be light reference, add #withInfo for indexed info
* Implement types and validation for new NIH lexicon DSL
* Update xprc and xrpc-server to use new NIH lexicon DSL
* Simplification: dont allow lexicon definitions to be refs or ref arrays
* Add 'unknown' primitive type to NIH lexicon
* Implement client codegen for NIH Lexicon
* Implement server codegen for NIH Lexicon
* Add the 'datetime' primitive type to the NIH Lexicon
* Rework lexicons to use new NIH Lexicon DSL
* Readd tokens to code generation
* Update all code to use new NIH Lexicon (all tests passing!)
* Add imports from external files to lex-cli codegen
* Do not allow records, queries, or procedures outside of the main def
* Update packages/lex-cli/src/util.ts
Co-authored-by: devin ivy <devinivy@gmail.com>
* Linter pass
* Add knownValue output to codegen
* Add comments to codegen
* Use enum and const in codegen
* Rework lexicon 'properties' structure
* Treat falsy query params as undefined
Co-authored-by: devin ivy <devinivy@gmail.com>
* Remove now-redundant param presence validation
Co-authored-by: devin ivy <devinivy@gmail.com>