@automagik/omni 2.260427.1 → 2.260429.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/agent-routes.d.ts.map +1 -1
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/instances.d.ts.map +1 -1
- package/dist/commands/providers.d.ts.map +1 -1
- package/dist/index.js +54 -4
- package/dist/output.d.ts +10 -0
- package/dist/output.d.ts.map +1 -1
- package/dist/pm2.d.ts +6 -0
- package/dist/pm2.d.ts.map +1 -1
- package/dist/server/index.js +952 -270
- package/dist/utils/genie-wiring-nudge.d.ts +32 -0
- package/dist/utils/genie-wiring-nudge.d.ts.map +1 -0
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-routes.d.ts","sourceRoot":"","sources":["../../src/commands/agent-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-routes.d.ts","sourceRoot":"","sources":["../../src/commands/agent-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuLpC,wBAAgB,mBAAmB,IAAI,OAAO,CAmM7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoJpC,wBAAgB,mBAAmB,IAAI,OAAO,CAsL7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/commands/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgFpC,wBAAgB,oBAAoB,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/commands/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgFpC,wBAAgB,oBAAoB,IAAI,OAAO,CAiG9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../src/commands/instances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../src/commands/instances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2LpC,wBAAgB,sBAAsB,IAAI,OAAO,CAstChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/commands/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;GAEG;AACH,iBAAS,eAAe,CAAC,CAAC,EAAE,SAAS,GAAG;IACtC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,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,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAMA;AAED,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAyUF,wBAAgB,sBAAsB,IAAI,OAAO,CA8IhD"}
|
package/dist/index.js
CHANGED
|
@@ -2798,6 +2798,7 @@ var init_config = __esm(() => {
|
|
|
2798
2798
|
var exports_output = {};
|
|
2799
2799
|
__export(exports_output, {
|
|
2800
2800
|
warn: () => warn,
|
|
2801
|
+
tip: () => tip,
|
|
2801
2802
|
success: () => success,
|
|
2802
2803
|
setMaxCellWidth: () => setMaxCellWidth,
|
|
2803
2804
|
raw: () => raw,
|
|
@@ -2867,6 +2868,14 @@ function warn(message) {
|
|
|
2867
2868
|
writeStdoutLine(`${c().yellow("\u26A0")} ${message}`);
|
|
2868
2869
|
}
|
|
2869
2870
|
}
|
|
2871
|
+
function tip(message) {
|
|
2872
|
+
const format = getCurrentFormat();
|
|
2873
|
+
if (format === "json") {
|
|
2874
|
+
console.error(JSON.stringify({ tip: message }));
|
|
2875
|
+
} else {
|
|
2876
|
+
console.error(`${c().cyan("\uD83D\uDCA1")} ${message}`);
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2870
2879
|
function info(message) {
|
|
2871
2880
|
const format = getCurrentFormat();
|
|
2872
2881
|
if (format === "json") {
|
|
@@ -22465,7 +22474,7 @@ function getStreamForPattern(pattern) {
|
|
|
22465
22474
|
function calculateBackoffDelay(retryCount, baseDelayMs = DEFAULT_CONSUMER_CONFIG.retryDelayMs, maxDelayMs = 30000) {
|
|
22466
22475
|
const delay = baseDelayMs * 2 ** retryCount;
|
|
22467
22476
|
const jitter = delay * 0.1 * (Math.random() * 2 - 1);
|
|
22468
|
-
return Math.min(delay + jitter, maxDelayMs);
|
|
22477
|
+
return Math.floor(Math.min(delay + jitter, maxDelayMs));
|
|
22469
22478
|
}
|
|
22470
22479
|
var import_nats2, DEFAULT_CONSUMER_CONFIG;
|
|
22471
22480
|
var init_consumer = __esm(() => {
|
|
@@ -113929,7 +113938,7 @@ import { fileURLToPath } from "url";
|
|
|
113929
113938
|
// package.json
|
|
113930
113939
|
var package_default = {
|
|
113931
113940
|
name: "@automagik/omni",
|
|
113932
|
-
version: "2.
|
|
113941
|
+
version: "2.260429.2",
|
|
113933
113942
|
description: "LLM-optimized CLI for Omni",
|
|
113934
113943
|
type: "module",
|
|
113935
113944
|
bin: {
|
|
@@ -114595,6 +114604,22 @@ ${ids}`);
|
|
|
114595
114604
|
error(`No route found matching "${input}"`);
|
|
114596
114605
|
}
|
|
114597
114606
|
|
|
114607
|
+
// src/utils/genie-wiring-nudge.ts
|
|
114608
|
+
init_output();
|
|
114609
|
+
async function maybeNudgeForGenieBackedAgent(client, providerId, agentName) {
|
|
114610
|
+
let schema;
|
|
114611
|
+
try {
|
|
114612
|
+
const provider = await client.providers.get(providerId);
|
|
114613
|
+
schema = provider.schema;
|
|
114614
|
+
} catch {
|
|
114615
|
+
return;
|
|
114616
|
+
}
|
|
114617
|
+
if (schema !== "nats-genie")
|
|
114618
|
+
return;
|
|
114619
|
+
const agentSlot = agentName ?? "<agent>";
|
|
114620
|
+
tip(`For genie-backed agents, prefer 'omni connect <instance-id> ${agentSlot}' (or '/genie:omni' from a Claude session) \u2014 it creates the provider, the agent record, and binds the instance in one step. This command stays for power users.`);
|
|
114621
|
+
}
|
|
114622
|
+
|
|
114598
114623
|
// src/commands/agent-routes.ts
|
|
114599
114624
|
function formatReplyFilter(f) {
|
|
114600
114625
|
if (f?.mode === "all")
|
|
@@ -114652,6 +114677,16 @@ async function createAgentRouteAction(options) {
|
|
|
114652
114677
|
isActive: !options.inactive
|
|
114653
114678
|
});
|
|
114654
114679
|
success(`Route created: ${route.id}`);
|
|
114680
|
+
if (options.agent) {
|
|
114681
|
+
try {
|
|
114682
|
+
const agent = await client.agents.get(options.agent);
|
|
114683
|
+
const providerId = agent.agentProviderId;
|
|
114684
|
+
const agentName = agent.name;
|
|
114685
|
+
if (providerId) {
|
|
114686
|
+
await maybeNudgeForGenieBackedAgent(client, providerId, agentName);
|
|
114687
|
+
}
|
|
114688
|
+
} catch {}
|
|
114689
|
+
}
|
|
114655
114690
|
data(route);
|
|
114656
114691
|
} catch (err) {
|
|
114657
114692
|
const message = err instanceof Error ? err.message : "Unknown error";
|
|
@@ -114924,9 +114959,13 @@ function createAgentsCommand() {
|
|
|
114924
114959
|
agents.command("create").description("Create a new agent").requiredOption("--name <name>", "Agent name").requiredOption("--provider <provider>", `AI provider (${VALID_PROVIDERS.join(", ")})`).option("--model <model>", "Model identifier (e.g. claude-sonnet-4-6)").option("--type <type>", `Agent type (${VALID_TYPES.join(", ")})`, "assistant").option("--agent-provider <agentProviderId>", "Link to an agent provider configuration").option("--provider-agent-id <id>", "Provider-internal agent identifier (e.g. agno agent name). Stored at metadata.providerAgentId; used by the dispatcher to resolve agentInternalId.").option("--config-path <path>", "Path to the agent config file (DB column config_path)").option("--metadata <json>", "Additional metadata as JSON string. Merged into metadata; --provider-agent-id takes precedence if both provide providerAgentId.").action(async (options) => {
|
|
114925
114960
|
const body = buildCreateAgentBody(options);
|
|
114926
114961
|
try {
|
|
114927
|
-
const
|
|
114962
|
+
const client = getClient();
|
|
114963
|
+
const agent = await client.agents.create(body);
|
|
114928
114964
|
success(`Agent created: ${agent.id}`);
|
|
114929
114965
|
data(agent);
|
|
114966
|
+
if (options.agentProvider) {
|
|
114967
|
+
await maybeNudgeForGenieBackedAgent(client, options.agentProvider, agent.name);
|
|
114968
|
+
}
|
|
114930
114969
|
} catch (err) {
|
|
114931
114970
|
const message = err instanceof Error ? err.message : "Unknown error";
|
|
114932
114971
|
error(`Failed to create agent: ${message}`);
|
|
@@ -114989,6 +115028,7 @@ var PM2_HARDENED_DEFAULTS = {
|
|
|
114989
115028
|
restartDelayMs: 5000,
|
|
114990
115029
|
apiMaxMemory: "2G",
|
|
114991
115030
|
natsMaxMemory: "1G",
|
|
115031
|
+
killTimeoutMs: 20000,
|
|
114992
115032
|
logDateFormat: "YYYY-MM-DD HH:mm:ss.SSS"
|
|
114993
115033
|
};
|
|
114994
115034
|
function getPm2LogDir() {
|
|
@@ -115016,6 +115056,8 @@ function buildPm2StartArgs(options) {
|
|
|
115016
115056
|
String(PM2_HARDENED_DEFAULTS.restartDelayMs),
|
|
115017
115057
|
"--max-memory-restart",
|
|
115018
115058
|
maxMemory,
|
|
115059
|
+
"--kill-timeout",
|
|
115060
|
+
String(PM2_HARDENED_DEFAULTS.killTimeoutMs),
|
|
115019
115061
|
"--log-date-format",
|
|
115020
115062
|
PM2_HARDENED_DEFAULTS.logDateFormat,
|
|
115021
115063
|
"--output",
|
|
@@ -117326,7 +117368,8 @@ Make sure genie is installed and the agent is registered:
|
|
|
117326
117368
|
keyValue("Inbound", `omni.message.${instanceId}.*`);
|
|
117327
117369
|
keyValue("Outbound", `omni.reply.${instanceId}.*`);
|
|
117328
117370
|
header("Next Step");
|
|
117329
|
-
info("
|
|
117371
|
+
info("Verify the bridge is running: genie serve status");
|
|
117372
|
+
info("If not running, start it with: genie serve start --headless");
|
|
117330
117373
|
});
|
|
117331
117374
|
}
|
|
117332
117375
|
|
|
@@ -120758,6 +120801,10 @@ function createInstancesCommand() {
|
|
|
120758
120801
|
if (Object.keys(body).length > 0) {
|
|
120759
120802
|
await client.instances.update(id, body);
|
|
120760
120803
|
success(`Instance updated: ${id}`, body);
|
|
120804
|
+
const agentProviderId = options.agentProvider;
|
|
120805
|
+
if (agentProviderId && agentProviderId !== "null") {
|
|
120806
|
+
await maybeNudgeForGenieBackedAgent(client, agentProviderId);
|
|
120807
|
+
}
|
|
120761
120808
|
} else if (!options.profileName) {
|
|
120762
120809
|
error("No update options provided. Use --help to see all available options.");
|
|
120763
120810
|
}
|
|
@@ -123451,6 +123498,9 @@ async function handleCreate3(options) {
|
|
|
123451
123498
|
Next steps:`);
|
|
123452
123499
|
info(` 1. Test connectivity: omni providers test ${provider.id}`);
|
|
123453
123500
|
info(` 2. Assign to instance: omni instances update <instance-id> --agent-provider ${provider.id}${options.defaultAgentId ? ` --agent ${options.defaultAgentId}` : ""}`);
|
|
123501
|
+
if (options.schema === "nats-genie" && options.agentName) {
|
|
123502
|
+
tip(`For genie-backed agents, prefer 'omni connect <instance-id> ${options.agentName}' (or '/genie:omni' from a Claude session) \u2014 it creates the provider, the agent record, and binds the instance in one step. This command stays for power users.`);
|
|
123503
|
+
}
|
|
123454
123504
|
} catch (err2) {
|
|
123455
123505
|
const message2 = err2 instanceof Error ? err2.message : "Unknown error";
|
|
123456
123506
|
error(`Failed to create provider: ${message2}`);
|
package/dist/output.d.ts
CHANGED
|
@@ -17,6 +17,16 @@ export declare function success(message: string, data?: unknown): void;
|
|
|
17
17
|
export declare function error(message: string, details?: unknown, exitCode?: number): never;
|
|
18
18
|
/** Output warning message. In JSON mode, writes to stderr to keep stdout as valid JSON. */
|
|
19
19
|
export declare function warn(message: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Output a deprecation tip / nudge — ALWAYS to stderr regardless of format.
|
|
22
|
+
*
|
|
23
|
+
* Unlike `info` / `warn`, this never goes to stdout so CI scripts that grep
|
|
24
|
+
* stdout for command output remain unaffected. Use for "prefer X over Y"
|
|
25
|
+
* hints on legacy command paths that still work but are being deprioritized
|
|
26
|
+
* (e.g., the manual nats-genie wiring chain — operators should use
|
|
27
|
+
* `omni connect` or `/genie:omni` instead).
|
|
28
|
+
*/
|
|
29
|
+
export declare function tip(message: string): void;
|
|
20
30
|
/** Output info message. In JSON mode, writes to stderr to keep stdout as valid JSON. */
|
|
21
31
|
export declare function info(message: string): void;
|
|
22
32
|
/** Output data (main output) */
|
package/dist/output.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA+BH,2CAA2C;AAC3C,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED,kCA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,OAAO,EAAE,CAAA;CAAE,GAAG,IAAI,CAclG;AAsFD,6BAA6B;AAC7B,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAQ1D;AAED,6BAA6B;AAC7B,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAI1C;AAED,kCAAkC;AAClC,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAItC;AAED,8CAA8C;AAC9C,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEtC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAOjD"}
|
package/dist/pm2.d.ts
CHANGED
|
@@ -15,12 +15,18 @@ export declare const PM2_PROCESSES: {
|
|
|
15
15
|
* throttling. This is the fix for the 2026-04-09 incident where a crash loop
|
|
16
16
|
* grew `omni-api-error.log` to 283 GB because pm2 had no `--max-restarts` or
|
|
17
17
|
* log rotation configured. See WISH: omni-install-resilience.
|
|
18
|
+
*
|
|
19
|
+
* `killTimeoutMs` was added by WISH: pm2-log-noise-and-bumps — the API has a
|
|
20
|
+
* 15 s graceful shutdown (`packages/api/src/index.ts:327`) but pm2's default
|
|
21
|
+
* `kill_timeout` is 1600 ms, so SIGKILL was firing before pgserve/NATS could
|
|
22
|
+
* drain. We pad to 20 s = 15 s graceful + 5 s headroom for Sentry flush.
|
|
18
23
|
*/
|
|
19
24
|
export declare const PM2_HARDENED_DEFAULTS: {
|
|
20
25
|
readonly maxRestarts: 10;
|
|
21
26
|
readonly restartDelayMs: 5000;
|
|
22
27
|
readonly apiMaxMemory: "2G";
|
|
23
28
|
readonly natsMaxMemory: "1G";
|
|
29
|
+
readonly killTimeoutMs: 20000;
|
|
24
30
|
readonly logDateFormat: "YYYY-MM-DD HH:mm:ss.SSS";
|
|
25
31
|
};
|
|
26
32
|
/** Directory where hardened pm2 logs are written. */
|
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
|
|
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,iEAAiE;IACjE,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IACrB,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,EAAE,CAmCxE;AAED,8CAA8C;AAC9C,wBAAgB,kBAAkB,CAAC,OAAO,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,CAA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