@hypercerts-org/lexicon 0.10.0-beta.14 → 0.10.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +117 -12
  3. package/SCHEMAS.md +300 -158
  4. package/dist/exports.d.ts +604 -171
  5. package/dist/exports.d.ts.map +1 -1
  6. package/dist/generated/exports.d.ts +604 -171
  7. package/dist/generated/exports.d.ts.map +1 -1
  8. package/dist/generated/lexicons.d.ts +1256 -440
  9. package/dist/generated/lexicons.d.ts.map +1 -1
  10. package/dist/generated/types/app/certified/actor/organization.d.ts +32 -0
  11. package/dist/generated/types/app/certified/actor/organization.d.ts.map +1 -0
  12. package/dist/generated/types/app/certified/actor/profile.d.ts +4 -1
  13. package/dist/generated/types/app/certified/actor/profile.d.ts.map +1 -1
  14. package/dist/generated/types/app/certified/badge/award.d.ts +2 -0
  15. package/dist/generated/types/app/certified/badge/award.d.ts.map +1 -1
  16. package/dist/generated/types/app/certified/badge/response.d.ts +1 -1
  17. package/dist/generated/types/app/certified/badge/response.d.ts.map +1 -1
  18. package/dist/generated/types/app/certified/location.d.ts +4 -4
  19. package/dist/generated/types/app/certified/location.d.ts.map +1 -1
  20. package/dist/generated/types/org/hyperboards/board.d.ts +75 -0
  21. package/dist/generated/types/org/hyperboards/board.d.ts.map +1 -0
  22. package/dist/generated/types/org/hyperboards/displayProfile.d.ts +31 -0
  23. package/dist/generated/types/org/hyperboards/displayProfile.d.ts.map +1 -0
  24. package/dist/generated/types/org/hypercerts/claim/activity.d.ts +8 -9
  25. package/dist/generated/types/org/hypercerts/claim/activity.d.ts.map +1 -1
  26. package/dist/generated/types/org/hypercerts/claim/{contributionDetails.d.ts → contribution.d.ts} +6 -6
  27. package/dist/generated/types/org/hypercerts/claim/contribution.d.ts.map +1 -0
  28. package/dist/generated/types/org/hypercerts/claim/contributorInformation.d.ts +2 -2
  29. package/dist/generated/types/org/hypercerts/claim/contributorInformation.d.ts.map +1 -1
  30. package/dist/generated/types/org/hypercerts/claim/rights.d.ts +3 -3
  31. package/dist/generated/types/org/hypercerts/claim/rights.d.ts.map +1 -1
  32. package/dist/{types/org/hypercerts/claim → generated/types/org/hypercerts}/collection.d.ts +10 -10
  33. package/dist/generated/types/org/hypercerts/collection.d.ts.map +1 -0
  34. package/dist/generated/types/org/hypercerts/context/acknowledgement.d.ts +25 -0
  35. package/dist/generated/types/org/hypercerts/context/acknowledgement.d.ts.map +1 -0
  36. package/dist/generated/types/org/hypercerts/{claim → context}/attachment.d.ts +6 -8
  37. package/dist/generated/types/org/hypercerts/context/attachment.d.ts.map +1 -0
  38. package/dist/generated/types/org/hypercerts/{claim → context}/evaluation.d.ts +15 -15
  39. package/dist/generated/types/org/hypercerts/context/evaluation.d.ts.map +1 -0
  40. package/dist/{types/org/hypercerts/claim → generated/types/org/hypercerts/context}/measurement.d.ts +7 -6
  41. package/dist/generated/types/org/hypercerts/context/measurement.d.ts.map +1 -0
  42. package/dist/generated/types/org/hypercerts/defs.d.ts +8 -0
  43. package/dist/generated/types/org/hypercerts/defs.d.ts.map +1 -1
  44. package/dist/generated/types/org/hypercerts/funding/receipt.d.ts +1 -1
  45. package/dist/generated/types/org/hypercerts/funding/receipt.d.ts.map +1 -1
  46. package/dist/generated/types/org/hypercerts/workscope/cel.d.ts +20 -0
  47. package/dist/generated/types/org/hypercerts/workscope/cel.d.ts.map +1 -0
  48. package/dist/generated/types/org/hypercerts/workscope/tag.d.ts +36 -0
  49. package/dist/generated/types/org/hypercerts/workscope/tag.d.ts.map +1 -0
  50. package/dist/index.cjs +1931 -805
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.mjs +1883 -777
  53. package/dist/index.mjs.map +1 -1
  54. package/dist/lexicons.cjs +689 -240
  55. package/dist/lexicons.cjs.map +1 -1
  56. package/dist/lexicons.d.ts +1256 -440
  57. package/dist/lexicons.d.ts.map +1 -1
  58. package/dist/lexicons.mjs +689 -240
  59. package/dist/lexicons.mjs.map +1 -1
  60. package/dist/types/app/certified/actor/organization.d.ts +32 -0
  61. package/dist/types/app/certified/actor/organization.d.ts.map +1 -0
  62. package/dist/types/app/certified/actor/profile.d.ts +4 -1
  63. package/dist/types/app/certified/actor/profile.d.ts.map +1 -1
  64. package/dist/types/app/certified/badge/award.d.ts +2 -0
  65. package/dist/types/app/certified/badge/award.d.ts.map +1 -1
  66. package/dist/types/app/certified/badge/response.d.ts +1 -1
  67. package/dist/types/app/certified/badge/response.d.ts.map +1 -1
  68. package/dist/types/app/certified/location.d.ts +4 -4
  69. package/dist/types/app/certified/location.d.ts.map +1 -1
  70. package/dist/types/org/hyperboards/board.d.ts +75 -0
  71. package/dist/types/org/hyperboards/board.d.ts.map +1 -0
  72. package/dist/types/org/hyperboards/displayProfile.d.ts +31 -0
  73. package/dist/types/org/hyperboards/displayProfile.d.ts.map +1 -0
  74. package/dist/types/org/hypercerts/claim/activity.d.ts +8 -9
  75. package/dist/types/org/hypercerts/claim/activity.d.ts.map +1 -1
  76. package/dist/types/org/hypercerts/claim/{contributionDetails.d.ts → contribution.d.ts} +6 -6
  77. package/dist/types/org/hypercerts/claim/contribution.d.ts.map +1 -0
  78. package/dist/types/org/hypercerts/claim/contributorInformation.d.ts +2 -2
  79. package/dist/types/org/hypercerts/claim/contributorInformation.d.ts.map +1 -1
  80. package/dist/types/org/hypercerts/claim/rights.d.ts +3 -3
  81. package/dist/types/org/hypercerts/claim/rights.d.ts.map +1 -1
  82. package/dist/{generated/types/org/hypercerts/claim → types/org/hypercerts}/collection.d.ts +10 -10
  83. package/dist/types/org/hypercerts/collection.d.ts.map +1 -0
  84. package/dist/types/org/hypercerts/context/acknowledgement.d.ts +25 -0
  85. package/dist/types/org/hypercerts/context/acknowledgement.d.ts.map +1 -0
  86. package/dist/types/org/hypercerts/{claim → context}/attachment.d.ts +6 -8
  87. package/dist/types/org/hypercerts/context/attachment.d.ts.map +1 -0
  88. package/dist/types/org/hypercerts/{claim → context}/evaluation.d.ts +15 -15
  89. package/dist/types/org/hypercerts/context/evaluation.d.ts.map +1 -0
  90. package/dist/{generated/types/org/hypercerts/claim → types/org/hypercerts/context}/measurement.d.ts +7 -6
  91. package/dist/types/org/hypercerts/context/measurement.d.ts.map +1 -0
  92. package/dist/types/org/hypercerts/defs.d.ts +8 -0
  93. package/dist/types/org/hypercerts/defs.d.ts.map +1 -1
  94. package/dist/types/org/hypercerts/funding/receipt.d.ts +1 -1
  95. package/dist/types/org/hypercerts/funding/receipt.d.ts.map +1 -1
  96. package/dist/types/org/hypercerts/workscope/cel.d.ts +20 -0
  97. package/dist/types/org/hypercerts/workscope/cel.d.ts.map +1 -0
  98. package/dist/types/org/hypercerts/workscope/tag.d.ts +36 -0
  99. package/dist/types/org/hypercerts/workscope/tag.d.ts.map +1 -0
  100. package/lexicons/app/certified/actor/organization.json +70 -0
  101. package/lexicons/app/certified/actor/profile.json +13 -3
  102. package/lexicons/app/certified/badge/award.json +8 -1
  103. package/lexicons/app/certified/badge/definition.json +8 -3
  104. package/lexicons/app/certified/badge/response.json +3 -2
  105. package/lexicons/app/certified/location.json +13 -4
  106. package/lexicons/org/hyperboards/board.json +152 -0
  107. package/lexicons/org/hyperboards/displayProfile.json +64 -0
  108. package/lexicons/org/hypercerts/claim/activity.json +23 -29
  109. package/lexicons/org/hypercerts/claim/{contributionDetails.json → contribution.json} +4 -4
  110. package/lexicons/org/hypercerts/claim/contributorInformation.json +3 -2
  111. package/lexicons/org/hypercerts/claim/rights.json +5 -3
  112. package/lexicons/org/hypercerts/{claim/collection.json → collection.json} +9 -6
  113. package/lexicons/org/hypercerts/context/acknowledgement.json +42 -0
  114. package/lexicons/org/hypercerts/{claim → context}/attachment.json +6 -15
  115. package/lexicons/org/hypercerts/{claim → context}/evaluation.json +22 -22
  116. package/lexicons/org/hypercerts/{claim → context}/measurement.json +13 -9
  117. package/lexicons/org/hypercerts/defs.json +14 -1
  118. package/lexicons/org/hypercerts/funding/receipt.json +12 -6
  119. package/lexicons/org/hypercerts/workscope/cel.json +39 -0
  120. package/lexicons/org/hypercerts/workscope/tag.json +87 -0
  121. package/package.json +1 -1
  122. package/dist/generated/types/org/hypercerts/claim/attachment.d.ts.map +0 -1
  123. package/dist/generated/types/org/hypercerts/claim/collection.d.ts.map +0 -1
  124. package/dist/generated/types/org/hypercerts/claim/contributionDetails.d.ts.map +0 -1
  125. package/dist/generated/types/org/hypercerts/claim/evaluation.d.ts.map +0 -1
  126. package/dist/generated/types/org/hypercerts/claim/measurement.d.ts.map +0 -1
  127. package/dist/generated/types/org/hypercerts/helper/workScopeTag.d.ts +0 -31
  128. package/dist/generated/types/org/hypercerts/helper/workScopeTag.d.ts.map +0 -1
  129. package/dist/types/org/hypercerts/claim/attachment.d.ts.map +0 -1
  130. package/dist/types/org/hypercerts/claim/collection.d.ts.map +0 -1
  131. package/dist/types/org/hypercerts/claim/contributionDetails.d.ts.map +0 -1
  132. package/dist/types/org/hypercerts/claim/evaluation.d.ts.map +0 -1
  133. package/dist/types/org/hypercerts/claim/measurement.d.ts.map +0 -1
  134. package/dist/types/org/hypercerts/helper/workScopeTag.d.ts +0 -31
  135. package/dist/types/org/hypercerts/helper/workScopeTag.d.ts.map +0 -1
  136. package/lexicons/org/hypercerts/helper/workScopeTag.json +0 -65
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @hypercerts-org/lexicon
2
2
 
3
+ ## 0.10.0-beta.16
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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`)
8
+
9
+ - [#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.
10
+
11
+ - [#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
12
+
13
+ - [#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
14
+
15
+ - [#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
16
+
17
+ - [#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.
18
+
19
+ - [#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.
20
+
21
+ - [#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.
22
+
23
+ - [#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.
24
+
25
+ - [#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).
26
+
27
+ - [#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
28
+
29
+ - [#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.
30
+
31
+ ## 0.10.0-beta.15
32
+
33
+ ### Minor Changes
34
+
35
+ - [#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
36
+
37
+ - [#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)
38
+
3
39
  ## 0.10.0-beta.14
4
40
 
5
41
  ### Minor Changes
package/README.md CHANGED
@@ -65,12 +65,27 @@ const activityRecord = {
65
65
  $type: ACTIVITY_NSID,
66
66
  title: "My Impact Work",
67
67
  shortDescription: "Description here",
68
- // workScope can be a strongRef to a work-scope record:
68
+ // workScope can be a CEL expression (structured, machine-evaluable):
69
69
  workScope: {
70
- uri: "at://did:plc:alice/org.hypercerts.helper.workScopeTag/abc123",
71
- cid: "...",
70
+ $type: "org.hypercerts.workscope.cel",
71
+ expression:
72
+ "scope.hasAll(['mangrove_restoration', 'environmental_education']) && location.country == 'KE'",
73
+ usedTags: [
74
+ {
75
+ uri: "at://did:plc:alice/org.hypercerts.workscope.tag/3k2abc",
76
+ cid: "...",
77
+ },
78
+ {
79
+ uri: "at://did:plc:alice/org.hypercerts.workscope.tag/7x9def",
80
+ cid: "...",
81
+ },
82
+ ],
83
+ version: "v1",
84
+ createdAt: new Date().toISOString(),
72
85
  },
73
- // OR a simple string: workScope: "Environmental conservation",
86
+ // OR a strongRef to a single work scope tag:
87
+ // workScope: { uri: "at://did:plc:alice/org.hypercerts.workscope.tag/abc123", cid: "..." },
88
+ // OR a simple string: workScope: { $type: "org.hypercerts.claim.activity#workScopeString", scope: "Environmental conservation" },
74
89
  startDate: "2023-01-01T00:00:00Z",
75
90
  endDate: "2023-12-31T23:59:59Z",
76
91
  createdAt: new Date().toISOString(),
@@ -102,7 +117,7 @@ const locationRecord = {
102
117
  $type: LOCATION_NSID,
103
118
  lpVersion: "1.0", // Location Protocol version
104
119
  srs: "http://www.opengis.net/def/crs/OGC/1.3/CRS84", // Spatial Reference System
105
- locationType: "coordinate-decimal", // or "geojson-point"
120
+ locationType: "coordinate-decimal", // or "geojson-point", "geojson", "h3", "geohash", "wkt", "address", etc.
106
121
  location: {
107
122
  uri: "https://example.com/location-data.geojson",
108
123
  },
@@ -115,7 +130,7 @@ const locationRecord = {
115
130
 
116
131
  - `lpVersion` (required): Version of the Location Protocol specification
117
132
  - `srs` (required): Spatial Reference System URI defining the coordinate system
118
- - `locationType` (required): Format identifier (e.g., "coordinate-decimal", "geojson-point")
133
+ - `locationType` (required): Format identifier (e.g., "coordinate-decimal", "geojson-point", "geojson", "h3", "geohash", "wkt", "address", "scaledCoordinates"). See the [Location Protocol spec](https://spec.decentralizedgeo.org/specification/location-types/#location-type-registry) for the full registry.
119
134
  - `location` (required): Location data as URI, blob, or string
120
135
  - `name` (optional): Human-readable name for the location
121
136
  - `description` (optional): Additional context about the location
@@ -210,7 +225,7 @@ import { HYPERCERTS_NSIDS_BY_TYPE } from "@hypercerts-org/lexicon";
210
225
 
211
226
  // Access via type namespace names
212
227
  const activityId = HYPERCERTS_NSIDS_BY_TYPE.OrgHypercertsClaimActivity;
213
- const collectionId = HYPERCERTS_NSIDS_BY_TYPE.OrgHypercertsClaimCollection;
228
+ const collectionId = HYPERCERTS_NSIDS_BY_TYPE.OrgHypercertsCollection;
214
229
  ```
215
230
 
216
231
  **Lightweight Bundle**: Import from `/lexicons` for runtime validation without TypeScript types (smaller bundle size):
@@ -282,13 +297,36 @@ property tables, see [SCHEMAS.md](SCHEMAS.md).
282
297
 
283
298
  ## Examples
284
299
 
285
- ### Creating a Collection with Nested Items
300
+ ### Collections
301
+
302
+ Collections (`org.hypercerts.collection`) are named sets of references to
303
+ other records, for any purpose the creator chooses. They live at the
304
+ top-level namespace (not under `claim`) because they can contain more than
305
+ just claims.
306
+
307
+ #### Use Cases
308
+
309
+ - Defining which activity claims belong to a project
310
+ - Collections of projects
311
+ - Favourites lists
312
+ - Items associated with a particular funding round or funder
313
+ - Portfolios of work by a contributor or organization
314
+ - Thematic groupings (by work scope/topic)
315
+ - Curated showcases for display (e.g. a hyperboard)
316
+ - Milestone groupings (activities in a sprint/cycle)
317
+ - Geographic groupings (projects or locations in a region)
318
+ - Collections for reporting (e.g. all claims in a grant report)
319
+
320
+ **Note**: Hyperboards are a separate concern — they are visualisations
321
+ built on top of collections, not collections themselves.
322
+
323
+ #### Creating a Collection with Nested Items
286
324
 
287
325
  ```typescript
288
326
  import { TID } from "@atproto/common";
289
327
 
290
328
  const collectionRecord = {
291
- $type: "org.hypercerts.claim.collection",
329
+ $type: "org.hypercerts.collection",
292
330
  title: "Climate Action Projects",
293
331
  shortDescription:
294
332
  "A collection of climate-related activities and sub-collections",
@@ -305,7 +343,7 @@ const collectionRecord = {
305
343
  },
306
344
  // Reference to another collection (recursive!)
307
345
  {
308
- uri: "at://did:plc:carol/org.hypercerts.claim.collection/4m5ghi",
346
+ uri: "at://did:plc:carol/org.hypercerts.collection/4m5ghi",
309
347
  cid: "...",
310
348
  },
311
349
  ],
@@ -320,7 +358,7 @@ include rich-text descriptions:
320
358
 
321
359
  ```typescript
322
360
  const projectRecord = {
323
- $type: "org.hypercerts.claim.collection",
361
+ $type: "org.hypercerts.collection",
324
362
  type: "project",
325
363
  title: "Carbon Offset Initiative",
326
364
  shortDescription: "A project focused on carbon reduction and reforestation",
@@ -373,6 +411,73 @@ const collectionRecord = {
373
411
  are optional and support either embedded image blobs or URI references to
374
412
  external images.
375
413
 
414
+ ### Acknowledging Inclusion
415
+
416
+ The `org.hypercerts.context.acknowledgement` record enables bidirectional
417
+ linking between records that live in different PDS repositories. When
418
+ one user includes another user's record (e.g. adding an activity to a
419
+ collection), the owner of the included record can create an
420
+ acknowledgement to confirm or reject the inclusion. This forms a
421
+ two-way link that an AppView can verify.
422
+
423
+ Each acknowledgement uses `com.atproto.repo.strongRef` fields to
424
+ reference both the **subject** (the record being included) and the
425
+ **context** (the record it's being included in).
426
+
427
+ See [SCHEMAS.md](SCHEMAS.md) for the full property reference.
428
+
429
+ #### Use Case: Activity Included in a Collection
430
+
431
+ A project organizer (Alice) creates a collection and adds Bob's
432
+ activity to it via a `strongRef` in the collection's `items[]` array.
433
+ Bob then creates an acknowledgement in his own repo to confirm:
434
+
435
+ ```typescript
436
+ import { ACKNOWLEDGEMENT_NSID } from "@hypercerts-org/lexicon";
437
+
438
+ // Bob acknowledges that his activity is included in Alice's collection
439
+ const ack = {
440
+ $type: ACKNOWLEDGEMENT_NSID,
441
+ subject: {
442
+ uri: "at://did:plc:bob/org.hypercerts.claim.activity/3k2abc",
443
+ cid: "bafy...",
444
+ },
445
+ context: {
446
+ uri: "at://did:plc:alice/org.hypercerts.collection/7x9def",
447
+ cid: "bafy...",
448
+ },
449
+ acknowledged: true,
450
+ createdAt: new Date().toISOString(),
451
+ };
452
+ ```
453
+
454
+ #### Use Case: Contributor Included in an Activity
455
+
456
+ Alice creates an activity that lists Bob as a contributor. Bob creates
457
+ an acknowledgement in his own repo to confirm his participation:
458
+
459
+ ```typescript
460
+ const ack = {
461
+ $type: ACKNOWLEDGEMENT_NSID,
462
+ subject: {
463
+ // Bob's contributor information record
464
+ uri: "at://did:plc:bob/org.hypercerts.claim.contributorInformation/abc123",
465
+ cid: "bafy...",
466
+ },
467
+ context: {
468
+ // Alice's activity that lists Bob as contributor
469
+ uri: "at://did:plc:alice/org.hypercerts.claim.activity/3k2abc",
470
+ cid: "bafy...",
471
+ },
472
+ acknowledged: true,
473
+ comment: "Confirming my contribution to this reforestation project",
474
+ createdAt: new Date().toISOString(),
475
+ };
476
+ ```
477
+
478
+ Setting `acknowledged: false` explicitly rejects inclusion, which an
479
+ AppView can use to flag disputed associations.
480
+
376
481
  ### Adding Locations to Activities
377
482
 
378
483
  The `locations` field in activity records is an array of strong references
@@ -396,7 +501,7 @@ Collections can include an optional `location` field to specify where the collec
396
501
 
397
502
  ```typescript
398
503
  const collectionRecord = {
399
- $type: "org.hypercerts.claim.collection",
504
+ $type: "org.hypercerts.collection",
400
505
  title: "Climate Action Projects",
401
506
  shortDescription: "A collection of climate-related activities",
402
507
  location: {