@minca/core 0.1.15 → 0.1.17
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 +10 -10
- 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 +35 -9
- 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 +169 -72
- package/dist/elements/minca-auth.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.map +1 -1
- package/dist/network/relay-minca.js +11 -49
- package/dist/network/relay-minca.js.map +1 -1
- package/dist/network/relay-nostr.d.ts.map +1 -1
- package/dist/network/relay-nostr.js +23 -63
- 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/ws-transport.d.ts.map +1 -1
- package/dist/network/ws-transport.js +3 -0
- package/dist/network/ws-transport.js.map +1 -1
- package/dist/node/actions.d.ts +2 -0
- package/dist/node/actions.d.ts.map +1 -1
- package/dist/node/actions.js +89 -58
- package/dist/node/actions.js.map +1 -1
- package/dist/node/api.d.ts +7 -0
- package/dist/node/api.d.ts.map +1 -1
- package/dist/node/api.js +7 -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 +567 -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 +456 -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 +199 -1990
- 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 +53 -0
- package/dist/node/space-holding.d.ts.map +1 -0
- package/dist/node/space-holding.js +339 -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 +629 -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 +107 -140
- package/dist/node/space-runtime.d.ts.map +1 -1
- package/dist/node/space-runtime.js +331 -3985
- 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 +74 -0
- package/dist/node/space-writing.d.ts.map +1 -0
- package/dist/node/space-writing.js +442 -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 +243 -306
- 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/schemas/automations.d.ts +8 -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.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/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/social.d.ts +258 -0
- package/dist/schemas/library/social.d.ts.map +1 -1
- package/dist/schemas/library/social.js +28 -1
- package/dist/schemas/library/social.js.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/hosting.d.ts.map +1 -1
- package/dist/session/hosting.js +8 -2
- package/dist/session/hosting.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/presets.d.ts +2 -2
- package/dist/space/presets.d.ts.map +1 -1
- package/dist/space/presets.js +3 -2
- package/dist/space/presets.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 +1 -0
- package/docs/actions.md +32 -25
- package/docs/agents.md +28 -16
- package/docs/automations.md +1 -1
- package/docs/blueprints-and-guides.md +37 -5
- package/docs/building-an-app.md +7 -4
- package/docs/collections.md +3 -3
- package/docs/contacts.md +34 -1
- package/docs/contracts.md +1 -1
- package/docs/direct-messages.md +6 -2
- package/docs/inbox.md +5 -11
- package/docs/node.md +54 -22
- package/docs/records-and-queries.md +1 -1
- package/docs/sign-in.md +54 -26
- package/docs/spaces.md +9 -8
- package/docs/standard-library.md +37 -14
- package/docs/storage.md +5 -6
- package/docs/usernames.md +161 -0
- package/docs/warrants.md +1 -1
- package/package.json +1 -2
package/docs/node.md
CHANGED
|
@@ -328,7 +328,7 @@ spaces cannot be left.
|
|
|
328
328
|
|
|
329
329
|
`contacts.remove` and `contacts.block` leave the space for two this way.
|
|
330
330
|
|
|
331
|
-
_Source: `packages/core/src/node/node.ts` (`spaces.leave`, `giveUpPlace`, `forget`, `LEAVE_WAIT_MS`), `packages/core/src/node/space-
|
|
331
|
+
_Source: `packages/core/src/node/node.ts` (`spaces.leave`, `giveUpPlace`, `forget`, `LEAVE_WAIT_MS`), `packages/core/src/node/space-membership.ts` (`giveUpPlace`), `packages/core/src/node/space-peers.ts` (`writeUntilStored`). Tests: `packages/core/tests/key-change.test.ts` ("leaving a private space"), `packages/core/tests/contacts.test.ts` ("removing a contact gives up your place"), `packages/core/tests/node.test.ts` ("the account registry"), `packages/core/tests/carrier.test.ts` ("its carry space cannot be left…")._
|
|
332
332
|
|
|
333
333
|
## Holding part of a space
|
|
334
334
|
|
|
@@ -341,7 +341,8 @@ node's own choice; how it tells peers what it holds is in
|
|
|
341
341
|
- Collections listed in `cache.collections` are held from the start and never
|
|
342
342
|
dropped.
|
|
343
343
|
- A query marks the collections it reads (its own and every `include … from`)
|
|
344
|
-
as used; sync then fetches them. A
|
|
344
|
+
as used, and a write the collection it writes in; sync then fetches them. A
|
|
345
|
+
writer holds its own earlier writes that way, and the rest beside them. A query's result has `complete: false`
|
|
345
346
|
until, for every collection it reads, the node has once been level with a
|
|
346
347
|
node holding the whole space, **and** it lacks nothing a writer's line in
|
|
347
348
|
that collection names
|
|
@@ -351,9 +352,7 @@ node's own choice; how it tells peers what it holds is in
|
|
|
351
352
|
collection is level with a peer.
|
|
352
353
|
- Until the node has once caught up fully with a node holding the whole space,
|
|
353
354
|
it cannot know whether the space names keepers, so it holds only what it uses.
|
|
354
|
-
-
|
|
355
|
-
cache.copies ?? 0))` of the space's named keepers have them. A collection
|
|
356
|
-
holding a pending write is never dropped.
|
|
355
|
+
- A collection holding a pending write (below) is never dropped.
|
|
357
356
|
- A collection unused for `cache.unusedAfterDays` (default 30) days is dropped
|
|
358
357
|
when the space opens and every 6 hours while it stays open. It stops being
|
|
359
358
|
held _before_ its versions are removed, so nothing syncs it back meanwhile.
|
|
@@ -362,16 +361,31 @@ cache.copies ?? 0))` of the space's named keepers have them. A collection
|
|
|
362
361
|
- When what it holds changes (whole or part, or a newly used collection), the
|
|
363
362
|
node says hello to every peer.
|
|
364
363
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
364
|
+
On every node, holding part of a space or all of it, its own writes in a
|
|
365
|
+
space that names keepers are _pending_ until `min(keepers named, max(copies ??
|
|
366
|
+
2, cache.copies ?? 0))` of them have them; a keeper's own node counts as one.
|
|
367
|
+
A node holding part of the space keeps them in its store, across runs; one
|
|
368
|
+
holding all of it in memory, the latest 4096. A keeper confirms a write the way
|
|
369
|
+
the spec says: by `stored`, or by being level with the writer on its
|
|
370
|
+
collection. Only a peer named in `sys.keepers` counts
|
|
371
|
+
([spec 05 §9](https://github.com/leifriksheim/minca/blob/main/spec/05-sync-and-storage.md)).
|
|
372
|
+
|
|
373
|
+
`node.spaces.kept(spaceId, waitMs, since?)` waits up to `waitMs` (at most a
|
|
374
|
+
minute) for this node's writes in a space to be kept elsewhere. In a space
|
|
375
|
+
that names keepers, it says `'keepers'` once none of its writes from `since`
|
|
376
|
+
(ms) on, or all of them, is pending. In one that names none, every member's
|
|
377
|
+
node is a copy, so it says `'peer'` once a peer connected now holds all this
|
|
378
|
+
node does: less sure, since that peer may be a device that goes away. Null
|
|
379
|
+
when nobody had, in time. A node that may stop before it syncs again waits on
|
|
380
|
+
it: a tab about to close, a command about to exit, a node a server runs for a
|
|
381
|
+
while (the MCP service's).
|
|
368
382
|
|
|
369
383
|
This state is kept in the space's own store (`spaces/<spaceId>`):
|
|
370
384
|
|
|
371
385
|
| Key | Value (UTF-8 JSON) |
|
|
372
386
|
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
373
387
|
| `cache` | `{ "settled": boolean, "used": { [collection]: ms }, "level": { [collection]: ms }, "missing": { [collection]: [version id…] } }`. `settled`: has synced with a whole-space peer; `used`: when a query last used it; `level`: when it was first level with a whole-space peer; `missing`: what a writer's line there names that isn't here |
|
|
374
|
-
| `pending/<version id>` | `{ "collection": string, "by": [keeper DID…] }`, deleted once `by` reaches the target
|
|
388
|
+
| `pending/<version id>` | `{ "collection": string, "by": [keeper DID…], "at": ms }`, deleted once `by` reaches the target |
|
|
375
389
|
|
|
376
390
|
What a keeper withholds from the middle of a writer's line shows up as
|
|
377
391
|
missing, whichever peer the node was level with. A writer's newest versions
|
|
@@ -381,7 +395,7 @@ with to do it.
|
|
|
381
395
|
The account registry, the contacts space and carry spaces are always held
|
|
382
396
|
whole. Apps connected to an account home use `cache: {}` by default ([the app-side client](#the-app-side-client)).
|
|
383
397
|
|
|
384
|
-
_Source: `packages/core/src/node/space-
|
|
398
|
+
_Source: `packages/core/src/node/space-holding.ts` (`openSpaceHolding`, `kept`), `packages/core/src/node/space-writing.ts` (`write`), `packages/core/src/node/types.ts` (`CacheConfig`). Tests: `packages/core/tests/caches.test.ts`, `packages/core/tests/reconcile.test.ts` ("holding part of a space")._
|
|
385
399
|
|
|
386
400
|
### Planned: caches that widen and trim
|
|
387
401
|
|
|
@@ -461,7 +475,7 @@ invite record has not reached this device yet, the space is held with
|
|
|
461
475
|
then deletes the `sys.joined` record, closes the space and forgets it with its
|
|
462
476
|
key ([leaving a space](#leaving-a-space)).
|
|
463
477
|
|
|
464
|
-
_Source: `packages/core/src/node/node.ts` (`reconcileOnce`, `remember`, `forget`, `finishJoining`, `
|
|
478
|
+
_Source: `packages/core/src/node/node.ts` (`reconcileOnce`, `remember`, `forget`, `finishJoining`, `spaces`), `packages/core/src/node/node-contacts.ts` (`publishProfile`), `packages/core/src/space/space-manager.ts`. Tests: `packages/core/tests/node.test.ts` ("the account registry"), `packages/core/tests/profiles.test.ts`, `packages/core/tests/space-access.test.ts`._
|
|
465
479
|
|
|
466
480
|
## Events
|
|
467
481
|
|
|
@@ -552,7 +566,7 @@ A received live message is emitted as a `message` event,
|
|
|
552
566
|
> Rationale: a peer's key does not say whose it is, but only the account's own
|
|
553
567
|
> devices and apps can read its registry, so a peer there is one of ours.
|
|
554
568
|
|
|
555
|
-
_Source: `packages/core/src/node/node.ts` (`spaces.send`, `spaces.status`), `packages/core/src/node/space-
|
|
569
|
+
_Source: `packages/core/src/node/node.ts` (`spaces.send`, `spaces.status`), `packages/core/src/node/space-peers.ts` (`send`, `onLive`), `packages/core/src/node/space-runtime.ts` (`status`). Tests: `packages/core/tests/live.test.ts`._
|
|
556
570
|
|
|
557
571
|
## The rest of the node's surface
|
|
558
572
|
|
|
@@ -624,7 +638,7 @@ successors, mine, heads, key, relays, keepers, copies, forks, flagged }`
|
|
|
624
638
|
Local only: nothing here goes over the wire.
|
|
625
639
|
- `node.asAgent({ keys, note })` — [acting as an agent](#a-node-acting-as-an-agent).
|
|
626
640
|
|
|
627
|
-
_Source: `packages/core/src/node/types.ts`, `packages/core/src/node/node.ts` (`spaces`), `packages/core/src/node/space-
|
|
641
|
+
_Source: `packages/core/src/node/types.ts`, `packages/core/src/node/node.ts` (`spaces`), `packages/core/src/node/space-membership.ts` (`access`, `may`, `holdsRole`, `defineRole`, `assign`, `removeAccount`), `packages/core/src/space/roles.ts` (`holdsRole`). Tests: `packages/core/tests/roles.test.ts` ("holding what a role gives"), `packages/core/tests/node.test.ts`, `packages/core/tests/space-access.test.ts`, `packages/core/tests/contacts.test.ts`, `packages/core/tests/direct.test.ts`, `packages/core/tests/profiles.test.ts`._
|
|
628
642
|
|
|
629
643
|
## The network
|
|
630
644
|
|
|
@@ -660,7 +674,7 @@ offer or answer waits for ICE gathering to finish, or 2 s, and carries what it
|
|
|
660
674
|
found.
|
|
661
675
|
|
|
662
676
|
**Kinds of relay** (spec 04 §1.2). `network.relays` may mix kinds:
|
|
663
|
-
`['wss://minca.
|
|
677
|
+
`['wss://relay.minca.social', 'nostr+wss://relay.damus.io']`. A relay of a kind
|
|
664
678
|
this library doesn't speak is left out of `network.status()`. On a Nostr
|
|
665
679
|
relay, each event is signed with a key made for it and forgotten.
|
|
666
680
|
|
|
@@ -701,7 +715,7 @@ connected relay that can and waits up to 1.5 s for an answer (relays without
|
|
|
701
715
|
TURN never answer), then returns what it has. A node with no relays returns
|
|
702
716
|
the configured servers.
|
|
703
717
|
|
|
704
|
-
_Source: `packages/core/src/network/relay-socket.ts` (`createRelaySocket`, `RelayStatus`), `packages/core/src/network/rendezvous.ts` (`createRendezvous`, `HELLO_MS`, `release`), `packages/core/src/network/relay-nostr.ts`, `packages/core/src/network/rtc-transport.ts` (`GATHER_MS`), `packages/core/src/network/ws-transport.ts`, `packages/core/src/network/local-transport.ts` (`createLocalHub`), `packages/core/src/node/carrier.ts` (`carry`), `packages/core/src/network/mesh.ts` (`CONNECT_TIMEOUT_MS`, `closeIfIdle`, `iceServers`, `ICE_REFRESH_MS`, `ICE_WAIT_MS`), `packages/core/src/network/introductions.ts` (`createSeenSignals`), `packages/core/src/network/rtc-transport.ts` (`DEFAULT_ICE_SERVERS`), `packages/core/src/node/space-
|
|
718
|
+
_Source: `packages/core/src/network/relay-socket.ts` (`createRelaySocket`, `RelayStatus`), `packages/core/src/network/rendezvous.ts` (`createRendezvous`, `HELLO_MS`, `release`), `packages/core/src/network/relay-nostr.ts`, `packages/core/src/network/rtc-transport.ts` (`GATHER_MS`), `packages/core/src/network/ws-transport.ts`, `packages/core/src/network/local-transport.ts` (`createLocalHub`), `packages/core/src/node/carrier.ts` (`carry`), `packages/core/src/network/mesh.ts` (`CONNECT_TIMEOUT_MS`, `closeIfIdle`, `iceServers`, `ICE_REFRESH_MS`, `ICE_WAIT_MS`), `packages/core/src/network/introductions.ts` (`createSeenSignals`), `packages/core/src/network/rtc-transport.ts` (`DEFAULT_ICE_SERVERS`), `packages/core/src/node/space-keys.ts` (`nameRelays`), `packages/core/src/node/node.ts` (`iceServers`), `packages/cli/src/serve.ts` (`onPeer`). Tests: `packages/core/tests/relay-socket.test.ts`, `packages/core/tests/rendezvous.test.ts`, `packages/core/tests/relay-nostr.test.ts`, `packages/core/tests/introductions.test.ts`, `packages/core/tests/space-relays.test.ts`, `packages/core/tests/ws-transport.test.ts`, `packages/core/tests/carrier.test.ts`; the client-side ICE refresh is untested._
|
|
705
719
|
|
|
706
720
|
## A node acting as an agent
|
|
707
721
|
|
|
@@ -735,7 +749,7 @@ account's knocks, in shared spaces and in its inbox ([inbox.md](inbox.md)).
|
|
|
735
749
|
|
|
736
750
|
Which of these each method of the node is — passed through, held to the note's spaces, or refused — is one table, `API` in `packages/core/src/node/api.ts`; a new method does not type-check until it is decided there. The same table lists what `remoteNode` forwards.
|
|
737
751
|
|
|
738
|
-
_Source: `packages/core/src/node/node.ts` (`
|
|
752
|
+
_Source: `packages/core/src/node/node-records.ts` (`startAgent`), `packages/core/src/node/api.ts` (`API`). Tests: `packages/core/tests/records-only.test.ts` ("an agent acting for a person"), `packages/core/tests/remote.test.ts` ("no agent is started across the port…")._
|
|
739
753
|
|
|
740
754
|
## The app-side client
|
|
741
755
|
|
|
@@ -909,7 +923,13 @@ genesis and any invite opened before the call. It says whether it was: false
|
|
|
909
923
|
at once when no carrier is connected. `contacts.ask` and `inbox.knock` wait on it before the knock goes
|
|
910
924
|
out, and pass what it said on as `carried`, for the app to tell the person.
|
|
911
925
|
|
|
912
|
-
|
|
926
|
+
`node.spaces.reached(spaceId, peer, waitMs)` is the same wait for one peer
|
|
927
|
+
named by its key, such as an app's key from the request it connected with:
|
|
928
|
+
true once that peer holds all this node does of the space, false when
|
|
929
|
+
`waitMs` (at most a minute) passed first or the peer never came. For a node about to close,
|
|
930
|
+
like a connect page waiting for the app to have what it wrote.
|
|
931
|
+
|
|
932
|
+
_Source: `packages/core/src/node/node.ts` (`spaces.carried`, `spaces.reached`), `packages/core/src/node/node-contacts.ts` (`makePair`). Tests: `packages/core/tests/carrier.test.ts` ("a space made just now, carried before its invite goes out…", "carried is false at once with no carrier…"), `packages/core/tests/usernames.test.ts` ("spaces.reached is true once a peer holds the space…")._
|
|
913
933
|
|
|
914
934
|
**The account's own automations.** `node.automations` (needs the account
|
|
915
935
|
key) lists, adds, updates (`name`, `paused`) and removes the account's own
|
|
@@ -947,6 +967,16 @@ to look for the account registry at before the account says which it uses, so
|
|
|
947
967
|
an app built with a default host restores an account from its recovery code
|
|
948
968
|
alone. `network.nodes` still adds sockets of its own, to every space.
|
|
949
969
|
|
|
970
|
+
`network.reach` says where a node may connect, asked of every address it
|
|
971
|
+
found rather than was given: a host or node a record or an invite names, a
|
|
972
|
+
relay a space or an invite names, a place a short link names, a host it asks
|
|
973
|
+
to describe itself. Its own `relays`, `nodes` and `hosts` are taken as given;
|
|
974
|
+
without `reach`, anywhere. Refused, a host is not asked (`hosting` calls fail),
|
|
975
|
+
a node or relay not dialled, a short link's place not asked. It is for a node
|
|
976
|
+
a server runs for someone else, such as the MCP service's for chat apps: what
|
|
977
|
+
that node reads, and the invites it is handed, are the other's to write, and
|
|
978
|
+
must not make the server connect inside its own network.
|
|
979
|
+
|
|
950
980
|
A device waits 15 seconds for a host to answer any call, and a minute for
|
|
951
981
|
`startBot`. A host that gives no answer, or none in time, is a `HostError`
|
|
952
982
|
with status 0 whose message names the address (`describeHost(url, timeoutMs?)`
|
|
@@ -975,7 +1005,7 @@ hour (`evaluate`) holds each to the free line. Past a space's `until`, every
|
|
|
975
1005
|
account's carry space stops carrying it (`skip`, in `createCarryCore`), while
|
|
976
1006
|
its own subscription still may. Each change is a line in the host's log.
|
|
977
1007
|
|
|
978
|
-
_Source: `packages/core/src/node/node.ts` (`carriers`, `
|
|
1008
|
+
_Source: `packages/core/src/node/node-carriers.ts` (`carriers`, `fetchInvite`), `packages/core/src/node/node-hosting.ts` (`hosting`, `describeAt`), `packages/core/src/node/space-peers.ts` (`useNodes`, `meshFor`), `packages/core/src/node/carrier.ts` (`arrived`, `skip`, `onArrived`), `packages/core/src/node/host.ts` (`evaluate`), `packages/core/src/session/hosting.ts`, `packages/cli/src/host.ts`. Tests: `packages/core/tests/carrier.test.ts`, `packages/core/tests/host-limits.test.ts`, `packages/core/tests/reach.test.ts`, `packages/cli/tests/host.test.ts`, `packages/cli/tests/remote-mcp-server.test.ts`, `packages/cli/tests/remote-mcp-offline.test.ts`._
|
|
979
1009
|
|
|
980
1010
|
### A space paying for itself
|
|
981
1011
|
|
|
@@ -1017,7 +1047,7 @@ has, so it keeps that, unreadable, for as long as the space's subscription is
|
|
|
1017
1047
|
paid, and what is in the fund stays there
|
|
1018
1048
|
([#220](https://github.com/leifriksheim/minca/issues/220)).
|
|
1019
1049
|
|
|
1020
|
-
_Source: `packages/core/src/node/node.ts` (`keepSpaceHosts`, `askSpaceHost`, `hosting.space`), `packages/core/src/session/hosting.ts` (`describeHost`, `HostError`). Tests: `packages/cli/tests/host.test.ts` ("a space paying for itself", "an address that is not a host, or one that is down", "bots a host runs": the two on stopping a space's host)._
|
|
1050
|
+
_Source: `packages/core/src/node/node-hosting.ts` (`keepSpaceHosts`, `askSpaceHost`, `hosting.space`), `packages/core/src/session/hosting.ts` (`describeHost`, `HostError`). Tests: `packages/cli/tests/host.test.ts` ("a space paying for itself", "an address that is not a host, or one that is down", "bots a host runs": the two on stopping a space's host)._
|
|
1021
1051
|
|
|
1022
1052
|
## The inbox
|
|
1023
1053
|
|
|
@@ -1025,13 +1055,15 @@ _Source: `packages/core/src/node/node.ts` (`keepSpaceHosts`, `askSpaceHost`, `ho
|
|
|
1025
1055
|
|
|
1026
1056
|
| Call | Does |
|
|
1027
1057
|
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1028
|
-
| `get()` | Your inbox, or null until opened: `{ gen, name?, key, sign, places, code, updatedAt }`. `code` is signed afresh each time; what it says stays the same
|
|
1058
|
+
| `get()` | Your inbox, or null until opened: `{ gen, name?, key, sign, places, code, username?, usernameUntil?, updatedAt }`. `code` is signed afresh each time; what it says stays the same |
|
|
1029
1059
|
| `open({ places?, name? })` | Opens your inbox, or changes where its knocks wait and the name it gives. Places default to the current ones, else this node's relays (up to 3); name to the current one, else the account's |
|
|
1030
1060
|
| `rotate()` | Clears the inbox and replaces it with `gen + 1`: the old code leads nowhere |
|
|
1031
1061
|
| `clear()` | Purges every knock waiting, from every mailbox it names |
|
|
1032
|
-
| `
|
|
1062
|
+
| `claim(username)` | Claims a username for your inbox on its domain's name service ([usernames.md](usernames.md)), opening the inbox if need be; one at a time. It follows the inbox: `rotate` and `open` point it at the new code, and `knocks` renews it a month before it lapses |
|
|
1063
|
+
| `release()` | Gives the username up: it leads nowhere |
|
|
1064
|
+
| `knock(code, { note? })` | by a code, a link or a username: [the exchange](inbox.md#the-exchange), returns `{ space, carried }` |
|
|
1033
1065
|
| `knocks()` | Fetches the inbox's topic from every mailbox it names, opens and checks ([spec 07 §6](https://github.com/leifriksheim/minca/blob/main/spec/07-inbox.md); opened results are cached by id), settles sent knocks; returns `{ id, from, name, note?, pairSpace, at }`, newest first |
|
|
1034
|
-
| `sent()` | Your knocks nobody has joined yet: `{ space, name, at }`
|
|
1066
|
+
| `sent()` | Your knocks nobody has joined yet: `{ space, name, username?, at }` |
|
|
1035
1067
|
| `accept(id)` | [the exchange](inbox.md#the-exchange), returns the new `ContactView` |
|
|
1036
1068
|
| `dismiss(id)` | Purges one knock |
|
|
1037
1069
|
|
|
@@ -68,7 +68,7 @@ await node.records.get(space.id, hers);
|
|
|
68
68
|
`lineKey(account, collection)` (exported by `@minca/core`), an
|
|
69
69
|
owned key of the account's.
|
|
70
70
|
|
|
71
|
-
_Source: `packages/core/src/records/key.ts`, `packages/core/src/node/space-
|
|
71
|
+
_Source: `packages/core/src/records/key.ts`, `packages/core/src/node/space-writing.ts` (`keyToWrite`, `keepsCollection`, `put`, `onePerKey`), `packages/core/src/node/space-runtime.ts` (`keyFor`). Tests: `packages/core/tests/record-keys.test.ts`, `packages/core/tests/versions.test.ts` ("a deleted key can be written again…")._
|
|
72
72
|
|
|
73
73
|
## Links
|
|
74
74
|
|
package/docs/sign-in.md
CHANGED
|
@@ -54,34 +54,34 @@ _Source: `packages/core/src/identity/account-store.ts`. Tests: `packages/core/te
|
|
|
54
54
|
| `create` | Name a new account. |
|
|
55
55
|
| `recovery` | Signed in; `freshCode` is the recovery code to keep safe. |
|
|
56
56
|
| `unlock` | Signed in; choose a passkey or a password. Required. |
|
|
57
|
-
| `pod` | Signed in; a new account is offered a pod. Optional, and skipped with `offerPod: false`.
|
|
57
|
+
| `pod` | Signed in; a new account with no host is offered a pod. Optional, and skipped with `offerPod: false`. |
|
|
58
58
|
| `pair` | Opened from a phone-pairing link ([01](https://github.com/leifriksheim/minca/blob/main/spec/01-identity.md)). |
|
|
59
59
|
| `ready` | Signed in; `session` is set. |
|
|
60
60
|
|
|
61
61
|
Transitions:
|
|
62
62
|
|
|
63
|
-
| From | Action | To
|
|
64
|
-
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
-
| `starting` | `start()`, a kept sign-in for an account in the place ([the session a sign-in starts](#the-session-a-sign-in-starts)) | `ready`, or `pair` (signed in) with a pairing ticket in the URL
|
|
66
|
-
| `starting` | `start()`, no kept sign-in and a pairing ticket in the URL | `pair`
|
|
67
|
-
| `starting` | `start()`, otherwise | `signIn` if the place has accounts, else `welcome`
|
|
68
|
-
| `starting` | `start()` fails | `welcome` (with `error`)
|
|
69
|
-
| any | `showWelcome()` / `showExisting()` / `showRestore()` / `showSignIn()` | `welcome` / `existing` / `restore` / `signIn`
|
|
70
|
-
| `welcome`, `existing`, `signIn` | `choosePod()` / `useBrowser()` while signed out | `signIn` or `welcome`
|
|
71
|
-
| `welcome` | `reopenPod()`, from a click, with `podToReopen` set | `ready` with a kept sign-in for an account there, else `signIn` or `welcome`
|
|
72
|
-
| `ready` | `choosePod()` while signed in | `ready`, with `podChoice` set; `confirmPod('combine' \| 'switch')` restarts the session in the pod
|
|
73
|
-
| `pod` | `choosePod()` | `ready`: the new account moves into the pod without asking, and its browser copy is removed
|
|
74
|
-
| `pod` | `finishSetup()` | `ready`
|
|
75
|
-
| `welcome`, `existing`, `signIn` | `startCreating()` | `create`
|
|
76
|
-
| `signIn` | `signInWithPassword` / `signInWithPasskey` succeeds | `ready`
|
|
77
|
-
| `signIn`, `restore` | `signInWithCode` (or a recovery code given to `signInWithPassword`) succeeds | `ready` if the account has a usable passkey or a password here; else `unlock` with `setup: 'restored'`
|
|
78
|
-
| `create` | `createAccount(name)`
|
|
79
|
-
| `recovery` | `codeSaved()` | `unlock`
|
|
80
|
-
| `unlock` | `addPasskey()` / `setPassword(p)` succeeds | `
|
|
81
|
-
| `pair` | `acceptPairing()` | once the computer confirms the code, `unlock` with `setup: 'paired'` if the account has no way in here, else `ready`; signed in to another, `pair` with `pairingArrival`
|
|
82
|
-
| `pair` | `answerPairing(true)` / `answerPairing(false)` | as `acceptPairing()` signed out / `ready`, the account signed in kept
|
|
83
|
-
| `pair` | `dismissPairing()` | `ready` if signed in, else `signIn` / `welcome`
|
|
84
|
-
| `ready` | `signOut()` | `starting`, then `signIn` / `welcome`
|
|
63
|
+
| From | Action | To |
|
|
64
|
+
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| `starting` | `start()`, a kept sign-in for an account in the place ([the session a sign-in starts](#the-session-a-sign-in-starts)) | `ready`, or `pair` (signed in) with a pairing ticket in the URL |
|
|
66
|
+
| `starting` | `start()`, no kept sign-in and a pairing ticket in the URL | `pair` |
|
|
67
|
+
| `starting` | `start()`, otherwise | `signIn` if the place has accounts, else `welcome` |
|
|
68
|
+
| `starting` | `start()` fails | `welcome` (with `error`) |
|
|
69
|
+
| any | `showWelcome()` / `showExisting()` / `showRestore()` / `showSignIn()` | `welcome` / `existing` / `restore` / `signIn` |
|
|
70
|
+
| `welcome`, `existing`, `signIn` | `choosePod()` / `useBrowser()` while signed out | `signIn` or `welcome` |
|
|
71
|
+
| `welcome` | `reopenPod()`, from a click, with `podToReopen` set | `ready` with a kept sign-in for an account there, else `signIn` or `welcome` |
|
|
72
|
+
| `ready` | `choosePod()` while signed in | `ready`, with `podChoice` set; `confirmPod('combine' \| 'switch')` restarts the session in the pod |
|
|
73
|
+
| `pod` | `choosePod()` | `ready`: the new account moves into the pod without asking, and its browser copy is removed |
|
|
74
|
+
| `pod` | `finishSetup()` | `ready` |
|
|
75
|
+
| `welcome`, `existing`, `signIn` | `startCreating()` | `create` |
|
|
76
|
+
| `signIn` | `signInWithPassword` / `signInWithPasskey` succeeds | `ready` |
|
|
77
|
+
| `signIn`, `restore` | `signInWithCode` (or a recovery code given to `signInWithPassword`) succeeds | `ready` if the account has a usable passkey or a password here; else `unlock` with `setup: 'restored'` |
|
|
78
|
+
| `create` | `createAccount(name, { username? })` | `recovery`, with `session`, `freshCode` and `setup: 'new'` set |
|
|
79
|
+
| `recovery` | `codeSaved()` | `unlock` |
|
|
80
|
+
| `unlock` | `addPasskey()` / `setPassword(p)` succeeds | `ready` for a new account with a host (the first of `network.hosts`), which is handed the spaces in the background (`settled()`); else `pod` in a browser that can open folders, unless `offerPod` is false; else `ready` |
|
|
81
|
+
| `pair` | `acceptPairing()` | once the computer confirms the code, `unlock` with `setup: 'paired'` if the account has no way in here, else `ready`; signed in to another, `pair` with `pairingArrival` |
|
|
82
|
+
| `pair` | `answerPairing(true)` / `answerPairing(false)` | as `acceptPairing()` signed out / `ready`, the account signed in kept |
|
|
83
|
+
| `pair` | `dismissPairing()` | `ready` if signed in, else `signIn` / `welcome` |
|
|
84
|
+
| `ready` | `signOut()` | `starting`, then `signIn` / `welcome` |
|
|
85
85
|
|
|
86
86
|
A pod this site used last opens at `start()` only while the browser still
|
|
87
87
|
grants it. Chrome keeps the folder's handle between visits, but not the
|
|
@@ -99,6 +99,17 @@ while it runs, or a carrier given the folder. A page that closes once signed
|
|
|
99
99
|
in, such as an account home's connect page, passes `offerPod: false`, and
|
|
100
100
|
offers the pod where the person comes back instead.
|
|
101
101
|
|
|
102
|
+
With `usernames: '<domain>'`, the create screen asks for a username alone,
|
|
103
|
+
the account's name taken from it, and `createAccount` claims it in the
|
|
104
|
+
background ([usernames.md](usernames.md#on-the-node)).
|
|
105
|
+
|
|
106
|
+
With `network.hosts`, a new account is kept online with the first of them as
|
|
107
|
+
it is made, with nothing to choose: `hosting.use` in the background, only
|
|
108
|
+
when the host keeps accounts with nothing paid (`free`, or `limits`), tried
|
|
109
|
+
once more if it doesn't answer. Failing that, the account stays in this
|
|
110
|
+
browser, and is kept online from the account page later. `settled()`
|
|
111
|
+
resolves once this and any username claim are done.
|
|
112
|
+
|
|
102
113
|
_Source: `packages/core/src/session/auth.ts` (`start`, `reopenPod`), `packages/core/src/session/places.ts` (`podToReopen`). Tests: `packages/core/tests/auth.test.ts`, `packages/core/tests/take-up.test.ts` ("a pod the browser wants a click to open again")._
|
|
103
114
|
|
|
104
115
|
## Ways in
|
|
@@ -145,8 +156,8 @@ _Source: `packages/core/src/session/auth.ts`, `packages/core/src/session/credent
|
|
|
145
156
|
Being signed in is no proof anyone is there: a page may be left open, and a
|
|
146
157
|
sign-in kept for days. So whatever hands out the whole account, or changes how
|
|
147
158
|
it signs in, asks again. `auth.recoveryCode()` returns the code,
|
|
148
|
-
`auth.offerToPhone()` starts, `setPassword`, `addPasskey
|
|
149
|
-
`removeShortcut` work (outside the first setup of an account just made,
|
|
159
|
+
`auth.offerToPhone()` starts, `setPassword`, `addPasskey`,
|
|
160
|
+
`removeShortcut` and `removeAccount` work (outside the first setup of an account just made,
|
|
150
161
|
restored or paired, which only landing a session opens), only within five
|
|
151
162
|
minutes of `auth.confirm(proof)` succeeding for the account signed in now
|
|
152
163
|
(`isConfirmed()` says whether it has), where `proof` is
|
|
@@ -270,6 +281,18 @@ into the pod, copies every space into it (`copyAccountData`, [stores](node.md#st
|
|
|
270
281
|
restarts the session there. `forgetBrowserCopy()` then deletes the browser's
|
|
271
282
|
copy. Other accounts in the pod are never touched.
|
|
272
283
|
|
|
284
|
+
`removeAccount()` takes an account out of the browser altogether, as clearing
|
|
285
|
+
its site data would. It refuses while an app is connected from here: only this
|
|
286
|
+
home can disconnect an app, so the apps go first, from the list where
|
|
287
|
+
`disconnect` says whether each has heard. Then it signs out and deletes the
|
|
288
|
+
account's vault, its spaces' data and what the home remembered of it. A
|
|
289
|
+
revoke no peer but the app has taken in goes with them, as after a disconnect
|
|
290
|
+
nobody heard. Its passkey keys stay, since a pod's vault may name the same
|
|
291
|
+
one; with the vault gone they open nothing.
|
|
292
|
+
Copies on other devices, carriers and hosts stay; with none, its private
|
|
293
|
+
spaces are gone, and so is whatever reached no other copy. An account kept in a pod is not removed this way: the pod is
|
|
294
|
+
its copy.
|
|
295
|
+
|
|
273
296
|
The page writes to the pod only while it is open. A carrier given the same
|
|
274
297
|
folder, such as the Chrome extension, keeps it up to date while the page is
|
|
275
298
|
closed: it learns of the pod from its grant (`CarryGrant.pod`), so one that
|
|
@@ -366,7 +389,12 @@ account the home keeps is named by the name it filed, never one from the
|
|
|
366
389
|
link; its avatar helps recognise it, but is no proof, since a look-alike
|
|
367
390
|
takes seconds to find.
|
|
368
391
|
|
|
369
|
-
|
|
392
|
+
Open it as a popup with `popupFeatures(width, height)`, the third argument to
|
|
393
|
+
`window.open`: a window that size, centred on the one it opens from, as
|
|
394
|
+
connecting does. Given a size alone, a browser puts it where it likes, often
|
|
395
|
+
the screen's top left.
|
|
396
|
+
|
|
397
|
+
_Source: `packages/core/src/session/account-hint.ts`, `packages/core/src/session/popup.ts`, `apps/home/src/components/AccountHint.tsx`, `apps/example/src/components/AccountMenu.tsx`, `apps/example/src/notifications.ts`. Tests: `packages/core/tests/account-hint.test.ts`, `packages/core/tests/popup.test.ts`._
|
|
370
398
|
|
|
371
399
|
## The account home's side
|
|
372
400
|
|
package/docs/spaces.md
CHANGED
|
@@ -58,7 +58,8 @@ steward: its grants are the constitution's, and changing them takes a
|
|
|
58
58
|
successor.
|
|
59
59
|
|
|
60
60
|
`STAFF_COLLECTIONS` are the standard collections only moderators start in a
|
|
61
|
-
community: announcements, badges, awards, pins, labels, channels and
|
|
61
|
+
community: announcements, badges, awards, pins, labels, channels, hosts and
|
|
62
|
+
the space's own profile (`std.space-profile`).
|
|
62
63
|
Their definitions used to say so with `create` rules; now the template does.
|
|
63
64
|
|
|
64
65
|
When a space is created with no roles, it gets `solo`. The account's derived
|
|
@@ -67,7 +68,7 @@ byte: their ids depend on it
|
|
|
67
68
|
([spec 03 §13.1](https://github.com/leifriksheim/minca/blob/main/spec/03-spaces.md)).
|
|
68
69
|
Changing `solo` would change those ids, so it must not change.
|
|
69
70
|
|
|
70
|
-
_Source: `packages/core/src/space/presets.ts` (`solo`, `team`, `community`, `coop`, `STAFF_COLLECTIONS`), `packages/core/src/space/grants.ts`, `packages/core/src/space/space-manager.ts` (`create`), `packages/core/src/node/node.ts` (`spaces.create`). Tests: `packages/core/tests/space.test.ts`, `packages/core/tests/roles.test.ts` ("definitions", "`community` admins can remove each other by naming a view before the promotion"), `packages/core/tests/constitution.test.ts` ("the templates are well formed", "a co-op: no founders…")._
|
|
71
|
+
_Source: `packages/core/src/space/presets.ts` (`solo`, `team`, `community`, `coop`, `STAFF_COLLECTIONS`), `packages/core/src/space/grants.ts`, `packages/core/src/space/space-manager.ts` (`create`), `packages/core/src/node/node.ts` (`spaces.create`). Tests: `packages/core/tests/space.test.ts`, `packages/core/tests/space-profile.test.ts`, `packages/core/tests/roles.test.ts` ("definitions", "`community` admins can remove each other by naming a view before the promotion"), `packages/core/tests/constitution.test.ts` ("the templates are well formed", "a co-op: no founders…")._
|
|
71
72
|
|
|
72
73
|
## The top and founders
|
|
73
74
|
|
|
@@ -92,7 +93,7 @@ but nobody can change roles, and nothing in the constitution can change. An
|
|
|
92
93
|
app says so plainly ("No one can change roles here any more") and offers the
|
|
93
94
|
way on: naming a successor (below), which any member may do once no member holds `/space/succeed`.
|
|
94
95
|
|
|
95
|
-
_Source: `packages/core/src/node/space-
|
|
96
|
+
_Source: `packages/core/src/node/space-membership.ts` (`stepDown`, `access`), `packages/core/src/space/roles.ts` (`headless`). Tests: `packages/core/tests/constitution.test.ts` ("stepping down", "a founder steps down, keeping a role…")._
|
|
96
97
|
|
|
97
98
|
## Successors
|
|
98
99
|
|
|
@@ -125,7 +126,7 @@ What an app shows:
|
|
|
125
126
|
invite to a space that claims to succeed another, with no succeed for it
|
|
126
127
|
there, is a copy, and is shown as one.
|
|
127
128
|
|
|
128
|
-
_Source: `packages/core/src/node/node.ts` (`spaces.succeed`), `packages/core/src/node/space-
|
|
129
|
+
_Source: `packages/core/src/node/node.ts` (`spaces.succeed`), `packages/core/src/node/space-membership.ts` (`succeed`, `access`), `packages/core/src/space/space-manager.ts` (`previewInvite`). Tests: `packages/core/tests/constitution.test.ts` ("/space/succeed", "a successor: made with succeeds…")._
|
|
129
130
|
|
|
130
131
|
## Invites
|
|
131
132
|
|
|
@@ -187,7 +188,7 @@ While the invite's record has not reached this device, the space is held with
|
|
|
187
188
|
`joining: true` and the node tries again as records arrive
|
|
188
189
|
([spec 06 §1.3](https://github.com/leifriksheim/minca/blob/main/spec/06-nodes-and-sessions.md)).
|
|
189
190
|
|
|
190
|
-
_Source: `packages/core/src/node/node.ts` (`spaces.invite`, `preview`, `join
|
|
191
|
+
_Source: `packages/core/src/node/node.ts` (`spaces.invite`, `preview`, `join`), `packages/core/src/node/node-hosting.ts` (`nodesOf`), `packages/core/src/node/node-carriers.ts` (`inviteTo`, `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…")._
|
|
191
192
|
|
|
192
193
|
## Keeping a space's keys and relays
|
|
193
194
|
|
|
@@ -201,7 +202,7 @@ The node does the protocol's key upkeep by itself, in each space it opens:
|
|
|
201
202
|
- In a space with no relays named yet, a node whose account may invoke
|
|
202
203
|
`/space/relays` names its own.
|
|
203
204
|
|
|
204
|
-
_Source: `packages/core/src/node/space-
|
|
205
|
+
_Source: `packages/core/src/node/space-keys.ts` (`upkeep`, `rotateKey`, `nameRelays`). Tests: `packages/core/tests/key-change.test.ts`, `packages/core/tests/space-relays.test.ts`._
|
|
205
206
|
|
|
206
207
|
## Flagged accounts
|
|
207
208
|
|
|
@@ -263,7 +264,7 @@ publishes nothing
|
|
|
263
264
|
> whether nicknames for people who are not contacts get a collection of their
|
|
264
265
|
> own. `profile:` keys may also change (spec 03 §8.6).
|
|
265
266
|
|
|
266
|
-
_Source: `packages/core/src/node/space-
|
|
267
|
+
_Source: `packages/core/src/node/space-profiles.ts` (`loadProfiles`), `packages/core/src/node/space-runtime.ts` (`publishProfile`), `packages/core/src/node/node-contacts.ts` (`publishProfile`, `ownName`, `account.setName`), `packages/core/src/space/account-registry.ts` (`PROFILE_COLLECTION`, `PROFILE_KEY`). Tests: `packages/core/tests/profiles.test.ts`, `packages/core/tests/contacts.test.ts` ("the contact key"), `packages/core/tests/account.test.ts` ("the account name")._
|
|
267
268
|
|
|
268
269
|
## The space manager
|
|
269
270
|
|
|
@@ -315,4 +316,4 @@ is what a carrier's wake matches; the rest is judged only by the app. Without
|
|
|
315
316
|
one, a carrier wakes the app for every new record of the collection, and the
|
|
316
317
|
app turns down the rest.
|
|
317
318
|
|
|
318
|
-
_Source: `packages/core/src/space/own-automations.ts` (`checkOwnAutomation`, `notifyOn`, `matchesRecord`), `packages/core/src/query/filter.ts` (`checkFilter`, `matches`), `packages/core/src/node/node.ts` (`automations`), `apps/example/src/notifications.ts`. Tests: `packages/core/tests/carrier.test.ts` ("notifications through a carrier"), `packages/core/tests/topics.test.ts` ("an automation of the account’s own: its where")._
|
|
319
|
+
_Source: `packages/core/src/space/own-automations.ts` (`checkOwnAutomation`, `notifyOn`, `matchesRecord`), `packages/core/src/query/filter.ts` (`checkFilter`, `matches`), `packages/core/src/node/node-carriers.ts` (`automations`), `apps/example/src/notifications.ts`. Tests: `packages/core/tests/carrier.test.ts` ("notifications through a carrier"), `packages/core/tests/topics.test.ts` ("an automation of the account’s own: its where")._
|
package/docs/standard-library.md
CHANGED
|
@@ -140,14 +140,15 @@ anything, and only moderators and admins write in the collections in
|
|
|
140
140
|
|
|
141
141
|
**People**
|
|
142
142
|
|
|
143
|
-
| Name
|
|
144
|
-
|
|
|
145
|
-
| `std.profile`
|
|
146
|
-
| `std.
|
|
147
|
-
| `std.
|
|
148
|
-
| `std.
|
|
149
|
-
| `std.
|
|
150
|
-
| `std.
|
|
143
|
+
| Name | Body | Links | Rules |
|
|
144
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | ------------------------ |
|
|
145
|
+
| `std.profile` | `name` string ≤ 100; `bio` string ≤ 2000; `avatar` blob; `banner` blob; `pronouns` string ≤ 50; `links` { `title` string ≤ 100, **`url`** string 1–2048 }[] (≤ 16); `bot` boolean | — | `onePer: [@author]` |
|
|
146
|
+
| `std.space-profile` | **`space`** string 1–256; `name` string ≤ 100; `bio` string ≤ 2000; `avatar` blob; `banner` blob | — | `onePer: [space]` |
|
|
147
|
+
| `std.card` | `name` { `full` string ≤ 200, `given` string ≤ 100, `family` string ≤ 100 }; `emails` { **`address`** string 1–320, `label` string ≤ 50 }[] (≤ 16); `phones` { **`number`** string 1–64, `label` string ≤ 50 }[] (≤ 16); `addresses` { **`address`** address, `label` string ≤ 50 }[] (≤ 16); `organization` string ≤ 200; `jobTitle` string ≤ 200; `birthday` day; `photo` blob; `urls` string 1–2048[] (≤ 16); `note` string ≤ 10000 | — | — |
|
|
148
|
+
| `std.follow` | **`did`** DID; `space` string ≤ 256; topic `did` | — | `onePer: [@author, did]` |
|
|
149
|
+
| `std.block` | **`did`** DID; `until` when | — | `onePer: [@author, did]` |
|
|
150
|
+
| `std.mute` | **`did`** DID; `until` when | — | `onePer: [@author, did]` |
|
|
151
|
+
| `std.status` | `text` string ≤ 280; `emoji` string ≤ 16; `until` when | — | `onePer: [@author]` |
|
|
151
152
|
|
|
152
153
|
**Messaging and publishing**
|
|
153
154
|
|
|
@@ -356,6 +357,27 @@ misled bot from deleting.
|
|
|
356
357
|
|
|
357
358
|
_Source: `packages/core/src/schemas/library/social.ts` (`profile`), `packages/core/src/schemas/automations.ts` (`automationsFor`), `packages/cli/src/agent.ts` (`discloseBot`). Tests: `packages/cli/tests/agent-automations.test.ts` ("says it is a bot…", "adds std.profile itself…", "a bot’s name"), `packages/core/tests/automation-runners.test.ts` ("a bot")._
|
|
358
359
|
|
|
360
|
+
`std.space-profile` is how a space presents itself, as `std.profile` is how
|
|
361
|
+
someone does, with the same fields. Apps show its `name` in place of the name
|
|
362
|
+
the space was founded with, and its `avatar` as the space's picture. The
|
|
363
|
+
founding name stays in the constitution, where nobody can change it, so an
|
|
364
|
+
invite shows it to someone who can't read the space yet, and the name shown
|
|
365
|
+
after joining may differ from it. There is one key per space: `space` names
|
|
366
|
+
the space by its id, and `onePer: [space]` gives everyone the same shared key,
|
|
367
|
+
so changing it is editing it, and which edit stands is the versions' order,
|
|
368
|
+
never a writer's clock. Whoever may write there can also start a rival chain
|
|
369
|
+
at that key (02 §7.1), so who may write it matters. A reader takes only the record at the key its own
|
|
370
|
+
space's id gives, so one naming another space is never read. Who may write
|
|
371
|
+
it is the space's grants: it is in `STAFF_COLLECTIONS`, so in a `community`
|
|
372
|
+
admins and moderators can, and members can't; in a `coop`, stewards. A space
|
|
373
|
+
made before it was added keeps the grants it was made with: there, any
|
|
374
|
+
member decides the space's name and picture, outranking staff and taking it
|
|
375
|
+
back after each staff edit, until an admin redefines the member role. The example app reads
|
|
376
|
+
no `std.space-profile` in a space for two, which it names for whom it is
|
|
377
|
+
with.
|
|
378
|
+
|
|
379
|
+
_Source: `packages/core/src/schemas/library/social.ts` (`spaceProfile`), `packages/core/src/space/presets.ts` (`STAFF_COLLECTIONS`), `apps/example/src/pictures.ts` (`useSpaceFaces`). Tests: `packages/core/tests/space-profile.test.ts` ("in a community, a member may not change how the space presents itself, and an admin may", "a peer refuses a member's profile forged past their own node's check", "a writer's clock decides nothing: a later edit stands over a profile dated far ahead")._
|
|
380
|
+
|
|
359
381
|
**Mentions and replies.** A `std.message`, `std.comment` or `std.post` names
|
|
360
382
|
the accounts it calls on in `mentions` (as do `std.note`, `std.doc-block` and
|
|
361
383
|
`std.article`) and, when it replies to someone's
|
|
@@ -457,12 +479,13 @@ so "mentions me" and "assigned to me" match from then on.
|
|
|
457
479
|
|
|
458
480
|
**Also exported** from the same module (specified with their features):
|
|
459
481
|
|
|
460
|
-
| Name | Body
|
|
461
|
-
| --------------------- |
|
|
462
|
-
| `std.contact` | `did` ≤ 256 and `name` ≤ 200, required; `space` ≤ 256; `note` ≤ 2000; `blocked` boolean | `onePer: [did]` | [contacts](contacts.md) |
|
|
463
|
-
| `std.contact-request` | `to` ≤ 64 and `sealed` ≤ 16000, required
|
|
464
|
-
| `std.inbox` | `gen` ≥ 0 and `places` (1–3, each ≤ 200), required; `name` ≤ 64
|
|
465
|
-
| `std.knock` | `space` ≤ 256, `name` ≤ 64 and `invite` ≤ 12000, all required | `onePer: [space]` | [inbox.md](inbox.md) |
|
|
482
|
+
| Name | Body | Rules | Where |
|
|
483
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------- | ----------------- | ----------------------- |
|
|
484
|
+
| `std.contact` | `did` ≤ 256 and `name` ≤ 200, required; `space` ≤ 256; `note` ≤ 2000; `blocked` boolean; `username` ≤ 320 | `onePer: [did]` | [contacts](contacts.md) |
|
|
485
|
+
| `std.contact-request` | `to` ≤ 64 and `sealed` ≤ 16000, required | — | [contacts](contacts.md) |
|
|
486
|
+
| `std.inbox` | `gen` ≥ 0 and `places` (1–3, each ≤ 200), required; `name` ≤ 64; `username` ≤ 320; `usernameUntil` | — | [inbox.md](inbox.md) |
|
|
487
|
+
| `std.knock` | `space` ≤ 256, `name` ≤ 64 and `invite` ≤ 12000, all required; `username` ≤ 320 | `onePer: [space]` | [inbox.md](inbox.md) |
|
|
488
|
+
| `std.space-invite` | `space` ≤ 256 and `invite` ≤ 12000, required | `onePer: [space]` | [contacts](contacts.md) |
|
|
466
489
|
|
|
467
490
|
**Positions.** `position` is a string that sorts (by plain string comparison)
|
|
468
491
|
where a record goes in a hand-made order. Digits are `0–9a–z`; a position
|
package/docs/storage.md
CHANGED
|
@@ -38,7 +38,7 @@ records changed once per message taken in, not once per version.
|
|
|
38
38
|
|
|
39
39
|
_Source: `packages/core/src/sync/sync-engine.ts` (`MAX_WANTS_IN_FLIGHT`,
|
|
40
40
|
`MAX_ROUNDS`, `STALE_MS`, `MAX_WAITING`, `MAX_REFUSED`, `want`, `pump`,
|
|
41
|
-
`sweep`), `packages/core/src/node/space-
|
|
41
|
+
`sweep`), `packages/core/src/node/space-peers.ts` (heartbeat,
|
|
42
42
|
`announceSoon`). Tests: `packages/core/tests/reconcile.test.ts` ("a want whose
|
|
43
43
|
answer is lost is given up, and the peer is synced again"),
|
|
44
44
|
`packages/core/tests/sync.test.ts`._
|
|
@@ -175,7 +175,7 @@ change and on close.
|
|
|
175
175
|
`writer-keys/`; a slot left in the home from before is not read, nor
|
|
176
176
|
`writers/`, where a minca from before the numbered lock keeps its keys, so
|
|
177
177
|
the two never sign with one key. `minca agent`
|
|
178
|
-
and
|
|
178
|
+
and the commands an agent runs keep each session's key and stores together in a slot of
|
|
179
179
|
`<home>/agent`, beside the data folder the sessions share
|
|
180
180
|
([actions](actions.md#the-agent-on-a-computer)).
|
|
181
181
|
- **Elsewhere** it must be given: `folderStores` refuses to start without
|
|
@@ -213,8 +213,7 @@ _Source: `packages/core/src/node/stores.ts` (`folderStores`),
|
|
|
213
213
|
`packages/core/src/storage/blob/directory.ts`,
|
|
214
214
|
`packages/core/src/storage/directory-access.ts`,
|
|
215
215
|
`packages/cli/src/fs-directory.ts`, `packages/cli/src/home.ts` (`unlock`),
|
|
216
|
-
`packages/core/src/node/space-
|
|
217
|
-
process"). Tests: `packages/core/tests/folder-adapter.test.ts`,
|
|
216
|
+
`packages/core/src/node/space-mirrors.ts` (`openMirrors`, `watch`). Tests: `packages/core/tests/folder-adapter.test.ts`,
|
|
218
217
|
`packages/cli/tests/path-safety.test.ts`._
|
|
219
218
|
|
|
220
219
|
## Blob stores
|
|
@@ -279,7 +278,7 @@ and twice as many as its last compaction left, it compacts them, keeping
|
|
|
279
278
|
only what its store holds.
|
|
280
279
|
|
|
281
280
|
_Source: `packages/core/src/storage/mirror.ts`,
|
|
282
|
-
`packages/core/src/node/space-
|
|
281
|
+
`packages/core/src/node/space-mirrors.ts` (`openMirrors`),
|
|
283
282
|
`packages/core/src/node/host.ts`. Tests: `packages/core/tests/mirror.test.ts`._
|
|
284
283
|
|
|
285
284
|
### Planned: mirrors in your own storage
|
|
@@ -369,7 +368,7 @@ type: ref.mime }))` shows it.
|
|
|
369
368
|
writer's copies of files no longer named.
|
|
370
369
|
|
|
371
370
|
_Source: `packages/core/src/files/space-files.ts`, `packages/core/src/files/file-id.ts`,
|
|
372
|
-
`packages/core/src/files/seal.ts`, `packages/core/src/node/space-runtime.ts` (
|
|
371
|
+
`packages/core/src/files/seal.ts`, `packages/core/src/node/space-runtime.ts` (`filesChanged`).
|
|
373
372
|
Tests: `packages/core/tests/files.test.ts`._
|
|
374
373
|
|
|
375
374
|
### Planned: video and pictures
|