@tangle-network/hub-sdk 0.27.0-develop.20260816142257.0f54562 → 0.27.0

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
@@ -1,3 +1,261 @@
1
+ //#region src/allowances.d.ts
2
+ /**
3
+ * Allowances: a developer's per-member daily allowance on a meter, and the
4
+ * paywall decision past it. The platform counts every admitted turn and reads
5
+ * each payer's dollars from the ledger; the app keeps only its checkout and
6
+ * records a paying member with {@link HubAllowancesClient.grant}.
7
+ *
8
+ * Only the meter's owner may call these, signed in or with a root API key of
9
+ * their own. A delegated or resource-bound key, such as the key a hosted end
10
+ * user's sandbox runs on, is refused.
11
+ */
12
+ type HubAllowanceTier = "free" | "paid" | "owner";
13
+ type HubAllowanceRole = "owner" | "member";
14
+ interface HubAllowancePlanInput {
15
+ free: {
16
+ turnsPerDay: number;
17
+ usdPerDay: number | null;
18
+ };
19
+ /** Null turns billing off: past the free allowance nothing lifts the limit. */
20
+ paid: {
21
+ turnsPerDay: number;
22
+ usdPerDay: number | null;
23
+ priceUsdMonthly: number;
24
+ } | null;
25
+ owner?: {
26
+ turnsPerDay: number;
27
+ };
28
+ /** Key resource type whose ledger spend counts against a payer's dollars. */
29
+ spendResourceType: string | null;
30
+ }
31
+ interface HubAllowancePlan extends HubAllowancePlanInput {
32
+ meter: string;
33
+ owner: {
34
+ turnsPerDay: number;
35
+ };
36
+ /** False while the meter runs on the default plan. */
37
+ configured: boolean;
38
+ updatedAt: string | null;
39
+ }
40
+ interface HubAllowanceSubject {
41
+ member: string;
42
+ role?: HubAllowanceRole;
43
+ /** The member whose keys pay for the turn, when that is someone else. */
44
+ payer?: string;
45
+ payerRole?: HubAllowanceRole;
46
+ }
47
+ interface HubAllowanceDecision {
48
+ /** `paywall`: paying lifts the limit. `allowance_reached`: nothing does today. */
49
+ decision: "admit" | "paywall" | "allowance_reached";
50
+ tier: HubAllowanceTier;
51
+ paywall: boolean;
52
+ turns: {
53
+ used: number;
54
+ limit: number;
55
+ };
56
+ usd: {
57
+ spent: number;
58
+ limit: number;
59
+ remaining: number;
60
+ } | null;
61
+ day: string;
62
+ resetsAt: string;
63
+ /**
64
+ * A paying payer's spend in the current paid period against what funds it:
65
+ * the plan price less Tangle's 10% fee, plus the free daily allowance for
66
+ * the period. A paid turn is refused once `remaining` is gone.
67
+ */
68
+ period?: {
69
+ spent: number;
70
+ funded: number;
71
+ remaining: number;
72
+ startsAt: string;
73
+ endsAt: string;
74
+ };
75
+ replay?: boolean;
76
+ }
77
+ interface HubAllowanceUsage {
78
+ day: string;
79
+ turns: number;
80
+ members: Array<{
81
+ member: string;
82
+ turns: number;
83
+ tier: HubAllowanceTier;
84
+ usdSpent: number | null;
85
+ }>;
86
+ lines: Array<{
87
+ line: string;
88
+ turns: number;
89
+ }>;
90
+ }
91
+ interface HubAllowanceSyncInput {
92
+ source: string;
93
+ revision: number;
94
+ expiresAt: string | null;
95
+ reference: string | null;
96
+ }
97
+ interface HubAllowanceSyncReceipt extends HubAllowanceSyncInput {
98
+ member: string;
99
+ }
100
+ interface HubAllowanceGrant {
101
+ member: string;
102
+ tier: "paid";
103
+ expiresAt: string;
104
+ reference: string | null;
105
+ }
106
+ declare class HubAllowancesClient {
107
+ private readonly request;
108
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
109
+ plan(meter: string): Promise<HubAllowancePlan>;
110
+ setPlan(meter: string, plan: HubAllowancePlanInput): Promise<HubAllowancePlan>;
111
+ /** Admit one turn or refuse it. Retrying the same `turnId` never counts twice. */
112
+ admit(meter: string, input: HubAllowanceSubject & {
113
+ turnId: string;
114
+ line?: string;
115
+ channel?: string;
116
+ }): Promise<HubAllowanceDecision>;
117
+ /** What the member's next turn would get, without counting anything. */
118
+ status(meter: string, subject: HubAllowanceSubject): Promise<HubAllowanceDecision>;
119
+ /** Move a member to the paid allowance until `expiresAt` (the paid period's end). */
120
+ grant(meter: string, member: string, input: {
121
+ expiresAt: string;
122
+ reference?: string | null;
123
+ }): Promise<HubAllowanceGrant>;
124
+ /** Synchronize a paid grant by durable product revision. Null expiry writes
125
+ * a retained revocation. A delayed older update is refused, never reactivated.
126
+ * There is no fallback to the unversioned grant endpoint on older servers. */
127
+ syncGrant(meter: string, member: string, input: HubAllowanceSyncInput): Promise<HubAllowanceSyncReceipt>;
128
+ revoke(meter: string, member: string): Promise<void>;
129
+ /** Turns per member and per line on one UTC day (default today). */
130
+ usage(meter: string, day?: string): Promise<HubAllowanceUsage>;
131
+ private path;
132
+ private memberPath;
133
+ private body;
134
+ }
135
+ //#endregion
136
+ //#region src/apps.d.ts
137
+ /** App identity and customer permissions over the existing Platform transport.
138
+ * These operations do not authorize spending or expose upstream credentials. */
139
+ interface HubApp {
140
+ id: string;
141
+ clientId: string;
142
+ oauthClientId: string | null;
143
+ name: string;
144
+ redirectUris: string[];
145
+ allowedScopes: string[];
146
+ homepageUrl: string | null;
147
+ status: "active" | "revoked";
148
+ createdAt: string;
149
+ updatedAt: string;
150
+ }
151
+ interface HubAppCreateInput {
152
+ name: string;
153
+ redirectUris: string[];
154
+ allowedScopes: string[];
155
+ homepageUrl?: string;
156
+ /** Associate an existing owned login client in the same transaction as creation. */
157
+ oauthClientId?: string;
158
+ }
159
+ interface HubAppGrant {
160
+ id: string;
161
+ appId: string;
162
+ userId: string;
163
+ connectionId: string;
164
+ scopes: string[];
165
+ status: "active" | "revoked";
166
+ createdAt: string;
167
+ updatedAt: string;
168
+ revokedAt: string | null;
169
+ /** Display metadata is additive; older deployments may omit it. */
170
+ appName?: string | null;
171
+ oauthClientId?: string | null;
172
+ providerId?: string | null;
173
+ accountDisplay?: string | null;
174
+ connectionDisplayName?: string | null;
175
+ }
176
+ interface HubAppGrantRevoked {
177
+ grantId: string;
178
+ status: "revoked";
179
+ revokedAt: string | null;
180
+ tokensRevoked: number;
181
+ }
182
+ declare class HubAppsClient {
183
+ private readonly request;
184
+ readonly grants: {
185
+ list: () => Promise<HubAppGrant[]>;
186
+ revoke: (grantId: string) => Promise<HubAppGrantRevoked>;
187
+ };
188
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
189
+ list(): Promise<HubApp[]>;
190
+ /** The secret is returned only by creation; keep it in your server vault. */
191
+ create(input: HubAppCreateInput): Promise<{
192
+ app: HubApp;
193
+ clientSecret: string;
194
+ }>;
195
+ /** Immutable association of two existing records with the same owner. */
196
+ linkOAuthClient(appId: string, clientId: string): Promise<{
197
+ appId: string;
198
+ oauthClientId: string;
199
+ }>;
200
+ revoke(appId: string): Promise<{
201
+ appId: string;
202
+ grantsRevoked: number;
203
+ tokensRevoked: number;
204
+ }>;
205
+ }
206
+ //#endregion
207
+ //#region src/inbound-webhooks.d.ts
208
+ /** Provider setup uses the existing authenticated Hub transport and vault. */
209
+ interface HubInboundWebhookCreateOptions {
210
+ /** Inkbox identity that owns all selected channels. */
211
+ identityId?: string;
212
+ mailboxId?: string;
213
+ phoneNumberId?: string;
214
+ imessage?: boolean;
215
+ /** Linq: explicit owned lines; omitted does not mean every account line. */
216
+ phoneNumbers?: string[];
217
+ /** Linq WhatsApp: explicit opaque IDs from numbers.list, not E.164 phone strings. */
218
+ phoneNumberIds?: string[];
219
+ /** Contiguity Console secret, or an existing Inkbox identity signing key. */
220
+ signingSecret?: string;
221
+ }
222
+ interface HubInboundWebhookCreateResponse {
223
+ url: string;
224
+ /** True only when the provider subscription was created by the server. */
225
+ provisioned?: boolean;
226
+ /** Self-configured legacy providers can return a newly minted secret once. */
227
+ secret?: string;
228
+ inboundAddress?: string;
229
+ requiresProviderSetup?: boolean;
230
+ }
231
+ interface HubInboundWebhookStatus {
232
+ configured: boolean;
233
+ url?: string;
234
+ /** Configuration is not evidence of a real delivered message. */
235
+ deliveryVerified: false;
236
+ requiresProviderSetup?: boolean;
237
+ }
238
+ /** Live provider readback for one explicitly selected Linq WhatsApp number. */
239
+ interface HubInboundPhoneNumberScope {
240
+ configured: true;
241
+ provisioned: true;
242
+ subscribed: true;
243
+ phoneNumberIds: string[];
244
+ }
245
+ declare class HubInboundWebhooksClient {
246
+ private readonly request;
247
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
248
+ create(connectionId: string, options?: HubInboundWebhookCreateOptions): Promise<HubInboundWebhookCreateResponse>;
249
+ get(connectionId: string): Promise<HubInboundWebhookStatus>;
250
+ /** Add one owned Linq WhatsApp number without rotating the webhook secret. */
251
+ ensurePhoneNumber(connectionId: string, phoneNumberId: string): Promise<HubInboundPhoneNumberScope>;
252
+ /** Remove event subscriptions first. This does not silently rotate a live URL. */
253
+ delete(connectionId: string): Promise<{
254
+ removed: boolean;
255
+ }>;
256
+ private path;
257
+ }
258
+ //#endregion
1
259
  //#region src/types.d.ts
2
260
  type HubPrincipalKind = "user_session" | "api_key" | "sandbox_runtime";
3
261
  interface HubSuccessEnvelope<TData> {
@@ -14,7 +272,7 @@ interface HubErrorBody {
14
272
  message: string;
15
273
  details?: unknown;
16
274
  }
17
- type HubErrorCode = "HUB_UNAUTHENTICATED" | "HUB_FORBIDDEN" | "HUB_INVALID_INPUT" | "HUB_INVALID_STATE" | "HUB_PROVIDER_MISSING" | "HUB_CONNECTION_MISSING" | "HUB_CONNECTION_REVOKED" | "HUB_TOKEN_EXPIRED" | "HUB_TOKEN_REPLAYED" | "HUB_TOKEN_REVOKED" | "HUB_TOKEN_ACTION_MISMATCH" | "HUB_POLICY_DENIED" | "HUB_APPROVAL_REQUIRED" | "HUB_EXECUTOR_FAILURE" | "HUB_PROVIDER_FAILURE" | "HUB_CONFIG_MISSING" | "HUB_CONFIG_INVALID" | "HUB_NOT_FOUND" | "HUB_NOT_IMPLEMENTED" | "HUB_CONFLICT" | "VALIDATION_ERROR" | "WORKFLOW_INVALID" | "NOT_FOUND" | "UNAUTHORIZED" | "CONFLICT" | "MISSING_RUN_INPUTS" | "WORKFLOW_DISABLED" | "PAYLOAD_TOO_LARGE" | "WORKFLOW_RUN_TIMEOUT" | `HUB_HTTP_${number}`;
275
+ type HubErrorCode = "HUB_UNAUTHENTICATED" | "HUB_FORBIDDEN" | "HUB_INVALID_INPUT" | "HUB_INVALID_STATE" | "HUB_PROVIDER_MISSING" | "HUB_CONNECTION_MISSING" | "HUB_CONNECTION_REVOKED" | "HUB_TOKEN_EXPIRED" | "HUB_TOKEN_REPLAYED" | "HUB_TOKEN_REVOKED" | "HUB_TOKEN_ACTION_MISMATCH" | "HUB_POLICY_DENIED" | "HUB_APPROVAL_REQUIRED" | "HUB_EXECUTOR_FAILURE" | "HUB_PROVIDER_FAILURE" | "HUB_PROVIDER_REJECTED" | "HUB_CONFIG_MISSING" | "HUB_CONFIG_INVALID" | "HUB_NOT_FOUND" | "HUB_NOT_IMPLEMENTED" | "HUB_CONFLICT" | "HUB_IDEMPOTENCY_CONFLICT" | "HUB_IDEMPOTENCY_IN_FLIGHT" | "VALIDATION_ERROR" | "WORKFLOW_INVALID" | "NOT_FOUND" | "UNAUTHORIZED" | "CONFLICT" | "MISSING_RUN_INPUTS" | "WORKFLOW_DISABLED" | "PAYLOAD_TOO_LARGE" | "WORKFLOW_RUN_TIMEOUT" | `HUB_HTTP_${number}`;
18
276
  interface HubStatusResponse {
19
277
  contract: unknown;
20
278
  principal: HubPrincipal;
@@ -36,6 +294,7 @@ interface HubConnection {
36
294
  providerId: string;
37
295
  displayName: string;
38
296
  accountDisplay: string | null;
297
+ providerAccountId: string | null;
39
298
  scopes: string[];
40
299
  status: "active" | "revoked" | "unhealthy" | "reconnect_required";
41
300
  health: "unknown" | "healthy" | "unhealthy" | "rate_limited";
@@ -222,6 +481,7 @@ interface HubOAuthStartRequest {
222
481
  returnUrl?: string;
223
482
  cli?: boolean;
224
483
  connectionParameters?: Record<string, string>;
484
+ requestedScopes?: readonly string[];
225
485
  }
226
486
  interface HubOAuthCallbackSuccessQuery {
227
487
  provider: string;
@@ -282,7 +542,18 @@ interface HubOAuthCallbackResponse {
282
542
  interface HubApiKeyConnectRequest {
283
543
  provider: string;
284
544
  apiKey: string;
545
+ /** Connector-owned setup values. Hub validates them before testing the key. */
546
+ metadata?: HubApiKeyConnectionMetadata;
285
547
  }
548
+ type HubApiKeyConnectionMetadata = {
549
+ propertyId: string;
550
+ currency?: string;
551
+ } | {
552
+ listings: Array<{
553
+ id: string;
554
+ pms: string;
555
+ }>;
556
+ };
286
557
  /** Result of an api-key connect: the created (or reconnected) connection.
287
558
  * Synchronous — there is no redirect leg, unlike the OAuth flow. */
288
559
  interface HubApiKeyConnectResponse {
@@ -358,9 +629,18 @@ interface HubExecRequest {
358
629
  path: string;
359
630
  input?: unknown;
360
631
  connectionId?: string;
632
+ /** Caller-minted key for this exec. The platform ledger replays the first
633
+ * call's result for a retry that carries the same key, and rejects a key
634
+ * reused for a different request. On the capability-token arm the key only
635
+ * reaches the connector for provider-native dedupe: that arm is at-most-once
636
+ * per token and replays no stored result. */
637
+ idempotencyKey?: string;
361
638
  }
362
639
  interface HubExecResponse<TResult = unknown> {
363
640
  result: TResult;
641
+ /** True when the result was replayed from a previous call with the same
642
+ * idempotency key, so the action did not run again. */
643
+ replayed?: boolean;
364
644
  }
365
645
  interface HubTokenMintRequest {
366
646
  connectionId?: string;
@@ -518,7 +798,7 @@ interface HubGithubAppInstallation {
518
798
  accountType: string | null;
519
799
  /** "all" ⇒ every repo under the account; "selected" ⇒ only repoFullNames. */
520
800
  repositorySelection: "all" | "selected";
521
- /** Lowercased "owner/repo" — empty when repositorySelection = "all". */
801
+ /** Metadata omits names; use githubApp.listRepos(id) for a live caller-safe list. */
522
802
  repoFullNames: string[];
523
803
  suspended: boolean;
524
804
  }
@@ -571,8 +851,10 @@ interface HubGithubAppSyncResponse {
571
851
  }
572
852
  interface HubGithubAppListReposResponse {
573
853
  installationId: number;
574
- /** Lowercased "owner/repo" — covers the full registry view of the install. */
854
+ /** Complete live intersection of App coverage and the caller's GitHub access. */
575
855
  repoFullNames: string[];
856
+ /** True only when both upstream listings completed; failures return an error. */
857
+ complete: true;
576
858
  }
577
859
  interface HubGithubAppIsRepoInstalledRequest {
578
860
  owner: string;
@@ -603,10 +885,14 @@ interface HubWorkflowTrigger {
603
885
  timezone: string | null;
604
886
  nextFireAt: string | null;
605
887
  lastFiredAt: string | null;
888
+ /** Schedule only: the ISO-8601 instant it stops firing; null when unbounded. */
889
+ until: string | null;
606
890
  }
607
891
  interface HubWorkflowValidationError {
608
892
  path: string;
609
893
  message: string;
894
+ /** Machine-readable reason where one is defined, e.g. `schedule_outlives_grant`. */
895
+ code?: string;
610
896
  }
611
897
  type HubWorkflowRunStatus = "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled";
612
898
  /** One agent iteration of an `agent.run`, as the single-run detail carries it
@@ -1213,6 +1499,323 @@ interface HubWorkflowRunStepsPage {
1213
1499
  nextCursor: number | null;
1214
1500
  }
1215
1501
  //#endregion
1502
+ //#region src/lines.d.ts
1503
+ interface HubLineMember {
1504
+ id: string;
1505
+ label: string | null;
1506
+ role: string;
1507
+ self?: boolean;
1508
+ consent?: "enabled" | "required";
1509
+ }
1510
+ interface HubLineContext {
1511
+ self: {
1512
+ id: string;
1513
+ label: string | null;
1514
+ role: string;
1515
+ };
1516
+ line: {
1517
+ id: string;
1518
+ label: string | null;
1519
+ transport: string;
1520
+ };
1521
+ members: HubLineMember[];
1522
+ capabilities: Record<string, {
1523
+ allowed: boolean;
1524
+ reason?: string;
1525
+ }>;
1526
+ pendingReminders: Array<{
1527
+ messageId: string;
1528
+ wakeAt?: string;
1529
+ prompt: string | null;
1530
+ }>;
1531
+ quotas: {
1532
+ selfMessagesToday: number;
1533
+ selfMessagesPerDay: number;
1534
+ selfMessagesPending: number;
1535
+ selfMessagesPendingLimit: number;
1536
+ };
1537
+ }
1538
+ interface HubLineSendInput {
1539
+ toMember: string;
1540
+ text: string;
1541
+ notBefore?: string;
1542
+ onBehalfOf?: string;
1543
+ idempotencyKey?: string;
1544
+ }
1545
+ interface HubLineOwnerSendInput {
1546
+ memberId: string;
1547
+ text: string;
1548
+ notBefore?: string;
1549
+ idempotencyKey: string;
1550
+ /** Ask a coded question; the member's reply that starts with `code` returns here. */
1551
+ reply?: HubLineReplyCodeInput;
1552
+ }
1553
+ interface HubLineReplyCodeInput {
1554
+ /** A letter, then up to seven letters or digits, with at least one digit (`F7`). Hub compares it case-insensitively. */
1555
+ code: string;
1556
+ /** 60 to 604800; the window opens when the send first becomes eligible. */
1557
+ ttlSeconds: number;
1558
+ /**
1559
+ * 1 to 20 distinct texted choices, each 1-32 of `a-z 0-9 _ -` after lower-casing.
1560
+ * An answer must then be `<code> <option>[ <note>]`; any other coded text keeps the question open.
1561
+ */
1562
+ options?: string[];
1563
+ }
1564
+ /** The coded question's state on an owner send receipt. */
1565
+ interface HubLineReplyCode {
1566
+ /** Upper case. */
1567
+ code: string;
1568
+ expiresAt: string;
1569
+ /** The first coded answer; `text` is null after content retention ends. */
1570
+ answer: {
1571
+ messageId: string;
1572
+ text: string | null;
1573
+ receivedAt: string; /** The named option, lower case; null when the send listed no options. */
1574
+ option: string | null; /** Words after the option; null when there were none or retention ended. */
1575
+ note: string | null;
1576
+ } | null;
1577
+ }
1578
+ interface HubLineReminderInput {
1579
+ text: string;
1580
+ notBefore: string;
1581
+ idempotencyKey: string;
1582
+ }
1583
+ interface HubLineApplicationDispatchCurrentInput {
1584
+ attachmentId: string;
1585
+ memberId: string;
1586
+ memberRevision: string;
1587
+ senderAddress: string;
1588
+ textSha256: string;
1589
+ binding: string;
1590
+ dispatchFence: string;
1591
+ dispatchDeadline: string;
1592
+ }
1593
+ interface HubLineMemberApplication {
1594
+ id: string;
1595
+ lineId: string;
1596
+ attachmentId: string;
1597
+ memberId: string;
1598
+ subjectId: string;
1599
+ status: "active" | "revoked";
1600
+ application: {
1601
+ url: string;
1602
+ binding: string;
1603
+ };
1604
+ /** Hub's name for the app at this callback; present on reads. */
1605
+ app?: {
1606
+ name: string;
1607
+ };
1608
+ createdAt: string;
1609
+ revokedAt: string | null;
1610
+ }
1611
+ interface HubLineMemberApplicationInput {
1612
+ expectedSelectionId: string | null;
1613
+ expectedMemberRevision: string;
1614
+ subjectId: string;
1615
+ application: {
1616
+ url: string;
1617
+ binding: string;
1618
+ secret: string;
1619
+ };
1620
+ }
1621
+ interface HubLineSendReceipt {
1622
+ message: {
1623
+ id: string;
1624
+ status: string;
1625
+ text: string | null;
1626
+ };
1627
+ eligibleAt: string | null;
1628
+ expiresAt: string;
1629
+ /** Null when the send asked no coded question; absent from Hub before reply codes. */
1630
+ reply?: HubLineReplyCode | null;
1631
+ }
1632
+ interface HubLineReminderReceipt {
1633
+ state: "queued" | "skipped";
1634
+ lineId: string;
1635
+ messageId?: string;
1636
+ sessionId?: string;
1637
+ completion?: string;
1638
+ reason?: string;
1639
+ }
1640
+ interface HubLineScheduledSendOptions {
1641
+ lineId: string;
1642
+ memberId: string;
1643
+ text: string;
1644
+ timezone: string;
1645
+ name?: string;
1646
+ notBefore?: string;
1647
+ /**
1648
+ * RFC 3339 instant the schedule stops at. Required when the calling key
1649
+ * expires, and no later than that expiry: a schedule never outlives the
1650
+ * key that wrote it.
1651
+ */
1652
+ until?: string;
1653
+ }
1654
+ interface HubLineCheckinOptions {
1655
+ lineId: string;
1656
+ member: string;
1657
+ timezone: string;
1658
+ prompt: string;
1659
+ name?: string;
1660
+ /** RFC 3339 instant the schedule stops at; see {@link HubLineScheduledSendOptions.until}. */
1661
+ until?: string;
1662
+ }
1663
+ /** Line calls share HubClient authentication and envelope handling. */
1664
+ declare class HubLinesClient {
1665
+ private readonly request;
1666
+ private readonly createWorkflow;
1667
+ private readonly requestApplicationDispatchCurrent?;
1668
+ readonly members: {
1669
+ list: (lineId: string) => Promise<HubLineMember[]>;
1670
+ };
1671
+ readonly memberApplications: {
1672
+ get: (lineId: string, memberId: string) => Promise<{
1673
+ memberRevision: string;
1674
+ selection: HubLineMemberApplication | null;
1675
+ }>;
1676
+ select: (lineId: string, memberId: string, input: HubLineMemberApplicationInput) => Promise<HubLineMemberApplication>;
1677
+ clear: (lineId: string, memberId: string, input: {
1678
+ expectedSelectionId: string;
1679
+ expectedMemberRevision: string;
1680
+ }) => Promise<void>;
1681
+ };
1682
+ readonly checkins: {
1683
+ schedule: (cron: string, options: HubLineCheckinOptions) => Promise<HubWorkflow>;
1684
+ };
1685
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>, createWorkflow: (yaml: string) => Promise<HubWorkflow>, requestApplicationDispatchCurrent?: ((path: string, init: RequestInit, callbackBearer: string) => Promise<{
1686
+ current: boolean;
1687
+ }>) | undefined);
1688
+ scheduleSend(cron: string, options: HubLineScheduledSendOptions): Promise<HubWorkflow>;
1689
+ context(): Promise<HubLineContext>;
1690
+ send(lineId: string, input: HubLineSendInput | HubLineOwnerSendInput): Promise<HubLineSendReceipt>;
1691
+ /** Read an owner send's receipt, including its coded answer. Queued is not delivered. */
1692
+ sentMessage(lineId: string, messageId: string): Promise<HubLineSendReceipt>;
1693
+ remind(lineId: string, input: HubLineReminderInput): Promise<HubLineReminderReceipt>;
1694
+ applicationDispatchCurrent(lineId: string, messageId: string, input: HubLineApplicationDispatchCurrentInput, callbackBearer: string): Promise<boolean>;
1695
+ }
1696
+ //#endregion
1697
+ //#region src/managed-numbers.d.ts
1698
+ interface HubNumberReadiness {
1699
+ configured: boolean;
1700
+ provider: "inkbox";
1701
+ transports: Array<"sms" | "imessage">;
1702
+ billing: "prepaid_activation";
1703
+ automaticRentalBilling: false;
1704
+ deliveryVerified: false;
1705
+ }
1706
+ interface HubNumberQuote {
1707
+ transport: "sms" | "imessage";
1708
+ activationCents: number;
1709
+ currency: "usd";
1710
+ termsVersion: string;
1711
+ terms: string;
1712
+ expiresAt: number;
1713
+ /** The binding the quote was issued for. Absent from older servers. */
1714
+ clientReference?: string;
1715
+ /** Opaque. Pass it back to `create`; never decode it. */
1716
+ token: string;
1717
+ }
1718
+ /** One page of the owner's orders, newest first. */
1719
+ interface HubNumberOrderPage {
1720
+ orders: HubNumberOrder[];
1721
+ /** Present while more orders exist. Older servers omit it and return one
1722
+ * bounded page, so an absent cursor never proves an order does not exist. */
1723
+ nextCursor?: string | null;
1724
+ }
1725
+ interface HubNumberListQuery {
1726
+ /** Only orders requested for this binding, including closed ones. */
1727
+ clientReference?: string;
1728
+ cursor?: string;
1729
+ /** 1 to 100; the server default is 100. */
1730
+ limit?: number;
1731
+ }
1732
+ /** An operator's terminal decision on an order stuck in `needs_review`.
1733
+ * Read-only for a creator: the resolution is made through the platform's
1734
+ * admin surface, never through this client. */
1735
+ interface HubNumberResolution {
1736
+ action: "release" | "settle" | "abandon";
1737
+ operator: string;
1738
+ reason: string;
1739
+ at: number;
1740
+ /** Present while the operator's action is still running. The decision is
1741
+ * not final and the order can still return to review. */
1742
+ pending?: true;
1743
+ /** Present when a `settle` handed a live, unfinished order back to
1744
+ * provisioning, so the order is working again rather than closed. */
1745
+ requeued?: true;
1746
+ }
1747
+ interface HubNumberOrder {
1748
+ id: string;
1749
+ clientReference: string;
1750
+ transport: "sms" | "imessage";
1751
+ status: "pending" | "provider_pending" | "needs_review" | "ready_for_setup" | "cancelled";
1752
+ phase: "identity" | "number" | "credential" | "connection" | "complete";
1753
+ address: string | null;
1754
+ connectionId: string | null;
1755
+ identityId: string | null;
1756
+ providerNumberId: string | null;
1757
+ billingStatus: "unreserved" | "reserved" | "settled" | "released";
1758
+ cancellation: "none" | "requested" | "needs_review" | "released" | "abandoned";
1759
+ errorCode: string | null;
1760
+ nextAttemptAt: number | null;
1761
+ resolution: HubNumberResolution | null;
1762
+ deliveryVerified: false;
1763
+ activationCents: number;
1764
+ currency: "usd";
1765
+ terms: string;
1766
+ }
1767
+ /** Administrative number operations through Hub's authenticated transport.
1768
+ * A mutation is one attempt; an uncertain create reuses its quote and reference. */
1769
+ declare class HubManagedNumbersClient {
1770
+ private readonly request;
1771
+ constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
1772
+ readiness(): Promise<HubNumberReadiness>;
1773
+ /** One page of orders. Scope by `clientReference` to ask about one binding,
1774
+ * and follow `nextCursor` for the rest; a page is never ownership evidence. */
1775
+ list(query?: HubNumberListQuery): Promise<HubNumberOrderPage>;
1776
+ get(id: string): Promise<{
1777
+ order: HubNumberOrder;
1778
+ }>;
1779
+ quote(input: {
1780
+ transport: "sms" | "imessage";
1781
+ clientReference: string;
1782
+ }): Promise<{
1783
+ quote: HubNumberQuote;
1784
+ }>;
1785
+ /** `clientReference` and `transport`, when given, must match the signed
1786
+ * quote or Hub refuses the purchase with a conflict. */
1787
+ create(input: {
1788
+ quoteToken: string;
1789
+ consent: true;
1790
+ state?: string;
1791
+ clientReference?: string;
1792
+ transport?: "sms" | "imessage";
1793
+ }): Promise<{
1794
+ order: HubNumberOrder;
1795
+ }>;
1796
+ /** Fences references so no order can take them again. Call it as the last
1797
+ * step before retiring the resource they name: a purchase that races the
1798
+ * retirement is then refused (`409 number_reference_fenced`) instead of
1799
+ * binding a line to a resource that is gone. Refused with
1800
+ * `409 number_reference_held` while a live order holds one of them; cancel
1801
+ * it first. A cancelled order no longer holds its reference, so the fence
1802
+ * succeeds as soon as `cancel` returns, whether or not its release is still
1803
+ * pending. Repeating a fence is harmless. */
1804
+ fence(input: {
1805
+ clientReferences: string[];
1806
+ }): Promise<{
1807
+ clientReferences: string[];
1808
+ }>;
1809
+ advance(id: string): Promise<{
1810
+ order: HubNumberOrder;
1811
+ }>;
1812
+ cancel(id: string): Promise<{
1813
+ order: HubNumberOrder;
1814
+ }>;
1815
+ private path;
1816
+ private post;
1817
+ }
1818
+ //#endregion
1216
1819
  //#region src/client.d.ts
1217
1820
  type HubAuthHeaders = () => HeadersInit | Promise<HeadersInit>;
1218
1821
  interface HubClientOptions {
@@ -1241,13 +1844,24 @@ interface HubClientFromEnvOptions {
1241
1844
  }
1242
1845
  declare function resolveHubBaseUrl(env?: HubEnv): string;
1243
1846
  declare function resolveHubAuth(env?: HubEnv): string;
1244
- declare class HubClient {
1847
+ declare class HubTransport {
1245
1848
  readonly baseUrl: string;
1246
1849
  readonly fetch: typeof fetch;
1247
1850
  readonly apiKey?: string;
1248
1851
  readonly authHeaders?: HubAuthHeaders;
1852
+ constructor(options: HubClientOptions);
1853
+ protected request<TData>(path: string, init: RequestInit, options?: {
1854
+ auth?: "client" | "caller";
1855
+ validateData?: (data: unknown) => data is TData;
1856
+ }): Promise<TData>;
1857
+ protected buildHeaders(headers: HeadersInit | undefined, callerAuth?: boolean): Promise<Headers>;
1858
+ }
1859
+ declare class HubClient extends HubTransport {
1860
+ readonly allowances: HubAllowancesClient;
1861
+ readonly apps: HubAppsClient;
1249
1862
  readonly connections: HubConnectionsClient;
1250
1863
  readonly channels: HubChannelsClient;
1864
+ readonly numbers: HubManagedNumbersClient;
1251
1865
  readonly eventSubscriptions: HubEventSubscriptionsClient;
1252
1866
  readonly permissions: HubPermissionsClient;
1253
1867
  readonly tokens: HubTokensClient;
@@ -1256,10 +1870,10 @@ declare class HubClient {
1256
1870
  readonly audit: HubAuditClient;
1257
1871
  readonly githubApp: HubGithubAppClient;
1258
1872
  readonly workflows: HubWorkflowsClient;
1873
+ readonly lines: HubLinesClient;
1259
1874
  constructor(options: HubClientOptions);
1260
1875
  static fromEnv(options?: HubClientFromEnvOptions): HubClient;
1261
1876
  status(): Promise<HubStatusResponse>;
1262
- private request;
1263
1877
  /**
1264
1878
  * Open a streaming (Server-Sent Events) response and return its raw body.
1265
1879
  * Shares auth-header building + `fetch` with {@link request}, but does NOT
@@ -1280,7 +1894,6 @@ declare class HubClient {
1280
1894
  * otherwise an `HUB_HTTP_<status>` transport error.
1281
1895
  */
1282
1896
  private requestBytes;
1283
- private buildHeaders;
1284
1897
  }
1285
1898
  interface HubTokenListOptions {
1286
1899
  includeExpired?: boolean;
@@ -1325,6 +1938,13 @@ interface HubToolSearchOptions {
1325
1938
  interface HubToolInvokeOptions {
1326
1939
  connectionId?: string;
1327
1940
  approve?: boolean;
1941
+ /** Caller-minted key for this invoke. On the direct exec arm the platform
1942
+ * ledger replays the first call's result for a retry that carries the same
1943
+ * key, and refuses a key bound to a different request. The approval and
1944
+ * capability-token retries re-send the key, and the connector receives it
1945
+ * for provider-native dedupe. Capability-token execution stays at-most-once
1946
+ * per token: it refuses a replay instead of replaying a stored result. */
1947
+ idempotencyKey?: string;
1328
1948
  }
1329
1949
  declare class HubToolsClient {
1330
1950
  private readonly request;
@@ -1332,13 +1952,20 @@ declare class HubToolsClient {
1332
1952
  search(query: string, options?: HubToolSearchOptions): Promise<HubToolsSearchResponse>;
1333
1953
  sources(): Promise<HubToolSourcesResponse>;
1334
1954
  describe(path: string): Promise<HubToolsDescribeResponse>;
1335
- invoke<TResult = unknown>(path: string, input: unknown, options?: HubToolInvokeOptions): Promise<HubExecResponse<TResult>>;
1955
+ /**
1956
+ * Run one hub tool. `raw` is the tool input: the SDK forwards it verbatim as
1957
+ * the request body's `input`, and the server validates it against the tool's
1958
+ * own schema, so the client never gives it a shape.
1959
+ */
1960
+ invoke<TResult = unknown>(path: string, raw: unknown, options?: HubToolInvokeOptions): Promise<HubExecResponse<TResult>>;
1336
1961
  private buildExecInit;
1337
1962
  }
1338
1963
  interface HubConnectionStartOptions {
1339
1964
  returnUrl?: string;
1340
1965
  cli?: boolean;
1341
1966
  connectionParameters?: Record<string, string>;
1967
+ /** GitHub accepts the exact read:user, repo, read:org set. */
1968
+ requestedScopes?: readonly string[];
1342
1969
  }
1343
1970
  declare class HubChannelsClient {
1344
1971
  private readonly request;
@@ -1356,6 +1983,7 @@ declare class HubEventSubscriptionsClient {
1356
1983
  }
1357
1984
  declare class HubConnectionsClient {
1358
1985
  private readonly request;
1986
+ readonly inboundWebhook: HubInboundWebhooksClient;
1359
1987
  constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>);
1360
1988
  list(): Promise<HubConnectionsResponse>;
1361
1989
  /** Connector catalog: every provider the hub can expose, each flagged with
@@ -1368,8 +1996,9 @@ declare class HubConnectionsClient {
1368
1996
  /** Connect a non-OAuth (api-key) connector by submitting the user's key.
1369
1997
  * The server validates the key with a live probe before persisting and
1370
1998
  * returns the created (or reconnected) connection — there is no redirect,
1371
- * unlike `start`. */
1372
- connectApiKey(provider: string, apiKey: string): Promise<HubApiKeyConnectResponse>;
1999
+ * unlike `start`. Cloudbeds requires propertyId metadata and PriceLabs
2000
+ * requires listing ID/PMS pairs; other providers have no metadata. */
2001
+ connectApiKey(provider: string, apiKey: string, metadata?: HubApiKeyConnectRequest["metadata"]): Promise<HubApiKeyConnectResponse>;
1373
2002
  revoke(connectionId: string): Promise<HubConnectionDeleteResponse>;
1374
2003
  health(connectionId: string): Promise<HubConnectionHealthResponse>;
1375
2004
  }
@@ -1651,15 +2280,18 @@ declare class HubWorkflowsClient {
1651
2280
  /**
1652
2281
  * Upsert a key; returns the entry with its NEW version (increments on every
1653
2282
  * write). Throws `HubSdkError(KV_VALUE_TOO_LARGE)` past the 64KiB value cap
1654
- * or `KV_KEY_LIMIT` past the per-workflow key cap.
2283
+ * or `KV_KEY_LIMIT` past the per-workflow key cap. `raw` is the caller's
2284
+ * value, stored and read back verbatim, so the client never gives it a shape.
1655
2285
  */
1656
- putKv(id: string, key: string, value: unknown): Promise<HubWorkflowKvEntry>;
2286
+ putKv(id: string, key: string, raw: unknown): Promise<HubWorkflowKvEntry>;
1657
2287
  /**
1658
2288
  * Compare-and-swap: the write lands only when the stored version still
1659
2289
  * equals `expectedVersion`; otherwise `HubSdkError(KV_VERSION_CONFLICT)`
1660
- * (409) — re-read and retry. Creation is {@link putKv}'s job.
2290
+ * (409) — re-read and retry. Creation is {@link putKv}'s job. `raw` is the
2291
+ * caller's value, stored and read back verbatim, so the client never gives it
2292
+ * a shape.
1661
2293
  */
1662
- casKv(id: string, key: string, expectedVersion: number, value: unknown): Promise<HubWorkflowKvEntry>;
2294
+ casKv(id: string, key: string, expectedVersion: number, raw: unknown): Promise<HubWorkflowKvEntry>;
1663
2295
  /** Delete a key; idempotent — `deleted` reports whether a row was removed. */
1664
2296
  deleteKv(id: string, key: string): Promise<HubWorkflowKvDeleteResponse>;
1665
2297
  /** The curated starter gallery runnable on THIS deployment: metadata,
@@ -1785,8 +2417,157 @@ declare function authenticateHubEventRequest(input: AuthenticateHubEventRequestI
1785
2417
  declare function verifyHubEventSignature(input: VerifyHubEventSignatureInput): Promise<HubEventSignatureResult>;
1786
2418
  declare function parseHubEventDelivery(input: string | unknown): HubEventDelivery;
1787
2419
  //#endregion
2420
+ //#region src/line-grants.d.ts
2421
+ interface HubLineGrantBinding {
2422
+ workspaceId: string;
2423
+ workspaceAgentId: string;
2424
+ }
2425
+ interface HubLineGrant {
2426
+ id: string;
2427
+ lineId: string;
2428
+ connectionId: string;
2429
+ workspaceId: string;
2430
+ workspaceAgentId: string;
2431
+ agentProfileVersion: string;
2432
+ backendSha256: string;
2433
+ attachmentId: string | null;
2434
+ intakeMode: "guests" | "owner_only";
2435
+ /** "application" grants select the app's callback for the owner member instead of attaching. */
2436
+ execution: "backend" | "application";
2437
+ applicationOrigin: string | null;
2438
+ priorAttachmentId: string | null;
2439
+ priorAttachmentActive: boolean;
2440
+ monthlyBudgetUsd: number;
2441
+ monthlySpentUsd: number;
2442
+ }
2443
+ interface HubLineGrantLine {
2444
+ id: string;
2445
+ connectionId: string;
2446
+ transport: "sms" | "imessage";
2447
+ status: string;
2448
+ address: string | null;
2449
+ attachment: {
2450
+ id: string;
2451
+ sandboxId: string;
2452
+ status: string;
2453
+ } | null;
2454
+ }
2455
+ interface HubLineGrantAttachInput {
2456
+ workspaceAgentId: string;
2457
+ agentProfileVersion: string;
2458
+ renewalCode?: string;
2459
+ respond: {
2460
+ kind: "agent";
2461
+ backend: Record<string, unknown>;
2462
+ };
2463
+ }
2464
+ interface HubLineGrantAttachment {
2465
+ id: string;
2466
+ sandboxId: string;
2467
+ status: string;
2468
+ members?: Array<{
2469
+ id: string;
2470
+ role: string;
2471
+ }>;
2472
+ }
2473
+ interface HubLineGrantThread {
2474
+ id: string;
2475
+ lineId: string;
2476
+ attachmentId: string;
2477
+ }
2478
+ interface HubLineGrantMessage {
2479
+ id: string;
2480
+ threadId: string;
2481
+ direction: string;
2482
+ text: string | null;
2483
+ }
2484
+ /** The consented owner member on the owner's current attachment. */
2485
+ interface HubLineGrantMemberApplication {
2486
+ lineId: string;
2487
+ attachmentId: string;
2488
+ memberId: string;
2489
+ subjectId: string;
2490
+ /** Pass back unchanged as `expectedMemberRevision`. */
2491
+ memberRevision: string;
2492
+ /** False until the owner has texted the line and Hub recorded consent. */
2493
+ eligible: boolean;
2494
+ /** Hub-derived; every callback for this grant carries it. */
2495
+ binding: string;
2496
+ selection: {
2497
+ id: string; /** True when this grant's callback is the selected application. */
2498
+ own: boolean;
2499
+ /**
2500
+ * Hub's name for the app that answers the owner's texts, shown to the
2501
+ * owner in every app they consented on this line: a registered app's
2502
+ * name, or "Another app" when Hub has none. Absent before Platform named
2503
+ * selection holders.
2504
+ */
2505
+ app?: {
2506
+ name: string;
2507
+ }; /** When the current app started answering. */
2508
+ selectedAt?: string; /** This app's own callback; never returned for another app. */
2509
+ url?: string;
2510
+ createdAt?: string;
2511
+ } | null;
2512
+ }
2513
+ interface HubLineGrantSelectApplicationInput {
2514
+ /** The current selection exactly as read. */
2515
+ expectedSelectionId: string | null;
2516
+ /**
2517
+ * Set only when the owner chose to move their texts here from the app shown
2518
+ * in `selection.app`: that selection's id, also passed as
2519
+ * `expectedSelectionId`. Without it Hub never replaces another app.
2520
+ */
2521
+ replaceSelectionId?: string;
2522
+ expectedMemberRevision: string;
2523
+ /** HTTPS callback on the owner-approved application origin. */
2524
+ url: string;
2525
+ /** Bearer Hub sends to the callback; 32-512 printable ASCII characters. */
2526
+ secret: string;
2527
+ }
2528
+ interface HubLineGrantApplicationSelection {
2529
+ id: string;
2530
+ lineId: string;
2531
+ attachmentId: string;
2532
+ memberId: string;
2533
+ subjectId: string;
2534
+ status: string;
2535
+ application: {
2536
+ url: string;
2537
+ binding: string;
2538
+ };
2539
+ createdAt: string;
2540
+ revokedAt: string | null;
2541
+ }
2542
+ /** Every call uses HubTransport's authHeaders, so one-use app broker tokens can be minted per request. */
2543
+ declare class HubLineGrantsClient extends HubTransport {
2544
+ current(binding: HubLineGrantBinding): Promise<HubLineGrant>;
2545
+ line(binding: HubLineGrantBinding): Promise<HubLineGrantLine>;
2546
+ attach(binding: HubLineGrantBinding, input: HubLineGrantAttachInput): Promise<HubLineGrantAttachment>;
2547
+ detach(binding: HubLineGrantBinding): Promise<{
2548
+ detached: boolean;
2549
+ }>;
2550
+ threads(binding: HubLineGrantBinding): Promise<HubLineGrantThread[]>;
2551
+ messages(binding: HubLineGrantBinding, threadId: string): Promise<HubLineGrantMessage[]>;
2552
+ memberApplication(binding: HubLineGrantBinding): Promise<HubLineGrantMemberApplication>;
2553
+ /**
2554
+ * Route the owner's texts to this app's callback; the incumbent attachment
2555
+ * stays. `replaceSelectionId` moves them from another app on the owner's
2556
+ * explicit choice.
2557
+ */
2558
+ selectApplication(binding: HubLineGrantBinding, input: HubLineGrantSelectApplicationInput): Promise<HubLineGrantApplicationSelection>;
2559
+ /** Return the owner's texts to the incumbent attachment. */
2560
+ clearApplication(binding: HubLineGrantBinding, input: {
2561
+ expectedSelectionId: string;
2562
+ expectedMemberRevision: string;
2563
+ }): Promise<void>;
2564
+ revoke(binding: HubLineGrantBinding): Promise<{
2565
+ revoked: boolean;
2566
+ }>;
2567
+ }
2568
+ //#endregion
1788
2569
  //#region src/redaction.d.ts
1789
2570
  declare function redactHubValue(value: unknown): unknown;
1790
2571
  //#endregion
1791
- 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 HubGithubAppDisconnectResponse, type HubGithubAppInstallation, type HubGithubAppInstallationResponse, type HubGithubAppIsRepoInstalledRequest, type HubGithubAppIsRepoInstalledResponse, type HubGithubAppListInstallationsResponse, type HubGithubAppListReposResponse, type HubGithubAppManagedInstallation, type HubGithubAppMintInstallationTokenRequest, type HubGithubAppMintInstallationTokenResponse, type HubGithubAppSyncResponse, type HubGithubAppSyncedInstallation, type HubManualRunInput, type HubOAuthCallbackErrorQuery, type HubOAuthCallbackQuery, type HubOAuthCallbackResponse, type HubOAuthCallbackSuccessQuery, type HubOAuthConnectionParameter, 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 };
2572
+ export { type AuthenticateHubEventRequestInput, type DeriveHubEventCallbackSecretInput, HUB_API_KEY_ENV_VAR, HUB_CAPABILITY_TOKEN_ENV_VAR, HUB_URL_ENV_VAR, type HubAgentIterationSpan, type HubAgentRunDetail, type HubAllowanceDecision, type HubAllowanceGrant, type HubAllowancePlan, type HubAllowancePlanInput, type HubAllowanceRole, type HubAllowanceSubject, type HubAllowanceSyncInput, type HubAllowanceSyncReceipt, type HubAllowanceTier, type HubAllowanceUsage, HubAllowancesClient, type HubApiKeyConnectRequest, type HubApiKeyConnectResponse, type HubApiKeyConnectionMetadata, type HubApp, type HubAppCreateInput, type HubAppGrant, type HubAppGrantRevoked, type HubApproval, type HubApprovalCapabilityToken, type HubApprovalDecisionResponse, type HubApprovalStatus, HubApprovalsClient, HubAppsClient, 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 HubGithubAppDisconnectResponse, type HubGithubAppInstallation, type HubGithubAppInstallationResponse, type HubGithubAppIsRepoInstalledRequest, type HubGithubAppIsRepoInstalledResponse, type HubGithubAppListInstallationsResponse, type HubGithubAppListReposResponse, type HubGithubAppManagedInstallation, type HubGithubAppMintInstallationTokenRequest, type HubGithubAppMintInstallationTokenResponse, type HubGithubAppSyncResponse, type HubGithubAppSyncedInstallation, type HubInboundPhoneNumberScope, type HubInboundWebhookCreateOptions, type HubInboundWebhookCreateResponse, type HubInboundWebhookStatus, HubInboundWebhooksClient, type HubLineApplicationDispatchCurrentInput, type HubLineCheckinOptions, type HubLineContext, type HubLineGrant, type HubLineGrantApplicationSelection, type HubLineGrantAttachInput, type HubLineGrantAttachment, type HubLineGrantBinding, type HubLineGrantLine, type HubLineGrantMemberApplication, type HubLineGrantMessage, type HubLineGrantSelectApplicationInput, type HubLineGrantThread, HubLineGrantsClient, type HubLineMember, type HubLineMemberApplication, type HubLineMemberApplicationInput, type HubLineOwnerSendInput, type HubLineReminderInput, type HubLineReminderReceipt, type HubLineReplyCode, type HubLineReplyCodeInput, type HubLineScheduledSendOptions, type HubLineSendInput, type HubLineSendReceipt, HubLinesClient, HubManagedNumbersClient, type HubManualRunInput, type HubNumberListQuery, type HubNumberOrder, type HubNumberOrderPage, type HubNumberQuote, type HubNumberReadiness, type HubNumberResolution, type HubOAuthCallbackErrorQuery, type HubOAuthCallbackQuery, type HubOAuthCallbackResponse, type HubOAuthCallbackSuccessQuery, type HubOAuthConnectionParameter, 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 };
1792
2573
  //# sourceMappingURL=index.d.ts.map