@automagik/omni 2.260530.1 → 2.260530.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/say.d.ts.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/index.js +14 -12
- package/dist/lib/embedded-canonical-migration.d.ts +1 -1
- package/dist/resolve.d.ts +2 -2
- package/dist/resolve.d.ts.map +1 -1
- package/dist/server/index.js +10059 -878
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"say.d.ts","sourceRoot":"","sources":["../../src/commands/say.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"say.d.ts","sourceRoot":"","sources":["../../src/commands/say.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,wBAAgB,gBAAgB,IAAI,OAAO,CAoD1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAibpC,wBAAgB,iBAAiB,IAAI,OAAO,CA8F3C"}
|
package/dist/index.js
CHANGED
|
@@ -124950,7 +124950,7 @@ import { fileURLToPath } from "url";
|
|
|
124950
124950
|
// package.json
|
|
124951
124951
|
var package_default = {
|
|
124952
124952
|
name: "@automagik/omni",
|
|
124953
|
-
version: "2.260530.
|
|
124953
|
+
version: "2.260530.2",
|
|
124954
124954
|
description: "LLM-optimized CLI for Omni",
|
|
124955
124955
|
type: "module",
|
|
124956
124956
|
bin: {
|
|
@@ -125392,11 +125392,11 @@ ${names}`);
|
|
|
125392
125392
|
}
|
|
125393
125393
|
error(`No instance found matching "${input}"`);
|
|
125394
125394
|
}
|
|
125395
|
-
async function resolveChatId(input) {
|
|
125395
|
+
async function resolveChatId(input, instanceId) {
|
|
125396
125396
|
if (UUID_RE.test(input))
|
|
125397
125397
|
return input;
|
|
125398
125398
|
const client = getClient();
|
|
125399
|
-
const result = await client.chats.list({ limit: 100 });
|
|
125399
|
+
const result = await client.chats.list({ limit: 100, instanceId });
|
|
125400
125400
|
const chats = result.items;
|
|
125401
125401
|
if (/^[0-9a-f]{2,}$/i.test(input)) {
|
|
125402
125402
|
const matches = chats.filter((c2) => c2.id.toLowerCase().startsWith(input.toLowerCase()));
|
|
@@ -125424,14 +125424,14 @@ ${names}`);
|
|
|
125424
125424
|
}
|
|
125425
125425
|
error(`No chat found matching "${input}"`);
|
|
125426
125426
|
}
|
|
125427
|
-
async function resolveRecipient(input) {
|
|
125427
|
+
async function resolveRecipient(input, instanceId) {
|
|
125428
125428
|
if (UUID_RE.test(input))
|
|
125429
125429
|
return input;
|
|
125430
125430
|
if (/^\+?\d{7,}$/.test(input))
|
|
125431
125431
|
return input;
|
|
125432
125432
|
if (input.includes("@"))
|
|
125433
125433
|
return input;
|
|
125434
|
-
return resolveChatId(input);
|
|
125434
|
+
return resolveChatId(input, instanceId);
|
|
125435
125435
|
}
|
|
125436
125436
|
async function resolveMessageId(input, chatId) {
|
|
125437
125437
|
if (UUID_RE.test(input))
|
|
@@ -134540,7 +134540,7 @@ function createOpenCommand() {
|
|
|
134540
134540
|
}
|
|
134541
134541
|
let chatId;
|
|
134542
134542
|
try {
|
|
134543
|
-
chatId = await resolveChatId(contact);
|
|
134543
|
+
chatId = await resolveChatId(contact, instanceId);
|
|
134544
134544
|
} catch {
|
|
134545
134545
|
return error(`Could not resolve contact "${contact}". Try a chat ID, name, or phone number.`);
|
|
134546
134546
|
}
|
|
@@ -135703,7 +135703,7 @@ function createReactCommand() {
|
|
|
135703
135703
|
}
|
|
135704
135704
|
try {
|
|
135705
135705
|
const instanceId = await resolveInstanceId(ctx.instanceId);
|
|
135706
|
-
const chatId = await resolveRecipient(ctx.chatId);
|
|
135706
|
+
const chatId = await resolveRecipient(ctx.chatId, instanceId);
|
|
135707
135707
|
const messageId = await resolveReplyTo(options.message);
|
|
135708
135708
|
if (!messageId) {
|
|
135709
135709
|
return error("No message to react to. Set OMNI_MESSAGE, use --message <id>, or ensure context has a trigger message.");
|
|
@@ -136177,6 +136177,8 @@ function createSayCommand() {
|
|
|
136177
136177
|
if (!ctx.chatId) {
|
|
136178
136178
|
return error("No chat in context. Set OMNI_CHAT, use --chat, or run: omni open <contact>");
|
|
136179
136179
|
}
|
|
136180
|
+
const instanceId = await resolveInstanceId(ctx.instanceId);
|
|
136181
|
+
const chatId = await resolveRecipient(ctx.chatId, instanceId);
|
|
136180
136182
|
let replyTo;
|
|
136181
136183
|
if (options3.reply !== undefined) {
|
|
136182
136184
|
const replyId = typeof options3.reply === "string" ? options3.reply : undefined;
|
|
@@ -136188,8 +136190,8 @@ function createSayCommand() {
|
|
|
136188
136190
|
}
|
|
136189
136191
|
try {
|
|
136190
136192
|
const result = await client.messages.send({
|
|
136191
|
-
instanceId
|
|
136192
|
-
to:
|
|
136193
|
+
instanceId,
|
|
136194
|
+
to: chatId,
|
|
136193
136195
|
text: text3,
|
|
136194
136196
|
replyTo
|
|
136195
136197
|
});
|
|
@@ -136560,10 +136562,10 @@ async function validateSendOptions(options3) {
|
|
|
136560
136562
|
if (!options3.to && !options3.presence) {
|
|
136561
136563
|
error("--to <recipient> is required");
|
|
136562
136564
|
}
|
|
136565
|
+
const instanceId = await resolveInstanceId(instanceInput);
|
|
136563
136566
|
if (options3.to) {
|
|
136564
|
-
options3.to = await resolveRecipient(options3.to);
|
|
136567
|
+
options3.to = await resolveRecipient(options3.to, instanceId);
|
|
136565
136568
|
}
|
|
136566
|
-
const instanceId = await resolveInstanceId(instanceInput);
|
|
136567
136569
|
return instanceId;
|
|
136568
136570
|
}
|
|
136569
136571
|
function handleSendError(err2) {
|
|
@@ -139127,7 +139129,7 @@ program2.addHelpText("afterAll", (context) => {
|
|
|
139127
139129
|
{ command: 'omni send --to +55119999 --text "Hi"', description: "Send text" },
|
|
139128
139130
|
{ command: "omni send --to +55119999 --media ./pic.jpg", description: "Send image" },
|
|
139129
139131
|
{ command: "omni chats messages <chat-id>", description: "Read conversation" },
|
|
139130
|
-
{ command: 'omni persons search "
|
|
139132
|
+
{ command: 'omni persons search "Example User"', description: "Find contact" }
|
|
139131
139133
|
]);
|
|
139132
139134
|
let output = `
|
|
139133
139135
|
${c14().bold("Status")}: ${status}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* `~/.omni/data/pgserve/` as an unmounted postmaster data dir
|
|
19
19
|
* - The canonical `omni` database on autopg is empty
|
|
20
20
|
*
|
|
21
|
-
* Found during
|
|
21
|
+
* Found during 2026-05-20 dogfood: omni-api boots cleanly on
|
|
22
22
|
* canonical but `omni instances list` returns nothing — the data is
|
|
23
23
|
* stranded.
|
|
24
24
|
*
|
package/dist/resolve.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare function resolveInstanceId(input: string): Promise<string>;
|
|
|
27
27
|
*
|
|
28
28
|
* Exits with error if no match or ambiguous.
|
|
29
29
|
*/
|
|
30
|
-
export declare function resolveChatId(input: string): Promise<string>;
|
|
30
|
+
export declare function resolveChatId(input: string, instanceId?: string): Promise<string>;
|
|
31
31
|
/**
|
|
32
32
|
* Resolve a recipient identifier for the send command.
|
|
33
33
|
*
|
|
@@ -37,7 +37,7 @@ export declare function resolveChatId(input: string): Promise<string>;
|
|
|
37
37
|
* Otherwise, resolves as a chat identifier (full UUID, UUID prefix, name).
|
|
38
38
|
* Exits with error if resolution fails.
|
|
39
39
|
*/
|
|
40
|
-
export declare function resolveRecipient(input: string): Promise<string>;
|
|
40
|
+
export declare function resolveRecipient(input: string, instanceId?: string): Promise<string>;
|
|
41
41
|
/**
|
|
42
42
|
* Resolve a message identifier to a UUID.
|
|
43
43
|
*
|
package/dist/resolve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA+BtE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA+
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA+BtE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA+BvF;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAY1F;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAwCtF;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBpE;AAED;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,G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