techne-sdk 0.6.0 → 0.8.0

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 (47) hide show
  1. package/CHANGELOG.md +48 -5
  2. package/README.md +51 -1
  3. package/dist/auth/index.d.ts +2 -2
  4. package/dist/auth/index.js +5 -3
  5. package/dist/auth/placement.gen.d.ts +1 -1
  6. package/dist/auth/placement.gen.js +4 -0
  7. package/dist/catalog/catalog.gen.d.ts +2 -2
  8. package/dist/catalog/catalog.gen.js +1394 -130
  9. package/dist/generated/index.d.ts +129 -0
  10. package/dist/generated/index.js +170 -0
  11. package/dist/generated/lexicons.d.ts +954 -134
  12. package/dist/generated/lexicons.js +511 -61
  13. package/dist/generated/nsid.d.ts +16 -1
  14. package/dist/generated/nsid.js +16 -1
  15. package/dist/generated/nsid.json +16 -1
  16. package/dist/generated/records.d.ts +148 -140
  17. package/dist/generated/types/app/certified/defs.d.ts +20 -0
  18. package/dist/generated/types/app/certified/defs.js +18 -0
  19. package/dist/generated/types/app/certified/signature/defs.d.ts +29 -0
  20. package/dist/generated/types/app/certified/signature/defs.js +18 -0
  21. package/dist/generated/types/org/hypercerts/funding/receipt.d.ts +56 -0
  22. package/dist/generated/types/org/hypercerts/funding/receipt.js +19 -0
  23. package/dist/generated/types/pub/techne/draft/financials.d.ts +26 -0
  24. package/dist/generated/types/pub/techne/draft/financials.js +12 -0
  25. package/dist/generated/types/pub/techne/draft/identity/createCollective.d.ts +5 -0
  26. package/dist/generated/types/pub/techne/draft/identity/createCollective.js +7 -0
  27. package/dist/generated/types/pub/techne/draft/identity/defs.d.ts +1 -1
  28. package/dist/generated/types/pub/techne/draft/identity/manageMethods.d.ts +4 -1
  29. package/dist/generated/types/pub/techne/draft/org.d.ts +55 -25
  30. package/dist/generated/types/pub/techne/draft/org.js +12 -5
  31. package/dist/generated/types/pub/techne/draft/orgAtPlace.d.ts +17 -0
  32. package/dist/generated/types/pub/techne/draft/orgAtPlace.js +12 -0
  33. package/dist/generated/types/pub/techne/draft/statement.d.ts +19 -0
  34. package/dist/generated/types/pub/techne/draft/statement.js +12 -0
  35. package/dist/session/dpop.d.ts +49 -0
  36. package/dist/session/dpop.js +105 -0
  37. package/dist/session/index.d.ts +22 -0
  38. package/dist/session/index.js +22 -0
  39. package/dist/session/own-session.d.ts +169 -0
  40. package/dist/session/own-session.js +364 -0
  41. package/dist/session/phone.d.ts +79 -0
  42. package/dist/session/phone.js +179 -0
  43. package/dist/session/relay.d.ts +69 -0
  44. package/dist/session/relay.js +120 -0
  45. package/dist/wasm/techne-wasm.gen.js +1 -1
  46. package/dist/wasm/techne-wasm2js.gen.js +23340 -23255
  47. package/package.json +10 -3
package/CHANGELOG.md CHANGED
@@ -3,7 +3,35 @@
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
- ## Unreleased
6
+ ## 0.8.0 (2026-11-20)
7
+
8
+ npm 0.8.0 adds the app-held session; no export is removed or renamed. Nothing under `crates/` changed since
9
+ 0.7.0, so the crate is unchanged and stays 0.7.0 (RELEASING.md: the crate's version moves when the crate changes).
10
+
11
+ - **`techne-sdk/session`**: a session the app holds itself, for React Native (Hermes) as well as the browser,
12
+ in plain JavaScript (`@noble/curves` P-256 and `@noble/hashes`, no native module; the host provides
13
+ `crypto.getRandomValues`). Phone sign-in through the platform's door in own-session mode
14
+ (`startPhoneSignIn`, `finishPhoneSignIn`: the device's DPoP key and PKCE pair, a `UseDpopNonce` answer signed
15
+ again once with the same code). `OwnSession` (`restore`, `signedIn`) is a `connect` session (`did` +
16
+ `fetchHandler`): DPoP-bound calls to the PDS with a nonce per origin; refresh through
17
+ `social.scenius.refreshOwnSession` before expiry, one at a time (in-process, plus a `lock` the app backs
18
+ across processes), the rotated set saved before use, and a refresh that got no answer sent again unchanged
19
+ for up to 50 s, each send given up 5 s before the platform's 60 s answer window closes; an early refresh
20
+ holds a call only in the access token's last 30 s; a store holding another DPoP key's set ends the session
21
+ and is left alone; `signOut` (`revokeOwnSession`, then `signOutDevice`, each given up after 10 s, and the
22
+ store cleared); the tokens and key in `#private` fields (logging a session shows neither); the narrow device credential with a DPoP proof per request
23
+ (`deviceFetchHandler` for registerDevicePush, listDeviceSessions and signOutDevice, `deviceHeaders` for the
24
+ change stream's WebSocket). A `TokenStore` interface for where the app keeps it. `adoptHeldSession`, marked
25
+ deprecated: a device signed in with a full `rsds_` takes over the session the platform holds for it (`did`
26
+ required; the tokens kept when the issuer metadata fails). DPoP
27
+ helpers: `dpopProof`, `generateDpopKey`, `dpopKeyFromJwk`, `jwkThumbprint`, `pkcePair`. Errors are
28
+ `OwnSessionError` with the platform's error name as `code`, or `SessionEnded` / `NetworkError`.
29
+ - New dependencies: `@noble/curves` and `@noble/hashes` (2.4).
30
+
31
+ ## 0.7.0 (2026-11-20)
32
+
33
+ npm 0.7.0 and crate 0.7.0 are built from the same commit. The `pub.techne.draft.org` reshape below is a break, so
34
+ this is a major-line version (RELEASING.md).
7
35
 
8
36
  - **README: Where we differ from atproto.** Spaces, collectives, tokens with no scope claim, and app approval.
9
37
  Docs only.
@@ -16,10 +44,25 @@ a crate user.
16
44
  Techne's PDS (#redesign 412a8235), so an app that opted in keeps its reach only by asking for the scope. Default
17
45
  scopes are unchanged. The loopback client's keyless private-space scope is no longer narrowed to its own space
18
46
  by the PDS.
19
- - **Inputs:** lexicons `v0.1.22-techne.89` (commit `64c3caeb`, techne-lexicon-check `=0.3.27`) and the platform API at
20
- `26f9c6e69` (the scopes branch on platform main `69fbf4986`; its published API is unchanged from `b9ca69248`).
21
- `space.private` and the permissioned write descriptions: an app space is reached by `space:` scopes that cover
22
- it, or by a token with none; which app is calling is not asked.
47
+ - **Nonprofit types (#nonprofit-data).** New record types `pub.techne.draft.orgAtPlace` {subject (the org), place, role},
48
+ `pub.techne.draft.financials` (one per org per tax year), `pub.techne.draft.statement` (facts about another
49
+ record, `fields` an open union of `<type>#fields`, with `org#fields`), and the adopted
50
+ `org.hypercerts.funding.receipt` (with `app.certified.defs`). **Break:** `pub.techne.draft.org` is reshaped to the
51
+ naming register (`identifiers`/`category`/`status` as `{scheme, value}`, `founded`, `description`, `url`,
52
+ `phone`, `locations`); `address`, `identifier`, `email`, `entityType`, `jurisdictionOfFormation`, `telephone`
53
+ and `#schemeTag` are gone (no org records existed). Hence 0.7.0.
54
+ - **`everything: 'write'` asks a `repo:` scope for every public home outside `pub.techne.*`**: the adopted
55
+ `org.hypercerts.funding.receipt` joins the `community.lexicon.calendar.*` pair (`authWrite` names only
56
+ `pub.techne.*`), so the consent page lists one more collection.
57
+ - **Platform API at platform `main` `6c1a6f485`** (the merge that ships #nonprofit-data). It also carries the
58
+ platform's own-session methods, added to `NSID` and the method catalog: `social.scenius.refreshOwnSession`,
59
+ `revokeOwnSession`, `adoptHeldSession` (DEPRECATED, a one-time move), and the `#ownStart`/`#ownFinish`/`#ownSession`
60
+ shapes of `startPhoneSignup` and `finishPhoneSignup`. Additions only.
61
+ - **Inputs:** lexicons `v0.1.22-techne.95` (commit `7c4e0f12`, on techne.94) with `techne-lexicon-check` `=0.3.31`
62
+ from crates.io (checksum `e4bb36df`), and the platform API at `main` `6c1a6f485`. Codegen, the catalog and the
63
+ WebAssembly are regenerated. Also carries techne.90-.94:
64
+ `space.private` and the permissioned write descriptions (an app space is reached by `space:` scopes that cover
65
+ it, or by a token with none), createCollective's `founderMembershipVisibility`, no creator window.
23
66
 
24
67
  ## 0.6.0 (2026-11-19)
25
68
 
package/README.md CHANGED
@@ -27,6 +27,7 @@ Every import goes through the package's `exports`, so the resolver has to read t
27
27
  | `techne-sdk/react/query` | the client's reads as hooks over TanStack Query (`useRecordQuery`, `useRecord`, `useVersions`, `defaultQueryClient`); needs `@tanstack/react-query` |
28
28
  | `techne-sdk/versions` | the same state without React: `eventState`, `verifyAnswer`, version labels |
29
29
  | `techne-sdk/auth` | sign-in ("Sign in with Techne"): `signIn`, `signUp`, `restore`, `signOut`, `clientMetadata`, `scopes`, `appKey`, `appSpace`, `ownAppSpace`, `WHOLE_STORE` (browser OAuth); the account page: `openAccountSettings`, `accountSettingsUrl` |
30
+ | `techne-sdk/session` | a session the app holds itself, for React Native as well as the browser (plain JS, no native module): phone sign-in through the platform's door (`startPhoneSignIn`, `finishPhoneSignIn`), `OwnSession` (`did` + `fetchHandler` for `connect`, refresh, `signOut`, the device credential's proofs), DPoP helpers; `adoptHeldSession` (deprecated) |
30
31
  | `techne-sdk/connect` | `connect(session, platform?)` / `connectHosted(did, fetchHandler)` / `connectAnonymous(platform?)`: the client over one session, with its reads (`query`, `get`, `versions`, their options forms) and `put`; `bind(clients)` over clients made elsewhere |
31
32
  | `techne-sdk/put` | `put(techne, records, { deletes })`: the one write, deletes included (public deletes hinted to the platform); `put(techne, [], { deletes })` for deletes alone |
32
33
  | `techne-sdk/query` | the platform's generic queries: `listRecords`, `getRecords`, `compose` (several steps in one `composeRecords` call), hosts (`hostsOf`, `hostSteps`/`hostsFrom`) |
@@ -92,7 +93,7 @@ else {
92
93
  ```
93
94
 
94
95
  - **Who:** with no `handle`, the sign-in starts at the default PDS (techne.town), which asks who you are. A bare name (`alice`) is a handle on the default handle domain. A full handle, a DID or a PDS URL from any PDS is used as given. `signUp({ clientId })` opens the PDS's create-account screen.
95
- - **Scopes:** `scopes({ clientId })` is what it asks for by default, least privilege: `atproto`; the platform's `authPermissioned` permission set with the platform as its audience (the `permissioned.*` calls: private writes, reads and deletes); the app's own private space by its exact key, `ownAppSpace(clientId)` = `space:pub.techne.draft.space.private?skey=<appKey>` (ask for your own space this way: a keyless `space.private` scope, or `skey=*`, is every app's private data, and the consent page shows it as a red warning); and an `rpc:<nsid>?aud=<platform>%23atproto_appview` scope for each generic read the SDK makes signed in: `query.listRecords`, `query.countRecords` and `query.getRecords` (`techne-sdk/query`, `put`'s curation answer) and `registry.getType` and `registry.listTypes`. The platform narrows those reads by the token's space scopes, so they reach public data and the app's own space. An app passes the types it writes as `types: [nsid, ...]`, and each adds a `repo:<nsid>` scope (create, update, delete), as the platform's own least-privilege list does, plus `rpc:pub.techne.draft.sync.indexRecord` so `put` can hint the platform what it wrote (a pending type's records are indexed no other way); without `types` the app writes no public record. `query.composeRecords` is not in the default (the SDK makes no such call); an app that calls it asks for `everything: 'read'`. Everything the person can reach (their personal space, their circles, beacons shared with them) is an opt-in: `everything: 'read'` adds the `authRead` set and `space:*?authority=*&action=read` (`WHOLE_STORE_READ`), `everything: 'write'` adds `authRead`, `authWrite`, `space:*?authority=*&manage=create&manage=update` (`WHOLE_STORE`) and a `repo:` scope for the public `community.lexicon.*` records (then our own public types need no `types` entry). The sets reach no space on Techne's PDS; the `space:` scope, asked for by name, does. The consent page shows those with a large warning; ask only if the app needs them. Pass the same `types` and `everything` to `signIn` and `clientMetadata`, since the PDS refuses a request beyond what the metadata declares. Pass `scope` to ask for other scopes, and pass it to both. An app that publishes its own community type (`pub.techne.draft.c.*`) as the signed-in person passes `publish: true`, which adds `rpc:pub.techne.draft.registry.publishType` (publishing a type is a public act). The type's NSID is the registry's answer, so its `repo:` scope can be asked for only after publishing: publish once (a setup sign-in with `publish: true`), then sign in with the published NSID in `types`.
96
+ - **Scopes:** `scopes({ clientId })` is what it asks for by default, least privilege: `atproto`; the platform's `authPermissioned` permission set with the platform as its audience (the `permissioned.*` calls: private writes, reads and deletes); the app's own private space by its exact key, `ownAppSpace(clientId)` = `space:pub.techne.draft.space.private?skey=<appKey>` (ask for your own space this way: a keyless `space.private` scope, or `skey=*`, is every app's private data, and the consent page shows it as a red warning); and an `rpc:<nsid>?aud=<platform>%23atproto_appview` scope for each generic read the SDK makes signed in: `query.listRecords`, `query.countRecords` and `query.getRecords` (`techne-sdk/query`, `put`'s curation answer) and `registry.getType` and `registry.listTypes`. The platform narrows those reads by the token's space scopes, so they reach public data and the app's own space. An app passes the types it writes as `types: [nsid, ...]`, and each adds a `repo:<nsid>` scope (create, update, delete), as the platform's own least-privilege list does, plus `rpc:pub.techne.draft.sync.indexRecord` so `put` can hint the platform what it wrote (a pending type's records are indexed no other way); without `types` the app writes no public record. `query.composeRecords` is not in the default (the SDK makes no such call); an app that calls it asks for `everything: 'read'`. Everything the person can reach (their personal space, their circles, beacons shared with them) is an opt-in: `everything: 'read'` adds the `authRead` set and `space:*?authority=*&action=read` (`WHOLE_STORE_READ`), `everything: 'write'` adds `authRead`, `authWrite`, `space:*?authority=*&manage=create&manage=update` (`WHOLE_STORE`) and a `repo:` scope for the public records outside `pub.techne.*` (`community.lexicon.*`, `org.hypercerts.funding.receipt`; then our own public types need no `types` entry). The sets reach no space on Techne's PDS; the `space:` scope, asked for by name, does. The consent page shows those with a large warning; ask only if the app needs them. Pass the same `types` and `everything` to `signIn` and `clientMetadata`, since the PDS refuses a request beyond what the metadata declares. Pass `scope` to ask for other scopes, and pass it to both. An app that publishes its own community type (`pub.techne.draft.c.*`) as the signed-in person passes `publish: true`, which adds `rpc:pub.techne.draft.registry.publishType` (publishing a type is a public act). The type's NSID is the registry's answer, so its `repo:` scope can be asked for only after publishing: publish once (a setup sign-in with `publish: true`), then sign in with the published NSID in `types`.
96
97
  - **A private record names its space:** a record of a type with no public home is written privately, and it must name the `space` it is for; `put` throws `PutError` (`InvalidRequest`) with nothing written when one does not, as the platform's `permissioned.putRecords` refuses it. A record only the person reads goes in their own `space.personal`: `` { record, space: `at://${did}/pub.techne.draft.space.personal/self` } ``. Public records name no space and go to the person's PDS.
97
98
  - **The app's private space:** `appSpace(session.did, clientId)` is `at://{did}/pub.techne.draft.space.private/{appKey}`, where `appKey(clientId)` is the client id hashed (base32, lowercase, no padding, of its SHA-256; the platform's `sidecar_rkey`). Write there with `put(techne, [{ record, space: appSpace(did, clientId) }])` and read with `permissioned.listRecords({ space })`. Only that person reads it, through a token whose `space:` scopes cover it or one with no scope claim at all (below). In development the client id is the loopback client's, `resolveClientId(options)` with the same options `signIn` took: it carries the scope, so it changes with the port, `types` and `everything`, and so does the space. Its scope names the space type without a key (an id cannot carry its own hash), which is every app's private space: Techne's PDS no longer narrows it to the loopback app's own, and the consent page shows the red every-app warning. That is development only; a hosted app asks with `ownAppSpace(clientId)`. The browser keeps one stored session per origin, so a page that switches between client ids (other `types`, another port's id) signs out first; `restore` hands back whichever session the origin holds.
98
99
  - **Development:** on `localhost` or `127.0.0.1` you can leave `clientId` out. The SDK then uses atproto's loopback client, so you don't need to host anything.
@@ -103,6 +104,55 @@ else {
103
104
 
104
105
  **Before the Techne release:** the techne.town defaults (`TECHNE_PLATFORM_DID`, the techne.town PDS and handle domain) go live at the Techne release. Until then, `signIn()` without `pds` fails: pass `pds`, `plcUrl`, `handleDomain` and `platform` explicitly, and ask the Techne team for the current staging values.
105
106
 
107
+ ## A session the app holds (React Native)
108
+
109
+ `techne-sdk/session` is for an app that signs people in through the platform's phone door and keeps the
110
+ session on the device, Beacon's way. It needs no browser and no native module: DPoP is ES256 in plain
111
+ JavaScript (`@noble/curves`), so it runs on Hermes. The host provides `crypto.getRandomValues` (React Native:
112
+ import `react-native-get-random-values` once at the entry).
113
+
114
+ ```ts
115
+ import { OwnSession, startPhoneSignIn, finishPhoneSignIn, type TokenStore } from 'techne-sdk/session'
116
+ import { connect, TECHNE_PLATFORM_DID } from 'techne-sdk/connect'
117
+
118
+ const store: TokenStore = { get, set, delete: del } // e.g. one expo-secure-store key holding JSON.stringify(data)
119
+ const options = { platformUrl, store, lock, onEnded: () => showSignIn() }
120
+
121
+ const pending = await startPhoneSignIn({ platformUrl, phone }) // texts the code
122
+ const { session: data, created } = await finishPhoneSignIn(pending, code, { platformUrl, device: { platform: 'ios' } })
123
+ const session = await OwnSession.signedIn(data, options) // on later launches: OwnSession.restore(options)
124
+ const techne = connect(session, TECHNE_PLATFORM_DID)
125
+ ```
126
+
127
+ - **Sign-in:** the device makes the DPoP key and the PKCE pair and signs every proof; the platform runs the
128
+ door and answers the tokens bound to that key, plus a narrow device credential. A `UseDpopNonce` answer is
129
+ signed again once, with the same code. A refusal is an `OwnSessionError` whose `code` is the platform's error
130
+ (`OwnSessionUnavailable`: sign in the old way; `InvalidRequest`: wrong code; `CodeExpired`; `RateLimitExceeded`
131
+ with `retryAfter`).
132
+ - **Calls** to the PDS carry the access token and a proof per request; a `use_dpop_nonce` answer is signed again
133
+ once, an `invalid_token` one refreshes and sends again.
134
+ - **Refresh** goes through the platform (`refreshOwnSession`), five minutes before expiry by default; a call
135
+ waits for it only when the access token has less than 30 seconds left, otherwise it goes on with the current
136
+ token while the refresh runs behind it. The PDS
137
+ rotates the refresh token every time and ends the whole session if an old one comes back, so: one refresh at
138
+ a time in the process, and across processes under `lock` (give one if the app runs more than one JavaScript
139
+ process, such as a background task); inside it the store is read again and a set another process rotated is
140
+ taken; the new set is saved before it is used; a refresh that got no answer is sent again unchanged for up
141
+ to 50 seconds, which the platform answers from its 60-second window (each send is given up 5 seconds before
142
+ that window closes). A store that holds a set under another DPoP key (the person signed out and in again in
143
+ another process) ends this session without touching the store. `onEnded` is called when the session is
144
+ over (`SessionEnded`: sign in again).
145
+ - **The device credential** (push registration, the device list, `signOutDevice`, the change stream) goes only
146
+ with a proof of the session's key: `new AtpBaseClient(session.deviceFetchHandler)` for the calls,
147
+ `session.deviceHeaders('GET', wssUrl)` for the WebSocket's headers.
148
+ - **Sign-out:** `session.signOut()` revokes the grant and the device credential (each given up after 10
149
+ seconds) and clears the store, whatever the network says; when the store holds another key's set it leaves
150
+ that set and the store alone.
151
+ - **Moving an older install** (deprecated, removed when the platform stops holding sessions):
152
+ `adoptHeldSession({ platformUrl, deviceSession, did })` takes over the session the platform holds for a
153
+ device signed in with a full `rsds_` credential (`WrongAccount` when it is not `did`'s); save its answer with
154
+ `OwnSession.signedIn` at once. The tokens are kept even when the issuer's metadata does not answer.
155
+
106
156
  ## Where we differ from atproto
107
157
 
108
158
  The platform follows atproto where atproto has an answer. These are the places it does not, today. The platform's builder guide (`get_app_guide`) has the same list.
@@ -26,7 +26,7 @@
26
26
  * Everything the person can reach (their personal space, their circles, beacons
27
27
  * shared with them) is an opt-in, `everything: 'read'` (the `authRead` set and {@link WHOLE_STORE_READ})
28
28
  * or `everything: 'write'` (`authRead` and `authWrite`, {@link WHOLE_STORE}, plus a `repo:` scope for our
29
- * public homes outside our namespace, `community.lexicon.*`, from the placement manifest,
29
+ * public homes outside our namespace, `community.lexicon.*` and `org.hypercerts.*`, from the placement manifest,
30
30
  * `placement.gen.ts`). The sets reach no space on the Techne ePDS; the `space:` scope, asked for by name,
31
31
  * does. The consent page shows those with a large warning: they include what other apps keep private. Pass the same options to {@link clientMetadata} and {@link signIn}: the PDS refuses
32
32
  * a request beyond what the metadata declares. The platform is {@link TECHNE_PLATFORM_DID} unless a
@@ -141,7 +141,7 @@ export interface ClientOptions {
141
141
  export declare function includeScope(nsid: string, platform?: string): string;
142
142
  /** The opt-in to everything the person can reach: `'read'` adds the platform's `authRead` set and
143
143
  * {@link WHOLE_STORE_READ}, `'write'` `authRead`, `authWrite` and {@link WHOLE_STORE} (and the `repo:` scope
144
- * for our public `community.lexicon.*` homes). The sets carry no space reach; the `space:` scope does. */
144
+ * for our public homes outside `pub.techne.*`). The sets carry no space reach; the `space:` scope does. */
145
145
  export type Everything = 'read' | 'write';
146
146
  /** The 0016 `space:` scope over every space the person can reach, every app's private space included, with
147
147
  * `manage=create` and `manage=update`, making spaces and changing their settings (`everything: 'write'`): the
@@ -70,8 +70,10 @@ function scopeList({ platform = TECHNE_PLATFORM_DID, types = [], everything, pub
70
70
  if (!isValidNsid(t))
71
71
  throw new TypeError(`techne-sdk/auth: a type is an NSID (got ${JSON.stringify(t)})`);
72
72
  const write = everything === 'write';
73
- const community = write ? PUBLIC_HOMES.filter((c) => c.startsWith(`${NSID.COMMUNITY_AUTHORITY}.`)) : [];
74
- // With authWrite (and the community repo scope) our public homes are covered already.
73
+ // Our public homes outside our namespace (adopted: community.lexicon.*, org.hypercerts.*): authWrite names
74
+ // only pub.techne.*, so these need their own repo scope.
75
+ const adopted = write ? PUBLIC_HOMES.filter((c) => !c.startsWith(`${NSID.AUTHORITY}.`)) : [];
76
+ // With authWrite (and the adopted repo scope) our public homes are covered already.
75
77
  const own = [...new Set(types)].filter((t) => !(write && PUBLIC_HOMES.includes(t))).sort();
76
78
  const aud = audParam(platform);
77
79
  return [
@@ -84,7 +86,7 @@ function scopeList({ platform = TECHNE_PLATFORM_DID, types = [], everything, pub
84
86
  ...(write ? [includeScope(NSID.AUTH_WRITE, platform)] : []),
85
87
  // The sets reach no space: the opt-in names the whole store by its `space:` scope.
86
88
  ...(everything ? [write ? WHOLE_STORE : WHOLE_STORE_READ] : []),
87
- ...(community.length ? [repoScope(community)] : []),
89
+ ...(adopted.length ? [repoScope(adopted)] : []),
88
90
  ...own.map((t) => repoScope([t])),
89
91
  // `put` hints each public write to the platform (the only way a pending type's records are indexed);
90
92
  // authWrite carries that call, so without it an app that writes public types asks for it alone.
@@ -1 +1 @@
1
- export declare const PUBLIC_HOMES: readonly ["pub.techne.draft.appConfig", "pub.techne.draft.approval", "pub.techne.draft.connection", "pub.techne.draft.contactChannel", "pub.techne.draft.channelVerification", "pub.techne.draft.containedIn", "pub.techne.draft.derivation", "pub.techne.draft.distinctFrom", "pub.techne.draft.geo", "pub.techne.draft.heldAt", "pub.techne.draft.operator", "pub.techne.draft.org", "pub.techne.draft.profile", "pub.techne.draft.assessment", "pub.techne.draft.placeResearch", "pub.techne.draft.summary", "pub.techne.draft.provenance", "pub.techne.draft.questionSet", "pub.techne.draft.receipt", "pub.techne.draft.registry.typeRequest", "pub.techne.draft.verdict", "pub.techne.draft.verification", "pub.techne.draft.retirement", "pub.techne.draft.credential", "pub.techne.draft.credentialRevocation", "pub.techne.draft.publisher", "pub.techne.draft.sameAs", "pub.techne.draft.source", "pub.techne.draft.sourceAttribution", "pub.techne.draft.sourceRef", "pub.techne.draft.evaluation", "pub.techne.draft.event.config", "pub.techne.draft.event.listing", "pub.techne.draft.feed.recipe", "pub.techne.draft.query", "pub.techne.draft.invite", "pub.techne.draft.market.ask", "pub.techne.draft.market.offer", "pub.techne.draft.membership", "pub.techne.draft.place", "pub.techne.draft.presence", "pub.techne.draft.actor.profile", "pub.techne.draft.collective", "community.lexicon.calendar.event", "community.lexicon.calendar.rsvp"];
1
+ export declare const PUBLIC_HOMES: readonly ["pub.techne.draft.appConfig", "pub.techne.draft.approval", "pub.techne.draft.connection", "pub.techne.draft.contactChannel", "pub.techne.draft.channelVerification", "pub.techne.draft.containedIn", "pub.techne.draft.derivation", "pub.techne.draft.distinctFrom", "pub.techne.draft.geo", "pub.techne.draft.heldAt", "pub.techne.draft.operator", "pub.techne.draft.org", "pub.techne.draft.orgAtPlace", "pub.techne.draft.financials", "pub.techne.draft.statement", "pub.techne.draft.profile", "pub.techne.draft.assessment", "pub.techne.draft.placeResearch", "pub.techne.draft.summary", "pub.techne.draft.provenance", "pub.techne.draft.questionSet", "pub.techne.draft.receipt", "pub.techne.draft.registry.typeRequest", "pub.techne.draft.verdict", "pub.techne.draft.verification", "pub.techne.draft.retirement", "pub.techne.draft.credential", "pub.techne.draft.credentialRevocation", "pub.techne.draft.publisher", "pub.techne.draft.sameAs", "pub.techne.draft.source", "pub.techne.draft.sourceAttribution", "pub.techne.draft.sourceRef", "pub.techne.draft.evaluation", "pub.techne.draft.event.config", "pub.techne.draft.event.listing", "pub.techne.draft.feed.recipe", "pub.techne.draft.query", "pub.techne.draft.invite", "pub.techne.draft.market.ask", "pub.techne.draft.market.offer", "pub.techne.draft.membership", "pub.techne.draft.place", "pub.techne.draft.presence", "pub.techne.draft.actor.profile", "pub.techne.draft.collective", "community.lexicon.calendar.event", "community.lexicon.calendar.rsvp", "org.hypercerts.funding.receipt"];
@@ -16,6 +16,9 @@ export const PUBLIC_HOMES = [
16
16
  NSID.HELD_AT,
17
17
  NSID.OPERATOR,
18
18
  NSID.ORG,
19
+ NSID.ORG_AT_PLACE,
20
+ NSID.FINANCIALS,
21
+ NSID.STATEMENT,
19
22
  NSID.PROFILE,
20
23
  NSID.ASSESSMENT,
21
24
  NSID.PLACE_RESEARCH,
@@ -49,4 +52,5 @@ export const PUBLIC_HOMES = [
49
52
  NSID.COLLECTIVE,
50
53
  NSID.CALENDAR_EVENT,
51
54
  NSID.CALENDAR_RSVP,
55
+ NSID.FUNDING_RECEIPT,
52
56
  ];
@@ -4,8 +4,8 @@ export declare const catalog: {
4
4
  name: string;
5
5
  group: string;
6
6
  kind: string;
7
+ description: string;
7
8
  doc: unknown;
8
- description?: undefined;
9
9
  fields?: undefined;
10
10
  key?: undefined;
11
11
  homes?: undefined;
@@ -14,8 +14,8 @@ export declare const catalog: {
14
14
  name: string;
15
15
  group: string;
16
16
  kind: string;
17
- description: string;
18
17
  doc: unknown;
18
+ description?: undefined;
19
19
  fields?: undefined;
20
20
  key?: undefined;
21
21
  homes?: undefined;