@automagik/omni 2.260225.3 → 2.260225.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/dist/commands/instances.d.ts +1 -1
- package/dist/commands/instances.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/server/index.js +4064 -1296
- package/package.json +9 -9
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* omni instances disconnect <id>
|
|
15
15
|
* omni instances restart <id>
|
|
16
16
|
* omni instances logout <id>
|
|
17
|
-
* omni instances sync <id> --type <type>
|
|
17
|
+
* omni instances sync <id> --type <type> [--chat <jid>]
|
|
18
18
|
* omni instances syncs <id> [job-id]
|
|
19
19
|
*/
|
|
20
20
|
import { Command } from 'commander';
|
|
@@ -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;AAqJpC,wBAAgB,sBAAsB,IAAI,OAAO,
|
|
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;AAqJpC,wBAAgB,sBAAsB,IAAI,OAAO,CAulChD"}
|
package/dist/index.js
CHANGED
|
@@ -27655,7 +27655,7 @@ import { fileURLToPath } from "url";
|
|
|
27655
27655
|
// package.json
|
|
27656
27656
|
var package_default = {
|
|
27657
27657
|
name: "@automagik/omni",
|
|
27658
|
-
version: "2.260225.
|
|
27658
|
+
version: "2.260225.4",
|
|
27659
27659
|
description: "LLM-optimized CLI for Omni v2",
|
|
27660
27660
|
type: "module",
|
|
27661
27661
|
bin: {
|
|
@@ -32274,7 +32274,7 @@ function createInstancesCommand() {
|
|
|
32274
32274
|
error(`Failed to logout: ${message}`);
|
|
32275
32275
|
}
|
|
32276
32276
|
});
|
|
32277
|
-
instances.command("sync <id>").description("Start a sync operation").requiredOption("--type <type>", `Sync type (${VALID_SYNC_TYPES.join(", ")})`).option("--depth <depth>", "Sync depth (7d, 30d, 90d, 1y, all)").option("--download-media", "Download media files").action(async (rawId, options) => {
|
|
32277
|
+
instances.command("sync <id>").description("Start a sync operation").requiredOption("--type <type>", `Sync type (${VALID_SYNC_TYPES.join(", ")})`).option("--depth <depth>", "Sync depth (7d, 30d, 90d, 1y, all)").option("--download-media", "Download media files").option("--chat <jid>", "Specific chat JID for per-chat active sync (WhatsApp only)").action(async (rawId, options) => {
|
|
32278
32278
|
if (!VALID_SYNC_TYPES.includes(options.type)) {
|
|
32279
32279
|
error(`Invalid sync type: ${options.type}`, {
|
|
32280
32280
|
validTypes: VALID_SYNC_TYPES
|
|
@@ -32291,12 +32291,15 @@ function createInstancesCommand() {
|
|
|
32291
32291
|
const result = await client.instances.startSync(id, {
|
|
32292
32292
|
type: options.type,
|
|
32293
32293
|
depth: options.depth,
|
|
32294
|
-
downloadMedia: options.downloadMedia
|
|
32294
|
+
downloadMedia: options.downloadMedia,
|
|
32295
|
+
...options.chat ? { chatJids: [options.chat] } : {}
|
|
32295
32296
|
});
|
|
32297
|
+
const syncMode = options.chat ? `active (chat: ${options.chat})` : "passive";
|
|
32296
32298
|
success(result.message, {
|
|
32297
32299
|
jobId: result.jobId,
|
|
32298
32300
|
type: result.type,
|
|
32299
|
-
status: result.status
|
|
32301
|
+
status: result.status,
|
|
32302
|
+
mode: syncMode
|
|
32300
32303
|
});
|
|
32301
32304
|
} catch (err) {
|
|
32302
32305
|
const message = err instanceof Error ? err.message : "Unknown error";
|