techne-sdk 0.14.0 → 0.15.1
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 +97 -0
- package/README.md +7 -4
- package/dist/auth/index.js +3 -4
- package/dist/catalog/catalog.gen.d.ts +35 -29
- package/dist/catalog/catalog.gen.js +560 -76
- package/dist/generated/index.d.ts +84 -0
- package/dist/generated/index.js +108 -0
- package/dist/generated/lexicons.d.ts +224 -32
- package/dist/generated/lexicons.js +121 -15
- package/dist/generated/nsid.d.ts +9 -0
- package/dist/generated/nsid.js +9 -0
- package/dist/generated/nsid.json +9 -0
- package/dist/generated/records.d.ts +96 -90
- package/dist/generated/types/pub/techne/draft/beacon.d.ts +2 -0
- package/dist/generated/types/pub/techne/draft/derivation.d.ts +1 -1
- package/dist/generated/types/pub/techne/draft/evaluation.d.ts +3 -1
- package/dist/generated/types/pub/techne/draft/follow.d.ts +14 -0
- package/dist/generated/types/pub/techne/draft/follow.js +12 -0
- package/dist/generated/types/pub/techne/draft/notificationPref.d.ts +16 -0
- package/dist/generated/types/pub/techne/draft/notificationPref.js +12 -0
- package/dist/generated/types/pub/techne/draft/org.d.ts +2 -2
- package/dist/generated/types/pub/techne/draft/statement.d.ts +1 -1
- package/dist/generated/types/pub/techne/draft/unfollow.d.ts +14 -0
- package/dist/generated/types/pub/techne/draft/unfollow.js +12 -0
- package/dist/generated/types/pub/techne/draft/verdict.d.ts +2 -2
- package/dist/query/index.d.ts +3 -2
- package/dist/session/phone.d.ts +7 -6
- package/dist/session/phone.js +7 -6
- package/dist/session/relay.d.ts +1 -1
- package/dist/session/relay.js +1 -1
- package/dist/sign-in/index.js +7 -11
- package/dist/wasm/techne-wasm.gen.js +1 -1
- package/dist/wasm/techne-wasm2js.gen.js +12317 -12317
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,103 @@
|
|
|
3
3
|
`techne-sdk` on npm and the `techne-sdk` crate share a version. Each entry names what changes for an app or
|
|
4
4
|
a crate user.
|
|
5
5
|
|
|
6
|
+
## 0.15.1 (2026-12-02)
|
|
7
|
+
|
|
8
|
+
Inputs: a private unfollow for the curators everyone follows by default. Exports are added; none is removed or
|
|
9
|
+
renamed, and no function changes meaning. Ship after the platform that reads this lexicon is on prod: an older
|
|
10
|
+
platform refuses a write to `pub.techne.draft.unfollow`. npm 0.15.1 and crate 0.15.1 are built from the same
|
|
11
|
+
commit; the crate's code is unchanged and moves to check 0.3.48.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`NSID.UNFOLLOW`** (`pub.techne.draft.unfollow`, key = the unfollowed DID; `subject`, `createdAt`), with its
|
|
16
|
+
record type (`techne-sdk/types/pub/techne/draft/unfollow`, `PubTechneDraftUnfollow.Record`). The owner
|
|
17
|
+
stopped following someone they follow by default (Beacon: a local curator); a missing record means followed,
|
|
18
|
+
and following again deletes it. Private: write it with `put` and
|
|
19
|
+
`space: at://<your DID>/pub.techne.draft.space.personal/self`.
|
|
20
|
+
- **`pub.techne.draft.verdict` `values`** gains the known value `cleared`: an admin writer lifts the `spam`
|
|
21
|
+
and `obscene` verdicts on the exact version it names (never `!takedown`).
|
|
22
|
+
- **`startPhoneSignup` and `beginPasskeySignup` `turnstileToken`** (optional string) in the platform's
|
|
23
|
+
published API (the catalog and the method lexicons). `startPhoneSignIn` does not send one.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **`pub.techne.draft.notificationPref` description** (text only): with no record, `curator.picks` is now on
|
|
28
|
+
by default (it said off), and the notifier reads the owner's `unfollow` records. `curator.new` is no longer
|
|
29
|
+
read: everyone gets that notice, and an old record turning it off is ignored.
|
|
30
|
+
- **`pub.techne.draft.follow` description** (text only): Beacon no longer writes it; following a steward
|
|
31
|
+
curator is the default and `pub.techne.draft.unfollow` records the opt-out. Existing records are left in
|
|
32
|
+
place and nothing reads them. Its placement entry's citation says the same.
|
|
33
|
+
|
|
34
|
+
### Inputs
|
|
35
|
+
|
|
36
|
+
- **Lexicons `v0.1.22-techne.114` (`3c3a5709d`), check crate `techne-lexicon-check` 0.3.48** (exact, from
|
|
37
|
+
crates.io). `space.personal`
|
|
38
|
+
and `placement` admit `pub.techne.draft.unfollow`. techne.113 and check 0.3.47 went to lexicons PR
|
|
39
|
+
e475bbed (check 0.3.47 carrying techne.112's `cleared` text), so the unfollow lexicon is rebuilt on top of
|
|
40
|
+
techne.113 and takes the next tag and check version. The commons `setSteward` and the provenance policy
|
|
41
|
+
changes in techne.110 to techne.113 are not SDK inputs and change nothing here.
|
|
42
|
+
- **Platform API at platform `main` `13dee9ea5`**. Adds
|
|
43
|
+
`turnstileToken` and named errors (`beginPasskeySignup`, `proposeIntro`, `startPhoneSignup`
|
|
44
|
+
`InvalidRequest`); the other method lexicons change only in descriptions.
|
|
45
|
+
|
|
46
|
+
## 0.15.0 (2026-12-01)
|
|
47
|
+
|
|
48
|
+
Inputs: the hidden guest list, curator follows and notification switches, an evaluation's photo. Exports are
|
|
49
|
+
added; none is removed or renamed, and no function changes meaning. Ship after the platform that reads these lexicons is on prod: an
|
|
50
|
+
older platform refuses a write to `pub.techne.draft.space.audience`, `pub.techne.draft.follow` or
|
|
51
|
+
`pub.techne.draft.notificationPref`, and its policy check denies a `policy#sharedWithIn` leaf. npm 0.15.0
|
|
52
|
+
and crate 0.15.0 are built from the same commit; the crate's code is unchanged and moves to check 0.3.44.
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- **`NSID.SPACE_AUDIENCE` and `NSID.SPACE_AUDIENCE_POLICY`** (`pub.techne.draft.space.audience`): the
|
|
57
|
+
kept-apart audience of another space. The shares that admit people to a space sit in its authority's
|
|
58
|
+
audience space at the same key, which only the authority reads, so guests are not listed to each other.
|
|
59
|
+
- **`NSID.POLICY_SHARED_WITH_IN`** (`pub.techne.draft.policy#sharedWithIn`): a policy leaf that admits V when
|
|
60
|
+
the authority's share naming V is in the named sibling space at the same key.
|
|
61
|
+
- **`NSID.FOLLOW`** (`pub.techne.draft.follow`, key = the followed DID; `subject`, `createdAt`) and
|
|
62
|
+
**`NSID.NOTIFICATION_PREF`** (`pub.techne.draft.notificationPref`, key = the kind; `kind`, `enabled`,
|
|
63
|
+
`createdAt`), with their record types. Both are private: write them with `put` and
|
|
64
|
+
`space: at://<your DID>/pub.techne.draft.space.personal/self` (`put` refuses a private record that names no
|
|
65
|
+
space).
|
|
66
|
+
- **`pub.techne.draft.beacon` `guestsHidden`** (optional boolean): the beacon's guests do not see who else it
|
|
67
|
+
was shared with or how they answered. `pub.techne.draft.space.beaconDecline` then holds every answer (its
|
|
68
|
+
name is now "Beacon answer"), and the `space.beacon` read policy gains a `sharedWithIn` leaf naming
|
|
69
|
+
`space.audience`.
|
|
70
|
+
- **NSID constants for the phone sign-in attestation** (`NSID.START_PHONE_SIGNUP_ATTEST`, `_IOS_ATTEST`,
|
|
71
|
+
`_ANDROID_ATTEST`), from the platform's published API. Constants only: `startPhoneSignIn` sends no
|
|
72
|
+
attestation (the platform records it and does not require it).
|
|
73
|
+
- `pub.techne.draft.derivation` signal `name` gains the known value `ladderRung` (the field stays open).
|
|
74
|
+
- **`pub.techne.draft.evaluation` `image`** (optional blob: PNG, JPEG or WebP, at most 2,000,000 bytes): a
|
|
75
|
+
photo of the subject, set by the evaluator and kept in the evaluator's repo. Show it only when the subject
|
|
76
|
+
has no picture of its own. The platform serves it through `getAvatar` (`did` = the evaluator) while a
|
|
77
|
+
public evaluation names it.
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
|
|
81
|
+
- **Phone sign-in refusals** (`OwnSessionError.code`, the platform's error name passed through). On the
|
|
82
|
+
platform this release pins, `startPhoneSignIn` answers `Unavailable` where it answered
|
|
83
|
+
`OwnSessionUnavailable` (no code could be sent: try again), and `finishPhoneSignIn` drops
|
|
84
|
+
`NewCodeSent` and `OwnSessionUnavailable` and adds `AccountUnavailable` (the number can't sign in here) and
|
|
85
|
+
`NumberRemoved` (sign in with the current number). `created` is true when the platform records the account
|
|
86
|
+
for the first time. The SDK's code is unchanged: these come from the platform, so an app gets them from
|
|
87
|
+
that platform whatever SDK it pins. `addBeaconAudience`, `addGroupMembers`, `createGroup` and `lightBeacon`
|
|
88
|
+
name `RateLimitExceeded`.
|
|
89
|
+
- **`techne-sdk/query` docs**: a query naming no `view` is answered with the old default through 2027-03-01
|
|
90
|
+
(UTC) and refused with `ViewRequired` from 2027-03-02 (the docs said it was refused already). The types
|
|
91
|
+
still require a view.
|
|
92
|
+
|
|
93
|
+
### Inputs
|
|
94
|
+
|
|
95
|
+
- **Lexicons `v0.1.22-techne.109`, check crate `techne-lexicon-check` 0.3.44** (exact). Also description
|
|
96
|
+
fixes: `space.beaconDecline` (an answer counts for the lighter only from someone they shared the beacon
|
|
97
|
+
with), `placement` (`unbuilt` covers app-written placements), `query` `view` (a query naming no view gets
|
|
98
|
+
the old default until 2027-03-01), `org` and `statement#locations` (curated location statements), `geo`,
|
|
99
|
+
`placeV2` (same-rkey replaces `place`).
|
|
100
|
+
- **Platform API at platform `main` `50a33d887`**. Adds the phone sign-in
|
|
101
|
+
attestation and the refusals above; the other method lexicons change only in descriptions.
|
|
102
|
+
|
|
6
103
|
## 0.14.0 (2026-11-30)
|
|
7
104
|
|
|
8
105
|
The sign-in form and the "Sign in with Techne" button. Needs the Techne sign-in page (ePDS) that reads a phone
|
package/README.md
CHANGED
|
@@ -86,9 +86,12 @@ for (;;) {
|
|
|
86
86
|
- **Paging:** `limit` defaults to 50. Keep it at 500 or less: `query` accepts up to 50000, but past 500 the
|
|
87
87
|
platform reads page after page and charges every row to your budget (below). Keep paging until `cursor` is absent: a page can be shorter than
|
|
88
88
|
`limit` and still have one. `{ count: true }` adds `count` and `capped` (counting stops at 1000).
|
|
89
|
-
- **Two views:** every query names its view
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
- **Two views:** every query names its view (the types require it). The platform answers a query naming
|
|
90
|
+
none the way it did before views (curated, except as written for a branch scoped to named authors,
|
|
91
|
+
subjects or URIs, or with `curated: false`) through 2027-03-01 (UTC), whoever sends it, and refuses it
|
|
92
|
+
with `ViewRequired` from 2027-03-02; a query naming a view on some branches only is refused now. `view: 'curated'` reads the
|
|
93
|
+
commons' listed records: one curated record per thing, merged from its sources by a curator the commons
|
|
94
|
+
root trusts, moderated (an event only inside the supported areas).
|
|
92
95
|
A type no curator covers is refused with `NotCurated`, naming the type, rather than answered as an empty list.
|
|
93
96
|
`view: 'asWritten'` reads every public record as its author wrote it: each source copy and the curated record
|
|
94
97
|
(counts in this view hold both copies of a curated thing). A private record reads the same in both. To mix
|
|
@@ -249,7 +252,7 @@ const techne = connect(session, TECHNE_PLATFORM_DID)
|
|
|
249
252
|
- **Sign-in:** the device makes the DPoP key and the PKCE pair and signs every proof; the platform runs the
|
|
250
253
|
door and answers the tokens bound to that key, plus a narrow device credential. A `UseDpopNonce` answer is
|
|
251
254
|
signed again once, with the same code. A refusal is an `OwnSessionError` whose `code` is the platform's error
|
|
252
|
-
(`
|
|
255
|
+
(`Unavailable`: no code could be sent, try again; `InvalidRequest`: wrong code; `CodeExpired`; `RateLimitExceeded`
|
|
253
256
|
with `retryAfter`).
|
|
254
257
|
- **Calls** to the PDS carry the access token and a proof per request; a `use_dpop_nonce` answer is signed again
|
|
255
258
|
once, an `invalid_token` one refreshes and sends again.
|
package/dist/auth/index.js
CHANGED
|
@@ -197,10 +197,9 @@ function pageParams(o) {
|
|
|
197
197
|
throw new TypeError(`techne-sdk/auth: email is an address (got ${JSON.stringify(o.email)})`);
|
|
198
198
|
if (phone && !E164.test(phone))
|
|
199
199
|
throw new TypeError(`techne-sdk/auth: phone is an E.164 number, +<country code><number> (got ${JSON.stringify(o.phone)})`);
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return { login_hint: phone };
|
|
200
|
+
const hint = email || phone;
|
|
201
|
+
if (hint)
|
|
202
|
+
return { login_hint: hint };
|
|
204
203
|
return { epds_other_ways: '1' };
|
|
205
204
|
}
|
|
206
205
|
/** What BrowserOAuthClient's signInRedirect does, with `params` on the URL: navigate, and if the page is still
|
|
@@ -125,6 +125,35 @@ export declare const catalog: {
|
|
|
125
125
|
homes?: undefined;
|
|
126
126
|
})[];
|
|
127
127
|
spaces: ({
|
|
128
|
+
nsid: string;
|
|
129
|
+
name: string;
|
|
130
|
+
kind: string;
|
|
131
|
+
key: string;
|
|
132
|
+
description: string;
|
|
133
|
+
collections: string[];
|
|
134
|
+
policy: {
|
|
135
|
+
read: {
|
|
136
|
+
$type: string;
|
|
137
|
+
of?: undefined;
|
|
138
|
+
atLeast?: undefined;
|
|
139
|
+
includeMemberCollectives?: undefined;
|
|
140
|
+
};
|
|
141
|
+
write: {
|
|
142
|
+
$type: string;
|
|
143
|
+
of?: undefined;
|
|
144
|
+
atLeast?: undefined;
|
|
145
|
+
};
|
|
146
|
+
manage: {
|
|
147
|
+
$type: string;
|
|
148
|
+
of?: undefined;
|
|
149
|
+
atLeast?: undefined;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
doc: unknown;
|
|
153
|
+
policyNsid: string;
|
|
154
|
+
policyDescription: string;
|
|
155
|
+
policyDoc: unknown;
|
|
156
|
+
} | {
|
|
128
157
|
nsid: string;
|
|
129
158
|
name: string;
|
|
130
159
|
kind: string;
|
|
@@ -137,9 +166,15 @@ export declare const catalog: {
|
|
|
137
166
|
of: ({
|
|
138
167
|
$type: string;
|
|
139
168
|
of?: undefined;
|
|
169
|
+
spaceType?: undefined;
|
|
140
170
|
} | {
|
|
141
171
|
$type: string;
|
|
142
172
|
of: string;
|
|
173
|
+
spaceType?: undefined;
|
|
174
|
+
} | {
|
|
175
|
+
$type: string;
|
|
176
|
+
spaceType: string;
|
|
177
|
+
of?: undefined;
|
|
143
178
|
})[];
|
|
144
179
|
atLeast?: undefined;
|
|
145
180
|
includeMemberCollectives?: undefined;
|
|
@@ -437,35 +472,6 @@ export declare const catalog: {
|
|
|
437
472
|
policyNsid: string;
|
|
438
473
|
policyDescription: string;
|
|
439
474
|
policyDoc: unknown;
|
|
440
|
-
} | {
|
|
441
|
-
nsid: string;
|
|
442
|
-
name: string;
|
|
443
|
-
kind: string;
|
|
444
|
-
key: string;
|
|
445
|
-
description: string;
|
|
446
|
-
collections: string[];
|
|
447
|
-
policy: {
|
|
448
|
-
read: {
|
|
449
|
-
$type: string;
|
|
450
|
-
of?: undefined;
|
|
451
|
-
atLeast?: undefined;
|
|
452
|
-
includeMemberCollectives?: undefined;
|
|
453
|
-
};
|
|
454
|
-
write: {
|
|
455
|
-
$type: string;
|
|
456
|
-
of?: undefined;
|
|
457
|
-
atLeast?: undefined;
|
|
458
|
-
};
|
|
459
|
-
manage: {
|
|
460
|
-
$type: string;
|
|
461
|
-
of?: undefined;
|
|
462
|
-
atLeast?: undefined;
|
|
463
|
-
};
|
|
464
|
-
};
|
|
465
|
-
doc: unknown;
|
|
466
|
-
policyNsid: string;
|
|
467
|
-
policyDescription: string;
|
|
468
|
-
policyDoc: unknown;
|
|
469
475
|
})[];
|
|
470
476
|
algebra: {
|
|
471
477
|
nsid: string;
|