Is your feature request related to a problem? Please describe.
There's no way to inject a temporary variable into the session state at the start of an invocation. The temp: prefixed variables are filtered out.
The workarounds I've thought through (like leveraging plugins) seem over the top.
Describe the solution you'd like
Add a way for the caller access the invocation context or the session during/after the call to Runner.runAsync.
For instance:
runner.runAsync({
// existing params
beforeRunCallback: ({ invocationContext }) => {
invocationContext.session.state.set('temp:var', 'value')
},
})
Describe alternatives you've considered
This is roughly how plugins work, but plugins don't have a way to access the local scope in which runner.runAsync was called (unless a new runner is created which doesn't seem to be recommended for long running processes like API servers).
Is your feature request related to a problem? Please describe.
There's no way to inject a temporary variable into the session state at the start of an invocation. The
temp:prefixed variables are filtered out.The workarounds I've thought through (like leveraging plugins) seem over the top.
Describe the solution you'd like
Add a way for the caller access the invocation context or the session during/after the call to
Runner.runAsync.For instance:
Describe alternatives you've considered
This is roughly how plugins work, but plugins don't have a way to access the local scope in which
runner.runAsyncwas called (unless a new runner is created which doesn't seem to be recommended for long running processes like API servers).