Commit Graph

2335 Commits

Author SHA1 Message Date
Matthieu Sieben 6b28b116f8 Revert "Improve validation of DID Documents"
This reverts commit 86ff431100.
2025-12-02 12:55:03 +01:00
Matthieu Sieben 468980f228 Increase strictness of DID Document validation 2025-12-02 12:53:09 +01:00
Matthieu Sieben 86ff431100 Improve validation of DID Documents 2025-12-02 12:50:35 +01:00
Matthieu Sieben a487ab8afe Add tests (#4401)
* Add tests

* Fixes

* drop `lexiconType` property

* Simplify `ParamsSchema` interface

* tidy

* More tests
2025-12-01 17:12:47 +01:00
Matthieu Sieben 03a2a4bb38 Add lex-document test cases (#4400) 2025-12-01 14:08:23 +01:00
Matthieu Sieben 8012627a12 Migrate OAuth libs to new @atproto/lex utils (#4383)
* Migrate Oauth libs to new @atproto/lex utils

* pnpm-lock

* tidy

* fix

* tidy

* tidy

* tidy

* tidy

* Implement lex resolution logging through hooks
2025-12-01 12:24:01 +01:00
Matthieu Sieben a17d2e8a59 Add ignoreInvalidLexicons when building lexicon schemas (#4398)
* Add `ignoreInvalidLexicons` when building lexicon schemas

* tidy
2025-12-01 08:41:54 +01:00
Matthieu Sieben 688f9d6759 Add changelog to npm packages and @atproto/lex readme (#4397)
* Add changelog to npm packages and `@atproto/lex` readme

* changeset
2025-11-30 20:02:12 +01:00
Matthieu Sieben bcae2b77b6 Increase string format typing strictness (#4389)
* Increase string format typing strictness

* fix tests

* tidy

* Use string formats from `@atproto/syntax`

* tidy

* `key` field in `record` definitions is non optional and now properly validated

* add missing /*@__NO_SIDE_EFFECTS__*/
2025-11-30 19:46:07 +01:00
Matthieu Sieben 1d445af2a7 lex SDK improvements (#4390)
* Add `l.nullable` schema builder

* Use unique symbol to describe Validator type metadata

* fixup! Add `l.nullable` schema builder

* Rework object validation logic to work without `options` argument

* Do not use symbol for type inference

* Use `Issue` classes to represent validation issues

* Properly apply default value with `const` and `enum` schemas

* style

* Require `l.discriminatedUnion` discriminator field to be a literal or enum schema

* Add `l.refined` schema

* Add more lexicons document validation tests

* wip

* use "assert" fn

* rework refine system

* use assert instead of check fn

* tidy

* Rename schema methods `validate`, `check` and `maybe` to `safeParse`, `matches` and `ifMatches` respectively.

* docs

* changeset
2025-11-30 14:35:15 +01:00
Matthieu Sieben 9f87ff3aa6 Type dict keys as optional (#4387)
* Type `dict` keys as optional

* tidy
2025-11-25 21:48:26 +01:00
Matthieu Sieben 0adc852c31 Use arrays for "account" permission action attributes (#4353)
* Use arrays for "account" permission `action` attributes

* Allow lexicon permission data to be readonly

* changeset

* tidy

* tidy

* tidy
2025-11-25 21:48:10 +01:00
Matthieu Sieben d396de016d Validate repo signature when fetching lexicon document with @atproto/lex-resolver (#4384)
* Expose `matchesIdentifier` and `extractAtprotoData` utilities.

* Update `formatDidKey` return type to `did🔑${string}`

* fixup! Expose `matchesIdentifier` and `extractAtprotoData` utilities.

* Validate repo signature when fetching lexicon document

* Use new lex-resolver proof as CID

* tidy

* tidy

* fic build

* fic build

* tidy

* tidy
2025-11-25 20:49:51 +01:00
Matthieu Sieben 0f2fc6592f Properly order lexicons in --ci mode (#4385)
* Properly order lexicons in `--ci` mode

* tidy

* tidy

* tidy
2025-11-25 20:21:26 +01:00
Matthieu Sieben be8e6c1f25 Permission-sets pre-release changes (#4382)
* Remove ability to define `blob` permission in permission sets

* Disallow `rpc` permissions with specific `aud` in permission-sets

* Add `toScopes()` utility on `IncludeScope`

* tidy
2025-11-25 19:51:02 +01:00
github-actions[bot] 86f6860418 Version packages (#4381)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-25 11:37:09 +01:00
Matthieu Sieben 23c271fcac @atproto/lex improvements (#4380)
* Deterministically order lexicon manifest items (Fixes #4378)

* Use `literal` value as default

* Code style

* Remove `--build`/`--no-build` argument from the `install` command

Fixes #4377

* Add ability to configure file extenstion and import file extension in `lex build`

Fixes #4376

* Fix description of `--allowLegacyBlobs` argument
2025-11-25 11:28:34 +01:00
github-actions[bot] d4d23e1950 Version packages (#4375)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-25 01:16:27 +01:00
Matthieu Sieben 5ffd612990 Msi/lex fixes (#4374)
* Properly await cleanup of iterator when encountering multiple lexicon documents with the same id.

* Add missing files from package.json
2025-11-25 01:07:19 +01:00
github-actions[bot] 151a7b0c6d Version packages (#4373)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-24 23:52:41 +01:00
Matthieu Sieben 7456f53e45 Fix @atproto/lex install (#4372) 2025-11-24 23:45:56 +01:00
github-actions[bot] 72d4bfcfc5 Version packages (#4370)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-24 23:27:19 +01:00
bnewbold 69f53d632d lexicons: update string knownValue token refs to be fully-qualified (#4347)
* lexicons: update string knownValue token refs to be fully-qualified

* run codegen

* add changeset
2025-11-24 14:10:48 -08:00
github-actions[bot] 4dede90ea5 Version packages (#4369)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-24 22:26:10 +01:00
Matthieu Sieben 3182731f11 Fix docker build (#4367) 2025-11-24 22:07:16 +01:00
Matthieu Sieben 261968fd65 New TS SDK (#4366)
* lex

* packaging

* moke packaging

* revert test changes

* do not build temp

* tidy

* automatically build the list of `@atproto/lex/com` lexicons

* fix build

* Remove "com" export

* ridy

* remove manifest option

* tidy

* rename

* tidy

* tidy

* tidy

* tests

* add procedure params

* stricter tests

* tidy

* Improve ui8 parsing

* tidy

* tidy

* code split

* code split

* fix reserved keywords conflict

* exclude packages/lex/src/tests/lexicons from lint

* reserved keywords

* safe identifier

* fix build

* move lib.js to src/lib.ts

* Move tests dir

* fix ci ?

* increast lint size

* Remove `Record` type alias for recordsz

* fix package json exports

* Add support for unsafe characters in defs and nsids

* tidy

* token tests

* tidy

* name consistency

* remove unused `unknownKeys` params option

* Fix "moving" keys in `DictSchema` (remove `IntersectionSchema`)

* REview comments

* adapt shebang in `env`

* Make sure union object have their $type property set in typings

* fix

* Improve typing of `UnknownTypedObject`

* lex improvements

* code reorg

* split lex-builder

* tidy

* improve packaging

* rename lex-validation to lex-schema

* lex client

* rename prettifier option

* add lex-client as dependency to "lex"

* Export client as part of main export

* re-write example app using @atproto/lex

* add missing lex-client to tsconfig

* tidy

* add "null" schema type

* Smaller bundle code footprint

* tidy

* correctness

* tidy

* code split and improved testing

* tidy

* refactor common utils

* test all implementations

* improve tests

* tidy

* fix build

* fixes

* tidy

* lint

* tests

* tidy

* fix oauth-example app

* tidy

* tidy

* tests

* tidy

* Return an actual `Uint8Array` from `fromBase64Node`

* tidy

* adapt xrpc-server

* Rename `Lex` to `LexValue`

* minor fixes

* fix tests

* fix tests

* tidy

* fix

* tidy

* tidy

* fix `verifyCidForBytes` implementation

* fix imports

* tidy

* split lex-json in own package

* make base64 tests faster

* Add interop tests

* lint error

* tidy

* tidy

* changeset

* implement lex-resolver and lex-install

* remove need for polyfill

* readme

* more details

* tidy

* allow specifying `service` header on a per request basis

* tidy

* tidy

* tidy

* tidy

* add custom/intersection validation schemas

* tidy

* tidy

* remive un-necessary util

* improve typing of `l.object` output

* make "name" required in lexicon method errors

* fix tests

* tidy

* tidy

* add error responses

* update readme

* add "like " to example

* readme improvements

* tidy

* error management improvements

* Improve error results

* tidy

* refactor

* tidy

* lock

* Update binary to `ts-lex`

* tidy

* tidy

* Add "Overview" section

* fix build

* update bin

* readme-improvements

* paul's feedback

* Update packages/lex/lex/README.md

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

* Update packages/lex/lex/README.md

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

* Update packages/lex/lex/README.md

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

* Update packages/lex/lex/README.md

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

* Update packages/lex/lex/README.md

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

* Initial plan

* Address README review comments

Co-authored-by: matthieusieben <813661+matthieusieben@users.noreply.github.com>

* Clarify client configuration inheritance behavior

Co-authored-by: matthieusieben <813661+matthieusieben@users.noreply.github.com>

* Document allowLegacyBlobs default and compatibility implications (#15)

* Initial plan

* Add notes about default setting and compatibility for allowLegacyBlobs

Co-authored-by: matthieusieben <813661+matthieusieben@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: matthieusieben <813661+matthieusieben@users.noreply.github.com>

* Rename `Json` to `JsonValue` in lex-json package (#14)

* Initial plan

* Rename Json to JsonValue in lex-json package and dependent packages

Co-authored-by: matthieusieben <813661+matthieusieben@users.noreply.github.com>

* Remove import alias for JsonValue in ipld.ts

Co-authored-by: matthieusieben <813661+matthieusieben@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: matthieusieben <813661+matthieusieben@users.noreply.github.com>

* Update packages/lex/lex/README.md

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

* Update packages/lex/lex/README.md

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

* Update packages/lex/lex/README.md

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

* Update packages/lex/lex/README.md

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

* Update packages/lex/lex/README.md

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

* Update packages/lex/lex/README.md

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

* review comments and fixes

* Add lex to the dockerfiles

* tidy

* changeset for lex packages

* tidy

* Tidy

* tidy

* tidy

* Move language parsing to lex-data

* tidy

* doctoc

* error handling

* tidy

* tidy

* tidy

* fix

---------

Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: matthieusieben <813661+matthieusieben@users.noreply.github.com>
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2025-11-24 21:01:16 +01:00
Eric Bailey 39ab1b06bd [AAv2] Add new lexicons (#4363)
* Add new lexicon defs

* Codegen

* Add missing unions, reorder
2025-11-24 11:14:41 -06:00
Foysal Ahamed 0748d919d1 🐛 Allow querying for reviewNone status in ozone (#4360)
* 🐛 Allow querying for reviewNone status in ozone

* 📝 Add knownValues for reviewState
2025-11-21 00:10:56 +01:00
rafael 1d1d94e80d Adds tests for takendown cases in getPosts (#4359) 2025-11-20 16:21:31 -03:00
rafael 351f024e7a remove docker compose version (#4358) 2025-11-20 12:00:09 -03:00
github-actions[bot] 4021b08a58 Version packages (#4355)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-19 10:39:02 +01:00
Foysal Ahamed 032abf6b50 Update ozone action scheduler to queue emailing (#4340)
*  Update ozone action scheduler to queue emailing

* 🧹 Cleanup

* 📝 Add changeset
2025-11-19 10:26:14 +01:00
Daniel Holmgren 1dd20d3a81 WebSocket Library (#4348)
* create new websocket lib

* switch out ozone impl

* keepalive test

* remove websocket keepalive code from xrpc-server

* add the package in all the spots

* websocket -> ws-client

* missed ref

* fix import in ozone test
2025-11-18 17:34:41 -06:00
Foysal Ahamed 9115325c7b ❇️ Ozone takedown target service (#4344)
*  Add targetServices to takedown action to drive pds vs. appview takedowns

* 📝 Add changeset
2025-11-18 21:26:33 +01:00
github-actions[bot] b7bc95d6ab Version packages (#4336)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-14 09:47:57 -08:00
Misty De Méo 3628cebfbb explicit-slurs: remove stray match for unrelated word (#4330) 2025-11-13 12:00:45 -08:00
Emelia Smith f8e56b387f bsky: improve error messaging for DPoP bound access tokens (#4333) 2025-11-11 17:35:22 +01:00
Matthieu Sieben 82e75bf6c1 Remove non-existing reporter_stats from materliaziled view to refresh (#4335) 2025-11-10 17:38:46 +01:00
Eric Bailey 532b22822f [APP-1484] Add thread/search exploration code and feature gate (#4327)
* Add ranking exploration code and feature gate

* Import sort
2025-11-07 09:06:37 -06:00
hailey 92702322c3 ozone: check labels when asserting protected tags (#4283)
* check labels when asserting protected tags

* fix

* fix'

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2025-11-06 08:24:49 -08:00
github-actions[bot] 6f59d64aa1 Version packages (#4320)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 12:33:24 -06:00
Eric Bailey 39b5c08e07 Clean up getPostThreadV2 in prep for future work (#4269)
* Deprecate prioritizeFollowedUsers, codegen

* Remove from agent response types

* Remove codepaths

* Format

* Changeset

* Remove fields entirely

* Changeset

* Swap changeset
2025-11-05 11:11:32 -06:00
bnewbold 94ddc8219c resolveLexicon endpoint (#4227)
* Add resolveLexicon.json for lexicon resolution

* Update lexicons/com/atproto/lexicon/resolveLexicon.json

* chore: formatting and linting

* chore: Adding changeset information

* documentation: Updating descriptions for properties.

* refactor: Updating com.atproto.lexicon.resolveLexicon lexicon schema from PR discussion and feedback

* Update lexicons/com/atproto/lexicon/resolveLexicon.json

Co-authored-by: Nick Gerakines <12125+ngerakines@users.noreply.github.com>

* tweak changeset

* lexicon codegen

---------

Co-authored-by: Nick Gerakines <12125+ngerakines@users.noreply.github.com>
Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com>
2025-11-02 12:04:06 -05:00
rafael 10021207b6 Search filtering by tag (#4312) 2025-10-31 16:12:23 -03:00
Roscoe Rubin-Rottenberg 756ab5d87f fix wildcard endings in firehose filtercollections (#4038)
* allow filtercollections to have a wildcard ending

* changeset

* fix parameters
2025-10-30 17:56:57 -05:00
Matthieu Sieben 3202dce91b oauth example app rework (#4319)
* oauth example app rework

* changeset
2025-10-30 16:08:57 +01:00
github-actions[bot] fc9f8e3ea0 Version packages (#4318)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-29 17:46:36 -05:00
Eric Bailey 15fe80c39f Add optional via property to follow records (#4317) 2025-10-29 17:16:06 -05:00
github-actions[bot] 632e1ba91f Version packages (#4313)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-29 10:04:09 -05:00
Eric Bailey cdb6b27fc6 [TS-160] Add debug field to PostView and ProfileView*s (#4297)
* Add debug field to lex and proto, codegen

* Include debug field for DIDs configured via env var

* Gen bufs

* Update types and view

* Add debug field to profile views

* Safely populate debug field

* Format

* Use util

* Simplify existence check

* Values may be undefined

* Clarify type

* Update descriptions

* Include default value for dev-env

* Add test harness

(cherry picked from commit 7e49b4cf4cf3cbb989114540081e74f7a34acb6f)

* Use unknown field type instead of serializing

* KISS keep it set stupid

* Fix comments

* Differentiate between source of debug

* Add matching profile view test

* Specifying types of the merged objects isn't really helpful

* Changeset

* Add comment

* Put includeDebugField on HydrateCtx and use in views

* Mutate TestNetwork innards for tests

* Format

* Use separate debug schema for profile test

* Little more terse

* Oops, remove last usage

* Remove vestigial props

* Include other actor metadata

* Simply views, remove debugField
2025-10-28 11:59:50 -05:00