A decorator that can be used to secure a LangGraph invocation.
The function should return a boolean or a Promise of a boolean indicating
whether the invocation is allowed. It takes a SecureLangGraphContext
parameter containing the operation ('invoke' | 'resume' | 'getState' | 'deleteThread'),
graphId, threadId, input, and resumePayload of the request.
Parameters
OptionalgraphId: string
The ID of the graph to secure - if not provided, this will apply to all graphs.
A decorator that can be used to secure a LangGraph invocation.
The function should return a boolean or a
Promiseof a boolean indicating whether the invocation is allowed. It takes a SecureLangGraphContext parameter containing theoperation('invoke' | 'resume' | 'getState' | 'deleteThread'),graphId,threadId,input, andresumePayloadof the request.