@dxos/protocols 0.8.4-main.70d3990 → 0.8.4-main.74a063c4e0
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 +8 -2
- package/dist/src/FunctionProtocol.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts +231 -0
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.d.ts.map +1 -0
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.js +44 -0
- package/dist/src/buf/proto/gen/dxos/client/queue_pb.js.map +1 -0
- 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/echo/metadata_pb.d.ts +6 -0
- package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +12 -2
- package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/query_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/query_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts +55 -9
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.js +15 -5
- package/dist/src/buf/proto/gen/dxos/echo/service_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/google_pb.js.map +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/iframe_pb.d.ts +1 -0
- package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/tracing_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
- package/dist/src/codec.test.js +1 -1
- package/dist/src/edge/EdgeFunctionEnv.d.ts +39 -26
- package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -1
- package/dist/src/edge/edge.d.ts +182 -13
- package/dist/src/edge/edge.d.ts.map +1 -1
- package/dist/src/edge/edge.js +28 -10
- 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/base-errors.d.ts +18 -24
- package/dist/src/errors/base-errors.d.ts.map +1 -1
- package/dist/src/errors/base-errors.js +3 -3
- package/dist/src/errors/base-errors.js.map +1 -1
- package/dist/src/errors/encoding.d.ts +1 -1
- package/dist/src/errors/encoding.d.ts.map +1 -1
- package/dist/src/errors/encoding.js +1 -1
- package/dist/src/errors/encoding.js.map +1 -1
- package/dist/src/errors/errors.d.ts +133 -177
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/errors/errors.js +45 -45
- package/dist/src/errors/errors.js.map +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 -13
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -13
- 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 +990 -852
- 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/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/echo/query.d.ts +17 -1
- package/dist/src/proto/gen/dxos/echo/query.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/query.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/service.d.ts +34 -8
- package/dist/src/proto/gen/dxos/echo/service.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 +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 +36 -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 +19 -15
- package/src/FeedProtocol.ts +320 -0
- package/src/FunctionProtocol.ts +8 -6
- 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 +280 -0
- package/src/buf/proto/gen/dxos/client/services_pb.ts +77 -40
- package/src/buf/proto/gen/dxos/config_pb.ts +1 -1
- 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 +16 -4
- package/src/buf/proto/gen/dxos/echo/service_pb.ts +68 -16
- 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 +2 -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 +50 -28
- package/src/edge/edge.ts +138 -22
- package/src/edge/errors.ts +1 -1
- package/src/edge/index.ts +3 -3
- package/src/errors/base-errors.ts +3 -3
- package/src/errors/encoding.ts +2 -3
- package/src/errors/errors.test.ts +1 -1
- package/src/errors/errors.ts +46 -47
- package/src/errors/helpers.ts +1 -1
- package/src/errors/index.ts +5 -5
- package/src/index.ts +12 -15
- package/src/indexing.test.ts +1 -1
- package/src/proto/dxos/client/queue.proto +78 -0
- package/src/proto/dxos/client/services.proto +9 -1
- package/src/proto/dxos/config.proto +1 -1
- package/src/proto/dxos/echo/metadata.proto +3 -0
- package/src/proto/dxos/echo/query.proto +4 -1
- package/src/proto/dxos/echo/service.proto +27 -6
- package/src/proto/dxos/edge/messenger.proto +10 -0
- package/src/proto/dxos/halo/credentials.proto +15 -0
- package/src/proto/dxos/iframe.proto +1 -0
- package/src/proto/gen/dxos/client/services.ts +990 -852
- 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/echo/query.ts +17 -1
- package/src/proto/gen/dxos/echo/service.ts +33 -8
- 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 +37 -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/query.d.ts +0 -5
- package/dist/src/query.d.ts.map +0 -1
- package/dist/src/query.js +0 -8
- package/dist/src/query.js.map +0 -1
- package/dist/src/queue.d.ts +0 -37
- package/dist/src/queue.d.ts.map +0 -1
- package/dist/src/queue.js +0 -8
- package/dist/src/queue.js.map +0 -1
- package/src/query.ts +0 -8
- package/src/queue.ts +0 -51
|
@@ -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/mesh/muxer.proto (package dxos.mesh.muxer, 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/mesh/presence.proto (package dxos.mesh.presence, 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/mesh/protocol.proto (package dxos.mesh.protocol, syntax proto3)
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2019 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/replicator.proto (package dxos.mesh.replicator, 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/signal.proto (package dxos.mesh.signal, 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/swarm.proto (package dxos.mesh.swarm, 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/admission-discovery.proto (package dxos.mesh.teleport, 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/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,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import { type SpaceId } from '@dxos/keys';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import type * as FeedProtocol from '../FeedProtocol';
|
|
8
|
+
import { type QueryRequest, type QueryResponse } from '../proto/gen/dxos/echo/query';
|
|
9
|
+
import { type CreateDocumentRequest, type CreateDocumentResponse } from '../proto/gen/dxos/echo/service';
|
|
8
10
|
|
|
9
11
|
/*
|
|
10
12
|
|
|
@@ -59,6 +61,7 @@ On Error returns `EdgeEnvelope` with error:
|
|
|
59
61
|
export interface Env {
|
|
60
62
|
QUEUE_SERVICE: QueueService;
|
|
61
63
|
DATA_SERVICE: DataService;
|
|
64
|
+
FUNCTIONS_AI_SERVICE: FunctionsAiService;
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
/**
|
|
@@ -66,26 +69,45 @@ export interface Env {
|
|
|
66
69
|
*
|
|
67
70
|
* NOTE: Currently unused in functions.
|
|
68
71
|
*/
|
|
69
|
-
export interface
|
|
72
|
+
export interface TraceContext {}
|
|
70
73
|
|
|
71
74
|
/**
|
|
72
75
|
* Database API for other CF services like functions.
|
|
73
76
|
*/
|
|
74
77
|
export interface DataService {
|
|
75
|
-
getSpaceMeta(ctx:
|
|
76
|
-
getDocument(ctx:
|
|
78
|
+
getSpaceMeta(ctx: TraceContext, spaceId: SpaceId): Promise<RpcResult<SpaceMeta | undefined>>;
|
|
79
|
+
getDocument(ctx: TraceContext, spaceId: SpaceId, documentId: string): Promise<RpcResult<RawDocument | undefined>>;
|
|
77
80
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
queryReferences(ctx: ExecutionContext, request: QueryReferencesRequest): Promise<QueryReferencesResponse>;
|
|
81
|
+
execQuery(ctx: TraceContext, request: QueryRequest): Promise<RpcResult<QueryResponse>>;
|
|
82
|
+
createDocument(ctx: TraceContext, request: CreateDocumentRequest): Promise<RpcResult<CreateDocumentResponse>>;
|
|
81
83
|
|
|
82
84
|
// TODO(burdon): Update? Return DocumentEntry?
|
|
83
|
-
changeDocument(ctx:
|
|
85
|
+
changeDocument(ctx: TraceContext, spaceId: SpaceId, documentId: string, changes: Uint8Array): Promise<void>;
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
export interface QueueService {
|
|
87
|
-
|
|
88
|
-
|
|
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>>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* FunctionsAiService API for other CF services like functions.
|
|
105
|
+
*/
|
|
106
|
+
export interface FunctionsAiService {
|
|
107
|
+
/**
|
|
108
|
+
* Enables proxying HTTP requests to the AI service from other workers.
|
|
109
|
+
*/
|
|
110
|
+
fetch(request: Request): Promise<RpcResult<Response>>;
|
|
89
111
|
}
|
|
90
112
|
|
|
91
113
|
export type ObjectDocumentJson = {
|
|
@@ -101,20 +123,6 @@ export type SpaceMeta = {
|
|
|
101
123
|
rootDocumentId: string;
|
|
102
124
|
};
|
|
103
125
|
|
|
104
|
-
export type QueryRequest = {
|
|
105
|
-
spaceId: string;
|
|
106
|
-
type?: string;
|
|
107
|
-
where?: Record<string, any>;
|
|
108
|
-
objectIds?: string[];
|
|
109
|
-
cursor?: string;
|
|
110
|
-
limit?: number;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export type QueryResponse = {
|
|
114
|
-
results: ObjectSnapshot[];
|
|
115
|
-
cursor?: string;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
126
|
/**
|
|
119
127
|
* TODO(yaroslav): make Indexer return EchoObject after create() can properly reconstruct an object
|
|
120
128
|
* from this structure (meta, id and type aren't handled properly)
|
|
@@ -159,7 +167,21 @@ export type QueryReferencesResponse = {
|
|
|
159
167
|
references: ObjectReference[];
|
|
160
168
|
};
|
|
161
169
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
170
|
+
/**
|
|
171
|
+
* Cloudflare Workers RPC returns objects/arrays/stubs that may need to be explicitly disposed.
|
|
172
|
+
*
|
|
173
|
+
* See: https://developers.cloudflare.com/workers/runtime-apis/rpc/lifecycle/
|
|
174
|
+
*/
|
|
175
|
+
export interface RpcDisposable {
|
|
176
|
+
/**
|
|
177
|
+
* Disposes the RPC stub / returned value and releases any server-side resources it references.
|
|
178
|
+
*/
|
|
179
|
+
[Symbol.dispose](): void;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Wraps a return type so that any non-primitive value is marked as disposable.
|
|
184
|
+
*
|
|
185
|
+
* This models Workers RPC behavior where any returned object (including arrays) gets a disposer added.
|
|
186
|
+
*/
|
|
187
|
+
export type RpcResult<T> = T extends object ? T & RpcDisposable : T;
|
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',
|
|
@@ -23,13 +37,15 @@ export type EdgeSuccess<T> = {
|
|
|
23
37
|
data: T;
|
|
24
38
|
};
|
|
25
39
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
message
|
|
29
|
-
context
|
|
30
|
-
stack
|
|
31
|
-
cause
|
|
32
|
-
};
|
|
40
|
+
const _SerializedError = Schema.Struct({
|
|
41
|
+
name: Schema.optional(Schema.String),
|
|
42
|
+
message: Schema.optional(Schema.String),
|
|
43
|
+
context: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
44
|
+
stack: Schema.optional(Schema.String),
|
|
45
|
+
cause: Schema.optional(Schema.suspend(() => SerializedError)),
|
|
46
|
+
});
|
|
47
|
+
export interface SerializedError extends Schema.Schema.Type<typeof _SerializedError> {}
|
|
48
|
+
export const SerializedError: Schema.Schema<SerializedError, SerializedError, never> = _SerializedError;
|
|
33
49
|
|
|
34
50
|
export type EdgeErrorData = { type: string } & Record<string, any>;
|
|
35
51
|
|
|
@@ -37,11 +53,6 @@ export type EdgeErrorData = { type: string } & Record<string, any>;
|
|
|
37
53
|
* This is the shape of the error response from the Edge service,
|
|
38
54
|
* when the error is gracefully handled, the Response will be an object with this shape and have status code 200.
|
|
39
55
|
*/
|
|
40
|
-
// TODO(dmaretskyi): Refactor this type to just be { success: false, error: SerializedError }
|
|
41
|
-
// reason -> error.message
|
|
42
|
-
// cause -> error.cause
|
|
43
|
-
// data.type -> error.code
|
|
44
|
-
// ...data -> error.context
|
|
45
56
|
export type EdgeFailure = {
|
|
46
57
|
/**
|
|
47
58
|
* Branded Type.
|
|
@@ -243,20 +254,19 @@ export type UploadFunctionRequest = {
|
|
|
243
254
|
* Runtime cannot be changed once the function was deployed.
|
|
244
255
|
* @default Runtime.WORKERS_FOR_PLATFORMS
|
|
245
256
|
*/
|
|
246
|
-
runtime?:
|
|
257
|
+
runtime?: FunctionRuntimeKind;
|
|
247
258
|
};
|
|
248
259
|
|
|
249
260
|
/**
|
|
250
261
|
* Note: Do not change the values of these enums, this values are stored in the FunctionVersions database.
|
|
251
262
|
*/
|
|
252
|
-
export
|
|
263
|
+
export const FunctionRuntimeKind = Schema.Enums({
|
|
253
264
|
// https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
|
|
254
|
-
WORKERS_FOR_PLATFORMS
|
|
265
|
+
WORKERS_FOR_PLATFORMS: 'WORKERS_FOR_PLATFORMS',
|
|
255
266
|
// https://developers.cloudflare.com/workers/runtime-apis/bindings/worker-loader/
|
|
256
|
-
WORKER_LOADER
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
267
|
+
WORKER_LOADER: 'WORKER_LOADER',
|
|
268
|
+
});
|
|
269
|
+
export type FunctionRuntimeKind = Schema.Schema.Type<typeof FunctionRuntimeKind>;
|
|
260
270
|
|
|
261
271
|
export type UploadFunctionResponseBody = {
|
|
262
272
|
functionId: string;
|
|
@@ -419,15 +429,15 @@ const MAX_ERROR_DEPTH = 3;
|
|
|
419
429
|
*/
|
|
420
430
|
export const ErrorCodec = Object.freeze({
|
|
421
431
|
encode: (err: Error, depth: number = 0): SerializedError => ({
|
|
422
|
-
|
|
432
|
+
name: 'name' in err ? err.name : (err as any).code || 'Error',
|
|
423
433
|
message: err.message,
|
|
424
434
|
stack: err.stack,
|
|
425
435
|
cause: err.cause instanceof Error && depth < MAX_ERROR_DEPTH ? ErrorCodec.encode(err.cause, depth + 1) : undefined,
|
|
426
436
|
}),
|
|
427
437
|
decode: (serializedError: SerializedError, depth: number = 0): Error => {
|
|
428
438
|
let err: Error;
|
|
429
|
-
if (typeof serializedError.
|
|
430
|
-
err = new BaseError(serializedError.
|
|
439
|
+
if (typeof serializedError.name === 'string') {
|
|
440
|
+
err = new BaseError(serializedError.name, {
|
|
431
441
|
message: serializedError.message ?? 'Unknown error',
|
|
432
442
|
cause:
|
|
433
443
|
serializedError.cause && depth < MAX_ERROR_DEPTH
|
|
@@ -486,3 +496,109 @@ export const EdgeHttpErrorCodec = Object.freeze({
|
|
|
486
496
|
return ErrorCodec.decode(body.error);
|
|
487
497
|
},
|
|
488
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';
|
|
@@ -12,15 +12,15 @@ import { BaseError } from '@dxos/errors';
|
|
|
12
12
|
* User facing API Errors.
|
|
13
13
|
* E.g., something was misconfigured.
|
|
14
14
|
*/
|
|
15
|
-
export class ApiError extends BaseError.extend('
|
|
15
|
+
export class ApiError extends BaseError.extend('ApiError') {}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Internal system errors.
|
|
19
19
|
* E.g., unexpected/unrecoverable runtime error.
|
|
20
20
|
*/
|
|
21
|
-
export class SystemError extends BaseError.extend('
|
|
21
|
+
export class SystemError extends BaseError.extend('SystemError') {}
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Database errors.
|
|
25
25
|
*/
|
|
26
|
-
export class DatabaseError extends BaseError.extend('
|
|
26
|
+
export class DatabaseError extends BaseError.extend('DatabaseError') {}
|
package/src/errors/encoding.ts
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.
|
|
6
|
-
|
|
7
|
-
import { reconstructError } from './helpers.js';
|
|
5
|
+
import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.ts';
|
|
6
|
+
import { reconstructError } from './helpers.ts';
|
|
8
7
|
|
|
9
8
|
export const encodeError = (err: any): SerializedErrorProto => {
|
|
10
9
|
if (typeof err === 'object' && err?.message) {
|