diff --git a/envs/ozone b/envs/ozone index 514fea6..72e89eb 100644 --- a/envs/ozone +++ b/envs/ozone @@ -25,3 +25,5 @@ OZONE_VERIFIER_DID OZONE_VERIFIER_PASSWORD OZONE_VERIFIER_ISSUERS_TO_INDEX OZONE_VERIFIER_JETSTREAM_URL + +OZONE_APPVIEW_PUSH_EVENTS=true diff --git a/install.zsh b/install.zsh index a71a699..758b81d 100755 --- a/install.zsh +++ b/install.zsh @@ -216,7 +216,7 @@ function at-repos-social-app-disable-external-services-patch() { function at-repos-atproto-service-ozone-api-patch() { f=$d/repos/atproto/services/ozone/api.js d_=$d/repos/atproto - p_=$d/patching/130-atproto-ozone-enable-daemon.patch + p_=$d/patching/130-atproto-ozone-enable-daemon-v2.patch echo "applying patch: under ${f} for ${p_}" pushd ${d_} patch -p1 < ${p_} @@ -241,6 +241,12 @@ function at-repos-ozone-patch() { pushd ${d_} patch -p1 < ${p_} popd + + p_=$d/patching/121-ozone-constants-fix.patch + echo "applying patch: under ${d_} for ${p_}" + pushd ${d_} + patch -p1 < ${p_} || true + popd #cp -rf $d/repos/atproto/service/ozone/* $d/ozone/service/ } diff --git a/lex/ai.syui.system.json b/lex/ai.syui.system.json deleted file mode 100644 index 79a430e..0000000 --- a/lex/ai.syui.system.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "lexicon": 1, - "id": "ai.syui.system", - "revision": 1, - "description": "Syui's system definitions for game logic and metaphysics", - "defs": { - "main": { - "type": "record", - "record": { - "key": "self", - "recordType": "document", - "schema": { - "type": "object", - "required": ["card", "system"], - "properties": { - "card": { - "type": "array", - "items": { "$ref": "#card" } - }, - "system": { - "type": "array", - "items": { "$ref": "#system" } - }, - "weapon": { - "type": "array", - "items": { "$ref": "#weapon" } - }, - "ability": { - "type": "array", - "items": { "$ref": "#ability" } - }, - "character": { - "type": "array", - "items": { "$ref": "#character" } - } - } - } - } - }, - "card": { - "type": "object", - "required": ["id", "img", "name", "lang"], - "properties": { - "id": { "type": "integer" }, - "img": { "type": "string" }, - "name": { "type": "string" }, - "lang": { - "type": "object", - "properties": { - "ja": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "text": { "type": "string" } - } - } - } - } - } - }, - "system": { - "type": "object", - "required": ["id", "enum", "name", "lang"], - "properties": { - "id": { "type": "integer" }, - "enum": { - "type": "array", - "items": { "type": "string" } - }, - "name": { "type": "string" }, - "alias": { - "type": "array", - "items": { "type": "string" } - }, - "lang": { - "type": "object", - "properties": { - "ja": { "type": "string" } - } - }, - "description": { "type": "string" } - } - }, - "weapon": { - "type": "object", - "required": ["id", "img", "name", "lang"], - "properties": { - "id": { "type": "integer" }, - "img": { "type": "string" }, - "name": { "type": "string" }, - "lang": { - "type": "object", - "properties": { - "ja": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "text": { "type": "string" } - } - } - } - } - } - }, - "ability": { - "type": "object", - "required": ["id", "name", "color"], - "properties": { - "id": { "type": "integer" }, - "name": { "type": "string" }, - "lang": { - "type": "object", - "properties": { - "ja": { "type": "string" } - } - }, - "color": { "type": "string" }, - "group": { - "type": "array", - "items": { "type": "string" } - }, - "duration": { "type": "integer" }, - "multiplier": { - "type": "object", - "additionalProperties": { "type": "number" } - } - } - }, - "character": { - "type": "object", - "required": ["id", "name", "lang"], - "properties": { - "id": { "type": "integer" }, - "img": { "type": "string" }, - "name": { "type": "string" }, - "lang": { - "type": "object", - "properties": { - "ja": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "text": { "type": "string" }, - "description": { "type": "string" } - } - } - } - }, - "text": { "type": "string" } - } - } - } -} diff --git a/lexicons/ai/syui/card.json b/lexicons/ai/syui/card.json deleted file mode 100644 index b809cca..0000000 --- a/lexicons/ai/syui/card.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "lexicon": 1, - "id": "ai.syui.card", - "defs": { - "main": { - "type": "record", - "description": "Record containing a cards box.", - "key": "tid", - "record": { - "type": "object", - "required": ["verify", "createdAt"], - "properties": { - "id":{ - "type": "integer", - "minimum": 0, - "maximum": 14, - "default": 0 - }, - "cp":{ - "type": "integer", - "minimum": 1, - "maximum": 5000, - "default": 1 - }, - "rank":{ - "type": "integer", - "minimum": 0, - "maximum": 7, - "default": 0 - }, - "rare": { - "type": "string", - "enum": ["normal", "super", "ultra", "yui", "ai"], - "default": "normal" - }, - "author": { - "type": "string", - "format": "uri", - "description": "https://verify...", - "default": "https://yui.syui.ai" - }, - "verify": { - "type": "string", - "format": "at-uri", - "description": "at://verify..." - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp when this post was originally created." - } - } - } - } - } -} diff --git a/lexicons/ai/syui/card/verify.json b/lexicons/ai/syui/card/verify.json deleted file mode 100644 index 8d256e7..0000000 --- a/lexicons/ai/syui/card/verify.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "lexicon": 1, - "id": "ai.syui.card.verify", - "defs": { - "main": { - "type": "record", - "description": "Record containing a card verify.", - "key": "tid", - "record": { - "type": "object", - "required": [ - "handle", - "did", - "createdAt" - ], - "properties": { - "id": { - "type": "integer", - "minimum": 0, - "maximum": 14, - "default": 0 - }, - "cp": { - "type": "integer", - "minimum": 1, - "maximum": 10000, - "default": 1 - }, - "rank": { - "type": "integer", - "minimum": 0, - "maximum": 7, - "default": 0 - }, - "rare": { - "type": "string", - "enum": [ - "normal", - "super", - "ultra", - "yui", - "ai" - ], - "default": "normal" - }, - "handle": { - "type": "string", - "maxLength": 32, - "maxGraphemes": 32 - }, - "did": { - "type": "string" - }, - "embed": { - "type": "union", - "refs": [ - "app.bsky.embed.images", - "app.bsky.embed.external", - "app.bsky.embed.record", - "app.bsky.embed.recordWithMedia" - ] - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp when this post was originally created." - } - } - } - } - } -} diff --git a/lexicons/ai/syui/game.json b/lexicons/ai/syui/game.json deleted file mode 100644 index cfdeb13..0000000 --- a/lexicons/ai/syui/game.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "lexicon": 1, - "id": "ai.syui.game", - "defs": { - "main": { - "type": "record", - "description": "Record containing a game.", - "key": "literal:self", - "record": { - "type": "object", - "required": ["account", "createdAt"], - "properties": { - "account": { - "type": "string", - "format": "at-uri", - "description": "at://verify..." - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp when this post was originally created." - } - } - } - } - } -} diff --git a/lexicons/ai/syui/game/character.json b/lexicons/ai/syui/game/character.json deleted file mode 100644 index 8949966..0000000 --- a/lexicons/ai/syui/game/character.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "lexicon": 1, - "id": "ai.syui.game.character", - "defs": { - "main": { - "type": "record", - "key": "string", - "description": "record containing a game character.", - "input": { - "encoding": "application/json", - "record": { - "type": "object", - "required": [ - "createdAt" - ], - "charactor": { - "type": "object", - "enum": [ - "ai", - "manny", - "quinn", - "chinese", - "phoenix", - "kirin", - "leviathan", - "wyvern", - "cerberus", - "dragon", - "kitsune", - "pegasus" - ], - "properties": { - "type": "object", - "properties": { - "season": { - "type": "integer", - "minimum": 0, - "maximum": 3, - "default": 1 - }, - "group": { - "type": "string", - "default": "fantasy", - "enum": [ - "origin", - "fantasy", - "animal" - ] - }, - "gender": { - "type": "string", - "enum": [ - "none", - "male", - "famale" - ] - }, - "fullname": { - "type": "string" - }, - "nickname": { - "type": "string" - } - } - } - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp when this post was originally created." - }, - "updatedAt": { - "type": "string", - "format": "datetime" - } - } - } - } - } -} diff --git a/lexicons/ai/syui/game/user.json b/lexicons/ai/syui/game/user.json deleted file mode 100644 index 9d3724f..0000000 --- a/lexicons/ai/syui/game/user.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "lexicon": 1, - "id": "ai.syui.game.user", - "defs": { - "main": { - "type": "record", - "key": "tid", - "description": "Record containing a game user.", - "input": { - "encoding": "application/json", - "record": { - "type": "object", - "required": ["did", "createdAt"], - "properties": { - "aiten":{ - "type": "integer", - "default": 0 - }, - "did": { - "type": "string" - }, - "login": { - "type": "bool" - }, - "limit": { - "type": "bool" - }, - "charactor": { - "type": "object", - "enum": ["ai","cerberus","chinesedragon","dragon","kirin","kitsune","leviathan","pegasus","phoenix"], - "properties": { - "type": "object", - "properties": { - "group":{ - "type": "string" - }, - "season":{ - "type": "integer" - }, - "lv":{ - "type": "integer", - "minimum": 1, - "maximum": 7, - "default": 1 - }, - "exp":{ - "type": "integer" - }, - "rank":{ - "type": "integer", - "minimum": 0, - "maximum": 7, - "default": 0 - }, - "mode":{ - "type": "integer", - "minimum": 0, - "maximum": 7, - "default": 0 - }, - "hp":{ - "type": "integer", - "maximum": 255, - "default": 0 - }, - "attach":{ - "type": "integer", - "minimum": 1, - "maximum": 255, - "default": 1 - }, - "critical":{ - "type": "integer", - "minimum": 0, - "maximum": 255, - "default": 0 - }, - "critical_d":{ - "type": "integer", - "minimum": 0, - "maximum": 255, - "default": 0 - } - } - } - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp when this post was originally created." - }, - "updatedAt": { - "type": "string", - "format": "datetime" - } - } - } - } - } - } -} diff --git a/lexicons/ai/syui/o/comment.json b/lexicons/ai/syui/o/comment.json deleted file mode 100644 index c52ec9d..0000000 --- a/lexicons/ai/syui/o/comment.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "lexicon": 1, - "id": "ai.syui.o.comment", - "defs": { - "main": { - "type": "record", - "description": "Record containing a Frontpage comment.", - "key": "tid", - "record": { - "type": "object", - "required": ["content", "createdAt", "post"], - "properties": { - "content": { - "type": "string", - "maxLength": 100000, - "maxGraphemes": 10000, - "description": "The content of the comment." - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp when this comment was originally created." - }, - "parent": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, - "post": { "type": "ref", "ref": "com.atproto.repo.strongRef" } - } - } - } - } -} diff --git a/lexicons/ai/syui/o/post.json b/lexicons/ai/syui/o/post.json deleted file mode 100644 index b18659c..0000000 --- a/lexicons/ai/syui/o/post.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "lexicon": 1, - "id": "ai.syui.o.post", - "defs": { - "main": { - "type": "record", - "description": "Record containing a Frontpage post.", - "key": "tid", - "record": { - "type": "object", - "required": ["title", "url", "createdAt"], - "properties": { - "title": { - "type": "string", - "maxLength": 3000, - "maxGraphemes": 300, - "description": "The title of the post." - }, - "url": { - "type": "string", - "format": "uri", - "description": "The URL of the post." - }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp when this post was originally created." - } - } - } - } - } -} diff --git a/lexicons/ai/syui/o/vote.json b/lexicons/ai/syui/o/vote.json deleted file mode 100644 index 0870658..0000000 --- a/lexicons/ai/syui/o/vote.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "lexicon": 1, - "id": "ai.syui.o.vote", - "defs": { - "main": { - "type": "record", - "description": "Record containing a Frontpage vote.", - "key": "tid", - "record": { - "type": "object", - "required": ["subject", "createdAt"], - "properties": { - "subject": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, - "createdAt": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp when this vote was originally created." - } - } - } - } - } -} diff --git a/lexicons/com/atproto/repo/applyWrites.json b/lexicons/com/atproto/repo/applyWrites.json deleted file mode 100644 index 26dd96c..0000000 --- a/lexicons/com/atproto/repo/applyWrites.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.applyWrites", - "defs": { - "main": { - "type": "procedure", - "description": "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["repo", "writes"], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo (aka, current account)." - }, - "validate": { - "type": "boolean", - "description": "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons." - }, - "writes": { - "type": "array", - "items": { - "type": "union", - "refs": ["#create", "#update", "#delete"], - "closed": true - } - }, - "swapCommit": { - "type": "string", - "description": "If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.", - "format": "cid" - } - } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [], - "properties": { - "commit": { - "type": "ref", - "ref": "com.atproto.repo.defs#commitMeta" - }, - "results": { - "type": "array", - "items": { - "type": "union", - "refs": ["#createResult", "#updateResult", "#deleteResult"], - "closed": true - } - } - } - } - }, - "errors": [ - { - "name": "InvalidSwap", - "description": "Indicates that the 'swapCommit' parameter did not match current commit." - } - ] - }, - "create": { - "type": "object", - "description": "Operation which creates a new record.", - "required": ["collection", "value"], - "properties": { - "collection": { "type": "string", "format": "nsid" }, - "rkey": { "type": "string", "maxLength": 15 }, - "value": { "type": "unknown" } - } - }, - "update": { - "type": "object", - "description": "Operation which updates an existing record.", - "required": ["collection", "rkey", "value"], - "properties": { - "collection": { "type": "string", "format": "nsid" }, - "rkey": { "type": "string" }, - "value": { "type": "unknown" } - } - }, - "delete": { - "type": "object", - "description": "Operation which deletes an existing record.", - "required": ["collection", "rkey"], - "properties": { - "collection": { "type": "string", "format": "nsid" }, - "rkey": { "type": "string" } - } - }, - "createResult": { - "type": "object", - "required": ["uri", "cid"], - "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, - "validationStatus": { - "type": "string", - "knownValues": ["valid", "unknown"] - } - } - }, - "updateResult": { - "type": "object", - "required": ["uri", "cid"], - "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, - "validationStatus": { - "type": "string", - "knownValues": ["valid", "unknown"] - } - } - }, - "deleteResult": { - "type": "object", - "required": [], - "properties": {} - } - } -} diff --git a/lexicons/com/atproto/repo/createRecord.json b/lexicons/com/atproto/repo/createRecord.json deleted file mode 100644 index 7290085..0000000 --- a/lexicons/com/atproto/repo/createRecord.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.createRecord", - "defs": { - "main": { - "type": "procedure", - "description": "Create a single new repository record. Requires auth, implemented by PDS.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["repo", "collection", "record"], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo (aka, current account)." - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection." - }, - "rkey": { - "type": "string", - "description": "The Record Key.", - "maxLength": 15 - }, - "validate": { - "type": "boolean", - "description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons." - }, - "record": { - "type": "unknown", - "description": "The record itself. Must contain a $type field." - }, - "swapCommit": { - "type": "string", - "format": "cid", - "description": "Compare and swap with the previous commit by CID." - } - } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["uri", "cid"], - "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, - "commit": { - "type": "ref", - "ref": "com.atproto.repo.defs#commitMeta" - }, - "validationStatus": { - "type": "string", - "knownValues": ["valid", "unknown"] - } - } - } - }, - "errors": [ - { - "name": "InvalidSwap", - "description": "Indicates that 'swapCommit' didn't match current repo commit." - } - ] - } - } -} diff --git a/lexicons/com/atproto/repo/defs.json b/lexicons/com/atproto/repo/defs.json deleted file mode 100644 index 0f5128f..0000000 --- a/lexicons/com/atproto/repo/defs.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.defs", - "defs": { - "commitMeta": { - "type": "object", - "required": ["cid", "rev"], - "properties": { - "cid": { "type": "string", "format": "cid" }, - "rev": { "type": "string" } - } - } - } -} diff --git a/lexicons/com/atproto/repo/deleteRecord.json b/lexicons/com/atproto/repo/deleteRecord.json deleted file mode 100644 index fb9b90b..0000000 --- a/lexicons/com/atproto/repo/deleteRecord.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.deleteRecord", - "defs": { - "main": { - "type": "procedure", - "description": "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["repo", "collection", "rkey"], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo (aka, current account)." - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection." - }, - "rkey": { - "type": "string", - "description": "The Record Key." - }, - "swapRecord": { - "type": "string", - "format": "cid", - "description": "Compare and swap with the previous record by CID." - }, - "swapCommit": { - "type": "string", - "format": "cid", - "description": "Compare and swap with the previous commit by CID." - } - } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "properties": { - "commit": { - "type": "ref", - "ref": "com.atproto.repo.defs#commitMeta" - } - } - } - }, - "errors": [{ "name": "InvalidSwap" }] - } - } -} diff --git a/lexicons/com/atproto/repo/describeRepo.json b/lexicons/com/atproto/repo/describeRepo.json deleted file mode 100644 index b1ce2b6..0000000 --- a/lexicons/com/atproto/repo/describeRepo.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.describeRepo", - "defs": { - "main": { - "type": "query", - "description": "Get information about an account and repository, including the list of collections. Does not require auth.", - "parameters": { - "type": "params", - "required": ["repo"], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo." - } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": [ - "handle", - "did", - "didDoc", - "collections", - "handleIsCorrect" - ], - "properties": { - "handle": { "type": "string", "format": "handle" }, - "did": { "type": "string", "format": "did" }, - "didDoc": { - "type": "unknown", - "description": "The complete DID document for this account." - }, - "collections": { - "type": "array", - "description": "List of all the collections (NSIDs) for which this repo contains at least one record.", - "items": { "type": "string", "format": "nsid" } - }, - "handleIsCorrect": { - "type": "boolean", - "description": "Indicates if handle is currently valid (resolves bi-directionally)" - } - } - } - } - } - } -} diff --git a/lexicons/com/atproto/repo/getRecord.json b/lexicons/com/atproto/repo/getRecord.json deleted file mode 100644 index 261c1cd..0000000 --- a/lexicons/com/atproto/repo/getRecord.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.getRecord", - "defs": { - "main": { - "type": "query", - "description": "Get a single record from a repository. Does not require auth.", - "parameters": { - "type": "params", - "required": ["repo", "collection", "rkey"], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo." - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection." - }, - "rkey": { "type": "string", "description": "The Record Key." }, - "cid": { - "type": "string", - "format": "cid", - "description": "The CID of the version of the record. If not specified, then return the most recent version." - } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["uri", "value"], - "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, - "value": { "type": "unknown" } - } - } - }, - "errors": [{ "name": "RecordNotFound" }] - } - } -} diff --git a/lexicons/com/atproto/repo/importRepo.json b/lexicons/com/atproto/repo/importRepo.json deleted file mode 100644 index fc850b1..0000000 --- a/lexicons/com/atproto/repo/importRepo.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.importRepo", - "defs": { - "main": { - "type": "procedure", - "description": "Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.", - "input": { - "encoding": "application/vnd.ipld.car" - } - } - } -} diff --git a/lexicons/com/atproto/repo/listMissingBlobs.json b/lexicons/com/atproto/repo/listMissingBlobs.json deleted file mode 100644 index c39913d..0000000 --- a/lexicons/com/atproto/repo/listMissingBlobs.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.listMissingBlobs", - "defs": { - "main": { - "type": "query", - "description": "Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.", - "parameters": { - "type": "params", - "properties": { - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 1000, - "default": 500 - }, - "cursor": { "type": "string" } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["blobs"], - "properties": { - "cursor": { "type": "string" }, - "blobs": { - "type": "array", - "items": { "type": "ref", "ref": "#recordBlob" } - } - } - } - } - }, - "recordBlob": { - "type": "object", - "required": ["cid", "recordUri"], - "properties": { - "cid": { "type": "string", "format": "cid" }, - "recordUri": { "type": "string", "format": "at-uri" } - } - } - } -} diff --git a/lexicons/com/atproto/repo/listRecords.json b/lexicons/com/atproto/repo/listRecords.json deleted file mode 100644 index bc91c95..0000000 --- a/lexicons/com/atproto/repo/listRecords.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.listRecords", - "defs": { - "main": { - "type": "query", - "description": "List a range of records in a repository, matching a specific collection. Does not require auth.", - "parameters": { - "type": "params", - "required": ["repo", "collection"], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo." - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record type." - }, - "limit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 50, - "description": "The number of records to return." - }, - "cursor": { "type": "string" }, - "rkeyStart": { - "type": "string", - "description": "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)" - }, - "rkeyEnd": { - "type": "string", - "description": "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)" - }, - "reverse": { - "type": "boolean", - "description": "Flag to reverse the order of the returned records." - } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["records"], - "properties": { - "cursor": { "type": "string" }, - "records": { - "type": "array", - "items": { "type": "ref", "ref": "#record" } - } - } - } - } - }, - "record": { - "type": "object", - "required": ["uri", "cid", "value"], - "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, - "value": { "type": "unknown" } - } - } - } -} diff --git a/lexicons/com/atproto/repo/putRecord.json b/lexicons/com/atproto/repo/putRecord.json deleted file mode 100644 index 9a841f6..0000000 --- a/lexicons/com/atproto/repo/putRecord.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.putRecord", - "defs": { - "main": { - "type": "procedure", - "description": "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.", - "input": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["repo", "collection", "rkey", "record"], - "nullable": ["swapRecord"], - "properties": { - "repo": { - "type": "string", - "format": "at-identifier", - "description": "The handle or DID of the repo (aka, current account)." - }, - "collection": { - "type": "string", - "format": "nsid", - "description": "The NSID of the record collection." - }, - "rkey": { - "type": "string", - "description": "The Record Key.", - "maxLength": 15 - }, - "validate": { - "type": "boolean", - "description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons." - }, - "record": { - "type": "unknown", - "description": "The record to write." - }, - "swapRecord": { - "type": "string", - "format": "cid", - "description": "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation" - }, - "swapCommit": { - "type": "string", - "format": "cid", - "description": "Compare and swap with the previous commit by CID." - } - } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["uri", "cid"], - "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, - "commit": { - "type": "ref", - "ref": "com.atproto.repo.defs#commitMeta" - }, - "validationStatus": { - "type": "string", - "knownValues": ["valid", "unknown"] - } - } - } - }, - "errors": [{ "name": "InvalidSwap" }] - } - } -} diff --git a/lexicons/com/atproto/repo/strongRef.json b/lexicons/com/atproto/repo/strongRef.json deleted file mode 100644 index cb79625..0000000 --- a/lexicons/com/atproto/repo/strongRef.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.strongRef", - "description": "A URI with a content-hash fingerprint.", - "defs": { - "main": { - "type": "object", - "required": ["uri", "cid"], - "properties": { - "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" } - } - } - } -} diff --git a/lexicons/com/atproto/repo/uploadBlob.json b/lexicons/com/atproto/repo/uploadBlob.json deleted file mode 100644 index 547a995..0000000 --- a/lexicons/com/atproto/repo/uploadBlob.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "lexicon": 1, - "id": "com.atproto.repo.uploadBlob", - "defs": { - "main": { - "type": "procedure", - "description": "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.", - "input": { - "encoding": "*/*" - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["blob"], - "properties": { - "blob": { "type": "blob" } - } - } - } - } - } -} diff --git a/patching/121-ozone-constants-fix.patch b/patching/121-ozone-constants-fix.patch new file mode 100644 index 0000000..42ba11d --- /dev/null +++ b/patching/121-ozone-constants-fix.patch @@ -0,0 +1,99 @@ +--- a/lib/constants.ts ++++ b/lib/constants.ts +@@ -1,29 +1,32 @@ ++import { env } from 'next-runtime-env'; ++ + export const OAUTH_SCOPE = 'atproto transition:generic transition:chat.bsky' + + export const OZONE_SERVICE_DID = +- process.env.NEXT_PUBLIC_OZONE_SERVICE_DID || undefined ++ env('NEXT_PUBLIC_OZONE_SERVICE_DID') || undefined + + export const OZONE_PUBLIC_URL = +- process.env.NEXT_PUBLIC_OZONE_PUBLIC_URL || undefined ++ env('NEXT_PUBLIC_OZONE_PUBLIC_URL') || undefined + + export const PLC_DIRECTORY_URL = +- process.env.NEXT_PUBLIC_PLC_DIRECTORY_URL || ++ env('NEXT_PUBLIC_PLC_DIRECTORY_URL') || + (process.env.NODE_ENV === 'development' + ? 'http://localhost:2582' + : 'https://plc.directory') + +-export const QUEUE_CONFIG = process.env.NEXT_PUBLIC_QUEUE_CONFIG || '{}' ++export const QUEUE_CONFIG = env('NEXT_PUBLIC_QUEUE_CONFIG') || '{}' + +-export const QUEUE_SEED = process.env.NEXT_PUBLIC_QUEUE_SEED || '' ++export const QUEUE_SEED = env('NEXT_PUBLIC_QUEUE_SEED') || '' + ++export const SOCIAL_APP_DOMAIN = env('NEXT_PUBLIC_SOCIAL_APP_DOMAIN') || 'bsky.app' + export const SOCIAL_APP_URL = +- process.env.NEXT_PUBLIC_SOCIAL_APP_URL || ++ env('NEXT_PUBLIC_SOCIAL_APP_URL') || + (process.env.NODE_ENV === 'development' + ? 'http://localhost:2584' +- : 'https://bsky.app') ++ : `https://${SOCIAL_APP_DOMAIN}`) + + export const HANDLE_RESOLVER_URL = +- process.env.NEXT_PUBLIC_HANDLE_RESOLVER_URL || ++ env('NEXT_PUBLIC_HANDLE_RESOLVER_URL') || + (process.env.NODE_ENV === 'development' + ? 'http://localhost:2584' + : 'https://api.bsky.app') +@@ -36,25 +39,25 @@ + + export const NEW_ACCOUNT_MARKER_THRESHOLD_IN_DAYS = process.env + .NEXT_PUBLIC_NEW_ACCOUNT_MARKER_THRESHOLD_IN_DAYS +- ? parseInt(process.env.NEXT_PUBLIC_NEW_ACCOUNT_MARKER_THRESHOLD_IN_DAYS) ++ ? parseInt(env('NEXT_PUBLIC_NEW_ACCOUNT_MARKER_THRESHOLD_IN_DAYS')) + : 7 + + export const YOUNG_ACCOUNT_MARKER_THRESHOLD_IN_DAYS = process.env + .NEXT_PUBLIC_YOUNG_ACCOUNT_MARKER_THRESHOLD_IN_DAYS +- ? parseInt(process.env.NEXT_PUBLIC_YOUNG_ACCOUNT_MARKER_THRESHOLD_IN_DAYS) ++ ? parseInt(env('NEXT_PUBLIC_YOUNG_ACCOUNT_MARKER_THRESHOLD_IN_DAYS')) + : 30 + + export const DOMAINS_ALLOWING_EMAIL_COMMUNICATION = ( +- process.env.NEXT_PUBLIC_DOMAINS_ALLOWING_EMAIL_COMMUNICATION || '' ++ env('NEXT_PUBLIC_DOMAINS_ALLOWING_EMAIL_COMMUNICATION') || '' + ).split(',') + + export const HIGH_PROFILE_FOLLOWER_THRESHOLD = process.env + .NEXT_PUBLIC_HIGH_PROFILE_FOLLOWER_THRESHOLD +- ? parseInt(process.env.NEXT_PUBLIC_HIGH_PROFILE_FOLLOWER_THRESHOLD) ++ ? parseInt(env('NEXT_PUBLIC_HIGH_PROFILE_FOLLOWER_THRESHOLD')) + : Infinity + + export const FALLBACK_VIDEO_URL = ( +- process.env.NEXT_PUBLIC_FALLBACK_VIDEO_URL || '' ++ env('NEXT_PUBLIC_FALLBACK_VIDEO_URL') || '' + ).split(':') + + // strike to account suspension duration mapping (in hours) +@@ -87,18 +90,18 @@ + + export const STRIKE_TO_SUSPENSION_DURATION_IN_HOURS = + parseStrikeSuspensionConfig( +- process.env.NEXT_PUBLIC_STRIKE_SUSPENSION_CONFIG || '', ++ env('NEXT_PUBLIC_STRIKE_SUSPENSION_CONFIG') || '', + ) + + export const AUTOMATED_ACTION_EMAIL_IDS = { + warningWithTakedown: +- process.env.NEXT_PUBLIC_WARNING_WITH_TAKEDOWN_EMAIL_TEMPLATE_ID, ++ env('NEXT_PUBLIC_WARNING_WITH_TAKEDOWN_EMAIL_TEMPLATE_ID'), + suspensionWithTakedown: +- process.env.NEXT_PUBLIC_SUSPENSION_WITH_TAKEDOWN_EMAIL_TEMPLATE_ID, ++ env('NEXT_PUBLIC_SUSPENSION_WITH_TAKEDOWN_EMAIL_TEMPLATE_ID'), + suspensionWithoutTakedown: +- process.env.NEXT_PUBLIC_SUSPENSION_WITHOUT_TAKEDOWN_EMAIL_TEMPLATE_ID, ++ env('NEXT_PUBLIC_SUSPENSION_WITHOUT_TAKEDOWN_EMAIL_TEMPLATE_ID'), + permanentTakedown: +- process.env.NEXT_PUBLIC_PERMANENT_TAKEDOWN_EMAIL_TEMPLATE_ID, ++ env('NEXT_PUBLIC_PERMANENT_TAKEDOWN_EMAIL_TEMPLATE_ID'), + takedownWithoutStrike: +- process.env.NEXT_PUBLIC_TAKEDOWN_WITHOUT_STRIKE_EMAIL_TEMPLATE_ID, ++ env('NEXT_PUBLIC_TAKEDOWN_WITHOUT_STRIKE_EMAIL_TEMPLATE_ID'), + } diff --git a/patching/130-atproto-ozone-enable-daemon-v2.patch b/patching/130-atproto-ozone-enable-daemon-v2.patch new file mode 100644 index 0000000..792c655 --- /dev/null +++ b/patching/130-atproto-ozone-enable-daemon-v2.patch @@ -0,0 +1,28 @@ +--- a/services/ozone/api.js ++++ b/services/ozone/api.js +@@ -23,6 +23,7 @@ + Database, + OzoneService, + envToCfg, ++ OzoneDaemon, + envToSecrets, + httpLogger, + readEnv, +@@ -79,10 +80,17 @@ + + httpLogger.info('ozone is running') + ++ // Start OzoneDaemon for label events ++ httpLogger.info('starting ozone daemon') ++ const daemon = await OzoneDaemon.create(cfg, secrets) ++ await daemon.start() ++ httpLogger.info('ozone daemon is running') ++ + // Graceful shutdown (see also https://aws.amazon.com/blogs/containers/graceful-shutdowns-with-ecs/) + process.on('SIGTERM', async () => { + httpLogger.info('ozone is stopping') + ++ await daemon.destroy() + await ozone.destroy() + + httpLogger.info('ozone is stopped')