@automagik/omni 2.260911.2 → 2.260911.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/db/drizzle/0067_automation_concurrency.sql +34 -0
- package/db/drizzle/meta/_journal.json +7 -0
- package/dist/commands/automations.d.ts +2 -0
- package/dist/commands/automations.d.ts.map +1 -1
- package/dist/commands/webhooks.d.ts +1 -1
- package/dist/commands/webhooks.d.ts.map +1 -1
- package/dist/index.js +51 -29
- package/dist/sdk/client.d.ts +21 -1
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/types.generated.d.ts +145 -2
- package/dist/sdk/types.generated.d.ts.map +1 -1
- package/dist/server/index.js +142 -46
- package/package.json +1 -1
|
@@ -1707,6 +1707,26 @@ export interface paths {
|
|
|
1707
1707
|
patch?: never;
|
|
1708
1708
|
trace?: never;
|
|
1709
1709
|
};
|
|
1710
|
+
"/events/schemas/{eventType}/validate": {
|
|
1711
|
+
parameters: {
|
|
1712
|
+
query?: never;
|
|
1713
|
+
header?: never;
|
|
1714
|
+
path?: never;
|
|
1715
|
+
cookie?: never;
|
|
1716
|
+
};
|
|
1717
|
+
get?: never;
|
|
1718
|
+
put?: never;
|
|
1719
|
+
/**
|
|
1720
|
+
* Validate a payload against a registered event schema (dry run)
|
|
1721
|
+
* @description Check a payload against the registered schema with the same validator and error strings as the webhook ingress and emit_event gates, without publishing an event or writing anything (no dead letter). Returns 200 whether the payload is valid or not; read the `valid` flag and `errors`.
|
|
1722
|
+
*/
|
|
1723
|
+
post: operations["validateEventPayload"];
|
|
1724
|
+
delete?: never;
|
|
1725
|
+
options?: never;
|
|
1726
|
+
head?: never;
|
|
1727
|
+
patch?: never;
|
|
1728
|
+
trace?: never;
|
|
1729
|
+
};
|
|
1710
1730
|
"/events/consumers": {
|
|
1711
1731
|
parameters: {
|
|
1712
1732
|
query?: never;
|
|
@@ -4571,6 +4591,8 @@ export interface components {
|
|
|
4571
4591
|
* @description Instance ID for context
|
|
4572
4592
|
*/
|
|
4573
4593
|
instanceId?: string;
|
|
4594
|
+
/** @description Producer-supplied ingress key (#1109). Unique per instance (else per tenant), not global. A key already journaled publishes nothing and returns the ORIGINAL event id with duplicate: true. Omit for undeduped publishing. */
|
|
4595
|
+
idempotencyKey?: string;
|
|
4574
4596
|
};
|
|
4575
4597
|
WebhookReceiveResponse: {
|
|
4576
4598
|
/**
|
|
@@ -5590,6 +5612,22 @@ export interface components {
|
|
|
5590
5612
|
/** @description Whether the validation gate is active (default true) */
|
|
5591
5613
|
enabled?: boolean;
|
|
5592
5614
|
};
|
|
5615
|
+
ValidateEventPayloadRequest: {
|
|
5616
|
+
/** @description The event payload to validate (any JSON value) */
|
|
5617
|
+
payload?: unknown;
|
|
5618
|
+
};
|
|
5619
|
+
EventPayloadValidation: {
|
|
5620
|
+
/** @description Event type the payload was checked against */
|
|
5621
|
+
eventType: string;
|
|
5622
|
+
/** @description Schema revision used */
|
|
5623
|
+
version: number;
|
|
5624
|
+
/** @description Whether the gate is active for this type (a disabled schema is still checked) */
|
|
5625
|
+
enabled: boolean;
|
|
5626
|
+
/** @description True when the payload satisfies the schema */
|
|
5627
|
+
valid: boolean;
|
|
5628
|
+
/** @description Violations as `instancePath: message`, identical to the ingress gate; empty when valid */
|
|
5629
|
+
errors: string[];
|
|
5630
|
+
};
|
|
5593
5631
|
DurableConsumer: {
|
|
5594
5632
|
/**
|
|
5595
5633
|
* Format: uuid
|
|
@@ -5791,6 +5829,10 @@ export interface components {
|
|
|
5791
5829
|
priority: number;
|
|
5792
5830
|
/** @description Transactional publication (G5, #988): buffer the run's emit_event publishes and flush them in order only when every action succeeded; a failed run publishes zero */
|
|
5793
5831
|
transactionalEmissions: boolean;
|
|
5832
|
+
/** @description Per-automation concurrency limit (#1108). null = queued per instance with the engine default; set = a queue private to this automation, 1 being strict single-flight */
|
|
5833
|
+
maxConcurrency: number | null;
|
|
5834
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; null = one queue for the whole automation */
|
|
5835
|
+
concurrencyKey: string | null;
|
|
5794
5836
|
/**
|
|
5795
5837
|
* Format: uuid
|
|
5796
5838
|
* @description Set when this automation was compiled from an agent event manifest (RFC #925 G4b, #986); null = hand-made. Managed automations reject manual mutation — edit the owning agent’s manifest instead
|
|
@@ -5933,6 +5975,10 @@ export interface components {
|
|
|
5933
5975
|
* @default false
|
|
5934
5976
|
*/
|
|
5935
5977
|
transactionalEmissions: boolean;
|
|
5978
|
+
/** @description Per-automation concurrency limit (#1108). Omit/null = today’s per-instance queueing with the engine default; 1 = strict single-flight, which is what a read-before-write action needs */
|
|
5979
|
+
maxConcurrency?: number | null;
|
|
5980
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; omit/null = one queue for the whole automation */
|
|
5981
|
+
concurrencyKey?: string | null;
|
|
5936
5982
|
};
|
|
5937
5983
|
AutomationLog: {
|
|
5938
5984
|
/**
|
|
@@ -6021,7 +6067,7 @@ export interface components {
|
|
|
6021
6067
|
running: boolean;
|
|
6022
6068
|
/** @description Instance queue stats */
|
|
6023
6069
|
instanceQueues?: {
|
|
6024
|
-
/** @description
|
|
6070
|
+
/** @description Queue key: the instance ID, or "<instanceId>:<automationId>[:<partition>]" for an automation running on its own queue (#1108) */
|
|
6025
6071
|
instanceId: string;
|
|
6026
6072
|
/** @description Active jobs */
|
|
6027
6073
|
activeCount: number;
|
|
@@ -13150,6 +13196,8 @@ export interface operations {
|
|
|
13150
13196
|
* @description Instance ID for context
|
|
13151
13197
|
*/
|
|
13152
13198
|
instanceId?: string;
|
|
13199
|
+
/** @description Producer-supplied ingress key (#1109). Unique per instance (else per tenant), not global. A key already journaled publishes nothing and returns the ORIGINAL event id with duplicate: true. Omit for undeduped publishing. */
|
|
13200
|
+
idempotencyKey?: string;
|
|
13153
13201
|
};
|
|
13154
13202
|
};
|
|
13155
13203
|
};
|
|
@@ -17157,6 +17205,69 @@ export interface operations {
|
|
|
17157
17205
|
};
|
|
17158
17206
|
};
|
|
17159
17207
|
};
|
|
17208
|
+
validateEventPayload: {
|
|
17209
|
+
parameters: {
|
|
17210
|
+
query?: never;
|
|
17211
|
+
header?: never;
|
|
17212
|
+
path: {
|
|
17213
|
+
eventType: string;
|
|
17214
|
+
};
|
|
17215
|
+
cookie?: never;
|
|
17216
|
+
};
|
|
17217
|
+
requestBody?: {
|
|
17218
|
+
content: {
|
|
17219
|
+
"application/json": {
|
|
17220
|
+
/** @description The event payload to validate (any JSON value) */
|
|
17221
|
+
payload?: unknown;
|
|
17222
|
+
};
|
|
17223
|
+
};
|
|
17224
|
+
};
|
|
17225
|
+
responses: {
|
|
17226
|
+
/** @description Validation verdict */
|
|
17227
|
+
200: {
|
|
17228
|
+
headers: {
|
|
17229
|
+
[name: string]: unknown;
|
|
17230
|
+
};
|
|
17231
|
+
content: {
|
|
17232
|
+
"application/json": {
|
|
17233
|
+
data: {
|
|
17234
|
+
/** @description Event type the payload was checked against */
|
|
17235
|
+
eventType: string;
|
|
17236
|
+
/** @description Schema revision used */
|
|
17237
|
+
version: number;
|
|
17238
|
+
/** @description Whether the gate is active for this type (a disabled schema is still checked) */
|
|
17239
|
+
enabled: boolean;
|
|
17240
|
+
/** @description True when the payload satisfies the schema */
|
|
17241
|
+
valid: boolean;
|
|
17242
|
+
/** @description Violations as `instancePath: message`, identical to the ingress gate; empty when valid */
|
|
17243
|
+
errors: string[];
|
|
17244
|
+
};
|
|
17245
|
+
};
|
|
17246
|
+
};
|
|
17247
|
+
};
|
|
17248
|
+
/** @description No schema registered for this type */
|
|
17249
|
+
404: {
|
|
17250
|
+
headers: {
|
|
17251
|
+
[name: string]: unknown;
|
|
17252
|
+
};
|
|
17253
|
+
content: {
|
|
17254
|
+
"application/json": {
|
|
17255
|
+
error: {
|
|
17256
|
+
/**
|
|
17257
|
+
* @description Error code
|
|
17258
|
+
* @example NOT_FOUND
|
|
17259
|
+
*/
|
|
17260
|
+
code: string;
|
|
17261
|
+
/** @description Human-readable error message */
|
|
17262
|
+
message: string;
|
|
17263
|
+
/** @description Additional error details */
|
|
17264
|
+
details?: unknown;
|
|
17265
|
+
};
|
|
17266
|
+
};
|
|
17267
|
+
};
|
|
17268
|
+
};
|
|
17269
|
+
};
|
|
17270
|
+
};
|
|
17160
17271
|
listEventConsumers: {
|
|
17161
17272
|
parameters: {
|
|
17162
17273
|
query?: never;
|
|
@@ -17802,6 +17913,10 @@ export interface operations {
|
|
|
17802
17913
|
priority: number;
|
|
17803
17914
|
/** @description Transactional publication (G5, #988): buffer the run's emit_event publishes and flush them in order only when every action succeeded; a failed run publishes zero */
|
|
17804
17915
|
transactionalEmissions: boolean;
|
|
17916
|
+
/** @description Per-automation concurrency limit (#1108). null = queued per instance with the engine default; set = a queue private to this automation, 1 being strict single-flight */
|
|
17917
|
+
maxConcurrency: number | null;
|
|
17918
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; null = one queue for the whole automation */
|
|
17919
|
+
concurrencyKey: string | null;
|
|
17805
17920
|
/**
|
|
17806
17921
|
* Format: uuid
|
|
17807
17922
|
* @description Set when this automation was compiled from an agent event manifest (RFC #925 G4b, #986); null = hand-made. Managed automations reject manual mutation — edit the owning agent’s manifest instead
|
|
@@ -17958,6 +18073,10 @@ export interface operations {
|
|
|
17958
18073
|
* @default false
|
|
17959
18074
|
*/
|
|
17960
18075
|
transactionalEmissions?: boolean;
|
|
18076
|
+
/** @description Per-automation concurrency limit (#1108). Omit/null = today’s per-instance queueing with the engine default; 1 = strict single-flight, which is what a read-before-write action needs */
|
|
18077
|
+
maxConcurrency?: number | null;
|
|
18078
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; omit/null = one queue for the whole automation */
|
|
18079
|
+
concurrencyKey?: string | null;
|
|
17961
18080
|
};
|
|
17962
18081
|
};
|
|
17963
18082
|
};
|
|
@@ -18090,6 +18209,10 @@ export interface operations {
|
|
|
18090
18209
|
priority: number;
|
|
18091
18210
|
/** @description Transactional publication (G5, #988): buffer the run's emit_event publishes and flush them in order only when every action succeeded; a failed run publishes zero */
|
|
18092
18211
|
transactionalEmissions: boolean;
|
|
18212
|
+
/** @description Per-automation concurrency limit (#1108). null = queued per instance with the engine default; set = a queue private to this automation, 1 being strict single-flight */
|
|
18213
|
+
maxConcurrency: number | null;
|
|
18214
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; null = one queue for the whole automation */
|
|
18215
|
+
concurrencyKey: string | null;
|
|
18093
18216
|
/**
|
|
18094
18217
|
* Format: uuid
|
|
18095
18218
|
* @description Set when this automation was compiled from an agent event manifest (RFC #925 G4b, #986); null = hand-made. Managed automations reject manual mutation — edit the owning agent’s manifest instead
|
|
@@ -18271,6 +18394,10 @@ export interface operations {
|
|
|
18271
18394
|
priority: number;
|
|
18272
18395
|
/** @description Transactional publication (G5, #988): buffer the run's emit_event publishes and flush them in order only when every action succeeded; a failed run publishes zero */
|
|
18273
18396
|
transactionalEmissions: boolean;
|
|
18397
|
+
/** @description Per-automation concurrency limit (#1108). null = queued per instance with the engine default; set = a queue private to this automation, 1 being strict single-flight */
|
|
18398
|
+
maxConcurrency: number | null;
|
|
18399
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; null = one queue for the whole automation */
|
|
18400
|
+
concurrencyKey: string | null;
|
|
18274
18401
|
/**
|
|
18275
18402
|
* Format: uuid
|
|
18276
18403
|
* @description Set when this automation was compiled from an agent event manifest (RFC #925 G4b, #986); null = hand-made. Managed automations reject manual mutation — edit the owning agent’s manifest instead
|
|
@@ -18498,6 +18625,10 @@ export interface operations {
|
|
|
18498
18625
|
* @default false
|
|
18499
18626
|
*/
|
|
18500
18627
|
transactionalEmissions?: boolean;
|
|
18628
|
+
/** @description Per-automation concurrency limit (#1108). Omit/null = today’s per-instance queueing with the engine default; 1 = strict single-flight, which is what a read-before-write action needs */
|
|
18629
|
+
maxConcurrency?: number | null;
|
|
18630
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; omit/null = one queue for the whole automation */
|
|
18631
|
+
concurrencyKey?: string | null;
|
|
18501
18632
|
};
|
|
18502
18633
|
};
|
|
18503
18634
|
};
|
|
@@ -18630,6 +18761,10 @@ export interface operations {
|
|
|
18630
18761
|
priority: number;
|
|
18631
18762
|
/** @description Transactional publication (G5, #988): buffer the run's emit_event publishes and flush them in order only when every action succeeded; a failed run publishes zero */
|
|
18632
18763
|
transactionalEmissions: boolean;
|
|
18764
|
+
/** @description Per-automation concurrency limit (#1108). null = queued per instance with the engine default; set = a queue private to this automation, 1 being strict single-flight */
|
|
18765
|
+
maxConcurrency: number | null;
|
|
18766
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; null = one queue for the whole automation */
|
|
18767
|
+
concurrencyKey: string | null;
|
|
18633
18768
|
/**
|
|
18634
18769
|
* Format: uuid
|
|
18635
18770
|
* @description Set when this automation was compiled from an agent event manifest (RFC #925 G4b, #986); null = hand-made. Managed automations reject manual mutation — edit the owning agent’s manifest instead
|
|
@@ -18811,6 +18946,10 @@ export interface operations {
|
|
|
18811
18946
|
priority: number;
|
|
18812
18947
|
/** @description Transactional publication (G5, #988): buffer the run's emit_event publishes and flush them in order only when every action succeeded; a failed run publishes zero */
|
|
18813
18948
|
transactionalEmissions: boolean;
|
|
18949
|
+
/** @description Per-automation concurrency limit (#1108). null = queued per instance with the engine default; set = a queue private to this automation, 1 being strict single-flight */
|
|
18950
|
+
maxConcurrency: number | null;
|
|
18951
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; null = one queue for the whole automation */
|
|
18952
|
+
concurrencyKey: string | null;
|
|
18814
18953
|
/**
|
|
18815
18954
|
* Format: uuid
|
|
18816
18955
|
* @description Set when this automation was compiled from an agent event manifest (RFC #925 G4b, #986); null = hand-made. Managed automations reject manual mutation — edit the owning agent’s manifest instead
|
|
@@ -18992,6 +19131,10 @@ export interface operations {
|
|
|
18992
19131
|
priority: number;
|
|
18993
19132
|
/** @description Transactional publication (G5, #988): buffer the run's emit_event publishes and flush them in order only when every action succeeded; a failed run publishes zero */
|
|
18994
19133
|
transactionalEmissions: boolean;
|
|
19134
|
+
/** @description Per-automation concurrency limit (#1108). null = queued per instance with the engine default; set = a queue private to this automation, 1 being strict single-flight */
|
|
19135
|
+
maxConcurrency: number | null;
|
|
19136
|
+
/** @description Template over the event payload partitioning this automation’s queue (#1108), e.g. "{{payload.from.id}}" to serialize per chat; null = one queue for the whole automation */
|
|
19137
|
+
concurrencyKey: string | null;
|
|
18995
19138
|
/**
|
|
18996
19139
|
* Format: uuid
|
|
18997
19140
|
* @description Set when this automation was compiled from an agent event manifest (RFC #925 G4b, #986); null = hand-made. Managed automations reject manual mutation — edit the owning agent’s manifest instead
|
|
@@ -19355,7 +19498,7 @@ export interface operations {
|
|
|
19355
19498
|
running: boolean;
|
|
19356
19499
|
/** @description Instance queue stats */
|
|
19357
19500
|
instanceQueues?: {
|
|
19358
|
-
/** @description
|
|
19501
|
+
/** @description Queue key: the instance ID, or "<instanceId>:<automationId>[:<partition>]" for an automation running on its own queue (#1108) */
|
|
19359
19502
|
instanceId: string;
|
|
19360
19503
|
/** @description Active jobs */
|
|
19361
19504
|
activeCount: number;
|