RunCancelScope(std::atomic< bool > *token)
Publish token as this thread's run cancel token.
~RunCancelScope()
Restore the previously installed token.
~RunSessionScope()
Restore the previously published key.
RunSessionScope(std::string key)
Publish key as this thread's run session key.
~RunStreamScope()
Restore the previously published sink.
RunStreamScope(RunStreamFn fn, void *user_data)
Publish (fn, user_data) as this thread's stream sink.
Activate model on GPU (WARM → ACTIVE).
ENTROPIC_EXPORT const std::atomic< bool > * current_run_cancel()
The cancel token of the run executing on this thread, if any.
@ optional
optional: every escape asks the host's path approver
ENTROPIC_EXPORT bool emit_to_current_run_stream(const char *chunk, size_t len)
Deliver a chunk to the stream sink published on THIS thread.
ENTROPIC_EXPORT bool current_run_cancelled()
Whether THIS thread's run has been cancelled.
ENTROPIC_EXPORT std::string current_run_session()
The session key of the run executing on this thread (gh#166).
ENTROPIC_EXPORT bool cancel_current_run()
Cancel the run executing on this thread (gh#158).
void(*)(const char *chunk, size_t len, void *user_data) RunStreamFn
Signature of a run's stream-chunk sink (gh#208, v2.14.2).
gh#158: the cancel token of the run executing on THIS thread.