myagentmemory 0.4.17 → 0.5.2

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.
@@ -96,6 +96,23 @@ export interface PluginSessionStartHookV1 {
96
96
  run(context: PluginSessionStartContextV1): Promise<void>;
97
97
  }
98
98
 
99
+ export interface PluginBackgroundRefreshContextV1 {
100
+ host: string;
101
+ cwd?: string;
102
+ signal: AbortSignal;
103
+ }
104
+
105
+ /**
106
+ * Un-metered per-turn refresh callback. Fired on every UserPromptSubmit so
107
+ * plugins can keep background workers alive across `/clear` and long idle.
108
+ * MUST be idempotent and cheap — no quota is charged.
109
+ */
110
+ export interface PluginBackgroundRefreshHookV1 {
111
+ name: string;
112
+ requiredCapability: string;
113
+ run(context: PluginBackgroundRefreshContextV1): Promise<void>;
114
+ }
115
+
99
116
  export interface PluginMemoryWriteV1 {
100
117
  target: "long_term" | "daily" | "topic";
101
118
  content: string;
@@ -150,12 +167,29 @@ export interface PluginContextProviderV1 {
150
167
  }): Promise<PluginContextSectionV1[]>;
151
168
  }
152
169
 
170
+ export interface PluginMcpToolInputSchema {
171
+ type: "object";
172
+ properties: Record<string, { type: string; description?: string; enum?: string[] }>;
173
+ required?: string[];
174
+ }
175
+
176
+ export interface PluginMcpToolV1 {
177
+ name: string;
178
+ description: string;
179
+ requiredCapability: string;
180
+ inputSchema: PluginMcpToolInputSchema;
181
+ run(input: Record<string, unknown>): unknown | Promise<unknown>;
182
+ }
183
+
153
184
  export interface AgentMemoryPluginHostV1 {
154
185
  apiVersion: 1;
155
186
  coreVersion: string;
156
187
  registerCommand(command: PluginCommandV1): void;
157
188
  registerSessionStartHook(hook: PluginSessionStartHookV1): void;
189
+ registerBackgroundRefresh?(hook: PluginBackgroundRefreshHookV1): void;
158
190
  registerContextProvider?(provider: PluginContextProviderV1): void;
191
+ registerMcpTool?(tool: PluginMcpToolV1): void;
192
+ registerMcpStartup?(fn: () => void | Promise<void>): void;
159
193
  getStateDirectory(): string;
160
194
  getMemoryDirectory(): string;
161
195
  getEntitlement(): Promise<PluginEntitlementStatusV1>;