@dxos/protocols 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
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 +33 -3
- 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 +46 -37
- 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/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/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 +39 -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 +27 -2
- 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 +165 -0
- package/dist/src/edge/edge.d.ts.map +1 -1
- package/dist/src/edge/edge.js +13 -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 +1008 -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/echo/metadata.d.ts +4 -0
- 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/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 +15 -1
- package/dist/src/proto/gen/dxos/halo/credentials.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/credentials.js +9 -0
- package/dist/src/proto/gen/dxos/halo/credentials.js.map +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 +28 -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 +77 -40
- 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 +9 -2
- 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 +49 -3
- 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 +120 -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 +9 -1
- package/src/proto/dxos/config.proto +1 -3
- package/src/proto/dxos/echo/metadata.proto +3 -0
- package/src/proto/dxos/edge/messenger.proto +10 -0
- package/src/proto/dxos/halo/credentials.proto +15 -0
- package/src/proto/gen/dxos/client/services.ts +1008 -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/echo/metadata.ts +4 -0
- package/src/proto/gen/dxos/edge/messenger.ts +24 -0
- package/src/proto/gen/dxos/halo/credentials.ts +15 -1
- package/src/proto/gen/google/protobuf.ts +326 -40
- package/src/proto/gen/index.ts +29 -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/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
|
@@ -8,11 +8,25 @@ import { BaseError } from '@dxos/errors';
|
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { SpaceId } from '@dxos/keys';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* HTTP header sent on every Edge request to classify traffic for metering.
|
|
13
|
+
*/
|
|
14
|
+
export const EDGE_CLIENT_TAG_HEADER = 'X-DXOS-Client-Tag';
|
|
15
|
+
|
|
11
16
|
// TODO(burdon): Rename EdgerRouterEndpoint.
|
|
12
17
|
// If we would rename it, we need to be careful to not break composer production.
|
|
13
18
|
export enum EdgeService {
|
|
14
19
|
AUTOMERGE_REPLICATOR = 'automerge-replicator',
|
|
20
|
+
/**
|
|
21
|
+
* Control feed replicator (hypercore append only logs) for the space.
|
|
22
|
+
*/
|
|
23
|
+
// TODO(mykola): Remove once we migrate to keyhive for access control.
|
|
15
24
|
FEED_REPLICATOR = 'feed-replicator',
|
|
25
|
+
/**
|
|
26
|
+
* Feed replicator (ordered data list) for the space.
|
|
27
|
+
*/
|
|
28
|
+
// TODO(mykola): Rename to FEED_REPLICATOR when we migrate to keyhive for access control.
|
|
29
|
+
QUEUE_REPLICATOR = 'queue-replicator',
|
|
16
30
|
SWARM = 'swarm',
|
|
17
31
|
SIGNAL = 'signal',
|
|
18
32
|
STATUS = 'status',
|
|
@@ -482,3 +496,109 @@ export const EdgeHttpErrorCodec = Object.freeze({
|
|
|
482
496
|
return ErrorCodec.decode(body.error);
|
|
483
497
|
},
|
|
484
498
|
});
|
|
499
|
+
|
|
500
|
+
//
|
|
501
|
+
// Data management.
|
|
502
|
+
//
|
|
503
|
+
|
|
504
|
+
export type ListSpacesRequest = { limit?: number; cursor?: string; order?: 'asc' | 'desc' };
|
|
505
|
+
export type ListSpacesResponse = {
|
|
506
|
+
spaces: SpaceActivityEntry[];
|
|
507
|
+
cursor?: string;
|
|
508
|
+
limit: number;
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
export type ListActiveIdentitiesRequest = { cursor?: string; limit?: number };
|
|
512
|
+
export type ListActiveIdentitiesResponse = {
|
|
513
|
+
identities: {
|
|
514
|
+
identityKey: string;
|
|
515
|
+
haloSpaceId: string | null;
|
|
516
|
+
createdAt: string | null;
|
|
517
|
+
agentKey: string | null;
|
|
518
|
+
hasRecovery: boolean;
|
|
519
|
+
}[];
|
|
520
|
+
cursor?: string;
|
|
521
|
+
complete: boolean;
|
|
522
|
+
totalCount: number;
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
export type InspectSpaceRequest = { spaceId: string };
|
|
526
|
+
export type InspectSpaceResponse = {
|
|
527
|
+
spaceId: string;
|
|
528
|
+
metadata: { createdAt: string; identityKey?: string; status?: 'active' | 'deleting' } | null;
|
|
529
|
+
members: {
|
|
530
|
+
count: number;
|
|
531
|
+
list: { identityKey: string; role?: string; agentKey?: string }[];
|
|
532
|
+
};
|
|
533
|
+
controlFeeds: {
|
|
534
|
+
replicationProgress: { [feedKey: string]: { replicated: number; processed: number } };
|
|
535
|
+
};
|
|
536
|
+
echo: {
|
|
537
|
+
dataFeeds: {
|
|
538
|
+
count: number;
|
|
539
|
+
totalBlocks: number;
|
|
540
|
+
byNamespace: { namespace: string; feeds: { feedId: string; blockCount: number }[] }[];
|
|
541
|
+
};
|
|
542
|
+
documentCount: number;
|
|
543
|
+
objectCount: number;
|
|
544
|
+
deletedObjectCount: number;
|
|
545
|
+
indexedDocumentCount: number;
|
|
546
|
+
objectsByType: { typeDxn: string; count: number }[];
|
|
547
|
+
indexerStatus: {
|
|
548
|
+
indexingInProgress: boolean;
|
|
549
|
+
cursors: { indexName: string; sourceName: string; resourceId: string | null; cursor: string | number }[];
|
|
550
|
+
totalChanges: number;
|
|
551
|
+
};
|
|
552
|
+
};
|
|
553
|
+
usageInLast30Days: {
|
|
554
|
+
lastActivity: string | null;
|
|
555
|
+
wsEvents: number;
|
|
556
|
+
httpEvents: number;
|
|
557
|
+
totalEvents: number;
|
|
558
|
+
} | null;
|
|
559
|
+
durableObjects: { type: string; doId: string }[];
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
export type InspectIdentityRequest = { identityKey: string };
|
|
563
|
+
export type InspectIdentityResponse = {
|
|
564
|
+
identityKey: string;
|
|
565
|
+
agentKey: string | null;
|
|
566
|
+
haloSpaceId: string | null;
|
|
567
|
+
hasRecovery: boolean;
|
|
568
|
+
routerDoId: string;
|
|
569
|
+
agentDoId: string | null;
|
|
570
|
+
ownedFunctions: { id: string; name: string; versionCount: number }[];
|
|
571
|
+
spaces: InspectSpaceResponse[];
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
/** Matches the SerializedSpace format from @dxos/echo-db, extended with spaceId. */
|
|
575
|
+
export type SpaceExportPayload = {
|
|
576
|
+
version: number;
|
|
577
|
+
timestamp: string;
|
|
578
|
+
spaceId: string;
|
|
579
|
+
objects: Record<string, unknown>[];
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
export type SpaceActivityEntry = {
|
|
583
|
+
spaceId: string;
|
|
584
|
+
lastActivity: string;
|
|
585
|
+
totalEvents: number;
|
|
586
|
+
metadata: { createdAt: string; identityKey?: string; status?: 'active' | 'deleting' } | null;
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
export type SpaceExportResult = {
|
|
590
|
+
spaceId: string;
|
|
591
|
+
downloadPath: string;
|
|
592
|
+
downloadUrl: string;
|
|
593
|
+
expiresAt: string;
|
|
594
|
+
objectCount: number;
|
|
595
|
+
sizeBytes: number;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
export type ExportSpaceRequest = { spaceId: string; origin: string };
|
|
599
|
+
|
|
600
|
+
export type DeleteSpaceRequest = { spaceId: string };
|
|
601
|
+
export type DeleteSpaceResponse = { status: string; spaceId: string };
|
|
602
|
+
|
|
603
|
+
export type DeleteIdentityRequest = { identityKey: string };
|
|
604
|
+
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
|
}
|
|
@@ -72,6 +72,7 @@ message Platform {
|
|
|
72
72
|
BROWSER = 0;
|
|
73
73
|
SHARED_WORKER = 1;
|
|
74
74
|
NODE = 2;
|
|
75
|
+
DEDICATED_WORKER = 3;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
PLATFORM_TYPE type = 1;
|
|
@@ -331,6 +332,8 @@ message Space {
|
|
|
331
332
|
optional PipelineState pipeline = 3;
|
|
332
333
|
optional dxos.error.Error error = 4;
|
|
333
334
|
optional dxos.echo.metadata.EdgeReplicationSetting edge_replication = 6;
|
|
335
|
+
repeated string tags = 7;
|
|
336
|
+
dxos.halo.credentials.MembershipPolicy membership_policy = 8;
|
|
334
337
|
|
|
335
338
|
repeated SpaceMember members = 10;
|
|
336
339
|
optional dxos.keys.PublicKey creator = 11;
|
|
@@ -341,6 +344,11 @@ message Space {
|
|
|
341
344
|
|
|
342
345
|
// TODO(burdon): Create type for epoch?
|
|
343
346
|
|
|
347
|
+
message CreateSpaceRequest {
|
|
348
|
+
repeated string tags = 1;
|
|
349
|
+
dxos.halo.credentials.MembershipPolicy membership_policy = 2;
|
|
350
|
+
}
|
|
351
|
+
|
|
344
352
|
message UpdateSpaceRequest {
|
|
345
353
|
dxos.keys.PublicKey space_key = 1;
|
|
346
354
|
|
|
@@ -457,7 +465,7 @@ message ImportSpaceResponse {
|
|
|
457
465
|
}
|
|
458
466
|
|
|
459
467
|
service SpacesService {
|
|
460
|
-
rpc CreateSpace(
|
|
468
|
+
rpc CreateSpace(CreateSpaceRequest) returns (Space);
|
|
461
469
|
rpc UpdateSpace(UpdateSpaceRequest) returns (google.protobuf.Empty);
|
|
462
470
|
rpc QuerySpaces(google.protobuf.Empty) returns (stream QuerySpacesResponse);
|
|
463
471
|
|
|
@@ -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
|
//
|
|
@@ -28,9 +28,18 @@ import "dxos/keys.proto";
|
|
|
28
28
|
// First message written to initial Feed in a new Space.
|
|
29
29
|
//
|
|
30
30
|
|
|
31
|
+
enum MembershipPolicy {
|
|
32
|
+
/// Members can be invited by admins/owners.
|
|
33
|
+
INVITE = 0;
|
|
34
|
+
/// No new members can be added after genesis.
|
|
35
|
+
LOCKED = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
31
38
|
// [ASSERTION]
|
|
32
39
|
message SpaceGenesis {
|
|
33
40
|
dxos.keys.PublicKey space_key = 1; // Feeds belong to Spaces.
|
|
41
|
+
repeated string tags = 2;
|
|
42
|
+
MembershipPolicy membership_policy = 3;
|
|
34
43
|
}
|
|
35
44
|
|
|
36
45
|
//
|
|
@@ -60,6 +69,9 @@ message SpaceMember {
|
|
|
60
69
|
dxos.keys.PublicKey space_key = 1;
|
|
61
70
|
Role role = 2;
|
|
62
71
|
|
|
72
|
+
/// Immutable tags assigned at space creation time.
|
|
73
|
+
repeated string tags = 6;
|
|
74
|
+
|
|
63
75
|
// TODO(burdon): Identity key?
|
|
64
76
|
optional ProfileDocument profile = 3;
|
|
65
77
|
|
|
@@ -163,6 +175,8 @@ enum DeviceType {
|
|
|
163
175
|
UNKNOWN = 0;
|
|
164
176
|
BROWSER = 1;
|
|
165
177
|
NATIVE = 2;
|
|
178
|
+
// TODO(wittjosiah): Rename "agent" to avoid naming collision with AI agents.
|
|
179
|
+
// TODO(wittjosiah): Unknown, Browser, CLI, Desktop, Mobile, Custodian?
|
|
166
180
|
AGENT = 3;
|
|
167
181
|
AGENT_MANAGED = 4;
|
|
168
182
|
MOBILE = 5;
|
|
@@ -188,6 +202,7 @@ message DeviceProfile {
|
|
|
188
202
|
}
|
|
189
203
|
|
|
190
204
|
/// [ASSERTION]: Sets default space for identity.
|
|
205
|
+
/// @deprecated Default space is no longer managed by the SDK. Existing credentials are ignored.
|
|
191
206
|
message DefaultSpace {
|
|
192
207
|
string space_id = 1;
|
|
193
208
|
}
|