instar 1.3.142 → 1.3.144

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 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwvDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAqvPtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoSH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwvDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAyvPtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -8285,7 +8285,7 @@ export async function startServer(options) {
8285
8285
  // inbound-message chokepoint (/internal/telegram-forward).
8286
8286
  const { AgentActivityState } = await import('../monitoring/AgentActivityState.js');
8287
8287
  const agentActivityState = new AgentActivityState();
8288
- const { SleepController, sleepAuditSink } = await import('../monitoring/SleepController.js');
8288
+ const { SleepController, sleepAuditSink, sleepRequestWriter } = await import('../monitoring/SleepController.js');
8289
8289
  const _sleepCfg = config.monitoring?.agentSleep;
8290
8290
  const sleepController = new SleepController({
8291
8291
  sample: () => {
@@ -8298,14 +8298,18 @@ export async function startServer(options) {
8298
8298
  // Lease guard: only relevant when multi-machine coordination is active.
8299
8299
  leaseActive: coordinator.enabled,
8300
8300
  holdsLease: coordinator.enabled ? coordinator.holdsLease() : false,
8301
- // In-flight: an inbound message currently being handled. (The relay/forward
8302
- // in-flight + scheduler-wake signals are wired with the stop mechanism in
8303
- // the next slice — this slice is dry-run, so it never acts on them.)
8301
+ // In-flight: an inbound message currently being handled. (A fuller
8302
+ // relay/forward-queue in-flight signal + the scheduler next-fire wake are
8303
+ // tracked refinements; nextScheduledJobAt stays null until scheduler-wake
8304
+ // lands, so the scheduled-job guard is conservative-off for now.)
8304
8305
  inflightWork: (currentInboundByTopic?.size ?? 0) > 0,
8305
8306
  nextScheduledJobAt: null,
8306
8307
  };
8307
8308
  },
8308
8309
  audit: sleepAuditSink(config.stateDir),
8310
+ // Live-mode only (enabled && !dryRun): writes state/sleep-requested.json
8311
+ // for the ServerSupervisor to honor. Dark/dry-run never invokes this.
8312
+ requestSleep: sleepRequestWriter(config.stateDir),
8309
8313
  }, {
8310
8314
  enabled: _sleepCfg?.enabled ?? false,
8311
8315
  dryRun: _sleepCfg?.dryRun ?? true,