@minca/core 0.1.9 → 0.1.11
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/README.md +2 -2
- package/dist/identity/abilities.d.ts +3 -3
- package/dist/identity/abilities.d.ts.map +1 -1
- package/dist/identity/abilities.js +9 -11
- package/dist/identity/abilities.js.map +1 -1
- package/dist/identity/contact-key.d.ts +15 -15
- package/dist/identity/contact-key.d.ts.map +1 -1
- package/dist/identity/contact-key.js +21 -28
- package/dist/identity/contact-key.js.map +1 -1
- package/dist/identity/root-signer.d.ts +0 -5
- package/dist/identity/root-signer.d.ts.map +1 -1
- package/dist/identity/root-signer.js +0 -1
- package/dist/identity/root-signer.js.map +1 -1
- package/dist/inbox/inbox.d.ts +140 -0
- package/dist/inbox/inbox.d.ts.map +1 -0
- package/dist/inbox/inbox.js +212 -0
- package/dist/inbox/inbox.js.map +1 -0
- package/dist/inbox/index.d.ts +9 -0
- package/dist/inbox/index.d.ts.map +1 -0
- package/dist/inbox/index.js +7 -0
- package/dist/inbox/index.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/network/mailbox.d.ts +4 -4
- package/dist/network/mailbox.d.ts.map +1 -1
- package/dist/network/mailbox.js +5 -5
- package/dist/network/mailbox.js.map +1 -1
- package/dist/node/actions.d.ts.map +1 -1
- package/dist/node/actions.js +28 -18
- package/dist/node/actions.js.map +1 -1
- package/dist/node/api.d.ts +11 -10
- package/dist/node/api.d.ts.map +1 -1
- package/dist/node/api.js +11 -10
- package/dist/node/api.js.map +1 -1
- package/dist/node/carrier.d.ts +11 -5
- package/dist/node/carrier.d.ts.map +1 -1
- package/dist/node/carrier.js +42 -1
- package/dist/node/carrier.js.map +1 -1
- package/dist/node/copy.d.ts +1 -1
- package/dist/node/copy.d.ts.map +1 -1
- package/dist/node/copy.js +10 -4
- package/dist/node/copy.js.map +1 -1
- package/dist/node/host.d.ts +2 -0
- package/dist/node/host.d.ts.map +1 -1
- package/dist/node/host.js +2 -0
- package/dist/node/host.js.map +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/node.d.ts.map +1 -1
- package/dist/node/node.js +720 -542
- package/dist/node/node.js.map +1 -1
- package/dist/node/remote.d.ts +6 -5
- package/dist/node/remote.d.ts.map +1 -1
- package/dist/node/remote.js +140 -195
- package/dist/node/remote.js.map +1 -1
- package/dist/node/space-runtime.d.ts +2 -1
- package/dist/node/space-runtime.d.ts.map +1 -1
- package/dist/node/space-runtime.js +71 -84
- package/dist/node/space-runtime.js.map +1 -1
- package/dist/node/types.d.ts +84 -47
- package/dist/node/types.d.ts.map +1 -1
- package/dist/node/worker.d.ts +1 -1
- package/dist/node/worker.d.ts.map +1 -1
- package/dist/node/worker.js +10 -6
- package/dist/node/worker.js.map +1 -1
- package/dist/react/use-invite-link.d.ts +1 -1
- package/dist/react/use-invite-link.d.ts.map +1 -1
- package/dist/react/use-invite-link.js +18 -11
- package/dist/react/use-invite-link.js.map +1 -1
- package/dist/records/loose.d.ts +52 -0
- package/dist/records/loose.d.ts.map +1 -0
- package/dist/records/loose.js +86 -0
- package/dist/records/loose.js.map +1 -0
- package/dist/schema/version.d.ts +2 -0
- package/dist/schema/version.d.ts.map +1 -1
- package/dist/schema/version.js +2 -1
- package/dist/schema/version.js.map +1 -1
- package/dist/schemas/choosing.d.ts +19 -0
- package/dist/schemas/choosing.d.ts.map +1 -0
- package/dist/schemas/choosing.js +69 -0
- package/dist/schemas/choosing.js.map +1 -0
- package/dist/schemas/contacts.d.ts +34 -87
- package/dist/schemas/contacts.d.ts.map +1 -1
- package/dist/schemas/contacts.js +32 -76
- package/dist/schemas/contacts.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/library/annotations.d.ts +17 -285
- package/dist/schemas/library/annotations.d.ts.map +1 -1
- package/dist/schemas/library/annotations.js +9 -65
- package/dist/schemas/library/annotations.js.map +1 -1
- package/dist/schemas/library/community.d.ts +9 -17
- package/dist/schemas/library/community.d.ts.map +1 -1
- package/dist/schemas/library/community.js +5 -5
- package/dist/schemas/library/community.js.map +1 -1
- package/dist/schemas/library/life.d.ts +3 -3
- package/dist/schemas/library/life.d.ts.map +1 -1
- package/dist/schemas/library/life.js +2 -2
- package/dist/schemas/library/life.js.map +1 -1
- package/dist/schemas/library/media.d.ts +148 -541
- package/dist/schemas/library/media.d.ts.map +1 -1
- package/dist/schemas/library/media.js +28 -64
- package/dist/schemas/library/media.js.map +1 -1
- package/dist/schemas/library/money.d.ts +8 -8
- package/dist/schemas/library/money.d.ts.map +1 -1
- package/dist/schemas/library/money.js +4 -4
- package/dist/schemas/library/money.js.map +1 -1
- package/dist/schemas/library/planning.d.ts +23 -87
- package/dist/schemas/library/planning.d.ts.map +1 -1
- package/dist/schemas/library/planning.js +10 -26
- package/dist/schemas/library/planning.js.map +1 -1
- package/dist/schemas/library/publishing.d.ts +14 -14
- package/dist/schemas/library/publishing.d.ts.map +1 -1
- package/dist/schemas/library/publishing.js +7 -7
- package/dist/schemas/library/publishing.js.map +1 -1
- package/dist/schemas/library/social.d.ts +2 -2
- package/dist/schemas/library/social.d.ts.map +1 -1
- package/dist/schemas/library/social.js +1 -1
- package/dist/schemas/library/social.js.map +1 -1
- package/dist/schemas/standard.d.ts +1 -1
- package/dist/schemas/standard.d.ts.map +1 -1
- package/dist/schemas/standard.js +3 -3
- package/dist/schemas/standard.js.map +1 -1
- package/dist/session/auth.d.ts +20 -0
- package/dist/session/auth.d.ts.map +1 -1
- package/dist/session/auth.js +81 -64
- package/dist/session/auth.js.map +1 -1
- package/dist/session/connect.d.ts +50 -8
- package/dist/session/connect.d.ts.map +1 -1
- package/dist/session/connect.js +91 -27
- package/dist/session/connect.js.map +1 -1
- package/dist/session/connection.d.ts +39 -6
- package/dist/session/connection.d.ts.map +1 -1
- package/dist/session/connection.js +107 -38
- package/dist/session/connection.js.map +1 -1
- package/dist/session/hosting.d.ts +15 -0
- package/dist/session/hosting.d.ts.map +1 -1
- package/dist/session/hosting.js +55 -4
- package/dist/session/hosting.js.map +1 -1
- package/dist/session/index.d.ts +5 -5
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +2 -2
- package/dist/session/index.js.map +1 -1
- package/dist/space/account-registry.d.ts +36 -4
- package/dist/space/account-registry.d.ts.map +1 -1
- package/dist/space/account-registry.js +30 -3
- package/dist/space/account-registry.js.map +1 -1
- package/dist/space/invitation.d.ts +61 -0
- package/dist/space/invitation.d.ts.map +1 -0
- package/dist/space/invitation.js +84 -0
- package/dist/space/invitation.js.map +1 -0
- package/dist/space/invite-link.d.ts +64 -0
- package/dist/space/invite-link.d.ts.map +1 -0
- package/dist/space/invite-link.js +212 -0
- package/dist/space/invite-link.js.map +1 -0
- package/dist/space/roles.d.ts +59 -140
- package/dist/space/roles.d.ts.map +1 -1
- package/dist/space/roles.js +328 -427
- package/dist/space/roles.js.map +1 -1
- package/dist/space/space-manager.d.ts +21 -6
- package/dist/space/space-manager.d.ts.map +1 -1
- package/dist/space/space-manager.js +40 -23
- package/dist/space/space-manager.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/docs/README.md +2 -2
- package/docs/actions.md +40 -40
- package/docs/agents.md +2 -2
- package/docs/automations.md +2 -2
- package/docs/blueprints-and-guides.md +61 -1
- package/docs/bots.md +1 -1
- package/docs/building-an-app.md +2 -2
- package/docs/contacts.md +48 -69
- package/docs/inbox.md +145 -0
- package/docs/node.md +135 -76
- package/docs/query-format.md +1 -1
- package/docs/sign-in.md +16 -9
- package/docs/spaces.md +33 -5
- package/docs/standard-library.md +111 -86
- package/docs/storage.md +1 -1
- package/package.json +5 -5
- package/dist/doors/doors.d.ts +0 -140
- package/dist/doors/doors.d.ts.map +0 -1
- package/dist/doors/doors.js +0 -226
- package/dist/doors/doors.js.map +0 -1
- package/dist/doors/index.d.ts +0 -9
- package/dist/doors/index.d.ts.map +0 -1
- package/dist/doors/index.js +0 -7
- package/dist/doors/index.js.map +0 -1
- package/docs/doors.md +0 -151
package/docs/sign-in.md
CHANGED
|
@@ -386,22 +386,27 @@ lifetime, clamped to [1/24, 365].
|
|
|
386
386
|
**Connections.** The home remembers each connection per account in
|
|
387
387
|
`localStorage` under `<prefix>.connections:<accountId>` (`Connection`:
|
|
388
388
|
`origin`, `name`, `audience`, `access`, `scope`, `carrySpace?`, `spaces`,
|
|
389
|
-
`grantedAt`, `expiresAt`, `via?`, `recordsOnly?`). It keeps no note:
|
|
389
|
+
`grantedAt`, `expiresAt`, `via?`, `recordsOnly?`, `retired?`). It keeps no note:
|
|
390
390
|
disconnecting revokes the `audience` key, which is all a revoke names. A kept
|
|
391
391
|
connection with any other field (a `token` from before notes were
|
|
392
392
|
delegations in the UCAN 1.0 profile, say), or one of these in another
|
|
393
393
|
shape, is dropped when read, not read in part: its app or program connects
|
|
394
394
|
again.
|
|
395
|
-
Connecting the same origin again replaces its connection
|
|
395
|
+
Connecting the same origin again replaces its connection, revoking nothing:
|
|
396
|
+
the keys it replaced go in `retired`, for disconnecting to revoke. Nothing
|
|
397
|
+
revokes an app on its own, not even once its time has passed: a revoke keeps
|
|
398
|
+
only what this home has seen of the key, and a home that is seldom open has
|
|
399
|
+
seen little ([spec 06 §2.9](https://github.com/leifriksheim/minca/blob/main/spec/06-nodes-and-sessions.md)). A connection with `via: 'code'` (a
|
|
396
400
|
program connected by code through the app) is keyed by its audience instead,
|
|
397
|
-
so each such program is its own. A carrier is kept apart from the app at its
|
|
401
|
+
so each such program is its own (`connectionKey`). A carrier is kept apart from the app at its
|
|
398
402
|
origin: connecting either replaces only its own kind, and one key is never
|
|
399
403
|
both. `auth.connections()` lists them.
|
|
400
404
|
|
|
401
405
|
**Disconnecting.** `auth.disconnect(origin, { byCode?, audience? })` removes
|
|
402
406
|
the app's connections (by default the app and every program connected through
|
|
403
407
|
it by code; `byCode: true` only those programs; `audience` only that key),
|
|
404
|
-
revokes the keys of those with `access: write
|
|
408
|
+
revokes the keys of those with `access: write` and every key in their
|
|
409
|
+
`retired`, and, unless only programs
|
|
405
410
|
connected by code go, removes the automations the app proposed. A carrier at
|
|
406
411
|
that origin stays: it goes by its key alone (`audience`), and takes nothing of
|
|
407
412
|
the app's with it. The app hears of it when the revokes reach it,
|
|
@@ -413,10 +418,12 @@ they are still only here, and the app keeps working until this home is next
|
|
|
413
418
|
online with another of the account's devices or apps. The account home waits
|
|
414
419
|
5 s, and says so when nobody took them in.
|
|
415
420
|
|
|
416
|
-
**Signing out.** `auth.signOut()` forgets the unlocked account on this device
|
|
417
|
-
|
|
421
|
+
**Signing out.** `auth.signOut()` forgets the unlocked account on this device
|
|
422
|
+
and revokes the home's own session key, with a cutoff at what it wrote, so
|
|
423
|
+
nothing it wrote is lost. An
|
|
418
424
|
app's note doesn't need the home signed in, so the apps connected from here
|
|
419
|
-
keep working
|
|
425
|
+
keep working; a note running out stops only their live use, and what they
|
|
426
|
+
write counts until they are disconnected. `auth.signOut({ disconnect: true })`
|
|
420
427
|
disconnects them first, and the programs connected through them, with the
|
|
421
428
|
automations they proposed; carriers stay. The node sends nothing once it has
|
|
422
429
|
stopped, so it waits, up to 5 s for them all (`signOutGraceMs` in
|
|
@@ -426,7 +433,7 @@ open space as signing out starts, so signing out with nobody else online is
|
|
|
426
433
|
quick; `state.signingOut` is true meanwhile. A node with no network
|
|
427
434
|
configured doesn't wait. With nobody reachable, they leave the next time the account signs in here. A read-only app has no key to revoke: it loses
|
|
428
435
|
access when its time runs out. The account home asks each time, with
|
|
429
|
-
disconnecting
|
|
436
|
+
disconnecting unticked, since revoking is for when something is wrong, and is not ready to grant anything from the moment
|
|
430
437
|
signing out starts. Choosing another account on the connect page signs out
|
|
431
438
|
without disconnecting: switching accounts disconnects nothing.
|
|
432
439
|
|
|
@@ -441,4 +448,4 @@ carrier from the same origin (never an app there), adds the carrier with `node.c
|
|
|
441
448
|
returns the `CarryGrant`. Its connection is kept with `expiresAt: 0`, since a
|
|
442
449
|
carry connection never expires.
|
|
443
450
|
|
|
444
|
-
_Source: `packages/core/src/session/auth.ts` (`grant`, `grantCarry`, `propose`, `connections`, `disconnect`, `signOut`, `isConnection`), `packages/core/src/session/connect.ts` (`receiveConnectRequest`). Tests: `packages/core/tests/connect.test.ts` ("the home receiving a request", "connecting an app to an account home", "disconnecting …", "connecting a carrier to an account home", "signing out and disconnecting…", "signing out alone…"), `packages/core/tests/records-only.test.ts` ("a connection kept in an older shape is dropped, not read as the app’s own")._
|
|
451
|
+
_Source: `packages/core/src/session/auth.ts` (`grant`, `grantCarry`, `propose`, `connections`, `disconnect`, `signOut`, `isConnection`, `connectionKey`), `apps/home/src/components/Settings.tsx`, `packages/core/src/session/connect.ts` (`receiveConnectRequest`). Tests: `packages/core/tests/connect.test.ts` ("the home receiving a request", "connecting an app to an account home", "disconnecting …", "connecting a carrier to an account home", "signing out and disconnecting…", "signing out alone…"), `packages/core/tests/records-only.test.ts` ("a connection kept in an older shape is dropped, not read as the app’s own")._
|
package/docs/spaces.md
CHANGED
|
@@ -144,22 +144,50 @@ _Source: `packages/core/src/node/node.ts` (`spaces.succeed`), `packages/core/src
|
|
|
144
144
|
- Each role invite gets its own fresh secret and its own `sys.invite` record,
|
|
145
145
|
so one can be closed without the others.
|
|
146
146
|
- The invite names the space's relays, or the inviter's own when the space
|
|
147
|
-
names none
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
names none, and the always-on nodes that hold it: the account's hosts and
|
|
148
|
+
the space's own, at most 8, each pinned by its DID. A host that can't be
|
|
149
|
+
described within three seconds is left out rather than hold the invite up.
|
|
150
|
+
- `short: true` makes a short link (spec 03 §7.7), about 85 characters: the
|
|
151
|
+
invite is sealed and left in the mailbox of the account's first host and of
|
|
152
|
+
the first relay that takes it, and the link names those two. Where no
|
|
153
|
+
mailbox takes it, or the space's constitution is too large for one, the
|
|
154
|
+
long invite is returned instead; it works the same. `until` (ms) says when
|
|
155
|
+
to stop sharing it.
|
|
156
|
+
|
|
157
|
+
**Short links the account keeps.** Each short link's sealed invite is kept in
|
|
158
|
+
the account registry (`sys.link`), never its secret, and copied to every
|
|
159
|
+
carrier's carry space, so the account's host serves it while every device is
|
|
160
|
+
away. Every hour, and whenever the registry or a space's key changes, a
|
|
161
|
+
device holding the account key drops each one again where the space's members
|
|
162
|
+
meet. One past its `until`, or carrying a key the space has moved on from, is
|
|
163
|
+
ended: its role invite is closed and the record deleted. `closeInvite` by a
|
|
164
|
+
short link closes its invite and forgets the record. The device that made a
|
|
165
|
+
link holds its secret nowhere: copy the link when it is made.
|
|
166
|
+
|
|
167
|
+
`node.spaces.preview(invite)` reads an invite without storing anything, and
|
|
168
|
+
for a short link fetches it first, which is why it is async:
|
|
150
169
|
|
|
151
170
|
```
|
|
152
171
|
{ space: { id, name, visibility, founders, createdAt, succeeds? }, invitedBy,
|
|
153
|
-
carriesKey, carriesWrite, role
|
|
172
|
+
carriesKey, carriesWrite, role, // role is null for a view-only invite
|
|
173
|
+
until? } // a short link's, when given
|
|
154
174
|
```
|
|
155
175
|
|
|
176
|
+
`invitedBy` is the account that signed the invitation: `preview` and `join`
|
|
177
|
+
both refuse an invite whose signature or note doesn't check out ([spec 03 §7.4](https://github.com/leifriksheim/minca/blob/main/spec/03-spaces.md)).
|
|
178
|
+
A short link is fetched once and remembered by the node, so a preview and the
|
|
179
|
+
join after it ask the mailboxes once. A link whose invite is nowhere fails
|
|
180
|
+
with "That invite was not found"; it may have expired or its places be down.
|
|
181
|
+
Invite nodes are dialled for the space alongside the hosts the account uses,
|
|
182
|
+
and kept like its invite relays.
|
|
183
|
+
|
|
156
184
|
On `join`, relays carried by the invite are a hint: the node uses them only
|
|
157
185
|
when they pass `checkRelays` and it holds no relay list for the space yet.
|
|
158
186
|
While the invite's record has not reached this device, the space is held with
|
|
159
187
|
`joining: true` and the node tries again as records arrive
|
|
160
188
|
([spec 06 §1.3](https://github.com/leifriksheim/minca/blob/main/spec/06-nodes-and-sessions.md)).
|
|
161
189
|
|
|
162
|
-
_Source: `packages/core/src/node/node.ts` (`spaces.invite`, `preview`, `join`), `packages/core/src/space/space-manager.ts` (`previewInvite`, `join`). Tests: `packages/core/tests/space.test.ts` ("invites"), `packages/core/tests/roles.test.ts` ("invites")._
|
|
190
|
+
_Source: `packages/core/src/node/node.ts` (`spaces.invite`, `preview`, `join`, `nodesOf`, `shortInvite`, `resolveInvite`, `keepLinks`), `packages/core/src/space/space-manager.ts` (`previewInvite`, `join`), `packages/core/src/space/invite-link.ts`. Tests: `packages/core/tests/space.test.ts` ("invites"), `packages/core/tests/roles.test.ts` ("invites"), `packages/core/tests/invite-link.test.ts`, `packages/cli/tests/host.test.ts` ("someone invited reaches the space through the inviter’s host…", "a short link: the host keeps it…")._
|
|
163
191
|
|
|
164
192
|
## Keeping a space's keys and relays
|
|
165
193
|
|
package/docs/standard-library.md
CHANGED
|
@@ -38,6 +38,39 @@ hold rather than by name is [compatible definitions](blueprints-and-guides.md#co
|
|
|
38
38
|
|
|
39
39
|
_Source: `packages/core/src/schemas/blueprints.ts` (`standardCollections`), `packages/core/src/schemas/standard.ts` (`standardDefinition`, `standardGroups`), `packages/core/src/node/actions.ts` (`collections_standard`, `collections_propose`). Tests: `packages/core/tests/records-only.test.ts` ("a standard collection by name is exactly the library’s; a look-alike std.\* is refused", "collections_standard lists the library by area, and gives definitions in full")._
|
|
40
40
|
|
|
41
|
+
## How the library is shaped
|
|
42
|
+
|
|
43
|
+
People start with a few apps, then change them, add views, and build new
|
|
44
|
+
apps over the same records, often by asking an agent. That only works if
|
|
45
|
+
every app reaches for the same collection for the same thing. These rules
|
|
46
|
+
keep the library small enough to choose from, and each choice obvious:
|
|
47
|
+
|
|
48
|
+
1. **One collection per kind of thing.** Variants are optional fields, not
|
|
49
|
+
collections of their own: a photo, a video and a PDF are each a
|
|
50
|
+
`std.file`, with `width`, `duration` or none. Two collections an agent
|
|
51
|
+
could reasonably pick for the same thing is a bug in the library.
|
|
52
|
+
2. **A group is a relation, never a field on what is in it.** There are two
|
|
53
|
+
ways to group, and only two: `std.tag` for loose labels, any number on a
|
|
54
|
+
record, and `std.list` with a `std.list-item` per member for a named,
|
|
55
|
+
ordered group that exists while empty: a folder, an album, a playlist, a
|
|
56
|
+
category, an itinerary (`kind`). Because the group is a record of its
|
|
57
|
+
own, one file can be in a chat, a category and an album, and each app
|
|
58
|
+
arranges it without touching the file. A single facet that nearly every
|
|
59
|
+
app filters by, like an event's or a transaction's `category`, may stay a
|
|
60
|
+
field.
|
|
61
|
+
3. **What an app adds to a standard record is a record of its own about
|
|
62
|
+
it.** A definition here is exact (`collections_propose` refuses a
|
|
63
|
+
look-alike), so an app that needs more on a `std.file`, say, defines
|
|
64
|
+
`recipes.photo-note` with an `about` link to the file and
|
|
65
|
+
`onePer: [link:about]`. Every other app still reads the file; only the
|
|
66
|
+
recipes app reads the note. Never a parallel `recipes.photo` collection.
|
|
67
|
+
4. **Links use one vocabulary**, below. A link that says where a record
|
|
68
|
+
sits is `in`, whether that is a channel, a board column or a list.
|
|
69
|
+
5. **A description says when not to use it.** Agents choose by reading
|
|
70
|
+
descriptions, so where a neighbour could be mistaken for it, the
|
|
71
|
+
description names the neighbour: "To vote on a std.proposal, use
|
|
72
|
+
std.ballot."
|
|
73
|
+
|
|
41
74
|
## Conventions
|
|
42
75
|
|
|
43
76
|
- What several people edit is several records, not an array in one body,
|
|
@@ -92,20 +125,17 @@ anything, and only moderators and admins write in the collections in
|
|
|
92
125
|
|
|
93
126
|
**Annotations**
|
|
94
127
|
|
|
95
|
-
| Name
|
|
96
|
-
|
|
|
97
|
-
| `std.reaction`
|
|
98
|
-
| `std.comment`
|
|
99
|
-
| `std.tag`
|
|
100
|
-
| `std.
|
|
101
|
-
| `std.
|
|
102
|
-
| `std.
|
|
103
|
-
| `std.
|
|
104
|
-
| `std.
|
|
105
|
-
| `std.
|
|
106
|
-
| `std.report` | **`reason`** `spam`/`abuse`/`sexual`/`misleading`/`illegal`/`other`; `note` string ≤ 2000 | `about` → `*`, one | `onePer: [@author, link:about]` |
|
|
107
|
-
| `std.label` | **`value`** string 1–64 | `about` → `*`, one | `onePer: [link:about, value]` |
|
|
108
|
-
| `std.claim` | `note` string ≤ 500; `respondingTo` DID; topic `respondingTo` | `about` → `*`, one | `onePer: [link:about]` |
|
|
128
|
+
| Name | Body | Links | Rules |
|
|
129
|
+
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -------------------------------------- |
|
|
130
|
+
| `std.reaction` | **`emoji`** string 1–16; `respondingTo` DID; topic `respondingTo` | `about` → `*`, one | `onePer: [@author, link:about, emoji]` |
|
|
131
|
+
| `std.comment` | **`text`** string 1–10000; `mentions` DID[] (≤ 64); `replyingTo` DID; `respondingTo` DID; topics `mentions`, `replyingTo`, `respondingTo` | `about` → `*`, one; `replyTo` → `std.comment`, one | — |
|
|
132
|
+
| `std.tag` | **`label`** string 1–100 | `about` → `*`, one | `onePer: [@author, link:about, label]` |
|
|
133
|
+
| `std.rating` | **`score`** integer 1–5; `review` string ≤ 10000 | `about` → `*`, one | `onePer: [@author, link:about]` |
|
|
134
|
+
| `std.highlight` | **`quote`** string 1–10000; `prefix` string ≤ 500; `suffix` string ≤ 500; `note` string ≤ 10000 | `about` → `*`, one | — |
|
|
135
|
+
| `std.pin` | `note` string ≤ 500 | `about` → `*`, one | `onePer: [link:about]` |
|
|
136
|
+
| `std.report` | **`reason`** `spam`/`abuse`/`sexual`/`misleading`/`illegal`/`other`; `note` string ≤ 2000 | `about` → `*`, one | `onePer: [@author, link:about]` |
|
|
137
|
+
| `std.label` | **`value`** string 1–64 | `about` → `*`, one | `onePer: [link:about, value]` |
|
|
138
|
+
| `std.claim` | `note` string ≤ 500; `respondingTo` DID; topic `respondingTo` | `about` → `*`, one | `onePer: [link:about]` |
|
|
109
139
|
|
|
110
140
|
**People**
|
|
111
141
|
|
|
@@ -120,20 +150,20 @@ anything, and only moderators and admins write in the collections in
|
|
|
120
150
|
|
|
121
151
|
**Messaging and publishing**
|
|
122
152
|
|
|
123
|
-
| Name | Body | Links
|
|
124
|
-
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
125
|
-
| `std.message` | **`text`** string 1–10000; `mentions` DID[] (≤ 64); `replyingTo` DID; topics `link:
|
|
126
|
-
| `std.channel` | **`name`** string 1–100; `topic` string ≤ 500; `position` string 1–200 | —
|
|
127
|
-
| `std.direct` | **`to`** DID[] (1–16); **`data`** string ≤ 60000; **`boxes`** `{to, sealed}`[] (≤ 17); topic `to` | —
|
|
128
|
-
| `std.post` | `text` string ≤ 10000; `images` image[] (≤ 8); `langs` string 2–35[] (≤ 3); `mentions` DID[] (≤ 64); `replyingTo` DID; topics `mentions`, `replyingTo` | `replyTo` → `std.post`, one; `root` → `std.post`, one; `shares` → `*`, one
|
|
129
|
-
| `std.repost` | `respondingTo` DID; topic `respondingTo` | `about` → `*`, one
|
|
130
|
-
| `std.article` | **`title`** string 1–300; `summary` string ≤ 1000; `content` string ≤ 200000; `cover` blob; `slug` string 1–200; `publishedAt` when; `draft` boolean; `mentions` DID[] (≤ 64); topic `mentions` | `in` → `std.publication`, one
|
|
131
|
-
| `std.publication` | **`title`** string 1–200; `description` string ≤ 2000; `icon` blob | —
|
|
132
|
-
| `std.doc` | **`title`** string 1–500 | —
|
|
133
|
-
| `std.doc-block` | **`type`** `paragraph`/`heading1`/`heading2`/`heading3`/`bullet`/`numbered`/`todo`/`quote`/`code`/`image`/`divider`; `text` string ≤ 20000; `checked` boolean; `language` string ≤ 32; `image` image; `position` string 1–200; `mentions` DID[] (≤ 64); topic `mentions` | `in` → `std.doc`, one; `parent` → `std.doc-block`, one
|
|
134
|
-
| `std.wiki-page` | **`slug`** string 1–200; **`title`** string 1–300; `content` string ≤ 200000 | —
|
|
135
|
-
| `std.note` | `title` string ≤ 500; `content` string ≤ 200000; `pinned` boolean; `color` string ≤ 32; `mentions` DID[] (≤ 64); topic `mentions` | —
|
|
136
|
-
| `std.call` | **`status`** `missed`/`ended`; `to` string ≤ 256; **`startedAt`** string ≤ 64; `endedAt` string ≤ 64; `people` string ≤ 256[] (≤ 64); topics `to`, `people` | —
|
|
153
|
+
| Name | Body | Links | Rules |
|
|
154
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------- |
|
|
155
|
+
| `std.message` | **`text`** string 1–10000; `mentions` DID[] (≤ 64); `replyingTo` DID; topics `link:in`, `mentions`, `replyingTo` | `in` → `std.channel`, one; `replyTo` → `std.message`, one; `shares` → `*`, one | — |
|
|
156
|
+
| `std.channel` | **`name`** string 1–100; `topic` string ≤ 500; `position` string 1–200 | — | — |
|
|
157
|
+
| `std.direct` | **`to`** DID[] (1–16); **`data`** string ≤ 60000; **`boxes`** `{to, sealed}`[] (≤ 17); topic `to` | — | — |
|
|
158
|
+
| `std.post` | `text` string ≤ 10000; `images` image[] (≤ 8); `langs` string 2–35[] (≤ 3); `mentions` DID[] (≤ 64); `replyingTo` DID; topics `mentions`, `replyingTo` | `replyTo` → `std.post`, one; `root` → `std.post`, one; `shares` → `*`, one | — |
|
|
159
|
+
| `std.repost` | `respondingTo` DID; topic `respondingTo` | `about` → `*`, one | `onePer: [@author, link:about]` |
|
|
160
|
+
| `std.article` | **`title`** string 1–300; `summary` string ≤ 1000; `content` string ≤ 200000; `cover` blob; `slug` string 1–200; `publishedAt` when; `draft` boolean; `mentions` DID[] (≤ 64); topic `mentions` | `in` → `std.publication`, one | — |
|
|
161
|
+
| `std.publication` | **`title`** string 1–200; `description` string ≤ 2000; `icon` blob | — | — |
|
|
162
|
+
| `std.doc` | **`title`** string 1–500 | — | — |
|
|
163
|
+
| `std.doc-block` | **`type`** `paragraph`/`heading1`/`heading2`/`heading3`/`bullet`/`numbered`/`todo`/`quote`/`code`/`image`/`divider`; `text` string ≤ 20000; `checked` boolean; `language` string ≤ 32; `image` image; `position` string 1–200; `mentions` DID[] (≤ 64); topic `mentions` | `in` → `std.doc`, one; `parent` → `std.doc-block`, one | — |
|
|
164
|
+
| `std.wiki-page` | **`slug`** string 1–200; **`title`** string 1–300; `content` string ≤ 200000 | — | `onePer: [slug]`; history `all` |
|
|
165
|
+
| `std.note` | `title` string ≤ 500; `content` string ≤ 200000; `pinned` boolean; `color` string ≤ 32; `mentions` DID[] (≤ 64); topic `mentions` | — | — |
|
|
166
|
+
| `std.call` | **`status`** `missed`/`ended`; `to` string ≤ 256; **`startedAt`** string ≤ 64; `endedAt` string ≤ 64; `people` string ≤ 256[] (≤ 64); topics `to`, `people` | — | — |
|
|
137
167
|
|
|
138
168
|
**Lists**
|
|
139
169
|
|
|
@@ -144,32 +174,27 @@ anything, and only moderators and admins write in the collections in
|
|
|
144
174
|
|
|
145
175
|
**Files and media**
|
|
146
176
|
|
|
147
|
-
| Name
|
|
148
|
-
|
|
|
149
|
-
| `std.
|
|
150
|
-
| `std.
|
|
151
|
-
| `std.
|
|
152
|
-
| `std.album` | **`title`** string 1–200; `description` string ≤ 2000 | `cover` → `std.photo`, one | — |
|
|
153
|
-
| `std.video` | **`blob`** blob; `thumbnail` blob; `duration` number ≥ 0; `captions` blob; `alt` string ≤ 2000; `title` string ≤ 300 | `in` → `*`, many | — |
|
|
154
|
-
| `std.track` | **`title`** string 1–300; `artists` string 1–200[] (≤ 20); `album` string ≤ 300; `duration` number ≥ 0; `isrc` string ≤ 12; `mbid` string ≤ 36; `blob` blob | `in` → `std.list`, many | — |
|
|
155
|
-
| `std.play` | **`title`** string 1–300; `artists` string 1–200[] (≤ 20); `album` string ≤ 300; `duration` number ≥ 0; `isrc` string ≤ 12; `mbid` string ≤ 36; **`playedAt`** when | — | — |
|
|
177
|
+
| Name | Body | Links | Rules |
|
|
178
|
+
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | ----- |
|
|
179
|
+
| `std.file` | **`name`** string 1–255; **`mime`** string 1–255; `size` integer ≥ 0; `blob` blob; `url` string 1–2048; `alt` string ≤ 2000; `width` integer ≥ 1; `height` integer ≥ 1; `duration` number ≥ 0; `takenAt` when; `place` place; `thumbnail` blob; `captions` blob | `about` → `*`, one | — |
|
|
180
|
+
| `std.track` | **`title`** string 1–300; `artists` string 1–200[] (≤ 20); `album` string ≤ 300; `duration` number ≥ 0; `isrc` string ≤ 12; `mbid` string ≤ 36 | `file` → `std.file`, one | — |
|
|
181
|
+
| `std.play` | **`title`** string 1–300; `artists` string 1–200[] (≤ 20); `album` string ≤ 300; `duration` number ≥ 0; `isrc` string ≤ 12; `mbid` string ≤ 36; **`playedAt`** when | `about` → `std.track`, one | — |
|
|
156
182
|
|
|
157
183
|
**Time and planning**
|
|
158
184
|
|
|
159
|
-
| Name | Body | Links
|
|
160
|
-
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
161
|
-
| `std.calendar` | **`name`** string 1–200; `color` string ≤ 32 | —
|
|
162
|
-
| `std.event` | **`title`** string 1–500; `description` string ≤ 10000; `category` string ≤ 100; **`start`** when; `end` when; `tz` string 1–64; `allDay` boolean; `place` place; `url` string 1–2048; `rrule` string 1–1000; `status` `confirmed`/`tentative`/`cancelled`; topic `place.cells` | `in` → `std.calendar`, one
|
|
163
|
-
| `std.rsvp` | **`status`** `going`/`maybe`/`no`; `guests` integer 0–100; `note` string ≤ 500; `respondingTo` DID; topic `respondingTo` | `about` → `std.event`, one
|
|
164
|
-
| `std.slot` | **`start`** when; **`end`** when; `tz` string 1–64; `note` string ≤ 1000 | `in` → `std.calendar`, one
|
|
165
|
-
| `std.
|
|
166
|
-
| `std.
|
|
167
|
-
| `std.
|
|
168
|
-
| `std.
|
|
169
|
-
| `std.
|
|
170
|
-
| `std.
|
|
171
|
-
| `std.
|
|
172
|
-
| `std.checkin` | **`date`** day; `value` number; `note` string ≤ 1000 | `about` → `std.habit`, one | `onePer: [@author, link:about, date]` |
|
|
185
|
+
| Name | Body | Links | Rules |
|
|
186
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------- |
|
|
187
|
+
| `std.calendar` | **`name`** string 1–200; `color` string ≤ 32 | — | — |
|
|
188
|
+
| `std.event` | **`title`** string 1–500; `description` string ≤ 10000; `category` string ≤ 100; **`start`** when; `end` when; `tz` string 1–64; `allDay` boolean; `place` place; `url` string 1–2048; `rrule` string 1–1000; `status` `confirmed`/`tentative`/`cancelled`; topic `place.cells` | `in` → `std.calendar`, one | — |
|
|
189
|
+
| `std.rsvp` | **`status`** `going`/`maybe`/`no`; `guests` integer 0–100; `note` string ≤ 500; `respondingTo` DID; topic `respondingTo` | `about` → `std.event`, one | `onePer: [@author, link:about]` |
|
|
190
|
+
| `std.slot` | **`start`** when; **`end`** when; `tz` string 1–64; `note` string ≤ 1000 | `in` → `std.calendar`, one | — |
|
|
191
|
+
| `std.column` | **`name`** string 1–200; `position` string 1–200 | `in` → `std.project`, one | — |
|
|
192
|
+
| `std.task` | **`title`** string 1–500; `notes` string ≤ 10000; `position` string 1–200; `due` when; `status` `todo`/`doing`/`done`/`cancelled`; `assignees` DID[] (≤ 20); `priority` integer 0–4; topic `assignees` | `in` → `std.column`, `std.project`, one; `parent` → `std.task`, one | — |
|
|
193
|
+
| `std.project` | **`name`** string 1–200; `description` string ≤ 10000; `status` `planned`/`active`/`paused`/`done`/`cancelled`; `due` when | — | — |
|
|
194
|
+
| `std.time-entry` | **`start`** when; `end` when; `note` string ≤ 1000 | `about` → `*`, one | — |
|
|
195
|
+
| `std.reminder` | **`at`** when; `note` string ≤ 1000; `done` boolean | `about` → `*`, one | — |
|
|
196
|
+
| `std.habit` | **`name`** string 1–200; `schedule` string ≤ 1000; `target` number ≥ 0; `unit` string ≤ 32; `position` string 1–200 | — | — |
|
|
197
|
+
| `std.checkin` | **`date`** day; `value` number; `note` string ≤ 1000 | `about` → `std.habit`, one | `onePer: [@author, link:about, date]` |
|
|
173
198
|
|
|
174
199
|
**Places and travel**
|
|
175
200
|
|
|
@@ -206,19 +231,19 @@ anything, and only moderators and admins write in the collections in
|
|
|
206
231
|
|
|
207
232
|
**Community and governance**
|
|
208
233
|
|
|
209
|
-
| Name | Body | Links
|
|
210
|
-
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
211
|
-
| `std.poll` | **`question`** string 1–500; **`options`** string 1–200[]; `closed` boolean | —
|
|
212
|
-
| `std.vote` | **`choice`** integer ≥ 0; `choices` integer ≥ 0[] (≤ 100); `respondingTo` DID; topic `respondingTo` | `about` → `std.poll`,
|
|
213
|
-
| `std.proposal` | **`title`** string 1–300; `body` string ≤ 20000; **`options`** string 1–200[] (1–20); `closesAt` when; `status` `open`/`passed`/`rejected`/`withdrawn`; `quorum` integer 1–10000 | —
|
|
214
|
-
| `std.ballot` | **`choice`** integer ≥ 0; `respondingTo` DID; topic `respondingTo` | `about` → `std.proposal`, one
|
|
215
|
-
| `std.decision` | **`outcome`** integer ≥ 0; **`proposal`** string 1–128 (a version id); **`ballots`** string 1–128[] (≤ 256) | `about` → `std.proposal`, one
|
|
216
|
-
| `std.goal` | **`title`** string 1–300; `body` string ≤ 20000; **`target`** integer 1–10⁹; **`unit`** string 1–50; `closesAt` when | —
|
|
217
|
-
| `std.pledge` | **`amount`** integer 1–10⁹; `note` string ≤ 1000; `respondingTo` DID; topic `respondingTo` | `about` → `std.goal`, one
|
|
218
|
-
| `std.goal-reached` | **`goal`** string 1–128 (a version id); **`pledges`** string 1–128[] (≤ 256) | `about` → `std.goal`, one
|
|
219
|
-
| `std.announcement` | **`title`** string 1–300; `text` string ≤ 20000 | —
|
|
220
|
-
| `std.badge` | **`name`** string 1–100; `description` string ≤ 1000; `image` blob | —
|
|
221
|
-
| `std.award` | **`did`** DID; `note` string ≤ 1000; topic `did` | `about` → `std.badge`, one
|
|
234
|
+
| Name | Body | Links | Rules |
|
|
235
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | -------------------------------------------------- |
|
|
236
|
+
| `std.poll` | **`question`** string 1–500; **`options`** string 1–200[]; `closed` boolean | — | `fixed: [options]` |
|
|
237
|
+
| `std.vote` | **`choice`** integer ≥ 0; `choices` integer ≥ 0[] (≤ 100); `respondingTo` DID; topic `respondingTo` | `about` → `std.poll`, one | `onePer: [@author, link:about]` |
|
|
238
|
+
| `std.proposal` | **`title`** string 1–300; `body` string ≤ 20000; **`options`** string 1–200[] (1–20); `closesAt` when; `status` `open`/`passed`/`rejected`/`withdrawn`; `quorum` integer 1–10000 | — | `fixed: [options]` |
|
|
239
|
+
| `std.ballot` | **`choice`** integer ≥ 0; `respondingTo` DID; topic `respondingTo` | `about` → `std.proposal`, one | `onePer: [@author, link:about]`; `fixed: [choice]` |
|
|
240
|
+
| `std.decision` | **`outcome`** integer ≥ 0; **`proposal`** string 1–128 (a version id); **`ballots`** string 1–128[] (≤ 256) | `about` → `std.proposal`, one | `onePer: [link:about]`; `check` (below) |
|
|
241
|
+
| `std.goal` | **`title`** string 1–300; `body` string ≤ 20000; **`target`** integer 1–10⁹; **`unit`** string 1–50; `closesAt` when | — | `fixed: [target, unit]` |
|
|
242
|
+
| `std.pledge` | **`amount`** integer 1–10⁹; `note` string ≤ 1000; `respondingTo` DID; topic `respondingTo` | `about` → `std.goal`, one | `onePer: [@author, link:about]`; `fixed: [amount]` |
|
|
243
|
+
| `std.goal-reached` | **`goal`** string 1–128 (a version id); **`pledges`** string 1–128[] (≤ 256) | `about` → `std.goal`, one | `onePer: [link:about]`; `check` (below) |
|
|
244
|
+
| `std.announcement` | **`title`** string 1–300; `text` string ≤ 20000 | — | — |
|
|
245
|
+
| `std.badge` | **`name`** string 1–100; `description` string ≤ 1000; `image` blob | — | — |
|
|
246
|
+
| `std.award` | **`did`** DID; `note` string ≤ 1000; topic `did` | `about` → `std.badge`, one | `onePer: [link:about, did]` |
|
|
222
247
|
|
|
223
248
|
**Proven outcomes.** A `std.decision` and a `std.goal-reached` are not
|
|
224
249
|
declared by anyone: each cites the records that prove it, by version id, and
|
|
@@ -356,8 +381,8 @@ _Source: `packages/core/src/schemas/library/publishing.ts` (`message`, `post`),
|
|
|
356
381
|
|
|
357
382
|
**Responses.** A record written in answer to someone's record names them in
|
|
358
383
|
`respondingTo`: a `std.reaction`, `std.comment` or `std.repost` the author of
|
|
359
|
-
what it is about, a `std.rsvp` the event's, a
|
|
360
|
-
`std.vote`
|
|
384
|
+
what it is about, a `std.rsvp` the event's, a
|
|
385
|
+
`std.vote` the poll's, a `std.ballot` the proposal's, a `std.pledge` the
|
|
361
386
|
goal's, a `std.claim` the claimed record's, a `std.order` the listing's, and a
|
|
362
387
|
`std.order-update` the order's. It is their topic, so "someone reacted to,
|
|
363
388
|
commented on, or answered what I wrote" is `where: { "respondingTo":
|
|
@@ -387,10 +412,10 @@ most 63 so that with `paidBy` every one is tagged: a record carries at most
|
|
|
387
412
|
_Source: `packages/core/src/schemas/library/annotations.ts`, `packages/core/src/schemas/library/publishing.ts`, `packages/core/src/schemas/library/planning.ts`, `packages/core/src/schemas/library/community.ts`, `packages/core/src/schemas/library/money.ts`, `packages/core/src/schemas/library/social.ts`, `packages/core/src/schemas/library/media.ts`; `apps/example/src/derive/people.ts` (`respondingTo`), `apps/example/src/components/std/Reactions.tsx`, `apps/example/src/components/std/Comments.tsx`, `apps/example/src/components/apps/Polls.tsx`, `apps/example/src/components/apps/Decisions.tsx`, `apps/example/src/components/apps/Events.tsx`, `apps/example/src/components/apps/Marketplace.tsx`. Tests: `packages/core/tests/topics.test.ts` ("every standard collection that names people has them as topics…", "a report names nobody…", "a std.reaction is tagged for the person in its respondingTo…" and the rest of that list)._
|
|
388
413
|
|
|
389
414
|
**Channels.** A space with more than one conversation lists `std.channel`
|
|
390
|
-
records, by `position` then name, and a message
|
|
391
|
-
`
|
|
392
|
-
`include: { messages: { rel: '
|
|
393
|
-
counts them. A message
|
|
415
|
+
records, by `position` then name, and a message is `in` its channel:
|
|
416
|
+
`where: { 'link:in': key }` finds a channel's messages, and
|
|
417
|
+
`include: { messages: { rel: 'in', from: 'std.message', count: true } }`
|
|
418
|
+
counts them. A message in no channel is in the space's own room,
|
|
394
419
|
which a chat shows first, as "general". In the `community` template only
|
|
395
420
|
moderators and admins make or rename a channel. A channel is a label, not a boundary: every member reads
|
|
396
421
|
every channel. Something only some members may read is a space of its own, or
|
|
@@ -405,18 +430,19 @@ keeper can match unread.
|
|
|
405
430
|
|
|
406
431
|
_Source: `packages/core/src/schemas/library/publishing.ts` (`channel`, `direct`), `packages/core/src/privacy/direct.ts`, `apps/example/src/components/apps/Chat.tsx`. Tests: `packages/core/tests/direct.test.ts`._
|
|
407
432
|
|
|
408
|
-
**Changes to earlier definitions.**
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
`std.
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
`
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
433
|
+
**Changes to earlier definitions.** Before v1 the library is reshaped
|
|
434
|
+
without migrations, to keep to the rules above. The last such change merged
|
|
435
|
+
`std.attachment`, `std.photo`, `std.video`, `std.folder` and `std.album` into
|
|
436
|
+
one `std.file` (groups of files are `std.list`s); removed `std.booking` (a
|
|
437
|
+
booking is a `std.claim` about a `std.slot`), `std.reference` (any link
|
|
438
|
+
refers) and `std.bookmark` (a saved thing is a `std.list-item`); renamed
|
|
439
|
+
`std.message`'s `channel` link and `std.task`'s `column` link to `in`, and
|
|
440
|
+
dropped the task's `project` link (a task is `in` a project when it has no
|
|
441
|
+
column, and a column is `in` its project); made `std.tag` one record per
|
|
442
|
+
person, record and label; gave `std.track` a `file` link and `std.play` an
|
|
443
|
+
`about` link to its track; and narrowed `std.vote` to polls, since a proposal
|
|
444
|
+
is decided by `std.ballot`s. A space that holds an earlier definition keeps
|
|
445
|
+
it until someone applies a blueprint that carries the new one.
|
|
420
446
|
|
|
421
447
|
Since then ([#105](https://github.com/leifriksheim/minca/issues/105)), `std.comment` and `std.post` gained the same optional
|
|
422
448
|
`mentions` and `replyingTo` as a message, and `std.note`, `std.doc-block` and
|
|
@@ -433,10 +459,9 @@ so "mentions me" and "assigned to me" match from then on.
|
|
|
433
459
|
| Name | Body | Rules | Where |
|
|
434
460
|
| --------------------- | --------------------------------------------------------------------------------------- | ----------------- | ----------------------- |
|
|
435
461
|
| `std.contact` | `did` ≤ 256 and `name` ≤ 200, required; `space` ≤ 256; `note` ≤ 2000; `blocked` boolean | `onePer: [did]` | [contacts](contacts.md) |
|
|
436
|
-
| `std.contact-request` | `to` ≤
|
|
437
|
-
| `std.
|
|
438
|
-
| `std.knock` | `space` ≤ 256, `name` ≤ 64
|
|
439
|
-
| `std.knock-answer` | `sig` ≤ 200, required | — | [doors.md](doors.md) |
|
|
462
|
+
| `std.contact-request` | `to` ≤ 64 and `sealed` ≤ 16000, required | — | [contacts](contacts.md) |
|
|
463
|
+
| `std.inbox` | `gen` ≥ 0 and `places` (1–3, each ≤ 200), required; `name` ≤ 64 | — | [inbox.md](inbox.md) |
|
|
464
|
+
| `std.knock` | `space` ≤ 256, `name` ≤ 64 and `invite` ≤ 12000, all required | `onePer: [space]` | [inbox.md](inbox.md) |
|
|
440
465
|
|
|
441
466
|
**Positions.** `position` is a string that sorts (by plain string comparison)
|
|
442
467
|
where a record goes in a hand-made order. Digits are `0–9a–z`; a position
|
package/docs/storage.md
CHANGED
|
@@ -55,7 +55,7 @@ When another writer changed the same store, the node re-reads all of it
|
|
|
55
55
|
(`invalidate`). Other tabs of one browser are told through a
|
|
56
56
|
`BroadcastChannel` named `minca-node:<root DID>:<space id>`. Where a browser
|
|
57
57
|
has shared workers that work, the apps in this repository run one node for all
|
|
58
|
-
of a site's tabs in a `SharedWorker
|
|
58
|
+
of a site's tabs in a `SharedWorker` (one per account and key), so those tabs share one store and have
|
|
59
59
|
nothing to tell each other; the channel remains for the rest (Chrome on
|
|
60
60
|
Android has none; WebKit drops a message to one that holds a `CryptoKey`),
|
|
61
61
|
where each tab's node runs in a worker of its own
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minca/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Self-sovereign P2P protocol for the browser — identity, schemas, storage, networking, and gossip sync",
|
|
6
6
|
"repository": {
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"types": "./dist/calls/index.d.ts",
|
|
62
62
|
"import": "./dist/calls/index.js"
|
|
63
63
|
},
|
|
64
|
-
"./
|
|
65
|
-
"@minca/source": "./src/
|
|
66
|
-
"types": "./dist/
|
|
67
|
-
"import": "./dist/
|
|
64
|
+
"./inbox": {
|
|
65
|
+
"@minca/source": "./src/inbox/index.ts",
|
|
66
|
+
"types": "./dist/inbox/index.d.ts",
|
|
67
|
+
"import": "./dist/inbox/index.js"
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|