@dxos/protocols 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5
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 +82 -0
- package/dist/src/FunctionProtocol.d.ts.map +1 -0
- package/dist/src/FunctionProtocol.js +4 -0
- package/dist/src/FunctionProtocol.js.map +1 -0
- package/dist/src/automerge.d.ts +8 -0
- package/dist/src/automerge.d.ts.map +1 -1
- package/dist/src/automerge.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/agent/dashboard_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/agent/dashboard_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/agent/echo-proxy_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/agent/echo-proxy_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/agent/epoch_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/agent/epoch_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/agent/functions_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/agent/functions_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/bot_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/bot_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/client/invitation_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/client/invitation_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/client/logging_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/client/logging_pb.js +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 +129 -22
- 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 +90 -54
- 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 +142 -7
- package/dist/src/buf/proto/gen/dxos/config_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/config_pb.js +78 -2
- package/dist/src/buf/proto/gen/dxos/config_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/devtools/diagnostics_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/devtools/diagnostics_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/devtools/host_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/devtools/host_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/devtools/swarm_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/devtools/swarm_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/blob_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/blob_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/feed_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/feed_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/filter_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/filter_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/indexing_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/indexing_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.d.ts +7 -1
- 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 +2 -2
- package/dist/src/buf/proto/gen/dxos/echo/metadata_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/model/document_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/model/document_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/model/messenger_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/model/messenger_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/model/text_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/model/text_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/object_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/object_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/query_pb.d.ts +13 -3
- 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 +2 -2
- 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 +71 -10
- 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 +16 -6
- package/dist/src/buf/proto/gen/dxos/echo/service_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/snapshot_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/snapshot_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/timeframe_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/echo/timeframe_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/edge/calls_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/edge/calls_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.d.ts +29 -1
- 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 +11 -6
- package/dist/src/buf/proto/gen/dxos/edge/messenger_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/edge/signal_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/edge/signal_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/error_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/error_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/field_options_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/field_options_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/google_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/google_pb.js +2 -2
- package/dist/src/buf/proto/gen/dxos/google_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/gravity_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/gravity_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials/auth_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials/auth_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials/greet_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials/greet_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials/identity_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials/identity_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.d.ts +40 -1
- 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 +28 -3
- package/dist/src/buf/proto/gen/dxos/halo/credentials_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/invitations_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/keyring_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/keyring_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/keys_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/keys_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/signed_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/halo/signed_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts +2 -11
- package/dist/src/buf/proto/gen/dxos/iframe_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/iframe_pb.js +2 -2
- package/dist/src/buf/proto/gen/dxos/iframe_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/keys_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/keys_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/bridge_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/bridge_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/broadcast_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/broadcast_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/messaging_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/messaging_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/muxer_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/muxer_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/presence_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/presence_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/protocol_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/protocol_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/replicator_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/replicator_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/signal_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/signal_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/swarm_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/swarm_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/control_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/control_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/registry_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/registry_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts +25 -1
- package/dist/src/buf/proto/gen/dxos/rpc_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/rpc_pb.js +13 -8
- package/dist/src/buf/proto/gen/dxos/rpc_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/service/agentmanager_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/service/agentmanager_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/service/publisher_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/service/publisher_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/service/supervisor_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/service/supervisor_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/service/tunnel_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/service/tunnel_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts +1 -139
- package/dist/src/buf/proto/gen/dxos/tracing_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/tracing_pb.js +11 -45
- package/dist/src/buf/proto/gen/dxos/tracing_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/type_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/type_pb.js +1 -1
- package/dist/src/buf/proto/gen/dxos/value_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/dxos/value_pb.js +1 -1
- package/dist/src/buf/proto/gen/example/testing/data_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/example/testing/data_pb.js +1 -1
- package/dist/src/buf/proto/gen/example/testing/rpc_pb.d.ts +1 -1
- package/dist/src/buf/proto/gen/example/testing/rpc_pb.js +1 -1
- package/dist/src/codec.test.js +1 -1
- package/dist/src/edge/EdgeFunctionEnv.d.ts +108 -0
- package/dist/src/edge/EdgeFunctionEnv.d.ts.map +1 -0
- package/dist/src/edge/EdgeFunctionEnv.js +4 -0
- package/dist/src/edge/EdgeFunctionEnv.js.map +1 -0
- package/dist/src/edge/edge.d.ts +511 -0
- package/dist/src/edge/edge.d.ts.map +1 -0
- package/dist/src/edge/edge.js +173 -0
- package/dist/src/edge/edge.js.map +1 -0
- package/dist/src/edge/errors.d.ts +29 -0
- package/dist/src/edge/errors.d.ts.map +1 -0
- package/dist/src/edge/errors.js +69 -0
- package/dist/src/edge/errors.js.map +1 -0
- package/dist/src/edge/index.d.ts +5 -0
- package/dist/src/edge/index.d.ts.map +1 -0
- package/dist/src/edge/index.js +8 -0
- package/dist/src/edge/index.js.map +1 -0
- package/dist/src/edge/registry.d.ts +127 -0
- package/dist/src/edge/registry.d.ts.map +1 -0
- package/dist/src/edge/registry.js +79 -0
- package/dist/src/edge/registry.js.map +1 -0
- package/dist/src/errors/base-errors.d.ts +86 -8
- package/dist/src/errors/base-errors.d.ts.map +1 -1
- package/dist/src/errors/base-errors.js +4 -19
- package/dist/src/errors/base-errors.js.map +1 -1
- package/dist/src/errors/encoding.d.ts +2 -2
- 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 +619 -42
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/errors/errors.js +50 -104
- package/dist/src/errors/errors.js.map +1 -1
- package/dist/src/errors/errors.test.js +2 -2
- package/dist/src/errors/errors.test.js.map +1 -1
- package/dist/src/errors/helpers.d.ts +9 -5
- package/dist/src/errors/helpers.d.ts.map +1 -1
- package/dist/src/errors/helpers.js +3 -3
- package/dist/src/errors/helpers.js.map +1 -1
- package/dist/src/errors/index.d.ts +5 -5
- package/dist/src/errors/index.js +5 -5
- package/dist/src/feed-replication.d.ts.map +1 -1
- 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.d.ts +1 -1
- package/dist/src/indexing.d.ts.map +1 -1
- package/dist/src/indexing.js +1 -1
- package/dist/src/indexing.js.map +1 -1
- package/dist/src/indexing.test.js +1 -1
- package/dist/src/invitation.d.ts +1 -1
- package/dist/src/invitation.d.ts.map +1 -1
- package/dist/src/invitation.js +1 -1
- package/dist/src/invitation.js.map +1 -1
- package/dist/src/messenger.d.ts +16 -0
- package/dist/src/messenger.d.ts.map +1 -0
- package/dist/src/messenger.js +4 -0
- package/dist/src/messenger.js.map +1 -0
- package/dist/src/proto/gen/dxos/client/services.d.ts +190 -5
- package/dist/src/proto/gen/dxos/client/services.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/client/services.js +22 -6
- package/dist/src/proto/gen/dxos/client/services.js.map +1 -1
- package/dist/src/proto/gen/dxos/config.d.ts +87 -2
- package/dist/src/proto/gen/dxos/config.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/config.js +26 -0
- 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/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 +43 -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/dxos/iframe.d.ts +0 -10
- package/dist/src/proto/gen/dxos/iframe.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/iframe.js.map +1 -1
- package/dist/src/proto/gen/dxos/rpc.d.ts +19 -0
- package/dist/src/proto/gen/dxos/rpc.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/rpc.js.map +1 -1
- package/dist/src/proto/gen/dxos/tracing.d.ts +0 -79
- package/dist/src/proto/gen/dxos/tracing.d.ts.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 +42 -7
- 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.d.ts.map +1 -1
- package/dist/src/proto/index.js +1 -2
- package/dist/src/proto/index.js.map +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 -17
- package/src/FeedProtocol.ts +320 -0
- package/src/FunctionProtocol.ts +102 -0
- package/src/automerge.ts +8 -0
- package/src/buf/proto/gen/dxos/agent/dashboard_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/agent/echo-proxy_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/agent/epoch_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/agent/functions_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/bot_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/client/invitation_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/client/logging_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/client/queue_pb.ts +280 -0
- package/src/buf/proto/gen/dxos/client/services_pb.ts +191 -62
- package/src/buf/proto/gen/dxos/config_pb.ts +166 -10
- package/src/buf/proto/gen/dxos/devtools/diagnostics_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/devtools/host_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/devtools/swarm_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/blob_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/feed_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/filter_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/indexing_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/metadata_pb.ts +11 -4
- package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/object_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/query_pb.ts +18 -6
- package/src/buf/proto/gen/dxos/echo/service_pb.ts +87 -18
- package/src/buf/proto/gen/dxos/echo/snapshot_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/echo/timeframe_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/edge/calls_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/edge/messenger_pb.ts +41 -8
- package/src/buf/proto/gen/dxos/edge/signal_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/error_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/field_options_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/google_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/gravity_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/halo/credentials/auth_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/halo/credentials/greet_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/halo/credentials/identity_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/halo/credentials_pb.ts +51 -5
- package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/halo/keys_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/halo/signed_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/iframe_pb.ts +5 -16
- package/src/buf/proto/gen/dxos/keys_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/bridge_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/broadcast_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/messaging_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/muxer_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/presence_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/protocol_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/replicator_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/signal_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/swarm_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/teleport/admission-discovery_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/teleport/auth_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/teleport/automerge_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/teleport/blobsync_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/teleport/control_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/teleport/gossip_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/teleport/notarization_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/mesh/teleport/replicator_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/registry_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/rpc_pb.ts +39 -10
- package/src/buf/proto/gen/dxos/service/agentmanager_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/service/publisher_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/service/supervisor_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/service/tunnel_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/tracing_pb.ts +12 -179
- package/src/buf/proto/gen/dxos/type_pb.ts +3 -3
- package/src/buf/proto/gen/dxos/value_pb.ts +3 -3
- package/src/buf/proto/gen/example/testing/data_pb.ts +3 -3
- package/src/buf/proto/gen/example/testing/rpc_pb.ts +3 -3
- package/src/codec.test.ts +1 -1
- package/src/edge/EdgeFunctionEnv.ts +191 -0
- package/src/edge/edge.ts +604 -0
- package/src/edge/errors.ts +85 -0
- package/src/edge/index.ts +8 -0
- package/src/edge/registry.ts +96 -0
- package/src/errors/base-errors.ts +4 -20
- package/src/errors/encoding.ts +2 -2
- package/src/errors/errors.test.ts +2 -2
- package/src/errors/errors.ts +57 -123
- package/src/errors/helpers.ts +6 -6
- package/src/errors/index.ts +5 -5
- package/src/feed-replication.ts +1 -0
- package/src/index.ts +12 -12
- package/src/indexing.test.ts +1 -1
- package/src/indexing.ts +1 -1
- package/src/invitation.ts +1 -1
- package/src/messenger.ts +22 -0
- package/src/proto/dxos/client/queue.proto +78 -0
- package/src/proto/dxos/client/services.proto +39 -4
- package/src/proto/dxos/config.proto +83 -40
- 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 +38 -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 -3
- package/src/proto/dxos/rpc.proto +7 -0
- package/src/proto/dxos/tracing.proto +0 -40
- package/src/proto/gen/dxos/client/services.ts +190 -5
- package/src/proto/gen/dxos/config.ts +87 -2
- 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 +42 -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/dxos/iframe.ts +0 -10
- package/src/proto/gen/dxos/rpc.ts +19 -0
- package/src/proto/gen/dxos/tracing.ts +0 -76
- package/src/proto/gen/google/protobuf.ts +326 -40
- package/src/proto/gen/index.ts +43 -8
- 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/edge-error.d.ts +0 -26
- package/dist/src/edge-error.d.ts.map +0 -1
- package/dist/src/edge-error.js +0 -62
- package/dist/src/edge-error.js.map +0 -1
- package/dist/src/edge.d.ts +0 -198
- package/dist/src/edge.d.ts.map +0 -1
- package/dist/src/edge.js +0 -43
- package/dist/src/edge.js.map +0 -1
- 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 -24
- package/dist/src/queue.d.ts.map +0 -1
- package/dist/src/queue.js +0 -4
- package/dist/src/queue.js.map +0 -1
- package/src/edge-error.ts +0 -79
- package/src/edge.ts +0 -222
- package/src/query.ts +0 -8
- package/src/queue.ts +0 -33
package/src/proto/index.ts
CHANGED
package/src/proto/types.ts
CHANGED
package/src/space-archive.ts
CHANGED
|
@@ -11,8 +11,13 @@ import type { IdentityDid, SpaceId } from '@dxos/keys';
|
|
|
11
11
|
*
|
|
12
12
|
* A tar archive with files:
|
|
13
13
|
* - metadata.json -- JSON-encoded {@link SpaceArchiveMetadata} file.
|
|
14
|
-
* - documents
|
|
14
|
+
* - documents/
|
|
15
15
|
* - <document-id>.bin -- Automerge document.
|
|
16
|
+
* - feeds/
|
|
17
|
+
* - <feed-id>/
|
|
18
|
+
* - metadata.json -- JSON-encoded {@link FeedArchiveMetadata} file.
|
|
19
|
+
* - blocks-0.json -- JSON array of {@link FeedArchiveBlock} (chunks of 100).
|
|
20
|
+
* - blocks-1.json -- ...
|
|
16
21
|
*/
|
|
17
22
|
|
|
18
23
|
/**
|
|
@@ -60,7 +65,71 @@ export interface SpaceArchiveMetadata {
|
|
|
60
65
|
};
|
|
61
66
|
}
|
|
62
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Feed metadata stored in `feeds/<feed-id>/metadata.json`.
|
|
70
|
+
*/
|
|
71
|
+
export interface FeedArchiveMetadata {
|
|
72
|
+
/**
|
|
73
|
+
* Feed identifier.
|
|
74
|
+
*/
|
|
75
|
+
id: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Feed namespace (e.g., 'data', 'trace').
|
|
79
|
+
*/
|
|
80
|
+
namespace: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Feed block stored in `feeds/<feed-id>/blocks-N.json`.
|
|
85
|
+
* Represents a single block from the feed.
|
|
86
|
+
*/
|
|
87
|
+
export interface FeedArchiveBlock {
|
|
88
|
+
/**
|
|
89
|
+
* Actor that produced this block.
|
|
90
|
+
*/
|
|
91
|
+
actorId: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Per-feed monotonic sequence assigned by the actor.
|
|
95
|
+
*/
|
|
96
|
+
sequence: number;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Actor of the immediate predecessor block, if any.
|
|
100
|
+
*/
|
|
101
|
+
prevActorId: string | null;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Sequence of the immediate predecessor block, if any.
|
|
105
|
+
*/
|
|
106
|
+
prevSequence: number | null;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Globally ordered position assigned by a position authority.
|
|
110
|
+
*/
|
|
111
|
+
position: number | null;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Milliseconds since Unix epoch when the block was created.
|
|
115
|
+
*/
|
|
116
|
+
timestamp: number;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Base64-encoded serialized application payload.
|
|
120
|
+
*/
|
|
121
|
+
data: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Number of blocks per chunk file.
|
|
126
|
+
*/
|
|
127
|
+
export const FEED_ARCHIVE_BLOCKS_PER_CHUNK = 100;
|
|
128
|
+
|
|
63
129
|
export const SpaceArchiveFileStructure = {
|
|
64
130
|
metadata: 'metadata.json',
|
|
65
131
|
documents: 'documents',
|
|
132
|
+
feeds: 'feeds',
|
|
133
|
+
feedMetadata: 'metadata.json',
|
|
134
|
+
feedBlocksPrefix: 'blocks-',
|
|
66
135
|
} as const;
|
package/src/types.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { type PublicKey } from '@dxos/keys';
|
|
6
6
|
import { type Timeframe } from '@dxos/timeframe';
|
|
7
7
|
|
|
8
|
-
import { type CredentialsMessage, type FeedMessage } from './proto/gen/dxos/echo/feed.
|
|
9
|
-
import { type EchoObjectBatch } from './proto/gen/dxos/echo/object.
|
|
8
|
+
import { type CredentialsMessage, type FeedMessage } from './proto/gen/dxos/echo/feed.ts';
|
|
9
|
+
import { type EchoObjectBatch } from './proto/gen/dxos/echo/object.ts';
|
|
10
10
|
|
|
11
11
|
// TODO(burdon): Replace with proto definition.
|
|
12
12
|
export type FeedMeta = {
|
package/dist/src/edge-error.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type EdgeErrorData, type EdgeHttpFailure } from './edge';
|
|
2
|
-
export declare class EdgeCallFailedError extends Error {
|
|
3
|
-
static fromProcessingFailureCause(cause: Error): EdgeCallFailedError;
|
|
4
|
-
static fromHttpFailure(response: Response): EdgeCallFailedError;
|
|
5
|
-
static fromUnsuccessfulResponse(response: Response, body: EdgeHttpFailure): EdgeCallFailedError;
|
|
6
|
-
readonly reason: string;
|
|
7
|
-
readonly errorData?: EdgeErrorData;
|
|
8
|
-
readonly isRetryable?: boolean;
|
|
9
|
-
readonly retryAfterMs?: number;
|
|
10
|
-
constructor(args: {
|
|
11
|
-
reason: string;
|
|
12
|
-
isRetryable?: boolean;
|
|
13
|
-
errorData?: EdgeErrorData;
|
|
14
|
-
retryAfterMs?: number;
|
|
15
|
-
cause?: Error;
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
export declare class EdgeAuthChallengeError extends EdgeCallFailedError {
|
|
19
|
-
readonly challenge: string;
|
|
20
|
-
constructor(challenge: string, errorData: EdgeErrorData);
|
|
21
|
-
}
|
|
22
|
-
export declare const createRetryableHttpFailure: (args: {
|
|
23
|
-
reason: any;
|
|
24
|
-
retryAfterSeconds: number;
|
|
25
|
-
}) => Response;
|
|
26
|
-
//# sourceMappingURL=edge-error.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edge-error.d.ts","sourceRoot":"","sources":["../../src/edge-error.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAElE,qBAAa,mBAAoB,SAAQ,KAAK;WAC9B,0BAA0B,CAAC,KAAK,EAAE,KAAK,GAAG,mBAAmB;WAQ7D,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,mBAAmB;WAQxD,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,GAAG,mBAAmB;IAStG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEnB,IAAI,EAAE;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,KAAK,CAAC;KACf;CAOF;AAED,qBAAa,sBAAuB,SAAQ,mBAAmB;aAE3C,SAAS,EAAE,MAAM;gBAAjB,SAAS,EAAE,MAAM,EACjC,SAAS,EAAE,aAAa;CAI3B;AAOD,eAAO,MAAM,0BAA0B,GAAI,MAAM;IAAE,MAAM,EAAE,GAAG,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,aAI1F,CAAC"}
|
package/dist/src/edge-error.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
export class EdgeCallFailedError extends Error {
|
|
5
|
-
static fromProcessingFailureCause(cause) {
|
|
6
|
-
return new EdgeCallFailedError({
|
|
7
|
-
reason: 'Error processing request.',
|
|
8
|
-
isRetryable: true,
|
|
9
|
-
cause,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
static fromHttpFailure(response) {
|
|
13
|
-
return new EdgeCallFailedError({
|
|
14
|
-
reason: `HTTP code ${response.status}: ${response.statusText}.`,
|
|
15
|
-
isRetryable: isRetryableCode(response.status),
|
|
16
|
-
retryAfterMs: getRetryAfterMillis(response),
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
static fromUnsuccessfulResponse(response, body) {
|
|
20
|
-
return new EdgeCallFailedError({
|
|
21
|
-
reason: body.reason,
|
|
22
|
-
errorData: body.errorData,
|
|
23
|
-
isRetryable: body.errorData == null && response.headers.has('Retry-After'),
|
|
24
|
-
retryAfterMs: getRetryAfterMillis(response),
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
reason;
|
|
28
|
-
errorData;
|
|
29
|
-
isRetryable;
|
|
30
|
-
retryAfterMs;
|
|
31
|
-
constructor(args) {
|
|
32
|
-
super(args.reason, { cause: args.cause });
|
|
33
|
-
this.reason = args.reason;
|
|
34
|
-
this.errorData = args.errorData;
|
|
35
|
-
this.retryAfterMs = args.retryAfterMs;
|
|
36
|
-
this.isRetryable = Boolean(args.isRetryable);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export class EdgeAuthChallengeError extends EdgeCallFailedError {
|
|
40
|
-
challenge;
|
|
41
|
-
constructor(challenge, errorData) {
|
|
42
|
-
super({ reason: 'Auth challenge.', errorData, isRetryable: false });
|
|
43
|
-
this.challenge = challenge;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
const getRetryAfterMillis = (response) => {
|
|
47
|
-
const retryAfter = Number(response.headers.get('Retry-After'));
|
|
48
|
-
return Number.isNaN(retryAfter) || retryAfter === 0 ? undefined : retryAfter * 1000;
|
|
49
|
-
};
|
|
50
|
-
export const createRetryableHttpFailure = (args) => {
|
|
51
|
-
return new Response(JSON.stringify({ success: false, reason: args.reason }), {
|
|
52
|
-
headers: { 'Retry-After': String(args.retryAfterSeconds) },
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
const isRetryableCode = (status) => {
|
|
56
|
-
if (status === 501) {
|
|
57
|
-
// Not Implemented
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
return !(status >= 400 && status < 500);
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=edge-error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edge-error.js","sourceRoot":"","sources":["../../src/edge-error.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAIF,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACrC,MAAM,CAAC,0BAA0B,CAAC,KAAY;QACnD,OAAO,IAAI,mBAAmB,CAAC;YAC7B,MAAM,EAAE,2BAA2B;YACnC,WAAW,EAAE,IAAI;YACjB,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,QAAkB;QAC9C,OAAO,IAAI,mBAAmB,CAAC;YAC7B,MAAM,EAAE,aAAa,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,GAAG;YAC/D,WAAW,EAAE,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC7C,YAAY,EAAE,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MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC;AACtF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,IAAgD,EAAE,EAAE;IAC7F,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE;QAC3E,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;KAC3D,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,MAAc,EAAE,EAAE;IACzC,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,kBAAkB;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CAAC,CAAC,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG,CAAC,CAAC;AAC1C,CAAC,CAAC"}
|
package/dist/src/edge.d.ts
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { SpaceId } from '@dxos/keys';
|
|
3
|
-
export declare enum EdgeService {
|
|
4
|
-
AUTOMERGE_REPLICATOR = "automerge-replicator",
|
|
5
|
-
FEED_REPLICATOR = "feed-replicator",
|
|
6
|
-
SWARM = "swarm",
|
|
7
|
-
SIGNAL = "signal"
|
|
8
|
-
}
|
|
9
|
-
export type EdgeHttpSuccess<T> = {
|
|
10
|
-
success: true;
|
|
11
|
-
data: T;
|
|
12
|
-
};
|
|
13
|
-
export type EdgeErrorData = {
|
|
14
|
-
type: string;
|
|
15
|
-
} & Record<string, any>;
|
|
16
|
-
export type EdgeHttpFailure = {
|
|
17
|
-
success: false;
|
|
18
|
-
/**
|
|
19
|
-
* An explanation of why the call failed. Used mostly for logging and monitoring.
|
|
20
|
-
*/
|
|
21
|
-
reason: string;
|
|
22
|
-
/**
|
|
23
|
-
* Information that can be used to retry the request such that it will succeed, for example:
|
|
24
|
-
* 1. { type: 'auth_required', challenge: string }
|
|
25
|
-
* Requires retrying the request with challenge signature included.
|
|
26
|
-
* 2. { type: 'user_confirmation_required', dialog: { title: string, message: string, confirmation_payload: string } }
|
|
27
|
-
* Requires showing a confirmation dialog to a user and retrying the request with confirmation_payload included
|
|
28
|
-
* if the user confirms.
|
|
29
|
-
* When errorData is returned simply retrying the request won't have any effect.
|
|
30
|
-
* EdgeHttpClient should parse well-known errorData into Error types and throw.
|
|
31
|
-
*/
|
|
32
|
-
errorData?: EdgeErrorData;
|
|
33
|
-
};
|
|
34
|
-
export type EdgeHttpResponse<T> = EdgeHttpSuccess<T> | EdgeHttpFailure;
|
|
35
|
-
export type GetNotarizationResponseBody = {
|
|
36
|
-
awaitingNotarization: {
|
|
37
|
-
credentials: string[];
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export type ExecuteWorkflowResponseBody = {
|
|
41
|
-
success: boolean;
|
|
42
|
-
reason?: string;
|
|
43
|
-
output?: any;
|
|
44
|
-
};
|
|
45
|
-
export type PostNotarizationRequestBody = {
|
|
46
|
-
credentials: string[];
|
|
47
|
-
};
|
|
48
|
-
export type JoinSpaceRequest = {
|
|
49
|
-
invitationId: string;
|
|
50
|
-
identityKey: string;
|
|
51
|
-
/**
|
|
52
|
-
* Base64 encoded signed challenge.
|
|
53
|
-
* Used to verify the IdentityKey in case of `invitation.authMethod === Invitation.AuthMethod.KNOWN_PUBLIC_KEY`
|
|
54
|
-
*/
|
|
55
|
-
signature?: string;
|
|
56
|
-
};
|
|
57
|
-
export type JoinSpaceResponseBody = {
|
|
58
|
-
spaceMemberCredential: string;
|
|
59
|
-
spaceGenesisFeedKey: string;
|
|
60
|
-
};
|
|
61
|
-
export type RecoverIdentitySignature = string | {
|
|
62
|
-
signature: string;
|
|
63
|
-
clientDataJson: string;
|
|
64
|
-
authenticatorData: string;
|
|
65
|
-
};
|
|
66
|
-
export type RecoverIdentityRequest = {
|
|
67
|
-
deviceKey: string;
|
|
68
|
-
controlFeedKey: string;
|
|
69
|
-
lookupKey?: string;
|
|
70
|
-
signature?: RecoverIdentitySignature;
|
|
71
|
-
token?: string;
|
|
72
|
-
};
|
|
73
|
-
export type RecoverIdentityResponseBody = {
|
|
74
|
-
identityKey: string;
|
|
75
|
-
haloSpaceKey: string;
|
|
76
|
-
genesisFeedKey: string;
|
|
77
|
-
deviceAuthCredential: string;
|
|
78
|
-
};
|
|
79
|
-
export type CreateAgentRequestBody = {
|
|
80
|
-
identityKey: string;
|
|
81
|
-
haloSpaceId: SpaceId;
|
|
82
|
-
haloSpaceKey: string;
|
|
83
|
-
};
|
|
84
|
-
export type CreateAgentResponseBody = {
|
|
85
|
-
deviceKey: string;
|
|
86
|
-
feedKey: string;
|
|
87
|
-
};
|
|
88
|
-
export type GetAgentStatusResponseBody = {
|
|
89
|
-
agent: {
|
|
90
|
-
deviceKey?: string;
|
|
91
|
-
status: EdgeAgentStatus;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
export type UploadFunctionRequest = {
|
|
95
|
-
name?: string;
|
|
96
|
-
script: string;
|
|
97
|
-
version: string;
|
|
98
|
-
ownerPublicKey: string;
|
|
99
|
-
};
|
|
100
|
-
export type UploadFunctionResponseBody = {
|
|
101
|
-
functionId: string;
|
|
102
|
-
version: string;
|
|
103
|
-
meta: {
|
|
104
|
-
description?: string;
|
|
105
|
-
/**
|
|
106
|
-
* JSON Schema for the input of the function.
|
|
107
|
-
*/
|
|
108
|
-
inputSchema?: object;
|
|
109
|
-
/**
|
|
110
|
-
* JSON Schema for the output of the function.
|
|
111
|
-
*/
|
|
112
|
-
outputSchema?: object;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
export type CreateSpaceRequest = {
|
|
116
|
-
agentKey: string;
|
|
117
|
-
};
|
|
118
|
-
export type CreateSpaceResponseBody = {
|
|
119
|
-
spaceKey: string;
|
|
120
|
-
spaceId: string;
|
|
121
|
-
automergeRoot: string;
|
|
122
|
-
};
|
|
123
|
-
export declare enum EdgeAgentStatus {
|
|
124
|
-
ACTIVE = "active",
|
|
125
|
-
INACTIVE = "inactive",
|
|
126
|
-
NOT_FOUND = "not_found"
|
|
127
|
-
}
|
|
128
|
-
export type EdgeAuthChallenge = {
|
|
129
|
-
type: 'auth_challenge';
|
|
130
|
-
challenge: string;
|
|
131
|
-
};
|
|
132
|
-
export declare enum OAuthProvider {
|
|
133
|
-
GOOGLE = "google",
|
|
134
|
-
BLUESKY = "bluesky"
|
|
135
|
-
}
|
|
136
|
-
export declare const InitiateOAuthFlowRequestSchema: Schema.Struct<{
|
|
137
|
-
provider: Schema.Enums<typeof OAuthProvider>;
|
|
138
|
-
spaceId: Schema.refine<string & {
|
|
139
|
-
__SpaceId: true;
|
|
140
|
-
}, Schema.Schema<string, string, never>>;
|
|
141
|
-
accessTokenId: typeof Schema.String;
|
|
142
|
-
scopes: Schema.mutable<Schema.Array$<typeof Schema.String>>;
|
|
143
|
-
noRefresh: Schema.optional<typeof Schema.Boolean>;
|
|
144
|
-
loginHint: Schema.optional<typeof Schema.String>;
|
|
145
|
-
}>;
|
|
146
|
-
export type InitiateOAuthFlowRequest = Schema.Schema.Type<typeof InitiateOAuthFlowRequestSchema>;
|
|
147
|
-
export type InitiateOAuthFlowResponse = {
|
|
148
|
-
authUrl: string;
|
|
149
|
-
};
|
|
150
|
-
export type OAuthFlowResult = {
|
|
151
|
-
success: true;
|
|
152
|
-
accessToken: string;
|
|
153
|
-
accessTokenId: string;
|
|
154
|
-
} | {
|
|
155
|
-
success: false;
|
|
156
|
-
reason: string;
|
|
157
|
-
};
|
|
158
|
-
export declare enum EdgeWebsocketProtocol {
|
|
159
|
-
V0 = "edge-ws-v0",
|
|
160
|
-
/**
|
|
161
|
-
* Enables message framing and muxing by service-id.
|
|
162
|
-
*/
|
|
163
|
-
V1 = "edge-ws-v1"
|
|
164
|
-
}
|
|
165
|
-
export type EdgeStatus = {
|
|
166
|
-
problems: string[];
|
|
167
|
-
agent: {
|
|
168
|
-
agentStatus?: string;
|
|
169
|
-
agentKey?: string;
|
|
170
|
-
haloSpaceId?: SpaceId;
|
|
171
|
-
fetchError?: string;
|
|
172
|
-
};
|
|
173
|
-
router: {
|
|
174
|
-
connectedDevices?: {
|
|
175
|
-
peerKey: string;
|
|
176
|
-
topics: string[];
|
|
177
|
-
}[];
|
|
178
|
-
metrics?: {
|
|
179
|
-
sentMessages: number;
|
|
180
|
-
receivedMessages: number;
|
|
181
|
-
sentBytes: number;
|
|
182
|
-
receivedBytes: number;
|
|
183
|
-
failedMessages: number;
|
|
184
|
-
failedBytes: number;
|
|
185
|
-
};
|
|
186
|
-
fetchError?: string;
|
|
187
|
-
};
|
|
188
|
-
spaces: {
|
|
189
|
-
data: Record<SpaceId, {
|
|
190
|
-
diagnostics?: any & {
|
|
191
|
-
redFlags: string[];
|
|
192
|
-
};
|
|
193
|
-
fetchError?: string;
|
|
194
|
-
}>;
|
|
195
|
-
fetchError?: string;
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
|
-
//# sourceMappingURL=edge.d.ts.map
|
package/dist/src/edge.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/edge.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,oBAAY,WAAW;IACrB,oBAAoB,yBAAyB;IAC7C,eAAe,oBAAoB;IACnC,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC/B,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,MAAM,MAAM,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gBAAgB,EAAE,MAAM,CAAC;YACzB,SAAS,EAAE,MAAM,CAAC;YAClB,aAAa,EAAE,MAAM,CAAC;YACtB,cAAc,EAAE,MAAM,CAAC;YACvB,WAAW,EAAE,MAAM,CAAC;SACrB,CAAC;QACF,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE;YAAE,WAAW,CAAC,EAAE,GAAG,GAAG;gBAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;aAAE,CAAC;YAAC,UAAU,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAC3F,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC"}
|
package/dist/src/edge.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
import { Schema } from 'effect';
|
|
5
|
-
import { SpaceId } from '@dxos/keys';
|
|
6
|
-
// TODO(burdon): Rename EdgerRouterEndpoint?
|
|
7
|
-
export var EdgeService;
|
|
8
|
-
(function (EdgeService) {
|
|
9
|
-
EdgeService["AUTOMERGE_REPLICATOR"] = "automerge-replicator";
|
|
10
|
-
EdgeService["FEED_REPLICATOR"] = "feed-replicator";
|
|
11
|
-
EdgeService["SWARM"] = "swarm";
|
|
12
|
-
EdgeService["SIGNAL"] = "signal";
|
|
13
|
-
})(EdgeService || (EdgeService = {}));
|
|
14
|
-
export var EdgeAgentStatus;
|
|
15
|
-
(function (EdgeAgentStatus) {
|
|
16
|
-
EdgeAgentStatus["ACTIVE"] = "active";
|
|
17
|
-
EdgeAgentStatus["INACTIVE"] = "inactive";
|
|
18
|
-
EdgeAgentStatus["NOT_FOUND"] = "not_found";
|
|
19
|
-
})(EdgeAgentStatus || (EdgeAgentStatus = {}));
|
|
20
|
-
export var OAuthProvider;
|
|
21
|
-
(function (OAuthProvider) {
|
|
22
|
-
OAuthProvider["GOOGLE"] = "google";
|
|
23
|
-
OAuthProvider["BLUESKY"] = "bluesky";
|
|
24
|
-
})(OAuthProvider || (OAuthProvider = {}));
|
|
25
|
-
export const InitiateOAuthFlowRequestSchema = Schema.Struct({
|
|
26
|
-
provider: Schema.Enums(OAuthProvider),
|
|
27
|
-
spaceId: Schema.String.pipe(Schema.filter(SpaceId.isValid)), // TODO(burdon): Use SpaceId.
|
|
28
|
-
accessTokenId: Schema.String,
|
|
29
|
-
scopes: Schema.mutable(Schema.Array(Schema.String)),
|
|
30
|
-
// Set to true if we don't want periodic token refreshes in background, for cases like account connect
|
|
31
|
-
noRefresh: Schema.optional(Schema.Boolean),
|
|
32
|
-
// Provider-specific (user handle or did for bluesky) hint for auth server resolution
|
|
33
|
-
loginHint: Schema.optional(Schema.String),
|
|
34
|
-
});
|
|
35
|
-
export var EdgeWebsocketProtocol;
|
|
36
|
-
(function (EdgeWebsocketProtocol) {
|
|
37
|
-
EdgeWebsocketProtocol["V0"] = "edge-ws-v0";
|
|
38
|
-
/**
|
|
39
|
-
* Enables message framing and muxing by service-id.
|
|
40
|
-
*/
|
|
41
|
-
EdgeWebsocketProtocol["V1"] = "edge-ws-v1";
|
|
42
|
-
})(EdgeWebsocketProtocol || (EdgeWebsocketProtocol = {}));
|
|
43
|
-
//# sourceMappingURL=edge.js.map
|
package/dist/src/edge.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../src/edge.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,4CAA4C;AAC5C,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4DAA6C,CAAA;IAC7C,kDAAmC,CAAA;IACnC,8BAAe,CAAA;IACf,gCAAiB,CAAA;AACnB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAuID,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,0CAAuB,CAAA;AACzB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAOD,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACrB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1D,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,6BAA6B;IAC1F,aAAa,EAAE,MAAM,CAAC,MAAM;IAC5B,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnD,sGAAsG;IACtG,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;IAC1C,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CAC1C,CAAC,CAAC;AAWH,MAAM,CAAN,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB;;OAEG;IACH,0CAAiB,CAAA;AACnB,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC"}
|
package/dist/src/query.d.ts
DELETED
package/dist/src/query.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/query.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,aAAa,gCAAgC,CAAC"}
|
package/dist/src/query.js
DELETED
package/dist/src/query.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/query.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,6BAA6B,CAAC"}
|
package/dist/src/queue.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ObjectId } from './types.js';
|
|
2
|
-
export type QueueCursor = string & {
|
|
3
|
-
__QueueCursor: never;
|
|
4
|
-
};
|
|
5
|
-
export type QueueQuery = {
|
|
6
|
-
queueId: ObjectId;
|
|
7
|
-
after?: QueueCursor;
|
|
8
|
-
before?: QueueCursor;
|
|
9
|
-
limit?: number;
|
|
10
|
-
reverse?: boolean;
|
|
11
|
-
objectIds?: ObjectId[];
|
|
12
|
-
};
|
|
13
|
-
export type QueryResult = {
|
|
14
|
-
objects: unknown[];
|
|
15
|
-
/**
|
|
16
|
-
* Cursor at the end of the range.
|
|
17
|
-
*/
|
|
18
|
-
nextCursor: QueueCursor | null;
|
|
19
|
-
/**
|
|
20
|
-
* Cursor at the start of the range.
|
|
21
|
-
*/
|
|
22
|
-
prevCursor: QueueCursor | null;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=queue.d.ts.map
|
package/dist/src/queue.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/queue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG;IAAE,aAAa,EAAE,KAAK,CAAA;CAAE,CAAC;AAE5D,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,QAAQ,CAAC;IAElB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG;IAGxB,OAAO,EAAE,OAAO,EAAE,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;CAChC,CAAC"}
|
package/dist/src/queue.js
DELETED
package/dist/src/queue.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/queue.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE"}
|
package/src/edge-error.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type EdgeErrorData, type EdgeHttpFailure } from './edge';
|
|
6
|
-
|
|
7
|
-
export class EdgeCallFailedError extends Error {
|
|
8
|
-
public static fromProcessingFailureCause(cause: Error): EdgeCallFailedError {
|
|
9
|
-
return new EdgeCallFailedError({
|
|
10
|
-
reason: 'Error processing request.',
|
|
11
|
-
isRetryable: true,
|
|
12
|
-
cause,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public static fromHttpFailure(response: Response): EdgeCallFailedError {
|
|
17
|
-
return new EdgeCallFailedError({
|
|
18
|
-
reason: `HTTP code ${response.status}: ${response.statusText}.`,
|
|
19
|
-
isRetryable: isRetryableCode(response.status),
|
|
20
|
-
retryAfterMs: getRetryAfterMillis(response),
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public static fromUnsuccessfulResponse(response: Response, body: EdgeHttpFailure): EdgeCallFailedError {
|
|
25
|
-
return new EdgeCallFailedError({
|
|
26
|
-
reason: body.reason,
|
|
27
|
-
errorData: body.errorData,
|
|
28
|
-
isRetryable: body.errorData == null && response.headers.has('Retry-After'),
|
|
29
|
-
retryAfterMs: getRetryAfterMillis(response),
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
readonly reason: string;
|
|
34
|
-
readonly errorData?: EdgeErrorData;
|
|
35
|
-
readonly isRetryable?: boolean;
|
|
36
|
-
readonly retryAfterMs?: number;
|
|
37
|
-
|
|
38
|
-
constructor(args: {
|
|
39
|
-
reason: string;
|
|
40
|
-
isRetryable?: boolean;
|
|
41
|
-
errorData?: EdgeErrorData;
|
|
42
|
-
retryAfterMs?: number;
|
|
43
|
-
cause?: Error;
|
|
44
|
-
}) {
|
|
45
|
-
super(args.reason, { cause: args.cause });
|
|
46
|
-
this.reason = args.reason;
|
|
47
|
-
this.errorData = args.errorData;
|
|
48
|
-
this.retryAfterMs = args.retryAfterMs;
|
|
49
|
-
this.isRetryable = Boolean(args.isRetryable);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export class EdgeAuthChallengeError extends EdgeCallFailedError {
|
|
54
|
-
constructor(
|
|
55
|
-
public readonly challenge: string,
|
|
56
|
-
errorData: EdgeErrorData,
|
|
57
|
-
) {
|
|
58
|
-
super({ reason: 'Auth challenge.', errorData, isRetryable: false });
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const getRetryAfterMillis = (response: Response) => {
|
|
63
|
-
const retryAfter = Number(response.headers.get('Retry-After'));
|
|
64
|
-
return Number.isNaN(retryAfter) || retryAfter === 0 ? undefined : retryAfter * 1000;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const createRetryableHttpFailure = (args: { reason: any; retryAfterSeconds: number }) => {
|
|
68
|
-
return new Response(JSON.stringify({ success: false, reason: args.reason }), {
|
|
69
|
-
headers: { 'Retry-After': String(args.retryAfterSeconds) },
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const isRetryableCode = (status: number) => {
|
|
74
|
-
if (status === 501) {
|
|
75
|
-
// Not Implemented
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
return !(status >= 400 && status < 500);
|
|
79
|
-
};
|