-
Notifications
You must be signed in to change notification settings - Fork 3
adding badges #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
adding badges #41
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "lexicon": 1, | ||
| "id": "app.certified.badge.award", | ||
| "defs": { | ||
| "main": { | ||
| "type": "record", | ||
| "description": "Records a badge award to a user, project, or activity claim.", | ||
| "key": "tid", | ||
| "record": { | ||
| "type": "object", | ||
| "required": ["badge", "subject", "createdAt"], | ||
| "properties": { | ||
| "badge": { | ||
| "type": "ref", | ||
| "ref": "app.certified.badge.definition", | ||
| "description": "Reference to the badge definition for this award." | ||
| }, | ||
| "subject": { | ||
| "type": "union", | ||
| "description": "Entity the badge award is for (either an account DID or any specific AT Protocol record), e.g. a user, a project, or a specific activity claim.", | ||
| "refs": ["app.certified.defs#did", "com.atproto.repo.strongRef"] | ||
| }, | ||
| "note": { | ||
| "type": "string", | ||
| "description": "Optional statement explaining the reason for this badge award." | ||
| }, | ||
| "createdAt": { | ||
| "type": "string", | ||
| "format": "datetime", | ||
| "description": "Client-declared timestamp when this record was originally created" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| { | ||
| "lexicon": 1, | ||
| "id": "app.certified.badge.definition", | ||
| "defs": { | ||
| "main": { | ||
| "type": "record", | ||
| "description": "Defines a badge that can be awarded via badge award records to users, projects, or activity claims.", | ||
| "key": "tid", | ||
| "record": { | ||
| "type": "object", | ||
| "required": ["title", "badgeType", "icon", "createdAt"], | ||
| "properties": { | ||
| "badgeType": { | ||
| "type": "string", | ||
| "description": "Category of the badge (e.g. endorsement, participation, affiliation)." | ||
| }, | ||
| "title": { | ||
| "type": "string", | ||
| "description": "Human-readable title of the badge." | ||
| }, | ||
| "icon": { | ||
| "type": "blob", | ||
| "description": "Icon representing the badge, stored as a blob for compact visual display.", | ||
| "accept": [ | ||
| "image/png", | ||
| "image/jpeg", | ||
| "image/webp", | ||
| "image/svg+xml" | ||
| ], | ||
| "maxSize": 1048576 | ||
| }, | ||
| "description": { | ||
| "type": "string", | ||
| "description": "Optional short statement describing what the badge represents." | ||
| }, | ||
| "allowedIssuers": { | ||
| "type": "array", | ||
| "description": "Optional allowlist of DIDs allowed to issue this badge. If omitted, anyone may issue it.", | ||
| "items": { | ||
| "type": "ref", | ||
| "ref": "app.certified.defs#did" | ||
| } | ||
| }, | ||
| "createdAt": { | ||
| "type": "string", | ||
| "format": "datetime", | ||
| "description": "Client-declared timestamp when this record was originally created" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "lexicon": 1, | ||
| "id": "app.certified.badge.response", | ||
| "defs": { | ||
| "main": { | ||
| "type": "record", | ||
| "description": "Recipient response to a badge award.", | ||
| "key": "tid", | ||
| "record": { | ||
| "type": "object", | ||
| "required": ["badgeAward", "response", "createdAt"], | ||
| "properties": { | ||
| "badgeAward": { | ||
| "type": "ref", | ||
| "ref": "app.certified.badge.award", | ||
| "description": "Reference to the badge award." | ||
| }, | ||
| "response": { | ||
| "type": "string", | ||
| "enum": ["accepted", "rejected"], | ||
| "description": "The recipient’s response for the badge (accepted or rejected)." | ||
| }, | ||
| "weight": { | ||
| "type": "string", | ||
| "description": "Optional relative weight for accepted badges, assigned by the recipient." | ||
| }, | ||
| "createdAt": { | ||
| "type": "string", | ||
| "format": "datetime", | ||
| "description": "Client-declared timestamp when this record was originally created" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "lexicon": 1, | ||
| "id": "app.certified.defs", | ||
| "description": "Common type definitions used across certified protocols.", | ||
| "defs": { | ||
| "did": { | ||
| "type": "string", | ||
| "format": "did", | ||
| "description": "A Decentralized Identifier (DID) string." | ||
| } | ||
aspiers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: hypercerts-org/hypercerts-lexicon
Length of output: 579
Use
type: "string"withformat: "did"instead oftype: "ref"for array items.Per ATProto specifications, refs cannot point to token types, and refs cannot be declared as top-level named types in a schema defs array. The
app.certified.defs#didis a top-level named primitive definition (type: "string", format: "did"), which violates this constraint. Standard practice across ATProto lexicons uses inlinetype: "string"withformat: "did"for DID fields.Change lines 36-43 to:
🤖 Prompt for AI Agents