@automagik/omni 2.260804.3 → 2.260830.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/db/drizzle/0048_message_threads.sql +45 -0
- package/db/drizzle/0049_scheduled_messages.sql +73 -0
- package/db/drizzle/0050_slack_user_token.sql +30 -0
- package/db/drizzle/0051_message_pin_star.sql +27 -0
- package/db/drizzle/meta/_journal.json +28 -0
- package/dist/commands/_setup-helpers.d.ts +50 -0
- package/dist/commands/_setup-helpers.d.ts.map +1 -0
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/events.d.ts.map +1 -1
- package/dist/commands/instances.d.ts +3 -0
- package/dist/commands/instances.d.ts.map +1 -1
- package/dist/commands/schedule.d.ts +24 -0
- package/dist/commands/schedule.d.ts.map +1 -0
- package/dist/commands/setup.d.ts +21 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/slack.d.ts +12 -0
- package/dist/commands/slack.d.ts.map +1 -0
- package/dist/index.js +531 -23
- package/dist/sdk/client.d.ts +68 -0
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +87 -0
- package/dist/server/index.js +1817 -230
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
-- Message threading + permalink (#889).
|
|
2
|
+
--
|
|
3
|
+
-- Until now the omni core had no representation of a thread. `threadId` rode
|
|
4
|
+
-- along in the event payload (packages/core/src/events/types.ts) purely to
|
|
5
|
+
-- route per_thread agent sessions, and was dropped on the floor at
|
|
6
|
+
-- persistence time. The one modelled path — chats.parent_chat_id +
|
|
7
|
+
-- chat_type='thread' — is dead code: inferChatType() only inspects WhatsApp
|
|
8
|
+
-- JID suffixes and never returns 'thread'.
|
|
9
|
+
--
|
|
10
|
+
-- The practical damage: channel-slack sends `replyToId = thread_ts`, so a
|
|
11
|
+
-- Slack thread reply is indistinguishable from a WhatsApp quote once stored.
|
|
12
|
+
--
|
|
13
|
+
-- A reply points at ONE message. A thread is a sub-conversation many people
|
|
14
|
+
-- post into. They are different relations and need different columns.
|
|
15
|
+
--
|
|
16
|
+
-- `is_thread_broadcast` carries Slack's `reply_broadcast` — posted inside the
|
|
17
|
+
-- thread AND surfaced in the channel. It is orthogonal to thread_external_id,
|
|
18
|
+
-- hence its own column rather than an enum on one field.
|
|
19
|
+
--
|
|
20
|
+
-- `reply_count` / `latest_reply_at` are denormalized onto the ROOT message.
|
|
21
|
+
--
|
|
22
|
+
-- No backfill: thread membership was never recorded, so it cannot be
|
|
23
|
+
-- reconstructed from existing rows. Historical Slack thread replies keep
|
|
24
|
+
-- reply_to_external_id set and simply carry NULL thread_external_id.
|
|
25
|
+
--
|
|
26
|
+
-- Hand-written following the 0044-0047 precedent (snapshot drift keeps
|
|
27
|
+
-- drizzle-kit generate interactive). Additive + idempotent.
|
|
28
|
+
|
|
29
|
+
-- NOTE: no explicit BEGIN/COMMIT — the boot migrator executes this file on a
|
|
30
|
+
-- pooled postgres-js connection, which rejects raw transaction control
|
|
31
|
+
-- (UNSAFE_TRANSACTION).
|
|
32
|
+
|
|
33
|
+
ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "thread_external_id" varchar(255);
|
|
34
|
+
ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "thread_root_message_id" uuid;
|
|
35
|
+
ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "is_thread_broadcast" boolean DEFAULT false NOT NULL;
|
|
36
|
+
ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "reply_count" integer DEFAULT 0 NOT NULL;
|
|
37
|
+
ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "latest_reply_at" timestamp with time zone;
|
|
38
|
+
ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "permalink" text;
|
|
39
|
+
|
|
40
|
+
-- Fetch a whole thread in platform order.
|
|
41
|
+
CREATE INDEX IF NOT EXISTS "messages_thread_external_idx"
|
|
42
|
+
ON "messages" ("chat_id", "thread_external_id", "platform_timestamp");
|
|
43
|
+
|
|
44
|
+
CREATE INDEX IF NOT EXISTS "messages_thread_root_idx"
|
|
45
|
+
ON "messages" ("thread_root_message_id");
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
-- Scheduled outbound messages (#889).
|
|
2
|
+
--
|
|
3
|
+
-- The omni core had no notion of "send this later". follow-up-sweeper (#404)
|
|
4
|
+
-- is the nearest thing, but it is inactivity-driven re-engagement, not a
|
|
5
|
+
-- message parked for a specific time.
|
|
6
|
+
--
|
|
7
|
+
-- Two delivery modes, chosen per channel via the canScheduleMessage capability:
|
|
8
|
+
--
|
|
9
|
+
-- platform — the channel schedules natively (Slack chat.scheduleMessage).
|
|
10
|
+
-- Delivery survives omni being down. external_scheduled_id holds
|
|
11
|
+
-- the platform handle used to cancel.
|
|
12
|
+
-- local — omni holds the message and sends it at send_at itself, for
|
|
13
|
+
-- channels with no native scheduling.
|
|
14
|
+
--
|
|
15
|
+
-- The row exists even in platform mode, deliberately: Slack's
|
|
16
|
+
-- chat.scheduledMessages.list only returns what the SAME token scheduled, so
|
|
17
|
+
-- the platform cannot serve as our source of truth for what is pending.
|
|
18
|
+
-- Everything scheduled through omni is recorded here; reconciliation against
|
|
19
|
+
-- the platform is best-effort.
|
|
20
|
+
--
|
|
21
|
+
-- chat_external_id is the PLATFORM id, not chats.id — a message can be
|
|
22
|
+
-- scheduled to a conversation we have never persisted.
|
|
23
|
+
--
|
|
24
|
+
-- Tenancy derives via instance_id (the whatsapp_templates / whatsapp_flow_keys
|
|
25
|
+
-- precedent) — no denormalized tenant_id column, so the table stays outside the
|
|
26
|
+
-- RLS tenant-table manifest by construction. The sweeper scopes per tenant by
|
|
27
|
+
-- restricting to that tenant's instances.
|
|
28
|
+
--
|
|
29
|
+
-- Hand-written following the 0044-0048 precedent (snapshot drift keeps
|
|
30
|
+
-- drizzle-kit generate interactive). Additive + idempotent.
|
|
31
|
+
|
|
32
|
+
-- NOTE: no explicit BEGIN/COMMIT — the boot migrator executes this file on a
|
|
33
|
+
-- pooled postgres-js connection, which rejects raw transaction control
|
|
34
|
+
-- (UNSAFE_TRANSACTION).
|
|
35
|
+
|
|
36
|
+
CREATE TABLE IF NOT EXISTS "scheduled_messages" (
|
|
37
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
38
|
+
"instance_id" uuid NOT NULL,
|
|
39
|
+
"chat_external_id" varchar(255) NOT NULL,
|
|
40
|
+
"thread_external_id" varchar(255),
|
|
41
|
+
"is_thread_broadcast" boolean DEFAULT false NOT NULL,
|
|
42
|
+
"content" jsonb NOT NULL,
|
|
43
|
+
"send_at" timestamp with time zone NOT NULL,
|
|
44
|
+
"delivery_mode" varchar(20) NOT NULL,
|
|
45
|
+
"status" varchar(20) DEFAULT 'pending' NOT NULL,
|
|
46
|
+
"external_scheduled_id" varchar(255),
|
|
47
|
+
"sent_external_id" varchar(255),
|
|
48
|
+
"sent_at" timestamp with time zone,
|
|
49
|
+
"canceled_at" timestamp with time zone,
|
|
50
|
+
"failed_at" timestamp with time zone,
|
|
51
|
+
"last_error" text,
|
|
52
|
+
"attempt_count" integer DEFAULT 0 NOT NULL,
|
|
53
|
+
"created_by_agent_id" uuid,
|
|
54
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
55
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
DO $$ BEGIN
|
|
59
|
+
ALTER TABLE "scheduled_messages"
|
|
60
|
+
ADD CONSTRAINT "scheduled_messages_instance_id_instances_id_fk"
|
|
61
|
+
FOREIGN KEY ("instance_id") REFERENCES "instances"("id") ON DELETE cascade;
|
|
62
|
+
EXCEPTION WHEN duplicate_object THEN NULL;
|
|
63
|
+
END $$;
|
|
64
|
+
|
|
65
|
+
-- The sweeper's hot path: pending rows whose time has come.
|
|
66
|
+
CREATE INDEX IF NOT EXISTS "scheduled_messages_due_idx"
|
|
67
|
+
ON "scheduled_messages" ("status", "send_at");
|
|
68
|
+
|
|
69
|
+
CREATE INDEX IF NOT EXISTS "scheduled_messages_instance_idx"
|
|
70
|
+
ON "scheduled_messages" ("instance_id", "status");
|
|
71
|
+
|
|
72
|
+
CREATE INDEX IF NOT EXISTS "scheduled_messages_chat_idx"
|
|
73
|
+
ON "scheduled_messages" ("instance_id", "chat_external_id");
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
-- Slack user token + auth mode on instances (#889).
|
|
2
|
+
--
|
|
3
|
+
-- authMode 'user' makes the plugin act as the human who authorized the app
|
|
4
|
+
-- rather than as the bot: posts, edits and reactions are attributed to them,
|
|
5
|
+
-- and search.messages becomes callable (no bot token can search).
|
|
6
|
+
--
|
|
7
|
+
-- Until now the user token could only reach the plugin through `credentials`
|
|
8
|
+
-- or inline config, i.e. never through the sealed column path every other
|
|
9
|
+
-- channel credential uses.
|
|
10
|
+
--
|
|
11
|
+
-- slack_user_token joins the sealed credential set (SEALED_CREDENTIAL_COLUMNS
|
|
12
|
+
-- in services/instances.ts), so it is encrypted at rest under the owning
|
|
13
|
+
-- tenant and redacted on read like slack_bot_token.
|
|
14
|
+
--
|
|
15
|
+
-- Operational note worth keeping in mind: unlike a bot token, this one is
|
|
16
|
+
-- bound to a PERSON. It stops working when that account is deactivated, and
|
|
17
|
+
-- everything it did is attributed to them.
|
|
18
|
+
--
|
|
19
|
+
-- slack_auth_mode is left nullable rather than defaulted to 'bot' so existing
|
|
20
|
+
-- rows stay untouched; the plugin already treats absent as 'bot'.
|
|
21
|
+
--
|
|
22
|
+
-- Hand-written following the 0044-0049 precedent (snapshot drift keeps
|
|
23
|
+
-- drizzle-kit generate interactive). Additive + idempotent.
|
|
24
|
+
|
|
25
|
+
-- NOTE: no explicit BEGIN/COMMIT — the boot migrator executes this file on a
|
|
26
|
+
-- pooled postgres-js connection, which rejects raw transaction control
|
|
27
|
+
-- (UNSAFE_TRANSACTION).
|
|
28
|
+
|
|
29
|
+
ALTER TABLE "instances" ADD COLUMN IF NOT EXISTS "slack_user_token" text;
|
|
30
|
+
ALTER TABLE "instances" ADD COLUMN IF NOT EXISTS "slack_auth_mode" varchar(10);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
-- Per-message pin and star (#889).
|
|
2
|
+
--
|
|
3
|
+
-- `chats.settings->>'pinned'` already existed but is a different thing: it
|
|
4
|
+
-- pins the CONVERSATION in the sidebar. There was nowhere to record that a
|
|
5
|
+
-- particular MESSAGE was pinned or starred, so the starMessage plugin call
|
|
6
|
+
-- had no persistence behind it at all — the state lived only on the platform.
|
|
7
|
+
--
|
|
8
|
+
-- pinned_by holds the platform user id that pinned it (Slack reports one);
|
|
9
|
+
-- null means we know it is pinned but not by whom.
|
|
10
|
+
--
|
|
11
|
+
-- Hand-written following the 0044-0050 precedent (snapshot drift keeps
|
|
12
|
+
-- drizzle-kit generate interactive). Additive + idempotent.
|
|
13
|
+
|
|
14
|
+
-- NOTE: no explicit BEGIN/COMMIT — the boot migrator executes this file on a
|
|
15
|
+
-- pooled postgres-js connection, which rejects raw transaction control
|
|
16
|
+
-- (UNSAFE_TRANSACTION).
|
|
17
|
+
|
|
18
|
+
ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "pinned_at" timestamp with time zone;
|
|
19
|
+
ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "pinned_by" varchar(255);
|
|
20
|
+
ALTER TABLE "messages" ADD COLUMN IF NOT EXISTS "starred_at" timestamp with time zone;
|
|
21
|
+
|
|
22
|
+
-- Partial indexes: the vast majority of rows are neither pinned nor starred.
|
|
23
|
+
CREATE INDEX IF NOT EXISTS "messages_pinned_idx"
|
|
24
|
+
ON "messages" ("chat_id", "pinned_at") WHERE "pinned_at" IS NOT NULL;
|
|
25
|
+
|
|
26
|
+
CREATE INDEX IF NOT EXISTS "messages_starred_idx"
|
|
27
|
+
ON "messages" ("chat_id", "starred_at") WHERE "starred_at" IS NOT NULL;
|
|
@@ -337,6 +337,34 @@
|
|
|
337
337
|
"when": 1784700000000,
|
|
338
338
|
"tag": "0047_rename_whatsapp_cloud_to_business",
|
|
339
339
|
"breakpoints": true
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"idx": 48,
|
|
343
|
+
"version": "7",
|
|
344
|
+
"when": 1784800000000,
|
|
345
|
+
"tag": "0048_message_threads",
|
|
346
|
+
"breakpoints": true
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"idx": 49,
|
|
350
|
+
"version": "7",
|
|
351
|
+
"when": 1784900000000,
|
|
352
|
+
"tag": "0049_scheduled_messages",
|
|
353
|
+
"breakpoints": true
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"idx": 50,
|
|
357
|
+
"version": "7",
|
|
358
|
+
"when": 1785000000000,
|
|
359
|
+
"tag": "0050_slack_user_token",
|
|
360
|
+
"breakpoints": true
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"idx": 51,
|
|
364
|
+
"version": "7",
|
|
365
|
+
"when": 1785100000000,
|
|
366
|
+
"tag": "0051_message_pin_star",
|
|
367
|
+
"breakpoints": true
|
|
340
368
|
}
|
|
341
369
|
]
|
|
342
370
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for idempotent provider + agent setup.
|
|
3
|
+
*
|
|
4
|
+
* Used by:
|
|
5
|
+
* - `omni connect` (NATS-Genie specialization)
|
|
6
|
+
* - `omni setup agent` (generalized compound setup, issue #440)
|
|
7
|
+
*
|
|
8
|
+
* These helpers implement "find-or-create" semantics so operators can re-run
|
|
9
|
+
* setup without colliding on unique constraints.
|
|
10
|
+
*/
|
|
11
|
+
import type { ProviderSchema } from '@omni/core';
|
|
12
|
+
import type { OmniClient } from '@omni/sdk';
|
|
13
|
+
/** AgentSystem values accepted by the agents.create endpoint. */
|
|
14
|
+
export type AgentSystem = 'claude' | 'agno' | 'openai' | 'gemini' | 'custom' | 'omni-internal';
|
|
15
|
+
/**
|
|
16
|
+
* Map a provider schema to the agent record's `provider` field (AgentSystem).
|
|
17
|
+
* Schemas with no dedicated AgentSystem fall back to 'custom'.
|
|
18
|
+
*/
|
|
19
|
+
export declare function schemaToAgentProvider(schema: ProviderSchema | string): AgentSystem;
|
|
20
|
+
/** Arguments for find-or-create provider. */
|
|
21
|
+
export interface FindOrCreateProviderArgs {
|
|
22
|
+
name: string;
|
|
23
|
+
schema: ProviderSchema | string;
|
|
24
|
+
baseUrl: string;
|
|
25
|
+
apiKey?: string;
|
|
26
|
+
schemaConfig?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Find or create a provider by (name, schema). Returns the provider id or null
|
|
30
|
+
* on unrecoverable failure. Mirrors the idempotent pattern used historically
|
|
31
|
+
* in `connect.ts` — try create, fall back to a list+filter lookup.
|
|
32
|
+
*/
|
|
33
|
+
export declare function findOrCreateProvider(client: OmniClient, args: FindOrCreateProviderArgs): Promise<string | null>;
|
|
34
|
+
/** Arguments for find-or-create agent. */
|
|
35
|
+
export interface FindOrCreateAgentArgs {
|
|
36
|
+
name: string;
|
|
37
|
+
providerId: string;
|
|
38
|
+
agentProvider: AgentSystem;
|
|
39
|
+
agentType?: 'assistant' | 'workflow' | 'team' | 'tool';
|
|
40
|
+
model?: string;
|
|
41
|
+
capabilities?: string[];
|
|
42
|
+
isInternal?: boolean;
|
|
43
|
+
isActive?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Find or create an agent record by (name, agentProviderId). Returns the
|
|
47
|
+
* agent id or null on unrecoverable failure.
|
|
48
|
+
*/
|
|
49
|
+
export declare function findOrCreateAgent(client: OmniClient, args: FindOrCreateAgentArgs): Promise<string | null>;
|
|
50
|
+
//# sourceMappingURL=_setup-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_setup-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/_setup-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,iEAAiE;AACjE,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,eAAe,CAAC;AAE/F;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,GAAG,WAAW,CASlF;AAED,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwBrH;AAED,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA6B/G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/commands/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/commands/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC,wBAAgB,oBAAoB,IAAI,OAAO,CA0G9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/commands/events.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/commands/events.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAc,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoNpC,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAQvF;AAED,uDAAuD;AACvD,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAOpD;AA6HD,wBAAgB,mBAAmB,IAAI,OAAO,CAkP7C"}
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
* omni instances status <id>
|
|
11
11
|
* omni instances qr <id>
|
|
12
12
|
* omni instances pair <id> --phone <number>
|
|
13
|
+
* omni instances passkey <id>
|
|
14
|
+
* omni instances passkey-submit <id> --response-file <path>
|
|
15
|
+
* omni instances passkey-confirm <id>
|
|
13
16
|
* omni instances connect <id>
|
|
14
17
|
* omni instances disconnect <id>
|
|
15
18
|
* omni instances restart <id>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../src/commands/instances.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../src/commands/instances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyMpC,wBAAgB,sBAAsB,IAAI,OAAO,CAg3ChD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scheduled message commands (#889)
|
|
3
|
+
*
|
|
4
|
+
* omni schedule send <instance> <chat> <text> --at <when>
|
|
5
|
+
* omni schedule list <instance>
|
|
6
|
+
* omni schedule get <id>
|
|
7
|
+
* omni schedule cancel <id>
|
|
8
|
+
*
|
|
9
|
+
* The delivery mode is decided server-side from the channel's
|
|
10
|
+
* canScheduleMessage capability — the caller cannot know which channels
|
|
11
|
+
* schedule natively, and choosing wrong would silently change the durability
|
|
12
|
+
* guarantee.
|
|
13
|
+
*/
|
|
14
|
+
import { Command } from 'commander';
|
|
15
|
+
/**
|
|
16
|
+
* Parse `--at`: an ISO-8601 instant, or a relative offset like `30m`, `2h`, `3d`.
|
|
17
|
+
*
|
|
18
|
+
* Relative offsets exist because that is how a human actually thinks about
|
|
19
|
+
* this ("mandar daqui a 2h"), and hand-writing an ISO timestamp in the right
|
|
20
|
+
* timezone is exactly the step that goes wrong.
|
|
21
|
+
*/
|
|
22
|
+
export declare function parseSendAt(raw: string, now?: Date): Date;
|
|
23
|
+
export declare function createScheduleCommand(): Command;
|
|
24
|
+
//# sourceMappingURL=schedule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../src/commands/schedule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,IAAiB,GAAG,IAAI,CAiBrE;AAED,wBAAgB,qBAAqB,IAAI,OAAO,CAwF/C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Setup Command — omni setup agent
|
|
3
|
+
*
|
|
4
|
+
* Compound one-step command that wires an AI agent to a channel instance.
|
|
5
|
+
* Generalizes the `omni connect` pattern across every provider schema:
|
|
6
|
+
* agno | webhook | openclaw | ag-ui | claude-code | a2a | nats-genie
|
|
7
|
+
*
|
|
8
|
+
* Steps:
|
|
9
|
+
* 1. Resolve instance by name or UUID
|
|
10
|
+
* 2. Build provider config per `--schema` (per-schema adapter)
|
|
11
|
+
* 3. Find-or-create provider (idempotent by name+schema)
|
|
12
|
+
* 4. Find-or-create agent (idempotent by name+providerId)
|
|
13
|
+
* 5. Update instance — agentId, agentProviderId, agentReplyFilter, triggerMode
|
|
14
|
+
* 6. Run connectivity test via providers.checkHealth
|
|
15
|
+
* 7. Print summary
|
|
16
|
+
*
|
|
17
|
+
* Closes #440.
|
|
18
|
+
*/
|
|
19
|
+
import { Command } from 'commander';
|
|
20
|
+
export declare function createTopLevelSetupCommand(): Command;
|
|
21
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0IpC,wBAAgB,0BAA0B,IAAI,OAAO,CA+BpD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slack-only commands (#889)
|
|
3
|
+
*
|
|
4
|
+
* omni slack dm <instance> <userId> — resolve/open the DM channel
|
|
5
|
+
* omni slack search <instance> <query> — full-text search (user token only)
|
|
6
|
+
*
|
|
7
|
+
* Neither has a cross-channel equivalent, which is why they live here rather
|
|
8
|
+
* than under `omni messages`.
|
|
9
|
+
*/
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
export declare function createSlackCommand(): Command;
|
|
12
|
+
//# sourceMappingURL=slack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../../src/commands/slack.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,kBAAkB,IAAI,OAAO,CAoD5C"}
|