@automagik/omni 2.260520.13 → 2.260520.15

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.
@@ -49,7 +49,7 @@ import { type EmbeddedDumpResult } from '../lib/canonical-pgserve.js';
49
49
  /** Severity levels reported by each check. */
50
50
  export type CheckLevel = 'OK' | 'WARN' | 'FAIL';
51
51
  /** Identifier used in tests and --json output. */
52
- export type CheckId = 'pm2-env-drift' | 'cli-key-valid' | 'pgserve-reachable' | 'omni-db-exists' | 'orphaned-data-dirs' | 'version-match' | 'pm2-status' | 'pm2-max-restarts' | 'pm2-logrotate-installed' | 'cli-signing-key-for-locked-instances' | 'pgserve-canonical' | 'port-canonical-owner';
52
+ export type CheckId = 'pm2-env-drift' | 'cli-key-valid' | 'pgserve-reachable' | 'omni-db-exists' | 'orphaned-data-dirs' | 'version-match' | 'pm2-status' | 'pm2-max-restarts' | 'pm2-logrotate-installed' | 'cli-signing-key-for-locked-instances' | 'pgserve-canonical' | 'port-canonical-owner' | 'embedded-data-orphaned';
53
53
  export interface CheckResult {
54
54
  id: CheckId;
55
55
  level: CheckLevel;
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAMH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EAKlB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,6BAA6B,CAAC;AAarC,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhD,kDAAkD;AAClD,MAAM,MAAM,OAAO,GACf,eAAe,GACf,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,oBAAoB,GACp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O,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAC3D;;;;;OAKG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACxD;;;;;OAKG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS,KAAK,OAAO,CAAC;CACtE;AA0iCD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAiBxG;AA2BD,wBAAgB,mBAAmB,IAAI,OAAO,CAiD7C"}
package/dist/index.js CHANGED
@@ -13153,10 +13153,10 @@ var require_nkeys = __commonJS((exports) => {
13153
13153
  return createPair(Prefix.Cluster);
13154
13154
  }
13155
13155
  exports.createCluster = createCluster;
13156
- function createServer() {
13156
+ function createServer2() {
13157
13157
  return createPair(Prefix.Server);
13158
13158
  }
13159
- exports.createServer = createServer;
13159
+ exports.createServer = createServer2;
13160
13160
  function createCurve() {
13161
13161
  return createPair(Prefix.Curve);
13162
13162
  }
@@ -22772,7 +22772,7 @@ var require_node_transport = __commonJS((exports) => {
22772
22772
  var util_1 = require_util();
22773
22773
  var tls_1 = __require("tls");
22774
22774
  var { resolve: resolve2 } = __require("path");
22775
- var { readFile, existsSync: existsSync12 } = __require("fs");
22775
+ var { readFile, existsSync: existsSync13 } = __require("fs");
22776
22776
  var dns = __require("dns");
22777
22777
  var VERSION2 = "2.29.3";
22778
22778
  var LANG = "nats.js";
@@ -22888,7 +22888,7 @@ var require_node_transport = __commonJS((exports) => {
22888
22888
  const d = (0, nats_base_client_1.deferred)();
22889
22889
  try {
22890
22890
  fn = resolve2(fn);
22891
- if (!existsSync12(fn)) {
22891
+ if (!existsSync13(fn)) {
22892
22892
  d.reject(new Error(`${fn} doesn't exist`));
22893
22893
  }
22894
22894
  readFile(fn, (err, data2) => {
@@ -61798,12 +61798,12 @@ class A2AClient {
61798
61798
  if (state === "completed" || state === "failed") {
61799
61799
  return this.taskToProviderResponse(task, taskId, startMs);
61800
61800
  }
61801
- await sleep2(POLL_INTERVAL_MS);
61801
+ await sleep3(POLL_INTERVAL_MS);
61802
61802
  }
61803
61803
  throw new ProviderError("A2A task polling exhausted", "TIMEOUT", undefined, { taskId });
61804
61804
  }
61805
61805
  }
61806
- function sleep2(ms) {
61806
+ function sleep3(ms) {
61807
61807
  return new Promise((resolve2) => setTimeout(resolve2, ms));
61808
61808
  }
61809
61809
  function createA2AClient(config2) {
@@ -61931,8 +61931,8 @@ var init_a2a_provider = __esm(() => {
61931
61931
 
61932
61932
  // ../core/src/providers/nats-genie-provider.ts
61933
61933
  import { mkdir, writeFile } from "fs/promises";
61934
- import { homedir as homedir9 } from "os";
61935
- import { join as join15 } from "path";
61934
+ import { homedir as homedir10 } from "os";
61935
+ import { join as join16 } from "path";
61936
61936
 
61937
61937
  class NatsGenieProvider {
61938
61938
  id;
@@ -62122,10 +62122,10 @@ class NatsGenieProvider {
62122
62122
  }
62123
62123
  async writeDeadLetter(payload, error2) {
62124
62124
  try {
62125
- const dlDir = join15(homedir9(), ".omni", "dead-letters");
62125
+ const dlDir = join16(homedir10(), ".omni", "dead-letters");
62126
62126
  await mkdir(dlDir, { recursive: true });
62127
62127
  const filename = `nats-genie-${Date.now()}-${payload.chatId}.json`;
62128
- await writeFile(join15(dlDir, filename), JSON.stringify({
62128
+ await writeFile(join16(dlDir, filename), JSON.stringify({
62129
62129
  payload,
62130
62130
  error: error2 instanceof Error ? error2.message : String(error2),
62131
62131
  timestamp: new Date().toISOString()
@@ -64004,7 +64004,7 @@ var init_sql = __esm(() => {
64004
64004
  return new SQL([new StringChunk(str)]);
64005
64005
  }
64006
64006
  sql2.raw = raw2;
64007
- function join16(chunks, separator) {
64007
+ function join17(chunks, separator) {
64008
64008
  const result = [];
64009
64009
  for (const [i6, chunk] of chunks.entries()) {
64010
64010
  if (i6 > 0 && separator !== undefined) {
@@ -64014,7 +64014,7 @@ var init_sql = __esm(() => {
64014
64014
  }
64015
64015
  return new SQL(result);
64016
64016
  }
64017
- sql2.join = join16;
64017
+ sql2.join = join17;
64018
64018
  function identifier(value) {
64019
64019
  return new Name(value);
64020
64020
  }
@@ -67241,7 +67241,7 @@ var init_select2 = __esm(() => {
67241
67241
  return (table2, on) => {
67242
67242
  const baseTableName = this.tableName;
67243
67243
  const tableName = getTableLikeName(table2);
67244
- if (typeof tableName === "string" && this.config.joins?.some((join16) => join16.alias === tableName)) {
67244
+ if (typeof tableName === "string" && this.config.joins?.some((join17) => join17.alias === tableName)) {
67245
67245
  throw new Error(`Alias "${tableName}" is already used in this query`);
67246
67246
  }
67247
67247
  if (!this.isPartialSelect) {
@@ -67752,7 +67752,7 @@ var init_update = __esm(() => {
67752
67752
  createJoin(joinType) {
67753
67753
  return (table2, on) => {
67754
67754
  const tableName = getTableLikeName(table2);
67755
- if (typeof tableName === "string" && this.config.joins.some((join16) => join16.alias === tableName)) {
67755
+ if (typeof tableName === "string" && this.config.joins.some((join17) => join17.alias === tableName)) {
67756
67756
  throw new Error(`Alias "${tableName}" is already used in this query`);
67757
67757
  }
67758
67758
  if (typeof on === "function") {
@@ -67802,10 +67802,10 @@ var init_update = __esm(() => {
67802
67802
  const fromFields = this.getTableLikeFields(this.config.from);
67803
67803
  fields[tableName] = fromFields;
67804
67804
  }
67805
- for (const join16 of this.config.joins) {
67806
- const tableName2 = getTableLikeName(join16.table);
67807
- if (typeof tableName2 === "string" && !is(join16.table, SQL)) {
67808
- const fromFields = this.getTableLikeFields(join16.table);
67805
+ for (const join17 of this.config.joins) {
67806
+ const tableName2 = getTableLikeName(join17.table);
67807
+ if (typeof tableName2 === "string" && !is(join17.table, SQL)) {
67808
+ const fromFields = this.getTableLikeFields(join17.table);
67809
67809
  fields[tableName2] = fromFields;
67810
67810
  }
67811
67811
  }
@@ -82474,7 +82474,7 @@ var require_path = __commonJS((exports) => {
82474
82474
  function isAbsolute(path) {
82475
82475
  return path.charAt(0) === "/";
82476
82476
  }
82477
- function join20(...args) {
82477
+ function join21(...args) {
82478
82478
  return normalizePath(args.join("/"));
82479
82479
  }
82480
82480
  function dirname6(path) {
@@ -82499,7 +82499,7 @@ var require_path = __commonJS((exports) => {
82499
82499
  exports.basename = basename6;
82500
82500
  exports.dirname = dirname6;
82501
82501
  exports.isAbsolute = isAbsolute;
82502
- exports.join = join20;
82502
+ exports.join = join21;
82503
82503
  exports.normalizePath = normalizePath;
82504
82504
  exports.relative = relative;
82505
82505
  exports.resolve = resolve4;
@@ -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.13",
124070
+ version: "2.260520.15",
124071
124071
  description: "LLM-optimized CLI for Omni",
124072
124072
  type: "module",
124073
124073
  bin: {
@@ -125451,7 +125451,14 @@ $$;`,
125451
125451
  `ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO "${roleName}";`,
125452
125452
  `ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT USAGE, SELECT, UPDATE ON SEQUENCES TO "${roleName}";`,
125453
125453
  `ALTER DEFAULT PRIVILEGES FOR ROLE "${roleName}" IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO "${roleName}";`,
125454
- `ALTER DEFAULT PRIVILEGES FOR ROLE "${roleName}" IN SCHEMA public GRANT USAGE, SELECT, UPDATE ON SEQUENCES TO "${roleName}";`
125454
+ `ALTER DEFAULT PRIVILEGES FOR ROLE "${roleName}" IN SCHEMA public GRANT USAGE, SELECT, UPDATE ON SEQUENCES TO "${roleName}";`,
125455
+ `CREATE SCHEMA IF NOT EXISTS drizzle AUTHORIZATION "${roleName}";`,
125456
+ `ALTER SCHEMA drizzle OWNER TO "${roleName}";`,
125457
+ `GRANT ALL ON SCHEMA drizzle TO "${roleName}";`,
125458
+ `GRANT ALL ON ALL TABLES IN SCHEMA drizzle TO "${roleName}";`,
125459
+ `GRANT ALL ON ALL SEQUENCES IN SCHEMA drizzle TO "${roleName}";`,
125460
+ `ALTER DEFAULT PRIVILEGES IN SCHEMA drizzle GRANT ALL ON TABLES TO "${roleName}";`,
125461
+ `ALTER DEFAULT PRIVILEGES IN SCHEMA drizzle GRANT ALL ON SEQUENCES TO "${roleName}";`
125455
125462
  ].join(`
125456
125463
  `);
125457
125464
  const grantsOk = await runPsql(grantsScript, { socketDir: opts.socketDir, port, database });
@@ -127882,9 +127889,9 @@ function createDeadLettersCommand() {
127882
127889
  }
127883
127890
 
127884
127891
  // src/commands/doctor.ts
127885
- import { existsSync as existsSync9, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
127886
- import { homedir as homedir7 } from "os";
127887
- import { join as join12, resolve } from "path";
127892
+ import { existsSync as existsSync10, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
127893
+ import { homedir as homedir8 } from "os";
127894
+ import { join as join13, resolve } from "path";
127888
127895
  init_config();
127889
127896
 
127890
127897
  // src/health.ts
@@ -129279,29 +129286,238 @@ function formatBytes(n) {
129279
129286
  return `${(n / 1024 / 1024 / 1024).toFixed(2)} GB`;
129280
129287
  }
129281
129288
 
129289
+ // src/lib/embedded-canonical-migration.ts
129290
+ import { spawn, spawnSync as spawnSync2 } from "child_process";
129291
+ import { existsSync as existsSync9, mkdtempSync } from "fs";
129292
+ import { createServer } from "net";
129293
+ import { homedir as homedir7, tmpdir } from "os";
129294
+ import { join as join11 } from "path";
129295
+ import { setTimeout as sleep2 } from "timers/promises";
129296
+ var EMBEDDED_DIR = join11(homedir7(), ".omni", "data", "pgserve");
129297
+ function defaultLog(line) {
129298
+ process.stdout.write(`${line}
129299
+ `);
129300
+ }
129301
+ function findAutopgPostgresBinary() {
129302
+ const autopgRoot = join11(homedir7(), ".local", "share", "autopg");
129303
+ if (!existsSync9(autopgRoot))
129304
+ return null;
129305
+ let bestPath = null;
129306
+ for (const entry of safeReaddir(autopgRoot)) {
129307
+ const candidate = join11(autopgRoot, entry, "postgres", "bin", "postgres");
129308
+ if (existsSync9(candidate))
129309
+ bestPath = candidate;
129310
+ }
129311
+ return bestPath;
129312
+ }
129313
+ function safeReaddir(path) {
129314
+ try {
129315
+ const { readdirSync: readdirSync2 } = __require("fs");
129316
+ return readdirSync2(path);
129317
+ } catch {
129318
+ return [];
129319
+ }
129320
+ }
129321
+ async function findFreePort() {
129322
+ return new Promise((resolve, reject) => {
129323
+ const server = createServer();
129324
+ server.unref();
129325
+ server.on("error", reject);
129326
+ server.listen(0, "127.0.0.1", () => {
129327
+ const addr = server.address();
129328
+ if (!addr || typeof addr === "string") {
129329
+ server.close();
129330
+ reject(new Error("failed to discover free port"));
129331
+ return;
129332
+ }
129333
+ const port = addr.port;
129334
+ server.close(() => resolve(port));
129335
+ });
129336
+ });
129337
+ }
129338
+ async function spawnTempPostmaster(binary, dataDir, port, log) {
129339
+ const socketDir = mkdtempSync(join11(tmpdir(), "omni-migrate-pg-"));
129340
+ log(` spawning temp postmaster: pid=\u2026 port=${port} socket=${socketDir}`);
129341
+ const child = spawn(binary, [
129342
+ "-D",
129343
+ dataDir,
129344
+ "-p",
129345
+ String(port),
129346
+ "-c",
129347
+ "listen_addresses=127.0.0.1",
129348
+ "-c",
129349
+ `unix_socket_directories=${socketDir}`
129350
+ ], {
129351
+ stdio: ["ignore", "pipe", "pipe"],
129352
+ detached: false
129353
+ });
129354
+ let started = false;
129355
+ let crashed = null;
129356
+ child.stderr?.on("data", (chunk) => {
129357
+ const line = chunk.toString("utf-8");
129358
+ if (!started && /database system is ready to accept connections/.test(line))
129359
+ started = true;
129360
+ });
129361
+ child.on("exit", (code) => {
129362
+ if (!started) {
129363
+ crashed = new Error(`temp postmaster exited with code ${code} before ready`);
129364
+ }
129365
+ });
129366
+ for (let i = 0;i < 200; i++) {
129367
+ if (started)
129368
+ break;
129369
+ if (crashed)
129370
+ throw crashed;
129371
+ await sleep2(100);
129372
+ }
129373
+ if (!started) {
129374
+ child.kill("SIGTERM");
129375
+ throw new Error("temp postmaster failed to become ready within 20s");
129376
+ }
129377
+ log(` temp postmaster ready (pid=${child.pid})`);
129378
+ return {
129379
+ pid: child.pid ?? -1,
129380
+ socketDir,
129381
+ async stop() {
129382
+ log(" stopping temp postmaster (SIGTERM)");
129383
+ child.kill("SIGTERM");
129384
+ await new Promise((resolve) => {
129385
+ const onExit2 = () => resolve();
129386
+ child.once("exit", onExit2);
129387
+ setTimeout(() => {
129388
+ child.kill("SIGKILL");
129389
+ onExit2();
129390
+ }, 1e4);
129391
+ });
129392
+ }
129393
+ };
129394
+ }
129395
+ function psqlCapture(args) {
129396
+ const result = spawnSync2("psql", args, {
129397
+ encoding: "utf-8",
129398
+ env: { ...process.env, PGPASSWORD: "postgres" },
129399
+ timeout: 60000
129400
+ });
129401
+ if (result.status !== 0) {
129402
+ throw new Error(`psql exited ${result.status}: ${result.stderr?.trim() ?? ""}`);
129403
+ }
129404
+ return result.stdout ?? "";
129405
+ }
129406
+ async function copyTable(table, srcArgs, dstArgs, log) {
129407
+ const src = spawn("psql", [...srcArgs, "-c", `\\copy public.${table} TO STDOUT`], {
129408
+ stdio: ["ignore", "pipe", "pipe"],
129409
+ env: { ...process.env, PGPASSWORD: "postgres" }
129410
+ });
129411
+ const dst = spawn("psql", [...dstArgs, "-c", `SET session_replication_role='replica';`, "-c", `\\copy public.${table} FROM STDIN`], {
129412
+ stdio: ["pipe", "pipe", "pipe"],
129413
+ env: { ...process.env, PGPASSWORD: "postgres" }
129414
+ });
129415
+ if (!src.stdout || !dst.stdin)
129416
+ throw new Error(`copy stream not available for ${table}`);
129417
+ src.stdout.pipe(dst.stdin);
129418
+ let dstErr = "";
129419
+ dst.stderr?.on("data", (b) => {
129420
+ dstErr += b.toString("utf-8");
129421
+ });
129422
+ const srcExited = new Promise((resolve) => src.once("exit", (code) => resolve(code ?? -1)));
129423
+ const dstExited = new Promise((resolve) => dst.once("exit", (code) => resolve(code ?? -1)));
129424
+ const [sc, dc] = await Promise.all([srcExited, dstExited]);
129425
+ if (sc !== 0 || dc !== 0) {
129426
+ throw new Error(`copy ${table} failed (src=${sc} dst=${dc}): ${dstErr.trim()}`);
129427
+ }
129428
+ log(` copied ${table}`);
129429
+ }
129430
+ function resetSequences(dstArgs, log) {
129431
+ const script = `
129432
+ SELECT format(
129433
+ 'SELECT setval(%L::regclass, GREATEST(COALESCE((SELECT max(%I) FROM %I.%I), 1), 1));',
129434
+ pg_get_serial_sequence(c.table_schema || '.' || c.table_name, c.column_name),
129435
+ c.column_name, c.table_schema, c.table_name
129436
+ )
129437
+ FROM information_schema.columns c
129438
+ WHERE pg_get_serial_sequence(c.table_schema || '.' || c.table_name, c.column_name) IS NOT NULL
129439
+ AND c.table_schema = 'public';
129440
+ `.trim();
129441
+ const lines = psqlCapture([...dstArgs, "-tAc", script]).split(`
129442
+ `).map((l) => l.trim()).filter(Boolean);
129443
+ if (lines.length === 0)
129444
+ return;
129445
+ log(` resetting ${lines.length} sequence(s)`);
129446
+ psqlCapture([...dstArgs, "-c", lines.join(`
129447
+ `)]);
129448
+ }
129449
+ async function migrateUnmountedEmbeddedToCanonical(opts = {}) {
129450
+ const log = opts.log ?? defaultLog;
129451
+ const canonicalPort = opts.canonicalPort ?? 5432;
129452
+ if (!existsSync9(EMBEDDED_DIR)) {
129453
+ return { status: "skipped", reason: "no embedded data dir" };
129454
+ }
129455
+ if (!existsSync9(join11(EMBEDDED_DIR, "PG_VERSION"))) {
129456
+ return { status: "skipped", reason: "embedded dir missing PG_VERSION" };
129457
+ }
129458
+ const binary = findAutopgPostgresBinary();
129459
+ if (!binary) {
129460
+ return { status: "skipped", reason: "autopg postgres binary not found \u2014 install autopg first" };
129461
+ }
129462
+ log(` using postgres binary: ${binary}`);
129463
+ const tempPort = await findFreePort();
129464
+ const t0 = Date.now();
129465
+ const temp = await spawnTempPostmaster(binary, EMBEDDED_DIR, tempPort, log);
129466
+ try {
129467
+ const srcBaseArgs = ["-h", "127.0.0.1", "-p", String(tempPort), "-U", "postgres", "-d", "omni"];
129468
+ const dstBaseArgs = ["-h", "127.0.0.1", "-p", String(canonicalPort), "-U", "postgres", "-d", "omni"];
129469
+ const tablesRaw = psqlCapture([
129470
+ ...srcBaseArgs,
129471
+ "-tAc",
129472
+ `SELECT tablename FROM pg_tables WHERE schemaname='public' ORDER BY tablename`
129473
+ ]);
129474
+ const tables = tablesRaw.split(`
129475
+ `).map((s) => s.trim()).filter(Boolean);
129476
+ if (tables.length === 0) {
129477
+ return { status: "skipped", reason: "embedded omni has no public tables" };
129478
+ }
129479
+ log(` ${tables.length} tables to migrate`);
129480
+ const truncateList = tables.map((t) => `public.${t}`).join(",");
129481
+ psqlCapture([
129482
+ ...dstBaseArgs,
129483
+ "-c",
129484
+ `SET session_replication_role='replica'; TRUNCATE ${truncateList} RESTART IDENTITY CASCADE;`
129485
+ ]);
129486
+ log(" truncated canonical (CASCADE)");
129487
+ for (const t of tables) {
129488
+ await copyTable(t, srcBaseArgs, dstBaseArgs, log);
129489
+ }
129490
+ resetSequences(dstBaseArgs, log);
129491
+ return { status: "migrated", tables: tables.length, durationMs: Date.now() - t0 };
129492
+ } finally {
129493
+ await temp.stop();
129494
+ }
129495
+ }
129496
+ var EMBEDDED_PGSERVE_DATA_DIR = EMBEDDED_DIR;
129497
+
129282
129498
  // src/commands/doctor.ts
129283
129499
  init_output();
129284
129500
 
129285
129501
  // src/server-bundle.ts
129286
129502
  init_output();
129287
- import { dirname as dirname2, join as join11 } from "path";
129503
+ import { dirname as dirname2, join as join12 } from "path";
129288
129504
  import { fileURLToPath as fileURLToPath2 } from "url";
129289
129505
  function getServerBundlePath() {
129290
129506
  try {
129291
129507
  const thisFile = fileURLToPath2(import.meta.url);
129292
129508
  const distDir = dirname2(thisFile);
129293
- return join11(distDir, "server", "index.js");
129509
+ return join12(distDir, "server", "index.js");
129294
129510
  } catch {
129295
- return join11(process.cwd(), "dist", "server", "index.js");
129511
+ return join12(process.cwd(), "dist", "server", "index.js");
129296
129512
  }
129297
129513
  }
129298
129514
  function getServerLauncherPath() {
129299
129515
  try {
129300
129516
  const thisFile = fileURLToPath2(import.meta.url);
129301
129517
  const distDir = dirname2(thisFile);
129302
- return join11(distDir, "..", "bin", "omni-server");
129518
+ return join12(distDir, "..", "bin", "omni-server");
129303
129519
  } catch {
129304
- return join11(process.cwd(), "bin", "omni-server");
129520
+ return join12(process.cwd(), "bin", "omni-server");
129305
129521
  }
129306
129522
  }
129307
129523
  function bundleNotFoundError(bundlePath) {
@@ -129366,10 +129582,10 @@ function productionDeps() {
129366
129582
  }
129367
129583
  },
129368
129584
  findOrphanedDataDirs: () => {
129369
- const roots = [process.cwd(), join12(homedir7(), "workspace"), join12(homedir7(), "repos")];
129585
+ const roots = [process.cwd(), join13(homedir8(), "workspace"), join13(homedir8(), "repos")];
129370
129586
  const found = [];
129371
129587
  for (const root of roots) {
129372
- if (!existsSync9(root))
129588
+ if (!existsSync10(root))
129373
129589
  continue;
129374
129590
  try {
129375
129591
  scanForOrphans(root, found, 0);
@@ -129477,7 +129693,7 @@ function scanForOrphans(dir, acc, depth, maxDepth = 4) {
129477
129693
  for (const name of entries) {
129478
129694
  if (name === "node_modules" || name === ".git")
129479
129695
  continue;
129480
- const full = join12(dir, name);
129696
+ const full = join13(dir, name);
129481
129697
  let stats;
129482
129698
  try {
129483
129699
  stats = statSync2(full);
@@ -129546,6 +129762,55 @@ async function checkOmniDbExists(deps) {
129546
129762
  }
129547
129763
  return { id: "omni-db-exists", level: "FAIL", detail: "omni database is not reachable" };
129548
129764
  }
129765
+ async function checkEmbeddedDataOrphaned(deps) {
129766
+ const { serverConfig } = deps.loadState();
129767
+ if (serverConfig.useCanonicalPgserve !== true) {
129768
+ return { id: "embedded-data-orphaned", level: "OK", detail: "embedded mode \u2014 no orphan check needed" };
129769
+ }
129770
+ if (!existsSync10(join13(EMBEDDED_PGSERVE_DATA_DIR, "PG_VERSION"))) {
129771
+ return { id: "embedded-data-orphaned", level: "OK", detail: "no embedded data dir present" };
129772
+ }
129773
+ if (!await deps.omniDbExists()) {
129774
+ return {
129775
+ id: "embedded-data-orphaned",
129776
+ level: "OK",
129777
+ detail: "canonical not reachable yet \u2014 embedded check deferred"
129778
+ };
129779
+ }
129780
+ try {
129781
+ const resp = await fetch(`http://127.0.0.1:${serverConfig.port}/api/v2/health`, {
129782
+ signal: AbortSignal.timeout(2000)
129783
+ });
129784
+ const body = await resp.json();
129785
+ const total = body?.instances?.total ?? 0;
129786
+ if (total === 0) {
129787
+ return {
129788
+ id: "embedded-data-orphaned",
129789
+ level: "FAIL",
129790
+ detail: `embedded dir at ${EMBEDDED_PGSERVE_DATA_DIR} holds data but canonical omni is empty \u2014 run \`omni doctor --fix\` to migrate`
129791
+ };
129792
+ }
129793
+ return {
129794
+ id: "embedded-data-orphaned",
129795
+ level: "OK",
129796
+ detail: `canonical omni already has ${total} instance(s)`
129797
+ };
129798
+ } catch {
129799
+ return { id: "embedded-data-orphaned", level: "OK", detail: "health endpoint unreachable \u2014 defer" };
129800
+ }
129801
+ }
129802
+ async function fixEmbeddedDataOrphaned(_deps) {
129803
+ raw(" Migrating unmounted embedded pgserve \u2192 canonical autopg...");
129804
+ const result = await migrateUnmountedEmbeddedToCanonical({
129805
+ log: (line) => raw(line)
129806
+ });
129807
+ if (result.status === "skipped") {
129808
+ throw new Error(`migration skipped: ${result.reason}`);
129809
+ }
129810
+ raw(` \u2713 migrated ${result.tables} tables in ${result.durationMs}ms`);
129811
+ raw(" Re-run `omni install --non-interactive` to re-apply scoped-role grants on the restored data.");
129812
+ return `migrated ${result.tables} tables from embedded to canonical (${result.durationMs}ms)`;
129813
+ }
129549
129814
  function checkOrphanedDataDirs(deps) {
129550
129815
  const found = deps.findOrphanedDataDirs();
129551
129816
  if (found.length === 0) {
@@ -129962,7 +130227,8 @@ async function runAllChecks(deps) {
129962
130227
  await checkPm2LogrotateInstalled(deps),
129963
130228
  await checkSigningKeyForLockedInstances(deps),
129964
130229
  checkPgserveCanonical(deps),
129965
- await checkPortCanonicalOwner(deps)
130230
+ await checkPortCanonicalOwner(deps),
130231
+ await checkEmbeddedDataOrphaned(deps)
129966
130232
  ];
129967
130233
  }
129968
130234
  async function applyFix(deps, check) {
@@ -129983,6 +130249,8 @@ async function applyFix(deps, check) {
129983
130249
  return await fixPortCanonicalOwner(deps);
129984
130250
  if (check.id === "pm2-status")
129985
130251
  return await fixPm2Status(deps);
130252
+ if (check.id === "embedded-data-orphaned")
130253
+ return await fixEmbeddedDataOrphaned(deps);
129986
130254
  return null;
129987
130255
  } catch (err) {
129988
130256
  const msg = err instanceof Error ? err.message : String(err);
@@ -130100,7 +130368,7 @@ Safety:
130100
130368
  }
130101
130369
 
130102
130370
  // src/commands/done.ts
130103
- import { existsSync as existsSync10, readFileSync as readFileSync6 } from "fs";
130371
+ import { existsSync as existsSync11, readFileSync as readFileSync6 } from "fs";
130104
130372
  import { basename, extname } from "path";
130105
130373
 
130106
130374
  // src/context.ts
@@ -130209,7 +130477,7 @@ async function handleReact(client, ctx, emoji) {
130209
130477
  await closeTurn(client, "react", `Reacted ${emoji} + turn closed`);
130210
130478
  }
130211
130479
  async function handleMedia(client, ctx, mediaPath, caption) {
130212
- if (!existsSync10(mediaPath)) {
130480
+ if (!existsSync11(mediaPath)) {
130213
130481
  return error(`File not found: ${mediaPath}`);
130214
130482
  }
130215
130483
  try {
@@ -130907,7 +131175,7 @@ function createHistoryCommand() {
130907
131175
 
130908
131176
  // src/commands/imagine.ts
130909
131177
  import { writeFileSync as writeFileSync8 } from "fs";
130910
- import { basename as basename2, dirname as dirname3, extname as extname2, join as join13 } from "path";
131178
+ import { basename as basename2, dirname as dirname3, extname as extname2, join as join14 } from "path";
130911
131179
  init_output();
130912
131180
  var ALLOWED_ASPECT_RATIOS = ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"];
130913
131181
  function extensionForMime(mimeType) {
@@ -130922,9 +131190,9 @@ function buildOutputPath(outputBase, index, total, mimeType) {
130922
131190
  const ext = extname2(outputBase) || extensionForMime(mimeType);
130923
131191
  const stem = basename2(outputBase, extname2(outputBase));
130924
131192
  if (total <= 1) {
130925
- return join13(dir, `${stem}${ext}`);
131193
+ return join14(dir, `${stem}${ext}`);
130926
131194
  }
130927
- return join13(dir, `${stem}-${index + 1}${ext}`);
131195
+ return join14(dir, `${stem}-${index + 1}${ext}`);
130928
131196
  }
130929
131197
  function parseAspectRatio(value) {
130930
131198
  if (!value)
@@ -131042,12 +131310,12 @@ function createImagineCommand() {
131042
131310
  }
131043
131311
 
131044
131312
  // src/commands/install.ts
131045
- import { existsSync as existsSync11, mkdirSync as mkdirSync6 } from "fs";
131046
- import { homedir as homedir8 } from "os";
131047
- import { join as join14 } from "path";
131313
+ import { existsSync as existsSync12, mkdirSync as mkdirSync6 } from "fs";
131314
+ import { homedir as homedir9 } from "os";
131315
+ import { join as join15 } from "path";
131048
131316
  init_config();
131049
131317
  init_output();
131050
- var DEFAULT_DATA_DIR2 = join14(homedir8(), ".omni", "data");
131318
+ var DEFAULT_DATA_DIR2 = join15(homedir9(), ".omni", "data");
131051
131319
  function computeDefaultDatabaseUrl() {
131052
131320
  return buildEmbeddedDatabaseUrl();
131053
131321
  }
@@ -131146,7 +131414,7 @@ async function startServices(cfg, forceCleanup, forceSystemd, useCanonicalPgserv
131146
131414
  return false;
131147
131415
  }
131148
131416
  const bundlePath = getServerBundlePath();
131149
- if (!existsSync11(bundlePath)) {
131417
+ if (!existsSync12(bundlePath)) {
131150
131418
  warn(`Server bundle not found at: ${bundlePath}
131151
131419
  Install @automagik/omni from npm: bun add -g @automagik/omni
131152
131420
  Or build locally: make cli-build-full`);
@@ -131170,9 +131438,9 @@ async function startServices(cfg, forceCleanup, forceSystemd, useCanonicalPgserv
131170
131438
  return false;
131171
131439
  }
131172
131440
  apiSpinner.succeed(`${PM2_PROCESSES.api} started`);
131173
- if (existsSync11(NATS_BINARY_PATH)) {
131441
+ if (existsSync12(NATS_BINARY_PATH)) {
131174
131442
  const natsSpinner = ora(`Starting ${PM2_PROCESSES.nats}...`).start();
131175
- const natsDataDir = join14(cfg.dataDir, "nats");
131443
+ const natsDataDir = join15(cfg.dataDir, "nats");
131176
131444
  mkdirSync6(natsDataDir, { recursive: true });
131177
131445
  const natsArgs = buildPm2StartArgs({
131178
131446
  kind: "nats",
@@ -132849,7 +133117,7 @@ function createLogsCommand() {
132849
133117
  }
132850
133118
 
132851
133119
  // src/commands/media.ts
132852
- import { createWriteStream as createWriteStream2, existsSync as existsSync13, mkdirSync as mkdirSync8, statSync as statSync4 } from "fs";
133120
+ import { createWriteStream as createWriteStream2, existsSync as existsSync14, mkdirSync as mkdirSync8, statSync as statSync4 } from "fs";
132853
133121
  import { basename as basename4, dirname as dirname4, resolve as resolve2 } from "path";
132854
133122
  import { Readable } from "stream";
132855
133123
  import { pipeline } from "stream/promises";
@@ -132912,13 +133180,13 @@ function resolveOutputPath(outputPath, result) {
132912
133180
  const resolved = resolve2(outputPath);
132913
133181
  if (isDirHint)
132914
133182
  return resolve2(resolved, filename);
132915
- if (existsSync13(resolved) && statSync4(resolved).isDirectory())
133183
+ if (existsSync14(resolved) && statSync4(resolved).isDirectory())
132916
133184
  return resolve2(resolved, filename);
132917
133185
  return resolved;
132918
133186
  }
132919
133187
  async function downloadToFile(url, apiKey, destinationPath) {
132920
133188
  const destDir = dirname4(destinationPath);
132921
- if (!existsSync13(destDir))
133189
+ if (!existsSync14(destDir))
132922
133190
  mkdirSync8(destDir, { recursive: true });
132923
133191
  const resp = await fetch(url, {
132924
133192
  method: "GET",
@@ -133872,8 +134140,8 @@ init_output();
133872
134140
  init_src();
133873
134141
  import { execFileSync as execFileSync3, execSync } from "child_process";
133874
134142
  import * as nodeCrypto2 from "crypto";
133875
- import { existsSync as existsSync14, mkdirSync as mkdirSync9, readFileSync as readFileSync9, writeFileSync as writeFileSync9 } from "fs";
133876
- import { homedir as homedir10 } from "os";
134143
+ import { existsSync as existsSync15, mkdirSync as mkdirSync9, readFileSync as readFileSync9, writeFileSync as writeFileSync9 } from "fs";
134144
+ import { homedir as homedir11 } from "os";
133877
134145
  import { dirname as dirname5, resolve as resolve3 } from "path";
133878
134146
  import { createInterface as createInterface2 } from "readline";
133879
134147
  init_config();
@@ -134100,10 +134368,10 @@ async function pairDevice(gatewayUrl, gatewayToken, keypair, spinner) {
134100
134368
  ws.close(1000, "pairing complete");
134101
134369
  }
134102
134370
  }
134103
- var OPENCLAW_CONFIG_PATH = resolve3(homedir10(), ".openclaw", "openclaw.json");
134371
+ var OPENCLAW_CONFIG_PATH = resolve3(homedir11(), ".openclaw", "openclaw.json");
134104
134372
  var PLUGIN_MARKER = "plugin-openclaw/omni.ts";
134105
134373
  function readOpenClawConfig(configPath) {
134106
- if (!existsSync14(configPath))
134374
+ if (!existsSync15(configPath))
134107
134375
  return {};
134108
134376
  const raw2 = readFileSync9(configPath, "utf-8").trim();
134109
134377
  if (!raw2)
@@ -134144,10 +134412,10 @@ function isValidUuid2(value) {
134144
134412
  }
134145
134413
  function resolvePluginPath(explicit) {
134146
134414
  if (explicit) {
134147
- return existsSync14(explicit) ? resolve3(explicit) : null;
134415
+ return existsSync15(explicit) ? resolve3(explicit) : null;
134148
134416
  }
134149
134417
  const cwdCandidate = resolve3(process.cwd(), "packages/plugin-openclaw/omni.ts");
134150
- return existsSync14(cwdCandidate) ? cwdCandidate : null;
134418
+ return existsSync15(cwdCandidate) ? cwdCandidate : null;
134151
134419
  }
134152
134420
  function registerPlugin(config2, pluginPath, configPath) {
134153
134421
  if (hasOpenClawCli()) {
@@ -134857,7 +135125,7 @@ ${formatExamples(examples)}`);
134857
135125
  }
134858
135126
 
134859
135127
  // src/lib/requirements.ts
134860
- import { spawn } from "child_process";
135128
+ import { spawn as spawn2 } from "child_process";
134861
135129
  var REQUIREMENTS = Object.freeze({
134862
135130
  pgserve: ">=2.3",
134863
135131
  genie: ">=5.0"
@@ -134901,7 +135169,7 @@ function fetchPeerVersion(binary) {
134901
135169
  let settled = false;
134902
135170
  let stdout = "";
134903
135171
  let stderr = "";
134904
- const proc = spawn(binary, ["--version"], { stdio: ["ignore", "pipe", "pipe"] });
135172
+ const proc = spawn2(binary, ["--version"], { stdio: ["ignore", "pipe", "pipe"] });
134905
135173
  const timer2 = setTimeout(() => {
134906
135174
  if (settled)
134907
135175
  return;
@@ -135197,7 +135465,7 @@ function createSayCommand() {
135197
135465
  }
135198
135466
 
135199
135467
  // src/commands/see.ts
135200
- import { existsSync as existsSync15, readFileSync as readFileSync10, statSync as statSync5 } from "fs";
135468
+ import { existsSync as existsSync16, readFileSync as readFileSync10, statSync as statSync5 } from "fs";
135201
135469
  import { extname as extname4 } from "path";
135202
135470
  init_output();
135203
135471
  var MIME_BY_EXT = {
@@ -135229,7 +135497,7 @@ function parseMaxTokens(value) {
135229
135497
  return n2;
135230
135498
  }
135231
135499
  function loadMedia(file) {
135232
- if (!existsSync15(file)) {
135500
+ if (!existsSync16(file)) {
135233
135501
  error(`File not found: ${file}`);
135234
135502
  }
135235
135503
  const stat = statSync5(file);
@@ -135315,7 +135583,7 @@ function createSeeCommand() {
135315
135583
  }
135316
135584
 
135317
135585
  // src/commands/send.ts
135318
- import { existsSync as existsSync16, readFileSync as readFileSync11 } from "fs";
135586
+ import { existsSync as existsSync17, readFileSync as readFileSync11 } from "fs";
135319
135587
  import { basename as basename5, extname as extname5 } from "path";
135320
135588
  init_source();
135321
135589
  init_config();
@@ -135356,7 +135624,7 @@ var messageSenders = {
135356
135624
  const { to, media } = options3;
135357
135625
  if (!to || !media)
135358
135626
  return;
135359
- if (!existsSync16(media)) {
135627
+ if (!existsSync17(media)) {
135360
135628
  error(`File not found: ${media}`);
135361
135629
  return;
135362
135630
  }
@@ -135888,9 +136156,9 @@ function pickFilename(mimeType, provider) {
135888
136156
  }
135889
136157
 
135890
136158
  // src/commands/start.ts
135891
- import { existsSync as existsSync17, mkdirSync as mkdirSync10 } from "fs";
135892
- import { homedir as homedir11 } from "os";
135893
- import { join as join16 } from "path";
136159
+ import { existsSync as existsSync18, mkdirSync as mkdirSync10 } from "fs";
136160
+ import { homedir as homedir12 } from "os";
136161
+ import { join as join17 } from "path";
135894
136162
  init_config();
135895
136163
  init_output();
135896
136164
  var START_HEALTH_TIMEOUT_MS = 1e4;
@@ -135899,7 +136167,7 @@ async function runStart() {
135899
136167
  pm2NotFoundError();
135900
136168
  }
135901
136169
  const bundlePath = getServerBundlePath();
135902
- if (!existsSync17(bundlePath)) {
136170
+ if (!existsSync18(bundlePath)) {
135903
136171
  bundleNotFoundError(bundlePath);
135904
136172
  }
135905
136173
  const serverConfig = loadServerConfig();
@@ -135920,10 +136188,10 @@ async function runStart() {
135920
136188
  error(`Failed to start ${PM2_PROCESSES.api} (pm2 exit code ${apiCode})`, undefined, 1);
135921
136189
  return;
135922
136190
  }
135923
- const natsPath = join16(homedir11(), ".omni", "nats-server");
135924
- if (existsSync17(natsPath)) {
136191
+ const natsPath = join17(homedir12(), ".omni", "nats-server");
136192
+ if (existsSync18(natsPath)) {
135925
136193
  info(`Starting ${PM2_PROCESSES.nats}...`);
135926
- const natsDataDir = join16(serverConfig.dataDir, "nats");
136194
+ const natsDataDir = join17(serverConfig.dataDir, "nats");
135927
136195
  mkdirSync10(natsDataDir, { recursive: true });
135928
136196
  const natsArgs = buildPm2StartArgs({
135929
136197
  kind: "nats",
@@ -136344,8 +136612,8 @@ function createTurnsCommand() {
136344
136612
  }
136345
136613
 
136346
136614
  // src/commands/update.ts
136347
- import { existsSync as existsSync19 } from "fs";
136348
- import { join as join18 } from "path";
136615
+ import { existsSync as existsSync20 } from "fs";
136616
+ import { join as join19 } from "path";
136349
136617
  import { createInterface as createInterface3 } from "readline";
136350
136618
  init_source();
136351
136619
  init_config();
@@ -136627,9 +136895,9 @@ async function cleanupLegacyArtifacts(skipList) {
136627
136895
  init_output();
136628
136896
 
136629
136897
  // src/update-diagnostics.ts
136630
- import { existsSync as existsSync18, mkdirSync as mkdirSync11, readFileSync as readFileSync12, writeFileSync as writeFileSync10 } from "fs";
136631
- import { homedir as homedir12 } from "os";
136632
- import { join as join17 } from "path";
136898
+ import { existsSync as existsSync19, mkdirSync as mkdirSync11, readFileSync as readFileSync12, writeFileSync as writeFileSync10 } from "fs";
136899
+ import { homedir as homedir13 } from "os";
136900
+ import { join as join18 } from "path";
136633
136901
  var UPDATE_DIAGNOSTICS_SCHEMA_VERSION = 1;
136634
136902
  function createDiagnostics(args) {
136635
136903
  const startedAt = new Date().toISOString();
@@ -136651,15 +136919,15 @@ function createDiagnostics(args) {
136651
136919
  };
136652
136920
  }
136653
136921
  function getDiagnosticsDir() {
136654
- const base = process.env.OMNI_CONFIG_DIR ?? join17(homedir12(), ".omni");
136655
- return join17(base, "logs");
136922
+ const base = process.env.OMNI_CONFIG_DIR ?? join18(homedir13(), ".omni");
136923
+ return join18(base, "logs");
136656
136924
  }
136657
136925
  function getDiagnosticsPath(startedAt) {
136658
136926
  const safe = startedAt.replace(/:/g, "-");
136659
- return join17(getDiagnosticsDir(), `update-diagnostics-${safe}.json`);
136927
+ return join18(getDiagnosticsDir(), `update-diagnostics-${safe}.json`);
136660
136928
  }
136661
136929
  function tailFileLines(path, maxLines) {
136662
- if (!existsSync18(path))
136930
+ if (!existsSync19(path))
136663
136931
  return [];
136664
136932
  try {
136665
136933
  const raw2 = readFileSync12(path, "utf8");
@@ -136695,7 +136963,7 @@ function writeDiagnostics(state, exitCode) {
136695
136963
  const dir = getDiagnosticsDir();
136696
136964
  const path = getDiagnosticsPath(state.startedAt);
136697
136965
  try {
136698
- if (!existsSync18(dir)) {
136966
+ if (!existsSync19(dir)) {
136699
136967
  mkdirSync11(dir, { recursive: true, mode: 448 });
136700
136968
  }
136701
136969
  writeFileSync10(path, `${JSON.stringify(state, null, 2)}
@@ -136869,7 +137137,7 @@ function printVerifySkippedBanner(latest) {
136869
137137
  }
136870
137138
  function detectParallelNpmGlobalInstall(deps) {
136871
137139
  const npmRootFn = deps?.npmRoot ?? defaultNpmRoot;
136872
- const existsFn = deps?.exists ?? existsSync19;
137140
+ const existsFn = deps?.exists ?? existsSync20;
136873
137141
  let root;
136874
137142
  try {
136875
137143
  root = npmRootFn();
@@ -136879,7 +137147,7 @@ function detectParallelNpmGlobalInstall(deps) {
136879
137147
  if (root === null || root.length === 0) {
136880
137148
  return { detected: false, skipped: "npm-not-on-path" };
136881
137149
  }
136882
- const candidate = join18(root, "@automagik", "omni");
137150
+ const candidate = join19(root, "@automagik", "omni");
136883
137151
  if (existsFn(candidate)) {
136884
137152
  return { detected: true, path: candidate };
136885
137153
  }
@@ -137502,13 +137770,13 @@ init_config();
137502
137770
  init_output();
137503
137771
 
137504
137772
  // src/manifest-pin.ts
137505
- import { existsSync as existsSync20, readFileSync as readFileSync13, renameSync as renameSync3, writeFileSync as writeFileSync11 } from "fs";
137506
- import { homedir as homedir13 } from "os";
137507
- import { join as join19 } from "path";
137773
+ import { existsSync as existsSync21, readFileSync as readFileSync13, renameSync as renameSync3, writeFileSync as writeFileSync11 } from "fs";
137774
+ import { homedir as homedir14 } from "os";
137775
+ import { join as join20 } from "path";
137508
137776
  var PACKAGE_NAME2 = "@automagik/omni";
137509
- var BUN_GLOBAL_MANIFEST = join19(homedir13(), ".bun", "install", "global", "package.json");
137777
+ var BUN_GLOBAL_MANIFEST = join20(homedir14(), ".bun", "install", "global", "package.json");
137510
137778
  function pinManifestEntry(manifestPath, exactVersion) {
137511
- if (!existsSync20(manifestPath))
137779
+ if (!existsSync21(manifestPath))
137512
137780
  return false;
137513
137781
  let manifest;
137514
137782
  try {
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Embedded → canonical migration for the "unmounted embedded dir" path.
3
+ *
4
+ * Background
5
+ * ----------
6
+ * The original `fixPgserveCanonical` flow (canonical-pgserve.ts +
7
+ * doctor.ts) assumes the embedded pgserve is LIVE: omni-api is running
8
+ * against it, pg_dump connects to the live instance, then we stop
9
+ * omni-api, set up canonical, restore, restart on canonical. That
10
+ * worked through the singleton-no-proxy cutover when omni-api could
11
+ * still spawn embedded.
12
+ *
13
+ * Phase 3 (`pgserve-singleton-no-proxy` G2) deleted omni-api's
14
+ * embedded-spawn code. That leaves a regression for any operator who:
15
+ * - Has `useCanonicalPgserve: true` in config (cutover already
16
+ * "succeeded" structurally) but
17
+ * - Never actually moved data — their 8.4 GB sits at
18
+ * `~/.omni/data/pgserve/` as an unmounted postmaster data dir
19
+ * - The canonical `omni` database on autopg is empty
20
+ *
21
+ * Found during Felipe's 2026-05-20 dogfood: omni-api boots cleanly on
22
+ * canonical but `omni instances list` returns nothing — the data is
23
+ * stranded.
24
+ *
25
+ * Solution
26
+ * --------
27
+ * Spawn autopg's bundled `postgres` binary against the unmounted embedded
28
+ * data dir on a free TCP port, copy every public-schema table over to
29
+ * canonical via psql `COPY ... TO STDOUT | COPY ... FROM STDIN` pipes
30
+ * (psql 17 happily connects to a PG18 server — only pg_dump is strict),
31
+ * then shut the temp postmaster down. Postgres version compatibility is
32
+ * sidestepped: both embedded and canonical use the same autopg-bundled
33
+ * postgres binary on this host.
34
+ *
35
+ * Idempotency: caller is expected to gate on `canonical omni DB is
36
+ * empty + embedded dir has data` so re-running this isn't destructive.
37
+ * Within this function: TRUNCATE CASCADE before COPY, sequence reset
38
+ * after.
39
+ *
40
+ * Safety:
41
+ * - Temp postmaster binds 127.0.0.1 only, on a free ephemeral port
42
+ * - Spawned with `unix_socket_directories=/tmp/<unique>` to avoid
43
+ * colliding with canonical's socket dir
44
+ * - Caller takes a snapshot of `~/.omni/data/pgserve/` before invoking
45
+ * (recommended) — this code does NOT mutate the embedded dir
46
+ * - Temp postmaster gets SIGTERM in `finally`; on hard crash the
47
+ * leftover postmaster.pid is recovered by the next spawn attempt
48
+ * (postgres self-heals stale pidfiles on startup)
49
+ */
50
+ export type MigrationResult = {
51
+ status: 'migrated';
52
+ tables: number;
53
+ durationMs: number;
54
+ } | {
55
+ status: 'skipped';
56
+ reason: string;
57
+ };
58
+ export interface MigrateOptions {
59
+ /** TCP port the canonical postmaster is bound on (autopg default 5432). */
60
+ canonicalPort?: number;
61
+ /** Logger sink — defaults to writing prefixed lines to process.stdout. */
62
+ log?: (line: string) => void;
63
+ }
64
+ /**
65
+ * Public entry point — call this from `omni doctor --fix` when the
66
+ * `embedded-data-orphaned` check FAILs (canonical omni DB empty AND
67
+ * embedded dir has valid pg data).
68
+ *
69
+ * Returns `{ status: 'skipped', reason }` for any precondition mismatch
70
+ * so callers can present an actionable diagnostic without aborting the
71
+ * larger --fix run.
72
+ */
73
+ export declare function migrateUnmountedEmbeddedToCanonical(opts?: MigrateOptions): Promise<MigrationResult>;
74
+ /** Re-export the constant so callers / tests can probe the same path. */
75
+ export declare const EMBEDDED_PGSERVE_DATA_DIR: string;
76
+ //# sourceMappingURL=embedded-canonical-migration.d.ts.map
@@ -0,0 +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;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AA0MD;;;;;;;;GAQG;AACH,wBAAsB,mCAAmC,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,eAAe,CAAC,CA+D7G;AAED,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,QAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"role-cutover.d.ts","sourceRoot":"","sources":["../../src/lib/role-cutover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAmEH,MAAM,WAAW,uBAAuB;IACtC,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,aAAa,EAAE,MAAM,CAAC;CACvB;AA+DD,MAAM,WAAW,2BAA2B;IAC1C,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,0BAA0B,GAClC;IAAE,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACzD;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1C;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAsFjH;AA0CD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,IAAI,wBAAwB,GAAG,IAAI,CAc9E"}
1
+ {"version":3,"file":"role-cutover.d.ts","sourceRoot":"","sources":["../../src/lib/role-cutover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAmEH,MAAM,WAAW,uBAAuB;IACtC,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,aAAa,EAAE,MAAM,CAAC;CACvB;AA+DD,MAAM,WAAW,2BAA2B;IAC1C,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,0BAA0B,GAClC;IAAE,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACzD;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1C;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CA0GjH;AA0CD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,IAAI,wBAAwB,GAAG,IAAI,CAc9E"}
@@ -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.13",
230140
+ version: "2.260520.15",
230141
230141
  type: "module",
230142
230142
  exports: {
230143
230143
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/omni",
3
- "version": "2.260520.13",
3
+ "version": "2.260520.15",
4
4
  "description": "LLM-optimized CLI for Omni",
5
5
  "type": "module",
6
6
  "bin": {