@automagik/omni 2.260520.8 → 2.260520.10
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
CHANGED
|
@@ -124067,7 +124067,7 @@ import { fileURLToPath } from "url";
|
|
|
124067
124067
|
// package.json
|
|
124068
124068
|
var package_default = {
|
|
124069
124069
|
name: "@automagik/omni",
|
|
124070
|
-
version: "2.260520.
|
|
124070
|
+
version: "2.260520.10",
|
|
124071
124071
|
description: "LLM-optimized CLI for Omni",
|
|
124072
124072
|
type: "module",
|
|
124073
124073
|
bin: {
|
|
@@ -125330,11 +125330,7 @@ function buildDatabaseUrlForTransport(transport, database, options = {}) {
|
|
|
125330
125330
|
const password = options.password ?? "postgres";
|
|
125331
125331
|
const auth = `${encodeURIComponent(username)}:${encodeURIComponent(password)}`;
|
|
125332
125332
|
if (transport.kind === "unix") {
|
|
125333
|
-
|
|
125334
|
-
host: transport.socketDir,
|
|
125335
|
-
port: String(transport.port)
|
|
125336
|
-
});
|
|
125337
|
-
return `postgresql://${auth}@localhost/${encodeURIComponent(database)}?${params.toString()}`;
|
|
125333
|
+
return `postgresql://${auth}@localhost/${encodeURIComponent(database)}`;
|
|
125338
125334
|
}
|
|
125339
125335
|
return `postgresql://${auth}@${transport.host}:${transport.port}/${encodeURIComponent(database)}`;
|
|
125340
125336
|
}
|
|
@@ -125369,9 +125365,14 @@ function resolveDatabaseUrl(serverConfig) {
|
|
|
125369
125365
|
}
|
|
125370
125366
|
function buildRuntimeEnv(serverConfig, cliConfig) {
|
|
125371
125367
|
const pgservePort = resolvePgservePort(serverConfig);
|
|
125368
|
+
const udsActive = probeCanonicalSocketSync();
|
|
125369
|
+
const pgHost = udsActive ? resolvePgserveSocketDir() : "";
|
|
125370
|
+
const pgPort = udsActive ? String(CANONICAL_PG_PORT) : "";
|
|
125372
125371
|
return {
|
|
125373
125372
|
API_PORT: String(serverConfig.port),
|
|
125374
125373
|
DATABASE_URL: resolveDatabaseUrl(serverConfig),
|
|
125374
|
+
PGHOST: pgHost,
|
|
125375
|
+
PGPORT: pgPort,
|
|
125375
125376
|
OMNI_API_KEY: cliConfig.apiKey ?? "",
|
|
125376
125377
|
MEDIA_STORAGE_PATH: join6(serverConfig.dataDir, "media"),
|
|
125377
125378
|
OMNI_PACKAGES_DIR: join6(serverConfig.dataDir, "packages"),
|
|
@@ -75,21 +75,25 @@ export declare function resolvePgserveControlSocketPath(): string;
|
|
|
75
75
|
export declare function probeCanonicalSocketSync(): boolean;
|
|
76
76
|
/**
|
|
77
77
|
* Build a `postgresql://` URL pointing at the given transport, using the
|
|
78
|
-
* supplied database name.
|
|
79
|
-
* SHARED-DESIGN.md §5.3 (omni-side scope).
|
|
78
|
+
* supplied database name.
|
|
80
79
|
*
|
|
81
|
-
* UDS shape: `postgresql://postgres:postgres@localhost/omni
|
|
80
|
+
* UDS shape: `postgresql://postgres:postgres@localhost/omni` (plain — no
|
|
81
|
+
* libpq `?host=` query param). Socket routing happens via the
|
|
82
|
+
* PGHOST/PGPORT env vars `buildRuntimeEnv` publishes alongside this URL.
|
|
82
83
|
* TCP shape: `postgresql://postgres:postgres@127.0.0.1:5432/omni`
|
|
83
84
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
85
|
+
* Why no `?host=` for UDS: postgres.js (omni-api's client) rejects URLs
|
|
86
|
+
* carrying the libpq `?host=` query parameter with the error
|
|
87
|
+
* `unrecognized configuration parameter "host"`. That parameter is a
|
|
88
|
+
* libpq-only convention; postgres.js parses URL query params strictly as
|
|
89
|
+
* connection options and bails. Earlier iterations of this helper tried
|
|
90
|
+
* three shapes that all failed for postgres.js:
|
|
91
|
+
* - `postgresql://user:pass@/db?host=/sock` → Node WHATWG URL: Invalid URL
|
|
92
|
+
* - `postgresql://user:pass@localhost/db?host=/sock` → postgres.js:
|
|
93
|
+
* "unrecognized configuration parameter host"
|
|
94
|
+
* The working shape is the plain `@localhost/db` form, with the actual
|
|
95
|
+
* socket path supplied to postgres.js via PGHOST/PGPORT env vars (which
|
|
96
|
+
* postgres.js inherits as connection defaults).
|
|
93
97
|
*
|
|
94
98
|
* The username/password pair is preserved (not derived from the transport)
|
|
95
99
|
* because omni's pgserve consumer keeps libpq peer-auth via password —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pgserve-transport.d.ts","sourceRoot":"","sources":["../../src/lib/pgserve-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAQH,8FAA8F;AAC9F,eAAO,MAAM,iBAAiB,OAAO,CAAC;AActC;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAIhD;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAElD;AAED
|
|
1
|
+
{"version":3,"file":"pgserve-transport.d.ts","sourceRoot":"","sources":["../../src/lib/pgserve-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAQH,8FAA8F;AAC9F,eAAO,MAAM,iBAAiB,OAAO,CAAC;AActC;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAIhD;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAElD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GACrD,MAAM,CAWR;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CA+BzE"}
|
package/dist/runtime-env.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-env.d.ts","sourceRoot":"","sources":["../src/runtime-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQxD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-env.d.ts","sourceRoot":"","sources":["../src/runtime-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQxD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IAQrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAQF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,0EAA0E;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,GAAE,MAA6B,GAAG,MAAM,CAE3F;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAKxD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAMrE;AAgBD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAiBrE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CA+BzF"}
|
package/dist/server/index.js
CHANGED
|
@@ -230137,7 +230137,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
230137
230137
|
var require_package8 = __commonJS((exports, module) => {
|
|
230138
230138
|
module.exports = {
|
|
230139
230139
|
name: "@omni/api",
|
|
230140
|
-
version: "2.260520.
|
|
230140
|
+
version: "2.260520.10",
|
|
230141
230141
|
type: "module",
|
|
230142
230142
|
exports: {
|
|
230143
230143
|
".": {
|