@tangle-network/agent-integrations 0.29.0 → 0.30.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 +2 -2
- package/dist/catalog.js +11 -7
- package/dist/{chunk-SVQ4PHDZ.js → chunk-5ASL5XNX.js} +2 -2
- package/dist/{chunk-P24T3MLM.js → chunk-DACSERTI.js} +2 -2
- package/dist/{chunk-YOKNZY2N.js → chunk-FDZIQVK7.js} +2 -2
- package/dist/{chunk-JU25UDN2.js → chunk-JOILC44P.js} +11 -5
- package/dist/chunk-JOILC44P.js.map +1 -0
- package/dist/{chunk-TUX6MJJ4.js → chunk-M2RFFAMB.js} +559 -411
- package/dist/chunk-M2RFFAMB.js.map +1 -0
- package/dist/{chunk-4JQ754PA.js → chunk-VVC7U7W7.js} +28 -1
- package/dist/{chunk-4JQ754PA.js.map → chunk-VVC7U7W7.js.map} +1 -1
- package/dist/{chunk-ATYHZXLL.js → chunk-Y6O3MIBW.js} +1 -1
- package/dist/chunk-Y6O3MIBW.js.map +1 -0
- package/dist/connect/index.d.ts +1 -1
- package/dist/connect/index.js +2 -2
- package/dist/connectors/adapters/index.d.ts +2 -2
- package/dist/connectors/adapters/index.js +2 -2
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +2 -2
- package/dist/consumer.d.ts +2 -2
- package/dist/consumer.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -7
- package/dist/middleware/index.d.ts +1 -1
- package/dist/middleware/index.js +2 -2
- package/dist/registry.d.ts +200 -47
- package/dist/registry.js +9 -7
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +7 -7
- package/dist/specs.d.ts +2 -2
- package/dist/specs.js +3 -1
- package/dist/tangle-catalog-runtime.d.ts +2 -2
- package/dist/tangle-catalog-runtime.js +7 -7
- package/dist/{tangle-id-CTU4kGId.d.ts → tangle-id-C6s2NT2r.d.ts} +7 -0
- package/docs/integration-execution-audit.md +1 -1
- package/package.json +7 -1
- package/dist/chunk-ATYHZXLL.js.map +0 -1
- package/dist/chunk-JU25UDN2.js.map +0 -1
- package/dist/chunk-TUX6MJJ4.js.map +0 -1
- /package/dist/{chunk-SVQ4PHDZ.js.map → chunk-5ASL5XNX.js.map} +0 -0
- /package/dist/{chunk-P24T3MLM.js.map → chunk-DACSERTI.js.map} +0 -0
- /package/dist/{chunk-YOKNZY2N.js.map → chunk-FDZIQVK7.js.map} +0 -0
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
buildTangleCatalogRuntimePackageManifest,
|
|
5
5
|
renderTangleCatalogRuntimePnpmAddCommand,
|
|
6
6
|
startTangleCatalogRuntimeNodeServer
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-M2RFFAMB.js";
|
|
8
|
+
import "../chunk-DACSERTI.js";
|
|
9
|
+
import "../chunk-5ASL5XNX.js";
|
|
10
10
|
import "../chunk-H4XYLS7T.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-FDZIQVK7.js";
|
|
12
|
+
import "../chunk-VVC7U7W7.js";
|
|
13
13
|
import "../chunk-376UBTNB.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-JOILC44P.js";
|
|
15
15
|
import "../chunk-2TW2QKGZ.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-Y6O3MIBW.js";
|
|
17
17
|
|
|
18
18
|
// src/bin/tangle-catalog-runtime.ts
|
|
19
19
|
var args = new Set(process.argv.slice(2));
|
package/dist/catalog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { I as IntegrationCatalogView, a as IntegrationToolDefinition, b as IntegrationToolSearchFilters, c as IntegrationToolSearchResult, M as McpToolDefinition, d as buildIntegrationCatalogView, e as buildIntegrationToolCatalog, i as integrationToolName, p as parseIntegrationToolName, s as searchIntegrationTools, t as toMcpTools } from './registry.js';
|
|
2
|
-
import './tangle-id-
|
|
1
|
+
export { I as IntegrationCatalogView, a as IntegrationToolDefinition, b as IntegrationToolSearchFilters, c as IntegrationToolSearchResult, M as McpToolDefinition, d as buildIntegrationCatalogView, e as buildIntegrationToolCatalog, f as describeIntegrationTool, g as flattenIntegrationToolDefinition, i as integrationToolName, p as parseIntegrationToolName, s as searchIntegrationTools, t as toMcpTools } from './registry.js';
|
|
2
|
+
import './tangle-id-C6s2NT2r.js';
|
|
3
3
|
import './errors-Bg3_rxnQ.js';
|
|
4
4
|
import './connect/index.js';
|
|
5
5
|
import './middleware/index.js';
|
package/dist/catalog.js
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildIntegrationCatalogView,
|
|
3
3
|
buildIntegrationToolCatalog,
|
|
4
|
+
describeIntegrationTool,
|
|
5
|
+
flattenIntegrationToolDefinition,
|
|
4
6
|
integrationToolName,
|
|
5
7
|
parseIntegrationToolName,
|
|
6
8
|
searchIntegrationTools,
|
|
7
9
|
toMcpTools
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-M2RFFAMB.js";
|
|
11
|
+
import "./chunk-DACSERTI.js";
|
|
12
|
+
import "./chunk-5ASL5XNX.js";
|
|
11
13
|
import "./chunk-H4XYLS7T.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-FDZIQVK7.js";
|
|
15
|
+
import "./chunk-VVC7U7W7.js";
|
|
14
16
|
import "./chunk-376UBTNB.js";
|
|
15
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-JOILC44P.js";
|
|
16
18
|
import "./chunk-2TW2QKGZ.js";
|
|
17
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-Y6O3MIBW.js";
|
|
18
20
|
export {
|
|
19
21
|
buildIntegrationCatalogView,
|
|
20
22
|
buildIntegrationToolCatalog,
|
|
23
|
+
describeIntegrationTool,
|
|
24
|
+
flattenIntegrationToolDefinition,
|
|
21
25
|
integrationToolName,
|
|
22
26
|
parseIntegrationToolName,
|
|
23
27
|
searchIntegrationTools,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TangleIdentityUnreachableError,
|
|
3
3
|
createTangleIdentityClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Y6O3MIBW.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-5ASL5XNX.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-Y6O3MIBW.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-DACSERTI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_TANGLE_PLATFORM_URL
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y6O3MIBW.js";
|
|
4
4
|
|
|
5
5
|
// src/consumer.ts
|
|
6
6
|
var PLATFORM_USER_ID_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
|
|
@@ -281,4 +281,4 @@ export {
|
|
|
281
281
|
IntegrationHubClient,
|
|
282
282
|
createIntegrationHubClient
|
|
283
283
|
};
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-FDZIQVK7.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
CredentialsExpired,
|
|
8
8
|
ResourceContention
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Y6O3MIBW.js";
|
|
10
10
|
|
|
11
11
|
// src/connectors/oauth.ts
|
|
12
12
|
import { createHash, randomBytes } from "crypto";
|
|
@@ -1147,13 +1147,13 @@ function gmail(opts) {
|
|
|
1147
1147
|
]
|
|
1148
1148
|
},
|
|
1149
1149
|
async executeRead(inv) {
|
|
1150
|
-
const accessToken = await ensureFreshAccessToken4(inv.source.credentials, clientId, clientSecret);
|
|
1150
|
+
const accessToken = await ensureFreshAccessToken4(inv.source.credentials, clientId, clientSecret, inv.onCredentialsRotated);
|
|
1151
1151
|
if (inv.capabilityName === "list_messages") return listMessages(inv, accessToken, timeoutMs);
|
|
1152
1152
|
if (inv.capabilityName === "read_message") return readMessage(inv, accessToken, timeoutMs);
|
|
1153
1153
|
throw new Error(`gmail: unknown read capability ${inv.capabilityName}`);
|
|
1154
1154
|
},
|
|
1155
1155
|
async executeMutation(inv) {
|
|
1156
|
-
const accessToken = await ensureFreshAccessToken4(inv.source.credentials, clientId, clientSecret);
|
|
1156
|
+
const accessToken = await ensureFreshAccessToken4(inv.source.credentials, clientId, clientSecret, inv.onCredentialsRotated);
|
|
1157
1157
|
if (inv.capabilityName === "send_reply") return sendReply(inv, accessToken, timeoutMs);
|
|
1158
1158
|
if (inv.capabilityName === "watch_label") return watchLabel(inv, accessToken, timeoutMs);
|
|
1159
1159
|
throw new Error(`gmail: unknown mutation capability ${inv.capabilityName}`);
|
|
@@ -1426,7 +1426,7 @@ async function watchLabel(inv, accessToken, timeoutMs) {
|
|
|
1426
1426
|
idempotentReplay: false
|
|
1427
1427
|
};
|
|
1428
1428
|
}
|
|
1429
|
-
async function ensureFreshAccessToken4(creds, clientId, clientSecret) {
|
|
1429
|
+
async function ensureFreshAccessToken4(creds, clientId, clientSecret, onCredentialsRotated) {
|
|
1430
1430
|
if (creds.kind !== "oauth2") {
|
|
1431
1431
|
throw new Error("gmail: expected oauth2 credentials");
|
|
1432
1432
|
}
|
|
@@ -1445,6 +1445,12 @@ async function ensureFreshAccessToken4(creds, clientId, clientSecret) {
|
|
|
1445
1445
|
creds.accessToken = refreshed.accessToken;
|
|
1446
1446
|
creds.expiresAt = refreshed.expiresIn ? Date.now() + refreshed.expiresIn * 1e3 : void 0;
|
|
1447
1447
|
if (refreshed.refreshToken) creds.refreshToken = refreshed.refreshToken;
|
|
1448
|
+
onCredentialsRotated?.({
|
|
1449
|
+
kind: "oauth2",
|
|
1450
|
+
accessToken: creds.accessToken,
|
|
1451
|
+
refreshToken: creds.refreshToken,
|
|
1452
|
+
expiresAt: creds.expiresAt
|
|
1453
|
+
});
|
|
1448
1454
|
return creds.accessToken;
|
|
1449
1455
|
}
|
|
1450
1456
|
|
|
@@ -4257,4 +4263,4 @@ export {
|
|
|
4257
4263
|
asanaConnector,
|
|
4258
4264
|
salesforceConnector
|
|
4259
4265
|
};
|
|
4260
|
-
//# sourceMappingURL=chunk-
|
|
4266
|
+
//# sourceMappingURL=chunk-JOILC44P.js.map
|