@dxos/client-services 0.1.53-main.304e2d2 → 0.1.53-main.3ab34c0

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.
@@ -65,11 +65,16 @@ var import_tiny_invariant14 = __toESM(require("tiny-invariant"));
65
65
  var import_async18 = require("@dxos/async");
66
66
  var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
67
67
 
68
+ // packages/sdk/client-services/src/packlets/services/client-rpc-server.ts
69
+ var import_codec_protobuf = require("@dxos/codec-protobuf");
70
+ var import_debug = require("@dxos/debug");
71
+ var import_rpc = require("@dxos/rpc");
72
+
68
73
  // packages/sdk/client-services/src/packlets/services/service-context.ts
69
74
  var import_tiny_invariant11 = __toESM(require("tiny-invariant"));
70
75
  var import_async11 = require("@dxos/async");
71
76
  var import_credentials14 = require("@dxos/credentials");
72
- var import_debug6 = require("@dxos/debug");
77
+ var import_debug7 = require("@dxos/debug");
73
78
  var import_echo_pipeline3 = require("@dxos/echo-pipeline");
74
79
  var import_feed_store3 = require("@dxos/feed-store");
75
80
  var import_keyring = require("@dxos/keyring");
@@ -86,6 +91,7 @@ var import_credentials2 = require("@dxos/credentials");
86
91
  var import_log = require("@dxos/log");
87
92
  var import_protocols = require("@dxos/protocols");
88
93
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
94
+ var Credential = import_protocols.schema.getCodecForType("dxos.halo.credentials.Credential");
89
95
  var createAuthProvider = (signer) => async (nonce) => {
90
96
  const credential = await signer.createCredential({
91
97
  assertion: {
@@ -94,7 +100,7 @@ var createAuthProvider = (signer) => async (nonce) => {
94
100
  subject: signer.getIssuer(),
95
101
  nonce
96
102
  });
97
- return import_protocols.schema.getCodecForType("dxos.halo.credentials.Credential").encode(credential);
103
+ return Credential.encode(credential);
98
104
  };
99
105
  var TrustedKeySetAuthVerifier = class {
100
106
  // prettier-ignore
@@ -107,12 +113,12 @@ var TrustedKeySetAuthVerifier = class {
107
113
  }
108
114
  get verifier() {
109
115
  return async (nonce, auth) => {
110
- const credential = import_protocols.schema.getCodecForType("dxos.halo.credentials.Credential").decode(auth);
116
+ const credential = Credential.decode(auth);
111
117
  (0, import_log.log)("authenticating...", {
112
118
  credential
113
119
  }, {
114
120
  F: __dxlog_file,
115
- L: 57,
121
+ L: 59,
116
122
  S: this,
117
123
  C: (f, a) => f(...a)
118
124
  });
@@ -122,7 +128,7 @@ var TrustedKeySetAuthVerifier = class {
122
128
  result
123
129
  }, {
124
130
  F: __dxlog_file,
125
- L: 61,
131
+ L: 63,
126
132
  S: this,
127
133
  C: (f, a) => f(...a)
128
134
  });
@@ -134,7 +140,7 @@ var TrustedKeySetAuthVerifier = class {
134
140
  credential
135
141
  }, {
136
142
  F: __dxlog_file,
137
- L: 66,
143
+ L: 68,
138
144
  S: this,
139
145
  C: (f, a) => f(...a)
140
146
  });
@@ -145,7 +151,7 @@ var TrustedKeySetAuthVerifier = class {
145
151
  key: credential.issuer
146
152
  }, {
147
153
  F: __dxlog_file,
148
- L: 71,
154
+ L: 73,
149
155
  S: this,
150
156
  C: (f, a) => f(...a)
151
157
  });
@@ -161,7 +167,7 @@ var TrustedKeySetAuthVerifier = class {
161
167
  key: credential.issuer
162
168
  }, {
163
169
  F: __dxlog_file,
164
- L: 82,
170
+ L: 84,
165
171
  S: this,
166
172
  C: (f, a) => f(...a)
167
173
  });
@@ -171,7 +177,7 @@ var TrustedKeySetAuthVerifier = class {
171
177
  key: credential.issuer
172
178
  }, {
173
179
  F: __dxlog_file,
174
- L: 85,
180
+ L: 87,
175
181
  S: this,
176
182
  C: (f, a) => f(...a)
177
183
  });
@@ -199,7 +205,7 @@ var import_tiny_invariant = __toESM(require("tiny-invariant"));
199
205
  var import_async2 = require("@dxos/async");
200
206
  var import_client_protocol = require("@dxos/client-protocol");
201
207
  var import_credentials3 = require("@dxos/credentials");
202
- var import_debug = require("@dxos/debug");
208
+ var import_debug2 = require("@dxos/debug");
203
209
  var import_feed_store = require("@dxos/feed-store");
204
210
  var import_log2 = require("@dxos/log");
205
211
  var import_credentials4 = require("@dxos/protocols/proto/dxos/halo/credentials");
@@ -269,8 +275,8 @@ var Identity = class {
269
275
  var _a, _b;
270
276
  return {
271
277
  deviceKey: this.deviceKey,
272
- controlFeedKey: (_a = this.space.controlFeedKey) != null ? _a : (0, import_debug.failUndefined)(),
273
- dataFeedKey: (_b = this.space.dataFeedKey) != null ? _b : (0, import_debug.failUndefined)()
278
+ controlFeedKey: (_a = this.space.controlFeedKey) != null ? _a : (0, import_debug2.failUndefined)(),
279
+ dataFeedKey: (_b = this.space.dataFeedKey) != null ? _b : (0, import_debug2.failUndefined)()
274
280
  };
275
281
  }
276
282
  /**
@@ -604,9 +610,9 @@ var IdentityManager = class {
604
610
 
605
611
  // packages/sdk/client-services/src/packlets/identity/identity-service.ts
606
612
  var import_tiny_invariant3 = __toESM(require("tiny-invariant"));
607
- var import_codec_protobuf = require("@dxos/codec-protobuf");
613
+ var import_codec_protobuf2 = require("@dxos/codec-protobuf");
608
614
  var import_credentials7 = require("@dxos/credentials");
609
- var import_debug2 = require("@dxos/debug");
615
+ var import_debug3 = require("@dxos/debug");
610
616
  var IdentityServiceImpl = class {
611
617
  // TODO(wittjosiah): Remove dependency on service context.
612
618
  constructor(_serviceContext) {
@@ -617,10 +623,10 @@ var IdentityServiceImpl = class {
617
623
  return this._getIdentity();
618
624
  }
619
625
  async recoverIdentity(request) {
620
- return (0, import_debug2.todo)();
626
+ return (0, import_debug3.todo)();
621
627
  }
622
628
  queryIdentity() {
623
- return new import_codec_protobuf.Stream(({ next }) => {
629
+ return new import_codec_protobuf2.Stream(({ next }) => {
624
630
  const emitNext = () => next({
625
631
  identity: this._getIdentity()
626
632
  });
@@ -1557,7 +1563,7 @@ var InvitationsHandler = class {
1557
1563
  // packages/sdk/client-services/src/packlets/invitations/invitations-service.ts
1558
1564
  var import_tiny_invariant7 = __toESM(require("tiny-invariant"));
1559
1565
  var import_async6 = require("@dxos/async");
1560
- var import_codec_protobuf2 = require("@dxos/codec-protobuf");
1566
+ var import_codec_protobuf3 = require("@dxos/codec-protobuf");
1561
1567
  var import_log6 = require("@dxos/log");
1562
1568
  var import_services4 = require("@dxos/protocols/proto/dxos/client/services");
1563
1569
  var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-service.ts";
@@ -1587,7 +1593,7 @@ var InvitationsServiceImpl = class {
1587
1593
  this._createInvitations.set(invitation.get().invitationId, invitation);
1588
1594
  this._invitationCreated.emit(invitation.get());
1589
1595
  }
1590
- return new import_codec_protobuf2.Stream(({ next, close }) => {
1596
+ return new import_codec_protobuf3.Stream(({ next, close }) => {
1591
1597
  invitation.subscribe((invitation2) => {
1592
1598
  next(invitation2);
1593
1599
  }, (err) => {
@@ -1609,7 +1615,7 @@ var InvitationsServiceImpl = class {
1609
1615
  this._acceptInvitations.set(invitation.get().invitationId, invitation);
1610
1616
  this._invitationAccepted.emit(invitation.get());
1611
1617
  }
1612
- return new import_codec_protobuf2.Stream(({ next, close }) => {
1618
+ return new import_codec_protobuf3.Stream(({ next, close }) => {
1613
1619
  invitation.subscribe((invitation2) => {
1614
1620
  next(invitation2);
1615
1621
  }, (err) => {
@@ -1672,7 +1678,7 @@ var InvitationsServiceImpl = class {
1672
1678
  }
1673
1679
  }
1674
1680
  queryInvitations() {
1675
- return new import_codec_protobuf2.Stream(({ next, ctx }) => {
1681
+ return new import_codec_protobuf3.Stream(({ next, ctx }) => {
1676
1682
  this._invitationCreated.on(ctx, (invitation) => {
1677
1683
  next({
1678
1684
  action: import_services4.QueryInvitationsResponse.Action.ADDED,
@@ -1830,7 +1836,7 @@ var import_util4 = require("@dxos/util");
1830
1836
  var import_async8 = require("@dxos/async");
1831
1837
  var import_client_protocol3 = require("@dxos/client-protocol");
1832
1838
  var import_context5 = require("@dxos/context");
1833
- var import_debug3 = require("@dxos/debug");
1839
+ var import_debug4 = require("@dxos/debug");
1834
1840
  var import_echo_pipeline = require("@dxos/echo-pipeline");
1835
1841
  var import_errors3 = require("@dxos/errors");
1836
1842
  var import_keys6 = require("@dxos/keys");
@@ -2364,7 +2370,7 @@ _ts_decorate([
2364
2370
  import_async8.synchronized
2365
2371
  ], DataSpace.prototype, "close", null);
2366
2372
  _ts_decorate([
2367
- (0, import_debug3.timed)(1e4)
2373
+ (0, import_debug4.timed)(1e4)
2368
2374
  ], DataSpace.prototype, "_createWritableFeeds", null);
2369
2375
  _ts_decorate([
2370
2376
  import_async8.synchronized
@@ -2378,7 +2384,7 @@ DataSpace = _ts_decorate([
2378
2384
 
2379
2385
  // packages/sdk/client-services/src/packlets/spaces/genesis.ts
2380
2386
  var import_credentials11 = require("@dxos/credentials");
2381
- var import_debug4 = require("@dxos/debug");
2387
+ var import_debug5 = require("@dxos/debug");
2382
2388
  var import_credentials12 = require("@dxos/protocols/proto/dxos/halo/credentials");
2383
2389
  var import_timeframe2 = require("@dxos/timeframe");
2384
2390
  var spaceGenesis = async (keyring, signingContext, space) => {
@@ -2402,11 +2408,11 @@ var spaceGenesis = async (keyring, signingContext, space) => {
2402
2408
  spaceKey: space.key,
2403
2409
  role: import_credentials12.SpaceMember.Role.ADMIN,
2404
2410
  profile: signingContext.profile,
2405
- genesisFeedKey: (_a = space.controlFeedKey) != null ? _a : (0, import_debug4.failUndefined)()
2411
+ genesisFeedKey: (_a = space.controlFeedKey) != null ? _a : (0, import_debug5.failUndefined)()
2406
2412
  }
2407
2413
  }),
2408
2414
  await signingContext.credentialSigner.createCredential({
2409
- subject: (_b = space.controlFeedKey) != null ? _b : (0, import_debug4.failUndefined)(),
2415
+ subject: (_b = space.controlFeedKey) != null ? _b : (0, import_debug5.failUndefined)(),
2410
2416
  assertion: {
2411
2417
  "@type": "dxos.halo.credentials.AdmittedFeed",
2412
2418
  spaceKey: space.key,
@@ -2416,7 +2422,7 @@ var spaceGenesis = async (keyring, signingContext, space) => {
2416
2422
  }
2417
2423
  }),
2418
2424
  await signingContext.credentialSigner.createCredential({
2419
- subject: (_c = space.dataFeedKey) != null ? _c : (0, import_debug4.failUndefined)(),
2425
+ subject: (_c = space.dataFeedKey) != null ? _c : (0, import_debug5.failUndefined)(),
2420
2426
  assertion: {
2421
2427
  "@type": "dxos.halo.credentials.AdmittedFeed",
2422
2428
  spaceKey: space.key,
@@ -2426,7 +2432,7 @@ var spaceGenesis = async (keyring, signingContext, space) => {
2426
2432
  }
2427
2433
  }),
2428
2434
  await signingContext.credentialSigner.createCredential({
2429
- subject: (_d = space.key) != null ? _d : (0, import_debug4.failUndefined)(),
2435
+ subject: (_d = space.key) != null ? _d : (0, import_debug5.failUndefined)(),
2430
2436
  assertion: {
2431
2437
  "@type": "dxos.halo.credentials.Epoch",
2432
2438
  number: 0,
@@ -2748,8 +2754,8 @@ DataSpaceManager = _ts_decorate2([
2748
2754
 
2749
2755
  // packages/sdk/client-services/src/packlets/spaces/spaces-service.ts
2750
2756
  var import_async10 = require("@dxos/async");
2751
- var import_codec_protobuf3 = require("@dxos/codec-protobuf");
2752
- var import_debug5 = require("@dxos/debug");
2757
+ var import_codec_protobuf4 = require("@dxos/codec-protobuf");
2758
+ var import_debug6 = require("@dxos/debug");
2753
2759
  var import_echo_pipeline2 = require("@dxos/echo-pipeline");
2754
2760
  var import_errors4 = require("@dxos/errors");
2755
2761
  var import_log11 = require("@dxos/log");
@@ -2775,7 +2781,7 @@ var SpacesServiceImpl = class {
2775
2781
  async updateSpace({ spaceKey, state }) {
2776
2782
  var _a;
2777
2783
  const dataSpaceManager = await this._getDataSpaceManager();
2778
- const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug5.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2784
+ const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2779
2785
  if (state) {
2780
2786
  switch (state) {
2781
2787
  case import_services8.SpaceState.ACTIVE:
@@ -2790,7 +2796,7 @@ var SpacesServiceImpl = class {
2790
2796
  }
2791
2797
  }
2792
2798
  querySpaces() {
2793
- return new import_codec_protobuf3.Stream(({ next, ctx }) => {
2799
+ return new import_codec_protobuf4.Stream(({ next, ctx }) => {
2794
2800
  const scheduler = new import_async10.UpdateScheduler(ctx, async () => {
2795
2801
  const dataSpaceManager = await this._getDataSpaceManager();
2796
2802
  const spaces = Array.from(dataSpaceManager.spaces.values()).map((space) => this._serializeSpace(space));
@@ -2841,15 +2847,15 @@ var SpacesServiceImpl = class {
2841
2847
  async postMessage({ spaceKey, channel, message }) {
2842
2848
  var _a;
2843
2849
  const dataSpaceManager = await this._getDataSpaceManager();
2844
- const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug5.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2850
+ const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2845
2851
  await space.postMessage(getChannelId(channel), message);
2846
2852
  }
2847
2853
  subscribeMessages({ spaceKey, channel }) {
2848
- return new import_codec_protobuf3.Stream(({ ctx, next }) => {
2854
+ return new import_codec_protobuf4.Stream(({ ctx, next }) => {
2849
2855
  (0, import_async10.scheduleTask)(ctx, async () => {
2850
2856
  var _a;
2851
2857
  const dataSpaceManager = await this._getDataSpaceManager();
2852
- const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug5.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2858
+ const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2853
2859
  const handle = space.listen(getChannelId(channel), (message) => {
2854
2860
  next(message);
2855
2861
  });
@@ -2858,9 +2864,9 @@ var SpacesServiceImpl = class {
2858
2864
  });
2859
2865
  }
2860
2866
  queryCredentials({ spaceKey }) {
2861
- return new import_codec_protobuf3.Stream(({ ctx, next }) => {
2867
+ return new import_codec_protobuf4.Stream(({ ctx, next }) => {
2862
2868
  var _a;
2863
- const space = (_a = this._spaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug5.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2869
+ const space = (_a = this._spaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2864
2870
  const processor = {
2865
2871
  processCredential: async (credential) => {
2866
2872
  next(credential);
@@ -2872,7 +2878,7 @@ var SpacesServiceImpl = class {
2872
2878
  }
2873
2879
  async writeCredentials({ spaceKey, credentials }) {
2874
2880
  var _a;
2875
- const space = (_a = this._spaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug5.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2881
+ const space = (_a = this._spaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2876
2882
  for (const credential of credentials != null ? credentials : []) {
2877
2883
  await space.controlPipeline.writer.write({
2878
2884
  credential: {
@@ -2884,7 +2890,7 @@ var SpacesServiceImpl = class {
2884
2890
  async createEpoch({ spaceKey }) {
2885
2891
  var _a;
2886
2892
  const dataSpaceManager = await this._getDataSpaceManager();
2887
- const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug5.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2893
+ const space = (_a = dataSpaceManager.spaces.get(spaceKey)) != null ? _a : (0, import_debug6.raise)(new import_echo_pipeline2.SpaceNotFoundError(spaceKey));
2888
2894
  await space.createEpoch();
2889
2895
  }
2890
2896
  _serializeSpace(space) {
@@ -2964,7 +2970,7 @@ var ServiceContext = class {
2964
2970
  this.invitations = new InvitationsHandler(this.networkManager);
2965
2971
  this._handlerFactories.set(import_services9.Invitation.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => {
2966
2972
  var _a;
2967
- return (_a = this.identityManager.identity) != null ? _a : (0, import_debug6.failUndefined)();
2973
+ return (_a = this.identityManager.identity) != null ? _a : (0, import_debug7.failUndefined)();
2968
2974
  }, this._acceptIdentity.bind(this)));
2969
2975
  }
2970
2976
  async open() {
@@ -3060,7 +3066,7 @@ var ServiceContext = class {
3060
3066
  S: this,
3061
3067
  C: (f, a) => f(...a)
3062
3068
  });
3063
- const identity = (_a = this.identityManager.identity) != null ? _a : (0, import_debug6.failUndefined)();
3069
+ const identity = (_a = this.identityManager.identity) != null ? _a : (0, import_debug7.failUndefined)();
3064
3070
  const signingContext = {
3065
3071
  credentialSigner: identity.getIdentityCredentialSigner(),
3066
3072
  identityKey: identity.identityKey,
@@ -3156,7 +3162,7 @@ var import_text_model = require("@dxos/text-model");
3156
3162
 
3157
3163
  // packages/sdk/client-services/src/packlets/devices/devices-service.ts
3158
3164
  var import_async12 = require("@dxos/async");
3159
- var import_codec_protobuf4 = require("@dxos/codec-protobuf");
3165
+ var import_codec_protobuf5 = require("@dxos/codec-protobuf");
3160
3166
  var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
3161
3167
  var DevicesServiceImpl = class {
3162
3168
  constructor(_identityManager) {
@@ -3166,7 +3172,7 @@ var DevicesServiceImpl = class {
3166
3172
  throw new Error("Method not implemented.");
3167
3173
  }
3168
3174
  queryDevices() {
3169
- return new import_codec_protobuf4.Stream(({ next }) => {
3175
+ return new import_codec_protobuf5.Stream(({ next }) => {
3170
3176
  const update = () => {
3171
3177
  var _a;
3172
3178
  const deviceKeys = (_a = this._identityManager.identity) == null ? void 0 : _a.authorizedDeviceKeys;
@@ -3203,16 +3209,16 @@ var DevicesServiceImpl = class {
3203
3209
 
3204
3210
  // packages/sdk/client-services/src/packlets/devtools/devtools.ts
3205
3211
  var import_async15 = require("@dxos/async");
3206
- var import_codec_protobuf10 = require("@dxos/codec-protobuf");
3212
+ var import_codec_protobuf11 = require("@dxos/codec-protobuf");
3207
3213
 
3208
3214
  // packages/sdk/client-services/src/packlets/devtools/feeds.ts
3209
3215
  var import_async13 = require("@dxos/async");
3210
- var import_codec_protobuf5 = require("@dxos/codec-protobuf");
3216
+ var import_codec_protobuf6 = require("@dxos/codec-protobuf");
3211
3217
  var import_feed_store4 = require("@dxos/feed-store");
3212
3218
  var import_keys9 = require("@dxos/keys");
3213
3219
  var import_util6 = require("@dxos/util");
3214
3220
  var subscribeToFeeds = ({ feedStore }, { feedKeys }) => {
3215
- return new import_codec_protobuf5.Stream(({ next }) => {
3221
+ return new import_codec_protobuf6.Stream(({ next }) => {
3216
3222
  const subscriptions = new import_async13.EventSubscriptions();
3217
3223
  const feedMap = new import_util6.ComplexMap(import_keys9.PublicKey.hash);
3218
3224
  const update = () => {
@@ -3244,7 +3250,7 @@ var subscribeToFeeds = ({ feedStore }, { feedKeys }) => {
3244
3250
  });
3245
3251
  };
3246
3252
  var subscribeToFeedBlocks = ({ feedStore }, { feedKey, maxBlocks = 10 }) => {
3247
- return new import_codec_protobuf5.Stream(({ next }) => {
3253
+ return new import_codec_protobuf6.Stream(({ next }) => {
3248
3254
  if (!feedKey) {
3249
3255
  return;
3250
3256
  }
@@ -3284,8 +3290,8 @@ var subscribeToFeedBlocks = ({ feedStore }, { feedKey, maxBlocks = 10 }) => {
3284
3290
 
3285
3291
  // packages/sdk/client-services/src/packlets/devtools/keys.ts
3286
3292
  var import_async14 = require("@dxos/async");
3287
- var import_codec_protobuf6 = require("@dxos/codec-protobuf");
3288
- var subscribeToKeyringKeys = ({ keyring }) => new import_codec_protobuf6.Stream(({ next, ctx }) => {
3293
+ var import_codec_protobuf7 = require("@dxos/codec-protobuf");
3294
+ var subscribeToKeyringKeys = ({ keyring }) => new import_codec_protobuf7.Stream(({ next, ctx }) => {
3289
3295
  const update = async () => {
3290
3296
  next({
3291
3297
  keys: await keyring.list()
@@ -3296,8 +3302,8 @@ var subscribeToKeyringKeys = ({ keyring }) => new import_codec_protobuf6.Stream(
3296
3302
  });
3297
3303
 
3298
3304
  // packages/sdk/client-services/src/packlets/devtools/metadata.ts
3299
- var import_codec_protobuf7 = require("@dxos/codec-protobuf");
3300
- var subscribeToMetadata = ({ context }) => new import_codec_protobuf7.Stream(({ next, ctx }) => {
3305
+ var import_codec_protobuf8 = require("@dxos/codec-protobuf");
3306
+ var subscribeToMetadata = ({ context }) => new import_codec_protobuf8.Stream(({ next, ctx }) => {
3301
3307
  context.metadataStore.update.on(ctx, (data) => next({
3302
3308
  metadata: data
3303
3309
  }));
@@ -3307,10 +3313,10 @@ var subscribeToMetadata = ({ context }) => new import_codec_protobuf7.Stream(({
3307
3313
  });
3308
3314
 
3309
3315
  // packages/sdk/client-services/src/packlets/devtools/network.ts
3310
- var import_codec_protobuf8 = require("@dxos/codec-protobuf");
3316
+ var import_codec_protobuf9 = require("@dxos/codec-protobuf");
3311
3317
  var import_context7 = require("@dxos/context");
3312
3318
  var import_keys10 = require("@dxos/keys");
3313
- var subscribeToNetworkStatus = ({ signalManager }) => new import_codec_protobuf8.Stream(({ next, close }) => {
3319
+ var subscribeToNetworkStatus = ({ signalManager }) => new import_codec_protobuf9.Stream(({ next, close }) => {
3314
3320
  const update = () => {
3315
3321
  try {
3316
3322
  const status = signalManager.getStatus();
@@ -3324,7 +3330,7 @@ var subscribeToNetworkStatus = ({ signalManager }) => new import_codec_protobuf8
3324
3330
  signalManager.statusChanged.on(() => update());
3325
3331
  update();
3326
3332
  });
3327
- var subscribeToSignal = ({ signalManager }) => new import_codec_protobuf8.Stream(({ next }) => {
3333
+ var subscribeToSignal = ({ signalManager }) => new import_codec_protobuf9.Stream(({ next }) => {
3328
3334
  const ctx = new import_context7.Context();
3329
3335
  signalManager.onMessage.on(ctx, (message) => {
3330
3336
  next({
@@ -3346,7 +3352,7 @@ var subscribeToSignal = ({ signalManager }) => new import_codec_protobuf8.Stream
3346
3352
  return ctx.dispose();
3347
3353
  };
3348
3354
  });
3349
- var subscribeToSwarmInfo = ({ networkManager }) => new import_codec_protobuf8.Stream(({ next }) => {
3355
+ var subscribeToSwarmInfo = ({ networkManager }) => new import_codec_protobuf9.Stream(({ next }) => {
3350
3356
  var _a;
3351
3357
  const update = () => {
3352
3358
  var _a2;
@@ -3362,9 +3368,9 @@ var subscribeToSwarmInfo = ({ networkManager }) => new import_codec_protobuf8.St
3362
3368
  });
3363
3369
 
3364
3370
  // packages/sdk/client-services/src/packlets/devtools/spaces.ts
3365
- var import_codec_protobuf9 = require("@dxos/codec-protobuf");
3371
+ var import_codec_protobuf10 = require("@dxos/codec-protobuf");
3366
3372
  var subscribeToSpaces = (context, { spaceKeys = [] }) => {
3367
- return new import_codec_protobuf9.Stream(({ next }) => {
3373
+ return new import_codec_protobuf10.Stream(({ next }) => {
3368
3374
  let unsubscribe;
3369
3375
  const update = async () => {
3370
3376
  const spaces = [
@@ -3408,7 +3414,7 @@ var DevtoolsServiceImpl = class {
3408
3414
  this.params = params;
3409
3415
  }
3410
3416
  events(request) {
3411
- return new import_codec_protobuf10.Stream(({ next }) => {
3417
+ return new import_codec_protobuf11.Stream(({ next }) => {
3412
3418
  this.params.events.ready.on(() => {
3413
3419
  next({
3414
3420
  ready: {}
@@ -3568,7 +3574,7 @@ _ts_decorate3([
3568
3574
 
3569
3575
  // packages/sdk/client-services/src/packlets/logging/logging-service.ts
3570
3576
  var import_async16 = require("@dxos/async");
3571
- var import_codec_protobuf11 = require("@dxos/codec-protobuf");
3577
+ var import_codec_protobuf12 = require("@dxos/codec-protobuf");
3572
3578
  var import_log14 = require("@dxos/log");
3573
3579
  var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
3574
3580
  var import_util7 = require("@dxos/util");
@@ -3587,7 +3593,7 @@ var LoggingServiceImpl = class {
3587
3593
  import_log14.log.runtimeConfig.processors.splice(index, 1);
3588
3594
  }
3589
3595
  queryLogs(request) {
3590
- return new import_codec_protobuf11.Stream(({ ctx, next }) => {
3596
+ return new import_codec_protobuf12.Stream(({ ctx, next }) => {
3591
3597
  const handler = (entry2) => {
3592
3598
  var _a, _b, _c, _d, _e;
3593
3599
  if (LOG_PROCESSING > 0) {
@@ -3643,14 +3649,14 @@ var shouldLog = (entry2, request) => {
3643
3649
  var LOG_PROCESSING = 0;
3644
3650
 
3645
3651
  // packages/sdk/client-services/src/packlets/network/network-service.ts
3646
- var import_codec_protobuf12 = require("@dxos/codec-protobuf");
3652
+ var import_codec_protobuf13 = require("@dxos/codec-protobuf");
3647
3653
  var NetworkServiceImpl = class {
3648
3654
  constructor(networkManager, signalManager) {
3649
3655
  this.networkManager = networkManager;
3650
3656
  this.signalManager = signalManager;
3651
3657
  }
3652
3658
  queryStatus() {
3653
- return new import_codec_protobuf12.Stream(({ next }) => {
3659
+ return new import_codec_protobuf13.Stream(({ next }) => {
3654
3660
  const update = () => {
3655
3661
  next({
3656
3662
  swarm: this.networkManager.connectionState,
@@ -3724,7 +3730,7 @@ var toStorageType = (type) => {
3724
3730
  };
3725
3731
 
3726
3732
  // packages/sdk/client-services/src/packlets/system/system-service.ts
3727
- var import_codec_protobuf13 = require("@dxos/codec-protobuf");
3733
+ var import_codec_protobuf14 = require("@dxos/codec-protobuf");
3728
3734
  var SystemServiceImpl = class {
3729
3735
  constructor({ config, statusUpdate, onUpdateStatus, getCurrentStatus, onReset }) {
3730
3736
  this._config = config;
@@ -3741,7 +3747,7 @@ var SystemServiceImpl = class {
3741
3747
  await this._onUpdateStatus(status);
3742
3748
  }
3743
3749
  queryStatus() {
3744
- return new import_codec_protobuf13.Stream(({ next }) => {
3750
+ return new import_codec_protobuf14.Stream(({ next }) => {
3745
3751
  const update = () => {
3746
3752
  next({
3747
3753
  status: this._getCurrentStatus()
@@ -4215,7 +4221,7 @@ var acceptInvitation = (guest, invitation) => {
4215
4221
  // packages/sdk/client-services/src/packlets/testing/test-builder.ts
4216
4222
  var import_context8 = require("@dxos/context");
4217
4223
  var import_credentials15 = require("@dxos/credentials");
4218
- var import_debug7 = require("@dxos/debug");
4224
+ var import_debug8 = require("@dxos/debug");
4219
4225
  var import_echo_pipeline5 = require("@dxos/echo-pipeline");
4220
4226
  var import_testing = require("@dxos/echo-pipeline/testing");
4221
4227
  var import_feed_store5 = require("@dxos/feed-store");
@@ -4339,7 +4345,7 @@ var TestPeer = class {
4339
4345
  }
4340
4346
  get identity() {
4341
4347
  var _a;
4342
- return (_a = this._props.signingContext) != null ? _a : (0, import_debug7.failUndefined)();
4348
+ return (_a = this._props.signingContext) != null ? _a : (0, import_debug8.failUndefined)();
4343
4349
  }
4344
4350
  get dataSpaceManager() {
4345
4351
  var _a, _b;