@automagik/omni 2.260524.1 → 2.260525.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
CHANGED
|
@@ -4663,12 +4663,14 @@ var require_cli_spinners = __commonJS((exports, module) => {
|
|
|
4663
4663
|
// src/lib/embedded-canonical-migration.ts
|
|
4664
4664
|
var exports_embedded_canonical_migration = {};
|
|
4665
4665
|
__export(exports_embedded_canonical_migration, {
|
|
4666
|
+
readDataDirMajor: () => readDataDirMajor,
|
|
4666
4667
|
migrateUnmountedEmbeddedToCanonical: () => migrateUnmountedEmbeddedToCanonical,
|
|
4668
|
+
compareVersionDesc: () => compareVersionDesc,
|
|
4667
4669
|
compareEmbeddedVsCanonicalCounts: () => compareEmbeddedVsCanonicalCounts,
|
|
4668
4670
|
EMBEDDED_PGSERVE_DATA_DIR: () => EMBEDDED_PGSERVE_DATA_DIR
|
|
4669
4671
|
});
|
|
4670
|
-
import { spawn, spawnSync as spawnSync2 } from "child_process";
|
|
4671
|
-
import { existsSync as existsSync9, mkdtempSync } from "fs";
|
|
4672
|
+
import { execFileSync as execFileSync3, spawn, spawnSync as spawnSync2 } from "child_process";
|
|
4673
|
+
import { existsSync as existsSync9, mkdtempSync, readFileSync as readFileSync6 } from "fs";
|
|
4672
4674
|
import { createServer } from "net";
|
|
4673
4675
|
import { homedir as homedir7, tmpdir } from "os";
|
|
4674
4676
|
import { join as join11 } from "path";
|
|
@@ -4677,17 +4679,48 @@ function defaultLog(line) {
|
|
|
4677
4679
|
process.stdout.write(`${line}
|
|
4678
4680
|
`);
|
|
4679
4681
|
}
|
|
4680
|
-
function
|
|
4682
|
+
function readDataDirMajor(dataDir) {
|
|
4683
|
+
try {
|
|
4684
|
+
const major = Number.parseInt(readFileSync6(join11(dataDir, "PG_VERSION"), "utf8").trim(), 10);
|
|
4685
|
+
return Number.isFinite(major) ? major : null;
|
|
4686
|
+
} catch {
|
|
4687
|
+
return null;
|
|
4688
|
+
}
|
|
4689
|
+
}
|
|
4690
|
+
function binaryMajor(binary) {
|
|
4691
|
+
try {
|
|
4692
|
+
const out = execFileSync3(binary, ["--version"], { encoding: "utf8", timeout: 5000 });
|
|
4693
|
+
const m = out.match(/(\d+)(?:[.\s]|$)/);
|
|
4694
|
+
return m ? Number.parseInt(m[1], 10) : null;
|
|
4695
|
+
} catch {
|
|
4696
|
+
return null;
|
|
4697
|
+
}
|
|
4698
|
+
}
|
|
4699
|
+
function findAutopgPostgresBinary(wantMajor) {
|
|
4681
4700
|
const autopgRoot = join11(homedir7(), ".local", "share", "autopg");
|
|
4682
4701
|
if (!existsSync9(autopgRoot))
|
|
4683
4702
|
return null;
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4703
|
+
const candidates = safeReaddir(autopgRoot).sort((a, b) => compareVersionDesc(a, b)).map((entry) => join11(autopgRoot, entry, "postgres", "bin", "postgres")).filter((candidate) => existsSync9(candidate));
|
|
4704
|
+
if (candidates.length === 0)
|
|
4705
|
+
return null;
|
|
4706
|
+
if (wantMajor === null)
|
|
4707
|
+
return candidates[0];
|
|
4708
|
+
for (const candidate of candidates) {
|
|
4709
|
+
if (binaryMajor(candidate) === wantMajor)
|
|
4710
|
+
return candidate;
|
|
4689
4711
|
}
|
|
4690
|
-
return
|
|
4712
|
+
return null;
|
|
4713
|
+
}
|
|
4714
|
+
function compareVersionDesc(a, b) {
|
|
4715
|
+
const parse = (s) => (s.match(/\d+/g) ?? []).map(Number);
|
|
4716
|
+
const pa = parse(a);
|
|
4717
|
+
const pb = parse(b);
|
|
4718
|
+
for (let i = 0;i < Math.max(pa.length, pb.length); i++) {
|
|
4719
|
+
const diff = (pb[i] ?? 0) - (pa[i] ?? 0);
|
|
4720
|
+
if (diff !== 0)
|
|
4721
|
+
return diff;
|
|
4722
|
+
}
|
|
4723
|
+
return b.localeCompare(a);
|
|
4691
4724
|
}
|
|
4692
4725
|
function safeReaddir(path) {
|
|
4693
4726
|
try {
|
|
@@ -4841,9 +4874,14 @@ async function compareEmbeddedVsCanonicalCounts(opts = {}) {
|
|
|
4841
4874
|
if (!existsSync9(EMBEDDED_DIR) || !existsSync9(join11(EMBEDDED_DIR, "PG_VERSION"))) {
|
|
4842
4875
|
return { kind: "skipped", reason: "embedded dir absent" };
|
|
4843
4876
|
}
|
|
4844
|
-
const
|
|
4845
|
-
|
|
4846
|
-
|
|
4877
|
+
const wantMajor = readDataDirMajor(EMBEDDED_DIR);
|
|
4878
|
+
const binary = findAutopgPostgresBinary(wantMajor);
|
|
4879
|
+
if (!binary) {
|
|
4880
|
+
return {
|
|
4881
|
+
kind: "skipped",
|
|
4882
|
+
reason: wantMajor ? `no PostgreSQL ${wantMajor} reader under ~/.local/share/autopg (embedded dir is PG ${wantMajor})` : "autopg postgres binary not found"
|
|
4883
|
+
};
|
|
4884
|
+
}
|
|
4847
4885
|
const tempPort = await findFreePort();
|
|
4848
4886
|
let temp = null;
|
|
4849
4887
|
try {
|
|
@@ -4892,11 +4930,15 @@ async function migrateUnmountedEmbeddedToCanonical(opts = {}) {
|
|
|
4892
4930
|
if (!existsSync9(join11(EMBEDDED_DIR, "PG_VERSION"))) {
|
|
4893
4931
|
return { status: "skipped", reason: "embedded dir missing PG_VERSION" };
|
|
4894
4932
|
}
|
|
4895
|
-
const
|
|
4933
|
+
const wantMajor = readDataDirMajor(EMBEDDED_DIR);
|
|
4934
|
+
const binary = findAutopgPostgresBinary(wantMajor);
|
|
4896
4935
|
if (!binary) {
|
|
4897
|
-
return {
|
|
4936
|
+
return {
|
|
4937
|
+
status: "skipped",
|
|
4938
|
+
reason: wantMajor ? `no PostgreSQL ${wantMajor} reader installed under ~/.local/share/autopg \u2014 your data is PG ${wantMajor}; install a matching autopg/reader so it can be dumped into the canonical cluster` : "autopg postgres binary not found \u2014 install autopg first"
|
|
4939
|
+
};
|
|
4898
4940
|
}
|
|
4899
|
-
log(` using postgres binary: ${binary}`);
|
|
4941
|
+
log(` using postgres binary: ${binary} (matched PG ${wantMajor ?? "?"})`);
|
|
4900
4942
|
log(" stopping omni-api during data copy");
|
|
4901
4943
|
spawnSync2("pm2", ["stop", "omni-api"], { stdio: "inherit" });
|
|
4902
4944
|
const tempPort = await findFreePort();
|
|
@@ -124460,7 +124502,7 @@ import { fileURLToPath } from "url";
|
|
|
124460
124502
|
// package.json
|
|
124461
124503
|
var package_default = {
|
|
124462
124504
|
name: "@automagik/omni",
|
|
124463
|
-
version: "2.
|
|
124505
|
+
version: "2.260525.1",
|
|
124464
124506
|
description: "LLM-optimized CLI for Omni",
|
|
124465
124507
|
type: "module",
|
|
124466
124508
|
bin: {
|
|
@@ -125965,7 +126007,7 @@ function resolveOmniScopedCredentials() {
|
|
|
125965
126007
|
// src/runtime-env.ts
|
|
125966
126008
|
var LEGACY_DEFAULT_DATABASE_URL = "postgresql://postgres:postgres@localhost:5432/omni";
|
|
125967
126009
|
var LEGACY_PHASE2_DATABASE_URL = "postgresql://postgres:postgres@localhost:8432/omni";
|
|
125968
|
-
var DEFAULT_PGSERVE_PORT =
|
|
126010
|
+
var DEFAULT_PGSERVE_PORT = CANONICAL_PG_PORT;
|
|
125969
126011
|
function buildEmbeddedDatabaseUrl(pgservePort = DEFAULT_PGSERVE_PORT) {
|
|
125970
126012
|
return `postgresql://postgres:postgres@localhost:${pgservePort}/omni`;
|
|
125971
126013
|
}
|
|
@@ -130607,7 +130649,7 @@ Safety:
|
|
|
130607
130649
|
}
|
|
130608
130650
|
|
|
130609
130651
|
// src/commands/done.ts
|
|
130610
|
-
import { existsSync as existsSync11, readFileSync as
|
|
130652
|
+
import { existsSync as existsSync11, readFileSync as readFileSync7 } from "fs";
|
|
130611
130653
|
import { basename, extname } from "path";
|
|
130612
130654
|
|
|
130613
130655
|
// src/context.ts
|
|
@@ -130721,7 +130763,7 @@ async function handleMedia(client, ctx, mediaPath, caption) {
|
|
|
130721
130763
|
}
|
|
130722
130764
|
try {
|
|
130723
130765
|
const mediaType = getMediaType(mediaPath);
|
|
130724
|
-
const buffer =
|
|
130766
|
+
const buffer = readFileSync7(mediaPath);
|
|
130725
130767
|
const base64 = buffer.toString("base64");
|
|
130726
130768
|
const filename = basename(mediaPath);
|
|
130727
130769
|
await client.messages.sendMedia({
|
|
@@ -131241,7 +131283,7 @@ function createFilmCommand() {
|
|
|
131241
131283
|
}
|
|
131242
131284
|
|
|
131243
131285
|
// src/commands/follow-up.ts
|
|
131244
|
-
import { readFileSync as
|
|
131286
|
+
import { readFileSync as readFileSync8 } from "fs";
|
|
131245
131287
|
init_output();
|
|
131246
131288
|
var VALID_SCOPES = ["agents", "instances", "chats"];
|
|
131247
131289
|
function assertScope(scope) {
|
|
@@ -131259,9 +131301,9 @@ async function resolveScopedId(scope, id) {
|
|
|
131259
131301
|
function readJsonArg(raw2) {
|
|
131260
131302
|
let body = raw2;
|
|
131261
131303
|
if (body === "-") {
|
|
131262
|
-
body =
|
|
131304
|
+
body = readFileSync8(0, "utf8");
|
|
131263
131305
|
} else if (body.startsWith("@")) {
|
|
131264
|
-
body =
|
|
131306
|
+
body = readFileSync8(body.slice(1), "utf8");
|
|
131265
131307
|
}
|
|
131266
131308
|
try {
|
|
131267
131309
|
return JSON.parse(body);
|
|
@@ -134378,9 +134420,9 @@ init_output();
|
|
|
134378
134420
|
|
|
134379
134421
|
// src/commands/providers-setup.ts
|
|
134380
134422
|
init_src();
|
|
134381
|
-
import { execFileSync as
|
|
134423
|
+
import { execFileSync as execFileSync4, execSync } from "child_process";
|
|
134382
134424
|
import * as nodeCrypto2 from "crypto";
|
|
134383
|
-
import { existsSync as existsSync15, mkdirSync as mkdirSync9, readFileSync as
|
|
134425
|
+
import { existsSync as existsSync15, mkdirSync as mkdirSync9, readFileSync as readFileSync10, writeFileSync as writeFileSync9 } from "fs";
|
|
134384
134426
|
import { homedir as homedir11 } from "os";
|
|
134385
134427
|
import { dirname as dirname5, resolve as resolve3 } from "path";
|
|
134386
134428
|
import { createInterface as createInterface2 } from "readline";
|
|
@@ -134613,7 +134655,7 @@ var PLUGIN_MARKER = "plugin-openclaw/omni.ts";
|
|
|
134613
134655
|
function readOpenClawConfig(configPath) {
|
|
134614
134656
|
if (!existsSync15(configPath))
|
|
134615
134657
|
return {};
|
|
134616
|
-
const raw2 =
|
|
134658
|
+
const raw2 = readFileSync10(configPath, "utf-8").trim();
|
|
134617
134659
|
if (!raw2)
|
|
134618
134660
|
return {};
|
|
134619
134661
|
return JSON.parse(raw2);
|
|
@@ -134660,7 +134702,7 @@ function resolvePluginPath(explicit) {
|
|
|
134660
134702
|
function registerPlugin(config2, pluginPath, configPath) {
|
|
134661
134703
|
if (hasOpenClawCli()) {
|
|
134662
134704
|
try {
|
|
134663
|
-
|
|
134705
|
+
execFileSync4("openclaw", ["plugins", "install", "--link", pluginPath], { stdio: "ignore" });
|
|
134664
134706
|
try {
|
|
134665
134707
|
return { config: readOpenClawConfig(configPath), registered: true };
|
|
134666
134708
|
} catch {
|
|
@@ -135705,7 +135747,7 @@ function createSayCommand() {
|
|
|
135705
135747
|
}
|
|
135706
135748
|
|
|
135707
135749
|
// src/commands/see.ts
|
|
135708
|
-
import { existsSync as existsSync16, readFileSync as
|
|
135750
|
+
import { existsSync as existsSync16, readFileSync as readFileSync11, statSync as statSync5 } from "fs";
|
|
135709
135751
|
import { extname as extname4 } from "path";
|
|
135710
135752
|
init_output();
|
|
135711
135753
|
var MIME_BY_EXT = {
|
|
@@ -135748,7 +135790,7 @@ function loadMedia(file) {
|
|
|
135748
135790
|
error(`File is empty: ${file}`);
|
|
135749
135791
|
}
|
|
135750
135792
|
try {
|
|
135751
|
-
return { buffer:
|
|
135793
|
+
return { buffer: readFileSync11(file), mimeType: guessMimeType(file) };
|
|
135752
135794
|
} catch (err2) {
|
|
135753
135795
|
const message2 = err2 instanceof Error ? err2.message : "Unknown error";
|
|
135754
135796
|
return error(`Failed to read ${file}: ${message2}`);
|
|
@@ -135823,7 +135865,7 @@ function createSeeCommand() {
|
|
|
135823
135865
|
}
|
|
135824
135866
|
|
|
135825
135867
|
// src/commands/send.ts
|
|
135826
|
-
import { existsSync as existsSync17, readFileSync as
|
|
135868
|
+
import { existsSync as existsSync17, readFileSync as readFileSync12 } from "fs";
|
|
135827
135869
|
import { basename as basename5, extname as extname5 } from "path";
|
|
135828
135870
|
init_source();
|
|
135829
135871
|
init_config();
|
|
@@ -135843,7 +135885,7 @@ function getMediaType2(path) {
|
|
|
135843
135885
|
return "document";
|
|
135844
135886
|
}
|
|
135845
135887
|
function readFileAsBase64(path) {
|
|
135846
|
-
const buffer3 =
|
|
135888
|
+
const buffer3 = readFileSync12(path);
|
|
135847
135889
|
return buffer3.toString("base64");
|
|
135848
135890
|
}
|
|
135849
135891
|
var messageSenders = {
|
|
@@ -137135,7 +137177,7 @@ async function cleanupLegacyArtifacts(skipList) {
|
|
|
137135
137177
|
init_output();
|
|
137136
137178
|
|
|
137137
137179
|
// src/update-diagnostics.ts
|
|
137138
|
-
import { existsSync as existsSync19, mkdirSync as mkdirSync11, readFileSync as
|
|
137180
|
+
import { existsSync as existsSync19, mkdirSync as mkdirSync11, readFileSync as readFileSync13, writeFileSync as writeFileSync10 } from "fs";
|
|
137139
137181
|
import { homedir as homedir13 } from "os";
|
|
137140
137182
|
import { join as join18 } from "path";
|
|
137141
137183
|
var UPDATE_DIAGNOSTICS_SCHEMA_VERSION = 1;
|
|
@@ -137170,7 +137212,7 @@ function tailFileLines(path, maxLines) {
|
|
|
137170
137212
|
if (!existsSync19(path))
|
|
137171
137213
|
return [];
|
|
137172
137214
|
try {
|
|
137173
|
-
const raw2 =
|
|
137215
|
+
const raw2 = readFileSync13(path, "utf8");
|
|
137174
137216
|
const lines = raw2.split(/\r?\n/);
|
|
137175
137217
|
if (lines.length > 0 && lines[lines.length - 1] === "")
|
|
137176
137218
|
lines.pop();
|
|
@@ -138010,7 +138052,7 @@ init_config();
|
|
|
138010
138052
|
init_output();
|
|
138011
138053
|
|
|
138012
138054
|
// src/manifest-pin.ts
|
|
138013
|
-
import { existsSync as existsSync21, readFileSync as
|
|
138055
|
+
import { existsSync as existsSync21, readFileSync as readFileSync14, renameSync as renameSync3, writeFileSync as writeFileSync11 } from "fs";
|
|
138014
138056
|
import { homedir as homedir14 } from "os";
|
|
138015
138057
|
import { join as join20 } from "path";
|
|
138016
138058
|
var PACKAGE_NAME2 = "@automagik/omni";
|
|
@@ -138020,7 +138062,7 @@ function pinManifestEntry(manifestPath, exactVersion) {
|
|
|
138020
138062
|
return false;
|
|
138021
138063
|
let manifest;
|
|
138022
138064
|
try {
|
|
138023
|
-
manifest = JSON.parse(
|
|
138065
|
+
manifest = JSON.parse(readFileSync14(manifestPath, "utf-8"));
|
|
138024
138066
|
} catch {
|
|
138025
138067
|
return false;
|
|
138026
138068
|
}
|
|
@@ -61,6 +61,10 @@ export interface MigrateOptions {
|
|
|
61
61
|
/** Logger sink — defaults to writing prefixed lines to process.stdout. */
|
|
62
62
|
log?: (line: string) => void;
|
|
63
63
|
}
|
|
64
|
+
/** Read the catalog major (e.g. 17, 18) recorded in a data dir's PG_VERSION. */
|
|
65
|
+
export declare function readDataDirMajor(dataDir: string): number | null;
|
|
66
|
+
/** Compare two `vX.Y.Z`-ish dir names numerically, newest first. */
|
|
67
|
+
export declare function compareVersionDesc(a: string, b: string): number;
|
|
64
68
|
/**
|
|
65
69
|
* Public entry point — call this from `omni doctor --fix` when the
|
|
66
70
|
* `embedded-data-orphaned` check FAILs (canonical omni DB empty AND
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedded-canonical-migration.d.ts","sourceRoot":"","sources":["../../src/lib/embedded-canonical-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAWH,MAAM,MAAM,eAAe,GACvB;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC1D;IAA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,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,MAAM,WAAW,cAAc;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAsB,gCAAgC,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAyDxG;AAED,wBAAsB,mCAAmC,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,eAAe,CAAC,CA6F7G;AAED,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,QAAe,CAAC"}
|
package/dist/runtime-env.d.ts
CHANGED
|
@@ -46,20 +46,20 @@ export type RuntimeEnv = {
|
|
|
46
46
|
LOG_LEVEL: string;
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
|
-
* Default pgserve port when none is set explicitly.
|
|
49
|
+
* Default pgserve port when none is set explicitly — the CANONICAL port.
|
|
50
50
|
*
|
|
51
51
|
* Phase 2 of the canonical-pgserve cutover (omni#595/#596/#597) used the
|
|
52
52
|
* bun-bridge port `8432`. Phase 3 (`pgserve-singleton-no-proxy`) lands the
|
|
53
|
-
* postmaster directly on **5432** (canonical postgres port) and listens
|
|
54
|
-
* on the canonical UDS at `$XDG_RUNTIME_DIR/pgserve/.s.PGSQL.5432`.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
53
|
+
* postmaster directly on **5432** (the canonical postgres port) and listens
|
|
54
|
+
* on the canonical UDS at `$XDG_RUNTIME_DIR/pgserve/.s.PGSQL.5432`. There is
|
|
55
|
+
* no embedded 8432 listener anymore, so the default MUST be canonical — a
|
|
56
|
+
* hardcoded 8432 here leaked into `resolvePgservePort` (→ the `PGSERVE_PORT`
|
|
57
|
+
* env that `omni doctor`'s `pgserve-reachable` check probes), making doctor
|
|
58
|
+
* false-FAIL "cannot connect to pgserve on :8432" on every healthy host.
|
|
59
|
+
* Stored `8432` entries in `~/.omni/config.json` are treated as a stale
|
|
60
|
+
* default and re-resolved by {@link resolveDatabaseUrl} (UDS-first).
|
|
61
61
|
*/
|
|
62
|
-
export declare const DEFAULT_PGSERVE_PORT =
|
|
62
|
+
export declare const DEFAULT_PGSERVE_PORT = 5432;
|
|
63
63
|
/** Canonical postgres TCP port the postmaster binds in singleton mode. */
|
|
64
64
|
export { CANONICAL_PG_PORT } from './lib/pgserve-transport.js';
|
|
65
65
|
/**
|
|
@@ -77,9 +77,13 @@ export declare function buildEmbeddedDatabaseUrl(pgservePort?: number): string;
|
|
|
77
77
|
export declare function buildCanonicalSocketDatabaseUrl(): string;
|
|
78
78
|
/**
|
|
79
79
|
* Extract the effective pgserve port. Honors an explicit override on the
|
|
80
|
-
* server config first (`server.pgservePort
|
|
81
|
-
*
|
|
82
|
-
*
|
|
80
|
+
* server config first (`server.pgservePort`), then falls back to
|
|
81
|
+
* {@link DEFAULT_PGSERVE_PORT} — which is now the CANONICAL port (5432), not
|
|
82
|
+
* the legacy 8432. This value feeds the runtime `PGSERVE_PORT` env that
|
|
83
|
+
* `omni doctor`'s `pgserve-reachable` check probes.
|
|
84
|
+
*
|
|
85
|
+
* This function intentionally does NOT read `process.env.PGSERVE_PORT` —
|
|
86
|
+
* env pollution is the bug we're fixing.
|
|
83
87
|
*/
|
|
84
88
|
export declare function resolvePgservePort(serverConfig: ServerConfig): number;
|
|
85
89
|
/**
|
|
@@ -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;AASxD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IAQrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,M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;;GAKG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAKxD;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAMrE;AAgBD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAiBrE;AAoBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAqCzF"}
|
package/dist/server/index.js
CHANGED
|
@@ -230186,7 +230186,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
230186
230186
|
var require_package8 = __commonJS((exports, module) => {
|
|
230187
230187
|
module.exports = {
|
|
230188
230188
|
name: "@omni/api",
|
|
230189
|
-
version: "2.
|
|
230189
|
+
version: "2.260525.1",
|
|
230190
230190
|
type: "module",
|
|
230191
230191
|
exports: {
|
|
230192
230192
|
".": {
|