-
Notifications
You must be signed in to change notification settings - Fork 7
add work scope logic expressions #129
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a453f7a
add ops for workscope logic model
holkexyz c2587b5
update schemas.md and ERD
holkexyz 345d8ab
fix ordering of required fields
holkexyz 3fea1db
rename workScopeExpr.md to workScopeExpr.json
holkexyz ff67b0b
chore: regenerate after rename
holkexyz 129ec98
Merge branch 'develop' into add-ops-schema-for-work-scope-logic-model
holkexyz 6467d84
add knownValues to ops, add workScopeExpr to ERD, update changeset
holkexyz 4d28df3
regenerate SCHEMAS.md
holkexyz 5c982e8
update README workScope example to reflect workScopeExpr and ops options
holkexyz 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
There are no files selected for viewing
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,35 @@ | ||
| --- | ||
| "@hypercerts-org/lexicon": minor | ||
| --- | ||
|
|
||
| Add ops lexicon for work scope logic operator nodes | ||
|
|
||
| **New Features:** | ||
|
|
||
| - **New lexicon (`org.hypercerts.helper.ops`):** | ||
| - Operator node record type for work scope logic expressions | ||
| - Supports nested boolean logic operations (AND, OR, NOT) | ||
| - Fields: | ||
| - `op` (required): Operator identifier (e.g., 'all', 'any', 'not') | ||
| - `args` (required): Array of strongRefs pointing to `org.hypercerts.helper.workScopeTag` (leaf atoms) or other `org.hypercerts.helper.ops` records (nested expressions) | ||
| - `createdAt` (required): Client-declared timestamp | ||
| - Enables complex work scope logic by allowing operators to reference other operators or scope tags recursively | ||
| - Operator semantics are defined by consuming applications | ||
|
|
||
| **Usage:** | ||
|
|
||
| The `org.hypercerts.helper.ops` lexicon works together with `org.hypercerts.helper.workScopeTag` to create nested boolean logic expressions for work scope definitions. Operators can be referenced via strongRefs in activity records' `workScope` field. | ||
|
|
||
| **Example:** | ||
|
|
||
| ```json | ||
| { | ||
| "$type": "org.hypercerts.helper.ops", | ||
| "op": "all", | ||
| "args": [ | ||
| { "uri": "at://.../workScopeTag/ipfs", "cid": "..." }, | ||
| { "uri": "at://.../workScopeTag/go", "cid": "..." } | ||
| ], | ||
| "createdAt": "2024-01-01T00:00:00Z" | ||
| } | ||
| ``` |
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,34 @@ | ||
| { | ||
| "lexicon": 1, | ||
| "id": "org.hypercerts.helper.ops", | ||
| "defs": { | ||
| "main": { | ||
| "type": "record", | ||
| "description": "Operator node for work scope logic. Nesting is achieved by having args strongRefs point to either workScopeTag records (leaf atoms) or other ops records (nested expressions). Operator semantics are defined by consuming applications.\n\nExamples: op='all' (AND), op='any' (OR), op='not' (NOT; typically unary).", | ||
| "key": "tid", | ||
| "record": { | ||
| "type": "object", | ||
| "required": ["createdAt", "op", "args"], | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "maxLength": 64, | ||
| "description": "Operator identifier. Semantics are defined by the evaluating application. Examples: 'all', 'any', 'not'." | ||
| }, | ||
| "args": { | ||
| "type": "array", | ||
| "minLength": 1, | ||
| "maxLength": 100, | ||
| "items": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, | ||
| "description": "Arguments. Each strongRef should point to either org.hypercerts.helper.workScopeTag (leaf) or org.hypercerts.helper.ops (nested). For op='not', args SHOULD have exactly one element (enforced by clients)." | ||
| }, | ||
| "createdAt": { | ||
| "type": "string", | ||
| "format": "datetime", | ||
| "description": "Client-declared timestamp when this record was originally created" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.