@automagik/omni 2.260424.3 → 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 +17 -3
- package/dist/pm2.d.ts +6 -0
- package/dist/pm2.d.ts.map +1 -1
- package/dist/sdk/client.d.ts +2086 -0
- package/dist/sdk/client.d.ts.map +1 -0
- package/dist/sdk/errors.d.ts +35 -0
- package/dist/sdk/errors.d.ts.map +1 -0
- package/dist/sdk/index.d.ts +31 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +2199 -0
- package/dist/sdk/types.generated.d.ts +16665 -0
- package/dist/sdk/types.generated.d.ts.map +1 -0
- package/dist/server/index.js +1012 -273
- package/package.json +22 -11
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: {
|
|
@@ -113937,12 +113937,23 @@ var package_default = {
|
|
|
113937
113937
|
},
|
|
113938
113938
|
main: "dist/index.js",
|
|
113939
113939
|
types: "dist/index.d.ts",
|
|
113940
|
+
exports: {
|
|
113941
|
+
".": {
|
|
113942
|
+
types: "./dist/index.d.ts",
|
|
113943
|
+
import: "./dist/index.js"
|
|
113944
|
+
},
|
|
113945
|
+
"./sdk": {
|
|
113946
|
+
types: "./dist/sdk/index.d.ts",
|
|
113947
|
+
import: "./dist/sdk/index.js"
|
|
113948
|
+
}
|
|
113949
|
+
},
|
|
113940
113950
|
files: ["dist", "bin", "db"],
|
|
113941
113951
|
publishConfig: {
|
|
113942
113952
|
access: "public"
|
|
113943
113953
|
},
|
|
113944
113954
|
scripts: {
|
|
113945
|
-
build: "bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types",
|
|
113955
|
+
build: "bun run build:sdk-subpath && bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types",
|
|
113956
|
+
"build:sdk-subpath": "cd ../sdk && bun run build && cd ../cli && mkdir -p ./dist/sdk && cp -r ../sdk/dist/. ./dist/sdk/",
|
|
113946
113957
|
"build:types": "tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
113947
113958
|
dev: "echo 'CLI package - no dev server (use: bun run ./src/index.ts <command>)'",
|
|
113948
113959
|
typecheck: "tsc --noEmit",
|
|
@@ -114978,6 +114989,7 @@ var PM2_HARDENED_DEFAULTS = {
|
|
|
114978
114989
|
restartDelayMs: 5000,
|
|
114979
114990
|
apiMaxMemory: "2G",
|
|
114980
114991
|
natsMaxMemory: "1G",
|
|
114992
|
+
killTimeoutMs: 20000,
|
|
114981
114993
|
logDateFormat: "YYYY-MM-DD HH:mm:ss.SSS"
|
|
114982
114994
|
};
|
|
114983
114995
|
function getPm2LogDir() {
|
|
@@ -115005,6 +115017,8 @@ function buildPm2StartArgs(options) {
|
|
|
115005
115017
|
String(PM2_HARDENED_DEFAULTS.restartDelayMs),
|
|
115006
115018
|
"--max-memory-restart",
|
|
115007
115019
|
maxMemory,
|
|
115020
|
+
"--kill-timeout",
|
|
115021
|
+
String(PM2_HARDENED_DEFAULTS.killTimeoutMs),
|
|
115008
115022
|
"--log-date-format",
|
|
115009
115023
|
PM2_HARDENED_DEFAULTS.logDateFormat,
|
|
115010
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
|
|
1
|
+
{"version":3,"file":"pm2.d.ts","sourceRoot":"","sources":["../src/pm2.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,wCAAwC;AACxC,eAAO,MAAM,aAAa;;;CAGhB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