(input: McpRequestStateBindingInput)
| 128 | |
| 129 | /** Build the canonical NUL-separated modern continuation binding. */ |
| 130 | export const mcpRequestStateBinding = (input: McpRequestStateBindingInput): string => |
| 131 | [ |
| 132 | input.principal, |
| 133 | mcpResourceKey(input.resource), |
| 134 | input.method, |
| 135 | input.toolName, |
| 136 | input.codeDigest, |
| 137 | ].join("\u0000"); |
| 138 | |
| 139 | /** Return the lowercase SHA-256 digest used to bind an execute code argument. */ |
| 140 | export const mcpCodeDigest = async (code: string): Promise<string> => { |
no test coverage detected