@automagik/omni 2.260429.2 → 2.260429.4
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/index.js +17 -2
- package/dist/server/index.js +509 -414
- 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
|
}
|
package/dist/index.js
CHANGED
|
@@ -58576,6 +58576,7 @@ __export(exports_schema, {
|
|
|
58576
58576
|
handoffLogs: () => handoffLogs,
|
|
58577
58577
|
globalSettingsRelations: () => globalSettingsRelations,
|
|
58578
58578
|
globalSettings: () => globalSettings,
|
|
58579
|
+
genieHosts: () => genieHosts,
|
|
58579
58580
|
followUpDisarmReasons: () => followUpDisarmReasons,
|
|
58580
58581
|
eventTypes: () => eventTypes,
|
|
58581
58582
|
eventPayloads: () => eventPayloads,
|
|
@@ -58631,7 +58632,7 @@ __export(exports_schema, {
|
|
|
58631
58632
|
accessRules: () => accessRules,
|
|
58632
58633
|
accessModes: () => accessModes
|
|
58633
58634
|
});
|
|
58634
|
-
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;
|
|
58635
58636
|
var init_schema2 = __esm(() => {
|
|
58636
58637
|
init_events();
|
|
58637
58638
|
init_drizzle_orm();
|
|
@@ -59935,6 +59936,20 @@ var init_schema2 = __esm(() => {
|
|
|
59935
59936
|
pk: primaryKey({ columns: [table3.eventId, table3.handler], name: "processed_events_pk" }),
|
|
59936
59937
|
processedAtIdx: index("processed_events_processed_at_idx").on(table3.processedAt)
|
|
59937
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
|
+
}));
|
|
59938
59953
|
});
|
|
59939
59954
|
|
|
59940
59955
|
// ../../node_modules/.bun/postgres@3.4.8/node_modules/postgres/src/query.js
|
|
@@ -113938,7 +113953,7 @@ import { fileURLToPath } from "url";
|
|
|
113938
113953
|
// package.json
|
|
113939
113954
|
var package_default = {
|
|
113940
113955
|
name: "@automagik/omni",
|
|
113941
|
-
version: "2.260429.
|
|
113956
|
+
version: "2.260429.4",
|
|
113942
113957
|
description: "LLM-optimized CLI for Omni",
|
|
113943
113958
|
type: "module",
|
|
113944
113959
|
bin: {
|