@dxos/protocols 0.8.4-main.bc674ce → 0.8.4-main.bd9b33e6c8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/src/FeedProtocol.d.ts +528 -0
- package/dist/src/FeedProtocol.d.ts.map +1 -0
- package/dist/src/FeedProtocol.js +237 -0
- package/dist/src/FeedProtocol.js.map +1 -0
- package/dist/src/FunctionProtocol.d.ts +2 -2
- package/dist/src/FunctionProtocol.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +42 -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 +7 -2
- 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 +5 -1
- 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 +5 -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 +0 -4
- 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/edge/messenger_pb.d.ts +28 -0
- package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js +10 -5
- package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/google_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +1 -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.map +1 -1
- package/dist/src/buf/proto/gen/dxos/tracing_pb.js +1 -1
- package/dist/src/codec.test.js +1 -1
- package/dist/src/edge/EdgeFunctionEnv.d.ts +11 -23
- package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -1
- package/dist/src/edge/edge.d.ts +161 -0
- package/dist/src/edge/edge.d.ts.map +1 -1
- package/dist/src/edge/edge.js +9 -0
- package/dist/src/edge/edge.js.map +1 -1
- package/dist/src/edge/errors.d.ts +1 -1
- package/dist/src/edge/errors.js +1 -1
- package/dist/src/edge/index.d.ts +3 -3
- package/dist/src/edge/index.js +3 -3
- package/dist/src/errors/encoding.d.ts +1 -1
- package/dist/src/errors/encoding.js +1 -1
- package/dist/src/errors/errors.d.ts +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 +1 -1
- package/dist/src/errors/index.d.ts +5 -5
- package/dist/src/errors/index.js +5 -5
- package/dist/src/index.d.ts +12 -12
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -12
- package/dist/src/index.js.map +1 -1
- package/dist/src/indexing.test.js +1 -1
- package/dist/src/proto/gen/dxos/client/services.d.ts +998 -973
- package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/client/services.js +95 -94
- package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/src/proto/gen/dxos/config.d.ts +0 -5
- 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 +31 -31
- package/dist/src/proto/gen/dxos/devtools/host.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/edge/messenger.d.ts +24 -0
- 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/halo/credentials.d.ts +1 -1
- package/dist/src/proto/gen/google/protobuf.d.ts +326 -40
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
- package/dist/src/proto/gen/google/protobuf.js +127 -1
- package/dist/src/proto/gen/google/protobuf.js.map +1 -1
- package/dist/src/proto/gen/index.d.ts +26 -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.d.ts +2 -2
- package/dist/src/proto/index.js +1 -1
- package/dist/src/proto/types.d.ts +1 -1
- package/dist/src/space-archive.d.ts +60 -1
- package/dist/src/space-archive.d.ts.map +1 -1
- package/dist/src/space-archive.js +13 -1
- package/dist/src/space-archive.js.map +1 -1
- package/dist/src/types.d.ts +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/src/FeedProtocol.ts +320 -0
- package/src/FunctionProtocol.ts +2 -4
- package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/agent/functions_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/bot_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/client/invitation_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/client/logging_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/client/queue_pb.ts +51 -2
- package/src/buf/proto/gen/dxos/client/services_pb.ts +7 -2
- package/src/buf/proto/gen/dxos/config_pb.ts +2 -7
- package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/devtools/host_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/blob_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/feed_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/filter_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/query_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/service_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/edge/calls_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +39 -6
- package/src/buf/proto/gen/dxos/edge/signal_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/error_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/field_options_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/google_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/gravity_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +2 -1
- package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/iframe_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/keys_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/registry_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/rpc_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/service/publisher_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/tracing_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/type_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/value_pb.ts +1 -1
- package/src/buf/proto/gen/example/testing/data_pb.ts +1 -1
- package/src/buf/proto/gen/example/testing/rpc_pb.ts +1 -1
- package/src/codec.test.ts +1 -1
- package/src/edge/EdgeFunctionEnv.ts +20 -26
- package/src/edge/edge.ts +115 -0
- package/src/edge/errors.ts +1 -1
- package/src/edge/index.ts +3 -3
- package/src/errors/encoding.ts +2 -2
- package/src/errors/errors.test.ts +1 -1
- package/src/errors/errors.ts +2 -2
- package/src/errors/helpers.ts +1 -1
- package/src/errors/index.ts +5 -5
- package/src/index.ts +12 -14
- package/src/indexing.test.ts +1 -1
- package/src/proto/dxos/client/queue.proto +11 -0
- package/src/proto/dxos/client/services.proto +1 -0
- package/src/proto/dxos/config.proto +1 -3
- package/src/proto/dxos/edge/messenger.proto +10 -0
- package/src/proto/dxos/halo/credentials.proto +1 -0
- package/src/proto/gen/dxos/client/services.ts +998 -973
- package/src/proto/gen/dxos/config.ts +0 -5
- package/src/proto/gen/dxos/devtools/host.ts +31 -31
- package/src/proto/gen/dxos/edge/messenger.ts +24 -0
- package/src/proto/gen/dxos/halo/credentials.ts +1 -1
- package/src/proto/gen/google/protobuf.ts +326 -40
- package/src/proto/gen/index.ts +27 -1
- package/src/proto/index.ts +2 -2
- package/src/proto/types.ts +1 -1
- package/src/space-archive.ts +70 -1
- package/src/types.ts +2 -2
- package/dist/src/queue.d.ts +0 -3
- package/dist/src/queue.d.ts.map +0 -1
- package/dist/src/queue.js +0 -5
- package/dist/src/queue.js.map +0 -1
- package/src/queue.ts +0 -14
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/mesh/teleport/auth.proto (package dxos.mesh.teleport.auth, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/mesh/teleport/automerge.proto (package dxos.mesh.teleport.automerge, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/mesh/teleport/blobsync.proto (package dxos.mesh.teleport.blobsync, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/mesh/teleport/control.proto (package dxos.mesh.teleport.control, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/mesh/teleport/gossip.proto (package dxos.mesh.teleport.gossip, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/mesh/teleport/notarization.proto (package dxos.mesh.teleport.notarization, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/mesh/teleport/replicator.proto (package dxos.mesh.teleport.replicator, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/registry.proto (package dxos.registry, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/rpc.proto (package dxos.rpc, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/service/agentmanager.proto (package dxos.service.agentmanager, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/service/publisher.proto (package dxos.service.publisher, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/service/supervisor.proto (package dxos.service.supervisor, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/service/tunnel.proto (package dxos.service.tunnel, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protoc-gen-es v2.
|
|
1
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
2
2
|
// @generated from file dxos/tracing.proto (package dxos.tracing, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/type.proto (package dxos.type, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file dxos/value.proto (package dxos.value, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file example/testing/data.proto (package example.testing.data, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// @generated by protoc-gen-es v2.
|
|
5
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts,import_extension=js"
|
|
6
6
|
// @generated from file example/testing/rpc.proto (package example.testing.rpc, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
package/src/codec.test.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import { type SpaceId } from '@dxos/keys';
|
|
6
6
|
|
|
7
|
+
import type * as FeedProtocol from '../FeedProtocol';
|
|
7
8
|
import { type CreateDocumentRequest, type CreateDocumentResponse } from '../proto/gen/dxos/echo/service';
|
|
8
|
-
import { type
|
|
9
|
+
import { type QueryRequest, type QueryResponse } from '../proto/gen/dxos/echo/query';
|
|
9
10
|
|
|
10
11
|
/*
|
|
11
12
|
|
|
@@ -68,28 +69,35 @@ export interface Env {
|
|
|
68
69
|
*
|
|
69
70
|
* NOTE: Currently unused in functions.
|
|
70
71
|
*/
|
|
71
|
-
export interface
|
|
72
|
+
export interface TraceContext {}
|
|
72
73
|
|
|
73
74
|
/**
|
|
74
75
|
* Database API for other CF services like functions.
|
|
75
76
|
*/
|
|
76
77
|
export interface DataService {
|
|
77
|
-
getSpaceMeta(ctx:
|
|
78
|
-
getDocument(ctx:
|
|
78
|
+
getSpaceMeta(ctx: TraceContext, spaceId: SpaceId): Promise<RpcResult<SpaceMeta | undefined>>;
|
|
79
|
+
getDocument(ctx: TraceContext, spaceId: SpaceId, documentId: string): Promise<RpcResult<RawDocument | undefined>>;
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
queryReferences(ctx: ExecutionContext, request: QueryReferencesRequest): Promise<RpcResult<QueryReferencesResponse>>;
|
|
83
|
-
|
|
84
|
-
createDocument(ctx: ExecutionContext, request: CreateDocumentRequest): Promise<RpcResult<CreateDocumentResponse>>;
|
|
81
|
+
execQuery(ctx: TraceContext, request: QueryRequest): Promise<RpcResult<QueryResponse>>;
|
|
82
|
+
createDocument(ctx: TraceContext, request: CreateDocumentRequest): Promise<RpcResult<CreateDocumentResponse>>;
|
|
85
83
|
|
|
86
84
|
// TODO(burdon): Update? Return DocumentEntry?
|
|
87
|
-
changeDocument(ctx:
|
|
85
|
+
changeDocument(ctx: TraceContext, spaceId: SpaceId, documentId: string, changes: Uint8Array): Promise<void>;
|
|
88
86
|
}
|
|
89
87
|
|
|
90
88
|
export interface QueueService {
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
queryQueue: (
|
|
90
|
+
ctx: TraceContext,
|
|
91
|
+
request: FeedProtocol.QueryQueueRequest,
|
|
92
|
+
) => Promise<RpcResult<FeedProtocol.QueryResult>>;
|
|
93
|
+
insertIntoQueue: (
|
|
94
|
+
ctx: TraceContext,
|
|
95
|
+
request: FeedProtocol.InsertIntoQueueRequest,
|
|
96
|
+
) => Promise<RpcResult<RpcDisposable>>;
|
|
97
|
+
deleteFromQueue: (
|
|
98
|
+
ctx: TraceContext,
|
|
99
|
+
request: FeedProtocol.DeleteFromQueueRequest,
|
|
100
|
+
) => Promise<RpcResult<RpcDisposable>>;
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
/**
|
|
@@ -115,20 +123,6 @@ export type SpaceMeta = {
|
|
|
115
123
|
rootDocumentId: string;
|
|
116
124
|
};
|
|
117
125
|
|
|
118
|
-
export type QueryRequest = {
|
|
119
|
-
spaceId: string;
|
|
120
|
-
type?: string;
|
|
121
|
-
where?: Record<string, any>;
|
|
122
|
-
objectIds?: string[];
|
|
123
|
-
cursor?: string;
|
|
124
|
-
limit?: number;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export type QueryResponse = {
|
|
128
|
-
results: ObjectSnapshot[];
|
|
129
|
-
cursor?: string;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
126
|
/**
|
|
133
127
|
* TODO(yaroslav): make Indexer return EchoObject after create() can properly reconstruct an object
|
|
134
128
|
* from this structure (meta, id and type aren't handled properly)
|
package/src/edge/edge.ts
CHANGED
|
@@ -12,7 +12,16 @@ import { SpaceId } from '@dxos/keys';
|
|
|
12
12
|
// If we would rename it, we need to be careful to not break composer production.
|
|
13
13
|
export enum EdgeService {
|
|
14
14
|
AUTOMERGE_REPLICATOR = 'automerge-replicator',
|
|
15
|
+
/**
|
|
16
|
+
* Control feed replicator (hypercore append only logs) for the space.
|
|
17
|
+
*/
|
|
18
|
+
// TODO(mykola): Remove once we migrate to keyhive for access control.
|
|
15
19
|
FEED_REPLICATOR = 'feed-replicator',
|
|
20
|
+
/**
|
|
21
|
+
* Feed replicator (ordered data list) for the space.
|
|
22
|
+
*/
|
|
23
|
+
// TODO(mykola): Rename to FEED_REPLICATOR when we migrate to keyhive for access control.
|
|
24
|
+
QUEUE_REPLICATOR = 'queue-replicator',
|
|
16
25
|
SWARM = 'swarm',
|
|
17
26
|
SIGNAL = 'signal',
|
|
18
27
|
STATUS = 'status',
|
|
@@ -482,3 +491,109 @@ export const EdgeHttpErrorCodec = Object.freeze({
|
|
|
482
491
|
return ErrorCodec.decode(body.error);
|
|
483
492
|
},
|
|
484
493
|
});
|
|
494
|
+
|
|
495
|
+
//
|
|
496
|
+
// Data management.
|
|
497
|
+
//
|
|
498
|
+
|
|
499
|
+
export type ListSpacesRequest = { limit?: number; cursor?: string; order?: 'asc' | 'desc' };
|
|
500
|
+
export type ListSpacesResponse = {
|
|
501
|
+
spaces: SpaceActivityEntry[];
|
|
502
|
+
cursor?: string;
|
|
503
|
+
limit: number;
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
export type ListActiveIdentitiesRequest = { cursor?: string; limit?: number };
|
|
507
|
+
export type ListActiveIdentitiesResponse = {
|
|
508
|
+
identities: {
|
|
509
|
+
identityKey: string;
|
|
510
|
+
haloSpaceId: string | null;
|
|
511
|
+
createdAt: string | null;
|
|
512
|
+
agentKey: string | null;
|
|
513
|
+
hasRecovery: boolean;
|
|
514
|
+
}[];
|
|
515
|
+
cursor?: string;
|
|
516
|
+
complete: boolean;
|
|
517
|
+
totalCount: number;
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
export type InspectSpaceRequest = { spaceId: string };
|
|
521
|
+
export type InspectSpaceResponse = {
|
|
522
|
+
spaceId: string;
|
|
523
|
+
metadata: { createdAt: string; identityKey?: string; status?: 'active' | 'deleting' } | null;
|
|
524
|
+
members: {
|
|
525
|
+
count: number;
|
|
526
|
+
list: { identityKey: string; role?: string; agentKey?: string }[];
|
|
527
|
+
};
|
|
528
|
+
controlFeeds: {
|
|
529
|
+
replicationProgress: { [feedKey: string]: { replicated: number; processed: number } };
|
|
530
|
+
};
|
|
531
|
+
echo: {
|
|
532
|
+
dataFeeds: {
|
|
533
|
+
count: number;
|
|
534
|
+
totalBlocks: number;
|
|
535
|
+
byNamespace: { namespace: string; feeds: { feedId: string; blockCount: number }[] }[];
|
|
536
|
+
};
|
|
537
|
+
documentCount: number;
|
|
538
|
+
objectCount: number;
|
|
539
|
+
deletedObjectCount: number;
|
|
540
|
+
indexedDocumentCount: number;
|
|
541
|
+
objectsByType: { typeDxn: string; count: number }[];
|
|
542
|
+
indexerStatus: {
|
|
543
|
+
indexingInProgress: boolean;
|
|
544
|
+
cursors: { indexName: string; sourceName: string; resourceId: string | null; cursor: string | number }[];
|
|
545
|
+
totalChanges: number;
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
usageInLast30Days: {
|
|
549
|
+
lastActivity: string | null;
|
|
550
|
+
wsEvents: number;
|
|
551
|
+
httpEvents: number;
|
|
552
|
+
totalEvents: number;
|
|
553
|
+
} | null;
|
|
554
|
+
durableObjects: { type: string; doId: string }[];
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
export type InspectIdentityRequest = { identityKey: string };
|
|
558
|
+
export type InspectIdentityResponse = {
|
|
559
|
+
identityKey: string;
|
|
560
|
+
agentKey: string | null;
|
|
561
|
+
haloSpaceId: string | null;
|
|
562
|
+
hasRecovery: boolean;
|
|
563
|
+
routerDoId: string;
|
|
564
|
+
agentDoId: string | null;
|
|
565
|
+
ownedFunctions: { id: string; name: string; versionCount: number }[];
|
|
566
|
+
spaces: InspectSpaceResponse[];
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
/** Matches the SerializedSpace format from @dxos/echo-db, extended with spaceId. */
|
|
570
|
+
export type SpaceExportPayload = {
|
|
571
|
+
version: number;
|
|
572
|
+
timestamp: string;
|
|
573
|
+
spaceId: string;
|
|
574
|
+
objects: Record<string, unknown>[];
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
export type SpaceActivityEntry = {
|
|
578
|
+
spaceId: string;
|
|
579
|
+
lastActivity: string;
|
|
580
|
+
totalEvents: number;
|
|
581
|
+
metadata: { createdAt: string; identityKey?: string; status?: 'active' | 'deleting' } | null;
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
export type SpaceExportResult = {
|
|
585
|
+
spaceId: string;
|
|
586
|
+
downloadPath: string;
|
|
587
|
+
downloadUrl: string;
|
|
588
|
+
expiresAt: string;
|
|
589
|
+
objectCount: number;
|
|
590
|
+
sizeBytes: number;
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
export type ExportSpaceRequest = { spaceId: string; origin: string };
|
|
594
|
+
|
|
595
|
+
export type DeleteSpaceRequest = { spaceId: string };
|
|
596
|
+
export type DeleteSpaceResponse = { status: string; spaceId: string };
|
|
597
|
+
|
|
598
|
+
export type DeleteIdentityRequest = { identityKey: string };
|
|
599
|
+
export type DeleteIdentityResponse = { status: string; identityKey: string };
|
package/src/edge/errors.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type EdgeErrorData, type EdgeFailure, EdgeHttpErrorCodec, ErrorCodec } from './edge.
|
|
5
|
+
import { type EdgeErrorData, type EdgeFailure, EdgeHttpErrorCodec, ErrorCodec } from './edge.ts';
|
|
6
6
|
|
|
7
7
|
// TODO(burdon): Reconcile with @dxos/errors.
|
|
8
8
|
/**
|
package/src/edge/index.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './edge.
|
|
6
|
-
export * as EdgeFunctionEnv from './EdgeFunctionEnv.
|
|
7
|
-
export * from './errors.
|
|
5
|
+
export * from './edge.ts';
|
|
6
|
+
export * as EdgeFunctionEnv from './EdgeFunctionEnv.ts';
|
|
7
|
+
export * from './errors.ts';
|
package/src/errors/encoding.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.
|
|
5
|
+
import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.ts';
|
|
6
6
|
|
|
7
|
-
import { reconstructError } from './helpers.
|
|
7
|
+
import { reconstructError } from './helpers.ts';
|
|
8
8
|
|
|
9
9
|
export const encodeError = (err: any): SerializedErrorProto => {
|
|
10
10
|
if (typeof err === 'object' && err?.message) {
|
package/src/errors/errors.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import { BaseError } from '@dxos/errors';
|
|
6
6
|
import { PublicKey } from '@dxos/keys';
|
|
7
7
|
|
|
8
|
-
import type { ObjectId } from '../types.
|
|
8
|
+
import type { ObjectId } from '../types.ts';
|
|
9
9
|
|
|
10
|
-
import { registerError, registerErrorMessageContext, registerErrorNoArgs } from './helpers.
|
|
10
|
+
import { registerError, registerErrorMessageContext, registerErrorNoArgs } from './helpers.ts';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Thrown when request was terminated because the RPC endpoint has been closed.
|
package/src/errors/helpers.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { BaseError } from '@dxos/errors';
|
|
6
6
|
import { invariant } from '@dxos/invariant';
|
|
7
7
|
|
|
8
|
-
import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.
|
|
8
|
+
import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.ts';
|
|
9
9
|
|
|
10
10
|
export const reconstructError = (error: SerializedErrorProto) => {
|
|
11
11
|
const { name, message, context } = error;
|
package/src/errors/index.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './encoding.
|
|
6
|
-
export * from './errors.
|
|
7
|
-
export * from './helpers.
|
|
8
|
-
export * from './base-errors.
|
|
9
|
-
export * from './parameter.
|
|
5
|
+
export * from './encoding.ts';
|
|
6
|
+
export * from './errors.ts';
|
|
7
|
+
export * from './helpers.ts';
|
|
8
|
+
export * from './base-errors.ts';
|
|
9
|
+
export * from './parameter.ts';
|
package/src/index.ts
CHANGED
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export type * from './types.js';
|
|
18
|
-
export * as FunctionProtocol from './FunctionProtocol.js';
|
|
5
|
+
export * from './automerge.ts';
|
|
6
|
+
export * from './edge/index.ts';
|
|
7
|
+
export * from './errors/index.ts';
|
|
8
|
+
export * from './indexing.ts';
|
|
9
|
+
export * from './messenger.ts';
|
|
10
|
+
export * from './profile-archive.ts';
|
|
11
|
+
export * from './space-archive.ts';
|
|
12
|
+
export * from './storage.ts';
|
|
13
|
+
export * from './tracing.ts';
|
|
14
|
+
export type * from './types.ts';
|
|
15
|
+
export * as FunctionProtocol from './FunctionProtocol.ts';
|
|
16
|
+
export * as FeedProtocol from './FeedProtocol.ts';
|
package/src/indexing.test.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { describe, expect, test } from 'vitest';
|
|
6
6
|
|
|
7
|
-
import { ObjectPointerVersion, objectPointerCodec } from './indexing.
|
|
7
|
+
import { ObjectPointerVersion, objectPointerCodec } from './indexing.ts';
|
|
8
8
|
|
|
9
9
|
describe('Indexing object pointer codec', () => {
|
|
10
10
|
test('getVersion', async () => {
|
|
@@ -60,8 +60,19 @@ message DeleteFromQueueRequest {
|
|
|
60
60
|
repeated string object_ids = 4;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
message SyncQueueRequest {
|
|
64
|
+
string subspace_tag = 1;
|
|
65
|
+
string space_id = 2;
|
|
66
|
+
string queue_id = 3;
|
|
67
|
+
/// Whether to push local changes to the server. Defaults to true.
|
|
68
|
+
optional bool should_push = 4;
|
|
69
|
+
/// Whether to pull remote changes from the server. Defaults to true.
|
|
70
|
+
optional bool should_pull = 5;
|
|
71
|
+
}
|
|
72
|
+
|
|
63
73
|
service QueueService {
|
|
64
74
|
rpc QueryQueue(QueryQueueRequest) returns (QueueQueryResult);
|
|
65
75
|
rpc InsertIntoQueue(InsertIntoQueueRequest) returns (google.protobuf.Empty);
|
|
66
76
|
rpc DeleteFromQueue(DeleteFromQueueRequest) returns (google.protobuf.Empty);
|
|
77
|
+
rpc SyncQueue(SyncQueueRequest) returns (google.protobuf.Empty);
|
|
67
78
|
}
|
|
@@ -59,7 +59,7 @@ message Module {
|
|
|
59
59
|
optional string id = 8; // TODO(burdon): Ensured FQ (e.g., 'dxos.app.xxx')
|
|
60
60
|
optional string name = 1; // TODO(burdon): Replace with id (or key?)
|
|
61
61
|
optional string type = 2; // TODO(burdon): Define namespace (e.g.,
|
|
62
|
-
// '
|
|
62
|
+
// 'org.dxos.type.frame')
|
|
63
63
|
|
|
64
64
|
// TODO(burdon): Developer info message.
|
|
65
65
|
|
|
@@ -155,8 +155,6 @@ message Runtime {
|
|
|
155
155
|
optional bool enable_vector_indexing = 12;
|
|
156
156
|
|
|
157
157
|
optional EdgeFeatures edge_features = 11;
|
|
158
|
-
|
|
159
|
-
optional bool enable_local_queues = 13;
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
message App {
|
|
@@ -76,9 +76,19 @@ message Message {
|
|
|
76
76
|
/// Maybe be used to address a service at EDGE, but also to address components inside the client.
|
|
77
77
|
optional string service_id = 20;
|
|
78
78
|
|
|
79
|
+
optional TraceContext trace_context = 21;
|
|
80
|
+
|
|
79
81
|
optional google.protobuf.Any payload = 100;
|
|
80
82
|
}
|
|
81
83
|
|
|
84
|
+
/// W3C Trace Context propagation (https://www.w3.org/TR/trace-context/).
|
|
85
|
+
message TraceContext {
|
|
86
|
+
/// W3C `traceparent` header value (e.g. "00-<trace-id>-<parent-id>-<trace-flags>").
|
|
87
|
+
string traceparent = 1;
|
|
88
|
+
/// W3C `tracestate` header value; vendor-specific key-value pairs.
|
|
89
|
+
optional string tracestate = 2;
|
|
90
|
+
}
|
|
91
|
+
|
|
82
92
|
//
|
|
83
93
|
// Swarms are used to publish and subscribe to messages based on a topic.
|
|
84
94
|
//
|