Skip to content

Commit 4f40a1e

Browse files
chore: version packages (beta)
- @hypercerts-org/sdk-core: 0.10.0-beta.5 - @hypercerts-org/sdk-react: 0.10.0-beta.6
1 parent 6416976 commit 4f40a1e

5 files changed

Lines changed: 254 additions & 3 deletions

File tree

.changeset/pre.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
"@hypercerts-org/sdk-react": "0.10.0"
77
},
88
"changesets": [
9+
"add-project-support",
10+
"base-operations",
911
"configurable-agent-routing",
12+
"custom-lexicon-docs",
1013
"five-seas-do",
14+
"fix-add-evidence",
1115
"fix-collaborator-permissions-format",
1216
"fix-create-org-params",
1317
"fix-errant-changelog-versions",
@@ -22,8 +26,15 @@
2226
"ignore-local-npmrc",
2327
"initial-sdk-core-release",
2428
"initial-sdk-react-release",
29+
"lexicon-registry-support",
30+
"lexicon-utilities",
31+
"loopback-url-support",
2532
"migrate-to-lexicon-package",
2633
"oauth-permissions-and-email",
27-
"pagination-and-react-hooks-fix"
34+
"pagination-and-react-hooks-fix",
35+
"react-lexicon-registry",
36+
"record-validation",
37+
"refactor-location-attachment",
38+
"sdk-lexicon-integration"
2839
]
2940
}

packages/sdk-core/CHANGELOG.md

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,158 @@
11
# @hypercerts-org/sdk-core
22

3+
## 0.10.0-beta.5
4+
5+
### Minor Changes
6+
7+
- [#87](https://github.com/hypercerts-org/hypercerts-sdk/pull/87)
8+
[`85b1350`](https://github.com/hypercerts-org/hypercerts-sdk/commit/85b13502791e49966dae3d0dd0e833905c59abe3) Thanks
9+
[@bitbeckers](https://github.com/bitbeckers)! - Add comprehensive project support to SDK
10+
11+
**Core SDK (`@hypercerts-org/sdk-core`):**
12+
- Add project CRUD operations (createProject, getProject, listProjects, updateProject, deleteProject)
13+
- Add project events (projectCreated, projectUpdated, projectDeleted)
14+
- Support for avatar and coverPhoto blob uploads
15+
- Activities array with weight values
16+
- Location reference support
17+
- 34 comprehensive tests with full coverage
18+
19+
**React SDK (`@hypercerts-org/sdk-react`):**
20+
- Add useProjects and useProject hooks
21+
- Project query keys for cache management
22+
- TypeScript types for projects (Project, CreateProjectParams, UpdateProjectParams)
23+
- Test factory support for project hooks
24+
- Full pagination and optimistic updates support
25+
26+
Projects organize multiple hypercert activities with metadata including title, shortDescription, description (Leaflet
27+
documents), avatar, cover photo, activities with weights, and location references.
28+
29+
- [#98](https://github.com/hypercerts-org/hypercerts-sdk/pull/98)
30+
[`f9dd27f`](https://github.com/hypercerts-org/hypercerts-sdk/commit/f9dd27f78de0ee49aab9079e76566f272b161cd0) Thanks
31+
[@bitbeckers](https://github.com/bitbeckers)! - Add BaseOperations abstract class for building custom lexicon
32+
operations. Developers can now extend BaseOperations to create type-safe, validated operation classes for their custom
33+
lexicons, with built-in helpers for record creation, validation, and strongRef management.
34+
35+
- [#98](https://github.com/hypercerts-org/hypercerts-sdk/pull/98)
36+
[`e850310`](https://github.com/hypercerts-org/hypercerts-sdk/commit/e850310d26e0561bdcfb778a6ef3bedbb7453eed) Thanks
37+
[@bitbeckers](https://github.com/bitbeckers)! - Add comprehensive documentation and examples for custom lexicons.
38+
Includes custom-lexicons.md guide, sidecar-pattern.md guide, and a complete working example with tests demonstrating
39+
how to create and use custom lexicons for evaluating hypercerts.
40+
41+
- [#84](https://github.com/hypercerts-org/hypercerts-sdk/pull/84)
42+
[`3157c18`](https://github.com/hypercerts-org/hypercerts-sdk/commit/3157c188c70e2f9473ee14eddaf635e3fbd346a1) Thanks
43+
[@Kzoeps](https://github.com/Kzoeps)! - Evidence records are now created separately instead of being embedded inline
44+
in hypercerts
45+
- `create()` now calls `addEvidence()` for each evidence item using `Promise.all()` for parallel creation
46+
- Remove inline evidence embedding from hypercert records
47+
- Add `evidenceUris?: string[]` to `CreateHypercertResult` interface
48+
- Add `createEvidenceWithProgress()` helper method with "addEvidence" progress tracking
49+
- `addEvidence()` SDK constructs `$type`, `createdAt`, and `subject` fields internally
50+
51+
**Breaking Changes:**
52+
- Evidence is no longer embedded in the hypercert record - use `result.evidenceUris` to access evidence record URIs
53+
- `addEvidence()` now accepts a single `CreateHypercertEvidenceParams` object instead of
54+
`(uri: string, evidence: HypercertEvidence[])`
55+
56+
- [#98](https://github.com/hypercerts-org/hypercerts-sdk/pull/98)
57+
[`0cd3b26`](https://github.com/hypercerts-org/hypercerts-sdk/commit/0cd3b26eb779246e9ef094f614f2f77807926f1b) Thanks
58+
[@bitbeckers](https://github.com/bitbeckers)! - Add LexiconRegistry for custom lexicon management. Developers can now
59+
register custom lexicon schemas at runtime and validate records against registered schemas before creation. The
60+
registry supports:
61+
- Registering custom lexicon definitions from JSON
62+
- Validating records against registered schemas
63+
- Querying registered lexicons
64+
- Managing lexicon lifecycle (register/unregister)
65+
66+
This enables developers to extend the SDK with custom record types that can reference hypercerts and other records
67+
using strongRefs.
68+
69+
- [#98](https://github.com/hypercerts-org/hypercerts-sdk/pull/98)
70+
[`b87cb22`](https://github.com/hypercerts-org/hypercerts-sdk/commit/b87cb2265d924b531eef8d58c669dc931b61e561) Thanks
71+
[@bitbeckers](https://github.com/bitbeckers)! - Add lexicon development utilities for custom lexicons. Developers can
72+
now use helper functions for AT-URI parsing, strongRef creation, lexicon schema building, and sidecar pattern
73+
implementation. This includes:
74+
- AT-URI utilities: parseAtUri, buildAtUri, extractRkeyFromUri, isValidAtUri
75+
- StrongRef utilities: createStrongRef, createStrongRefFromResult, validateStrongRef
76+
- Lexicon builders: createStringField, createIntegerField, createStrongRefField, createRecordDef, createLexiconDoc,
77+
and more
78+
- Sidecar pattern: createSidecarRecord, attachSidecar, createWithSidecars, batchCreateSidecars
79+
80+
- [#88](https://github.com/hypercerts-org/hypercerts-sdk/pull/88)
81+
[`19c78df`](https://github.com/hypercerts-org/hypercerts-sdk/commit/19c78dfef448fb43d353d95721c13f3a35618fb3) Thanks
82+
[@bitbeckers](https://github.com/bitbeckers)! - feat: add HTTP loopback URL support for local development
83+
84+
Enable local development and testing with HTTP loopback URLs (`http://localhost`, `http://127.0.0.1`, `http://[::1]`)
85+
while maintaining security for production deployments.
86+
87+
**Configuration Updates**
88+
- Custom URL validator accepting HTTPS URLs or HTTP loopback addresses
89+
- Update `OAuthConfigSchema` to allow loopback URLs for `clientId`, `redirectUri`, `jwksUri`
90+
- Add optional `developmentMode` boolean flag to suppress warnings
91+
- Update `ServerConfigSchema` to allow loopback URLs for PDS/SDS servers
92+
- Export `isLoopbackUrl()` helper function and TypeScript types (`LoopbackUrl`, `HttpsUrl`,
93+
`DevelopmentOrProductionUrl`)
94+
95+
**Development Mode Features**
96+
- Automatic loopback detection with informative logging
97+
- Warning when using loopback URLs without explicit `developmentMode` flag
98+
- Info logs indicating development mode is active
99+
- Clear guidance about authorization server requirements
100+
101+
**Testing**
102+
- 28 new unit tests for loopback URL validation
103+
- Tests cover localhost, 127.0.0.1, and [::1] (IPv6) loopback addresses
104+
- Tests verify rejection of non-loopback HTTP URLs
105+
- Tests ensure HTTPS URLs always accepted
106+
107+
**Documentation**
108+
- Comprehensive local development guide in Core SDK README
109+
- NextJS App Router example with loopback configuration
110+
- API route setup examples (OAuth callback, JWKS endpoint)
111+
- Important notes about authorization server support and production safety
112+
- Local development example added to React SDK factory JSDoc
113+
114+
**Breaking Changes**: None - fully backward compatible
115+
116+
**Migration**: No migration needed for existing configurations. Existing HTTPS URLs continue to work without changes.
117+
118+
This feature enables developers to test the SDK locally without requiring HTTPS certificates, while the underlying
119+
`@atproto/oauth-client-node` library handles loopback OAuth flows per the AT Protocol specification.
120+
121+
- [#98](https://github.com/hypercerts-org/hypercerts-sdk/pull/98)
122+
[`3554580`](https://github.com/hypercerts-org/hypercerts-sdk/commit/3554580d77d9467c88c779e75a96a08d3e17bfd7) Thanks
123+
[@bitbeckers](https://github.com/bitbeckers)! - Add automatic lexicon validation to RecordOperations. Records are now
124+
validated against registered lexicon schemas before being sent to the server, catching schema violations early.
125+
Validation can be bypassed using the `skipValidation` parameter for advanced use cases.
126+
127+
- [#96](https://github.com/hypercerts-org/hypercerts-sdk/pull/96)
128+
[`eea06a7`](https://github.com/hypercerts-org/hypercerts-sdk/commit/eea06a7f5e4f655ccac635fa8842ea32a6dfde64) Thanks
129+
[@Kzoeps](https://github.com/Kzoeps)! - Refactor location attachment to match lexicon specifications
130+
131+
**New Features:**
132+
- Add `AttachLocationParams` interface exported from SDK for type-safe location attachment
133+
- Location data now properly uses `org.hypercerts.defs#uri` (for string URIs) or `org.hypercerts.defs#smallBlob` (for
134+
GeoJSON blobs) to match lexicon spec
135+
- Add `lpVersion` and `locationType` fields to location parameters for better protocol compliance
136+
137+
**Improvements:**
138+
- Centralized blob upload logic with new `handleBlobUpload()` helper method
139+
- Simplified location type detection - now based on content type (string vs Blob) instead of separate `geojson`
140+
parameter
141+
- Improved type safety with structured `AttachLocationParams` interface
142+
143+
**Breaking Changes:**
144+
- `attachLocation()` signature changed from `(uri, { value, name?, description?, srs, geojson? })` to
145+
`(uri, AttachLocationParams)`
146+
- `AttachLocationParams` now requires: `lpVersion`, `srs`, `locationType`, and `location` (string | Blob)
147+
- The `location` field in `CreateHypercertParams` now uses `AttachLocationParams` type instead of inline object
148+
- Removed separate `value` and `geojson` fields - use single `location` field with either string or Blob
149+
150+
- [#98](https://github.com/hypercerts-org/hypercerts-sdk/pull/98)
151+
[`e0ef6e9`](https://github.com/hypercerts-org/hypercerts-sdk/commit/e0ef6e9cb9138590e81b4a2929ca27ae557d2f39) Thanks
152+
[@bitbeckers](https://github.com/bitbeckers)! - Integrate LexiconRegistry into SDK and Repository. The SDK now
153+
initializes a LexiconRegistry with hypercert lexicons by default and exposes it via `getLexiconRegistry()`. Repository
154+
instances receive the registry and pass it to RecordOperations for future validation support.
155+
3156
## 0.10.0-beta.4
4157

5158
### Minor Changes

packages/sdk-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hypercerts-org/sdk-core",
3-
"version": "0.10.0-beta.4",
3+
"version": "0.10.0-beta.5",
44
"description": "Framework-agnostic ATProto SDK core for authentication, repository operations, and lexicon management",
55
"main": "dist/index.cjs",
66
"repository": {

packages/sdk-react/CHANGELOG.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,92 @@
11
# @hypercerts-org/sdk-react
22

3+
## 0.10.0-beta.6
4+
5+
### Minor Changes
6+
7+
- [#87](https://github.com/hypercerts-org/hypercerts-sdk/pull/87)
8+
[`85b1350`](https://github.com/hypercerts-org/hypercerts-sdk/commit/85b13502791e49966dae3d0dd0e833905c59abe3) Thanks
9+
[@bitbeckers](https://github.com/bitbeckers)! - Add comprehensive project support to SDK
10+
11+
**Core SDK (`@hypercerts-org/sdk-core`):**
12+
- Add project CRUD operations (createProject, getProject, listProjects, updateProject, deleteProject)
13+
- Add project events (projectCreated, projectUpdated, projectDeleted)
14+
- Support for avatar and coverPhoto blob uploads
15+
- Activities array with weight values
16+
- Location reference support
17+
- 34 comprehensive tests with full coverage
18+
19+
**React SDK (`@hypercerts-org/sdk-react`):**
20+
- Add useProjects and useProject hooks
21+
- Project query keys for cache management
22+
- TypeScript types for projects (Project, CreateProjectParams, UpdateProjectParams)
23+
- Test factory support for project hooks
24+
- Full pagination and optimistic updates support
25+
26+
Projects organize multiple hypercert activities with metadata including title, shortDescription, description (Leaflet
27+
documents), avatar, cover photo, activities with weights, and location references.
28+
29+
- [#98](https://github.com/hypercerts-org/hypercerts-sdk/pull/98)
30+
[`cae0756`](https://github.com/hypercerts-org/hypercerts-sdk/commit/cae07569609df88676a36a9b69c620cc7591c6b8) Thanks
31+
[@bitbeckers](https://github.com/bitbeckers)! - Add useLexiconRegistry hook to access LexiconRegistry from SDK. React
32+
developers can now register and use custom lexicons through this hook.
33+
34+
### Patch Changes
35+
36+
- [#88](https://github.com/hypercerts-org/hypercerts-sdk/pull/88)
37+
[`19c78df`](https://github.com/hypercerts-org/hypercerts-sdk/commit/19c78dfef448fb43d353d95721c13f3a35618fb3) Thanks
38+
[@bitbeckers](https://github.com/bitbeckers)! - feat: add HTTP loopback URL support for local development
39+
40+
Enable local development and testing with HTTP loopback URLs (`http://localhost`, `http://127.0.0.1`, `http://[::1]`)
41+
while maintaining security for production deployments.
42+
43+
**Configuration Updates**
44+
- Custom URL validator accepting HTTPS URLs or HTTP loopback addresses
45+
- Update `OAuthConfigSchema` to allow loopback URLs for `clientId`, `redirectUri`, `jwksUri`
46+
- Add optional `developmentMode` boolean flag to suppress warnings
47+
- Update `ServerConfigSchema` to allow loopback URLs for PDS/SDS servers
48+
- Export `isLoopbackUrl()` helper function and TypeScript types (`LoopbackUrl`, `HttpsUrl`,
49+
`DevelopmentOrProductionUrl`)
50+
51+
**Development Mode Features**
52+
- Automatic loopback detection with informative logging
53+
- Warning when using loopback URLs without explicit `developmentMode` flag
54+
- Info logs indicating development mode is active
55+
- Clear guidance about authorization server requirements
56+
57+
**Testing**
58+
- 28 new unit tests for loopback URL validation
59+
- Tests cover localhost, 127.0.0.1, and [::1] (IPv6) loopback addresses
60+
- Tests verify rejection of non-loopback HTTP URLs
61+
- Tests ensure HTTPS URLs always accepted
62+
63+
**Documentation**
64+
- Comprehensive local development guide in Core SDK README
65+
- NextJS App Router example with loopback configuration
66+
- API route setup examples (OAuth callback, JWKS endpoint)
67+
- Important notes about authorization server support and production safety
68+
- Local development example added to React SDK factory JSDoc
69+
70+
**Breaking Changes**: None - fully backward compatible
71+
72+
**Migration**: No migration needed for existing configurations. Existing HTTPS URLs continue to work without changes.
73+
74+
This feature enables developers to test the SDK locally without requiring HTTPS certificates, while the underlying
75+
`@atproto/oauth-client-node` library handles loopback OAuth flows per the AT Protocol specification.
76+
77+
- Updated dependencies
78+
[[`85b1350`](https://github.com/hypercerts-org/hypercerts-sdk/commit/85b13502791e49966dae3d0dd0e833905c59abe3),
79+
[`f9dd27f`](https://github.com/hypercerts-org/hypercerts-sdk/commit/f9dd27f78de0ee49aab9079e76566f272b161cd0),
80+
[`e850310`](https://github.com/hypercerts-org/hypercerts-sdk/commit/e850310d26e0561bdcfb778a6ef3bedbb7453eed),
81+
[`3157c18`](https://github.com/hypercerts-org/hypercerts-sdk/commit/3157c188c70e2f9473ee14eddaf635e3fbd346a1),
82+
[`0cd3b26`](https://github.com/hypercerts-org/hypercerts-sdk/commit/0cd3b26eb779246e9ef094f614f2f77807926f1b),
83+
[`b87cb22`](https://github.com/hypercerts-org/hypercerts-sdk/commit/b87cb2265d924b531eef8d58c669dc931b61e561),
84+
[`19c78df`](https://github.com/hypercerts-org/hypercerts-sdk/commit/19c78dfef448fb43d353d95721c13f3a35618fb3),
85+
[`3554580`](https://github.com/hypercerts-org/hypercerts-sdk/commit/3554580d77d9467c88c779e75a96a08d3e17bfd7),
86+
[`eea06a7`](https://github.com/hypercerts-org/hypercerts-sdk/commit/eea06a7f5e4f655ccac635fa8842ea32a6dfde64),
87+
[`e0ef6e9`](https://github.com/hypercerts-org/hypercerts-sdk/commit/e0ef6e9cb9138590e81b4a2929ca27ae557d2f39)]:
88+
- @hypercerts-org/sdk-core@0.10.0-beta.5
89+
390
## 0.10.0-beta.5
491

592
### Patch Changes

packages/sdk-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hypercerts-org/sdk-react",
3-
"version": "0.10.0-beta.5",
3+
"version": "0.10.0-beta.6",
44
"description": "React hooks and components for the Hypercerts ATProto SDK",
55
"type": "module",
66
"main": "dist/index.cjs",

0 commit comments

Comments
 (0)