@automagik/omni 2.260910.10 → 2.260910.12

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.
@@ -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 Test automation against a sample event (dry run).
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;
@@ -5578,6 +5600,8 @@ export interface components {
5578
5600
  name: string;
5579
5601
  /** @description Type filter: exact event type or trailing-* prefix glob */
5580
5602
  eventType: string;
5603
+ /** @description Type globs dropped from the stream (exclusion wins over eventType), or null */
5604
+ excludeTypes: string[] | null;
5581
5605
  /** @description Payload conditions (AND), or null */
5582
5606
  filters: {
5583
5607
  /** @description Dot-notation path into the event's rawPayload (e.g. user.id) */
@@ -5612,6 +5636,8 @@ export interface components {
5612
5636
  name: string;
5613
5637
  /** @description Type filter: exact event type, or trailing-* prefix glob (e.g. custom.github.*) */
5614
5638
  eventType: string;
5639
+ /** @description Type globs to drop (same syntax as eventType); exclusion wins over inclusion */
5640
+ excludeTypes?: string[];
5615
5641
  /** @description Payload conditions (AND) — same matcher as events wait --filter */
5616
5642
  filters?: {
5617
5643
  /** @description Dot-notation path into the event's rawPayload (e.g. user.id) */
@@ -5942,7 +5968,8 @@ export interface components {
5942
5968
  durationMs: number;
5943
5969
  };
5944
5970
  TestAutomationRequest: {
5945
- event: {
5971
+ /** @description Hand-written event. Exactly one of event / eventId is required */
5972
+ event?: {
5946
5973
  /** @description Event type */
5947
5974
  type: string;
5948
5975
  /** @description Event payload */
@@ -5950,6 +5977,44 @@ export interface components {
5950
5977
  [key: string]: unknown;
5951
5978
  };
5952
5979
  };
5980
+ /**
5981
+ * Format: uuid
5982
+ * @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
5983
+ */
5984
+ eventId?: string;
5985
+ };
5986
+ AutomationTestResult: {
5987
+ /** @description triggerMatched AND conditionsMatched */
5988
+ matched: boolean;
5989
+ /** @description Event type equals the automation trigger */
5990
+ triggerMatched: boolean;
5991
+ /** @description Condition set verdict under conditionLogic */
5992
+ conditionsMatched: boolean;
5993
+ /** @enum {string} */
5994
+ conditionLogic: "and" | "or";
5995
+ /** @description Per-condition verdicts */
5996
+ conditions: {
5997
+ field: string;
5998
+ operator: string;
5999
+ expected?: unknown;
6000
+ actual?: unknown;
6001
+ /** @description false = the dot path resolved to nothing in the payload */
6002
+ resolved: boolean;
6003
+ matched: boolean;
6004
+ }[];
6005
+ /** @description Rendered actions — never executed */
6006
+ actions: {
6007
+ type: string;
6008
+ wouldExecute: boolean;
6009
+ /** @description Action config with templates rendered */
6010
+ config: {
6011
+ [key: string]: unknown;
6012
+ };
6013
+ }[];
6014
+ /** Format: uuid */
6015
+ eventId: string | null;
6016
+ /** @enum {boolean} */
6017
+ dryRun: true;
5953
6018
  };
5954
6019
  AutomationMetrics: {
5955
6020
  /** @description Engine running */
@@ -6691,6 +6756,25 @@ export interface components {
6691
6756
  /** @description The plaintext credential. Returned exactly ONCE; it can never be retrieved again. */
6692
6757
  plainTextKey: string;
6693
6758
  };
6759
+ EventTypeInventoryRow: {
6760
+ /** @description Event type */
6761
+ eventType: string;
6762
+ /** @description Events observed in the window */
6763
+ count: number;
6764
+ /**
6765
+ * Format: date-time
6766
+ * @description Most recent receivedAt in the window
6767
+ */
6768
+ lastSeen: string;
6769
+ /** @description Registered schema version (null = unregistered) */
6770
+ schemaVersion: number | null;
6771
+ /** @description Whether the registered schema gate is enabled */
6772
+ schemaEnabled: boolean | null;
6773
+ /** @description Durable consumer names subscribed to this type */
6774
+ consumers: string[];
6775
+ /** @description Enabled automations triggered by this type */
6776
+ automations: string[];
6777
+ };
6694
6778
  };
6695
6779
  responses: never;
6696
6780
  parameters: never;
@@ -10587,6 +10671,7 @@ export interface operations {
10587
10671
  personId?: string;
10588
10672
  chatId?: string;
10589
10673
  eventType?: string;
10674
+ excludeEventType?: string;
10590
10675
  contentType?: string;
10591
10676
  direction?: "inbound" | "outbound";
10592
10677
  since?: string;
@@ -10716,6 +10801,8 @@ export interface operations {
10716
10801
  avgProcessingTimeMs: number | null;
10717
10802
  /** @description Average agent time (ms) */
10718
10803
  avgAgentTimeMs: number | null;
10804
+ /** @description Sum of agent run cost (USD) stamped on events in range */
10805
+ totalCostUsd: number;
10719
10806
  /** @description Count by content type */
10720
10807
  messageTypes: {
10721
10808
  [key: string]: number;
@@ -10751,6 +10838,34 @@ export interface operations {
10751
10838
  };
10752
10839
  };
10753
10840
  };
10841
+ listEventTypes: {
10842
+ parameters: {
10843
+ query?: {
10844
+ since?: string;
10845
+ };
10846
+ header?: never;
10847
+ path?: never;
10848
+ cookie?: never;
10849
+ };
10850
+ requestBody?: never;
10851
+ responses: {
10852
+ /** @description Event type inventory */
10853
+ 200: {
10854
+ headers: {
10855
+ [name: string]: unknown;
10856
+ };
10857
+ content: {
10858
+ "application/json": {
10859
+ items: components["schemas"]["EventTypeInventoryRow"][];
10860
+ meta: {
10861
+ /** Format: date-time */
10862
+ since: string | null;
10863
+ };
10864
+ };
10865
+ };
10866
+ };
10867
+ };
10868
+ };
10754
10869
  getPersonTimeline: {
10755
10870
  parameters: {
10756
10871
  query?: {
@@ -17068,6 +17183,8 @@ export interface operations {
17068
17183
  name: string;
17069
17184
  /** @description Type filter: exact event type or trailing-* prefix glob */
17070
17185
  eventType: string;
17186
+ /** @description Type globs dropped from the stream (exclusion wins over eventType), or null */
17187
+ excludeTypes: string[] | null;
17071
17188
  /** @description Payload conditions (AND), or null */
17072
17189
  filters: {
17073
17190
  /** @description Dot-notation path into the event's rawPayload (e.g. user.id) */
@@ -17116,6 +17233,8 @@ export interface operations {
17116
17233
  name: string;
17117
17234
  /** @description Type filter: exact event type, or trailing-* prefix glob (e.g. custom.github.*) */
17118
17235
  eventType: string;
17236
+ /** @description Type globs to drop (same syntax as eventType); exclusion wins over inclusion */
17237
+ excludeTypes?: string[];
17119
17238
  /** @description Payload conditions (AND) — same matcher as events wait --filter */
17120
17239
  filters?: {
17121
17240
  /** @description Dot-notation path into the event's rawPayload (e.g. user.id) */
@@ -17154,6 +17273,8 @@ export interface operations {
17154
17273
  name: string;
17155
17274
  /** @description Type filter: exact event type or trailing-* prefix glob */
17156
17275
  eventType: string;
17276
+ /** @description Type globs dropped from the stream (exclusion wins over eventType), or null */
17277
+ excludeTypes: string[] | null;
17157
17278
  /** @description Payload conditions (AND), or null */
17158
17279
  filters: {
17159
17280
  /** @description Dot-notation path into the event's rawPayload (e.g. user.id) */
@@ -17237,6 +17358,8 @@ export interface operations {
17237
17358
  name: string;
17238
17359
  /** @description Type filter: exact event type or trailing-* prefix glob */
17239
17360
  eventType: string;
17361
+ /** @description Type globs dropped from the stream (exclusion wins over eventType), or null */
17362
+ excludeTypes: string[] | null;
17240
17363
  /** @description Payload conditions (AND), or null */
17241
17364
  filters: {
17242
17365
  /** @description Dot-notation path into the event's rawPayload (e.g. user.id) */
@@ -17431,6 +17554,8 @@ export interface operations {
17431
17554
  name: string;
17432
17555
  /** @description Type filter: exact event type or trailing-* prefix glob */
17433
17556
  eventType: string;
17557
+ /** @description Type globs dropped from the stream (exclusion wins over eventType), or null */
17558
+ excludeTypes: string[] | null;
17434
17559
  /** @description Payload conditions (AND), or null */
17435
17560
  filters: {
17436
17561
  /** @description Dot-notation path into the event's rawPayload (e.g. user.id) */
@@ -18921,7 +19046,8 @@ export interface operations {
18921
19046
  requestBody?: {
18922
19047
  content: {
18923
19048
  "application/json": {
18924
- event: {
19049
+ /** @description Hand-written event. Exactly one of event / eventId is required */
19050
+ event?: {
18925
19051
  /** @description Event type */
18926
19052
  type: string;
18927
19053
  /** @description Event payload */
@@ -18929,106 +19055,53 @@ export interface operations {
18929
19055
  [key: string]: unknown;
18930
19056
  };
18931
19057
  };
19058
+ /**
19059
+ * Format: uuid
19060
+ * @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
19061
+ */
19062
+ eventId?: string;
18932
19063
  };
18933
19064
  };
18934
19065
  };
18935
19066
  responses: {
18936
- /** @description Test result */
19067
+ /** @description Dry-run result */
18937
19068
  200: {
18938
19069
  headers: {
18939
19070
  [name: string]: unknown;
18940
19071
  };
18941
19072
  content: {
18942
19073
  "application/json": {
19074
+ /** @description triggerMatched AND conditionsMatched */
18943
19075
  matched: boolean;
18944
- conditionResults?: {
18945
- condition: {
18946
- /** @description Dot notation field path */
18947
- field: string;
18948
- /**
18949
- * @description Operator
18950
- * @enum {string}
18951
- */
18952
- operator: "eq" | "neq" | "gt" | "lt" | "gte" | "lte" | "contains" | "not_contains" | "exists" | "not_exists" | "regex";
18953
- /** @description Value to compare */
18954
- value?: unknown;
18955
- };
18956
- passed: boolean;
19076
+ /** @description Event type equals the automation trigger */
19077
+ triggerMatched: boolean;
19078
+ /** @description Condition set verdict under conditionLogic */
19079
+ conditionsMatched: boolean;
19080
+ /** @enum {string} */
19081
+ conditionLogic: "and" | "or";
19082
+ /** @description Per-condition verdicts */
19083
+ conditions: {
19084
+ field: string;
19085
+ operator: string;
19086
+ expected?: unknown;
19087
+ actual?: unknown;
19088
+ /** @description false = the dot path resolved to nothing in the payload */
19089
+ resolved: boolean;
19090
+ matched: boolean;
18957
19091
  }[];
18958
- wouldExecute?: ({
18959
- /** @enum {string} */
18960
- type: "webhook";
18961
- config: {
18962
- /** @description Webhook URL */
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";
19092
+ /** @description Rendered actions — never executed */
19093
+ actions: {
19094
+ type: string;
19095
+ wouldExecute: boolean;
19096
+ /** @description Action config with templates rendered */
19009
19097
  config: {
19010
- /** @description Provider ID (template: {{instance.agentProviderId}}) */
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;
19098
+ [key: string]: unknown;
19030
19099
  };
19031
- })[];
19100
+ }[];
19101
+ /** Format: uuid */
19102
+ eventId: string | null;
19103
+ /** @enum {boolean} */
19104
+ dryRun: true;
19032
19105
  };
19033
19106
  };
19034
19107
  };
@@ -19067,7 +19140,8 @@ export interface operations {
19067
19140
  requestBody?: {
19068
19141
  content: {
19069
19142
  "application/json": {
19070
- event: {
19143
+ /** @description Hand-written event. Exactly one of event / eventId is required */
19144
+ event?: {
19071
19145
  /** @description Event type */
19072
19146
  type: string;
19073
19147
  /** @description Event payload */
@@ -19075,6 +19149,11 @@ export interface operations {
19075
19149
  [key: string]: unknown;
19076
19150
  };
19077
19151
  };
19152
+ /**
19153
+ * Format: uuid
19154
+ * @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
19155
+ */
19156
+ eventId?: string;
19078
19157
  };
19079
19158
  };
19080
19159
  };