@firfi/huly-mcp 0.52.2 → 0.52.3
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/README.md +2 -0
- package/dist/index.cjs +27 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
**Huly MCP** is a feature-complete MCP server for [Huly](https://huly.io/) integration. Published on npm as [`@firfi/huly-mcp`](https://www.npmjs.com/package/@firfi/huly-mcp).
|
|
12
12
|
|
|
13
|
+
It connects to any Huly Platform deployment, so it should also work with the [Platform Collective](https://github.com/Platform-Collective/platform) fork and [TraceX](https://tracex.co) — unofficial for now.
|
|
14
|
+
|
|
13
15
|
> [!IMPORTANT]
|
|
14
16
|
> **Hosted Huly is shutting down.** Huly's upstream README says shutdown is expected July 20. If you use `https://huly.app`, [export and migrate your data](https://github.com/hcengineering/platform/blob/develop/README.md) as soon as possible. See the [backup and restore guide](https://github.com/hcengineering/platform/blob/develop/docs/guides/backup-restore.en.md) and [self-hosting repository](https://github.com/hcengineering/huly-selfhost). Self-hosted deployments are not affected.
|
|
15
17
|
|
package/dist/index.cjs
CHANGED
|
@@ -132455,7 +132455,7 @@ var VERSION;
|
|
|
132455
132455
|
var init_version = __esm({
|
|
132456
132456
|
"src/version.ts"() {
|
|
132457
132457
|
"use strict";
|
|
132458
|
-
VERSION = true ? "0.52.
|
|
132458
|
+
VERSION = true ? "0.52.3" : "0.0.0-dev";
|
|
132459
132459
|
}
|
|
132460
132460
|
});
|
|
132461
132461
|
|
|
@@ -233856,12 +233856,14 @@ var init_protocol_handlers = __esm({
|
|
|
233856
233856
|
}
|
|
233857
233857
|
};
|
|
233858
233858
|
proxyCallTelemetry = (toolName, args2, registry2) => {
|
|
233859
|
-
if (toolName !== INVOKE_TOOL_TOOL_NAME) return {};
|
|
233859
|
+
if (toolName !== INVOKE_TOOL_TOOL_NAME) return { toolName, callPath: "direct" };
|
|
233860
233860
|
const decoded = Schema_exports.decodeUnknownResult(InvokeToolParamsSchema)(args2);
|
|
233861
|
-
if (Result_exports.isFailure(decoded)) return {};
|
|
233861
|
+
if (Result_exports.isFailure(decoded)) return { toolName, callPath: "invoke_tool" };
|
|
233862
|
+
const target = decoded.success.toolName;
|
|
233862
233863
|
return {
|
|
233863
|
-
|
|
233864
|
-
|
|
233864
|
+
toolName: registry2.tools.has(target) ? target : toolName,
|
|
233865
|
+
callPath: "invoke_tool",
|
|
233866
|
+
editMode: deriveEditMode(target, decoded.success.arguments)
|
|
233865
233867
|
};
|
|
233866
233868
|
};
|
|
233867
233869
|
resolveClientBundle = async (resolveClients) => {
|
|
@@ -233931,20 +233933,18 @@ var init_protocol_handlers = __esm({
|
|
|
233931
233933
|
noticeClaim.delivered();
|
|
233932
233934
|
return responseWithNotice;
|
|
233933
233935
|
};
|
|
233934
|
-
const returnError = (errorResponse,
|
|
233936
|
+
const returnError = (errorResponse, attribution = { toolName: name, callPath: "direct" }) => {
|
|
233935
233937
|
const responseWithNotice = withClaimedNotice(errorResponse);
|
|
233936
233938
|
const durationMs = clock.currentTimeMillis() - start;
|
|
233937
233939
|
telemetry.toolCalled({
|
|
233938
|
-
|
|
233939
|
-
...operationName === void 0 ? {} : { operationName },
|
|
233940
|
+
...attribution,
|
|
233940
233941
|
status: "error",
|
|
233941
233942
|
clientKind: exposure.context.clientKind,
|
|
233942
233943
|
resolvedMode: exposure.context.resolvedMode,
|
|
233943
233944
|
errorTag: responseWithNotice._meta?.errorTag,
|
|
233944
233945
|
durationMs,
|
|
233945
233946
|
inputBytes,
|
|
233946
|
-
outputBytes: computeOutputBytes(responseWithNotice)
|
|
233947
|
-
editMode
|
|
233947
|
+
outputBytes: computeOutputBytes(responseWithNotice)
|
|
233948
233948
|
});
|
|
233949
233949
|
return toMcpResponse(responseWithNotice);
|
|
233950
233950
|
};
|
|
@@ -233995,10 +233995,10 @@ var init_protocol_handlers = __esm({
|
|
|
233995
233995
|
};
|
|
233996
233996
|
const callProxyTool = async (toolName) => {
|
|
233997
233997
|
if (exposure.context.resolvedMode !== "proxy") return returnError(createUnknownToolError(toolName));
|
|
233998
|
-
const
|
|
233998
|
+
const attribution = proxyCallTelemetry(toolName, args2, exposure.proxyCandidateRegistry);
|
|
233999
233999
|
const clientResolution = await resolveProxyClients(toolName, resolveClients);
|
|
234000
234000
|
if (clientResolution?._tag === "Failure") {
|
|
234001
|
-
return returnError(clientResolution.response,
|
|
234001
|
+
return returnError(clientResolution.response, attribution);
|
|
234002
234002
|
}
|
|
234003
234003
|
const response = await handleProxyToolCall({
|
|
234004
234004
|
toolName,
|
|
@@ -234009,16 +234009,14 @@ var init_protocol_handlers = __esm({
|
|
|
234009
234009
|
const responseWithNotice = withClaimedNotice(response);
|
|
234010
234010
|
const durationMs = clock.currentTimeMillis() - start;
|
|
234011
234011
|
telemetry.toolCalled({
|
|
234012
|
-
|
|
234013
|
-
...operationName === void 0 ? {} : { operationName },
|
|
234012
|
+
...attribution,
|
|
234014
234013
|
status: responseStatus(responseWithNotice),
|
|
234015
234014
|
clientKind: exposure.context.clientKind,
|
|
234016
234015
|
resolvedMode: exposure.context.resolvedMode,
|
|
234017
234016
|
errorTag: responseWithNotice._meta?.errorTag,
|
|
234018
234017
|
durationMs,
|
|
234019
234018
|
inputBytes,
|
|
234020
|
-
outputBytes: computeOutputBytes(responseWithNotice)
|
|
234021
|
-
editMode
|
|
234019
|
+
outputBytes: computeOutputBytes(responseWithNotice)
|
|
234022
234020
|
});
|
|
234023
234021
|
return toMcpResponse(responseWithNotice);
|
|
234024
234022
|
};
|
|
@@ -234030,9 +234028,13 @@ var init_protocol_handlers = __esm({
|
|
|
234030
234028
|
if (tool === void 0) return returnError(createUnknownToolError(name));
|
|
234031
234029
|
const argumentError = nativeArgumentError(tool, args2);
|
|
234032
234030
|
if (argumentError !== void 0) return returnError(argumentError);
|
|
234033
|
-
const
|
|
234031
|
+
const attribution = {
|
|
234032
|
+
toolName: hulyToolName,
|
|
234033
|
+
callPath: "direct",
|
|
234034
|
+
editMode: deriveEditMode(hulyToolName, args2)
|
|
234035
|
+
};
|
|
234034
234036
|
const clientResolution = await resolveClientBundle(resolveClients);
|
|
234035
|
-
if (clientResolution._tag === "Failure") return returnError(clientResolution.response,
|
|
234037
|
+
if (clientResolution._tag === "Failure") return returnError(clientResolution.response, attribution);
|
|
234036
234038
|
const { clients } = clientResolution;
|
|
234037
234039
|
const response = await nativeCallRegistry.handleToolCall(
|
|
234038
234040
|
hulyToolName,
|
|
@@ -234042,18 +234044,17 @@ var init_protocol_handlers = __esm({
|
|
|
234042
234044
|
clients.workspaceClient
|
|
234043
234045
|
);
|
|
234044
234046
|
const durationMs = clock.currentTimeMillis() - start;
|
|
234045
|
-
if (response === null) return returnError(createUnknownToolError(name),
|
|
234047
|
+
if (response === null) return returnError(createUnknownToolError(name), attribution);
|
|
234046
234048
|
const responseWithNotice = withClaimedNotice(response);
|
|
234047
234049
|
telemetry.toolCalled({
|
|
234048
|
-
|
|
234050
|
+
...attribution,
|
|
234049
234051
|
status: responseStatus(responseWithNotice),
|
|
234050
234052
|
clientKind: exposure.context.clientKind,
|
|
234051
234053
|
resolvedMode: exposure.context.resolvedMode,
|
|
234052
234054
|
errorTag: responseWithNotice._meta?.errorTag,
|
|
234053
234055
|
durationMs,
|
|
234054
234056
|
inputBytes,
|
|
234055
|
-
outputBytes: computeOutputBytes(responseWithNotice)
|
|
234056
|
-
editMode
|
|
234057
|
+
outputBytes: computeOutputBytes(responseWithNotice)
|
|
234057
234058
|
});
|
|
234058
234059
|
return toMcpResponse(responseWithNotice);
|
|
234059
234060
|
};
|
|
@@ -238495,7 +238496,7 @@ var init_stderr = __esm({
|
|
|
238495
238496
|
});
|
|
238496
238497
|
|
|
238497
238498
|
// src/telemetry/posthog.ts
|
|
238498
|
-
var POSTHOG_API_KEY, SHUTDOWN_TIMEOUT_MS, ToolCalledPropertiesSchema,
|
|
238499
|
+
var POSTHOG_API_KEY, SHUTDOWN_TIMEOUT_MS, ToolCalledPropertiesSchema, defaultDependencies, createPostHogTelemetry, createPostHogTelemetryWithContext;
|
|
238499
238500
|
var init_posthog = __esm({
|
|
238500
238501
|
"src/telemetry/posthog.ts"() {
|
|
238501
238502
|
"use strict";
|
|
@@ -238508,7 +238509,7 @@ var init_posthog = __esm({
|
|
|
238508
238509
|
SHUTDOWN_TIMEOUT_MS = 2e3;
|
|
238509
238510
|
ToolCalledPropertiesSchema = Schema_exports.Struct({
|
|
238510
238511
|
tool_name: Schema_exports.String,
|
|
238511
|
-
|
|
238512
|
+
call_path: Schema_exports.Literals(["direct", "invoke_tool"]),
|
|
238512
238513
|
status: Schema_exports.Literals(["success", "error"]),
|
|
238513
238514
|
duration_ms: Schema_exports.Number,
|
|
238514
238515
|
client_kind: Schema_exports.optionalKey(Schema_exports.String),
|
|
@@ -238518,10 +238519,6 @@ var init_posthog = __esm({
|
|
|
238518
238519
|
output_bytes: Schema_exports.optionalKey(Schema_exports.Number),
|
|
238519
238520
|
edit_mode: Schema_exports.optionalKey(Schema_exports.String)
|
|
238520
238521
|
});
|
|
238521
|
-
operationProperties = (toolName, targetName) => {
|
|
238522
|
-
const operationName = targetName ?? (toolName === "invoke_tool" ? void 0 : toolName);
|
|
238523
|
-
return operationName === void 0 ? {} : { operation_name: operationName };
|
|
238524
|
-
};
|
|
238525
238522
|
defaultDependencies = {
|
|
238526
238523
|
createClient: () => new PostHog(POSTHOG_API_KEY, { host: "https://us.i.posthog.com", flushAt: 10, flushInterval: 6e4 }),
|
|
238527
238524
|
createSessionId: () => crypto.randomUUID(),
|
|
@@ -238586,7 +238583,7 @@ var init_posthog = __esm({
|
|
|
238586
238583
|
event: "tool_called",
|
|
238587
238584
|
properties: {
|
|
238588
238585
|
tool_name: props.toolName,
|
|
238589
|
-
|
|
238586
|
+
call_path: props.callPath ?? "direct",
|
|
238590
238587
|
status: props.status,
|
|
238591
238588
|
duration_ms: props.durationMs,
|
|
238592
238589
|
...props.clientKind !== void 0 && { client_kind: props.clientKind },
|
|
@@ -239435,7 +239432,7 @@ if (unsupportedRuntime) {
|
|
|
239435
239432
|
detectedNodeVersion: process.versions.node,
|
|
239436
239433
|
executable: process.execPath,
|
|
239437
239434
|
requiredNodeVersion: nodeEngineRequirement,
|
|
239438
|
-
serverVersion: "0.52.
|
|
239435
|
+
serverVersion: "0.52.3"
|
|
239439
239436
|
});
|
|
239440
239437
|
startUnsupportedNodeMcp(config2);
|
|
239441
239438
|
} else {
|