@automagik/omni 2.260502.1 → 2.260502.2
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/commands/update.d.ts +13 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/index.js +70 -2
- package/dist/server/index.js +1 -1
- package/package.json +10 -10
|
@@ -77,5 +77,18 @@ export declare function decideUpdateVerify(args: {
|
|
|
77
77
|
/** Error message strings — exported for tests and documentation. */
|
|
78
78
|
export declare function updateErrorVersionMismatch(cli: string, server: string | null): string;
|
|
79
79
|
export declare const UPDATE_ERROR_AUTH_INVALID = "Auth key invalid after restart. Run: omni doctor --fix";
|
|
80
|
+
/**
|
|
81
|
+
* Halt updates that would cross the phase-2 default-flip cutoff on hosts
|
|
82
|
+
* still running legacy embedded pgserve without the canonical binary
|
|
83
|
+
* available.
|
|
84
|
+
*
|
|
85
|
+
* Returns null when safe to proceed; otherwise an actionable error message.
|
|
86
|
+
*/
|
|
87
|
+
export declare function checkCanonicalPgservePreflight(args: {
|
|
88
|
+
currentVersion: string;
|
|
89
|
+
targetVersion: string;
|
|
90
|
+
useCanonicalPgserve: boolean | undefined;
|
|
91
|
+
pgserveOnPath: boolean;
|
|
92
|
+
}): string | null;
|
|
80
93
|
export declare function createUpdateCommand(): Command;
|
|
81
94
|
//# sourceMappingURL=update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,MAAM,EAA4C,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,OAAO,EAAE,OAAO,E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;AAED,eAAO,MAAM,yBAAyB,2DAA2D,CAAC;AA+MlG;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,OAAO,GAAG,SAAS,CAAC;IACzC,aAAa,EAAE,OAAO,CAAC;CACxB,GAAG,MAAM,GAAG,IAAI,CAkChB;AAuFD,wBAAgB,mBAAmB,IAAI,OAAO,CAoD7C"}
|
package/dist/index.js
CHANGED
|
@@ -114209,7 +114209,7 @@ import { fileURLToPath } from "url";
|
|
|
114209
114209
|
// package.json
|
|
114210
114210
|
var package_default = {
|
|
114211
114211
|
name: "@automagik/omni",
|
|
114212
|
-
version: "2.260502.
|
|
114212
|
+
version: "2.260502.2",
|
|
114213
114213
|
description: "LLM-optimized CLI for Omni",
|
|
114214
114214
|
type: "module",
|
|
114215
114215
|
bin: {
|
|
@@ -126226,6 +126226,61 @@ async function promptConfirm(question) {
|
|
|
126226
126226
|
});
|
|
126227
126227
|
});
|
|
126228
126228
|
}
|
|
126229
|
+
var PHASE_2_CUTOFF_MINOR = 260502;
|
|
126230
|
+
function isAtOrPastPhase2(version2) {
|
|
126231
|
+
const [_major, minorStr] = version2.split(".");
|
|
126232
|
+
const minor = Number.parseInt(minorStr ?? "", 10);
|
|
126233
|
+
if (!Number.isFinite(minor))
|
|
126234
|
+
return false;
|
|
126235
|
+
return minor >= PHASE_2_CUTOFF_MINOR;
|
|
126236
|
+
}
|
|
126237
|
+
function isPgserveOnPath() {
|
|
126238
|
+
try {
|
|
126239
|
+
const result = Bun.spawnSync({
|
|
126240
|
+
cmd: ["pgserve", "port"],
|
|
126241
|
+
stdout: "pipe",
|
|
126242
|
+
stderr: "pipe",
|
|
126243
|
+
timeout: 3000
|
|
126244
|
+
});
|
|
126245
|
+
return result.exitCode === 0;
|
|
126246
|
+
} catch {
|
|
126247
|
+
return false;
|
|
126248
|
+
}
|
|
126249
|
+
}
|
|
126250
|
+
function checkCanonicalPgservePreflight(args) {
|
|
126251
|
+
if (isAtOrPastPhase2(args.currentVersion))
|
|
126252
|
+
return null;
|
|
126253
|
+
if (!isAtOrPastPhase2(args.targetVersion))
|
|
126254
|
+
return null;
|
|
126255
|
+
if (args.useCanonicalPgserve === true)
|
|
126256
|
+
return null;
|
|
126257
|
+
if (args.useCanonicalPgserve === false)
|
|
126258
|
+
return null;
|
|
126259
|
+
if (args.pgserveOnPath)
|
|
126260
|
+
return null;
|
|
126261
|
+
return [
|
|
126262
|
+
"Refusing to upgrade \u2014 this would break omni-api on next restart.",
|
|
126263
|
+
"",
|
|
126264
|
+
` Target version v${args.targetVersion} ships the phase-2 canonical-pgserve default flip`,
|
|
126265
|
+
" (omni#596). Your current install has `useCanonicalPgserve` unset and no `pgserve`",
|
|
126266
|
+
" binary on PATH, so omni-api would boot with PGSERVE_EMBEDDED=false and fail to",
|
|
126267
|
+
" connect to a non-existent canonical pgserve.",
|
|
126268
|
+
"",
|
|
126269
|
+
" Pick one of:",
|
|
126270
|
+
"",
|
|
126271
|
+
" (recommended) Migrate to canonical pgserve:",
|
|
126272
|
+
" bun add -g pgserve@^2.1.0",
|
|
126273
|
+
" omni doctor --fix # automated pg_dump \u2192 install \u2192 restore",
|
|
126274
|
+
" omni update # then re-run",
|
|
126275
|
+
"",
|
|
126276
|
+
" (transitional) Pin embedded explicitly:",
|
|
126277
|
+
" omni config set server.useCanonicalPgserve 'false'",
|
|
126278
|
+
" omni update # then re-run",
|
|
126279
|
+
"",
|
|
126280
|
+
" Bypass this check (NOT recommended) with: omni update --skip-canonical-preflight"
|
|
126281
|
+
].join(`
|
|
126282
|
+
`);
|
|
126283
|
+
}
|
|
126229
126284
|
async function runUpdate(options3) {
|
|
126230
126285
|
const channel2 = resolveChannel(options3);
|
|
126231
126286
|
if (options3.next || options3.stable) {
|
|
@@ -126244,6 +126299,19 @@ async function runUpdate(options3) {
|
|
|
126244
126299
|
success(`Already up to date (v${latest}, channel: ${channel2})`);
|
|
126245
126300
|
process.exit(0);
|
|
126246
126301
|
}
|
|
126302
|
+
if (!options3.skipCanonicalPreflight) {
|
|
126303
|
+
const serverConfig = loadServerConfig();
|
|
126304
|
+
const preflightError = checkCanonicalPgservePreflight({
|
|
126305
|
+
currentVersion: currentClean,
|
|
126306
|
+
targetVersion: latest,
|
|
126307
|
+
useCanonicalPgserve: serverConfig.useCanonicalPgserve,
|
|
126308
|
+
pgserveOnPath: isPgserveOnPath()
|
|
126309
|
+
});
|
|
126310
|
+
if (preflightError !== null) {
|
|
126311
|
+
warn(preflightError);
|
|
126312
|
+
process.exit(1);
|
|
126313
|
+
}
|
|
126314
|
+
}
|
|
126247
126315
|
info(`Update available: v${currentClean} \u2192 v${latest} (${channel2})`);
|
|
126248
126316
|
if (!options3.yes) {
|
|
126249
126317
|
const confirmed = await promptConfirm(`Update from v${currentClean} to v${latest}? [Y/n] `);
|
|
@@ -126269,7 +126337,7 @@ async function runUpdate(options3) {
|
|
|
126269
126337
|
success(`omni updated to v${latest}`);
|
|
126270
126338
|
}
|
|
126271
126339
|
function createUpdateCommand() {
|
|
126272
|
-
return new Command("update").description(`Update ${PACKAGE_NAME} to the latest version (restart only services already running)`).option("-y, --yes", "Skip confirmation prompts (non-interactive)").option("--no-restart", "Update CLI only; skip service restarts and verification").option("--no-sidecar-cleanup", "Skip the legacy nats-reply-sidecar.mjs cleanup step").option("--next", "Switch to dev builds (npm @next tag) and persist as default").option("--stable", "Switch to stable releases (npm @latest tag) and persist as default").addHelpText("after", `
|
|
126340
|
+
return new Command("update").description(`Update ${PACKAGE_NAME} to the latest version (restart only services already running)`).option("-y, --yes", "Skip confirmation prompts (non-interactive)").option("--no-restart", "Update CLI only; skip service restarts and verification").option("--no-sidecar-cleanup", "Skip the legacy nats-reply-sidecar.mjs cleanup step").option("--next", "Switch to dev builds (npm @next tag) and persist as default").option("--stable", "Switch to stable releases (npm @latest tag) and persist as default").option("--skip-canonical-preflight", "Bypass the canonical-pgserve phase-2 pre-flight (NOT recommended; for operators who pre-installed pgserve via a path the auto-detector misses)").addHelpText("after", `
|
|
126273
126341
|
Channels:
|
|
126274
126342
|
- stable (default) \u2014 tracks the npm @latest tag, bumped from main branch releases.
|
|
126275
126343
|
- next (dev builds) \u2014 tracks the npm @next tag, bumped on every CI-green dev merge.
|
package/dist/server/index.js
CHANGED
|
@@ -224686,7 +224686,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
224686
224686
|
var require_package8 = __commonJS((exports, module) => {
|
|
224687
224687
|
module.exports = {
|
|
224688
224688
|
name: "@omni/api",
|
|
224689
|
-
version: "2.260502.
|
|
224689
|
+
version: "2.260502.2",
|
|
224690
224690
|
type: "module",
|
|
224691
224691
|
exports: {
|
|
224692
224692
|
".": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automagik/omni",
|
|
3
|
-
"version": "2.260502.
|
|
3
|
+
"version": "2.260502.2",
|
|
4
4
|
"description": "LLM-optimized CLI for Omni",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
"qrcode-terminal": "^0.12.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@omni/api": "2.
|
|
55
|
-
"@omni/channel-discord": "2.
|
|
56
|
-
"@omni/channel-gupshup": "2.
|
|
57
|
-
"@omni/channel-sdk": "2.
|
|
58
|
-
"@omni/channel-slack": "2.
|
|
59
|
-
"@omni/channel-telegram": "2.
|
|
60
|
-
"@omni/channel-whatsapp": "2.
|
|
61
|
-
"@omni/core": "2.
|
|
62
|
-
"@omni/sdk": "2.
|
|
54
|
+
"@omni/api": "2.260502.1",
|
|
55
|
+
"@omni/channel-discord": "2.260502.1",
|
|
56
|
+
"@omni/channel-gupshup": "2.260502.1",
|
|
57
|
+
"@omni/channel-sdk": "2.260502.1",
|
|
58
|
+
"@omni/channel-slack": "2.260502.1",
|
|
59
|
+
"@omni/channel-telegram": "2.260502.1",
|
|
60
|
+
"@omni/channel-whatsapp": "2.260502.1",
|
|
61
|
+
"@omni/core": "2.260502.1",
|
|
62
|
+
"@omni/sdk": "2.260502.1",
|
|
63
63
|
"@types/node": "^22.10.3",
|
|
64
64
|
"@types/qrcode-terminal": "^0.12.2",
|
|
65
65
|
"typescript": "^5.7.3"
|