(toolName: string, params: Record<string, unknown>)
| 58 | } |
| 59 | |
| 60 | function 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 | |
| 68 | function resolveApprovalTimeoutMs(config: PluginConfig): number | undefined { |
| 69 | const timeoutMs = config.approvals?.timeoutMs; |
no test coverage detected