@tangle-network/hub-sdk 0.3.0 → 0.5.1

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/index.d.ts CHANGED
@@ -46,6 +46,126 @@ interface HubConnection {
46
46
  interface HubConnectionsResponse {
47
47
  connections: HubConnection[];
48
48
  }
49
+ interface HubEmailChannel {
50
+ id: string;
51
+ kind: "email";
52
+ providerId: "email";
53
+ connectionId: string;
54
+ clientReference: string | null;
55
+ label: string | null;
56
+ address: string;
57
+ status: "active";
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ }
61
+ type HubChannel = HubEmailChannel;
62
+ interface HubChannelsResponse {
63
+ channels: HubChannel[];
64
+ }
65
+ interface HubEmailChannelCreateRequest {
66
+ /**
67
+ * Product-owned idempotency key. Retrying the same request returns the
68
+ * original mailbox instead of provisioning another address.
69
+ */
70
+ clientReference?: string;
71
+ label?: string;
72
+ }
73
+ interface HubChannelCreateResponse {
74
+ channel: HubChannel;
75
+ /** True only when this request created the channel. */
76
+ created: boolean;
77
+ }
78
+ interface HubChannelDeleteResponse {
79
+ removed: true;
80
+ }
81
+ type HubEventConditionScalar = string | number | boolean | null;
82
+ type HubEventCondition = {
83
+ path: string;
84
+ op: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains" | "exists" | "truthy";
85
+ value?: HubEventConditionScalar | HubEventConditionScalar[];
86
+ } | {
87
+ all: HubEventCondition[];
88
+ } | {
89
+ any: HubEventCondition[];
90
+ } | {
91
+ not: HubEventCondition;
92
+ };
93
+ interface HubEventSubscriptionFilter {
94
+ action?: string;
95
+ repo?: string;
96
+ when?: HubEventCondition;
97
+ }
98
+ type HubEventSubscriptionSource = {
99
+ type: "channel";
100
+ channelId: string;
101
+ } | {
102
+ type: "connection";
103
+ connectionId: string;
104
+ };
105
+ interface HubEventSubscriptionCallback {
106
+ url: string;
107
+ secret: string;
108
+ }
109
+ interface HubEventSubscriptionCreateRequest {
110
+ /**
111
+ * Product-owned idempotency key. Reusing it with the same source and filter
112
+ * returns the existing subscription; reusing it for different input fails.
113
+ */
114
+ clientReference: string;
115
+ label?: string;
116
+ source: HubEventSubscriptionSource;
117
+ event: string;
118
+ filter?: HubEventSubscriptionFilter;
119
+ callback: HubEventSubscriptionCallback;
120
+ }
121
+ interface HubEventSubscription {
122
+ id: string;
123
+ clientReference: string;
124
+ label: string | null;
125
+ source: HubEventSubscriptionSource;
126
+ providerId: string;
127
+ connectionId: string;
128
+ event: string;
129
+ filter: HubEventSubscriptionFilter;
130
+ workflowId: string;
131
+ status: "active" | "error";
132
+ lastError: string | null;
133
+ createdAt: string;
134
+ updatedAt: string;
135
+ }
136
+ interface HubEventSubscriptionsResponse {
137
+ subscriptions: HubEventSubscription[];
138
+ }
139
+ interface HubEventSubscriptionCreateResponse {
140
+ subscription: HubEventSubscription;
141
+ /** True only when this request created the subscription; false on idempotent reuse. */
142
+ created: boolean;
143
+ }
144
+ interface HubEventSubscriptionDeleteResponse {
145
+ removed: true;
146
+ }
147
+ interface HubProviderEvent {
148
+ provider: string;
149
+ connectionId: string;
150
+ type: string;
151
+ action?: string;
152
+ repo?: string;
153
+ deliveryId?: string;
154
+ payload: unknown;
155
+ }
156
+ interface HubEventDelivery {
157
+ subscriptionId: string;
158
+ workflowId: string;
159
+ runId: string;
160
+ source: {
161
+ kind: "channel" | "connection";
162
+ id: string;
163
+ provider: string;
164
+ event: string;
165
+ };
166
+ providerEvent: HubProviderEvent;
167
+ firedAt: string;
168
+ }
49
169
  /** A connector's auth model. */
50
170
  type HubProviderAuthKind = "oauth2" | "api_key" | "none" | "custom";
51
171
  interface HubProvider {
@@ -73,6 +193,12 @@ interface HubProvider {
73
193
  /** True when the provider's OAuth app credentials are wired, i.e. a connect
74
194
  * flow can actually start. UIs offer Connect only for configured providers. */
75
195
  configured: boolean;
196
+ /**
197
+ * True when this deployment can receive this provider's inbound events.
198
+ * This is separate from `configured`: OAuth can be ready while the shared
199
+ * webhook secret or bot identity is still absent.
200
+ */
201
+ eventIngressConfigured?: boolean;
76
202
  }
77
203
  interface HubProvidersResponse {
78
204
  providers: HubProvider[];
@@ -411,7 +537,7 @@ interface HubWorkflowEventFilter {
411
537
  }
412
538
  interface HubWorkflowTrigger {
413
539
  id: string;
414
- kind: "provider_event" | "schedule";
540
+ kind: "provider_event" | "schedule" | "webhook";
415
541
  enabled: boolean;
416
542
  provider: string | null;
417
543
  connectionId: string | null;
@@ -472,6 +598,21 @@ interface HubWorkflowActionResult {
472
598
  output?: unknown;
473
599
  error?: string;
474
600
  costUsd?: number;
601
+ /** Graph-run identity: the topology node this action row belongs to. Present
602
+ * when the id says something the row's position does not — an author's DAG
603
+ * node id, and every cycle re-entry row (a node visited more than once
604
+ * produces one row per visit). Absent on a linear run's rows, whose node id
605
+ * IS their position: read it as `step-${index + 1}`. */
606
+ nodeId?: string;
607
+ /** Which visit of `nodeId` this row is (1-based). Present on cycle re-entry
608
+ * rows only; a single-visit row omits it. */
609
+ visit?: number;
610
+ /** `script.run` only (single-run detail): the script's captured stdout
611
+ * (size-capped), or an artifact ref carrying the full log by reference. */
612
+ logs?: unknown;
613
+ /** How an `onError` policy handled this action's failure so the run
614
+ * continued (the action still reads `failed`). */
615
+ onError?: HubWorkflowOnErrorOutcome;
475
616
  /** `agent.run` only (single-run detail): the agent's execution detail —
476
617
  * per-iteration spans (each with text), aggregate usage, partial text. */
477
618
  agentRun?: HubAgentRunDetail;
@@ -507,6 +648,16 @@ interface HubWorkflowRunDetail extends HubWorkflowRun {
507
648
  * `getRun` / a `snapshot` event reads them without re-checking presence. */
508
649
  triggerContext: unknown;
509
650
  definitionSnapshot: string | null;
651
+ /** The terminal failed/cancelled run this one retries (enqueued via
652
+ * {@link HubWorkflowsClient.retryRun}); null on runs that are not retries. */
653
+ retriedFromRunId: string | null;
654
+ /** The compiled graph topology the run executed (resolved from the run's
655
+ * definition snapshot, so a post-run edit can't mislabel it) — null for a
656
+ * linear run. Present on the HTTP run-detail response. */
657
+ graph?: HubWorkflowGraphSpec | null;
658
+ /** Per-completion guard verdicts (keyed `"from->to"`), present only when the
659
+ * run carries a graph journal — i.e. a parked (`waiting`) graph run. */
660
+ edgeVerdicts?: HubWorkflowEdgeVerdicts[];
510
661
  }
511
662
  /**
512
663
  * The trigger fields a manual "Run now" supplies, as a flat `{ path: value }`
@@ -538,6 +689,17 @@ interface HubWorkflowRunCancelResult {
538
689
  * watch/poll the run to confirm it settled `cancelled`. */
539
690
  signalled?: boolean;
540
691
  }
692
+ /**
693
+ * Response of a run retry (`POST /v1/workflows/:id/runs/:runId/retry`): the
694
+ * NEWLY enqueued run's id — a fresh run of the same workflow with the same
695
+ * trigger context — plus the terminal run it was retried from. A finished
696
+ * run in any other state throws `HubSdkError` with code `RUN_NOT_RETRYABLE`;
697
+ * an unknown/foreign run throws `NOT_FOUND`.
698
+ */
699
+ interface HubWorkflowRunRetried {
700
+ runId: string;
701
+ retriedFromRunId: string;
702
+ }
541
703
  /**
542
704
  * A live event from a run's SSE stream (`GET /v1/workflows/:id/runs/:runId/events`),
543
705
  * as surfaced by {@link HubWorkflowsClient.watchRun}. `snapshot` is the current
@@ -608,6 +770,35 @@ interface HubWorkflowRunsPage {
608
770
  runs: HubWorkflowRun[];
609
771
  nextCursor: string | null;
610
772
  }
773
+ /** Trailing windows the fleet-insights endpoint accepts. */
774
+ type HubWorkflowFleetWindow = "24h" | "7d" | "30d";
775
+ /**
776
+ * One workflow's row in the fleet overview: its run tallies over the window.
777
+ * `lastRunStatus`/`lastRunAt` describe the newest run INSIDE the window (null
778
+ * when the workflow didn't run in it), and `successRate` is
779
+ * `succeeded / runsInWindow` — null, never a fabricated 0 or 1, when there is
780
+ * no denominator.
781
+ */
782
+ interface HubWorkflowFleetEntry {
783
+ id: string;
784
+ name: string;
785
+ enabled: boolean;
786
+ runsInWindow: number;
787
+ succeeded: number;
788
+ failed: number;
789
+ /** Runs parked on a human `decision` step (status `waiting`). */
790
+ waiting: number;
791
+ successRate: number | null;
792
+ lastRunStatus: HubWorkflowRunStatus | null;
793
+ lastRunAt: string | null;
794
+ }
795
+ /** `GET /v1/workflows/insights/fleet` — the whole fleet, sorted failing-first. */
796
+ interface HubWorkflowFleetInsights {
797
+ window: HubWorkflowFleetWindow;
798
+ /** ISO instant the window starts at (now minus the window length). */
799
+ windowStart: string;
800
+ workflows: HubWorkflowFleetEntry[];
801
+ }
611
802
  interface HubWorkflow {
612
803
  id: string;
613
804
  name: string;
@@ -618,11 +809,22 @@ interface HubWorkflow {
618
809
  /** The durable YAML this workflow compiled from. */
619
810
  definitionYaml: string | null;
620
811
  validationErrors: HubWorkflowValidationError[];
812
+ /** Current head revision; null on pre-versioning rows until their next
813
+ * update (they have no revision history to point at yet). */
814
+ headRev?: number | null;
621
815
  /** Present on get/create/update detail responses; omitted on list. */
622
816
  triggers?: HubWorkflowTrigger[];
623
817
  /** Present on the detail response: the trigger fields a manual run must supply,
624
818
  * derived from the definition's `${trigger.*}` references (empty when none). */
625
819
  manualRunInputs?: HubManualRunInput[];
820
+ /** Present on the get-detail response: the compiled graph topology (null
821
+ * when the definition has no graph topology, or is chain-equivalent —
822
+ * the legacy linear semantics). Omitted on the list projection. */
823
+ graph?: HubWorkflowGraphSpec | null;
824
+ /** Create response only, when the definition has a webhook trigger: the
825
+ * hook delivery URL, plus the plaintext bearer token exactly once at mint
826
+ * (absent when an active token already exists — rotate to re-reveal). */
827
+ hook?: HubWorkflowHookEndpoint;
626
828
  /** Present on the list response (latest run, or null if never run); omitted on detail. */
627
829
  lastRun?: HubWorkflowRunSummary | null;
628
830
  createdAt: string;
@@ -646,6 +848,305 @@ type HubWorkflowValidateResponse = {
646
848
  };
647
849
  /** JSON Schema for the YAML workflow definition. */
648
850
  type HubWorkflowSchemaResponse = Record<string, unknown>;
851
+ /** How a node's incoming edges release it (default `"all"` — omitted on the
852
+ * wire for it, so specs compiled before join rules existed round-trip). */
853
+ type HubWorkflowGraphJoinRule = "all" | "any" | "any_failed" | "all_done";
854
+ type HubWorkflowConditionOp = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains" | "exists" | "truthy";
855
+ type HubWorkflowConditionScalar = string | number | boolean | null;
856
+ /** The predicate on a guarded edge (`needs: [{ id, when }]`), evaluated by the
857
+ * runner against the steps context on the source node's completion. */
858
+ type HubWorkflowCondition = {
859
+ path: string;
860
+ op: HubWorkflowConditionOp;
861
+ value?: HubWorkflowConditionScalar | HubWorkflowConditionScalar[];
862
+ } | {
863
+ all: HubWorkflowCondition[];
864
+ } | {
865
+ any: HubWorkflowCondition[];
866
+ } | {
867
+ not: HubWorkflowCondition;
868
+ };
869
+ interface HubWorkflowGraphNode {
870
+ id: string;
871
+ index: number;
872
+ join?: HubWorkflowGraphJoinRule;
873
+ }
874
+ interface HubWorkflowGraphEdge {
875
+ from: string;
876
+ to: string;
877
+ /** Guard the runner evaluates on the source's completion; unguarded edges
878
+ * carry no `when`. */
879
+ when?: HubWorkflowCondition;
880
+ }
881
+ /** JSON-serializable form of a validated graph (as stored on run/workflow rows). */
882
+ interface HubWorkflowGraphSpec {
883
+ nodes: HubWorkflowGraphNode[];
884
+ edges: HubWorkflowGraphEdge[];
885
+ maxNodeVisits: number;
886
+ }
887
+ /** One journal completion on the wire: the node that completed and the guard
888
+ * verdict evaluated for each of its guarded outgoing edges, keyed by edgeKey
889
+ * (`"from->to"`). Only GUARDED edges ever appear. */
890
+ interface HubWorkflowEdgeVerdicts {
891
+ nodeId: string;
892
+ verdicts: Record<string, boolean>;
893
+ }
894
+ /** How an action's `onError` policy handled a failure so the run continued
895
+ * (the action itself still reads `failed`). */
896
+ interface HubWorkflowOnErrorOutcome {
897
+ policy: "continue" | "fallback";
898
+ /** The recovery leaf's result when the policy ran a `{ do }` fallback. */
899
+ fallback?: {
900
+ kind: string;
901
+ status: "succeeded" | "failed";
902
+ output?: unknown;
903
+ error?: string;
904
+ costUsd?: number;
905
+ };
906
+ }
907
+ type HubWorkflowRevisionSource = "user" | "copilot" | "intelligence";
908
+ /** Lifecycle state of a revision. The head rev only ever points at an
909
+ * `applied` revision; `proposed` is a service-token-authored suggestion
910
+ * awaiting an owner decision; `rejected` is a declined proposal (kept for
911
+ * audit). */
912
+ type HubWorkflowRevisionStatus = "applied" | "proposed" | "rejected";
913
+ /** Revision list projection — attribution + note + status, WITHOUT the YAML body. */
914
+ interface HubWorkflowRevisionMeta {
915
+ rev: number;
916
+ createdAt: string;
917
+ createdBy: string;
918
+ source: HubWorkflowRevisionSource;
919
+ note: string | null;
920
+ status: HubWorkflowRevisionStatus;
921
+ }
922
+ /** One revision WITH its YAML (and the actions compiled alongside it). */
923
+ interface HubWorkflowRevision extends HubWorkflowRevisionMeta {
924
+ yaml: string;
925
+ actions: HubWorkflowAction[];
926
+ }
927
+ /** A proposal (proposed or rejected revision) WITH its evidence — what the
928
+ * proposer derived the suggestion from (e.g. health stats), plus
929
+ * `rejectionReason` once declined. */
930
+ interface HubWorkflowProposal extends HubWorkflowRevisionMeta {
931
+ evidence: unknown;
932
+ }
933
+ /** Input to {@link HubWorkflowsClient.propose}. Service-token callers only. */
934
+ interface HubWorkflowProposalInput {
935
+ yaml: string;
936
+ note?: string;
937
+ /** Proposer-supplied justification (any JSON value) — carried verbatim onto
938
+ * the revision and shown on the approval surface. */
939
+ evidence?: unknown;
940
+ }
941
+ /** One node's aggregate across the analyzed runs. */
942
+ interface HubWorkflowNodeHealth {
943
+ /** The author's graph node id, or `step-N` for a linear run's nodes (and for
944
+ * a node whose run cannot be mapped back to a definition). */
945
+ nodeId: string;
946
+ visits: number;
947
+ failures: number;
948
+ /** Null when no visit carried a cost row (never a fabricated 0). */
949
+ totalCostUsd: number | null;
950
+ /** Null when no visit recorded duration spans. */
951
+ avgDurationMs: number | null;
952
+ }
953
+ /** Failures grouped by a normalized error signature (ids/numbers/whitespace
954
+ * stripped), most frequent first (top 5). */
955
+ interface HubWorkflowFailureCluster {
956
+ signature: string;
957
+ count: number;
958
+ sampleRunIds: string[];
959
+ }
960
+ /** An agent.run node whose outputs are near-static across runs — a
961
+ * CANDIDATE for distillation, reported with its measurements, never a
962
+ * verdict. */
963
+ interface HubWorkflowDistillationCandidate {
964
+ nodeId: string;
965
+ matchRatio: number;
966
+ samples: number;
967
+ avgCostUsd: number | null;
968
+ }
969
+ interface HubWorkflowHealth {
970
+ /** The requested window (the `runs` parameter). */
971
+ runsWindow: number;
972
+ /** Terminal runs that actually went into the stats. */
973
+ runsAnalyzed: number;
974
+ nodes: HubWorkflowNodeHealth[];
975
+ failureClusters: HubWorkflowFailureCluster[];
976
+ distillationCandidates: HubWorkflowDistillationCandidate[];
977
+ }
978
+ /** One KV entry with its metadata — the get/put/cas response shape. */
979
+ interface HubWorkflowKvEntry {
980
+ key: string;
981
+ value: unknown;
982
+ version: number;
983
+ updatedAt: string;
984
+ }
985
+ /** Keyspace metadata row (never the value) — the list response's entry. */
986
+ interface HubWorkflowKvEntryMeta {
987
+ key: string;
988
+ version: number;
989
+ updatedAt: string;
990
+ }
991
+ interface HubWorkflowKvListResponse {
992
+ entries: HubWorkflowKvEntryMeta[];
993
+ }
994
+ interface HubWorkflowKvDeleteResponse {
995
+ deleted: boolean;
996
+ }
997
+ /** The opaque ref a stored artifact is referred to by — the value a
998
+ * script.run node returns as its step output. */
999
+ interface HubWorkflowArtifactRef {
1000
+ $artifact: string;
1001
+ name: string;
1002
+ contentType: string;
1003
+ byteSize: number;
1004
+ preview: string | null;
1005
+ }
1006
+ /** Artifact metadata (never the bytes), oldest first on the list response. */
1007
+ interface HubWorkflowArtifact {
1008
+ id: string;
1009
+ runId: string;
1010
+ workflowId: string;
1011
+ /** The graph node (or `step-N` positional id on linear runs) whose action
1012
+ * emitted the artifact. */
1013
+ nodeId: string;
1014
+ name: string;
1015
+ contentType: string;
1016
+ byteSize: number;
1017
+ /** First 2KiB of textual content; null for binary content types. */
1018
+ preview: string | null;
1019
+ createdAt: string;
1020
+ }
1021
+ interface HubWorkflowArtifactsResponse {
1022
+ artifacts: HubWorkflowArtifact[];
1023
+ }
1024
+ /** Raw artifact bytes from the download route, with their stored content type. */
1025
+ interface HubWorkflowArtifactDownload {
1026
+ bytes: Uint8Array;
1027
+ contentType: string;
1028
+ }
1029
+ type HubWorkflowTemplateCategory = "Code Review" | "Triage" | "Reports" | "Multi-agent";
1030
+ /** One author-time literal a gallery starter needs the user to supply. Every
1031
+ * declared parameter is required; `example` is a valid value that seeds the
1032
+ * form placeholder. */
1033
+ interface HubWorkflowTemplateParameter {
1034
+ key: string;
1035
+ label: string;
1036
+ type: "string" | "integer";
1037
+ help?: string;
1038
+ example: string;
1039
+ }
1040
+ interface HubWorkflowTemplate {
1041
+ id: string;
1042
+ name: string;
1043
+ summary: string;
1044
+ category: HubWorkflowTemplateCategory;
1045
+ icon: string;
1046
+ requiresSandbox: boolean;
1047
+ /** Providers the template references (a "uses GitHub" hint), sorted. */
1048
+ providers: string[];
1049
+ parameters: HubWorkflowTemplateParameter[];
1050
+ /** The template with parameter tokens rendered to their example values. */
1051
+ previewYaml: string;
1052
+ }
1053
+ /** A connection a definition needs, with where to connect it. */
1054
+ interface HubWorkflowConnectionRequirement {
1055
+ provider: string;
1056
+ connected: boolean;
1057
+ kind: "integration" | "github_app";
1058
+ /** Where to satisfy the requirement (App install flow for `github_app`,
1059
+ * integrations page otherwise); null when no target exists. */
1060
+ connectUrl: string | null;
1061
+ }
1062
+ /**
1063
+ * Result of instantiating a template. `created: false` is NOT an error — an
1064
+ * actionable continuation listing the connections to satisfy before retrying
1065
+ * the same call. Invalid parameters or a compile failure throw `HubSdkError`
1066
+ * (400) instead, matching the create route's contract.
1067
+ */
1068
+ type HubWorkflowTemplateInstantiateResult = {
1069
+ created: true;
1070
+ workflow: HubWorkflow;
1071
+ } | {
1072
+ created: false;
1073
+ connectionRequirements: HubWorkflowConnectionRequirement[];
1074
+ };
1075
+ type HubWorkflowDecisionStatus = "pending" | "resolved" | "expired" | "cancelled";
1076
+ type HubWorkflowDecisionOnTimeout = "wait" | "fail" | "default";
1077
+ /** How the answer arrived: a UI click, a provider-channel event (e.g. a Slack
1078
+ * reaction), or the timeout policy. */
1079
+ type HubWorkflowDecisionResolvedVia = "in_app" | "channel" | "system";
1080
+ interface HubWorkflowDecision {
1081
+ id: string;
1082
+ runId: string;
1083
+ workflowId: string;
1084
+ actionIndex: number;
1085
+ title: string;
1086
+ prompt: string | null;
1087
+ options: string[];
1088
+ status: HubWorkflowDecisionStatus;
1089
+ onTimeout: HubWorkflowDecisionOnTimeout;
1090
+ defaultChoice: string | null;
1091
+ choice: string | null;
1092
+ note: string | null;
1093
+ timedOut: boolean;
1094
+ requestedAt: string;
1095
+ expiresAt: string | null;
1096
+ resolvedAt: string | null;
1097
+ /** Null while pending, and on a row settled without an answer (expired /
1098
+ * cancelled). */
1099
+ resolvedVia: HubWorkflowDecisionResolvedVia | null;
1100
+ /** `channel` answers only: the provider whose event carried the answer and
1101
+ * the raw external actor id it came from. */
1102
+ resolvedViaProvider: string | null;
1103
+ resolvedByExternalActor: string | null;
1104
+ }
1105
+ /** A pending decision on the cross-workflow list, named by its workflow
1106
+ * (null when the workflow was deleted while the run was parked). */
1107
+ interface HubWorkflowPendingDecision extends HubWorkflowDecision {
1108
+ workflowName: string | null;
1109
+ }
1110
+ interface HubWorkflowPendingDecisionsResponse {
1111
+ decisions: HubWorkflowPendingDecision[];
1112
+ }
1113
+ /** Result of resolving a decision. `resumed` is false when the resolution
1114
+ * stuck but the run could not be resumed (already terminal/cancelled). */
1115
+ interface HubWorkflowDecisionResolveResult {
1116
+ runId: string;
1117
+ decisionId: string;
1118
+ choice: string;
1119
+ resumed: boolean;
1120
+ }
1121
+ /** A workflow's webhook delivery endpoint. `token` is the plaintext bearer —
1122
+ * revealed only at mint/rotate time (only the hash is stored). */
1123
+ interface HubWorkflowHookEndpoint {
1124
+ url: string;
1125
+ token?: string;
1126
+ }
1127
+ interface HubWorkflowHookToken {
1128
+ url: string;
1129
+ token: string;
1130
+ }
1131
+ /** One step of an agent round's execution timeline (reasoning, or a tool call
1132
+ * with args + result), as the step-page endpoint serves it. */
1133
+ type HubWorkflowAgentStep = {
1134
+ kind: "reasoning";
1135
+ text: string;
1136
+ } | {
1137
+ kind: "tool"; /** Tool name, e.g. "read", "bash". */
1138
+ tool: string;
1139
+ status: "pending" | "running" | "completed" | "error"; /** Arguments the tool was called with (pretty JSON). */
1140
+ input?: string; /** Result the tool returned on success (pretty JSON / text). */
1141
+ output?: string; /** Error message when the tool failed. */
1142
+ error?: string;
1143
+ };
1144
+ /** One page of a round's step archive. `nextCursor` is the last `stepIndex`
1145
+ * held — pass it as `after` for the next page; null on the last page. */
1146
+ interface HubWorkflowRunStepsPage {
1147
+ steps: HubWorkflowAgentStep[];
1148
+ nextCursor: number | null;
1149
+ }
649
1150
  //#endregion
650
1151
  //#region src/client.d.ts
651
1152
  type HubAuthHeaders = () => HeadersInit | Promise<HeadersInit>;
@@ -681,6 +1182,8 @@ declare class HubClient {
681
1182
  readonly apiKey?: string;
682
1183
  readonly authHeaders?: HubAuthHeaders;
683
1184
  readonly connections: HubConnectionsClient;
1185
+ readonly channels: HubChannelsClient;
1186
+ readonly eventSubscriptions: HubEventSubscriptionsClient;
684
1187
  readonly permissions: HubPermissionsClient;
685
1188
  readonly tokens: HubTokensClient;
686
1189
  readonly tools: HubToolsClient;
@@ -704,6 +1207,14 @@ declare class HubClient {
704
1207
  * `HUB_HTTP_<status>` transport error — rather than handed back as bogus SSE.
705
1208
  */
706
1209
  private stream;
1210
+ /**
1211
+ * Fetch raw (non-envelope) bytes — the artifact download route, whose 200 is
1212
+ * the artifact's own content type, not JSON. Error responses on such routes
1213
+ * are still the standard envelope, so a failure surfaces exactly like
1214
+ * {@link request}: a typed `HubSdkError` from a `{success:false}` body,
1215
+ * otherwise an `HUB_HTTP_<status>` transport error.
1216
+ */
1217
+ private requestBytes;
707
1218
  private buildHeaders;
708
1219
  }
709
1220
  interface HubTokenListOptions {
@@ -763,6 +1274,20 @@ interface HubConnectionStartOptions {
763
1274
  returnUrl?: string;
764
1275
  cli?: boolean;
765
1276
  }
1277
+ declare class HubChannelsClient {
1278
+ private readonly request;
1279
+ constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>);
1280
+ list(): Promise<HubChannelsResponse>;
1281
+ createEmail(input?: HubEmailChannelCreateRequest): Promise<HubChannelCreateResponse>;
1282
+ delete(channelId: string): Promise<HubChannelDeleteResponse>;
1283
+ }
1284
+ declare class HubEventSubscriptionsClient {
1285
+ private readonly request;
1286
+ constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>);
1287
+ list(): Promise<HubEventSubscriptionsResponse>;
1288
+ create(input: HubEventSubscriptionCreateRequest): Promise<HubEventSubscriptionCreateResponse>;
1289
+ delete(subscriptionId: string): Promise<HubEventSubscriptionDeleteResponse>;
1290
+ }
766
1291
  declare class HubConnectionsClient {
767
1292
  private readonly request;
768
1293
  constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>);
@@ -808,11 +1333,31 @@ declare class HubAuditClient {
808
1333
  declare class HubWorkflowsClient {
809
1334
  private readonly request;
810
1335
  private readonly stream?;
811
- constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>, stream?: ((path: string, init: RequestInit) => Promise<ReadableStream<Uint8Array>>) | undefined);
1336
+ private readonly download?;
1337
+ constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>, stream?: ((path: string, init: RequestInit) => Promise<ReadableStream<Uint8Array>>) | undefined, download?: ((path: string, init: RequestInit) => Promise<HubWorkflowArtifactDownload>) | undefined);
812
1338
  list(): Promise<HubWorkflow[]>;
1339
+ /**
1340
+ * Owner-wide fleet overview: one row per workflow with its run tallies over
1341
+ * a trailing window (default 7d), sorted failing-first. Answers "how are ALL
1342
+ * my workflows doing" in one call — the per-workflow insights endpoint is
1343
+ * the drill-down, not a way to build this row set client-side.
1344
+ */
1345
+ fleetInsights(opts?: {
1346
+ window?: HubWorkflowFleetWindow;
1347
+ }): Promise<HubWorkflowFleetInsights>;
813
1348
  get(id: string): Promise<HubWorkflow>;
814
1349
  create(yaml: string): Promise<HubWorkflow>;
815
- update(id: string, yaml: string): Promise<HubWorkflow>;
1350
+ /**
1351
+ * Replace the workflow's definition from YAML (recompiled server-side,
1352
+ * triggers reconciled). Every landed update appends a revision;
1353
+ * `opts.note` rides onto that revision row (e.g. "why this change"), visible
1354
+ * in {@link listRevisions}. Throws `HubSdkError`: `WORKFLOW_INVALID` when the
1355
+ * YAML doesn't compile or its connections aren't met, `CONFLICT` on a
1356
+ * concurrent modification, `NOT_FOUND` for an unknown/foreign id.
1357
+ */
1358
+ update(id: string, yaml: string, opts?: {
1359
+ note?: string;
1360
+ }): Promise<HubWorkflow>;
816
1361
  delete(id: string): Promise<void>;
817
1362
  /**
818
1363
  * Enable or disable a workflow without editing its YAML. Works even when the
@@ -864,6 +1409,21 @@ declare class HubWorkflowsClient {
864
1409
  cancel(id: string, runId: string, opts?: {
865
1410
  signal?: AbortSignal;
866
1411
  }): Promise<HubWorkflowRunCancelResult>;
1412
+ /**
1413
+ * Re-run a terminal failed/cancelled run: enqueues a FRESH run of the same
1414
+ * workflow with the SAME trigger context the original ran against, linked
1415
+ * back to it via `retriedFromRunId`. The original row is never mutated —
1416
+ * execution is at-most-once, so a retry is always a new run, never a
1417
+ * requeue. The response carries the NEW run id (and the run it retried);
1418
+ * follow it with {@link getRun}/{@link watchRun}/{@link waitForRun} like any
1419
+ * other run. Throws `HubSdkError`: `RUN_NOT_RETRYABLE` when the run is not
1420
+ * terminal-failed/cancelled (queued/running/waiting, or succeeded),
1421
+ * `WORKFLOW_DISABLED` when the workflow has since been disabled, `NOT_FOUND`
1422
+ * for an unknown/foreign run id. Pass `opts.signal` to abort a slow request.
1423
+ */
1424
+ retryRun(id: string, runId: string, opts?: {
1425
+ signal?: AbortSignal;
1426
+ }): Promise<HubWorkflowRunRetried>;
867
1427
  /**
868
1428
  * Stream a run's live progress as an async iterable of typed events. The
869
1429
  * first event is always a `snapshot` of the current persisted state; then
@@ -901,12 +1461,253 @@ declare class HubWorkflowsClient {
901
1461
  timeoutMs?: number;
902
1462
  signal?: AbortSignal;
903
1463
  }): Promise<HubWorkflowRunDetail>;
904
- validate(yaml: string): Promise<HubWorkflowValidateResponse>;
1464
+ /**
1465
+ * The workflow's definition history, newest rev first — metadata only (rev,
1466
+ * attribution, note); fetch the YAML per-rev with {@link getRevision}. Empty
1467
+ * for a pre-versioning workflow until its next update.
1468
+ */
1469
+ listRevisions(id: string): Promise<HubWorkflowRevisionMeta[]>;
1470
+ /**
1471
+ * One revision WITH its YAML (and the actions compiled alongside it), for
1472
+ * diff/inspect views. Throws `HubSdkError(REVISION_NOT_FOUND)` for an
1473
+ * unknown rev, `NOT_FOUND` for an unknown/foreign workflow.
1474
+ */
1475
+ getRevision(id: string, rev: number): Promise<HubWorkflowRevision>;
1476
+ /**
1477
+ * Restore a prior rev's YAML as a NEW head revision (history is append-only)
1478
+ * through the same compile path as {@link update}, so the restored definition
1479
+ * is re-validated against today's connections/models. Throws `HubSdkError`:
1480
+ * `REVISION_NOT_FOUND` for an unknown rev, `WORKFLOW_INVALID` when the old
1481
+ * YAML no longer compiles, `CONFLICT` on a concurrent modification.
1482
+ */
1483
+ rollback(id: string, rev: number): Promise<HubWorkflow>;
1484
+ /**
1485
+ * Deterministic health stats over the workflow's last N terminal runs
1486
+ * (default 20, max 100): per-node visits/failures/cost/duration, failure
1487
+ * clusters by normalized error signature, and distillation CANDIDATES
1488
+ * (agent.run nodes with near-static outputs — labeled with their
1489
+ * measurements, never as verdicts). No model in this path.
1490
+ */
1491
+ health(id: string, opts?: {
1492
+ runs?: number;
1493
+ }): Promise<HubWorkflowHealth>;
1494
+ /**
1495
+ * Propose a definition change — the intelligence path. SERVICE-TOKEN
1496
+ * callers only (user principals get `HubSdkError(SERVICE_TOKEN_REQUIRED)`,
1497
+ * 403). The YAML is compile-validated server-side (`WORKFLOW_INVALID` on
1498
+ * failure) and appended as a `proposed` revision; the head NEVER advances
1499
+ * until an owner approves.
1500
+ */
1501
+ propose(id: string, input: HubWorkflowProposalInput): Promise<HubWorkflowProposal>;
1502
+ /**
1503
+ * Pending (proposed) and declined (rejected) revisions, newest first, with
1504
+ * their evidence — the approval surface's input.
1505
+ */
1506
+ listProposals(id: string): Promise<HubWorkflowProposal[]>;
1507
+ /**
1508
+ * Accept a proposal: its YAML lands as a NEW applied head revision through
1509
+ * the same compile + advance path as {@link rollback} (re-validated against
1510
+ * today's connections/models), and the proposal settles to `applied`.
1511
+ * Throws `HubSdkError`: `PROPOSAL_NOT_PENDING` (409) when the rev is not a
1512
+ * pending proposal, `WORKFLOW_INVALID` when it no longer compiles,
1513
+ * `CONFLICT` on a concurrent modification.
1514
+ */
1515
+ approveProposal(id: string, rev: number): Promise<HubWorkflow>;
1516
+ /**
1517
+ * Decline a proposal: the revision settles to `rejected` (head untouched);
1518
+ * an optional reason is merged into its evidence as `rejectionReason`.
1519
+ * Throws `HubSdkError(PROPOSAL_NOT_PENDING)` (409) when the rev is not a
1520
+ * pending proposal.
1521
+ */
1522
+ rejectProposal(id: string, rev: number, opts?: {
1523
+ reason?: string;
1524
+ }): Promise<HubWorkflowProposal>;
1525
+ /**
1526
+ * Mint a fresh webhook hook token, retiring the current one immediately.
1527
+ * The plaintext token is returned exactly once (only the hash is stored).
1528
+ * Requires an active webhook trigger — otherwise `HubSdkError` with
1529
+ * `NO_WEBHOOK_TRIGGER` (409).
1530
+ */
1531
+ rotateHookToken(id: string): Promise<HubWorkflowHookToken>;
1532
+ /**
1533
+ * One agent round's execution timeline, paged. `action` is the action's
1534
+ * `${steps[N]}` position and `iteration` the round's position in that
1535
+ * action's `iterations` — both exactly as the run detail serializes them.
1536
+ * Pass the previous page's `nextCursor` as `after` for the next page; a null
1537
+ * `nextCursor` means the round is fully read.
1538
+ */
1539
+ listRunSteps(id: string, runId: string, input: {
1540
+ action: number;
1541
+ iteration: number;
1542
+ after?: number;
1543
+ limit?: number;
1544
+ }): Promise<HubWorkflowRunStepsPage>;
1545
+ /**
1546
+ * Store one artifact for a run (raw bytes) and return the opaque ref — the
1547
+ * value a script.run node returns as its step output. `contentType` defaults
1548
+ * to `application/octet-stream`; `nodeId` attributes the write to a graph
1549
+ * node (owner credential only — a run-scoped token binds its own node).
1550
+ * Throws `HubSdkError(ARTIFACT_TOO_LARGE)` past the server cap.
1551
+ */
1552
+ uploadArtifact(id: string, runId: string, input: {
1553
+ name: string;
1554
+ bytes: Uint8Array;
1555
+ contentType?: string;
1556
+ nodeId?: string;
1557
+ }): Promise<HubWorkflowArtifactRef>;
1558
+ /** Metadata for every artifact of the run (never the bytes), oldest first. */
1559
+ listArtifacts(id: string, runId: string): Promise<HubWorkflowArtifactsResponse>;
1560
+ /**
1561
+ * The artifact's raw bytes with their stored content type — the route every
1562
+ * `downloadUrl` attached to an `$artifact` ref in a run detail points at.
1563
+ */
1564
+ downloadArtifact(id: string, runId: string, artifactId: string): Promise<HubWorkflowArtifactDownload>;
1565
+ /**
1566
+ * The workflow's whole keyspace as metadata (key, version, updatedAt — never
1567
+ * values), key-ordered. Bounded by the server's per-workflow key cap.
1568
+ */
1569
+ listKv(id: string): Promise<HubWorkflowKvListResponse>;
1570
+ /** One KV entry (value + version); `HubSdkError(NOT_FOUND)` when absent. */
1571
+ getKv(id: string, key: string): Promise<HubWorkflowKvEntry>;
1572
+ /**
1573
+ * Upsert a key; returns the entry with its NEW version (increments on every
1574
+ * write). Throws `HubSdkError(KV_VALUE_TOO_LARGE)` past the 64KiB value cap
1575
+ * or `KV_KEY_LIMIT` past the per-workflow key cap.
1576
+ */
1577
+ putKv(id: string, key: string, value: unknown): Promise<HubWorkflowKvEntry>;
1578
+ /**
1579
+ * Compare-and-swap: the write lands only when the stored version still
1580
+ * equals `expectedVersion`; otherwise `HubSdkError(KV_VERSION_CONFLICT)`
1581
+ * (409) — re-read and retry. Creation is {@link putKv}'s job.
1582
+ */
1583
+ casKv(id: string, key: string, expectedVersion: number, value: unknown): Promise<HubWorkflowKvEntry>;
1584
+ /** Delete a key; idempotent — `deleted` reports whether a row was removed. */
1585
+ deleteKv(id: string, key: string): Promise<HubWorkflowKvDeleteResponse>;
1586
+ /** The curated starter gallery runnable on THIS deployment: metadata,
1587
+ * parameters, referenced providers, and a concrete `previewYaml` per card. */
1588
+ listTemplates(): Promise<HubWorkflowTemplate[]>;
1589
+ /**
1590
+ * One-click create from a gallery template: substitutes `parameters` into
1591
+ * the template server-side, then runs the SAME create path as
1592
+ * {@link create}. A `{ created: false }` result is NOT an error — an
1593
+ * actionable continuation listing the connections to satisfy before
1594
+ * retrying. Invalid parameters or a compile failure throw `HubSdkError`
1595
+ * (400); an unknown template id throws `NOT_FOUND`.
1596
+ */
1597
+ instantiateTemplate(templateId: string, parameters?: Record<string, string>): Promise<HubWorkflowTemplateInstantiateResult>;
1598
+ /**
1599
+ * The caller's open decisions across all workflows — the always-available
1600
+ * "pending approvals" surface. Each entry carries its workflow's name (null
1601
+ * when the workflow was deleted while the run was parked).
1602
+ */
1603
+ listPendingDecisions(): Promise<HubWorkflowPendingDecisionsResponse>;
1604
+ /**
1605
+ * The pending decision a run is parked on. Throws `HubSdkError(NOT_FOUND)`
1606
+ * when the run is unknown/foreign or holds no pending decision.
1607
+ */
1608
+ getRunDecision(id: string, runId: string): Promise<HubWorkflowDecision>;
1609
+ /**
1610
+ * Answer the decision a run is parked on and resume it from the next action.
1611
+ * `decisionId` is REQUIRED: a run can resolve one decision and re-park on the
1612
+ * next, so an answer addressed only by run could silently land on a question
1613
+ * the caller never saw — a mismatch throws `HubSdkError(DECISION_SUPERSEDED)`.
1614
+ * Other typed failures: `INVALID_CHOICE` (400), `DECISION_ALREADY_RESOLVED` /
1615
+ * `DECISION_EXPIRED` (409), `DECISION_NOT_FOUND` (404), `RUN_NOT_WAITING`
1616
+ * (409 — answered, timed out, or cancelled first).
1617
+ */
1618
+ resolveRunDecision(id: string, runId: string, input: {
1619
+ decisionId: string;
1620
+ choice: string;
1621
+ note?: string;
1622
+ }): Promise<HubWorkflowDecisionResolveResult>;
1623
+ /**
1624
+ * Dry-run a YAML definition against the platform compiler without saving it.
1625
+ *
1626
+ * `opts.structural` selects the CI mode: the platform skips its owner-scoped
1627
+ * connection/skill/profile resolution, so the verdict depends only on the
1628
+ * definition and the deployment's capabilities — identical no matter which
1629
+ * providers the calling account has connected. Use it in pipelines that
1630
+ * assert "this YAML is well-formed"; leave it off in an editor, where naming
1631
+ * the unconnected providers is the point.
1632
+ */
1633
+ validate(yaml: string, opts?: {
1634
+ structural?: boolean;
1635
+ }): Promise<HubWorkflowValidateResponse>;
905
1636
  schema(): Promise<HubWorkflowSchemaResponse>;
906
1637
  }
907
1638
  //#endregion
1639
+ //#region src/event-delivery.d.ts
1640
+ type HubEventSignatureFailure = "missing" | "malformed" | "stale" | "mismatch";
1641
+ type HubEventSignatureResult = {
1642
+ valid: true;
1643
+ timestamp: number;
1644
+ } | {
1645
+ valid: false;
1646
+ reason: HubEventSignatureFailure;
1647
+ };
1648
+ interface VerifyHubEventSignatureInput {
1649
+ body: string;
1650
+ signature: string | null | undefined;
1651
+ secret: string;
1652
+ toleranceSeconds?: number;
1653
+ now?: number | Date;
1654
+ }
1655
+ interface DeriveHubEventCallbackSecretInput {
1656
+ /** App-level secret stored only in the product's server environment. */
1657
+ rootSecret: string;
1658
+ /** Stable product slug, such as `relationships`. */
1659
+ productId: string;
1660
+ /** Stable Tangle owner id; user and team ids are both valid. */
1661
+ ownerId: string;
1662
+ /** Stable product-local binding id used in the callback route. */
1663
+ bindingId: string;
1664
+ }
1665
+ type HubEventRequestFailureCode = "METHOD_NOT_ALLOWED" | "UNEXPECTED_EVENT" | "UNSUPPORTED_MEDIA_TYPE" | "PAYLOAD_TOO_LARGE" | "INVALID_SIGNATURE" | "INVALID_DELIVERY" | "DELIVERY_ID_MISMATCH";
1666
+ type HubEventRequestResult = {
1667
+ ok: true;
1668
+ delivery: HubEventDelivery;
1669
+ } | {
1670
+ ok: false;
1671
+ code: HubEventRequestFailureCode;
1672
+ response: Response;
1673
+ };
1674
+ interface AuthenticateHubEventRequestInput {
1675
+ request: Request;
1676
+ /** The per-binding secret supplied when the subscription was created. */
1677
+ secret: string;
1678
+ /** Defaults to 5 MiB plus envelope overhead; hard-capped at 10 MiB. */
1679
+ maxBodyBytes?: number;
1680
+ toleranceSeconds?: number;
1681
+ now?: number | Date;
1682
+ }
1683
+ declare class HubEventDeliveryError extends Error {
1684
+ readonly code: "INVALID_JSON" | "INVALID_PAYLOAD" | "CRYPTO_UNAVAILABLE" | "INVALID_TOLERANCE" | "INVALID_CALLBACK_SECRET" | "INVALID_SECRET_SCOPE" | "INVALID_BODY_LIMIT";
1685
+ constructor(code: HubEventDeliveryError["code"], message: string);
1686
+ }
1687
+ /**
1688
+ * Derive one callback secret per product binding from a single server-held root
1689
+ * secret. Products persist only the binding id; the derived secret can be
1690
+ * reproduced for callback authentication without another secret table.
1691
+ */
1692
+ declare function deriveHubEventCallbackSecret(input: DeriveHubEventCallbackSecretInput): Promise<string>;
1693
+ /**
1694
+ * Authenticate and parse the platform's callback as one operation. The exact
1695
+ * raw body is read once with a size limit before its signature is checked.
1696
+ *
1697
+ * A successful callback can be retried. Use `delivery.runId` as the durable
1698
+ * idempotency key before starting product work.
1699
+ */
1700
+ declare function authenticateHubEventRequest(input: AuthenticateHubEventRequestInput): Promise<HubEventRequestResult>;
1701
+ /**
1702
+ * Authenticate a Hub event callback against its exact raw request body.
1703
+ * The timestamp window rejects captured-request replay, and byte-wise
1704
+ * comparison avoids secret-dependent string comparison behavior.
1705
+ */
1706
+ declare function verifyHubEventSignature(input: VerifyHubEventSignatureInput): Promise<HubEventSignatureResult>;
1707
+ declare function parseHubEventDelivery(input: string | unknown): HubEventDelivery;
1708
+ //#endregion
908
1709
  //#region src/redaction.d.ts
909
1710
  declare function redactHubValue(value: unknown): unknown;
910
1711
  //#endregion
911
- export { HUB_API_KEY_ENV_VAR, HUB_CAPABILITY_TOKEN_ENV_VAR, HUB_URL_ENV_VAR, type HubAgentIterationSpan, type HubAgentRunDetail, type HubApiKeyConnectRequest, type HubApiKeyConnectResponse, type HubApproval, type HubApprovalCapabilityToken, type HubApprovalDecisionResponse, type HubApprovalStatus, HubApprovalsClient, HubAuditClient, type HubAuditEvent, type HubAuditListRequest, type HubAuditResponse, type HubAuthHeaders, type HubCapabilityToken, HubClient, type HubClientFromEnvOptions, type HubClientOptions, type HubConnection, type HubConnectionDeleteRequest, type HubConnectionDeleteResponse, type HubConnectionHealthError, type HubConnectionHealthInfo, type HubConnectionHealthRequest, type HubConnectionHealthResponse, type HubConnectionHealthStatus, type HubConnectionStartOptions, HubConnectionsClient, type HubConnectionsResponse, type HubEnv, type HubEnvelope, type HubErrorBody, type HubErrorCode, type HubErrorEnvelope, type HubExecRequest, type HubExecResponse, HubGithubAppClient, type HubGithubAppInstallation, type HubGithubAppInstallationResponse, type HubGithubAppIsRepoInstalledRequest, type HubGithubAppIsRepoInstalledResponse, type HubGithubAppListReposResponse, type HubGithubAppMintInstallationTokenRequest, type HubGithubAppMintInstallationTokenResponse, type HubManualRunInput, type HubOAuthCallbackErrorQuery, type HubOAuthCallbackQuery, type HubOAuthCallbackResponse, type HubOAuthCallbackSuccessQuery, type HubOAuthStartRequest, type HubOAuthStartResponse, HubPermissionsClient, type HubPolicy, type HubPolicyDecision, type HubPolicyDeleteRequest, type HubPolicyDeleteResponse, type HubPolicyListRequest, type HubPolicyListResponse, type HubPolicyResponse, type HubPolicyUpdateRequest, type HubPrincipal, type HubPrincipalKind, type HubProvider, type HubProviderAuthKind, type HubProvidersResponse, HubSdkError, type HubStatusConnections, type HubStatusResponse, type HubSuccessEnvelope, type HubTokenListOptions, type HubTokenMintRequest, type HubTokenMintResponse, type HubTokenRevokeResponse, HubTokensClient, type HubTokensListResponse, type HubTool, type HubToolInvokeOptions, type HubToolRisk, type HubToolSearchOptions, type HubToolSource, type HubToolSourcesResponse, HubToolsClient, type HubToolsDescribeRequest, type HubToolsDescribeResponse, type HubToolsSearchRequest, type HubToolsSearchResponse, type HubUnimplementedErrorEnvelope, type HubWhatsappEmbeddedSignupCompleteRequest, type HubWhatsappEmbeddedSignupCompleteResponse, type HubWhatsappEmbeddedSignupStartRequest, type HubWhatsappEmbeddedSignupStartResponse, type HubWorkflow, type HubWorkflowAction, type HubWorkflowActionResult, type HubWorkflowEventFilter, type HubWorkflowRun, type HubWorkflowRunCancelResult, type HubWorkflowRunDetail, type HubWorkflowRunEnqueued, type HubWorkflowRunInputs, type HubWorkflowRunStatus, type HubWorkflowRunStreamEvent, type HubWorkflowRunSummary, type HubWorkflowRunsPage, type HubWorkflowSchemaResponse, type HubWorkflowTrigger, type HubWorkflowValidateResponse, type HubWorkflowValidationError, HubWorkflowsClient, redactHubValue, resolveHubAuth, resolveHubBaseUrl };
1712
+ export { type AuthenticateHubEventRequestInput, type DeriveHubEventCallbackSecretInput, HUB_API_KEY_ENV_VAR, HUB_CAPABILITY_TOKEN_ENV_VAR, HUB_URL_ENV_VAR, type HubAgentIterationSpan, type HubAgentRunDetail, type HubApiKeyConnectRequest, type HubApiKeyConnectResponse, type HubApproval, type HubApprovalCapabilityToken, type HubApprovalDecisionResponse, type HubApprovalStatus, HubApprovalsClient, HubAuditClient, type HubAuditEvent, type HubAuditListRequest, type HubAuditResponse, type HubAuthHeaders, type HubCapabilityToken, type HubChannel, type HubChannelCreateResponse, type HubChannelDeleteResponse, HubChannelsClient, type HubChannelsResponse, HubClient, type HubClientFromEnvOptions, type HubClientOptions, type HubConnection, type HubConnectionDeleteRequest, type HubConnectionDeleteResponse, type HubConnectionHealthError, type HubConnectionHealthInfo, type HubConnectionHealthRequest, type HubConnectionHealthResponse, type HubConnectionHealthStatus, type HubConnectionStartOptions, HubConnectionsClient, type HubConnectionsResponse, type HubEmailChannel, type HubEmailChannelCreateRequest, type HubEnv, type HubEnvelope, type HubErrorBody, type HubErrorCode, type HubErrorEnvelope, type HubEventCondition, type HubEventConditionScalar, type HubEventDelivery, HubEventDeliveryError, type HubEventRequestFailureCode, type HubEventRequestResult, type HubEventSignatureFailure, type HubEventSignatureResult, type HubEventSubscription, type HubEventSubscriptionCallback, type HubEventSubscriptionCreateRequest, type HubEventSubscriptionCreateResponse, type HubEventSubscriptionDeleteResponse, type HubEventSubscriptionFilter, type HubEventSubscriptionSource, HubEventSubscriptionsClient, type HubEventSubscriptionsResponse, type HubExecRequest, type HubExecResponse, HubGithubAppClient, type HubGithubAppInstallation, type HubGithubAppInstallationResponse, type HubGithubAppIsRepoInstalledRequest, type HubGithubAppIsRepoInstalledResponse, type HubGithubAppListReposResponse, type HubGithubAppMintInstallationTokenRequest, type HubGithubAppMintInstallationTokenResponse, type HubManualRunInput, type HubOAuthCallbackErrorQuery, type HubOAuthCallbackQuery, type HubOAuthCallbackResponse, type HubOAuthCallbackSuccessQuery, type HubOAuthStartRequest, type HubOAuthStartResponse, HubPermissionsClient, type HubPolicy, type HubPolicyDecision, type HubPolicyDeleteRequest, type HubPolicyDeleteResponse, type HubPolicyListRequest, type HubPolicyListResponse, type HubPolicyResponse, type HubPolicyUpdateRequest, type HubPrincipal, type HubPrincipalKind, type HubProvider, type HubProviderAuthKind, type HubProviderEvent, type HubProvidersResponse, HubSdkError, type HubStatusConnections, type HubStatusResponse, type HubSuccessEnvelope, type HubTokenListOptions, type HubTokenMintRequest, type HubTokenMintResponse, type HubTokenRevokeResponse, HubTokensClient, type HubTokensListResponse, type HubTool, type HubToolInvokeOptions, type HubToolRisk, type HubToolSearchOptions, type HubToolSource, type HubToolSourcesResponse, HubToolsClient, type HubToolsDescribeRequest, type HubToolsDescribeResponse, type HubToolsSearchRequest, type HubToolsSearchResponse, type HubUnimplementedErrorEnvelope, type HubWhatsappEmbeddedSignupCompleteRequest, type HubWhatsappEmbeddedSignupCompleteResponse, type HubWhatsappEmbeddedSignupStartRequest, type HubWhatsappEmbeddedSignupStartResponse, type HubWorkflow, type HubWorkflowAction, type HubWorkflowActionResult, type HubWorkflowAgentStep, type HubWorkflowArtifact, type HubWorkflowArtifactDownload, type HubWorkflowArtifactRef, type HubWorkflowArtifactsResponse, type HubWorkflowCondition, type HubWorkflowConditionOp, type HubWorkflowConditionScalar, type HubWorkflowConnectionRequirement, type HubWorkflowDecision, type HubWorkflowDecisionOnTimeout, type HubWorkflowDecisionResolveResult, type HubWorkflowDecisionResolvedVia, type HubWorkflowDecisionStatus, type HubWorkflowDistillationCandidate, type HubWorkflowEdgeVerdicts, type HubWorkflowEventFilter, type HubWorkflowFailureCluster, type HubWorkflowFleetEntry, type HubWorkflowFleetInsights, type HubWorkflowFleetWindow, type HubWorkflowGraphEdge, type HubWorkflowGraphJoinRule, type HubWorkflowGraphNode, type HubWorkflowGraphSpec, type HubWorkflowHealth, type HubWorkflowHookEndpoint, type HubWorkflowHookToken, type HubWorkflowKvDeleteResponse, type HubWorkflowKvEntry, type HubWorkflowKvEntryMeta, type HubWorkflowKvListResponse, type HubWorkflowNodeHealth, type HubWorkflowOnErrorOutcome, type HubWorkflowPendingDecision, type HubWorkflowPendingDecisionsResponse, type HubWorkflowProposal, type HubWorkflowProposalInput, type HubWorkflowRevision, type HubWorkflowRevisionMeta, type HubWorkflowRevisionSource, type HubWorkflowRevisionStatus, type HubWorkflowRun, type HubWorkflowRunCancelResult, type HubWorkflowRunDetail, type HubWorkflowRunEnqueued, type HubWorkflowRunInputs, type HubWorkflowRunRetried, type HubWorkflowRunStatus, type HubWorkflowRunStepsPage, type HubWorkflowRunStreamEvent, type HubWorkflowRunSummary, type HubWorkflowRunsPage, type HubWorkflowSchemaResponse, type HubWorkflowTemplate, type HubWorkflowTemplateCategory, type HubWorkflowTemplateInstantiateResult, type HubWorkflowTemplateParameter, type HubWorkflowTrigger, type HubWorkflowValidateResponse, type HubWorkflowValidationError, HubWorkflowsClient, type VerifyHubEventSignatureInput, authenticateHubEventRequest, deriveHubEventCallbackSecret, parseHubEventDelivery, redactHubValue, resolveHubAuth, resolveHubBaseUrl, verifyHubEventSignature };
912
1713
  //# sourceMappingURL=index.d.ts.map