neuralmemory 1.14.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts CHANGED
@@ -37,6 +37,18 @@ export type BeforeAgentStartResult = {
37
37
  providerOverride?: string; // Override provider for this run — first defined wins
38
38
  };
39
39
 
40
+ // New hook types — preferred over legacy before_agent_start
41
+ export type BeforePromptBuildEvent = {
42
+ prompt: string;
43
+ messages?: unknown[];
44
+ systemPrompt?: string;
45
+ };
46
+
47
+ export type BeforePromptBuildResult = {
48
+ systemPrompt?: string; // Appended to system prompt
49
+ prependContext?: string; // Prepended to conversation context
50
+ };
51
+
40
52
  export type AgentEndEvent = {
41
53
  messages: unknown[];
42
54
  success: boolean;
@@ -50,6 +62,22 @@ export type AgentContext = {
50
62
  workspaceDir?: string;
51
63
  };
52
64
 
65
+ export type SessionCompactEvent = {
66
+ reason?: string;
67
+ messagesBeforeCompact?: number;
68
+ };
69
+
70
+ export type CommandEvent = {
71
+ command: string; // "new", "reset", "stop"
72
+ sessionKey?: string;
73
+ workspaceDir?: string;
74
+ };
75
+
76
+ export type GatewayStartupEvent = {
77
+ version?: string;
78
+ workspaceDir?: string;
79
+ };
80
+
53
81
  export type OpenClawPluginApi = {
54
82
  id: string;
55
83
  name: string;