@minca/core 0.1.14 → 0.1.16
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 +4 -4
- package/dist/elements/auth-styles.d.ts +1 -1
- package/dist/elements/auth-styles.d.ts.map +1 -1
- package/dist/elements/auth-styles.js +21 -4
- package/dist/elements/auth-styles.js.map +1 -1
- package/dist/elements/minca-auth.d.ts.map +1 -1
- package/dist/elements/minca-auth.js +151 -57
- package/dist/elements/minca-auth.js.map +1 -1
- package/dist/files/space-files.d.ts +15 -3
- package/dist/files/space-files.d.ts.map +1 -1
- package/dist/files/space-files.js +225 -37
- package/dist/files/space-files.js.map +1 -1
- package/dist/identity/abilities.d.ts +2 -0
- package/dist/identity/abilities.d.ts.map +1 -1
- package/dist/identity/abilities.js +2 -0
- package/dist/identity/abilities.js.map +1 -1
- package/dist/identity/account-vault.d.ts +15 -71
- package/dist/identity/account-vault.d.ts.map +1 -1
- package/dist/identity/account-vault.js +45 -104
- package/dist/identity/account-vault.js.map +1 -1
- package/dist/identity/channel.d.ts +3 -9
- package/dist/identity/channel.d.ts.map +1 -1
- package/dist/identity/channel.js +42 -42
- package/dist/identity/channel.js.map +1 -1
- package/dist/identity/contact-key.d.ts +14 -29
- package/dist/identity/contact-key.d.ts.map +1 -1
- package/dist/identity/contact-key.js +31 -51
- package/dist/identity/contact-key.js.map +1 -1
- package/dist/identity/crypto-p256.d.ts.map +1 -1
- package/dist/identity/crypto-p256.js +39 -53
- package/dist/identity/crypto-p256.js.map +1 -1
- package/dist/identity/hpke.d.ts.map +1 -1
- package/dist/identity/hpke.js +19 -19
- package/dist/identity/hpke.js.map +1 -1
- package/dist/identity/identity-manager.d.ts.map +1 -1
- package/dist/identity/identity-manager.js +1 -2
- package/dist/identity/identity-manager.js.map +1 -1
- package/dist/identity/policy.d.ts.map +1 -1
- package/dist/identity/policy.js +35 -61
- package/dist/identity/policy.js.map +1 -1
- package/dist/identity/recovery-code.d.ts +2 -8
- package/dist/identity/recovery-code.d.ts.map +1 -1
- package/dist/identity/recovery-code.js +4 -11
- package/dist/identity/recovery-code.js.map +1 -1
- package/dist/identity/root-signer.d.ts +1 -6
- package/dist/identity/root-signer.d.ts.map +1 -1
- package/dist/identity/root-signer.js +12 -15
- package/dist/identity/root-signer.js.map +1 -1
- package/dist/identity/ucan.d.ts.map +1 -1
- package/dist/identity/ucan.js +48 -39
- package/dist/identity/ucan.js.map +1 -1
- package/dist/identity/webauthn.d.ts +6 -11
- package/dist/identity/webauthn.d.ts.map +1 -1
- package/dist/identity/webauthn.js +18 -30
- package/dist/identity/webauthn.js.map +1 -1
- package/dist/inbox/inbox.d.ts.map +1 -1
- package/dist/inbox/inbox.js +40 -30
- package/dist/inbox/inbox.js.map +1 -1
- package/dist/inbox/index.d.ts +2 -0
- package/dist/inbox/index.d.ts.map +1 -1
- package/dist/inbox/index.js +1 -0
- package/dist/inbox/index.js.map +1 -1
- package/dist/inbox/names.d.ts +54 -0
- package/dist/inbox/names.d.ts.map +1 -0
- package/dist/inbox/names.js +299 -0
- package/dist/inbox/names.js.map +1 -0
- package/dist/index.d.ts +3 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/network/mesh.d.ts +7 -20
- package/dist/network/mesh.d.ts.map +1 -1
- package/dist/network/mesh.js +267 -245
- package/dist/network/mesh.js.map +1 -1
- package/dist/network/relay-link.d.ts +31 -0
- package/dist/network/relay-link.d.ts.map +1 -0
- package/dist/network/relay-link.js +62 -0
- package/dist/network/relay-link.js.map +1 -0
- package/dist/network/relay-minca.d.ts +12 -1
- package/dist/network/relay-minca.d.ts.map +1 -1
- package/dist/network/relay-minca.js +25 -55
- package/dist/network/relay-minca.js.map +1 -1
- package/dist/network/relay-nostr.d.ts +14 -3
- package/dist/network/relay-nostr.d.ts.map +1 -1
- package/dist/network/relay-nostr.js +34 -72
- package/dist/network/relay-nostr.js.map +1 -1
- package/dist/network/relay-socket.d.ts +1 -1
- package/dist/network/relay-socket.d.ts.map +1 -1
- package/dist/network/relay-socket.js +3 -1
- package/dist/network/relay-socket.js.map +1 -1
- package/dist/network/relays.d.ts +26 -17
- package/dist/network/relays.d.ts.map +1 -1
- package/dist/network/relays.js +21 -28
- package/dist/network/relays.js.map +1 -1
- package/dist/network/rendezvous.d.ts +1 -1
- package/dist/network/rendezvous.d.ts.map +1 -1
- package/dist/network/rendezvous.js +2 -2
- package/dist/network/rendezvous.js.map +1 -1
- package/dist/node/actions.d.ts.map +1 -1
- package/dist/node/actions.js +56 -39
- package/dist/node/actions.js.map +1 -1
- package/dist/node/api.d.ts +6 -0
- package/dist/node/api.d.ts.map +1 -1
- package/dist/node/api.js +6 -0
- package/dist/node/api.js.map +1 -1
- package/dist/node/carrier.d.ts +5 -0
- package/dist/node/carrier.d.ts.map +1 -1
- package/dist/node/carrier.js +94 -73
- package/dist/node/carrier.js.map +1 -1
- package/dist/node/copy.d.ts +8 -7
- package/dist/node/copy.d.ts.map +1 -1
- package/dist/node/copy.js +54 -56
- package/dist/node/copy.js.map +1 -1
- package/dist/node/host.d.ts +39 -65
- package/dist/node/host.d.ts.map +1 -1
- package/dist/node/host.js +362 -379
- package/dist/node/host.js.map +1 -1
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/node-carriers.d.ts +35 -0
- package/dist/node/node-carriers.d.ts.map +1 -0
- package/dist/node/node-carriers.js +562 -0
- package/dist/node/node-carriers.js.map +1 -0
- package/dist/node/node-contacts.d.ts +11 -0
- package/dist/node/node-contacts.d.ts.map +1 -0
- package/dist/node/node-contacts.js +808 -0
- package/dist/node/node-contacts.js.map +1 -0
- package/dist/node/node-context.d.ts +76 -0
- package/dist/node/node-context.d.ts.map +1 -0
- package/dist/node/node-context.js +54 -0
- package/dist/node/node-context.js.map +1 -0
- package/dist/node/node-hosting.d.ts +20 -0
- package/dist/node/node-hosting.d.ts.map +1 -0
- package/dist/node/node-hosting.js +449 -0
- package/dist/node/node-hosting.js.map +1 -0
- package/dist/node/node-records.d.ts +18 -0
- package/dist/node/node-records.d.ts.map +1 -0
- package/dist/node/node-records.js +262 -0
- package/dist/node/node-records.js.map +1 -0
- package/dist/node/node.d.ts.map +1 -1
- package/dist/node/node.js +197 -1989
- package/dist/node/node.js.map +1 -1
- package/dist/node/remote.d.ts +5 -6
- package/dist/node/remote.d.ts.map +1 -1
- package/dist/node/remote.js +272 -260
- package/dist/node/remote.js.map +1 -1
- package/dist/node/space-catalog.d.ts +40 -0
- package/dist/node/space-catalog.d.ts.map +1 -0
- package/dist/node/space-catalog.js +158 -0
- package/dist/node/space-catalog.js.map +1 -0
- package/dist/node/space-checks.d.ts +25 -0
- package/dist/node/space-checks.d.ts.map +1 -0
- package/dist/node/space-checks.js +343 -0
- package/dist/node/space-checks.js.map +1 -0
- package/dist/node/space-history.d.ts +37 -0
- package/dist/node/space-history.d.ts.map +1 -0
- package/dist/node/space-history.js +350 -0
- package/dist/node/space-history.js.map +1 -0
- package/dist/node/space-holding.d.ts +49 -0
- package/dist/node/space-holding.d.ts.map +1 -0
- package/dist/node/space-holding.js +267 -0
- package/dist/node/space-holding.js.map +1 -0
- package/dist/node/space-index.d.ts +41 -0
- package/dist/node/space-index.d.ts.map +1 -0
- package/dist/node/space-index.js +217 -0
- package/dist/node/space-index.js.map +1 -0
- package/dist/node/space-keys.d.ts +34 -0
- package/dist/node/space-keys.d.ts.map +1 -0
- package/dist/node/space-keys.js +309 -0
- package/dist/node/space-keys.js.map +1 -0
- package/dist/node/space-lines.d.ts +33 -0
- package/dist/node/space-lines.d.ts.map +1 -0
- package/dist/node/space-lines.js +145 -0
- package/dist/node/space-lines.js.map +1 -0
- package/dist/node/space-membership.d.ts +69 -0
- package/dist/node/space-membership.d.ts.map +1 -0
- package/dist/node/space-membership.js +242 -0
- package/dist/node/space-membership.js.map +1 -0
- package/dist/node/space-mirrors.d.ts +43 -0
- package/dist/node/space-mirrors.d.ts.map +1 -0
- package/dist/node/space-mirrors.js +125 -0
- package/dist/node/space-mirrors.js.map +1 -0
- package/dist/node/space-peers.d.ts +104 -0
- package/dist/node/space-peers.d.ts.map +1 -0
- package/dist/node/space-peers.js +595 -0
- package/dist/node/space-peers.js.map +1 -0
- package/dist/node/space-profiles.d.ts +18 -0
- package/dist/node/space-profiles.d.ts.map +1 -0
- package/dist/node/space-profiles.js +105 -0
- package/dist/node/space-profiles.js.map +1 -0
- package/dist/node/space-rules.d.ts +29 -0
- package/dist/node/space-rules.d.ts.map +1 -0
- package/dist/node/space-rules.js +144 -0
- package/dist/node/space-rules.js.map +1 -0
- package/dist/node/space-runtime.d.ts +104 -143
- package/dist/node/space-runtime.d.ts.map +1 -1
- package/dist/node/space-runtime.js +293 -3954
- package/dist/node/space-runtime.js.map +1 -1
- package/dist/node/space-standing.d.ts +20 -0
- package/dist/node/space-standing.d.ts.map +1 -0
- package/dist/node/space-standing.js +317 -0
- package/dist/node/space-standing.js.map +1 -0
- package/dist/node/space-versions.d.ts +104 -0
- package/dist/node/space-versions.d.ts.map +1 -0
- package/dist/node/space-versions.js +153 -0
- package/dist/node/space-versions.js.map +1 -0
- package/dist/node/space-warrants.d.ts +25 -0
- package/dist/node/space-warrants.d.ts.map +1 -0
- package/dist/node/space-warrants.js +214 -0
- package/dist/node/space-warrants.js.map +1 -0
- package/dist/node/space-writing.d.ts +72 -0
- package/dist/node/space-writing.d.ts.map +1 -0
- package/dist/node/space-writing.js +440 -0
- package/dist/node/space-writing.js.map +1 -0
- package/dist/node/stores.d.ts +19 -50
- package/dist/node/stores.d.ts.map +1 -1
- package/dist/node/stores.js +14 -33
- package/dist/node/stores.js.map +1 -1
- package/dist/node/types.d.ts +225 -305
- package/dist/node/types.d.ts.map +1 -1
- package/dist/node/usage.d.ts +2 -24
- package/dist/node/usage.d.ts.map +1 -1
- package/dist/node/usage.js +118 -102
- package/dist/node/usage.js.map +1 -1
- package/dist/node/watch-notifications.d.ts.map +1 -1
- package/dist/node/watch-notifications.js +32 -29
- package/dist/node/watch-notifications.js.map +1 -1
- package/dist/node/worker.d.ts +5 -6
- package/dist/node/worker.d.ts.map +1 -1
- package/dist/node/worker.js +80 -72
- package/dist/node/worker.js.map +1 -1
- package/dist/node/writer-keys.d.ts +5 -6
- package/dist/node/writer-keys.d.ts.map +1 -1
- package/dist/node/writer-keys.js +66 -57
- package/dist/node/writer-keys.js.map +1 -1
- package/dist/node/writers.d.ts +12 -19
- package/dist/node/writers.d.ts.map +1 -1
- package/dist/node/writers.js +7 -15
- package/dist/node/writers.js.map +1 -1
- package/dist/privacy/direct.d.ts.map +1 -1
- package/dist/privacy/direct.js +31 -27
- package/dist/privacy/direct.js.map +1 -1
- package/dist/privacy/space-encryption.d.ts.map +1 -1
- package/dist/privacy/space-encryption.js +5 -9
- package/dist/privacy/space-encryption.js.map +1 -1
- package/dist/query/computed.d.ts.map +1 -1
- package/dist/query/computed.js +78 -77
- package/dist/query/computed.js.map +1 -1
- package/dist/query/engine.d.ts +3 -4
- package/dist/query/engine.d.ts.map +1 -1
- package/dist/query/engine.js +93 -86
- package/dist/query/engine.js.map +1 -1
- package/dist/query/filter.d.ts +8 -10
- package/dist/query/filter.d.ts.map +1 -1
- package/dist/query/filter.js +144 -161
- package/dist/query/filter.js.map +1 -1
- package/dist/records/cel-types.d.ts.map +1 -1
- package/dist/records/cel-types.js +13 -27
- package/dist/records/cel-types.js.map +1 -1
- package/dist/records/cel.d.ts.map +1 -1
- package/dist/records/cel.js +177 -242
- package/dist/records/cel.js.map +1 -1
- package/dist/records/rules.d.ts.map +1 -1
- package/dist/records/rules.js +46 -50
- package/dist/records/rules.js.map +1 -1
- package/dist/records/topics.d.ts.map +1 -1
- package/dist/records/topics.js +18 -22
- package/dist/records/topics.js.map +1 -1
- package/dist/schema/collection-def.d.ts.map +1 -1
- package/dist/schema/collection-def.js +16 -5
- package/dist/schema/collection-def.js.map +1 -1
- package/dist/schemas/automations.d.ts +16 -15
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +203 -165
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/blueprints.d.ts.map +1 -1
- package/dist/schemas/blueprints.js +14 -13
- package/dist/schemas/blueprints.js.map +1 -1
- package/dist/schemas/connectors.d.ts +12 -0
- package/dist/schemas/connectors.d.ts.map +1 -1
- package/dist/schemas/connectors.js +16 -11
- package/dist/schemas/connectors.js.map +1 -1
- package/dist/schemas/contacts.d.ts +57 -0
- package/dist/schemas/contacts.d.ts.map +1 -1
- package/dist/schemas/contacts.js +32 -0
- package/dist/schemas/contacts.js.map +1 -1
- package/dist/schemas/cron.d.ts.map +1 -1
- package/dist/schemas/cron.js +27 -28
- package/dist/schemas/cron.js.map +1 -1
- package/dist/schemas/defined.d.ts +6 -0
- package/dist/schemas/defined.d.ts.map +1 -0
- package/dist/schemas/defined.js +7 -0
- package/dist/schemas/defined.js.map +1 -0
- package/dist/schemas/fragments.d.ts +22 -2
- package/dist/schemas/fragments.d.ts.map +1 -1
- package/dist/schemas/fragments.js +20 -12
- package/dist/schemas/fragments.js.map +1 -1
- package/dist/schemas/guides.d.ts +3 -1
- package/dist/schemas/guides.d.ts.map +1 -1
- package/dist/schemas/guides.js +13 -12
- package/dist/schemas/guides.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 +18 -14
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/library/annotations.d.ts +30 -0
- package/dist/schemas/library/annotations.d.ts.map +1 -1
- package/dist/schemas/library/annotations.js +1 -0
- package/dist/schemas/library/annotations.js.map +1 -1
- package/dist/schemas/library/community.d.ts +28 -0
- package/dist/schemas/library/community.d.ts.map +1 -1
- package/dist/schemas/library/life.d.ts +62 -2
- package/dist/schemas/library/life.d.ts.map +1 -1
- package/dist/schemas/library/media.d.ts +36 -0
- package/dist/schemas/library/media.d.ts.map +1 -1
- package/dist/schemas/library/money.d.ts +74 -2
- package/dist/schemas/library/money.d.ts.map +1 -1
- package/dist/schemas/library/planning.d.ts +56 -0
- package/dist/schemas/library/planning.d.ts.map +1 -1
- package/dist/schemas/library/publishing.d.ts +80 -4
- package/dist/schemas/library/publishing.d.ts.map +1 -1
- package/dist/schemas/library/social.d.ts +44 -0
- package/dist/schemas/library/social.d.ts.map +1 -1
- package/dist/session/account-hint.d.ts.map +1 -1
- package/dist/session/account-hint.js +8 -5
- package/dist/session/account-hint.js.map +1 -1
- package/dist/session/auth.d.ts +36 -2
- package/dist/session/auth.d.ts.map +1 -1
- package/dist/session/auth.js +95 -2
- package/dist/session/auth.js.map +1 -1
- package/dist/session/connect.d.ts +1 -0
- package/dist/session/connect.d.ts.map +1 -1
- package/dist/session/connect.js +3 -1
- package/dist/session/connect.js.map +1 -1
- package/dist/session/credentials.d.ts +8 -26
- package/dist/session/credentials.d.ts.map +1 -1
- package/dist/session/credentials.js +14 -32
- package/dist/session/credentials.js.map +1 -1
- package/dist/session/index.d.ts +1 -0
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +1 -0
- package/dist/session/index.js.map +1 -1
- package/dist/session/pairing.d.ts.map +1 -1
- package/dist/session/pairing.js +92 -88
- package/dist/session/pairing.js.map +1 -1
- package/dist/session/password-strength.d.ts.map +1 -1
- package/dist/session/password-strength.js +37 -37
- package/dist/session/password-strength.js.map +1 -1
- package/dist/session/places.d.ts.map +1 -1
- package/dist/session/places.js +18 -13
- package/dist/session/places.js.map +1 -1
- package/dist/session/popup.d.ts +13 -0
- package/dist/session/popup.d.ts.map +1 -0
- package/dist/session/popup.js +23 -0
- package/dist/session/popup.js.map +1 -0
- package/dist/space/constitution.d.ts.map +1 -1
- package/dist/space/constitution.js +22 -29
- package/dist/space/constitution.js.map +1 -1
- package/dist/space/grants.d.ts.map +1 -1
- package/dist/space/grants.js +37 -39
- package/dist/space/grants.js.map +1 -1
- package/dist/space/invite-link.d.ts.map +1 -1
- package/dist/space/invite-link.js +33 -33
- package/dist/space/invite-link.js.map +1 -1
- package/dist/space/own-automations.d.ts +13 -24
- package/dist/space/own-automations.d.ts.map +1 -1
- package/dist/space/own-automations.js +47 -37
- package/dist/space/own-automations.js.map +1 -1
- package/dist/space/roles.d.ts +56 -80
- package/dist/space/roles.d.ts.map +1 -1
- package/dist/space/roles.js +448 -441
- package/dist/space/roles.js.map +1 -1
- package/dist/space/space-access.d.ts +3 -4
- package/dist/space/space-access.d.ts.map +1 -1
- package/dist/space/space-access.js +3 -8
- package/dist/space/space-access.js.map +1 -1
- package/dist/storage/blob/directory.d.ts.map +1 -1
- package/dist/storage/blob/directory.js +39 -32
- package/dist/storage/blob/directory.js.map +1 -1
- package/dist/storage/blob/s3.d.ts.map +1 -1
- package/dist/storage/blob/s3.js +21 -19
- package/dist/storage/blob/s3.js.map +1 -1
- package/dist/storage/blob-store.d.ts +0 -9
- package/dist/storage/blob-store.d.ts.map +1 -1
- package/dist/storage/directory-access.d.ts +8 -32
- package/dist/storage/directory-access.d.ts.map +1 -1
- package/dist/storage/directory-access.js +11 -36
- package/dist/storage/directory-access.js.map +1 -1
- package/dist/storage/encrypted-adapter.d.ts +12 -32
- package/dist/storage/encrypted-adapter.d.ts.map +1 -1
- package/dist/storage/encrypted-adapter.js +31 -54
- package/dist/storage/encrypted-adapter.js.map +1 -1
- package/dist/storage/folder-adapter.d.ts +12 -26
- package/dist/storage/folder-adapter.d.ts.map +1 -1
- package/dist/storage/folder-adapter.js +37 -54
- package/dist/storage/folder-adapter.js.map +1 -1
- package/dist/storage/folder-reconcile.d.ts +12 -26
- package/dist/storage/folder-reconcile.d.ts.map +1 -1
- package/dist/storage/folder-reconcile.js +39 -48
- package/dist/storage/folder-reconcile.js.map +1 -1
- package/dist/storage/indexeddb-adapter.d.ts +2 -6
- package/dist/storage/indexeddb-adapter.d.ts.map +1 -1
- package/dist/storage/indexeddb-adapter.js +60 -114
- package/dist/storage/indexeddb-adapter.js.map +1 -1
- package/dist/storage/mirror.d.ts +0 -29
- package/dist/storage/mirror.d.ts.map +1 -1
- package/dist/storage/mirror.js +153 -110
- package/dist/storage/mirror.js.map +1 -1
- package/dist/storage/segment.d.ts.map +1 -1
- package/dist/storage/segment.js +3 -7
- package/dist/storage/segment.js.map +1 -1
- package/dist/storage/storage-provider.d.ts +6 -11
- package/dist/storage/storage-provider.d.ts.map +1 -1
- package/dist/storage/storage-provider.js +112 -116
- package/dist/storage/storage-provider.js.map +1 -1
- package/dist/sync/sync-engine.d.ts +10 -44
- package/dist/sync/sync-engine.d.ts.map +1 -1
- package/dist/sync/sync-engine.js +245 -247
- package/dist/sync/sync-engine.js.map +1 -1
- package/dist/sync/sync-messages.d.ts +1 -1
- package/dist/sync/sync-messages.d.ts.map +1 -1
- package/dist/sync/sync-messages.js +1 -1
- package/dist/sync/sync-messages.js.map +1 -1
- package/dist/utils/guards.d.ts +1 -0
- package/dist/utils/guards.d.ts.map +1 -1
- package/dist/utils/guards.js +1 -0
- package/dist/utils/guards.js.map +1 -1
- package/dist/utils/hmac.d.ts +5 -0
- package/dist/utils/hmac.d.ts.map +1 -0
- package/dist/utils/hmac.js +20 -0
- package/dist/utils/hmac.js.map +1 -0
- package/dist/utils/map.d.ts +10 -0
- package/dist/utils/map.d.ts.map +1 -0
- package/dist/utils/map.js +30 -0
- package/dist/utils/map.js.map +1 -0
- package/dist/utils/serial.d.ts +2 -0
- package/dist/utils/serial.d.ts.map +1 -1
- package/dist/utils/serial.js +9 -0
- package/dist/utils/serial.js.map +1 -1
- package/dist/validation/capability-gate.d.ts +7 -15
- package/dist/validation/capability-gate.d.ts.map +1 -1
- package/dist/validation/capability-gate.js +32 -36
- package/dist/validation/capability-gate.js.map +1 -1
- package/dist/validation/crypto-gate.d.ts.map +1 -1
- package/dist/validation/crypto-gate.js +12 -21
- package/dist/validation/crypto-gate.js.map +1 -1
- package/docs/README.md +3 -2
- package/docs/actions.md +47 -20
- package/docs/automations.md +1 -1
- package/docs/blueprints-and-guides.md +57 -13
- package/docs/building-an-app.md +11 -8
- package/docs/collections.md +33 -5
- package/docs/contacts.md +34 -1
- package/docs/contracts.md +1 -1
- package/docs/direct-messages.md +1 -1
- package/docs/inbox.md +5 -11
- package/docs/node.md +36 -26
- package/docs/records-and-queries.md +1 -1
- package/docs/sign-in.md +54 -26
- package/docs/spaces.md +6 -6
- package/docs/standard-library.md +33 -31
- package/docs/storage.md +37 -15
- package/docs/usernames.md +161 -0
- package/docs/warrants.md +1 -1
- package/package.json +2 -21
- package/dist/calls/calls.d.ts +0 -140
- package/dist/calls/calls.d.ts.map +0 -1
- package/dist/calls/calls.js +0 -861
- package/dist/calls/calls.js.map +0 -1
- package/dist/calls/index.d.ts +0 -4
- package/dist/calls/index.d.ts.map +0 -1
- package/dist/calls/index.js +0 -3
- package/dist/calls/index.js.map +0 -1
- package/dist/react/context.d.ts +0 -81
- package/dist/react/context.d.ts.map +0 -1
- package/dist/react/context.js +0 -97
- package/dist/react/context.js.map +0 -1
- package/dist/react/follow.d.ts +0 -11
- package/dist/react/follow.d.ts.map +0 -1
- package/dist/react/follow.js +0 -7
- package/dist/react/follow.js.map +0 -1
- package/dist/react/index.d.ts +0 -44
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js +0 -40
- package/dist/react/index.js.map +0 -1
- package/dist/react/minca-auth.d.ts +0 -19
- package/dist/react/minca-auth.d.ts.map +0 -1
- package/dist/react/minca-auth.js +0 -36
- package/dist/react/minca-auth.js.map +0 -1
- package/dist/react/use-calls.d.ts +0 -21
- package/dist/react/use-calls.d.ts.map +0 -1
- package/dist/react/use-calls.js +0 -39
- package/dist/react/use-calls.js.map +0 -1
- package/dist/react/use-invite-link.d.ts +0 -24
- package/dist/react/use-invite-link.d.ts.map +0 -1
- package/dist/react/use-invite-link.js +0 -62
- package/dist/react/use-invite-link.js.map +0 -1
- package/dist/react/use-live.d.ts +0 -16
- package/dist/react/use-live.d.ts.map +0 -1
- package/dist/react/use-live.js +0 -56
- package/dist/react/use-live.js.map +0 -1
- package/dist/react/use-my-name.d.ts +0 -12
- package/dist/react/use-my-name.d.ts.map +0 -1
- package/dist/react/use-my-name.js +0 -38
- package/dist/react/use-my-name.js.map +0 -1
- package/dist/react/use-names.d.ts +0 -7
- package/dist/react/use-names.d.ts.map +0 -1
- package/dist/react/use-names.js +0 -13
- package/dist/react/use-names.js.map +0 -1
- package/dist/react/use-network.d.ts +0 -9
- package/dist/react/use-network.d.ts.map +0 -1
- package/dist/react/use-network.js +0 -33
- package/dist/react/use-network.js.map +0 -1
- package/dist/react/use-query.d.ts +0 -14
- package/dist/react/use-query.d.ts.map +0 -1
- package/dist/react/use-query.js +0 -26
- package/dist/react/use-query.js.map +0 -1
- package/dist/react/use-space.d.ts +0 -29
- package/dist/react/use-space.d.ts.map +0 -1
- package/dist/react/use-space.js +0 -57
- package/dist/react/use-space.js.map +0 -1
- package/dist/react/use-spaces.d.ts +0 -29
- package/dist/react/use-spaces.d.ts.map +0 -1
- package/dist/react/use-spaces.js +0 -78
- package/dist/react/use-spaces.js.map +0 -1
- package/docs/calls.md +0 -189
package/docs/calls.md
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
# Calls
|
|
2
|
-
|
|
3
|
-
A call is voice and video between the members of a space. It is live messages
|
|
4
|
-
in that space ([spec 04 §9.2](https://github.com/leifriksheim/minca/blob/main/spec/04-network.md)),
|
|
5
|
-
plus one WebRTC connection of its own between each pair of devices in it (a
|
|
6
|
-
full mesh, good up to about six people with video). Its history is a [`std.call`](standard-library.md#stdcall)
|
|
7
|
-
record.
|
|
8
|
-
|
|
9
|
-
This is a convention built on the protocol, not part of it. Peers that have
|
|
10
|
-
never heard of calls sync, store and judge every record the same way; a call
|
|
11
|
-
message is a live message like any other to them. Only apps that want to call
|
|
12
|
-
each other have to agree on the messages below. It uses these protocol parts:
|
|
13
|
-
live messages and the space's peer connection
|
|
14
|
-
([spec 04](https://github.com/leifriksheim/minca/blob/main/spec/04-network.md)),
|
|
15
|
-
roles ([spec 03](https://github.com/leifriksheim/minca/blob/main/spec/03-spaces.md)),
|
|
16
|
-
and TURN from relays (spec 04 §10).
|
|
17
|
-
|
|
18
|
-
The setup travels over the space's peer connection, whose handshake proved
|
|
19
|
-
who is at the other end, so an offer really comes from that device. A relay
|
|
20
|
-
only introduces devices and never sees a call.
|
|
21
|
-
|
|
22
|
-
In the library, `createCalls(node)` from `@minca/core/calls` runs all
|
|
23
|
-
of it; in React, `CallsProvider` and `useCalls` ([node.md](node.md#client-conveniences)).
|
|
24
|
-
|
|
25
|
-
```ts
|
|
26
|
-
import { createCalls } from '@minca/core/calls';
|
|
27
|
-
|
|
28
|
-
const calls = createCalls(node);
|
|
29
|
-
await calls.start(space); // join the call going on here, or start one
|
|
30
|
-
await calls.ring(space, account); // or ring one person
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Messages
|
|
34
|
-
|
|
35
|
-
Every call message is a JSON object with a `type` and a `call` id: a string
|
|
36
|
-
of 1–64 characters (the library makes 12 random bytes in lowercase hex). A
|
|
37
|
-
receiver must ignore a call message that is not one of these types, lacks a
|
|
38
|
-
valid `call`, comes from a peer with no account (`from: null`), or comes from
|
|
39
|
-
a key whose note writes records somewhere but can't define collections in
|
|
40
|
-
this space (`recordsOnly: true`, a `/record` note), judged on the whole note,
|
|
41
|
-
so a key given records in another space doesn't pass as the account here. The account trusts such a key less
|
|
42
|
-
than itself, and in a call it would speak as the account. A key whose note
|
|
43
|
-
only reads (`/record/read`) is not one: it may take part, as an app that only
|
|
44
|
-
reads may. Its note can't tell whether it was asked for records only, since
|
|
45
|
-
both kinds of read note are the same. This keeps an honest records-only program out of calls; it is
|
|
46
|
-
not a boundary against a hostile app, which can ask the account for a read
|
|
47
|
-
note for the same key and show that one instead. An app given write in one
|
|
48
|
-
space only is also kept out of calls in others.
|
|
49
|
-
|
|
50
|
-
| `type` | Sent to | Fields | Meaning |
|
|
51
|
-
| --------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------- | -------------------------------------------- |
|
|
52
|
-
| `call.here` | the space, every `heartbeat` (5 s); or one device | `since` (ms, when the sender joined), `camera` (bool), `muted` (bool) | "I am in this call." |
|
|
53
|
-
| `call.ring` | one account | — | Ring that account's devices. |
|
|
54
|
-
| `call.answered` | the caller's account, and the answerer's own account | — | Answered; stop ringing. |
|
|
55
|
-
| `call.declined` | the caller's account, and the decliner's own account | — | Declined; stop ringing. |
|
|
56
|
-
| `call.cancel` | the rung account | — | The caller stopped ringing. |
|
|
57
|
-
| `call.signal` | one device | `description` (`{ type: "offer"\|"answer", sdp }`) or `candidate` (`RTCIceCandidateInit`) | Connection setup. |
|
|
58
|
-
| `call.leave` | the space | — | "I left", now rather than after the timeout. |
|
|
59
|
-
|
|
60
|
-
Examples:
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{ "type": "call.here", "call": "3f9a1c0b7e2d4a6f8b1c2d3e", "since": 1790422901000, "camera": false, "muted": false }
|
|
64
|
-
{ "type": "call.signal", "call": "3f9a1c0b7e2d4a6f8b1c2d3e", "description": { "type": "offer", "sdp": "v=0\r\n…" } }
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Who takes part
|
|
68
|
-
|
|
69
|
-
Only **members**, the space's founders and accounts holding a role there,
|
|
70
|
-
take part. A receiver must ignore `call.here`, `call.ring` and `call.signal`
|
|
71
|
-
from an account that is neither (a view-only reader). The library caches the member list
|
|
72
|
-
for 10 s and asks once more for someone not in it.
|
|
73
|
-
|
|
74
|
-
A device must not ring for more than 3 `call.ring`s from one account in any
|
|
75
|
-
60 s; later ones are ignored. `call.cancel` is honoured only from the account
|
|
76
|
-
that rang.
|
|
77
|
-
|
|
78
|
-
> **Planned: blocked people do not ring.** A device will ignore `call.ring`
|
|
79
|
-
> from an account the person has blocked (`contacts.block`,
|
|
80
|
-
> [spec 03](https://github.com/leifriksheim/minca/blob/main/spec/03-spaces.md)).
|
|
81
|
-
> Today a ring is checked only for membership and rate. Tracked in
|
|
82
|
-
> [#20](https://github.com/leifriksheim/minca/issues/20).
|
|
83
|
-
|
|
84
|
-
## Presence
|
|
85
|
-
|
|
86
|
-
A device is in at most one call per space at a time: a `call.here` for
|
|
87
|
-
another call moves it. A device not heard from for 15 s (`gone`) is dropped,
|
|
88
|
-
and the connection to it closed. On hearing a new device's first `call.here`
|
|
89
|
-
in the call it is in, a device sends its own `call.here` straight to that
|
|
90
|
-
device.
|
|
91
|
-
|
|
92
|
-
## Joining, and which call
|
|
93
|
-
|
|
94
|
-
`start(space)` joins the call already going on in the space (the one with the
|
|
95
|
-
lowest id, if several) or starts one with a new id. Joining holds the space
|
|
96
|
-
([holding a space](node.md#opening-and-holding-spaces)) for as long as the
|
|
97
|
-
call lasts, so moving between screens never interrupts it. When a device
|
|
98
|
-
alone in its call (no connections yet) hears a `call.here` for a call with a
|
|
99
|
-
lower id in the same space, it moves into that call: two calls started at
|
|
100
|
-
once merge into the lower id.
|
|
101
|
-
|
|
102
|
-
## Connections
|
|
103
|
-
|
|
104
|
-
- Between two devices, the one with the **lower session DID** (by string
|
|
105
|
-
comparison) makes the offer. A device must ignore an offer from a device
|
|
106
|
-
whose session DID is higher than its own, and an answer on a connection it
|
|
107
|
-
did not offer or that already has one.
|
|
108
|
-
- Each connection is made with one audio and one video transceiver
|
|
109
|
-
(`sendrecv`) from the start. Muting, turning the camera on or off and
|
|
110
|
-
sharing the screen replace the sender's track and are announced with
|
|
111
|
-
`call.here`; they never renegotiate.
|
|
112
|
-
- Candidates arriving before the remote description are queued (at most 64).
|
|
113
|
-
- The offering side keeps at most one connection to each device, and offers
|
|
114
|
-
only to a device it has none with.
|
|
115
|
-
- When a connection fails, or its offer or answer cannot be applied, the
|
|
116
|
-
offering side offers again after 2 s if the other device is still in the
|
|
117
|
-
call. A connection not connected within `gone` (15 s) of its offer counts as
|
|
118
|
-
failed too: an offer or answer lost on the way leaves a connection that
|
|
119
|
-
never fails, only never connects.
|
|
120
|
-
- ICE servers come from `node.iceServers()` ([node.md](node.md)): the
|
|
121
|
-
configured ones plus TURN servers a relay offers.
|
|
122
|
-
|
|
123
|
-
## Ringing
|
|
124
|
-
|
|
125
|
-
1. The caller starts (or joins) the call, sends `call.ring` to the callee's
|
|
126
|
-
account and shows `outgoing: ringing`.
|
|
127
|
-
2. The callee's devices ring for 45 s unless answered, declined or cancelled.
|
|
128
|
-
A ring also stops when the caller's device has left the call, or has not
|
|
129
|
-
been heard in it for `gone` (15 s): a page that closed without a
|
|
130
|
-
`call.leave` rings nobody.
|
|
131
|
-
3. Answering: stop ringing, join the call (with that id), send
|
|
132
|
-
`call.answered` to the caller's account and to one's own account (so other
|
|
133
|
-
devices stop). Joining a call that is ringing the device, by any route, is
|
|
134
|
-
answering it. Declining: `call.declined` the same way.
|
|
135
|
-
4. The caller on `call.answered` clears `outgoing`; on `call.declined` shows
|
|
136
|
-
`declined` and, if nobody else is in the call 2.5 s later, leaves. A
|
|
137
|
-
`call.here` in the call from the rung account clears `outgoing` too, so an
|
|
138
|
-
answer lost on the way still stops the ringing.
|
|
139
|
-
5. After 45 s unanswered, the caller sends `call.cancel`, writes a missed-call
|
|
140
|
-
record ([`std.call`](standard-library.md#stdcall)), shows `missed`, and
|
|
141
|
-
leaves 2.5 s later if alone.
|
|
142
|
-
|
|
143
|
-
A device must not ring again for a call it stopped ringing for (answered,
|
|
144
|
-
declined, cancelled or timed out) in the last 90 s: the same `call.ring` can
|
|
145
|
-
arrive twice.
|
|
146
|
-
|
|
147
|
-
Group calls do not ring: a call going on shows to everyone with the space
|
|
148
|
-
open.
|
|
149
|
-
|
|
150
|
-
## Leaving
|
|
151
|
-
|
|
152
|
-
Leaving closes every connection, stops the local tracks, sends `call.leave`
|
|
153
|
-
to the space, and, if still ringing someone, sends `call.cancel` and writes a
|
|
154
|
-
missed-call record. If nobody else is left in the call and anyone else was
|
|
155
|
-
ever in it, the leaver writes an ended-call record. The space's hold is
|
|
156
|
-
released 1 s later, so the goodbye gets out first.
|
|
157
|
-
|
|
158
|
-
The call a device is in is kept in `sessionStorage` under `minca-call`, so
|
|
159
|
-
after a reload the page can offer to rejoin
|
|
160
|
-
([`std.call`](standard-library.md#stdcall)).
|
|
161
|
-
|
|
162
|
-
Reference values, all in `createCalls`'s options or constants: `heartbeatMs`
|
|
163
|
-
5 s, `goneMs` 15 s, `ringMs` 45 s; 2 s before offering again, 2.5 s before
|
|
164
|
-
giving up on a declined or missed ring, 1 s before letting go of the space,
|
|
165
|
-
10 s for the member list.
|
|
166
|
-
|
|
167
|
-
_Source: `packages/core/src/calls/calls.ts` (`createCalls`, `isCallMessage`, `RINGS_PER_MINUTE`, `GIVE_UP_MS`, `LEAVE_LINGER_MS`, `MEMBERS_MS`, `RETRY_MS`), `packages/core/src/react/use-calls.ts`, `packages/core/src/node/space-runtime.ts` (`accountOf`). Tests: `packages/core/tests/calls.test.ts`, `packages/core/tests/live.test.ts` ("recordsOnly marks a note that writes records here and nothing more, not one that only reads"), `packages/core/tests/live-elsewhere.test.ts`._
|
|
168
|
-
|
|
169
|
-
## Planned
|
|
170
|
-
|
|
171
|
-
> **Planned.** Not settled.
|
|
172
|
-
>
|
|
173
|
-
> - **Ringing with the app closed.** A ring reaches only devices with the
|
|
174
|
-
> space open. Reaching a closed browser or a phone needs Web Push from a
|
|
175
|
-
> carrier ([spec 06 §4.4](https://github.com/leifriksheim/minca/blob/main/spec/06-nodes-and-sessions.md), Planned);
|
|
176
|
-
> the extension, always running while the browser is, could ring too. Not
|
|
177
|
-
> designed: a live message is not a record, so a carrier has nothing to
|
|
178
|
-
> match a ring against today.
|
|
179
|
-
> - **Big calls.** Past about 6 video streams a full mesh runs out of upload
|
|
180
|
-
> bandwidth. The known answer is a forwarding server (an SFU) with
|
|
181
|
-
> end-to-end encryption on top (SFrame), so it forwards media it cannot
|
|
182
|
-
> watch. A host could run one. Not designed.
|
|
183
|
-
> - **Listening without talking.** View-only readers are kept out of calls
|
|
184
|
-
> ([who takes part](#who-takes-part)). A space where readers may listen
|
|
185
|
-
> could come as a grant held by a role, e.g. a library command `/call/listen`
|
|
186
|
-
> ([spec 03](https://github.com/leifriksheim/minca/blob/main/spec/03-spaces.md)). Open.
|
|
187
|
-
> - **Calls across apps.** A call lives in the app that started it; another
|
|
188
|
-
> app on another origin does not see it. Moving a call between apps would
|
|
189
|
-
> need the account home to hold it. No plan yet.
|