@dxos/protocols 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/src/codec.test.d.ts +2 -0
- package/dist/src/codec.test.d.ts.map +1 -0
- package/dist/src/codec.test.js +21 -0
- package/dist/src/codec.test.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +23 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/proto/gen/dxos/bot.d.ts +268 -0
- package/dist/src/proto/gen/dxos/bot.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/bot.js +19 -0
- package/dist/src/proto/gen/dxos/bot.js.map +1 -0
- package/dist/src/proto/gen/dxos/client.d.ts +388 -0
- package/dist/src/proto/gen/dxos/client.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/client.js +15 -0
- package/dist/src/proto/gen/dxos/client.js.map +1 -0
- package/dist/src/proto/gen/dxos/config.d.ts +849 -0
- package/dist/src/proto/gen/dxos/config.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/config.js +39 -0
- package/dist/src/proto/gen/dxos/config.js.map +1 -0
- package/dist/src/proto/gen/dxos/devtools/host.d.ts +387 -0
- package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/devtools/host.js +3 -0
- package/dist/src/proto/gen/dxos/devtools/host.js.map +1 -0
- package/dist/src/proto/gen/dxos/devtools/swarmLog.d.ts +50 -0
- package/dist/src/proto/gen/dxos/devtools/swarmLog.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/devtools/swarmLog.js +3 -0
- package/dist/src/proto/gen/dxos/devtools/swarmLog.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/feed.d.ts +112 -0
- package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/feed.js +17 -0
- package/dist/src/proto/gen/dxos/echo/feed.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts +64 -0
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/metadata.js +3 -0
- package/dist/src/proto/gen/dxos/echo/metadata.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts +10 -0
- package/dist/src/proto/gen/dxos/echo/model/messenger.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/messenger.js +3 -0
- package/dist/src/proto/gen/dxos/echo/model/messenger.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/object.d.ts +141 -0
- package/dist/src/proto/gen/dxos/echo/model/object.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/object.js +40 -0
- package/dist/src/proto/gen/dxos/echo/model/object.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/text.d.ts +16 -0
- package/dist/src/proto/gen/dxos/echo/model/text.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/model/text.js +3 -0
- package/dist/src/proto/gen/dxos/echo/model/text.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/service.d.ts +83 -0
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/service.js +3 -0
- package/dist/src/proto/gen/dxos/echo/service.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +133 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.js +3 -0
- package/dist/src/proto/gen/dxos/echo/snapshot.js.map +1 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +20 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.js +3 -0
- package/dist/src/proto/gen/dxos/echo/timeframe.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts +36 -0
- package/dist/src/proto/gen/dxos/halo/credentials/auth.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/auth.js +3 -0
- package/dist/src/proto/gen/dxos/halo/credentials/auth.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts +70 -0
- package/dist/src/proto/gen/dxos/halo/credentials/greet.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/greet.js +19 -0
- package/dist/src/proto/gen/dxos/halo/credentials/greet.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts +18 -0
- package/dist/src/proto/gen/dxos/halo/credentials/identity.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/identity.js +3 -0
- package/dist/src/proto/gen/dxos/halo/credentials/identity.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/party.d.ts +82 -0
- package/dist/src/proto/gen/dxos/halo/credentials/party.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials/party.js +19 -0
- package/dist/src/proto/gen/dxos/halo/credentials/party.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials.d.ts +272 -0
- package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/credentials.js +31 -0
- package/dist/src/proto/gen/dxos/halo/credentials.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/invitations.d.ts +117 -0
- package/dist/src/proto/gen/dxos/halo/invitations.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/invitations.js +16 -0
- package/dist/src/proto/gen/dxos/halo/invitations.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keyring.d.ts +9 -0
- package/dist/src/proto/gen/dxos/halo/keyring.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keyring.js +3 -0
- package/dist/src/proto/gen/dxos/halo/keyring.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +88 -0
- package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/keys.js +17 -0
- package/dist/src/proto/gen/dxos/halo/keys.js.map +1 -0
- package/dist/src/proto/gen/dxos/halo/signed.d.ts +64 -0
- package/dist/src/proto/gen/dxos/halo/signed.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/halo/signed.js +3 -0
- package/dist/src/proto/gen/dxos/halo/signed.js.map +1 -0
- package/dist/src/proto/gen/dxos/iframe.d.ts +27 -0
- package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/iframe.js +3 -0
- package/dist/src/proto/gen/dxos/iframe.js.map +1 -0
- package/dist/src/proto/gen/dxos/keys.d.ts +15 -0
- package/dist/src/proto/gen/dxos/keys.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/keys.js +3 -0
- package/dist/src/proto/gen/dxos/keys.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/bridge.d.ts +92 -0
- package/dist/src/proto/gen/dxos/mesh/bridge.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/bridge.js +15 -0
- package/dist/src/proto/gen/dxos/mesh/bridge.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts +15 -0
- package/dist/src/proto/gen/dxos/mesh/broadcast.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/broadcast.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/broadcast.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/messaging.d.ts +26 -0
- package/dist/src/proto/gen/dxos/mesh/messaging.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/messaging.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/messaging.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/presence.d.ts +28 -0
- package/dist/src/proto/gen/dxos/mesh/presence.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/presence.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/presence.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/protocol.d.ts +27 -0
- package/dist/src/proto/gen/dxos/mesh/protocol.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/protocol.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/protocol.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/replicator.d.ts +26 -0
- package/dist/src/proto/gen/dxos/mesh/replicator.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/replicator.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/replicator.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/signal.d.ts +99 -0
- package/dist/src/proto/gen/dxos/mesh/signal.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/signal.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/signal.js.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/swarm.d.ts +60 -0
- package/dist/src/proto/gen/dxos/mesh/swarm.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/mesh/swarm.js +3 -0
- package/dist/src/proto/gen/dxos/mesh/swarm.js.map +1 -0
- package/dist/src/proto/gen/dxos/registry.d.ts +82 -0
- package/dist/src/proto/gen/dxos/registry.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/registry.js +3 -0
- package/dist/src/proto/gen/dxos/registry.js.map +1 -0
- package/dist/src/proto/gen/dxos/rpc.d.ts +94 -0
- package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/rpc.js +16 -0
- package/dist/src/proto/gen/dxos/rpc.js.map +1 -0
- package/dist/src/proto/gen/dxos/service/publisher.d.ts +39 -0
- package/dist/src/proto/gen/dxos/service/publisher.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/service/publisher.js +3 -0
- package/dist/src/proto/gen/dxos/service/publisher.js.map +1 -0
- package/dist/src/proto/gen/dxos/service/scheduler.d.ts +300 -0
- package/dist/src/proto/gen/dxos/service/scheduler.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/service/scheduler.js +16 -0
- package/dist/src/proto/gen/dxos/service/scheduler.js.map +1 -0
- package/dist/src/proto/gen/dxos/type.d.ts +167 -0
- package/dist/src/proto/gen/dxos/type.d.ts.map +1 -0
- package/dist/src/proto/gen/dxos/type.js +3 -0
- package/dist/src/proto/gen/dxos/type.js.map +1 -0
- package/dist/src/proto/gen/example/testing/data.d.ts +23 -0
- package/dist/src/proto/gen/example/testing/data.d.ts.map +1 -0
- package/dist/src/proto/gen/example/testing/data.js +3 -0
- package/dist/src/proto/gen/example/testing/data.js.map +1 -0
- package/dist/src/proto/gen/example/testing/rpc.d.ts +67 -0
- package/dist/src/proto/gen/example/testing/rpc.d.ts.map +1 -0
- package/dist/src/proto/gen/example/testing/rpc.js +3 -0
- package/dist/src/proto/gen/example/testing/rpc.js.map +1 -0
- package/dist/src/proto/gen/google/protobuf.d.ts +38 -0
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -0
- package/dist/src/proto/gen/google/protobuf.js +3 -0
- package/dist/src/proto/gen/google/protobuf.js.map +1 -0
- package/dist/src/proto/gen/index.d.ts +385 -0
- package/dist/src/proto/gen/index.d.ts.map +1 -0
- package/dist/src/proto/gen/index.js +11 -0
- package/dist/src/proto/gen/index.js.map +1 -0
- package/dist/src/proto/index.d.ts +2 -0
- package/dist/src/proto/index.d.ts.map +1 -0
- package/dist/src/proto/index.js +10 -0
- package/dist/src/proto/index.js.map +1 -0
- package/dist/src/proto/substitutions.d.ts +60 -0
- package/dist/src/proto/substitutions.d.ts.map +1 -0
- package/dist/src/proto/substitutions.js +37 -0
- package/dist/src/proto/substitutions.js.map +1 -0
- package/dist/src/testing.d.ts +5 -0
- package/dist/src/testing.d.ts.map +1 -0
- package/dist/src/testing.js +22 -0
- package/dist/src/testing.js.map +1 -0
- package/dist/src/types.d.ts +33 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +6 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +40 -0
- package/proto/README.md +7 -0
- package/proto/dxos/bot.d.ts +2 -0
- package/proto/dxos/bot.d.ts.map +10 -0
- package/proto/dxos/bot.js +2 -0
- package/proto/dxos/client.d.ts +2 -0
- package/proto/dxos/client.d.ts.map +10 -0
- package/proto/dxos/client.js +2 -0
- package/proto/dxos/config.d.ts +2 -0
- package/proto/dxos/config.d.ts.map +10 -0
- package/proto/dxos/config.js +2 -0
- package/proto/dxos/devtools/host.d.ts +2 -0
- package/proto/dxos/devtools/host.d.ts.map +10 -0
- package/proto/dxos/devtools/host.js +2 -0
- package/proto/dxos/devtools/swarmLog.d.ts +2 -0
- package/proto/dxos/devtools/swarmLog.d.ts.map +10 -0
- package/proto/dxos/devtools/swarmLog.js +2 -0
- package/proto/dxos/echo/feed.d.ts +2 -0
- package/proto/dxos/echo/feed.d.ts.map +10 -0
- package/proto/dxos/echo/feed.js +2 -0
- package/proto/dxos/echo/metadata.d.ts +2 -0
- package/proto/dxos/echo/metadata.d.ts.map +10 -0
- package/proto/dxos/echo/metadata.js +2 -0
- package/proto/dxos/echo/model/messenger.d.ts +2 -0
- package/proto/dxos/echo/model/messenger.d.ts.map +10 -0
- package/proto/dxos/echo/model/messenger.js +2 -0
- package/proto/dxos/echo/model/object.d.ts +2 -0
- package/proto/dxos/echo/model/object.d.ts.map +10 -0
- package/proto/dxos/echo/model/object.js +2 -0
- package/proto/dxos/echo/model/text.d.ts +2 -0
- package/proto/dxos/echo/model/text.d.ts.map +10 -0
- package/proto/dxos/echo/model/text.js +2 -0
- package/proto/dxos/echo/service.d.ts +2 -0
- package/proto/dxos/echo/service.d.ts.map +10 -0
- package/proto/dxos/echo/service.js +2 -0
- package/proto/dxos/echo/snapshot.d.ts +2 -0
- package/proto/dxos/echo/snapshot.d.ts.map +10 -0
- package/proto/dxos/echo/snapshot.js +2 -0
- package/proto/dxos/echo/timeframe.d.ts +2 -0
- package/proto/dxos/echo/timeframe.d.ts.map +10 -0
- package/proto/dxos/echo/timeframe.js +2 -0
- package/proto/dxos/google.d.ts +2 -0
- package/proto/dxos/google.d.ts.map +10 -0
- package/proto/dxos/google.js +2 -0
- package/proto/dxos/halo/credentials/auth.d.ts +2 -0
- package/proto/dxos/halo/credentials/auth.d.ts.map +10 -0
- package/proto/dxos/halo/credentials/auth.js +2 -0
- package/proto/dxos/halo/credentials/greet.d.ts +2 -0
- package/proto/dxos/halo/credentials/greet.d.ts.map +10 -0
- package/proto/dxos/halo/credentials/greet.js +2 -0
- package/proto/dxos/halo/credentials/identity.d.ts +2 -0
- package/proto/dxos/halo/credentials/identity.d.ts.map +10 -0
- package/proto/dxos/halo/credentials/identity.js +2 -0
- package/proto/dxos/halo/credentials/party.d.ts +2 -0
- package/proto/dxos/halo/credentials/party.d.ts.map +10 -0
- package/proto/dxos/halo/credentials/party.js +2 -0
- package/proto/dxos/halo/credentials.d.ts +2 -0
- package/proto/dxos/halo/credentials.d.ts.map +10 -0
- package/proto/dxos/halo/credentials.js +2 -0
- package/proto/dxos/halo/invitations.d.ts +2 -0
- package/proto/dxos/halo/invitations.d.ts.map +10 -0
- package/proto/dxos/halo/invitations.js +2 -0
- package/proto/dxos/halo/keyring.d.ts +2 -0
- package/proto/dxos/halo/keyring.d.ts.map +10 -0
- package/proto/dxos/halo/keyring.js +2 -0
- package/proto/dxos/halo/keys.d.ts +2 -0
- package/proto/dxos/halo/keys.d.ts.map +10 -0
- package/proto/dxos/halo/keys.js +2 -0
- package/proto/dxos/halo/signed.d.ts +2 -0
- package/proto/dxos/halo/signed.d.ts.map +10 -0
- package/proto/dxos/halo/signed.js +2 -0
- package/proto/dxos/iframe.d.ts +2 -0
- package/proto/dxos/iframe.d.ts.map +10 -0
- package/proto/dxos/iframe.js +2 -0
- package/proto/dxos/keys.d.ts +2 -0
- package/proto/dxos/keys.d.ts.map +10 -0
- package/proto/dxos/keys.js +2 -0
- package/proto/dxos/mesh/bridge.d.ts +2 -0
- package/proto/dxos/mesh/bridge.d.ts.map +10 -0
- package/proto/dxos/mesh/bridge.js +2 -0
- package/proto/dxos/mesh/broadcast.d.ts +2 -0
- package/proto/dxos/mesh/broadcast.d.ts.map +10 -0
- package/proto/dxos/mesh/broadcast.js +2 -0
- package/proto/dxos/mesh/messaging.d.ts +2 -0
- package/proto/dxos/mesh/messaging.d.ts.map +10 -0
- package/proto/dxos/mesh/messaging.js +2 -0
- package/proto/dxos/mesh/presence.d.ts +2 -0
- package/proto/dxos/mesh/presence.d.ts.map +10 -0
- package/proto/dxos/mesh/presence.js +2 -0
- package/proto/dxos/mesh/protocol.d.ts +2 -0
- package/proto/dxos/mesh/protocol.d.ts.map +10 -0
- package/proto/dxos/mesh/protocol.js +2 -0
- package/proto/dxos/mesh/replicator.d.ts +2 -0
- package/proto/dxos/mesh/replicator.d.ts.map +10 -0
- package/proto/dxos/mesh/replicator.js +2 -0
- package/proto/dxos/mesh/signal.d.ts +2 -0
- package/proto/dxos/mesh/signal.d.ts.map +10 -0
- package/proto/dxos/mesh/signal.js +2 -0
- package/proto/dxos/mesh/swarm.d.ts +2 -0
- package/proto/dxos/mesh/swarm.d.ts.map +10 -0
- package/proto/dxos/mesh/swarm.js +2 -0
- package/proto/dxos/registry.d.ts +2 -0
- package/proto/dxos/registry.d.ts.map +10 -0
- package/proto/dxos/registry.js +2 -0
- package/proto/dxos/rpc.d.ts +2 -0
- package/proto/dxos/rpc.d.ts.map +10 -0
- package/proto/dxos/rpc.js +2 -0
- package/proto/dxos/service/publisher.d.ts +2 -0
- package/proto/dxos/service/publisher.d.ts.map +10 -0
- package/proto/dxos/service/publisher.js +2 -0
- package/proto/dxos/service/scheduler.d.ts +2 -0
- package/proto/dxos/service/scheduler.d.ts.map +10 -0
- package/proto/dxos/service/scheduler.js +2 -0
- package/proto/dxos/type.d.ts +2 -0
- package/proto/dxos/type.d.ts.map +10 -0
- package/proto/dxos/type.js +2 -0
- package/proto/example/testing/data.d.ts +2 -0
- package/proto/example/testing/data.d.ts.map +10 -0
- package/proto/example/testing/data.js +2 -0
- package/proto/example/testing/rpc.d.ts +2 -0
- package/proto/example/testing/rpc.d.ts.map +10 -0
- package/proto/example/testing/rpc.js +2 -0
- package/src/codec.test.ts +24 -0
- package/src/index.ts +7 -0
- package/src/proto/dxos/bot.proto +151 -0
- package/src/proto/dxos/client.proto +254 -0
- package/src/proto/dxos/config.proto +305 -0
- package/src/proto/dxos/devtools/host.proto +294 -0
- package/src/proto/dxos/devtools/swarmLog.proto +32 -0
- package/src/proto/dxos/echo/feed.proto +83 -0
- package/src/proto/dxos/echo/metadata.proto +51 -0
- package/src/proto/dxos/echo/model/messenger.proto +13 -0
- package/src/proto/dxos/echo/model/object.proto +123 -0
- package/src/proto/dxos/echo/model/text.proto +16 -0
- package/src/proto/dxos/echo/service.proto +63 -0
- package/src/proto/dxos/echo/snapshot.proto +98 -0
- package/src/proto/dxos/echo/timeframe.proto +21 -0
- package/src/proto/dxos/google.proto +7 -0
- package/src/proto/dxos/halo/credentials/auth.proto +31 -0
- package/src/proto/dxos/halo/credentials/greet.proto +125 -0
- package/src/proto/dxos/halo/credentials/identity.proto +21 -0
- package/src/proto/dxos/halo/credentials/party.proto +127 -0
- package/src/proto/dxos/halo/credentials.proto +232 -0
- package/src/proto/dxos/halo/invitations.proto +90 -0
- package/src/proto/dxos/halo/keyring.proto +13 -0
- package/src/proto/dxos/halo/keys.proto +83 -0
- package/src/proto/dxos/halo/signed.proto +51 -0
- package/src/proto/dxos/iframe.proto +24 -0
- package/src/proto/dxos/keys.proto +15 -0
- package/src/proto/dxos/mesh/bridge.proto +76 -0
- package/src/proto/dxos/mesh/broadcast.proto +21 -0
- package/src/proto/dxos/mesh/messaging.proto +24 -0
- package/src/proto/dxos/mesh/presence.proto +22 -0
- package/src/proto/dxos/mesh/protocol.proto +28 -0
- package/src/proto/dxos/mesh/replicator.proto +19 -0
- package/src/proto/dxos/mesh/signal.proto +79 -0
- package/src/proto/dxos/mesh/swarm.proto +41 -0
- package/src/proto/dxos/registry.proto +60 -0
- package/src/proto/dxos/rpc.proto +73 -0
- package/src/proto/dxos/service/publisher.proto +35 -0
- package/src/proto/dxos/service/scheduler.proto +171 -0
- package/src/proto/dxos/type.proto +166 -0
- package/src/proto/example/testing/data.proto +20 -0
- package/src/proto/example/testing/rpc.proto +47 -0
- package/src/proto/gen/dxos/bot.ts +303 -0
- package/src/proto/gen/dxos/client.ts +422 -0
- package/src/proto/gen/dxos/config.ts +888 -0
- package/src/proto/gen/dxos/devtools/host.ts +419 -0
- package/src/proto/gen/dxos/devtools/swarmLog.ts +89 -0
- package/src/proto/gen/dxos/echo/feed.ts +149 -0
- package/src/proto/gen/dxos/echo/metadata.ts +102 -0
- package/src/proto/gen/dxos/echo/model/messenger.ts +50 -0
- package/src/proto/gen/dxos/echo/model/object.ts +181 -0
- package/src/proto/gen/dxos/echo/model/text.ts +56 -0
- package/src/proto/gen/dxos/echo/service.ts +119 -0
- package/src/proto/gen/dxos/echo/snapshot.ts +171 -0
- package/src/proto/gen/dxos/echo/timeframe.ts +60 -0
- package/src/proto/gen/dxos/halo/credentials/auth.ts +75 -0
- package/src/proto/gen/dxos/halo/credentials/greet.ts +108 -0
- package/src/proto/gen/dxos/halo/credentials/identity.ts +57 -0
- package/src/proto/gen/dxos/halo/credentials/party.ts +119 -0
- package/src/proto/gen/dxos/halo/credentials.ts +311 -0
- package/src/proto/gen/dxos/halo/invitations.ts +156 -0
- package/src/proto/gen/dxos/halo/keyring.ts +49 -0
- package/src/proto/gen/dxos/halo/keys.ts +126 -0
- package/src/proto/gen/dxos/halo/signed.ts +102 -0
- package/src/proto/gen/dxos/iframe.ts +67 -0
- package/src/proto/gen/dxos/keys.ts +55 -0
- package/src/proto/gen/dxos/mesh/bridge.ts +129 -0
- package/src/proto/gen/dxos/mesh/broadcast.ts +55 -0
- package/src/proto/gen/dxos/mesh/messaging.ts +65 -0
- package/src/proto/gen/dxos/mesh/presence.ts +68 -0
- package/src/proto/gen/dxos/mesh/protocol.ts +66 -0
- package/src/proto/gen/dxos/mesh/replicator.ts +65 -0
- package/src/proto/gen/dxos/mesh/signal.ts +137 -0
- package/src/proto/gen/dxos/mesh/swarm.ts +99 -0
- package/src/proto/gen/dxos/registry.ts +121 -0
- package/src/proto/gen/dxos/rpc.ts +133 -0
- package/src/proto/gen/dxos/service/publisher.ts +78 -0
- package/src/proto/gen/dxos/service/scheduler.ts +337 -0
- package/src/proto/gen/dxos/type.ts +206 -0
- package/src/proto/gen/example/testing/data.ts +63 -0
- package/src/proto/gen/example/testing/rpc.ts +105 -0
- package/src/proto/gen/google/protobuf.ts +78 -0
- package/src/proto/gen/index.ts +385 -0
- package/src/proto/index.ts +5 -0
- package/src/proto/substitutions.ts +39 -0
- package/src/testing.ts +28 -0
- package/src/types.ts +51 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/empty.proto";
|
|
8
|
+
|
|
9
|
+
import "dxos/keys.proto";
|
|
10
|
+
|
|
11
|
+
package dxos.halo.invitations;
|
|
12
|
+
|
|
13
|
+
message InvitationDescriptor {
|
|
14
|
+
enum Type {
|
|
15
|
+
/// Both peers online at the same time.
|
|
16
|
+
INTERACTIVE = 0;
|
|
17
|
+
/// Invited peer's public key is known and invitation can be accepted by any valid peer.
|
|
18
|
+
OFFLINE = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
Type type = 1;
|
|
22
|
+
|
|
23
|
+
/// Topic for network handshake.
|
|
24
|
+
bytes swarm_key = 2;
|
|
25
|
+
|
|
26
|
+
/// TODO(burdon): Remove?
|
|
27
|
+
bytes invitation = 3;
|
|
28
|
+
|
|
29
|
+
/// Only present if type === OFFLINE.
|
|
30
|
+
optional bytes identity_key = 4;
|
|
31
|
+
|
|
32
|
+
/// Must be stripped out when passing to another peer.
|
|
33
|
+
optional bytes secret = 5;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//
|
|
37
|
+
// HALO device invitations.
|
|
38
|
+
//
|
|
39
|
+
|
|
40
|
+
// TODO(burdon): ALL invitation messages should be handled over encrypted sessions.
|
|
41
|
+
// TODO(burdon): Or contain some form of signed credential.
|
|
42
|
+
// TODO(burdon): Calls should include some request context (e.g., halo/space key).
|
|
43
|
+
|
|
44
|
+
message HaloAdmissionCredentials {
|
|
45
|
+
dxos.keys.PublicKey device_key = 1;
|
|
46
|
+
dxos.keys.PublicKey control_feed_key = 2;
|
|
47
|
+
dxos.keys.PublicKey data_feed_key = 3;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message HaloAdmissionOffer {
|
|
51
|
+
dxos.keys.PublicKey identity_key = 1;
|
|
52
|
+
dxos.keys.PublicKey halo_space_key = 2;
|
|
53
|
+
dxos.keys.PublicKey genesis_feed_key = 3;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
service HaloHostService {
|
|
57
|
+
/// Process admission request from guest.
|
|
58
|
+
rpc PresentAdmissionCredentials(HaloAdmissionCredentials) returns (google.protobuf.Empty);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
service HaloGuestService {
|
|
62
|
+
/// Process admission offer from host.
|
|
63
|
+
rpc PresentAdmissionOffer(HaloAdmissionOffer) returns (google.protobuf.Empty);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//
|
|
67
|
+
// Space agent invitations.
|
|
68
|
+
//
|
|
69
|
+
|
|
70
|
+
message SpaceAdmissionCredentials {
|
|
71
|
+
dxos.keys.PublicKey identity_key = 1;
|
|
72
|
+
dxos.keys.PublicKey device_key = 2;
|
|
73
|
+
dxos.keys.PublicKey control_feed_key = 3;
|
|
74
|
+
dxos.keys.PublicKey data_feed_key = 4;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
message SpaceAdmissionOffer {
|
|
78
|
+
dxos.keys.PublicKey space_key = 1;
|
|
79
|
+
dxos.keys.PublicKey genesis_feed_key = 3;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
service SpaceHostService {
|
|
83
|
+
/// Process admission request from guest.
|
|
84
|
+
rpc PresentAdmissionCredentials(SpaceAdmissionCredentials) returns (google.protobuf.Empty);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
service SpaceGuestService {
|
|
88
|
+
/// Process admission offer from host.
|
|
89
|
+
rpc PresentAdmissionOffer(SpaceAdmissionOffer) returns (google.protobuf.Empty);
|
|
90
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "dxos/keys.proto";
|
|
8
|
+
import "dxos/halo/signed.proto";
|
|
9
|
+
|
|
10
|
+
package dxos.halo.keys;
|
|
11
|
+
|
|
12
|
+
// TODO(burdon): Prefix enums (e.g., KEY_TYPE_UNKNOWN).
|
|
13
|
+
// TODO(burdon): CamelCase variables (e.g., public_key).
|
|
14
|
+
|
|
15
|
+
//
|
|
16
|
+
// The type/use of a public key.
|
|
17
|
+
//
|
|
18
|
+
enum KeyType {
|
|
19
|
+
UNKNOWN = 0;
|
|
20
|
+
IDENTITY = 1;
|
|
21
|
+
DEVICE = 2;
|
|
22
|
+
PARTY = 3;
|
|
23
|
+
FEED = 4;
|
|
24
|
+
DXNS_ADDRESS = 5;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message KeyRecord {
|
|
28
|
+
/**
|
|
29
|
+
* The `KeyType` type of the key. This is often unknown for keys from other sources.
|
|
30
|
+
*/
|
|
31
|
+
KeyType type = 1;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The public key as a Buffer (required).
|
|
35
|
+
*/
|
|
36
|
+
dxos.keys.PublicKey public_key = 2;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The secret key as a Buffer (this will never be visible outside the Keyring).
|
|
40
|
+
*/
|
|
41
|
+
optional dxos.keys.PrivateKey secret_key = 3;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Is this key from a Greeting "hint"?
|
|
45
|
+
*/
|
|
46
|
+
optional bool hint = 4;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Determines if this is our key?
|
|
50
|
+
* Usually true if `secret_key` is present; may be false for "inception keys" such as the Party key.
|
|
51
|
+
*/
|
|
52
|
+
optional bool own = 5; // TODO(burdon): Rename "local" or "private".
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Is this key to be trusted?
|
|
56
|
+
*/
|
|
57
|
+
optional bool trusted = 6; // TODO(burdon): Rename "trust". How is this determined?
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* An RFC-3339 date/time string for when the key was added to the Keyring.
|
|
61
|
+
*/
|
|
62
|
+
optional string added = 7;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* An RFC-3339 date/time string for when the key was created.
|
|
66
|
+
*/
|
|
67
|
+
optional string created = 8;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
message KeyRecordList {
|
|
71
|
+
repeated KeyRecord keys = 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//
|
|
75
|
+
// A key which includes its parent keys and SignedMessages leading back to the root of its authority.
|
|
76
|
+
// For example, if IdentityA signed for DeviceA, which signed for DeviceB, which signed for DeviceC the chain
|
|
77
|
+
// would comprised: DeviceC->DeviceB->DeviceA->IdentityA moving from tip to root.
|
|
78
|
+
//
|
|
79
|
+
message KeyChain {
|
|
80
|
+
dxos.keys.PublicKey public_key = 1;
|
|
81
|
+
dxos.halo.signed.SignedMessage message = 2; // TODO(burdon): Circular dep.
|
|
82
|
+
repeated KeyChain parents = 3;
|
|
83
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/any.proto";
|
|
8
|
+
|
|
9
|
+
import "dxos/halo/keys.proto";
|
|
10
|
+
import "dxos/keys.proto";
|
|
11
|
+
|
|
12
|
+
package dxos.halo.signed;
|
|
13
|
+
|
|
14
|
+
// TODO(burdon): Rename (too generic).
|
|
15
|
+
// TODO(burdon): Use default from codec-protobuf.
|
|
16
|
+
message Message {
|
|
17
|
+
google.protobuf.Any payload = 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A generic container message used whenever messages are signed (e.g. PartyCredential)
|
|
22
|
+
*/
|
|
23
|
+
message SignedMessage {
|
|
24
|
+
//
|
|
25
|
+
// Provides the common metadata needed for all signed objects.
|
|
26
|
+
//
|
|
27
|
+
message Signed {
|
|
28
|
+
/// RFC-3339 datetime string.
|
|
29
|
+
string created = 1;
|
|
30
|
+
bytes nonce = 2;
|
|
31
|
+
/// The payload to be signed.
|
|
32
|
+
google.protobuf.Any payload = 10;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//
|
|
36
|
+
// The signature data itself.
|
|
37
|
+
//
|
|
38
|
+
message Signature {
|
|
39
|
+
/// The publicKey of the keypair that made this signature.
|
|
40
|
+
dxos.keys.PublicKey key = 1;
|
|
41
|
+
/// The bytes of the signature.
|
|
42
|
+
bytes signature = 2;
|
|
43
|
+
/// The certification chain of SignedMessages for this key.
|
|
44
|
+
optional keys.KeyChain key_chain = 3;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/// The signed message contents.
|
|
48
|
+
Signed signed = 1;
|
|
49
|
+
/// An array of Signatures, one for each key that signed the message.
|
|
50
|
+
repeated Signature signatures = 2;
|
|
51
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/empty.proto";
|
|
8
|
+
|
|
9
|
+
package dxos.iframe;
|
|
10
|
+
|
|
11
|
+
message StartRequest {
|
|
12
|
+
string origin = 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// Worker-to-iframe RPCs.
|
|
16
|
+
service IframeService {
|
|
17
|
+
rpc Heartbeat(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/// Iframe-to-worker RPCs.
|
|
21
|
+
service WorkerService {
|
|
22
|
+
rpc Start(StartRequest) returns (google.protobuf.Empty);
|
|
23
|
+
rpc Stop(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
24
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2020 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "dxos/keys.proto";
|
|
8
|
+
import "dxos/mesh/swarm.proto";
|
|
9
|
+
import "google/protobuf/empty.proto";
|
|
10
|
+
|
|
11
|
+
package dxos.mesh.bridge;
|
|
12
|
+
|
|
13
|
+
//
|
|
14
|
+
// Broker connections between processes and peers.
|
|
15
|
+
//
|
|
16
|
+
service BridgeService {
|
|
17
|
+
|
|
18
|
+
///
|
|
19
|
+
rpc Open(ConnectionRequest) returns (stream BridgeEvent);
|
|
20
|
+
|
|
21
|
+
///
|
|
22
|
+
rpc SendSignal(SignalRequest) returns (google.protobuf.Empty);
|
|
23
|
+
|
|
24
|
+
///
|
|
25
|
+
rpc SendData(DataRequest) returns (google.protobuf.Empty);
|
|
26
|
+
|
|
27
|
+
///
|
|
28
|
+
rpc Close(CloseRequest) returns (google.protobuf.Empty);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
enum ConnectionState {
|
|
32
|
+
INVALID = 0;
|
|
33
|
+
CONNECTING = 1;
|
|
34
|
+
CONNECTED = 2;
|
|
35
|
+
CLOSED = 3;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message BridgeEvent {
|
|
39
|
+
message ConnectionEvent {
|
|
40
|
+
ConnectionState state = 1;
|
|
41
|
+
optional string error = 2; // TODO(burdon): Error type.
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message SignalEvent {
|
|
45
|
+
dxos.mesh.swarm.Signal payload = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message DataEvent {
|
|
49
|
+
bytes payload = 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
oneof type {
|
|
53
|
+
ConnectionEvent connection = 1;
|
|
54
|
+
SignalEvent signal = 2;
|
|
55
|
+
DataEvent data = 3;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message ConnectionRequest {
|
|
60
|
+
dxos.keys.PublicKey proxy_id = 1;
|
|
61
|
+
bool initiator = 2;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message SignalRequest {
|
|
65
|
+
dxos.keys.PublicKey proxy_id = 1;
|
|
66
|
+
dxos.mesh.swarm.Signal signal = 2;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message DataRequest {
|
|
70
|
+
dxos.keys.PublicKey proxy_id = 1;
|
|
71
|
+
bytes payload = 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
message CloseRequest{
|
|
75
|
+
dxos.keys.PublicKey proxy_id = 1;
|
|
76
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
package dxos.mesh.broadcast;
|
|
8
|
+
|
|
9
|
+
message Packet {
|
|
10
|
+
// Id message.
|
|
11
|
+
bytes seq = 1;
|
|
12
|
+
|
|
13
|
+
// Represents the author's ID of the message. To identify a message in the network you should check for the: `seqno + origin`.
|
|
14
|
+
bytes origin = 2;
|
|
15
|
+
|
|
16
|
+
// Represents the current sender's ID of the message.
|
|
17
|
+
optional bytes from = 3;
|
|
18
|
+
|
|
19
|
+
// Represents an opaque blob of data, it can contain any data that the publisher wants to send.
|
|
20
|
+
bytes data = 4;
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/any.proto";
|
|
8
|
+
|
|
9
|
+
import "dxos/keys.proto";
|
|
10
|
+
|
|
11
|
+
package dxos.mesh.messaging;
|
|
12
|
+
|
|
13
|
+
message ReliablePayload {
|
|
14
|
+
/// Unique message identifier. Used for Acknolegment.
|
|
15
|
+
dxos.keys.PublicKey message_id = 1;
|
|
16
|
+
|
|
17
|
+
/// Payload for signal server netwrok.
|
|
18
|
+
google.protobuf.Any payload = 2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message Acknowledgement {
|
|
22
|
+
/// MessageId of the Message that is being acknowledged.
|
|
23
|
+
dxos.keys.PublicKey message_id = 1;
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
package dxos.mesh.presence;
|
|
8
|
+
|
|
9
|
+
// Even though those definitions don't use Any the schema can be added dynamically later.
|
|
10
|
+
// Import Any so that the protobuf compiler is happy that there's a substitution.
|
|
11
|
+
import "google/protobuf/any.proto";
|
|
12
|
+
|
|
13
|
+
message Alive {
|
|
14
|
+
message Connection {
|
|
15
|
+
bytes peer_id = 1;
|
|
16
|
+
optional bool initiator = 2;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
bytes peer_id = 1;
|
|
20
|
+
repeated Connection connections = 2;
|
|
21
|
+
optional bytes metadata = 3;
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/any.proto";
|
|
8
|
+
|
|
9
|
+
package dxos.mesh.protocol;
|
|
10
|
+
|
|
11
|
+
// TODO(burdon): Rename ProtoMessage.
|
|
12
|
+
message Message {
|
|
13
|
+
string nmId = 1; // TODO(burdon): nm???
|
|
14
|
+
bool nmResponse = 2;
|
|
15
|
+
bool nmEphemeral = 3;
|
|
16
|
+
google.protobuf.Any nmData = 4;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// TODO(burdon): Rename ProtoError.
|
|
20
|
+
message Error {
|
|
21
|
+
string code = 1;
|
|
22
|
+
string message = 2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// TODO(burdon): Rename ProtoBuffer.
|
|
26
|
+
message Buffer {
|
|
27
|
+
bytes data = 1;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2019 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/any.proto";
|
|
8
|
+
|
|
9
|
+
package dxos.mesh.replicator;
|
|
10
|
+
|
|
11
|
+
message Container {
|
|
12
|
+
string type = 1;
|
|
13
|
+
repeated google.protobuf.Any data = 2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message Feed {
|
|
17
|
+
optional bytes key = 1;
|
|
18
|
+
optional bytes discovery_key = 2;
|
|
19
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/any.proto";
|
|
8
|
+
import "google/protobuf/empty.proto";
|
|
9
|
+
import "google/protobuf/timestamp.proto";
|
|
10
|
+
|
|
11
|
+
package dxos.mesh.signal;
|
|
12
|
+
|
|
13
|
+
option go_package = "github.com/dxos/kube/go/signal/pb";
|
|
14
|
+
|
|
15
|
+
message JoinRequest {
|
|
16
|
+
bytes swarm = 1;
|
|
17
|
+
bytes peer = 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message Message {
|
|
21
|
+
// TODO(egor): Rename to `sender`.
|
|
22
|
+
bytes author = 1;
|
|
23
|
+
bytes recipient = 2;
|
|
24
|
+
google.protobuf.Any payload = 3;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message ReceptionRequest {
|
|
28
|
+
bytes peer = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/// Goes on Pub/Sub swarm topic and as a Join stream in RPC.
|
|
32
|
+
message SwarmEvent {
|
|
33
|
+
// Announce peer available on swarm.
|
|
34
|
+
message PeerAvailable {
|
|
35
|
+
bytes peer = 1;
|
|
36
|
+
|
|
37
|
+
google.protobuf.Timestamp since = 2;
|
|
38
|
+
|
|
39
|
+
// When, if at all (handle the default value as not), this availability would expires were it not re-announced, like
|
|
40
|
+
// periodically in Pub/Sub with some margin such that Pub/Sub network partitions lead to offline statuses.
|
|
41
|
+
optional google.protobuf.Timestamp until = 3;
|
|
42
|
+
|
|
43
|
+
/// Only relevant in Pub/Sub. Optional, the host topic to eagerly send PeerAvailable messages back to.
|
|
44
|
+
optional bytes announce_back_to_host = 4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message PeerLeft {
|
|
48
|
+
bytes peer = 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
oneof event {
|
|
52
|
+
/// The peer was announced as available on the swarm.
|
|
53
|
+
PeerAvailable peer_available = 1;
|
|
54
|
+
/// The peer left, or their announcement timed out.
|
|
55
|
+
PeerLeft peer_left = 2;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/// Goes on a Pub/Sub host topic.
|
|
60
|
+
message HostEvent {
|
|
61
|
+
oneof event {
|
|
62
|
+
SwarmEvent.PeerAvailable peer_available = 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/// Goes on Pub/Sub peer topic.
|
|
67
|
+
message PeerEvent {
|
|
68
|
+
oneof event {
|
|
69
|
+
Message message = 1;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// TOOD(burdon): Rename.
|
|
74
|
+
// TODO(burdon): Reconcile with `@dxos/kube`.
|
|
75
|
+
service Signal {
|
|
76
|
+
rpc Join(JoinRequest) returns (stream SwarmEvent);
|
|
77
|
+
rpc ReceiveMessages(ReceptionRequest) returns (stream Message);
|
|
78
|
+
rpc SendMessage(Message) returns (google.protobuf.Empty);
|
|
79
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "dxos/keys.proto";
|
|
8
|
+
|
|
9
|
+
package dxos.mesh.swarm;
|
|
10
|
+
|
|
11
|
+
message SwarmMessage {
|
|
12
|
+
/// Swarm identefier.
|
|
13
|
+
dxos.keys.PublicKey topic = 3;
|
|
14
|
+
/// Unique connection identifier.
|
|
15
|
+
dxos.keys.PublicKey session_id = 4;
|
|
16
|
+
/// Message payload.
|
|
17
|
+
MessageData data = 5;
|
|
18
|
+
/// Unique message identifier. Used for Acknolegment and matching Anwers to Offers.
|
|
19
|
+
dxos.keys.PublicKey message_id = 6;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message MessageData {
|
|
23
|
+
oneof payload {
|
|
24
|
+
Offer offer = 1;
|
|
25
|
+
Answer answer = 2;
|
|
26
|
+
Signal signal = 3;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message Offer {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message Answer {
|
|
34
|
+
bool accept = 1;
|
|
35
|
+
/// MessageId of the Offer being answered.
|
|
36
|
+
optional dxos.keys.PublicKey offer_message_id = 2;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message Signal {
|
|
40
|
+
string json = 1;
|
|
41
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/timestamp.proto";
|
|
8
|
+
|
|
9
|
+
// TODO(burdon): Rename `dxos.registry.record`.
|
|
10
|
+
package dxos.registry;
|
|
11
|
+
|
|
12
|
+
message Record {
|
|
13
|
+
/**
|
|
14
|
+
* Types are system records that define protocol-buffer schema of other records.
|
|
15
|
+
*/
|
|
16
|
+
message Type {
|
|
17
|
+
/// FQ protobuf message name.
|
|
18
|
+
string message_name = 1;
|
|
19
|
+
/// Set of protobuf messages encoded in JSON.
|
|
20
|
+
string protobuf_defs = 2;
|
|
21
|
+
/// CID of protobuf source file.
|
|
22
|
+
optional string protobuf_ipfs_cid = 3;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Data with a reference to a type record that defines the encoding.
|
|
27
|
+
*/
|
|
28
|
+
message Extension {
|
|
29
|
+
/// CID of type record.
|
|
30
|
+
bytes type_record = 1;
|
|
31
|
+
/// Serialized payload data.
|
|
32
|
+
bytes data = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//
|
|
36
|
+
// Metadata
|
|
37
|
+
//
|
|
38
|
+
|
|
39
|
+
/// Record creation timetstamp.
|
|
40
|
+
optional google.protobuf.Timestamp created = 1;
|
|
41
|
+
|
|
42
|
+
/// Human-readable name of record.
|
|
43
|
+
optional string display_name = 2;
|
|
44
|
+
|
|
45
|
+
/// Record description.
|
|
46
|
+
optional string description = 3;
|
|
47
|
+
|
|
48
|
+
/// Optional record tags.
|
|
49
|
+
repeated string tags = 4;
|
|
50
|
+
|
|
51
|
+
oneof kind {
|
|
52
|
+
/// Type record variant.
|
|
53
|
+
Type type = 100;
|
|
54
|
+
|
|
55
|
+
/// Data record variant.
|
|
56
|
+
Extension payload = 101;
|
|
57
|
+
|
|
58
|
+
// TODO(damaretskyi): Add DID record definition.
|
|
59
|
+
}
|
|
60
|
+
}
|