@tangle-network/agent-integrations 0.31.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/tangle-catalog-runtime.js +7 -7
- package/dist/catalog.d.ts +74 -8
- package/dist/catalog.js +7 -7
- package/dist/{chunk-JCHD6L3B.js → chunk-43VQSANC.js} +2 -2
- package/dist/{chunk-F4YILONK.js → chunk-6N23S4JY.js} +21530 -257
- package/dist/chunk-6N23S4JY.js.map +1 -0
- package/dist/{chunk-VVC7U7W7.js → chunk-7T5YTVER.js} +51 -2
- package/dist/chunk-7T5YTVER.js.map +1 -0
- package/dist/{chunk-Q5X3QNHR.js → chunk-NQ7OPDUM.js} +261 -1
- package/dist/chunk-NQ7OPDUM.js.map +1 -0
- package/dist/{chunk-S2MVWQYL.js → chunk-RF3RH374.js} +2 -2
- package/dist/{chunk-M2RFFAMB.js → chunk-XO2RSS6Y.js} +300 -13
- package/dist/chunk-XO2RSS6Y.js.map +1 -0
- package/dist/{chunk-CDY2ETYT.js → chunk-YPZORI3G.js} +2 -2
- package/dist/connect/index.d.ts +2 -1
- package/dist/connect/index.js +2 -2
- package/dist/connectors/adapters/index.d.ts +113 -25
- package/dist/connectors/adapters/index.js +4 -2
- package/dist/connectors/index.d.ts +3 -2
- package/dist/connectors/index.js +4 -2
- package/dist/consumer-CzJgntej.d.ts +292 -0
- package/dist/consumer.d.ts +6 -8
- package/dist/consumer.js +2 -2
- package/dist/core-types-D5Dc65Ud.d.ts +355 -0
- package/dist/index.d.ts +1282 -4
- package/dist/index.js +13 -7
- package/dist/middleware/index.d.ts +2 -1
- package/dist/middleware/index.js +2 -2
- package/dist/registry.d.ts +3 -2407
- package/dist/registry.js +7 -7
- package/dist/runtime.d.ts +137 -8
- package/dist/runtime.js +7 -7
- package/dist/specs.d.ts +208 -8
- package/dist/specs.js +1 -1
- package/dist/tangle-catalog-runtime-2HddXxoM.d.ts +242 -0
- package/dist/tangle-catalog-runtime.d.ts +3 -8
- package/dist/tangle-catalog-runtime.js +7 -7
- package/dist/tangle-id-DA_qj-O_.d.ts +192 -0
- package/dist/{tangle-id-Dj0ipP4E.d.ts → types-XdpvaIzW.d.ts} +1 -167
- package/docs/integration-execution-audit.md +7 -5
- package/docs/integration-execution-matrix.json +32 -0
- package/package.json +12 -10
- package/dist/chunk-F4YILONK.js.map +0 -1
- package/dist/chunk-M2RFFAMB.js.map +0 -1
- package/dist/chunk-Q5X3QNHR.js.map +0 -1
- package/dist/chunk-VVC7U7W7.js.map +0 -1
- /package/dist/{chunk-JCHD6L3B.js.map → chunk-43VQSANC.js.map} +0 -0
- /package/dist/{chunk-S2MVWQYL.js.map → chunk-RF3RH374.js.map} +0 -0
- /package/dist/{chunk-CDY2ETYT.js.map → chunk-YPZORI3G.js.map} +0 -0
package/dist/registry.js
CHANGED
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
composeIntegrationRegistry,
|
|
6
6
|
inferIntegrationSupportTier,
|
|
7
7
|
summarizeIntegrationRegistry
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-XO2RSS6Y.js";
|
|
9
|
+
import "./chunk-43VQSANC.js";
|
|
10
|
+
import "./chunk-YPZORI3G.js";
|
|
11
11
|
import "./chunk-H4XYLS7T.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-RF3RH374.js";
|
|
13
|
+
import "./chunk-7T5YTVER.js";
|
|
14
14
|
import "./chunk-376UBTNB.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-6N23S4JY.js";
|
|
16
16
|
import "./chunk-2TW2QKGZ.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-NQ7OPDUM.js";
|
|
18
18
|
export {
|
|
19
19
|
buildDefaultIntegrationRegistry,
|
|
20
20
|
canonicalConnectorId,
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,8 +1,137 @@
|
|
|
1
|
-
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { IntegrationToolDefinition } from './catalog.js';
|
|
2
|
+
import { IntegrationRegistryEntry, IntegrationRegistry } from './registry.js';
|
|
3
|
+
import { I as IntegrationActor, a as IssuedIntegrationCapability, b as IntegrationConnector, c as IntegrationConnection } from './core-types-D5Dc65Ud.js';
|
|
4
|
+
import './types-XdpvaIzW.js';
|
|
5
|
+
|
|
6
|
+
type IntegrationRequirementMode = 'read' | 'write' | 'trigger';
|
|
7
|
+
type IntegrationRequirementStatus = 'ready' | 'missing_connection' | 'not_executable' | 'unknown_connector';
|
|
8
|
+
interface IntegrationRequirement {
|
|
9
|
+
id: string;
|
|
10
|
+
connectorId: string;
|
|
11
|
+
reason: string;
|
|
12
|
+
mode: IntegrationRequirementMode;
|
|
13
|
+
requiredActions?: string[];
|
|
14
|
+
requiredTriggers?: string[];
|
|
15
|
+
requiredScopes?: string[];
|
|
16
|
+
optional?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface IntegrationManifest {
|
|
19
|
+
id: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
owner?: IntegrationActor;
|
|
22
|
+
requirements: IntegrationRequirement[];
|
|
23
|
+
metadata?: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
interface IntegrationRequirementResolution {
|
|
26
|
+
requirement: IntegrationRequirement;
|
|
27
|
+
status: IntegrationRequirementStatus;
|
|
28
|
+
connector?: IntegrationConnector;
|
|
29
|
+
registryEntry?: IntegrationRegistryEntry;
|
|
30
|
+
connection?: IntegrationConnection;
|
|
31
|
+
missingScopes: string[];
|
|
32
|
+
missingActions: string[];
|
|
33
|
+
missingTriggers: string[];
|
|
34
|
+
message: string;
|
|
35
|
+
}
|
|
36
|
+
interface IntegrationManifestResolution {
|
|
37
|
+
manifest: IntegrationManifest;
|
|
38
|
+
owner: IntegrationActor;
|
|
39
|
+
ready: IntegrationRequirementResolution[];
|
|
40
|
+
missing: IntegrationRequirementResolution[];
|
|
41
|
+
optionalMissing: IntegrationRequirementResolution[];
|
|
42
|
+
}
|
|
43
|
+
interface IntegrationGrant {
|
|
44
|
+
id: string;
|
|
45
|
+
manifestId: string;
|
|
46
|
+
requirementId: string;
|
|
47
|
+
owner: IntegrationActor;
|
|
48
|
+
grantee: IntegrationActor;
|
|
49
|
+
connectionId: string;
|
|
50
|
+
connectorId: string;
|
|
51
|
+
scopes: string[];
|
|
52
|
+
allowedActions: string[];
|
|
53
|
+
allowedTriggers: string[];
|
|
54
|
+
status: 'active' | 'revoked';
|
|
55
|
+
createdAt: string;
|
|
56
|
+
updatedAt: string;
|
|
57
|
+
metadata?: Record<string, unknown>;
|
|
58
|
+
}
|
|
59
|
+
interface IntegrationGrantStore {
|
|
60
|
+
get(grantId: string): Promise<IntegrationGrant | undefined> | IntegrationGrant | undefined;
|
|
61
|
+
put(grant: IntegrationGrant): Promise<void> | void;
|
|
62
|
+
listByManifest(manifestId: string, grantee?: IntegrationActor): Promise<IntegrationGrant[]> | IntegrationGrant[];
|
|
63
|
+
listByGrantee(grantee: IntegrationActor): Promise<IntegrationGrant[]> | IntegrationGrant[];
|
|
64
|
+
listByIds?(grantIds: string[]): Promise<IntegrationGrant[]> | IntegrationGrant[];
|
|
65
|
+
delete?(grantId: string): Promise<void> | void;
|
|
66
|
+
}
|
|
67
|
+
interface IntegrationCapabilityBinding {
|
|
68
|
+
requirementId: string;
|
|
69
|
+
connectorId: string;
|
|
70
|
+
connectionId: string;
|
|
71
|
+
grantId: string;
|
|
72
|
+
scopes: string[];
|
|
73
|
+
allowedActions: string[];
|
|
74
|
+
allowedTriggers: string[];
|
|
75
|
+
capability: IssuedIntegrationCapability;
|
|
76
|
+
}
|
|
77
|
+
interface IntegrationSandboxBundle {
|
|
78
|
+
manifestId: string;
|
|
79
|
+
subject: IntegrationActor;
|
|
80
|
+
capabilities: IntegrationCapabilityBinding[];
|
|
81
|
+
connectors: IntegrationConnector[];
|
|
82
|
+
tools: IntegrationToolDefinition[];
|
|
83
|
+
expiresAt: string;
|
|
84
|
+
}
|
|
85
|
+
interface IntegrationRuntimeHub {
|
|
86
|
+
listRegistry(): Promise<IntegrationRegistry> | IntegrationRegistry;
|
|
87
|
+
listConnections(owner: IntegrationActor): Promise<IntegrationConnection[]> | IntegrationConnection[];
|
|
88
|
+
getConnection(connectionId: string): Promise<IntegrationConnection | undefined> | IntegrationConnection | undefined;
|
|
89
|
+
issueCapability(input: {
|
|
90
|
+
subject: IntegrationActor;
|
|
91
|
+
connectionId: string;
|
|
92
|
+
scopes: string[];
|
|
93
|
+
allowedActions: string[];
|
|
94
|
+
ttlMs: number;
|
|
95
|
+
metadata?: Record<string, unknown>;
|
|
96
|
+
}): Promise<IssuedIntegrationCapability> | IssuedIntegrationCapability;
|
|
97
|
+
}
|
|
98
|
+
interface IntegrationRuntimeOptions {
|
|
99
|
+
hub: IntegrationRuntimeHub;
|
|
100
|
+
grants?: IntegrationGrantStore;
|
|
101
|
+
now?: () => Date;
|
|
102
|
+
}
|
|
103
|
+
declare class InMemoryIntegrationGrantStore implements IntegrationGrantStore {
|
|
104
|
+
private readonly grants;
|
|
105
|
+
get(grantId: string): IntegrationGrant | undefined;
|
|
106
|
+
put(grant: IntegrationGrant): void;
|
|
107
|
+
listByManifest(manifestId: string, grantee?: IntegrationActor): IntegrationGrant[];
|
|
108
|
+
listByGrantee(grantee: IntegrationActor): IntegrationGrant[];
|
|
109
|
+
listByIds(grantIds: string[]): IntegrationGrant[];
|
|
110
|
+
delete(grantId: string): void;
|
|
111
|
+
}
|
|
112
|
+
declare class IntegrationRuntime {
|
|
113
|
+
private readonly hub;
|
|
114
|
+
private readonly grants;
|
|
115
|
+
private readonly now;
|
|
116
|
+
constructor(options: IntegrationRuntimeOptions);
|
|
117
|
+
registry(): Promise<IntegrationRegistry>;
|
|
118
|
+
resolveManifest(manifest: IntegrationManifest, owner: IntegrationActor): Promise<IntegrationManifestResolution>;
|
|
119
|
+
createGrants(input: {
|
|
120
|
+
manifest: IntegrationManifest;
|
|
121
|
+
owner: IntegrationActor;
|
|
122
|
+
grantee: IntegrationActor;
|
|
123
|
+
metadata?: Record<string, unknown>;
|
|
124
|
+
}): Promise<IntegrationGrant[]>;
|
|
125
|
+
buildSandboxBundle(input: {
|
|
126
|
+
manifestId?: string;
|
|
127
|
+
grantIds?: string[];
|
|
128
|
+
owner: IntegrationActor;
|
|
129
|
+
subject: IntegrationActor;
|
|
130
|
+
ttlMs: number;
|
|
131
|
+
grantee?: IntegrationActor;
|
|
132
|
+
}): Promise<IntegrationSandboxBundle>;
|
|
133
|
+
private resolveBundleGrants;
|
|
134
|
+
}
|
|
135
|
+
declare function createIntegrationRuntime(options: IntegrationRuntimeOptions): IntegrationRuntime;
|
|
136
|
+
|
|
137
|
+
export { InMemoryIntegrationGrantStore, type IntegrationCapabilityBinding, type IntegrationGrant, type IntegrationGrantStore, type IntegrationManifest, type IntegrationManifestResolution, type IntegrationRequirement, type IntegrationRequirementMode, type IntegrationRequirementResolution, type IntegrationRequirementStatus, IntegrationRuntime, type IntegrationRuntimeHub, type IntegrationRuntimeOptions, type IntegrationSandboxBundle, createIntegrationRuntime };
|
package/dist/runtime.js
CHANGED
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
InMemoryIntegrationGrantStore,
|
|
3
3
|
IntegrationRuntime,
|
|
4
4
|
createIntegrationRuntime
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-XO2RSS6Y.js";
|
|
6
|
+
import "./chunk-43VQSANC.js";
|
|
7
|
+
import "./chunk-YPZORI3G.js";
|
|
8
8
|
import "./chunk-H4XYLS7T.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-RF3RH374.js";
|
|
10
|
+
import "./chunk-7T5YTVER.js";
|
|
11
11
|
import "./chunk-376UBTNB.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-6N23S4JY.js";
|
|
13
13
|
import "./chunk-2TW2QKGZ.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-NQ7OPDUM.js";
|
|
15
15
|
export {
|
|
16
16
|
InMemoryIntegrationGrantStore,
|
|
17
17
|
IntegrationRuntime,
|
package/dist/specs.d.ts
CHANGED
|
@@ -1,8 +1,208 @@
|
|
|
1
|
-
|
|
2
|
-
import './
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { f as IntegrationActionRisk, g as IntegrationDataClass, d as IntegrationConnectorCategory, e as IntegrationConnectorAction, G as IntegrationConnectorTrigger, b as IntegrationConnector } from './core-types-D5Dc65Ud.js';
|
|
2
|
+
import './types-XdpvaIzW.js';
|
|
3
|
+
|
|
4
|
+
type IntegrationAuthMode = 'oauth2' | 'api_key' | 'hmac' | 'none' | 'custom';
|
|
5
|
+
type IntegrationSpecStatus = 'catalog' | 'executable' | 'deprecated';
|
|
6
|
+
type IntegrationFamilyId = 'google' | 'microsoft-graph' | 'atlassian' | 'salesforce' | 'hubspot' | 'slack' | 'notion' | 'standard-oauth2' | 'api-key' | 'hmac' | 'none';
|
|
7
|
+
type NormalizedPermission = `${string}.read` | `${string}.write` | `${string}.delete` | `${string}.admin`;
|
|
8
|
+
interface IntegrationSpec {
|
|
9
|
+
kind: string;
|
|
10
|
+
title: string;
|
|
11
|
+
category: IntegrationConnectorCategory;
|
|
12
|
+
status: IntegrationSpecStatus;
|
|
13
|
+
family: IntegrationFamilyId;
|
|
14
|
+
auth: IntegrationAuthSpec;
|
|
15
|
+
permissions: PermissionDescriptor[];
|
|
16
|
+
actions: IntegrationConnectorAction[];
|
|
17
|
+
triggers?: IntegrationConnectorTrigger[];
|
|
18
|
+
setup: IntegrationSetupSpec;
|
|
19
|
+
lifecycle?: IntegrationLifecycleSpec;
|
|
20
|
+
plannerHints?: IntegrationPlannerHints;
|
|
21
|
+
metadata?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
type IntegrationAuthSpec = OAuth2AuthSpec | ApiKeyAuthSpec | HmacAuthSpec | NoneAuthSpec | CustomAuthSpec;
|
|
24
|
+
interface OAuth2AuthSpec {
|
|
25
|
+
mode: 'oauth2';
|
|
26
|
+
authorizationUrl: string;
|
|
27
|
+
tokenUrl: string;
|
|
28
|
+
clientIdEnv?: string;
|
|
29
|
+
clientSecretEnv?: string;
|
|
30
|
+
scopes: ScopeDescriptor[];
|
|
31
|
+
extraAuthParams?: Record<string, string>;
|
|
32
|
+
redirectUriTemplate: string;
|
|
33
|
+
pkce?: 'required' | 'supported' | 'unsupported';
|
|
34
|
+
}
|
|
35
|
+
interface ApiKeyAuthSpec {
|
|
36
|
+
mode: 'api_key';
|
|
37
|
+
credential: CredentialFieldSpec;
|
|
38
|
+
placement?: 'bearer' | 'header' | 'query' | 'basic';
|
|
39
|
+
}
|
|
40
|
+
interface HmacAuthSpec {
|
|
41
|
+
mode: 'hmac';
|
|
42
|
+
credential: CredentialFieldSpec;
|
|
43
|
+
signatureHeader?: string;
|
|
44
|
+
}
|
|
45
|
+
interface NoneAuthSpec {
|
|
46
|
+
mode: 'none';
|
|
47
|
+
}
|
|
48
|
+
interface CustomAuthSpec {
|
|
49
|
+
mode: 'custom';
|
|
50
|
+
description: string;
|
|
51
|
+
}
|
|
52
|
+
interface ScopeDescriptor {
|
|
53
|
+
normalized: NormalizedPermission;
|
|
54
|
+
providerScope: string;
|
|
55
|
+
title: string;
|
|
56
|
+
reason: string;
|
|
57
|
+
risk: IntegrationActionRisk;
|
|
58
|
+
dataClass: IntegrationDataClass;
|
|
59
|
+
}
|
|
60
|
+
interface PermissionDescriptor {
|
|
61
|
+
normalized: NormalizedPermission;
|
|
62
|
+
providerScopes: string[];
|
|
63
|
+
title: string;
|
|
64
|
+
risk: IntegrationActionRisk;
|
|
65
|
+
dataClass: IntegrationDataClass;
|
|
66
|
+
reason: string;
|
|
67
|
+
}
|
|
68
|
+
interface CredentialFieldSpec {
|
|
69
|
+
label: string;
|
|
70
|
+
description: string;
|
|
71
|
+
env?: string;
|
|
72
|
+
example?: string;
|
|
73
|
+
regex?: string;
|
|
74
|
+
secret: boolean;
|
|
75
|
+
}
|
|
76
|
+
interface ConsoleStep {
|
|
77
|
+
id: string;
|
|
78
|
+
title: string;
|
|
79
|
+
detail: string;
|
|
80
|
+
copyValue?: string;
|
|
81
|
+
}
|
|
82
|
+
interface Quirk {
|
|
83
|
+
id: string;
|
|
84
|
+
severity: 'info' | 'warning' | 'critical';
|
|
85
|
+
message: string;
|
|
86
|
+
}
|
|
87
|
+
interface PostSetupCheck {
|
|
88
|
+
id: string;
|
|
89
|
+
title: string;
|
|
90
|
+
detail: string;
|
|
91
|
+
}
|
|
92
|
+
interface HealthcheckSpec {
|
|
93
|
+
id: string;
|
|
94
|
+
level: 'client_config' | 'connection' | 'webhook' | 'static';
|
|
95
|
+
method?: 'GET' | 'POST';
|
|
96
|
+
url?: string;
|
|
97
|
+
expectedStatus?: number[];
|
|
98
|
+
description: string;
|
|
99
|
+
}
|
|
100
|
+
interface IntegrationSetupSpec {
|
|
101
|
+
consoleUrl?: string;
|
|
102
|
+
consoleSteps: ConsoleStep[];
|
|
103
|
+
credentialFields: CredentialFieldSpec[];
|
|
104
|
+
redirectUriTemplate?: string;
|
|
105
|
+
knownQuirks?: Quirk[];
|
|
106
|
+
postSetup?: PostSetupCheck[];
|
|
107
|
+
healthcheck?: HealthcheckSpec;
|
|
108
|
+
}
|
|
109
|
+
interface IntegrationLifecycleSpec {
|
|
110
|
+
supportsRefresh: boolean;
|
|
111
|
+
supportsRevoke: boolean;
|
|
112
|
+
supportsIncrementalAuth: boolean;
|
|
113
|
+
recommendedHealthcheckIntervalHours?: number;
|
|
114
|
+
freshnessSloMinutes?: number;
|
|
115
|
+
}
|
|
116
|
+
interface IntegrationPlannerHints {
|
|
117
|
+
useFor: string[];
|
|
118
|
+
avoidFor?: string[];
|
|
119
|
+
dataFreshness: 'realtime' | 'near_realtime' | 'eventual' | 'manual';
|
|
120
|
+
writeRisk: 'low' | 'medium' | 'high';
|
|
121
|
+
}
|
|
122
|
+
interface IntegrationFamilySpec {
|
|
123
|
+
id: IntegrationFamilyId;
|
|
124
|
+
title: string;
|
|
125
|
+
authMode: IntegrationAuthMode;
|
|
126
|
+
consoleUrl?: string;
|
|
127
|
+
authorizationUrl?: string;
|
|
128
|
+
tokenUrl?: string;
|
|
129
|
+
redirectUriTemplate?: string;
|
|
130
|
+
credentialFields: CredentialFieldSpec[];
|
|
131
|
+
consoleSteps: ConsoleStep[];
|
|
132
|
+
knownQuirks?: Quirk[];
|
|
133
|
+
lifecycle: IntegrationLifecycleSpec;
|
|
134
|
+
}
|
|
135
|
+
interface IntegrationSpecValidationIssue {
|
|
136
|
+
path: string;
|
|
137
|
+
message: string;
|
|
138
|
+
}
|
|
139
|
+
interface IntegrationSpecValidationResult {
|
|
140
|
+
ok: boolean;
|
|
141
|
+
issues: IntegrationSpecValidationIssue[];
|
|
142
|
+
}
|
|
143
|
+
interface RenderSpecOptions {
|
|
144
|
+
host: string;
|
|
145
|
+
callbackPath?: string;
|
|
146
|
+
}
|
|
147
|
+
interface RenderedConsoleStep extends ConsoleStep {
|
|
148
|
+
detail: string;
|
|
149
|
+
copyValue?: string;
|
|
150
|
+
}
|
|
151
|
+
interface CredentialValidationInput {
|
|
152
|
+
field: CredentialFieldSpec;
|
|
153
|
+
value: string;
|
|
154
|
+
}
|
|
155
|
+
interface CredentialValidationResult {
|
|
156
|
+
ok: boolean;
|
|
157
|
+
field: string;
|
|
158
|
+
message?: string;
|
|
159
|
+
}
|
|
160
|
+
interface HealthcheckPlan {
|
|
161
|
+
kind: string;
|
|
162
|
+
healthcheck: HealthcheckSpec;
|
|
163
|
+
requires: Array<'client_id' | 'client_secret' | 'api_key' | 'hmac_secret' | 'connection_credentials'>;
|
|
164
|
+
message: string;
|
|
165
|
+
}
|
|
166
|
+
declare function specAuthToConnectorAuth(auth: IntegrationAuthSpec): IntegrationConnector['auth'];
|
|
167
|
+
|
|
168
|
+
declare const INTEGRATION_FAMILIES: Record<IntegrationFamilyId, IntegrationFamilySpec>;
|
|
169
|
+
declare function getIntegrationFamily(id: IntegrationFamilyId): IntegrationFamilySpec;
|
|
170
|
+
|
|
171
|
+
declare function listIntegrationSpecs(): IntegrationSpec[];
|
|
172
|
+
declare function getIntegrationSpec(kind: string): IntegrationSpec | undefined;
|
|
173
|
+
/** Auth-driving descriptor the hub uses to start a connect flow per provider
|
|
174
|
+
* instead of hard-coding scopes/auth kind. Derived from the spec catalog
|
|
175
|
+
* ({@link getIntegrationSpec}); undefined when the kind is not in the
|
|
176
|
+
* catalog. */
|
|
177
|
+
interface ConnectorAuthSpec {
|
|
178
|
+
kind: string;
|
|
179
|
+
authKind: 'oauth2' | 'api_key' | 'none' | 'custom';
|
|
180
|
+
/** Provider scopes to request in the authorization grant. Empty for
|
|
181
|
+
* api_key / none / custom. */
|
|
182
|
+
requestedScopes: string[];
|
|
183
|
+
/** OAuth-only: authorization + token endpoints and PKCE posture. Present
|
|
184
|
+
* only when authKind === 'oauth2'. */
|
|
185
|
+
authorizationUrl?: string;
|
|
186
|
+
tokenUrl?: string;
|
|
187
|
+
pkce?: 'required' | 'supported' | 'unsupported';
|
|
188
|
+
redirectUriTemplate?: string;
|
|
189
|
+
clientIdEnv?: string;
|
|
190
|
+
clientSecretEnv?: string;
|
|
191
|
+
extraAuthParams?: Record<string, string>;
|
|
192
|
+
}
|
|
193
|
+
declare function resolveConnectorAuthSpec(kind: string): ConnectorAuthSpec | undefined;
|
|
194
|
+
declare function listExecutableIntegrationSpecs(): IntegrationSpec[];
|
|
195
|
+
declare function integrationSpecToConnector(spec: IntegrationSpec, providerId?: string): IntegrationConnector;
|
|
196
|
+
|
|
197
|
+
declare function renderConsoleSteps(spec: IntegrationSpec, options: RenderSpecOptions): RenderedConsoleStep[];
|
|
198
|
+
declare function renderRunbookMarkdown(spec: IntegrationSpec, options: RenderSpecOptions): string;
|
|
199
|
+
declare function renderAgentToolDescription(spec: IntegrationSpec): string;
|
|
200
|
+
declare function buildHealthcheckPlan(spec: IntegrationSpec): HealthcheckPlan;
|
|
201
|
+
declare function consoleStepsToText(steps: ConsoleStep[]): string;
|
|
202
|
+
|
|
203
|
+
declare function validateIntegrationSpec(spec: IntegrationSpec): IntegrationSpecValidationResult;
|
|
204
|
+
declare function assertValidIntegrationSpec(spec: IntegrationSpec): void;
|
|
205
|
+
declare function validateCredentialFormat(field: CredentialFieldSpec, value: string): CredentialValidationResult;
|
|
206
|
+
declare function validateCredentialSet(spec: IntegrationSpec, values: Record<string, string>): CredentialValidationResult[];
|
|
207
|
+
|
|
208
|
+
export { type ApiKeyAuthSpec, type ConnectorAuthSpec, type ConsoleStep, type CredentialFieldSpec, type CredentialValidationInput, type CredentialValidationResult, type CustomAuthSpec, type HealthcheckPlan, type HealthcheckSpec, type HmacAuthSpec, INTEGRATION_FAMILIES, type IntegrationAuthMode, type IntegrationAuthSpec, type IntegrationFamilyId, type IntegrationFamilySpec, type IntegrationLifecycleSpec, type IntegrationPlannerHints, type IntegrationSetupSpec, type IntegrationSpec, type IntegrationSpecStatus, type IntegrationSpecValidationIssue, type IntegrationSpecValidationResult, type NoneAuthSpec, type NormalizedPermission, type OAuth2AuthSpec, type PermissionDescriptor, type PostSetupCheck, type Quirk, type RenderSpecOptions, type RenderedConsoleStep, type ScopeDescriptor, assertValidIntegrationSpec, buildHealthcheckPlan, consoleStepsToText, getIntegrationFamily, getIntegrationSpec, integrationSpecToConnector, listExecutableIntegrationSpecs, listIntegrationSpecs, renderAgentToolDescription, renderConsoleSteps, renderRunbookMarkdown, resolveConnectorAuthSpec, specAuthToConnectorAuth, validateCredentialFormat, validateCredentialSet, validateIntegrationSpec };
|
package/dist/specs.js
CHANGED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { d as IntegrationConnectorCategory, b as IntegrationConnector, f as IntegrationActionRisk, c as IntegrationConnection, j as IntegrationActionRequest, S as StartAuthRequest, l as StartAuthResult, C as CompleteAuthRequest, k as IntegrationActionResult, m as IntegrationProvider, n as IntegrationSecretStore, e as IntegrationConnectorAction } from './core-types-D5Dc65Ud.js';
|
|
2
|
+
import { a as ConnectorCredentials } from './types-XdpvaIzW.js';
|
|
3
|
+
|
|
4
|
+
interface ActivepiecesCatalogEntry {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
npmPackage?: string;
|
|
9
|
+
version?: string;
|
|
10
|
+
category: IntegrationConnectorCategory;
|
|
11
|
+
auth: IntegrationConnector['auth'];
|
|
12
|
+
authFields?: ActivepiecesCatalogAuthField[];
|
|
13
|
+
domains: string[];
|
|
14
|
+
actions: Array<{
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
risk: IntegrationActionRisk;
|
|
18
|
+
upstreamName?: string;
|
|
19
|
+
}>;
|
|
20
|
+
triggers: Array<{
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
upstreamName?: string;
|
|
24
|
+
}>;
|
|
25
|
+
source: {
|
|
26
|
+
repository: string;
|
|
27
|
+
path: string;
|
|
28
|
+
license: 'MIT';
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
interface ActivepiecesCatalogAuthField {
|
|
32
|
+
key: string;
|
|
33
|
+
label: string;
|
|
34
|
+
required: boolean;
|
|
35
|
+
secret: boolean;
|
|
36
|
+
kind: 'text' | 'number' | 'boolean' | 'select' | 'object' | 'unknown';
|
|
37
|
+
description?: string;
|
|
38
|
+
}
|
|
39
|
+
declare function listActivepiecesCatalogEntries(): ActivepiecesCatalogEntry[];
|
|
40
|
+
declare function buildActivepiecesConnectors(options?: {
|
|
41
|
+
providerId?: string;
|
|
42
|
+
includeCatalogActions?: boolean;
|
|
43
|
+
executable?: boolean;
|
|
44
|
+
}): IntegrationConnector[];
|
|
45
|
+
|
|
46
|
+
interface ActivepiecesExecutorInvocation {
|
|
47
|
+
connection: IntegrationConnection;
|
|
48
|
+
request: IntegrationActionRequest;
|
|
49
|
+
connector: IntegrationConnector;
|
|
50
|
+
catalogEntry: ActivepiecesCatalogEntry;
|
|
51
|
+
piece: {
|
|
52
|
+
id: string;
|
|
53
|
+
npmPackage?: string;
|
|
54
|
+
version?: string;
|
|
55
|
+
actionId: string;
|
|
56
|
+
upstreamActionName?: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
interface ActivepiecesExecutorProviderOptions {
|
|
60
|
+
id?: string;
|
|
61
|
+
connectors?: IntegrationConnector[];
|
|
62
|
+
startAuth?: (request: StartAuthRequest) => Promise<StartAuthResult> | StartAuthResult;
|
|
63
|
+
completeAuth?: (request: CompleteAuthRequest) => Promise<IntegrationConnection> | IntegrationConnection;
|
|
64
|
+
executeAction: (invocation: ActivepiecesExecutorInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult;
|
|
65
|
+
}
|
|
66
|
+
declare function createActivepiecesExecutorProvider(options: ActivepiecesExecutorProviderOptions): IntegrationProvider;
|
|
67
|
+
|
|
68
|
+
declare const ACTIVEPIECES_RUNTIME_SIGNATURE_HEADER = "x-tangle-activepieces-signature";
|
|
69
|
+
declare const TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER = "x-tangle-catalog-signature";
|
|
70
|
+
interface TangleCatalogRuntimeActionRequest {
|
|
71
|
+
id: string;
|
|
72
|
+
input: unknown;
|
|
73
|
+
idempotencyKey?: string;
|
|
74
|
+
dryRun?: boolean;
|
|
75
|
+
metadata?: Record<string, unknown>;
|
|
76
|
+
}
|
|
77
|
+
interface TangleCatalogRuntimePiece {
|
|
78
|
+
id: string;
|
|
79
|
+
packageName?: string;
|
|
80
|
+
version?: string;
|
|
81
|
+
actionId: string;
|
|
82
|
+
upstreamActionName?: string;
|
|
83
|
+
}
|
|
84
|
+
interface TangleCatalogHttpExecutorOptions {
|
|
85
|
+
endpoint: string;
|
|
86
|
+
path?: string;
|
|
87
|
+
signatureHeader?: string;
|
|
88
|
+
secret?: string;
|
|
89
|
+
fetchImpl?: typeof fetch;
|
|
90
|
+
headers?: Record<string, string>;
|
|
91
|
+
timeoutMs?: number;
|
|
92
|
+
requestId?: () => string;
|
|
93
|
+
}
|
|
94
|
+
interface TangleCatalogHttpExecutorInvocation extends Omit<ActivepiecesExecutorInvocation, 'catalogEntry' | 'piece'> {
|
|
95
|
+
catalogEntry: unknown;
|
|
96
|
+
piece: TangleCatalogRuntimePiece;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated Use the Tangle catalog runtime types. This name is kept only for
|
|
100
|
+
* compatibility with the upstream catalog ingestion backend.
|
|
101
|
+
*/
|
|
102
|
+
interface ActivepiecesRuntimeRequest {
|
|
103
|
+
version: 1;
|
|
104
|
+
requestId: string;
|
|
105
|
+
providerId: string;
|
|
106
|
+
connection: IntegrationConnection;
|
|
107
|
+
connector: Pick<IntegrationConnector, 'id' | 'title' | 'auth' | 'scopes' | 'metadata'>;
|
|
108
|
+
piece: ActivepiecesExecutorInvocation['piece'];
|
|
109
|
+
action: TangleCatalogRuntimeActionRequest;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated Use `TangleCatalogHttpExecutorOptions`.
|
|
113
|
+
*/
|
|
114
|
+
type ActivepiecesHttpExecutorOptions = TangleCatalogHttpExecutorOptions;
|
|
115
|
+
/**
|
|
116
|
+
* @deprecated Use `createTangleCatalogHttpExecutor`.
|
|
117
|
+
*/
|
|
118
|
+
declare function createActivepiecesHttpExecutor(options: ActivepiecesHttpExecutorOptions): ActivepiecesExecutorProviderOptions['executeAction'];
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated Use `buildTangleCatalogRuntimeRequest`.
|
|
121
|
+
*/
|
|
122
|
+
declare function buildActivepiecesRuntimeRequest(invocation: ActivepiecesExecutorInvocation, requestId?: string): ActivepiecesRuntimeRequest;
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated Use `signTangleCatalogRuntimeRequest`.
|
|
125
|
+
*/
|
|
126
|
+
declare function signActivepiecesRuntimeRequest(serializedBody: string, secret: string): string;
|
|
127
|
+
/**
|
|
128
|
+
* @deprecated Use `verifyTangleCatalogRuntimeSignature`.
|
|
129
|
+
*/
|
|
130
|
+
declare function verifyActivepiecesRuntimeSignature(serializedBody: string, signature: string | null | undefined, secret: string): boolean;
|
|
131
|
+
interface TangleCatalogRuntimeRequest {
|
|
132
|
+
version: 1;
|
|
133
|
+
requestId: string;
|
|
134
|
+
providerId: string;
|
|
135
|
+
connection: IntegrationConnection;
|
|
136
|
+
connector: Pick<IntegrationConnector, 'id' | 'title' | 'auth' | 'scopes' | 'metadata'>;
|
|
137
|
+
piece: TangleCatalogRuntimePiece;
|
|
138
|
+
action: TangleCatalogRuntimeActionRequest;
|
|
139
|
+
}
|
|
140
|
+
declare function createTangleCatalogHttpExecutor(options: TangleCatalogHttpExecutorOptions): (invocation: TangleCatalogHttpExecutorInvocation) => Promise<IntegrationActionResult>;
|
|
141
|
+
declare function buildTangleCatalogRuntimeRequest(invocation: TangleCatalogHttpExecutorInvocation, requestId?: string): TangleCatalogRuntimeRequest;
|
|
142
|
+
declare const signTangleCatalogRuntimeRequest: typeof signActivepiecesRuntimeRequest;
|
|
143
|
+
declare const verifyTangleCatalogRuntimeSignature: typeof verifyActivepiecesRuntimeSignature;
|
|
144
|
+
|
|
145
|
+
interface TangleCatalogRuntimeInvocation {
|
|
146
|
+
request: TangleCatalogRuntimeRequest;
|
|
147
|
+
connection: IntegrationConnection;
|
|
148
|
+
connector: IntegrationConnector;
|
|
149
|
+
action: IntegrationConnectorAction;
|
|
150
|
+
}
|
|
151
|
+
interface TangleCatalogRuntimeHandlerOptions {
|
|
152
|
+
secret?: string;
|
|
153
|
+
requireSignature?: boolean;
|
|
154
|
+
signatureHeader?: string;
|
|
155
|
+
connectors?: IntegrationConnector[];
|
|
156
|
+
maxBodyBytes?: number;
|
|
157
|
+
executeAction: (invocation: TangleCatalogRuntimeInvocation) => Promise<IntegrationActionResult> | IntegrationActionResult;
|
|
158
|
+
}
|
|
159
|
+
interface TangleCatalogInstalledPackageExecutorOptions {
|
|
160
|
+
moduleLoader?: (packageName: string) => Promise<unknown> | unknown;
|
|
161
|
+
actionAliases?: Record<string, Record<string, string>>;
|
|
162
|
+
allowFuzzyActionMatch?: boolean;
|
|
163
|
+
resolveAuth?: (connection: IntegrationConnection) => Promise<unknown> | unknown;
|
|
164
|
+
beforeRun?: (invocation: TangleCatalogRuntimeInvocation) => Promise<void> | void;
|
|
165
|
+
}
|
|
166
|
+
interface TangleCatalogAuthResolverOptions {
|
|
167
|
+
secrets: IntegrationSecretStore;
|
|
168
|
+
mapCredentials?: (input: {
|
|
169
|
+
connection: IntegrationConnection;
|
|
170
|
+
credentials: ConnectorCredentials;
|
|
171
|
+
connectorId: string;
|
|
172
|
+
}) => unknown;
|
|
173
|
+
}
|
|
174
|
+
interface TangleCatalogHttpAuthResolverOptions {
|
|
175
|
+
endpoint: string;
|
|
176
|
+
secret: string;
|
|
177
|
+
path?: string;
|
|
178
|
+
timeoutMs?: number;
|
|
179
|
+
fetchImpl?: typeof fetch;
|
|
180
|
+
headers?: Record<string, string>;
|
|
181
|
+
requestId?: () => string;
|
|
182
|
+
}
|
|
183
|
+
interface TangleCatalogHttpAuthResolverRequest {
|
|
184
|
+
version: 1;
|
|
185
|
+
requestId: string;
|
|
186
|
+
providerId: string;
|
|
187
|
+
connectorId: string;
|
|
188
|
+
connectionId: string;
|
|
189
|
+
secretRef?: IntegrationConnection['secretRef'];
|
|
190
|
+
}
|
|
191
|
+
interface TangleCatalogRuntimeModuleAction {
|
|
192
|
+
name?: string;
|
|
193
|
+
displayName?: string;
|
|
194
|
+
run?: (context: {
|
|
195
|
+
auth: unknown;
|
|
196
|
+
propsValue: unknown;
|
|
197
|
+
input: unknown;
|
|
198
|
+
connection: IntegrationConnection;
|
|
199
|
+
request: TangleCatalogRuntimeRequest;
|
|
200
|
+
}) => Promise<unknown> | unknown;
|
|
201
|
+
}
|
|
202
|
+
interface TangleCatalogRuntimeHttpRequest {
|
|
203
|
+
body: string | Uint8Array | TangleCatalogRuntimeRequest;
|
|
204
|
+
headers?: Headers | Record<string, string | string[] | undefined>;
|
|
205
|
+
}
|
|
206
|
+
interface TangleCatalogRuntimeHttpResponse {
|
|
207
|
+
status: number;
|
|
208
|
+
headers: Record<string, string>;
|
|
209
|
+
body: IntegrationActionResult | {
|
|
210
|
+
ok: false;
|
|
211
|
+
action: string;
|
|
212
|
+
output: {
|
|
213
|
+
code: string;
|
|
214
|
+
message: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
interface TangleCatalogRuntimePackageCoverageRow {
|
|
219
|
+
connectorId: string;
|
|
220
|
+
packageName: string;
|
|
221
|
+
packageInstalled: boolean;
|
|
222
|
+
packageLoads: boolean;
|
|
223
|
+
pieceExportFound: boolean;
|
|
224
|
+
actionMappingsVerified: number;
|
|
225
|
+
actionMappingsTotal: number;
|
|
226
|
+
triggerMappingsFound: number;
|
|
227
|
+
triggerMappingsTotal: number;
|
|
228
|
+
triggerHostingSupported: boolean;
|
|
229
|
+
error?: string;
|
|
230
|
+
}
|
|
231
|
+
interface TangleCatalogRuntimePackageCoverageOptions {
|
|
232
|
+
connectorIds?: string[];
|
|
233
|
+
moduleLoader?: (packageName: string) => Promise<unknown> | unknown;
|
|
234
|
+
}
|
|
235
|
+
declare function createTangleCatalogRuntimeHandler(options: TangleCatalogRuntimeHandlerOptions): (input: TangleCatalogRuntimeHttpRequest) => Promise<TangleCatalogRuntimeHttpResponse>;
|
|
236
|
+
declare function createTangleCatalogInstalledPackageExecutor(options?: TangleCatalogInstalledPackageExecutorOptions): TangleCatalogRuntimeHandlerOptions['executeAction'];
|
|
237
|
+
declare function auditTangleCatalogRuntimePackages(options?: TangleCatalogRuntimePackageCoverageOptions): Promise<TangleCatalogRuntimePackageCoverageRow[]>;
|
|
238
|
+
declare function createTangleCatalogCredentialAuthResolver(options: TangleCatalogAuthResolverOptions): (connection: IntegrationConnection) => Promise<unknown>;
|
|
239
|
+
declare function createTangleCatalogHttpAuthResolver(options: TangleCatalogHttpAuthResolverOptions): (connection: IntegrationConnection) => Promise<unknown>;
|
|
240
|
+
declare function tangleCatalogAuthValue(credentials: ConnectorCredentials): unknown;
|
|
241
|
+
|
|
242
|
+
export { type ActivepiecesCatalogEntry as A, createActivepiecesExecutorProvider as B, createActivepiecesHttpExecutor as C, createTangleCatalogCredentialAuthResolver as D, createTangleCatalogHttpAuthResolver as E, createTangleCatalogHttpExecutor as F, createTangleCatalogInstalledPackageExecutor as G, createTangleCatalogRuntimeHandler as H, listActivepiecesCatalogEntries as I, signActivepiecesRuntimeRequest as J, signTangleCatalogRuntimeRequest as K, tangleCatalogAuthValue as L, verifyActivepiecesRuntimeSignature as M, verifyTangleCatalogRuntimeSignature as N, type TangleCatalogHttpAuthResolverOptions as T, type TangleCatalogInstalledPackageExecutorOptions as a, ACTIVEPIECES_RUNTIME_SIGNATURE_HEADER as b, type ActivepiecesCatalogAuthField as c, type ActivepiecesExecutorInvocation as d, type ActivepiecesExecutorProviderOptions as e, type ActivepiecesHttpExecutorOptions as f, type ActivepiecesRuntimeRequest as g, TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER as h, type TangleCatalogAuthResolverOptions as i, type TangleCatalogHttpAuthResolverRequest as j, type TangleCatalogHttpExecutorInvocation as k, type TangleCatalogHttpExecutorOptions as l, type TangleCatalogRuntimeActionRequest as m, type TangleCatalogRuntimeHandlerOptions as n, type TangleCatalogRuntimeHttpRequest as o, type TangleCatalogRuntimeHttpResponse as p, type TangleCatalogRuntimeInvocation as q, type TangleCatalogRuntimeModuleAction as r, type TangleCatalogRuntimePackageCoverageOptions as s, type TangleCatalogRuntimePackageCoverageRow as t, type TangleCatalogRuntimePiece as u, type TangleCatalogRuntimeRequest as v, auditTangleCatalogRuntimePackages as w, buildActivepiecesConnectors as x, buildActivepiecesRuntimeRequest as y, buildTangleCatalogRuntimeRequest as z };
|