@dxos/client-protocol 0.3.8-next.f4e0086 → 0.3.8

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.
@@ -51,7 +51,7 @@ var InvitationEncoder = class {
51
51
  import { MulticastObservable } from "@dxos/async";
52
52
  import { invariant } from "@dxos/invariant";
53
53
  import { Invitation } from "@dxos/protocols/proto/dxos/client/services";
54
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-protocol/src/invitations/invitations.ts";
54
+ var __dxlog_file = "/home/circleci/project/packages/sdk/client-protocol/src/invitations/invitations.ts";
55
55
  var AUTHENTICATION_CODE_LENGTH = 6;
56
56
  var INVITATION_TIMEOUT = 3 * 6e4;
57
57
  var CancellableInvitation = class extends MulticastObservable {
@@ -1 +1 @@
1
- {"inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytes":5856,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/echo.ts":{"bytes":2848,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/halo.ts":{"bytes":1739,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytes":3771,"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytes":7749,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytes":578,"imports":[{"path":"packages/sdk/client-protocol/src/invitations/encoder.ts","kind":"import-statement","original":"./encoder"},{"path":"packages/sdk/client-protocol/src/invitations/invitations.ts","kind":"import-statement","original":"./invitations"}],"format":"esm"},"packages/sdk/client-protocol/src/proto/gen/schema.ts":{"bytes":3295,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/proto/index.ts":{"bytes":480,"imports":[{"path":"packages/sdk/client-protocol/src/proto/gen/schema.ts","kind":"import-statement","original":"./gen/schema"}],"format":"esm"},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytes":8276,"imports":[{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/shell.ts":{"bytes":1036,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/space.ts":{"bytes":3892,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/timeouts.ts":{"bytes":3134,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/index.ts":{"bytes":1167,"imports":[{"path":"packages/sdk/client-protocol/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/sdk/client-protocol/src/echo.ts","kind":"import-statement","original":"./echo"},{"path":"packages/sdk/client-protocol/src/halo.ts","kind":"import-statement","original":"./halo"},{"path":"packages/sdk/client-protocol/src/invitations/index.ts","kind":"import-statement","original":"./invitations"},{"path":"packages/sdk/client-protocol/src/proto/index.ts","kind":"import-statement","original":"./proto"},{"path":"packages/sdk/client-protocol/src/service-definitions.ts","kind":"import-statement","original":"./service-definitions"},{"path":"packages/sdk/client-protocol/src/shell.ts","kind":"import-statement","original":"./shell"},{"path":"packages/sdk/client-protocol/src/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/sdk/client-protocol/src/timeouts.ts","kind":"import-statement","original":"./timeouts"}],"format":"esm"}},"outputs":{"packages/sdk/client-protocol/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18119},"packages/sdk/client-protocol/dist/lib/browser/index.mjs":{"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"exports":["AUTHENTICATION_CODE_LENGTH","AUTH_TIMEOUT","AuthenticatingInvitation","CREATE_SPACE_TIMEOUT","CancellableInvitation","DEFAULT_CLIENT_CHANNEL","DEFAULT_INTERNAL_CHANNEL","DEFAULT_SHELL_CHANNEL","DEFAULT_VAULT_ORIGIN","DEFAULT_VAULT_URL","DX_CACHE","DX_CONFIG","DX_DATA","DX_RUNTIME","DX_STATE","ENV_DX_CONFIG","ENV_DX_PROFILE","ENV_DX_PROFILE_DEFAULT","EXPECTED_CONFIG_VERSION","INVITATION_TIMEOUT","InvitationEncoder","LOAD_CONTROL_FEEDS_TIMEOUT","LOAD_PROPERTIES_TIMEOUT","PROXY_CONNECTION_TIMEOUT","Properties","RESOURCE_LOCK_TIMEOUT","STATUS_TIMEOUT","appServiceBundle","clientServiceBundle","defaultConfig","defaultKey","getProfilePath","iframeServiceBundle","shellServiceBundle","types","workerServiceBundle","wrapObservable"],"entryPoint":"packages/sdk/client-protocol/src/index.ts","inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytesInOutput":797},"packages/sdk/client-protocol/src/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/echo.ts":{"bytesInOutput":32},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytesInOutput":748},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytesInOutput":1495},"packages/sdk/client-protocol/src/proto/gen/schema.ts":{"bytesInOutput":611},"packages/sdk/client-protocol/src/proto/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytesInOutput":1426},"packages/sdk/client-protocol/src/timeouts.ts":{"bytesInOutput":224}},"bytes":6529}}}
1
+ {"inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytes":5851,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/echo.ts":{"bytes":2843,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/halo.ts":{"bytes":1734,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytes":3766,"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytes":7744,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytes":573,"imports":[{"path":"packages/sdk/client-protocol/src/invitations/encoder.ts","kind":"import-statement","original":"./encoder"},{"path":"packages/sdk/client-protocol/src/invitations/invitations.ts","kind":"import-statement","original":"./invitations"}],"format":"esm"},"packages/sdk/client-protocol/src/proto/gen/schema.ts":{"bytes":3290,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/proto/index.ts":{"bytes":475,"imports":[{"path":"packages/sdk/client-protocol/src/proto/gen/schema.ts","kind":"import-statement","original":"./gen/schema"}],"format":"esm"},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytes":8271,"imports":[{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/shell.ts":{"bytes":1031,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/space.ts":{"bytes":3887,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/timeouts.ts":{"bytes":3129,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/index.ts":{"bytes":1162,"imports":[{"path":"packages/sdk/client-protocol/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/sdk/client-protocol/src/echo.ts","kind":"import-statement","original":"./echo"},{"path":"packages/sdk/client-protocol/src/halo.ts","kind":"import-statement","original":"./halo"},{"path":"packages/sdk/client-protocol/src/invitations/index.ts","kind":"import-statement","original":"./invitations"},{"path":"packages/sdk/client-protocol/src/proto/index.ts","kind":"import-statement","original":"./proto"},{"path":"packages/sdk/client-protocol/src/service-definitions.ts","kind":"import-statement","original":"./service-definitions"},{"path":"packages/sdk/client-protocol/src/shell.ts","kind":"import-statement","original":"./shell"},{"path":"packages/sdk/client-protocol/src/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/sdk/client-protocol/src/timeouts.ts","kind":"import-statement","original":"./timeouts"}],"format":"esm"}},"outputs":{"packages/sdk/client-protocol/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18119},"packages/sdk/client-protocol/dist/lib/browser/index.mjs":{"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"exports":["AUTHENTICATION_CODE_LENGTH","AUTH_TIMEOUT","AuthenticatingInvitation","CREATE_SPACE_TIMEOUT","CancellableInvitation","DEFAULT_CLIENT_CHANNEL","DEFAULT_INTERNAL_CHANNEL","DEFAULT_SHELL_CHANNEL","DEFAULT_VAULT_ORIGIN","DEFAULT_VAULT_URL","DX_CACHE","DX_CONFIG","DX_DATA","DX_RUNTIME","DX_STATE","ENV_DX_CONFIG","ENV_DX_PROFILE","ENV_DX_PROFILE_DEFAULT","EXPECTED_CONFIG_VERSION","INVITATION_TIMEOUT","InvitationEncoder","LOAD_CONTROL_FEEDS_TIMEOUT","LOAD_PROPERTIES_TIMEOUT","PROXY_CONNECTION_TIMEOUT","Properties","RESOURCE_LOCK_TIMEOUT","STATUS_TIMEOUT","appServiceBundle","clientServiceBundle","defaultConfig","defaultKey","getProfilePath","iframeServiceBundle","shellServiceBundle","types","workerServiceBundle","wrapObservable"],"entryPoint":"packages/sdk/client-protocol/src/index.ts","inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytesInOutput":797},"packages/sdk/client-protocol/src/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/echo.ts":{"bytesInOutput":32},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytesInOutput":748},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytesInOutput":1490},"packages/sdk/client-protocol/src/proto/gen/schema.ts":{"bytesInOutput":611},"packages/sdk/client-protocol/src/proto/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytesInOutput":1426},"packages/sdk/client-protocol/src/timeouts.ts":{"bytesInOutput":224}},"bytes":6524}}}
@@ -26,10 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // packages/sdk/client-protocol/src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
29
+ var node_exports = {};
30
+ __export(node_exports, {
33
31
  AUTHENTICATION_CODE_LENGTH: () => AUTHENTICATION_CODE_LENGTH,
34
32
  AUTH_TIMEOUT: () => AUTH_TIMEOUT,
35
33
  AuthenticatingInvitation: () => AuthenticatingInvitation,
@@ -68,9 +66,15 @@ __export(src_exports, {
68
66
  workerServiceBundle: () => workerServiceBundle,
69
67
  wrapObservable: () => wrapObservable
70
68
  });
71
- module.exports = __toCommonJS(src_exports);
72
-
73
- // packages/sdk/client-protocol/src/config.ts
69
+ module.exports = __toCommonJS(node_exports);
70
+ var import_base_x = __toESM(require("base-x"));
71
+ var import_protocols = require("@dxos/protocols");
72
+ var import_async = require("@dxos/async");
73
+ var import_invariant = require("@dxos/invariant");
74
+ var import_services = require("@dxos/protocols/proto/dxos/client/services");
75
+ var dxos_echo_schema = __toESM(require("@dxos/echo-schema"));
76
+ var import_protocols2 = require("@dxos/protocols");
77
+ var import_rpc = require("@dxos/rpc");
74
78
  var DEFAULT_INTERNAL_CHANNEL = "dxos:vault";
75
79
  var DEFAULT_CLIENT_CHANNEL = "dxos:app";
76
80
  var DEFAULT_SHELL_CHANNEL = "dxos:shell";
@@ -90,13 +94,7 @@ var DX_RUNTIME = "/tmp/dx/run";
90
94
  var ENV_DX_CONFIG = "DX_CONFIG";
91
95
  var ENV_DX_PROFILE = "DX_PROFILE";
92
96
  var ENV_DX_PROFILE_DEFAULT = "default";
93
-
94
- // packages/sdk/client-protocol/src/echo.ts
95
97
  var defaultKey = "__DEFAULT__";
96
-
97
- // packages/sdk/client-protocol/src/invitations/encoder.ts
98
- var import_base_x = __toESM(require("base-x"));
99
- var import_protocols = require("@dxos/protocols");
100
98
  var base62 = (0, import_base_x.default)("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
101
99
  var codec = import_protocols.schema.getCodecForType("dxos.client.services.Invitation");
102
100
  var InvitationEncoder = class {
@@ -118,12 +116,7 @@ var InvitationEncoder = class {
118
116
  }));
119
117
  }
120
118
  };
121
-
122
- // packages/sdk/client-protocol/src/invitations/invitations.ts
123
- var import_async = require("@dxos/async");
124
- var import_invariant = require("@dxos/invariant");
125
- var import_services = require("@dxos/protocols/proto/dxos/client/services");
126
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-protocol/src/invitations/invitations.ts";
119
+ var __dxlog_file = "/home/circleci/project/packages/sdk/client-protocol/src/invitations/invitations.ts";
127
120
  var AUTHENTICATION_CODE_LENGTH = 6;
128
121
  var INVITATION_TIMEOUT = 3 * 6e4;
129
122
  var CancellableInvitation = class extends import_async.MulticastObservable {
@@ -168,9 +161,6 @@ var wrapObservable = async (observable) => {
168
161
  });
169
162
  });
170
163
  };
171
-
172
- // packages/sdk/client-protocol/src/proto/gen/schema.ts
173
- var dxos_echo_schema = __toESM(require("@dxos/echo-schema"));
174
164
  var types = new dxos_echo_schema.TypeCollection();
175
165
  var Properties = class _Properties extends dxos_echo_schema.TypedObject {
176
166
  static filter(filter) {
@@ -196,10 +186,6 @@ types.registerPrototype(Properties, {
196
186
  ]
197
187
  });
198
188
  types.link();
199
-
200
- // packages/sdk/client-protocol/src/service-definitions.ts
201
- var import_protocols2 = require("@dxos/protocols");
202
- var import_rpc = require("@dxos/rpc");
203
189
  var clientServiceBundle = (0, import_rpc.createServiceBundle)({
204
190
  SystemService: import_protocols2.schema.getService("dxos.client.services.SystemService"),
205
191
  NetworkService: import_protocols2.schema.getService("dxos.client.services.NetworkService"),
@@ -227,8 +213,6 @@ var appServiceBundle = {
227
213
  var shellServiceBundle = {
228
214
  ShellService: import_protocols2.schema.getService("dxos.iframe.ShellService")
229
215
  };
230
-
231
- // packages/sdk/client-protocol/src/timeouts.ts
232
216
  var PROXY_CONNECTION_TIMEOUT = 3e4;
233
217
  var AUTH_TIMEOUT = 3e4;
234
218
  var STATUS_TIMEOUT = 1e4;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/config.ts", "../../../src/echo.ts", "../../../src/invitations/encoder.ts", "../../../src/invitations/invitations.ts", "../../../src/proto/gen/schema.ts", "../../../src/service-definitions.ts", "../../../src/timeouts.ts"],
4
- "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nexport * from './config';\nexport * from './echo';\nexport * from './halo';\nexport * from './invitations';\nexport * from './proto';\nexport * from './service-definitions';\nexport * from './shell';\nexport * from './space';\nexport * from './timeouts';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { type ConfigProto } from '@dxos/config';\n\nexport const DEFAULT_INTERNAL_CHANNEL = 'dxos:vault';\nexport const DEFAULT_CLIENT_CHANNEL = 'dxos:app';\nexport const DEFAULT_SHELL_CHANNEL = 'dxos:shell';\n\nexport const DEFAULT_VAULT_ORIGIN = 'https://halo.dxos.org';\nexport const DEFAULT_VAULT_URL = DEFAULT_VAULT_ORIGIN + '/vault.html';\n\nexport const EXPECTED_CONFIG_VERSION = 1;\nexport const defaultConfig: ConfigProto = { version: 1 };\n\n// TODO(burdon): Allow override via env? Generalize since currently NodeJS only.\nconst HOME = typeof process !== 'undefined' ? process?.env?.HOME ?? '' : '';\n\n// Base directories.\n// TODO(burdon): Consider Windows, Linux, OSX.\n// https://wiki.archlinux.org/title/XDG_Base_Directory\n// Each `/dx` directory should contain `/profile/<DX_PROFILE>` subdirectories.\nexport const getProfilePath = (root: string, profile: string, file: string | undefined = undefined) =>\n `${root}/profile/${profile}` + (file ? `/${file}` : '');\n\n// XDG_CONFIG_HOME (Analogous to /etc.)\nexport const DX_CONFIG = `${HOME}/.config/dx`;\n\n// XDG_CACHE_HOME (Analogous to /var/cache).\nexport const DX_CACHE = `${HOME}/.cache/dx`;\n\n// TODO(burdon): Storage should use this by default (make path optional).\n// XDG_DATA_HOME (Analogous to /usr/share).\nexport const DX_DATA = `${HOME}/.local/share/dx`;\n\n// XDG_STATE_HOME (Analogous to /var/lib).\nexport const DX_STATE = `${HOME}/.local/state/dx`;\n\n// XDG_RUNTIME_DIR (Non-essential files, sockets, etc.)\nexport const DX_RUNTIME = '/tmp/dx/run';\n\nexport const ENV_DX_CONFIG = 'DX_CONFIG';\nexport const ENV_DX_PROFILE = 'DX_PROFILE';\nexport const ENV_DX_PROFILE_DEFAULT = 'default';\n", "//\n// Copyright 2021 DXOS.org\n//\n\nimport type { MulticastObservable } from '@dxos/async';\nimport type { TypeCollection } from '@dxos/echo-schema';\nimport type { PublicKey } from '@dxos/keys';\nimport type { Invitation } from '@dxos/protocols/proto/dxos/client/services';\n\nimport type { AuthenticatingInvitation } from './invitations';\nimport type { Space } from './space';\n\n// Space properties key for default metadata.\n// TODO(wittjosiah): Remove. Default space should be indicated by data in HALO space.\nexport const defaultKey = '__DEFAULT__';\n\n/**\n * TODO(burdon): Public API (move comments here).\n */\n// TODO(wittjosiah): Rename?\n// https://ts.dev/style/#naming-style\n// ClientApi? ClientProtocol?\nexport interface Echo extends MulticastObservable<Space[]> {\n /**\n * Resolves when the default space is available.\n */\n // TODO(wittjosiah): Remove. Ensure default space is always available.\n get isReady(): MulticastObservable<boolean>;\n\n /**\n * Returns the list of spaces.\n */\n get(): Space[];\n\n /**\n * Returns the space with the given key.\n */\n get(spaceKey: PublicKey): Space | undefined;\n\n /**\n * Returns the default space.\n */\n get default(): Space;\n\n /**\n * Creates a new space.\n */\n create(): Promise<Space>;\n\n /**\n * Creates a space from the given snapshot.\n */\n // clone(snapshot: SpaceSnapshot): Promise<Space>;\n\n /**\n * Joins an existing space using the given invitation.\n */\n join(invitation: Invitation | string): AuthenticatingInvitation;\n\n /**\n * Adds a schema to ECHO.\n */\n // TODO(dmaretskyi): Rename `addTypes`.\n addSchema(schema: TypeCollection): void;\n}\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport base from 'base-x';\n\nimport { schema } from '@dxos/protocols';\nimport { type Invitation } from '@dxos/protocols/proto/dxos/client/services';\n\n// Encode with URL-safe alpha-numeric characters.\nconst base62 = base('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');\n\nconst codec = schema.getCodecForType('dxos.client.services.Invitation');\n\n/**\n * Encodes and decodes an invitation proto into/from alphanumeric chars.\n */\nexport class InvitationEncoder {\n static decode(text: string): Invitation {\n return codec.decode(base62.decode(text));\n }\n\n static encode(invitation: Invitation): string {\n return base62.encode(\n codec.encode({\n invitationId: invitation.invitationId,\n type: invitation.type,\n kind: invitation.kind,\n authMethod: invitation.authMethod,\n swarmKey: invitation.swarmKey,\n state: invitation.state,\n timeout: invitation.timeout,\n ...(invitation.spaceKey ? { spaceKey: invitation.spaceKey } : {}),\n }),\n );\n }\n}\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { MulticastObservable, type Observable, type Subscriber } from '@dxos/async';\nimport { invariant } from '@dxos/invariant';\nimport { Invitation } from '@dxos/protocols/proto/dxos/client/services';\n\nexport const AUTHENTICATION_CODE_LENGTH = 6;\n\nexport const INVITATION_TIMEOUT = 3 * 60_000; // 3 mins.\n\nexport interface Invitations {\n created: MulticastObservable<CancellableInvitation[]>;\n accepted: MulticastObservable<AuthenticatingInvitation[]>;\n share(options?: Partial<Invitation>): CancellableInvitation;\n join(invitation: Invitation): AuthenticatingInvitation;\n}\n\n/**\n * Base class for all invitation observables and providers.\n */\nexport class CancellableInvitation extends MulticastObservable<Invitation> {\n private readonly _onCancel: () => Promise<void>;\n\n constructor({\n subscriber,\n initialInvitation,\n onCancel,\n }: {\n subscriber: Observable<Invitation> | Subscriber<Invitation>;\n initialInvitation: Invitation;\n onCancel: () => Promise<void>;\n }) {\n super(subscriber, initialInvitation);\n this._onCancel = onCancel;\n }\n\n cancel(): Promise<void> {\n return this._onCancel();\n }\n}\n\n/**\n * Cancelable observer that relays authentication requests.\n */\nexport class AuthenticatingInvitation extends CancellableInvitation {\n private readonly _onAuthenticate: (authCode: string) => Promise<void>;\n\n constructor({\n subscriber,\n initialInvitation,\n onCancel,\n onAuthenticate,\n }: {\n subscriber: Observable<Invitation> | Subscriber<Invitation>;\n initialInvitation: Invitation;\n onCancel: () => Promise<void>;\n onAuthenticate: (authCode: string) => Promise<void>;\n }) {\n super({ subscriber, initialInvitation, onCancel });\n this._onAuthenticate = onAuthenticate;\n }\n\n async authenticate(authCode: string): Promise<void> {\n return this._onAuthenticate(authCode);\n }\n}\n\n/**\n * Testing util to wrap non-authenticating observable with promise.\n * Don't use this in production code.\n * @deprecated\n */\n// TODO(wittjosiah): Move to testing.\nexport const wrapObservable = async (observable: CancellableInvitation): Promise<Invitation> => {\n return new Promise((resolve, reject) => {\n const subscription = observable.subscribe(\n (invitation: Invitation | undefined) => {\n // TODO(burdon): Throw error if auth requested.\n invariant(invitation?.state === Invitation.State.SUCCESS);\n subscription.unsubscribe();\n resolve(invitation);\n },\n (err: Error) => {\n subscription.unsubscribe();\n reject(err);\n },\n );\n });\n};\n", "/**\n * @generated @dxos/echo-typegen src/proto/schema.proto\n **/\n\nimport * as dxos_echo_schema from \"@dxos/echo-schema\";\n\nexport const types = new dxos_echo_schema.TypeCollection();\n\nexport type PropertiesProps = {\n name: string;\n};\n\nexport class Properties extends dxos_echo_schema.TypedObject<PropertiesProps> {\n declare static readonly schema: dxos_echo_schema.Schema;\n\n static filter(\n filter?:\n | Partial<PropertiesProps>\n | dxos_echo_schema.OperatorFilter<Properties>\n ): dxos_echo_schema.Filter<Properties> {\n return dxos_echo_schema.Filter.typename(\n \"dxos.sdk.client.Properties\",\n filter\n );\n }\n\n constructor(\n initValues?: Partial<PropertiesProps>,\n opts?: dxos_echo_schema.TypedObjectOptions\n ) {\n super({ ...initValues }, { schema: Properties.schema, ...opts });\n }\n declare name: string;\n}\n\ntypes.registerPrototype(Properties, {\n typename: \"dxos.sdk.client.Properties\",\n props: [{ id: \"name\", type: 1, repeated: false }],\n});\n\ntypes.link();\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { type Context } from '@dxos/context';\nimport { schema } from '@dxos/protocols';\nimport { type FunctionRegistryService } from '@dxos/protocols/proto/dxos/agent/functions';\nimport {\n type DevicesService,\n type IdentityService,\n type InvitationsService,\n type LoggingService,\n type NetworkService,\n type SpacesService,\n type SystemService,\n} from '@dxos/protocols/proto/dxos/client/services';\nimport { type DevtoolsHost } from '@dxos/protocols/proto/dxos/devtools/host';\nimport { type DataService } from '@dxos/protocols/proto/dxos/echo/service';\nimport type { AppService, ShellService, WorkerService } from '@dxos/protocols/proto/dxos/iframe';\nimport type { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';\nimport { type TracingService } from '@dxos/protocols/proto/dxos/tracing';\nimport { createServiceBundle, type ServiceBundle } from '@dxos/rpc';\n\n//\n// NOTE: Should contain client/proxy dependencies only.\n//\n\nexport type ClientServices = {\n SystemService: SystemService;\n NetworkService: NetworkService;\n LoggingService: LoggingService;\n\n IdentityService: IdentityService;\n InvitationsService: InvitationsService;\n DevicesService: DevicesService;\n SpacesService: SpacesService;\n DataService: DataService;\n\n FunctionRegistryService: FunctionRegistryService;\n\n // TODO(burdon): Deprecated.\n DevtoolsHost: DevtoolsHost;\n\n TracingService: TracingService;\n};\n\n/**\n * Provide access to client services definitions and service handler.\n */\nexport interface ClientServicesProvider {\n descriptors: ServiceBundle<ClientServices>;\n services: Partial<ClientServices>;\n\n open(ctx: Context): Promise<void>;\n close(ctx: Context): Promise<void>;\n}\n\n/**\n * Services supported by host.\n */\nexport const clientServiceBundle = createServiceBundle<ClientServices>({\n SystemService: schema.getService('dxos.client.services.SystemService'),\n NetworkService: schema.getService('dxos.client.services.NetworkService'),\n LoggingService: schema.getService('dxos.client.services.LoggingService'),\n\n IdentityService: schema.getService('dxos.client.services.IdentityService'),\n InvitationsService: schema.getService('dxos.client.services.InvitationsService'),\n DevicesService: schema.getService('dxos.client.services.DevicesService'),\n SpacesService: schema.getService('dxos.client.services.SpacesService'),\n DataService: schema.getService('dxos.echo.service.DataService'),\n\n // Agent-only.\n FunctionRegistryService: schema.getService('dxos.agent.functions.FunctionRegistryService'),\n\n // TODO(burdon): Deprecated.\n DevtoolsHost: schema.getService('dxos.devtools.host.DevtoolsHost'),\n\n TracingService: schema.getService('dxos.tracing.TracingService'),\n});\n\nexport type IframeServiceBundle = {\n BridgeService: BridgeService;\n};\n\nexport const iframeServiceBundle: ServiceBundle<IframeServiceBundle> = {\n BridgeService: schema.getService('dxos.mesh.bridge.BridgeService'),\n};\n\nexport type WorkerServiceBundle = {\n WorkerService: WorkerService;\n};\n\nexport const workerServiceBundle: ServiceBundle<WorkerServiceBundle> = {\n WorkerService: schema.getService('dxos.iframe.WorkerService'),\n};\n\nexport type AppServiceBundle = {\n AppService: AppService;\n};\n\nexport const appServiceBundle: ServiceBundle<AppServiceBundle> = {\n AppService: schema.getService('dxos.iframe.AppService'),\n};\n\nexport type ShellServiceBundle = {\n ShellService: ShellService;\n};\n\nexport const shellServiceBundle: ServiceBundle<ShellServiceBundle> = {\n ShellService: schema.getService('dxos.iframe.ShellService'),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\n/**\n * Timeout for making rpc connections from remote proxies.\n */\nexport const PROXY_CONNECTION_TIMEOUT = 30_000;\n\n/**\n * Timeout for the device to be added to the trusted set during auth.\n */\nexport const AUTH_TIMEOUT = 30_000;\n\n/**\n * Timeout for how long the remote client will wait before assuming the connection is lost.\n */\nexport const STATUS_TIMEOUT = 10_000;\n\n/**\n * Timeout for waiting before stealing resource lock.\n */\nexport const RESOURCE_LOCK_TIMEOUT = 3_000;\n\n/**\n * Timeout for space properties to be loaded in the set of tracked items.\n * Accounts for latency between SpaceService reporting the space as READY and DataService streaming the item states.\n */\nexport const LOAD_PROPERTIES_TIMEOUT = 3_000;\n\n/**\n * Timeout for creating new spaces.\n */\nexport const CREATE_SPACE_TIMEOUT = 3_000;\n\n/**\n * Timeout for loading of control feeds.\n */\nexport const LOAD_CONTROL_FEEDS_TIMEOUT = 3_000;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACMO,IAAMA,2BAA2B;AACjC,IAAMC,yBAAyB;AAC/B,IAAMC,wBAAwB;AAE9B,IAAMC,uBAAuB;AAC7B,IAAMC,oBAAoBD,uBAAuB;AAEjD,IAAME,0BAA0B;AAChC,IAAMC,gBAA6B;EAAEC,SAAS;AAAE;AAGvD,IAAMC,OAAO,OAAOC,YAAY,cAAcA,SAASC,KAAKF,QAAQ,KAAK;AAMlE,IAAMG,iBAAiB,CAACC,MAAcC,SAAiBC,OAA2BC,WACvF,GAAGH,IAAAA,YAAgBC,OAAAA,MAAaC,OAAO,IAAIA,IAAAA,KAAS;AAG/C,IAAME,YAAY,GAAGR,IAAAA;AAGrB,IAAMS,WAAW,G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AAW,8CAAA;;EAG3CS,cAAcV,yBAAOC,WAAW,iCAAA;EAEhCU,gBAAgBX,yBAAOC,WAAW,6BAAA;AACpC,CAAA;AAMO,IAAMW,sBAA0D;EACrEC,eAAeb,yBAAOC,WAAW,gCAAA;AACnC;AAMO,IAAMa,sBAA0D;EACrEC,eAAef,yBAAOC,WAAW,2BAAA;AACnC;AAMO,IAAMe,mBAAoD;EAC/DC,YAAYjB,yBAAOC,WAAW,wBAAA;AAChC;AAMO,IAAMiB,qBAAwD;EACnEC,cAAcnB,yBAAOC,WAAW,0BAAA;AAClC;;;ACvGO,IAAMmB,2BAA2B;AAKjC,IAAMC,eAAe;AAKrB,IAAMC,iBAAiB;AAKvB,IAAMC,wBAAwB;AAM9B,IAAMC,0BAA0B;AAKhC,IAAMC,uBAAuB;AAK7B,IAAMC,6BAA6B;",
6
- "names": ["DEFAULT_INTERNAL_CHANNEL", "DEFAULT_CLIENT_CHANNEL", "DEFAULT_SHELL_CHANNEL", "DEFAULT_VAULT_ORIGIN", "DEFAULT_VAULT_URL", "EXPECTED_CONFIG_VERSION", "defaultConfig", "version", "HOME", "process", "env", "getProfilePath", "root", "profile", "file", "undefined", "DX_CONFIG", "DX_CACHE", "DX_DATA", "DX_STATE", "DX_RUNTIME", "ENV_DX_CONFIG", "ENV_DX_PROFILE", "ENV_DX_PROFILE_DEFAULT", "defaultKey", "base62", "base", "codec", "schema", "getCodecForType", "InvitationEncoder", "decode", "text", "encode", "invitation", "invitationId", "type", "kind", "authMethod", "swarmKey", "state", "timeout", "spaceKey", "AUTHENTICATION_CODE_LENGTH", "INVITATION_TIMEOUT", "CancellableInvitation", "MulticastObservable", "constructor", "subscriber", "initialInvitation", "onCancel", "_onCancel", "cancel", "AuthenticatingInvitation", "onAuthenticate", "_onAuthenticate", "authenticate", "authCode", "wrapObservable", "observable", "Promise", "resolve", "reject", "subscription", "subscribe", "invitation", "invariant", "state", "Invitation", "State", "SUCCESS", "unsubscribe", "err", "types", "TypeCollection", "Properties", "TypedObject", "filter", "Filter", "typename", "constructor", "initValues", "opts", "schema", "registerPrototype", "props", "id", "type", "repeated", "link", "import_protocols", "clientServiceBundle", "createServiceBundle", "SystemService", "schema", "getService", "NetworkService", "LoggingService", "IdentityService", "InvitationsService", "DevicesService", "SpacesService", "DataService", "FunctionRegistryService", "DevtoolsHost", "TracingService", "iframeServiceBundle", "BridgeService", "workerServiceBundle", "WorkerService", "appServiceBundle", "AppService", "shellServiceBundle", "ShellService", "PROXY_CONNECTION_TIMEOUT", "AUTH_TIMEOUT", "STATUS_TIMEOUT", "RESOURCE_LOCK_TIMEOUT", "LOAD_PROPERTIES_TIMEOUT", "CREATE_SPACE_TIMEOUT", "LOAD_CONTROL_FEEDS_TIMEOUT"]
3
+ "sources": ["../../../src/config.ts", "../../../src/echo.ts", "../../../src/invitations/encoder.ts", "../../../src/invitations/invitations.ts", "../../../src/proto/gen/schema.ts", "../../../src/service-definitions.ts", "../../../src/timeouts.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { type ConfigProto } from '@dxos/config';\n\nexport const DEFAULT_INTERNAL_CHANNEL = 'dxos:vault';\nexport const DEFAULT_CLIENT_CHANNEL = 'dxos:app';\nexport const DEFAULT_SHELL_CHANNEL = 'dxos:shell';\n\nexport const DEFAULT_VAULT_ORIGIN = 'https://halo.dxos.org';\nexport const DEFAULT_VAULT_URL = DEFAULT_VAULT_ORIGIN + '/vault.html';\n\nexport const EXPECTED_CONFIG_VERSION = 1;\nexport const defaultConfig: ConfigProto = { version: 1 };\n\n// TODO(burdon): Allow override via env? Generalize since currently NodeJS only.\nconst HOME = typeof process !== 'undefined' ? process?.env?.HOME ?? '' : '';\n\n// Base directories.\n// TODO(burdon): Consider Windows, Linux, OSX.\n// https://wiki.archlinux.org/title/XDG_Base_Directory\n// Each `/dx` directory should contain `/profile/<DX_PROFILE>` subdirectories.\nexport const getProfilePath = (root: string, profile: string, file: string | undefined = undefined) =>\n `${root}/profile/${profile}` + (file ? `/${file}` : '');\n\n// XDG_CONFIG_HOME (Analogous to /etc.)\nexport const DX_CONFIG = `${HOME}/.config/dx`;\n\n// XDG_CACHE_HOME (Analogous to /var/cache).\nexport const DX_CACHE = `${HOME}/.cache/dx`;\n\n// TODO(burdon): Storage should use this by default (make path optional).\n// XDG_DATA_HOME (Analogous to /usr/share).\nexport const DX_DATA = `${HOME}/.local/share/dx`;\n\n// XDG_STATE_HOME (Analogous to /var/lib).\nexport const DX_STATE = `${HOME}/.local/state/dx`;\n\n// XDG_RUNTIME_DIR (Non-essential files, sockets, etc.)\nexport const DX_RUNTIME = '/tmp/dx/run';\n\nexport const ENV_DX_CONFIG = 'DX_CONFIG';\nexport const ENV_DX_PROFILE = 'DX_PROFILE';\nexport const ENV_DX_PROFILE_DEFAULT = 'default';\n", "//\n// Copyright 2021 DXOS.org\n//\n\nimport type { MulticastObservable } from '@dxos/async';\nimport type { TypeCollection } from '@dxos/echo-schema';\nimport type { PublicKey } from '@dxos/keys';\nimport type { Invitation } from '@dxos/protocols/proto/dxos/client/services';\n\nimport type { AuthenticatingInvitation } from './invitations';\nimport type { Space } from './space';\n\n// Space properties key for default metadata.\n// TODO(wittjosiah): Remove. Default space should be indicated by data in HALO space.\nexport const defaultKey = '__DEFAULT__';\n\n/**\n * TODO(burdon): Public API (move comments here).\n */\n// TODO(wittjosiah): Rename?\n// https://ts.dev/style/#naming-style\n// ClientApi? ClientProtocol?\nexport interface Echo extends MulticastObservable<Space[]> {\n /**\n * Resolves when the default space is available.\n */\n // TODO(wittjosiah): Remove. Ensure default space is always available.\n get isReady(): MulticastObservable<boolean>;\n\n /**\n * Returns the list of spaces.\n */\n get(): Space[];\n\n /**\n * Returns the space with the given key.\n */\n get(spaceKey: PublicKey): Space | undefined;\n\n /**\n * Returns the default space.\n */\n get default(): Space;\n\n /**\n * Creates a new space.\n */\n create(): Promise<Space>;\n\n /**\n * Creates a space from the given snapshot.\n */\n // clone(snapshot: SpaceSnapshot): Promise<Space>;\n\n /**\n * Joins an existing space using the given invitation.\n */\n join(invitation: Invitation | string): AuthenticatingInvitation;\n\n /**\n * Adds a schema to ECHO.\n */\n // TODO(dmaretskyi): Rename `addTypes`.\n addSchema(schema: TypeCollection): void;\n}\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport base from 'base-x';\n\nimport { schema } from '@dxos/protocols';\nimport { type Invitation } from '@dxos/protocols/proto/dxos/client/services';\n\n// Encode with URL-safe alpha-numeric characters.\nconst base62 = base('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');\n\nconst codec = schema.getCodecForType('dxos.client.services.Invitation');\n\n/**\n * Encodes and decodes an invitation proto into/from alphanumeric chars.\n */\nexport class InvitationEncoder {\n static decode(text: string): Invitation {\n return codec.decode(base62.decode(text));\n }\n\n static encode(invitation: Invitation): string {\n return base62.encode(\n codec.encode({\n invitationId: invitation.invitationId,\n type: invitation.type,\n kind: invitation.kind,\n authMethod: invitation.authMethod,\n swarmKey: invitation.swarmKey,\n state: invitation.state,\n timeout: invitation.timeout,\n ...(invitation.spaceKey ? { spaceKey: invitation.spaceKey } : {}),\n }),\n );\n }\n}\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { MulticastObservable, type Observable, type Subscriber } from '@dxos/async';\nimport { invariant } from '@dxos/invariant';\nimport { Invitation } from '@dxos/protocols/proto/dxos/client/services';\n\nexport const AUTHENTICATION_CODE_LENGTH = 6;\n\nexport const INVITATION_TIMEOUT = 3 * 60_000; // 3 mins.\n\nexport interface Invitations {\n created: MulticastObservable<CancellableInvitation[]>;\n accepted: MulticastObservable<AuthenticatingInvitation[]>;\n share(options?: Partial<Invitation>): CancellableInvitation;\n join(invitation: Invitation): AuthenticatingInvitation;\n}\n\n/**\n * Base class for all invitation observables and providers.\n */\nexport class CancellableInvitation extends MulticastObservable<Invitation> {\n private readonly _onCancel: () => Promise<void>;\n\n constructor({\n subscriber,\n initialInvitation,\n onCancel,\n }: {\n subscriber: Observable<Invitation> | Subscriber<Invitation>;\n initialInvitation: Invitation;\n onCancel: () => Promise<void>;\n }) {\n super(subscriber, initialInvitation);\n this._onCancel = onCancel;\n }\n\n cancel(): Promise<void> {\n return this._onCancel();\n }\n}\n\n/**\n * Cancelable observer that relays authentication requests.\n */\nexport class AuthenticatingInvitation extends CancellableInvitation {\n private readonly _onAuthenticate: (authCode: string) => Promise<void>;\n\n constructor({\n subscriber,\n initialInvitation,\n onCancel,\n onAuthenticate,\n }: {\n subscriber: Observable<Invitation> | Subscriber<Invitation>;\n initialInvitation: Invitation;\n onCancel: () => Promise<void>;\n onAuthenticate: (authCode: string) => Promise<void>;\n }) {\n super({ subscriber, initialInvitation, onCancel });\n this._onAuthenticate = onAuthenticate;\n }\n\n async authenticate(authCode: string): Promise<void> {\n return this._onAuthenticate(authCode);\n }\n}\n\n/**\n * Testing util to wrap non-authenticating observable with promise.\n * Don't use this in production code.\n * @deprecated\n */\n// TODO(wittjosiah): Move to testing.\nexport const wrapObservable = async (observable: CancellableInvitation): Promise<Invitation> => {\n return new Promise((resolve, reject) => {\n const subscription = observable.subscribe(\n (invitation: Invitation | undefined) => {\n // TODO(burdon): Throw error if auth requested.\n invariant(invitation?.state === Invitation.State.SUCCESS);\n subscription.unsubscribe();\n resolve(invitation);\n },\n (err: Error) => {\n subscription.unsubscribe();\n reject(err);\n },\n );\n });\n};\n", "/**\n * @generated @dxos/echo-typegen src/proto/schema.proto\n **/\n\nimport * as dxos_echo_schema from \"@dxos/echo-schema\";\n\nexport const types = new dxos_echo_schema.TypeCollection();\n\nexport type PropertiesProps = {\n name: string;\n};\n\nexport class Properties extends dxos_echo_schema.TypedObject<PropertiesProps> {\n declare static readonly schema: dxos_echo_schema.Schema;\n\n static filter(\n filter?:\n | Partial<PropertiesProps>\n | dxos_echo_schema.OperatorFilter<Properties>\n ): dxos_echo_schema.Filter<Properties> {\n return dxos_echo_schema.Filter.typename(\n \"dxos.sdk.client.Properties\",\n filter\n );\n }\n\n constructor(\n initValues?: Partial<PropertiesProps>,\n opts?: dxos_echo_schema.TypedObjectOptions\n ) {\n super({ ...initValues }, { schema: Properties.schema, ...opts });\n }\n declare name: string;\n}\n\ntypes.registerPrototype(Properties, {\n typename: \"dxos.sdk.client.Properties\",\n props: [{ id: \"name\", type: 1, repeated: false }],\n});\n\ntypes.link();\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { type Context } from '@dxos/context';\nimport { schema } from '@dxos/protocols';\nimport { type FunctionRegistryService } from '@dxos/protocols/proto/dxos/agent/functions';\nimport {\n type DevicesService,\n type IdentityService,\n type InvitationsService,\n type LoggingService,\n type NetworkService,\n type SpacesService,\n type SystemService,\n} from '@dxos/protocols/proto/dxos/client/services';\nimport { type DevtoolsHost } from '@dxos/protocols/proto/dxos/devtools/host';\nimport { type DataService } from '@dxos/protocols/proto/dxos/echo/service';\nimport type { AppService, ShellService, WorkerService } from '@dxos/protocols/proto/dxos/iframe';\nimport type { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';\nimport { type TracingService } from '@dxos/protocols/proto/dxos/tracing';\nimport { createServiceBundle, type ServiceBundle } from '@dxos/rpc';\n\n//\n// NOTE: Should contain client/proxy dependencies only.\n//\n\nexport type ClientServices = {\n SystemService: SystemService;\n NetworkService: NetworkService;\n LoggingService: LoggingService;\n\n IdentityService: IdentityService;\n InvitationsService: InvitationsService;\n DevicesService: DevicesService;\n SpacesService: SpacesService;\n DataService: DataService;\n\n FunctionRegistryService: FunctionRegistryService;\n\n // TODO(burdon): Deprecated.\n DevtoolsHost: DevtoolsHost;\n\n TracingService: TracingService;\n};\n\n/**\n * Provide access to client services definitions and service handler.\n */\nexport interface ClientServicesProvider {\n descriptors: ServiceBundle<ClientServices>;\n services: Partial<ClientServices>;\n\n open(ctx: Context): Promise<void>;\n close(ctx: Context): Promise<void>;\n}\n\n/**\n * Services supported by host.\n */\nexport const clientServiceBundle = createServiceBundle<ClientServices>({\n SystemService: schema.getService('dxos.client.services.SystemService'),\n NetworkService: schema.getService('dxos.client.services.NetworkService'),\n LoggingService: schema.getService('dxos.client.services.LoggingService'),\n\n IdentityService: schema.getService('dxos.client.services.IdentityService'),\n InvitationsService: schema.getService('dxos.client.services.InvitationsService'),\n DevicesService: schema.getService('dxos.client.services.DevicesService'),\n SpacesService: schema.getService('dxos.client.services.SpacesService'),\n DataService: schema.getService('dxos.echo.service.DataService'),\n\n // Agent-only.\n FunctionRegistryService: schema.getService('dxos.agent.functions.FunctionRegistryService'),\n\n // TODO(burdon): Deprecated.\n DevtoolsHost: schema.getService('dxos.devtools.host.DevtoolsHost'),\n\n TracingService: schema.getService('dxos.tracing.TracingService'),\n});\n\nexport type IframeServiceBundle = {\n BridgeService: BridgeService;\n};\n\nexport const iframeServiceBundle: ServiceBundle<IframeServiceBundle> = {\n BridgeService: schema.getService('dxos.mesh.bridge.BridgeService'),\n};\n\nexport type WorkerServiceBundle = {\n WorkerService: WorkerService;\n};\n\nexport const workerServiceBundle: ServiceBundle<WorkerServiceBundle> = {\n WorkerService: schema.getService('dxos.iframe.WorkerService'),\n};\n\nexport type AppServiceBundle = {\n AppService: AppService;\n};\n\nexport const appServiceBundle: ServiceBundle<AppServiceBundle> = {\n AppService: schema.getService('dxos.iframe.AppService'),\n};\n\nexport type ShellServiceBundle = {\n ShellService: ShellService;\n};\n\nexport const shellServiceBundle: ServiceBundle<ShellServiceBundle> = {\n ShellService: schema.getService('dxos.iframe.ShellService'),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\n/**\n * Timeout for making rpc connections from remote proxies.\n */\nexport const PROXY_CONNECTION_TIMEOUT = 30_000;\n\n/**\n * Timeout for the device to be added to the trusted set during auth.\n */\nexport const AUTH_TIMEOUT = 30_000;\n\n/**\n * Timeout for how long the remote client will wait before assuming the connection is lost.\n */\nexport const STATUS_TIMEOUT = 10_000;\n\n/**\n * Timeout for waiting before stealing resource lock.\n */\nexport const RESOURCE_LOCK_TIMEOUT = 3_000;\n\n/**\n * Timeout for space properties to be loaded in the set of tracked items.\n * Accounts for latency between SpaceService reporting the space as READY and DataService streaming the item states.\n */\nexport const LOAD_PROPERTIES_TIMEOUT = 3_000;\n\n/**\n * Timeout for creating new spaces.\n */\nexport const CREATE_SPACE_TIMEOUT = 3_000;\n\n/**\n * Timeout for loading of control feeds.\n */\nexport const LOAD_CONTROL_FEEDS_TIMEOUT = 3_000;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEIA,oBAAiB;AAEjB,uBAAuB;ACFvB,mBAAsE;AACtE,uBAA0B;AAC1B,sBAA2B;ACF3B,uBAAkC;ACClC,IAAAA,oBAAuB;AAgBvB,iBAAwD;ALfjD,IAAMC,2BAA2B;AACjC,IAAMC,yBAAyB;AAC/B,IAAMC,wBAAwB;AAE9B,IAAMC,uBAAuB;AAC7B,IAAMC,oBAAoBD,uBAAuB;AAEjD,IAAME,0BAA0B;AAChC,IAAMC,gBAA6B;EAAEC,SAAS;AAAE;AAGvD,IAAMC,OAAO,OAAOC,YAAY,cAAcA,SAASC,KAAKF,QAAQ,KAAK;AAMlE,IAAMG,iBAAiB,CAACC,MAAcC,SAAiBC,OAA2BC,WACvF,GAAGH,IAAAA,YAAgBC,OAAAA,MAAaC,OAAO,IAAIA,IAAAA,KAAS;AAG/C,IAAME,YAAY,GAAGR,IAAAA;AAGrB,IAAMS,WAAW,GAAGT,IAAAA;AAIpB,IAAMU,UAAU,GAAGV,IAAAA;AAGnB,IAAMW,WAAW,GAAGX,IAAAA;AAGpB,IAAMY,aAAa;AAEnB,IAAMC,gBAAgB;AACtB,IAAMC,iBAAiB;AACvB,IAAMC,yBAAyB;AC9B/B,IAAMC,aAAa;ACJ1B,IAAMC,aAASC,cAAAA,SAAK,gEAAA;AAEpB,IAAMC,QAAQC,wBAAOC,gBAAgB,iCAAA;AAK9B,IAAMC,oBAAN,MAAMA;EACX,OAAOC,OAAOC,MAA0B;AACtC,WAA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;EACnEC,cAAc9E,kBAAAA,OAAO4D,WAAW,0BAAA;AAClC;ACvGO,IAAMmB,2BAA2B;AAKjC,IAAMC,eAAe;AAKrB,IAAMC,iBAAiB;AAKvB,IAAMC,wBAAwB;AAM9B,IAAMC,0BAA0B;AAKhC,IAAMC,uBAAuB;AAK7B,IAAMC,6BAA6B;",
6
+ "names": ["import_protocols", "DEFAULT_INTERNAL_CHANNEL", "DEFAULT_CLIENT_CHANNEL", "DEFAULT_SHELL_CHANNEL", "DEFAULT_VAULT_ORIGIN", "DEFAULT_VAULT_URL", "EXPECTED_CONFIG_VERSION", "defaultConfig", "version", "HOME", "process", "env", "getProfilePath", "root", "profile", "file", "undefined", "DX_CONFIG", "DX_CACHE", "DX_DATA", "DX_STATE", "DX_RUNTIME", "ENV_DX_CONFIG", "ENV_DX_PROFILE", "ENV_DX_PROFILE_DEFAULT", "defaultKey", "base62", "base", "codec", "schema", "getCodecForType", "InvitationEncoder", "decode", "text", "encode", "invitation", "invitationId", "type", "kind", "authMethod", "swarmKey", "state", "timeout", "spaceKey", "AUTHENTICATION_CODE_LENGTH", "INVITATION_TIMEOUT", "CancellableInvitation", "MulticastObservable", "constructor", "subscriber", "initialInvitation", "onCancel", "_onCancel", "cancel", "AuthenticatingInvitation", "onAuthenticate", "_onAuthenticate", "authenticate", "authCode", "wrapObservable", "observable", "Promise", "resolve", "reject", "subscription", "subscribe", "invariant", "Invitation", "State", "SUCCESS", "unsubscribe", "err", "types", "TypeCollection", "Properties", "TypedObject", "filter", "Filter", "typename", "initValues", "opts", "registerPrototype", "props", "id", "repeated", "link", "clientServiceBundle", "createServiceBundle", "SystemService", "getService", "NetworkService", "LoggingService", "IdentityService", "InvitationsService", "DevicesService", "SpacesService", "DataService", "FunctionRegistryService", "DevtoolsHost", "TracingService", "iframeServiceBundle", "BridgeService", "workerServiceBundle", "WorkerService", "appServiceBundle", "AppService", "shellServiceBundle", "ShellService", "PROXY_CONNECTION_TIMEOUT", "AUTH_TIMEOUT", "STATUS_TIMEOUT", "RESOURCE_LOCK_TIMEOUT", "LOAD_PROPERTIES_TIMEOUT", "CREATE_SPACE_TIMEOUT", "LOAD_CONTROL_FEEDS_TIMEOUT"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytes":5856,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/echo.ts":{"bytes":2848,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/halo.ts":{"bytes":1739,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytes":3771,"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytes":7749,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytes":578,"imports":[{"path":"packages/sdk/client-protocol/src/invitations/encoder.ts","kind":"import-statement","original":"./encoder"},{"path":"packages/sdk/client-protocol/src/invitations/invitations.ts","kind":"import-statement","original":"./invitations"}],"format":"esm"},"packages/sdk/client-protocol/src/proto/gen/schema.ts":{"bytes":3295,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/proto/index.ts":{"bytes":480,"imports":[{"path":"packages/sdk/client-protocol/src/proto/gen/schema.ts","kind":"import-statement","original":"./gen/schema"}],"format":"esm"},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytes":8276,"imports":[{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/shell.ts":{"bytes":1036,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/space.ts":{"bytes":3892,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/timeouts.ts":{"bytes":3134,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/index.ts":{"bytes":1167,"imports":[{"path":"packages/sdk/client-protocol/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/sdk/client-protocol/src/echo.ts","kind":"import-statement","original":"./echo"},{"path":"packages/sdk/client-protocol/src/halo.ts","kind":"import-statement","original":"./halo"},{"path":"packages/sdk/client-protocol/src/invitations/index.ts","kind":"import-statement","original":"./invitations"},{"path":"packages/sdk/client-protocol/src/proto/index.ts","kind":"import-statement","original":"./proto"},{"path":"packages/sdk/client-protocol/src/service-definitions.ts","kind":"import-statement","original":"./service-definitions"},{"path":"packages/sdk/client-protocol/src/shell.ts","kind":"import-statement","original":"./shell"},{"path":"packages/sdk/client-protocol/src/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/sdk/client-protocol/src/timeouts.ts","kind":"import-statement","original":"./timeouts"}],"format":"esm"}},"outputs":{"packages/sdk/client-protocol/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18444},"packages/sdk/client-protocol/dist/lib/node/index.cjs":{"imports":[{"path":"base-x","kind":"require-call","external":true},{"path":"@dxos/protocols","kind":"require-call","external":true},{"path":"@dxos/async","kind":"require-call","external":true},{"path":"@dxos/invariant","kind":"require-call","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"require-call","external":true},{"path":"@dxos/echo-schema","kind":"require-call","external":true},{"path":"@dxos/protocols","kind":"require-call","external":true},{"path":"@dxos/rpc","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/sdk/client-protocol/src/index.ts","inputs":{"packages/sdk/client-protocol/src/index.ts":{"bytesInOutput":1779},"packages/sdk/client-protocol/src/config.ts":{"bytesInOutput":797},"packages/sdk/client-protocol/src/echo.ts":{"bytesInOutput":32},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytesInOutput":817},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytesInOutput":1548},"packages/sdk/client-protocol/src/proto/gen/schema.ts":{"bytesInOutput":618},"packages/sdk/client-protocol/src/proto/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytesInOutput":1686},"packages/sdk/client-protocol/src/timeouts.ts":{"bytesInOutput":224}},"bytes":10219}}}
1
+ {"inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytes":5851,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/echo.ts":{"bytes":2843,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/halo.ts":{"bytes":1734,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytes":3766,"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytes":7744,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytes":573,"imports":[{"path":"packages/sdk/client-protocol/src/invitations/encoder.ts","kind":"import-statement","original":"./encoder"},{"path":"packages/sdk/client-protocol/src/invitations/invitations.ts","kind":"import-statement","original":"./invitations"}],"format":"esm"},"packages/sdk/client-protocol/src/proto/gen/schema.ts":{"bytes":3290,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/proto/index.ts":{"bytes":475,"imports":[{"path":"packages/sdk/client-protocol/src/proto/gen/schema.ts","kind":"import-statement","original":"./gen/schema"}],"format":"esm"},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytes":8271,"imports":[{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/shell.ts":{"bytes":1031,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/space.ts":{"bytes":3887,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/timeouts.ts":{"bytes":3129,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/index.ts":{"bytes":1162,"imports":[{"path":"packages/sdk/client-protocol/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/sdk/client-protocol/src/echo.ts","kind":"import-statement","original":"./echo"},{"path":"packages/sdk/client-protocol/src/halo.ts","kind":"import-statement","original":"./halo"},{"path":"packages/sdk/client-protocol/src/invitations/index.ts","kind":"import-statement","original":"./invitations"},{"path":"packages/sdk/client-protocol/src/proto/index.ts","kind":"import-statement","original":"./proto"},{"path":"packages/sdk/client-protocol/src/service-definitions.ts","kind":"import-statement","original":"./service-definitions"},{"path":"packages/sdk/client-protocol/src/shell.ts","kind":"import-statement","original":"./shell"},{"path":"packages/sdk/client-protocol/src/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/sdk/client-protocol/src/timeouts.ts","kind":"import-statement","original":"./timeouts"}],"format":"esm"}},"outputs":{"packages/sdk/client-protocol/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18119},"packages/sdk/client-protocol/dist/lib/node/index.cjs":{"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"exports":["AUTHENTICATION_CODE_LENGTH","AUTH_TIMEOUT","AuthenticatingInvitation","CREATE_SPACE_TIMEOUT","CancellableInvitation","DEFAULT_CLIENT_CHANNEL","DEFAULT_INTERNAL_CHANNEL","DEFAULT_SHELL_CHANNEL","DEFAULT_VAULT_ORIGIN","DEFAULT_VAULT_URL","DX_CACHE","DX_CONFIG","DX_DATA","DX_RUNTIME","DX_STATE","ENV_DX_CONFIG","ENV_DX_PROFILE","ENV_DX_PROFILE_DEFAULT","EXPECTED_CONFIG_VERSION","INVITATION_TIMEOUT","InvitationEncoder","LOAD_CONTROL_FEEDS_TIMEOUT","LOAD_PROPERTIES_TIMEOUT","PROXY_CONNECTION_TIMEOUT","Properties","RESOURCE_LOCK_TIMEOUT","STATUS_TIMEOUT","appServiceBundle","clientServiceBundle","defaultConfig","defaultKey","getProfilePath","iframeServiceBundle","shellServiceBundle","types","workerServiceBundle","wrapObservable"],"entryPoint":"packages/sdk/client-protocol/src/index.ts","inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytesInOutput":797},"packages/sdk/client-protocol/src/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/echo.ts":{"bytesInOutput":32},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytesInOutput":748},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytesInOutput":1490},"packages/sdk/client-protocol/src/proto/gen/schema.ts":{"bytesInOutput":611},"packages/sdk/client-protocol/src/proto/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytesInOutput":1426},"packages/sdk/client-protocol/src/timeouts.ts":{"bytesInOutput":224}},"bytes":6524}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-protocol",
3
- "version": "0.3.8-next.f4e0086",
3
+ "version": "0.3.8",
4
4
  "description": "Core DXOS Client API.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -18,22 +18,22 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "base-x": "~3.0.9",
21
- "@dxos/async": "0.3.8-next.f4e0086",
22
- "@dxos/context": "0.3.8-next.f4e0086",
23
- "@dxos/config": "0.3.8-next.f4e0086",
24
- "@dxos/document-model": "0.3.8-next.f4e0086",
25
- "@dxos/echo-db": "0.3.8-next.f4e0086",
26
- "@dxos/invariant": "0.3.8-next.f4e0086",
27
- "@dxos/echo-schema": "0.3.8-next.f4e0086",
28
- "@dxos/keys": "0.3.8-next.f4e0086",
29
- "@dxos/model-factory": "0.3.8-next.f4e0086",
30
- "@dxos/node-std": "0.3.8-next.f4e0086",
31
- "@dxos/rpc": "0.3.8-next.f4e0086",
32
- "@dxos/text-model": "0.3.8-next.f4e0086",
33
- "@dxos/protocols": "0.3.8-next.f4e0086"
21
+ "@dxos/async": "0.3.8",
22
+ "@dxos/config": "0.3.8",
23
+ "@dxos/context": "0.3.8",
24
+ "@dxos/document-model": "0.3.8",
25
+ "@dxos/echo-db": "0.3.8",
26
+ "@dxos/echo-schema": "0.3.8",
27
+ "@dxos/invariant": "0.3.8",
28
+ "@dxos/model-factory": "0.3.8",
29
+ "@dxos/keys": "0.3.8",
30
+ "@dxos/node-std": "0.3.8",
31
+ "@dxos/protocols": "0.3.8",
32
+ "@dxos/rpc": "0.3.8",
33
+ "@dxos/text-model": "0.3.8"
34
34
  },
35
35
  "devDependencies": {
36
- "@dxos/echo-typegen": "0.3.8-next.f4e0086"
36
+ "@dxos/echo-typegen": "0.3.8"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"