@sjawhar/pi-envoy 16.12.0 → 16.13.0

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.
package/README.md CHANGED
@@ -162,8 +162,8 @@ omp plugin install @sjawhar/pi-envoy
162
162
  ```
163
163
 
164
164
  A session that had the pre-split package installed (the one package that carried both entries
165
- until 7.x) uninstalls it and installs this one once; the `CHANGELOG.md` entry that renames the
166
- package `@sjawhar/pi-envoy` gives the two commands. A Legion deployment installs
165
+ until 7.x) uninstalls it and installs this one once; `CHANGELOG.md`, this package's history, gives
166
+ the two commands in the entry that renamed the package. A Legion deployment installs
167
167
  `@sjawhar/pi-legion` as well (`packages/pi-legion/README.md`); the daemon's boot gate refuses a
168
168
  pane that still loads the pre-split package beside the new ones.
169
169
 
@@ -189,8 +189,9 @@ for `omp.extensions` (only `omp.skills` ships as committed, since `dist/skills`
189
189
  a repo checkout after the prepack and the published tarball), while the committed manifest keeps
190
190
  the TypeScript entry for repo checkouts. In `.github/workflows/release.yaml`, the `pi_envoy_build`
191
191
  job rewrites the manifest before `bun pm pack` and uploads the tarball (its tree is discarded,
192
- nothing is restored); the `publish` job publishes that tarball and commits the version bump to the
193
- committed manifest, touching `.version` alone.
192
+ nothing is restored); the `publish` job publishes that tarball, and nothing commits a version: the
193
+ committed manifest's `.version` stays where it last was, and the `pi-envoy-v` tag the release makes
194
+ is what records the release, with this release's changelog entries in its GitHub release notes.
194
195
  Packing with the committed source manifest is refused by the prepack, because such a tarball would
195
196
  point OMP at an extension file it does not contain.
196
197
 
package/dist/dispatch.js CHANGED
@@ -16022,6 +16022,11 @@ var EnvelopeSchema = object({
16022
16022
  });
16023
16023
  var MINTED_DEDUPE_KEY_PATTERN = "^(?:envoy\\.role\\.forward\\.)?(?:publish|agent\\.[^.]+)\\.(?:[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$";
16024
16024
  var mintedDedupeKey = new RegExp(MINTED_DEDUPE_KEY_PATTERN);
16025
+ // ../contracts/src/envoy-session.ts
16026
+ var SESSION_HEARTBEAT_MS = 90000;
16027
+ var LISTENER_CALL_TIMEOUT_MS = 5000;
16028
+ var LISTENER_CALL_RETRY_DELAY_MS = 250;
16029
+ var LISTENER_CALL_ATTEMPTS = 2;
16025
16030
  // ../contracts/src/subject.ts
16026
16031
  var DISPATCH_TOPIC_PREFIX = "notifications.dispatch.";
16027
16032
  var DISPATCH_ISSUE_TOPIC_PREFIX = `${DISPATCH_TOPIC_PREFIX}issue.`;
@@ -25127,7 +25132,7 @@ function dispatchTarget(env, config) {
25127
25132
 
25128
25133
  // ../envoy-client/src/envoy-settings.ts
25129
25134
  var DEFAULT_ENVOY_URL = "http://127.0.0.1:9020";
25130
- var DEFAULT_HEARTBEAT_MS = 90000;
25135
+ var DEFAULT_HEARTBEAT_MS = SESSION_HEARTBEAT_MS;
25131
25136
  var MIN_PASS_DEADLINE_MS = 30000;
25132
25137
  var MIN_INTERVAL_MS = 25;
25133
25138
  var MAX_INTERVAL_MS = 2147483647;
@@ -25281,8 +25286,6 @@ function sessionEnvoySettings(file, env, options) {
25281
25286
  }
25282
25287
 
25283
25288
  // ../envoy-client/src/transport.ts
25284
- var DEFAULT_TIMEOUT_MS = 5000;
25285
- var RETRY_DELAY_MS = 250;
25286
25289
  var REPLAY_TIMEOUT_MS = 1e4;
25287
25290
  var SessionStateSchema = _enum2(["live", "unresponsive", "gone"]);
25288
25291
  var UNRESPONSIVE_RULE = "An unresponsive session is not dead: it keeps its role claims and its issue claims, and a " + "message sent to it is stored until it answers. Start no replacement for it and take no claim " + `from it until it is gone, or until ${ISSUE_CLAIM_UNRESPONSIVE_GRACE_MS / 60000} minutes ` + "have passed since its last_seen, the time of its last registration.";
@@ -25478,10 +25481,16 @@ class EnvoySendUnconfirmedError extends Error {
25478
25481
  this.resendSafe = resendSafe;
25479
25482
  }
25480
25483
  }
25484
+ function resolveCallTiming(config) {
25485
+ return {
25486
+ timeoutMs: config.timeoutMs ?? LISTENER_CALL_TIMEOUT_MS,
25487
+ attempts: config.retry === false ? 1 : LISTENER_CALL_ATTEMPTS,
25488
+ retryDelayMs: LISTENER_CALL_RETRY_DELAY_MS
25489
+ };
25490
+ }
25481
25491
  function createEnvoyClient(config) {
25482
25492
  const baseUrl = normalizeEnvoyUrl(config.baseUrl);
25483
- const timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
25484
- const attempts = config.retry === false ? 1 : 2;
25493
+ const { timeoutMs, attempts, retryDelayMs } = resolveCallTiming(config);
25485
25494
  const credential = config.credential;
25486
25495
  const attemptOnce = async (url, init, deadlineMs, actingSession) => {
25487
25496
  let response;
@@ -25527,7 +25536,7 @@ function createEnvoyClient(config) {
25527
25536
  if ("unanswered" in outcome) {
25528
25537
  options.onUnanswered?.();
25529
25538
  if (attempt + 1 < tries) {
25530
- await waitForRetry();
25539
+ await waitForRetry(retryDelayMs);
25531
25540
  continue;
25532
25541
  }
25533
25542
  throw outcome.unanswered;
@@ -25544,7 +25553,7 @@ function createEnvoyClient(config) {
25544
25553
  if (response.status >= 500) {
25545
25554
  options.onUnanswered?.();
25546
25555
  if (attempt + 1 < tries) {
25547
- await waitForRetry();
25556
+ await waitForRetry(retryDelayMs);
25548
25557
  continue;
25549
25558
  }
25550
25559
  }
@@ -25690,9 +25699,9 @@ function createEnvoyClient(config) {
25690
25699
  })))
25691
25700
  };
25692
25701
  }
25693
- function waitForRetry() {
25702
+ function waitForRetry(delayMs) {
25694
25703
  const { promise, resolve } = Promise.withResolvers();
25695
- setTimeout(resolve, RETRY_DELAY_MS);
25704
+ setTimeout(resolve, delayMs);
25696
25705
  return promise;
25697
25706
  }
25698
25707
  function messageMetadata(input) {
package/dist/envoy.js CHANGED
@@ -31026,6 +31026,11 @@ function dedupeKeyNamesItsEvent(envelope) {
31026
31026
  return false;
31027
31027
  }
31028
31028
  }
31029
+ // ../contracts/src/envoy-session.ts
31030
+ var SESSION_HEARTBEAT_MS = 90000;
31031
+ var LISTENER_CALL_TIMEOUT_MS = 5000;
31032
+ var LISTENER_CALL_RETRY_DELAY_MS = 250;
31033
+ var LISTENER_CALL_ATTEMPTS = 2;
31029
31034
  // ../contracts/src/subject.ts
31030
31035
  var AGENT_TOPIC_PREFIX = "notifications.agent.";
31031
31036
  var ROLE_TOPIC_PREFIX = "notifications.role.";
@@ -37056,7 +37061,7 @@ function fileBearer(bearer, url, section, env, commands = "run") {
37056
37061
 
37057
37062
  // ../envoy-client/src/envoy-settings.ts
37058
37063
  var DEFAULT_ENVOY_URL = "http://127.0.0.1:9020";
37059
- var DEFAULT_HEARTBEAT_MS = 90000;
37064
+ var DEFAULT_HEARTBEAT_MS = SESSION_HEARTBEAT_MS;
37060
37065
  var MIN_PASS_DEADLINE_MS = 30000;
37061
37066
  var MIN_INTERVAL_MS = 25;
37062
37067
  var MAX_INTERVAL_MS = 2147483647;
@@ -37185,8 +37190,6 @@ function machineID() {
37185
37190
  }
37186
37191
 
37187
37192
  // ../envoy-client/src/transport.ts
37188
- var DEFAULT_TIMEOUT_MS = 5000;
37189
- var RETRY_DELAY_MS = 250;
37190
37193
  var REPLAY_TIMEOUT_MS = 1e4;
37191
37194
  var REPLAY_UNAVAILABLE_CODE = "REPLAY_UNAVAILABLE";
37192
37195
  var SessionStateSchema = _enum2(["live", "unresponsive", "gone"]);
@@ -37400,10 +37403,16 @@ class EnvoySendUnconfirmedError extends Error {
37400
37403
  this.resendSafe = resendSafe;
37401
37404
  }
37402
37405
  }
37406
+ function resolveCallTiming(config) {
37407
+ return {
37408
+ timeoutMs: config.timeoutMs ?? LISTENER_CALL_TIMEOUT_MS,
37409
+ attempts: config.retry === false ? 1 : LISTENER_CALL_ATTEMPTS,
37410
+ retryDelayMs: LISTENER_CALL_RETRY_DELAY_MS
37411
+ };
37412
+ }
37403
37413
  function createEnvoyClient(config) {
37404
37414
  const baseUrl = normalizeEnvoyUrl(config.baseUrl);
37405
- const timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
37406
- const attempts = config.retry === false ? 1 : 2;
37415
+ const { timeoutMs, attempts, retryDelayMs } = resolveCallTiming(config);
37407
37416
  const credential = config.credential;
37408
37417
  const attemptOnce = async (url, init, deadlineMs, actingSession) => {
37409
37418
  let response;
@@ -37449,7 +37458,7 @@ function createEnvoyClient(config) {
37449
37458
  if ("unanswered" in outcome) {
37450
37459
  options.onUnanswered?.();
37451
37460
  if (attempt + 1 < tries) {
37452
- await waitForRetry();
37461
+ await waitForRetry(retryDelayMs);
37453
37462
  continue;
37454
37463
  }
37455
37464
  throw outcome.unanswered;
@@ -37466,7 +37475,7 @@ function createEnvoyClient(config) {
37466
37475
  if (response.status >= 500) {
37467
37476
  options.onUnanswered?.();
37468
37477
  if (attempt + 1 < tries) {
37469
- await waitForRetry();
37478
+ await waitForRetry(retryDelayMs);
37470
37479
  continue;
37471
37480
  }
37472
37481
  }
@@ -37612,9 +37621,9 @@ function createEnvoyClient(config) {
37612
37621
  })))
37613
37622
  };
37614
37623
  }
37615
- function waitForRetry() {
37624
+ function waitForRetry(delayMs) {
37616
37625
  const { promise, resolve } = Promise.withResolvers();
37617
- setTimeout(resolve, RETRY_DELAY_MS);
37626
+ setTimeout(resolve, delayMs);
37618
37627
  return promise;
37619
37628
  }
37620
37629
  function messageMetadata(input) {
@@ -41180,7 +41189,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
41180
41189
 
41181
41190
  // package.json
41182
41191
  var name = "@sjawhar/pi-envoy";
41183
- var version2 = "16.12.0";
41192
+ var version2 = "16.13.0";
41184
41193
  var package_default = {
41185
41194
  name,
41186
41195
  version: version2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-envoy",
3
- "version": "16.12.0",
3
+ "version": "16.13.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "omp": {