@dxos/protocols 0.8.4-main.406dc2a → 0.8.4-main.40e3dcdf1b
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/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 +5 -1
- package/dist/src/buf/proto/gen/dxos/client/services_pb.d.ts.map +1 -1
- package/dist/src/buf/proto/gen/dxos/client/services_pb.js +5 -1
- package/dist/src/buf/proto/gen/dxos/client/services_pb.js.map +1 -1
- package/dist/src/buf/proto/gen/dxos/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/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/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 +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.d.ts → edge/edge.d.ts} +117 -10
- package/dist/src/edge/edge.d.ts.map +1 -0
- package/dist/src/edge/edge.js +169 -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 +4 -0
- package/dist/src/edge/index.d.ts.map +1 -0
- package/dist/src/edge/index.js +7 -0
- package/dist/src/edge/index.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 -20
- 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/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 -11
- package/dist/src/index.js.map +1 -1
- package/dist/src/indexing.test.js +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 +982 -854
- 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/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/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 +33 -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/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 +102 -0
- 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 +7 -2
- 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 +1 -1
- package/src/buf/proto/gen/dxos/echo/model/document_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/model/messenger_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/model/text_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/object_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/echo/query_pb.ts +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 +1 -1
- 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 +1 -1
- package/src/buf/proto/gen/dxos/halo/invitations_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/keyring_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/keys_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/halo/signed_pb.ts +1 -1
- package/src/buf/proto/gen/dxos/iframe_pb.ts +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 +187 -0
- package/src/edge/edge.ts +493 -0
- package/src/edge/errors.ts +85 -0
- package/src/edge/index.ts +7 -0
- package/src/errors/base-errors.ts +4 -22
- 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 -7
- 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/messenger.ts +22 -0
- package/src/proto/dxos/client/queue.proto +78 -0
- package/src/proto/dxos/client/services.proto +1 -0
- package/src/proto/dxos/config.proto +1 -1
- package/src/proto/dxos/echo/query.proto +4 -1
- package/src/proto/dxos/echo/service.proto +27 -6
- package/src/proto/dxos/iframe.proto +1 -0
- package/src/proto/gen/dxos/client/services.ts +982 -854
- package/src/proto/gen/dxos/devtools/host.ts +31 -31
- package/src/proto/gen/dxos/echo/query.ts +17 -1
- package/src/proto/gen/dxos/echo/service.ts +33 -8
- package/src/proto/gen/google/protobuf.ts +326 -40
- package/src/proto/gen/index.ts +34 -1
- package/src/proto/index.ts +2 -2
- package/src/proto/types.ts +1 -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 -102
- package/dist/src/edge-error.js.map +0 -1
- package/dist/src/edge.d.ts.map +0 -1
- package/dist/src/edge.js +0 -49
- 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 -28
- 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/edge-error.ts +0 -134
- package/src/edge.ts +0 -279
- package/src/query.ts +0 -8
- package/src/queue.ts +0 -38
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type EdgeErrorData, type EdgeFailure, EdgeHttpErrorCodec, ErrorCodec } from './edge.ts';
|
|
6
|
+
|
|
7
|
+
// TODO(burdon): Reconcile with @dxos/errors.
|
|
8
|
+
/**
|
|
9
|
+
* Error thrown when a call to the Edge service fails.
|
|
10
|
+
* There 3 possible sources of failure:
|
|
11
|
+
* 1. EdgeFailure (JSON body with { success: false }) -> Processing the request failed and was gracefully handled by EDGE service.
|
|
12
|
+
* 2. Http failure (non-ok code) -> The HTTP request failed (e.g. timeout, network error).
|
|
13
|
+
* -> Unhandled exception on EDGE side, EDGE would provide serialized error in the response body.
|
|
14
|
+
* 3. Processing failure -> Unhandled exception on client side while processing the response.
|
|
15
|
+
*/
|
|
16
|
+
export class EdgeCallFailedError extends Error {
|
|
17
|
+
public static fromUnsuccessfulResponse(response: Response, body: EdgeFailure): EdgeCallFailedError {
|
|
18
|
+
const error = new EdgeCallFailedError({
|
|
19
|
+
message: body.message,
|
|
20
|
+
data: body.data,
|
|
21
|
+
isRetryable: body.data == null && response.headers.has('Retry-After'),
|
|
22
|
+
retryAfterMs: getRetryAfterMillis(response),
|
|
23
|
+
cause: body.error ? ErrorCodec.decode(body.error) : undefined,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return error;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public static async fromHttpFailure(response: Response): Promise<EdgeCallFailedError> {
|
|
30
|
+
return new EdgeCallFailedError({
|
|
31
|
+
message: `HTTP code ${response.status}: ${response.statusText}.`,
|
|
32
|
+
isRetryable: isRetryableCode(response.status),
|
|
33
|
+
retryAfterMs: getRetryAfterMillis(response),
|
|
34
|
+
cause: await EdgeHttpErrorCodec.decode(response),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public static fromProcessingFailureCause(cause: Error): EdgeCallFailedError {
|
|
39
|
+
return new EdgeCallFailedError({
|
|
40
|
+
message: 'Error processing request.',
|
|
41
|
+
isRetryable: true,
|
|
42
|
+
cause,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
readonly data?: EdgeErrorData;
|
|
47
|
+
readonly isRetryable?: boolean;
|
|
48
|
+
readonly retryAfterMs?: number;
|
|
49
|
+
|
|
50
|
+
constructor(args: {
|
|
51
|
+
message: string;
|
|
52
|
+
isRetryable?: boolean;
|
|
53
|
+
data?: EdgeErrorData;
|
|
54
|
+
retryAfterMs?: number;
|
|
55
|
+
cause?: Error;
|
|
56
|
+
}) {
|
|
57
|
+
super(args.message, { cause: args.cause });
|
|
58
|
+
this.message = args.message;
|
|
59
|
+
this.data = args.data;
|
|
60
|
+
this.retryAfterMs = args.retryAfterMs;
|
|
61
|
+
this.isRetryable = Boolean(args.isRetryable);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export class EdgeAuthChallengeError extends EdgeCallFailedError {
|
|
66
|
+
constructor(
|
|
67
|
+
public readonly challenge: string,
|
|
68
|
+
data: EdgeErrorData,
|
|
69
|
+
) {
|
|
70
|
+
super({ message: 'Auth challenge.', data, isRetryable: false });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const getRetryAfterMillis = (response: Response) => {
|
|
75
|
+
const retryAfter = Number(response.headers.get('Retry-After'));
|
|
76
|
+
return Number.isNaN(retryAfter) || retryAfter === 0 ? undefined : retryAfter * 1000;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const isRetryableCode = (status: number) => {
|
|
80
|
+
if (status === 501) {
|
|
81
|
+
// Not Implemented
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
return !(status >= 400 && status < 500);
|
|
85
|
+
};
|
|
@@ -2,43 +2,25 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// TODO(dmaretskyi): Reconcile with @dxos/errors
|
|
6
|
-
|
|
7
5
|
/**
|
|
8
6
|
* NOTE: Messages should be sentences (Start with a capital letter and end with a period).
|
|
9
7
|
* Errors can optionally include a JSON context object.
|
|
10
8
|
*/
|
|
11
|
-
|
|
12
|
-
constructor(
|
|
13
|
-
readonly code: string,
|
|
14
|
-
message?: string,
|
|
15
|
-
readonly context?: Record<string, any>,
|
|
16
|
-
) {
|
|
17
|
-
// TODO(dmaretskyi): Error.cause.
|
|
18
|
-
super(message ?? code);
|
|
19
|
-
this.name = code;
|
|
20
|
-
// NOTE: Restores prototype chain (https://stackoverflow.com/a/48342359).
|
|
21
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// TODO(dmaretskyi): Consider common error classes with error codes:
|
|
26
|
-
// throw new SystemError(ERROR_CODE_OUT_OF_MEMORY, 'Out of memory', { a: 1, b: 2 });
|
|
9
|
+
import { BaseError } from '@dxos/errors';
|
|
27
10
|
|
|
28
11
|
/**
|
|
29
12
|
* User facing API Errors.
|
|
30
13
|
* E.g., something was misconfigured.
|
|
31
14
|
*/
|
|
32
|
-
export class ApiError extends BaseError {}
|
|
15
|
+
export class ApiError extends BaseError.extend('ApiError') {}
|
|
33
16
|
|
|
34
17
|
/**
|
|
35
18
|
* Internal system errors.
|
|
36
19
|
* E.g., unexpected/unrecoverable runtime error.
|
|
37
20
|
*/
|
|
38
|
-
export class SystemError extends BaseError {}
|
|
21
|
+
export class SystemError extends BaseError.extend('SystemError') {}
|
|
39
22
|
|
|
40
23
|
/**
|
|
41
24
|
* Database errors.
|
|
42
25
|
*/
|
|
43
|
-
|
|
44
|
-
export class DatabaseError extends BaseError {}
|
|
26
|
+
export class DatabaseError extends BaseError.extend('DatabaseError') {}
|
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) {
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import { describe, expect, test } from 'vitest';
|
|
6
6
|
|
|
7
|
-
import { ApiError } from './base-errors.
|
|
7
|
+
import { ApiError } from './base-errors.ts';
|
|
8
8
|
|
|
9
9
|
describe('Errors', () => {
|
|
10
10
|
test('test', async () => {
|
|
11
11
|
const runTest = async () => {
|
|
12
|
-
throw new ApiError('Test error');
|
|
12
|
+
throw new ApiError({ message: 'Test error' });
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
await expect(runTest()).rejects.toThrowError('Test error');
|
package/src/errors/errors.ts
CHANGED
|
@@ -2,208 +2,142 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { BaseError } from '@dxos/errors';
|
|
5
6
|
import { PublicKey } from '@dxos/keys';
|
|
6
7
|
|
|
7
|
-
import type { ObjectId } from '../types.
|
|
8
|
+
import type { ObjectId } from '../types.ts';
|
|
8
9
|
|
|
9
|
-
import {
|
|
10
|
-
import { registerError, registerErrorMessageContext, registerErrorNoArgs } from './helpers.js';
|
|
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.
|
|
14
14
|
*/
|
|
15
|
-
export class RpcClosedError extends
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
15
|
+
export class RpcClosedError extends BaseError.extend(
|
|
16
|
+
'RpcClosedError',
|
|
17
|
+
'Request was terminated because the RPC endpoint is closed.',
|
|
18
|
+
) {}
|
|
20
19
|
|
|
21
|
-
registerErrorNoArgs('
|
|
20
|
+
registerErrorNoArgs('RpcClosedError', RpcClosedError);
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* Thrown when `request` is called when RPC has not been opened.
|
|
25
24
|
*/
|
|
26
|
-
export class RpcNotOpenError extends
|
|
27
|
-
constructor() {
|
|
28
|
-
super('RPC_NOT_OPEN', 'RPC has not been opened.');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
25
|
+
export class RpcNotOpenError extends BaseError.extend('RpcNotOpenError', 'RPC has not been opened.') {}
|
|
31
26
|
|
|
32
|
-
registerErrorNoArgs('
|
|
27
|
+
registerErrorNoArgs('RpcNotOpenError', RpcNotOpenError);
|
|
33
28
|
|
|
34
|
-
export class CancelledError extends
|
|
35
|
-
constructor(message?: string, context?: Record<string, any>) {
|
|
36
|
-
super('CANCELLED', message, context);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
29
|
+
export class CancelledError extends BaseError.extend('CancelledError') {}
|
|
39
30
|
|
|
40
|
-
registerErrorMessageContext('
|
|
31
|
+
registerErrorMessageContext('CancelledError', CancelledError);
|
|
41
32
|
|
|
42
|
-
export class InvalidConfigError extends
|
|
43
|
-
constructor(message?: string, context?: Record<string, any>) {
|
|
44
|
-
super('INVALID_CONFIG', message, context);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
33
|
+
export class InvalidConfigError extends BaseError.extend('InvalidConfigError') {}
|
|
47
34
|
|
|
48
|
-
registerErrorMessageContext('
|
|
35
|
+
registerErrorMessageContext('InvalidConfigError', InvalidConfigError);
|
|
49
36
|
|
|
50
37
|
/**
|
|
51
38
|
* Explicit failure to connect with remote client services.
|
|
52
39
|
*/
|
|
53
|
-
export class RemoteServiceConnectionError extends
|
|
54
|
-
constructor(message?: string, context?: Record<string, any>) {
|
|
55
|
-
super('REMOTE_SERVICE_CONNECTION_ERROR', message, context);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
40
|
+
export class RemoteServiceConnectionError extends BaseError.extend('RemoteServiceConnectionError') {}
|
|
58
41
|
|
|
59
|
-
registerErrorMessageContext('
|
|
42
|
+
registerErrorMessageContext('RemoteServiceConnectionError', RemoteServiceConnectionError);
|
|
60
43
|
|
|
61
44
|
/**
|
|
62
45
|
* Failed to open a connection to remote client services.
|
|
63
46
|
*/
|
|
64
|
-
export class RemoteServiceConnectionTimeout extends
|
|
65
|
-
constructor(message?: string, context?: Record<string, any>) {
|
|
66
|
-
super('REMOTE_SERVICE_CONNECTION_TIMEOUT', message, context);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
47
|
+
export class RemoteServiceConnectionTimeout extends BaseError.extend('RemoteServiceConnectionTimeout') {}
|
|
69
48
|
|
|
70
|
-
registerErrorMessageContext('
|
|
49
|
+
registerErrorMessageContext('RemoteServiceConnectionTimeout', RemoteServiceConnectionTimeout);
|
|
71
50
|
|
|
72
|
-
export class DataCorruptionError extends
|
|
73
|
-
constructor(message?: string, context?: Record<string, any>) {
|
|
74
|
-
super('DATA_CORRUPTION', message, context);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
51
|
+
export class DataCorruptionError extends BaseError.extend('DataCorruptionError') {}
|
|
77
52
|
|
|
78
|
-
registerErrorMessageContext('
|
|
53
|
+
registerErrorMessageContext('DataCorruptionError', DataCorruptionError);
|
|
79
54
|
|
|
80
|
-
export class InvalidInvitationExtensionRoleError extends
|
|
81
|
-
constructor(message?: string, context?: Record<string, any>) {
|
|
82
|
-
super('INVALID_INVITATION_EXTENSION_ROLE', message, context);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
55
|
+
export class InvalidInvitationExtensionRoleError extends BaseError.extend('InvalidInvitationExtensionRoleError') {}
|
|
85
56
|
|
|
86
|
-
registerErrorMessageContext('
|
|
57
|
+
registerErrorMessageContext('InvalidInvitationExtensionRoleError', InvalidInvitationExtensionRoleError);
|
|
87
58
|
|
|
88
|
-
export class IdentityNotInitializedError extends
|
|
89
|
-
constructor(message?: string, context?: Record<string, any>) {
|
|
90
|
-
super('IDENTITY_NOT_INITIALIZED', message, context);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
59
|
+
export class IdentityNotInitializedError extends BaseError.extend('IdentityNotInitializedError') {}
|
|
93
60
|
|
|
94
|
-
registerErrorMessageContext('
|
|
61
|
+
registerErrorMessageContext('IdentityNotInitializedError', IdentityNotInitializedError);
|
|
95
62
|
|
|
96
|
-
export class InvalidInvitationError extends
|
|
97
|
-
constructor(message?: string, context?: Record<string, any>) {
|
|
98
|
-
super('INVALID_INVITATION', message, context);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
63
|
+
export class InvalidInvitationError extends BaseError.extend('InvalidInvitationError') {}
|
|
101
64
|
|
|
102
|
-
registerErrorMessageContext('
|
|
65
|
+
registerErrorMessageContext('InvalidInvitationError', InvalidInvitationError);
|
|
103
66
|
|
|
104
|
-
export class AlreadyJoinedError extends
|
|
105
|
-
constructor(message?: string, context?: Record<string, any>) {
|
|
106
|
-
super('ALREADY_JOINED', message, context);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
67
|
+
export class AlreadyJoinedError extends BaseError.extend('AlreadyJoinedError') {}
|
|
109
68
|
|
|
110
|
-
registerErrorMessageContext('
|
|
69
|
+
registerErrorMessageContext('AlreadyJoinedError', AlreadyJoinedError);
|
|
111
70
|
|
|
112
|
-
export class ConnectionResetError extends BaseError {
|
|
113
|
-
constructor(message?: string, context?: any) {
|
|
114
|
-
super('CONNECTION_RESET', message, context);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
71
|
+
export class ConnectionResetError extends BaseError.extend('ConnectionResetError') {}
|
|
117
72
|
|
|
118
|
-
registerErrorMessageContext('
|
|
73
|
+
registerErrorMessageContext('ConnectionResetError', ConnectionResetError);
|
|
119
74
|
|
|
120
|
-
export class TimeoutError extends BaseError {
|
|
121
|
-
constructor(message?: string, context?: any) {
|
|
122
|
-
super('TIMEOUT', message, context);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
75
|
+
export class TimeoutError extends BaseError.extend('TimeoutError') {}
|
|
125
76
|
|
|
126
|
-
registerErrorMessageContext('
|
|
77
|
+
registerErrorMessageContext('TimeoutError', TimeoutError);
|
|
127
78
|
|
|
128
79
|
// General protocol error.
|
|
129
|
-
export class ProtocolError extends BaseError {
|
|
130
|
-
constructor(message?: string, context?: any) {
|
|
131
|
-
super('PROTOCOL_ERROR', message, context);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
80
|
+
export class ProtocolError extends BaseError.extend('ProtocolError') {}
|
|
134
81
|
|
|
135
|
-
registerErrorMessageContext(
|
|
82
|
+
registerErrorMessageContext(ProtocolError.name, ProtocolError);
|
|
136
83
|
|
|
137
84
|
// General connectivity errors.
|
|
138
|
-
export class ConnectivityError extends BaseError {
|
|
139
|
-
constructor(message?: string, context?: any) {
|
|
140
|
-
super('CONNECTIVITY_ERROR', message, context);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
85
|
+
export class ConnectivityError extends BaseError.extend('ConnectivityError') {}
|
|
143
86
|
|
|
144
|
-
registerErrorMessageContext('
|
|
87
|
+
registerErrorMessageContext('ConnectivityError', ConnectivityError);
|
|
145
88
|
|
|
146
|
-
export class RateLimitExceededError extends BaseError {
|
|
147
|
-
constructor(message?: string, context?: any) {
|
|
148
|
-
super('RATE_LIMIT_EXCEEDED', message, context);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
89
|
+
export class RateLimitExceededError extends BaseError.extend('RateLimitExceededError') {}
|
|
151
90
|
|
|
152
|
-
registerErrorMessageContext('
|
|
91
|
+
registerErrorMessageContext('RateLimitExceededError', RateLimitExceededError);
|
|
153
92
|
|
|
154
93
|
// TODO(nf): Rename? the protocol isn't what's unknown...
|
|
155
|
-
export class UnknownProtocolError extends BaseError {
|
|
156
|
-
constructor(message?: string, innerError?: Error) {
|
|
157
|
-
super('UNKNOWN_PROTOCOL_ERROR', message, innerError);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
94
|
+
export class UnknownProtocolError extends BaseError.extend('UnknownProtocolError') {}
|
|
160
95
|
|
|
161
|
-
|
|
96
|
+
registerError(UnknownProtocolError.name, (message, context) => new UnknownProtocolError({ message, context }));
|
|
162
97
|
|
|
163
|
-
export class InvalidStorageVersionError extends
|
|
98
|
+
export class InvalidStorageVersionError extends BaseError.extend(
|
|
99
|
+
'InvalidStorageVersionError',
|
|
100
|
+
'Invalid storage version.',
|
|
101
|
+
) {
|
|
164
102
|
constructor(expected: number, actual: number) {
|
|
165
|
-
super(
|
|
103
|
+
super({ context: { expected, actual } });
|
|
166
104
|
}
|
|
167
105
|
}
|
|
168
106
|
|
|
169
|
-
registerError('
|
|
107
|
+
registerError('InvalidStorageVersionError', (_, context) => {
|
|
170
108
|
return new InvalidStorageVersionError(context.expected ?? NaN, context.actual ?? NaN);
|
|
171
109
|
});
|
|
172
110
|
|
|
173
|
-
export class SpaceNotFoundError extends
|
|
111
|
+
export class SpaceNotFoundError extends BaseError.extend('SpaceNotFoundError', 'Space not found.') {
|
|
174
112
|
constructor(spaceKey: PublicKey) {
|
|
175
|
-
super(
|
|
113
|
+
super({ context: { spaceKey } });
|
|
176
114
|
}
|
|
177
115
|
}
|
|
178
116
|
|
|
179
|
-
registerError('
|
|
117
|
+
registerError('SpaceNotFoundError', (_, context) => {
|
|
180
118
|
return new SpaceNotFoundError(PublicKey.safeFrom(context.spaceKey) ?? PublicKey.from('00'));
|
|
181
119
|
});
|
|
182
120
|
|
|
183
|
-
export class EntityNotFoundError extends
|
|
121
|
+
export class EntityNotFoundError extends BaseError.extend('EntityNotFoundError', 'Item not found.') {
|
|
184
122
|
constructor(entityId: ObjectId) {
|
|
185
|
-
super(
|
|
123
|
+
super({ context: { entityId } });
|
|
186
124
|
}
|
|
187
125
|
}
|
|
188
126
|
|
|
189
|
-
registerError('
|
|
127
|
+
registerError('EntityNotFoundError', (_, context) => {
|
|
190
128
|
return new EntityNotFoundError(context.entityId);
|
|
191
129
|
});
|
|
192
130
|
|
|
193
|
-
export class UnknownModelError extends
|
|
131
|
+
export class UnknownModelError extends BaseError.extend('UnknownModelError', 'Unknown model.') {
|
|
194
132
|
constructor(model: string) {
|
|
195
|
-
super(
|
|
133
|
+
super({ context: { model } });
|
|
196
134
|
}
|
|
197
135
|
}
|
|
198
136
|
|
|
199
|
-
registerError('
|
|
137
|
+
registerError('UnknownModelError', (_, context) => {
|
|
200
138
|
return new UnknownModelError(context.model);
|
|
201
139
|
});
|
|
202
140
|
|
|
203
|
-
export class AuthorizationError extends
|
|
204
|
-
constructor(message?: string, context?: any) {
|
|
205
|
-
super('AUTHORIZATION_ERROR', message, context);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
141
|
+
export class AuthorizationError extends BaseError.extend('AuthorizationError') {}
|
|
208
142
|
|
|
209
|
-
registerErrorMessageContext('
|
|
143
|
+
registerErrorMessageContext('AuthorizationError', AuthorizationError);
|
package/src/errors/helpers.ts
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { BaseError } from '@dxos/errors';
|
|
5
6
|
import { invariant } from '@dxos/invariant';
|
|
6
7
|
|
|
7
|
-
import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.
|
|
8
|
-
|
|
9
|
-
import { SystemError } from './base-errors.js';
|
|
8
|
+
import { type Error as SerializedErrorProto } from '../proto/gen/dxos/error.ts';
|
|
10
9
|
|
|
11
10
|
export const reconstructError = (error: SerializedErrorProto) => {
|
|
12
11
|
const { name, message, context } = error;
|
|
@@ -20,21 +19,21 @@ export const registerError = (code: string, make: (message?: string, context?: a
|
|
|
20
19
|
errorRegistry.set(code, make);
|
|
21
20
|
};
|
|
22
21
|
|
|
23
|
-
export const registerErrorNoArgs = (code: string, Constructor: { new (): Error }) => {
|
|
22
|
+
export const registerErrorNoArgs = (code: string, Constructor: { new (options?: any): Error }) => {
|
|
24
23
|
registerError(code, () => new Constructor());
|
|
25
24
|
};
|
|
26
25
|
|
|
27
26
|
export const registerErrorMessageContext = (
|
|
28
27
|
code: string,
|
|
29
|
-
Constructor: { new (message?: string
|
|
28
|
+
Constructor: { new (options?: { message?: string; context?: any }): Error },
|
|
30
29
|
) => {
|
|
31
|
-
registerError(code, (message?: string, context?:
|
|
30
|
+
registerError(code, (message?: string, context?: any) => new Constructor({ message, context }));
|
|
32
31
|
};
|
|
33
32
|
|
|
34
33
|
export const errorFromCode = (code?: string, message?: string, context?: any) => {
|
|
35
34
|
if (code && errorRegistry.has(code)) {
|
|
36
35
|
return errorRegistry.get(code)!(message, context);
|
|
37
36
|
} else {
|
|
38
|
-
return new
|
|
37
|
+
return new BaseError(code ?? 'Error', { message, context });
|
|
39
38
|
}
|
|
40
39
|
};
|
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/feed-replication.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './automerge.
|
|
6
|
-
export * from './edge
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './profile-archive.
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export
|
|
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 () => {
|
package/src/messenger.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type CleanupFn } from '@dxos/async';
|
|
6
|
+
|
|
7
|
+
import { type GossipMessage } from './proto/gen/dxos/mesh/teleport/gossip';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Message passing abstraction.
|
|
11
|
+
*/
|
|
12
|
+
export interface Messenger {
|
|
13
|
+
/**
|
|
14
|
+
* Register channel listener.
|
|
15
|
+
*/
|
|
16
|
+
listen: (channel: string, callback: (message: GossipMessage) => void) => CleanupFn;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Send message to channel.
|
|
20
|
+
*/
|
|
21
|
+
postMessage: (channel: string, message: any) => Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package dxos.client.services;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/struct.proto";
|
|
6
|
+
import "google/protobuf/empty.proto";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
message QueueQuery {
|
|
10
|
+
string space_id = 1;
|
|
11
|
+
|
|
12
|
+
optional string queues_namespace = 2;
|
|
13
|
+
|
|
14
|
+
/// Queries the whole space if missing.
|
|
15
|
+
repeated string queue_ids = 3;
|
|
16
|
+
|
|
17
|
+
/// Filter items after this cursor. Exclusive.
|
|
18
|
+
optional string after = 4;
|
|
19
|
+
|
|
20
|
+
/// Filter items before this cursor. Exclusive.
|
|
21
|
+
optional string before = 5;
|
|
22
|
+
|
|
23
|
+
/// Filter items after this position. Inclusive.
|
|
24
|
+
optional int64 begin_position = 6;
|
|
25
|
+
|
|
26
|
+
/// Filter items before this position. Exclusive.
|
|
27
|
+
optional int64 end_position = 7;
|
|
28
|
+
|
|
29
|
+
optional int32 limit = 8;
|
|
30
|
+
optional bool reverse = 9;
|
|
31
|
+
|
|
32
|
+
// TODO(dmaretskyi): Remove this field -- raw queues dont index object IDs anymore.
|
|
33
|
+
repeated string object_ids = 100;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message QueueQueryResult {
|
|
37
|
+
repeated google.protobuf.Struct objects = 1;
|
|
38
|
+
|
|
39
|
+
/// Cursor to query the next items. Can be passed to `after` in query to keep querying.
|
|
40
|
+
string next_cursor = 2;
|
|
41
|
+
|
|
42
|
+
string prev_cursor = 3;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message QueryQueueRequest {
|
|
46
|
+
QueueQuery query = 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message InsertIntoQueueRequest {
|
|
50
|
+
string subspace_tag = 1;
|
|
51
|
+
string space_id = 2;
|
|
52
|
+
string queue_id = 3;
|
|
53
|
+
repeated google.protobuf.Struct objects = 4;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message DeleteFromQueueRequest {
|
|
57
|
+
string subspace_tag = 1;
|
|
58
|
+
string space_id = 2;
|
|
59
|
+
string queue_id = 3;
|
|
60
|
+
repeated string object_ids = 4;
|
|
61
|
+
}
|
|
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
|
+
|
|
73
|
+
service QueueService {
|
|
74
|
+
rpc QueryQueue(QueryQueueRequest) returns (QueueQueryResult);
|
|
75
|
+
rpc InsertIntoQueue(InsertIntoQueueRequest) returns (google.protobuf.Empty);
|
|
76
|
+
rpc DeleteFromQueue(DeleteFromQueueRequest) returns (google.protobuf.Empty);
|
|
77
|
+
rpc SyncQueue(SyncQueueRequest) returns (google.protobuf.Empty);
|
|
78
|
+
}
|
|
@@ -59,7 +59,7 @@ message Module {
|
|
|
59
59
|
optional string id = 8; // TODO(burdon): Ensured FQ (e.g., 'dxos.app.xxx')
|
|
60
60
|
optional string name = 1; // TODO(burdon): Replace with id (or key?)
|
|
61
61
|
optional string type = 2; // TODO(burdon): Define namespace (e.g.,
|
|
62
|
-
// '
|
|
62
|
+
// 'org.dxos.type.frame')
|
|
63
63
|
|
|
64
64
|
// TODO(burdon): Developer info message.
|
|
65
65
|
|