@naylence/runtime 0.3.5-test.937 → 0.3.5-test.938

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.
@@ -98,12 +98,12 @@ installProcessEnvShim();
98
98
  // --- END ENV SHIM ---
99
99
 
100
100
  // This file is auto-generated during build - do not edit manually
101
- // Generated from package.json version: 0.3.5-test.937
101
+ // Generated from package.json version: 0.3.5-test.938
102
102
  /**
103
103
  * The package version, injected at build time.
104
104
  * @internal
105
105
  */
106
- const VERSION = '0.3.5-test.937';
106
+ const VERSION = '0.3.5-test.938';
107
107
 
108
108
  /**
109
109
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -10476,6 +10476,7 @@ class UpstreamSessionManager extends TaskSpawner {
10476
10476
  this.lastHeartbeatAckTime = null;
10477
10477
  this.lastSeenEpoch = null;
10478
10478
  this.hadSuccessfulAttach = false;
10479
+ this.lastConnectorState = null;
10479
10480
  this.connectEpoch = 0;
10480
10481
  const options = normalizeOptions$k(optionsInput);
10481
10482
  this.node = options.node;
@@ -10900,15 +10901,26 @@ class UpstreamSessionManager extends TaskSpawner {
10900
10901
  if (stopEvt.isSet() || signal?.aborted) {
10901
10902
  break;
10902
10903
  }
10904
+ const currentState = connector.state;
10905
+ const previousState = this.lastConnectorState;
10906
+ this.lastConnectorState = currentState;
10903
10907
  // Skip heartbeat if connector is paused (e.g., tab is hidden)
10904
10908
  // Keep ack time current so we don't timeout immediately after resuming
10905
- if (connector.state === core.ConnectorState.PAUSED) {
10909
+ if (currentState === core.ConnectorState.PAUSED) {
10906
10910
  logger$Z.debug('skipping_heartbeat_connector_paused', {
10907
- connector_state: connector.state,
10911
+ connector_state: currentState,
10908
10912
  });
10909
10913
  this.lastHeartbeatAckTime = Date.now();
10910
10914
  continue;
10911
10915
  }
10916
+ // Reset ack time if just resumed from pause (prevents immediate timeout)
10917
+ if (previousState === core.ConnectorState.PAUSED && currentState === core.ConnectorState.STARTED) {
10918
+ logger$Z.debug('connector_just_resumed_resetting_ack_time', {
10919
+ previous_state: previousState,
10920
+ current_state: currentState,
10921
+ });
10922
+ this.lastHeartbeatAckTime = Date.now();
10923
+ }
10912
10924
  const envelope = await this.makeHeartbeatEnvelope();
10913
10925
  logger$Z.debug('sending_heartbeat', {
10914
10926
  hb_corr_id: envelope.corrId,
@@ -96,12 +96,12 @@ installProcessEnvShim();
96
96
  // --- END ENV SHIM ---
97
97
 
98
98
  // This file is auto-generated during build - do not edit manually
99
- // Generated from package.json version: 0.3.5-test.937
99
+ // Generated from package.json version: 0.3.5-test.938
100
100
  /**
101
101
  * The package version, injected at build time.
102
102
  * @internal
103
103
  */
104
- const VERSION = '0.3.5-test.937';
104
+ const VERSION = '0.3.5-test.938';
105
105
 
106
106
  /**
107
107
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -10474,6 +10474,7 @@ class UpstreamSessionManager extends TaskSpawner {
10474
10474
  this.lastHeartbeatAckTime = null;
10475
10475
  this.lastSeenEpoch = null;
10476
10476
  this.hadSuccessfulAttach = false;
10477
+ this.lastConnectorState = null;
10477
10478
  this.connectEpoch = 0;
10478
10479
  const options = normalizeOptions$k(optionsInput);
10479
10480
  this.node = options.node;
@@ -10898,15 +10899,26 @@ class UpstreamSessionManager extends TaskSpawner {
10898
10899
  if (stopEvt.isSet() || signal?.aborted) {
10899
10900
  break;
10900
10901
  }
10902
+ const currentState = connector.state;
10903
+ const previousState = this.lastConnectorState;
10904
+ this.lastConnectorState = currentState;
10901
10905
  // Skip heartbeat if connector is paused (e.g., tab is hidden)
10902
10906
  // Keep ack time current so we don't timeout immediately after resuming
10903
- if (connector.state === ConnectorState.PAUSED) {
10907
+ if (currentState === ConnectorState.PAUSED) {
10904
10908
  logger$Z.debug('skipping_heartbeat_connector_paused', {
10905
- connector_state: connector.state,
10909
+ connector_state: currentState,
10906
10910
  });
10907
10911
  this.lastHeartbeatAckTime = Date.now();
10908
10912
  continue;
10909
10913
  }
10914
+ // Reset ack time if just resumed from pause (prevents immediate timeout)
10915
+ if (previousState === ConnectorState.PAUSED && currentState === ConnectorState.STARTED) {
10916
+ logger$Z.debug('connector_just_resumed_resetting_ack_time', {
10917
+ previous_state: previousState,
10918
+ current_state: currentState,
10919
+ });
10920
+ this.lastHeartbeatAckTime = Date.now();
10921
+ }
10910
10922
  const envelope = await this.makeHeartbeatEnvelope();
10911
10923
  logger$Z.debug('sending_heartbeat', {
10912
10924
  hb_corr_id: envelope.corrId,
@@ -112,6 +112,7 @@ class UpstreamSessionManager extends task_spawner_js_1.TaskSpawner {
112
112
  this.lastHeartbeatAckTime = null;
113
113
  this.lastSeenEpoch = null;
114
114
  this.hadSuccessfulAttach = false;
115
+ this.lastConnectorState = null;
115
116
  this.connectEpoch = 0;
116
117
  const options = normalizeOptions(optionsInput);
117
118
  this.node = options.node;
@@ -536,15 +537,26 @@ class UpstreamSessionManager extends task_spawner_js_1.TaskSpawner {
536
537
  if (stopEvt.isSet() || signal?.aborted) {
537
538
  break;
538
539
  }
540
+ const currentState = connector.state;
541
+ const previousState = this.lastConnectorState;
542
+ this.lastConnectorState = currentState;
539
543
  // Skip heartbeat if connector is paused (e.g., tab is hidden)
540
544
  // Keep ack time current so we don't timeout immediately after resuming
541
- if (connector.state === core_1.ConnectorState.PAUSED) {
545
+ if (currentState === core_1.ConnectorState.PAUSED) {
542
546
  logger.debug('skipping_heartbeat_connector_paused', {
543
- connector_state: connector.state,
547
+ connector_state: currentState,
544
548
  });
545
549
  this.lastHeartbeatAckTime = Date.now();
546
550
  continue;
547
551
  }
552
+ // Reset ack time if just resumed from pause (prevents immediate timeout)
553
+ if (previousState === core_1.ConnectorState.PAUSED && currentState === core_1.ConnectorState.STARTED) {
554
+ logger.debug('connector_just_resumed_resetting_ack_time', {
555
+ previous_state: previousState,
556
+ current_state: currentState,
557
+ });
558
+ this.lastHeartbeatAckTime = Date.now();
559
+ }
548
560
  const envelope = await this.makeHeartbeatEnvelope();
549
561
  logger.debug('sending_heartbeat', {
550
562
  hb_corr_id: envelope.corrId,
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  // This file is auto-generated during build - do not edit manually
3
- // Generated from package.json version: 0.3.5-test.937
3
+ // Generated from package.json version: 0.3.5-test.938
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.VERSION = void 0;
6
6
  /**
7
7
  * The package version, injected at build time.
8
8
  * @internal
9
9
  */
10
- exports.VERSION = '0.3.5-test.937';
10
+ exports.VERSION = '0.3.5-test.938';
@@ -109,6 +109,7 @@ export class UpstreamSessionManager extends TaskSpawner {
109
109
  this.lastHeartbeatAckTime = null;
110
110
  this.lastSeenEpoch = null;
111
111
  this.hadSuccessfulAttach = false;
112
+ this.lastConnectorState = null;
112
113
  this.connectEpoch = 0;
113
114
  const options = normalizeOptions(optionsInput);
114
115
  this.node = options.node;
@@ -533,15 +534,26 @@ export class UpstreamSessionManager extends TaskSpawner {
533
534
  if (stopEvt.isSet() || signal?.aborted) {
534
535
  break;
535
536
  }
537
+ const currentState = connector.state;
538
+ const previousState = this.lastConnectorState;
539
+ this.lastConnectorState = currentState;
536
540
  // Skip heartbeat if connector is paused (e.g., tab is hidden)
537
541
  // Keep ack time current so we don't timeout immediately after resuming
538
- if (connector.state === ConnectorState.PAUSED) {
542
+ if (currentState === ConnectorState.PAUSED) {
539
543
  logger.debug('skipping_heartbeat_connector_paused', {
540
- connector_state: connector.state,
544
+ connector_state: currentState,
541
545
  });
542
546
  this.lastHeartbeatAckTime = Date.now();
543
547
  continue;
544
548
  }
549
+ // Reset ack time if just resumed from pause (prevents immediate timeout)
550
+ if (previousState === ConnectorState.PAUSED && currentState === ConnectorState.STARTED) {
551
+ logger.debug('connector_just_resumed_resetting_ack_time', {
552
+ previous_state: previousState,
553
+ current_state: currentState,
554
+ });
555
+ this.lastHeartbeatAckTime = Date.now();
556
+ }
545
557
  const envelope = await this.makeHeartbeatEnvelope();
546
558
  logger.debug('sending_heartbeat', {
547
559
  hb_corr_id: envelope.corrId,
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated during build - do not edit manually
2
- // Generated from package.json version: 0.3.5-test.937
2
+ // Generated from package.json version: 0.3.5-test.938
3
3
  /**
4
4
  * The package version, injected at build time.
5
5
  * @internal
6
6
  */
7
- export const VERSION = '0.3.5-test.937';
7
+ export const VERSION = '0.3.5-test.938';
@@ -14,12 +14,12 @@ var fastify = require('fastify');
14
14
  var websocketPlugin = require('@fastify/websocket');
15
15
 
16
16
  // This file is auto-generated during build - do not edit manually
17
- // Generated from package.json version: 0.3.5-test.937
17
+ // Generated from package.json version: 0.3.5-test.938
18
18
  /**
19
19
  * The package version, injected at build time.
20
20
  * @internal
21
21
  */
22
- const VERSION = '0.3.5-test.937';
22
+ const VERSION = '0.3.5-test.938';
23
23
 
24
24
  /**
25
25
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -10392,6 +10392,7 @@ class UpstreamSessionManager extends TaskSpawner {
10392
10392
  this.lastHeartbeatAckTime = null;
10393
10393
  this.lastSeenEpoch = null;
10394
10394
  this.hadSuccessfulAttach = false;
10395
+ this.lastConnectorState = null;
10395
10396
  this.connectEpoch = 0;
10396
10397
  const options = normalizeOptions$k(optionsInput);
10397
10398
  this.node = options.node;
@@ -10816,15 +10817,26 @@ class UpstreamSessionManager extends TaskSpawner {
10816
10817
  if (stopEvt.isSet() || signal?.aborted) {
10817
10818
  break;
10818
10819
  }
10820
+ const currentState = connector.state;
10821
+ const previousState = this.lastConnectorState;
10822
+ this.lastConnectorState = currentState;
10819
10823
  // Skip heartbeat if connector is paused (e.g., tab is hidden)
10820
10824
  // Keep ack time current so we don't timeout immediately after resuming
10821
- if (connector.state === core.ConnectorState.PAUSED) {
10825
+ if (currentState === core.ConnectorState.PAUSED) {
10822
10826
  logger$Z.debug('skipping_heartbeat_connector_paused', {
10823
- connector_state: connector.state,
10827
+ connector_state: currentState,
10824
10828
  });
10825
10829
  this.lastHeartbeatAckTime = Date.now();
10826
10830
  continue;
10827
10831
  }
10832
+ // Reset ack time if just resumed from pause (prevents immediate timeout)
10833
+ if (previousState === core.ConnectorState.PAUSED && currentState === core.ConnectorState.STARTED) {
10834
+ logger$Z.debug('connector_just_resumed_resetting_ack_time', {
10835
+ previous_state: previousState,
10836
+ current_state: currentState,
10837
+ });
10838
+ this.lastHeartbeatAckTime = Date.now();
10839
+ }
10828
10840
  const envelope = await this.makeHeartbeatEnvelope();
10829
10841
  logger$Z.debug('sending_heartbeat', {
10830
10842
  hb_corr_id: envelope.corrId,
@@ -13,12 +13,12 @@ import fastify from 'fastify';
13
13
  import websocketPlugin from '@fastify/websocket';
14
14
 
15
15
  // This file is auto-generated during build - do not edit manually
16
- // Generated from package.json version: 0.3.5-test.937
16
+ // Generated from package.json version: 0.3.5-test.938
17
17
  /**
18
18
  * The package version, injected at build time.
19
19
  * @internal
20
20
  */
21
- const VERSION = '0.3.5-test.937';
21
+ const VERSION = '0.3.5-test.938';
22
22
 
23
23
  /**
24
24
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -10391,6 +10391,7 @@ class UpstreamSessionManager extends TaskSpawner {
10391
10391
  this.lastHeartbeatAckTime = null;
10392
10392
  this.lastSeenEpoch = null;
10393
10393
  this.hadSuccessfulAttach = false;
10394
+ this.lastConnectorState = null;
10394
10395
  this.connectEpoch = 0;
10395
10396
  const options = normalizeOptions$k(optionsInput);
10396
10397
  this.node = options.node;
@@ -10815,15 +10816,26 @@ class UpstreamSessionManager extends TaskSpawner {
10815
10816
  if (stopEvt.isSet() || signal?.aborted) {
10816
10817
  break;
10817
10818
  }
10819
+ const currentState = connector.state;
10820
+ const previousState = this.lastConnectorState;
10821
+ this.lastConnectorState = currentState;
10818
10822
  // Skip heartbeat if connector is paused (e.g., tab is hidden)
10819
10823
  // Keep ack time current so we don't timeout immediately after resuming
10820
- if (connector.state === ConnectorState.PAUSED) {
10824
+ if (currentState === ConnectorState.PAUSED) {
10821
10825
  logger$Z.debug('skipping_heartbeat_connector_paused', {
10822
- connector_state: connector.state,
10826
+ connector_state: currentState,
10823
10827
  });
10824
10828
  this.lastHeartbeatAckTime = Date.now();
10825
10829
  continue;
10826
10830
  }
10831
+ // Reset ack time if just resumed from pause (prevents immediate timeout)
10832
+ if (previousState === ConnectorState.PAUSED && currentState === ConnectorState.STARTED) {
10833
+ logger$Z.debug('connector_just_resumed_resetting_ack_time', {
10834
+ previous_state: previousState,
10835
+ current_state: currentState,
10836
+ });
10837
+ this.lastHeartbeatAckTime = Date.now();
10838
+ }
10827
10839
  const envelope = await this.makeHeartbeatEnvelope();
10828
10840
  logger$Z.debug('sending_heartbeat', {
10829
10841
  hb_corr_id: envelope.corrId,
@@ -5478,12 +5478,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5478
5478
  }
5479
5479
 
5480
5480
  // This file is auto-generated during build - do not edit manually
5481
- // Generated from package.json version: 0.3.5-test.937
5481
+ // Generated from package.json version: 0.3.5-test.938
5482
5482
  /**
5483
5483
  * The package version, injected at build time.
5484
5484
  * @internal
5485
5485
  */
5486
- const VERSION = '0.3.5-test.937';
5486
+ const VERSION = '0.3.5-test.938';
5487
5487
 
5488
5488
  /**
5489
5489
  * Fame errors module - Fame protocol specific error classes
@@ -12084,6 +12084,7 @@ class UpstreamSessionManager extends TaskSpawner {
12084
12084
  this.lastHeartbeatAckTime = null;
12085
12085
  this.lastSeenEpoch = null;
12086
12086
  this.hadSuccessfulAttach = false;
12087
+ this.lastConnectorState = null;
12087
12088
  this.connectEpoch = 0;
12088
12089
  const options = normalizeOptions$k(optionsInput);
12089
12090
  this.node = options.node;
@@ -12508,15 +12509,26 @@ class UpstreamSessionManager extends TaskSpawner {
12508
12509
  if (stopEvt.isSet() || signal?.aborted) {
12509
12510
  break;
12510
12511
  }
12512
+ const currentState = connector.state;
12513
+ const previousState = this.lastConnectorState;
12514
+ this.lastConnectorState = currentState;
12511
12515
  // Skip heartbeat if connector is paused (e.g., tab is hidden)
12512
12516
  // Keep ack time current so we don't timeout immediately after resuming
12513
- if (connector.state === core.ConnectorState.PAUSED) {
12517
+ if (currentState === core.ConnectorState.PAUSED) {
12514
12518
  logger$$.debug('skipping_heartbeat_connector_paused', {
12515
- connector_state: connector.state,
12519
+ connector_state: currentState,
12516
12520
  });
12517
12521
  this.lastHeartbeatAckTime = Date.now();
12518
12522
  continue;
12519
12523
  }
12524
+ // Reset ack time if just resumed from pause (prevents immediate timeout)
12525
+ if (previousState === core.ConnectorState.PAUSED && currentState === core.ConnectorState.STARTED) {
12526
+ logger$$.debug('connector_just_resumed_resetting_ack_time', {
12527
+ previous_state: previousState,
12528
+ current_state: currentState,
12529
+ });
12530
+ this.lastHeartbeatAckTime = Date.now();
12531
+ }
12520
12532
  const envelope = await this.makeHeartbeatEnvelope();
12521
12533
  logger$$.debug('sending_heartbeat', {
12522
12534
  hb_corr_id: envelope.corrId,
@@ -5477,12 +5477,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5477
5477
  }
5478
5478
 
5479
5479
  // This file is auto-generated during build - do not edit manually
5480
- // Generated from package.json version: 0.3.5-test.937
5480
+ // Generated from package.json version: 0.3.5-test.938
5481
5481
  /**
5482
5482
  * The package version, injected at build time.
5483
5483
  * @internal
5484
5484
  */
5485
- const VERSION = '0.3.5-test.937';
5485
+ const VERSION = '0.3.5-test.938';
5486
5486
 
5487
5487
  /**
5488
5488
  * Fame errors module - Fame protocol specific error classes
@@ -12083,6 +12083,7 @@ class UpstreamSessionManager extends TaskSpawner {
12083
12083
  this.lastHeartbeatAckTime = null;
12084
12084
  this.lastSeenEpoch = null;
12085
12085
  this.hadSuccessfulAttach = false;
12086
+ this.lastConnectorState = null;
12086
12087
  this.connectEpoch = 0;
12087
12088
  const options = normalizeOptions$k(optionsInput);
12088
12089
  this.node = options.node;
@@ -12507,15 +12508,26 @@ class UpstreamSessionManager extends TaskSpawner {
12507
12508
  if (stopEvt.isSet() || signal?.aborted) {
12508
12509
  break;
12509
12510
  }
12511
+ const currentState = connector.state;
12512
+ const previousState = this.lastConnectorState;
12513
+ this.lastConnectorState = currentState;
12510
12514
  // Skip heartbeat if connector is paused (e.g., tab is hidden)
12511
12515
  // Keep ack time current so we don't timeout immediately after resuming
12512
- if (connector.state === ConnectorState.PAUSED) {
12516
+ if (currentState === ConnectorState.PAUSED) {
12513
12517
  logger$$.debug('skipping_heartbeat_connector_paused', {
12514
- connector_state: connector.state,
12518
+ connector_state: currentState,
12515
12519
  });
12516
12520
  this.lastHeartbeatAckTime = Date.now();
12517
12521
  continue;
12518
12522
  }
12523
+ // Reset ack time if just resumed from pause (prevents immediate timeout)
12524
+ if (previousState === ConnectorState.PAUSED && currentState === ConnectorState.STARTED) {
12525
+ logger$$.debug('connector_just_resumed_resetting_ack_time', {
12526
+ previous_state: previousState,
12527
+ current_state: currentState,
12528
+ });
12529
+ this.lastHeartbeatAckTime = Date.now();
12530
+ }
12519
12531
  const envelope = await this.makeHeartbeatEnvelope();
12520
12532
  logger$$.debug('sending_heartbeat', {
12521
12533
  hb_corr_id: envelope.corrId,
@@ -65,6 +65,7 @@ export declare class UpstreamSessionManager extends TaskSpawner implements Sessi
65
65
  private lastHeartbeatAckTime;
66
66
  private lastSeenEpoch;
67
67
  private hadSuccessfulAttach;
68
+ private lastConnectorState;
68
69
  private connectEpoch;
69
70
  constructor(optionsInput: UpstreamSessionManagerOptionsInput);
70
71
  get systemId(): string | null;
@@ -2,4 +2,4 @@
2
2
  * The package version, injected at build time.
3
3
  * @internal
4
4
  */
5
- export declare const VERSION = "0.3.5-test.937";
5
+ export declare const VERSION = "0.3.5-test.938";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naylence/runtime",
3
- "version": "0.3.5-test.937",
3
+ "version": "0.3.5-test.938",
4
4
  "type": "module",
5
5
  "description": "Naylence Runtime - Complete TypeScript runtime",
6
6
  "author": "Naylence Dev <naylencedev@gmail.com>",