@myfield/sdk 0.9.2 → 0.9.3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.3
4
+
5
+ - Use HTTP polling for `watchFeed()` with the existing hint format.
6
+ - Restore a saved bucket grant when importing its device key with `importKey()`.
7
+ - Generate public declarations, API review reports and the API Reference from source.
8
+ - Clarify the existing binary payload format in the Specification.
9
+
3
10
  ## 0.9.2
4
11
 
5
12
  ### Added
package/README.md CHANGED
@@ -1,12 +1,18 @@
1
1
  # @myfield/sdk
2
2
 
3
- Myfield SDK for third-party web apps: local-first object storage,
4
- end-to-end-encrypted sync, and internal Myfield authorization.
3
+ MyField SDK for third-party web apps: local-first object storage,
4
+ end-to-end-encrypted sync, and internal MyField authorization.
5
5
 
6
6
  A bucket is a local-first **end-to-end-encrypted object KV with CAS-backed sync**.
7
7
  Local CRUD works without an account or network; `connect()` authorizes cloud access.
8
8
 
9
- Status: pre-1.0 preview; public APIs may change before 1.0. License: Apache-2.0.
9
+ Status: 1.0 preview; public APIs may change during preview. License: Apache-2.0.
10
+
11
+ ## Install
12
+
13
+ ```sh
14
+ npm install @myfield/sdk
15
+ ```
10
16
 
11
17
  ## Quickstart
12
18
 
@@ -30,14 +36,19 @@ void instance.resume().catch(error => console.error("Connection failed:", error)
30
36
  await instance.connect(); // defaults to https://myfield.one/auth/
31
37
  ```
32
38
 
33
- Full API reference: [`docs/API.md`](docs/API.md).
39
+ ## Documentation
40
+
41
+ - [API guide](docs/api.md): Local/Remote usage and behavioral semantics.
42
+ - [API Reference](docs/api/index.md): generated public types, options and methods.
43
+ - [Specification](docs/spec/bucket.md): encoding, encryption, merge and compatibility.
44
+ - [Documentation index](docs/README.md).
34
45
 
35
46
  ## Remote object access
36
47
 
37
48
  `instance.remote.getBucket()` provides object reads, CAS commits, version history and
38
49
  change notifications with the instance's authorization; the app owns payload encryption
39
50
  and local storage, encrypting with `getBucketKey()`. See
40
- [Remote Object API](docs/API.md#remote-object-api).
51
+ [Remote Object API](docs/api.md#remote-object-api).
41
52
 
42
53
  ## What the SDK handles
43
54
 
@@ -46,7 +57,7 @@ and local storage, encrypting with `getBucketKey()`. See
46
57
  the unauthorized → disconnected transition. Apps use Instance
47
58
  `connect()` / `disconnect()` / state events only.
48
59
  - **Pairwise identity**: apps receive app-specific aliases rather than the user's
49
- primary Myfield identity.
60
+ primary MyField identity.
50
61
  - **Encryption**: Local payloads are encrypted client-side; the platform stores
51
62
  ciphertext only. Object ids are blinded — your semantic ids
52
63
  (`note:1`, `note:list`) never reach the wire. Remote apps encrypt their own payloads.
@@ -87,19 +98,29 @@ implementation and tests, but are not exported package subpaths in v1.
87
98
 
88
99
  Compatible implementation details for SDK maintainers and future language
89
100
  ports (payload layout, merge rules, id derivation): see
90
- [`docs/BUCKET-SPEC.md`](./docs/BUCKET-SPEC.md).
101
+ [Local bucket specification](docs/spec/bucket.md).
91
102
 
92
103
  ## Development
93
104
 
94
105
  This package has no runtime dependencies and uses a standalone pnpm lockfile.
106
+ Use Node.js 24 in CI (minimum 22.18) and pnpm 9.15.0 for development.
95
107
 
96
108
  ```sh
97
- pnpm install
109
+ pnpm install --frozen-lockfile
110
+ npm run api:check
98
111
  npm run build
99
112
  npm test # node --test (contract layer, mocked relay/auth)
100
113
  npm run typecheck # tsc --noEmit
101
- npm run typecheck:api # public declarations
114
+ npm run typecheck:api # public declarations and documentation examples
115
+ npm run test:docs
116
+ npm run test:package
102
117
  MYFIELD_TEST_AUTH_URL="https://your-test-host/auth/" npm run verify:remote
103
118
  ```
104
119
 
105
120
  `verify:remote` is the SDK's standalone Remote API smoke check against a test service.
121
+
122
+ Public declarations and API reference documentation are generated from source
123
+ and TSDoc. After an intentional change, run `npm run api:update` and review
124
+ `etc/sdk.api.md`, `types/` and `docs/api/`. Build and CI check these artifacts
125
+ without accepting baseline changes; do not hand-edit generated files.
126
+ API reports are review snapshots, not new release compatibility commitments.