From ecb4177bf1a258a6c918a4ec7d0ef6688dd152f0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 20:10:20 +0000 Subject: [PATCH] chore: release package --- .changeset/add-acknowledgement-lexicon.md | 5 - .changeset/add-cel-work-scope-expressions.md | 5 - .../add-collection-avatar-coverimage.md | 5 - .changeset/add-collection-item-weights.md | 45 -- .changeset/add-hyperboards-lexicons.md | 5 - .changeset/add-location-to-attachment.md | 35 -- .changeset/add-locations-to-collections.md | 5 - .changeset/add-org-metadata-lexicon.md | 5 - .changeset/add-profile-lexicon.md | 5 - .changeset/add-project-sidecar.md | 5 - .changeset/add-richtext-facets-to-activity.md | 7 - .changeset/add-vitest-suite.md | 5 - .changeset/allow-empty-collections.md | 5 - .changeset/badge-award-url.md | 5 - .../document-location-sidecar-pattern.md | 5 - .changeset/drop-helper-prefix.md | 5 - .../expand-location-type-known-values.md | 5 - .changeset/extend-location-schema.md | 5 - .changeset/fix-camelcase-exports.md | 12 - .changeset/fix-certified-did-type.md | 17 - .changeset/fix-union-string-types.md | 27 -- .changeset/flat-llamas-crash.md | 5 - .changeset/improved-exports-structure.md | 43 -- .../include-changelog-in-distribution.md | 5 - .../initial-version-post-repo-migration.md | 34 -- .changeset/make-activity-dates-optional.md | 5 - .changeset/moody-regions-begin.md | 5 - .changeset/move-collection-namespace.md | 5 - .../move-evaluation-attachment-context.md | 5 - .changeset/move-profile-to-actor-namespace.md | 5 - .../move-schema-docs-to-autogenerated-file.md | 5 - .changeset/pre.json | 55 --- .../refactor-contributions-structure.md | 41 -- .changeset/refactor-measurement-schema.md | 19 - .../remove-bidirectional-project-link.md | 5 - .changeset/remove-collection-project.md | 5 - .changeset/rename-contribution-details.md | 5 - .changeset/rename-evidence-to-attachment.md | 61 --- .changeset/require-createdAt-in-profile.md | 5 - .changeset/rollup-build-system.md | 36 -- ...mplify-workscope-to-strongref-or-string.md | 19 - .changeset/sparkly-doors-bet.md | 5 - .changeset/style-guide-compliance.md | 5 - .changeset/unbundle-type-declarations.md | 19 - .changeset/unify-projects-collections.md | 16 - .changeset/update-collection-lexicon.md | 17 - .changeset/update-contributor-lexicon.md | 14 - CHANGELOG.md | 445 ++++++++++++++++++ package-lock.json | 4 +- package.json | 2 +- 50 files changed, 448 insertions(+), 665 deletions(-) delete mode 100644 .changeset/add-acknowledgement-lexicon.md delete mode 100644 .changeset/add-cel-work-scope-expressions.md delete mode 100644 .changeset/add-collection-avatar-coverimage.md delete mode 100644 .changeset/add-collection-item-weights.md delete mode 100644 .changeset/add-hyperboards-lexicons.md delete mode 100644 .changeset/add-location-to-attachment.md delete mode 100644 .changeset/add-locations-to-collections.md delete mode 100644 .changeset/add-org-metadata-lexicon.md delete mode 100644 .changeset/add-profile-lexicon.md delete mode 100644 .changeset/add-project-sidecar.md delete mode 100644 .changeset/add-richtext-facets-to-activity.md delete mode 100644 .changeset/add-vitest-suite.md delete mode 100644 .changeset/allow-empty-collections.md delete mode 100644 .changeset/badge-award-url.md delete mode 100644 .changeset/document-location-sidecar-pattern.md delete mode 100644 .changeset/drop-helper-prefix.md delete mode 100644 .changeset/expand-location-type-known-values.md delete mode 100644 .changeset/extend-location-schema.md delete mode 100644 .changeset/fix-camelcase-exports.md delete mode 100644 .changeset/fix-certified-did-type.md delete mode 100644 .changeset/fix-union-string-types.md delete mode 100644 .changeset/flat-llamas-crash.md delete mode 100644 .changeset/improved-exports-structure.md delete mode 100644 .changeset/include-changelog-in-distribution.md delete mode 100644 .changeset/initial-version-post-repo-migration.md delete mode 100644 .changeset/make-activity-dates-optional.md delete mode 100644 .changeset/moody-regions-begin.md delete mode 100644 .changeset/move-collection-namespace.md delete mode 100644 .changeset/move-evaluation-attachment-context.md delete mode 100644 .changeset/move-profile-to-actor-namespace.md delete mode 100644 .changeset/move-schema-docs-to-autogenerated-file.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/refactor-contributions-structure.md delete mode 100644 .changeset/refactor-measurement-schema.md delete mode 100644 .changeset/remove-bidirectional-project-link.md delete mode 100644 .changeset/remove-collection-project.md delete mode 100644 .changeset/rename-contribution-details.md delete mode 100644 .changeset/rename-evidence-to-attachment.md delete mode 100644 .changeset/require-createdAt-in-profile.md delete mode 100644 .changeset/rollup-build-system.md delete mode 100644 .changeset/simplify-workscope-to-strongref-or-string.md delete mode 100644 .changeset/sparkly-doors-bet.md delete mode 100644 .changeset/style-guide-compliance.md delete mode 100644 .changeset/unbundle-type-declarations.md delete mode 100644 .changeset/unify-projects-collections.md delete mode 100644 .changeset/update-collection-lexicon.md delete mode 100644 .changeset/update-contributor-lexicon.md diff --git a/.changeset/add-acknowledgement-lexicon.md b/.changeset/add-acknowledgement-lexicon.md deleted file mode 100644 index 802401cf..00000000 --- a/.changeset/add-acknowledgement-lexicon.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add org.hypercerts.acknowledgement lexicon for bidirectional inclusion links between records across PDS repos diff --git a/.changeset/add-cel-work-scope-expressions.md b/.changeset/add-cel-work-scope-expressions.md deleted file mode 100644 index c26b0a17..00000000 --- a/.changeset/add-cel-work-scope-expressions.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add CEL expression support for structured work scopes (`org.hypercerts.workscope.cel`, `org.hypercerts.workscope.tag`) diff --git a/.changeset/add-collection-avatar-coverimage.md b/.changeset/add-collection-avatar-coverimage.md deleted file mode 100644 index bc5448fe..00000000 --- a/.changeset/add-collection-avatar-coverimage.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add avatar and banner fields to collection lexicon for visual representation diff --git a/.changeset/add-collection-item-weights.md b/.changeset/add-collection-item-weights.md deleted file mode 100644 index b363fe36..00000000 --- a/.changeset/add-collection-item-weights.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Refactor collection items structure to support optional weights and remove activityWeight from activity schema - -**Breaking Changes:** - -- **Activity lexicon (`org.hypercerts.claim.activity`):** - - Removed `org.hypercerts.claim.activity#activityWeight` def - - Activity records no longer include activity weight information - -- **Collection lexicon (`org.hypercerts.claim.collection`):** - - Changed `org.hypercerts.claim.collection#items` from array of strongRefs to array of item objects - - Added `org.hypercerts.claim.collection#item` def with: - - `itemIdentifier` (required): strongRef to an item (activity or collection) - - `itemWeight` (optional): positive numeric value stored as string - - Supports recursive collection nesting (items can reference activities or other collections) - -**Migration:** - -**Collection items:** Convert from array of strongRefs to array of item objects: - -```json -// Before -"items": [strongRef1, strongRef2] - -// After -"items": [ - { "itemIdentifier": strongRef1, "itemWeight": "1.5" }, - { "itemIdentifier": strongRef2 } -] -``` - -**Activity weights:** Migrate existing `org.hypercerts.claim.activity#activityWeight` data to collection `org.hypercerts.claim.collection#item.itemWeight`: - -```json -// Old (removed from activity) -{ "activity": { "uri": "...", "cid": "..." }, "weight": "1.5" } - -// New (in collection items) -{ "itemIdentifier": { "uri": "...", "cid": "..." }, "itemWeight": "1.5" } -``` - -Update collections that reference activities to include weights in `org.hypercerts.claim.collection#item.itemWeight`. Weights can be dropped if not needed. diff --git a/.changeset/add-hyperboards-lexicons.md b/.changeset/add-hyperboards-lexicons.md deleted file mode 100644 index 24a7b9e1..00000000 --- a/.changeset/add-hyperboards-lexicons.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add `org.hyperboards.board` and `org.hyperboards.displayProfile` lexicons for hyperboard visual presentation records. diff --git a/.changeset/add-location-to-attachment.md b/.changeset/add-location-to-attachment.md deleted file mode 100644 index 781b7669..00000000 --- a/.changeset/add-location-to-attachment.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -"@hypercerts-org/lexicon": patch ---- - -Add location property to attachment schema - -**New Feature:** - -- **`location` field** (`org.hypercerts.claim.attachment`): - - Added optional `location` property as a strong reference (`com.atproto.repo.strongRef`) - - Allows attachments to associate location metadata directly without using the sidecar pattern - - The referenced record must conform to the `app.certified.location` lexicon - -**Usage:** - -```json -{ - "$type": "org.hypercerts.claim.attachment", - "subjects": [ - { - "uri": "at://did:plc:.../org.hypercerts.claim.activity/...", - "cid": "..." - } - ], - "content": [{ "uri": "https://..." }], - "title": "Field Report", - "location": { - "uri": "at://did:plc:.../app.certified.location/abc123", - "cid": "..." - }, - "createdAt": "..." -} -``` - -This change aligns with the location property addition to collections (PR #123), providing a consistent pattern for associating location metadata across record types. diff --git a/.changeset/add-locations-to-collections.md b/.changeset/add-locations-to-collections.md deleted file mode 100644 index 23028f12..00000000 --- a/.changeset/add-locations-to-collections.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add `location` property to collections. Collections can now reference a location record directly via strongRef. This replaces the sidecar pattern which was impractical since location records cannot be reused across multiple collections. diff --git a/.changeset/add-org-metadata-lexicon.md b/.changeset/add-org-metadata-lexicon.md deleted file mode 100644 index b229a4aa..00000000 --- a/.changeset/add-org-metadata-lexicon.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add app.certified.actor.organization sidecar record for organization actor profiles with fields for organization type, labeled URLs, location (strongRef), and founded date diff --git a/.changeset/add-profile-lexicon.md b/.changeset/add-profile-lexicon.md deleted file mode 100644 index e197ac6c..00000000 --- a/.changeset/add-profile-lexicon.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add profile lexicon for Hypercert account profiles with support for display name, description, pronouns, website, avatar, banner. diff --git a/.changeset/add-project-sidecar.md b/.changeset/add-project-sidecar.md deleted file mode 100644 index e3f239a9..00000000 --- a/.changeset/add-project-sidecar.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Remove org.hypercerts.claim.project lexicon and replace with org.hypercerts.claim.collection.project sidecar. Projects are now represented as collections with an optional project sidecar (same TID) that provides rich-text descriptions, avatars, and cover photos. Avatar and coverPhoto fields moved from base collection to project sidecar. Collections without the project sidecar are simple groupings; collections with it are "projects" with rich documentation. diff --git a/.changeset/add-richtext-facets-to-activity.md b/.changeset/add-richtext-facets-to-activity.md deleted file mode 100644 index bd50438e..00000000 --- a/.changeset/add-richtext-facets-to-activity.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add rich text facet support to activity claim descriptions - -Add `shortDescriptionFacets` and `descriptionFacets` fields to the activity lexicon to support rich text annotations (mentions, URLs, hashtags, etc.) in activity claim descriptions. diff --git a/.changeset/add-vitest-suite.md b/.changeset/add-vitest-suite.md deleted file mode 100644 index 37dfd25d..00000000 --- a/.changeset/add-vitest-suite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": patch ---- - -Add basic test suite using vitest 4. diff --git a/.changeset/allow-empty-collections.md b/.changeset/allow-empty-collections.md deleted file mode 100644 index bd0abaf7..00000000 --- a/.changeset/allow-empty-collections.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Make items optional in collection schema to allow creating empty collections diff --git a/.changeset/badge-award-url.md b/.changeset/badge-award-url.md deleted file mode 100644 index 86ecc29e..00000000 --- a/.changeset/badge-award-url.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add optional `url` field to `app.certified.badge.award` for linking to an external page associated with the badge diff --git a/.changeset/document-location-sidecar-pattern.md b/.changeset/document-location-sidecar-pattern.md deleted file mode 100644 index 3879dcc1..00000000 --- a/.changeset/document-location-sidecar-pattern.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": patch ---- - -Document ATProto sidecar pattern for collections using app.certified.location. Collections can now have location metadata by creating a location record with the same TID, allowing location updates without changing the collection CID. Updated README with usage example and ERD with sidecar relationship. diff --git a/.changeset/drop-helper-prefix.md b/.changeset/drop-helper-prefix.md deleted file mode 100644 index d65ea4ea..00000000 --- a/.changeset/drop-helper-prefix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Drop HELPER\_ prefix from workScopeTag constants. `HELPER_WORK_SCOPE_TAG_NSID`, `HELPER_WORK_SCOPE_TAG_LEXICON_JSON`, and `HELPER_WORK_SCOPE_TAG_LEXICON_DOC` are now `WORK_SCOPE_TAG_NSID`, `WORK_SCOPE_TAG_LEXICON_JSON`, and `WORK_SCOPE_TAG_LEXICON_DOC`. diff --git a/.changeset/expand-location-type-known-values.md b/.changeset/expand-location-type-known-values.md deleted file mode 100644 index 73c41b98..00000000 --- a/.changeset/expand-location-type-known-values.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Expand locationType knownValues to include geojson, h3, geohash, wkt, address, and scaledCoordinates from the [Location Protocol spec](https://spec.decentralizedgeo.org/specification/location-types/#location-type-registry) diff --git a/.changeset/extend-location-schema.md b/.changeset/extend-location-schema.md deleted file mode 100644 index 96103c1a..00000000 --- a/.changeset/extend-location-schema.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add inline string format to app.certified.location schema with documentation and examples diff --git a/.changeset/fix-camelcase-exports.md b/.changeset/fix-camelcase-exports.md deleted file mode 100644 index 350116bb..00000000 --- a/.changeset/fix-camelcase-exports.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Fix camelCase export names to use underscores. Generated constants like `CONTRIBUTIONDETAILS_LEXICON_*` are now `CONTRIBUTION_DETAILS_LEXICON_*` for consistency. - -Affected exports: - -- `CONTRIBUTION_DETAILS_NSID`, `CONTRIBUTION_DETAILS_LEXICON_JSON`, `CONTRIBUTION_DETAILS_LEXICON_DOC` (was `CONTRIBUTIONDETAILS_*`) -- `CONTRIBUTOR_INFORMATION_NSID`, `CONTRIBUTOR_INFORMATION_LEXICON_JSON`, `CONTRIBUTOR_INFORMATION_LEXICON_DOC` (was `CONTRIBUTORINFORMATION_*`) -- `STRONG_REF_NSID`, `STRONG_REF_LEXICON_JSON`, `STRONG_REF_LEXICON_DOC` (was `STRONGREF_*`) -- `HELPER_WORK_SCOPE_TAG_NSID`, `HELPER_WORK_SCOPE_TAG_LEXICON_JSON`, `HELPER_WORK_SCOPE_TAG_LEXICON_DOC` (was `HELPER_WORKSCOPETAG_*`) diff --git a/.changeset/fix-certified-did-type.md b/.changeset/fix-certified-did-type.md deleted file mode 100644 index a20b99c0..00000000 --- a/.changeset/fix-certified-did-type.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Convert app.certified.defs#did to object type - -The did definition in app.certified.defs has been converted from a primitive -string type to an object type to comply with the ATProto specification -requirement that all union variants must be object or record types. - -This change was necessary because app.certified.badge.award uses this -definition in a union for the subject property. - -Breaking changes: - -- `app.certified.defs#did`: Now an object with `did` string property (maxLength 256) -- Code using this type must now access the `.did` property instead of using the value directly diff --git a/.changeset/fix-union-string-types.md b/.changeset/fix-union-string-types.md deleted file mode 100644 index 0024dfca..00000000 --- a/.changeset/fix-union-string-types.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Convert union string definitions to object types in activity lexicon - -The contributorIdentity, contributorRole, and workScopeString definitions -in org.hypercerts.claim.activity have been converted from primitive string -types to object types to comply with the ATProto specification requirement -that all union variants must be object or record types. - -Additionally, maximum length constraints have been reduced to more reasonable -values: - -- `contributorIdentity.identity`: maxLength 1000, maxGraphemes 100 (previously no limits) -- `contributorRole.role`: maxLength 1000, maxGraphemes 100 (previously maxLength 10000, maxGraphemes 1000) -- `workScopeString.scope`: maxLength 1000, maxGraphemes 100 (previously maxLength 10000, maxGraphemes 1000) - -Breaking changes: - -- `contributorIdentity`: Now an object with `identity` string property -- `contributorRole`: Now an object with `role` string property -- `workScopeString`: Now an object with `scope` string property -- Reduced maximum lengths may affect existing records with longer values - -This requires updating code that uses these union types to access the nested -property instead of using the value directly. diff --git a/.changeset/flat-llamas-crash.md b/.changeset/flat-llamas-crash.md deleted file mode 100644 index 60cf0f7a..00000000 --- a/.changeset/flat-llamas-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Use Leaflet linear documents for rich-text descriptions in activity and attachment lexicons, and make attachment content optional. diff --git a/.changeset/improved-exports-structure.md b/.changeset/improved-exports-structure.md deleted file mode 100644 index df3d458a..00000000 --- a/.changeset/improved-exports-structure.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Improved exports structure with semantic collection mappings for extra syntactic sugar. - -**Breaking Changes:** - -- Renamed `ids` export to `HYPERCERTS_NSIDS_BY_TYPE` (maps type namespaces to NSIDs) - -**New Features:** - -- Added `HYPERCERTS_NSIDS` object with semantic keys (e.g., `ACTIVITY`, `RIGHTS`, `CONTRIBUTION`) -- Added `HYPERCERTS_LEXICON_JSON` object with semantic keys mapping to raw JSON lexicons -- Added `HYPERCERTS_LEXICON_DOC` object with semantic keys mapping to typed lexicon documents -- All three new objects share the same key structure for consistency - -**Migration Guide:** - -If you were using the `ids` export (rare): - -```typescript -// Before -import { ids } from "@hypercerts-org/lexicon"; -const nsid = ids.OrgHypercertsClaimActivity; - -// After -import { HYPERCERTS_NSIDS_BY_TYPE } from "@hypercerts-org/lexicon"; -const nsid = HYPERCERTS_NSIDS_BY_TYPE.OrgHypercertsClaimActivity; -``` - -Most users should use individual NSID constants (unchanged): - -```typescript -import { ACTIVITY_NSID, RIGHTS_NSID } from "@hypercerts-org/lexicon"; -``` - -Or the new semantic mapping: - -```typescript -import { HYPERCERTS_NSIDS } from "@hypercerts-org/lexicon"; -const nsid = HYPERCERTS_NSIDS.ACTIVITY; // Same as ACTIVITY_NSID -``` diff --git a/.changeset/include-changelog-in-distribution.md b/.changeset/include-changelog-in-distribution.md deleted file mode 100644 index bf082a6a..00000000 --- a/.changeset/include-changelog-in-distribution.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": patch ---- - -Include CHANGELOG.md in package distribution for better user documentation. diff --git a/.changeset/initial-version-post-repo-migration.md b/.changeset/initial-version-post-repo-migration.md deleted file mode 100644 index 45ee2086..00000000 --- a/.changeset/initial-version-post-repo-migration.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -This release represents the migration of the lexicon package from the SDK monorepo (`hypercerts-sdk/packages/lexicon`) to a dedicated standalone repository (`hypercerts-lexicon`). This separation allows for independent versioning and development of the lexicon definitions. - -Major architectural and feature updates compared to the SDK lexicon package include but are not limited to the following: - -**New Lexicons:** - -- Activity model: `org.hypercerts.claim.activity` - activity-based hypercert records (replaces single claim model) -- Project records: `org.hypercerts.claim.project` - projects that group multiple activities -- Shared definitions: `org.hypercerts.defs` - common types (uri, smallBlob, largeBlob, smallImage, largeImage) -- Badge system: `app.certified.badge.definition`, `app.certified.badge.award`, `app.certified.badge.response` for badge-based endorsements -- Funding receipts: `org.hypercerts.funding.receipt` - payment and funding tracking - -**Architectural Changes:** - -- **Claim model**: Replaced single `org.hypercerts.claim` record with activity-based `org.hypercerts.claim.activity` model -- **Collection model**: Collections now reference activities (via `activityWeight`) instead of claims (via `claimItem`) -- **Work scope**: Activity model uses structured `workScope` object with label-based conditions (`withinAllOf`, `withinAnyOf`, `withinNoneOf`) -- **Time fields**: Activity uses `startDate`/`endDate` instead of `workTimeFrameFrom`/`workTimeFrameTo` -- **Image references**: Activity model references `org.hypercerts.defs#smallImage` instead of `app.certified.defs#uri`/`smallBlob` - -**Definition Updates:** - -- `app.certified.defs` now includes `did` type definition -- Added `org.hypercerts.defs` with image and blob type definitions -- Activity model references project via AT-URI instead of strongRef - -**Removed/Replaced:** - -- `org.hypercerts.claim` (replaced by `org.hypercerts.claim.activity`) -- Top-level `org.hypercerts.collection` (replaced by `org.hypercerts.claim.collection` using activities) diff --git a/.changeset/make-activity-dates-optional.md b/.changeset/make-activity-dates-optional.md deleted file mode 100644 index 8532971e..00000000 --- a/.changeset/make-activity-dates-optional.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": patch ---- - -Make startDate and endDate optional in activity lexicon diff --git a/.changeset/moody-regions-begin.md b/.changeset/moody-regions-begin.md deleted file mode 100644 index d46b6436..00000000 --- a/.changeset/moody-regions-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Improve acknowledgement schema: move to org.hypercerts.context.acknowledgement, generalize descriptions, make context optional, add maxGraphemes to comment. diff --git a/.changeset/move-collection-namespace.md b/.changeset/move-collection-namespace.md deleted file mode 100644 index 9d87ef83..00000000 --- a/.changeset/move-collection-namespace.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Move collection lexicon from `org.hypercerts.claim.collection` to `org.hypercerts.collection` to reflect that collections can contain more than just claims. diff --git a/.changeset/move-evaluation-attachment-context.md b/.changeset/move-evaluation-attachment-context.md deleted file mode 100644 index de100bfc..00000000 --- a/.changeset/move-evaluation-attachment-context.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Move evaluation and attachment lexicons to org.hypercerts.context namespace. diff --git a/.changeset/move-profile-to-actor-namespace.md b/.changeset/move-profile-to-actor-namespace.md deleted file mode 100644 index c109e717..00000000 --- a/.changeset/move-profile-to-actor-namespace.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Move profile lexicon from app.certified.profile to app.certified.actor.profile namespace, requiring migration of existing profile records diff --git a/.changeset/move-schema-docs-to-autogenerated-file.md b/.changeset/move-schema-docs-to-autogenerated-file.md deleted file mode 100644 index 49f48c50..00000000 --- a/.changeset/move-schema-docs-to-autogenerated-file.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Move schema documentation tables from README.md to auto-generated SCHEMAS.md to reduce git merge conflicts. The SCHEMAS.md file is now auto-generated from lexicon definitions and included in the distributed package. diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index f8b244c8..00000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "mode": "exit", - "tag": "beta", - "initialVersions": { - "@hypercerts-org/lexicon": "0.9.0" - }, - "changesets": [ - "add-acknowledgement-lexicon", - "add-cel-work-scope-expressions", - "add-collection-avatar-coverimage", - "add-collection-item-weights", - "add-hyperboards-lexicons", - "add-location-to-attachment", - "add-locations-to-collections", - "add-org-metadata-lexicon", - "add-profile-lexicon", - "add-project-sidecar", - "add-richtext-facets-to-activity", - "add-vitest-suite", - "allow-empty-collections", - "badge-award-url", - "document-location-sidecar-pattern", - "drop-helper-prefix", - "expand-location-type-known-values", - "extend-location-schema", - "fix-camelcase-exports", - "fix-certified-did-type", - "fix-union-string-types", - "flat-llamas-crash", - "improved-exports-structure", - "include-changelog-in-distribution", - "initial-version-post-repo-migration", - "make-activity-dates-optional", - "moody-regions-begin", - "move-collection-namespace", - "move-evaluation-attachment-context", - "move-profile-to-actor-namespace", - "move-schema-docs-to-autogenerated-file", - "refactor-contributions-structure", - "refactor-measurement-schema", - "remove-bidirectional-project-link", - "remove-collection-project", - "rename-contribution-details", - "rename-evidence-to-attachment", - "require-createdAt-in-profile", - "rollup-build-system", - "simplify-workscope-to-strongref-or-string", - "sparkly-doors-bet", - "style-guide-compliance", - "unbundle-type-declarations", - "unify-projects-collections", - "update-collection-lexicon", - "update-contributor-lexicon" - ] -} diff --git a/.changeset/refactor-contributions-structure.md b/.changeset/refactor-contributions-structure.md deleted file mode 100644 index 10414434..00000000 --- a/.changeset/refactor-contributions-structure.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Refactor contributions structure in activity lexicon - -**Breaking Changes:** - -- **Activity lexicon (`org.hypercerts.claim.activity`):** - - Renamed `contributions` field to `contributors` - - Replaced `contributions` array (array of strongRefs) with new `contributors` array containing contributor objects - - Each contributor object (`org.hypercerts.claim.activity#contributor`) has three fields: - - `contributorIdentity` (required): string (DID/identifier) or strongRef to a contributor information record - - `contributionWeight` (optional): positive numeric value stored as string - - `contributionDetails` (optional): string or strongRef to a contribution details record - - Added internal defs: - - `#contributor`: object type for contributor entries - - `#contributorIdentity`: string type for DID/identifier values - - `#contributorRole`: string type for contribution details (maxLength 10000, maxGraphemes 1000) - -**Migration:** - -Convert from array of strongRefs to array of contributor objects: - -```json -// Before -"contributions": [strongRef1, strongRef2] - -// After -"contributors": [ - { - "contributorIdentity": "did:example:123", - "contributionWeight": "1.5", - "contributionDetails": "Lead developer" - }, - { - "contributorIdentity": strongRefToContributorInfo, - "contributionDetails": strongRefToContributionDetails - } -] -``` diff --git a/.changeset/refactor-measurement-schema.md b/.changeset/refactor-measurement-schema.md deleted file mode 100644 index 12f27756..00000000 --- a/.changeset/refactor-measurement-schema.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Refactor measurement lexicon schema: convert subject to subjects array, add unit field, date ranges, and locations array - -**Breaking Changes:** - -- **Measurement lexicon (`org.hypercerts.context.measurement`):** - - Changed `subject` (single strongRef) to `subjects` (array of strongRefs, maxLength: 100) - - Changed required fields: removed `measurers` from required, added `unit` as required - - Added `unit` field (required, string, maxLength: 50): The unit of the measured value (e.g. kg CO₂e, hectares, %, index score) - - Added `startDate` field (optional, datetime): The start date and time when the measurement began - - Added `endDate` field (optional, datetime): The end date and time when the measurement ended - - Changed `location` (single strongRef) to `locations` (array of strongRefs, maxLength: 100) - - Moved `measurers` from required to optional field - - Added `comment` field (optional, string): Short comment suitable for previews and list views - - Added `commentFacets` field (optional, array): Rich text annotations for `comment` (mentions, URLs, hashtags, etc.) - - Updated field descriptions for `metric` and `value` with more detailed examples diff --git a/.changeset/remove-bidirectional-project-link.md b/.changeset/remove-bidirectional-project-link.md deleted file mode 100644 index 6f3047d1..00000000 --- a/.changeset/remove-bidirectional-project-link.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Remove bidirectional project-activity link. Activities no longer include a `project` field reference. Projects continue to reference activities via the `activities` array, making the relationship unidirectional (project → activities only). diff --git a/.changeset/remove-collection-project.md b/.changeset/remove-collection-project.md deleted file mode 100644 index 2e377b72..00000000 --- a/.changeset/remove-collection-project.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Remove org.hypercerts.claim.collection.project lexicon diff --git a/.changeset/rename-contribution-details.md b/.changeset/rename-contribution-details.md deleted file mode 100644 index 5b38a38b..00000000 --- a/.changeset/rename-contribution-details.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Rename contributionDetails to contribution (org.hypercerts.claim.contribution). diff --git a/.changeset/rename-evidence-to-attachment.md b/.changeset/rename-evidence-to-attachment.md deleted file mode 100644 index 8898c9f5..00000000 --- a/.changeset/rename-evidence-to-attachment.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Rename evidence lexicon to attachment and refactor schema structure - -**Breaking Changes:** - -- **Lexicon ID change:** - - `org.hypercerts.claim.evidence` → `org.hypercerts.claim.attachment` - - All existing evidence records must be migrated to use the new lexicon ID - -- **Schema structure changes (`org.hypercerts.claim.attachment`):** - - Changed `subject` (single strongRef) to `subjects` (array of strongRefs, maxLength: 100) - - Changed `content` from single union (uri/blob) to array of unions (maxLength: 100) - - Added `contentType` field (string, maxLength: 64) to specify attachment type - - Removed `relationType` field (previously used to indicate supports/challenges/clarifies) - - Removed `contributors` field - - Removed `locations` field - - Added rich text support: `shortDescriptionFacets` and `descriptionFacets` (arrays of `app.bsky.richtext.facet`) - - Updated required fields: `["title", "content", "createdAt"]` (content is now required) - -- **Common definitions (`org.hypercerts.defs`):** - - Added `weightedContributor` def for contributor references with optional weights - - Added `contributorIdentity` def for string-based contributor identification - -**Migration:** - -**Lexicon ID:** Update all references from `org.hypercerts.claim.evidence` to `org.hypercerts.claim.attachment`. - -**Schema migration:** - -```json -// Before (org.hypercerts.claim.evidence) -{ - "$type": "org.hypercerts.claim.evidence", - "subject": { "uri": "...", "cid": "..." }, - "content": { "uri": "https://..." }, - "title": "Evidence Title", - "relationType": "supports", - "createdAt": "..." -} - -// After (org.hypercerts.claim.attachment) -{ - "$type": "org.hypercerts.claim.attachment", - "subjects": [{ "uri": "...", "cid": "..." }], - "content": [{ "uri": "https://..." }], - "contentType": "evidence", - "title": "Evidence Title", - "createdAt": "..." -} -``` - -**Field mapping:** - -- `subject` → `subjects` (wrap in array) -- `content` (single) → `content` (array, wrap existing value) -- `relationType` → remove (no direct replacement) -- `contributors` → remove (no direct replacement) -- `locations` → remove (no direct replacement) diff --git a/.changeset/require-createdAt-in-profile.md b/.changeset/require-createdAt-in-profile.md deleted file mode 100644 index 5a7e2db5..00000000 --- a/.changeset/require-createdAt-in-profile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Require createdAt in app.certified.actor.profile schema diff --git a/.changeset/rollup-build-system.md b/.changeset/rollup-build-system.md deleted file mode 100644 index 3bfd7f55..00000000 --- a/.changeset/rollup-build-system.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -chore: switch to build via rollup - -Major build system improvements: - -- **Build System**: Migrated from direct TypeScript to Rollup-based builds - - Generates proper ESM (`dist/index.mjs`) and CommonJS (`dist/index.cjs`) bundles - - Generates TypeScript declarations (`dist/index.d.ts`) - - Includes source maps for debugging - - Adds `/lexicons` export for lighter bundle (validation only) - -- **Code Generation**: - - Auto-generates `generated/exports.ts` with clean, organized exports - - Creates type shims for external lexicons (@atcute/leaflet) - - All generated code now in `generated/` directory (gitignored) - -- **Package Exports**: - - Main export: `@hypercerts-org/lexicon` (full package with types) - - Lexicons export: `@hypercerts-org/lexicon/lexicons` (schemas only, smaller bundle) - - Proper dual package support (ESM + CommonJS) - -- **Code Quality**: - - Added ESLint configuration - - Added TypeScript type-checking to CI - - Improved build validation workflow - -- **Dependencies**: - - Added `@atcute/leaflet` for external lexicon references - - Added `multiformats` as runtime dependency - - Moved `@atproto/lex-cli` to devDependencies (build-time only) - -**Migration**: No breaking changes for existing users. Package structure is improved -but import paths remain compatible. diff --git a/.changeset/simplify-workscope-to-strongref-or-string.md b/.changeset/simplify-workscope-to-strongref-or-string.md deleted file mode 100644 index 20ea590e..00000000 --- a/.changeset/simplify-workscope-to-strongref-or-string.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Simplify workScope to union of strongRef and string - -**Breaking Changes:** - -- The `workScope` field in `org.hypercerts.claim.activity` is now a union of: - - `com.atproto.repo.strongRef`: A reference to a work-scope logic record for structured, nested work scope definitions - - `org.hypercerts.claim.activity#workScopeString`: A free-form string for simple or legacy scopes - -- **Removed** from `org.hypercerts.defs`: - - `workScopeAll` (logical AND operator) - - `workScopeAny` (logical OR operator) - - `workScopeNot` (logical NOT operator) - - `workScopeAtom` (atomic scope reference) - -This simplification allows work scope complexity to be managed via referenced records while still supporting simple string-based scopes for straightforward use cases. diff --git a/.changeset/sparkly-doors-bet.md b/.changeset/sparkly-doors-bet.md deleted file mode 100644 index 611968b3..00000000 --- a/.changeset/sparkly-doors-bet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Add support for multiple locations in an activity claim. diff --git a/.changeset/style-guide-compliance.md b/.changeset/style-guide-compliance.md deleted file mode 100644 index 6782bdd6..00000000 --- a/.changeset/style-guide-compliance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Align all lexicons with the ATProto Lexicon Style Guide: change badge response `enum` to `knownValues`, add `maxLength`/`maxGraphemes` to unconstrained string and array fields, fix style checker to skip format-typed fields. diff --git a/.changeset/unbundle-type-declarations.md b/.changeset/unbundle-type-declarations.md deleted file mode 100644 index bb92a773..00000000 --- a/.changeset/unbundle-type-declarations.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"@hypercerts-org/lexicon": patch ---- - -Switch from bundled to individual type declaration files - -**Changes:** - -- Removed `rollup-plugin-dts` dependency -- Switched to native TypeScript declaration generation -- Type declarations now mirror source structure in `dist/types/` -- Individual type files are small (1-3KB each) and lazy-loaded by TypeScript -- Improves IDE performance by avoiding single 39MB bundled declaration file - -**Technical Details:** - -The package now generates individual `.d.ts` files alongside the bundled JavaScript -output. This provides better IDE performance as TypeScript can lazy-load type files -on demand rather than parsing a massive bundled declaration file upfront. diff --git a/.changeset/unify-projects-collections.md b/.changeset/unify-projects-collections.md deleted file mode 100644 index 853894a5..00000000 --- a/.changeset/unify-projects-collections.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Unify project and collection schemas into a single -`org.hypercerts.claim.collection` lexicon with `type` discriminator -field to allow collections to be designated as projects. Custom -strings are also allowed in `type`. - -Also make `shortDescription` field optional in -`org.hypercerts.claim.collection` to match -`org.hypercerts.claim.project`. - -This unification removes `org.hypercerts.claim.project`, so existing -projects should be migrated to collections with `type` set to -`project`. diff --git a/.changeset/update-collection-lexicon.md b/.changeset/update-collection-lexicon.md deleted file mode 100644 index 305c884e..00000000 --- a/.changeset/update-collection-lexicon.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Updated `org.hypercerts.claim.collection` lexicon: - -- Added optional `type` field to specify collection type (e.g., 'favorites', 'project') -- Renamed fields for consistency: - - `collectionTitle` → `title` - - `shortCollectionDescription` → `shortDescription` - - `collectionDescription` → `description` -- Changed `description` from string to Leaflet linear document reference (`pub.leaflet.pages.linearDocument#main`) to support rich-text descriptions - -**Breaking changes**: - -- Field names have been renamed (e.g., `collectionTitle` → `title`) -- The `description` field now expects a reference object instead of a plain string diff --git a/.changeset/update-contributor-lexicon.md b/.changeset/update-contributor-lexicon.md deleted file mode 100644 index 32d7488e..00000000 --- a/.changeset/update-contributor-lexicon.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"@hypercerts-org/lexicon": minor ---- - -Update `org.hypercerts.claim.contributor` lexicon to support individual contributor profiles and roles. - -Breaking Changes: - -- Removed `contributors` array. -- Added `identifier`, `displayName`, and `image` fields for individual profiles. -- Renamed `description` to `contributionDescription`. -- Updated `required` fields to only include `createdAt`. - -Also corrected incorrect references to `org.hypercerts.claim.contribution` across the codebase to use the correct ID `org.hypercerts.claim.contributor`. diff --git a/CHANGELOG.md b/CHANGELOG.md index f74be123..cb51e109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,450 @@ # @hypercerts-org/lexicon +## 0.10.0 + +### Minor Changes + +- [#76](https://github.com/hypercerts-org/hypercerts-lexicon/pull/76) [`3044e22`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/3044e22c1345b3cd5764e3c6c3714b21e6911663) Thanks [@s-adamantine](https://github.com/s-adamantine)! - Add org.hypercerts.acknowledgement lexicon for bidirectional inclusion links between records across PDS repos + +- [#141](https://github.com/hypercerts-org/hypercerts-lexicon/pull/141) [`06fb6b5`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/06fb6b54542fe6311d55cb26a1c468c1374b0ab1) Thanks [@holkexyz](https://github.com/holkexyz)! - Add CEL expression support for structured work scopes (`org.hypercerts.workscope.cel`, `org.hypercerts.workscope.tag`) + +- [#106](https://github.com/hypercerts-org/hypercerts-lexicon/pull/106) [`b03a1f7`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/b03a1f7925b56a5d614bb3a40f7fe5e6321f3d34) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Add avatar and banner fields to collection lexicon for visual representation + +- [#113](https://github.com/hypercerts-org/hypercerts-lexicon/pull/113) [`c3f9ca2`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/c3f9ca2f5cb2c5da4d0f4272a74d06f6798e058b) Thanks [@holkexyz](https://github.com/holkexyz)! - Refactor collection items structure to support optional weights and remove activityWeight from activity schema + + **Breaking Changes:** + - **Activity lexicon (`org.hypercerts.claim.activity`):** + - Removed `org.hypercerts.claim.activity#activityWeight` def + - Activity records no longer include activity weight information + - **Collection lexicon (`org.hypercerts.claim.collection`):** + - Changed `org.hypercerts.claim.collection#items` from array of strongRefs to array of item objects + - Added `org.hypercerts.claim.collection#item` def with: + - `itemIdentifier` (required): strongRef to an item (activity or collection) + - `itemWeight` (optional): positive numeric value stored as string + - Supports recursive collection nesting (items can reference activities or other collections) + + **Migration:** + + **Collection items:** Convert from array of strongRefs to array of item objects: + + ```json + // Before + "items": [strongRef1, strongRef2] + + // After + "items": [ + { "itemIdentifier": strongRef1, "itemWeight": "1.5" }, + { "itemIdentifier": strongRef2 } + ] + ``` + + **Activity weights:** Migrate existing `org.hypercerts.claim.activity#activityWeight` data to collection `org.hypercerts.claim.collection#item.itemWeight`: + + ```json + // Old (removed from activity) + { "activity": { "uri": "...", "cid": "..." }, "weight": "1.5" } + + // New (in collection items) + { "itemIdentifier": { "uri": "...", "cid": "..." }, "itemWeight": "1.5" } + ``` + + Update collections that reference activities to include weights in `org.hypercerts.claim.collection#item.itemWeight`. Weights can be dropped if not needed. + +- [#149](https://github.com/hypercerts-org/hypercerts-lexicon/pull/149) [`9f124eb`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/9f124eb404e30a30ac90a6c4be934ece84556c08) Thanks [@daviddao](https://github.com/daviddao)! - Add `org.hyperboards.board` and `org.hyperboards.displayProfile` lexicons for hyperboard visual presentation records. + +- [#123](https://github.com/hypercerts-org/hypercerts-lexicon/pull/123) [`c623d32`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/c623d327e0e6c1a4f5ca92135ece284cfe166421) Thanks [@aspiers](https://github.com/aspiers)! - Add `location` property to collections. Collections can now reference a location record directly via strongRef. This replaces the sidecar pattern which was impractical since location records cannot be reused across multiple collections. + +- [#140](https://github.com/hypercerts-org/hypercerts-lexicon/pull/140) [`20eb414`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/20eb414bd75cb100bebe16cfb41286377c18d5e7) Thanks [@holkexyz](https://github.com/holkexyz)! - Add app.certified.actor.organization sidecar record for organization actor profiles with fields for organization type, labeled URLs, location (strongRef), and founded date + +- [#133](https://github.com/hypercerts-org/hypercerts-lexicon/pull/133) [`6752cad`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/6752cad3c9e58b9a8e1a3ca17f2ea7a4a68dba81) Thanks [@Kzoeps](https://github.com/Kzoeps)! - Add profile lexicon for Hypercert account profiles with support for display name, description, pronouns, website, avatar, banner. + +- [#78](https://github.com/hypercerts-org/hypercerts-lexicon/pull/78) [`c55d8a7`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/c55d8a77ff2949136bab0c6680b7e458712404f1) Thanks [@bitbeckers](https://github.com/bitbeckers)! - Remove org.hypercerts.claim.project lexicon and replace with org.hypercerts.claim.collection.project sidecar. Projects are now represented as collections with an optional project sidecar (same TID) that provides rich-text descriptions, avatars, and cover photos. Avatar and coverPhoto fields moved from base collection to project sidecar. Collections without the project sidecar are simple groupings; collections with it are "projects" with rich documentation. + +- [#91](https://github.com/hypercerts-org/hypercerts-lexicon/pull/91) [`0c6da09`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/0c6da093c8a38a3ee516a85b6bffee0850535b14) Thanks [@holkexyz](https://github.com/holkexyz)! - Add rich text facet support to activity claim descriptions + + Add `shortDescriptionFacets` and `descriptionFacets` fields to the activity lexicon to support rich text annotations (mentions, URLs, hashtags, etc.) in activity claim descriptions. + +- [#144](https://github.com/hypercerts-org/hypercerts-lexicon/pull/144) [`fb90134`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/fb90134e5df32e955e5f9fba748f4ca46d00e90e) Thanks [@holkexyz](https://github.com/holkexyz)! - Make items optional in collection schema to allow creating empty collections + +- [#151](https://github.com/hypercerts-org/hypercerts-lexicon/pull/151) [`4d5f42f`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/4d5f42fa4f9ae2c74a6703f3af50e9acfd09ae95) Thanks [@holkexyz](https://github.com/holkexyz)! - Add optional `url` field to `app.certified.badge.award` for linking to an external page associated with the badge + +- [#122](https://github.com/hypercerts-org/hypercerts-lexicon/pull/122) [`3e3da41`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/3e3da41df8016d4d7f63477000a01756704d0820) Thanks [@aspiers](https://github.com/aspiers)! - Drop HELPER\_ prefix from workScopeTag constants. `HELPER_WORK_SCOPE_TAG_NSID`, `HELPER_WORK_SCOPE_TAG_LEXICON_JSON`, and `HELPER_WORK_SCOPE_TAG_LEXICON_DOC` are now `WORK_SCOPE_TAG_NSID`, `WORK_SCOPE_TAG_LEXICON_JSON`, and `WORK_SCOPE_TAG_LEXICON_DOC`. + +- [#136](https://github.com/hypercerts-org/hypercerts-lexicon/pull/136) [`062fbde`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/062fbde905dbd939f75c366760be1c02bb8a0412) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Expand locationType knownValues to include geojson, h3, geohash, wkt, address, and scaledCoordinates from the [Location Protocol spec](https://spec.decentralizedgeo.org/specification/location-types/#location-type-registry) + +- [#131](https://github.com/hypercerts-org/hypercerts-lexicon/pull/131) [`7f42fad`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/7f42fad517e191dad6db22fc67ec8346ec167f5c) Thanks [@aspiers](https://github.com/aspiers)! - Add inline string format to app.certified.location schema with documentation and examples + +- [#121](https://github.com/hypercerts-org/hypercerts-lexicon/pull/121) [`5c33b79`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/5c33b796f78eca2a207116d246a715cd5712f392) Thanks [@aspiers](https://github.com/aspiers)! - Fix camelCase export names to use underscores. Generated constants like `CONTRIBUTIONDETAILS_LEXICON_*` are now `CONTRIBUTION_DETAILS_LEXICON_*` for consistency. + + Affected exports: + - `CONTRIBUTION_DETAILS_NSID`, `CONTRIBUTION_DETAILS_LEXICON_JSON`, `CONTRIBUTION_DETAILS_LEXICON_DOC` (was `CONTRIBUTIONDETAILS_*`) + - `CONTRIBUTOR_INFORMATION_NSID`, `CONTRIBUTOR_INFORMATION_LEXICON_JSON`, `CONTRIBUTOR_INFORMATION_LEXICON_DOC` (was `CONTRIBUTORINFORMATION_*`) + - `STRONG_REF_NSID`, `STRONG_REF_LEXICON_JSON`, `STRONG_REF_LEXICON_DOC` (was `STRONGREF_*`) + - `HELPER_WORK_SCOPE_TAG_NSID`, `HELPER_WORK_SCOPE_TAG_LEXICON_JSON`, `HELPER_WORK_SCOPE_TAG_LEXICON_DOC` (was `HELPER_WORKSCOPETAG_*`) + +- [#132](https://github.com/hypercerts-org/hypercerts-lexicon/pull/132) [`da481e0`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/da481e09f5bd1a8e62e388f2c6001896d76b1fbf) Thanks [@aspiers](https://github.com/aspiers)! - Convert app.certified.defs#did to object type + + The did definition in app.certified.defs has been converted from a primitive + string type to an object type to comply with the ATProto specification + requirement that all union variants must be object or record types. + + This change was necessary because app.certified.badge.award uses this + definition in a union for the subject property. + + Breaking changes: + - `app.certified.defs#did`: Now an object with `did` string property (maxLength 256) + - Code using this type must now access the `.did` property instead of using the value directly + +- [#132](https://github.com/hypercerts-org/hypercerts-lexicon/pull/132) [`e134b26`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/e134b26c43a70c0a9ae04cc12b8a3bd05990c470) Thanks [@aspiers](https://github.com/aspiers)! - Convert union string definitions to object types in activity lexicon + + The contributorIdentity, contributorRole, and workScopeString definitions + in org.hypercerts.claim.activity have been converted from primitive string + types to object types to comply with the ATProto specification requirement + that all union variants must be object or record types. + + Additionally, maximum length constraints have been reduced to more reasonable + values: + - `contributorIdentity.identity`: maxLength 1000, maxGraphemes 100 (previously no limits) + - `contributorRole.role`: maxLength 1000, maxGraphemes 100 (previously maxLength 10000, maxGraphemes 1000) + - `workScopeString.scope`: maxLength 1000, maxGraphemes 100 (previously maxLength 10000, maxGraphemes 1000) + + Breaking changes: + - `contributorIdentity`: Now an object with `identity` string property + - `contributorRole`: Now an object with `role` string property + - `workScopeString`: Now an object with `scope` string property + - Reduced maximum lengths may affect existing records with longer values + + This requires updating code that uses these union types to access the nested + property instead of using the value directly. + +- [#152](https://github.com/hypercerts-org/hypercerts-lexicon/pull/152) [`2afb6ed`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/2afb6edb89ffd186f2e0cf015bcc3557e13a7a6d) Thanks [@holkexyz](https://github.com/holkexyz)! - Use Leaflet linear documents for rich-text descriptions in activity and attachment lexicons, and make attachment content optional. + +- [#161](https://github.com/hypercerts-org/hypercerts-lexicon/pull/161) [`96bdb6c`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/96bdb6c9c7107680da301a92a8120ee60e676f15) Thanks [@aspiers](https://github.com/aspiers)! - Improved exports structure with semantic collection mappings for extra syntactic sugar. + + **Breaking Changes:** + - Renamed `ids` export to `HYPERCERTS_NSIDS_BY_TYPE` (maps type namespaces to NSIDs) + + **New Features:** + - Added `HYPERCERTS_NSIDS` object with semantic keys (e.g., `ACTIVITY`, `RIGHTS`, `CONTRIBUTION`) + - Added `HYPERCERTS_LEXICON_JSON` object with semantic keys mapping to raw JSON lexicons + - Added `HYPERCERTS_LEXICON_DOC` object with semantic keys mapping to typed lexicon documents + - All three new objects share the same key structure for consistency + + **Migration Guide:** + + If you were using the `ids` export (rare): + + ```typescript + // Before + import { ids } from "@hypercerts-org/lexicon"; + const nsid = ids.OrgHypercertsClaimActivity; + + // After + import { HYPERCERTS_NSIDS_BY_TYPE } from "@hypercerts-org/lexicon"; + const nsid = HYPERCERTS_NSIDS_BY_TYPE.OrgHypercertsClaimActivity; + ``` + + Most users should use individual NSID constants (unchanged): + + ```typescript + import { ACTIVITY_NSID, RIGHTS_NSID } from "@hypercerts-org/lexicon"; + ``` + + Or the new semantic mapping: + + ```typescript + import { HYPERCERTS_NSIDS } from "@hypercerts-org/lexicon"; + const nsid = HYPERCERTS_NSIDS.ACTIVITY; // Same as ACTIVITY_NSID + ``` + +- [#161](https://github.com/hypercerts-org/hypercerts-lexicon/pull/161) [`6a62c04`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/6a62c04e98950756a196110490cabd72f936a976) Thanks [@aspiers](https://github.com/aspiers)! - This release represents the migration of the lexicon package from the SDK monorepo (`hypercerts-sdk/packages/lexicon`) to a dedicated standalone repository (`hypercerts-lexicon`). This separation allows for independent versioning and development of the lexicon definitions. + + Major architectural and feature updates compared to the SDK lexicon package include but are not limited to the following: + + **New Lexicons:** + - Activity model: `org.hypercerts.claim.activity` - activity-based hypercert records (replaces single claim model) + - Project records: `org.hypercerts.claim.project` - projects that group multiple activities + - Shared definitions: `org.hypercerts.defs` - common types (uri, smallBlob, largeBlob, smallImage, largeImage) + - Badge system: `app.certified.badge.definition`, `app.certified.badge.award`, `app.certified.badge.response` for badge-based endorsements + - Funding receipts: `org.hypercerts.funding.receipt` - payment and funding tracking + + **Architectural Changes:** + - **Claim model**: Replaced single `org.hypercerts.claim` record with activity-based `org.hypercerts.claim.activity` model + - **Collection model**: Collections now reference activities (via `activityWeight`) instead of claims (via `claimItem`) + - **Work scope**: Activity model uses structured `workScope` object with label-based conditions (`withinAllOf`, `withinAnyOf`, `withinNoneOf`) + - **Time fields**: Activity uses `startDate`/`endDate` instead of `workTimeFrameFrom`/`workTimeFrameTo` + - **Image references**: Activity model references `org.hypercerts.defs#smallImage` instead of `app.certified.defs#uri`/`smallBlob` + + **Definition Updates:** + - `app.certified.defs` now includes `did` type definition + - Added `org.hypercerts.defs` with image and blob type definitions + - Activity model references project via AT-URI instead of strongRef + + **Removed/Replaced:** + - `org.hypercerts.claim` (replaced by `org.hypercerts.claim.activity`) + - Top-level `org.hypercerts.collection` (replaced by `org.hypercerts.claim.collection` using activities) + +- [#153](https://github.com/hypercerts-org/hypercerts-lexicon/pull/153) [`57dc44c`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/57dc44c163a6d62e4256e3de41ccf14617eb07e8) Thanks [@holkexyz](https://github.com/holkexyz)! - Improve acknowledgement schema: move to org.hypercerts.context.acknowledgement, generalize descriptions, make context optional, add maxGraphemes to comment. + +- [#158](https://github.com/hypercerts-org/hypercerts-lexicon/pull/158) [`7743aa6`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/7743aa6014faa35714d3e146cfa45b0e67501992) Thanks [@holkexyz](https://github.com/holkexyz)! - Move collection lexicon from `org.hypercerts.claim.collection` to `org.hypercerts.collection` to reflect that collections can contain more than just claims. + +- [#154](https://github.com/hypercerts-org/hypercerts-lexicon/pull/154) [`4c52b2c`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/4c52b2c9b2d449cbeb74eea9efa0a9eb2a0a39b7) Thanks [@holkexyz](https://github.com/holkexyz)! - Move evaluation and attachment lexicons to org.hypercerts.context namespace. + +- [#135](https://github.com/hypercerts-org/hypercerts-lexicon/pull/135) [`806cfbc`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/806cfbca7cbcd3674a5f8e97a6b6dd87ba806c08) Thanks [@Kzoeps](https://github.com/Kzoeps)! - Move profile lexicon from app.certified.profile to app.certified.actor.profile namespace, requiring migration of existing profile records + +- [#97](https://github.com/hypercerts-org/hypercerts-lexicon/pull/97) [`ceddab9`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/ceddab9e829d8ade3868eac4d10dd906e12a153c) Thanks [@aspiers](https://github.com/aspiers)! - Move schema documentation tables from README.md to auto-generated SCHEMAS.md to reduce git merge conflicts. The SCHEMAS.md file is now auto-generated from lexicon definitions and included in the distributed package. + +- [#102](https://github.com/hypercerts-org/hypercerts-lexicon/pull/102) [`68011ae`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/68011ae1f58dcc35408e2400c02dfa16559e18d6) Thanks [@holkexyz](https://github.com/holkexyz)! - Refactor contributions structure in activity lexicon + + **Breaking Changes:** + - **Activity lexicon (`org.hypercerts.claim.activity`):** + - Renamed `contributions` field to `contributors` + - Replaced `contributions` array (array of strongRefs) with new `contributors` array containing contributor objects + - Each contributor object (`org.hypercerts.claim.activity#contributor`) has three fields: + - `contributorIdentity` (required): string (DID/identifier) or strongRef to a contributor information record + - `contributionWeight` (optional): positive numeric value stored as string + - `contributionDetails` (optional): string or strongRef to a contribution details record + - Added internal defs: + - `#contributor`: object type for contributor entries + - `#contributorIdentity`: string type for DID/identifier values + - `#contributorRole`: string type for contribution details (maxLength 10000, maxGraphemes 1000) + + **Migration:** + + Convert from array of strongRefs to array of contributor objects: + + ```json + // Before + "contributions": [strongRef1, strongRef2] + + // After + "contributors": [ + { + "contributorIdentity": "did:example:123", + "contributionWeight": "1.5", + "contributionDetails": "Lead developer" + }, + { + "contributorIdentity": strongRefToContributorInfo, + "contributionDetails": strongRefToContributionDetails + } + ] + ``` + +- [#120](https://github.com/hypercerts-org/hypercerts-lexicon/pull/120) [`b2f7b68`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/b2f7b683ac17f07a891a59ee8289d26717197ba3) Thanks [@holkexyz](https://github.com/holkexyz)! - Refactor measurement lexicon schema: convert subject to subjects array, add unit field, date ranges, and locations array + + **Breaking Changes:** + - **Measurement lexicon (`org.hypercerts.context.measurement`):** + - Changed `subject` (single strongRef) to `subjects` (array of strongRefs, maxLength: 100) + - Changed required fields: removed `measurers` from required, added `unit` as required + - Added `unit` field (required, string, maxLength: 50): The unit of the measured value (e.g. kg CO₂e, hectares, %, index score) + - Added `startDate` field (optional, datetime): The start date and time when the measurement began + - Added `endDate` field (optional, datetime): The end date and time when the measurement ended + - Changed `location` (single strongRef) to `locations` (array of strongRefs, maxLength: 100) + - Moved `measurers` from required to optional field + - Added `comment` field (optional, string): Short comment suitable for previews and list views + - Added `commentFacets` field (optional, array): Rich text annotations for `comment` (mentions, URLs, hashtags, etc.) + - Updated field descriptions for `metric` and `value` with more detailed examples + +- [#67](https://github.com/hypercerts-org/hypercerts-lexicon/pull/67) [`b51dd76`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/b51dd7652b73c5ae6bba103f07eca9f5195809f0) Thanks [@bitbeckers](https://github.com/bitbeckers)! - Remove bidirectional project-activity link. Activities no longer include a `project` field reference. Projects continue to reference activities via the `activities` array, making the relationship unidirectional (project → activities only). + +- [#98](https://github.com/hypercerts-org/hypercerts-lexicon/pull/98) [`43b0431`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/43b04316d8cb11066d61d79e70f262f0d2426cde) Thanks [@aspiers](https://github.com/aspiers)! - Remove org.hypercerts.claim.collection.project lexicon + +- [#155](https://github.com/hypercerts-org/hypercerts-lexicon/pull/155) [`a59e541`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/a59e5418e242a2f6b2868cc46f5481d75a7bf0ca) Thanks [@holkexyz](https://github.com/holkexyz)! - Rename contributionDetails to contribution (org.hypercerts.claim.contribution). + +- [#118](https://github.com/hypercerts-org/hypercerts-lexicon/pull/118) [`8427780`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/8427780888759ee749a683528f49e6b0da2b97c2) Thanks [@holkexyz](https://github.com/holkexyz)! - Rename evidence lexicon to attachment and refactor schema structure + + **Breaking Changes:** + - **Lexicon ID change:** + - `org.hypercerts.claim.evidence` → `org.hypercerts.claim.attachment` + - All existing evidence records must be migrated to use the new lexicon ID + - **Schema structure changes (`org.hypercerts.claim.attachment`):** + - Changed `subject` (single strongRef) to `subjects` (array of strongRefs, maxLength: 100) + - Changed `content` from single union (uri/blob) to array of unions (maxLength: 100) + - Added `contentType` field (string, maxLength: 64) to specify attachment type + - Removed `relationType` field (previously used to indicate supports/challenges/clarifies) + - Removed `contributors` field + - Removed `locations` field + - Added rich text support: `shortDescriptionFacets` and `descriptionFacets` (arrays of `app.bsky.richtext.facet`) + - Updated required fields: `["title", "content", "createdAt"]` (content is now required) + - **Common definitions (`org.hypercerts.defs`):** + - Added `weightedContributor` def for contributor references with optional weights + - Added `contributorIdentity` def for string-based contributor identification + + **Migration:** + + **Lexicon ID:** Update all references from `org.hypercerts.claim.evidence` to `org.hypercerts.claim.attachment`. + + **Schema migration:** + + ```json + // Before (org.hypercerts.claim.evidence) + { + "$type": "org.hypercerts.claim.evidence", + "subject": { "uri": "...", "cid": "..." }, + "content": { "uri": "https://..." }, + "title": "Evidence Title", + "relationType": "supports", + "createdAt": "..." + } + + // After (org.hypercerts.claim.attachment) + { + "$type": "org.hypercerts.claim.attachment", + "subjects": [{ "uri": "...", "cid": "..." }], + "content": [{ "uri": "https://..." }], + "contentType": "evidence", + "title": "Evidence Title", + "createdAt": "..." + } + ``` + + **Field mapping:** + - `subject` → `subjects` (wrap in array) + - `content` (single) → `content` (array, wrap existing value) + - `relationType` → remove (no direct replacement) + - `contributors` → remove (no direct replacement) + - `locations` → remove (no direct replacement) + +- [#156](https://github.com/hypercerts-org/hypercerts-lexicon/pull/156) [`86f252d`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/86f252da1f755bac6e323142a2ed11a8c6e37cba) Thanks [@holkexyz](https://github.com/holkexyz)! - Require createdAt in app.certified.actor.profile schema + +- [#161](https://github.com/hypercerts-org/hypercerts-lexicon/pull/161) [`ec91289`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/ec912892497198741254a861fd9104fa7c6dc827) Thanks [@aspiers](https://github.com/aspiers)! - chore: switch to build via rollup + + Major build system improvements: + - **Build System**: Migrated from direct TypeScript to Rollup-based builds + - Generates proper ESM (`dist/index.mjs`) and CommonJS (`dist/index.cjs`) bundles + - Generates TypeScript declarations (`dist/index.d.ts`) + - Includes source maps for debugging + - Adds `/lexicons` export for lighter bundle (validation only) + - **Code Generation**: + - Auto-generates `generated/exports.ts` with clean, organized exports + - Creates type shims for external lexicons (@atcute/leaflet) + - All generated code now in `generated/` directory (gitignored) + - **Package Exports**: + - Main export: `@hypercerts-org/lexicon` (full package with types) + - Lexicons export: `@hypercerts-org/lexicon/lexicons` (schemas only, smaller bundle) + - Proper dual package support (ESM + CommonJS) + - **Code Quality**: + - Added ESLint configuration + - Added TypeScript type-checking to CI + - Improved build validation workflow + - **Dependencies**: + - Added `@atcute/leaflet` for external lexicon references + - Added `multiformats` as runtime dependency + - Moved `@atproto/lex-cli` to devDependencies (build-time only) + + **Migration**: No breaking changes for existing users. Package structure is improved + but import paths remain compatible. + +- [#125](https://github.com/hypercerts-org/hypercerts-lexicon/pull/125) [`771d142`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/771d14269ced86ea686cb6dac3414a7a283c482a) Thanks [@s-adamantine](https://github.com/s-adamantine)! - Simplify workScope to union of strongRef and string + + **Breaking Changes:** + - The `workScope` field in `org.hypercerts.claim.activity` is now a union of: + - `com.atproto.repo.strongRef`: A reference to a work-scope logic record for structured, nested work scope definitions + - `org.hypercerts.claim.activity#workScopeString`: A free-form string for simple or legacy scopes + - **Removed** from `org.hypercerts.defs`: + - `workScopeAll` (logical AND operator) + - `workScopeAny` (logical OR operator) + - `workScopeNot` (logical NOT operator) + - `workScopeAtom` (atomic scope reference) + + This simplification allows work scope complexity to be managed via referenced records while still supporting simple string-based scopes for straightforward use cases. + +- [#47](https://github.com/hypercerts-org/hypercerts-lexicon/pull/47) [`6a66e4b`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/6a66e4b78ef676cc66b35773f2f9828ea697d332) Thanks [@satyam-mishra-pce](https://github.com/satyam-mishra-pce)! - Add support for multiple locations in an activity claim. + +- [#103](https://github.com/hypercerts-org/hypercerts-lexicon/pull/103) [`b5d79da`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/b5d79da303ff7726c7a84b7568b18ee055ac0e81) Thanks [@s-adamantine](https://github.com/s-adamantine)! - Align all lexicons with the ATProto Lexicon Style Guide: change badge response `enum` to `knownValues`, add `maxLength`/`maxGraphemes` to unconstrained string and array fields, fix style checker to skip format-typed fields. + +- [#75](https://github.com/hypercerts-org/hypercerts-lexicon/pull/75) [`95e2ba1`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/95e2ba174ea348746ce64507bf94b73c3d3d3954) Thanks [@s-adamantine](https://github.com/s-adamantine)! - Unify project and collection schemas into a single + `org.hypercerts.claim.collection` lexicon with `type` discriminator + field to allow collections to be designated as projects. Custom + strings are also allowed in `type`. + + Also make `shortDescription` field optional in + `org.hypercerts.claim.collection` to match + `org.hypercerts.claim.project`. + + This unification removes `org.hypercerts.claim.project`, so existing + projects should be migrated to collections with `type` set to + `project`. + +- [#80](https://github.com/hypercerts-org/hypercerts-lexicon/pull/80) [`e8d5a7c`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/e8d5a7cd080e4f8d4e6b96ce5762678deaeb2902) Thanks [@s-adamantine](https://github.com/s-adamantine)! - Updated `org.hypercerts.claim.collection` lexicon: + - Added optional `type` field to specify collection type (e.g., 'favorites', 'project') + - Renamed fields for consistency: + - `collectionTitle` → `title` + - `shortCollectionDescription` → `shortDescription` + - `collectionDescription` → `description` + - Changed `description` from string to Leaflet linear document reference (`pub.leaflet.pages.linearDocument#main`) to support rich-text descriptions + + **Breaking changes**: + - Field names have been renamed (e.g., `collectionTitle` → `title`) + - The `description` field now expects a reference object instead of a plain string + +- [#92](https://github.com/hypercerts-org/hypercerts-lexicon/pull/92) [`bec8e63`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/bec8e63195fb73734b68f3d5201864b9bede0904) Thanks [@s-adamantine](https://github.com/s-adamantine)! - Update `org.hypercerts.claim.contributor` lexicon to support individual contributor profiles and roles. + + Breaking Changes: + - Removed `contributors` array. + - Added `identifier`, `displayName`, and `image` fields for individual profiles. + - Renamed `description` to `contributionDescription`. + - Updated `required` fields to only include `createdAt`. + + Also corrected incorrect references to `org.hypercerts.claim.contribution` across the codebase to use the correct ID `org.hypercerts.claim.contributor`. + +### Patch Changes + +- [#118](https://github.com/hypercerts-org/hypercerts-lexicon/pull/118) [`8427780`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/8427780888759ee749a683528f49e6b0da2b97c2) Thanks [@holkexyz](https://github.com/holkexyz)! - Add location property to attachment schema + + **New Feature:** + - **`location` field** (`org.hypercerts.claim.attachment`): + - Added optional `location` property as a strong reference (`com.atproto.repo.strongRef`) + - Allows attachments to associate location metadata directly without using the sidecar pattern + - The referenced record must conform to the `app.certified.location` lexicon + + **Usage:** + + ```json + { + "$type": "org.hypercerts.claim.attachment", + "subjects": [ + { + "uri": "at://did:plc:.../org.hypercerts.claim.activity/...", + "cid": "..." + } + ], + "content": [{ "uri": "https://..." }], + "title": "Field Report", + "location": { + "uri": "at://did:plc:.../app.certified.location/abc123", + "cid": "..." + }, + "createdAt": "..." + } + ``` + + This change aligns with the location property addition to collections (PR #123), providing a consistent pattern for associating location metadata across record types. + +- [#161](https://github.com/hypercerts-org/hypercerts-lexicon/pull/161) [`5a490bf`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/5a490bf4404f6690fe832f82023ea05663050977) Thanks [@aspiers](https://github.com/aspiers)! - Add basic test suite using vitest 4. + +- [#77](https://github.com/hypercerts-org/hypercerts-lexicon/pull/77) [`0d61ff7`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/0d61ff7e030a25682cd71877ae603b8782b09c3b) Thanks [@bitbeckers](https://github.com/bitbeckers)! - Document ATProto sidecar pattern for collections using app.certified.location. Collections can now have location metadata by creating a location record with the same TID, allowing location updates without changing the collection CID. Updated README with usage example and ERD with sidecar relationship. + +- [#161](https://github.com/hypercerts-org/hypercerts-lexicon/pull/161) [`ece7629`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/ece7629956d6efbfed757d66609fe4ccc1c81d5a) Thanks [@aspiers](https://github.com/aspiers)! - Include CHANGELOG.md in package distribution for better user documentation. + +- [#74](https://github.com/hypercerts-org/hypercerts-lexicon/pull/74) [`f845f92`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/f845f924907f62c8b96afa6a18ac203c4bd4cad5) Thanks [@aspiers](https://github.com/aspiers)! - Make startDate and endDate optional in activity lexicon + +- [#161](https://github.com/hypercerts-org/hypercerts-lexicon/pull/161) [`913eb06`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/913eb06bcec519552f45f5d9797579ce99be1635) Thanks [@aspiers](https://github.com/aspiers)! - Switch from bundled to individual type declaration files + + **Changes:** + - Removed `rollup-plugin-dts` dependency + - Switched to native TypeScript declaration generation + - Type declarations now mirror source structure in `dist/types/` + - Individual type files are small (1-3KB each) and lazy-loaded by TypeScript + - Improves IDE performance by avoiding single 39MB bundled declaration file + + **Technical Details:** + + The package now generates individual `.d.ts` files alongside the bundled JavaScript + output. This provides better IDE performance as TypeScript can lazy-load type files + on demand rather than parsing a massive bundled declaration file upfront. + ## 0.10.0-beta.16 ### Minor Changes diff --git a/package-lock.json b/package-lock.json index c88578d7..68505cb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hypercerts-org/lexicon", - "version": "0.10.0-beta.16", + "version": "0.10.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@hypercerts-org/lexicon", - "version": "0.10.0-beta.16", + "version": "0.10.0", "license": "MIT", "dependencies": { "@atcute/bluesky": "^3.2.15", diff --git a/package.json b/package.json index 8c8a7311..22c61c4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hypercerts-org/lexicon", - "version": "0.10.0-beta.16", + "version": "0.10.0", "description": "ATProto lexicon definitions and TypeScript types for the Hypercerts protocol", "type": "module", "main": "./dist/index.cjs",