Skip to content

Function: checkLockfile()

ts
function checkLockfile(
   lockfile, 
   contracts, 
options?): Promise<LockfileCheckResult>;

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

Verify that a lockfile matches the current server contracts and prompts.

This is the CI gate: fusion lock --check calls this function and exits non-zero if the lockfile is stale.

Parameters

ParameterTypeDescription
lockfileCapabilityLockfilePreviously generated lockfile (from disk)
contractsReadonly<Record<string, ToolContract>>Current compiled tool contracts (from code)
options?GenerateLockfileOptionsOptional: prompt builders for prompt verification

Returns

Promise<LockfileCheckResult>

Check result with per-tool and per-prompt diff details