@tangle-network/agent-integrations 0.35.0 → 0.37.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/catalog.d.ts +1 -1
- package/dist/catalog.js +2 -2
- package/dist/{chunk-ZVGYRP2O.js → chunk-SPLJV5J7.js} +2 -2
- package/dist/{chunk-6W72E2KN.js → chunk-YV3O5SO2.js} +192 -1
- package/dist/chunk-YV3O5SO2.js.map +1 -0
- package/dist/connectors/adapters/index.d.ts +27 -3
- package/dist/connectors/adapters/index.js +3 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +3 -1
- package/dist/{consumer-yV4NtH2h.d.ts → consumer-Dzt2uOo_.d.ts} +1 -1
- package/dist/consumer.d.ts +2 -2
- package/dist/{core-types-CjWifQOf.d.ts → core-types-D4MGC44S.d.ts} +2 -2
- package/dist/coverage-catalog.d.ts +1 -1
- package/dist/importers-DANyqwIT.d.ts +57 -0
- package/dist/index.d.ts +7 -60
- package/dist/index.js +4 -2
- package/dist/mcp.d.ts +95 -0
- package/dist/mcp.js +166 -0
- package/dist/mcp.js.map +1 -0
- package/dist/registry.d.ts +1 -1
- package/dist/registry.js +2 -2
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -2
- package/dist/specs.d.ts +1 -1
- package/package.json +6 -1
- package/dist/chunk-6W72E2KN.js.map +0 -1
- /package/dist/{chunk-ZVGYRP2O.js.map → chunk-SPLJV5J7.js.map} +0 -0
package/dist/mcp.js
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IntegrationError,
|
|
3
|
+
createCatalogExecutorProvider,
|
|
4
|
+
importMcpConnector
|
|
5
|
+
} from "./chunk-SPLJV5J7.js";
|
|
6
|
+
import "./chunk-D57YS6XC.js";
|
|
7
|
+
import "./chunk-CR35IEKW.js";
|
|
8
|
+
import "./chunk-H4XYLS7T.js";
|
|
9
|
+
import "./chunk-O553GSCX.js";
|
|
10
|
+
import "./chunk-53NQJZAT.js";
|
|
11
|
+
import "./chunk-7P2LN4VT.js";
|
|
12
|
+
import "./chunk-376UBTNB.js";
|
|
13
|
+
import "./chunk-YV3O5SO2.js";
|
|
14
|
+
import "./chunk-2TW2QKGZ.js";
|
|
15
|
+
import "./chunk-ZDK7Y4QG.js";
|
|
16
|
+
import "./chunk-PZ5AY32C.js";
|
|
17
|
+
|
|
18
|
+
// src/mcp.ts
|
|
19
|
+
var MCP_PROTOCOL_VERSION = "2025-06-18";
|
|
20
|
+
var McpHttpClient = class {
|
|
21
|
+
constructor(config) {
|
|
22
|
+
this.config = config;
|
|
23
|
+
}
|
|
24
|
+
config;
|
|
25
|
+
nextId = 1;
|
|
26
|
+
sessionId;
|
|
27
|
+
negotiatedVersion;
|
|
28
|
+
initializing;
|
|
29
|
+
get fetchImpl() {
|
|
30
|
+
return this.config.fetchImpl ?? fetch;
|
|
31
|
+
}
|
|
32
|
+
async post(body) {
|
|
33
|
+
const headers = {
|
|
34
|
+
"Content-Type": "application/json",
|
|
35
|
+
Accept: "application/json, text/event-stream",
|
|
36
|
+
...this.config.headers ?? {}
|
|
37
|
+
};
|
|
38
|
+
const version = this.negotiatedVersion ?? this.config.protocolVersion ?? MCP_PROTOCOL_VERSION;
|
|
39
|
+
headers["MCP-Protocol-Version"] = version;
|
|
40
|
+
if (this.sessionId) headers["Mcp-Session-Id"] = this.sessionId;
|
|
41
|
+
let response;
|
|
42
|
+
try {
|
|
43
|
+
response = await this.fetchImpl(this.config.url, {
|
|
44
|
+
method: "POST",
|
|
45
|
+
headers,
|
|
46
|
+
body: JSON.stringify(body)
|
|
47
|
+
});
|
|
48
|
+
} catch (error) {
|
|
49
|
+
throw new IntegrationError(
|
|
50
|
+
`MCP server unreachable: ${error instanceof Error ? error.message : String(error)}`,
|
|
51
|
+
"provider_failure"
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
const session = response.headers.get("mcp-session-id");
|
|
55
|
+
if (session) this.sessionId = session;
|
|
56
|
+
if (!response.ok) {
|
|
57
|
+
throw new IntegrationError(`MCP server returned HTTP ${response.status}`, "provider_failure");
|
|
58
|
+
}
|
|
59
|
+
if (body.id === void 0) return void 0;
|
|
60
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
61
|
+
const text = await response.text();
|
|
62
|
+
const message = contentType.includes("text/event-stream") ? findSseResponse(text, body.id) : JSON.parse(text);
|
|
63
|
+
if (!message) {
|
|
64
|
+
throw new IntegrationError("MCP server response missing a result for the request", "provider_failure");
|
|
65
|
+
}
|
|
66
|
+
if (message.error) {
|
|
67
|
+
throw new IntegrationError(`MCP error ${message.error.code}: ${message.error.message}`, "provider_failure");
|
|
68
|
+
}
|
|
69
|
+
return message;
|
|
70
|
+
}
|
|
71
|
+
async request(method, params) {
|
|
72
|
+
const response = await this.post({ jsonrpc: "2.0", id: this.nextId++, method, ...params ? { params } : {} });
|
|
73
|
+
return response?.result;
|
|
74
|
+
}
|
|
75
|
+
/** Idempotent handshake; concurrent callers share one in-flight init. */
|
|
76
|
+
async initialize() {
|
|
77
|
+
if (this.negotiatedVersion) return;
|
|
78
|
+
this.initializing ??= (async () => {
|
|
79
|
+
const result = await this.request("initialize", {
|
|
80
|
+
protocolVersion: this.config.protocolVersion ?? MCP_PROTOCOL_VERSION,
|
|
81
|
+
capabilities: {},
|
|
82
|
+
clientInfo: this.config.clientInfo ?? { name: "tangle-agent-integrations", version: "1" }
|
|
83
|
+
});
|
|
84
|
+
this.negotiatedVersion = result?.protocolVersion ?? this.config.protocolVersion ?? MCP_PROTOCOL_VERSION;
|
|
85
|
+
await this.post({ jsonrpc: "2.0", method: "notifications/initialized" });
|
|
86
|
+
})().catch((error) => {
|
|
87
|
+
this.initializing = void 0;
|
|
88
|
+
throw error;
|
|
89
|
+
});
|
|
90
|
+
await this.initializing;
|
|
91
|
+
}
|
|
92
|
+
/** Full tool catalog, following `nextCursor` pagination. */
|
|
93
|
+
async listTools() {
|
|
94
|
+
await this.initialize();
|
|
95
|
+
const tools = [];
|
|
96
|
+
let cursor;
|
|
97
|
+
do {
|
|
98
|
+
const result = await this.request("tools/list", cursor ? { cursor } : {});
|
|
99
|
+
tools.push(...result?.tools ?? []);
|
|
100
|
+
cursor = result?.nextCursor;
|
|
101
|
+
} while (cursor);
|
|
102
|
+
return tools;
|
|
103
|
+
}
|
|
104
|
+
async callTool(name, args) {
|
|
105
|
+
await this.initialize();
|
|
106
|
+
const result = await this.request("tools/call", { name, arguments: args ?? {} });
|
|
107
|
+
return {
|
|
108
|
+
content: result?.content ?? [],
|
|
109
|
+
isError: result?.isError === true,
|
|
110
|
+
structured: result?.structuredContent
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
async function discoverMcpConnector(client, options) {
|
|
115
|
+
const tools = await client.listTools();
|
|
116
|
+
return importMcpConnector(
|
|
117
|
+
{ tools },
|
|
118
|
+
{
|
|
119
|
+
providerId: options.id,
|
|
120
|
+
connectorId: options.connectorId,
|
|
121
|
+
connectorTitle: options.connectorTitle,
|
|
122
|
+
category: options.category,
|
|
123
|
+
auth: "custom",
|
|
124
|
+
scopes: options.scopes,
|
|
125
|
+
dataClass: options.dataClass,
|
|
126
|
+
defaultRisk: options.defaultRisk ?? "write"
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
async function createMcpProvider(options) {
|
|
131
|
+
const client = new McpHttpClient(options.server);
|
|
132
|
+
const connector = await discoverMcpConnector(client, options);
|
|
133
|
+
return createCatalogExecutorProvider({
|
|
134
|
+
id: options.id,
|
|
135
|
+
kind: "mcp",
|
|
136
|
+
connectors: [connector],
|
|
137
|
+
async executeAction({ request, action }) {
|
|
138
|
+
const result = await client.callTool(action.id, request.input);
|
|
139
|
+
return {
|
|
140
|
+
ok: !result.isError,
|
|
141
|
+
action: action.id,
|
|
142
|
+
output: result.structured ?? result.content,
|
|
143
|
+
metadata: { mcp: true, ...result.isError ? { isError: true } : {} }
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function findSseResponse(body, id) {
|
|
149
|
+
for (const event of body.split(/\n\n/)) {
|
|
150
|
+
const data = event.split("\n").filter((line) => line.startsWith("data:")).map((line) => line.slice(5).trim()).join("");
|
|
151
|
+
if (!data) continue;
|
|
152
|
+
try {
|
|
153
|
+
const parsed = JSON.parse(data);
|
|
154
|
+
if (parsed.id === id) return parsed;
|
|
155
|
+
} catch {
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return void 0;
|
|
159
|
+
}
|
|
160
|
+
export {
|
|
161
|
+
MCP_PROTOCOL_VERSION,
|
|
162
|
+
McpHttpClient,
|
|
163
|
+
createMcpProvider,
|
|
164
|
+
discoverMcpConnector
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=mcp.js.map
|
package/dist/mcp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mcp.ts"],"sourcesContent":["/**\n * Live MCP connector — attach a remote MCP (Model Context Protocol) server\n * as an {@link IntegrationProvider}, so its tools flow through the same\n * catalog / grants / approvals machinery as every other connector instead of\n * forming a parallel, ungoverned tool path.\n *\n * Transport is Streamable HTTP only (single POST endpoint, JSON or SSE\n * response framing) — this package runs in edge workers, so stdio servers are\n * out of scope; front them with any HTTP-bridging MCP host.\n *\n * Discovery reuses {@link importMcpConnector}: `tools/list` output becomes an\n * `IntegrationConnector` whose per-action risk comes from MCP tool\n * annotations (readOnlyHint / destructiveHint) with a text-heuristic\n * fallback, so non-read MCP tools default to `approvalRequired` — fail-closed\n * against servers that don't annotate.\n *\n * Credentials: the server's auth header is supplied at construction by the\n * product (which owns secret storage) and held in memory only. Connection\n * rows carry no MCP secrets.\n */\n\nimport { IntegrationError } from './core-error.js'\nimport type {\n IntegrationActionResult,\n IntegrationActionRisk,\n IntegrationConnector,\n IntegrationConnectorCategory,\n IntegrationDataClass,\n IntegrationProvider,\n} from './core-types.js'\nimport { createCatalogExecutorProvider } from './catalog-executor.js'\nimport { importMcpConnector, type McpCatalogTool } from './importers.js'\n\n/** Protocol revision sent on `initialize` and the `MCP-Protocol-Version`\n * header. Servers negotiate down from this. */\nexport const MCP_PROTOCOL_VERSION = '2025-06-18'\n\nexport interface McpServerConfig {\n /** The server's single Streamable-HTTP endpoint. */\n url: string\n /** Static request headers — typically `{ Authorization: 'Bearer …' }`.\n * Held in memory only; never persisted by this module. */\n headers?: Record<string, string>\n protocolVersion?: string\n clientInfo?: { name: string; version: string }\n /** Injectable for tests / custom egress policies (SSRF pinning). */\n fetchImpl?: typeof fetch\n}\n\nexport interface McpToolCallResult {\n /** MCP content blocks (text, image, resource, …) verbatim. */\n content: unknown[]\n isError: boolean\n /** `structuredContent` from servers that return it. */\n structured?: unknown\n}\n\ninterface JsonRpcResponse {\n jsonrpc: '2.0'\n id?: number | string | null\n result?: unknown\n error?: { code: number; message: string; data?: unknown }\n}\n\n/**\n * Minimal Streamable-HTTP MCP client: `initialize` handshake (capturing the\n * server's `Mcp-Session-Id`), paginated `tools/list`, and `tools/call`.\n * Lazily initializes on first use; safe to share across calls within an\n * isolate.\n */\nexport class McpHttpClient {\n private nextId = 1\n private sessionId: string | undefined\n private negotiatedVersion: string | undefined\n private initializing: Promise<void> | undefined\n\n constructor(private readonly config: McpServerConfig) {}\n\n private get fetchImpl(): typeof fetch {\n return this.config.fetchImpl ?? fetch\n }\n\n private async post(body: Record<string, unknown>): Promise<JsonRpcResponse | undefined> {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n Accept: 'application/json, text/event-stream',\n ...(this.config.headers ?? {}),\n }\n const version = this.negotiatedVersion ?? this.config.protocolVersion ?? MCP_PROTOCOL_VERSION\n headers['MCP-Protocol-Version'] = version\n if (this.sessionId) headers['Mcp-Session-Id'] = this.sessionId\n\n let response: Response\n try {\n response = await this.fetchImpl(this.config.url, {\n method: 'POST',\n headers,\n body: JSON.stringify(body),\n })\n } catch (error) {\n throw new IntegrationError(\n `MCP server unreachable: ${error instanceof Error ? error.message : String(error)}`,\n 'provider_failure',\n )\n }\n const session = response.headers.get('mcp-session-id')\n if (session) this.sessionId = session\n\n if (!response.ok) {\n throw new IntegrationError(`MCP server returned HTTP ${response.status}`, 'provider_failure')\n }\n // Notifications get 202/204 with no body.\n if (body.id === undefined) return undefined\n const contentType = response.headers.get('content-type') ?? ''\n const text = await response.text()\n const message = contentType.includes('text/event-stream')\n ? findSseResponse(text, body.id as number)\n : (JSON.parse(text) as JsonRpcResponse)\n if (!message) {\n throw new IntegrationError('MCP server response missing a result for the request', 'provider_failure')\n }\n if (message.error) {\n throw new IntegrationError(`MCP error ${message.error.code}: ${message.error.message}`, 'provider_failure')\n }\n return message\n }\n\n private async request(method: string, params?: Record<string, unknown>): Promise<unknown> {\n const response = await this.post({ jsonrpc: '2.0', id: this.nextId++, method, ...(params ? { params } : {}) })\n return response?.result\n }\n\n /** Idempotent handshake; concurrent callers share one in-flight init. */\n async initialize(): Promise<void> {\n if (this.negotiatedVersion) return\n this.initializing ??= (async () => {\n const result = (await this.request('initialize', {\n protocolVersion: this.config.protocolVersion ?? MCP_PROTOCOL_VERSION,\n capabilities: {},\n clientInfo: this.config.clientInfo ?? { name: 'tangle-agent-integrations', version: '1' },\n })) as { protocolVersion?: string } | undefined\n this.negotiatedVersion = result?.protocolVersion ?? this.config.protocolVersion ?? MCP_PROTOCOL_VERSION\n await this.post({ jsonrpc: '2.0', method: 'notifications/initialized' })\n })().catch((error) => {\n this.initializing = undefined\n throw error\n })\n await this.initializing\n }\n\n /** Full tool catalog, following `nextCursor` pagination. */\n async listTools(): Promise<McpCatalogTool[]> {\n await this.initialize()\n const tools: McpCatalogTool[] = []\n let cursor: string | undefined\n do {\n const result = (await this.request('tools/list', cursor ? { cursor } : {})) as\n | { tools?: McpCatalogTool[]; nextCursor?: string }\n | undefined\n tools.push(...(result?.tools ?? []))\n cursor = result?.nextCursor\n } while (cursor)\n return tools\n }\n\n async callTool(name: string, args: unknown): Promise<McpToolCallResult> {\n await this.initialize()\n const result = (await this.request('tools/call', { name, arguments: args ?? {} })) as\n | { content?: unknown[]; isError?: boolean; structuredContent?: unknown }\n | undefined\n return {\n content: result?.content ?? [],\n isError: result?.isError === true,\n structured: result?.structuredContent,\n }\n }\n}\n\nexport interface CreateMcpProviderOptions {\n /** Provider id, unique within the hub (e.g. `mcp:linear`). */\n id: string\n server: McpServerConfig\n connectorId: string\n connectorTitle: string\n category?: IntegrationConnectorCategory\n scopes?: string[]\n dataClass?: IntegrationDataClass\n /** Risk for tools whose annotations/name don't classify them. Defaults to\n * 'write' (⇒ approvalRequired) — fail-closed. */\n defaultRisk?: IntegrationActionRisk\n}\n\n/** Discover a live MCP server's tools as an {@link IntegrationConnector}. */\nexport async function discoverMcpConnector(\n client: McpHttpClient,\n options: CreateMcpProviderOptions,\n): Promise<IntegrationConnector> {\n const tools = await client.listTools()\n return importMcpConnector(\n { tools },\n {\n providerId: options.id,\n connectorId: options.connectorId,\n connectorTitle: options.connectorTitle,\n category: options.category,\n auth: 'custom',\n scopes: options.scopes,\n dataClass: options.dataClass,\n defaultRisk: options.defaultRisk ?? 'write',\n },\n )\n}\n\n/**\n * Build an {@link IntegrationProvider} over one remote MCP server: live\n * `tools/list` discovery at construction, `tools/call` on invoke. A tool\n * result with `isError` maps to `{ ok: false }` (the model sees the failure\n * content); transport and JSON-RPC failures throw {@link IntegrationError}.\n */\nexport async function createMcpProvider(options: CreateMcpProviderOptions): Promise<IntegrationProvider> {\n const client = new McpHttpClient(options.server)\n const connector = await discoverMcpConnector(client, options)\n return createCatalogExecutorProvider({\n id: options.id,\n kind: 'mcp',\n connectors: [connector],\n async executeAction({ request, action }): Promise<IntegrationActionResult> {\n const result = await client.callTool(action.id, request.input)\n return {\n ok: !result.isError,\n action: action.id,\n output: result.structured ?? result.content,\n metadata: { mcp: true, ...(result.isError ? { isError: true } : {}) },\n }\n },\n })\n}\n\nfunction findSseResponse(body: string, id: number): JsonRpcResponse | undefined {\n for (const event of body.split(/\\n\\n/)) {\n const data = event\n .split('\\n')\n .filter((line) => line.startsWith('data:'))\n .map((line) => line.slice(5).trim())\n .join('')\n if (!data) continue\n try {\n const parsed = JSON.parse(data) as JsonRpcResponse\n if (parsed.id === id) return parsed\n } catch {\n // non-JSON SSE frame (keepalive/comment) — skip\n }\n }\n return undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmCO,IAAM,uBAAuB;AAmC7B,IAAM,gBAAN,MAAoB;AAAA,EAMzB,YAA6B,QAAyB;AAAzB;AAAA,EAA0B;AAAA,EAA1B;AAAA,EALrB,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EAIR,IAAY,YAA0B;AACpC,WAAO,KAAK,OAAO,aAAa;AAAA,EAClC;AAAA,EAEA,MAAc,KAAK,MAAqE;AACtF,UAAM,UAAkC;AAAA,MACtC,gBAAgB;AAAA,MAChB,QAAQ;AAAA,MACR,GAAI,KAAK,OAAO,WAAW,CAAC;AAAA,IAC9B;AACA,UAAM,UAAU,KAAK,qBAAqB,KAAK,OAAO,mBAAmB;AACzE,YAAQ,sBAAsB,IAAI;AAClC,QAAI,KAAK,UAAW,SAAQ,gBAAgB,IAAI,KAAK;AAErD,QAAI;AACJ,QAAI;AACF,iBAAW,MAAM,KAAK,UAAU,KAAK,OAAO,KAAK;AAAA,QAC/C,QAAQ;AAAA,QACR;AAAA,QACA,MAAM,KAAK,UAAU,IAAI;AAAA,MAC3B,CAAC;AAAA,IACH,SAAS,OAAO;AACd,YAAM,IAAI;AAAA,QACR,2BAA2B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;AAAA,QACjF;AAAA,MACF;AAAA,IACF;AACA,UAAM,UAAU,SAAS,QAAQ,IAAI,gBAAgB;AACrD,QAAI,QAAS,MAAK,YAAY;AAE9B,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI,iBAAiB,4BAA4B,SAAS,MAAM,IAAI,kBAAkB;AAAA,IAC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QACZ,QAAQ,OAAO;AAAA,QACf,QAAQ,OAAO,cAAc,OAAO;AAAA,QACpC,UAAU,EAAE,KAAK,MAAM,GAAI,OAAO,UAAU,EAAE,SAAS,KAAK,IAAI,CAAC,EAAG;AAAA,MACtE;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEA,SAAS,gBAAgB,MAAc,IAAyC;AAC9E,aAAW,SAAS,KAAK,MAAM,MAAM,GAAG;AACtC,UAAM,OAAO,MACV,MAAM,IAAI,EACV,OAAO,CAAC,SAAS,KAAK,WAAW,OAAO,CAAC,EACzC,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC,EAAE,KAAK,CAAC,EAClC,KAAK,EAAE;AACV,QAAI,CAAC,KAAM;AACX,QAAI;AACF,YAAM,SAAS,KAAK,MAAM,IAAI;AAC9B,UAAI,OAAO,OAAO,GAAI,QAAO;AAAA,IAC/B,QAAQ;AAAA,IAER;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as IntegrationConnector, h as IntegrationCatalogSource } from './core-types-
|
|
1
|
+
import { b as IntegrationConnector, h as IntegrationCatalogSource } from './core-types-D4MGC44S.js';
|
|
2
2
|
import './types-Bxg-wJkW.js';
|
|
3
3
|
|
|
4
4
|
type IntegrationSupportTier = 'catalogOnly' | 'setupReady' | 'gatewayExecutable' | 'firstPartyExecutable' | 'sandboxExecutable';
|
package/dist/registry.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
composeIntegrationRegistry,
|
|
6
6
|
inferIntegrationSupportTier,
|
|
7
7
|
summarizeIntegrationRegistry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SPLJV5J7.js";
|
|
9
9
|
import "./chunk-D57YS6XC.js";
|
|
10
10
|
import "./chunk-CR35IEKW.js";
|
|
11
11
|
import "./chunk-H4XYLS7T.js";
|
|
@@ -13,7 +13,7 @@ import "./chunk-O553GSCX.js";
|
|
|
13
13
|
import "./chunk-53NQJZAT.js";
|
|
14
14
|
import "./chunk-7P2LN4VT.js";
|
|
15
15
|
import "./chunk-376UBTNB.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-YV3O5SO2.js";
|
|
17
17
|
import "./chunk-2TW2QKGZ.js";
|
|
18
18
|
import "./chunk-ZDK7Y4QG.js";
|
|
19
19
|
import "./chunk-PZ5AY32C.js";
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IntegrationToolDefinition } from './catalog.js';
|
|
2
2
|
import { IntegrationRegistryEntry, IntegrationRegistry } from './registry.js';
|
|
3
|
-
import { I as IntegrationActor, a as IssuedIntegrationCapability, b as IntegrationConnector, c as IntegrationConnection } from './core-types-
|
|
3
|
+
import { I as IntegrationActor, a as IssuedIntegrationCapability, b as IntegrationConnector, c as IntegrationConnection } from './core-types-D4MGC44S.js';
|
|
4
4
|
import './types-Bxg-wJkW.js';
|
|
5
5
|
|
|
6
6
|
type IntegrationRequirementMode = 'read' | 'write' | 'trigger';
|
package/dist/runtime.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
InMemoryIntegrationGrantStore,
|
|
3
3
|
IntegrationRuntime,
|
|
4
4
|
createIntegrationRuntime
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SPLJV5J7.js";
|
|
6
6
|
import "./chunk-D57YS6XC.js";
|
|
7
7
|
import "./chunk-CR35IEKW.js";
|
|
8
8
|
import "./chunk-H4XYLS7T.js";
|
|
@@ -10,7 +10,7 @@ import "./chunk-O553GSCX.js";
|
|
|
10
10
|
import "./chunk-53NQJZAT.js";
|
|
11
11
|
import "./chunk-7P2LN4VT.js";
|
|
12
12
|
import "./chunk-376UBTNB.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-YV3O5SO2.js";
|
|
14
14
|
import "./chunk-2TW2QKGZ.js";
|
|
15
15
|
import "./chunk-ZDK7Y4QG.js";
|
|
16
16
|
import "./chunk-PZ5AY32C.js";
|
package/dist/specs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as IntegrationActionRisk, g as IntegrationDataClass, d as IntegrationConnectorCategory, e as IntegrationConnectorAction, G as IntegrationConnectorTrigger, b as IntegrationConnector } from './core-types-
|
|
1
|
+
import { f as IntegrationActionRisk, g as IntegrationDataClass, d as IntegrationConnectorCategory, e as IntegrationConnectorAction, G as IntegrationConnectorTrigger, b as IntegrationConnector } from './core-types-D4MGC44S.js';
|
|
2
2
|
import './types-Bxg-wJkW.js';
|
|
3
3
|
|
|
4
4
|
type IntegrationAuthMode = 'oauth2' | 'api_key' | 'hmac' | 'none' | 'custom';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-integrations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Vendor-neutral integration contracts and runtime helpers for sandbox and agent apps.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-integrations#readme",
|
|
6
6
|
"repository": {
|
|
@@ -83,6 +83,11 @@
|
|
|
83
83
|
"types": "./dist/coverage-catalog.d.ts",
|
|
84
84
|
"import": "./dist/coverage-catalog.js",
|
|
85
85
|
"default": "./dist/coverage-catalog.js"
|
|
86
|
+
},
|
|
87
|
+
"./mcp": {
|
|
88
|
+
"types": "./dist/mcp.d.ts",
|
|
89
|
+
"import": "./dist/mcp.js",
|
|
90
|
+
"default": "./dist/mcp.js"
|
|
86
91
|
}
|
|
87
92
|
},
|
|
88
93
|
"files": [
|