@dxos/client-protocol 0.8.4-main.c1de068 → 0.8.4-main.c351d160a8

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.
Files changed (50) hide show
  1. package/dist/lib/browser/chunk-HQBTSFTW.mjs +35 -0
  2. package/dist/lib/browser/chunk-HQBTSFTW.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +45 -35
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/types/index.mjs +9 -0
  7. package/dist/lib/browser/types/index.mjs.map +7 -0
  8. package/dist/lib/node-esm/chunk-URWCZ2QB.mjs +37 -0
  9. package/dist/lib/node-esm/chunk-URWCZ2QB.mjs.map +7 -0
  10. package/dist/lib/node-esm/index.mjs +44 -35
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/types/index.mjs +10 -0
  14. package/dist/lib/node-esm/types/index.mjs.map +7 -0
  15. package/dist/types/src/config.d.ts +24 -8
  16. package/dist/types/src/config.d.ts.map +1 -1
  17. package/dist/types/src/echo.d.ts +9 -15
  18. package/dist/types/src/echo.d.ts.map +1 -1
  19. package/dist/types/src/halo.d.ts +1 -1
  20. package/dist/types/src/halo.d.ts.map +1 -1
  21. package/dist/types/src/index.d.ts +3 -3
  22. package/dist/types/src/index.d.ts.map +1 -1
  23. package/dist/types/src/{service-definitions.d.ts → service.d.ts} +18 -7
  24. package/dist/types/src/service.d.ts.map +1 -0
  25. package/dist/types/src/shell.d.ts +1 -1
  26. package/dist/types/src/shell.d.ts.map +1 -1
  27. package/dist/types/src/space.d.ts +31 -17
  28. package/dist/types/src/space.d.ts.map +1 -1
  29. package/dist/types/src/timeouts.d.ts +4 -0
  30. package/dist/types/src/timeouts.d.ts.map +1 -1
  31. package/dist/types/src/types/SpaceProperties.d.ts +27 -0
  32. package/dist/types/src/types/SpaceProperties.d.ts.map +1 -0
  33. package/dist/types/src/types/index.d.ts +2 -0
  34. package/dist/types/src/types/index.d.ts.map +1 -0
  35. package/dist/types/tsconfig.tsbuildinfo +1 -1
  36. package/package.json +31 -19
  37. package/src/config.ts +33 -14
  38. package/src/echo.ts +11 -20
  39. package/src/halo.ts +1 -1
  40. package/src/index.ts +3 -3
  41. package/src/{service-definitions.ts → service.ts} +26 -12
  42. package/src/shell.ts +1 -1
  43. package/src/space.ts +51 -28
  44. package/src/timeouts.ts +5 -0
  45. package/src/types/SpaceProperties.ts +48 -0
  46. package/src/types/index.ts +5 -0
  47. package/dist/types/src/schema.d.ts +0 -27
  48. package/dist/types/src/schema.d.ts.map +0 -1
  49. package/dist/types/src/service-definitions.d.ts.map +0 -1
  50. package/src/schema.ts +0 -28
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/client.ts", "../../../src/config.ts", "../../../src/invitations/encoder.ts", "../../../src/invitations/invitations.ts", "../../../src/service-definitions.ts", "../../../src/timeouts.ts", "../../../src/schema.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport const ClientServicesProviderResource = Symbol.for('dxos.resource.ClientServices');\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';\nexport const DEFAULT_WORKER_BROADCAST_CHANNEL = 'dxos:shared-worker';\n\n/**\n * @deprecated\n */\nexport const DEFAULT_VAULT_URL = 'https://halo.dxos.org/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_NO_AGENT = 'DX_NO_AGENT';\nexport const ENV_DX_PROFILE = 'DX_PROFILE';\nexport const ENV_DX_PROFILE_DEFAULT = 'default';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport base from 'base-x';\n\nimport { schema } from '@dxos/protocols/proto';\nimport { 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 const decodedInvitation = codec.decode(base62.decode(text));\n if (decodedInvitation.type === Invitation.Type.MULTIUSE) {\n decodedInvitation.type = Invitation.Type.INTERACTIVE;\n decodedInvitation.multiUse = true;\n }\n return decodedInvitation;\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 guestKeypair: invitation.guestKeypair,\n spaceId: invitation.spaceId,\n lifetime: invitation.lifetime,\n created: invitation.created,\n // TODO(wittjosiah): Make these optional to encode for greater privacy.\n ...(invitation.spaceKey ? { spaceKey: invitation.spaceKey } : {}),\n ...(invitation.target ? { target: invitation.target } : {}),\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 get expired() {\n const expiration = getExpirationTime(this.get());\n return expiration && expiration.getTime() < Date.now();\n }\n\n get expiry() {\n return getExpirationTime(this.get());\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\nexport const getExpirationTime = (invitation: Partial<Invitation>): Date | undefined => {\n if (!(invitation.created && invitation.lifetime)) {\n return;\n }\n return new Date(invitation.created.getTime() + invitation.lifetime * 1000);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { type Event } from '@dxos/async';\nimport { schema } from '@dxos/protocols/proto';\nimport type { FunctionRegistryService } from '@dxos/protocols/proto/dxos/agent/functions';\nimport type {\n DevicesService,\n IdentityService,\n InvitationsService,\n LoggingService,\n NetworkService,\n SpacesService,\n SystemService,\n ContactsService,\n EdgeAgentService,\n} from '@dxos/protocols/proto/dxos/client/services';\nimport type { DevtoolsHost } from '@dxos/protocols/proto/dxos/devtools/host';\nimport type { QueryService } from '@dxos/protocols/proto/dxos/echo/query';\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 { type ServiceBundle, createServiceBundle } 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 QueryService: QueryService;\n DevicesService: DevicesService;\n SpacesService: SpacesService;\n DataService: DataService;\n ContactsService: ContactsService;\n EdgeAgentService: EdgeAgentService;\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 /**\n * The connection to the services provider was terminated.\n * This should fire if the services disconnect unexpectedly or during a client reset.\n */\n closed: Event<Error | undefined>;\n descriptors: ServiceBundle<ClientServices>;\n services: Partial<ClientServices>;\n\n // TODO(burdon): Should take context from parent?\n open(): Promise<void>;\n close(): 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 QueryService: schema.getService('dxos.echo.query.QueryService'),\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 ContactsService: schema.getService('dxos.client.services.ContactsService'),\n EdgeAgentService: schema.getService('dxos.client.services.EdgeAgentService'),\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 = 5_000;\n\n/**\n * Timeout for loading of control feeds.\n */\nexport const LOAD_CONTROL_FEEDS_TIMEOUT = 3_000;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { Type } from '@dxos/echo';\nimport { TypedObject } from '@dxos/echo-schema';\n\nexport const TYPE_PROPERTIES = 'dxos.org/type/Properties';\n\n// TODO(burdon): Factor out (co-locate with TYPE_PROPERTIES).\nexport class PropertiesType extends TypedObject({\n typename: TYPE_PROPERTIES,\n version: '0.1.0',\n})(\n {\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): Make generic?\n hue: Schema.optional(Schema.String),\n icon: Schema.optional(Schema.String),\n invocationTraceQueue: Schema.optional(Type.Ref(Type.Expando)),\n },\n { record: true },\n) {}\n\n// TODO(burdon): Remove? Use PropertiesType instead?\nexport type PropertiesTypeProps = Pick<PropertiesType, 'name' | 'hue' | 'icon' | 'invocationTraceQueue'>;\n"],
5
- "mappings": ";;;AAIO,IAAMA,iCAAiCC,OAAOC,IAAI,8BAAA;;;ACElD,IAAMC,2BAA2B;AACjC,IAAMC,yBAAyB;AAC/B,IAAMC,wBAAwB;AAC9B,IAAMC,mCAAmC;AAKzC,IAAMC,oBAAoB;AAE1B,IAAMC,0BAA0B;AAChC,IAAMC,gBAA6B;EAAEC,SAAS;AAAE;AAGvD,IAAMC,OAAO,OAAOC,YAAY,cAAeA,SAASC,KAAKF,QAAQ,KAAM;AAMpE,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,kBAAkB;AACxB,IAAMC,iBAAiB;AACvB,IAAMC,yBAAyB;;;AC5CtC,OAAOC,UAAU;AAEjB,SAASC,cAAc;AACvB,SAASC,kBAAkB;AAG3B,IAAMC,SAASC,KAAK,gEAAA;AAEpB,IAAMC,QAAQC,OAAOC,gBAAgB,iCAAA;AAK9B,IAAMC,oBAAN,MAAMA;EACX,OAAOC,OAAOC,MAA0B;AACtC,UAAMC,oBAAoBN,MAAMI,OAAON,OAAOM,OAAOC,IAAAA,CAAAA;AACrD,QAAIC,kBAAkBC,SAASC,WAAWC,KAAKC,U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AA0D;EACrEC,eAAehB,QAAOC,WAAW,gCAAA;AACnC;AAMO,IAAMgB,sBAA0D;EACrEC,eAAelB,QAAOC,WAAW,2BAAA;AACnC;AAMO,IAAMkB,mBAAoD;EAC/DC,YAAYpB,QAAOC,WAAW,wBAAA;AAChC;AAMO,IAAMoB,qBAAwD;EACnEC,cAActB,QAAOC,WAAW,0BAAA;AAClC;;;ACtHO,IAAMsB,2BAA2B;AAKjC,IAAMC,eAAe;AAKrB,IAAMC,iBAAiB;AAKvB,IAAMC,wBAAwB;AAM9B,IAAMC,0BAA0B;AAKhC,IAAMC,uBAAuB;AAK7B,IAAMC,6BAA6B;;;AClC1C,SAASC,cAAc;AAEvB,SAASC,YAAY;AACrB,SAASC,mBAAmB;AAErB,IAAMC,kBAAkB;AAGxB,IAAMC,iBAAN,cAA6BC,YAAY;EAC9CC,UAAUH;EACVI,SAAS;AACX,CAAA,EACE;EACEC,MAAMC,OAAOC,SAASD,OAAOE,MAAM;;EAEnCC,KAAKH,OAAOC,SAASD,OAAOE,MAAM;EAClCE,MAAMJ,OAAOC,SAASD,OAAOE,MAAM;EACnCG,sBAAsBL,OAAOC,SAASK,KAAKC,IAAID,KAAKE,OAAO,CAAA;AAC7D,GACA;EAAEC,QAAQ;AAAK,CAAA,EAAA;AACd;",
6
- "names": ["ClientServicesProviderResource", "Symbol", "for", "DEFAULT_INTERNAL_CHANNEL", "DEFAULT_CLIENT_CHANNEL", "DEFAULT_SHELL_CHANNEL", "DEFAULT_WORKER_BROADCAST_CHANNEL", "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_NO_AGENT", "ENV_DX_PROFILE", "ENV_DX_PROFILE_DEFAULT", "base", "schema", "Invitation", "base62", "base", "codec", "schema", "getCodecForType", "InvitationEncoder", "decode", "text", "decodedInvitation", "type", "Invitation", "Type", "MULTIUSE", "INTERACTIVE", "multiUse", "encode", "invitation", "invitationId", "kind", "authMethod", "swarmKey", "state", "timeout", "guestKeypair", "spaceId", "lifetime", "created", "spaceKey", "target", "MulticastObservable", "invariant", "Invitation", "AUTHENTICATION_CODE_LENGTH", "INVITATION_TIMEOUT", "CancellableInvitation", "subscriber", "initialInvitation", "onCancel", "_onCancel", "cancel", "expired", "expiration", "getExpirationTime", "get", "getTime", "Date", "now", "expiry", "AuthenticatingInvitation", "onAuthenticate", "_onAuthenticate", "authenticate", "authCode", "wrapObservable", "observable", "Promise", "resolve", "reject", "subscription", "subscribe", "invitation", "state", "State", "SUCCESS", "unsubscribe", "err", "created", "lifetime", "schema", "createServiceBundle", "clientServiceBundle", "createServiceBundle", "SystemService", "schema", "getService", "NetworkService", "LoggingService", "IdentityService", "QueryService", "InvitationsService", "DevicesService", "SpacesService", "DataService", "ContactsService", "EdgeAgentService", "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", "Schema", "Type", "TypedObject", "TYPE_PROPERTIES", "PropertiesType", "TypedObject", "typename", "version", "name", "Schema", "optional", "String", "hue", "icon", "invocationTraceQueue", "Type", "Ref", "Expando", "record"]
3
+ "sources": ["../../../src/client.ts", "../../../src/config.ts", "../../../src/invitations/encoder.ts", "../../../src/invitations/invitations.ts", "../../../src/service.ts", "../../../src/space.ts", "../../../src/timeouts.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport const ClientServicesProviderResource = Symbol.for('dxos.resource.ClientServices');\n", "//\n// Copyright 2022 DXOS.org\n//\n\n// TODO(wittjosiah): Factor out to @dxos/config.\n\nexport const DEFAULT_CLIENT_CHANNEL = 'dxos:app';\nexport const DEFAULT_INTERNAL_CHANNEL = 'dxos:vault';\nexport const DEFAULT_SHELL_CHANNEL = 'dxos:shell';\nexport const DEFAULT_WORKER_BROADCAST_CHANNEL = 'dxos:shared-worker';\n\n/**\n * @deprecated\n */\nexport const DEFAULT_VAULT_URL = 'https://halo.dxos.org/vault.html';\n\n/**\n * @deprecated\n */\n// TODO(burdon): Remove need (i.e., make undefined do the right thing).\nexport const DEFAULT_PROFILE = 'default';\n\nexport const EXPECTED_CONFIG_VERSION = 1;\nexport const defaultConfig = { 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// 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 enum DXEnv {\n CONFIG = 'DX_CONFIG',\n DEBUG = 'DX_DEBUG',\n NO_AGENT = 'DX_NO_AGENT',\n PROFILE = 'DX_PROFILE',\n}\n\nexport namespace DXEnv {\n /**\n * Helper to get the value from process.env\n */\n export function get(variable: DXEnv): string | undefined;\n export function get(variable: DXEnv, defaultValue: string): string;\n export function get(variable: DXEnv, defaultValue?: string): string | undefined {\n return process.env[variable] ?? defaultValue;\n }\n}\n\n// Profile layout: profile/<name> is the profile dir; profile/<name>.yml is the config file.\nexport const getProfilePath = (root: string, profile: string, file?: string) =>\n `${root}/profile/${profile}` + (file ? `/${file}` : '');\n\n/** Path to the profile config file (profile/<name>.yml). */\nexport const getProfileConfigPath = (root: string, profile: string) => `${getProfilePath(root, profile)}.yml`;\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport base from 'base-x';\n\nimport { schema } from '@dxos/protocols/proto';\nimport { 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 const decodedInvitation = codec.decode(base62.decode(text));\n if (decodedInvitation.type === Invitation.Type.MULTIUSE) {\n decodedInvitation.type = Invitation.Type.INTERACTIVE;\n decodedInvitation.multiUse = true;\n }\n return decodedInvitation;\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 guestKeypair: invitation.guestKeypair,\n spaceId: invitation.spaceId,\n lifetime: invitation.lifetime,\n created: invitation.created,\n // TODO(wittjosiah): Make these optional to encode for greater privacy.\n ...(invitation.spaceKey ? { spaceKey: invitation.spaceKey } : {}),\n ...(invitation.target ? { target: invitation.target } : {}),\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 get expired() {\n const expiration = getExpirationTime(this.get());\n return expiration && expiration.getTime() < Date.now();\n }\n\n get expiry() {\n return getExpirationTime(this.get());\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\nexport const getExpirationTime = (invitation: Partial<Invitation>): Date | undefined => {\n if (!(invitation.created && invitation.lifetime)) {\n return;\n }\n return new Date(invitation.created.getTime() + invitation.lifetime * 1000);\n};\n", "//\n// Copyright 2020 DXOS.org\n//\n\nimport { type Event } from '@dxos/async';\nimport { schema } from '@dxos/protocols/proto';\nimport type {\n ContactsService,\n DevicesService,\n EdgeAgentService,\n IdentityService,\n InvitationsService,\n LoggingService,\n NetworkService,\n QueueService,\n SpacesService,\n SystemService,\n} from '@dxos/protocols/proto/dxos/client/services';\nimport type { DevtoolsHost } from '@dxos/protocols/proto/dxos/devtools/host';\nimport type { QueryService } from '@dxos/protocols/proto/dxos/echo/query';\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 { type ServiceBundle, createServiceBundle } from '@dxos/rpc';\n\nexport type { QueueService } from '@dxos/protocols/proto/dxos/client/services';\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\n DataService: DataService;\n QueryService: QueryService;\n QueueService: QueueService;\n\n ContactsService: ContactsService;\n EdgeAgentService: EdgeAgentService;\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 /**\n * The connection to the services provider was terminated.\n * This should fire if the services disconnect unexpectedly or during a client reset.\n */\n closed: Event<Error | undefined>;\n\n /**\n * The underlying service connection was re-established.\n * Fires after all reconnection callbacks have completed.\n */\n reconnected?: Event<void>;\n\n /**\n * Register a callback to be invoked when services reconnect.\n * The callback should re-establish any RPC streams.\n * Reconnection waits for all callbacks to complete before emitting `reconnected`.\n */\n onReconnect?: (callback: () => Promise<void>) => void;\n\n descriptors: ServiceBundle<ClientServices>;\n services: Partial<ClientServices>;\n\n // TODO(burdon): Should take context from parent?\n open(): Promise<unknown>;\n close(): Promise<unknown>;\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 QueryService: schema.getService('dxos.echo.query.QueryService'),\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 ContactsService: schema.getService('dxos.client.services.ContactsService'),\n EdgeAgentService: schema.getService('dxos.client.services.EdgeAgentService'),\n QueueService: schema.getService('dxos.client.services.QueueService'),\n\n // TODO(burdon): Deprecated.\n DevtoolsHost: schema.getService('dxos.devtools.host.DevtoolsHost'),\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 2021 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { type MulticastObservable } from '@dxos/async';\nimport { type SpecificCredential } from '@dxos/credentials';\nimport { type Database, type Obj } from '@dxos/echo';\nimport { type EchoDatabase, type QueueFactory, type SpaceSyncState } from '@dxos/echo-db';\nimport { type PublicKey, type SpaceId } from '@dxos/keys';\nimport { type Messenger } from '@dxos/protocols';\nimport {\n type Contact,\n type CreateEpochRequest,\n type Invitation,\n type SpaceArchive,\n type Space as SpaceData,\n type SpaceMember,\n type SpaceState,\n type UpdateMemberRoleRequest,\n} from '@dxos/protocols/proto/dxos/client/services';\nimport { type EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';\nimport { type SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';\nimport { type Credential, type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nimport { type CancellableInvitation } from './invitations';\nimport { type SpaceProperties } from './types';\n\nexport type CreateEpochOptions = {\n migration?: CreateEpochRequest.Migration;\n automergeRootUrl?: string;\n};\n\nexport interface SpaceInternal {\n get db(): EchoDatabase;\n get data(): SpaceData;\n\n getCredentials(): Promise<Credential[]>;\n\n getEpochs(): Promise<SpecificCredential<Epoch>[]>;\n\n // TODO(dmaretskyi): Return epoch info.\n createEpoch(options?: CreateEpochOptions): Promise<void>;\n\n // TOOD(burdon): Start to factor out credentials.\n removeMember(memberKey: PublicKey): Promise<void>;\n\n export(): Promise<SpaceArchive>;\n\n /**\n * Migrate space data to the latest version.\n */\n migrate(): Promise<void>;\n\n setEdgeReplicationPreference(setting: EdgeReplicationSetting): Promise<void>;\n\n /**\n * Waits until the space is fully synced with EDGE.\n * @throws If the EDGE sync is disabled.\n */\n syncToEdge(opts?: {\n onProgress: (state: SpaceSyncState.PeerState | undefined) => void;\n timeout?: number;\n }): Promise<void>;\n}\n\nexport const SPACE_TAG = Symbol('dxos.client.protocol.Space');\n\nexport interface Space extends Messenger {\n readonly [SPACE_TAG]: true;\n\n /**\n * @deprecated Use `id`.\n */\n get key(): PublicKey;\n\n /**\n * Unique space identifier.\n */\n get id(): SpaceId;\n\n /**\n * Echo database.\n */\n get db(): Database.Database;\n\n /**\n * Access to queues.\n */\n get queues(): QueueFactory;\n\n // TODO(burdon): Replace with state?\n get isOpen(): boolean;\n\n /**\n * Current state of the space.\n * The database is ready to be used in `SpaceState.SPACE_READY` state.\n * Presence is available in `SpaceState.SPACE_CONTROL_ONLY` state.\n */\n get state(): MulticastObservable<SpaceState>;\n\n /**\n * Properties object.\n */\n get properties(): Obj.OfShape<SpaceProperties>;\n\n /**\n * Current state of space pipeline.\n */\n get pipeline(): MulticastObservable<SpaceData.PipelineState>;\n\n get invitations(): MulticastObservable<CancellableInvitation[]>;\n\n get members(): MulticastObservable<SpaceMember[]>;\n\n /**\n * @deprecated\n */\n // TODO(wittjosiah): Audit and remove. This should not be exposed (or marked as internal).\n get internal(): SpaceInternal;\n\n /**\n * Activates the space enabling the use of the database and starts replication with peers.\n * The setting is persisted on the local device.\n */\n // TODO(wittjosiah): Rename activate/deactivate?\n open(): Promise<void>;\n\n /**\n * Deactivates the space stopping replication with other peers.\n * The space will not auto-open on the next app launch.\n * The setting is persisted on the local device.\n */\n close(): Promise<void>;\n\n /**\n * Waits until the space is in the ready state, with database initialized.\n */\n waitUntilReady(): Promise<this>;\n\n createSnapshot(): Promise<SpaceSnapshot>;\n\n // TODO(burdon): Create invitation?\n // TODO(burdon): Factor out membership, etc.\n share(options?: Partial<Invitation>): CancellableInvitation;\n admitContact(contact: Contact): Promise<void>;\n updateMemberRole(request: Omit<UpdateMemberRoleRequest, 'spaceKey'>): Promise<void>;\n}\n\nexport const isSpace = (object: unknown): object is Space =>\n typeof object === 'object' && object != null && (object as Space)[SPACE_TAG] === true;\n\n// TODO(burdon): Create lower-level definition (HasId, db, etc.) and move to @dxos/echo.\nexport const SpaceSchema: Schema.Schema<Space> = Schema.Any.pipe(\n Schema.filter((space) => isSpace(space)),\n Schema.annotations({ title: 'Space' }),\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 = 5_000;\n\n/**\n * Timeout for creating new spaces.\n */\nexport const IMPORT_SPACE_TIMEOUT = 30_000;\n\n/**\n * Timeout for loading of control feeds.\n */\nexport const LOAD_CONTROL_FEEDS_TIMEOUT = 3_000;\n"],
5
+ "mappings": ";;;;;;;AAIO,IAAMA,iCAAiCC,uBAAOC,IAAI,8BAAA;;;ACElD,IAAMC,yBAAyB;AAC/B,IAAMC,2BAA2B;AACjC,IAAMC,wBAAwB;AAC9B,IAAMC,mCAAmC;AAKzC,IAAMC,oBAAoB;AAM1B,IAAMC,kBAAkB;AAExB,IAAMC,0BAA0B;AAChC,IAAMC,gBAAgB;EAAEC,SAAS;AAAE;AAG1C,IAAMC,OAAO,OAAOC,YAAY,cAAeA,SAASC,KAAKF,QAAQ,KAAM;AAGpE,IAAMG,YAAY,GAAGH,IAAAA;AAGrB,IAAMI,WAAW,GAAGJ,IAAAA;AAIpB,IAAMK,UAAU,GAAGL,IAAAA;AAGnB,IAAMM,WAAW,GAAGN,IAAAA;AAGpB,IAAMO,aAAa;AAEnB,IAAKC,QAAAA,0BAAAA,QAAAA;;;;;SAAAA;;UAOKA,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,IAAMC,iBAAiB;AAKvB,IAAMC,wBAAwB;AAM9B,IAAMC,0BAA0B;AAKhC,IAAMC,uBAAuB;AAK7B,IAAMC,uBAAuB;AAK7B,IAAMC,6BAA6B;",
6
+ "names": ["ClientServicesProviderResource", "Symbol", "for", "DEFAULT_CLIENT_CHANNEL", "DEFAULT_INTERNAL_CHANNEL", "DEFAULT_SHELL_CHANNEL", "DEFAULT_WORKER_BROADCAST_CHANNEL", "DEFAULT_VAULT_URL", "DEFAULT_PROFILE", "EXPECTED_CONFIG_VERSION", "defaultConfig", "version", "HOME", "process", "env", "DX_CONFIG", "DX_CACHE", "DX_DATA", "DX_STATE", "DX_RUNTIME", "DXEnv", "get", "variable", "defaultValue", "getProfilePath", "root", "profile", "file", "getProfileConfigPath", "base", "schema", "Invitation", "base62", "base", "codec", "schema", "getCodecForType", "InvitationEncoder", "decode", "text", "decodedInvitation", "type", "Invitation", "Type", "MULTIUSE", "INTERACTIVE", "multiUse", "encode", "invitation", "invitationId", "kind", "authMethod", "swarmKey", "state", "timeout", "guestKeypair", "spaceId", "lifetime", "created", "spaceKey", "target", "MulticastObservable", "invariant", "Invitation", "AUTHENTICATION_CODE_LENGTH", "INVITATION_TIMEOUT", "CancellableInvitation", "_onCancel", "subscriber", "initialInvitation", "onCancel", "cancel", "expired", "expiration", "getExpirationTime", "get", "getTime", "Date", "now", "expiry", "AuthenticatingInvitation", "_onAuthenticate", "onAuthenticate", "authenticate", "authCode", "wrapObservable", "observable", "Promise", "resolve", "reject", "subscription", "subscribe", "invitation", "state", "State", "SUCCESS", "unsubscribe", "err", "created", "lifetime", "schema", "createServiceBundle", "clientServiceBundle", "createServiceBundle", "SystemService", "schema", "getService", "NetworkService", "LoggingService", "IdentityService", "QueryService", "InvitationsService", "DevicesService", "SpacesService", "DataService", "ContactsService", "EdgeAgentService", "QueueService", "DevtoolsHost", "TracingService", "iframeServiceBundle", "BridgeService", "workerServiceBundle", "WorkerService", "appServiceBundle", "AppService", "shellServiceBundle", "ShellService", "Schema", "SPACE_TAG", "Symbol", "isSpace", "object", "SpaceSchema", "Any", "pipe", "filter", "space", "annotations", "title", "PROXY_CONNECTION_TIMEOUT", "AUTH_TIMEOUT", "STATUS_TIMEOUT", "RESOURCE_LOCK_TIMEOUT", "LOAD_PROPERTIES_TIMEOUT", "CREATE_SPACE_TIMEOUT", "IMPORT_SPACE_TIMEOUT", "LOAD_CONTROL_FEEDS_TIMEOUT"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/client.ts":{"bytes":710,"imports":[],"format":"esm"},"src/config.ts":{"bytes":6067,"imports":[],"format":"esm"},"src/invitations/encoder.ts":{"bytes":5819,"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"src/invitations/invitations.ts":{"bytes":9357,"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"},"src/invitations/index.ts":{"bytes":565,"imports":[{"path":"src/invitations/encoder.ts","kind":"import-statement","original":"./encoder"},{"path":"src/invitations/invitations.ts","kind":"import-statement","original":"./invitations"}],"format":"esm"},"src/service-definitions.ts":{"bytes":9568,"imports":[{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"format":"esm"},"src/timeouts.ts":{"bytes":3121,"imports":[],"format":"esm"},"src/schema.ts":{"bytes":2820,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1083,"imports":[{"path":"src/client.ts","kind":"import-statement","original":"./client"},{"path":"src/config.ts","kind":"import-statement","original":"./config"},{"path":"src/invitations/index.ts","kind":"import-statement","original":"./invitations"},{"path":"src/service-definitions.ts","kind":"import-statement","original":"./service-definitions"},{"path":"src/timeouts.ts","kind":"import-statement","original":"./timeouts"},{"path":"src/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19134},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","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/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["AUTHENTICATION_CODE_LENGTH","AUTH_TIMEOUT","AuthenticatingInvitation","CREATE_SPACE_TIMEOUT","CancellableInvitation","ClientServicesProviderResource","DEFAULT_CLIENT_CHANNEL","DEFAULT_INTERNAL_CHANNEL","DEFAULT_SHELL_CHANNEL","DEFAULT_VAULT_URL","DEFAULT_WORKER_BROADCAST_CHANNEL","DX_CACHE","DX_CONFIG","DX_DATA","DX_RUNTIME","DX_STATE","ENV_DX_CONFIG","ENV_DX_NO_AGENT","ENV_DX_PROFILE","ENV_DX_PROFILE_DEFAULT","EXPECTED_CONFIG_VERSION","INVITATION_TIMEOUT","InvitationEncoder","LOAD_CONTROL_FEEDS_TIMEOUT","LOAD_PROPERTIES_TIMEOUT","PROXY_CONNECTION_TIMEOUT","PropertiesType","RESOURCE_LOCK_TIMEOUT","STATUS_TIMEOUT","TYPE_PROPERTIES","appServiceBundle","clientServiceBundle","defaultConfig","getExpirationTime","getProfilePath","iframeServiceBundle","shellServiceBundle","workerServiceBundle","wrapObservable"],"entryPoint":"src/index.ts","inputs":{"src/client.ts":{"bytesInOutput":81},"src/index.ts":{"bytesInOutput":0},"src/config.ts":{"bytesInOutput":841},"src/invitations/encoder.ts":{"bytesInOutput":1355},"src/invitations/index.ts":{"bytesInOutput":0},"src/invitations/invitations.ts":{"bytesInOutput":1889},"src/service-definitions.ts":{"bytesInOutput":1660},"src/timeouts.ts":{"bytesInOutput":224},"src/schema.ts":{"bytesInOutput":517}},"bytes":7731}}}
1
+ {"inputs":{"src/client.ts":{"bytes":710,"imports":[],"format":"esm"},"src/config.ts":{"bytes":7331,"imports":[],"format":"esm"},"src/invitations/encoder.ts":{"bytes":5819,"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"src/invitations/invitations.ts":{"bytes":9357,"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"},"src/invitations/index.ts":{"bytes":565,"imports":[{"path":"src/invitations/encoder.ts","kind":"import-statement","original":"./encoder"},{"path":"src/invitations/invitations.ts","kind":"import-statement","original":"./invitations"}],"format":"esm"},"src/service.ts":{"bytes":10003,"imports":[{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"format":"esm"},"src/space.ts":{"bytes":7497,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true}],"format":"esm"},"src/timeouts.ts":{"bytes":3417,"imports":[],"format":"esm"},"src/types/SpaceProperties.ts":{"bytes":4809,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":480,"imports":[{"path":"src/types/SpaceProperties.ts","kind":"import-statement","original":"./SpaceProperties"}],"format":"esm"},"src/index.ts":{"bytes":1091,"imports":[{"path":"src/client.ts","kind":"import-statement","original":"./client"},{"path":"src/config.ts","kind":"import-statement","original":"./config"},{"path":"src/invitations/index.ts","kind":"import-statement","original":"./invitations"},{"path":"src/service.ts","kind":"import-statement","original":"./service"},{"path":"src/space.ts","kind":"import-statement","original":"./space"},{"path":"src/timeouts.ts","kind":"import-statement","original":"./timeouts"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":23921},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-URWCZ2QB.mjs","kind":"import-statement"},{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","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/protocols/proto","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true}],"exports":["AUTHENTICATION_CODE_LENGTH","AUTH_TIMEOUT","AuthenticatingInvitation","CREATE_SPACE_TIMEOUT","CancellableInvitation","ClientServicesProviderResource","DEFAULT_CLIENT_CHANNEL","DEFAULT_INTERNAL_CHANNEL","DEFAULT_PROFILE","DEFAULT_SHELL_CHANNEL","DEFAULT_VAULT_URL","DEFAULT_WORKER_BROADCAST_CHANNEL","DXEnv","DX_CACHE","DX_CONFIG","DX_DATA","DX_RUNTIME","DX_STATE","EXPECTED_CONFIG_VERSION","IMPORT_SPACE_TIMEOUT","INVITATION_TIMEOUT","InvitationEncoder","LOAD_CONTROL_FEEDS_TIMEOUT","LOAD_PROPERTIES_TIMEOUT","PROXY_CONNECTION_TIMEOUT","RESOURCE_LOCK_TIMEOUT","SPACE_TAG","STATUS_TIMEOUT","SpaceProperties","SpacePropertiesSchema","SpaceSchema","appServiceBundle","clientServiceBundle","defaultConfig","getExpirationTime","getProfileConfigPath","getProfilePath","iframeServiceBundle","isSpace","shellServiceBundle","workerServiceBundle","wrapObservable"],"entryPoint":"src/index.ts","inputs":{"src/client.ts":{"bytesInOutput":97},"src/index.ts":{"bytesInOutput":0},"src/config.ts":{"bytesInOutput":1181},"src/invitations/encoder.ts":{"bytesInOutput":1355},"src/invitations/invitations.ts":{"bytesInOutput":1921},"src/service.ts":{"bytesInOutput":1621},"src/space.ts":{"bytesInOutput":332},"src/timeouts.ts":{"bytesInOutput":256}},"bytes":8039},"dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-URWCZ2QB.mjs","kind":"import-statement"}],"exports":["SpaceProperties","SpacePropertiesSchema"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":266},"dist/lib/node-esm/chunk-URWCZ2QB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2395},"dist/lib/node-esm/chunk-URWCZ2QB.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true}],"exports":["SpaceProperties","SpacePropertiesSchema"],"inputs":{"src/types/SpaceProperties.ts":{"bytesInOutput":893},"src/types/index.ts":{"bytesInOutput":0}},"bytes":1118}}}
@@ -0,0 +1,10 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ SpaceProperties,
4
+ SpacePropertiesSchema
5
+ } from "../chunk-URWCZ2QB.mjs";
6
+ export {
7
+ SpaceProperties,
8
+ SpacePropertiesSchema
9
+ };
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,22 +1,38 @@
1
- import { type ConfigProto } from '@dxos/config';
2
- export declare const DEFAULT_INTERNAL_CHANNEL = "dxos:vault";
3
1
  export declare const DEFAULT_CLIENT_CHANNEL = "dxos:app";
2
+ export declare const DEFAULT_INTERNAL_CHANNEL = "dxos:vault";
4
3
  export declare const DEFAULT_SHELL_CHANNEL = "dxos:shell";
5
4
  export declare const DEFAULT_WORKER_BROADCAST_CHANNEL = "dxos:shared-worker";
6
5
  /**
7
6
  * @deprecated
8
7
  */
9
8
  export declare const DEFAULT_VAULT_URL = "https://halo.dxos.org/vault.html";
9
+ /**
10
+ * @deprecated
11
+ */
12
+ export declare const DEFAULT_PROFILE = "default";
10
13
  export declare const EXPECTED_CONFIG_VERSION = 1;
11
- export declare const defaultConfig: ConfigProto;
12
- export declare const getProfilePath: (root: string, profile: string, file?: string | undefined) => string;
14
+ export declare const defaultConfig: {
15
+ version: number;
16
+ };
13
17
  export declare const DX_CONFIG: string;
14
18
  export declare const DX_CACHE: string;
15
19
  export declare const DX_DATA: string;
16
20
  export declare const DX_STATE: string;
17
21
  export declare const DX_RUNTIME = "/tmp/dx/run";
18
- export declare const ENV_DX_CONFIG = "DX_CONFIG";
19
- export declare const ENV_DX_NO_AGENT = "DX_NO_AGENT";
20
- export declare const ENV_DX_PROFILE = "DX_PROFILE";
21
- export declare const ENV_DX_PROFILE_DEFAULT = "default";
22
+ export declare enum DXEnv {
23
+ CONFIG = "DX_CONFIG",
24
+ DEBUG = "DX_DEBUG",
25
+ NO_AGENT = "DX_NO_AGENT",
26
+ PROFILE = "DX_PROFILE"
27
+ }
28
+ export declare namespace DXEnv {
29
+ /**
30
+ * Helper to get the value from process.env
31
+ */
32
+ function get(variable: DXEnv): string | undefined;
33
+ function get(variable: DXEnv, defaultValue: string): string;
34
+ }
35
+ export declare const getProfilePath: (root: string, profile: string, file?: string) => string;
36
+ /** Path to the profile config file (profile/<name>.yml). */
37
+ export declare const getProfileConfigPath: (root: string, profile: string) => string;
22
38
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,eAAO,MAAM,wBAAwB,eAAe,CAAC;AACrD,eAAO,MAAM,sBAAsB,aAAa,CAAC;AACjD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,gCAAgC,uBAAuB,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AAEpE,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,aAAa,EAAE,WAA4B,CAAC;AASzD,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,SAAS,MAAM,EAAE,OAAM,MAAM,GAAG,SAAqB,WACzC,CAAC;AAG1D,eAAO,MAAM,SAAS,QAAuB,CAAC;AAG9C,eAAO,MAAM,QAAQ,QAAsB,CAAC;AAI5C,eAAO,MAAM,OAAO,QAA4B,CAAC;AAGjD,eAAO,MAAM,QAAQ,QAA4B,CAAC;AAGlD,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAExC,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAC7C,eAAO,MAAM,cAAc,eAAe,CAAC;AAC3C,eAAO,MAAM,sBAAsB,YAAY,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,sBAAsB,aAAa,CAAC;AACjD,eAAO,MAAM,wBAAwB,eAAe,CAAC;AACrD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,gCAAgC,uBAAuB,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AAEpE;;GAEG;AAEH,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,aAAa;;CAAiB,CAAC;AAM5C,eAAO,MAAM,SAAS,QAAuB,CAAC;AAG9C,eAAO,MAAM,QAAQ,QAAsB,CAAC;AAI5C,eAAO,MAAM,OAAO,QAA4B,CAAC;AAGjD,eAAO,MAAM,QAAQ,QAA4B,CAAC;AAGlD,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAExC,oBAAY,KAAK;IACf,MAAM,cAAc;IACpB,KAAK,aAAa;IAClB,QAAQ,gBAAgB;IACxB,OAAO,eAAe;CACvB;AAED,yBAAiB,KAAK,CAAC;IACrB;;OAEG;IACH,SAAgB,GAAG,CAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IACzD,SAAgB,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CAIpE;AAGD,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,SAAS,MAAM,EAAE,OAAO,MAAM,WAClB,CAAC;AAE1D,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,EAAE,SAAS,MAAM,WAA2C,CAAC"}
@@ -1,18 +1,14 @@
1
1
  import type { MulticastObservable } from '@dxos/async';
2
- import type { QueryFn } from '@dxos/echo-db';
2
+ import type { Database } from '@dxos/echo';
3
3
  import type { PublicKey, SpaceId } from '@dxos/keys';
4
4
  import type { Invitation, SpaceArchive } from '@dxos/protocols/proto/dxos/client/services';
5
5
  import type { AuthenticatingInvitation } from './invitations';
6
- import type { PropertiesTypeProps } from './schema';
7
6
  import type { Space } from './space';
7
+ import type { SpaceProperties } from './types';
8
8
  /**
9
- * TODO(burdon): Public API (move comments here).
9
+ * Public database API.
10
10
  */
11
- export interface Echo extends MulticastObservable<Space[]> {
12
- /**
13
- * Resolves when the default space is available.
14
- */
15
- waitUntilReady(): Promise<void>;
11
+ export interface Echo extends MulticastObservable<Space[]>, Database.Queryable {
16
12
  /**
17
13
  * Observable which indicates when the default space is available.
18
14
  */
@@ -34,10 +30,14 @@ export interface Echo extends MulticastObservable<Space[]> {
34
30
  * Returns the default space.
35
31
  */
36
32
  get default(): Space;
33
+ /**
34
+ * Resolves when the default space is available.
35
+ */
36
+ waitUntilReady(): Promise<void>;
37
37
  /**
38
38
  * Creates a new space.
39
39
  */
40
- create(meta?: PropertiesTypeProps): Promise<Space>;
40
+ create(props?: Pick<SpaceProperties, 'name' | 'hue' | 'icon' | 'invocationTraceQueue'>): Promise<Space>;
41
41
  /**
42
42
  * Creates a space from the given archive.
43
43
  */
@@ -47,11 +47,5 @@ export interface Echo extends MulticastObservable<Space[]> {
47
47
  */
48
48
  join(invitation: Invitation | string): AuthenticatingInvitation;
49
49
  joinBySpaceKey(spaceKey: PublicKey): Promise<Space>;
50
- /**
51
- * Query all spaces.
52
- * @param filter
53
- * @param options
54
- */
55
- query: QueryFn;
56
50
  }
57
51
  //# sourceMappingURL=echo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"echo.d.ts","sourceRoot":"","sources":["../../../src/echo.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAE3F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AAIH,MAAM,WAAW,IAAK,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AAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;GAEG;AAEH,MAAM,WAAW,IAAK,SAAQ,mBAAmB,CAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,CAAC,SAAS;IAC5E;;OAEG;IAEH,IAAI,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAE5C;;OAEG;IACH,GAAG,IAAI,KAAK,EAAE,CAAC;IAEf;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;IAEpC;;;OAGG;IACH,GAAG,CAAC,QAAQ,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;IAE5C;;OAEG;IACH,IAAI,OAAO,IAAI,KAAK,CAAC;IAErB;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,sBAAsB,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAExG;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAE9C;;OAEG;IACH,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,wBAAwB,CAAC;IAEhE,cAAc,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CACrD"}
@@ -1,7 +1,7 @@
1
1
  import { type MulticastObservable } from '@dxos/async';
2
2
  import { type PublicKey } from '@dxos/keys';
3
3
  import { type Contact, type Device, type Identity, type Invitation } from '@dxos/protocols/proto/dxos/client/services';
4
- import { type DeviceProfileDocument, type Credential, type Presentation, type ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
4
+ import { type Credential, type DeviceProfileDocument, type Presentation, type ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
5
5
  import { type AuthenticatingInvitation, type CancellableInvitation } from './invitations';
6
6
  /**
7
7
  * TODO(burdon): Public API (move comments here).
@@ -1 +1 @@
1
- {"version":3,"file":"halo.d.ts","sourceRoot":"","sources":["../../../src/halo.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACvH,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE1F;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,IAAI,QAAQ,IAAI,mBAAmB,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACrD,IAAI,OAAO,IAAI,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC;IACjC,IAAI,QAAQ,IAAI,mBAAmB,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/C,IAAI,WAAW,IAAI,mBAAmB,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAChE,IAAI,WAAW,IAAI,mBAAmB,CAAC,UAAU,EAAE,CAAC,CAAC;IAErD,cAAc,CAAC,OAAO,CAAC,EAAE,eAAe,EAAE,aAAa,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpG,eAAe,CAAC,IAAI,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,CA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6
- export * from './service-definitions';
6
+ export * from './service';
7
7
  export type * from './shell';
8
- export type * from './space';
8
+ export * from './space';
9
9
  export * from './timeouts';
10
- export * from './schema';
10
+ export * from './types';
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,mBAAmB,QAAQ,CAAC;AAC5B,mBAAmB,QAAQ,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,SAAS,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,mBAAmB,QAAQ,CAAC;AAC5B,mBAAmB,QAAQ,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,mBAAmB,SAAS,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { type Event } from '@dxos/async';
2
- import type { FunctionRegistryService } from '@dxos/protocols/proto/dxos/agent/functions';
3
- import type { DevicesService, IdentityService, InvitationsService, LoggingService, NetworkService, SpacesService, SystemService, ContactsService, EdgeAgentService } from '@dxos/protocols/proto/dxos/client/services';
2
+ import type { ContactsService, DevicesService, EdgeAgentService, IdentityService, InvitationsService, LoggingService, NetworkService, QueueService, SpacesService, SystemService } from '@dxos/protocols/proto/dxos/client/services';
4
3
  import type { DevtoolsHost } from '@dxos/protocols/proto/dxos/devtools/host';
5
4
  import type { QueryService } from '@dxos/protocols/proto/dxos/echo/query';
6
5
  import type { DataService } from '@dxos/protocols/proto/dxos/echo/service';
@@ -8,19 +7,20 @@ import type { AppService, ShellService, WorkerService } from '@dxos/protocols/pr
8
7
  import type { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';
9
8
  import type { TracingService } from '@dxos/protocols/proto/dxos/tracing';
10
9
  import { type ServiceBundle } from '@dxos/rpc';
10
+ export type { QueueService } from '@dxos/protocols/proto/dxos/client/services';
11
11
  export type ClientServices = {
12
12
  SystemService: SystemService;
13
13
  NetworkService: NetworkService;
14
14
  LoggingService: LoggingService;
15
15
  IdentityService: IdentityService;
16
16
  InvitationsService: InvitationsService;
17
- QueryService: QueryService;
18
17
  DevicesService: DevicesService;
19
18
  SpacesService: SpacesService;
20
19
  DataService: DataService;
20
+ QueryService: QueryService;
21
+ QueueService: QueueService;
21
22
  ContactsService: ContactsService;
22
23
  EdgeAgentService: EdgeAgentService;
23
- FunctionRegistryService: FunctionRegistryService;
24
24
  DevtoolsHost: DevtoolsHost;
25
25
  TracingService: TracingService;
26
26
  };
@@ -33,10 +33,21 @@ export interface ClientServicesProvider {
33
33
  * This should fire if the services disconnect unexpectedly or during a client reset.
34
34
  */
35
35
  closed: Event<Error | undefined>;
36
+ /**
37
+ * The underlying service connection was re-established.
38
+ * Fires after all reconnection callbacks have completed.
39
+ */
40
+ reconnected?: Event<void>;
41
+ /**
42
+ * Register a callback to be invoked when services reconnect.
43
+ * The callback should re-establish any RPC streams.
44
+ * Reconnection waits for all callbacks to complete before emitting `reconnected`.
45
+ */
46
+ onReconnect?: (callback: () => Promise<void>) => void;
36
47
  descriptors: ServiceBundle<ClientServices>;
37
48
  services: Partial<ClientServices>;
38
- open(): Promise<void>;
39
- close(): Promise<void>;
49
+ open(): Promise<unknown>;
50
+ close(): Promise<unknown>;
40
51
  }
41
52
  /**
42
53
  * Services supported by host.
@@ -58,4 +69,4 @@ export type ShellServiceBundle = {
58
69
  ShellService: ShellService;
59
70
  };
60
71
  export declare const shellServiceBundle: ServiceBundle<ShellServiceBundle>;
61
- //# sourceMappingURL=service-definitions.d.ts.map
72
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACjG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,WAAW,CAAC;AAEpE,YAAY,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAM/E,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAE/B,eAAe,EAAE,eAAe,CAAC;IACjC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,cAAc,EAAE,cAAc,CAAC;IAC/B,aAAa,EAAE,aAAa,CAAC;IAE7B,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;IAE3B,eAAe,EAAE,eAAe,CAAC;IACjC,gB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@
1
1
  import { type Event } from '@dxos/async';
2
2
  import { type PublicKey } from '@dxos/keys';
3
- import { type InvitationUrlRequest, type AppContextRequest, type LayoutRequest, type ShellLayout } from '@dxos/protocols/proto/dxos/iframe';
3
+ import { type AppContextRequest, type InvitationUrlRequest, type LayoutRequest, type ShellLayout } from '@dxos/protocols/proto/dxos/iframe';
4
4
  export interface ShellRuntime {
5
5
  layoutUpdate: Event<LayoutRequest>;
6
6
  invitationUrlUpdate: Event<InvitationUrlRequest>;
@@ -1 +1 @@
1
- {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../src/shell.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,mCAAmC,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACnC,mBAAmB,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACjD,MAAM,EAAE,WAAW,CAAC;IACpB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,gBAAgB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC1D,aAAa,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D"}
1
+ {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../src/shell.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,mCAAmC,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACnC,mBAAmB,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACjD,MAAM,EAAE,WAAW,CAAC;IACpB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,gBAAgB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC1D,aAAa,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D"}
@@ -1,58 +1,72 @@
1
- import { type MulticastObservable, type CleanupFn } from '@dxos/async';
1
+ import * as Schema from 'effect/Schema';
2
+ import { type MulticastObservable } from '@dxos/async';
2
3
  import { type SpecificCredential } from '@dxos/credentials';
3
- import { type QueueFactory, type EchoDatabase, type AnyLiveObject } from '@dxos/echo-db';
4
+ import { type Database, type Obj } from '@dxos/echo';
5
+ import { type EchoDatabase, type QueueFactory, type SpaceSyncState } from '@dxos/echo-db';
4
6
  import { type PublicKey, type SpaceId } from '@dxos/keys';
5
- import { type Contact, type CreateEpochRequest, type Invitation, type Space as SpaceData, type SpaceArchive, type SpaceMember, type SpaceState, type UpdateMemberRoleRequest } from '@dxos/protocols/proto/dxos/client/services';
7
+ import { type Messenger } from '@dxos/protocols';
8
+ import { type Contact, type CreateEpochRequest, type Invitation, type SpaceArchive, type Space as SpaceData, type SpaceMember, type SpaceState, type UpdateMemberRoleRequest } from '@dxos/protocols/proto/dxos/client/services';
6
9
  import { type EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
7
10
  import { type SpaceSnapshot } from '@dxos/protocols/proto/dxos/echo/snapshot';
8
11
  import { type Credential, type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
9
- import { type GossipMessage } from '@dxos/protocols/proto/dxos/mesh/teleport/gossip';
10
12
  import { type CancellableInvitation } from './invitations';
13
+ import { type SpaceProperties } from './types';
11
14
  export type CreateEpochOptions = {
12
15
  migration?: CreateEpochRequest.Migration;
13
16
  automergeRootUrl?: string;
14
17
  };
15
18
  export interface SpaceInternal {
19
+ get db(): EchoDatabase;
16
20
  get data(): SpaceData;
17
- createEpoch(options?: CreateEpochOptions): Promise<void>;
18
21
  getCredentials(): Promise<Credential[]>;
19
22
  getEpochs(): Promise<SpecificCredential<Epoch>[]>;
23
+ createEpoch(options?: CreateEpochOptions): Promise<void>;
20
24
  removeMember(memberKey: PublicKey): Promise<void>;
25
+ export(): Promise<SpaceArchive>;
21
26
  /**
22
27
  * Migrate space data to the latest version.
23
28
  */
24
29
  migrate(): Promise<void>;
25
30
  setEdgeReplicationPreference(setting: EdgeReplicationSetting): Promise<void>;
26
- export(): Promise<SpaceArchive>;
27
- }
28
- export interface Space {
29
31
  /**
30
- * Unique space identifier.
32
+ * Waits until the space is fully synced with EDGE.
33
+ * @throws If the EDGE sync is disabled.
31
34
  */
32
- get id(): SpaceId;
35
+ syncToEdge(opts?: {
36
+ onProgress: (state: SpaceSyncState.PeerState | undefined) => void;
37
+ timeout?: number;
38
+ }): Promise<void>;
39
+ }
40
+ export declare const SPACE_TAG: unique symbol;
41
+ export interface Space extends Messenger {
42
+ readonly [SPACE_TAG]: true;
33
43
  /**
34
44
  * @deprecated Use `id`.
35
45
  */
36
46
  get key(): PublicKey;
47
+ /**
48
+ * Unique space identifier.
49
+ */
50
+ get id(): SpaceId;
37
51
  /**
38
52
  * Echo database.
39
53
  */
40
- get db(): EchoDatabase;
54
+ get db(): Database.Database;
41
55
  /**
42
56
  * Access to queues.
43
57
  */
44
58
  get queues(): QueueFactory;
45
59
  get isOpen(): boolean;
46
- /**
47
- * Properties object.
48
- */
49
- get properties(): AnyLiveObject<any>;
50
60
  /**
51
61
  * Current state of the space.
52
62
  * The database is ready to be used in `SpaceState.SPACE_READY` state.
53
63
  * Presence is available in `SpaceState.SPACE_CONTROL_ONLY` state.
54
64
  */
55
65
  get state(): MulticastObservable<SpaceState>;
66
+ /**
67
+ * Properties object.
68
+ */
69
+ get properties(): Obj.OfShape<SpaceProperties>;
56
70
  /**
57
71
  * Current state of space pipeline.
58
72
  */
@@ -82,7 +96,7 @@ export interface Space {
82
96
  share(options?: Partial<Invitation>): CancellableInvitation;
83
97
  admitContact(contact: Contact): Promise<void>;
84
98
  updateMemberRole(request: Omit<UpdateMemberRoleRequest, 'spaceKey'>): Promise<void>;
85
- postMessage: (channel: string, message: any) => Promise<void>;
86
- listen: (channel: string, callback: (message: GossipMessage) => void) => CleanupFn;
87
99
  }
100
+ export declare const isSpace: (object: unknown) => object is Space;
101
+ export declare const SpaceSchema: Schema.Schema<Space>;
88
102
  //# sourceMappingURL=space.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../src/space.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;A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ERTIES_TIMEOUT = 3000;
23
23
  * Timeout for creating new spaces.
24
24
  */
25
25
  export declare const CREATE_SPACE_TIMEOUT = 5000;
26
+ /**
27
+ * Timeout for creating new spaces.
28
+ */
29
+ export declare const IMPORT_SPACE_TIMEOUT = 30000;
26
30
  /**
27
31
  * Timeout for loading of control feeds.
28
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"timeouts.d.ts","sourceRoot":"","sources":["../../../src/timeouts.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,YAAY,QAAS,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,cAAc,QAAS,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,qBAAqB,OAAQ,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,uBAAuB,OAAQ,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,0BAA0B,OAAQ,CAAC"}
1
+ {"version":3,"file":"timeouts.d.ts","sourceRoot":"","sources":["../../../src/timeouts.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,YAAY,QAAS,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,cAAc,QAAS,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,qBAAqB,OAAQ,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,uBAAuB,OAAQ,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,0BAA0B,OAAQ,CAAC"}
@@ -0,0 +1,27 @@
1
+ import * as Schema from 'effect/Schema';
2
+ import { Ref, Type } from '@dxos/echo';
3
+ import { Queue } from '@dxos/echo-db';
4
+ export declare const SpacePropertiesSchema: Schema.TypeLiteral<{
5
+ archived: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
6
+ edgeReplication: Schema.optional<typeof Schema.Boolean>;
7
+ invocationTraceQueue: Schema.optional<Ref.RefSchema<Queue<import("@dxos/echo/Entity").Unknown>>>;
8
+ name: Schema.optional<typeof Schema.String>;
9
+ icon: Schema.optional<typeof Schema.String>;
10
+ hue: Schema.optional<typeof Schema.String>;
11
+ }, readonly [{
12
+ readonly key: typeof Schema.String;
13
+ readonly value: typeof Schema.Any;
14
+ }]>;
15
+ export type SpacePropertiesSchema = Schema.Schema.Type<typeof SpacePropertiesSchema>;
16
+ export declare const SpaceProperties: Type.Obj<{
17
+ readonly [x: string]: any;
18
+ readonly archived?: boolean | undefined;
19
+ readonly edgeReplication?: boolean | undefined;
20
+ readonly invocationTraceQueue?: import("@dxos/echo/internal").Ref<Queue<import("@dxos/echo/Entity").Unknown>> | undefined;
21
+ readonly name?: string | undefined;
22
+ readonly icon?: string | undefined;
23
+ readonly hue?: string | undefined;
24
+ }, Schema.Struct.Fields>;
25
+ export interface SpaceProperties extends Schema.Schema.Type<typeof SpaceProperties> {
26
+ }
27
+ //# sourceMappingURL=SpaceProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpaceProperties.d.ts","sourceRoot":"","sources":["../../../../src/types/SpaceProperties.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAc,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,eAAO,MAAM,qBAAqB;;;;;;;;;;GAwBjC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIrF,eAAO,MAAM,eAAe;;;;;;;;wBAM3B,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC;CAAG"}