Skip to content

Function: generateLockfile()

ts
function generateLockfile(
   serverName, 
   contracts, 
   fusionVersion, 
options?): Promise<CapabilityLockfile>;

Defined in: packages/core/src/introspection/CapabilityLockfile.ts:256

Generate a CapabilityLockfile from compiled tool contracts and (optionally) prompt builders.

This is a pure function: given the same contracts and metadata, it always produces the same lockfile (modulo generatedAt timestamp).

Parameters

ParameterTypeDescription
serverNamestringMCP server name
contractsReadonly<Record<string, ToolContract>>Record of tool name → materialized contract
fusionVersionstringMCP Fusion version string
options?GenerateLockfileOptionsOptional: prompt builders to include

Returns

Promise<CapabilityLockfile>

A fully materialized lockfile