@tangle-network/hub-sdk 0.60.78-develop.20261017134105.a6b32a2 → 0.60.78-develop.20261021225232.c7da8cb
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/README.md +3 -2
- package/dist/index.d.ts +1000 -948
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +389 -368
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -240,141 +240,561 @@ declare class HubAppsClient {
|
|
|
240
240
|
}): Promise<HubAppComplianceState>;
|
|
241
241
|
}
|
|
242
242
|
//#endregion
|
|
243
|
-
//#region src/types.d.ts
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
243
|
+
//#region src/tool-types.d.ts
|
|
244
|
+
interface HubToolSource {
|
|
245
|
+
sourceId: string;
|
|
246
|
+
providerId: string;
|
|
247
|
+
displayName: string;
|
|
248
|
+
toolCount: number;
|
|
249
|
+
connectionStatus: "connected" | "missing" | "unknown";
|
|
250
|
+
health: "healthy" | "unhealthy" | "rate_limited" | "unknown";
|
|
251
|
+
configured: boolean;
|
|
248
252
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
253
|
+
/** Per-tool catalog risk class. The first three mirror the platform's
|
|
254
|
+
* `HubActionRisk`; `unknown` is surfaced honestly for tools the catalog can't
|
|
255
|
+
* classify (substrate connectors). */
|
|
256
|
+
type HubToolRisk = "read" | "write" | "destructive" | "unknown";
|
|
257
|
+
interface HubTool {
|
|
258
|
+
path: string;
|
|
259
|
+
providerId?: string;
|
|
260
|
+
title?: string;
|
|
261
|
+
description?: string;
|
|
262
|
+
inputSchema?: unknown;
|
|
263
|
+
outputSchema?: unknown;
|
|
264
|
+
connectionRequired?: boolean;
|
|
265
|
+
connectionStatus?: "connected" | "missing" | "unknown";
|
|
266
|
+
requiredConnectionProviderId?: string;
|
|
267
|
+
policyState?: "allow" | "ask" | "deny" | "unknown";
|
|
268
|
+
risk?: HubToolRisk;
|
|
252
269
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
code: HubErrorCode;
|
|
256
|
-
message: string;
|
|
257
|
-
details?: unknown;
|
|
270
|
+
interface HubToolSourcesResponse {
|
|
271
|
+
sources: HubToolSource[];
|
|
258
272
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
principal: HubPrincipal;
|
|
263
|
-
connections: HubStatusConnections;
|
|
273
|
+
interface HubToolsSearchRequest {
|
|
274
|
+
query: string;
|
|
275
|
+
provider?: string;
|
|
264
276
|
}
|
|
265
|
-
interface
|
|
266
|
-
|
|
267
|
-
userId: string;
|
|
268
|
-
apiKeyId?: string;
|
|
269
|
-
sandboxId?: string;
|
|
270
|
-
requestId?: string;
|
|
277
|
+
interface HubToolsSearchResponse {
|
|
278
|
+
tools: HubTool[];
|
|
271
279
|
}
|
|
272
|
-
interface
|
|
273
|
-
|
|
274
|
-
unhealthyProviderCount: number;
|
|
280
|
+
interface HubToolsDescribeRequest {
|
|
281
|
+
path: string;
|
|
275
282
|
}
|
|
276
|
-
interface
|
|
277
|
-
|
|
278
|
-
providerId: string;
|
|
279
|
-
displayName: string;
|
|
280
|
-
accountDisplay: string | null;
|
|
281
|
-
providerAccountId: string | null;
|
|
282
|
-
scopes: string[];
|
|
283
|
-
status: "active" | "revoked" | "unhealthy" | "reconnect_required";
|
|
284
|
-
health: "unknown" | "healthy" | "unhealthy" | "rate_limited";
|
|
285
|
-
createdAt: string;
|
|
286
|
-
updatedAt: string;
|
|
287
|
-
lastUsedAt: string | null;
|
|
283
|
+
interface HubToolsDescribeResponse {
|
|
284
|
+
tool: HubTool;
|
|
288
285
|
}
|
|
289
|
-
interface
|
|
290
|
-
|
|
286
|
+
interface HubExecRequest {
|
|
287
|
+
path: string;
|
|
288
|
+
input?: unknown;
|
|
289
|
+
connectionId?: string;
|
|
290
|
+
/** Caller-minted key for this exec. The platform ledger replays the first
|
|
291
|
+
* call's result for a retry that carries the same key, and rejects a key
|
|
292
|
+
* reused for a different request. On the capability-token arm the key only
|
|
293
|
+
* reaches the connector for provider-native dedupe: that arm is at-most-once
|
|
294
|
+
* per token and replays no stored result. */
|
|
295
|
+
idempotencyKey?: string;
|
|
291
296
|
}
|
|
292
|
-
interface
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
clientReference: string | null;
|
|
298
|
-
label: string | null;
|
|
299
|
-
address: string;
|
|
300
|
-
status: "active";
|
|
301
|
-
createdAt: string;
|
|
302
|
-
updatedAt: string;
|
|
297
|
+
interface HubExecResponse<TResult = unknown> {
|
|
298
|
+
result: TResult;
|
|
299
|
+
/** True when the result was replayed from a previous call with the same
|
|
300
|
+
* idempotency key, so the action did not run again. */
|
|
301
|
+
replayed?: boolean;
|
|
303
302
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/broker.d.ts
|
|
305
|
+
interface HubAppBrokerOptions {
|
|
306
|
+
baseUrl: string;
|
|
307
|
+
clientId: string;
|
|
308
|
+
clientSecret: string;
|
|
309
|
+
fetch?: typeof fetch;
|
|
307
310
|
}
|
|
308
|
-
interface
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
*/
|
|
313
|
-
clientReference?: string;
|
|
314
|
-
label?: string;
|
|
311
|
+
interface HubAppBrokerToken {
|
|
312
|
+
accessToken: string;
|
|
313
|
+
expiresIn: number;
|
|
314
|
+
scopes: string[];
|
|
315
315
|
}
|
|
316
|
-
interface
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
created: boolean;
|
|
316
|
+
interface HubAppBrokerExchange extends HubAppBrokerToken {
|
|
317
|
+
grantId: string;
|
|
318
|
+
connectionId: string;
|
|
320
319
|
}
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
/** Server-only client. App secrets never become a user's general API key.
|
|
321
|
+
* Every invocation mints and consumes one short-lived, exact-grant token. */
|
|
322
|
+
declare class HubAppBrokerClient {
|
|
323
|
+
private readonly options;
|
|
324
|
+
private readonly baseUrl;
|
|
325
|
+
private readonly fetcher;
|
|
326
|
+
constructor(options: HubAppBrokerOptions);
|
|
327
|
+
private token;
|
|
328
|
+
private readToken;
|
|
329
|
+
exchange(input: {
|
|
330
|
+
code: string;
|
|
331
|
+
redirectUri: string;
|
|
332
|
+
connectionId?: string;
|
|
333
|
+
}): Promise<HubAppBrokerExchange>;
|
|
334
|
+
mint(grantId: string): Promise<HubAppBrokerToken>;
|
|
335
|
+
invoke<T = unknown>(grantId: string, connectionId: string, actionPath: string, input: Record<string, unknown>): Promise<HubExecResponse<T>>;
|
|
323
336
|
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
337
|
+
//#endregion
|
|
338
|
+
//#region src/knowledge-management.d.ts
|
|
339
|
+
interface KnowledgeReference {
|
|
340
|
+
sourceId: string;
|
|
341
|
+
generation: string;
|
|
342
|
+
}
|
|
343
|
+
/** Connection references only. Provider credentials never enter this contract. */
|
|
344
|
+
interface KnowledgeEmbeddingSpace {
|
|
345
|
+
connectionId: string;
|
|
346
|
+
model: string;
|
|
347
|
+
dimensions: number;
|
|
348
|
+
}
|
|
349
|
+
type KnowledgeSourceInput = {
|
|
350
|
+
kind: "file";
|
|
351
|
+
name: string;
|
|
352
|
+
base64: string;
|
|
353
|
+
mediaType: string;
|
|
329
354
|
} | {
|
|
330
|
-
|
|
355
|
+
kind: "git";
|
|
356
|
+
connectionId: string;
|
|
357
|
+
owner: string;
|
|
358
|
+
repo: string;
|
|
359
|
+
ref: string;
|
|
360
|
+
pathPrefix?: string;
|
|
331
361
|
} | {
|
|
332
|
-
|
|
362
|
+
kind: "url";
|
|
363
|
+
url: string;
|
|
333
364
|
} | {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
repo?: string;
|
|
339
|
-
when?: HubEventCondition;
|
|
340
|
-
}
|
|
341
|
-
type HubEventSubscriptionSource = {
|
|
342
|
-
type: "channel";
|
|
343
|
-
channelId: string;
|
|
365
|
+
kind: "s3";
|
|
366
|
+
connectionId: string;
|
|
367
|
+
bucket: string;
|
|
368
|
+
prefix: string;
|
|
344
369
|
} | {
|
|
345
|
-
|
|
370
|
+
kind: "vector";
|
|
346
371
|
connectionId: string;
|
|
372
|
+
provider: "pinecone" | "qdrant" | "weaviate";
|
|
373
|
+
indexName: string;
|
|
374
|
+
namespace?: string;
|
|
375
|
+
embedding: KnowledgeEmbeddingSpace;
|
|
376
|
+
textField: string;
|
|
377
|
+
sourceUriField: string;
|
|
347
378
|
};
|
|
348
|
-
interface
|
|
349
|
-
|
|
350
|
-
|
|
379
|
+
interface KnowledgeCapability {
|
|
380
|
+
supported: boolean;
|
|
381
|
+
reason?: string;
|
|
351
382
|
}
|
|
352
|
-
interface
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
383
|
+
interface KnowledgeCapabilities {
|
|
384
|
+
delegation?: KnowledgeCapability & {
|
|
385
|
+
resource?: string;
|
|
386
|
+
scopes?: string[];
|
|
387
|
+
};
|
|
388
|
+
sources: Record<KnowledgeSourceInput["kind"], KnowledgeCapability>;
|
|
389
|
+
vectorProviders: Record<"pinecone" | "qdrant" | "weaviate", KnowledgeCapability>;
|
|
390
|
+
managedVector: KnowledgeCapability;
|
|
391
|
+
file: {
|
|
392
|
+
mediaTypes: string[];
|
|
393
|
+
maxBytes: number;
|
|
394
|
+
maxObjects: number;
|
|
395
|
+
};
|
|
363
396
|
}
|
|
364
|
-
interface
|
|
397
|
+
interface KnowledgeSourceSummary {
|
|
398
|
+
/** Required query authorization, not proof that an owner policy currently permits it. */
|
|
399
|
+
retrieval?: {
|
|
400
|
+
kind: "lexical";
|
|
401
|
+
} | {
|
|
402
|
+
kind: "vector";
|
|
403
|
+
embeddingPolicy: {
|
|
404
|
+
connectionId: string;
|
|
405
|
+
actionPath: "openai.embeddings.create";
|
|
406
|
+
scope: "owner-connection-action";
|
|
407
|
+
};
|
|
408
|
+
};
|
|
365
409
|
id: string;
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
410
|
+
name: string;
|
|
411
|
+
kind: KnowledgeSourceInput["kind"];
|
|
412
|
+
status: "ready" | "refreshing" | "failed" | "awaiting-approval";
|
|
413
|
+
approval?: {
|
|
414
|
+
id: string;
|
|
415
|
+
path: string;
|
|
416
|
+
preview: {
|
|
417
|
+
provider: string;
|
|
418
|
+
connectionId: string;
|
|
419
|
+
collection: string;
|
|
420
|
+
sourceId: string;
|
|
421
|
+
requestId: string;
|
|
422
|
+
embedding: KnowledgeEmbeddingSpace;
|
|
423
|
+
chunkCount: number;
|
|
424
|
+
sourceCount: number;
|
|
425
|
+
dataSharing: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
refreshRequestId?: string;
|
|
429
|
+
generation: string | null;
|
|
430
|
+
lastError: {
|
|
431
|
+
code: string;
|
|
432
|
+
message: string;
|
|
433
|
+
} | null;
|
|
434
|
+
updatedAt: string;
|
|
435
|
+
}
|
|
436
|
+
type KnowledgeAttachmentAuthorization = {
|
|
437
|
+
status: "active";
|
|
438
|
+
} | {
|
|
439
|
+
status: "unavailable";
|
|
440
|
+
code: "APP_CONSENT_REVOKED" | "KEY_REVOKED" | "CONNECTION_UNAVAILABLE" | "ATTACHMENT_REVOKED" | "GENERATION_UNAVAILABLE" | "RUNTIME_AUTHORITY_REVOKED";
|
|
441
|
+
};
|
|
442
|
+
interface KnowledgeAttachment {
|
|
443
|
+
/** Snapshot of live grant/key/connection authority, separate from durable pin state. */
|
|
444
|
+
authorization?: KnowledgeAttachmentAuthorization;
|
|
445
|
+
id: string;
|
|
446
|
+
sourceId: string;
|
|
447
|
+
sandboxId: string;
|
|
448
|
+
generation: string;
|
|
449
|
+
status: "active" | "detached";
|
|
450
|
+
}
|
|
451
|
+
interface KnowledgeSourceCreate {
|
|
452
|
+
requestId: string;
|
|
453
|
+
name: string;
|
|
454
|
+
source: KnowledgeSourceInput;
|
|
455
|
+
target?: {
|
|
456
|
+
kind: "lexical";
|
|
457
|
+
} | {
|
|
458
|
+
kind: "managed-vector";
|
|
459
|
+
provider: "qdrant";
|
|
460
|
+
connectionId: string;
|
|
461
|
+
embedding: KnowledgeEmbeddingSpace;
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
/** Owner-only management. Runtime tools use HubKnowledgeClient.query instead. */
|
|
465
|
+
interface KnowledgeAuthorization {
|
|
466
|
+
userId: string;
|
|
467
|
+
clientId: string;
|
|
468
|
+
resource: string;
|
|
469
|
+
scopes: Array<"knowledge:read" | "knowledge:write">;
|
|
470
|
+
}
|
|
471
|
+
declare class HubKnowledgeManagementClient {
|
|
472
|
+
private readonly request;
|
|
473
|
+
constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
|
|
474
|
+
materialize(input: {
|
|
475
|
+
sandboxId: string;
|
|
476
|
+
references: KnowledgeReference[];
|
|
477
|
+
}): Promise<KnowledgeAttachment[]>;
|
|
478
|
+
authorization(): Promise<KnowledgeAuthorization>;
|
|
479
|
+
disconnectAuthorization(): Promise<{
|
|
480
|
+
revoked: true;
|
|
481
|
+
}>;
|
|
482
|
+
capabilities(): Promise<KnowledgeCapabilities>;
|
|
483
|
+
list(): Promise<KnowledgeSourceSummary[]>;
|
|
484
|
+
get(sourceId: string): Promise<KnowledgeSourceSummary>;
|
|
485
|
+
create(input: KnowledgeSourceCreate): Promise<KnowledgeSourceSummary>;
|
|
486
|
+
refresh(sourceId: string, input: {
|
|
487
|
+
requestId: string;
|
|
488
|
+
approvalToken?: string;
|
|
489
|
+
}): Promise<KnowledgeSourceSummary>;
|
|
490
|
+
attach(sourceId: string, input: {
|
|
491
|
+
sandboxId: string;
|
|
492
|
+
generation: string;
|
|
493
|
+
expectedGeneration?: string;
|
|
494
|
+
}): Promise<KnowledgeAttachment>;
|
|
495
|
+
attachments(sandboxId?: string): Promise<KnowledgeAttachment[]>;
|
|
496
|
+
detach(attachmentId: string): Promise<KnowledgeAttachment>;
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region src/knowledge.d.ts
|
|
500
|
+
interface HubKnowledgeRetrievalResult {
|
|
501
|
+
attachmentId: string;
|
|
502
|
+
generation: string;
|
|
503
|
+
provenance: "ingested" | "record-supplied";
|
|
504
|
+
hits: Array<{
|
|
505
|
+
id: string;
|
|
506
|
+
title: string;
|
|
507
|
+
snippet: string;
|
|
508
|
+
score?: number;
|
|
509
|
+
citations?: Array<{
|
|
510
|
+
sourceId: string;
|
|
511
|
+
sourceUri: string;
|
|
512
|
+
revision?: string;
|
|
513
|
+
}>;
|
|
514
|
+
}>;
|
|
515
|
+
elapsedMs?: number;
|
|
516
|
+
}
|
|
517
|
+
interface HubKnowledgeQueryResult {
|
|
518
|
+
results: HubKnowledgeRetrievalResult[];
|
|
519
|
+
/** Individual unavailable sources do not hide evidence from healthy sources. */
|
|
520
|
+
failures: Array<{
|
|
521
|
+
attachmentId: string;
|
|
522
|
+
code: string;
|
|
523
|
+
message: string;
|
|
524
|
+
}>;
|
|
525
|
+
partial: boolean;
|
|
526
|
+
}
|
|
527
|
+
/** Runtime-only retrieval. The authenticated sandbox credential determines the
|
|
528
|
+
* scope on the server; neither a caller nor an agent can supply another scope. */
|
|
529
|
+
declare class HubKnowledgeClient {
|
|
530
|
+
private readonly request;
|
|
531
|
+
readonly management: HubKnowledgeManagementClient;
|
|
532
|
+
constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
|
|
533
|
+
bindings(): Promise<{
|
|
534
|
+
references: KnowledgeReference[];
|
|
535
|
+
}>;
|
|
536
|
+
query(input: {
|
|
537
|
+
query: string;
|
|
538
|
+
limit?: number;
|
|
539
|
+
expectedReferences?: KnowledgeReference[];
|
|
540
|
+
}, options?: {
|
|
541
|
+
signal?: AbortSignal;
|
|
542
|
+
}): Promise<HubKnowledgeQueryResult>;
|
|
543
|
+
}
|
|
544
|
+
//#endregion
|
|
545
|
+
//#region src/audit-types.d.ts
|
|
546
|
+
interface HubAuditEvent {
|
|
547
|
+
id: string;
|
|
548
|
+
action: string;
|
|
549
|
+
targetUserId: string | null;
|
|
550
|
+
targetKeyId: string | null;
|
|
551
|
+
metadata: unknown;
|
|
552
|
+
createdAt: string;
|
|
553
|
+
}
|
|
554
|
+
interface HubAuditListRequest {
|
|
555
|
+
provider?: string;
|
|
556
|
+
action?: string;
|
|
557
|
+
status?: string;
|
|
558
|
+
since?: string;
|
|
559
|
+
until?: string;
|
|
560
|
+
cursor?: string;
|
|
561
|
+
limit?: number;
|
|
562
|
+
}
|
|
563
|
+
interface HubAuditResponse {
|
|
564
|
+
events: HubAuditEvent[];
|
|
565
|
+
nextCursor: string | null;
|
|
566
|
+
}
|
|
567
|
+
//#endregion
|
|
568
|
+
//#region src/transport-types.d.ts
|
|
569
|
+
type HubPrincipalKind = "user_session" | "api_key" | "sandbox_runtime";
|
|
570
|
+
interface HubSuccessEnvelope<TData> {
|
|
571
|
+
success: true;
|
|
572
|
+
data: TData;
|
|
573
|
+
}
|
|
574
|
+
interface HubErrorEnvelope {
|
|
575
|
+
success: false;
|
|
576
|
+
error: HubErrorBody;
|
|
577
|
+
}
|
|
578
|
+
type HubEnvelope<TData> = HubSuccessEnvelope<TData> | HubErrorEnvelope;
|
|
579
|
+
interface HubErrorBody {
|
|
580
|
+
code: HubErrorCode;
|
|
581
|
+
message: string;
|
|
582
|
+
details?: unknown;
|
|
583
|
+
}
|
|
584
|
+
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}`;
|
|
585
|
+
interface HubStatusResponse {
|
|
586
|
+
contract: unknown;
|
|
587
|
+
principal: HubPrincipal;
|
|
588
|
+
connections: HubStatusConnections;
|
|
589
|
+
}
|
|
590
|
+
interface HubPrincipal {
|
|
591
|
+
kind: HubPrincipalKind;
|
|
592
|
+
userId: string;
|
|
593
|
+
apiKeyId?: string;
|
|
594
|
+
sandboxId?: string;
|
|
595
|
+
requestId?: string;
|
|
596
|
+
}
|
|
597
|
+
interface HubStatusConnections {
|
|
598
|
+
connectedProviderCount: number;
|
|
599
|
+
unhealthyProviderCount: number;
|
|
600
|
+
}
|
|
601
|
+
interface HubUnimplementedErrorEnvelope extends HubErrorEnvelope {
|
|
602
|
+
error: HubErrorEnvelope["error"] & {
|
|
603
|
+
code: "HUB_NOT_IMPLEMENTED";
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
//#endregion
|
|
607
|
+
//#region src/authorization-types.d.ts
|
|
608
|
+
interface HubTokenMintRequest {
|
|
609
|
+
connectionId?: string;
|
|
610
|
+
provider?: string;
|
|
611
|
+
actionPath: string;
|
|
612
|
+
ttlSeconds?: number;
|
|
613
|
+
}
|
|
614
|
+
interface HubTokenMintResponse {
|
|
615
|
+
token: string;
|
|
616
|
+
tokenId: string;
|
|
617
|
+
expiresAt: string;
|
|
618
|
+
}
|
|
619
|
+
interface HubCapabilityToken {
|
|
620
|
+
id: string;
|
|
621
|
+
providerId: string;
|
|
622
|
+
connectionId: string;
|
|
623
|
+
connectionDisplay: string | null;
|
|
624
|
+
actionPath: string;
|
|
625
|
+
expiresAt: string;
|
|
626
|
+
status: "active" | "consumed" | "expired" | "revoked";
|
|
627
|
+
principalKind: HubPrincipalKind;
|
|
628
|
+
createdAt: string;
|
|
629
|
+
}
|
|
630
|
+
interface HubTokensListResponse {
|
|
631
|
+
tokens: HubCapabilityToken[];
|
|
632
|
+
}
|
|
633
|
+
interface HubTokenRevokeResponse {
|
|
634
|
+
tokenId: string;
|
|
635
|
+
status: HubCapabilityToken["status"];
|
|
636
|
+
}
|
|
637
|
+
type HubPolicyDecision = "allow" | "ask" | "deny";
|
|
638
|
+
interface HubPolicyUpdateRequest {
|
|
639
|
+
connectionId: string;
|
|
640
|
+
actionPath: string;
|
|
641
|
+
decision: HubPolicyDecision;
|
|
642
|
+
}
|
|
643
|
+
interface HubPolicyListRequest {
|
|
644
|
+
connectionId: string;
|
|
645
|
+
}
|
|
646
|
+
interface HubPolicyDeleteRequest {
|
|
647
|
+
connectionId: string;
|
|
648
|
+
actionPath: string;
|
|
649
|
+
}
|
|
650
|
+
interface HubPolicyDeleteResponse {
|
|
651
|
+
connectionId: string;
|
|
652
|
+
actionPath: string;
|
|
653
|
+
/** Whether a stored override existed and was removed (false = already default). */
|
|
654
|
+
deleted: boolean;
|
|
655
|
+
}
|
|
656
|
+
interface HubPolicy {
|
|
657
|
+
id: string;
|
|
658
|
+
connectionId: string;
|
|
659
|
+
providerId: string;
|
|
660
|
+
actionPath: string;
|
|
661
|
+
decision: HubPolicyDecision;
|
|
662
|
+
createdAt: string;
|
|
663
|
+
updatedAt: string;
|
|
664
|
+
}
|
|
665
|
+
interface HubPolicyResponse {
|
|
666
|
+
policy: HubPolicy;
|
|
667
|
+
}
|
|
668
|
+
interface HubPolicyListResponse {
|
|
669
|
+
policies: HubPolicy[];
|
|
670
|
+
}
|
|
671
|
+
interface HubAllowWritesResponse {
|
|
672
|
+
connectionId: string;
|
|
673
|
+
providerId: string;
|
|
674
|
+
/** Write actions the connection's provider exposes. */
|
|
675
|
+
writeActions: number;
|
|
676
|
+
/** Rows newly created (excludes actions that already had a policy). */
|
|
677
|
+
granted: number;
|
|
678
|
+
actionPaths: string[];
|
|
679
|
+
}
|
|
680
|
+
interface HubRevertWritesResponse {
|
|
681
|
+
connectionId: string;
|
|
682
|
+
/** `allow_writes` rows deleted. */
|
|
683
|
+
reverted: number;
|
|
684
|
+
}
|
|
685
|
+
type HubApprovalStatus = "pending" | "approved" | "denied" | "expired" | "consumed";
|
|
686
|
+
interface HubApproval {
|
|
687
|
+
id: string;
|
|
688
|
+
connectionId: string;
|
|
689
|
+
providerId: string;
|
|
690
|
+
actionPath: string;
|
|
691
|
+
inputHash: string;
|
|
692
|
+
requesterPrincipal: Record<string, unknown>;
|
|
693
|
+
status: HubApprovalStatus;
|
|
694
|
+
requestedAt: string;
|
|
695
|
+
expiresAt: string;
|
|
696
|
+
resolvedAt: string | null;
|
|
697
|
+
}
|
|
698
|
+
interface HubApprovalCapabilityToken {
|
|
699
|
+
tokenId: string;
|
|
700
|
+
token: string;
|
|
701
|
+
expiresAt: string;
|
|
702
|
+
}
|
|
703
|
+
interface HubApprovalDecisionResponse {
|
|
704
|
+
approval: HubApproval;
|
|
705
|
+
capabilityToken?: HubApprovalCapabilityToken;
|
|
706
|
+
}
|
|
707
|
+
interface HubApprovalListResponse {
|
|
708
|
+
approvals: HubApproval[];
|
|
709
|
+
}
|
|
710
|
+
//#endregion
|
|
711
|
+
//#region src/channel-types.d.ts
|
|
712
|
+
interface HubEmailChannel {
|
|
713
|
+
id: string;
|
|
714
|
+
kind: "email";
|
|
715
|
+
providerId: "email";
|
|
716
|
+
connectionId: string;
|
|
717
|
+
clientReference: string | null;
|
|
718
|
+
label: string | null;
|
|
719
|
+
address: string;
|
|
720
|
+
status: "active";
|
|
721
|
+
createdAt: string;
|
|
722
|
+
updatedAt: string;
|
|
723
|
+
}
|
|
724
|
+
type HubChannel = HubEmailChannel;
|
|
725
|
+
interface HubChannelsResponse {
|
|
726
|
+
channels: HubChannel[];
|
|
727
|
+
}
|
|
728
|
+
interface HubEmailChannelCreateRequest {
|
|
729
|
+
/**
|
|
730
|
+
* Product-owned idempotency key. Retrying the same request returns the
|
|
731
|
+
* original mailbox instead of provisioning another address.
|
|
732
|
+
*/
|
|
733
|
+
clientReference?: string;
|
|
734
|
+
label?: string;
|
|
735
|
+
}
|
|
736
|
+
interface HubChannelCreateResponse {
|
|
737
|
+
channel: HubChannel;
|
|
738
|
+
/** True only when this request created the channel. */
|
|
739
|
+
created: boolean;
|
|
740
|
+
}
|
|
741
|
+
interface HubChannelDeleteResponse {
|
|
742
|
+
removed: true;
|
|
743
|
+
}
|
|
744
|
+
type HubEventConditionScalar = string | number | boolean | null;
|
|
745
|
+
type HubEventCondition = {
|
|
746
|
+
path: string;
|
|
747
|
+
op: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains" | "exists" | "truthy";
|
|
748
|
+
value?: HubEventConditionScalar | HubEventConditionScalar[];
|
|
749
|
+
} | {
|
|
750
|
+
all: HubEventCondition[];
|
|
751
|
+
} | {
|
|
752
|
+
any: HubEventCondition[];
|
|
753
|
+
} | {
|
|
754
|
+
not: HubEventCondition;
|
|
755
|
+
};
|
|
756
|
+
interface HubEventSubscriptionFilter {
|
|
757
|
+
action?: string;
|
|
758
|
+
repo?: string;
|
|
759
|
+
when?: HubEventCondition;
|
|
760
|
+
}
|
|
761
|
+
type HubEventSubscriptionSource = {
|
|
762
|
+
type: "channel";
|
|
763
|
+
channelId: string;
|
|
764
|
+
} | {
|
|
765
|
+
type: "connection";
|
|
766
|
+
connectionId: string;
|
|
767
|
+
};
|
|
768
|
+
interface HubEventSubscriptionCallback {
|
|
769
|
+
url: string;
|
|
770
|
+
secret: string;
|
|
771
|
+
}
|
|
772
|
+
interface HubEventSubscriptionCreateRequest {
|
|
773
|
+
/**
|
|
774
|
+
* Product-owned idempotency key. Reusing it with the same source and filter
|
|
775
|
+
* returns the existing subscription; reusing it for different input fails.
|
|
776
|
+
*/
|
|
777
|
+
clientReference: string;
|
|
778
|
+
label?: string;
|
|
779
|
+
source: HubEventSubscriptionSource;
|
|
780
|
+
event: string;
|
|
781
|
+
filter?: HubEventSubscriptionFilter;
|
|
782
|
+
callback: HubEventSubscriptionCallback;
|
|
783
|
+
}
|
|
784
|
+
interface HubEventSubscription {
|
|
785
|
+
id: string;
|
|
786
|
+
clientReference: string;
|
|
787
|
+
label: string | null;
|
|
788
|
+
source: HubEventSubscriptionSource;
|
|
789
|
+
providerId: string;
|
|
790
|
+
connectionId: string;
|
|
791
|
+
event: string;
|
|
792
|
+
filter: HubEventSubscriptionFilter;
|
|
793
|
+
workflowId: string;
|
|
794
|
+
status: "active" | "error";
|
|
795
|
+
lastError: string | null;
|
|
796
|
+
createdAt: string;
|
|
797
|
+
updatedAt: string;
|
|
378
798
|
}
|
|
379
799
|
interface HubEventSubscriptionsResponse {
|
|
380
800
|
subscriptions: HubEventSubscription[];
|
|
@@ -409,6 +829,24 @@ interface HubEventDelivery {
|
|
|
409
829
|
providerEvent: HubProviderEvent;
|
|
410
830
|
firedAt: string;
|
|
411
831
|
}
|
|
832
|
+
//#endregion
|
|
833
|
+
//#region src/connection-types.d.ts
|
|
834
|
+
interface HubConnection {
|
|
835
|
+
id: string;
|
|
836
|
+
providerId: string;
|
|
837
|
+
displayName: string;
|
|
838
|
+
accountDisplay: string | null;
|
|
839
|
+
providerAccountId: string | null;
|
|
840
|
+
scopes: string[];
|
|
841
|
+
status: "active" | "revoked" | "unhealthy" | "reconnect_required";
|
|
842
|
+
health: "unknown" | "healthy" | "unhealthy" | "rate_limited";
|
|
843
|
+
createdAt: string;
|
|
844
|
+
updatedAt: string;
|
|
845
|
+
lastUsedAt: string | null;
|
|
846
|
+
}
|
|
847
|
+
interface HubConnectionsResponse {
|
|
848
|
+
connections: HubConnection[];
|
|
849
|
+
}
|
|
412
850
|
/** A connector's auth model. */
|
|
413
851
|
type HubProviderAuthKind = "oauth2" | "api_key" | "none" | "custom";
|
|
414
852
|
/** One non-secret value needed before an OAuth redirect can be built. Tenant-
|
|
@@ -570,193 +1008,8 @@ interface HubConnectionHealthResponse {
|
|
|
570
1008
|
connection: HubConnection;
|
|
571
1009
|
health: HubConnectionHealthInfo;
|
|
572
1010
|
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
providerId: string;
|
|
576
|
-
displayName: string;
|
|
577
|
-
toolCount: number;
|
|
578
|
-
connectionStatus: "connected" | "missing" | "unknown";
|
|
579
|
-
health: "healthy" | "unhealthy" | "rate_limited" | "unknown";
|
|
580
|
-
configured: boolean;
|
|
581
|
-
}
|
|
582
|
-
/** Per-tool catalog risk class. The first three mirror the platform's
|
|
583
|
-
* `HubActionRisk`; `unknown` is surfaced honestly for tools the catalog can't
|
|
584
|
-
* classify (substrate connectors). */
|
|
585
|
-
type HubToolRisk = "read" | "write" | "destructive" | "unknown";
|
|
586
|
-
interface HubTool {
|
|
587
|
-
path: string;
|
|
588
|
-
providerId?: string;
|
|
589
|
-
title?: string;
|
|
590
|
-
description?: string;
|
|
591
|
-
inputSchema?: unknown;
|
|
592
|
-
outputSchema?: unknown;
|
|
593
|
-
connectionRequired?: boolean;
|
|
594
|
-
connectionStatus?: "connected" | "missing" | "unknown";
|
|
595
|
-
requiredConnectionProviderId?: string;
|
|
596
|
-
policyState?: "allow" | "ask" | "deny" | "unknown";
|
|
597
|
-
risk?: HubToolRisk;
|
|
598
|
-
}
|
|
599
|
-
interface HubToolSourcesResponse {
|
|
600
|
-
sources: HubToolSource[];
|
|
601
|
-
}
|
|
602
|
-
interface HubToolsSearchRequest {
|
|
603
|
-
query: string;
|
|
604
|
-
provider?: string;
|
|
605
|
-
}
|
|
606
|
-
interface HubToolsSearchResponse {
|
|
607
|
-
tools: HubTool[];
|
|
608
|
-
}
|
|
609
|
-
interface HubToolsDescribeRequest {
|
|
610
|
-
path: string;
|
|
611
|
-
}
|
|
612
|
-
interface HubToolsDescribeResponse {
|
|
613
|
-
tool: HubTool;
|
|
614
|
-
}
|
|
615
|
-
interface HubExecRequest {
|
|
616
|
-
path: string;
|
|
617
|
-
input?: unknown;
|
|
618
|
-
connectionId?: string;
|
|
619
|
-
/** Caller-minted key for this exec. The platform ledger replays the first
|
|
620
|
-
* call's result for a retry that carries the same key, and rejects a key
|
|
621
|
-
* reused for a different request. On the capability-token arm the key only
|
|
622
|
-
* reaches the connector for provider-native dedupe: that arm is at-most-once
|
|
623
|
-
* per token and replays no stored result. */
|
|
624
|
-
idempotencyKey?: string;
|
|
625
|
-
}
|
|
626
|
-
interface HubExecResponse<TResult = unknown> {
|
|
627
|
-
result: TResult;
|
|
628
|
-
/** True when the result was replayed from a previous call with the same
|
|
629
|
-
* idempotency key, so the action did not run again. */
|
|
630
|
-
replayed?: boolean;
|
|
631
|
-
}
|
|
632
|
-
interface HubTokenMintRequest {
|
|
633
|
-
connectionId?: string;
|
|
634
|
-
provider?: string;
|
|
635
|
-
actionPath: string;
|
|
636
|
-
ttlSeconds?: number;
|
|
637
|
-
}
|
|
638
|
-
interface HubTokenMintResponse {
|
|
639
|
-
token: string;
|
|
640
|
-
tokenId: string;
|
|
641
|
-
expiresAt: string;
|
|
642
|
-
}
|
|
643
|
-
interface HubCapabilityToken {
|
|
644
|
-
id: string;
|
|
645
|
-
providerId: string;
|
|
646
|
-
connectionId: string;
|
|
647
|
-
connectionDisplay: string | null;
|
|
648
|
-
actionPath: string;
|
|
649
|
-
expiresAt: string;
|
|
650
|
-
status: "active" | "consumed" | "expired" | "revoked";
|
|
651
|
-
principalKind: HubPrincipalKind;
|
|
652
|
-
createdAt: string;
|
|
653
|
-
}
|
|
654
|
-
interface HubTokensListResponse {
|
|
655
|
-
tokens: HubCapabilityToken[];
|
|
656
|
-
}
|
|
657
|
-
interface HubTokenRevokeResponse {
|
|
658
|
-
tokenId: string;
|
|
659
|
-
status: HubCapabilityToken["status"];
|
|
660
|
-
}
|
|
661
|
-
type HubPolicyDecision = "allow" | "ask" | "deny";
|
|
662
|
-
interface HubPolicyUpdateRequest {
|
|
663
|
-
connectionId: string;
|
|
664
|
-
actionPath: string;
|
|
665
|
-
decision: HubPolicyDecision;
|
|
666
|
-
}
|
|
667
|
-
interface HubPolicyListRequest {
|
|
668
|
-
connectionId: string;
|
|
669
|
-
}
|
|
670
|
-
interface HubPolicyDeleteRequest {
|
|
671
|
-
connectionId: string;
|
|
672
|
-
actionPath: string;
|
|
673
|
-
}
|
|
674
|
-
interface HubPolicyDeleteResponse {
|
|
675
|
-
connectionId: string;
|
|
676
|
-
actionPath: string;
|
|
677
|
-
/** Whether a stored override existed and was removed (false = already default). */
|
|
678
|
-
deleted: boolean;
|
|
679
|
-
}
|
|
680
|
-
interface HubPolicy {
|
|
681
|
-
id: string;
|
|
682
|
-
connectionId: string;
|
|
683
|
-
providerId: string;
|
|
684
|
-
actionPath: string;
|
|
685
|
-
decision: HubPolicyDecision;
|
|
686
|
-
createdAt: string;
|
|
687
|
-
updatedAt: string;
|
|
688
|
-
}
|
|
689
|
-
interface HubPolicyResponse {
|
|
690
|
-
policy: HubPolicy;
|
|
691
|
-
}
|
|
692
|
-
interface HubPolicyListResponse {
|
|
693
|
-
policies: HubPolicy[];
|
|
694
|
-
}
|
|
695
|
-
interface HubAllowWritesResponse {
|
|
696
|
-
connectionId: string;
|
|
697
|
-
providerId: string;
|
|
698
|
-
/** Write actions the connection's provider exposes. */
|
|
699
|
-
writeActions: number;
|
|
700
|
-
/** Rows newly created (excludes actions that already had a policy). */
|
|
701
|
-
granted: number;
|
|
702
|
-
actionPaths: string[];
|
|
703
|
-
}
|
|
704
|
-
interface HubRevertWritesResponse {
|
|
705
|
-
connectionId: string;
|
|
706
|
-
/** `allow_writes` rows deleted. */
|
|
707
|
-
reverted: number;
|
|
708
|
-
}
|
|
709
|
-
type HubApprovalStatus = "pending" | "approved" | "denied" | "expired" | "consumed";
|
|
710
|
-
interface HubApproval {
|
|
711
|
-
id: string;
|
|
712
|
-
connectionId: string;
|
|
713
|
-
providerId: string;
|
|
714
|
-
actionPath: string;
|
|
715
|
-
inputHash: string;
|
|
716
|
-
requesterPrincipal: Record<string, unknown>;
|
|
717
|
-
status: HubApprovalStatus;
|
|
718
|
-
requestedAt: string;
|
|
719
|
-
expiresAt: string;
|
|
720
|
-
resolvedAt: string | null;
|
|
721
|
-
}
|
|
722
|
-
interface HubApprovalCapabilityToken {
|
|
723
|
-
tokenId: string;
|
|
724
|
-
token: string;
|
|
725
|
-
expiresAt: string;
|
|
726
|
-
}
|
|
727
|
-
interface HubApprovalDecisionResponse {
|
|
728
|
-
approval: HubApproval;
|
|
729
|
-
capabilityToken?: HubApprovalCapabilityToken;
|
|
730
|
-
}
|
|
731
|
-
interface HubApprovalListResponse {
|
|
732
|
-
approvals: HubApproval[];
|
|
733
|
-
}
|
|
734
|
-
interface HubAuditEvent {
|
|
735
|
-
id: string;
|
|
736
|
-
action: string;
|
|
737
|
-
targetUserId: string | null;
|
|
738
|
-
targetKeyId: string | null;
|
|
739
|
-
metadata: unknown;
|
|
740
|
-
createdAt: string;
|
|
741
|
-
}
|
|
742
|
-
interface HubAuditListRequest {
|
|
743
|
-
provider?: string;
|
|
744
|
-
action?: string;
|
|
745
|
-
status?: string;
|
|
746
|
-
since?: string;
|
|
747
|
-
until?: string;
|
|
748
|
-
cursor?: string;
|
|
749
|
-
limit?: number;
|
|
750
|
-
}
|
|
751
|
-
interface HubAuditResponse {
|
|
752
|
-
events: HubAuditEvent[];
|
|
753
|
-
nextCursor: string | null;
|
|
754
|
-
}
|
|
755
|
-
interface HubUnimplementedErrorEnvelope extends HubErrorEnvelope {
|
|
756
|
-
error: HubErrorEnvelope["error"] & {
|
|
757
|
-
code: "HUB_NOT_IMPLEMENTED";
|
|
758
|
-
};
|
|
759
|
-
}
|
|
1011
|
+
//#endregion
|
|
1012
|
+
//#region src/github-app-types.d.ts
|
|
760
1013
|
interface HubGithubAppMintInstallationTokenRequest {
|
|
761
1014
|
/** HTTPS or SSH GitHub URL — alternative to installationId. */
|
|
762
1015
|
repoUrl?: string;
|
|
@@ -848,39 +1101,49 @@ interface HubGithubAppIsRepoInstalledRequest {
|
|
|
848
1101
|
repo: string;
|
|
849
1102
|
}
|
|
850
1103
|
interface HubGithubAppIsRepoInstalledResponse {
|
|
851
|
-
installed: boolean;
|
|
852
|
-
installationId: number | null;
|
|
853
|
-
}
|
|
854
|
-
interface HubWorkflowAction {
|
|
855
|
-
kind: string;
|
|
856
|
-
config: Record<string, unknown>;
|
|
857
|
-
}
|
|
858
|
-
/** Inbound-event matcher for a `provider_event` trigger. */
|
|
859
|
-
interface HubWorkflowEventFilter {
|
|
860
|
-
event: string;
|
|
861
|
-
action?: string;
|
|
862
|
-
repo?: string;
|
|
1104
|
+
installed: boolean;
|
|
1105
|
+
installationId: number | null;
|
|
863
1106
|
}
|
|
864
|
-
|
|
1107
|
+
//#endregion
|
|
1108
|
+
//#region src/workflow-graph-types.d.ts
|
|
1109
|
+
/** How a node's incoming edges release it (default `"all"` — omitted on the
|
|
1110
|
+
* wire for it, so specs compiled before join rules existed round-trip). */
|
|
1111
|
+
type HubWorkflowGraphJoinRule = "all" | "any" | "any_failed" | "all_done";
|
|
1112
|
+
type HubWorkflowConditionOp = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains" | "exists" | "truthy";
|
|
1113
|
+
type HubWorkflowConditionScalar = string | number | boolean | null;
|
|
1114
|
+
/** The predicate on a guarded edge (`needs: [{ id, when }]`), evaluated by the
|
|
1115
|
+
* runner against the steps context on the source node's completion. */
|
|
1116
|
+
type HubWorkflowCondition = {
|
|
1117
|
+
path: string;
|
|
1118
|
+
op: HubWorkflowConditionOp;
|
|
1119
|
+
value?: HubWorkflowConditionScalar | HubWorkflowConditionScalar[];
|
|
1120
|
+
} | {
|
|
1121
|
+
all: HubWorkflowCondition[];
|
|
1122
|
+
} | {
|
|
1123
|
+
any: HubWorkflowCondition[];
|
|
1124
|
+
} | {
|
|
1125
|
+
not: HubWorkflowCondition;
|
|
1126
|
+
};
|
|
1127
|
+
interface HubWorkflowGraphNode {
|
|
865
1128
|
id: string;
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
provider: string | null;
|
|
869
|
-
connectionId: string | null;
|
|
870
|
-
eventFilter: HubWorkflowEventFilter | null;
|
|
871
|
-
cron: string | null;
|
|
872
|
-
timezone: string | null;
|
|
873
|
-
nextFireAt: string | null;
|
|
874
|
-
lastFiredAt: string | null;
|
|
875
|
-
/** Schedule only: the ISO-8601 instant it stops firing; null when unbounded. */
|
|
876
|
-
until: string | null;
|
|
1129
|
+
index: number;
|
|
1130
|
+
join?: HubWorkflowGraphJoinRule;
|
|
877
1131
|
}
|
|
878
|
-
interface
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
|
|
1132
|
+
interface HubWorkflowGraphEdge {
|
|
1133
|
+
from: string;
|
|
1134
|
+
to: string;
|
|
1135
|
+
/** Guard the runner evaluates on the source's completion; unguarded edges
|
|
1136
|
+
* carry no `when`. */
|
|
1137
|
+
when?: HubWorkflowCondition;
|
|
1138
|
+
}
|
|
1139
|
+
/** JSON-serializable form of a validated graph (as stored on run/workflow rows). */
|
|
1140
|
+
interface HubWorkflowGraphSpec {
|
|
1141
|
+
nodes: HubWorkflowGraphNode[];
|
|
1142
|
+
edges: HubWorkflowGraphEdge[];
|
|
1143
|
+
maxNodeVisits: number;
|
|
883
1144
|
}
|
|
1145
|
+
//#endregion
|
|
1146
|
+
//#region src/workflow-run-types.d.ts
|
|
884
1147
|
type HubWorkflowRunStatus = "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled";
|
|
885
1148
|
/** One agent iteration of an `agent.run`, as the single-run detail carries it
|
|
886
1149
|
* (JSON-clean ISO timestamps) — including the round's own output `text`. */
|
|
@@ -1129,91 +1392,6 @@ interface HubWorkflowFleetInsights {
|
|
|
1129
1392
|
windowStart: string;
|
|
1130
1393
|
workflows: HubWorkflowFleetEntry[];
|
|
1131
1394
|
}
|
|
1132
|
-
interface HubWorkflow {
|
|
1133
|
-
id: string;
|
|
1134
|
-
name: string;
|
|
1135
|
-
description: string | null;
|
|
1136
|
-
enabled: boolean;
|
|
1137
|
-
/** Compiled engine actions (connection refs resolved to ids). */
|
|
1138
|
-
actions: HubWorkflowAction[];
|
|
1139
|
-
/** The durable YAML this workflow compiled from. */
|
|
1140
|
-
definitionYaml: string | null;
|
|
1141
|
-
validationErrors: HubWorkflowValidationError[];
|
|
1142
|
-
/** Current head revision; null on pre-versioning rows until their next
|
|
1143
|
-
* update (they have no revision history to point at yet). */
|
|
1144
|
-
headRev?: number | null;
|
|
1145
|
-
/** Present on get/create/update detail responses; omitted on list. */
|
|
1146
|
-
triggers?: HubWorkflowTrigger[];
|
|
1147
|
-
/** Present on the detail response: the trigger fields a manual run must supply,
|
|
1148
|
-
* derived from the definition's `${trigger.*}` references (empty when none). */
|
|
1149
|
-
manualRunInputs?: HubManualRunInput[];
|
|
1150
|
-
/** Present on the get-detail response: the compiled graph topology (null
|
|
1151
|
-
* when the definition has no graph topology, or is chain-equivalent —
|
|
1152
|
-
* the legacy linear semantics). Omitted on the list projection. */
|
|
1153
|
-
graph?: HubWorkflowGraphSpec | null;
|
|
1154
|
-
/** Create response only, when the definition has a webhook trigger: the
|
|
1155
|
-
* hook delivery URL, plus the plaintext bearer token exactly once at mint
|
|
1156
|
-
* (absent when an active token already exists — rotate to re-reveal). */
|
|
1157
|
-
hook?: HubWorkflowHookEndpoint;
|
|
1158
|
-
/** Present on the list response (latest run, or null if never run); omitted on detail. */
|
|
1159
|
-
lastRun?: HubWorkflowRunSummary | null;
|
|
1160
|
-
createdAt: string;
|
|
1161
|
-
updatedAt: string;
|
|
1162
|
-
}
|
|
1163
|
-
/** A trigger field a manual "Run now" must supply (derived from the
|
|
1164
|
-
* definition's `${trigger.*}` references). `required` is false only when every
|
|
1165
|
-
* read is wrapped in a `default(...)`. */
|
|
1166
|
-
interface HubManualRunInput {
|
|
1167
|
-
path: string;
|
|
1168
|
-
required: boolean;
|
|
1169
|
-
}
|
|
1170
|
-
type HubWorkflowValidateResponse = {
|
|
1171
|
-
valid: true;
|
|
1172
|
-
name: string;
|
|
1173
|
-
actionCount: number;
|
|
1174
|
-
triggerCount: number;
|
|
1175
|
-
} | {
|
|
1176
|
-
valid: false;
|
|
1177
|
-
errors: HubWorkflowValidationError[];
|
|
1178
|
-
};
|
|
1179
|
-
/** JSON Schema for the YAML workflow definition. */
|
|
1180
|
-
type HubWorkflowSchemaResponse = Record<string, unknown>;
|
|
1181
|
-
/** How a node's incoming edges release it (default `"all"` — omitted on the
|
|
1182
|
-
* wire for it, so specs compiled before join rules existed round-trip). */
|
|
1183
|
-
type HubWorkflowGraphJoinRule = "all" | "any" | "any_failed" | "all_done";
|
|
1184
|
-
type HubWorkflowConditionOp = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains" | "exists" | "truthy";
|
|
1185
|
-
type HubWorkflowConditionScalar = string | number | boolean | null;
|
|
1186
|
-
/** The predicate on a guarded edge (`needs: [{ id, when }]`), evaluated by the
|
|
1187
|
-
* runner against the steps context on the source node's completion. */
|
|
1188
|
-
type HubWorkflowCondition = {
|
|
1189
|
-
path: string;
|
|
1190
|
-
op: HubWorkflowConditionOp;
|
|
1191
|
-
value?: HubWorkflowConditionScalar | HubWorkflowConditionScalar[];
|
|
1192
|
-
} | {
|
|
1193
|
-
all: HubWorkflowCondition[];
|
|
1194
|
-
} | {
|
|
1195
|
-
any: HubWorkflowCondition[];
|
|
1196
|
-
} | {
|
|
1197
|
-
not: HubWorkflowCondition;
|
|
1198
|
-
};
|
|
1199
|
-
interface HubWorkflowGraphNode {
|
|
1200
|
-
id: string;
|
|
1201
|
-
index: number;
|
|
1202
|
-
join?: HubWorkflowGraphJoinRule;
|
|
1203
|
-
}
|
|
1204
|
-
interface HubWorkflowGraphEdge {
|
|
1205
|
-
from: string;
|
|
1206
|
-
to: string;
|
|
1207
|
-
/** Guard the runner evaluates on the source's completion; unguarded edges
|
|
1208
|
-
* carry no `when`. */
|
|
1209
|
-
when?: HubWorkflowCondition;
|
|
1210
|
-
}
|
|
1211
|
-
/** JSON-serializable form of a validated graph (as stored on run/workflow rows). */
|
|
1212
|
-
interface HubWorkflowGraphSpec {
|
|
1213
|
-
nodes: HubWorkflowGraphNode[];
|
|
1214
|
-
edges: HubWorkflowGraphEdge[];
|
|
1215
|
-
maxNodeVisits: number;
|
|
1216
|
-
}
|
|
1217
1395
|
/** One journal completion on the wire: the node that completed and the guard
|
|
1218
1396
|
* verdict evaluated for each of its guarded outgoing edges, keyed by edgeKey
|
|
1219
1397
|
* (`"from->to"`). Only GUARDED edges ever appear. */
|
|
@@ -1234,182 +1412,43 @@ interface HubWorkflowOnErrorOutcome {
|
|
|
1234
1412
|
costUsd?: number;
|
|
1235
1413
|
};
|
|
1236
1414
|
}
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
source: HubWorkflowRevisionSource;
|
|
1249
|
-
note: string | null;
|
|
1250
|
-
status: HubWorkflowRevisionStatus;
|
|
1251
|
-
}
|
|
1252
|
-
/** One revision WITH its YAML (and the actions compiled alongside it). */
|
|
1253
|
-
interface HubWorkflowRevision extends HubWorkflowRevisionMeta {
|
|
1254
|
-
yaml: string;
|
|
1255
|
-
actions: HubWorkflowAction[];
|
|
1256
|
-
}
|
|
1257
|
-
/** A proposal (proposed or rejected revision) WITH its evidence — what the
|
|
1258
|
-
* proposer derived the suggestion from (e.g. health stats), plus
|
|
1259
|
-
* `rejectionReason` once declined. */
|
|
1260
|
-
interface HubWorkflowProposal extends HubWorkflowRevisionMeta {
|
|
1261
|
-
evidence: unknown;
|
|
1262
|
-
}
|
|
1263
|
-
/** Input to {@link HubWorkflowsClient.propose}. Service-token callers only. */
|
|
1264
|
-
interface HubWorkflowProposalInput {
|
|
1265
|
-
yaml: string;
|
|
1266
|
-
note?: string;
|
|
1267
|
-
/** Proposer-supplied justification (any JSON value) — carried verbatim onto
|
|
1268
|
-
* the revision and shown on the approval surface. */
|
|
1269
|
-
evidence?: unknown;
|
|
1270
|
-
}
|
|
1271
|
-
/** One node's aggregate across the analyzed runs. */
|
|
1272
|
-
interface HubWorkflowNodeHealth {
|
|
1273
|
-
/** The author's graph node id, or `step-N` for a linear run's nodes (and for
|
|
1274
|
-
* a node whose run cannot be mapped back to a definition). */
|
|
1275
|
-
nodeId: string;
|
|
1276
|
-
visits: number;
|
|
1277
|
-
failures: number;
|
|
1278
|
-
/** Null when no visit carried a cost row (never a fabricated 0). */
|
|
1279
|
-
totalCostUsd: number | null;
|
|
1280
|
-
/** Null when no visit recorded duration spans. */
|
|
1281
|
-
avgDurationMs: number | null;
|
|
1282
|
-
}
|
|
1283
|
-
/** Failures grouped by a normalized error signature (ids/numbers/whitespace
|
|
1284
|
-
* stripped), most frequent first (top 5). */
|
|
1285
|
-
interface HubWorkflowFailureCluster {
|
|
1286
|
-
signature: string;
|
|
1287
|
-
count: number;
|
|
1288
|
-
sampleRunIds: string[];
|
|
1289
|
-
}
|
|
1290
|
-
/** An agent.run node whose outputs are near-static across runs — a
|
|
1291
|
-
* CANDIDATE for distillation, reported with its measurements, never a
|
|
1292
|
-
* verdict. */
|
|
1293
|
-
interface HubWorkflowDistillationCandidate {
|
|
1294
|
-
nodeId: string;
|
|
1295
|
-
matchRatio: number;
|
|
1296
|
-
samples: number;
|
|
1297
|
-
avgCostUsd: number | null;
|
|
1298
|
-
}
|
|
1299
|
-
interface HubWorkflowHealth {
|
|
1300
|
-
/** The requested window (the `runs` parameter). */
|
|
1301
|
-
runsWindow: number;
|
|
1302
|
-
/** Terminal runs that actually went into the stats. */
|
|
1303
|
-
runsAnalyzed: number;
|
|
1304
|
-
nodes: HubWorkflowNodeHealth[];
|
|
1305
|
-
failureClusters: HubWorkflowFailureCluster[];
|
|
1306
|
-
distillationCandidates: HubWorkflowDistillationCandidate[];
|
|
1307
|
-
}
|
|
1308
|
-
/** One KV entry with its metadata — the get/put/cas response shape. */
|
|
1309
|
-
interface HubWorkflowKvEntry {
|
|
1310
|
-
key: string;
|
|
1311
|
-
value: unknown;
|
|
1312
|
-
version: number;
|
|
1313
|
-
updatedAt: string;
|
|
1314
|
-
}
|
|
1315
|
-
/** Keyspace metadata row (never the value) — the list response's entry. */
|
|
1316
|
-
interface HubWorkflowKvEntryMeta {
|
|
1317
|
-
key: string;
|
|
1318
|
-
version: number;
|
|
1319
|
-
updatedAt: string;
|
|
1320
|
-
}
|
|
1321
|
-
interface HubWorkflowKvListResponse {
|
|
1322
|
-
entries: HubWorkflowKvEntryMeta[];
|
|
1323
|
-
}
|
|
1324
|
-
interface HubWorkflowKvDeleteResponse {
|
|
1325
|
-
deleted: boolean;
|
|
1326
|
-
}
|
|
1327
|
-
/** The opaque ref a stored artifact is referred to by — the value a
|
|
1328
|
-
* script.run node returns as its step output. */
|
|
1329
|
-
interface HubWorkflowArtifactRef {
|
|
1330
|
-
$artifact: string;
|
|
1331
|
-
name: string;
|
|
1332
|
-
contentType: string;
|
|
1333
|
-
byteSize: number;
|
|
1334
|
-
preview: string | null;
|
|
1335
|
-
}
|
|
1336
|
-
/** Artifact metadata (never the bytes), oldest first on the list response. */
|
|
1337
|
-
interface HubWorkflowArtifact {
|
|
1338
|
-
id: string;
|
|
1339
|
-
runId: string;
|
|
1340
|
-
workflowId: string;
|
|
1341
|
-
/** The graph node (or `step-N` positional id on linear runs) whose action
|
|
1342
|
-
* emitted the artifact. */
|
|
1343
|
-
nodeId: string;
|
|
1344
|
-
name: string;
|
|
1345
|
-
contentType: string;
|
|
1346
|
-
byteSize: number;
|
|
1347
|
-
/** First 2KiB of textual content; null for binary content types. */
|
|
1348
|
-
preview: string | null;
|
|
1349
|
-
createdAt: string;
|
|
1350
|
-
}
|
|
1351
|
-
interface HubWorkflowArtifactsResponse {
|
|
1352
|
-
artifacts: HubWorkflowArtifact[];
|
|
1353
|
-
}
|
|
1354
|
-
/** Raw artifact bytes from the download route, with their stored content type. */
|
|
1355
|
-
interface HubWorkflowArtifactDownload {
|
|
1356
|
-
bytes: Uint8Array;
|
|
1357
|
-
contentType: string;
|
|
1415
|
+
/** One node's aggregate across the analyzed runs. */
|
|
1416
|
+
interface HubWorkflowNodeHealth {
|
|
1417
|
+
/** The author's graph node id, or `step-N` for a linear run's nodes (and for
|
|
1418
|
+
* a node whose run cannot be mapped back to a definition). */
|
|
1419
|
+
nodeId: string;
|
|
1420
|
+
visits: number;
|
|
1421
|
+
failures: number;
|
|
1422
|
+
/** Null when no visit carried a cost row (never a fabricated 0). */
|
|
1423
|
+
totalCostUsd: number | null;
|
|
1424
|
+
/** Null when no visit recorded duration spans. */
|
|
1425
|
+
avgDurationMs: number | null;
|
|
1358
1426
|
}
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
label: string;
|
|
1366
|
-
type: "string" | "integer";
|
|
1367
|
-
help?: string;
|
|
1368
|
-
example: string;
|
|
1427
|
+
/** Failures grouped by a normalized error signature (ids/numbers/whitespace
|
|
1428
|
+
* stripped), most frequent first (top 5). */
|
|
1429
|
+
interface HubWorkflowFailureCluster {
|
|
1430
|
+
signature: string;
|
|
1431
|
+
count: number;
|
|
1432
|
+
sampleRunIds: string[];
|
|
1369
1433
|
}
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
providers: string[];
|
|
1379
|
-
parameters: HubWorkflowTemplateParameter[];
|
|
1380
|
-
/** The template with parameter tokens rendered to their example values. */
|
|
1381
|
-
previewYaml: string;
|
|
1434
|
+
/** An agent.run node whose outputs are near-static across runs — a
|
|
1435
|
+
* CANDIDATE for distillation, reported with its measurements, never a
|
|
1436
|
+
* verdict. */
|
|
1437
|
+
interface HubWorkflowDistillationCandidate {
|
|
1438
|
+
nodeId: string;
|
|
1439
|
+
matchRatio: number;
|
|
1440
|
+
samples: number;
|
|
1441
|
+
avgCostUsd: number | null;
|
|
1382
1442
|
}
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
/** Another requirement in the same list that must be satisfied first — a
|
|
1392
|
-
* `github_app` install is claimed through the `github` connection, so it is
|
|
1393
|
-
* refused while that connection is missing. Null when nothing blocks this
|
|
1394
|
-
* requirement. The list is ordered prerequisite-first. */
|
|
1395
|
-
prerequisite: {
|
|
1396
|
-
provider: string;
|
|
1397
|
-
kind: "integration" | "github_app";
|
|
1398
|
-
} | null;
|
|
1443
|
+
interface HubWorkflowHealth {
|
|
1444
|
+
/** The requested window (the `runs` parameter). */
|
|
1445
|
+
runsWindow: number;
|
|
1446
|
+
/** Terminal runs that actually went into the stats. */
|
|
1447
|
+
runsAnalyzed: number;
|
|
1448
|
+
nodes: HubWorkflowNodeHealth[];
|
|
1449
|
+
failureClusters: HubWorkflowFailureCluster[];
|
|
1450
|
+
distillationCandidates: HubWorkflowDistillationCandidate[];
|
|
1399
1451
|
}
|
|
1400
|
-
/**
|
|
1401
|
-
* Result of instantiating a template. `created: false` is NOT an error — an
|
|
1402
|
-
* actionable continuation listing the connections to satisfy before retrying
|
|
1403
|
-
* the same call. Invalid parameters or a compile failure throw `HubSdkError`
|
|
1404
|
-
* (400) instead, matching the create route's contract.
|
|
1405
|
-
*/
|
|
1406
|
-
type HubWorkflowTemplateInstantiateResult = {
|
|
1407
|
-
created: true;
|
|
1408
|
-
workflow: HubWorkflow;
|
|
1409
|
-
} | {
|
|
1410
|
-
created: false;
|
|
1411
|
-
connectionRequirements: HubWorkflowConnectionRequirement[];
|
|
1412
|
-
};
|
|
1413
1452
|
type HubWorkflowDecisionStatus = "pending" | "resolved" | "expired" | "cancelled";
|
|
1414
1453
|
type HubWorkflowDecisionOnTimeout = "wait" | "fail" | "default";
|
|
1415
1454
|
/** How the answer arrived: a UI click, a provider-channel event (e.g. a Slack
|
|
@@ -1456,16 +1495,6 @@ interface HubWorkflowDecisionResolveResult {
|
|
|
1456
1495
|
choice: string;
|
|
1457
1496
|
resumed: boolean;
|
|
1458
1497
|
}
|
|
1459
|
-
/** A workflow's webhook delivery endpoint. `token` is the plaintext bearer —
|
|
1460
|
-
* revealed only at mint/rotate time (only the hash is stored). */
|
|
1461
|
-
interface HubWorkflowHookEndpoint {
|
|
1462
|
-
url: string;
|
|
1463
|
-
token?: string;
|
|
1464
|
-
}
|
|
1465
|
-
interface HubWorkflowHookToken {
|
|
1466
|
-
url: string;
|
|
1467
|
-
token: string;
|
|
1468
|
-
}
|
|
1469
1498
|
/** One step of an agent round's execution timeline (reasoning, or a tool call
|
|
1470
1499
|
* with args + result), as the step-page endpoint serves it. */
|
|
1471
1500
|
type HubWorkflowAgentStep = {
|
|
@@ -1486,297 +1515,243 @@ interface HubWorkflowRunStepsPage {
|
|
|
1486
1515
|
nextCursor: number | null;
|
|
1487
1516
|
}
|
|
1488
1517
|
//#endregion
|
|
1489
|
-
//#region src/
|
|
1490
|
-
interface
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
clientSecret: string;
|
|
1494
|
-
fetch?: typeof fetch;
|
|
1495
|
-
}
|
|
1496
|
-
interface HubAppBrokerToken {
|
|
1497
|
-
accessToken: string;
|
|
1498
|
-
expiresIn: number;
|
|
1499
|
-
scopes: string[];
|
|
1500
|
-
}
|
|
1501
|
-
interface HubAppBrokerExchange extends HubAppBrokerToken {
|
|
1502
|
-
grantId: string;
|
|
1503
|
-
connectionId: string;
|
|
1518
|
+
//#region src/workflow-definition-types.d.ts
|
|
1519
|
+
interface HubWorkflowAction {
|
|
1520
|
+
kind: string;
|
|
1521
|
+
config: Record<string, unknown>;
|
|
1504
1522
|
}
|
|
1505
|
-
/**
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
private readonly fetcher;
|
|
1511
|
-
constructor(options: HubAppBrokerOptions);
|
|
1512
|
-
private token;
|
|
1513
|
-
private readToken;
|
|
1514
|
-
exchange(input: {
|
|
1515
|
-
code: string;
|
|
1516
|
-
redirectUri: string;
|
|
1517
|
-
connectionId?: string;
|
|
1518
|
-
}): Promise<HubAppBrokerExchange>;
|
|
1519
|
-
mint(grantId: string): Promise<HubAppBrokerToken>;
|
|
1520
|
-
invoke<T = unknown>(grantId: string, connectionId: string, actionPath: string, input: Record<string, unknown>): Promise<HubExecResponse<T>>;
|
|
1523
|
+
/** Inbound-event matcher for a `provider_event` trigger. */
|
|
1524
|
+
interface HubWorkflowEventFilter {
|
|
1525
|
+
event: string;
|
|
1526
|
+
action?: string;
|
|
1527
|
+
repo?: string;
|
|
1521
1528
|
}
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
/**
|
|
1534
|
-
|
|
1535
|
-
/** Contiguity Console secret, or an existing Inkbox identity signing key. */
|
|
1536
|
-
signingSecret?: string;
|
|
1529
|
+
interface HubWorkflowTrigger {
|
|
1530
|
+
id: string;
|
|
1531
|
+
kind: "provider_event" | "schedule" | "webhook";
|
|
1532
|
+
enabled: boolean;
|
|
1533
|
+
provider: string | null;
|
|
1534
|
+
connectionId: string | null;
|
|
1535
|
+
eventFilter: HubWorkflowEventFilter | null;
|
|
1536
|
+
cron: string | null;
|
|
1537
|
+
timezone: string | null;
|
|
1538
|
+
nextFireAt: string | null;
|
|
1539
|
+
lastFiredAt: string | null;
|
|
1540
|
+
/** Schedule only: the ISO-8601 instant it stops firing; null when unbounded. */
|
|
1541
|
+
until: string | null;
|
|
1537
1542
|
}
|
|
1538
|
-
interface
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
secret?: string;
|
|
1544
|
-
inboundAddress?: string;
|
|
1545
|
-
requiresProviderSetup?: boolean;
|
|
1543
|
+
interface HubWorkflowValidationError {
|
|
1544
|
+
path: string;
|
|
1545
|
+
message: string;
|
|
1546
|
+
/** Machine-readable reason where one is defined, e.g. `schedule_outlives_grant`. */
|
|
1547
|
+
code?: string;
|
|
1546
1548
|
}
|
|
1547
|
-
interface
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1549
|
+
interface HubWorkflow {
|
|
1550
|
+
id: string;
|
|
1551
|
+
name: string;
|
|
1552
|
+
description: string | null;
|
|
1553
|
+
enabled: boolean;
|
|
1554
|
+
/** Compiled engine actions (connection refs resolved to ids). */
|
|
1555
|
+
actions: HubWorkflowAction[];
|
|
1556
|
+
/** The durable YAML this workflow compiled from. */
|
|
1557
|
+
definitionYaml: string | null;
|
|
1558
|
+
validationErrors: HubWorkflowValidationError[];
|
|
1559
|
+
/** Current head revision; null on pre-versioning rows until their next
|
|
1560
|
+
* update (they have no revision history to point at yet). */
|
|
1561
|
+
headRev?: number | null;
|
|
1562
|
+
/** Present on get/create/update detail responses; omitted on list. */
|
|
1563
|
+
triggers?: HubWorkflowTrigger[];
|
|
1564
|
+
/** Present on the detail response: the trigger fields a manual run must supply,
|
|
1565
|
+
* derived from the definition's `${trigger.*}` references (empty when none). */
|
|
1566
|
+
manualRunInputs?: HubManualRunInput[];
|
|
1567
|
+
/** Present on the get-detail response: the compiled graph topology (null
|
|
1568
|
+
* when the definition has no graph topology, or is chain-equivalent —
|
|
1569
|
+
* the legacy linear semantics). Omitted on the list projection. */
|
|
1570
|
+
graph?: HubWorkflowGraphSpec | null;
|
|
1571
|
+
/** Create response only, when the definition has a webhook trigger: the
|
|
1572
|
+
* hook delivery URL, plus the plaintext bearer token exactly once at mint
|
|
1573
|
+
* (absent when an active token already exists — rotate to re-reveal). */
|
|
1574
|
+
hook?: HubWorkflowHookEndpoint;
|
|
1575
|
+
/** Present on the list response (latest run, or null if never run); omitted on detail. */
|
|
1576
|
+
lastRun?: HubWorkflowRunSummary | null;
|
|
1577
|
+
createdAt: string;
|
|
1578
|
+
updatedAt: string;
|
|
1553
1579
|
}
|
|
1554
|
-
/**
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1580
|
+
/** A trigger field a manual "Run now" must supply (derived from the
|
|
1581
|
+
* definition's `${trigger.*}` references). `required` is false only when every
|
|
1582
|
+
* read is wrapped in a `default(...)`. */
|
|
1583
|
+
interface HubManualRunInput {
|
|
1584
|
+
path: string;
|
|
1585
|
+
required: boolean;
|
|
1560
1586
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1587
|
+
type HubWorkflowValidateResponse = {
|
|
1588
|
+
valid: true;
|
|
1589
|
+
name: string;
|
|
1590
|
+
actionCount: number;
|
|
1591
|
+
triggerCount: number;
|
|
1592
|
+
} | {
|
|
1593
|
+
valid: false;
|
|
1594
|
+
errors: HubWorkflowValidationError[];
|
|
1595
|
+
};
|
|
1596
|
+
/** JSON Schema for the YAML workflow definition. */
|
|
1597
|
+
type HubWorkflowSchemaResponse = Record<string, unknown>;
|
|
1598
|
+
type HubWorkflowRevisionSource = "user" | "copilot" | "intelligence";
|
|
1599
|
+
/** Lifecycle state of a revision. The head rev only ever points at an
|
|
1600
|
+
* `applied` revision; `proposed` is a service-token-authored suggestion
|
|
1601
|
+
* awaiting an owner decision; `rejected` is a declined proposal (kept for
|
|
1602
|
+
* audit). */
|
|
1603
|
+
type HubWorkflowRevisionStatus = "applied" | "proposed" | "rejected";
|
|
1604
|
+
/** Revision list projection — attribution + note + status, WITHOUT the YAML body. */
|
|
1605
|
+
interface HubWorkflowRevisionMeta {
|
|
1606
|
+
rev: number;
|
|
1607
|
+
createdAt: string;
|
|
1608
|
+
createdBy: string;
|
|
1609
|
+
source: HubWorkflowRevisionSource;
|
|
1610
|
+
note: string | null;
|
|
1611
|
+
status: HubWorkflowRevisionStatus;
|
|
1573
1612
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
generation: string;
|
|
1613
|
+
/** One revision WITH its YAML (and the actions compiled alongside it). */
|
|
1614
|
+
interface HubWorkflowRevision extends HubWorkflowRevisionMeta {
|
|
1615
|
+
yaml: string;
|
|
1616
|
+
actions: HubWorkflowAction[];
|
|
1579
1617
|
}
|
|
1580
|
-
/**
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1618
|
+
/** A proposal (proposed or rejected revision) WITH its evidence — what the
|
|
1619
|
+
* proposer derived the suggestion from (e.g. health stats), plus
|
|
1620
|
+
* `rejectionReason` once declined. */
|
|
1621
|
+
interface HubWorkflowProposal extends HubWorkflowRevisionMeta {
|
|
1622
|
+
evidence: unknown;
|
|
1585
1623
|
}
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
connectionId: string;
|
|
1594
|
-
owner: string;
|
|
1595
|
-
repo: string;
|
|
1596
|
-
ref: string;
|
|
1597
|
-
pathPrefix?: string;
|
|
1598
|
-
} | {
|
|
1599
|
-
kind: "url";
|
|
1600
|
-
url: string;
|
|
1601
|
-
} | {
|
|
1602
|
-
kind: "s3";
|
|
1603
|
-
connectionId: string;
|
|
1604
|
-
bucket: string;
|
|
1605
|
-
prefix: string;
|
|
1606
|
-
} | {
|
|
1607
|
-
kind: "vector";
|
|
1608
|
-
connectionId: string;
|
|
1609
|
-
provider: "pinecone" | "qdrant" | "weaviate";
|
|
1610
|
-
indexName: string;
|
|
1611
|
-
namespace?: string;
|
|
1612
|
-
embedding: KnowledgeEmbeddingSpace;
|
|
1613
|
-
textField: string;
|
|
1614
|
-
sourceUriField: string;
|
|
1615
|
-
};
|
|
1616
|
-
interface KnowledgeCapability {
|
|
1617
|
-
supported: boolean;
|
|
1618
|
-
reason?: string;
|
|
1624
|
+
/** Input to {@link HubWorkflowsClient.propose}. Service-token callers only. */
|
|
1625
|
+
interface HubWorkflowProposalInput {
|
|
1626
|
+
yaml: string;
|
|
1627
|
+
note?: string;
|
|
1628
|
+
/** Proposer-supplied justification (any JSON value) — carried verbatim onto
|
|
1629
|
+
* the revision and shown on the approval surface. */
|
|
1630
|
+
evidence?: unknown;
|
|
1619
1631
|
}
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1632
|
+
type HubWorkflowTemplateCategory = "Code Review" | "Triage" | "Reports" | "Multi-agent";
|
|
1633
|
+
/** One author-time literal a gallery starter needs the user to supply. Every
|
|
1634
|
+
* declared parameter is required; `example` is a valid value that seeds the
|
|
1635
|
+
* form placeholder. */
|
|
1636
|
+
interface HubWorkflowTemplateParameter {
|
|
1637
|
+
key: string;
|
|
1638
|
+
label: string;
|
|
1639
|
+
type: "string" | "integer";
|
|
1640
|
+
help?: string;
|
|
1641
|
+
example: string;
|
|
1642
|
+
default?: string;
|
|
1643
|
+
defaultFrom?: "native_evaluation";
|
|
1644
|
+
required?: boolean;
|
|
1645
|
+
advanced?: boolean;
|
|
1633
1646
|
}
|
|
1634
|
-
interface
|
|
1635
|
-
/** Required query authorization, not proof that an owner policy currently permits it. */
|
|
1636
|
-
retrieval?: {
|
|
1637
|
-
kind: "lexical";
|
|
1638
|
-
} | {
|
|
1639
|
-
kind: "vector";
|
|
1640
|
-
embeddingPolicy: {
|
|
1641
|
-
connectionId: string;
|
|
1642
|
-
actionPath: "openai.embeddings.create";
|
|
1643
|
-
scope: "owner-connection-action";
|
|
1644
|
-
};
|
|
1645
|
-
};
|
|
1647
|
+
interface HubWorkflowTemplate {
|
|
1646
1648
|
id: string;
|
|
1647
1649
|
name: string;
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1650
|
+
summary: string;
|
|
1651
|
+
category: HubWorkflowTemplateCategory;
|
|
1652
|
+
icon: string;
|
|
1653
|
+
requiresSandbox: boolean;
|
|
1654
|
+
/** Providers the template references (a "uses GitHub" hint), sorted. */
|
|
1655
|
+
providers: string[];
|
|
1656
|
+
parameters: HubWorkflowTemplateParameter[];
|
|
1657
|
+
/** The template with parameter tokens rendered to their example values. */
|
|
1658
|
+
previewYaml: string;
|
|
1659
|
+
setupNotes?: string[];
|
|
1660
|
+
}
|
|
1661
|
+
/** A connection a definition needs, with where to connect it. */
|
|
1662
|
+
interface HubWorkflowConnectionRequirement {
|
|
1663
|
+
provider: string;
|
|
1664
|
+
connected: boolean;
|
|
1665
|
+
kind: "integration" | "github_app";
|
|
1666
|
+
/** Where to satisfy the requirement (App install flow for `github_app`,
|
|
1667
|
+
* integrations page otherwise); null when no target exists. */
|
|
1668
|
+
connectUrl: string | null;
|
|
1669
|
+
/** Another requirement in the same list that must be satisfied first — a
|
|
1670
|
+
* `github_app` install is claimed through the `github` connection, so it is
|
|
1671
|
+
* refused while that connection is missing. Null when nothing blocks this
|
|
1672
|
+
* requirement. The list is ordered prerequisite-first. */
|
|
1673
|
+
prerequisite: {
|
|
1674
|
+
provider: string;
|
|
1675
|
+
kind: "integration" | "github_app";
|
|
1670
1676
|
} | null;
|
|
1671
|
-
updatedAt: string;
|
|
1672
1677
|
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1678
|
+
/** Stable identity shared by workflow connection requirements and prerequisite references. */
|
|
1679
|
+
declare function workflowConnectionRequirementKey(ref: Readonly<Pick<HubWorkflowConnectionRequirement, "provider" | "kind">>): string;
|
|
1680
|
+
/**
|
|
1681
|
+
* Result of instantiating a template. `created: false` is NOT an error — an
|
|
1682
|
+
* actionable continuation listing the connections to satisfy before retrying
|
|
1683
|
+
* the same call. Invalid parameters or a compile failure throw `HubSdkError`
|
|
1684
|
+
* (400) instead, matching the create route's contract.
|
|
1685
|
+
*/
|
|
1686
|
+
type HubWorkflowTemplateInstantiateResult = {
|
|
1687
|
+
created: true;
|
|
1688
|
+
workflow: HubWorkflow;
|
|
1675
1689
|
} | {
|
|
1676
|
-
|
|
1677
|
-
|
|
1690
|
+
created: false;
|
|
1691
|
+
connectionRequirements: HubWorkflowConnectionRequirement[];
|
|
1678
1692
|
};
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
sandboxId: string;
|
|
1685
|
-
generation: string;
|
|
1686
|
-
status: "active" | "detached";
|
|
1693
|
+
/** A workflow's webhook delivery endpoint. `token` is the plaintext bearer —
|
|
1694
|
+
* revealed only at mint/rotate time (only the hash is stored). */
|
|
1695
|
+
interface HubWorkflowHookEndpoint {
|
|
1696
|
+
url: string;
|
|
1697
|
+
token?: string;
|
|
1687
1698
|
}
|
|
1688
|
-
interface
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
source: KnowledgeSourceInput;
|
|
1692
|
-
target?: {
|
|
1693
|
-
kind: "lexical";
|
|
1694
|
-
} | {
|
|
1695
|
-
kind: "managed-vector";
|
|
1696
|
-
provider: "qdrant";
|
|
1697
|
-
connectionId: string;
|
|
1698
|
-
embedding: KnowledgeEmbeddingSpace;
|
|
1699
|
-
};
|
|
1699
|
+
interface HubWorkflowHookToken {
|
|
1700
|
+
url: string;
|
|
1701
|
+
token: string;
|
|
1700
1702
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1703
|
+
//#endregion
|
|
1704
|
+
//#region src/workflow-storage-types.d.ts
|
|
1705
|
+
/** One KV entry with its metadata — the get/put/cas response shape. */
|
|
1706
|
+
interface HubWorkflowKvEntry {
|
|
1707
|
+
key: string;
|
|
1708
|
+
value: unknown;
|
|
1709
|
+
version: number;
|
|
1710
|
+
updatedAt: string;
|
|
1707
1711
|
}
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
references: KnowledgeReference[];
|
|
1714
|
-
}): Promise<KnowledgeAttachment[]>;
|
|
1715
|
-
authorization(): Promise<KnowledgeAuthorization>;
|
|
1716
|
-
disconnectAuthorization(): Promise<{
|
|
1717
|
-
revoked: true;
|
|
1718
|
-
}>;
|
|
1719
|
-
capabilities(): Promise<KnowledgeCapabilities>;
|
|
1720
|
-
list(): Promise<KnowledgeSourceSummary[]>;
|
|
1721
|
-
get(sourceId: string): Promise<KnowledgeSourceSummary>;
|
|
1722
|
-
create(input: KnowledgeSourceCreate): Promise<KnowledgeSourceSummary>;
|
|
1723
|
-
refresh(sourceId: string, input: {
|
|
1724
|
-
requestId: string;
|
|
1725
|
-
approvalToken?: string;
|
|
1726
|
-
}): Promise<KnowledgeSourceSummary>;
|
|
1727
|
-
attach(sourceId: string, input: {
|
|
1728
|
-
sandboxId: string;
|
|
1729
|
-
generation: string;
|
|
1730
|
-
expectedGeneration?: string;
|
|
1731
|
-
}): Promise<KnowledgeAttachment>;
|
|
1732
|
-
attachments(sandboxId?: string): Promise<KnowledgeAttachment[]>;
|
|
1733
|
-
detach(attachmentId: string): Promise<KnowledgeAttachment>;
|
|
1712
|
+
/** Keyspace metadata row (never the value) — the list response's entry. */
|
|
1713
|
+
interface HubWorkflowKvEntryMeta {
|
|
1714
|
+
key: string;
|
|
1715
|
+
version: number;
|
|
1716
|
+
updatedAt: string;
|
|
1734
1717
|
}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
interface HubKnowledgeRetrievalResult {
|
|
1738
|
-
attachmentId: string;
|
|
1739
|
-
generation: string;
|
|
1740
|
-
provenance: "ingested" | "record-supplied";
|
|
1741
|
-
hits: Array<{
|
|
1742
|
-
id: string;
|
|
1743
|
-
title: string;
|
|
1744
|
-
snippet: string;
|
|
1745
|
-
score?: number;
|
|
1746
|
-
citations?: Array<{
|
|
1747
|
-
sourceId: string;
|
|
1748
|
-
sourceUri: string;
|
|
1749
|
-
revision?: string;
|
|
1750
|
-
}>;
|
|
1751
|
-
}>;
|
|
1752
|
-
elapsedMs?: number;
|
|
1718
|
+
interface HubWorkflowKvListResponse {
|
|
1719
|
+
entries: HubWorkflowKvEntryMeta[];
|
|
1753
1720
|
}
|
|
1754
|
-
interface
|
|
1755
|
-
|
|
1756
|
-
/** Individual unavailable sources do not hide evidence from healthy sources. */
|
|
1757
|
-
failures: Array<{
|
|
1758
|
-
attachmentId: string;
|
|
1759
|
-
code: string;
|
|
1760
|
-
message: string;
|
|
1761
|
-
}>;
|
|
1762
|
-
partial: boolean;
|
|
1721
|
+
interface HubWorkflowKvDeleteResponse {
|
|
1722
|
+
deleted: boolean;
|
|
1763
1723
|
}
|
|
1764
|
-
/**
|
|
1765
|
-
*
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1724
|
+
/** The opaque ref a stored artifact is referred to by — the value a
|
|
1725
|
+
* script.run node returns as its step output. */
|
|
1726
|
+
interface HubWorkflowArtifactRef {
|
|
1727
|
+
$artifact: string;
|
|
1728
|
+
name: string;
|
|
1729
|
+
contentType: string;
|
|
1730
|
+
byteSize: number;
|
|
1731
|
+
preview: string | null;
|
|
1732
|
+
}
|
|
1733
|
+
/** Artifact metadata (never the bytes), oldest first on the list response. */
|
|
1734
|
+
interface HubWorkflowArtifact {
|
|
1735
|
+
id: string;
|
|
1736
|
+
runId: string;
|
|
1737
|
+
workflowId: string;
|
|
1738
|
+
/** The graph node (or `step-N` positional id on linear runs) whose action
|
|
1739
|
+
* emitted the artifact. */
|
|
1740
|
+
nodeId: string;
|
|
1741
|
+
name: string;
|
|
1742
|
+
contentType: string;
|
|
1743
|
+
byteSize: number;
|
|
1744
|
+
/** First 2KiB of textual content; null for binary content types. */
|
|
1745
|
+
preview: string | null;
|
|
1746
|
+
createdAt: string;
|
|
1747
|
+
}
|
|
1748
|
+
interface HubWorkflowArtifactsResponse {
|
|
1749
|
+
artifacts: HubWorkflowArtifact[];
|
|
1750
|
+
}
|
|
1751
|
+
/** Raw artifact bytes from the download route, with their stored content type. */
|
|
1752
|
+
interface HubWorkflowArtifactDownload {
|
|
1753
|
+
bytes: Uint8Array;
|
|
1754
|
+
contentType: string;
|
|
1780
1755
|
}
|
|
1781
1756
|
//#endregion
|
|
1782
1757
|
//#region src/lines.d.ts
|
|
@@ -2118,7 +2093,7 @@ declare class HubManagedNumbersClient {
|
|
|
2118
2093
|
private post;
|
|
2119
2094
|
}
|
|
2120
2095
|
//#endregion
|
|
2121
|
-
//#region src/
|
|
2096
|
+
//#region src/transport.d.ts
|
|
2122
2097
|
type HubAuthHeaders = () => HeadersInit | Promise<HeadersInit>;
|
|
2123
2098
|
interface HubClientOptions {
|
|
2124
2099
|
baseUrl: string;
|
|
@@ -2134,76 +2109,46 @@ declare class HubSdkError extends Error {
|
|
|
2134
2109
|
status?: number;
|
|
2135
2110
|
});
|
|
2136
2111
|
}
|
|
2137
|
-
declare const HUB_URL_ENV_VAR: "TANGLE_HUB_URL";
|
|
2138
|
-
declare const HUB_API_KEY_ENV_VAR: "TANGLE_API_KEY";
|
|
2139
|
-
declare const HUB_CAPABILITY_TOKEN_ENV_VAR: "TANGLE_HUB_CAPABILITY_TOKEN";
|
|
2140
|
-
type HubEnv = Record<string, string | undefined>;
|
|
2141
|
-
interface HubClientFromEnvOptions {
|
|
2142
|
-
env?: HubEnv;
|
|
2143
|
-
apiKey?: string;
|
|
2144
|
-
authHeaders?: HubAuthHeaders;
|
|
2145
|
-
fetch?: typeof fetch;
|
|
2146
|
-
}
|
|
2147
|
-
declare function resolveHubBaseUrl(env?: HubEnv): string;
|
|
2148
|
-
declare function resolveHubAuth(env?: HubEnv): string;
|
|
2149
2112
|
declare class HubTransport {
|
|
2113
|
+
#private;
|
|
2150
2114
|
readonly baseUrl: string;
|
|
2151
2115
|
readonly fetch: typeof fetch;
|
|
2152
|
-
readonly apiKey?: string;
|
|
2153
2116
|
readonly authHeaders?: HubAuthHeaders;
|
|
2154
2117
|
constructor(options: HubClientOptions);
|
|
2118
|
+
/** The API key this client authenticates with, when it has one. */
|
|
2119
|
+
get apiKey(): string | undefined;
|
|
2155
2120
|
protected request<TData>(path: string, init: RequestInit, options?: {
|
|
2156
2121
|
auth?: "client" | "caller";
|
|
2157
2122
|
validateData?: (data: unknown) => data is TData;
|
|
2158
2123
|
}): Promise<TData>;
|
|
2159
2124
|
protected buildHeaders(headers: HeadersInit | undefined, callerAuth?: boolean): Promise<Headers>;
|
|
2160
2125
|
}
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
readonly lines: HubLinesClient;
|
|
2177
|
-
constructor(options: HubClientOptions);
|
|
2178
|
-
static fromEnv(options?: HubClientFromEnvOptions): HubClient;
|
|
2179
|
-
status(): Promise<HubStatusResponse>;
|
|
2180
|
-
/**
|
|
2181
|
-
* Open a streaming (Server-Sent Events) response and return its raw body.
|
|
2182
|
-
* Shares auth-header building + `fetch` with {@link request}, but does NOT
|
|
2183
|
-
* buffer or JSON-parse the body — the caller consumes the stream.
|
|
2184
|
-
*
|
|
2185
|
-
* A successful stream comes back as `text/event-stream`. Anything else is an
|
|
2186
|
-
* error envelope (404/429/401 JSON) or a transport failure (gateway/HTML
|
|
2187
|
-
* page); it is surfaced the same way {@link request} surfaces errors — a
|
|
2188
|
-
* typed `HubSdkError` from a `{success:false}` envelope, otherwise an
|
|
2189
|
-
* `HUB_HTTP_<status>` transport error — rather than handed back as bogus SSE.
|
|
2190
|
-
*/
|
|
2191
|
-
private stream;
|
|
2192
|
-
/**
|
|
2193
|
-
* Fetch raw (non-envelope) bytes — the artifact download route, whose 200 is
|
|
2194
|
-
* the artifact's own content type, not JSON. Error responses on such routes
|
|
2195
|
-
* are still the standard envelope, so a failure surfaces exactly like
|
|
2196
|
-
* {@link request}: a typed `HubSdkError` from a `{success:false}` body,
|
|
2197
|
-
* otherwise an `HUB_HTTP_<status>` transport error.
|
|
2198
|
-
*/
|
|
2199
|
-
private requestBytes;
|
|
2126
|
+
/** Domain clients receive the existing envelope transport as one request function. */
|
|
2127
|
+
type HubRequest = <TData>(path: string, init: RequestInit) => Promise<TData>;
|
|
2128
|
+
type HubStreamRequest = (path: string, init: RequestInit) => Promise<ReadableStream<Uint8Array>>;
|
|
2129
|
+
type HubArtifactRequest = (path: string, init: RequestInit) => Promise<HubWorkflowArtifactDownload>;
|
|
2130
|
+
//#endregion
|
|
2131
|
+
//#region src/environment.d.ts
|
|
2132
|
+
declare const HUB_URL_ENV_VAR: "TANGLE_HUB_URL";
|
|
2133
|
+
declare const HUB_API_KEY_ENV_VAR: "TANGLE_API_KEY";
|
|
2134
|
+
declare const HUB_CAPABILITY_TOKEN_ENV_VAR: "TANGLE_HUB_CAPABILITY_TOKEN";
|
|
2135
|
+
type HubEnv = Record<string, string | undefined>;
|
|
2136
|
+
interface HubClientFromEnvOptions {
|
|
2137
|
+
env?: HubEnv;
|
|
2138
|
+
apiKey?: string;
|
|
2139
|
+
authHeaders?: HubAuthHeaders;
|
|
2140
|
+
fetch?: typeof fetch;
|
|
2200
2141
|
}
|
|
2142
|
+
declare function resolveHubBaseUrl(env?: HubEnv): string;
|
|
2143
|
+
declare function resolveHubAuth(env?: HubEnv): string;
|
|
2144
|
+
//#endregion
|
|
2145
|
+
//#region src/authorization.d.ts
|
|
2201
2146
|
interface HubTokenListOptions {
|
|
2202
2147
|
includeExpired?: boolean;
|
|
2203
2148
|
}
|
|
2204
2149
|
declare class HubTokensClient {
|
|
2205
2150
|
private readonly request;
|
|
2206
|
-
constructor(request:
|
|
2151
|
+
constructor(request: HubRequest);
|
|
2207
2152
|
mint(options: {
|
|
2208
2153
|
actionPath: string;
|
|
2209
2154
|
connectionId?: string;
|
|
@@ -2215,7 +2160,7 @@ declare class HubTokensClient {
|
|
|
2215
2160
|
}
|
|
2216
2161
|
declare class HubPermissionsClient {
|
|
2217
2162
|
private readonly request;
|
|
2218
|
-
constructor(request:
|
|
2163
|
+
constructor(request: HubRequest);
|
|
2219
2164
|
list(connectionId: string): Promise<HubPolicyListResponse>;
|
|
2220
2165
|
set(input: HubPolicyUpdateRequest): Promise<HubPolicyResponse>;
|
|
2221
2166
|
/** Reset an action to its default by deleting any stored override. */
|
|
@@ -2228,6 +2173,15 @@ declare class HubPermissionsClient {
|
|
|
2228
2173
|
* connection. Manual per-action decisions are left intact. */
|
|
2229
2174
|
revertWrites(connectionId: string): Promise<HubRevertWritesResponse>;
|
|
2230
2175
|
}
|
|
2176
|
+
declare class HubApprovalsClient {
|
|
2177
|
+
private readonly request;
|
|
2178
|
+
constructor(request: HubRequest);
|
|
2179
|
+
list(): Promise<HubApprovalListResponse>;
|
|
2180
|
+
approve(approvalId: string): Promise<HubApprovalDecisionResponse>;
|
|
2181
|
+
deny(approvalId: string): Promise<HubApprovalDecisionResponse>;
|
|
2182
|
+
}
|
|
2183
|
+
//#endregion
|
|
2184
|
+
//#region src/tools.d.ts
|
|
2231
2185
|
interface HubToolSearchOptions {
|
|
2232
2186
|
provider?: string;
|
|
2233
2187
|
/** Max tools to return. The server defaults to a relevance-ranked shortlist
|
|
@@ -2251,7 +2205,7 @@ interface HubToolInvokeOptions {
|
|
|
2251
2205
|
}
|
|
2252
2206
|
declare class HubToolsClient {
|
|
2253
2207
|
private readonly request;
|
|
2254
|
-
constructor(request:
|
|
2208
|
+
constructor(request: HubRequest);
|
|
2255
2209
|
search(query: string, options?: HubToolSearchOptions): Promise<HubToolsSearchResponse>;
|
|
2256
2210
|
sources(): Promise<HubToolSourcesResponse>;
|
|
2257
2211
|
describe(path: string): Promise<HubToolsDescribeResponse>;
|
|
@@ -2263,6 +2217,60 @@ declare class HubToolsClient {
|
|
|
2263
2217
|
invoke<TResult = unknown>(path: string, raw: unknown, options?: HubToolInvokeOptions): Promise<HubExecResponse<TResult>>;
|
|
2264
2218
|
private buildExecInit;
|
|
2265
2219
|
}
|
|
2220
|
+
//#endregion
|
|
2221
|
+
//#region src/inbound-webhooks.d.ts
|
|
2222
|
+
/** Provider setup uses the existing authenticated Hub transport and vault. */
|
|
2223
|
+
interface HubInboundWebhookCreateOptions {
|
|
2224
|
+
/** Inkbox identity that owns all selected channels. */
|
|
2225
|
+
identityId?: string;
|
|
2226
|
+
mailboxId?: string;
|
|
2227
|
+
phoneNumberId?: string;
|
|
2228
|
+
imessage?: boolean;
|
|
2229
|
+
/** Linq: explicit owned lines; omitted does not mean every account line. */
|
|
2230
|
+
phoneNumbers?: string[];
|
|
2231
|
+
/** Linq WhatsApp: explicit opaque IDs from numbers.list, not E.164 phone strings. */
|
|
2232
|
+
phoneNumberIds?: string[];
|
|
2233
|
+
/** Contiguity Console secret, or an existing Inkbox identity signing key. */
|
|
2234
|
+
signingSecret?: string;
|
|
2235
|
+
}
|
|
2236
|
+
interface HubInboundWebhookCreateResponse {
|
|
2237
|
+
url: string;
|
|
2238
|
+
/** True only when the provider subscription was created by the server. */
|
|
2239
|
+
provisioned?: boolean;
|
|
2240
|
+
/** Self-configured legacy providers can return a newly minted secret once. */
|
|
2241
|
+
secret?: string;
|
|
2242
|
+
inboundAddress?: string;
|
|
2243
|
+
requiresProviderSetup?: boolean;
|
|
2244
|
+
}
|
|
2245
|
+
interface HubInboundWebhookStatus {
|
|
2246
|
+
configured: boolean;
|
|
2247
|
+
url?: string;
|
|
2248
|
+
/** Configuration is not evidence of a real delivered message. */
|
|
2249
|
+
deliveryVerified: false;
|
|
2250
|
+
requiresProviderSetup?: boolean;
|
|
2251
|
+
}
|
|
2252
|
+
/** Live provider readback for one explicitly selected Linq WhatsApp number. */
|
|
2253
|
+
interface HubInboundPhoneNumberScope {
|
|
2254
|
+
configured: true;
|
|
2255
|
+
provisioned: true;
|
|
2256
|
+
subscribed: true;
|
|
2257
|
+
phoneNumberIds: string[];
|
|
2258
|
+
}
|
|
2259
|
+
declare class HubInboundWebhooksClient {
|
|
2260
|
+
private readonly request;
|
|
2261
|
+
constructor(request: <T>(path: string, init: RequestInit) => Promise<T>);
|
|
2262
|
+
create(connectionId: string, options?: HubInboundWebhookCreateOptions): Promise<HubInboundWebhookCreateResponse>;
|
|
2263
|
+
get(connectionId: string): Promise<HubInboundWebhookStatus>;
|
|
2264
|
+
/** Add one owned Linq WhatsApp number without rotating the webhook secret. */
|
|
2265
|
+
ensurePhoneNumber(connectionId: string, phoneNumberId: string): Promise<HubInboundPhoneNumberScope>;
|
|
2266
|
+
/** Remove event subscriptions first. This does not silently rotate a live URL. */
|
|
2267
|
+
delete(connectionId: string): Promise<{
|
|
2268
|
+
removed: boolean;
|
|
2269
|
+
}>;
|
|
2270
|
+
private path;
|
|
2271
|
+
}
|
|
2272
|
+
//#endregion
|
|
2273
|
+
//#region src/connections.d.ts
|
|
2266
2274
|
interface HubConnectionStartOptions {
|
|
2267
2275
|
returnUrl?: string;
|
|
2268
2276
|
cli?: boolean;
|
|
@@ -2270,24 +2278,10 @@ interface HubConnectionStartOptions {
|
|
|
2270
2278
|
/** GitHub accepts the exact read:user, repo, read:org set. */
|
|
2271
2279
|
requestedScopes?: readonly string[];
|
|
2272
2280
|
}
|
|
2273
|
-
declare class HubChannelsClient {
|
|
2274
|
-
private readonly request;
|
|
2275
|
-
constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>);
|
|
2276
|
-
list(): Promise<HubChannelsResponse>;
|
|
2277
|
-
createEmail(input?: HubEmailChannelCreateRequest): Promise<HubChannelCreateResponse>;
|
|
2278
|
-
delete(channelId: string): Promise<HubChannelDeleteResponse>;
|
|
2279
|
-
}
|
|
2280
|
-
declare class HubEventSubscriptionsClient {
|
|
2281
|
-
private readonly request;
|
|
2282
|
-
constructor(request: <TData>(path: string, init: RequestInit) => Promise<TData>);
|
|
2283
|
-
list(): Promise<HubEventSubscriptionsResponse>;
|
|
2284
|
-
create(input: HubEventSubscriptionCreateRequest): Promise<HubEventSubscriptionCreateResponse>;
|
|
2285
|
-
delete(subscriptionId: string): Promise<HubEventSubscriptionDeleteResponse>;
|
|
2286
|
-
}
|
|
2287
2281
|
declare class HubConnectionsClient {
|
|
2288
2282
|
private readonly request;
|
|
2289
2283
|
readonly inboundWebhook: HubInboundWebhooksClient;
|
|
2290
|
-
constructor(request:
|
|
2284
|
+
constructor(request: HubRequest);
|
|
2291
2285
|
list(): Promise<HubConnectionsResponse>;
|
|
2292
2286
|
/** Connector catalog: every provider the hub can expose, each flagged with
|
|
2293
2287
|
* `configured` (whether its OAuth app credentials are wired). Callers render
|
|
@@ -2305,16 +2299,27 @@ declare class HubConnectionsClient {
|
|
|
2305
2299
|
revoke(connectionId: string): Promise<HubConnectionDeleteResponse>;
|
|
2306
2300
|
health(connectionId: string): Promise<HubConnectionHealthResponse>;
|
|
2307
2301
|
}
|
|
2308
|
-
|
|
2302
|
+
//#endregion
|
|
2303
|
+
//#region src/channels.d.ts
|
|
2304
|
+
declare class HubChannelsClient {
|
|
2309
2305
|
private readonly request;
|
|
2310
|
-
constructor(request:
|
|
2311
|
-
list(): Promise<
|
|
2312
|
-
|
|
2313
|
-
|
|
2306
|
+
constructor(request: HubRequest);
|
|
2307
|
+
list(): Promise<HubChannelsResponse>;
|
|
2308
|
+
createEmail(input?: HubEmailChannelCreateRequest): Promise<HubChannelCreateResponse>;
|
|
2309
|
+
delete(channelId: string): Promise<HubChannelDeleteResponse>;
|
|
2310
|
+
}
|
|
2311
|
+
declare class HubEventSubscriptionsClient {
|
|
2312
|
+
private readonly request;
|
|
2313
|
+
constructor(request: HubRequest);
|
|
2314
|
+
list(): Promise<HubEventSubscriptionsResponse>;
|
|
2315
|
+
create(input: HubEventSubscriptionCreateRequest): Promise<HubEventSubscriptionCreateResponse>;
|
|
2316
|
+
delete(subscriptionId: string): Promise<HubEventSubscriptionDeleteResponse>;
|
|
2314
2317
|
}
|
|
2318
|
+
//#endregion
|
|
2319
|
+
//#region src/github-app.d.ts
|
|
2315
2320
|
declare class HubGithubAppClient {
|
|
2316
2321
|
private readonly request;
|
|
2317
|
-
constructor(request:
|
|
2322
|
+
constructor(request: HubRequest);
|
|
2318
2323
|
mintInstallationToken(input: HubGithubAppMintInstallationTokenRequest): Promise<HubGithubAppMintInstallationTokenResponse>;
|
|
2319
2324
|
/** Every installation the caller may act through — their own and any org's
|
|
2320
2325
|
* they were verified against. The management surface's read. */
|
|
@@ -2336,16 +2341,20 @@ declare class HubGithubAppClient {
|
|
|
2336
2341
|
repo: string;
|
|
2337
2342
|
}): Promise<HubGithubAppIsRepoInstalledResponse>;
|
|
2338
2343
|
}
|
|
2344
|
+
//#endregion
|
|
2345
|
+
//#region src/audit.d.ts
|
|
2339
2346
|
declare class HubAuditClient {
|
|
2340
2347
|
private readonly request;
|
|
2341
|
-
constructor(request:
|
|
2348
|
+
constructor(request: HubRequest);
|
|
2342
2349
|
list(options?: HubAuditListRequest): Promise<HubAuditResponse>;
|
|
2343
2350
|
}
|
|
2351
|
+
//#endregion
|
|
2352
|
+
//#region src/workflows.d.ts
|
|
2344
2353
|
declare class HubWorkflowsClient {
|
|
2345
2354
|
private readonly request;
|
|
2346
2355
|
private readonly stream?;
|
|
2347
2356
|
private readonly download?;
|
|
2348
|
-
constructor(request:
|
|
2357
|
+
constructor(request: HubRequest, stream?: HubStreamRequest | undefined, download?: HubArtifactRequest | undefined);
|
|
2349
2358
|
list(): Promise<HubWorkflow[]>;
|
|
2350
2359
|
/**
|
|
2351
2360
|
* Owner-wide fleet overview: one row per workflow with its run tallies over
|
|
@@ -2393,8 +2402,9 @@ declare class HubWorkflowsClient {
|
|
|
2393
2402
|
* `{ "pull_request.number": "123" }`. Omit it for a one-click run of a
|
|
2394
2403
|
* workflow that reads no trigger fields. Throws `HubSdkError`:
|
|
2395
2404
|
* `MISSING_RUN_INPUTS` when a required field is absent (`details.missing`
|
|
2396
|
-
* names them), `
|
|
2397
|
-
*
|
|
2405
|
+
* names them), `NOT_FOUND` for an unknown/foreign id. A paused workflow
|
|
2406
|
+
* still runs once; pausing only stops its triggers. Pass `opts.signal` to
|
|
2407
|
+
* abort a slow request.
|
|
2398
2408
|
*/
|
|
2399
2409
|
run(id: string, inputs?: HubWorkflowRunInputs, opts?: {
|
|
2400
2410
|
signal?: AbortSignal;
|
|
@@ -2429,8 +2439,8 @@ declare class HubWorkflowsClient {
|
|
|
2429
2439
|
* follow it with {@link getRun}/{@link watchRun}/{@link waitForRun} like any
|
|
2430
2440
|
* other run. Throws `HubSdkError`: `RUN_NOT_RETRYABLE` when the run is not
|
|
2431
2441
|
* terminal-failed/cancelled (queued/running/waiting, or succeeded),
|
|
2432
|
-
* `
|
|
2433
|
-
*
|
|
2442
|
+
* `NOT_FOUND` for an unknown/foreign run id; a workflow paused since the
|
|
2443
|
+
* failure still retries. Pass `opts.signal` to abort a slow request.
|
|
2434
2444
|
*/
|
|
2435
2445
|
retryRun(id: string, runId: string, opts?: {
|
|
2436
2446
|
signal?: AbortSignal;
|
|
@@ -2650,6 +2660,48 @@ declare class HubWorkflowsClient {
|
|
|
2650
2660
|
schema(): Promise<HubWorkflowSchemaResponse>;
|
|
2651
2661
|
}
|
|
2652
2662
|
//#endregion
|
|
2663
|
+
//#region src/client.d.ts
|
|
2664
|
+
declare class HubClient extends HubTransport {
|
|
2665
|
+
readonly knowledge: HubKnowledgeClient;
|
|
2666
|
+
readonly allowances: HubAllowancesClient;
|
|
2667
|
+
readonly apps: HubAppsClient;
|
|
2668
|
+
readonly connections: HubConnectionsClient;
|
|
2669
|
+
readonly channels: HubChannelsClient;
|
|
2670
|
+
readonly numbers: HubManagedNumbersClient;
|
|
2671
|
+
readonly eventSubscriptions: HubEventSubscriptionsClient;
|
|
2672
|
+
readonly permissions: HubPermissionsClient;
|
|
2673
|
+
readonly tokens: HubTokensClient;
|
|
2674
|
+
readonly tools: HubToolsClient;
|
|
2675
|
+
readonly approvals: HubApprovalsClient;
|
|
2676
|
+
readonly audit: HubAuditClient;
|
|
2677
|
+
readonly githubApp: HubGithubAppClient;
|
|
2678
|
+
readonly workflows: HubWorkflowsClient;
|
|
2679
|
+
readonly lines: HubLinesClient;
|
|
2680
|
+
constructor(options: HubClientOptions);
|
|
2681
|
+
static fromEnv(options?: HubClientFromEnvOptions): HubClient;
|
|
2682
|
+
status(): Promise<HubStatusResponse>;
|
|
2683
|
+
/**
|
|
2684
|
+
* Open a streaming (Server-Sent Events) response and return its raw body.
|
|
2685
|
+
* Shares auth-header building + `fetch` with {@link request}, but does NOT
|
|
2686
|
+
* buffer or JSON-parse the body — the caller consumes the stream.
|
|
2687
|
+
*
|
|
2688
|
+
* A successful stream comes back as `text/event-stream`. Anything else is an
|
|
2689
|
+
* error envelope (404/429/401 JSON) or a transport failure (gateway/HTML
|
|
2690
|
+
* page); it is surfaced the same way {@link request} surfaces errors — a
|
|
2691
|
+
* typed `HubSdkError` from a `{success:false}` envelope, otherwise an
|
|
2692
|
+
* `HUB_HTTP_<status>` transport error — rather than handed back as bogus SSE.
|
|
2693
|
+
*/
|
|
2694
|
+
private stream;
|
|
2695
|
+
/**
|
|
2696
|
+
* Fetch raw (non-envelope) bytes — the artifact download route, whose 200 is
|
|
2697
|
+
* the artifact's own content type, not JSON. Error responses on such routes
|
|
2698
|
+
* are still the standard envelope, so a failure surfaces exactly like
|
|
2699
|
+
* {@link request}: a typed `HubSdkError` from a `{success:false}` body,
|
|
2700
|
+
* otherwise an `HUB_HTTP_<status>` transport error.
|
|
2701
|
+
*/
|
|
2702
|
+
private requestBytes;
|
|
2703
|
+
}
|
|
2704
|
+
//#endregion
|
|
2653
2705
|
//#region src/event-delivery.d.ts
|
|
2654
2706
|
type HubEventSignatureFailure = "missing" | "malformed" | "stale" | "mismatch";
|
|
2655
2707
|
type HubEventSignatureResult = {
|
|
@@ -2889,5 +2941,5 @@ declare class HubLineGrantsClient extends HubTransport {
|
|
|
2889
2941
|
//#region src/redaction.d.ts
|
|
2890
2942
|
declare function redactHubValue(value: unknown): unknown;
|
|
2891
2943
|
//#endregion
|
|
2892
|
-
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, HubAppBrokerClient, type HubAppBrokerExchange, type HubAppBrokerOptions, type HubAppBrokerToken, type HubAppComplianceClaim, type HubAppComplianceState, 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, HubKnowledgeClient, HubKnowledgeManagementClient, type HubKnowledgeQueryResult, type HubKnowledgeRetrievalResult, 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 HubLineImage, type HubLineMember, type HubLineMemberApplication, type HubLineMemberApplicationInput, type HubLineOwnerSendInput, type HubLineProviderDelivery, 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, type HubOwnerAskSendInput, 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, KnowledgeAttachment, KnowledgeAttachmentAuthorization, KnowledgeAuthorization, KnowledgeCapabilities, KnowledgeCapability, KnowledgeEmbeddingSpace, KnowledgeReference, KnowledgeSourceCreate, KnowledgeSourceInput, KnowledgeSourceSummary, type VerifyHubEventSignatureInput, approveKnowledgeSource, authenticateHubEventRequest, deriveHubEventCallbackSecret, parseHubEventDelivery, redactHubValue, resolveHubAuth, resolveHubBaseUrl, verifyHubEventSignature };
|
|
2944
|
+
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, HubAppBrokerClient, type HubAppBrokerExchange, type HubAppBrokerOptions, type HubAppBrokerToken, type HubAppComplianceClaim, type HubAppComplianceState, 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, HubKnowledgeClient, HubKnowledgeManagementClient, type HubKnowledgeQueryResult, type HubKnowledgeRetrievalResult, 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 HubLineImage, type HubLineMember, type HubLineMemberApplication, type HubLineMemberApplicationInput, type HubLineOwnerSendInput, type HubLineProviderDelivery, 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, type HubOwnerAskSendInput, 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, KnowledgeAttachment, KnowledgeAttachmentAuthorization, KnowledgeAuthorization, KnowledgeCapabilities, KnowledgeCapability, KnowledgeEmbeddingSpace, KnowledgeReference, KnowledgeSourceCreate, KnowledgeSourceInput, KnowledgeSourceSummary, type VerifyHubEventSignatureInput, approveKnowledgeSource, authenticateHubEventRequest, deriveHubEventCallbackSecret, parseHubEventDelivery, redactHubValue, resolveHubAuth, resolveHubBaseUrl, verifyHubEventSignature, workflowConnectionRequirementKey };
|
|
2893
2945
|
//# sourceMappingURL=index.d.ts.map
|