@automagik/omni 2.260428.1 → 2.260429.3
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/db/drizzle/0032_genie_hosts.sql +32 -0
- package/db/drizzle/meta/_journal.json +7 -0
- 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 +66 -4
- package/dist/output.d.ts +10 -0
- package/dist/output.d.ts.map +1 -1
- package/dist/server/index.js +17 -2
- 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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
-- Per-host fingerprint trust foundation (omni-host-fingerprint-trust wish, Group 1).
|
|
2
|
+
--
|
|
3
|
+
-- Stores ed25519 public keys for genie installations that talk to this omni
|
|
4
|
+
-- server. Populated by `POST /api/v2/trust/handshake` (driven by
|
|
5
|
+
-- `genie omni handshake`). Read by the verification middleware (Group 4) on
|
|
6
|
+
-- every signed request, and by `omni trust list/get/update/revoke`.
|
|
7
|
+
--
|
|
8
|
+
-- This is the FOUNDATION migration: the table just stores data. Signing,
|
|
9
|
+
-- verification, and per-host scope enforcement land in subsequent groups
|
|
10
|
+
-- of the same wish. The bearer-token auth model stays untouched and
|
|
11
|
+
-- backward-compatible until operators opt into per-instance enforcement.
|
|
12
|
+
--
|
|
13
|
+
-- Idempotency invariant: pubkey is UNIQUE — re-registering the same key
|
|
14
|
+
-- returns the existing host_id rather than creating duplicates. Rotation
|
|
15
|
+
-- (Group 2) revokes + re-registers with a new pubkey, never mutates in
|
|
16
|
+
-- place.
|
|
17
|
+
|
|
18
|
+
CREATE TABLE IF NOT EXISTS "genie_hosts" (
|
|
19
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
20
|
+
"pubkey" varchar(64) NOT NULL UNIQUE,
|
|
21
|
+
"hostname" varchar(255) NOT NULL,
|
|
22
|
+
"capabilities" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
23
|
+
"scopes" text[] DEFAULT ARRAY['*']::text[] NOT NULL,
|
|
24
|
+
"last_seen_at" timestamp,
|
|
25
|
+
"revoked_at" timestamp,
|
|
26
|
+
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
27
|
+
"updated_at" timestamp DEFAULT now() NOT NULL
|
|
28
|
+
);
|
|
29
|
+
--> statement-breakpoint
|
|
30
|
+
CREATE INDEX IF NOT EXISTS "genie_hosts_pubkey_idx" ON "genie_hosts" ("pubkey");
|
|
31
|
+
--> statement-breakpoint
|
|
32
|
+
CREATE INDEX IF NOT EXISTS "genie_hosts_active_idx" ON "genie_hosts" ("revoked_at");
|
|
@@ -225,6 +225,13 @@
|
|
|
225
225
|
"when": 1777400000000,
|
|
226
226
|
"tag": "0031_reconcile_gupshup_columns",
|
|
227
227
|
"breakpoints": true
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"idx": 32,
|
|
231
|
+
"version": "7",
|
|
232
|
+
"when": 1777500000000,
|
|
233
|
+
"tag": "0032_genie_hosts",
|
|
234
|
+
"breakpoints": true
|
|
228
235
|
}
|
|
229
236
|
]
|
|
230
237
|
}
|
|
@@ -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,WAAW,EAAE,MAAM,CAAC;CACrB,CAOA;AAED;;GAEG;AACH,iBAAS,cAAc,CAAC,CAAC,EAAE,QAAQ,GAAG;IACpC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAQA;AAED;;GAEG;AACH,iBAAS,kBAAkB,CAAC,CAAC,EAAE,YAAY,GAAG;IAC5C,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAMA;AAED,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;
|
|
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,WAAW,EAAE,MAAM,CAAC;CACrB,CAOA;AAED;;GAEG;AACH,iBAAS,cAAc,CAAC,CAAC,EAAE,QAAQ,GAAG;IACpC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAQA;AAED;;GAEG;AACH,iBAAS,kBAAkB,CAAC,CAAC,EAAE,YAAY,GAAG;IAC5C,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") {
|
|
@@ -58567,6 +58576,7 @@ __export(exports_schema, {
|
|
|
58567
58576
|
handoffLogs: () => handoffLogs,
|
|
58568
58577
|
globalSettingsRelations: () => globalSettingsRelations,
|
|
58569
58578
|
globalSettings: () => globalSettings,
|
|
58579
|
+
genieHosts: () => genieHosts,
|
|
58570
58580
|
followUpDisarmReasons: () => followUpDisarmReasons,
|
|
58571
58581
|
eventTypes: () => eventTypes,
|
|
58572
58582
|
eventPayloads: () => eventPayloads,
|
|
@@ -58622,7 +58632,7 @@ __export(exports_schema, {
|
|
|
58622
58632
|
accessRules: () => accessRules,
|
|
58623
58633
|
accessModes: () => accessModes
|
|
58624
58634
|
});
|
|
58625
|
-
var channelTypes, agentTypes, agentSystems, agentEntityTypes, debounceMode, splitDelayMode, replyFilterMode, agentSessionStrategies, ruleTypes, accessModes, settingValueTypes, apiKeyStatuses, apiKeyProfiles, eventTypes, contentTypes, chatTypes, messageSources, messageTypes, messageStatuses, deliveryStatuses, jobStatuses, providerSchemas, agentProviders, agents, agentRoutes, agentSessions, apiKeys, apiKeyAuditLogs, apiKeysRelations, apiKeyAuditLogsRelations, instances, persons, platformIdentities, conversations, chats, chatParticipants, omniGroups, messages, omniEvents, handoffLogs, accessRules, globalSettings, settingChangeHistory, batchJobs, syncJobTypes, syncJobs, mediaContent, chatIdMappings, pluginStorage, agentProvidersRelations, agentsRelations, instancesRelations, syncJobsRelations, personsRelations, platformIdentitiesRelations, conversationsRelations, chatsRelations, chatParticipantsRelations, messagesRelations, omniEventsRelations, accessRulesRelations, globalSettingsRelations, settingChangeHistoryRelations, batchJobsRelations, mediaContentRelations, chatIdMappingsRelations, deadLetterStatuses, deadLetterEvents, payloadStorageConfig, payloadStages, eventPayloads, webhookSources, conditionOperators, actionTypes, automationDebounceModes, automations2, automationLogStatuses, automationLogs, consumerOffsets, automationsRelations, automationLogsRelations, triggerLogs, triggerLogsRelations, agentRoutesRelations, agentTaskStatuses, agentTasks, agentTasksRelations, turnStatuses, turnActions, turns, turnsRelations, followUpDisarmReasons, chatFollowUpState, chatFollowUpStateRelations, processedEvents;
|
|
58635
|
+
var channelTypes, agentTypes, agentSystems, agentEntityTypes, debounceMode, splitDelayMode, replyFilterMode, agentSessionStrategies, ruleTypes, accessModes, settingValueTypes, apiKeyStatuses, apiKeyProfiles, eventTypes, contentTypes, chatTypes, messageSources, messageTypes, messageStatuses, deliveryStatuses, jobStatuses, providerSchemas, agentProviders, agents, agentRoutes, agentSessions, apiKeys, apiKeyAuditLogs, apiKeysRelations, apiKeyAuditLogsRelations, instances, persons, platformIdentities, conversations, chats, chatParticipants, omniGroups, messages, omniEvents, handoffLogs, accessRules, globalSettings, settingChangeHistory, batchJobs, syncJobTypes, syncJobs, mediaContent, chatIdMappings, pluginStorage, agentProvidersRelations, agentsRelations, instancesRelations, syncJobsRelations, personsRelations, platformIdentitiesRelations, conversationsRelations, chatsRelations, chatParticipantsRelations, messagesRelations, omniEventsRelations, accessRulesRelations, globalSettingsRelations, settingChangeHistoryRelations, batchJobsRelations, mediaContentRelations, chatIdMappingsRelations, deadLetterStatuses, deadLetterEvents, payloadStorageConfig, payloadStages, eventPayloads, webhookSources, conditionOperators, actionTypes, automationDebounceModes, automations2, automationLogStatuses, automationLogs, consumerOffsets, automationsRelations, automationLogsRelations, triggerLogs, triggerLogsRelations, agentRoutesRelations, agentTaskStatuses, agentTasks, agentTasksRelations, turnStatuses, turnActions, turns, turnsRelations, followUpDisarmReasons, chatFollowUpState, chatFollowUpStateRelations, processedEvents, genieHosts;
|
|
58626
58636
|
var init_schema2 = __esm(() => {
|
|
58627
58637
|
init_events();
|
|
58628
58638
|
init_drizzle_orm();
|
|
@@ -59926,6 +59936,20 @@ var init_schema2 = __esm(() => {
|
|
|
59926
59936
|
pk: primaryKey({ columns: [table3.eventId, table3.handler], name: "processed_events_pk" }),
|
|
59927
59937
|
processedAtIdx: index("processed_events_processed_at_idx").on(table3.processedAt)
|
|
59928
59938
|
}));
|
|
59939
|
+
genieHosts = pgTable("genie_hosts", {
|
|
59940
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
59941
|
+
pubkey: varchar("pubkey", { length: 64 }).notNull().unique(),
|
|
59942
|
+
hostname: varchar("hostname", { length: 255 }).notNull(),
|
|
59943
|
+
capabilities: jsonb("capabilities").notNull().default(sql`'{}'::jsonb`),
|
|
59944
|
+
scopes: text("scopes").array().notNull().default(sql`ARRAY['*']::text[]`),
|
|
59945
|
+
lastSeenAt: timestamp("last_seen_at"),
|
|
59946
|
+
revokedAt: timestamp("revoked_at"),
|
|
59947
|
+
createdAt: timestamp("created_at").notNull().defaultNow(),
|
|
59948
|
+
updatedAt: timestamp("updated_at").notNull().defaultNow()
|
|
59949
|
+
}, (table3) => ({
|
|
59950
|
+
pubkeyUq: index("genie_hosts_pubkey_idx").on(table3.pubkey),
|
|
59951
|
+
activeIdx: index("genie_hosts_active_idx").on(table3.revokedAt)
|
|
59952
|
+
}));
|
|
59929
59953
|
});
|
|
59930
59954
|
|
|
59931
59955
|
// ../../node_modules/.bun/postgres@3.4.8/node_modules/postgres/src/query.js
|
|
@@ -113929,7 +113953,7 @@ import { fileURLToPath } from "url";
|
|
|
113929
113953
|
// package.json
|
|
113930
113954
|
var package_default = {
|
|
113931
113955
|
name: "@automagik/omni",
|
|
113932
|
-
version: "2.
|
|
113956
|
+
version: "2.260429.3",
|
|
113933
113957
|
description: "LLM-optimized CLI for Omni",
|
|
113934
113958
|
type: "module",
|
|
113935
113959
|
bin: {
|
|
@@ -114595,6 +114619,22 @@ ${ids}`);
|
|
|
114595
114619
|
error(`No route found matching "${input}"`);
|
|
114596
114620
|
}
|
|
114597
114621
|
|
|
114622
|
+
// src/utils/genie-wiring-nudge.ts
|
|
114623
|
+
init_output();
|
|
114624
|
+
async function maybeNudgeForGenieBackedAgent(client, providerId, agentName) {
|
|
114625
|
+
let schema;
|
|
114626
|
+
try {
|
|
114627
|
+
const provider = await client.providers.get(providerId);
|
|
114628
|
+
schema = provider.schema;
|
|
114629
|
+
} catch {
|
|
114630
|
+
return;
|
|
114631
|
+
}
|
|
114632
|
+
if (schema !== "nats-genie")
|
|
114633
|
+
return;
|
|
114634
|
+
const agentSlot = agentName ?? "<agent>";
|
|
114635
|
+
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.`);
|
|
114636
|
+
}
|
|
114637
|
+
|
|
114598
114638
|
// src/commands/agent-routes.ts
|
|
114599
114639
|
function formatReplyFilter(f) {
|
|
114600
114640
|
if (f?.mode === "all")
|
|
@@ -114652,6 +114692,16 @@ async function createAgentRouteAction(options) {
|
|
|
114652
114692
|
isActive: !options.inactive
|
|
114653
114693
|
});
|
|
114654
114694
|
success(`Route created: ${route.id}`);
|
|
114695
|
+
if (options.agent) {
|
|
114696
|
+
try {
|
|
114697
|
+
const agent = await client.agents.get(options.agent);
|
|
114698
|
+
const providerId = agent.agentProviderId;
|
|
114699
|
+
const agentName = agent.name;
|
|
114700
|
+
if (providerId) {
|
|
114701
|
+
await maybeNudgeForGenieBackedAgent(client, providerId, agentName);
|
|
114702
|
+
}
|
|
114703
|
+
} catch {}
|
|
114704
|
+
}
|
|
114655
114705
|
data(route);
|
|
114656
114706
|
} catch (err) {
|
|
114657
114707
|
const message = err instanceof Error ? err.message : "Unknown error";
|
|
@@ -114924,9 +114974,13 @@ function createAgentsCommand() {
|
|
|
114924
114974
|
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
114975
|
const body = buildCreateAgentBody(options);
|
|
114926
114976
|
try {
|
|
114927
|
-
const
|
|
114977
|
+
const client = getClient();
|
|
114978
|
+
const agent = await client.agents.create(body);
|
|
114928
114979
|
success(`Agent created: ${agent.id}`);
|
|
114929
114980
|
data(agent);
|
|
114981
|
+
if (options.agentProvider) {
|
|
114982
|
+
await maybeNudgeForGenieBackedAgent(client, options.agentProvider, agent.name);
|
|
114983
|
+
}
|
|
114930
114984
|
} catch (err) {
|
|
114931
114985
|
const message = err instanceof Error ? err.message : "Unknown error";
|
|
114932
114986
|
error(`Failed to create agent: ${message}`);
|
|
@@ -117329,7 +117383,8 @@ Make sure genie is installed and the agent is registered:
|
|
|
117329
117383
|
keyValue("Inbound", `omni.message.${instanceId}.*`);
|
|
117330
117384
|
keyValue("Outbound", `omni.reply.${instanceId}.*`);
|
|
117331
117385
|
header("Next Step");
|
|
117332
|
-
info("
|
|
117386
|
+
info("Verify the bridge is running: genie serve status");
|
|
117387
|
+
info("If not running, start it with: genie serve start --headless");
|
|
117333
117388
|
});
|
|
117334
117389
|
}
|
|
117335
117390
|
|
|
@@ -120761,6 +120816,10 @@ function createInstancesCommand() {
|
|
|
120761
120816
|
if (Object.keys(body).length > 0) {
|
|
120762
120817
|
await client.instances.update(id, body);
|
|
120763
120818
|
success(`Instance updated: ${id}`, body);
|
|
120819
|
+
const agentProviderId = options.agentProvider;
|
|
120820
|
+
if (agentProviderId && agentProviderId !== "null") {
|
|
120821
|
+
await maybeNudgeForGenieBackedAgent(client, agentProviderId);
|
|
120822
|
+
}
|
|
120764
120823
|
} else if (!options.profileName) {
|
|
120765
120824
|
error("No update options provided. Use --help to see all available options.");
|
|
120766
120825
|
}
|
|
@@ -123454,6 +123513,9 @@ async function handleCreate3(options) {
|
|
|
123454
123513
|
Next steps:`);
|
|
123455
123514
|
info(` 1. Test connectivity: omni providers test ${provider.id}`);
|
|
123456
123515
|
info(` 2. Assign to instance: omni instances update <instance-id> --agent-provider ${provider.id}${options.defaultAgentId ? ` --agent ${options.defaultAgentId}` : ""}`);
|
|
123516
|
+
if (options.schema === "nats-genie" && options.agentName) {
|
|
123517
|
+
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.`);
|
|
123518
|
+
}
|
|
123457
123519
|
} catch (err2) {
|
|
123458
123520
|
const message2 = err2 instanceof Error ? err2.message : "Unknown error";
|
|
123459
123521
|
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,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AAC;IAAC,OAAO,CAAC,EAAE,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/server/index.js
CHANGED
|
@@ -224554,7 +224554,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
224554
224554
|
var require_package8 = __commonJS((exports, module) => {
|
|
224555
224555
|
module.exports = {
|
|
224556
224556
|
name: "@omni/api",
|
|
224557
|
-
version: "2.
|
|
224557
|
+
version: "2.260429.3",
|
|
224558
224558
|
type: "module",
|
|
224559
224559
|
exports: {
|
|
224560
224560
|
".": {
|
|
@@ -229968,6 +229968,7 @@ __export(exports_schema, {
|
|
|
229968
229968
|
handoffLogs: () => handoffLogs,
|
|
229969
229969
|
globalSettingsRelations: () => globalSettingsRelations,
|
|
229970
229970
|
globalSettings: () => globalSettings,
|
|
229971
|
+
genieHosts: () => genieHosts,
|
|
229971
229972
|
followUpDisarmReasons: () => followUpDisarmReasons,
|
|
229972
229973
|
eventTypes: () => eventTypes,
|
|
229973
229974
|
eventPayloads: () => eventPayloads,
|
|
@@ -230023,7 +230024,7 @@ __export(exports_schema, {
|
|
|
230023
230024
|
accessRules: () => accessRules,
|
|
230024
230025
|
accessModes: () => accessModes
|
|
230025
230026
|
});
|
|
230026
|
-
var channelTypes, agentTypes, agentSystems, agentEntityTypes, debounceMode, splitDelayMode, replyFilterMode, agentSessionStrategies, ruleTypes, accessModes, settingValueTypes, apiKeyStatuses, apiKeyProfiles, eventTypes, contentTypes, chatTypes, messageSources, messageTypes, messageStatuses, deliveryStatuses, jobStatuses, providerSchemas, agentProviders, agents, agentRoutes, agentSessions, apiKeys, apiKeyAuditLogs, apiKeysRelations, apiKeyAuditLogsRelations, instances, persons, platformIdentities, conversations, chats, chatParticipants, omniGroups, messages2, omniEvents, handoffLogs, accessRules, globalSettings, settingChangeHistory, batchJobs, syncJobTypes, syncJobs, mediaContent, chatIdMappings, pluginStorage, agentProvidersRelations, agentsRelations, instancesRelations, syncJobsRelations, personsRelations, platformIdentitiesRelations, conversationsRelations, chatsRelations, chatParticipantsRelations, messagesRelations, omniEventsRelations, accessRulesRelations, globalSettingsRelations, settingChangeHistoryRelations, batchJobsRelations, mediaContentRelations, chatIdMappingsRelations, deadLetterStatuses, deadLetterEvents, payloadStorageConfig, payloadStages, eventPayloads, webhookSources, conditionOperators, actionTypes, automationDebounceModes, automations2, automationLogStatuses, automationLogs, consumerOffsets, automationsRelations, automationLogsRelations, triggerLogs, triggerLogsRelations, agentRoutesRelations, agentTaskStatuses, agentTasks, agentTasksRelations, turnStatuses, turnActions, turns, turnsRelations, followUpDisarmReasons, chatFollowUpState, chatFollowUpStateRelations, processedEvents;
|
|
230027
|
+
var channelTypes, agentTypes, agentSystems, agentEntityTypes, debounceMode, splitDelayMode, replyFilterMode, agentSessionStrategies, ruleTypes, accessModes, settingValueTypes, apiKeyStatuses, apiKeyProfiles, eventTypes, contentTypes, chatTypes, messageSources, messageTypes, messageStatuses, deliveryStatuses, jobStatuses, providerSchemas, agentProviders, agents, agentRoutes, agentSessions, apiKeys, apiKeyAuditLogs, apiKeysRelations, apiKeyAuditLogsRelations, instances, persons, platformIdentities, conversations, chats, chatParticipants, omniGroups, messages2, omniEvents, handoffLogs, accessRules, globalSettings, settingChangeHistory, batchJobs, syncJobTypes, syncJobs, mediaContent, chatIdMappings, pluginStorage, agentProvidersRelations, agentsRelations, instancesRelations, syncJobsRelations, personsRelations, platformIdentitiesRelations, conversationsRelations, chatsRelations, chatParticipantsRelations, messagesRelations, omniEventsRelations, accessRulesRelations, globalSettingsRelations, settingChangeHistoryRelations, batchJobsRelations, mediaContentRelations, chatIdMappingsRelations, deadLetterStatuses, deadLetterEvents, payloadStorageConfig, payloadStages, eventPayloads, webhookSources, conditionOperators, actionTypes, automationDebounceModes, automations2, automationLogStatuses, automationLogs, consumerOffsets, automationsRelations, automationLogsRelations, triggerLogs, triggerLogsRelations, agentRoutesRelations, agentTaskStatuses, agentTasks, agentTasksRelations, turnStatuses, turnActions, turns, turnsRelations, followUpDisarmReasons, chatFollowUpState, chatFollowUpStateRelations, processedEvents, genieHosts;
|
|
230027
230028
|
var init_schema2 = __esm(() => {
|
|
230028
230029
|
init_events();
|
|
230029
230030
|
init_drizzle_orm();
|
|
@@ -231327,6 +231328,20 @@ var init_schema2 = __esm(() => {
|
|
|
231327
231328
|
pk: primaryKey({ columns: [table3.eventId, table3.handler], name: "processed_events_pk" }),
|
|
231328
231329
|
processedAtIdx: index("processed_events_processed_at_idx").on(table3.processedAt)
|
|
231329
231330
|
}));
|
|
231331
|
+
genieHosts = pgTable("genie_hosts", {
|
|
231332
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
231333
|
+
pubkey: varchar("pubkey", { length: 64 }).notNull().unique(),
|
|
231334
|
+
hostname: varchar("hostname", { length: 255 }).notNull(),
|
|
231335
|
+
capabilities: jsonb("capabilities").notNull().default(sql`'{}'::jsonb`),
|
|
231336
|
+
scopes: text("scopes").array().notNull().default(sql`ARRAY['*']::text[]`),
|
|
231337
|
+
lastSeenAt: timestamp("last_seen_at"),
|
|
231338
|
+
revokedAt: timestamp("revoked_at"),
|
|
231339
|
+
createdAt: timestamp("created_at").notNull().defaultNow(),
|
|
231340
|
+
updatedAt: timestamp("updated_at").notNull().defaultNow()
|
|
231341
|
+
}, (table3) => ({
|
|
231342
|
+
pubkeyUq: index("genie_hosts_pubkey_idx").on(table3.pubkey),
|
|
231343
|
+
activeIdx: index("genie_hosts_active_idx").on(table3.revokedAt)
|
|
231344
|
+
}));
|
|
231330
231345
|
});
|
|
231331
231346
|
|
|
231332
231347
|
// ../../node_modules/.bun/postgres@3.4.8/node_modules/postgres/src/query.js
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Genie Wiring Deprecation Nudge
|
|
3
|
+
*
|
|
4
|
+
* Shared helper that emits a stderr tip when an operator runs one of the
|
|
5
|
+
* legacy multi-command genie-wiring entry points (`agents create`,
|
|
6
|
+
* `instances update --agent`, `agent-routes create`) on a `nats-genie`
|
|
7
|
+
* provider. The tip steers them toward the canonical
|
|
8
|
+
* `omni connect <instance> <agent>` (or the `/genie:omni` skill from a
|
|
9
|
+
* Claude session) without breaking the legacy path.
|
|
10
|
+
*
|
|
11
|
+
* Why a shared helper: each caller needs the same provider-fetch +
|
|
12
|
+
* schema-check logic. A single helper keeps the nudge text in one place
|
|
13
|
+
* and makes the "best-effort, never throw" semantics explicit.
|
|
14
|
+
*
|
|
15
|
+
* Tracked under the canonical-genie-omni-wiring wish (Wave 3 / Group 5,
|
|
16
|
+
* second half — indirect-detection). The schema-detected case
|
|
17
|
+
* (`providers create --schema nats-genie`) was wired in PR #553.
|
|
18
|
+
*/
|
|
19
|
+
import type { OmniClient } from '@omni/sdk';
|
|
20
|
+
/**
|
|
21
|
+
* If `providerId` references a provider whose schema is `nats-genie`,
|
|
22
|
+
* emit the deprecation nudge to stderr. Best-effort: if the provider
|
|
23
|
+
* lookup fails (network, 404, etc.), silently skip — the nudge is a
|
|
24
|
+
* UX hint, not a contract.
|
|
25
|
+
*
|
|
26
|
+
* @param agentName Optional agent name to fold into the suggested
|
|
27
|
+
* `omni connect <instance> <agentName>` example. When omitted (e.g.,
|
|
28
|
+
* `agent-routes create` doesn't always know the agent's display name),
|
|
29
|
+
* the example uses a placeholder.
|
|
30
|
+
*/
|
|
31
|
+
export declare function maybeNudgeForGenieBackedAgent(client: OmniClient, providerId: string, agentName?: string): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=genie-wiring-nudge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genie-wiring-nudge.d.ts","sourceRoot":"","sources":["../../src/utils/genie-wiring-nudge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C;;;;;;;;;;GAUG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automagik/omni",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.260429.3",
|
|
4
4
|
"description": "LLM-optimized CLI for Omni",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
"qrcode-terminal": "^0.12.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@omni/api": "2.
|
|
54
|
-
"@omni/channel-discord": "2.
|
|
55
|
-
"@omni/channel-gupshup": "2.
|
|
56
|
-
"@omni/channel-sdk": "2.
|
|
57
|
-
"@omni/channel-slack": "2.
|
|
58
|
-
"@omni/channel-telegram": "2.
|
|
59
|
-
"@omni/channel-whatsapp": "2.
|
|
60
|
-
"@omni/core": "2.
|
|
61
|
-
"@omni/sdk": "2.
|
|
53
|
+
"@omni/api": "2.260429.2",
|
|
54
|
+
"@omni/channel-discord": "2.260429.2",
|
|
55
|
+
"@omni/channel-gupshup": "2.260429.2",
|
|
56
|
+
"@omni/channel-sdk": "2.260429.2",
|
|
57
|
+
"@omni/channel-slack": "2.260429.2",
|
|
58
|
+
"@omni/channel-telegram": "2.260429.2",
|
|
59
|
+
"@omni/channel-whatsapp": "2.260429.2",
|
|
60
|
+
"@omni/core": "2.260429.2",
|
|
61
|
+
"@omni/sdk": "2.260429.2",
|
|
62
62
|
"@types/node": "^22.10.3",
|
|
63
63
|
"@types/qrcode-terminal": "^0.12.2",
|
|
64
64
|
"typescript": "^5.7.3"
|