@enhance-eng/enhance 0.1.22 → 0.1.25
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/{cli-output-identity.lib-a1wTreJ6.mjs → cli-output-identity.lib-DpON8As5.mjs} +4751 -899
- package/dist/{file-credential.adapter-rI5HpMEo.mjs → file-credential.adapter-C78gc9OK.mjs} +1 -1
- package/dist/main.mjs +251 -95
- package/dist/mcp-invocation.adapter-FuxI6KsE.mjs +1336 -0
- package/dist/mcp-main.mjs +38 -21
- package/dist/{mcp-server.adapter-Cgp05gfi.mjs → mcp-server.adapter-D7XwVD-o.mjs} +395 -260
- package/dist/mcp.mjs +2 -2
- package/dist/mutation-key.adapter-CXQ08HQY.mjs +4531 -0
- package/dist/remote-mcp-main.mjs +629 -27
- package/package.json +9 -4
- package/dist/mcp-invocation.adapter-vsj77GBt.mjs +0 -119
- package/dist/mutation-key.adapter-B3ugNA3r.mjs +0 -2080
package/dist/mcp-main.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as createFileCredentialAdapter } from "./file-credential.adapter-
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { z } from "zod";
|
|
2
|
+
import { f as createCapabilityCatalogAdapter, h as toCapabilityDefinition } from "./cli-output-identity.lib-DpON8As5.mjs";
|
|
3
|
+
import { i as readLocalMcpEnvironment } from "./mutation-key.adapter-CXQ08HQY.mjs";
|
|
4
|
+
import { t as createFileCredentialAdapter } from "./file-credential.adapter-C78gc9OK.mjs";
|
|
5
|
+
import { t as createMcpServerAdapter } from "./mcp-server.adapter-D7XwVD-o.mjs";
|
|
6
|
+
import { n as createMcpCanvasProfileAdapter, t as createMcpInvocationAdapter } from "./mcp-invocation.adapter-FuxI6KsE.mjs";
|
|
8
7
|
import process from "node:process";
|
|
8
|
+
import { z } from "zod";
|
|
9
9
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
10
10
|
|
|
11
11
|
//#region src/infrastructure/mcp-transport-capability.adapter.ts
|
|
@@ -152,7 +152,7 @@ const capabilities = [
|
|
|
152
152
|
exampleInput: {},
|
|
153
153
|
exampleOutput: {
|
|
154
154
|
status: "ok",
|
|
155
|
-
runtimeVersion: "0.1.
|
|
155
|
+
runtimeVersion: "0.1.23",
|
|
156
156
|
api: {
|
|
157
157
|
reachable: true,
|
|
158
158
|
status: 200
|
|
@@ -166,20 +166,37 @@ const createMcpTransportCapabilityAdapter = () => capabilities;
|
|
|
166
166
|
|
|
167
167
|
//#endregion
|
|
168
168
|
//#region src/mcp-main.ts
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
169
|
+
const main = () => {
|
|
170
|
+
const config = readLocalMcpEnvironment();
|
|
171
|
+
const credentials = createFileCredentialAdapter(config.configDirectory);
|
|
172
|
+
const invocation = createMcpInvocationAdapter(config.apiUrl, credentials, config.configDirectory, { version: "0.1.25" });
|
|
173
|
+
const catalog = [...createCapabilityCatalogAdapter(), ...createMcpTransportCapabilityAdapter()];
|
|
174
|
+
serveStdio(() => config.profile === "canvas" ? createMcpCanvasProfileAdapter({
|
|
175
|
+
readOnly: config.isReadOnly,
|
|
176
|
+
...config.workflowsDirectory !== void 0 && { workflowsDirectory: config.workflowsDirectory },
|
|
177
|
+
name: config.mcpServiceName,
|
|
178
|
+
version: "0.1.25",
|
|
179
|
+
invocation,
|
|
180
|
+
catalog
|
|
181
|
+
}) : createMcpServerAdapter({
|
|
182
|
+
version: "0.1.25",
|
|
183
|
+
name: config.mcpServiceName,
|
|
184
|
+
commandName: config.commandName,
|
|
185
|
+
invocation,
|
|
186
|
+
catalog,
|
|
187
|
+
exposures: ["shared", "mcp-transport"],
|
|
188
|
+
...config.workflowsDirectory !== void 0 && { workflowsDirectory: config.workflowsDirectory }
|
|
189
|
+
}), {
|
|
190
|
+
legacy: "serve",
|
|
191
|
+
onerror: () => process.stderr.write(`${config.mcpServiceName} transport failure\n`)
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
try {
|
|
195
|
+
main();
|
|
196
|
+
} catch (error) {
|
|
197
|
+
process.stderr.write(`${error instanceof Error ? error.message : "MCP startup failed."}\n`);
|
|
198
|
+
process.exitCode = 1;
|
|
199
|
+
}
|
|
183
200
|
|
|
184
201
|
//#endregion
|
|
185
202
|
export { };
|