@automagik/omni 2.260911.7 → 2.260914.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/events.d.ts +2 -0
- package/dist/commands/events.d.ts.map +1 -1
- package/dist/commands/instances.d.ts +1 -0
- package/dist/commands/instances.d.ts.map +1 -1
- package/dist/commands/webhooks.d.ts +4 -0
- package/dist/commands/webhooks.d.ts.map +1 -1
- package/dist/index.js +111 -39
- package/dist/resolve.d.ts +5 -0
- package/dist/resolve.d.ts.map +1 -1
- package/dist/sdk/client.d.ts +4 -0
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/index.js +11 -1
- package/dist/server/index.js +1344 -1793
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/commands/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,KAAK,mBAAmB,EAAsB,MAAM,YAAY,CAAC;AAC1E,OAAO,KAAK,EAAE,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE1E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwJpC,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzF;AAqDD,2DAA2D;AAC3D,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AA+BD,w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|
* omni instances logout <id>
|
|
20
20
|
* omni instances sync <id> --type <type> [--chat <jid>]
|
|
21
21
|
* omni instances syncs <id> [job-id]
|
|
22
|
+
* omni instances syncs cancel <id> <job-id>
|
|
22
23
|
*/
|
|
23
24
|
import { Command } from 'commander';
|
|
24
25
|
export declare function createInstancesCommand(): Command;
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkNpC,wBAAgB,sBAAsB,IAAI,OAAO,CAg5ChD"}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import type { WebhookEventTypeMappingBody, WebhookSignatureConfigBody } from '@omni/sdk';
|
|
16
16
|
import { Command } from 'commander';
|
|
17
|
+
/** Ingress receive URL for a source: absolute when a non-loopback API URL is configured, else the path. */
|
|
18
|
+
declare function ingressUrl(name: string, apiUrl?: string | undefined): string;
|
|
17
19
|
interface SignatureSecretOptions {
|
|
18
20
|
signatureSecret?: string;
|
|
19
21
|
signatureSecretEnv?: string;
|
|
@@ -85,6 +87,8 @@ declare const MUTATION_POLICIES: readonly ["same_id", "new_id"];
|
|
|
85
87
|
export declare function createWebhooksCommand(): Command;
|
|
86
88
|
/** Test-only surface — not part of the CLI contract. */
|
|
87
89
|
export declare const __testables: {
|
|
90
|
+
INGRESS_PATH: string;
|
|
91
|
+
ingressUrl: typeof ingressUrl;
|
|
88
92
|
resolveSignatureSecret: typeof resolveSignatureSecret;
|
|
89
93
|
buildSignatureConfig: typeof buildSignatureConfig;
|
|
90
94
|
assertPairedSignatureOnCreate: typeof assertPairedSignatureOnCreate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/commands/webhooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/commands/webhooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,2GAA2G;AAC3G,iBAAS,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAsB,GAAG,MAAM,CAItE;AASD,UAAU,sBAAsB;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAcD;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,sBAAsB,EAC/B,SAAS,GAAE,MAAM,OAAO,CAAC,MAAM,CAAuB,GACrD,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAqC7B;AAED,6FAA6F;AAC7F,iBAAS,oBAAoB,CAAC,OAAO,EAAE;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,0BAA0B,GAAG,SAAS,CAczC;AAoBD;;;;;;GAMG;AACH,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,2BAA2B,GAAG,SAAS,CA0BjG;AAED,UAAU,mBAAoB,SAAQ,sBAAsB;IAC1D,IAAI,CAAC,E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AAED;;;;;GAKG;AACH,iBAAS,6BAA6B,CACpC,eAAe,EAAE,0BAA0B,GAAG,SAAS,EACvD,eAAe,EAAE,MAAM,GAAG,SAAS,GAClC,IAAI,CAQN;AAID,QAAA,MAAM,gBAAgB,kDAAmD,CAAC;AAC1E,QAAA,MAAM,iBAAiB,gCAAiC,CAAC;AAuDzD,wBAAgB,qBAAqB,IAAI,OAAO,CAmU/C;AAED,wDAAwD;AACxD,eAAO,MAAM,WAAW;;;;;;;;CAQvB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -40008,6 +40008,15 @@ var init_types5 = __esm(() => {
|
|
|
40008
40008
|
});
|
|
40009
40009
|
|
|
40010
40010
|
// ../core/src/automations/conditions.ts
|
|
40011
|
+
function buildConditionContext(payload, metadata) {
|
|
40012
|
+
const raw2 = payload.rawPayload;
|
|
40013
|
+
const rawFields = raw2 && typeof raw2 === "object" && !Array.isArray(raw2) ? raw2 : {};
|
|
40014
|
+
return { ...metadata ?? {}, ...rawFields, ...payload };
|
|
40015
|
+
}
|
|
40016
|
+
function getPayloadValue(payload, path) {
|
|
40017
|
+
const value = getNestedValue(payload, path);
|
|
40018
|
+
return value === undefined ? getNestedValue(payload.rawPayload, path) : value;
|
|
40019
|
+
}
|
|
40011
40020
|
function getNestedValue(obj, path) {
|
|
40012
40021
|
if (!path || obj === null || obj === undefined) {
|
|
40013
40022
|
return;
|
|
@@ -40204,13 +40213,13 @@ function resolveTemplatePath(path, context) {
|
|
|
40204
40213
|
return JSON.stringify({ id, type, timestamp, metadata, payload: context.payload });
|
|
40205
40214
|
}
|
|
40206
40215
|
if (root === "payload")
|
|
40207
|
-
return rest ?
|
|
40216
|
+
return rest ? getPayloadValue(context.payload, rest) : context.payload;
|
|
40208
40217
|
if (root === "env")
|
|
40209
40218
|
return rest ? context.env[rest] : undefined;
|
|
40210
40219
|
if (root && context.variables[root] !== undefined) {
|
|
40211
40220
|
return rest ? getNestedValue(context.variables[root], rest) : context.variables[root];
|
|
40212
40221
|
}
|
|
40213
|
-
return
|
|
40222
|
+
return getPayloadValue(context.payload, trimmed);
|
|
40214
40223
|
}
|
|
40215
40224
|
function formatValue3(value) {
|
|
40216
40225
|
if (value === undefined || value === null) {
|
|
@@ -40221,26 +40230,28 @@ function formatValue3(value) {
|
|
|
40221
40230
|
}
|
|
40222
40231
|
return String(value);
|
|
40223
40232
|
}
|
|
40224
|
-
function substituteTemplate(template, context) {
|
|
40233
|
+
function substituteTemplate(template, context, onUnresolved) {
|
|
40225
40234
|
return template.replace(TEMPLATE_REGEX, (_match, path) => {
|
|
40226
40235
|
const value = resolveTemplatePath(path, context);
|
|
40236
|
+
if (value === undefined)
|
|
40237
|
+
onUnresolved?.(path.trim());
|
|
40227
40238
|
return formatValue3(value);
|
|
40228
40239
|
});
|
|
40229
40240
|
}
|
|
40230
|
-
function substituteTemplateObject(obj, context) {
|
|
40241
|
+
function substituteTemplateObject(obj, context, onUnresolved) {
|
|
40231
40242
|
const result = {};
|
|
40232
40243
|
for (const [key, value] of Object.entries(obj)) {
|
|
40233
40244
|
if (typeof value === "string") {
|
|
40234
|
-
result[key] = substituteTemplate(value, context);
|
|
40245
|
+
result[key] = substituteTemplate(value, context, onUnresolved);
|
|
40235
40246
|
} else if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
40236
|
-
result[key] = substituteTemplateObject(value, context);
|
|
40247
|
+
result[key] = substituteTemplateObject(value, context, onUnresolved);
|
|
40237
40248
|
} else if (Array.isArray(value)) {
|
|
40238
40249
|
result[key] = value.map((item) => {
|
|
40239
40250
|
if (typeof item === "string") {
|
|
40240
|
-
return substituteTemplate(item, context);
|
|
40251
|
+
return substituteTemplate(item, context, onUnresolved);
|
|
40241
40252
|
}
|
|
40242
40253
|
if (typeof item === "object" && item !== null) {
|
|
40243
|
-
return substituteTemplateObject(item, context);
|
|
40254
|
+
return substituteTemplateObject(item, context, onUnresolved);
|
|
40244
40255
|
}
|
|
40245
40256
|
return item;
|
|
40246
40257
|
});
|
|
@@ -41939,11 +41950,7 @@ class AutomationEngine {
|
|
|
41939
41950
|
await this.logExecution(result2, null);
|
|
41940
41951
|
return result2;
|
|
41941
41952
|
}
|
|
41942
|
-
const
|
|
41943
|
-
...event.metadata,
|
|
41944
|
-
...event.payload
|
|
41945
|
-
};
|
|
41946
|
-
const conditionResult = evaluateConditionsWithDetails(automation.triggerConditions, conditionPayload, automation.conditionLogic ?? "and");
|
|
41953
|
+
const conditionResult = evaluateConditionsWithDetails(automation.triggerConditions, buildConditionContext(event.payload, event.metadata), automation.conditionLogic ?? "and");
|
|
41947
41954
|
if (!conditionResult.matched) {
|
|
41948
41955
|
const result2 = {
|
|
41949
41956
|
automationId: automation.id,
|
|
@@ -42053,7 +42060,7 @@ class AutomationEngine {
|
|
|
42053
42060
|
return { instanceQueues };
|
|
42054
42061
|
}
|
|
42055
42062
|
async testAutomation(automation, event) {
|
|
42056
|
-
const conditionResult = evaluateConditionsWithDetails(automation.triggerConditions, event.payload, automation.conditionLogic ?? "and");
|
|
42063
|
+
const conditionResult = evaluateConditionsWithDetails(automation.triggerConditions, buildConditionContext(event.payload, event.metadata), automation.conditionLogic ?? "and");
|
|
42057
42064
|
const actions = automation.actions.map((action) => ({
|
|
42058
42065
|
type: action.type,
|
|
42059
42066
|
wouldExecute: conditionResult.matched
|
|
@@ -70775,6 +70782,7 @@ __export(exports_src, {
|
|
|
70775
70782
|
getStreamForEventType: () => getStreamForEventType,
|
|
70776
70783
|
getScheduler: () => getScheduler,
|
|
70777
70784
|
getRegistry: () => getRegistry,
|
|
70785
|
+
getPayloadValue: () => getPayloadValue,
|
|
70778
70786
|
getNestedValue: () => getNestedValue,
|
|
70779
70787
|
getMetricsText: () => getMetricsText,
|
|
70780
70788
|
getMetricsJson: () => getMetricsJson,
|
|
@@ -70861,6 +70869,7 @@ __export(exports_src, {
|
|
|
70861
70869
|
buildOmniEnv: () => buildOmniEnv,
|
|
70862
70870
|
buildConversationKey: () => buildConversationKey,
|
|
70863
70871
|
buildConsumerConfig: () => buildConsumerConfig,
|
|
70872
|
+
buildConditionContext: () => buildConditionContext,
|
|
70864
70873
|
brokeredFetch: () => brokeredFetch,
|
|
70865
70874
|
boundedTenantLabel: () => boundedTenantLabel,
|
|
70866
70875
|
armSequence: () => armSequence,
|
|
@@ -115799,7 +115808,7 @@ var require_client2 = __commonJS((exports) => {
|
|
|
115799
115808
|
|
|
115800
115809
|
// ../../node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js
|
|
115801
115810
|
var require_esmLoader = __commonJS((exports) => {
|
|
115802
|
-
var __filename = "/home/runner/work/omni/omni
|
|
115811
|
+
var __filename = "/home/runner/work/omni/omni/node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js";
|
|
115803
115812
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
115804
115813
|
var core = require_cjs();
|
|
115805
115814
|
var importInTheMiddle = require_import_in_the_middle();
|
|
@@ -134994,7 +135003,8 @@ function parseErrorObject(error, status) {
|
|
|
134994
135003
|
}
|
|
134995
135004
|
if (rawError && typeof rawError === "object") {
|
|
134996
135005
|
const apiError = rawError;
|
|
134997
|
-
|
|
135006
|
+
const issuesMessage = Array.isArray(apiError.issues) ? apiError.issues.map((i) => `${(i.path ?? []).join(".")}: ${i.message}`).join("; ") : undefined;
|
|
135007
|
+
return new OmniApiError(apiError.message ?? issuesMessage ?? `API error (status ${status ?? "unknown"})`, apiError.code ?? "API_ERROR", apiError.details, status);
|
|
134998
135008
|
}
|
|
134999
135009
|
}
|
|
135000
135010
|
if ("message" in error) {
|
|
@@ -135278,6 +135288,15 @@ function createOmniClient(config) {
|
|
|
135278
135288
|
throw new OmniApiError("Sync job not found", "NOT_FOUND", undefined, 404);
|
|
135279
135289
|
return json.data;
|
|
135280
135290
|
},
|
|
135291
|
+
async cancelSync(id, jobId) {
|
|
135292
|
+
const resp = await apiFetch(`${baseUrl}/api/v2/instances/${id}/sync/${jobId}/cancel`, { method: "POST" });
|
|
135293
|
+
const json = await resp.json();
|
|
135294
|
+
if (!resp.ok)
|
|
135295
|
+
throw OmniApiError.from(json, resp.status);
|
|
135296
|
+
if (!json?.data)
|
|
135297
|
+
throw new OmniApiError("Sync job not found", "NOT_FOUND", undefined, 404);
|
|
135298
|
+
return json.data;
|
|
135299
|
+
},
|
|
135281
135300
|
async listContacts(id, params) {
|
|
135282
135301
|
const query = new URLSearchParams;
|
|
135283
135302
|
if (params?.limit)
|
|
@@ -137232,7 +137251,7 @@ import { fileURLToPath } from "url";
|
|
|
137232
137251
|
// package.json
|
|
137233
137252
|
var package_default = {
|
|
137234
137253
|
name: "@automagik/omni",
|
|
137235
|
-
version: "2.
|
|
137254
|
+
version: "2.260914.2",
|
|
137236
137255
|
repository: {
|
|
137237
137256
|
type: "git",
|
|
137238
137257
|
url: "git+https://github.com/automagik-dev/omni.git",
|
|
@@ -137714,23 +137733,39 @@ ${names}`);
|
|
|
137714
137733
|
}
|
|
137715
137734
|
error(`No instance found matching "${input}"`);
|
|
137716
137735
|
}
|
|
137736
|
+
async function assertChatInInstance(input, instanceId) {
|
|
137737
|
+
const client = getClient();
|
|
137738
|
+
let chat = null;
|
|
137739
|
+
try {
|
|
137740
|
+
chat = await client.chats.get(input);
|
|
137741
|
+
} catch {}
|
|
137742
|
+
if (!chat) {
|
|
137743
|
+
error(`No chat found matching "${input}"`);
|
|
137744
|
+
}
|
|
137745
|
+
if (chat.instanceId !== instanceId) {
|
|
137746
|
+
error(`Chat ${input.slice(0, 8)} belongs to instance ${chat.instanceId}, not ${instanceId}`);
|
|
137747
|
+
}
|
|
137748
|
+
}
|
|
137749
|
+
async function resolveChatByExternalId(input, instanceId) {
|
|
137750
|
+
const result = await getClient().chats.list({ limit: 100, instanceId, search: input });
|
|
137751
|
+
const matches = result.items.filter((c2) => c2.externalId === input);
|
|
137752
|
+
if (matches.length > 1) {
|
|
137753
|
+
const names = matches.map((c2) => ` ${c2.id.slice(0, 8)} ${c2.name || "(unnamed)"}`).join(`
|
|
137754
|
+
`);
|
|
137755
|
+
error(`Ambiguous external ID "${input}" matches ${matches.length} chats (pass --instance):
|
|
137756
|
+
${names}`);
|
|
137757
|
+
}
|
|
137758
|
+
return matches[0]?.id;
|
|
137759
|
+
}
|
|
137717
137760
|
async function resolveChatId(input, instanceId) {
|
|
137718
137761
|
if (UUID_RE.test(input)) {
|
|
137719
|
-
if (instanceId)
|
|
137720
|
-
|
|
137721
|
-
let chat = null;
|
|
137722
|
-
try {
|
|
137723
|
-
chat = await client2.chats.get(input);
|
|
137724
|
-
} catch {}
|
|
137725
|
-
if (!chat) {
|
|
137726
|
-
error(`No chat found matching "${input}"`);
|
|
137727
|
-
}
|
|
137728
|
-
if (chat.instanceId !== instanceId) {
|
|
137729
|
-
error(`Chat ${input.slice(0, 8)} belongs to instance ${chat.instanceId}, not ${instanceId}`);
|
|
137730
|
-
}
|
|
137731
|
-
}
|
|
137762
|
+
if (instanceId)
|
|
137763
|
+
await assertChatInInstance(input, instanceId);
|
|
137732
137764
|
return input;
|
|
137733
137765
|
}
|
|
137766
|
+
const byExternal = input.includes("@") ? await resolveChatByExternalId(input, instanceId) : undefined;
|
|
137767
|
+
if (byExternal)
|
|
137768
|
+
return byExternal;
|
|
137734
137769
|
const client = getClient();
|
|
137735
137770
|
const result = await client.chats.list({ limit: 100, instanceId });
|
|
137736
137771
|
const chats = result.items;
|
|
@@ -144506,6 +144541,11 @@ async function consumersApiRequest(path, init = {}) {
|
|
|
144506
144541
|
}
|
|
144507
144542
|
return await resp.json();
|
|
144508
144543
|
}
|
|
144544
|
+
function consumerState(row) {
|
|
144545
|
+
if (row.caughtUp === undefined)
|
|
144546
|
+
return row.lag === 0 ? "caught-up" : "-";
|
|
144547
|
+
return row.caughtUp ? "caught-up" : "behind";
|
|
144548
|
+
}
|
|
144509
144549
|
function summarizeConsumerRow(row) {
|
|
144510
144550
|
return {
|
|
144511
144551
|
name: row.name,
|
|
@@ -144514,6 +144554,7 @@ function summarizeConsumerRow(row) {
|
|
|
144514
144554
|
filters: row.filters?.length ? row.filters.map((f10) => `${f10.field} ${f10.operator} ${JSON.stringify(f10.value)}`).join(" AND ") : "-",
|
|
144515
144555
|
cursor: row.cursor,
|
|
144516
144556
|
lag: row.lag,
|
|
144557
|
+
state: consumerState(row),
|
|
144517
144558
|
updatedAt: row.updatedAt
|
|
144518
144559
|
};
|
|
144519
144560
|
}
|
|
@@ -144552,6 +144593,10 @@ async function followConsumer(params) {
|
|
|
144552
144593
|
return;
|
|
144553
144594
|
const page = await pullWithRetry(params);
|
|
144554
144595
|
await emitFollowPage(params, page.items, emit);
|
|
144596
|
+
if (page.scanExhausted) {
|
|
144597
|
+
process.stderr.write(`\u2026 scanned ${params.limit} rows without a match; cursor \u2192 ${page.cursor} (head ${page.head})
|
|
144598
|
+
`);
|
|
144599
|
+
}
|
|
144555
144600
|
if (!params.ack) {
|
|
144556
144601
|
await flushStdout();
|
|
144557
144602
|
return;
|
|
@@ -144598,7 +144643,7 @@ function createConsumersCommand() {
|
|
|
144598
144643
|
error(`Failed to create consumer: ${errorMessage(err2)}`);
|
|
144599
144644
|
}
|
|
144600
144645
|
});
|
|
144601
|
-
consumers.command("ls").description("List durable consumers with their cursor and lag").action(async () => {
|
|
144646
|
+
consumers.command("ls").alias("list").description("List durable consumers with their cursor and lag").action(async () => {
|
|
144602
144647
|
try {
|
|
144603
144648
|
const result = await consumersApiRequest("");
|
|
144604
144649
|
list(result.items.map(summarizeConsumerRow), { emptyMessage: "No durable consumers registered." });
|
|
@@ -145640,6 +145685,8 @@ function applyMiscFields(body, opts) {
|
|
|
145640
145685
|
setVal(body, "discordBotToken", opts.discordToken);
|
|
145641
145686
|
setVal(body, "slackBotToken", opts.slackBotToken);
|
|
145642
145687
|
setVal(body, "slackAppToken", opts.slackAppToken);
|
|
145688
|
+
setVal(body, "slackUserToken", opts.slackUserToken);
|
|
145689
|
+
setVal(body, "slackAuthMode", opts.slackAuthMode);
|
|
145643
145690
|
setVal(body, "gupshupCallbackUrl", opts.gupshupCallbackUrl);
|
|
145644
145691
|
setVal(body, "gupshupAuthToken", opts.gupshupAuthToken);
|
|
145645
145692
|
setVal(body, "gupshupEventId", opts.gupshupEventId);
|
|
@@ -145767,7 +145814,7 @@ function createInstancesCommand() {
|
|
|
145767
145814
|
error(`Failed to get instance: ${message2}`, undefined, 3);
|
|
145768
145815
|
}
|
|
145769
145816
|
});
|
|
145770
|
-
instances.command("create").description("Create a new instance (supports all API fields)").requiredOption("--name <name>", "Instance name").requiredOption("--channel <type>", `Channel type (${VALID_CHANNELS2.join(", ")})`).option("--agent-fk-id <uuid>", 'Agent FK UUID (references agents table, use "null" to clear). When set without --reply-filter-mode, reply filter defaults to {mode:"all", onDm:true} so messages are dispatched instead of silently dropped (omni#443).').option("--agent-provider <id>", "Agent provider ID").option("--agent <id>", "Agent ID").option("--agent-type <type>", "Agent type: agent, team, or workflow").option("--agent-timeout <seconds>", "Agent timeout in seconds", (v4) => Number.parseInt(v4, 10)).option("--agent-error-message <text>", 'Customer-facing reply when agent dispatch fails; repeat the flag for multiple variants (one is picked at random per failure). Use "null" to clear; falls back to OMNI_AGENT_DISPATCH_ERROR_MESSAGE env, then built-in default', (value, previous = []) => [...previous, value]).option("--agent-stream-mode", "Enable streaming responses").option("--agent-session-strategy <strategy>", "Session strategy: per_user, per_chat, per_user_per_chat").option("--agent-prefix-sender-name", "Prefix messages with sender name").option("--no-agent-prefix-sender-name", "Disable sender name prefix").option("--agent-wait-for-media", "Wait for media processing before dispatch").option("--no-agent-wait-for-media", "Dispatch immediately without waiting for media").option("--agent-send-media-path", "Include file path in formatted media text").option("--no-agent-send-media-path", "Exclude file path from formatted media text").option("--agent-send-media-path-types <types>", "Content types that receive file path (comma-separated: image,video,document)").option("--reply-filter-mode <mode>", "Reply filter: all or filtered").option("--reply-on-dm", "Reply to DMs").option("--no-reply-on-dm", "Ignore DMs").option("--reply-on-mention", "Reply when @mentioned").option("--no-reply-on-mention", "Ignore @mentions").option("--reply-on-reply", "Reply when message is reply to bot").option("--no-reply-on-reply", "Ignore replies").option("--reply-on-name", "Reply when bot name appears in text").option("--no-reply-on-name", "Ignore name matches").option("--reply-name-patterns <patterns>", "Custom name patterns (comma-separated)").option("--enable-auto-split", "Split responses on double newlines").option("--no-enable-auto-split", "Disable auto-split").option("--message-format-mode <mode>", "Format mode: convert or passthrough").option("--debounce-mode <mode>", "Debounce mode: disabled, fixed, randomized, or presence").option("--debounce-min <ms>", "Minimum debounce delay in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-max <ms>", "Maximum debounce delay in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-restart-on-typing", "Restart debounce timer on typing").option("--debounce-group <ms>", "Group chat debounce in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-max-wait <ms>", "Presence-mode hard cap in ms (flush even under continuous typing)", (v4) => Number.parseInt(v4, 10)).option("--split-delay-mode <mode>", "Split delay mode: disabled, fixed, or randomized").option("--split-delay-fixed <ms>", "Fixed delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--split-delay-min <ms>", "Minimum delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--split-delay-max <ms>", "Maximum delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--agent-gate", "Enable LLM response gate").option("--agent-gate-model <model>", "Model for response gate").option("--agent-gate-prompt <prompt>", "Custom gate prompt").option("--tts-voice <id>", "ElevenLabs voice ID").option("--tts-model <id>", "ElevenLabs model ID").option("--read-receipts <mode>", "Read receipts mode: on, off, or exclude-self").option("--access-mode <mode>", "Access mode: disabled, blocklist, or allowlist").option("--reaction-ack <mode>", "Reaction ack mode (on|off)").option("--reaction-ack-emoji <json>", "Per-channel emoji map as JSON").option("--ack-timeout <ms>", "Ack timeout in milliseconds", (v4) => Number.parseInt(v4, 10)).option("--agent-stalled-timeout-ms <ms>", "Idle threshold in ms before the internal turn.stalled event fires (no channel message is ever sent)", (v4) => Number.parseInt(v4, 10)).option("--token <token>", "Generic bot token (auto-resolves to channel-specific field)").option("--telegram-token <token>", "Telegram bot token").option("--discord-token <token>", "Discord bot token").option("--slack-bot-token <token>", "Slack bot token").option("--slack-app-token <token>", "Slack app token").option("--gupshup-callback-url <url>", "Gupshup Custom Integration callback URL").option("--gupshup-auth-token <token>", "Gupshup Custom Integration auth token").option("--gupshup-event-id <id>", "Gupshup event ID (default: nx_omni_agent_reply)").option("--gupshup-handoff-options <json>", "Gupshup HANDOFF routing defaults and customerFields template (JSON object)").option("--gupshup-webhook-verify-token <token>", "Gupshup webhook verify token").option("--twilio-account-sid <sid>", "Twilio Account SID").option("--twilio-auth-token <token>", "Twilio Auth Token").option("--twilio-from <address>", "Twilio WhatsApp sender address (whatsapp:+E164)").option("--twilio-messaging-service-sid <sid>", "Twilio Messaging Service SID").option("--twilio-status-callback-url <url>", "Twilio outbound status callback URL").option("--twilio-webhook-url <url>", "Public Twilio webhook URL for signature validation").option("--twilio-validate-signature", "Validate X-Twilio-Signature on webhooks").option("--no-twilio-validate-signature", "Disable X-Twilio-Signature validation").option("--bridge-tmux-session <name>", 'Tmux session name the genie bridge spawns into for this instance (propagated as GENIE_TMUX_SESSION via NATS). Use "null" to clear.').option("--require-genie-signature", "Require a verified X-Genie-Signature on requests targeting this instance. Bearer-only requests will be rejected with 401.").option("--no-require-genie-signature", "Allow bearer-only requests targeting this instance (default).").option("--allow-first-party", "Process (do not drop) inbound messages whose sender matches another active instance owner. Lets this instance reply to messages from your own personal number.").option("--no-allow-first-party", "Drop inbound messages whose sender matches another active instance owner (default, loop-protection).").option("--is-default", "Set as default instance for channel").action(async (options) => {
|
|
145817
|
+
instances.command("create").description("Create a new instance (supports all API fields)").requiredOption("--name <name>", "Instance name").requiredOption("--channel <type>", `Channel type (${VALID_CHANNELS2.join(", ")})`).option("--agent-fk-id <uuid>", 'Agent FK UUID (references agents table, use "null" to clear). When set without --reply-filter-mode, reply filter defaults to {mode:"all", onDm:true} so messages are dispatched instead of silently dropped (omni#443).').option("--agent-provider <id>", "Agent provider ID").option("--agent <id>", "Agent ID").option("--agent-type <type>", "Agent type: agent, team, or workflow").option("--agent-timeout <seconds>", "Agent timeout in seconds", (v4) => Number.parseInt(v4, 10)).option("--agent-error-message <text>", 'Customer-facing reply when agent dispatch fails; repeat the flag for multiple variants (one is picked at random per failure). Use "null" to clear; falls back to OMNI_AGENT_DISPATCH_ERROR_MESSAGE env, then built-in default', (value, previous = []) => [...previous, value]).option("--agent-stream-mode", "Enable streaming responses").option("--agent-session-strategy <strategy>", "Session strategy: per_user, per_chat, per_user_per_chat").option("--agent-prefix-sender-name", "Prefix messages with sender name").option("--no-agent-prefix-sender-name", "Disable sender name prefix").option("--agent-wait-for-media", "Wait for media processing before dispatch").option("--no-agent-wait-for-media", "Dispatch immediately without waiting for media").option("--agent-send-media-path", "Include file path in formatted media text").option("--no-agent-send-media-path", "Exclude file path from formatted media text").option("--agent-send-media-path-types <types>", "Content types that receive file path (comma-separated: image,video,document)").option("--reply-filter-mode <mode>", "Reply filter: all or filtered").option("--reply-on-dm", "Reply to DMs").option("--no-reply-on-dm", "Ignore DMs").option("--reply-on-mention", "Reply when @mentioned").option("--no-reply-on-mention", "Ignore @mentions").option("--reply-on-reply", "Reply when message is reply to bot").option("--no-reply-on-reply", "Ignore replies").option("--reply-on-name", "Reply when bot name appears in text").option("--no-reply-on-name", "Ignore name matches").option("--reply-name-patterns <patterns>", "Custom name patterns (comma-separated)").option("--enable-auto-split", "Split responses on double newlines").option("--no-enable-auto-split", "Disable auto-split").option("--message-format-mode <mode>", "Format mode: convert or passthrough").option("--debounce-mode <mode>", "Debounce mode: disabled, fixed, randomized, or presence").option("--debounce-min <ms>", "Minimum debounce delay in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-max <ms>", "Maximum debounce delay in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-restart-on-typing", "Restart debounce timer on typing").option("--debounce-group <ms>", "Group chat debounce in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-max-wait <ms>", "Presence-mode hard cap in ms (flush even under continuous typing)", (v4) => Number.parseInt(v4, 10)).option("--split-delay-mode <mode>", "Split delay mode: disabled, fixed, or randomized").option("--split-delay-fixed <ms>", "Fixed delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--split-delay-min <ms>", "Minimum delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--split-delay-max <ms>", "Maximum delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--agent-gate", "Enable LLM response gate").option("--agent-gate-model <model>", "Model for response gate").option("--agent-gate-prompt <prompt>", "Custom gate prompt").option("--tts-voice <id>", "ElevenLabs voice ID").option("--tts-model <id>", "ElevenLabs model ID").option("--read-receipts <mode>", "Read receipts mode: on, off, or exclude-self").option("--access-mode <mode>", "Access mode: disabled, blocklist, or allowlist").option("--reaction-ack <mode>", "Reaction ack mode (on|off)").option("--reaction-ack-emoji <json>", "Per-channel emoji map as JSON").option("--ack-timeout <ms>", "Ack timeout in milliseconds", (v4) => Number.parseInt(v4, 10)).option("--agent-stalled-timeout-ms <ms>", "Idle threshold in ms before the internal turn.stalled event fires (no channel message is ever sent)", (v4) => Number.parseInt(v4, 10)).option("--token <token>", "Generic bot token (auto-resolves to channel-specific field)").option("--telegram-token <token>", "Telegram bot token").option("--discord-token <token>", "Discord bot token").option("--slack-bot-token <token>", "Slack bot token").option("--slack-app-token <token>", "Slack app token").option("--slack-user-token <token>", "Slack user token (xoxp-...), required for --slack-auth-mode user").option("--slack-auth-mode <mode>", "Slack identity for outbound actions: bot (default) or user").option("--gupshup-callback-url <url>", "Gupshup Custom Integration callback URL").option("--gupshup-auth-token <token>", "Gupshup Custom Integration auth token").option("--gupshup-event-id <id>", "Gupshup event ID (default: nx_omni_agent_reply)").option("--gupshup-handoff-options <json>", "Gupshup HANDOFF routing defaults and customerFields template (JSON object)").option("--gupshup-webhook-verify-token <token>", "Gupshup webhook verify token").option("--twilio-account-sid <sid>", "Twilio Account SID").option("--twilio-auth-token <token>", "Twilio Auth Token").option("--twilio-from <address>", "Twilio WhatsApp sender address (whatsapp:+E164)").option("--twilio-messaging-service-sid <sid>", "Twilio Messaging Service SID").option("--twilio-status-callback-url <url>", "Twilio outbound status callback URL").option("--twilio-webhook-url <url>", "Public Twilio webhook URL for signature validation").option("--twilio-validate-signature", "Validate X-Twilio-Signature on webhooks").option("--no-twilio-validate-signature", "Disable X-Twilio-Signature validation").option("--bridge-tmux-session <name>", 'Tmux session name the genie bridge spawns into for this instance (propagated as GENIE_TMUX_SESSION via NATS). Use "null" to clear.').option("--require-genie-signature", "Require a verified X-Genie-Signature on requests targeting this instance. Bearer-only requests will be rejected with 401.").option("--no-require-genie-signature", "Allow bearer-only requests targeting this instance (default).").option("--allow-first-party", "Process (do not drop) inbound messages whose sender matches another active instance owner. Lets this instance reply to messages from your own personal number.").option("--no-allow-first-party", "Drop inbound messages whose sender matches another active instance owner (default, loop-protection).").option("--is-default", "Set as default instance for channel").action(async (options) => {
|
|
145771
145818
|
const channel2 = options.channel;
|
|
145772
145819
|
if (!VALID_CHANNELS2.includes(channel2)) {
|
|
145773
145820
|
error(`Invalid channel: ${channel2}`, { validChannels: VALID_CHANNELS2 });
|
|
@@ -146039,7 +146086,7 @@ function createInstancesCommand() {
|
|
|
146039
146086
|
error(`Failed to logout: ${message2}`);
|
|
146040
146087
|
}
|
|
146041
146088
|
});
|
|
146042
|
-
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) => {
|
|
146089
|
+
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; default: all with --chat, otherwise 7d)").option("--download-media", "Download media files").option("--chat <jid>", "Specific chat JID for per-chat active sync (WhatsApp only)").action(async (rawId, options) => {
|
|
146043
146090
|
if (!VALID_SYNC_TYPES.includes(options.type)) {
|
|
146044
146091
|
error(`Invalid sync type: ${options.type}`, {
|
|
146045
146092
|
validTypes: VALID_SYNC_TYPES
|
|
@@ -146064,6 +146111,7 @@ function createInstancesCommand() {
|
|
|
146064
146111
|
jobId: result.jobId,
|
|
146065
146112
|
type: result.type,
|
|
146066
146113
|
status: result.status,
|
|
146114
|
+
depth: result.config?.depth,
|
|
146067
146115
|
mode: syncMode
|
|
146068
146116
|
});
|
|
146069
146117
|
} catch (err2) {
|
|
@@ -146071,8 +146119,22 @@ function createInstancesCommand() {
|
|
|
146071
146119
|
error(`Failed to start sync: ${message2}`);
|
|
146072
146120
|
}
|
|
146073
146121
|
});
|
|
146074
|
-
instances.command("syncs <id> [jobId]").description("List sync jobs or
|
|
146122
|
+
instances.command("syncs <id> [jobId] [cancelJobId]").description("List sync jobs, get job status, or cancel a job (syncs cancel <id> <jobId>)").option("--status <status>", "Filter by status").option("--limit <n>", "Limit results", Number.parseInt).action(async (rawId, jobId, cancelJobId, options) => {
|
|
146075
146123
|
const client = getClient();
|
|
146124
|
+
if (rawId === "cancel") {
|
|
146125
|
+
if (!jobId || !cancelJobId) {
|
|
146126
|
+
error("Usage: omni instances syncs cancel <id> <jobId>", undefined, 2);
|
|
146127
|
+
return;
|
|
146128
|
+
}
|
|
146129
|
+
try {
|
|
146130
|
+
const result = await client.instances.cancelSync(await resolveInstanceId(jobId), cancelJobId);
|
|
146131
|
+
success(`Sync job ${result.jobId} cancelled`, result);
|
|
146132
|
+
} catch (err2) {
|
|
146133
|
+
const message2 = err2 instanceof Error ? err2.message : "Unknown error";
|
|
146134
|
+
error(`Failed to cancel sync: ${message2}`, undefined, 3);
|
|
146135
|
+
}
|
|
146136
|
+
return;
|
|
146137
|
+
}
|
|
146076
146138
|
try {
|
|
146077
146139
|
const id = await resolveInstanceId(rawId);
|
|
146078
146140
|
if (jobId) {
|
|
@@ -146103,7 +146165,7 @@ function createInstancesCommand() {
|
|
|
146103
146165
|
throw new Error(err2?.error?.message ?? `HTTP ${response.status}`);
|
|
146104
146166
|
}
|
|
146105
146167
|
}
|
|
146106
|
-
instances.command("update <id>").description("Update an instance (supports all API fields)").option("--name <name>", "Instance name").option("--is-default", "Set as default instance for channel").option("--no-is-default", "Unset as default instance for channel").option("--agent-fk-id <uuid>", 'Agent FK UUID (references agents table, use "null" to clear). When assigning an agent on an instance with no reply filter, the filter defaults to {mode:"all", onDm:true} so messages are dispatched instead of silently dropped (omni#443).').option("--agent-provider <id>", 'Agent provider ID (use "null" to clear)').option("--agent <id>", 'Agent ID (use "null" to clear)').option("--agent-type <type>", "Agent type: agent, team, or workflow").option("--agent-timeout <seconds>", "Agent timeout in seconds", (v4) => Number.parseInt(v4, 10)).option("--agent-error-message <text>", 'Customer-facing reply when agent dispatch fails; repeat the flag for multiple variants (one is picked at random per failure). Use "null" to clear; falls back to OMNI_AGENT_DISPATCH_ERROR_MESSAGE env, then built-in default', (value, previous = []) => [...previous, value]).option("--agent-stream-mode", "Enable streaming responses").option("--no-agent-stream-mode", "Disable streaming responses").option("--agent-session-strategy <strategy>", "Session strategy: per_user, per_chat, per_user_per_chat").option("--agent-prefix-sender-name", "Prefix messages with sender name").option("--no-agent-prefix-sender-name", "Disable sender name prefix").option("--agent-wait-for-media", "Wait for media processing before dispatch").option("--no-agent-wait-for-media", "Dispatch immediately without waiting for media").option("--agent-send-media-path", "Include file path in formatted media text").option("--no-agent-send-media-path", "Exclude file path from formatted media text").option("--agent-send-media-path-types <types>", "Content types that receive file path (comma-separated: image,video,document)").option("--reply-filter-mode <mode>", "Reply filter: all or filtered").option("--reply-on-dm", "Reply to DMs (requires --reply-filter-mode filtered)").option("--no-reply-on-dm", "Ignore DMs").option("--reply-on-mention", "Reply when @mentioned").option("--no-reply-on-mention", "Ignore @mentions").option("--reply-on-reply", "Reply when message is reply to bot").option("--no-reply-on-reply", "Ignore replies").option("--reply-on-name", "Reply when bot name appears in text").option("--no-reply-on-name", "Ignore name matches").option("--reply-name-patterns <patterns>", "Custom name patterns (comma-separated)").option("--clear-reply-filter", "Remove reply filter (set to null)").option("--enable-auto-split", "Split responses on double newlines").option("--no-enable-auto-split", "Disable auto-split").option("--message-format-mode <mode>", "Format mode: convert or passthrough").option("--debounce-mode <mode>", "Debounce mode: disabled, fixed, randomized, or presence").option("--debounce-min <ms>", "Minimum debounce delay in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-max <ms>", "Maximum debounce delay in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-restart-on-typing", "Restart debounce timer on typing").option("--no-debounce-restart-on-typing", "Do not restart debounce on typing").option("--debounce-group <ms>", 'Group chat debounce in ms (use "null" to inherit)', (v4) => v4 === "null" ? null : Number.parseInt(v4, 10)).option("--debounce-max-wait <ms>", 'Presence-mode hard cap in ms (use "null" to inherit)', (v4) => v4 === "null" ? null : Number.parseInt(v4, 10)).option("--split-delay-mode <mode>", "Split delay mode: disabled, fixed, or randomized").option("--split-delay-fixed <ms>", "Fixed delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--split-delay-min <ms>", "Minimum delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--split-delay-max <ms>", "Maximum delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--agent-gate", "Enable LLM response gate").option("--no-agent-gate", "Disable LLM response gate").option("--agent-gate-model <model>", 'Model for response gate (use "null" for default)').option("--agent-gate-prompt <prompt>", 'Custom gate prompt (use "null" for default)').option("--tts-voice <id>", 'ElevenLabs voice ID (use "null" to clear)').option("--tts-model <id>", 'ElevenLabs model ID (use "null" to clear)').option("--read-receipts <mode>", "Read receipts mode: on, off, or exclude-self").option("--access-mode <mode>", "Access mode: disabled, blocklist, or allowlist").option("--reaction-ack <mode>", "Reaction ack mode (on|off)").option("--reaction-ack-emoji <json>", "Per-channel emoji map as JSON").option("--ack-timeout <ms>", "Ack timeout in milliseconds", (v4) => Number.parseInt(v4, 10)).option("--agent-stalled-timeout-ms <ms>", "Idle threshold in ms before the internal turn.stalled event fires (no channel message is ever sent)", (v4) => Number.parseInt(v4, 10)).option("--token <token>", "Generic bot token (auto-resolves to channel-specific field)").option("--telegram-token <token>", 'Telegram bot token (use "null" to clear)').option("--discord-token <token>", 'Discord bot token (use "null" to clear)').option("--slack-bot-token <token>", 'Slack bot token (use "null" to clear)').option("--slack-app-token <token>", 'Slack app token (use "null" to clear)').option("--twilio-account-sid <sid>", 'Twilio Account SID (use "null" to clear)').option("--twilio-auth-token <token>", 'Twilio Auth Token (use "null" to clear)').option("--twilio-from <address>", 'Twilio WhatsApp sender address (use "null" to clear)').option("--twilio-messaging-service-sid <sid>", 'Twilio Messaging Service SID (use "null" to clear)').option("--twilio-status-callback-url <url>", 'Twilio outbound status callback URL (use "null" to clear)').option("--twilio-webhook-url <url>", 'Public Twilio webhook URL for signature validation (use "null" to clear)').option("--twilio-validate-signature", "Validate X-Twilio-Signature on webhooks").option("--no-twilio-validate-signature", "Disable X-Twilio-Signature validation").option("--gupshup-handoff-options <json>", 'Gupshup HANDOFF routing defaults and customerFields template (JSON object, use "null" to clear). The plugin reads it at connect: restart the instance for the change to take effect').option("--trigger-events <events>", 'Trigger events (comma-separated, use "null" to clear)').option("--profile-name <name>", "Update WhatsApp display name (push name)").option("--bridge-tmux-session <name>", 'Tmux session name the genie bridge spawns into for this instance (propagated as GENIE_TMUX_SESSION via NATS). Use "null" to clear.').option("--require-genie-signature", "Require a verified X-Genie-Signature on requests targeting this instance. Bearer-only requests will be rejected with 401.").option("--no-require-genie-signature", "Allow bearer-only requests targeting this instance (default).").option("--allow-first-party", "Process (do not drop) inbound messages whose sender matches another active instance owner. Lets this instance reply to messages from your own personal number.").option("--no-allow-first-party", "Drop inbound messages whose sender matches another active instance owner (default, loop-protection).").action(async (rawId, options) => {
|
|
146168
|
+
instances.command("update <id>").description("Update an instance (supports all API fields)").option("--name <name>", "Instance name").option("--is-default", "Set as default instance for channel").option("--no-is-default", "Unset as default instance for channel").option("--agent-fk-id <uuid>", 'Agent FK UUID (references agents table, use "null" to clear). When assigning an agent on an instance with no reply filter, the filter defaults to {mode:"all", onDm:true} so messages are dispatched instead of silently dropped (omni#443).').option("--agent-provider <id>", 'Agent provider ID (use "null" to clear)').option("--agent <id>", 'Agent ID (use "null" to clear)').option("--agent-type <type>", "Agent type: agent, team, or workflow").option("--agent-timeout <seconds>", "Agent timeout in seconds", (v4) => Number.parseInt(v4, 10)).option("--agent-error-message <text>", 'Customer-facing reply when agent dispatch fails; repeat the flag for multiple variants (one is picked at random per failure). Use "null" to clear; falls back to OMNI_AGENT_DISPATCH_ERROR_MESSAGE env, then built-in default', (value, previous = []) => [...previous, value]).option("--agent-stream-mode", "Enable streaming responses").option("--no-agent-stream-mode", "Disable streaming responses").option("--agent-session-strategy <strategy>", "Session strategy: per_user, per_chat, per_user_per_chat").option("--agent-prefix-sender-name", "Prefix messages with sender name").option("--no-agent-prefix-sender-name", "Disable sender name prefix").option("--agent-wait-for-media", "Wait for media processing before dispatch").option("--no-agent-wait-for-media", "Dispatch immediately without waiting for media").option("--agent-send-media-path", "Include file path in formatted media text").option("--no-agent-send-media-path", "Exclude file path from formatted media text").option("--agent-send-media-path-types <types>", "Content types that receive file path (comma-separated: image,video,document)").option("--reply-filter-mode <mode>", "Reply filter: all or filtered").option("--reply-on-dm", "Reply to DMs (requires --reply-filter-mode filtered)").option("--no-reply-on-dm", "Ignore DMs").option("--reply-on-mention", "Reply when @mentioned").option("--no-reply-on-mention", "Ignore @mentions").option("--reply-on-reply", "Reply when message is reply to bot").option("--no-reply-on-reply", "Ignore replies").option("--reply-on-name", "Reply when bot name appears in text").option("--no-reply-on-name", "Ignore name matches").option("--reply-name-patterns <patterns>", "Custom name patterns (comma-separated)").option("--clear-reply-filter", "Remove reply filter (set to null)").option("--enable-auto-split", "Split responses on double newlines").option("--no-enable-auto-split", "Disable auto-split").option("--message-format-mode <mode>", "Format mode: convert or passthrough").option("--debounce-mode <mode>", "Debounce mode: disabled, fixed, randomized, or presence").option("--debounce-min <ms>", "Minimum debounce delay in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-max <ms>", "Maximum debounce delay in ms", (v4) => Number.parseInt(v4, 10)).option("--debounce-restart-on-typing", "Restart debounce timer on typing").option("--no-debounce-restart-on-typing", "Do not restart debounce on typing").option("--debounce-group <ms>", 'Group chat debounce in ms (use "null" to inherit)', (v4) => v4 === "null" ? null : Number.parseInt(v4, 10)).option("--debounce-max-wait <ms>", 'Presence-mode hard cap in ms (use "null" to inherit)', (v4) => v4 === "null" ? null : Number.parseInt(v4, 10)).option("--split-delay-mode <mode>", "Split delay mode: disabled, fixed, or randomized").option("--split-delay-fixed <ms>", "Fixed delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--split-delay-min <ms>", "Minimum delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--split-delay-max <ms>", "Maximum delay between split chunks in ms", (v4) => Number.parseInt(v4, 10)).option("--agent-gate", "Enable LLM response gate").option("--no-agent-gate", "Disable LLM response gate").option("--agent-gate-model <model>", 'Model for response gate (use "null" for default)').option("--agent-gate-prompt <prompt>", 'Custom gate prompt (use "null" for default)').option("--tts-voice <id>", 'ElevenLabs voice ID (use "null" to clear)').option("--tts-model <id>", 'ElevenLabs model ID (use "null" to clear)').option("--read-receipts <mode>", "Read receipts mode: on, off, or exclude-self").option("--access-mode <mode>", "Access mode: disabled, blocklist, or allowlist").option("--reaction-ack <mode>", "Reaction ack mode (on|off)").option("--reaction-ack-emoji <json>", "Per-channel emoji map as JSON").option("--ack-timeout <ms>", "Ack timeout in milliseconds", (v4) => Number.parseInt(v4, 10)).option("--agent-stalled-timeout-ms <ms>", "Idle threshold in ms before the internal turn.stalled event fires (no channel message is ever sent)", (v4) => Number.parseInt(v4, 10)).option("--token <token>", "Generic bot token (auto-resolves to channel-specific field)").option("--telegram-token <token>", 'Telegram bot token (use "null" to clear)').option("--discord-token <token>", 'Discord bot token (use "null" to clear)').option("--slack-bot-token <token>", 'Slack bot token (use "null" to clear)').option("--slack-app-token <token>", 'Slack app token (use "null" to clear)').option("--slack-user-token <token>", 'Slack user token xoxp-... (use "null" to clear)').option("--slack-auth-mode <mode>", 'Slack identity: bot or user (use "null" to clear)').option("--twilio-account-sid <sid>", 'Twilio Account SID (use "null" to clear)').option("--twilio-auth-token <token>", 'Twilio Auth Token (use "null" to clear)').option("--twilio-from <address>", 'Twilio WhatsApp sender address (use "null" to clear)').option("--twilio-messaging-service-sid <sid>", 'Twilio Messaging Service SID (use "null" to clear)').option("--twilio-status-callback-url <url>", 'Twilio outbound status callback URL (use "null" to clear)').option("--twilio-webhook-url <url>", 'Public Twilio webhook URL for signature validation (use "null" to clear)').option("--twilio-validate-signature", "Validate X-Twilio-Signature on webhooks").option("--no-twilio-validate-signature", "Disable X-Twilio-Signature validation").option("--gupshup-handoff-options <json>", 'Gupshup HANDOFF routing defaults and customerFields template (JSON object, use "null" to clear). The plugin reads it at connect: restart the instance for the change to take effect').option("--trigger-events <events>", 'Trigger events (comma-separated, use "null" to clear)').option("--profile-name <name>", "Update WhatsApp display name (push name)").option("--bridge-tmux-session <name>", 'Tmux session name the genie bridge spawns into for this instance (propagated as GENIE_TMUX_SESSION via NATS). Use "null" to clear.').option("--require-genie-signature", "Require a verified X-Genie-Signature on requests targeting this instance. Bearer-only requests will be rejected with 401.").option("--no-require-genie-signature", "Allow bearer-only requests targeting this instance (default).").option("--allow-first-party", "Process (do not drop) inbound messages whose sender matches another active instance owner. Lets this instance reply to messages from your own personal number.").option("--no-allow-first-party", "Drop inbound messages whose sender matches another active instance owner (default, loop-protection).").action(async (rawId, options) => {
|
|
146107
146169
|
const client = getClient();
|
|
146108
146170
|
try {
|
|
146109
146171
|
const id = await resolveInstanceId(rawId);
|
|
@@ -150920,7 +150982,15 @@ var custom_github_release_default = {
|
|
|
150920
150982
|
// src/commands/webhooks.ts
|
|
150921
150983
|
import { readFileSync as readFileSync18 } from "fs";
|
|
150922
150984
|
init_zod();
|
|
150985
|
+
init_config();
|
|
150923
150986
|
init_output();
|
|
150987
|
+
var INGRESS_PATH = "/api/v2/webhooks/ingress/";
|
|
150988
|
+
function ingressUrl(name, apiUrl = loadConfig().apiUrl) {
|
|
150989
|
+
const path = `${INGRESS_PATH}${encodeURIComponent(name)}`;
|
|
150990
|
+
if (!apiUrl || /^https?:\/\/(localhost|127\.|\[?::1\]?)/i.test(apiUrl))
|
|
150991
|
+
return path;
|
|
150992
|
+
return `${apiUrl.replace(/\/+$/, "")}${path}`;
|
|
150993
|
+
}
|
|
150924
150994
|
var SIGNATURE_ALGORITHMS = ["hmac-sha256", "hmac-sha1", "token-match"];
|
|
150925
150995
|
var signatureSecretSchema = exports_external.string().min(8, "at least 8 characters").max(512, "at most 512 characters");
|
|
150926
150996
|
var SECRET_SOURCE_FLAGS = "--signature-secret, --signature-secret-env, --signature-secret-stdin";
|
|
@@ -151133,6 +151203,7 @@ function createWebhooksCommand() {
|
|
|
151133
151203
|
enabled: w.enabled ? "yes" : "no",
|
|
151134
151204
|
health: w.livenessStatus ?? "-",
|
|
151135
151205
|
cadence: w.expectedIntervalSeconds != null ? `${w.expectedIntervalSeconds}s` : "-",
|
|
151206
|
+
url: ingressUrl(w.name),
|
|
151136
151207
|
createdAt: w.createdAt
|
|
151137
151208
|
}));
|
|
151138
151209
|
list(items, { emptyMessage: "No webhook sources found." });
|
|
@@ -151146,7 +151217,7 @@ function createWebhooksCommand() {
|
|
|
151146
151217
|
const client = getClient();
|
|
151147
151218
|
try {
|
|
151148
151219
|
const source = await client.webhooks.getSource(resolvedId);
|
|
151149
|
-
data(source);
|
|
151220
|
+
data({ ...source, url: ingressUrl(source.name) });
|
|
151150
151221
|
} catch (err2) {
|
|
151151
151222
|
const message2 = err2 instanceof Error ? err2.message : "Unknown error";
|
|
151152
151223
|
error(`Failed to get webhook source: ${message2}`);
|
|
@@ -151183,10 +151254,11 @@ function createWebhooksCommand() {
|
|
|
151183
151254
|
const details = {
|
|
151184
151255
|
id: source.id,
|
|
151185
151256
|
name: source.name,
|
|
151186
|
-
url: `POST
|
|
151257
|
+
url: `POST ${ingressUrl(source.name)}`,
|
|
151258
|
+
internalUrl: `POST /api/v2/webhooks/${source.name} (requires x-api-key)`
|
|
151187
151259
|
};
|
|
151188
|
-
if (signatureConfig) {
|
|
151189
|
-
details.
|
|
151260
|
+
if (!signatureConfig) {
|
|
151261
|
+
details.note = "Ingress rejects deliveries until a signature config + secret is set (webhooks update)";
|
|
151190
151262
|
}
|
|
151191
151263
|
success(`Webhook source created: ${source.id}`, details);
|
|
151192
151264
|
} catch (err2) {
|
package/dist/resolve.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare function resolveInstanceId(input: string): Promise<string>;
|
|
|
24
24
|
* 2. UUID prefix match (minimum 2 hex chars)
|
|
25
25
|
* 3. Exact name match (case-insensitive)
|
|
26
26
|
* 4. Name substring match (case-insensitive)
|
|
27
|
+
* (inputs containing "@" first try an exact external id / JID match)
|
|
27
28
|
*
|
|
28
29
|
* Exits with error if no match or ambiguous.
|
|
29
30
|
*/
|
|
@@ -81,6 +82,7 @@ export declare function resolveKeyId(input: string): Promise<string>;
|
|
|
81
82
|
* 2. UUID prefix match (minimum 2 hex chars)
|
|
82
83
|
* 3. Exact name match (case-insensitive)
|
|
83
84
|
* 4. Name substring match (case-insensitive)
|
|
85
|
+
* (inputs containing "@" first try an exact external id / JID match)
|
|
84
86
|
*
|
|
85
87
|
* Exits with error if no match or ambiguous.
|
|
86
88
|
*/
|
|
@@ -105,6 +107,7 @@ export declare function resolveBatchJobId(input: string): Promise<string>;
|
|
|
105
107
|
* 2. UUID prefix match (minimum 2 hex chars)
|
|
106
108
|
* 3. Exact name match (case-insensitive)
|
|
107
109
|
* 4. Name substring match (case-insensitive)
|
|
110
|
+
* (inputs containing "@" first try an exact external id / JID match)
|
|
108
111
|
*
|
|
109
112
|
* Exits with error if no match or ambiguous.
|
|
110
113
|
*/
|
|
@@ -117,6 +120,7 @@ export declare function resolveProviderId(input: string): Promise<string>;
|
|
|
117
120
|
* 2. UUID prefix match (minimum 2 hex chars)
|
|
118
121
|
* 3. Exact name match (case-insensitive)
|
|
119
122
|
* 4. Name substring match (case-insensitive)
|
|
123
|
+
* (inputs containing "@" first try an exact external id / JID match)
|
|
120
124
|
*
|
|
121
125
|
* Exits with error if no match or ambiguous.
|
|
122
126
|
*/
|
|
@@ -129,6 +133,7 @@ export declare function resolveAgentId(input: string): Promise<string>;
|
|
|
129
133
|
* 2. UUID prefix match (minimum 2 hex chars)
|
|
130
134
|
* 3. Exact name match (case-insensitive)
|
|
131
135
|
* 4. Name substring match (case-insensitive)
|
|
136
|
+
* (inputs containing "@" first try an exact external id / JID match)
|
|
132
137
|
*
|
|
133
138
|
* Exits with error if no match or ambiguous.
|
|
134
139
|
*/
|
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;
|
|
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;AA4BD;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAuCvF;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,GAAG,OAAO,CAAC,MAAM,CAAC,CA+BjE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BxE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BnE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BrE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBvF"}
|
package/dist/sdk/client.d.ts
CHANGED
|
@@ -1423,6 +1423,10 @@ export declare function createOmniClient(config: OmniClientConfig): {
|
|
|
1423
1423
|
* Get sync job status
|
|
1424
1424
|
*/
|
|
1425
1425
|
getSyncStatus(id: string, jobId: string): Promise<SyncJobStatus>;
|
|
1426
|
+
/**
|
|
1427
|
+
* Cancel a pending or running sync job
|
|
1428
|
+
*/
|
|
1429
|
+
cancelSync(id: string, jobId: string): Promise<Pick<SyncJobStatus, "jobId" | "instanceId" | "type" | "status">>;
|
|
1426
1430
|
/**
|
|
1427
1431
|
* List contacts for an instance
|
|
1428
1432
|
*/
|