Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
hooks.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
14#pragma once
15
16#include <stddef.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
91
135 entropic_hook_point_t hook_point,
136 const char* context_json,
137 char** modified_json,
138 void* user_data);
139
140#ifdef __cplusplus
141}
142#endif
int(* entropic_hook_callback_t)(entropic_hook_point_t hook_point, const char *context_json, char **modified_json, void *user_data)
Hook callback function type.
Definition hooks.h:134
entropic_hook_point_t
Hook points in the engine lifecycle.
Definition hooks.h:34
@ ENTROPIC_HOOK_ON_LOOP_START
20: Agentic loop entry
Definition hooks.h:58
@ ENTROPIC_HOOK_ON_POST_COMPACT
12: After context compaction
Definition hooks.h:48
@ ENTROPIC_HOOK_ON_DELEGATE
8: Delegation to child tier started
Definition hooks.h:44
@ ENTROPIC_HOOK_ON_MODEL_UNLOAD
14: Model unloaded from backend
Definition hooks.h:50
@ ENTROPIC_HOOK_ON_CUSTOM_DIRECTIVE
19: Unrecognized directive type
Definition hooks.h:57
@ ENTROPIC_HOOK_ON_LOOP_END
21: Agentic loop exit
Definition hooks.h:59
@ ENTROPIC_HOOK_ON_ADAPTER_SWAP
16: Adapter/LoRA swap requested
Definition hooks.h:54
@ ENTROPIC_HOOK_ON_STATE_CHANGE
6: Engine state machine transition
Definition hooks.h:42
@ ENTROPIC_HOOK_PRE_GENERATE
0: Before inference generate call
Definition hooks.h:36
@ ENTROPIC_HOOK_ON_STREAM_TOKEN
2: Each streaming token emitted
Definition hooks.h:38
@ ENTROPIC_HOOK_ON_PERMISSION_CHECK
15: Permission check evaluated
Definition hooks.h:51
@ ENTROPIC_HOOK_ON_CONTEXT_ASSEMBLE
10: Context window assembled
Definition hooks.h:46
@ ENTROPIC_HOOK_PRE_TOOL_CALL
3: Before tool execution
Definition hooks.h:39
@ ENTROPIC_HOOK_ON_PRE_COMPACT
11: Before context compaction
Definition hooks.h:47
@ ENTROPIC_HOOK_POST_TOOL_CALL
4: After tool execution returns
Definition hooks.h:40
@ ENTROPIC_HOOK_ON_VRAM_PRESSURE
17: VRAM pressure detected
Definition hooks.h:55
@ ENTROPIC_HOOK_ON_MODEL_LOAD
13: Model loaded into backend
Definition hooks.h:49
@ ENTROPIC_HOOK_ON_LOOP_ITERATION
5: Each agentic loop iteration
Definition hooks.h:41
@ ENTROPIC_HOOK_ON_ERROR
7: Async error occurred
Definition hooks.h:43
@ ENTROPIC_HOOK_ON_DIRECTIVE
18: Before processing a directive
Definition hooks.h:56
@ ENTROPIC_HOOK_POST_GENERATE
1: After inference generate returns
Definition hooks.h:37
@ ENTROPIC_HOOK_ON_DELEGATE_COMPLETE
9: Child delegation completed
Definition hooks.h:45
@ ENTROPIC_HOOK_COUNT_
Sentinel — not a valid hook point.
Definition hooks.h:89
@ ENTROPIC_HOOK_ON_COMPLETE
entropic.complete MCP tool called — pre-hook, can cancel.
Definition hooks.h:87