@tiflis-io/tiflis-code-workstation 0.3.19 → 0.3.20

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 (2) hide show
  1. package/dist/main.js +2 -60
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -5070,21 +5070,7 @@ var MessageBroadcasterImpl = class {
5070
5070
  * connected to the tunnel and will re-authenticate soon.
5071
5071
  */
5072
5072
  broadcastToAll(message) {
5073
- const clients = this.deps.clientRegistry.getAll();
5074
- const authenticatedCount = clients.filter((c) => c.isAuthenticated).length;
5075
- this.logger.info(
5076
- {
5077
- totalClients: clients.length,
5078
- authenticatedClients: authenticatedCount,
5079
- messagePreview: message.slice(0, 100)
5080
- },
5081
- "broadcastToAll called"
5082
- );
5083
- const sent = this.deps.tunnelClient.send(message);
5084
- this.logger.info(
5085
- { sent, authenticatedClients: authenticatedCount },
5086
- "Broadcast to all - message sent to tunnel"
5087
- );
5073
+ this.deps.tunnelClient.send(message);
5088
5074
  }
5089
5075
  /**
5090
5076
  * Broadcasts a message to all clients subscribed to a session.
@@ -5096,15 +5082,7 @@ var MessageBroadcasterImpl = class {
5096
5082
  (c) => c.isAuthenticated
5097
5083
  ).length;
5098
5084
  if (authenticatedCount > 0) {
5099
- const sent = this.deps.tunnelClient.send(message);
5100
- this.logger.debug(
5101
- {
5102
- sessionId: sessionId.value,
5103
- sent,
5104
- authenticatedSubscribers: authenticatedCount
5105
- },
5106
- "Broadcast to session"
5107
- );
5085
+ this.deps.tunnelClient.send(message);
5108
5086
  }
5109
5087
  }
5110
5088
  /**
@@ -5118,17 +5096,6 @@ var MessageBroadcasterImpl = class {
5118
5096
  * but not yet re-authenticated with the workstation
5119
5097
  */
5120
5098
  sendToClient(deviceId, message) {
5121
- const device = new DeviceId(deviceId);
5122
- const client = this.deps.clientRegistry.getByDeviceId(device);
5123
- this.logger.info(
5124
- {
5125
- deviceId,
5126
- clientInRegistry: !!client,
5127
- clientAuthenticated: client?.isAuthenticated,
5128
- messagePreview: message.slice(0, 100)
5129
- },
5130
- "sendToClient - sending via tunnel (supports HTTP polling clients)"
5131
- );
5132
5099
  return this.deps.tunnelClient.sendToDevice(deviceId, message);
5133
5100
  }
5134
5101
  /**
@@ -5141,37 +5108,12 @@ var MessageBroadcasterImpl = class {
5141
5108
  const authenticatedSubscribers = subscribers.filter(
5142
5109
  (c) => c.isAuthenticated
5143
5110
  );
5144
- const allClients = this.deps.clientRegistry.getAll();
5145
- this.logger.info(
5146
- {
5147
- sessionId,
5148
- totalClients: allClients.length,
5149
- totalSubscribers: subscribers.length,
5150
- authenticatedSubscribers: authenticatedSubscribers.length,
5151
- clientsInfo: allClients.map((c) => ({
5152
- deviceId: c.deviceId.value,
5153
- isAuthenticated: c.isAuthenticated,
5154
- isConnected: c.isConnected,
5155
- status: c.status,
5156
- subscriptions: c.getSubscriptions()
5157
- }))
5158
- },
5159
- "broadcastToSubscribers - client state"
5160
- );
5161
5111
  if (authenticatedSubscribers.length === 0) {
5162
- this.logger.warn(
5163
- { sessionId, totalClients: allClients.length },
5164
- "broadcastToSubscribers - no authenticated subscribers found"
5165
- );
5166
5112
  return;
5167
5113
  }
5168
5114
  for (const client of authenticatedSubscribers) {
5169
5115
  this.deps.tunnelClient.sendToDevice(client.deviceId.value, message);
5170
5116
  }
5171
- this.logger.debug(
5172
- { sessionId, subscriberCount: authenticatedSubscribers.length },
5173
- "Broadcast to subscribers - messages sent"
5174
- );
5175
5117
  }
5176
5118
  };
5177
5119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiflis-io/tiflis-code-workstation",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "description": "Workstation server for tiflis-code - manages agent sessions and terminal access",
5
5
  "author": "Roman Barinov <rbarinov@gmail.com>",
6
6
  "license": "FSL-1.1-NC",