@tangle-network/agent-integrations 0.53.35 → 0.53.37
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/catalog.d.ts +2 -2
- package/dist/catalog.js +8 -8
- package/dist/{chunk-N4KK3J7U.js → chunk-E3CAVV2V.js} +1280 -1260
- package/dist/{chunk-N4KK3J7U.js.map → chunk-E3CAVV2V.js.map} +1 -1
- package/dist/{chunk-ANWNXGVV.js → chunk-EKSAOR2I.js} +2 -2
- package/dist/{chunk-XGL345YX.js → chunk-JR2RWYQO.js} +2 -2
- package/dist/{chunk-BVHX2E5X.js → chunk-LAD6KGK4.js} +53 -22
- package/dist/chunk-LAD6KGK4.js.map +1 -0
- package/dist/{chunk-FK4ENHCP.js → chunk-TP4MD4PD.js} +2 -2
- package/dist/{chunk-JXFPIZ3O.js → chunk-WE7SQ7PB.js} +18 -4
- package/dist/chunk-WE7SQ7PB.js.map +1 -0
- package/dist/{chunk-2IU335WP.js → chunk-YEZEIQ6U.js} +23 -4
- package/dist/chunk-YEZEIQ6U.js.map +1 -0
- package/dist/{chunk-GGKD2W6H.js → chunk-Z3GB2P2B.js} +4 -2
- package/dist/chunk-Z3GB2P2B.js.map +1 -0
- package/dist/connect/index.d.ts +2 -2
- package/dist/connect/index.js +2 -2
- package/dist/connectors/adapters/index.d.ts +6 -3
- package/dist/connectors/adapters/index.js +2 -2
- package/dist/connectors/index.d.ts +14 -4
- package/dist/connectors/index.js +6 -4
- package/dist/{consumer-DV3XEumb.d.ts → consumer-UnsjK9iM.d.ts} +1 -1
- package/dist/consumer.d.ts +3 -3
- package/dist/consumer.js +2 -2
- package/dist/{core-types-qkW_zZDB.d.ts → core-types-Cx53j2Xp.d.ts} +1 -1
- package/dist/coverage-catalog.d.ts +2 -2
- package/dist/{importers-B7sdp2Ke.d.ts → importers-YLXwPCz_.d.ts} +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +11 -9
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +8 -8
- package/dist/middleware/index.d.ts +2 -2
- package/dist/middleware/index.js +2 -2
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +8 -8
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +8 -8
- package/dist/specs.d.ts +6 -2
- package/dist/specs.js +4 -4
- package/dist/{tangle-id-uvHTbgCw.d.ts → tangle-id--7mgjNkq.d.ts} +1 -1
- package/dist/{types-C1rgdXiP.d.ts → types-qFsboS2G.d.ts} +16 -1
- package/docs/adapter-triage.md +6 -4
- package/package.json +1 -1
- package/dist/chunk-2IU335WP.js.map +0 -1
- package/dist/chunk-BVHX2E5X.js.map +0 -1
- package/dist/chunk-GGKD2W6H.js.map +0 -1
- package/dist/chunk-JXFPIZ3O.js.map +0 -1
- /package/dist/{chunk-ANWNXGVV.js.map → chunk-EKSAOR2I.js.map} +0 -0
- /package/dist/{chunk-XGL345YX.js.map → chunk-JR2RWYQO.js.map} +0 -0
- /package/dist/{chunk-FK4ENHCP.js.map → chunk-TP4MD4PD.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TangleIdentityUnreachableError,
|
|
3
3
|
createTangleIdentityClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WE7SQ7PB.js";
|
|
5
5
|
|
|
6
6
|
// src/middleware/index.ts
|
|
7
7
|
async function requireTangleAuth(request, opts = {}) {
|
|
@@ -126,4 +126,4 @@ export {
|
|
|
126
126
|
honoTangleAuthMiddleware,
|
|
127
127
|
expressTangleAuthMiddleware
|
|
128
128
|
};
|
|
129
|
-
//# sourceMappingURL=chunk-
|
|
129
|
+
//# sourceMappingURL=chunk-EKSAOR2I.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DEFAULT_TANGLE_PLATFORM_URL,
|
|
3
3
|
TangleIdentityUnreachableError,
|
|
4
4
|
createTangleIdentityClient
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WE7SQ7PB.js";
|
|
6
6
|
|
|
7
7
|
// src/connect/index.ts
|
|
8
8
|
function startConnectFlow(opts, input) {
|
|
@@ -103,4 +103,4 @@ export {
|
|
|
103
103
|
revokeConnectFlow,
|
|
104
104
|
InMemoryConnectStateStore
|
|
105
105
|
};
|
|
106
|
-
//# sourceMappingURL=chunk-
|
|
106
|
+
//# sourceMappingURL=chunk-JR2RWYQO.js.map
|
|
@@ -7,11 +7,13 @@ import {
|
|
|
7
7
|
canonicalIntegrationKind,
|
|
8
8
|
integrationSpecToConnector,
|
|
9
9
|
listIntegrationSpecs
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Z3GB2P2B.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
listBundledConnectorAdapters
|
|
13
|
+
} from "./chunk-YEZEIQ6U.js";
|
|
14
|
+
import {
|
|
15
|
+
CONNECTOR_ADAPTER_FACTORIES
|
|
16
|
+
} from "./chunk-E3CAVV2V.js";
|
|
15
17
|
|
|
16
18
|
// src/activepieces-catalog.ts
|
|
17
19
|
import { readFileSync } from "fs";
|
|
@@ -246,6 +248,7 @@ function createConnectorAdapterProvider(options) {
|
|
|
246
248
|
"auth_not_supported"
|
|
247
249
|
);
|
|
248
250
|
}
|
|
251
|
+
resolveTokenClientAuthMethod(auth.tokenClientAuthMethod, request.connectorId);
|
|
249
252
|
if (!options.resolveOAuthClient) {
|
|
250
253
|
throw new IntegrationError(
|
|
251
254
|
`OAuth client resolver missing on adapter provider; cannot start auth for ${request.connectorId}.`,
|
|
@@ -307,6 +310,10 @@ function createConnectorAdapterProvider(options) {
|
|
|
307
310
|
"auth_not_supported"
|
|
308
311
|
);
|
|
309
312
|
}
|
|
313
|
+
const tokenClientAuthMethod = resolveTokenClientAuthMethod(
|
|
314
|
+
auth.tokenClientAuthMethod,
|
|
315
|
+
request.connectorId
|
|
316
|
+
);
|
|
310
317
|
if (!request.code) {
|
|
311
318
|
throw new IntegrationError(
|
|
312
319
|
`Authorization code missing on completeAuth for ${request.connectorId}.`,
|
|
@@ -335,10 +342,21 @@ function createConnectorAdapterProvider(options) {
|
|
|
335
342
|
const body = new URLSearchParams({
|
|
336
343
|
grant_type: "authorization_code",
|
|
337
344
|
code: request.code,
|
|
338
|
-
client_id: client.clientId,
|
|
339
|
-
client_secret: client.clientSecret,
|
|
340
345
|
redirect_uri: request.redirectUri
|
|
341
346
|
});
|
|
347
|
+
const headers = {
|
|
348
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
349
|
+
accept: "application/json"
|
|
350
|
+
};
|
|
351
|
+
const redactionValues = [request.code, client.clientId, client.clientSecret];
|
|
352
|
+
if (tokenClientAuthMethod === "client_secret_post") {
|
|
353
|
+
body.set("client_id", client.clientId);
|
|
354
|
+
body.set("client_secret", client.clientSecret);
|
|
355
|
+
} else {
|
|
356
|
+
const authorization = `Basic ${base64Encode(`${client.clientId}:${client.clientSecret}`)}`;
|
|
357
|
+
headers.authorization = authorization;
|
|
358
|
+
redactionValues.push(authorization);
|
|
359
|
+
}
|
|
342
360
|
const tokenUrl = resolveOAuthUrlTemplate(
|
|
343
361
|
auth.tokenUrl,
|
|
344
362
|
request.metadata,
|
|
@@ -348,16 +366,13 @@ function createConnectorAdapterProvider(options) {
|
|
|
348
366
|
try {
|
|
349
367
|
res = await fetchImpl(tokenUrl, {
|
|
350
368
|
method: "POST",
|
|
351
|
-
headers
|
|
352
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
353
|
-
accept: "application/json"
|
|
354
|
-
},
|
|
369
|
+
headers,
|
|
355
370
|
body
|
|
356
371
|
});
|
|
357
372
|
} catch (cause) {
|
|
358
373
|
const detail = redactSensitiveText(
|
|
359
374
|
cause?.message ?? "unknown",
|
|
360
|
-
|
|
375
|
+
redactionValues
|
|
361
376
|
);
|
|
362
377
|
throw new IntegrationError(
|
|
363
378
|
`OAuth token exchange transport error for ${request.connectorId}: ${detail}`,
|
|
@@ -368,7 +383,7 @@ function createConnectorAdapterProvider(options) {
|
|
|
368
383
|
const text = await res.text().catch(() => "");
|
|
369
384
|
const detail = redactSensitiveText(
|
|
370
385
|
`${res.status} ${res.statusText} \u2014 ${text.slice(0, 200)}`,
|
|
371
|
-
|
|
386
|
+
redactionValues
|
|
372
387
|
);
|
|
373
388
|
throw new IntegrationError(
|
|
374
389
|
`OAuth token exchange failed for ${request.connectorId}: ${detail}`,
|
|
@@ -557,6 +572,29 @@ function oauthManifestAuth(auth) {
|
|
|
557
572
|
if (auth.kind !== "one_of") return void 0;
|
|
558
573
|
return auth.options.find((option) => option.kind === "oauth2");
|
|
559
574
|
}
|
|
575
|
+
function resolveTokenClientAuthMethod(value, connectorId) {
|
|
576
|
+
if (value === void 0 || value === "client_secret_post") {
|
|
577
|
+
return "client_secret_post";
|
|
578
|
+
}
|
|
579
|
+
if (value === "client_secret_basic") return value;
|
|
580
|
+
throw new IntegrationError(
|
|
581
|
+
`Connector ${connectorId} has an unsupported OAuth token client authentication method.`,
|
|
582
|
+
"config_missing"
|
|
583
|
+
);
|
|
584
|
+
}
|
|
585
|
+
function base64Encode(value) {
|
|
586
|
+
const btoa2 = globalThis.btoa;
|
|
587
|
+
if (typeof btoa2 !== "function") {
|
|
588
|
+
throw new IntegrationError(
|
|
589
|
+
"OAuth client_secret_basic requires a base64 encoder in this runtime.",
|
|
590
|
+
"config_missing"
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
const bytes = new TextEncoder().encode(value);
|
|
594
|
+
let binary = "";
|
|
595
|
+
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
596
|
+
return btoa2(binary);
|
|
597
|
+
}
|
|
560
598
|
function redactSensitiveText(text, secrets) {
|
|
561
599
|
return secrets.filter((secret) => secret.length > 0).reduce(
|
|
562
600
|
(redacted, secret) => redacted.split(secret).join("[REDACTED]"),
|
|
@@ -3615,18 +3653,11 @@ function listTangleNativeAdapterIds() {
|
|
|
3615
3653
|
(definition) => definition.kind
|
|
3616
3654
|
)
|
|
3617
3655
|
);
|
|
3618
|
-
for (const
|
|
3619
|
-
|
|
3620
|
-
ids.add(value.manifest.kind);
|
|
3621
|
-
}
|
|
3656
|
+
for (const adapter of listBundledConnectorAdapters()) {
|
|
3657
|
+
ids.add(adapter.manifest.kind);
|
|
3622
3658
|
}
|
|
3623
3659
|
return [...ids].sort();
|
|
3624
3660
|
}
|
|
3625
|
-
function isConnectorAdapter(value) {
|
|
3626
|
-
return Boolean(
|
|
3627
|
-
value && typeof value === "object" && "manifest" in value && value.manifest && typeof value.manifest.kind === "string"
|
|
3628
|
-
);
|
|
3629
|
-
}
|
|
3630
3661
|
function listTangleIntegrationCatalogEntries() {
|
|
3631
3662
|
return listActivepiecesCatalogEntries().map((entry) => sanitizeEntry(entry));
|
|
3632
3663
|
}
|
|
@@ -4395,4 +4426,4 @@ export {
|
|
|
4395
4426
|
signCapability,
|
|
4396
4427
|
verifyCapabilityToken
|
|
4397
4428
|
};
|
|
4398
|
-
//# sourceMappingURL=chunk-
|
|
4429
|
+
//# sourceMappingURL=chunk-LAD6KGK4.js.map
|