996 Commits

Author SHA1 Message Date
David Buchanan
c62964b7b4
Limit getPostThread recursion into parents ()
* limit getPostThread recursion into parents

* add parentHeight parameter

* Lexicons: specify default/min/max values for depth and parentHeight, for getPostThread

* prettier formatting

* re-run lexicon codegen

* do the rest of lexicon codegen (oops)

* add 'shallow ancestors' fetch test
2023-05-25 19:22:05 -05:00
Daniel Holmgren
0307340c5a
Label after write ()
* label imgs after write completes

* in on commit fn

* dont do in commit hook
2023-05-25 19:14:12 -05:00
Daniel Holmgren
743eaf1cf0
Move handle resolution to .well-known ()
* move handle resolution to .well-known

* required handle on resolveHandle

* rm test

* tidy

* tidy

* fix up appview

* missing await

* atproto-handle -> atproto-did

* shift did & handle resolution to new identity package

* fix up network mocks

* fix up another test

* one more

* drop lex comment

* rm handle param

* Update packages/identity/src/handle/index.ts

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

* still temporarily support xrpc handle resolution

* typo

* ensure return value is a string

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2023-05-25 19:04:10 -05:00
Patryk
5f93577aaf
Fix incorrect union validation ()
* Fix incorrect union validation

Fixes lexicon validation so incorrect types like in  don't validate

* Add lexUri hash segment count check
2023-05-25 19:03:54 -05:00
dholms
85bcd18a7b v0.1.11 2023-05-24 17:43:02 -05:00
dholms
2248218059 v0.3.8 2023-05-24 17:41:48 -05:00
Daniel Holmgren
5df2903061
Feed publishing tweaks ()
* add feed gen did to cfg

* allow puts for generator records

* add a quick test

* quick test for updates

* fix up test
2023-05-24 17:38:01 -05:00
devin ivy
53044ae48e
Get popular feedgens ()
* Lexicon for unspecced popular feed gen method

* Endpoint impl for popular feed gens
2023-05-24 17:37:53 -05:00
devin ivy
f7c502b145
Improve performance of whats-hot custom algo ()
Improve whats-hot algo perf by reorganizing query, excluding some unpopular results more proactively
2023-05-23 23:01:51 -04:00
Ilya Siamionau
a22d56aa21
Fix lexicon. "format" instead of "ref" in type "string" ()
* Fix lexicon

* codegen types
2023-05-23 16:06:03 -04:00
devin ivy
7e22719967
Tweaks to with-friends algo ()
* Iteration on with-friends algo

* Fix with-friends tests
2023-05-23 15:50:45 -04:00
Patryk
d1cb392241
Fix definitions in bsky ()
Lexicon required properties check wasn't rebased onto main
which introduced invalid lexicon(creator field was not defined despite being in the required fields list)
2023-05-23 10:19:43 -04:00
Patryk
36d4e5bb00
Normalize http headers before sending xrpc requests ()
* Normalize http headers before sending xrpc requests

This isn't fully upto HTTP Spec, but it solves .
The `normalizeHeaders` function deduplicates HTTP headers,
but it doesn't take into account the rules from the rfc*

When using `AtpAgent` the `authorization` header supplied
to the xrpc call will take precedence over the internal one

Mentioned Rfc: https://www.rfc-editor.org/rfc/rfc9110#appendix-A

* Fix xrpc call headers double normalization
2023-05-23 01:15:28 -04:00
Patryk
d661a60357
Add lexicon LexXrpcParameters, Object required properties check ()
* Add lexicon LexXrpcParameters, Object required properties check

Now schemas like the one below won't validate
```
...
{

  "type": "object",
  "required": ["foo"],
  "properties": {}
}
...
````

* Fix lexicons with missing required fields

* Improve lexicon user type error messages and document why it needs to be `z.custom`
2023-05-23 01:02:36 -04:00
Daniel Holmgren
8059e07d8a
Custom feeds ()
* actor type in profiles

* skeleton lex

* more schemas

* first pass at feed composition

* cleanup services

* more tidying

* fix up tests

* bookmarking schemas

* make feeds records instead of actors

* some cleanup

* fleshing out feeds as records

* wip

* working into cfg & dev-env

* fix appview test util

* bookmarking + views

* tidy

* add displayName

* db migration

* wip test

* blob processing

* first test working!

* Sync-up snapshots

* wip

* Fix pds ctx type

* Sync lexicons on pds and api

* wip

* fully refactor

* Prep for open union in reply data in bsky appview, sync-up snapshots

* msgs & ports

* Make pds did cache sqlite-friendly

* Start scaffolding more feedgen tests

* revamp appview tests

* revamp pds tests

* merge in dev env utils

* ensure plc close

* add feed gen to dev-env

* second feed gen

* named feeds in mock

* fix issue with dev-env pds appview

* update bsky snaps

* Flesh-out some feed gen tests

* Fix feed gen reply test

* Test feed bookmarking

* update skeleton defs

* merge

* Sync-up pds with updated feed skeleton contract

* Fix feed bookmark viewer state

* add feed embeds

* Test inaccurate feed gen repost

* Tighten some error behaviors around feed gens

* generator view in record embed

* test

* bookmarked/subscribed -> saved

* updated snaps

* name & descript on alices feed

* add like counts

* proposed lex

* tweak

* fetch feed generator details

* add describeFeedGen to dev-env

* adds tests for getFeedGenerator

* Update lexicons/app/bsky/feed/getFeedGenerator.json

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

* update describe

* add cid to feed gen view

* add alice feed gen avatar

* generator displayName required

* update snaps

* Fix dev env public url ()

* Fix the public url used by dev-env

* move publicUrl location

---------

Co-authored-by: dholms <dtholmgren@gmail.com>

* add defs for feed gen prefs & decrease displayName length

* build branch

* updated how saved feeds works

* cleanup lex

* mount route

* Starter bsky algos ()

* implement some starter bsky algos

* add team dids

* tidy

* add quotepost check to whats hot classic

* tests

* carve out feedgen section of pds

* apply limits

* add describeFeedGenerator route

* Whats hot new ()

* map out new whats hot

* only available in postgres

* Fix dev env public url ()

* Fix the public url used by dev-env

* move publicUrl location

---------

Co-authored-by: dholms <dtholmgren@gmail.com>

* add defs for feed gen prefs & decrease displayName length

* build branch

* updated how saved feeds works

* build algos branch

* remove relative imports to @atproto/api

* update hot classic name

* rm build

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>

* v0.3.6

* v0.3.7

* v0.1.10

* update name of skyline

* build branch

* aws build

* getFeedGenerators test

* For now only use new replyRef union for custom feeds, for compat

* Don't use replyRef union on new feeds yet

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2023-05-19 18:31:51 -04:00
devin ivy
0899510e6f
Db migration to prep for custom feeds () 2023-05-19 16:40:47 -04:00
Daniel Holmgren
bfd0670d38
Update README + issue templates ()
* add contribution guidelines to readme

* add issue templates

* edit
2023-05-18 19:39:00 -05:00
bnewbold
d8785649c6
auto-label: less sensitive for some classes () 2023-05-18 16:31:37 -07:00
Daniel Holmgren
cf36b363b4
Rkey len ()
* set a lex limit on rkey length

* enforce in repo package

* rm checks in repo pkg

* lift constraint on update
2023-05-18 17:57:59 -05:00
Devin Ivy
37af595a73 v0.3.4 2023-05-17 17:02:57 -04:00
Elijah
bb4dd6e8a8
Count graphemes without Intl ()
* count graphemes without intl

* fix main file

* run prettier

* use graphemer

* fix packages

* use yarn

* fix main script

* reresolve packages
2023-05-17 14:32:29 -05:00
devin ivy
e57c297a82
Handling deleted content on admin/moderation methods ()
* Update lexicon for missing repo/record data in admin views

* Serve missing repo/record variant in admin views

* Test actioning and presenting unknown records/repos, fix on pds
2023-05-17 15:28:52 -04:00
Patryk
1de53e99ab
Profiling ()
* Add bench/profiling docs

* Fix repo benches

We probably want to create a shared config for benchmarks,
this fix isn't universal across packages

* Add benchs to API

This should help with  and any other future API performance investivations

* Make repo `bench:profile` wait for debugger

* Update packages/README.md

---------

Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com>
2023-05-17 10:43:42 -05:00
bnewbold
2fc058046b
more labeling tweaks ()
* labeling: include 'sex toy' as 'sexually suggestive'

* labeling: label 'hanging' as 'corpse' (for now)

* labeling: include 'underwear' as 'sexual'
2023-05-16 17:32:46 -07:00
Paul Frazee
61c946501b
Add to CONTRIBUTORS () 2023-05-15 21:00:28 -05:00
Daniel Holmgren
6ad16b2fa4
Ensure sequencing is the last query in each tx ()
* ensure that inserting repo_seq is the last thing to happen in every tx

* another
2023-05-15 14:09:27 -05:00
dholms
7dddc861ae Tidy logs 2023-05-15 12:31:09 -05:00
Daniel Holmgren
47d30c1796
Revamp dev env ()
* wip

* wip

* fully refactor

* msgs & ports

* revamp appview tests

* revamp pds tests

* ensure plc close

* ensure pds appview is hooked up when not running appview

* move service setup to dev env

* move admin auth headers to dev-env

* fix service headers

* missing port

* fixing ports

* start services in order

* startup plc immediately

* rm dead code

* fix up build

* rm log
2023-05-15 12:28:36 -05:00
Daniel Holmgren
231729db72
Return email in mod views according to lexicon ()
* return email in mod views according to lexicon

* Update packages/pds/src/services/moderation/views.ts

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

* updated snaps

* tidy

* Fix snapshot

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2023-05-15 11:43:06 -04:00
Miles Zimmerman
bba1ba739e
chore: update docker/setup-buildx-action github action to v2 ()
chore: update docker/setup-buildx-action to v2
2023-05-12 19:39:25 -05:00
James Garbutt
49ee070cd6
test (api, common, common-web): add further tests () 2023-05-12 17:11:50 -05:00
Daniel Holmgren
e4ffcf0034
service <> service auth ()
* wip

* working into cfg & dev-env

* fix appview test util

* bump xrpc server version

* no check did on deciding to mount appview proxy
2023-05-12 16:45:28 -05:00
devin ivy
1cbffd63ef
Reports by active action type ()
* Lexicon updates for getting mod reports by active action type

* Update pds and bsky to support getting mod reports by active action type
2023-05-12 16:45:15 -05:00
Daniel Holmgren
5804716504
Bring your own DID ()
* allow bringing your own did

* tests + tidy

* one more check/test

* fix typo

* better err names
2023-05-12 16:18:49 -05:00
dholms
deabb71da4 v0.3.3 2023-05-11 16:30:50 -05:00
dholms
2753a5a739 v0.1.8 2023-05-11 16:30:36 -05:00
dholms
0e0b310603 v0.3.2 2023-05-11 16:28:48 -05:00
dholms
7f72478e15 v0.1.7 2023-05-11 16:28:48 -05:00
Elijah
aee4d6b381
use blob as fetch fallback () 2023-05-11 16:19:09 -05:00
Paul Frazee
df6ed7d5c0
Add account preferences APIs ()
* Add lexicons for account preferences

* Move prefs to app.bsky, codegen

* Setup model and services for user prefs

* Setup xrpc methods for prefs

* Test preferences, fixes

* Tidy

* Tidy

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-05-11 15:44:00 -05:00
dholms
5fd5c869ea bump pds version 2023-05-11 15:01:01 -05:00
dholms
2d3053481a v0.3.1 2023-05-11 14:47:27 -05:00
Daniel Holmgren
e32dc025e8
Mute lists ()
* possible schemas

* more lexicons

* codegen

* tables

* hook up processor

* getlist route

* add getListBlocks route

* migration

* didnt save something

* add reason + facets

* description facets

* get facets into db

* add to accnt deletion tests before i forget

* tests & bugfixes

* quickfix

* move defs to .graph

* add purpose

* remove unused actor defs

* add creator info to list view

* refactor to graph service

* lexicons

* impl

* writer methods

* bug in accnt service

* handle blobs

* tests

* fix typos

* tidy

* fix snap

* pr feedback

* missed drop index in migration

* remove listitem reason

* allow puts for lists

* make mute lists idempotent

* test mute list updates

* fix up

* fix err test

* update snap
2023-05-11 14:29:08 -05:00
Patryk
a7c2b4ae11
Add block record duplicate detection ()
* Add block record duplicate detection

* Update packages/pds/src/services/record/index.ts

---------

Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com>
2023-05-11 11:00:24 -04:00
devin ivy
5f0db0c844
Update zod version, some perf improvements ()
* Update zod version, some perf improvements

* Fix circular type ref
2023-05-11 10:57:12 -04:00
dholms
3783889c49 bump @atproto/did-resolver 2023-05-10 23:24:33 -05:00
dholms
2f43fb7454 bump api package version 2023-05-10 20:50:56 -05:00
bnewbold
7368020068
pds: place-holder robots.txt, and a text base-level route (/) ()
* pds: place-holder robots.txt and / (as txt)

robots.txt: want to be explicit about allowing crawling (generically)

/: a bit of dev-experience polish. in prod we already redirect this
route, but may be helpful for self-hosting folks and people just
exploring

* pds: move basic routes (health, robots.txt, /) to separate file
2023-05-10 17:08:52 -07:00
Patryk
0e35bc3899
Make BskyAgent instantiation 4 times faster ()
Improve BskyAgent performance

By using z.discriminatedUnion instead of z.union
we can hint to zod at which field it should look when
validating/parsing schemas

This improves BskyAgent instantiation time around 4 times,
when creating 10 agents using stuff from ,
the time went down from ~1200ms to 330ms
2023-05-10 12:22:58 -04:00
Daniel Holmgren
89b783eec9
Update how sequencer invalidation works ()
* invalidatedBy -> invalidated

* fix test

* dont remake fkey constraint sqlite

* sqlite migration

* appeasing sqlite

* sqlite finally happy?

* Fix sqlite migration, run proxy tests thru postgres when configured

* Fix pg schemas in proxy tests

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-05-10 11:01:56 -04:00