@hugex/ai 2.9.9 → 2.9.10
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.
|
@@ -13,8 +13,8 @@ export interface FlowInputDef {
|
|
|
13
13
|
default?: string | number | boolean | null;
|
|
14
14
|
}
|
|
15
15
|
export type FlowInputValues = Record<string, unknown>;
|
|
16
|
-
/** Kind of persistent trigger.
|
|
17
|
-
export type TriggerKind = 'schedule';
|
|
16
|
+
/** Kind of persistent trigger. */
|
|
17
|
+
export type TriggerKind = 'schedule' | 'webhook';
|
|
18
18
|
/** How a trigger activation was requested. Manual chat turns are not activators. */
|
|
19
19
|
export type InvocationMode = 'automatic' | 'run_now' | 'test';
|
|
20
20
|
export type SessionPolicy = 'owner';
|
|
@@ -26,6 +26,42 @@ export interface ScheduleSourceConfig {
|
|
|
26
26
|
cron: string;
|
|
27
27
|
timezone: string;
|
|
28
28
|
}
|
|
29
|
+
/** Functional config for a webhook trigger. */
|
|
30
|
+
export interface WebhookSourceConfig {
|
|
31
|
+
contentType: 'application/json';
|
|
32
|
+
}
|
|
33
|
+
export interface TriggerSourceConfigMap {
|
|
34
|
+
schedule: ScheduleSourceConfig;
|
|
35
|
+
webhook: WebhookSourceConfig;
|
|
36
|
+
}
|
|
37
|
+
export type TriggerSourceConfig<K extends TriggerKind = TriggerKind> = TriggerSourceConfigMap[K];
|
|
38
|
+
export type WebhookInputBinding = {
|
|
39
|
+
source: 'fixed';
|
|
40
|
+
value: unknown;
|
|
41
|
+
} | {
|
|
42
|
+
source: 'body';
|
|
43
|
+
pointer: string;
|
|
44
|
+
};
|
|
45
|
+
export type WebhookInputMapping = Record<string, WebhookInputBinding>;
|
|
46
|
+
/** Adapter-declared capabilities; UI and admin routes derive actions from these. */
|
|
47
|
+
export interface TriggerSourceCapabilities {
|
|
48
|
+
canPause: boolean;
|
|
49
|
+
canRunNow: boolean;
|
|
50
|
+
canTest: boolean;
|
|
51
|
+
canResync: boolean;
|
|
52
|
+
canRotateSecret: boolean;
|
|
53
|
+
exposesDestination: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface TriggerAllowedActions {
|
|
56
|
+
pause: boolean;
|
|
57
|
+
resume: boolean;
|
|
58
|
+
runNow: boolean;
|
|
59
|
+
test: boolean;
|
|
60
|
+
resync: boolean;
|
|
61
|
+
rotateSecret: boolean;
|
|
62
|
+
delete: boolean;
|
|
63
|
+
edit: boolean;
|
|
64
|
+
}
|
|
29
65
|
/**
|
|
30
66
|
* Normalized unit of work handed to the tenant runtime and AgentDO.
|
|
31
67
|
* One activation produces at most one effective run.
|