@automagik/omni 2.260910.9 → 2.260910.11
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/automations.d.ts +7 -1
- package/dist/commands/automations.d.ts.map +1 -1
- package/dist/commands/events.d.ts +3 -1
- package/dist/commands/events.d.ts.map +1 -1
- package/dist/index.js +98 -49
- package/dist/sdk/client.d.ts +14 -5
- 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 +10 -1
- package/dist/sdk/types.generated.d.ts +156 -92
- package/dist/sdk/types.generated.d.ts.map +1 -1
- package/dist/server/index.js +151 -26
- package/package.json +1 -1
|
@@ -711,6 +711,26 @@ export interface paths {
|
|
|
711
711
|
patch?: never;
|
|
712
712
|
trace?: never;
|
|
713
713
|
};
|
|
714
|
+
"/events/types": {
|
|
715
|
+
parameters: {
|
|
716
|
+
query?: never;
|
|
717
|
+
header?: never;
|
|
718
|
+
path?: never;
|
|
719
|
+
cookie?: never;
|
|
720
|
+
};
|
|
721
|
+
/**
|
|
722
|
+
* List observed event types
|
|
723
|
+
* @description Inventory of event types observed in the journal: volume and last seen in the window, registered schema version, and subscribed durable consumers / enabled automations.
|
|
724
|
+
*/
|
|
725
|
+
get: operations["listEventTypes"];
|
|
726
|
+
put?: never;
|
|
727
|
+
post?: never;
|
|
728
|
+
delete?: never;
|
|
729
|
+
options?: never;
|
|
730
|
+
head?: never;
|
|
731
|
+
patch?: never;
|
|
732
|
+
trace?: never;
|
|
733
|
+
};
|
|
714
734
|
"/events/timeline/{personId}": {
|
|
715
735
|
parameters: {
|
|
716
736
|
query?: never;
|
|
@@ -1897,8 +1917,8 @@ export interface paths {
|
|
|
1897
1917
|
get?: never;
|
|
1898
1918
|
put?: never;
|
|
1899
1919
|
/**
|
|
1900
|
-
* Test automation
|
|
1901
|
-
* @description
|
|
1920
|
+
* Test automation (dry run)
|
|
1921
|
+
* @description Dry-run an automation against a hand-written event or a REAL journaled event (`eventId`, #1073): trigger match, per-condition verdicts and rendered action templates. Executes nothing, writes no execution log.
|
|
1902
1922
|
*/
|
|
1903
1923
|
post: operations["testAutomation"];
|
|
1904
1924
|
delete?: never;
|
|
@@ -1918,7 +1938,7 @@ export interface paths {
|
|
|
1918
1938
|
put?: never;
|
|
1919
1939
|
/**
|
|
1920
1940
|
* Execute automation
|
|
1921
|
-
* @description Execute automation with a provided event payload. Actually runs the actions (not a dry run).
|
|
1941
|
+
* @description Execute automation with a provided event payload or a journaled event (`eventId`). Actually runs the actions (not a dry run).
|
|
1922
1942
|
*/
|
|
1923
1943
|
post: operations["executeAutomation"];
|
|
1924
1944
|
delete?: never;
|
|
@@ -3859,6 +3879,8 @@ export interface components {
|
|
|
3859
3879
|
avgProcessingTimeMs: number | null;
|
|
3860
3880
|
/** @description Average agent time (ms) */
|
|
3861
3881
|
avgAgentTimeMs: number | null;
|
|
3882
|
+
/** @description Sum of agent run cost (USD) stamped on events in range */
|
|
3883
|
+
totalCostUsd: number;
|
|
3862
3884
|
/** @description Count by content type */
|
|
3863
3885
|
messageTypes: {
|
|
3864
3886
|
[key: string]: number;
|
|
@@ -5942,7 +5964,8 @@ export interface components {
|
|
|
5942
5964
|
durationMs: number;
|
|
5943
5965
|
};
|
|
5944
5966
|
TestAutomationRequest: {
|
|
5945
|
-
event
|
|
5967
|
+
/** @description Hand-written event. Exactly one of event / eventId is required */
|
|
5968
|
+
event?: {
|
|
5946
5969
|
/** @description Event type */
|
|
5947
5970
|
type: string;
|
|
5948
5971
|
/** @description Event payload */
|
|
@@ -5950,6 +5973,44 @@ export interface components {
|
|
|
5950
5973
|
[key: string]: unknown;
|
|
5951
5974
|
};
|
|
5952
5975
|
};
|
|
5976
|
+
/**
|
|
5977
|
+
* Format: uuid
|
|
5978
|
+
* @description Id of a REAL journaled event (omni_events) to run against (#1073): its rawPayload is the payload, its envelope metadata is merged for conditions. Exactly one of event / eventId is required
|
|
5979
|
+
*/
|
|
5980
|
+
eventId?: string;
|
|
5981
|
+
};
|
|
5982
|
+
AutomationTestResult: {
|
|
5983
|
+
/** @description triggerMatched AND conditionsMatched */
|
|
5984
|
+
matched: boolean;
|
|
5985
|
+
/** @description Event type equals the automation trigger */
|
|
5986
|
+
triggerMatched: boolean;
|
|
5987
|
+
/** @description Condition set verdict under conditionLogic */
|
|
5988
|
+
conditionsMatched: boolean;
|
|
5989
|
+
/** @enum {string} */
|
|
5990
|
+
conditionLogic: "and" | "or";
|
|
5991
|
+
/** @description Per-condition verdicts */
|
|
5992
|
+
conditions: {
|
|
5993
|
+
field: string;
|
|
5994
|
+
operator: string;
|
|
5995
|
+
expected?: unknown;
|
|
5996
|
+
actual?: unknown;
|
|
5997
|
+
/** @description false = the dot path resolved to nothing in the payload */
|
|
5998
|
+
resolved: boolean;
|
|
5999
|
+
matched: boolean;
|
|
6000
|
+
}[];
|
|
6001
|
+
/** @description Rendered actions — never executed */
|
|
6002
|
+
actions: {
|
|
6003
|
+
type: string;
|
|
6004
|
+
wouldExecute: boolean;
|
|
6005
|
+
/** @description Action config with templates rendered */
|
|
6006
|
+
config: {
|
|
6007
|
+
[key: string]: unknown;
|
|
6008
|
+
};
|
|
6009
|
+
}[];
|
|
6010
|
+
/** Format: uuid */
|
|
6011
|
+
eventId: string | null;
|
|
6012
|
+
/** @enum {boolean} */
|
|
6013
|
+
dryRun: true;
|
|
5953
6014
|
};
|
|
5954
6015
|
AutomationMetrics: {
|
|
5955
6016
|
/** @description Engine running */
|
|
@@ -6691,6 +6752,25 @@ export interface components {
|
|
|
6691
6752
|
/** @description The plaintext credential. Returned exactly ONCE; it can never be retrieved again. */
|
|
6692
6753
|
plainTextKey: string;
|
|
6693
6754
|
};
|
|
6755
|
+
EventTypeInventoryRow: {
|
|
6756
|
+
/** @description Event type */
|
|
6757
|
+
eventType: string;
|
|
6758
|
+
/** @description Events observed in the window */
|
|
6759
|
+
count: number;
|
|
6760
|
+
/**
|
|
6761
|
+
* Format: date-time
|
|
6762
|
+
* @description Most recent receivedAt in the window
|
|
6763
|
+
*/
|
|
6764
|
+
lastSeen: string;
|
|
6765
|
+
/** @description Registered schema version (null = unregistered) */
|
|
6766
|
+
schemaVersion: number | null;
|
|
6767
|
+
/** @description Whether the registered schema gate is enabled */
|
|
6768
|
+
schemaEnabled: boolean | null;
|
|
6769
|
+
/** @description Durable consumer names subscribed to this type */
|
|
6770
|
+
consumers: string[];
|
|
6771
|
+
/** @description Enabled automations triggered by this type */
|
|
6772
|
+
automations: string[];
|
|
6773
|
+
};
|
|
6694
6774
|
};
|
|
6695
6775
|
responses: never;
|
|
6696
6776
|
parameters: never;
|
|
@@ -10716,6 +10796,8 @@ export interface operations {
|
|
|
10716
10796
|
avgProcessingTimeMs: number | null;
|
|
10717
10797
|
/** @description Average agent time (ms) */
|
|
10718
10798
|
avgAgentTimeMs: number | null;
|
|
10799
|
+
/** @description Sum of agent run cost (USD) stamped on events in range */
|
|
10800
|
+
totalCostUsd: number;
|
|
10719
10801
|
/** @description Count by content type */
|
|
10720
10802
|
messageTypes: {
|
|
10721
10803
|
[key: string]: number;
|
|
@@ -10751,6 +10833,34 @@ export interface operations {
|
|
|
10751
10833
|
};
|
|
10752
10834
|
};
|
|
10753
10835
|
};
|
|
10836
|
+
listEventTypes: {
|
|
10837
|
+
parameters: {
|
|
10838
|
+
query?: {
|
|
10839
|
+
since?: string;
|
|
10840
|
+
};
|
|
10841
|
+
header?: never;
|
|
10842
|
+
path?: never;
|
|
10843
|
+
cookie?: never;
|
|
10844
|
+
};
|
|
10845
|
+
requestBody?: never;
|
|
10846
|
+
responses: {
|
|
10847
|
+
/** @description Event type inventory */
|
|
10848
|
+
200: {
|
|
10849
|
+
headers: {
|
|
10850
|
+
[name: string]: unknown;
|
|
10851
|
+
};
|
|
10852
|
+
content: {
|
|
10853
|
+
"application/json": {
|
|
10854
|
+
items: components["schemas"]["EventTypeInventoryRow"][];
|
|
10855
|
+
meta: {
|
|
10856
|
+
/** Format: date-time */
|
|
10857
|
+
since: string | null;
|
|
10858
|
+
};
|
|
10859
|
+
};
|
|
10860
|
+
};
|
|
10861
|
+
};
|
|
10862
|
+
};
|
|
10863
|
+
};
|
|
10754
10864
|
getPersonTimeline: {
|
|
10755
10865
|
parameters: {
|
|
10756
10866
|
query?: {
|
|
@@ -18921,7 +19031,8 @@ export interface operations {
|
|
|
18921
19031
|
requestBody?: {
|
|
18922
19032
|
content: {
|
|
18923
19033
|
"application/json": {
|
|
18924
|
-
event
|
|
19034
|
+
/** @description Hand-written event. Exactly one of event / eventId is required */
|
|
19035
|
+
event?: {
|
|
18925
19036
|
/** @description Event type */
|
|
18926
19037
|
type: string;
|
|
18927
19038
|
/** @description Event payload */
|
|
@@ -18929,106 +19040,53 @@ export interface operations {
|
|
|
18929
19040
|
[key: string]: unknown;
|
|
18930
19041
|
};
|
|
18931
19042
|
};
|
|
19043
|
+
/**
|
|
19044
|
+
* Format: uuid
|
|
19045
|
+
* @description Id of a REAL journaled event (omni_events) to run against (#1073): its rawPayload is the payload, its envelope metadata is merged for conditions. Exactly one of event / eventId is required
|
|
19046
|
+
*/
|
|
19047
|
+
eventId?: string;
|
|
18932
19048
|
};
|
|
18933
19049
|
};
|
|
18934
19050
|
};
|
|
18935
19051
|
responses: {
|
|
18936
|
-
/** @description
|
|
19052
|
+
/** @description Dry-run result */
|
|
18937
19053
|
200: {
|
|
18938
19054
|
headers: {
|
|
18939
19055
|
[name: string]: unknown;
|
|
18940
19056
|
};
|
|
18941
19057
|
content: {
|
|
18942
19058
|
"application/json": {
|
|
19059
|
+
/** @description triggerMatched AND conditionsMatched */
|
|
18943
19060
|
matched: boolean;
|
|
18944
|
-
|
|
18945
|
-
|
|
18946
|
-
|
|
18947
|
-
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
|
|
19061
|
+
/** @description Event type equals the automation trigger */
|
|
19062
|
+
triggerMatched: boolean;
|
|
19063
|
+
/** @description Condition set verdict under conditionLogic */
|
|
19064
|
+
conditionsMatched: boolean;
|
|
19065
|
+
/** @enum {string} */
|
|
19066
|
+
conditionLogic: "and" | "or";
|
|
19067
|
+
/** @description Per-condition verdicts */
|
|
19068
|
+
conditions: {
|
|
19069
|
+
field: string;
|
|
19070
|
+
operator: string;
|
|
19071
|
+
expected?: unknown;
|
|
19072
|
+
actual?: unknown;
|
|
19073
|
+
/** @description false = the dot path resolved to nothing in the payload */
|
|
19074
|
+
resolved: boolean;
|
|
19075
|
+
matched: boolean;
|
|
18957
19076
|
}[];
|
|
18958
|
-
|
|
18959
|
-
|
|
18960
|
-
type:
|
|
18961
|
-
|
|
18962
|
-
|
|
18963
|
-
url: string;
|
|
18964
|
-
/**
|
|
18965
|
-
* @default POST
|
|
18966
|
-
* @enum {string}
|
|
18967
|
-
*/
|
|
18968
|
-
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
18969
|
-
headers?: {
|
|
18970
|
-
[key: string]: string;
|
|
18971
|
-
};
|
|
18972
|
-
bodyTemplate?: string;
|
|
18973
|
-
/** @default false */
|
|
18974
|
-
waitForResponse: boolean;
|
|
18975
|
-
/** @default 30000 */
|
|
18976
|
-
timeoutMs: number;
|
|
18977
|
-
responseAs?: string;
|
|
18978
|
-
/** @description Send the full OmniEvent envelope as the default body (default true) */
|
|
18979
|
-
includeEnvelope?: boolean;
|
|
18980
|
-
};
|
|
18981
|
-
} | {
|
|
18982
|
-
/** @enum {string} */
|
|
18983
|
-
type: "send_message";
|
|
18984
|
-
config: {
|
|
18985
|
-
instanceId?: string;
|
|
18986
|
-
to?: string;
|
|
18987
|
-
contentTemplate: string;
|
|
18988
|
-
};
|
|
18989
|
-
} | {
|
|
18990
|
-
/** @enum {string} */
|
|
18991
|
-
type: "emit_event";
|
|
18992
|
-
config: {
|
|
18993
|
-
eventType: string;
|
|
18994
|
-
payloadTemplate?: {
|
|
18995
|
-
[key: string]: unknown;
|
|
18996
|
-
};
|
|
18997
|
-
};
|
|
18998
|
-
} | {
|
|
18999
|
-
/** @enum {string} */
|
|
19000
|
-
type: "log";
|
|
19001
|
-
config: {
|
|
19002
|
-
/** @enum {string} */
|
|
19003
|
-
level: "debug" | "info" | "warn" | "error";
|
|
19004
|
-
message: string;
|
|
19005
|
-
};
|
|
19006
|
-
} | {
|
|
19007
|
-
/** @enum {string} */
|
|
19008
|
-
type: "call_agent";
|
|
19077
|
+
/** @description Rendered actions — never executed */
|
|
19078
|
+
actions: {
|
|
19079
|
+
type: string;
|
|
19080
|
+
wouldExecute: boolean;
|
|
19081
|
+
/** @description Action config with templates rendered */
|
|
19009
19082
|
config: {
|
|
19010
|
-
|
|
19011
|
-
providerId?: string;
|
|
19012
|
-
/** @description Agent ID (required or template) */
|
|
19013
|
-
agentId: string;
|
|
19014
|
-
/**
|
|
19015
|
-
* @description Agent type
|
|
19016
|
-
* @enum {string}
|
|
19017
|
-
*/
|
|
19018
|
-
agentType?: "agent" | "team" | "workflow";
|
|
19019
|
-
/**
|
|
19020
|
-
* @description Session strategy for agent memory
|
|
19021
|
-
* @enum {string}
|
|
19022
|
-
*/
|
|
19023
|
-
sessionStrategy?: "per_user" | "per_chat" | "per_thread";
|
|
19024
|
-
/** @description Prefix messages with sender name */
|
|
19025
|
-
prefixSenderName?: boolean;
|
|
19026
|
-
/** @description Timeout in milliseconds */
|
|
19027
|
-
timeoutMs?: number;
|
|
19028
|
-
/** @description Store agent response as variable for chaining (e.g., "agentResponse") */
|
|
19029
|
-
responseAs?: string;
|
|
19083
|
+
[key: string]: unknown;
|
|
19030
19084
|
};
|
|
19031
|
-
}
|
|
19085
|
+
}[];
|
|
19086
|
+
/** Format: uuid */
|
|
19087
|
+
eventId: string | null;
|
|
19088
|
+
/** @enum {boolean} */
|
|
19089
|
+
dryRun: true;
|
|
19032
19090
|
};
|
|
19033
19091
|
};
|
|
19034
19092
|
};
|
|
@@ -19067,7 +19125,8 @@ export interface operations {
|
|
|
19067
19125
|
requestBody?: {
|
|
19068
19126
|
content: {
|
|
19069
19127
|
"application/json": {
|
|
19070
|
-
event
|
|
19128
|
+
/** @description Hand-written event. Exactly one of event / eventId is required */
|
|
19129
|
+
event?: {
|
|
19071
19130
|
/** @description Event type */
|
|
19072
19131
|
type: string;
|
|
19073
19132
|
/** @description Event payload */
|
|
@@ -19075,6 +19134,11 @@ export interface operations {
|
|
|
19075
19134
|
[key: string]: unknown;
|
|
19076
19135
|
};
|
|
19077
19136
|
};
|
|
19137
|
+
/**
|
|
19138
|
+
* Format: uuid
|
|
19139
|
+
* @description Id of a REAL journaled event (omni_events) to run against (#1073): its rawPayload is the payload, its envelope metadata is merged for conditions. Exactly one of event / eventId is required
|
|
19140
|
+
*/
|
|
19141
|
+
eventId?: string;
|
|
19078
19142
|
};
|
|
19079
19143
|
};
|
|
19080
19144
|
};
|