MCPcopy Create free account
hub / github.com/FIND-Lab/AgentWard / computeOperationKey

Function computeOperationKey

index.ts:60–66  ·  view source on GitHub ↗
(toolName: string, params: Record<string, unknown>)

Source from the content-addressed store, hash-verified

58}
59
60function computeOperationKey(toolName: string, params: Record<string, unknown>): string {
61 // "Exact match" key: stable stringify + hash for compact storage.
62 // Include toolName because different tools can share param shapes.
63 const raw = `${toolName}:${stableStringify(params)}`;
64 const digest = createHash("sha256").update(raw).digest("hex");
65 return `sha256:${digest}`;
66}
67
68function resolveApprovalTimeoutMs(config: PluginConfig): number | undefined {
69 const timeoutMs = config.approvals?.timeoutMs;

Callers 1

registerFunction · 0.85

Calls 1

stableStringifyFunction · 0.85

Tested by

no test coverage detected