@automagik/omni 2.260507.9 → 2.260508.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 +6 -1
- package/dist/pm2.d.ts +18 -0
- package/dist/pm2.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -123990,7 +123990,7 @@ import { fileURLToPath } from "url";
|
|
|
123990
123990
|
// package.json
|
|
123991
123991
|
var package_default = {
|
|
123992
123992
|
name: "@automagik/omni",
|
|
123993
|
-
version: "2.
|
|
123993
|
+
version: "2.260508.1",
|
|
123994
123994
|
description: "LLM-optimized CLI for Omni",
|
|
123995
123995
|
type: "module",
|
|
123996
123996
|
bin: {
|
|
@@ -125099,6 +125099,9 @@ var PM2_HARDENED_DEFAULTS = {
|
|
|
125099
125099
|
function getPm2LogDir() {
|
|
125100
125100
|
return join4(homedir2(), ".omni", "logs");
|
|
125101
125101
|
}
|
|
125102
|
+
function getPm2AnchorCwd() {
|
|
125103
|
+
return homedir2();
|
|
125104
|
+
}
|
|
125102
125105
|
function getPm2LogPaths(processName) {
|
|
125103
125106
|
const dir = getPm2LogDir();
|
|
125104
125107
|
return {
|
|
@@ -125115,6 +125118,8 @@ function buildPm2StartArgs(options) {
|
|
|
125115
125118
|
script,
|
|
125116
125119
|
"--name",
|
|
125117
125120
|
name,
|
|
125121
|
+
"--cwd",
|
|
125122
|
+
getPm2AnchorCwd(),
|
|
125118
125123
|
"--max-restarts",
|
|
125119
125124
|
String(PM2_HARDENED_DEFAULTS.maxRestarts),
|
|
125120
125125
|
"--restart-delay",
|
package/dist/pm2.d.ts
CHANGED
|
@@ -31,6 +31,24 @@ export declare const PM2_HARDENED_DEFAULTS: {
|
|
|
31
31
|
};
|
|
32
32
|
/** Directory where hardened pm2 logs are written. */
|
|
33
33
|
export declare function getPm2LogDir(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Stable cwd to anchor pm2-managed processes against. Defaults to `$HOME`,
|
|
36
|
+
* which is guaranteed to exist for the lifetime of the user account.
|
|
37
|
+
*
|
|
38
|
+
* Without this anchor, `pm2 start` inherits the calling shell's `process.cwd()`
|
|
39
|
+
* and bakes it into the pm2 entry. If that directory is later removed (e.g.
|
|
40
|
+
* a transient build dir, a deleted submodule, a switched git branch) every
|
|
41
|
+
* subsequent `pm2 restart` fails with `Error: spawn bash ENOENT` because pm2
|
|
42
|
+
* tries to `chdir()` into the missing path before exec. The omni-api launcher
|
|
43
|
+
* (`bin/omni-server`) does its own `cd "$(dirname "$0")/../dist/server"`, so
|
|
44
|
+
* pm2's cwd does not need to point anywhere meaningful — it just needs to
|
|
45
|
+
* point somewhere that exists.
|
|
46
|
+
*
|
|
47
|
+
* See: 2026-05-07 incident where `omni update --next` poisoned the omni-api
|
|
48
|
+
* pm2 entry with `repos/pgserve` (a directory that no longer existed),
|
|
49
|
+
* causing silent crash loops with no log output.
|
|
50
|
+
*/
|
|
51
|
+
export declare function getPm2AnchorCwd(): string;
|
|
34
52
|
/** Hardened log path for a given pm2 process name. */
|
|
35
53
|
export declare function getPm2LogPaths(processName: string): {
|
|
36
54
|
out: string;
|
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;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB;;;;;;;CAOxB,CAAC;AAEX,qDAAqD;AACrD,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,sDAAsD;AACtD,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAMlF;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,iE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AAO,EAAE,MAAM,GAAG,MAAM,CAI1D;AAED,wCAAwC;AACxC,wBAAsB,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAYvD;AAED,gEAAgE;AAChE,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CASnG;AAED,2CAA2C;AAC3C,wBAAsB,UAAU,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAU7F;AAED,sDAAsD;AACtD,wBAAgB,gBAAgB,IAAI,KAAK,CAExC"}
|
package/dist/server/index.js
CHANGED
|
@@ -230060,7 +230060,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
230060
230060
|
var require_package8 = __commonJS((exports, module) => {
|
|
230061
230061
|
module.exports = {
|
|
230062
230062
|
name: "@omni/api",
|
|
230063
|
-
version: "2.
|
|
230063
|
+
version: "2.260508.1",
|
|
230064
230064
|
type: "module",
|
|
230065
230065
|
exports: {
|
|
230066
230066
|
".": {
|