@tangle-network/agent-integrations 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/index.d.ts +793 -323
- package/dist/index.js +1743 -366
- package/dist/index.js.map +1 -1
- package/docs/architecture.md +7 -0
- package/docs/production-completion-checklist.md +63 -0
- package/docs/repo-structure.md +47 -0
- package/examples/calendar-exercise-app.ts +78 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,393 @@ declare function summarizeIntegrationRegistry(registry: IntegrationRegistry): In
|
|
|
53
53
|
declare function canonicalConnectorId(id: string, aliases?: Record<string, string>): string;
|
|
54
54
|
declare function inferIntegrationSupportTier(connector: IntegrationConnector): IntegrationSupportTier;
|
|
55
55
|
|
|
56
|
+
type IntegrationAuditEventType = 'connection.created' | 'connection.updated' | 'connection.revoked' | 'grant.created' | 'grant.revoked' | 'capability.issued' | 'action.invoked' | 'action.failed' | 'trigger.subscribed' | 'trigger.received' | 'workflow.installed' | 'approval.requested' | 'approval.resolved' | 'healthcheck.completed';
|
|
57
|
+
interface IntegrationAuditEvent {
|
|
58
|
+
id: string;
|
|
59
|
+
type: IntegrationAuditEventType;
|
|
60
|
+
occurredAt: string;
|
|
61
|
+
actor?: IntegrationActor;
|
|
62
|
+
connectionId?: string;
|
|
63
|
+
providerId?: string;
|
|
64
|
+
connectorId?: string;
|
|
65
|
+
action?: string;
|
|
66
|
+
risk?: IntegrationConnectorAction['risk'];
|
|
67
|
+
dataClass?: IntegrationDataClass;
|
|
68
|
+
ok?: boolean;
|
|
69
|
+
message?: string;
|
|
70
|
+
metadata?: Record<string, unknown>;
|
|
71
|
+
}
|
|
72
|
+
interface IntegrationAuditSink {
|
|
73
|
+
record(event: IntegrationAuditEvent): Promise<void> | void;
|
|
74
|
+
}
|
|
75
|
+
interface IntegrationAuditStore extends IntegrationAuditSink {
|
|
76
|
+
list(filter?: IntegrationAuditFilter): Promise<IntegrationAuditEvent[]> | IntegrationAuditEvent[];
|
|
77
|
+
}
|
|
78
|
+
interface IntegrationAuditFilter {
|
|
79
|
+
type?: IntegrationAuditEventType;
|
|
80
|
+
actor?: IntegrationActor;
|
|
81
|
+
connectionId?: string;
|
|
82
|
+
providerId?: string;
|
|
83
|
+
connectorId?: string;
|
|
84
|
+
action?: string;
|
|
85
|
+
}
|
|
86
|
+
declare class InMemoryIntegrationAuditStore implements IntegrationAuditStore {
|
|
87
|
+
private readonly events;
|
|
88
|
+
record(event: IntegrationAuditEvent): void;
|
|
89
|
+
list(filter?: IntegrationAuditFilter): IntegrationAuditEvent[];
|
|
90
|
+
}
|
|
91
|
+
declare function createIntegrationAuditEvent(input: Omit<IntegrationAuditEvent, 'id' | 'occurredAt'> & {
|
|
92
|
+
id?: string;
|
|
93
|
+
occurredAt?: string | Date;
|
|
94
|
+
now?: () => Date;
|
|
95
|
+
}): IntegrationAuditEvent;
|
|
96
|
+
declare function createAuditingActionGuard(options: {
|
|
97
|
+
sink: IntegrationAuditSink;
|
|
98
|
+
subject?: IntegrationActor;
|
|
99
|
+
now?: () => Date;
|
|
100
|
+
includeInputPreview?: boolean;
|
|
101
|
+
}): IntegrationActionGuard;
|
|
102
|
+
declare function sanitizeAuditConnection(connection: IntegrationConnection): Record<string, unknown>;
|
|
103
|
+
|
|
104
|
+
type IntegrationApprovalStatus = 'pending' | 'approved' | 'denied' | 'expired';
|
|
105
|
+
interface IntegrationApprovalRecord {
|
|
106
|
+
id: string;
|
|
107
|
+
request: IntegrationApprovalRequest;
|
|
108
|
+
status: IntegrationApprovalStatus;
|
|
109
|
+
requestedAt: string;
|
|
110
|
+
resolvedAt?: string;
|
|
111
|
+
resolvedBy?: IntegrationActor;
|
|
112
|
+
reason?: string;
|
|
113
|
+
expiresAt?: string;
|
|
114
|
+
metadata?: Record<string, unknown>;
|
|
115
|
+
}
|
|
116
|
+
interface IntegrationApprovalStore {
|
|
117
|
+
get(approvalId: string): Promise<IntegrationApprovalRecord | undefined> | IntegrationApprovalRecord | undefined;
|
|
118
|
+
put(record: IntegrationApprovalRecord): Promise<void> | void;
|
|
119
|
+
list(filter?: IntegrationApprovalFilter): Promise<IntegrationApprovalRecord[]> | IntegrationApprovalRecord[];
|
|
120
|
+
}
|
|
121
|
+
interface IntegrationApprovalFilter {
|
|
122
|
+
status?: IntegrationApprovalStatus;
|
|
123
|
+
connectionId?: string;
|
|
124
|
+
connectorId?: string;
|
|
125
|
+
action?: string;
|
|
126
|
+
actor?: IntegrationActor;
|
|
127
|
+
}
|
|
128
|
+
interface ApprovalBackedPolicyOptions {
|
|
129
|
+
base: IntegrationPolicyEngine;
|
|
130
|
+
store: IntegrationApprovalStore;
|
|
131
|
+
audit?: IntegrationAuditSink;
|
|
132
|
+
now?: () => Date;
|
|
133
|
+
approvalTtlMs?: number;
|
|
134
|
+
}
|
|
135
|
+
declare class InMemoryIntegrationApprovalStore implements IntegrationApprovalStore {
|
|
136
|
+
private readonly records;
|
|
137
|
+
get(approvalId: string): IntegrationApprovalRecord | undefined;
|
|
138
|
+
put(record: IntegrationApprovalRecord): void;
|
|
139
|
+
list(filter?: IntegrationApprovalFilter): IntegrationApprovalRecord[];
|
|
140
|
+
}
|
|
141
|
+
declare class ApprovalBackedPolicyEngine implements IntegrationPolicyEngine {
|
|
142
|
+
private readonly base;
|
|
143
|
+
private readonly store;
|
|
144
|
+
private readonly audit;
|
|
145
|
+
private readonly now;
|
|
146
|
+
private readonly approvalTtlMs;
|
|
147
|
+
constructor(options: ApprovalBackedPolicyOptions);
|
|
148
|
+
decide(ctx: IntegrationGuardContext & {
|
|
149
|
+
subject: IntegrationActor;
|
|
150
|
+
}): Promise<IntegrationPolicyDecision>;
|
|
151
|
+
private findApprovedRecord;
|
|
152
|
+
}
|
|
153
|
+
declare function createApprovalBackedPolicyEngine(options: ApprovalBackedPolicyOptions): ApprovalBackedPolicyEngine;
|
|
154
|
+
declare function resolveIntegrationApproval(input: {
|
|
155
|
+
store: IntegrationApprovalStore;
|
|
156
|
+
approvalId: string;
|
|
157
|
+
approved: boolean;
|
|
158
|
+
resolvedBy: IntegrationActor;
|
|
159
|
+
reason?: string;
|
|
160
|
+
metadata?: Record<string, unknown>;
|
|
161
|
+
audit?: IntegrationAuditSink;
|
|
162
|
+
now?: () => Date;
|
|
163
|
+
}): Promise<IntegrationApprovalRecord>;
|
|
164
|
+
|
|
165
|
+
declare const CANONICAL_INTEGRATION_ACTIONS: {
|
|
166
|
+
readonly googleCalendarEventsList: "google-calendar.events.list";
|
|
167
|
+
readonly googleCalendarEventsCreate: "google-calendar.events.create";
|
|
168
|
+
readonly gmailMessagesSearch: "gmail.messages.search";
|
|
169
|
+
readonly gmailMessagesSend: "gmail.messages.send";
|
|
170
|
+
readonly googleDriveFilesSearch: "google-drive.files.search";
|
|
171
|
+
readonly googleDriveFilesRead: "google-drive.files.read";
|
|
172
|
+
readonly githubRepositoriesGet: "github.repositories.get";
|
|
173
|
+
readonly githubIssuesSearch: "github.issues.search";
|
|
174
|
+
readonly githubIssuesCreate: "github.issues.create";
|
|
175
|
+
readonly githubPullRequestsComment: "github.pull-requests.comment";
|
|
176
|
+
readonly slackChannelsList: "slack.channels.list";
|
|
177
|
+
readonly slackMessagesSearch: "slack.messages.search";
|
|
178
|
+
readonly slackMessagesPost: "slack.messages.post";
|
|
179
|
+
readonly providerHttpRequest: "provider.http.request";
|
|
180
|
+
};
|
|
181
|
+
type CanonicalIntegrationActionId = typeof CANONICAL_INTEGRATION_ACTIONS[keyof typeof CANONICAL_INTEGRATION_ACTIONS];
|
|
182
|
+
interface CanonicalLaunchConnectorOptions {
|
|
183
|
+
providerId?: string;
|
|
184
|
+
includeProviderPassthrough?: boolean;
|
|
185
|
+
}
|
|
186
|
+
declare function buildCanonicalLaunchConnectors(options?: CanonicalLaunchConnectorOptions): IntegrationConnector[];
|
|
187
|
+
declare function canonicalActionConnectorId(actionId: string): string | undefined;
|
|
188
|
+
|
|
189
|
+
interface IntegrationToolDefinition {
|
|
190
|
+
name: string;
|
|
191
|
+
title: string;
|
|
192
|
+
description: string;
|
|
193
|
+
providerId: string;
|
|
194
|
+
connectorId: string;
|
|
195
|
+
connectorTitle: string;
|
|
196
|
+
category: IntegrationConnectorCategory;
|
|
197
|
+
action: IntegrationConnectorAction;
|
|
198
|
+
risk: IntegrationActionRisk;
|
|
199
|
+
dataClass: IntegrationDataClass;
|
|
200
|
+
requiredScopes: string[];
|
|
201
|
+
inputSchema?: unknown;
|
|
202
|
+
outputSchema?: unknown;
|
|
203
|
+
tags: string[];
|
|
204
|
+
}
|
|
205
|
+
interface IntegrationToolSearchFilters {
|
|
206
|
+
providerId?: string;
|
|
207
|
+
connectorId?: string;
|
|
208
|
+
category?: IntegrationConnectorCategory;
|
|
209
|
+
maxRisk?: IntegrationActionRisk;
|
|
210
|
+
dataClass?: IntegrationDataClass;
|
|
211
|
+
limit?: number;
|
|
212
|
+
}
|
|
213
|
+
interface IntegrationToolSearchResult {
|
|
214
|
+
tool: IntegrationToolDefinition;
|
|
215
|
+
score: number;
|
|
216
|
+
matched: string[];
|
|
217
|
+
}
|
|
218
|
+
interface McpToolDefinition {
|
|
219
|
+
name: string;
|
|
220
|
+
description: string;
|
|
221
|
+
inputSchema: unknown;
|
|
222
|
+
}
|
|
223
|
+
declare function integrationToolName(providerId: string, connectorId: string, actionId: string): string;
|
|
224
|
+
declare function parseIntegrationToolName(name: string): {
|
|
225
|
+
providerId: string;
|
|
226
|
+
connectorId: string;
|
|
227
|
+
actionId: string;
|
|
228
|
+
};
|
|
229
|
+
declare function buildIntegrationToolCatalog(connectors: IntegrationConnector[]): IntegrationToolDefinition[];
|
|
230
|
+
declare function searchIntegrationTools(catalog: IntegrationToolDefinition[], query: string, filters?: IntegrationToolSearchFilters): IntegrationToolSearchResult[];
|
|
231
|
+
declare function toMcpTools(tools: IntegrationToolDefinition[]): McpToolDefinition[];
|
|
232
|
+
|
|
233
|
+
type IntegrationRequirementMode = 'read' | 'write' | 'trigger';
|
|
234
|
+
type IntegrationRequirementStatus = 'ready' | 'missing_connection' | 'not_executable' | 'unknown_connector';
|
|
235
|
+
interface IntegrationRequirement {
|
|
236
|
+
id: string;
|
|
237
|
+
connectorId: string;
|
|
238
|
+
reason: string;
|
|
239
|
+
mode: IntegrationRequirementMode;
|
|
240
|
+
requiredActions?: string[];
|
|
241
|
+
requiredTriggers?: string[];
|
|
242
|
+
requiredScopes?: string[];
|
|
243
|
+
optional?: boolean;
|
|
244
|
+
}
|
|
245
|
+
interface IntegrationManifest {
|
|
246
|
+
id: string;
|
|
247
|
+
title?: string;
|
|
248
|
+
owner?: IntegrationActor;
|
|
249
|
+
requirements: IntegrationRequirement[];
|
|
250
|
+
metadata?: Record<string, unknown>;
|
|
251
|
+
}
|
|
252
|
+
interface IntegrationRequirementResolution {
|
|
253
|
+
requirement: IntegrationRequirement;
|
|
254
|
+
status: IntegrationRequirementStatus;
|
|
255
|
+
connector?: IntegrationConnector;
|
|
256
|
+
registryEntry?: IntegrationRegistryEntry;
|
|
257
|
+
connection?: IntegrationConnection;
|
|
258
|
+
missingScopes: string[];
|
|
259
|
+
missingActions: string[];
|
|
260
|
+
missingTriggers: string[];
|
|
261
|
+
message: string;
|
|
262
|
+
}
|
|
263
|
+
interface IntegrationManifestResolution {
|
|
264
|
+
manifest: IntegrationManifest;
|
|
265
|
+
owner: IntegrationActor;
|
|
266
|
+
ready: IntegrationRequirementResolution[];
|
|
267
|
+
missing: IntegrationRequirementResolution[];
|
|
268
|
+
optionalMissing: IntegrationRequirementResolution[];
|
|
269
|
+
}
|
|
270
|
+
interface IntegrationGrant {
|
|
271
|
+
id: string;
|
|
272
|
+
manifestId: string;
|
|
273
|
+
requirementId: string;
|
|
274
|
+
owner: IntegrationActor;
|
|
275
|
+
grantee: IntegrationActor;
|
|
276
|
+
connectionId: string;
|
|
277
|
+
connectorId: string;
|
|
278
|
+
scopes: string[];
|
|
279
|
+
allowedActions: string[];
|
|
280
|
+
allowedTriggers: string[];
|
|
281
|
+
status: 'active' | 'revoked';
|
|
282
|
+
createdAt: string;
|
|
283
|
+
updatedAt: string;
|
|
284
|
+
metadata?: Record<string, unknown>;
|
|
285
|
+
}
|
|
286
|
+
interface IntegrationGrantStore {
|
|
287
|
+
get(grantId: string): Promise<IntegrationGrant | undefined> | IntegrationGrant | undefined;
|
|
288
|
+
put(grant: IntegrationGrant): Promise<void> | void;
|
|
289
|
+
listByManifest(manifestId: string, grantee?: IntegrationActor): Promise<IntegrationGrant[]> | IntegrationGrant[];
|
|
290
|
+
listByGrantee(grantee: IntegrationActor): Promise<IntegrationGrant[]> | IntegrationGrant[];
|
|
291
|
+
delete?(grantId: string): Promise<void> | void;
|
|
292
|
+
}
|
|
293
|
+
interface IntegrationCapabilityBinding {
|
|
294
|
+
requirementId: string;
|
|
295
|
+
connectorId: string;
|
|
296
|
+
connectionId: string;
|
|
297
|
+
grantId: string;
|
|
298
|
+
scopes: string[];
|
|
299
|
+
allowedActions: string[];
|
|
300
|
+
allowedTriggers: string[];
|
|
301
|
+
capability: IssuedIntegrationCapability;
|
|
302
|
+
}
|
|
303
|
+
interface IntegrationSandboxBundle {
|
|
304
|
+
manifestId: string;
|
|
305
|
+
subject: IntegrationActor;
|
|
306
|
+
capabilities: IntegrationCapabilityBinding[];
|
|
307
|
+
connectors: IntegrationConnector[];
|
|
308
|
+
tools: IntegrationToolDefinition[];
|
|
309
|
+
expiresAt: string;
|
|
310
|
+
}
|
|
311
|
+
interface IntegrationRuntimeHub {
|
|
312
|
+
listRegistry(): Promise<IntegrationRegistry> | IntegrationRegistry;
|
|
313
|
+
listConnections(owner: IntegrationActor): Promise<IntegrationConnection[]> | IntegrationConnection[];
|
|
314
|
+
issueCapability(input: {
|
|
315
|
+
subject: IntegrationActor;
|
|
316
|
+
connectionId: string;
|
|
317
|
+
scopes: string[];
|
|
318
|
+
allowedActions: string[];
|
|
319
|
+
ttlMs: number;
|
|
320
|
+
metadata?: Record<string, unknown>;
|
|
321
|
+
}): Promise<IssuedIntegrationCapability> | IssuedIntegrationCapability;
|
|
322
|
+
}
|
|
323
|
+
interface IntegrationRuntimeOptions {
|
|
324
|
+
hub: IntegrationRuntimeHub;
|
|
325
|
+
grants?: IntegrationGrantStore;
|
|
326
|
+
now?: () => Date;
|
|
327
|
+
}
|
|
328
|
+
declare class InMemoryIntegrationGrantStore implements IntegrationGrantStore {
|
|
329
|
+
private readonly grants;
|
|
330
|
+
get(grantId: string): IntegrationGrant | undefined;
|
|
331
|
+
put(grant: IntegrationGrant): void;
|
|
332
|
+
listByManifest(manifestId: string, grantee?: IntegrationActor): IntegrationGrant[];
|
|
333
|
+
listByGrantee(grantee: IntegrationActor): IntegrationGrant[];
|
|
334
|
+
delete(grantId: string): void;
|
|
335
|
+
}
|
|
336
|
+
declare class IntegrationRuntime {
|
|
337
|
+
private readonly hub;
|
|
338
|
+
private readonly grants;
|
|
339
|
+
private readonly now;
|
|
340
|
+
constructor(options: IntegrationRuntimeOptions);
|
|
341
|
+
registry(): Promise<IntegrationRegistry>;
|
|
342
|
+
resolveManifest(manifest: IntegrationManifest, owner: IntegrationActor): Promise<IntegrationManifestResolution>;
|
|
343
|
+
createGrants(input: {
|
|
344
|
+
manifest: IntegrationManifest;
|
|
345
|
+
owner: IntegrationActor;
|
|
346
|
+
grantee: IntegrationActor;
|
|
347
|
+
metadata?: Record<string, unknown>;
|
|
348
|
+
}): Promise<IntegrationGrant[]>;
|
|
349
|
+
buildSandboxBundle(input: {
|
|
350
|
+
manifestId: string;
|
|
351
|
+
subject: IntegrationActor;
|
|
352
|
+
ttlMs: number;
|
|
353
|
+
grantee?: IntegrationActor;
|
|
354
|
+
}): Promise<IntegrationSandboxBundle>;
|
|
355
|
+
}
|
|
356
|
+
declare function createIntegrationRuntime(options: IntegrationRuntimeOptions): IntegrationRuntime;
|
|
357
|
+
|
|
358
|
+
declare const DEFAULT_INTEGRATION_BRIDGE_ENV = "TANGLE_INTEGRATION_BUNDLE";
|
|
359
|
+
interface IntegrationBridgePayload {
|
|
360
|
+
version: 1;
|
|
361
|
+
manifestId: string;
|
|
362
|
+
subject: IntegrationSandboxBundle['subject'];
|
|
363
|
+
expiresAt: string;
|
|
364
|
+
tools: IntegrationBridgeToolBinding[];
|
|
365
|
+
}
|
|
366
|
+
interface IntegrationBridgeToolBinding {
|
|
367
|
+
name: string;
|
|
368
|
+
title: string;
|
|
369
|
+
connectorId: string;
|
|
370
|
+
connectionId: string;
|
|
371
|
+
action: string;
|
|
372
|
+
risk: string;
|
|
373
|
+
dataClass: string;
|
|
374
|
+
requiredScopes: string[];
|
|
375
|
+
capabilityToken: string;
|
|
376
|
+
}
|
|
377
|
+
declare function buildIntegrationBridgePayload(bundle: IntegrationSandboxBundle): IntegrationBridgePayload;
|
|
378
|
+
declare function encodeIntegrationBridgePayload(payload: IntegrationBridgePayload): string;
|
|
379
|
+
declare function decodeIntegrationBridgePayload(encoded: string): IntegrationBridgePayload;
|
|
380
|
+
declare function buildIntegrationBridgeEnvironment(bundle: IntegrationSandboxBundle, options?: {
|
|
381
|
+
envVar?: string;
|
|
382
|
+
}): Record<string, string>;
|
|
383
|
+
declare function parseIntegrationBridgeEnvironment(env: Record<string, string | undefined>, options?: {
|
|
384
|
+
envVar?: string;
|
|
385
|
+
}): IntegrationBridgePayload;
|
|
386
|
+
declare function redactIntegrationBridgePayload(payload: IntegrationBridgePayload): IntegrationBridgePayload;
|
|
387
|
+
|
|
388
|
+
interface TangleIntegrationsClientOptions {
|
|
389
|
+
endpoint: string;
|
|
390
|
+
bridge?: IntegrationBridgePayload;
|
|
391
|
+
env?: Record<string, string | undefined>;
|
|
392
|
+
envVar?: string;
|
|
393
|
+
fetchImpl?: typeof fetch;
|
|
394
|
+
getCapabilityToken?: (tool: IntegrationBridgeToolBinding) => string | Promise<string>;
|
|
395
|
+
}
|
|
396
|
+
interface TangleIntegrationInvokeInput<TInput = unknown> {
|
|
397
|
+
tool: string;
|
|
398
|
+
input?: TInput;
|
|
399
|
+
idempotencyKey?: string;
|
|
400
|
+
dryRun?: boolean;
|
|
401
|
+
metadata?: Record<string, unknown>;
|
|
402
|
+
}
|
|
403
|
+
interface TangleIntegrationInvokeResult<TOutput = unknown> {
|
|
404
|
+
status: 'ok' | 'approval_required' | 'failed';
|
|
405
|
+
action: string;
|
|
406
|
+
output?: TOutput;
|
|
407
|
+
approval?: unknown;
|
|
408
|
+
error?: string;
|
|
409
|
+
metadata?: Record<string, unknown>;
|
|
410
|
+
}
|
|
411
|
+
declare class TangleIntegrationsClient {
|
|
412
|
+
private readonly endpoint;
|
|
413
|
+
private readonly bridge;
|
|
414
|
+
private readonly fetchImpl;
|
|
415
|
+
private readonly getCapabilityToken;
|
|
416
|
+
constructor(options: TangleIntegrationsClientOptions);
|
|
417
|
+
tools(): IntegrationBridgeToolBinding[];
|
|
418
|
+
findTool(toolOrAction: string): IntegrationBridgeToolBinding;
|
|
419
|
+
invoke<TOutput = unknown, TInput = unknown>(input: TangleIntegrationInvokeInput<TInput>): Promise<TangleIntegrationInvokeResult<TOutput>>;
|
|
420
|
+
}
|
|
421
|
+
declare function createTangleIntegrationsClient(options: TangleIntegrationsClientOptions): TangleIntegrationsClient;
|
|
422
|
+
|
|
423
|
+
interface ConsentSummary {
|
|
424
|
+
title: string;
|
|
425
|
+
body: string;
|
|
426
|
+
bullets: string[];
|
|
427
|
+
primaryAction: string;
|
|
428
|
+
risk: 'read' | 'write' | 'destructive';
|
|
429
|
+
connectorIds: string[];
|
|
430
|
+
}
|
|
431
|
+
interface RenderConsentOptions {
|
|
432
|
+
appName?: string;
|
|
433
|
+
connectors?: IntegrationConnector[];
|
|
434
|
+
}
|
|
435
|
+
declare function renderConsentSummary(manifestOrResolution: IntegrationManifest | IntegrationManifestResolution, options?: RenderConsentOptions): ConsentSummary;
|
|
436
|
+
declare function renderApprovalCopy(input: {
|
|
437
|
+
appName: string;
|
|
438
|
+
connectorTitle: string;
|
|
439
|
+
action: IntegrationConnectorAction;
|
|
440
|
+
approvalId?: string;
|
|
441
|
+
}): ConsentSummary;
|
|
442
|
+
|
|
56
443
|
/**
|
|
57
444
|
* Connector primitives — the contract a concrete first-party integration
|
|
58
445
|
* (Google Calendar, HubSpot, Stripe, ...) implements. Lower level than the
|
|
@@ -436,17 +823,387 @@ interface ConnectorManifestValidationResult {
|
|
|
436
823
|
declare function validateConnectorManifest(manifest: ConnectorManifest): ConnectorManifestValidationResult;
|
|
437
824
|
declare function assertValidConnectorManifest(manifest: ConnectorManifest): void;
|
|
438
825
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
826
|
+
interface ConnectorAdapterProviderOptions {
|
|
827
|
+
id?: string;
|
|
828
|
+
kind?: IntegrationProviderKind;
|
|
829
|
+
adapters: ConnectorAdapter[];
|
|
830
|
+
resolveDataSource: (connection: IntegrationConnection) => Promise<ResolvedDataSource> | ResolvedDataSource;
|
|
831
|
+
now?: () => Date;
|
|
832
|
+
}
|
|
833
|
+
declare function createConnectorAdapterProvider(options: ConnectorAdapterProviderOptions): IntegrationProvider;
|
|
834
|
+
declare function manifestToConnector(providerId: string, adapter: ConnectorAdapter): IntegrationConnector;
|
|
835
|
+
|
|
836
|
+
interface IntegrationSecretStore {
|
|
837
|
+
get(ref: SecretRef): Promise<ConnectorCredentials | undefined> | ConnectorCredentials | undefined;
|
|
838
|
+
put(ref: SecretRef, credentials: ConnectorCredentials): Promise<void> | void;
|
|
839
|
+
delete?(ref: SecretRef): Promise<void> | void;
|
|
840
|
+
}
|
|
841
|
+
interface ConnectionCredentialResolverOptions {
|
|
842
|
+
secrets: IntegrationSecretStore;
|
|
843
|
+
connections?: IntegrationConnectionStore;
|
|
844
|
+
adapters?: ConnectorAdapter[];
|
|
845
|
+
now?: () => Date;
|
|
846
|
+
markConnectionError?: (connection: IntegrationConnection, error: Error) => Promise<void> | void;
|
|
847
|
+
}
|
|
848
|
+
declare class InMemoryIntegrationSecretStore implements IntegrationSecretStore {
|
|
849
|
+
private readonly secrets;
|
|
850
|
+
get(ref: SecretRef): ConnectorCredentials | undefined;
|
|
851
|
+
put(ref: SecretRef, credentials: ConnectorCredentials): void;
|
|
852
|
+
delete(ref: SecretRef): void;
|
|
853
|
+
}
|
|
854
|
+
declare function createConnectionCredentialResolver(options: ConnectionCredentialResolverOptions): (connection: IntegrationConnection) => Promise<ResolvedDataSource>;
|
|
855
|
+
declare function resolveConnectionCredentials(input: IntegrationConnection, options: ConnectionCredentialResolverOptions): Promise<ConnectorCredentials>;
|
|
856
|
+
declare function createCredentialBackedAdapterProvider(options: Omit<ConnectorAdapterProviderOptions, 'resolveDataSource'> & ConnectionCredentialResolverOptions): IntegrationProvider;
|
|
857
|
+
declare function revokeConnection(input: {
|
|
858
|
+
connection: IntegrationConnection;
|
|
859
|
+
connections?: IntegrationConnectionStore;
|
|
860
|
+
secrets?: IntegrationSecretStore;
|
|
861
|
+
now?: () => Date;
|
|
862
|
+
}): Promise<IntegrationConnection>;
|
|
863
|
+
|
|
864
|
+
type IntegrationErrorCode = 'missing_connection' | 'missing_grant' | 'approval_required' | 'approval_denied' | 'connection_revoked' | 'connection_expired' | 'scope_missing' | 'action_denied' | 'action_not_found' | 'provider_rate_limited' | 'provider_auth_failed' | 'provider_unavailable' | 'provider_error' | 'capability_expired' | 'capability_invalid' | 'manifest_invalid' | 'passthrough_disabled' | 'input_invalid' | 'unknown';
|
|
865
|
+
interface IntegrationUserAction {
|
|
866
|
+
type: 'connect' | 'reconnect' | 'approve' | 'retry' | 'contact_support' | 'change_request';
|
|
867
|
+
label: string;
|
|
868
|
+
connectorId?: string;
|
|
869
|
+
approvalId?: string;
|
|
870
|
+
}
|
|
871
|
+
declare class IntegrationRuntimeError extends Error {
|
|
872
|
+
readonly code: IntegrationErrorCode;
|
|
873
|
+
readonly status: number;
|
|
874
|
+
readonly userAction?: IntegrationUserAction;
|
|
875
|
+
readonly metadata?: Record<string, unknown>;
|
|
876
|
+
constructor(input: {
|
|
877
|
+
code: IntegrationErrorCode;
|
|
878
|
+
message: string;
|
|
879
|
+
status?: number;
|
|
880
|
+
userAction?: IntegrationUserAction;
|
|
881
|
+
metadata?: Record<string, unknown>;
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
interface NormalizedIntegrationError {
|
|
885
|
+
ok: false;
|
|
886
|
+
code: IntegrationErrorCode;
|
|
887
|
+
message: string;
|
|
888
|
+
status: number;
|
|
889
|
+
userAction?: IntegrationUserAction;
|
|
890
|
+
metadata?: Record<string, unknown>;
|
|
891
|
+
}
|
|
892
|
+
declare function normalizeIntegrationError(error: unknown): NormalizedIntegrationError;
|
|
893
|
+
declare function statusForCode(code: IntegrationErrorCode): number;
|
|
894
|
+
|
|
895
|
+
interface IntegrationWorkflowDefinition {
|
|
896
|
+
id: string;
|
|
897
|
+
title?: string;
|
|
898
|
+
manifest: IntegrationManifest;
|
|
899
|
+
trigger: {
|
|
900
|
+
requirementId: string;
|
|
901
|
+
triggerId: string;
|
|
902
|
+
targetUrl?: string;
|
|
903
|
+
};
|
|
904
|
+
metadata?: Record<string, unknown>;
|
|
905
|
+
}
|
|
906
|
+
interface InstalledIntegrationWorkflow {
|
|
907
|
+
id: string;
|
|
908
|
+
workflowId: string;
|
|
909
|
+
manifestId: string;
|
|
910
|
+
owner: IntegrationActor;
|
|
911
|
+
grantee: IntegrationActor;
|
|
912
|
+
triggerGrantId: string;
|
|
913
|
+
subscription: IntegrationTriggerSubscription;
|
|
914
|
+
status: 'active' | 'paused' | 'error';
|
|
915
|
+
createdAt: string;
|
|
916
|
+
metadata?: Record<string, unknown>;
|
|
917
|
+
}
|
|
918
|
+
interface IntegrationWorkflowStore {
|
|
919
|
+
put(workflow: InstalledIntegrationWorkflow): Promise<void> | void;
|
|
920
|
+
get(id: string): Promise<InstalledIntegrationWorkflow | undefined> | InstalledIntegrationWorkflow | undefined;
|
|
921
|
+
list(): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[];
|
|
922
|
+
listByWorkflow(workflowId: string): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[];
|
|
923
|
+
listByOwner(owner: IntegrationActor): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[];
|
|
924
|
+
}
|
|
925
|
+
interface IntegrationWorkflowRuntimeHub {
|
|
926
|
+
subscribeTrigger(connectionId: string, trigger: string, targetUrl?: string): Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription;
|
|
927
|
+
}
|
|
928
|
+
interface IntegrationWorkflowRuntimeOptions {
|
|
929
|
+
runtime: IntegrationRuntime;
|
|
930
|
+
hub: IntegrationWorkflowRuntimeHub;
|
|
931
|
+
grants: IntegrationGrantStore;
|
|
932
|
+
store?: IntegrationWorkflowStore;
|
|
933
|
+
now?: () => Date;
|
|
934
|
+
}
|
|
935
|
+
declare class InMemoryIntegrationWorkflowStore implements IntegrationWorkflowStore {
|
|
936
|
+
private readonly workflows;
|
|
937
|
+
put(workflow: InstalledIntegrationWorkflow): void;
|
|
938
|
+
get(id: string): InstalledIntegrationWorkflow | undefined;
|
|
939
|
+
list(): InstalledIntegrationWorkflow[];
|
|
940
|
+
listByWorkflow(workflowId: string): InstalledIntegrationWorkflow[];
|
|
941
|
+
listByOwner(owner: IntegrationActor): InstalledIntegrationWorkflow[];
|
|
942
|
+
}
|
|
943
|
+
declare class IntegrationWorkflowRuntime {
|
|
944
|
+
private readonly runtime;
|
|
945
|
+
private readonly hub;
|
|
946
|
+
private readonly grants;
|
|
947
|
+
private readonly store;
|
|
948
|
+
private readonly now;
|
|
949
|
+
constructor(options: IntegrationWorkflowRuntimeOptions);
|
|
950
|
+
install(input: {
|
|
951
|
+
workflow: IntegrationWorkflowDefinition;
|
|
952
|
+
owner: IntegrationActor;
|
|
953
|
+
grantee: IntegrationActor;
|
|
954
|
+
}): Promise<InstalledIntegrationWorkflow>;
|
|
955
|
+
dispatchEvent<T = unknown>(event: IntegrationTriggerEvent<T>, handler: (input: {
|
|
956
|
+
event: IntegrationTriggerEvent<T>;
|
|
957
|
+
workflows: InstalledIntegrationWorkflow[];
|
|
958
|
+
}) => Promise<void> | void): Promise<{
|
|
959
|
+
matched: InstalledIntegrationWorkflow[];
|
|
960
|
+
}>;
|
|
961
|
+
}
|
|
962
|
+
declare function createIntegrationWorkflowRuntime(options: IntegrationWorkflowRuntimeOptions): IntegrationWorkflowRuntime;
|
|
963
|
+
|
|
964
|
+
interface StoredIntegrationEvent {
|
|
965
|
+
id: string;
|
|
966
|
+
sourceId: string;
|
|
967
|
+
connectorId: string;
|
|
968
|
+
eventType: string;
|
|
969
|
+
providerEventId?: string;
|
|
970
|
+
receivedAt: string;
|
|
971
|
+
payload: Record<string, unknown>;
|
|
972
|
+
dispatchedAt?: string;
|
|
973
|
+
metadata?: Record<string, unknown>;
|
|
974
|
+
}
|
|
975
|
+
interface IntegrationEventStore {
|
|
976
|
+
put(event: StoredIntegrationEvent): Promise<void> | void;
|
|
977
|
+
hasProviderEvent(sourceId: string, providerEventId: string): Promise<boolean> | boolean;
|
|
978
|
+
list(): Promise<StoredIntegrationEvent[]> | StoredIntegrationEvent[];
|
|
979
|
+
}
|
|
980
|
+
interface IntegrationWebhookReceiverResult {
|
|
981
|
+
status: number;
|
|
982
|
+
body: unknown;
|
|
983
|
+
headers?: Record<string, string>;
|
|
984
|
+
received: StoredIntegrationEvent[];
|
|
985
|
+
duplicates: StoredIntegrationEvent[];
|
|
986
|
+
}
|
|
987
|
+
declare class InMemoryIntegrationEventStore implements IntegrationEventStore {
|
|
988
|
+
private readonly events;
|
|
989
|
+
private readonly providerIds;
|
|
990
|
+
put(event: StoredIntegrationEvent): void;
|
|
991
|
+
hasProviderEvent(sourceId: string, providerEventId: string): boolean;
|
|
992
|
+
list(): StoredIntegrationEvent[];
|
|
993
|
+
}
|
|
994
|
+
declare function receiveIntegrationWebhook(input: {
|
|
995
|
+
adapter: ConnectorAdapter;
|
|
996
|
+
source: ResolvedDataSource;
|
|
997
|
+
rawBody: string;
|
|
998
|
+
headers: Record<string, string | string[] | undefined>;
|
|
999
|
+
store: IntegrationEventStore;
|
|
1000
|
+
workflowRuntime?: IntegrationWorkflowRuntime;
|
|
1001
|
+
now?: () => Date;
|
|
1002
|
+
}): Promise<IntegrationWebhookReceiverResult>;
|
|
1003
|
+
declare function storedEventToTriggerEvent(event: StoredIntegrationEvent, source: ResolvedDataSource): IntegrationTriggerEvent;
|
|
1004
|
+
|
|
1005
|
+
interface IntegrationIdempotencyRecord {
|
|
1006
|
+
key: string;
|
|
1007
|
+
requestHash: string;
|
|
1008
|
+
result: IntegrationActionResult;
|
|
1009
|
+
createdAt: string;
|
|
1010
|
+
}
|
|
1011
|
+
interface IntegrationIdempotencyStore {
|
|
1012
|
+
get(key: string): Promise<IntegrationIdempotencyRecord | undefined> | IntegrationIdempotencyRecord | undefined;
|
|
1013
|
+
put(record: IntegrationIdempotencyRecord): Promise<void> | void;
|
|
1014
|
+
}
|
|
1015
|
+
interface IntegrationRateLimitDecision {
|
|
1016
|
+
allowed: boolean;
|
|
1017
|
+
retryAfterMs?: number;
|
|
1018
|
+
reason?: string;
|
|
1019
|
+
}
|
|
1020
|
+
interface IntegrationRateLimiter {
|
|
1021
|
+
check(ctx: IntegrationGuardContext): Promise<IntegrationRateLimitDecision> | IntegrationRateLimitDecision;
|
|
1022
|
+
}
|
|
1023
|
+
declare class InMemoryIntegrationIdempotencyStore implements IntegrationIdempotencyStore {
|
|
1024
|
+
private readonly records;
|
|
1025
|
+
get(key: string): IntegrationIdempotencyRecord | undefined;
|
|
1026
|
+
put(record: IntegrationIdempotencyRecord): void;
|
|
1027
|
+
}
|
|
1028
|
+
declare class DefaultIntegrationActionGuard implements IntegrationActionGuard {
|
|
1029
|
+
private readonly idempotency;
|
|
1030
|
+
private readonly audit;
|
|
1031
|
+
private readonly rateLimiter;
|
|
1032
|
+
private readonly now;
|
|
1033
|
+
constructor(options?: {
|
|
1034
|
+
idempotency?: IntegrationIdempotencyStore;
|
|
1035
|
+
audit?: IntegrationAuditSink;
|
|
1036
|
+
rateLimiter?: IntegrationRateLimiter;
|
|
1037
|
+
now?: () => Date;
|
|
1038
|
+
});
|
|
1039
|
+
invokeAction(ctx: IntegrationGuardContext, proceed: () => Promise<IntegrationActionResult>): Promise<IntegrationActionResult>;
|
|
1040
|
+
private writeIdempotency;
|
|
1041
|
+
}
|
|
1042
|
+
declare function createDefaultIntegrationActionGuard(options?: ConstructorParameters<typeof DefaultIntegrationActionGuard>[0]): DefaultIntegrationActionGuard;
|
|
1043
|
+
|
|
1044
|
+
type IntegrationHealthcheckStatus = 'healthy' | 'degraded' | 'unhealthy' | 'unknown';
|
|
1045
|
+
interface IntegrationHealthcheckCheck {
|
|
1046
|
+
id: string;
|
|
1047
|
+
status: IntegrationHealthcheckStatus;
|
|
1048
|
+
message: string;
|
|
1049
|
+
metadata?: Record<string, unknown>;
|
|
1050
|
+
}
|
|
1051
|
+
interface IntegrationHealthcheckResult {
|
|
1052
|
+
connectionId: string;
|
|
1053
|
+
providerId: string;
|
|
1054
|
+
connectorId: string;
|
|
1055
|
+
status: IntegrationHealthcheckStatus;
|
|
1056
|
+
checkedAt: string;
|
|
1057
|
+
checks: IntegrationHealthcheckCheck[];
|
|
1058
|
+
metadata?: Record<string, unknown>;
|
|
1059
|
+
}
|
|
1060
|
+
interface IntegrationHealthcheckStore {
|
|
1061
|
+
put(result: IntegrationHealthcheckResult): Promise<void> | void;
|
|
1062
|
+
get(connectionId: string): Promise<IntegrationHealthcheckResult | undefined> | IntegrationHealthcheckResult | undefined;
|
|
1063
|
+
list(): Promise<IntegrationHealthcheckResult[]> | IntegrationHealthcheckResult[];
|
|
1064
|
+
}
|
|
1065
|
+
declare class InMemoryIntegrationHealthcheckStore implements IntegrationHealthcheckStore {
|
|
1066
|
+
private readonly results;
|
|
1067
|
+
put(result: IntegrationHealthcheckResult): void;
|
|
1068
|
+
get(connectionId: string): IntegrationHealthcheckResult | undefined;
|
|
1069
|
+
list(): IntegrationHealthcheckResult[];
|
|
1070
|
+
}
|
|
1071
|
+
declare function runIntegrationHealthcheck(input: {
|
|
1072
|
+
connection: IntegrationConnection;
|
|
1073
|
+
connector?: IntegrationConnector;
|
|
1074
|
+
registry?: IntegrationRegistry;
|
|
1075
|
+
test?: (connection: IntegrationConnection, connector: IntegrationConnector) => Promise<IntegrationActionResult | boolean> | IntegrationActionResult | boolean;
|
|
1076
|
+
audit?: IntegrationAuditSink;
|
|
1077
|
+
now?: () => Date;
|
|
1078
|
+
}): Promise<IntegrationHealthcheckResult>;
|
|
1079
|
+
declare function runIntegrationHealthchecks(input: {
|
|
1080
|
+
connections: IntegrationConnection[];
|
|
1081
|
+
registry?: IntegrationRegistry;
|
|
1082
|
+
store?: IntegrationHealthcheckStore;
|
|
1083
|
+
audit?: IntegrationAuditSink;
|
|
1084
|
+
now?: () => Date;
|
|
1085
|
+
test?: (connection: IntegrationConnection, connector: IntegrationConnector) => Promise<IntegrationActionResult | boolean> | IntegrationActionResult | boolean;
|
|
1086
|
+
}): Promise<IntegrationHealthcheckResult[]>;
|
|
1087
|
+
declare function healthcheckRequest(action?: string): IntegrationActionRequest;
|
|
1088
|
+
|
|
1089
|
+
interface ManifestValidationIssue {
|
|
1090
|
+
path: string;
|
|
1091
|
+
message: string;
|
|
1092
|
+
}
|
|
1093
|
+
interface ManifestValidationResult {
|
|
1094
|
+
ok: boolean;
|
|
1095
|
+
issues: ManifestValidationIssue[];
|
|
1096
|
+
}
|
|
1097
|
+
interface InferIntegrationRequirementsOptions {
|
|
1098
|
+
manifestId: string;
|
|
1099
|
+
title?: string;
|
|
1100
|
+
tools: Array<string | {
|
|
1101
|
+
action: string;
|
|
1102
|
+
reason?: string;
|
|
1103
|
+
mode?: IntegrationRequirementMode;
|
|
1104
|
+
connectorId?: string;
|
|
1105
|
+
scopes?: string[];
|
|
1106
|
+
}>;
|
|
1107
|
+
metadata?: Record<string, unknown>;
|
|
1108
|
+
}
|
|
1109
|
+
interface MissingRequirementExplanation {
|
|
1110
|
+
requirementId: string;
|
|
1111
|
+
connectorId: string;
|
|
1112
|
+
status: string;
|
|
1113
|
+
message: string;
|
|
1114
|
+
userAction: 'connect' | 'enable' | 'ignore_optional';
|
|
1115
|
+
}
|
|
1116
|
+
declare function validateIntegrationManifest(manifest: IntegrationManifest): ManifestValidationResult;
|
|
1117
|
+
declare function assertValidIntegrationManifest(manifest: IntegrationManifest): void;
|
|
1118
|
+
declare function inferIntegrationManifestFromTools(options: InferIntegrationRequirementsOptions): IntegrationManifest;
|
|
1119
|
+
declare function explainMissingRequirements(resolution: IntegrationManifestResolution): MissingRequirementExplanation[];
|
|
1120
|
+
declare function calendarExercisePlannerManifest(id?: string): IntegrationManifest;
|
|
1121
|
+
|
|
1122
|
+
interface ProviderHttpRequestInput {
|
|
1123
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
1124
|
+
path: string;
|
|
1125
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1126
|
+
headers?: Record<string, string>;
|
|
1127
|
+
body?: unknown;
|
|
1128
|
+
}
|
|
1129
|
+
interface ProviderPassthroughPolicy {
|
|
1130
|
+
enabled: boolean;
|
|
1131
|
+
allowedMethods?: ProviderHttpRequestInput['method'][];
|
|
1132
|
+
allowedPathPrefixes?: string[];
|
|
1133
|
+
maxBodyBytes?: number;
|
|
1134
|
+
}
|
|
1135
|
+
declare const PROVIDER_PASSTHROUGH_ACTION: "provider.http.request";
|
|
1136
|
+
declare function validateProviderPassthroughRequest(input: ProviderHttpRequestInput, policy: ProviderPassthroughPolicy): void;
|
|
1137
|
+
|
|
1138
|
+
type IntegrationPolicyEffect = 'allow' | 'require_approval' | 'deny';
|
|
1139
|
+
interface IntegrationPolicyRule {
|
|
1140
|
+
id: string;
|
|
1141
|
+
effect: IntegrationPolicyEffect;
|
|
1142
|
+
reason: string;
|
|
1143
|
+
providerId?: string;
|
|
1144
|
+
connectorId?: string;
|
|
1145
|
+
action?: string;
|
|
1146
|
+
maxRisk?: IntegrationActionRisk;
|
|
1147
|
+
risk?: IntegrationActionRisk;
|
|
1148
|
+
dataClass?: IntegrationDataClass;
|
|
1149
|
+
}
|
|
1150
|
+
interface StaticIntegrationPolicyOptions {
|
|
1151
|
+
rules?: IntegrationPolicyRule[];
|
|
1152
|
+
defaultReadEffect?: IntegrationPolicyEffect;
|
|
1153
|
+
defaultWriteEffect?: IntegrationPolicyEffect;
|
|
1154
|
+
defaultDestructiveEffect?: IntegrationPolicyEffect;
|
|
1155
|
+
now?: () => Date;
|
|
1156
|
+
}
|
|
1157
|
+
interface IntegrationApprovalResolution {
|
|
1158
|
+
approvalId: string;
|
|
1159
|
+
approved: boolean;
|
|
1160
|
+
resolvedBy: string;
|
|
1161
|
+
resolvedAt: string;
|
|
1162
|
+
reason?: string;
|
|
1163
|
+
metadata?: Record<string, unknown>;
|
|
1164
|
+
}
|
|
1165
|
+
declare class StaticIntegrationPolicyEngine implements IntegrationPolicyEngine {
|
|
1166
|
+
private readonly rules;
|
|
1167
|
+
private readonly defaultReadEffect;
|
|
1168
|
+
private readonly defaultWriteEffect;
|
|
1169
|
+
private readonly defaultDestructiveEffect;
|
|
1170
|
+
private readonly now;
|
|
1171
|
+
constructor(options?: StaticIntegrationPolicyOptions);
|
|
1172
|
+
decide(ctx: IntegrationGuardContext & {
|
|
1173
|
+
subject: {
|
|
1174
|
+
type: string;
|
|
1175
|
+
id: string;
|
|
1176
|
+
};
|
|
1177
|
+
}): IntegrationPolicyDecision;
|
|
1178
|
+
private defaultEffect;
|
|
1179
|
+
}
|
|
1180
|
+
declare function createDefaultIntegrationPolicyEngine(options?: Omit<StaticIntegrationPolicyOptions, 'rules'>): StaticIntegrationPolicyEngine;
|
|
1181
|
+
declare function buildApprovalRequest(ctx: IntegrationGuardContext & {
|
|
1182
|
+
subject: {
|
|
1183
|
+
type: string;
|
|
1184
|
+
id: string;
|
|
1185
|
+
};
|
|
1186
|
+
}, reason: string, requestedAt: Date): IntegrationApprovalRequest;
|
|
1187
|
+
declare function redactApprovalRequest(request: IntegrationApprovalRequest): IntegrationApprovalRequest;
|
|
1188
|
+
|
|
1189
|
+
interface PlatformIntegrationPolicyPresetOptions extends Omit<StaticIntegrationPolicyOptions, 'defaultReadEffect' | 'defaultWriteEffect' | 'defaultDestructiveEffect'> {
|
|
1190
|
+
allowWritesWithoutApproval?: boolean;
|
|
1191
|
+
allowDestructiveActions?: boolean;
|
|
1192
|
+
allowProviderPassthrough?: boolean;
|
|
1193
|
+
}
|
|
1194
|
+
declare function createPlatformIntegrationPolicyPreset(options?: PlatformIntegrationPolicyPresetOptions): StaticIntegrationPolicyEngine;
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* Generic OAuth2 helper used by every oauth-shaped connector (Google
|
|
1198
|
+
* Calendar, Sheets, Drive, HubSpot, Salesforce, Zoom, ...).
|
|
1199
|
+
*
|
|
1200
|
+
* Everything PKCE-aware. Opaque-state CSRF guard. Refresh-token aware.
|
|
1201
|
+
* No connector-specific logic lives here — adapters hand a `clientId`,
|
|
1202
|
+
* `clientSecret`, `tokenUrl`, optional `extraAuthParams` and the rest is
|
|
1203
|
+
* mechanical.
|
|
1204
|
+
*
|
|
1205
|
+
* State and code_verifier are kept in a short-TTL flow store keyed by the
|
|
1206
|
+
* opaque `state` we round-trip through the provider. The default store is
|
|
450
1207
|
* in-memory for local/dev and tests. Production deployments should inject a
|
|
451
1208
|
* durable store backed by KV/Redis/D1/etc. so callbacks can land on any worker.
|
|
452
1209
|
*/
|
|
@@ -1032,115 +1789,20 @@ declare const asanaConnector: ConnectorAdapter;
|
|
|
1032
1789
|
|
|
1033
1790
|
declare const salesforceConnector: ConnectorAdapter;
|
|
1034
1791
|
|
|
1035
|
-
interface
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
risk: IntegrationActionRisk;
|
|
1045
|
-
dataClass: IntegrationDataClass;
|
|
1046
|
-
requiredScopes: string[];
|
|
1047
|
-
inputSchema?: unknown;
|
|
1048
|
-
outputSchema?: unknown;
|
|
1049
|
-
tags: string[];
|
|
1792
|
+
interface IntegrationInvocationEnvelope {
|
|
1793
|
+
kind: 'integration.invocation';
|
|
1794
|
+
capabilityToken: string;
|
|
1795
|
+
toolName: string;
|
|
1796
|
+
action: string;
|
|
1797
|
+
input?: unknown;
|
|
1798
|
+
idempotencyKey: string;
|
|
1799
|
+
dryRun?: boolean;
|
|
1800
|
+
metadata?: Record<string, unknown>;
|
|
1050
1801
|
}
|
|
1051
|
-
interface
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
maxRisk?: IntegrationActionRisk;
|
|
1056
|
-
dataClass?: IntegrationDataClass;
|
|
1057
|
-
limit?: number;
|
|
1058
|
-
}
|
|
1059
|
-
interface IntegrationToolSearchResult {
|
|
1060
|
-
tool: IntegrationToolDefinition;
|
|
1061
|
-
score: number;
|
|
1062
|
-
matched: string[];
|
|
1063
|
-
}
|
|
1064
|
-
interface McpToolDefinition {
|
|
1065
|
-
name: string;
|
|
1066
|
-
description: string;
|
|
1067
|
-
inputSchema: unknown;
|
|
1068
|
-
}
|
|
1069
|
-
declare function integrationToolName(providerId: string, connectorId: string, actionId: string): string;
|
|
1070
|
-
declare function parseIntegrationToolName(name: string): {
|
|
1071
|
-
providerId: string;
|
|
1072
|
-
connectorId: string;
|
|
1073
|
-
actionId: string;
|
|
1074
|
-
};
|
|
1075
|
-
declare function buildIntegrationToolCatalog(connectors: IntegrationConnector[]): IntegrationToolDefinition[];
|
|
1076
|
-
declare function searchIntegrationTools(catalog: IntegrationToolDefinition[], query: string, filters?: IntegrationToolSearchFilters): IntegrationToolSearchResult[];
|
|
1077
|
-
declare function toMcpTools(tools: IntegrationToolDefinition[]): McpToolDefinition[];
|
|
1078
|
-
|
|
1079
|
-
type IntegrationPolicyEffect = 'allow' | 'require_approval' | 'deny';
|
|
1080
|
-
interface IntegrationPolicyRule {
|
|
1081
|
-
id: string;
|
|
1082
|
-
effect: IntegrationPolicyEffect;
|
|
1083
|
-
reason: string;
|
|
1084
|
-
providerId?: string;
|
|
1085
|
-
connectorId?: string;
|
|
1086
|
-
action?: string;
|
|
1087
|
-
maxRisk?: IntegrationActionRisk;
|
|
1088
|
-
risk?: IntegrationActionRisk;
|
|
1089
|
-
dataClass?: IntegrationDataClass;
|
|
1090
|
-
}
|
|
1091
|
-
interface StaticIntegrationPolicyOptions {
|
|
1092
|
-
rules?: IntegrationPolicyRule[];
|
|
1093
|
-
defaultReadEffect?: IntegrationPolicyEffect;
|
|
1094
|
-
defaultWriteEffect?: IntegrationPolicyEffect;
|
|
1095
|
-
defaultDestructiveEffect?: IntegrationPolicyEffect;
|
|
1096
|
-
now?: () => Date;
|
|
1097
|
-
}
|
|
1098
|
-
interface IntegrationApprovalResolution {
|
|
1099
|
-
approvalId: string;
|
|
1100
|
-
approved: boolean;
|
|
1101
|
-
resolvedBy: string;
|
|
1102
|
-
resolvedAt: string;
|
|
1103
|
-
reason?: string;
|
|
1104
|
-
metadata?: Record<string, unknown>;
|
|
1105
|
-
}
|
|
1106
|
-
declare class StaticIntegrationPolicyEngine implements IntegrationPolicyEngine {
|
|
1107
|
-
private readonly rules;
|
|
1108
|
-
private readonly defaultReadEffect;
|
|
1109
|
-
private readonly defaultWriteEffect;
|
|
1110
|
-
private readonly defaultDestructiveEffect;
|
|
1111
|
-
private readonly now;
|
|
1112
|
-
constructor(options?: StaticIntegrationPolicyOptions);
|
|
1113
|
-
decide(ctx: IntegrationGuardContext & {
|
|
1114
|
-
subject: {
|
|
1115
|
-
type: string;
|
|
1116
|
-
id: string;
|
|
1117
|
-
};
|
|
1118
|
-
}): IntegrationPolicyDecision;
|
|
1119
|
-
private defaultEffect;
|
|
1120
|
-
}
|
|
1121
|
-
declare function createDefaultIntegrationPolicyEngine(options?: Omit<StaticIntegrationPolicyOptions, 'rules'>): StaticIntegrationPolicyEngine;
|
|
1122
|
-
declare function buildApprovalRequest(ctx: IntegrationGuardContext & {
|
|
1123
|
-
subject: {
|
|
1124
|
-
type: string;
|
|
1125
|
-
id: string;
|
|
1126
|
-
};
|
|
1127
|
-
}, reason: string, requestedAt: Date): IntegrationApprovalRequest;
|
|
1128
|
-
declare function redactApprovalRequest(request: IntegrationApprovalRequest): IntegrationApprovalRequest;
|
|
1129
|
-
|
|
1130
|
-
interface IntegrationInvocationEnvelope {
|
|
1131
|
-
kind: 'integration.invocation';
|
|
1132
|
-
capabilityToken: string;
|
|
1133
|
-
toolName: string;
|
|
1134
|
-
action: string;
|
|
1135
|
-
input?: unknown;
|
|
1136
|
-
idempotencyKey: string;
|
|
1137
|
-
dryRun?: boolean;
|
|
1138
|
-
metadata?: Record<string, unknown>;
|
|
1139
|
-
}
|
|
1140
|
-
interface IntegrationInvocationEnvelopeValidationOptions {
|
|
1141
|
-
connectors?: IntegrationConnector[];
|
|
1142
|
-
maxInputBytes?: number;
|
|
1143
|
-
requireKnownTool?: boolean;
|
|
1802
|
+
interface IntegrationInvocationEnvelopeValidationOptions {
|
|
1803
|
+
connectors?: IntegrationConnector[];
|
|
1804
|
+
maxInputBytes?: number;
|
|
1805
|
+
requireKnownTool?: boolean;
|
|
1144
1806
|
}
|
|
1145
1807
|
type NormalizedIntegrationResult = {
|
|
1146
1808
|
status: 'ok';
|
|
@@ -1158,6 +1820,12 @@ type NormalizedIntegrationResult = {
|
|
|
1158
1820
|
error: string;
|
|
1159
1821
|
metadata?: Record<string, unknown>;
|
|
1160
1822
|
};
|
|
1823
|
+
interface IntegrationSandboxHostHub {
|
|
1824
|
+
invokeWithCapability(token: string, request: InvokeWithCapabilityRequest): Promise<IntegrationActionResult> | IntegrationActionResult;
|
|
1825
|
+
}
|
|
1826
|
+
interface IntegrationSandboxHostOptions extends IntegrationInvocationEnvelopeValidationOptions {
|
|
1827
|
+
hub: IntegrationSandboxHostHub;
|
|
1828
|
+
}
|
|
1161
1829
|
declare function buildIntegrationInvocationEnvelope(input: {
|
|
1162
1830
|
capabilityToken: string;
|
|
1163
1831
|
toolName: string;
|
|
@@ -1173,16 +1841,12 @@ declare function redactInvocationEnvelope(envelope: IntegrationInvocationEnvelop
|
|
|
1173
1841
|
};
|
|
1174
1842
|
declare function redactCapability(capability: IntegrationCapability): IntegrationCapability;
|
|
1175
1843
|
declare function normalizeIntegrationResult(result: IntegrationActionResult): NormalizedIntegrationResult;
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
resolveDataSource: (connection: IntegrationConnection) => Promise<ResolvedDataSource> | ResolvedDataSource;
|
|
1182
|
-
now?: () => Date;
|
|
1844
|
+
declare function dispatchIntegrationInvocation(envelope: IntegrationInvocationEnvelope, options: IntegrationSandboxHostOptions): Promise<NormalizedIntegrationResult>;
|
|
1845
|
+
declare class IntegrationSandboxHost {
|
|
1846
|
+
private readonly options;
|
|
1847
|
+
constructor(options: IntegrationSandboxHostOptions);
|
|
1848
|
+
dispatch(envelope: IntegrationInvocationEnvelope): Promise<NormalizedIntegrationResult>;
|
|
1183
1849
|
}
|
|
1184
|
-
declare function createConnectorAdapterProvider(options: ConnectorAdapterProviderOptions): IntegrationProvider;
|
|
1185
|
-
declare function manifestToConnector(providerId: string, adapter: ConnectorAdapter): IntegrationConnector;
|
|
1186
1850
|
|
|
1187
1851
|
interface ImportCatalogOptions {
|
|
1188
1852
|
providerId: string;
|
|
@@ -1329,200 +1993,6 @@ interface ActivepiecesPieceOverride {
|
|
|
1329
1993
|
declare const ACTIVEPIECES_OVERRIDES: Record<string, ActivepiecesPieceOverride>;
|
|
1330
1994
|
declare function getActivepiecesOverride(id: string): ActivepiecesPieceOverride | undefined;
|
|
1331
1995
|
|
|
1332
|
-
type IntegrationRequirementMode = 'read' | 'write' | 'trigger';
|
|
1333
|
-
type IntegrationRequirementStatus = 'ready' | 'missing_connection' | 'not_executable' | 'unknown_connector';
|
|
1334
|
-
interface IntegrationRequirement {
|
|
1335
|
-
id: string;
|
|
1336
|
-
connectorId: string;
|
|
1337
|
-
reason: string;
|
|
1338
|
-
mode: IntegrationRequirementMode;
|
|
1339
|
-
requiredActions?: string[];
|
|
1340
|
-
requiredTriggers?: string[];
|
|
1341
|
-
requiredScopes?: string[];
|
|
1342
|
-
optional?: boolean;
|
|
1343
|
-
}
|
|
1344
|
-
interface IntegrationManifest {
|
|
1345
|
-
id: string;
|
|
1346
|
-
title?: string;
|
|
1347
|
-
owner?: IntegrationActor;
|
|
1348
|
-
requirements: IntegrationRequirement[];
|
|
1349
|
-
metadata?: Record<string, unknown>;
|
|
1350
|
-
}
|
|
1351
|
-
interface IntegrationRequirementResolution {
|
|
1352
|
-
requirement: IntegrationRequirement;
|
|
1353
|
-
status: IntegrationRequirementStatus;
|
|
1354
|
-
connector?: IntegrationConnector;
|
|
1355
|
-
registryEntry?: IntegrationRegistryEntry;
|
|
1356
|
-
connection?: IntegrationConnection;
|
|
1357
|
-
missingScopes: string[];
|
|
1358
|
-
missingActions: string[];
|
|
1359
|
-
missingTriggers: string[];
|
|
1360
|
-
message: string;
|
|
1361
|
-
}
|
|
1362
|
-
interface IntegrationManifestResolution {
|
|
1363
|
-
manifest: IntegrationManifest;
|
|
1364
|
-
owner: IntegrationActor;
|
|
1365
|
-
ready: IntegrationRequirementResolution[];
|
|
1366
|
-
missing: IntegrationRequirementResolution[];
|
|
1367
|
-
optionalMissing: IntegrationRequirementResolution[];
|
|
1368
|
-
}
|
|
1369
|
-
interface IntegrationGrant {
|
|
1370
|
-
id: string;
|
|
1371
|
-
manifestId: string;
|
|
1372
|
-
requirementId: string;
|
|
1373
|
-
owner: IntegrationActor;
|
|
1374
|
-
grantee: IntegrationActor;
|
|
1375
|
-
connectionId: string;
|
|
1376
|
-
connectorId: string;
|
|
1377
|
-
scopes: string[];
|
|
1378
|
-
allowedActions: string[];
|
|
1379
|
-
allowedTriggers: string[];
|
|
1380
|
-
status: 'active' | 'revoked';
|
|
1381
|
-
createdAt: string;
|
|
1382
|
-
updatedAt: string;
|
|
1383
|
-
metadata?: Record<string, unknown>;
|
|
1384
|
-
}
|
|
1385
|
-
interface IntegrationGrantStore {
|
|
1386
|
-
get(grantId: string): Promise<IntegrationGrant | undefined> | IntegrationGrant | undefined;
|
|
1387
|
-
put(grant: IntegrationGrant): Promise<void> | void;
|
|
1388
|
-
listByManifest(manifestId: string, grantee?: IntegrationActor): Promise<IntegrationGrant[]> | IntegrationGrant[];
|
|
1389
|
-
listByGrantee(grantee: IntegrationActor): Promise<IntegrationGrant[]> | IntegrationGrant[];
|
|
1390
|
-
delete?(grantId: string): Promise<void> | void;
|
|
1391
|
-
}
|
|
1392
|
-
interface IntegrationCapabilityBinding {
|
|
1393
|
-
requirementId: string;
|
|
1394
|
-
connectorId: string;
|
|
1395
|
-
connectionId: string;
|
|
1396
|
-
grantId: string;
|
|
1397
|
-
scopes: string[];
|
|
1398
|
-
allowedActions: string[];
|
|
1399
|
-
allowedTriggers: string[];
|
|
1400
|
-
capability: IssuedIntegrationCapability;
|
|
1401
|
-
}
|
|
1402
|
-
interface IntegrationSandboxBundle {
|
|
1403
|
-
manifestId: string;
|
|
1404
|
-
subject: IntegrationActor;
|
|
1405
|
-
capabilities: IntegrationCapabilityBinding[];
|
|
1406
|
-
connectors: IntegrationConnector[];
|
|
1407
|
-
tools: IntegrationToolDefinition[];
|
|
1408
|
-
expiresAt: string;
|
|
1409
|
-
}
|
|
1410
|
-
interface IntegrationRuntimeHub {
|
|
1411
|
-
listRegistry(): Promise<IntegrationRegistry> | IntegrationRegistry;
|
|
1412
|
-
listConnections(owner: IntegrationActor): Promise<IntegrationConnection[]> | IntegrationConnection[];
|
|
1413
|
-
issueCapability(input: {
|
|
1414
|
-
subject: IntegrationActor;
|
|
1415
|
-
connectionId: string;
|
|
1416
|
-
scopes: string[];
|
|
1417
|
-
allowedActions: string[];
|
|
1418
|
-
ttlMs: number;
|
|
1419
|
-
metadata?: Record<string, unknown>;
|
|
1420
|
-
}): Promise<IssuedIntegrationCapability> | IssuedIntegrationCapability;
|
|
1421
|
-
}
|
|
1422
|
-
interface IntegrationRuntimeOptions {
|
|
1423
|
-
hub: IntegrationRuntimeHub;
|
|
1424
|
-
grants?: IntegrationGrantStore;
|
|
1425
|
-
now?: () => Date;
|
|
1426
|
-
}
|
|
1427
|
-
declare class InMemoryIntegrationGrantStore implements IntegrationGrantStore {
|
|
1428
|
-
private readonly grants;
|
|
1429
|
-
get(grantId: string): IntegrationGrant | undefined;
|
|
1430
|
-
put(grant: IntegrationGrant): void;
|
|
1431
|
-
listByManifest(manifestId: string, grantee?: IntegrationActor): IntegrationGrant[];
|
|
1432
|
-
listByGrantee(grantee: IntegrationActor): IntegrationGrant[];
|
|
1433
|
-
delete(grantId: string): void;
|
|
1434
|
-
}
|
|
1435
|
-
declare class IntegrationRuntime {
|
|
1436
|
-
private readonly hub;
|
|
1437
|
-
private readonly grants;
|
|
1438
|
-
private readonly now;
|
|
1439
|
-
constructor(options: IntegrationRuntimeOptions);
|
|
1440
|
-
registry(): Promise<IntegrationRegistry>;
|
|
1441
|
-
resolveManifest(manifest: IntegrationManifest, owner: IntegrationActor): Promise<IntegrationManifestResolution>;
|
|
1442
|
-
createGrants(input: {
|
|
1443
|
-
manifest: IntegrationManifest;
|
|
1444
|
-
owner: IntegrationActor;
|
|
1445
|
-
grantee: IntegrationActor;
|
|
1446
|
-
metadata?: Record<string, unknown>;
|
|
1447
|
-
}): Promise<IntegrationGrant[]>;
|
|
1448
|
-
buildSandboxBundle(input: {
|
|
1449
|
-
manifestId: string;
|
|
1450
|
-
subject: IntegrationActor;
|
|
1451
|
-
ttlMs: number;
|
|
1452
|
-
grantee?: IntegrationActor;
|
|
1453
|
-
}): Promise<IntegrationSandboxBundle>;
|
|
1454
|
-
}
|
|
1455
|
-
declare function createIntegrationRuntime(options: IntegrationRuntimeOptions): IntegrationRuntime;
|
|
1456
|
-
|
|
1457
|
-
interface IntegrationWorkflowDefinition {
|
|
1458
|
-
id: string;
|
|
1459
|
-
title?: string;
|
|
1460
|
-
manifest: IntegrationManifest;
|
|
1461
|
-
trigger: {
|
|
1462
|
-
requirementId: string;
|
|
1463
|
-
triggerId: string;
|
|
1464
|
-
targetUrl?: string;
|
|
1465
|
-
};
|
|
1466
|
-
metadata?: Record<string, unknown>;
|
|
1467
|
-
}
|
|
1468
|
-
interface InstalledIntegrationWorkflow {
|
|
1469
|
-
id: string;
|
|
1470
|
-
workflowId: string;
|
|
1471
|
-
manifestId: string;
|
|
1472
|
-
owner: IntegrationActor;
|
|
1473
|
-
grantee: IntegrationActor;
|
|
1474
|
-
triggerGrantId: string;
|
|
1475
|
-
subscription: IntegrationTriggerSubscription;
|
|
1476
|
-
status: 'active' | 'paused' | 'error';
|
|
1477
|
-
createdAt: string;
|
|
1478
|
-
metadata?: Record<string, unknown>;
|
|
1479
|
-
}
|
|
1480
|
-
interface IntegrationWorkflowStore {
|
|
1481
|
-
put(workflow: InstalledIntegrationWorkflow): Promise<void> | void;
|
|
1482
|
-
get(id: string): Promise<InstalledIntegrationWorkflow | undefined> | InstalledIntegrationWorkflow | undefined;
|
|
1483
|
-
list(): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[];
|
|
1484
|
-
listByWorkflow(workflowId: string): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[];
|
|
1485
|
-
listByOwner(owner: IntegrationActor): Promise<InstalledIntegrationWorkflow[]> | InstalledIntegrationWorkflow[];
|
|
1486
|
-
}
|
|
1487
|
-
interface IntegrationWorkflowRuntimeHub {
|
|
1488
|
-
subscribeTrigger(connectionId: string, trigger: string, targetUrl?: string): Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription;
|
|
1489
|
-
}
|
|
1490
|
-
interface IntegrationWorkflowRuntimeOptions {
|
|
1491
|
-
runtime: IntegrationRuntime;
|
|
1492
|
-
hub: IntegrationWorkflowRuntimeHub;
|
|
1493
|
-
grants: IntegrationGrantStore;
|
|
1494
|
-
store?: IntegrationWorkflowStore;
|
|
1495
|
-
now?: () => Date;
|
|
1496
|
-
}
|
|
1497
|
-
declare class InMemoryIntegrationWorkflowStore implements IntegrationWorkflowStore {
|
|
1498
|
-
private readonly workflows;
|
|
1499
|
-
put(workflow: InstalledIntegrationWorkflow): void;
|
|
1500
|
-
get(id: string): InstalledIntegrationWorkflow | undefined;
|
|
1501
|
-
list(): InstalledIntegrationWorkflow[];
|
|
1502
|
-
listByWorkflow(workflowId: string): InstalledIntegrationWorkflow[];
|
|
1503
|
-
listByOwner(owner: IntegrationActor): InstalledIntegrationWorkflow[];
|
|
1504
|
-
}
|
|
1505
|
-
declare class IntegrationWorkflowRuntime {
|
|
1506
|
-
private readonly runtime;
|
|
1507
|
-
private readonly hub;
|
|
1508
|
-
private readonly grants;
|
|
1509
|
-
private readonly store;
|
|
1510
|
-
private readonly now;
|
|
1511
|
-
constructor(options: IntegrationWorkflowRuntimeOptions);
|
|
1512
|
-
install(input: {
|
|
1513
|
-
workflow: IntegrationWorkflowDefinition;
|
|
1514
|
-
owner: IntegrationActor;
|
|
1515
|
-
grantee: IntegrationActor;
|
|
1516
|
-
}): Promise<InstalledIntegrationWorkflow>;
|
|
1517
|
-
dispatchEvent<T = unknown>(event: IntegrationTriggerEvent<T>, handler: (input: {
|
|
1518
|
-
event: IntegrationTriggerEvent<T>;
|
|
1519
|
-
workflows: InstalledIntegrationWorkflow[];
|
|
1520
|
-
}) => Promise<void> | void): Promise<{
|
|
1521
|
-
matched: InstalledIntegrationWorkflow[];
|
|
1522
|
-
}>;
|
|
1523
|
-
}
|
|
1524
|
-
declare function createIntegrationWorkflowRuntime(options: IntegrationWorkflowRuntimeOptions): IntegrationWorkflowRuntime;
|
|
1525
|
-
|
|
1526
1996
|
type IntegrationCoveragePriority = 'tier_0' | 'tier_1' | 'tier_2' | 'long_tail';
|
|
1527
1997
|
interface IntegrationCoverageSpec {
|
|
1528
1998
|
id: string;
|
|
@@ -2026,4 +2496,4 @@ declare function createHttpIntegrationProvider(options: HttpIntegrationProviderO
|
|
|
2026
2496
|
declare function signCapability(capability: IntegrationCapability, secret: string): string;
|
|
2027
2497
|
declare function verifyCapabilityToken(token: string, secret: string): IntegrationCapability;
|
|
2028
2498
|
|
|
2029
|
-
export { ACTIVEPIECES_OVERRIDES, type ActivepiecesCatalogEntry, type ActivepiecesPieceOverride, type ApiKeyAuthSpec, type AuthSpec, type CASStrategy, type Capability, type CapabilityClass, type CapabilityMutation, type CapabilityMutationResult, type CapabilityParameterSchema, type CapabilityRead, type CapabilityReadResult, type CompleteAuthRequest, type ComposeIntegrationRegistryOptions, type ConnectorAdapter, type ConnectorAdapterProviderOptions, type ConnectorCredentials, type ConnectorInvocation, type ConnectorManifest, type ConnectorManifestValidationIssue, type ConnectorManifestValidationResult, type ConsistencyModel, type ConsoleStep, type CredentialFieldSpec, type CredentialValidationInput, type CredentialValidationResult, CredentialsExpired, type CustomAuthSpec, DEFAULT_SIGNATURE_TOLERANCE_SECONDS, type DataSourceMetadata, type EventHandlerResult, type ExchangeCodeInput, type GatewayCatalogAction, type GatewayCatalogEntry, type GatewayCatalogProviderOptions, type GatewayCatalogTrigger, type GenericHmacVerifyOptions, type GoogleCalendarOptions, type GoogleSheetsOptions, type GraphqlOperationSpec, type HealthcheckPlan, type HealthcheckSpec, type HmacAuthSpec, type HttpIntegrationProviderOptions, type HubSpotOptions, INTEGRATION_FAMILIES, type ImportCatalogOptions, InMemoryConnectionStore, InMemoryIntegrationGrantStore, InMemoryIntegrationWorkflowStore, InMemoryOAuthFlowStore, type InboundEvent, type InstalledIntegrationWorkflow, type IntegrationActionGuard, type IntegrationActionPack, type IntegrationActionRequest, type IntegrationActionResult, type IntegrationActionRisk, type IntegrationActor, type IntegrationApprovalRequest, type IntegrationApprovalResolution, type IntegrationAuthMode, type IntegrationAuthSpec, type IntegrationCapability, type IntegrationCapabilityBinding, type IntegrationCatalogSource, type IntegrationConnection, type IntegrationConnectionStore, type IntegrationConnector, type IntegrationConnectorAction, type IntegrationConnectorCategory, type IntegrationConnectorTrigger, type IntegrationCoveragePriority, type IntegrationCoverageSpec, type IntegrationDataClass, IntegrationError, type IntegrationFamilyId, type IntegrationFamilySpec, type IntegrationGrant, type IntegrationGrantStore, type IntegrationGuardContext, IntegrationHub, type IntegrationHubOptions, type IntegrationInvocationEnvelope, type IntegrationInvocationEnvelopeValidationOptions, type IntegrationLifecycleSpec, type IntegrationManifest, type IntegrationManifestResolution, type IntegrationPlannerHints, type IntegrationPolicyDecision, type IntegrationPolicyEffect, type IntegrationPolicyEngine, type IntegrationPolicyRule, type IntegrationProvider, type IntegrationProviderKind, type IntegrationRegistry, type IntegrationRegistryConflict, type IntegrationRegistryEntry, type IntegrationRegistrySourceRef, type IntegrationRegistrySummary, type IntegrationRequirement, type IntegrationRequirementMode, type IntegrationRequirementResolution, type IntegrationRequirementStatus, IntegrationRuntime, type IntegrationRuntimeHub, type IntegrationRuntimeOptions, type IntegrationSandboxBundle, type IntegrationSetupSpec, type IntegrationSpec, type IntegrationSpecStatus, type IntegrationSpecValidationIssue, type IntegrationSpecValidationResult, type IntegrationSupportTier, type IntegrationToolDefinition, type IntegrationToolSearchFilters, type IntegrationToolSearchResult, type IntegrationTriggerEvent, type IntegrationTriggerSubscription, type IntegrationWorkflowDefinition, IntegrationWorkflowRuntime, type IntegrationWorkflowRuntimeHub, type IntegrationWorkflowRuntimeOptions, type IntegrationWorkflowStore, type InvokeWithCapabilityRequest, type IssueCapabilityRequest, type IssuedIntegrationCapability, type McpCatalog, type McpCatalogTool, type McpToolDefinition, type MicrosoftCalendarOptions, type NoneAuthSpec, type NormalizedIntegrationResult, type NormalizedPermission, type NotionDatabaseOptions, type OAuth2AuthSpec, type OAuthFlowStore, type OAuthTokens, type OpenApiDocument, type OpenApiOperation, type ParsedStripeSignatureHeader, type PendingOAuthFlow, type PermissionDescriptor, type PostSetupCheck, type Quirk, type RateLimitSpec, type RefreshInput, type RenderSpecOptions, type RenderedConsoleStep, type ResolvedDataSource, ResourceContention, type RestConnectorSpec, type RestCredentialPlacement, type RestOperationSpec, type RestRequestSpec, type ScopeDescriptor, type SecretRef, type SlackOptions, type SlackVerifyOptions, type StartAuthRequest, type StartAuthResult, type StartOAuthInput, type StartOAuthOutput, StaticIntegrationPolicyEngine, type StaticIntegrationPolicyOptions, type StripeVerifyOptions, type TwilioVerifyOptions, _resetPendingFlowsForTests, airtableConnector, asanaConnector, assertValidConnectorManifest, assertValidIntegrationSpec, buildActivepiecesConnectors, buildApprovalRequest, buildDefaultIntegrationRegistry, buildHealthcheckPlan, buildIntegrationCoverageConnectors, buildIntegrationInvocationEnvelope, buildIntegrationToolCatalog, canonicalConnectorId, composeIntegrationRegistry, consoleStepsToText, consumePendingFlow, createConnectorAdapterProvider, createDefaultIntegrationPolicyEngine, createGatewayCatalogProvider, createHttpIntegrationProvider, createIntegrationRuntime, createIntegrationWorkflowRuntime, createMockIntegrationProvider, declarativeRestConnector, exchangeAuthorizationCode, firstHeader, getActivepiecesOverride, getIntegrationFamily, getIntegrationSpec, githubConnector, gitlabConnector, googleCalendar, googleSheets, hubspot, importGraphqlConnector, importMcpConnector, importOpenApiConnector, inferIntegrationSupportTier, integrationCoverageChecklistMarkdown, integrationSpecToConnector, integrationToolName, invocationRequestFromEnvelope, listActivepiecesCatalogEntries, listExecutableIntegrationSpecs, listIntegrationCoverageSpecs, listIntegrationSpecs, manifestToConnector, microsoftCalendar, normalizeGatewayCatalog, normalizeIntegrationResult, notionDatabase, parseIntegrationToolName, parseStripeSignatureHeader, redactApprovalRequest, redactCapability, redactInvocationEnvelope, refreshAccessToken, renderAgentToolDescription, renderConsoleSteps, renderRunbookMarkdown, salesforceConnector, sanitizeConnection, searchIntegrationTools, signCapability, slack, slackEventsConnector, specAuthToConnectorAuth, startOAuthFlow, stripePackConnector, stripeWebhookReceiverConnector, summarizeIntegrationRegistry, toMcpTools, twilioSmsConnector, validateConnectorManifest, validateCredentialFormat, validateCredentialSet, validateIntegrationInvocationEnvelope, validateIntegrationSpec, verifyCapabilityToken, verifyHmacSignature, verifySlackSignature, verifyStripeSignature, verifyTwilioSignature, webhookConnector };
|
|
2499
|
+
export { ACTIVEPIECES_OVERRIDES, type ActivepiecesCatalogEntry, type ActivepiecesPieceOverride, type ApiKeyAuthSpec, ApprovalBackedPolicyEngine, type ApprovalBackedPolicyOptions, type AuthSpec, CANONICAL_INTEGRATION_ACTIONS, type CASStrategy, type CanonicalIntegrationActionId, type CanonicalLaunchConnectorOptions, type Capability, type CapabilityClass, type CapabilityMutation, type CapabilityMutationResult, type CapabilityParameterSchema, type CapabilityRead, type CapabilityReadResult, type CompleteAuthRequest, type ComposeIntegrationRegistryOptions, type ConnectionCredentialResolverOptions, type ConnectorAdapter, type ConnectorAdapterProviderOptions, type ConnectorCredentials, type ConnectorInvocation, type ConnectorManifest, type ConnectorManifestValidationIssue, type ConnectorManifestValidationResult, type ConsentSummary, type ConsistencyModel, type ConsoleStep, type CredentialFieldSpec, type CredentialValidationInput, type CredentialValidationResult, CredentialsExpired, type CustomAuthSpec, DEFAULT_INTEGRATION_BRIDGE_ENV, DEFAULT_SIGNATURE_TOLERANCE_SECONDS, type DataSourceMetadata, DefaultIntegrationActionGuard, type EventHandlerResult, type ExchangeCodeInput, type GatewayCatalogAction, type GatewayCatalogEntry, type GatewayCatalogProviderOptions, type GatewayCatalogTrigger, type GenericHmacVerifyOptions, type GoogleCalendarOptions, type GoogleSheetsOptions, type GraphqlOperationSpec, type HealthcheckPlan, type HealthcheckSpec, type HmacAuthSpec, type HttpIntegrationProviderOptions, type HubSpotOptions, INTEGRATION_FAMILIES, type ImportCatalogOptions, InMemoryConnectionStore, InMemoryIntegrationApprovalStore, InMemoryIntegrationAuditStore, InMemoryIntegrationEventStore, InMemoryIntegrationGrantStore, InMemoryIntegrationHealthcheckStore, InMemoryIntegrationIdempotencyStore, InMemoryIntegrationSecretStore, InMemoryIntegrationWorkflowStore, InMemoryOAuthFlowStore, type InboundEvent, type InferIntegrationRequirementsOptions, type InstalledIntegrationWorkflow, type IntegrationActionGuard, type IntegrationActionPack, type IntegrationActionRequest, type IntegrationActionResult, type IntegrationActionRisk, type IntegrationActor, type IntegrationApprovalFilter, type IntegrationApprovalRecord, type IntegrationApprovalRequest, type IntegrationApprovalResolution, type IntegrationApprovalStatus, type IntegrationApprovalStore, type IntegrationAuditEvent, type IntegrationAuditEventType, type IntegrationAuditFilter, type IntegrationAuditSink, type IntegrationAuditStore, type IntegrationAuthMode, type IntegrationAuthSpec, type IntegrationBridgePayload, type IntegrationBridgeToolBinding, type IntegrationCapability, type IntegrationCapabilityBinding, type IntegrationCatalogSource, type IntegrationConnection, type IntegrationConnectionStore, type IntegrationConnector, type IntegrationConnectorAction, type IntegrationConnectorCategory, type IntegrationConnectorTrigger, type IntegrationCoveragePriority, type IntegrationCoverageSpec, type IntegrationDataClass, IntegrationError, type IntegrationErrorCode, type IntegrationEventStore, type IntegrationFamilyId, type IntegrationFamilySpec, type IntegrationGrant, type IntegrationGrantStore, type IntegrationGuardContext, type IntegrationHealthcheckCheck, type IntegrationHealthcheckResult, type IntegrationHealthcheckStatus, type IntegrationHealthcheckStore, IntegrationHub, type IntegrationHubOptions, type IntegrationIdempotencyRecord, type IntegrationIdempotencyStore, type IntegrationInvocationEnvelope, type IntegrationInvocationEnvelopeValidationOptions, type IntegrationLifecycleSpec, type IntegrationManifest, type IntegrationManifestResolution, type IntegrationPlannerHints, type IntegrationPolicyDecision, type IntegrationPolicyEffect, type IntegrationPolicyEngine, type IntegrationPolicyRule, type IntegrationProvider, type IntegrationProviderKind, type IntegrationRateLimitDecision, type IntegrationRateLimiter, type IntegrationRegistry, type IntegrationRegistryConflict, type IntegrationRegistryEntry, type IntegrationRegistrySourceRef, type IntegrationRegistrySummary, type IntegrationRequirement, type IntegrationRequirementMode, type IntegrationRequirementResolution, type IntegrationRequirementStatus, IntegrationRuntime, IntegrationRuntimeError, type IntegrationRuntimeHub, type IntegrationRuntimeOptions, type IntegrationSandboxBundle, IntegrationSandboxHost, type IntegrationSandboxHostHub, type IntegrationSandboxHostOptions, type IntegrationSecretStore, type IntegrationSetupSpec, type IntegrationSpec, type IntegrationSpecStatus, type IntegrationSpecValidationIssue, type IntegrationSpecValidationResult, type IntegrationSupportTier, type IntegrationToolDefinition, type IntegrationToolSearchFilters, type IntegrationToolSearchResult, type IntegrationTriggerEvent, type IntegrationTriggerSubscription, type IntegrationUserAction, type IntegrationWebhookReceiverResult, type IntegrationWorkflowDefinition, IntegrationWorkflowRuntime, type IntegrationWorkflowRuntimeHub, type IntegrationWorkflowRuntimeOptions, type IntegrationWorkflowStore, type InvokeWithCapabilityRequest, type IssueCapabilityRequest, type IssuedIntegrationCapability, type ManifestValidationIssue, type ManifestValidationResult, type McpCatalog, type McpCatalogTool, type McpToolDefinition, type MicrosoftCalendarOptions, type MissingRequirementExplanation, type NoneAuthSpec, type NormalizedIntegrationError, type NormalizedIntegrationResult, type NormalizedPermission, type NotionDatabaseOptions, type OAuth2AuthSpec, type OAuthFlowStore, type OAuthTokens, type OpenApiDocument, type OpenApiOperation, PROVIDER_PASSTHROUGH_ACTION, type ParsedStripeSignatureHeader, type PendingOAuthFlow, type PermissionDescriptor, type PlatformIntegrationPolicyPresetOptions, type PostSetupCheck, type ProviderHttpRequestInput, type ProviderPassthroughPolicy, type Quirk, type RateLimitSpec, type RefreshInput, type RenderConsentOptions, type RenderSpecOptions, type RenderedConsoleStep, type ResolvedDataSource, ResourceContention, type RestConnectorSpec, type RestCredentialPlacement, type RestOperationSpec, type RestRequestSpec, type ScopeDescriptor, type SecretRef, type SlackOptions, type SlackVerifyOptions, type StartAuthRequest, type StartAuthResult, type StartOAuthInput, type StartOAuthOutput, StaticIntegrationPolicyEngine, type StaticIntegrationPolicyOptions, type StoredIntegrationEvent, type StripeVerifyOptions, type TangleIntegrationInvokeInput, type TangleIntegrationInvokeResult, TangleIntegrationsClient, type TangleIntegrationsClientOptions, type TwilioVerifyOptions, _resetPendingFlowsForTests, airtableConnector, asanaConnector, assertValidConnectorManifest, assertValidIntegrationManifest, assertValidIntegrationSpec, buildActivepiecesConnectors, buildApprovalRequest, buildCanonicalLaunchConnectors, buildDefaultIntegrationRegistry, buildHealthcheckPlan, buildIntegrationBridgeEnvironment, buildIntegrationBridgePayload, buildIntegrationCoverageConnectors, buildIntegrationInvocationEnvelope, buildIntegrationToolCatalog, calendarExercisePlannerManifest, canonicalActionConnectorId, canonicalConnectorId, composeIntegrationRegistry, consoleStepsToText, consumePendingFlow, createApprovalBackedPolicyEngine, createAuditingActionGuard, createConnectionCredentialResolver, createConnectorAdapterProvider, createCredentialBackedAdapterProvider, createDefaultIntegrationActionGuard, createDefaultIntegrationPolicyEngine, createGatewayCatalogProvider, createHttpIntegrationProvider, createIntegrationAuditEvent, createIntegrationRuntime, createIntegrationWorkflowRuntime, createMockIntegrationProvider, createPlatformIntegrationPolicyPreset, createTangleIntegrationsClient, declarativeRestConnector, decodeIntegrationBridgePayload, dispatchIntegrationInvocation, encodeIntegrationBridgePayload, exchangeAuthorizationCode, explainMissingRequirements, firstHeader, getActivepiecesOverride, getIntegrationFamily, getIntegrationSpec, githubConnector, gitlabConnector, googleCalendar, googleSheets, healthcheckRequest, hubspot, importGraphqlConnector, importMcpConnector, importOpenApiConnector, inferIntegrationManifestFromTools, inferIntegrationSupportTier, integrationCoverageChecklistMarkdown, integrationSpecToConnector, integrationToolName, invocationRequestFromEnvelope, listActivepiecesCatalogEntries, listExecutableIntegrationSpecs, listIntegrationCoverageSpecs, listIntegrationSpecs, manifestToConnector, microsoftCalendar, normalizeGatewayCatalog, normalizeIntegrationError, normalizeIntegrationResult, notionDatabase, parseIntegrationBridgeEnvironment, parseIntegrationToolName, parseStripeSignatureHeader, receiveIntegrationWebhook, redactApprovalRequest, redactCapability, redactIntegrationBridgePayload, redactInvocationEnvelope, refreshAccessToken, renderAgentToolDescription, renderApprovalCopy, renderConsentSummary, renderConsoleSteps, renderRunbookMarkdown, resolveConnectionCredentials, resolveIntegrationApproval, revokeConnection, runIntegrationHealthcheck, runIntegrationHealthchecks, salesforceConnector, sanitizeAuditConnection, sanitizeConnection, searchIntegrationTools, signCapability, slack, slackEventsConnector, specAuthToConnectorAuth, startOAuthFlow, statusForCode, storedEventToTriggerEvent, stripePackConnector, stripeWebhookReceiverConnector, summarizeIntegrationRegistry, toMcpTools, twilioSmsConnector, validateConnectorManifest, validateCredentialFormat, validateCredentialSet, validateIntegrationInvocationEnvelope, validateIntegrationManifest, validateIntegrationSpec, validateProviderPassthroughRequest, verifyCapabilityToken, verifyHmacSignature, verifySlackSignature, verifyStripeSignature, verifyTwilioSignature, webhookConnector };
|