@scalequality/cli 0.4.33 → 0.4.34

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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "sdkVersion": "0.3.281",
3
- "sha256": "9df603c14a8411fc0bd67b9845763888a736d40d91718e584e5cfcc692c0aaf1",
4
- "sourceCommit": "ef04cd0080b6e3a35119bf03ac6128cd671b0f5d"
3
+ "sha256": "b2ccc4428dd29a54024fb75482ee6279b1a58a6b4d94508501ea7a72e900ac95",
4
+ "sourceCommit": "9a236ac040cb6760f2bdd944a18f6f133383aaf8"
5
5
  }
package/dist/connect.cjs CHANGED
@@ -7882,6 +7882,7 @@ var MAX_INPUT = 64 * 1024;
7882
7882
  var MAX_TOKENS = 64;
7883
7883
  var MAX_PENDING = 1024 * 1024;
7884
7884
  var CATCH_UP_MS = 250;
7885
+ var PING_MS = 3e4;
7885
7886
  var STOP_WAIT_MS = 2e3;
7886
7887
  function loadPty() {
7887
7888
  try {
@@ -7927,6 +7928,7 @@ var TerminalHost = class {
7927
7928
  server = null;
7928
7929
  wss = null;
7929
7930
  port = null;
7931
+ beat = null;
7930
7932
  tokens = /* @__PURE__ */ new Set();
7931
7933
  tabs = /* @__PURE__ */ new Map();
7932
7934
  /** When the person last typed in any tab (the cloud counts it as activity, so the machine does not idle away). */
@@ -7951,6 +7953,15 @@ var TerminalHost = class {
7951
7953
  const wss = new import_websocket_server.default({ server, maxPayload: 1024 * 1024, verifyClient: (info) => this.originAllowed(info.origin) });
7952
7954
  wss.on("connection", (socket) => this.accept(socket));
7953
7955
  this.wss = wss;
7956
+ this.beat = setInterval(() => {
7957
+ for (const client of wss.clients) {
7958
+ try {
7959
+ client.ping();
7960
+ } catch {
7961
+ }
7962
+ }
7963
+ }, this.o.pingMs ?? PING_MS);
7964
+ this.beat.unref?.();
7954
7965
  await new Promise((resolve8, reject) => {
7955
7966
  server.once("error", reject);
7956
7967
  server.listen(this.o.port, this.o.bind, () => {
@@ -8136,6 +8147,10 @@ var TerminalHost = class {
8136
8147
  /** Ends every shell and stops listening (the engine stops). */
8137
8148
  async stop() {
8138
8149
  for (const id of [...this.tabs.keys()]) this.end(id);
8150
+ if (this.beat) {
8151
+ clearInterval(this.beat);
8152
+ this.beat = null;
8153
+ }
8139
8154
  const server = this.server, wss = this.wss;
8140
8155
  this.server = null;
8141
8156
  this.wss = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalequality/cli",
3
- "version": "0.4.33",
3
+ "version": "0.4.34",
4
4
  "description": "ScaleQuality CLI. Connect your computer to the ScaleQuality AI Workspace (`scalequality login`), run its coding engine in any folder of your computer, and import your Claude Code and Codex conversations.",
5
5
  "type": "module",
6
6
  "bin": {