@dxos/client-services 0.1.24-next.6b1f434 → 0.1.24

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 (70) hide show
  1. package/dist/lib/browser/{chunk-ZPZBLOQW.mjs → chunk-R2FEBB66.mjs} +95 -316
  2. package/dist/lib/browser/chunk-R2FEBB66.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +1 -11
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/packlets/testing/index.mjs +3 -3
  6. package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
  7. package/dist/lib/node/index.cjs +111 -341
  8. package/dist/lib/node/index.cjs.map +4 -4
  9. package/dist/lib/node/meta.json +1 -1
  10. package/dist/lib/node/packlets/testing/index.cjs +110 -228
  11. package/dist/lib/node/packlets/testing/index.cjs.map +4 -4
  12. package/dist/types/src/packlets/identity/authenticator.d.ts +1 -1
  13. package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
  14. package/dist/types/src/packlets/identity/identity-manager.d.ts +1 -1
  15. package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
  16. package/dist/types/src/packlets/identity/identity.d.ts +2 -2
  17. package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
  18. package/dist/types/src/packlets/invitations/space-invitations-handler.d.ts +1 -1
  19. package/dist/types/src/packlets/invitations/space-invitations-handler.d.ts.map +1 -1
  20. package/dist/types/src/packlets/services/service-context.d.ts +1 -1
  21. package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
  22. package/dist/types/src/packlets/spaces/data-space-manager.d.ts +1 -1
  23. package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
  24. package/dist/types/src/packlets/spaces/data-space.d.ts +1 -1
  25. package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
  26. package/dist/types/src/packlets/spaces/spaces-service.d.ts +1 -1
  27. package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
  28. package/dist/types/src/packlets/testing/test-builder.d.ts +1 -1
  29. package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
  30. package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts +4 -11
  31. package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts.map +1 -1
  32. package/dist/types/src/packlets/vault/iframe-proxy-runtime.d.ts +1 -6
  33. package/dist/types/src/packlets/vault/iframe-proxy-runtime.d.ts.map +1 -1
  34. package/dist/types/src/packlets/vault/index.d.ts +0 -2
  35. package/dist/types/src/packlets/vault/index.d.ts.map +1 -1
  36. package/dist/types/src/packlets/vault/services.d.ts +1 -9
  37. package/dist/types/src/packlets/vault/services.d.ts.map +1 -1
  38. package/dist/types/src/packlets/vault/worker-runtime.d.ts +1 -2
  39. package/dist/types/src/packlets/vault/worker-runtime.d.ts.map +1 -1
  40. package/dist/types/src/packlets/vault/worker-session.d.ts +1 -4
  41. package/dist/types/src/packlets/vault/worker-session.d.ts.map +1 -1
  42. package/package.json +28 -29
  43. package/src/packlets/devtools/spaces.ts +1 -1
  44. package/src/packlets/identity/authenticator.ts +1 -1
  45. package/src/packlets/identity/identity-manager.test.ts +1 -1
  46. package/src/packlets/identity/identity-manager.ts +1 -1
  47. package/src/packlets/identity/identity.test.ts +1 -1
  48. package/src/packlets/identity/identity.ts +1 -1
  49. package/src/packlets/invitations/space-invitations-handler.test.ts +1 -1
  50. package/src/packlets/invitations/space-invitations-handler.ts +1 -1
  51. package/src/packlets/services/service-context.ts +2 -2
  52. package/src/packlets/services/service-host.ts +1 -1
  53. package/src/packlets/spaces/data-space-manager.test.ts +1 -1
  54. package/src/packlets/spaces/data-space-manager.ts +4 -4
  55. package/src/packlets/spaces/data-space.ts +3 -3
  56. package/src/packlets/spaces/spaces-service.ts +1 -1
  57. package/src/packlets/testing/test-builder.ts +3 -3
  58. package/src/packlets/vault/iframe-host-runtime.ts +7 -26
  59. package/src/packlets/vault/iframe-proxy-runtime.ts +1 -16
  60. package/src/packlets/vault/index.ts +0 -2
  61. package/src/packlets/vault/services.ts +1 -17
  62. package/src/packlets/vault/worker-runtime.ts +1 -3
  63. package/src/packlets/vault/worker-session.ts +19 -29
  64. package/dist/lib/browser/chunk-ZPZBLOQW.mjs.map +0 -7
  65. package/dist/types/src/packlets/vault/shell-controller.d.ts +0 -24
  66. package/dist/types/src/packlets/vault/shell-controller.d.ts.map +0 -1
  67. package/dist/types/src/packlets/vault/shell-runtime.d.ts +0 -45
  68. package/dist/types/src/packlets/vault/shell-runtime.d.ts.map +0 -1
  69. package/src/packlets/vault/shell-controller.ts +0 -77
  70. package/src/packlets/vault/shell-runtime.ts +0 -133
@@ -2184,7 +2184,7 @@ var SpaceInvitationsServiceImpl = class extends AbstractInvitationsService {
2184
2184
  import { Trigger as Trigger5 } from "@dxos/async";
2185
2185
  import { getCredentialAssertion as getCredentialAssertion3 } from "@dxos/credentials";
2186
2186
  import { failUndefined as failUndefined2 } from "@dxos/debug";
2187
- import { valueEncoding, MetadataStore, SpaceManager, DataServiceSubscriptions, SnapshotStore } from "@dxos/echo-pipeline";
2187
+ import { valueEncoding, DataServiceSubscriptions, MetadataStore, SpaceManager, SnapshotStore } from "@dxos/echo-db";
2188
2188
  import { FeedFactory, FeedStore } from "@dxos/feed-store";
2189
2189
  import { Keyring } from "@dxos/keyring";
2190
2190
  import { log as log11 } from "@dxos/log";
@@ -2194,7 +2194,7 @@ import assert12 from "@dxos/node-std/assert";
2194
2194
  import { Event as Event4, synchronized, trackLeaks as trackLeaks2 } from "@dxos/async";
2195
2195
  import { Context as Context7 } from "@dxos/context";
2196
2196
  import { getCredentialAssertion as getCredentialAssertion2 } from "@dxos/credentials";
2197
- import { spaceGenesis, SnapshotManager } from "@dxos/echo-pipeline";
2197
+ import { spaceGenesis, SnapshotManager } from "@dxos/echo-db";
2198
2198
  import { PublicKey as PublicKey7 } from "@dxos/keys";
2199
2199
  import { log as log10 } from "@dxos/log";
2200
2200
  import { Presence } from "@dxos/teleport-extension-presence";
@@ -2204,7 +2204,7 @@ import { ComplexMap as ComplexMap3, deferFunction as deferFunction2 } from "@dxo
2204
2204
  import { trackLeaks } from "@dxos/async";
2205
2205
  import { Context as Context6 } from "@dxos/context";
2206
2206
  import { timed } from "@dxos/debug";
2207
- import { DataPipelineControllerImpl, createMappedFeedWriter } from "@dxos/echo-pipeline";
2207
+ import { DataPipelineControllerImpl, createMappedFeedWriter } from "@dxos/echo-db";
2208
2208
  import { PublicKey as PublicKey6 } from "@dxos/keys";
2209
2209
  import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
2210
2210
  import { ComplexSet as ComplexSet2 } from "@dxos/util";
@@ -3013,133 +3013,18 @@ var toStorageType = (type) => {
3013
3013
  }
3014
3014
  };
3015
3015
 
3016
- // packages/sdk/client-services/src/packlets/vault/services.ts
3017
- import { schema as schema7 } from "@dxos/protocols";
3018
- var iframeServiceBundle = {
3019
- IframeService: schema7.getService("dxos.iframe.IframeService"),
3020
- BridgeService: schema7.getService("dxos.mesh.bridge.BridgeService")
3021
- };
3022
- var workerServiceBundle = {
3023
- WorkerService: schema7.getService("dxos.iframe.WorkerService")
3024
- };
3025
- var appServiceBundle = {
3026
- AppService: schema7.getService("dxos.iframe.AppService")
3027
- };
3028
- var shellServiceBundle = {
3029
- ShellService: schema7.getService("dxos.iframe.ShellService")
3030
- };
3031
-
3032
- // packages/sdk/client-services/src/packlets/vault/shell-runtime.ts
3033
- import assert13 from "@dxos/node-std/assert";
3034
- import { Event as Event5 } from "@dxos/async";
3035
- import { ShellLayout } from "@dxos/protocols/proto/dxos/iframe";
3036
- import { createProtoRpcPeer } from "@dxos/rpc";
3037
- var ShellRuntimeImpl = class {
3038
- constructor(_port) {
3039
- this._port = _port;
3040
- this.layoutUpdate = new Event5();
3041
- this._layout = ShellLayout.DEFAULT;
3042
- }
3043
- get layout() {
3044
- return this._layout;
3045
- }
3046
- get invitationCode() {
3047
- return this._invitationCode;
3048
- }
3049
- get spaceKey() {
3050
- return this._spaceKey;
3051
- }
3052
- setLayout(layout, options = {}) {
3053
- this._layout = layout;
3054
- this._invitationCode = options.invitationCode;
3055
- this._spaceKey = options.spaceKey;
3056
- this.layoutUpdate.emit({
3057
- layout,
3058
- ...options
3059
- });
3060
- }
3061
- async setAppContext(context) {
3062
- assert13(this._appRpc, "runtime not open");
3063
- if (context.spaceKey) {
3064
- this._spaceKey = context.spaceKey;
3065
- }
3066
- if (context.invitationCode) {
3067
- this._invitationCode = context.invitationCode;
3068
- }
3069
- await this._appRpc.rpc.AppService.setContext({
3070
- ...context,
3071
- spaceKey: this._spaceKey,
3072
- invitationCode: this._invitationCode
3073
- });
3074
- }
3075
- async open() {
3076
- this._appRpc = createProtoRpcPeer({
3077
- requested: appServiceBundle,
3078
- exposed: shellServiceBundle,
3079
- handlers: {
3080
- ShellService: {
3081
- setLayout: async (request) => {
3082
- this._layout = request.layout;
3083
- this._invitationCode = request.invitationCode;
3084
- this._spaceKey = request.spaceKey;
3085
- this.layoutUpdate.emit(request);
3086
- }
3087
- }
3088
- },
3089
- port: this._port
3090
- });
3091
- await this._appRpc.open();
3092
- }
3093
- async close() {
3094
- var _a;
3095
- await ((_a = this._appRpc) == null ? void 0 : _a.close());
3096
- this._appRpc = void 0;
3097
- }
3098
- };
3099
- var MemoryShellRuntime = class {
3100
- constructor({ layout, invitationCode, spaceKey } = {}) {
3101
- this.layoutUpdate = new Event5();
3102
- this.contextUpdate = new Event5();
3103
- this._layout = layout != null ? layout : ShellLayout.DEFAULT;
3104
- this._invitationCode = invitationCode;
3105
- this._spaceKey = spaceKey;
3106
- }
3107
- get layout() {
3108
- return this._layout;
3109
- }
3110
- get invitationCode() {
3111
- return this._invitationCode;
3112
- }
3113
- get spaceKey() {
3114
- return this._spaceKey;
3115
- }
3116
- setLayout(layout, options = {}) {
3117
- this._layout = layout;
3118
- this._invitationCode = options.invitationCode;
3119
- this._spaceKey = options.spaceKey;
3120
- this.layoutUpdate.emit({
3121
- layout,
3122
- ...options
3123
- });
3124
- }
3125
- async setAppContext(context) {
3126
- this.contextUpdate.emit(context);
3127
- }
3128
- };
3129
-
3130
3016
  // packages/sdk/client-services/src/packlets/vault/iframe-host-runtime.ts
3131
3017
  import { Trigger as Trigger9 } from "@dxos/async";
3132
- import { log as log17, logInfo as logInfo2 } from "@dxos/log";
3018
+ import { log as log16, logInfo as logInfo2 } from "@dxos/log";
3133
3019
  import { MemorySignalManager as MemorySignalManager2, MemorySignalManagerContext as MemorySignalManagerContext2, WebsocketSignalManager as WebsocketSignalManager2 } from "@dxos/messaging";
3134
3020
  import { createWebRTCTransportFactory, NetworkManager as NetworkManager2 } from "@dxos/network-manager";
3135
- import { createProtoRpcPeer as createProtoRpcPeer6 } from "@dxos/rpc";
3136
- import { getAsyncValue } from "@dxos/util";
3021
+ import { createProtoRpcPeer as createProtoRpcPeer4 } from "@dxos/rpc";
3137
3022
 
3138
3023
  // packages/sdk/client-services/src/packlets/services/service-host.ts
3139
3024
  import { raise as raise2 } from "@dxos/debug";
3140
3025
  import { DocumentModel } from "@dxos/document-model";
3141
- import { DataServiceImpl } from "@dxos/echo-pipeline";
3142
- import { log as log16 } from "@dxos/log";
3026
+ import { DataServiceImpl } from "@dxos/echo-db";
3027
+ import { log as log15 } from "@dxos/log";
3143
3028
  import { ModelFactory } from "@dxos/model-factory";
3144
3029
  import { Status } from "@dxos/protocols/proto/dxos/client";
3145
3030
  import { TextModel } from "@dxos/text-model";
@@ -3212,7 +3097,7 @@ var NetworkServiceImpl = class {
3212
3097
  import { scheduleTask as scheduleTask4 } from "@dxos/async";
3213
3098
  import { Stream as Stream11 } from "@dxos/codec-protobuf";
3214
3099
  import { raise } from "@dxos/debug";
3215
- import { SpaceNotFoundError } from "@dxos/echo-pipeline";
3100
+ import { SpaceNotFoundError } from "@dxos/echo-db";
3216
3101
  var SpacesServiceImpl = class {
3217
3102
  constructor(_spaceManager) {
3218
3103
  this._spaceManager = _spaceManager;
@@ -3254,15 +3139,26 @@ var SpacesServiceImpl = class {
3254
3139
 
3255
3140
  // packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts
3256
3141
  import { WebRTCTransportService } from "@dxos/network-manager";
3257
- import { createProtoRpcPeer as createProtoRpcPeer2 } from "@dxos/rpc";
3142
+ import { createProtoRpcPeer } from "@dxos/rpc";
3143
+
3144
+ // packages/sdk/client-services/src/packlets/vault/services.ts
3145
+ import { schema as schema7 } from "@dxos/protocols";
3146
+ var iframeServiceBundle = {
3147
+ IframeService: schema7.getService("dxos.iframe.IframeService"),
3148
+ BridgeService: schema7.getService("dxos.mesh.bridge.BridgeService")
3149
+ };
3150
+ var workerServiceBundle = {
3151
+ WorkerService: schema7.getService("dxos.iframe.WorkerService")
3152
+ };
3153
+
3154
+ // packages/sdk/client-services/src/packlets/vault/iframe-proxy-runtime.ts
3258
3155
  var IFrameProxyRuntime = class {
3259
- constructor({ systemPort, workerAppPort, windowAppPort, shellPort }) {
3156
+ constructor({ systemPort, workerAppPort, windowAppPort }) {
3260
3157
  this._transportService = new WebRTCTransportService();
3261
3158
  this._systemPort = systemPort;
3262
3159
  this._windowAppPort = windowAppPort;
3263
3160
  this._workerAppPort = workerAppPort;
3264
- this._shellPort = shellPort;
3265
- this._systemRpc = createProtoRpcPeer2({
3161
+ this._systemRpc = createProtoRpcPeer({
3266
3162
  requested: workerServiceBundle,
3267
3163
  exposed: iframeServiceBundle,
3268
3164
  handlers: {
@@ -3277,100 +3173,22 @@ var IFrameProxyRuntime = class {
3277
3173
  });
3278
3174
  this._workerAppPort.subscribe((msg) => this._windowAppPort.send(msg));
3279
3175
  this._windowAppPort.subscribe((msg) => this._workerAppPort.send(msg));
3280
- if (this._shellPort) {
3281
- this._shellRuntime = new ShellRuntimeImpl(this._shellPort);
3282
- }
3283
- }
3284
- get shell() {
3285
- return this._shellRuntime;
3286
3176
  }
3287
3177
  async open(origin) {
3288
- var _a;
3289
3178
  await this._systemRpc.open();
3290
3179
  await this._systemRpc.rpc.WorkerService.start({
3291
3180
  origin
3292
3181
  });
3293
- await ((_a = this._shellRuntime) == null ? void 0 : _a.open());
3294
3182
  }
3295
3183
  async close() {
3296
- var _a;
3297
- await ((_a = this._shellRuntime) == null ? void 0 : _a.close());
3298
3184
  await this._systemRpc.rpc.WorkerService.stop();
3299
3185
  await this._systemRpc.close();
3300
3186
  }
3301
3187
  };
3302
3188
 
3303
- // packages/sdk/client-services/src/packlets/vault/shell-controller.ts
3304
- import { Event as Event6 } from "@dxos/async";
3305
- import { log as log12 } from "@dxos/log";
3306
- import { ShellDisplay } from "@dxos/protocols/proto/dxos/iframe";
3307
- import { createProtoRpcPeer as createProtoRpcPeer3 } from "@dxos/rpc";
3308
- var ShellController = class {
3309
- constructor(_port) {
3310
- this._port = _port;
3311
- this.contextUpdate = new Event6();
3312
- this._display = ShellDisplay.NONE;
3313
- }
3314
- get display() {
3315
- return this._display;
3316
- }
3317
- get spaceKey() {
3318
- return this._spaceKey;
3319
- }
3320
- setSpace(key) {
3321
- this._spaceKey = key;
3322
- this._emitUpdate();
3323
- }
3324
- async setLayout(layout, options = {}) {
3325
- var _a;
3326
- this._display = ShellDisplay.FULLSCREEN;
3327
- this._emitUpdate();
3328
- await ((_a = this._shellRpc) == null ? void 0 : _a.rpc.ShellService.setLayout({
3329
- layout,
3330
- ...options
3331
- }));
3332
- }
3333
- async open() {
3334
- this._shellRpc = createProtoRpcPeer3({
3335
- requested: shellServiceBundle,
3336
- exposed: appServiceBundle,
3337
- handlers: {
3338
- AppService: {
3339
- setContext: async (request) => {
3340
- log12("set context", request, {
3341
- file: "shell-controller.ts",
3342
- line: 51,
3343
- scope: this,
3344
- callSite: (f, a) => f(...a)
3345
- });
3346
- this._display = request.display;
3347
- this._spaceKey = request.spaceKey;
3348
- this._invitationCode = request.invitationCode;
3349
- this.contextUpdate.emit(request);
3350
- }
3351
- }
3352
- },
3353
- port: this._port
3354
- });
3355
- await this._shellRpc.open();
3356
- }
3357
- async close() {
3358
- var _a;
3359
- await ((_a = this._shellRpc) == null ? void 0 : _a.close());
3360
- this._shellRpc = void 0;
3361
- }
3362
- _emitUpdate() {
3363
- this.contextUpdate.emit({
3364
- display: this._display,
3365
- spaceKey: this._spaceKey,
3366
- invitationCode: this._invitationCode
3367
- });
3368
- }
3369
- };
3370
-
3371
3189
  // packages/sdk/client-services/src/packlets/vault/vault-resource-lock.ts
3372
3190
  import { asyncTimeout, Trigger as Trigger6 } from "@dxos/async";
3373
- import { log as log13 } from "@dxos/log";
3191
+ import { log as log12 } from "@dxos/log";
3374
3192
  var Message;
3375
3193
  (function(Message2) {
3376
3194
  Message2["ACQUIRING"] = "acquiring";
@@ -3403,7 +3221,7 @@ var VaultResourceLock = class {
3403
3221
  }
3404
3222
  }
3405
3223
  async _requestLock(steal = false) {
3406
- log13("requesting lock...", {
3224
+ log12("requesting lock...", {
3407
3225
  steal
3408
3226
  }, {
3409
3227
  file: "vault-resource-lock.ts",
@@ -3420,14 +3238,14 @@ var VaultResourceLock = class {
3420
3238
  acquired.wake();
3421
3239
  this._releaseTrigger = new Trigger6();
3422
3240
  await this._releaseTrigger.wait();
3423
- log13("releasing lock...", {}, {
3241
+ log12("releasing lock...", {}, {
3424
3242
  file: "vault-resource-lock.ts",
3425
3243
  line: 65,
3426
3244
  scope: this,
3427
3245
  callSite: (f, a) => f(...a)
3428
3246
  });
3429
3247
  await ((_b = this._onRelease) == null ? void 0 : _b.call(this));
3430
- log13("released lock", {}, {
3248
+ log12("released lock", {}, {
3431
3249
  file: "vault-resource-lock.ts",
3432
3250
  line: 67,
3433
3251
  scope: this,
@@ -3438,7 +3256,7 @@ var VaultResourceLock = class {
3438
3256
  await ((_a = this._onRelease) == null ? void 0 : _a.call(this));
3439
3257
  });
3440
3258
  await acquired.wait();
3441
- log13("recieved lock", {
3259
+ log12("recieved lock", {
3442
3260
  steal
3443
3261
  }, {
3444
3262
  file: "vault-resource-lock.ts",
@@ -3451,15 +3269,15 @@ var VaultResourceLock = class {
3451
3269
 
3452
3270
  // packages/sdk/client-services/src/packlets/vault/worker-runtime.ts
3453
3271
  import { Trigger as Trigger8 } from "@dxos/async";
3454
- import { log as log15 } from "@dxos/log";
3272
+ import { log as log14 } from "@dxos/log";
3455
3273
  import { MemorySignalManager, MemorySignalManagerContext, WebsocketSignalManager } from "@dxos/messaging";
3456
3274
  import { NetworkManager, WebRTCTransportProxyFactory } from "@dxos/network-manager";
3457
3275
 
3458
3276
  // packages/sdk/client-services/src/packlets/vault/worker-session.ts
3459
- import assert14 from "@dxos/node-std/assert";
3460
- import { asyncTimeout as asyncTimeout2, Trigger as Trigger7 } from "@dxos/async";
3461
- import { log as log14, logInfo } from "@dxos/log";
3462
- import { createProtoRpcPeer as createProtoRpcPeer4 } from "@dxos/rpc";
3277
+ import assert13 from "@dxos/node-std/assert";
3278
+ import { Trigger as Trigger7 } from "@dxos/async";
3279
+ import { log as log13, logInfo } from "@dxos/log";
3280
+ import { createProtoRpcPeer as createProtoRpcPeer2 } from "@dxos/rpc";
3463
3281
  import { Callback } from "@dxos/util";
3464
3282
  var __decorate3 = function(decorators, target, key, desc) {
3465
3283
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3472,39 +3290,33 @@ var __decorate3 = function(decorators, target, key, desc) {
3472
3290
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3473
3291
  };
3474
3292
  var WorkerSession = class {
3475
- constructor({ getService, systemPort, appPort, shellPort, options = {
3293
+ constructor({ getService, systemPort, appPort, options = {
3476
3294
  heartbeatInterval: 1e3
3477
3295
  } }) {
3478
3296
  this._startTrigger = new Trigger7();
3479
3297
  this.onClose = new Callback();
3480
- assert14(options);
3481
- assert14(getService);
3298
+ assert13(options);
3299
+ assert13(getService);
3482
3300
  this._options = options;
3483
3301
  this._getService = getService;
3484
- const handlers = {
3485
- DataService: async () => await this._getService((services) => services.DataService),
3486
- DevicesService: async () => await this._getService((services) => services.DevicesService),
3487
- DevtoolsHost: async () => await this._getService((services) => services.DevtoolsHost),
3488
- HaloInvitationsService: async () => await this._getService((services) => services.HaloInvitationsService),
3489
- NetworkService: async () => await this._getService((services) => services.NetworkService),
3490
- ProfileService: async () => await this._getService((services) => services.ProfileService),
3491
- SpaceInvitationsService: async () => await this._getService((services) => services.SpaceInvitationsService),
3492
- SpaceService: async () => await this._getService((services) => services.SpaceService),
3493
- SpacesService: async () => await this._getService((services) => services.SpacesService),
3494
- SystemService: async () => await this._getService((services) => services.SystemService),
3495
- TracingService: async () => await this._getService((services) => services.TracingService)
3496
- };
3497
- this._clientRpc = createProtoRpcPeer4({
3302
+ this._clientRpc = createProtoRpcPeer2({
3498
3303
  exposed: clientServiceBundle,
3499
- handlers,
3304
+ handlers: {
3305
+ DataService: async () => await this._getService((services) => services.DataService),
3306
+ DevicesService: async () => await this._getService((services) => services.DevicesService),
3307
+ DevtoolsHost: async () => await this._getService((services) => services.DevtoolsHost),
3308
+ HaloInvitationsService: async () => await this._getService((services) => services.HaloInvitationsService),
3309
+ NetworkService: async () => await this._getService((services) => services.NetworkService),
3310
+ ProfileService: async () => await this._getService((services) => services.ProfileService),
3311
+ SpaceInvitationsService: async () => await this._getService((services) => services.SpaceInvitationsService),
3312
+ SpaceService: async () => await this._getService((services) => services.SpaceService),
3313
+ SpacesService: async () => await this._getService((services) => services.SpacesService),
3314
+ SystemService: async () => await this._getService((services) => services.SystemService),
3315
+ TracingService: async () => await this._getService((services) => services.TracingService)
3316
+ },
3500
3317
  port: appPort
3501
3318
  });
3502
- this._shellClientRpc = createProtoRpcPeer4({
3503
- exposed: clientServiceBundle,
3504
- handlers,
3505
- port: shellPort
3506
- });
3507
- this._iframeRpc = createProtoRpcPeer4({
3319
+ this._iframeRpc = createProtoRpcPeer2({
3508
3320
  requested: iframeServiceBundle,
3509
3321
  exposed: workerServiceBundle,
3510
3322
  handlers: {
@@ -3518,9 +3330,9 @@ var WorkerSession = class {
3518
3330
  try {
3519
3331
  await this.close();
3520
3332
  } catch (err) {
3521
- log14.catch(err, {}, {
3333
+ log13.catch(err, {}, {
3522
3334
  file: "worker-session.ts",
3523
- line: 92,
3335
+ line: 90,
3524
3336
  scope: this,
3525
3337
  callSite: (f, a) => f(...a)
3526
3338
  });
@@ -3536,16 +3348,15 @@ var WorkerSession = class {
3536
3348
  this.bridgeService = this._iframeRpc.rpc.BridgeService;
3537
3349
  }
3538
3350
  async open() {
3539
- log14.info("opening..", {}, {
3351
+ log13.info("opening..", {}, {
3540
3352
  file: "worker-session.ts",
3541
- line: 106,
3353
+ line: 104,
3542
3354
  scope: this,
3543
3355
  callSite: (f, a) => f(...a)
3544
3356
  });
3545
3357
  await Promise.all([
3546
3358
  this._clientRpc.open(),
3547
- this._iframeRpc.open(),
3548
- this._maybeOpenShell()
3359
+ this._iframeRpc.open()
3549
3360
  ]);
3550
3361
  await this._startTrigger.wait({
3551
3362
  timeout: 3e3
@@ -3554,20 +3365,20 @@ var WorkerSession = class {
3554
3365
  try {
3555
3366
  await this._iframeRpc.rpc.IframeService.heartbeat();
3556
3367
  } catch (err1) {
3557
- log14.warn("Heartbeat failed", {
3368
+ log13.warn("Heartbeat failed", {
3558
3369
  err: err1
3559
3370
  }, {
3560
3371
  file: "worker-session.ts",
3561
- line: 118,
3372
+ line: 116,
3562
3373
  scope: this,
3563
3374
  callSite: (f, a) => f(...a)
3564
3375
  });
3565
3376
  try {
3566
3377
  await this.close();
3567
3378
  } catch (err) {
3568
- log14.catch(err, {}, {
3379
+ log13.catch(err, {}, {
3569
3380
  file: "worker-session.ts",
3570
- line: 122,
3381
+ line: 120,
3571
3382
  scope: this,
3572
3383
  callSite: (f, a) => f(...a)
3573
3384
  });
@@ -3576,18 +3387,18 @@ var WorkerSession = class {
3576
3387
  }, this._options.heartbeatInterval);
3577
3388
  }
3578
3389
  async close() {
3579
- log14.info("closing..", {}, {
3390
+ log13.info("closing..", {}, {
3580
3391
  file: "worker-session.ts",
3581
- line: 129,
3392
+ line: 127,
3582
3393
  scope: this,
3583
3394
  callSite: (f, a) => f(...a)
3584
3395
  });
3585
3396
  try {
3586
3397
  await this.onClose.callIfSet();
3587
3398
  } catch (err) {
3588
- log14.catch(err, {}, {
3399
+ log13.catch(err, {}, {
3589
3400
  file: "worker-session.ts",
3590
- line: 133,
3401
+ line: 131,
3591
3402
  scope: this,
3592
3403
  callSite: (f, a) => f(...a)
3593
3404
  });
@@ -3600,18 +3411,6 @@ var WorkerSession = class {
3600
3411
  this._iframeRpc.close()
3601
3412
  ]);
3602
3413
  }
3603
- async _maybeOpenShell() {
3604
- try {
3605
- await asyncTimeout2(this._shellClientRpc.open(), 1e3);
3606
- } catch (e) {
3607
- log14.info("No shell connected.", {}, {
3608
- file: "worker-session.ts",
3609
- line: 147,
3610
- scope: this,
3611
- callSite: (f, a) => f(...a)
3612
- });
3613
- }
3614
- }
3615
3414
  };
3616
3415
  __decorate3([
3617
3416
  logInfo
@@ -3627,9 +3426,9 @@ var WorkerRuntime = class {
3627
3426
  this.sessions = /* @__PURE__ */ new Set();
3628
3427
  }
3629
3428
  async start() {
3630
- log15("starting...", {}, {
3429
+ log14("starting...", {}, {
3631
3430
  file: "worker-runtime.ts",
3632
- line: 42,
3431
+ line: 41,
3633
3432
  scope: this,
3634
3433
  callSite: (f, a) => f(...a)
3635
3434
  });
@@ -3648,17 +3447,17 @@ var WorkerRuntime = class {
3648
3447
  });
3649
3448
  await this._clientServices.open();
3650
3449
  this._ready.wake(void 0);
3651
- log15("started", {}, {
3450
+ log14("started", {}, {
3652
3451
  file: "worker-runtime.ts",
3653
- line: 59,
3452
+ line: 58,
3654
3453
  scope: this,
3655
3454
  callSite: (f, a) => f(...a)
3656
3455
  });
3657
3456
  } catch (err) {
3658
3457
  this._ready.wake(err);
3659
- log15.catch(err, {}, {
3458
+ log14.catch(err, {}, {
3660
3459
  file: "worker-runtime.ts",
3661
- line: 62,
3460
+ line: 61,
3662
3461
  scope: this,
3663
3462
  callSite: (f, a) => f(...a)
3664
3463
  });
@@ -3670,7 +3469,7 @@ var WorkerRuntime = class {
3670
3469
  /**
3671
3470
  * Create a new session.
3672
3471
  */
3673
- async createSession({ appPort, systemPort, shellPort }) {
3472
+ async createSession({ appPort, systemPort }) {
3674
3473
  const session = new WorkerSession({
3675
3474
  getService: async (find) => {
3676
3475
  const error = await this._ready.wait();
@@ -3685,7 +3484,6 @@ var WorkerRuntime = class {
3685
3484
  },
3686
3485
  appPort,
3687
3486
  systemPort,
3688
- shellPort,
3689
3487
  readySignal: this._ready
3690
3488
  });
3691
3489
  session.onClose.set(async () => {
@@ -3797,7 +3595,7 @@ var ClientServicesHost = class {
3797
3595
  if (this._open) {
3798
3596
  return;
3799
3597
  }
3800
- log16("opening...", {}, {
3598
+ log15("opening...", {}, {
3801
3599
  file: "service-host.ts",
3802
3600
  line: 125,
3803
3601
  scope: this,
@@ -3833,7 +3631,7 @@ var ClientServicesHost = class {
3833
3631
  await this._serviceContext.open();
3834
3632
  this._open = true;
3835
3633
  const deviceKey = (_a = this._serviceContext.identityManager.identity) == null ? void 0 : _a.deviceKey;
3836
- log16("opened", {
3634
+ log15("opened", {
3837
3635
  deviceKey
3838
3636
  }, {
3839
3637
  file: "service-host.ts",
@@ -3848,7 +3646,7 @@ var ClientServicesHost = class {
3848
3646
  return;
3849
3647
  }
3850
3648
  const deviceKey = (_a = this._serviceContext.identityManager.identity) == null ? void 0 : _a.deviceKey;
3851
- log16("closing...", {
3649
+ log15("closing...", {
3852
3650
  deviceKey
3853
3651
  }, {
3854
3652
  file: "service-host.ts",
@@ -3861,7 +3659,7 @@ var ClientServicesHost = class {
3861
3659
  });
3862
3660
  await this._serviceContext.close();
3863
3661
  this._open = false;
3864
- log16("closed", {
3662
+ log15("closed", {
3865
3663
  deviceKey
3866
3664
  }, {
3867
3665
  file: "service-host.ts",
@@ -3873,14 +3671,14 @@ var ClientServicesHost = class {
3873
3671
  };
3874
3672
 
3875
3673
  // packages/sdk/client-services/src/packlets/services/service-proxy.ts
3876
- import { asyncTimeout as asyncTimeout3 } from "@dxos/async";
3674
+ import { asyncTimeout as asyncTimeout2 } from "@dxos/async";
3877
3675
  import { RemoteServiceConnectionTimeout } from "@dxos/errors";
3878
- import { createProtoRpcPeer as createProtoRpcPeer5 } from "@dxos/rpc";
3676
+ import { createProtoRpcPeer as createProtoRpcPeer3 } from "@dxos/rpc";
3879
3677
  var ClientServicesProxy = class {
3880
3678
  // prettier-ignore
3881
3679
  constructor(port, _timeout = 3e4) {
3882
3680
  this._timeout = _timeout;
3883
- this._proxy = createProtoRpcPeer5({
3681
+ this._proxy = createProtoRpcPeer3({
3884
3682
  requested: clientServiceBundle,
3885
3683
  exposed: {},
3886
3684
  handlers: {},
@@ -3897,7 +3695,7 @@ var ClientServicesProxy = class {
3897
3695
  return this._proxy.rpc;
3898
3696
  }
3899
3697
  async open() {
3900
- await asyncTimeout3(this._proxy.open(), this._timeout, new RemoteServiceConnectionTimeout());
3698
+ await asyncTimeout2(this._proxy.open(), this._timeout, new RemoteServiceConnectionTimeout());
3901
3699
  }
3902
3700
  async close() {
3903
3701
  await this._proxy.close();
@@ -3917,12 +3715,11 @@ var __decorate4 = function(decorators, target, key, desc) {
3917
3715
  };
3918
3716
  var LOCK_KEY = "DXOS_RESOURCE_LOCK";
3919
3717
  var IFrameHostRuntime = class {
3920
- constructor({ configProvider, appPort, shellPort }) {
3718
+ constructor({ configProvider, appPort }) {
3921
3719
  this._transportFactory = createWebRTCTransportFactory();
3922
3720
  this._ready = new Trigger9();
3923
3721
  this._configProvider = configProvider;
3924
3722
  this._appPort = appPort;
3925
- this._shellPort = shellPort;
3926
3723
  this._getService = async (find) => {
3927
3724
  const error = await this._ready.wait();
3928
3725
  if (error) {
@@ -3934,26 +3731,16 @@ var IFrameHostRuntime = class {
3934
3731
  }
3935
3732
  return service;
3936
3733
  };
3937
- if (this._shellPort) {
3938
- this._shellRuntime = new ShellRuntimeImpl(this._shellPort);
3939
- }
3940
- }
3941
- get services() {
3942
- return this._clientServices;
3943
- }
3944
- get shell() {
3945
- return this._shellRuntime;
3946
3734
  }
3947
3735
  async start() {
3948
- var _a;
3949
- log17("starting...", {}, {
3736
+ log16("starting...", {}, {
3950
3737
  file: "iframe-host-runtime.ts",
3951
- line: 81,
3738
+ line: 63,
3952
3739
  scope: this,
3953
3740
  callSite: (f, a) => f(...a)
3954
3741
  });
3955
3742
  try {
3956
- this._config = await getAsyncValue(this._configProvider);
3743
+ this._config = await this._configProvider();
3957
3744
  const signalServer = this._config.get("runtime.services.signal.server");
3958
3745
  this._clientServices = new ClientServicesHost({
3959
3746
  lockKey: LOCK_KEY,
@@ -3966,7 +3753,7 @@ var IFrameHostRuntime = class {
3966
3753
  transportFactory: this._transportFactory
3967
3754
  })
3968
3755
  });
3969
- this._clientRpc = createProtoRpcPeer6({
3756
+ this._clientRpc = createProtoRpcPeer4({
3970
3757
  exposed: clientServiceBundle,
3971
3758
  handlers: {
3972
3759
  DataService: async () => await this._getService((services) => services.DataService),
@@ -3985,40 +3772,37 @@ var IFrameHostRuntime = class {
3985
3772
  });
3986
3773
  await Promise.all([
3987
3774
  this._clientServices.open(),
3988
- this._clientRpc.open(),
3989
- (_a = this._shellRuntime) == null ? void 0 : _a.open()
3775
+ this._clientRpc.open()
3990
3776
  ]);
3991
3777
  this._ready.wake(void 0);
3992
- log17("started", {}, {
3778
+ log16("started", {}, {
3993
3779
  file: "iframe-host-runtime.ts",
3994
- line: 117,
3780
+ line: 99,
3995
3781
  scope: this,
3996
3782
  callSite: (f, a) => f(...a)
3997
3783
  });
3998
3784
  } catch (err) {
3999
3785
  this._ready.wake(err);
4000
- log17.catch(err, {}, {
3786
+ log16.catch(err, {}, {
4001
3787
  file: "iframe-host-runtime.ts",
4002
- line: 120,
3788
+ line: 102,
4003
3789
  scope: this,
4004
3790
  callSite: (f, a) => f(...a)
4005
3791
  });
4006
3792
  }
4007
3793
  }
4008
3794
  async stop() {
4009
- var _a;
4010
- log17("stopping...", {}, {
3795
+ log16("stopping...", {}, {
4011
3796
  file: "iframe-host-runtime.ts",
4012
- line: 125,
3797
+ line: 107,
4013
3798
  scope: this,
4014
3799
  callSite: (f, a) => f(...a)
4015
3800
  });
4016
3801
  await this._clientRpc.close();
4017
3802
  await this._clientServices.close();
4018
- await ((_a = this._shellRuntime) == null ? void 0 : _a.close());
4019
- log17("stopped", {}, {
3803
+ log16("stopped", {}, {
4020
3804
  file: "iframe-host-runtime.ts",
4021
- line: 129,
3805
+ line: 110,
4022
3806
  scope: this,
4023
3807
  callSite: (f, a) => f(...a)
4024
3808
  });
@@ -4066,15 +3850,10 @@ export {
4066
3850
  ServiceContext,
4067
3851
  clientServiceBundle,
4068
3852
  createStorageObjects,
3853
+ IFrameHostRuntime,
4069
3854
  iframeServiceBundle,
4070
3855
  workerServiceBundle,
4071
- appServiceBundle,
4072
- shellServiceBundle,
4073
- ShellRuntimeImpl,
4074
- MemoryShellRuntime,
4075
- IFrameHostRuntime,
4076
3856
  IFrameProxyRuntime,
4077
- ShellController,
4078
3857
  VaultResourceLock,
4079
3858
  WorkerSession,
4080
3859
  WorkerRuntime,
@@ -4083,4 +3862,4 @@ export {
4083
3862
  ClientServicesHost,
4084
3863
  ClientServicesProxy
4085
3864
  };
4086
- //# sourceMappingURL=chunk-ZPZBLOQW.mjs.map
3865
+ //# sourceMappingURL=chunk-R2FEBB66.mjs.map