@agentconnect.md/computer 2.8.0-rc.15 → 2.8.0-rc.19

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.
@@ -29273,9 +29273,9 @@ var require_permessage_deflate = __commonJS({
29273
29273
  * @private
29274
29274
  */
29275
29275
  _decompress(data, fin, callback) {
29276
- const endpoint = this._isServer ? "client" : "server";
29276
+ const endpoint2 = this._isServer ? "client" : "server";
29277
29277
  if (!this._inflate) {
29278
- const key = `${endpoint}_max_window_bits`;
29278
+ const key = `${endpoint2}_max_window_bits`;
29279
29279
  const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
29280
29280
  this._inflate = zlib.createInflateRaw({
29281
29281
  ...this._options.zlibInflateOptions,
@@ -29308,7 +29308,7 @@ var require_permessage_deflate = __commonJS({
29308
29308
  } else {
29309
29309
  this._inflate[kTotalLength] = 0;
29310
29310
  this._inflate[kBuffers] = [];
29311
- if (fin && this.params[`${endpoint}_no_context_takeover`]) {
29311
+ if (fin && this.params[`${endpoint2}_no_context_takeover`]) {
29312
29312
  this._inflate.reset();
29313
29313
  }
29314
29314
  }
@@ -29324,9 +29324,9 @@ var require_permessage_deflate = __commonJS({
29324
29324
  * @private
29325
29325
  */
29326
29326
  _compress(data, fin, callback) {
29327
- const endpoint = this._isServer ? "server" : "client";
29327
+ const endpoint2 = this._isServer ? "server" : "client";
29328
29328
  if (!this._deflate) {
29329
- const key = `${endpoint}_max_window_bits`;
29329
+ const key = `${endpoint2}_max_window_bits`;
29330
29330
  const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
29331
29331
  this._deflate = zlib.createDeflateRaw({
29332
29332
  ...this._options.zlibDeflateOptions,
@@ -29352,7 +29352,7 @@ var require_permessage_deflate = __commonJS({
29352
29352
  this._deflate[kCallback] = null;
29353
29353
  this._deflate[kTotalLength] = 0;
29354
29354
  this._deflate[kBuffers] = [];
29355
- if (fin && this.params[`${endpoint}_no_context_takeover`]) {
29355
+ if (fin && this.params[`${endpoint2}_no_context_takeover`]) {
29356
29356
  this._deflate.reset();
29357
29357
  }
29358
29358
  callback(null, data2);
@@ -86706,7 +86706,7 @@ var serviceEntry = () => managedEntry() ?? resolve(process.argv[1]);
86706
86706
 
86707
86707
  // src/version.ts
86708
86708
  init_define_AGENTCONNECT_COMPUTER_WINDOWS_SOURCES();
86709
- var COMPUTER_DAEMON_VERSION = true ? "2.8.0-rc.15" : JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
86709
+ var COMPUTER_DAEMON_VERSION = true ? "2.8.0-rc.19" : JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
86710
86710
 
86711
86711
  // src/http-server.ts
86712
86712
  var CONTROL_HEADER = "x-agentconnect-computer";
@@ -97445,9 +97445,9 @@ var TurnProtocol = class _TurnProtocol {
97445
97445
  }
97446
97446
  selectServerEndpoint() {
97447
97447
  this.serverEndpointSelection ??= this.resolveServerEndpoint().then(
97448
- (endpoint) => {
97449
- this.pinnedServerEndpoint = endpoint;
97450
- return endpoint;
97448
+ (endpoint2) => {
97449
+ this.pinnedServerEndpoint = endpoint2;
97450
+ return endpoint2;
97451
97451
  },
97452
97452
  (error62) => {
97453
97453
  this.serverEndpointSelection = void 0;
@@ -109562,6 +109562,7 @@ var RtcSessions = class {
109562
109562
  });
109563
109563
  pc.connectionStateChange.subscribe((state) => {
109564
109564
  if (state === "connected") {
109565
+ session.connected = true;
109565
109566
  session.lastSeen = Date.now();
109566
109567
  this.options.log(`viewer ${client()}: WebRTC connected (${transport}${selectedPairType(pc)})`);
109567
109568
  session.unsubscribe ??= this.options.stream.subscribe((packet) => track.writeRtp(packet));
@@ -109639,6 +109640,11 @@ var RtcSessions = class {
109639
109640
  if (!session) return;
109640
109641
  this.sessions.delete(id);
109641
109642
  session.unsubscribe?.();
109643
+ if (session.transport !== "direct" && !session.connected) {
109644
+ this.options.log(
109645
+ `viewer ${session.principal.client}: ${session.transport} never connected: ${iceReport(session.pc, session.remoteCandidates ?? 0)}`
109646
+ );
109647
+ }
109642
109648
  void session.pc.close().catch(() => void 0);
109643
109649
  this.options.log(`viewer ${session.principal.client}: WebRTC session closed`);
109644
109650
  }
@@ -109657,6 +109663,18 @@ function selectedPairType(pc) {
109657
109663
  const pair = pc.iceTransports[0]?.connection.nominated;
109658
109664
  return pair ? `, ${pair.localCandidate.type} \u2192 ${pair.remoteCandidate.type}` : "";
109659
109665
  }
109666
+ var PAIR_STATES = ["frozen", "waiting", "in-progress", "succeeded", "failed"];
109667
+ var endpoint = (c) => `${c.type} ${c.host}:${c.port}`;
109668
+ function iceReport(pc, trickled) {
109669
+ const connection = pc.iceTransports[0]?.connection;
109670
+ if (!connection) return "no ICE transport";
109671
+ const local = connection.localCandidates.map(endpoint).join(", ") || "none";
109672
+ const remote = connection.remoteCandidates.map(endpoint).join(", ") || "none";
109673
+ const pairs = connection.checkList.map(
109674
+ (pair) => `${pair.localCandidate.type} \u2192 ${endpoint(pair.remoteCandidate)} ${PAIR_STATES[pair.state] ?? pair.state} ${pair.requestsSent}/${pair.responsesReceived}/${pair.requestsReceived}`
109675
+ ).join(", ") || "none";
109676
+ return `ICE ${connection.state}; local ${local}; remote ${remote} (${trickled} trickled); pairs sent/answered/received ${pairs}`;
109677
+ }
109660
109678
  var onlyCandidatesFor = (sdp, address) => sdp.split("\r\n").filter((line) => !line.startsWith("a=candidate:") || line.split(" ")[4] === address).join("\r\n");
109661
109679
 
109662
109680
  // src/stream/screen-stream.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentconnect.md/computer",
3
- "version": "2.8.0-rc.15",
3
+ "version": "2.8.0-rc.19",
4
4
  "description": "AgentConnect computer daemon: drives a desktop through Cua Driver and serves the computer_* tools over MCP; installed and upgraded by agentconnect computer",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {