@dxos/protocols 0.8.4-staging.ac66bdf99f → 0.9.1-main.c7dcc2e112
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/LICENSE +102 -5
- package/dist/src/Config2.d.ts +91 -0
- package/dist/src/Config2.d.ts.map +1 -0
- package/dist/src/Config2.js +56 -0
- package/dist/src/Config2.js.map +1 -0
- package/dist/src/FeedProtocol.d.ts +5 -5
- package/dist/src/FeedProtocol.d.ts.map +1 -1
- package/dist/src/FeedProtocol.js.map +1 -1
- package/dist/src/FunctionProtocol.d.ts +7 -0
- package/dist/src/FunctionProtocol.d.ts.map +1 -1
- package/dist/src/TraceProtocol.d.ts +15 -0
- package/dist/src/TraceProtocol.d.ts.map +1 -0
- package/dist/src/TraceProtocol.js +4 -0
- package/dist/src/TraceProtocol.js.map +1 -0
- package/dist/src/automerge.d.ts +203 -13
- package/dist/src/automerge.d.ts.map +1 -1
- package/dist/src/automerge.js +17 -0
- package/dist/src/automerge.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/invitation_pb.d.ts +16 -4
- package/dist/src/buf/proto/gen/dxos/client/invitation_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/invitation_pb.js +17 -5
- package/dist/src/buf/proto/gen/dxos/client/invitation_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +74 -0
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +16 -1
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts +14 -0
- package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/services_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/config_pb.d.ts +6 -0
- package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/config_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/devtools/host_pb.d.ts +70 -0
- package/dist/src/buf/proto/gen/dxos/devtools/host_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/devtools/host_pb.js +16 -1
- package/dist/src/buf/proto/gen/dxos/devtools/host_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +6 -0
- package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +17 -2
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +26 -0
- package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js +26 -21
- package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.d.ts +11 -4
- package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.js +12 -5
- package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.js.map +1 -1
- package/dist/src/codec.test.js +1 -1
- package/dist/src/edge/EdgeFunctionEnv.d.ts +27 -1
- package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -1
- package/dist/src/edge/edge.d.ts +272 -3
- package/dist/src/edge/edge.d.ts.map +1 -1
- package/dist/src/edge/edge.js +157 -2
- package/dist/src/edge/edge.js.map +1 -1
- package/dist/src/edge/edge.test.d.ts +2 -0
- package/dist/src/edge/edge.test.d.ts.map +1 -0
- package/dist/src/edge/edge.test.js +50 -0
- package/dist/src/edge/edge.test.js.map +1 -0
- package/dist/src/edge/errors.d.ts.map +1 -1
- package/dist/src/edge/errors.js +1 -1
- package/dist/src/edge/errors.js.map +1 -1
- package/dist/src/edge/index.js +4 -4
- package/dist/src/edge/registry.d.ts +248 -76
- package/dist/src/edge/registry.d.ts.map +1 -1
- package/dist/src/edge/registry.js +151 -52
- package/dist/src/edge/registry.js.map +1 -1
- package/dist/src/errors/base-errors.d.ts +18 -18
- package/dist/src/errors/base-errors.d.ts.map +1 -1
- package/dist/src/errors/encoding.d.ts +1 -1
- package/dist/src/errors/encoding.d.ts.map +1 -1
- package/dist/src/errors/encoding.js +1 -1
- package/dist/src/errors/encoding.js.map +1 -1
- package/dist/src/errors/errors.d.ts +132 -132
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/errors/errors.js +1 -1
- package/dist/src/errors/errors.test.js +1 -1
- package/dist/src/errors/helpers.d.ts +2 -2
- package/dist/src/errors/helpers.d.ts.map +1 -1
- package/dist/src/errors/index.js +5 -5
- package/dist/src/errors/parameter.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +12 -11
- package/dist/src/index.js.map +1 -1
- package/dist/src/indexing.d.ts.map +1 -1
- package/dist/src/indexing.test.js +1 -1
- package/dist/src/invitation.js +3 -3
- package/dist/src/invitation.js.map +1 -1
- package/dist/src/profile-archive.d.ts +14 -1
- package/dist/src/profile-archive.d.ts.map +1 -1
- package/dist/src/profile-archive.js +2 -0
- package/dist/src/profile-archive.js.map +1 -1
- package/dist/src/proto/gen/dxos/agent/dashboard.d.ts +3 -6
- package/dist/src/proto/gen/dxos/agent/dashboard.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/agent/dashboard.js.map +1 -1
- package/dist/src/proto/gen/dxos/agent/echoproxy.d.ts +1 -2
- package/dist/src/proto/gen/dxos/agent/echoproxy.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/agent/epoch.d.ts +1 -2
- package/dist/src/proto/gen/dxos/agent/epoch.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/agent/functions.d.ts +6 -12
- package/dist/src/proto/gen/dxos/agent/functions.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/bot.d.ts +12 -24
- package/dist/src/proto/gen/dxos/bot.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/bot.js.map +1 -1
- package/dist/src/proto/gen/dxos/client/services.d.ts +121 -150
- package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/client/services.js +4 -2
- package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/src/proto/gen/dxos/config.d.ts +58 -102
- package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/config.js.map +1 -1
- package/dist/src/proto/gen/dxos/devtools/host.d.ts +78 -96
- package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/devtools/swarm.d.ts +4 -8
- package/dist/src/proto/gen/dxos/devtools/swarm.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/blob.d.ts +1 -2
- package/dist/src/proto/gen/dxos/echo/blob.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/blob.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/feed.d.ts +4 -8
- package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/filter.d.ts +2 -4
- package/dist/src/proto/gen/dxos/echo/filter.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/filter.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/indexing.d.ts +2 -4
- package/dist/src/proto/gen/dxos/echo/indexing.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/indexing.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts +12 -16
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/model/document.d.ts +11 -22
- package/dist/src/proto/gen/dxos/echo/model/document.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/model/document.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts +1 -2
- package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/model/text.d.ts +2 -4
- package/dist/src/proto/gen/dxos/echo/model/text.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/object.d.ts +6 -12
- package/dist/src/proto/gen/dxos/echo/object.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/object.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/query.d.ts +4 -8
- package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/service.d.ts +36 -35
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +2 -4
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +2 -4
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/edge/calls.d.ts +5 -10
- package/dist/src/proto/gen/dxos/edge/calls.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/edge/messenger.d.ts +6 -12
- package/dist/src/proto/gen/dxos/edge/messenger.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/edge/messenger.js.map +1 -1
- package/dist/src/proto/gen/dxos/edge/signal.d.ts +7 -14
- package/dist/src/proto/gen/dxos/edge/signal.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/error.d.ts +1 -2
- package/dist/src/proto/gen/dxos/error.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/gravity.d.ts +10 -20
- package/dist/src/proto/gen/dxos/gravity.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts +1 -2
- package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts +6 -12
- package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/credentials/greet.js.map +1 -1
- package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts +2 -4
- package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/credentials.d.ts +34 -44
- package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -1
- package/dist/src/proto/gen/dxos/halo/invitations.d.ts +16 -28
- package/dist/src/proto/gen/dxos/halo/invitations.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/invitations.js +3 -2
- package/dist/src/proto/gen/dxos/halo/invitations.js.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keyring.d.ts +1 -2
- package/dist/src/proto/gen/dxos/halo/keyring.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +2 -4
- package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/signed.d.ts +4 -8
- package/dist/src/proto/gen/dxos/halo/signed.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/iframe.d.ts +4 -8
- package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/iframe.js.map +1 -1
- package/dist/src/proto/gen/dxos/keys.d.ts +2 -4
- package/dist/src/proto/gen/dxos/keys.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/bridge.d.ts +12 -24
- package/dist/src/proto/gen/dxos/mesh/bridge.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts +1 -2
- package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/messaging.d.ts +2 -4
- package/dist/src/proto/gen/dxos/mesh/messaging.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/muxer.d.ts +5 -10
- package/dist/src/proto/gen/dxos/mesh/muxer.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/presence.d.ts +1 -2
- package/dist/src/proto/gen/dxos/mesh/presence.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/protocol.d.ts +3 -6
- package/dist/src/proto/gen/dxos/mesh/protocol.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/replicator.d.ts +2 -4
- package/dist/src/proto/gen/dxos/mesh/replicator.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/signal.d.ts +9 -18
- package/dist/src/proto/gen/dxos/mesh/signal.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/signal.js.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/swarm.d.ts +6 -12
- package/dist/src/proto/gen/dxos/mesh/swarm.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/teleport/auth.d.ts +2 -4
- package/dist/src/proto/gen/dxos/mesh/teleport/auth.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/teleport/automerge.d.ts +2 -4
- package/dist/src/proto/gen/dxos/mesh/teleport/automerge.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/teleport/blobsync.d.ts +3 -6
- package/dist/src/proto/gen/dxos/mesh/teleport/blobsync.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/teleport/control.d.ts +3 -6
- package/dist/src/proto/gen/dxos/mesh/teleport/control.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/teleport/gossip.d.ts +1 -2
- package/dist/src/proto/gen/dxos/mesh/teleport/gossip.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/teleport/notarization.d.ts +1 -2
- package/dist/src/proto/gen/dxos/mesh/teleport/notarization.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/teleport/replicator.d.ts +5 -10
- package/dist/src/proto/gen/dxos/mesh/teleport/replicator.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/mesh/teleport.d.ts +2 -4
- package/dist/src/proto/gen/dxos/mesh/teleport.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/registry.d.ts +3 -6
- package/dist/src/proto/gen/dxos/registry.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/rpc.d.ts +7 -14
- package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/rpc.js.map +1 -1
- package/dist/src/proto/gen/dxos/service/agentmanager.d.ts +4 -8
- package/dist/src/proto/gen/dxos/service/agentmanager.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/service/agentmanager.js.map +1 -1
- package/dist/src/proto/gen/dxos/service/publisher.d.ts +5 -10
- package/dist/src/proto/gen/dxos/service/publisher.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/service/supervisor.d.ts +12 -24
- package/dist/src/proto/gen/dxos/service/supervisor.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/service/supervisor.js.map +1 -1
- package/dist/src/proto/gen/dxos/service/tunnel.d.ts +3 -6
- package/dist/src/proto/gen/dxos/service/tunnel.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/tracing.d.ts +10 -20
- package/dist/src/proto/gen/dxos/tracing.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/type.d.ts +12 -24
- package/dist/src/proto/gen/dxos/type.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/value.d.ts +2 -4
- package/dist/src/proto/gen/dxos/value.d.ts.map +1 -1
- package/dist/src/proto/gen/example/testing/data.d.ts +4 -8
- package/dist/src/proto/gen/example/testing/data.d.ts.map +1 -1
- package/dist/src/proto/gen/example/testing/rpc.d.ts +7 -14
- package/dist/src/proto/gen/example/testing/rpc.d.ts.map +1 -1
- package/dist/src/proto/gen/google/protobuf.d.ts +27 -27
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
- package/dist/src/proto/gen/google/protobuf.js.map +1 -1
- package/dist/src/proto/gen/index.d.ts +7 -0
- package/dist/src/proto/gen/index.d.ts.map +1 -1
- package/dist/src/proto/gen/index.js +1 -1
- package/dist/src/proto/gen/index.js.map +1 -1
- package/dist/src/proto/index.js +1 -1
- package/dist/src/proto/substitutions.d.ts +8 -8
- package/dist/src/proto/substitutions.d.ts.map +1 -1
- package/dist/src/space-archive.d.ts +5 -5
- package/dist/src/space-archive.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -32
- package/src/Config2.ts +68 -0
- package/src/FeedProtocol.ts +3 -0
- package/src/FunctionProtocol.ts +9 -0
- package/src/TraceProtocol.ts +21 -0
- package/src/automerge.ts +239 -13
- package/src/buf/proto/gen/dxos/client/invitation_pb.ts +19 -5
- package/src/buf/proto/gen/dxos/client/queue_pb.ts +88 -1
- package/src/buf/proto/gen/dxos/client/services_pb.ts +16 -1
- package/src/buf/proto/gen/dxos/config_pb.ts +8 -1
- package/src/buf/proto/gen/dxos/devtools/host_pb.ts +82 -1
- package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +8 -1
- package/src/buf/proto/gen/dxos/echo/service_pb.ts +19 -3
- package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +52 -21
- package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +13 -5
- package/src/edge/EdgeFunctionEnv.ts +40 -3
- package/src/edge/edge.test.ts +64 -0
- package/src/edge/edge.ts +281 -5
- package/src/edge/registry.ts +170 -61
- package/src/index.ts +2 -1
- package/src/invitation.ts +3 -3
- package/src/lexicons/org.dxos.experimental/README.md +29 -0
- package/src/lexicons/org.dxos.experimental/package.profile.json +87 -0
- package/src/lexicons/org.dxos.experimental/package.release.json +45 -0
- package/src/lexicons/org.dxos.experimental/publisher.profile.json +37 -0
- package/src/lexicons/org.dxos.experimental/publisher.verification.json +36 -0
- package/src/profile-archive.ts +13 -0
- package/src/proto/dxos/client/invitation.proto +9 -2
- package/src/proto/dxos/client/queue.proto +21 -0
- package/src/proto/dxos/client/services.proto +4 -0
- package/src/proto/dxos/config.proto +2 -0
- package/src/proto/dxos/devtools/host.proto +27 -0
- package/src/proto/dxos/echo/metadata.proto +3 -0
- package/src/proto/dxos/echo/service.proto +14 -1
- package/src/proto/dxos/halo/credentials.proto +9 -0
- package/src/proto/dxos/halo/invitations.proto +5 -2
- package/src/proto/gen/dxos/agent/dashboard.ts +3 -6
- package/src/proto/gen/dxos/agent/echoproxy.ts +1 -2
- package/src/proto/gen/dxos/agent/epoch.ts +1 -2
- package/src/proto/gen/dxos/agent/functions.ts +6 -12
- package/src/proto/gen/dxos/bot.ts +12 -24
- package/src/proto/gen/dxos/client/services.ts +121 -150
- package/src/proto/gen/dxos/config.ts +58 -102
- package/src/proto/gen/dxos/devtools/host.ts +78 -96
- package/src/proto/gen/dxos/devtools/swarm.ts +4 -8
- package/src/proto/gen/dxos/echo/blob.ts +1 -2
- package/src/proto/gen/dxos/echo/feed.ts +4 -8
- package/src/proto/gen/dxos/echo/filter.ts +2 -4
- package/src/proto/gen/dxos/echo/indexing.ts +2 -4
- package/src/proto/gen/dxos/echo/metadata.ts +12 -16
- package/src/proto/gen/dxos/echo/model/document.ts +11 -22
- package/src/proto/gen/dxos/echo/model/messenger.ts +1 -2
- package/src/proto/gen/dxos/echo/model/text.ts +2 -4
- package/src/proto/gen/dxos/echo/object.ts +6 -12
- package/src/proto/gen/dxos/echo/query.ts +4 -8
- package/src/proto/gen/dxos/echo/service.ts +36 -35
- package/src/proto/gen/dxos/echo/snapshot.ts +2 -4
- package/src/proto/gen/dxos/echo/timeframe.ts +2 -4
- package/src/proto/gen/dxos/edge/calls.ts +5 -10
- package/src/proto/gen/dxos/edge/messenger.ts +6 -12
- package/src/proto/gen/dxos/edge/signal.ts +7 -14
- package/src/proto/gen/dxos/error.ts +1 -2
- package/src/proto/gen/dxos/gravity.ts +10 -20
- package/src/proto/gen/dxos/halo/credentials/auth.ts +1 -2
- package/src/proto/gen/dxos/halo/credentials/greet.ts +6 -12
- package/src/proto/gen/dxos/halo/credentials/identity.ts +2 -4
- package/src/proto/gen/dxos/halo/credentials.ts +34 -44
- package/src/proto/gen/dxos/halo/invitations.ts +16 -28
- package/src/proto/gen/dxos/halo/keyring.ts +1 -2
- package/src/proto/gen/dxos/halo/keys.ts +2 -4
- package/src/proto/gen/dxos/halo/signed.ts +4 -8
- package/src/proto/gen/dxos/iframe.ts +4 -8
- package/src/proto/gen/dxos/keys.ts +2 -4
- package/src/proto/gen/dxos/mesh/bridge.ts +12 -24
- package/src/proto/gen/dxos/mesh/broadcast.ts +1 -2
- package/src/proto/gen/dxos/mesh/messaging.ts +2 -4
- package/src/proto/gen/dxos/mesh/muxer.ts +5 -10
- package/src/proto/gen/dxos/mesh/presence.ts +1 -2
- package/src/proto/gen/dxos/mesh/protocol.ts +3 -6
- package/src/proto/gen/dxos/mesh/replicator.ts +2 -4
- package/src/proto/gen/dxos/mesh/signal.ts +9 -18
- package/src/proto/gen/dxos/mesh/swarm.ts +6 -12
- package/src/proto/gen/dxos/mesh/teleport/auth.ts +2 -4
- package/src/proto/gen/dxos/mesh/teleport/automerge.ts +2 -4
- package/src/proto/gen/dxos/mesh/teleport/blobsync.ts +3 -6
- package/src/proto/gen/dxos/mesh/teleport/control.ts +3 -6
- package/src/proto/gen/dxos/mesh/teleport/gossip.ts +1 -2
- package/src/proto/gen/dxos/mesh/teleport/notarization.ts +1 -2
- package/src/proto/gen/dxos/mesh/teleport/replicator.ts +5 -10
- package/src/proto/gen/dxos/mesh/teleport.ts +2 -4
- package/src/proto/gen/dxos/registry.ts +3 -6
- package/src/proto/gen/dxos/rpc.ts +7 -14
- package/src/proto/gen/dxos/service/agentmanager.ts +4 -8
- package/src/proto/gen/dxos/service/publisher.ts +5 -10
- package/src/proto/gen/dxos/service/supervisor.ts +12 -24
- package/src/proto/gen/dxos/service/tunnel.ts +3 -6
- package/src/proto/gen/dxos/tracing.ts +10 -20
- package/src/proto/gen/dxos/type.ts +12 -24
- package/src/proto/gen/dxos/value.ts +2 -4
- package/src/proto/gen/example/testing/data.ts +4 -8
- package/src/proto/gen/example/testing/rpc.ts +7 -14
- package/src/proto/gen/google/protobuf.ts +27 -27
- package/src/proto/gen/index.ts +8 -1
- package/dist/src/tracing.d.ts +0 -40
- package/dist/src/tracing.d.ts.map +0 -1
- package/dist/src/tracing.js +0 -50
- package/dist/src/tracing.js.map +0 -1
- package/src/tracing.ts +0 -86
package/src/edge/edge.ts
CHANGED
|
@@ -13,10 +13,16 @@ import { SpaceId } from '@dxos/keys';
|
|
|
13
13
|
*/
|
|
14
14
|
export const EDGE_CLIENT_TAG_HEADER = 'X-DXOS-Client-Tag';
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* HTTP header sent on every Edge request to provide a BYOK (Bring Your Own Key) for AI services.
|
|
18
|
+
*/
|
|
19
|
+
export const BYOK_HEADER = 'X-BYOK';
|
|
20
|
+
|
|
16
21
|
// TODO(burdon): Rename EdgerRouterEndpoint.
|
|
17
22
|
// If we would rename it, we need to be careful to not break composer production.
|
|
18
23
|
export enum EdgeService {
|
|
19
24
|
AUTOMERGE_REPLICATOR = 'automerge-replicator',
|
|
25
|
+
SUBDUCTION_REPLICATOR = 'subduction-replicator',
|
|
20
26
|
/**
|
|
21
27
|
* Control feed replicator (hypercore append only logs) for the space.
|
|
22
28
|
*/
|
|
@@ -216,6 +222,12 @@ export type RecoverIdentityRequest = {
|
|
|
216
222
|
lookupKey?: string;
|
|
217
223
|
signature?: RecoverIdentitySignature;
|
|
218
224
|
token?: string;
|
|
225
|
+
/**
|
|
226
|
+
* One-time proof minted by kms-service after a successful OAuth recovery flow.
|
|
227
|
+
* When provided, db-service redeems the proof to obtain the bound identityKey directly
|
|
228
|
+
* and `lookupKey`/`signature` are not required.
|
|
229
|
+
*/
|
|
230
|
+
recoveryProof?: string;
|
|
219
231
|
};
|
|
220
232
|
|
|
221
233
|
export type RecoverIdentityResponseBody = {
|
|
@@ -314,10 +326,22 @@ export type EdgeAuthChallenge = {
|
|
|
314
326
|
};
|
|
315
327
|
|
|
316
328
|
export enum OAuthProvider {
|
|
317
|
-
|
|
329
|
+
ATLASSIAN = 'atlassian',
|
|
330
|
+
ATPROTO = 'atproto',
|
|
331
|
+
/** @deprecated Use ATPROTO instead. */
|
|
318
332
|
BLUESKY = 'bluesky',
|
|
333
|
+
DISCORD = 'discord',
|
|
334
|
+
GITHUB = 'github',
|
|
335
|
+
GOOGLE = 'google',
|
|
336
|
+
LINEAR = 'linear',
|
|
337
|
+
NOTION = 'notion',
|
|
338
|
+
SLACK = 'slack',
|
|
339
|
+
TRELLO = 'trello',
|
|
319
340
|
}
|
|
320
341
|
|
|
342
|
+
/** atproto OAuth scopes for the Atmosphere integration and account-recovery flows. */
|
|
343
|
+
export const ATPROTO_OAUTH_SCOPES = ['atproto', 'transition:generic', 'transition:email'] as const;
|
|
344
|
+
|
|
321
345
|
export const InitiateOAuthFlowRequestSchema = Schema.Struct({
|
|
322
346
|
provider: Schema.Enums(OAuthProvider),
|
|
323
347
|
spaceId: Schema.String.pipe(Schema.filter(SpaceId.isValid)), // TODO(burdon): Use SpaceId.
|
|
@@ -325,8 +349,17 @@ export const InitiateOAuthFlowRequestSchema = Schema.Struct({
|
|
|
325
349
|
scopes: Schema.mutable(Schema.Array(Schema.String)),
|
|
326
350
|
// Set to true if we don't want periodic token refreshes in background, for cases like account connect
|
|
327
351
|
noRefresh: Schema.optional(Schema.Boolean),
|
|
328
|
-
// Provider-specific (user handle or did for
|
|
352
|
+
// Provider-specific (user handle or did for atproto) hint for auth server resolution
|
|
329
353
|
loginHint: Schema.optional(Schema.String),
|
|
354
|
+
// Return a 302 redirect to composer://oauth/callback instead of HTML.
|
|
355
|
+
// Required for ASWebAuthenticationSession (iOS) which blocks JavaScript redirects.
|
|
356
|
+
nativeAppRedirect: Schema.optional(Schema.Boolean),
|
|
357
|
+
// OAuth-based account recovery: when purpose === 'register', kms-service writes a
|
|
358
|
+
// recovery binding for `identityKey` after the OAuth flow completes; when 'recovery',
|
|
359
|
+
// kms-service mints a one-time `recoveryProof` the client forwards to db-service.
|
|
360
|
+
registerRecovery: Schema.optional(Schema.Boolean),
|
|
361
|
+
identityKey: Schema.optional(Schema.String),
|
|
362
|
+
purpose: Schema.optional(Schema.Literal('register', 'recovery')),
|
|
330
363
|
});
|
|
331
364
|
export type InitiateOAuthFlowRequest = Schema.Schema.Type<typeof InitiateOAuthFlowRequestSchema>;
|
|
332
365
|
|
|
@@ -335,9 +368,29 @@ export type InitiateOAuthFlowResponse = {
|
|
|
335
368
|
};
|
|
336
369
|
|
|
337
370
|
export type OAuthFlowResult =
|
|
338
|
-
| { success: true; accessToken: string; accessTokenId: string }
|
|
371
|
+
| { success: true; accessToken: string; accessTokenId: string; recoveryProof?: string }
|
|
339
372
|
| { success: false; reason: string };
|
|
340
373
|
|
|
374
|
+
/**
|
|
375
|
+
* Completes OAuth recovery registration for an existing identity: routes the OAuth refresh token
|
|
376
|
+
* into the personal space and writes the recovery binding.
|
|
377
|
+
*/
|
|
378
|
+
export type CompleteOAuthRegistrationRequest = {
|
|
379
|
+
registrationToken: string;
|
|
380
|
+
identityKey: string;
|
|
381
|
+
spaceKey: string;
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
export type CompleteOAuthRegistrationResponse = {
|
|
385
|
+
email?: string;
|
|
386
|
+
provider: OAuthProvider;
|
|
387
|
+
accessTokenId: string;
|
|
388
|
+
accessToken: string;
|
|
389
|
+
expiresInSeconds: number;
|
|
390
|
+
scopes: string[];
|
|
391
|
+
identifier: string;
|
|
392
|
+
};
|
|
393
|
+
|
|
341
394
|
export enum EdgeWebsocketProtocol {
|
|
342
395
|
V0 = 'edge-ws-v0',
|
|
343
396
|
/**
|
|
@@ -543,7 +596,7 @@ export type InspectSpaceResponse = {
|
|
|
543
596
|
objectCount: number;
|
|
544
597
|
deletedObjectCount: number;
|
|
545
598
|
indexedDocumentCount: number;
|
|
546
|
-
objectsByType: {
|
|
599
|
+
objectsByType: { typeURI: string; count: number }[];
|
|
547
600
|
indexerStatus: {
|
|
548
601
|
indexingInProgress: boolean;
|
|
549
602
|
cursors: { indexName: string; sourceName: string; resourceId: string | null; cursor: string | number }[];
|
|
@@ -571,7 +624,7 @@ export type InspectIdentityResponse = {
|
|
|
571
624
|
spaces: InspectSpaceResponse[];
|
|
572
625
|
};
|
|
573
626
|
|
|
574
|
-
/** Matches the SerializedSpace format from @dxos/echo-
|
|
627
|
+
/** Matches the SerializedSpace format from @dxos/echo-client, extended with spaceId. */
|
|
575
628
|
export type SpaceExportPayload = {
|
|
576
629
|
version: number;
|
|
577
630
|
timestamp: string;
|
|
@@ -602,3 +655,226 @@ export type DeleteSpaceResponse = { status: string; spaceId: string };
|
|
|
602
655
|
|
|
603
656
|
export type DeleteIdentityRequest = { identityKey: string };
|
|
604
657
|
export type DeleteIdentityResponse = { status: string; identityKey: string };
|
|
658
|
+
|
|
659
|
+
//
|
|
660
|
+
// Account / Invitation
|
|
661
|
+
//
|
|
662
|
+
|
|
663
|
+
export const INVITATION_CODE_LENGTH = 8;
|
|
664
|
+
export const DEFAULT_INVITATIONS_PER_ACCOUNT = 5;
|
|
665
|
+
|
|
666
|
+
/** Crockford base32 alphabet (no I, L, O, U). Case-insensitive on the wire. */
|
|
667
|
+
export const INVITATION_CODE_ALPHABET = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
|
|
668
|
+
|
|
669
|
+
export const InvitationCodeSchema = Schema.String.pipe(
|
|
670
|
+
Schema.pattern(new RegExp(`^[${INVITATION_CODE_ALPHABET}]{${INVITATION_CODE_LENGTH}}$`)),
|
|
671
|
+
);
|
|
672
|
+
|
|
673
|
+
export const CheckEmailExistsRequestSchema = Schema.Struct({
|
|
674
|
+
email: Schema.String,
|
|
675
|
+
});
|
|
676
|
+
export type CheckEmailExistsRequest = Schema.Schema.Type<typeof CheckEmailExistsRequestSchema>;
|
|
677
|
+
export type CheckEmailExistsResponse = { exists: boolean };
|
|
678
|
+
|
|
679
|
+
export const ValidateInvitationCodeRequestSchema = Schema.Struct({
|
|
680
|
+
code: InvitationCodeSchema,
|
|
681
|
+
});
|
|
682
|
+
export type ValidateInvitationCodeRequest = Schema.Schema.Type<typeof ValidateInvitationCodeRequestSchema>;
|
|
683
|
+
export type ValidateInvitationCodeResponse = { valid: boolean };
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Body of `POST /account/login`. Existing-account email recovery only --
|
|
687
|
+
* unlike `/account/signup`, this never creates new identities or waitlist rows.
|
|
688
|
+
*/
|
|
689
|
+
export const LoginRequestSchema = Schema.Struct({
|
|
690
|
+
email: Schema.String,
|
|
691
|
+
identityDid: Schema.optional(Schema.String),
|
|
692
|
+
identityKey: Schema.optional(Schema.String),
|
|
693
|
+
});
|
|
694
|
+
export type LoginRequest = Schema.Schema.Type<typeof LoginRequestSchema>;
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Response from `POST /account/login`. The shape is identical regardless of
|
|
698
|
+
* whether the email is registered, so the endpoint is safe against enumeration.
|
|
699
|
+
* Regular emails are delivered out-of-band and the response is `{}`.
|
|
700
|
+
*/
|
|
701
|
+
export const LoginResponseSchema = Schema.Struct({
|
|
702
|
+
token: Schema.optional(Schema.String),
|
|
703
|
+
needsIdentity: Schema.optional(Schema.Boolean),
|
|
704
|
+
admitted: Schema.optional(Schema.Boolean),
|
|
705
|
+
});
|
|
706
|
+
export type LoginResponse = Schema.Schema.Type<typeof LoginResponseSchema>;
|
|
707
|
+
|
|
708
|
+
// Two-step signup: invitation code + identity DID + email.
|
|
709
|
+
export const RedeemInvitationCodeRequestSchema = Schema.Struct({
|
|
710
|
+
code: Schema.optional(InvitationCodeSchema),
|
|
711
|
+
identityDid: Schema.optional(Schema.String),
|
|
712
|
+
/** Raw hex public key, stored alongside the DID for the magic-link recovery flow. */
|
|
713
|
+
identityKey: Schema.optional(Schema.String),
|
|
714
|
+
email: Schema.String,
|
|
715
|
+
});
|
|
716
|
+
export type RedeemInvitationCodeRequest = Schema.Schema.Type<typeof RedeemInvitationCodeRequestSchema>;
|
|
717
|
+
export type RedeemInvitationCodeResponse =
|
|
718
|
+
| { accountId: string; emailVerificationSent: boolean }
|
|
719
|
+
| { needsIdentity: true };
|
|
720
|
+
|
|
721
|
+
export const GetAccountResponseSchema = Schema.Struct({
|
|
722
|
+
identityDid: Schema.String,
|
|
723
|
+
email: Schema.String,
|
|
724
|
+
emailVerified: Schema.Boolean,
|
|
725
|
+
/** ISO timestamp. */
|
|
726
|
+
createdAt: Schema.String,
|
|
727
|
+
invitationsRemaining: Schema.Number,
|
|
728
|
+
});
|
|
729
|
+
export type GetAccountResponse = Schema.Schema.Type<typeof GetAccountResponseSchema>;
|
|
730
|
+
|
|
731
|
+
export const AccountInvitationSchema = Schema.Struct({
|
|
732
|
+
code: Schema.String,
|
|
733
|
+
/** ISO timestamp. */
|
|
734
|
+
createdAt: Schema.String,
|
|
735
|
+
redeemedByIdentityDid: Schema.optional(Schema.String),
|
|
736
|
+
/** ISO timestamp. */
|
|
737
|
+
redeemedAt: Schema.optional(Schema.String),
|
|
738
|
+
});
|
|
739
|
+
export type AccountInvitation = Schema.Schema.Type<typeof AccountInvitationSchema>;
|
|
740
|
+
|
|
741
|
+
export const ListAccountInvitationsResponseSchema = Schema.Struct({
|
|
742
|
+
invitations: Schema.Array(AccountInvitationSchema),
|
|
743
|
+
});
|
|
744
|
+
export type ListAccountInvitationsResponse = Schema.Schema.Type<typeof ListAccountInvitationsResponseSchema>;
|
|
745
|
+
|
|
746
|
+
export type IssueInvitationResponse = { code: string };
|
|
747
|
+
|
|
748
|
+
export type ResendVerificationEmailResponse = {
|
|
749
|
+
sent: boolean;
|
|
750
|
+
cooldownSecondsRemaining?: number;
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Submitted by users without an Account who want to request access. Captured
|
|
755
|
+
* by Hub for admin follow-up (e.g. mailing list, Discord notification).
|
|
756
|
+
*/
|
|
757
|
+
export const RequestAccessRequestSchema = Schema.Struct({
|
|
758
|
+
email: Schema.String,
|
|
759
|
+
/** Optional: identity DID the user is currently signed in as. */
|
|
760
|
+
identityDid: Schema.optional(Schema.String),
|
|
761
|
+
/** Optional free-form message from the requester. */
|
|
762
|
+
message: Schema.optional(Schema.String),
|
|
763
|
+
});
|
|
764
|
+
export type RequestAccessRequest = Schema.Schema.Type<typeof RequestAccessRequestSchema>;
|
|
765
|
+
export type RequestAccessResponse = { received: boolean };
|
|
766
|
+
|
|
767
|
+
//
|
|
768
|
+
// Metering (VP auth)
|
|
769
|
+
//
|
|
770
|
+
|
|
771
|
+
/** Structured usage key aligned with {@link MeteringLimitSchema} (without cap/window fields). */
|
|
772
|
+
export const MeteringUsageKeySchema = Schema.Struct({
|
|
773
|
+
/** Event type (e.g. `ai`). */
|
|
774
|
+
eventType: Schema.String,
|
|
775
|
+
/** Value key being metered (e.g. `outputTokens`). */
|
|
776
|
+
valueKey: Schema.String,
|
|
777
|
+
/**
|
|
778
|
+
* Positional match against the event's subtype segments (e.g. model); `*` matches any
|
|
779
|
+
* segment, and positions beyond the pattern are unconstrained.
|
|
780
|
+
*/
|
|
781
|
+
subtypePattern: Schema.Array(Schema.String),
|
|
782
|
+
});
|
|
783
|
+
export type MeteringUsageKey = Schema.Schema.Type<typeof MeteringUsageKeySchema>;
|
|
784
|
+
|
|
785
|
+
/** Rolling-window usage total for a structured key. */
|
|
786
|
+
export const MeteringUsageItemSchema = Schema.Struct({
|
|
787
|
+
...MeteringUsageKeySchema.fields,
|
|
788
|
+
amount: Schema.Number,
|
|
789
|
+
});
|
|
790
|
+
export type MeteringUsageItem = Schema.Schema.Type<typeof MeteringUsageItemSchema>;
|
|
791
|
+
|
|
792
|
+
/** A single raw usage bucket (1h resolution) for a structured key. */
|
|
793
|
+
export const MeteringUsageBucketSchema = Schema.Struct({
|
|
794
|
+
...MeteringUsageKeySchema.fields,
|
|
795
|
+
/** Bucket start timestamp (epoch ms, floored to the hour). */
|
|
796
|
+
bucketStart: Schema.Number,
|
|
797
|
+
amount: Schema.Number,
|
|
798
|
+
});
|
|
799
|
+
export type MeteringUsageBucket = Schema.Schema.Type<typeof MeteringUsageBucketSchema>;
|
|
800
|
+
|
|
801
|
+
export const MeteringLimitSchema = Schema.Struct({
|
|
802
|
+
/** Event type the limit applies to (e.g. `ai`). */
|
|
803
|
+
eventType: Schema.String,
|
|
804
|
+
/** Value key being limited (e.g. `outputTokens`). */
|
|
805
|
+
valueKey: Schema.String,
|
|
806
|
+
/**
|
|
807
|
+
* Positional match against the event's subtype segments (e.g. model); `*` matches any
|
|
808
|
+
* segment, and positions beyond the pattern are unconstrained.
|
|
809
|
+
*/
|
|
810
|
+
subtypePattern: Schema.Array(Schema.String),
|
|
811
|
+
/** Rolling-window cap; `null` means unlimited. */
|
|
812
|
+
limit: Schema.NullOr(Schema.Number),
|
|
813
|
+
/** Window duration in seconds. */
|
|
814
|
+
windowDuration: Schema.Number,
|
|
815
|
+
});
|
|
816
|
+
export type MeteringLimit = Schema.Schema.Type<typeof MeteringLimitSchema>;
|
|
817
|
+
|
|
818
|
+
export const GetProfileUsageResponseSchema = Schema.Struct({
|
|
819
|
+
profileId: Schema.String,
|
|
820
|
+
usage: Schema.Array(MeteringUsageItemSchema),
|
|
821
|
+
limits: Schema.Array(MeteringLimitSchema),
|
|
822
|
+
buckets: Schema.Array(MeteringUsageBucketSchema),
|
|
823
|
+
});
|
|
824
|
+
export type GetProfileUsageResponse = Schema.Schema.Type<typeof GetProfileUsageResponseSchema>;
|
|
825
|
+
|
|
826
|
+
//
|
|
827
|
+
// Admin (X-API-KEY)
|
|
828
|
+
//
|
|
829
|
+
|
|
830
|
+
export type AdminListAccountsResponse = {
|
|
831
|
+
accounts: GetAccountResponse[];
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
export const AdminGrantInvitationsRequestSchema = Schema.Struct({
|
|
835
|
+
identityDid: Schema.String,
|
|
836
|
+
count: Schema.Number,
|
|
837
|
+
});
|
|
838
|
+
export type AdminGrantInvitationsRequest = Schema.Schema.Type<typeof AdminGrantInvitationsRequestSchema>;
|
|
839
|
+
|
|
840
|
+
export const AdminCreateInvitationCodesRequestSchema = Schema.Struct({
|
|
841
|
+
count: Schema.Number,
|
|
842
|
+
note: Schema.optional(Schema.String),
|
|
843
|
+
});
|
|
844
|
+
export type AdminCreateInvitationCodesRequest = Schema.Schema.Type<typeof AdminCreateInvitationCodesRequestSchema>;
|
|
845
|
+
export type AdminCreateInvitationCodesResponse = { codes: string[] };
|
|
846
|
+
|
|
847
|
+
export type AdminListInvitationCodesResponse = {
|
|
848
|
+
codes: Array<{
|
|
849
|
+
code: string;
|
|
850
|
+
/** ISO timestamp. */
|
|
851
|
+
createdAt: string;
|
|
852
|
+
note?: string;
|
|
853
|
+
issuedByIdentityDid?: string;
|
|
854
|
+
redeemedByIdentityDid?: string;
|
|
855
|
+
/** ISO timestamp. */
|
|
856
|
+
redeemedAt?: string;
|
|
857
|
+
/** ISO timestamp. Set when revoked. */
|
|
858
|
+
revokedAt?: string;
|
|
859
|
+
}>;
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
export const AdminRevokeInvitationCodeRequestSchema = Schema.Struct({
|
|
863
|
+
code: InvitationCodeSchema,
|
|
864
|
+
});
|
|
865
|
+
export type AdminRevokeInvitationCodeRequest = Schema.Schema.Type<typeof AdminRevokeInvitationCodeRequestSchema>;
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Account/invitation-related variants placed in `EdgeFailure.data.type`.
|
|
869
|
+
* EdgeErrorData is open-ended; these are documentation for known values.
|
|
870
|
+
*/
|
|
871
|
+
export type AccountErrorType =
|
|
872
|
+
| 'invitation_code_invalid'
|
|
873
|
+
| 'invitation_code_already_redeemed'
|
|
874
|
+
| 'invitation_code_revoked'
|
|
875
|
+
| 'email_already_registered'
|
|
876
|
+
| 'identity_already_associated'
|
|
877
|
+
| 'no_invitations_remaining'
|
|
878
|
+
| 'identity_not_associated_with_account'
|
|
879
|
+
| 'no_account'
|
|
880
|
+
| 'rate_limited';
|
package/src/edge/registry.ts
CHANGED
|
@@ -4,93 +4,202 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
+
import * as Config2 from '../Config2.ts';
|
|
8
|
+
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* package free of UI/runtime dependencies. Consumers can treat decoded values as
|
|
12
|
-
* `Plugin.Meta` directly.
|
|
10
|
+
* A snapshot of a plugin's declared dependencies resolved to concrete installed versions at build
|
|
11
|
+
* time (`{ "@dxos/app-framework": "0.8.3", "react": "19.2.0", … }`). The host derives SDK
|
|
12
|
+
* compatibility from the subset it shares with the plugin (the externalized `@dxos/*` packages).
|
|
13
13
|
*/
|
|
14
|
-
export const
|
|
15
|
-
|
|
16
|
-
name: Schema.String.pipe(Schema.nonEmptyString()),
|
|
17
|
-
description: Schema.optional(Schema.String),
|
|
18
|
-
homePage: Schema.optional(Schema.String),
|
|
19
|
-
source: Schema.optional(Schema.String),
|
|
20
|
-
screenshots: Schema.optional(Schema.Array(Schema.String)),
|
|
21
|
-
tags: Schema.optional(Schema.Array(Schema.String)),
|
|
22
|
-
icon: Schema.optional(Schema.String),
|
|
23
|
-
iconHue: Schema.optional(Schema.String),
|
|
24
|
-
});
|
|
25
|
-
export type PluginMeta = Schema.Schema.Type<typeof PluginMetaSchema>;
|
|
14
|
+
export const DependencyMapSchema = Schema.Record({ key: Schema.String, value: Schema.String });
|
|
15
|
+
export type DependencyMap = Schema.Schema.Type<typeof DependencyMapSchema>;
|
|
26
16
|
|
|
27
17
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
18
|
+
* Filename of the entry module every plugin must publish at the root of its bundle.
|
|
19
|
+
* The host dynamic-imports `<manifest URL base>/index.mjs` directly — no per-plugin
|
|
20
|
+
* configuration. `composerPlugin` outputs the bundle under this name so plugin authors
|
|
21
|
+
* never have to think about it.
|
|
30
22
|
*/
|
|
31
|
-
export const
|
|
32
|
-
export type PluginHealth = Schema.Schema.Type<typeof PluginHealthSchema>;
|
|
23
|
+
export const PLUGIN_ENTRY_FILENAME = 'index.mjs';
|
|
33
24
|
|
|
34
25
|
/**
|
|
35
26
|
* Shape of the manifest-asset JSON the registry service fetches from each plugin's latest release.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
27
|
+
*
|
|
28
|
+
* Emitted by `@dxos/app-framework/vite-plugin`'s `composerPlugin` (see
|
|
29
|
+
* `MANIFEST_ASSET_NAME`). Lists every file the plugin needs at runtime — the entry
|
|
30
|
+
* module ({@link PLUGIN_ENTRY_FILENAME}) plus any sibling CSS, code-split chunks,
|
|
31
|
+
* fonts, etc. — so the host can eagerly precache the whole bundle for offline use.
|
|
32
|
+
* Paths in `assets` are relative to the manifest's URL.
|
|
38
33
|
*/
|
|
39
34
|
export const PluginManifestSchema = Schema.Struct({
|
|
40
|
-
...
|
|
41
|
-
|
|
35
|
+
...Config2.Plugin.fields,
|
|
36
|
+
/** Plugin version (semver). Sourced from the publishing project's `package.json`. */
|
|
37
|
+
version: Schema.String.pipe(Schema.nonEmptyString()),
|
|
38
|
+
/**
|
|
39
|
+
* Relative paths of every file the plugin needs at runtime, including the entry.
|
|
40
|
+
* Must include {@link PLUGIN_ENTRY_FILENAME}; consumers verify on parse.
|
|
41
|
+
*/
|
|
42
|
+
assets: Schema.Array(Schema.String).pipe(Schema.minItems(1)),
|
|
43
|
+
/** Declared dependencies resolved to installed versions at build time (SDK-compat source). */
|
|
44
|
+
dependencies: Schema.optional(DependencyMapSchema),
|
|
42
45
|
});
|
|
43
46
|
export type PluginManifest = Schema.Schema.Type<typeof PluginManifestSchema>;
|
|
44
47
|
|
|
48
|
+
// ─── ATProto-native registry view ────────────────────────────────────────────
|
|
49
|
+
|
|
45
50
|
/**
|
|
46
|
-
*
|
|
51
|
+
* A single installable release of a plugin, projected from a `package.release`
|
|
52
|
+
* ATProto record.
|
|
47
53
|
*/
|
|
48
|
-
export const
|
|
49
|
-
/**
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
|
|
54
|
+
export const PluginReleaseSchema = Schema.Struct({
|
|
55
|
+
/** Semver version string, e.g. `0.8.3`. */
|
|
56
|
+
version: Schema.String.pipe(Schema.nonEmptyString()),
|
|
57
|
+
/** URL the host dynamic-imports to install this specific version. */
|
|
58
|
+
moduleUrl: Schema.String.pipe(Schema.nonEmptyString()),
|
|
53
59
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* proxied by the service itself); clients pass this value directly to the URL loader.
|
|
60
|
+
* Dependencies this release was built against, resolved to installed versions. The host derives
|
|
61
|
+
* SDK compatibility from the `@dxos/*` subset to decide whether to offer this release.
|
|
57
62
|
*/
|
|
58
|
-
|
|
59
|
-
/** Release tag the entry was resolved from (e.g. `v0.1.0`). */
|
|
60
|
-
releaseTag: Schema.String,
|
|
61
|
-
/** Health signal set by the service when an entry fails to refresh. */
|
|
62
|
-
health: PluginHealthSchema,
|
|
63
|
-
/** Unix ms when this entry was last successfully hydrated. */
|
|
64
|
-
hydratedAt: Schema.Number,
|
|
63
|
+
dependencies: Schema.optional(DependencyMapSchema),
|
|
65
64
|
});
|
|
66
|
-
export type
|
|
65
|
+
export type PluginRelease = Schema.Schema.Type<typeof PluginReleaseSchema>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Verbatim content of a `package.profile` ATProto record. `key` is the record's rkey (a reverse-domain
|
|
69
|
+
* NSID), denormalized into the body. Version-independent identity + display metadata; provenance
|
|
70
|
+
* (`author`) is resolved separately from the publisher DID/handle.
|
|
71
|
+
*/
|
|
72
|
+
export const PluginProfileSchema = Schema.Struct({
|
|
73
|
+
/** Reverse-domain NSID — the plugin's globally-unique key and the `package.profile` rkey (e.g. `org.dxos.plugin.excalidraw`). */
|
|
74
|
+
key: Schema.String.pipe(Schema.nonEmptyString()),
|
|
75
|
+
/** Plugin display name. */
|
|
76
|
+
name: Schema.String.pipe(Schema.nonEmptyString()),
|
|
77
|
+
/** Short description of plugin functionality. */
|
|
78
|
+
description: Schema.optional(Schema.String),
|
|
79
|
+
/** Publisher's homepage or plugin documentation URL. */
|
|
80
|
+
homePage: Schema.optional(Schema.String),
|
|
81
|
+
/** Source repository URL. */
|
|
82
|
+
source: Schema.optional(Schema.String),
|
|
83
|
+
/** Tags to help categorize the plugin. */
|
|
84
|
+
tags: Schema.optional(Schema.Array(Schema.String)),
|
|
85
|
+
/** Preview images — theme-keyed screenshot URLs shown on the plugin's card. */
|
|
86
|
+
screenshots: Schema.optional(Schema.Array(Config2.Screenshot)),
|
|
87
|
+
/** Icon identifier resolvable by `@ch-ui/icons` (e.g. `ph--sparkle--regular`), with an optional palette hue. */
|
|
88
|
+
icon: Schema.optional(Config2.Icon),
|
|
89
|
+
/** Composer plugin ids this plugin depends on at runtime (NSIDs). Author-declared, version-independent. */
|
|
90
|
+
dependsOn: Schema.optional(Schema.Array(Schema.String)),
|
|
91
|
+
/** Relative path inside the package to a bundled MDL spec (consumed by plugin-code). */
|
|
92
|
+
spec: Schema.optional(Schema.String),
|
|
93
|
+
});
|
|
94
|
+
export type PluginProfile = Schema.Schema.Type<typeof PluginProfileSchema>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* A single hydrated plugin entry returned by `GET /registry/plugins`.
|
|
98
|
+
*
|
|
99
|
+
* This is an indexer-assembled *view* — analogous to emdash's `PackageView` — projected
|
|
100
|
+
* from four ATProto record types: `package.profile`, `package.release`,
|
|
101
|
+
* `publisher.profile`, and `publisher.verification`. It is NOT a direct serialization
|
|
102
|
+
* of any single ATProto record.
|
|
103
|
+
*
|
|
104
|
+
* Design notes:
|
|
105
|
+
* - `profile.key` is required to be a valid NSID (e.g. `org.dxos.plugin.excalidraw`), making it
|
|
106
|
+
* the single identifier for both PDS addressing and the composer runtime plugin id.
|
|
107
|
+
* `DXN.make(profile.key, latestVersion)` reconstructs the canonical plugin DXN.
|
|
108
|
+
* - `releases` inlines all known versions, eliminating a separate versions round-trip for
|
|
109
|
+
* the version picker. Ordered newest-first.
|
|
110
|
+
* - `latestVersion` is a convenience pointer into `releases` indicating the recommended
|
|
111
|
+
* install target.
|
|
112
|
+
*/
|
|
113
|
+
export const PluginViewSchema = Schema.Struct({
|
|
114
|
+
// ── Addressing / provenance (indexer-derived) ────────────────────────────
|
|
115
|
+
/**
|
|
116
|
+
* `at://` URI of the source `package.profile` record.
|
|
117
|
+
* Globally unique and stable — never changes after the record is published.
|
|
118
|
+
*/
|
|
119
|
+
uri: Schema.String.pipe(Schema.nonEmptyString()),
|
|
120
|
+
/** Publisher DID, e.g. `did:plc:abc…`. Cryptographic identity; never changes. */
|
|
121
|
+
did: Schema.String.pipe(Schema.nonEmptyString()),
|
|
122
|
+
/**
|
|
123
|
+
* Publisher AT Protocol handle at index time, e.g. `alice.bsky.social`.
|
|
124
|
+
* Display-only — handles can be reassigned; never use as a stable key.
|
|
125
|
+
*/
|
|
126
|
+
handle: Schema.optional(Schema.String),
|
|
127
|
+
/** Unix ms when the indexer last assembled this entry. */
|
|
128
|
+
indexedAt: Schema.Number,
|
|
129
|
+
/**
|
|
130
|
+
* Trust labels derived from curator `publisher.verification` records.
|
|
131
|
+
* An empty array means the entry has no verification signal.
|
|
132
|
+
*/
|
|
133
|
+
labels: Schema.Array(Schema.String),
|
|
134
|
+
|
|
135
|
+
// ── Verbatim profile record content ─────────────────────────────────────
|
|
136
|
+
profile: PluginProfileSchema,
|
|
137
|
+
|
|
138
|
+
// ── Releases (projected from package.release records) ───────────────────
|
|
139
|
+
/**
|
|
140
|
+
* All known releases for this package, ordered newest-first.
|
|
141
|
+
* Powers the version picker directly — no separate endpoint needed.
|
|
142
|
+
*/
|
|
143
|
+
releases: Schema.Array(PluginReleaseSchema),
|
|
144
|
+
/**
|
|
145
|
+
* The latest (recommended) release version. Always references an entry in `releases`.
|
|
146
|
+
* Used by the host to determine whether an update is available.
|
|
147
|
+
*/
|
|
148
|
+
latestVersion: Schema.String.pipe(Schema.nonEmptyString()),
|
|
149
|
+
});
|
|
150
|
+
export type PluginView = Schema.Schema.Type<typeof PluginViewSchema>;
|
|
67
151
|
|
|
68
152
|
/**
|
|
69
153
|
* Response body of `GET /registry/plugins`.
|
|
70
154
|
*/
|
|
71
155
|
export const GetPluginsResponseBodySchema = Schema.Struct({
|
|
72
|
-
/** Wire-format schema version, pinned to
|
|
73
|
-
version: Schema.Literal(
|
|
74
|
-
/** Hydrated entries.
|
|
75
|
-
plugins: Schema.Array(
|
|
76
|
-
/** Unix ms timestamp of the most recent successful
|
|
156
|
+
/** Wire-format schema version, pinned to 2. */
|
|
157
|
+
version: Schema.Literal(2),
|
|
158
|
+
/** Hydrated entries. */
|
|
159
|
+
plugins: Schema.Array(PluginViewSchema),
|
|
160
|
+
/** Unix ms timestamp of the most recent successful index cycle. */
|
|
77
161
|
refreshedAt: Schema.Number,
|
|
78
162
|
});
|
|
79
163
|
export type GetPluginsResponseBody = Schema.Schema.Type<typeof GetPluginsResponseBodySchema>;
|
|
80
164
|
|
|
165
|
+
// ─── Publisher records ────────────────────────────────────────────────────────
|
|
166
|
+
|
|
167
|
+
/** Content of a `publisher.profile` ATProto record. Display metadata for a publisher DID. */
|
|
168
|
+
export const PublisherProfileSchema = Schema.Struct({
|
|
169
|
+
displayName: Schema.String.pipe(Schema.nonEmptyString()),
|
|
170
|
+
bio: Schema.optional(Schema.String),
|
|
171
|
+
homepageUrl: Schema.optional(Schema.String),
|
|
172
|
+
contact: Schema.optional(Schema.String),
|
|
173
|
+
});
|
|
174
|
+
export type PublisherProfile = Schema.Schema.Type<typeof PublisherProfileSchema>;
|
|
175
|
+
|
|
81
176
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
177
|
+
* Content of a `publisher.verification` record written by the curator DID.
|
|
178
|
+
* Links a publisher DID to a trusted AT Protocol handle.
|
|
84
179
|
*/
|
|
85
|
-
export const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
export
|
|
180
|
+
export const PublisherVerificationSchema = Schema.Struct({
|
|
181
|
+
subject: Schema.String.pipe(Schema.nonEmptyString()),
|
|
182
|
+
handle: Schema.String.pipe(Schema.nonEmptyString()),
|
|
183
|
+
displayName: Schema.String.pipe(Schema.nonEmptyString()),
|
|
184
|
+
createdAt: Schema.String.pipe(Schema.nonEmptyString()),
|
|
185
|
+
});
|
|
186
|
+
export type PublisherVerification = Schema.Schema.Type<typeof PublisherVerificationSchema>;
|
|
187
|
+
|
|
188
|
+
// ─── NSID constants ───────────────────────────────────────────────────────────
|
|
189
|
+
|
|
190
|
+
/** NSID constants for the four `org.dxos.experimental.*` record collections. */
|
|
191
|
+
export const NSID = {
|
|
192
|
+
PackageProfile: 'org.dxos.experimental.package.profile',
|
|
193
|
+
PackageRelease: 'org.dxos.experimental.package.release',
|
|
194
|
+
PublisherProfile: 'org.dxos.experimental.publisher.profile',
|
|
195
|
+
PublisherVerification: 'org.dxos.experimental.publisher.verification',
|
|
196
|
+
} as const;
|
|
197
|
+
|
|
198
|
+
export type RegistryNsid = (typeof NSID)[keyof typeof NSID];
|
|
199
|
+
|
|
200
|
+
export const ALL_NSIDS: readonly RegistryNsid[] = [
|
|
201
|
+
NSID.PackageProfile,
|
|
202
|
+
NSID.PackageRelease,
|
|
203
|
+
NSID.PublisherProfile,
|
|
204
|
+
NSID.PublisherVerification,
|
|
205
|
+
];
|
package/src/index.ts
CHANGED
|
@@ -10,7 +10,8 @@ export * from './messenger.ts';
|
|
|
10
10
|
export * from './profile-archive.ts';
|
|
11
11
|
export * from './space-archive.ts';
|
|
12
12
|
export * from './storage.ts';
|
|
13
|
-
export * from './tracing.ts';
|
|
14
13
|
export type * from './types.ts';
|
|
14
|
+
export * as Config2 from './Config2.ts';
|
|
15
15
|
export * as FunctionProtocol from './FunctionProtocol.ts';
|
|
16
16
|
export * as FeedProtocol from './FeedProtocol.ts';
|
|
17
|
+
export * as TraceProtocol from './TraceProtocol.ts';
|
package/src/invitation.ts
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { SchemaEx } from '@dxos/effect';
|
|
8
8
|
|
|
9
9
|
// TODO(burdon): Use uniformly for processing HTTP params.
|
|
10
10
|
export const InvitationUrl = Schema.Struct({
|
|
11
11
|
accessToken: Schema.String, // TODO(burdon): Remove.
|
|
12
|
-
deviceInvitationCode: Schema.String.pipe(ParamKeyAnnotation({ key: 'deviceInvitationCode' })),
|
|
13
|
-
spaceInvitationCode: Schema.String.pipe(ParamKeyAnnotation({ key: 'spaceInvitationCode' })),
|
|
12
|
+
deviceInvitationCode: Schema.String.pipe(SchemaEx.ParamKeyAnnotation({ key: 'deviceInvitationCode' })),
|
|
13
|
+
spaceInvitationCode: Schema.String.pipe(SchemaEx.ParamKeyAnnotation({ key: 'spaceInvitationCode' })),
|
|
14
14
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# `org.dxos.experimental.*` lexicons
|
|
2
|
+
|
|
3
|
+
Experimental AT Protocol lexicons for the DXOS plugin registry. The `experimental` segment is intentional — these schemas are unstable and will be renamed to a final namespace before promotion.
|
|
4
|
+
|
|
5
|
+
## Records
|
|
6
|
+
|
|
7
|
+
| NSID | rkey | Purpose |
|
|
8
|
+
| ---------------------------------------------- | ------------------ | ----------------------------------------------------- |
|
|
9
|
+
| `org.dxos.experimental.package.profile` | `<key>` | Mutable package metadata (one per key per DID). |
|
|
10
|
+
| `org.dxos.experimental.package.release` | `<key>:<version>` | Versioned artifact record (conceptually single-write).|
|
|
11
|
+
| `org.dxos.experimental.publisher.profile` | `self` | Identity-level publisher metadata. |
|
|
12
|
+
| `org.dxos.experimental.publisher.verification` | `<verified DID>` | Trust attestation about a publisher. |
|
|
13
|
+
|
|
14
|
+
## Trust model
|
|
15
|
+
|
|
16
|
+
`publisher.verification` records are public and unrestricted — anyone may author one. Trust is an indexing policy, not a write gate. Today the indexer honors verification records **only** from a single configured verifier DID (`REGISTRY_CURATOR_DID`) and indexes a publisher's records only if that verifier has vouched for the author DID. Revocation is achieved by deleting the verification record — the indexer unindexes that publisher on the next backfill sweep. This single-verifier gate is intended to generalize to multiple verifiers / moderation labels (à la Bluesky labelers) once that surface exists.
|
|
17
|
+
|
|
18
|
+
See `packages/sdk/app-framework/docs/registry-spec.md` for the full design, including the integrity / tamper-detection model.
|
|
19
|
+
|
|
20
|
+
## Prior art
|
|
21
|
+
|
|
22
|
+
These lexicons are modeled on the emdash RFC:
|
|
23
|
+
|
|
24
|
+
- RFC: [emdash-cms/emdash#694](https://github.com/emdash-cms/emdash/pull/694) — design rationale, trust model trade-offs, rkey conventions, and the `experimental` namespace strategy.
|
|
25
|
+
- Implementation: [emdash-cms/emdash#923](https://github.com/emdash-cms/emdash/pull/923) — client, CLI, and lexicon bindings.
|
|
26
|
+
|
|
27
|
+
Differences from emdash's `com.emdashcms.experimental.*`:
|
|
28
|
+
|
|
29
|
+
- `releaseExtension` / `declaredAccess` records (sandbox manifest, granular permissions) are **not** included in v0; they will be added in a follow-on once the runtime sandbox surface is defined.
|