@automagik/omni 2.260427.1 → 2.260428.1
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/dist/index.js +5 -2
- package/dist/pm2.d.ts +6 -0
- package/dist/pm2.d.ts.map +1 -1
- package/dist/server/index.js +952 -270
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -22465,7 +22465,7 @@ function getStreamForPattern(pattern) {
|
|
|
22465
22465
|
function calculateBackoffDelay(retryCount, baseDelayMs = DEFAULT_CONSUMER_CONFIG.retryDelayMs, maxDelayMs = 30000) {
|
|
22466
22466
|
const delay = baseDelayMs * 2 ** retryCount;
|
|
22467
22467
|
const jitter = delay * 0.1 * (Math.random() * 2 - 1);
|
|
22468
|
-
return Math.min(delay + jitter, maxDelayMs);
|
|
22468
|
+
return Math.floor(Math.min(delay + jitter, maxDelayMs));
|
|
22469
22469
|
}
|
|
22470
22470
|
var import_nats2, DEFAULT_CONSUMER_CONFIG;
|
|
22471
22471
|
var init_consumer = __esm(() => {
|
|
@@ -113929,7 +113929,7 @@ import { fileURLToPath } from "url";
|
|
|
113929
113929
|
// package.json
|
|
113930
113930
|
var package_default = {
|
|
113931
113931
|
name: "@automagik/omni",
|
|
113932
|
-
version: "2.
|
|
113932
|
+
version: "2.260428.1",
|
|
113933
113933
|
description: "LLM-optimized CLI for Omni",
|
|
113934
113934
|
type: "module",
|
|
113935
113935
|
bin: {
|
|
@@ -114989,6 +114989,7 @@ var PM2_HARDENED_DEFAULTS = {
|
|
|
114989
114989
|
restartDelayMs: 5000,
|
|
114990
114990
|
apiMaxMemory: "2G",
|
|
114991
114991
|
natsMaxMemory: "1G",
|
|
114992
|
+
killTimeoutMs: 20000,
|
|
114992
114993
|
logDateFormat: "YYYY-MM-DD HH:mm:ss.SSS"
|
|
114993
114994
|
};
|
|
114994
114995
|
function getPm2LogDir() {
|
|
@@ -115016,6 +115017,8 @@ function buildPm2StartArgs(options) {
|
|
|
115016
115017
|
String(PM2_HARDENED_DEFAULTS.restartDelayMs),
|
|
115017
115018
|
"--max-memory-restart",
|
|
115018
115019
|
maxMemory,
|
|
115020
|
+
"--kill-timeout",
|
|
115021
|
+
String(PM2_HARDENED_DEFAULTS.killTimeoutMs),
|
|
115019
115022
|
"--log-date-format",
|
|
115020
115023
|
PM2_HARDENED_DEFAULTS.logDateFormat,
|
|
115021
115024
|
"--output",
|
package/dist/pm2.d.ts
CHANGED
|
@@ -15,12 +15,18 @@ export declare const PM2_PROCESSES: {
|
|
|
15
15
|
* throttling. This is the fix for the 2026-04-09 incident where a crash loop
|
|
16
16
|
* grew `omni-api-error.log` to 283 GB because pm2 had no `--max-restarts` or
|
|
17
17
|
* log rotation configured. See WISH: omni-install-resilience.
|
|
18
|
+
*
|
|
19
|
+
* `killTimeoutMs` was added by WISH: pm2-log-noise-and-bumps — the API has a
|
|
20
|
+
* 15 s graceful shutdown (`packages/api/src/index.ts:327`) but pm2's default
|
|
21
|
+
* `kill_timeout` is 1600 ms, so SIGKILL was firing before pgserve/NATS could
|
|
22
|
+
* drain. We pad to 20 s = 15 s graceful + 5 s headroom for Sentry flush.
|
|
18
23
|
*/
|
|
19
24
|
export declare const PM2_HARDENED_DEFAULTS: {
|
|
20
25
|
readonly maxRestarts: 10;
|
|
21
26
|
readonly restartDelayMs: 5000;
|
|
22
27
|
readonly apiMaxMemory: "2G";
|
|
23
28
|
readonly natsMaxMemory: "1G";
|
|
29
|
+
readonly killTimeoutMs: 20000;
|
|
24
30
|
readonly logDateFormat: "YYYY-MM-DD HH:mm:ss.SSS";
|
|
25
31
|
};
|
|
26
32
|
/** Directory where hardened pm2 logs are written. */
|
package/dist/pm2.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pm2.d.ts","sourceRoot":"","sources":["../src/pm2.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,wCAAwC;AACxC,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX
|
|
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