myagentmemory 0.4.17 → 0.5.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/README.md +68 -71
- package/dist/cli-spec.d.ts +7 -1
- package/dist/cli-spec.js +214 -12
- package/dist/cli.js +2049 -156
- package/dist/completions.js +24 -18
- package/dist/core.d.ts +42 -4
- package/dist/core.js +242 -68
- package/dist/hooks.d.ts +21 -1
- package/dist/hooks.js +382 -87
- package/dist/mcp-server.d.ts +27 -0
- package/dist/mcp-server.js +106 -0
- package/dist/plugin-bootstrap.js +4 -4
- package/dist/plugin-host.d.ts +33 -0
- package/dist/plugin-runtime.d.ts +13 -1
- package/dist/plugin-runtime.js +44 -2
- package/dist/plugin-service.d.ts +10 -4
- package/dist/plugin-service.js +52 -8
- package/dist/upgrade.d.ts +80 -0
- package/dist/upgrade.js +243 -0
- package/docs/official-plugin-bootstrap.md +3 -3
- package/package.json +24 -4
- package/scripts/install-skills.sh +1 -1
- package/skills/agent/SKILL.md +12 -2
- package/skills/claude-code/SKILL.md +17 -2
- package/skills/codex/SKILL.md +14 -2
- package/skills/cursor/SKILL.md +14 -2
- package/src/cli-spec.ts +218 -12
- package/src/completions.ts +26 -18
- package/src/core.ts +312 -123
- package/src/hooks.ts +395 -85
- package/src/plugin-bootstrap.ts +4 -4
- package/src/plugin-host.ts +33 -0
- package/src/cli.ts +0 -1332
- package/src/plugin-runtime.ts +0 -390
- package/src/plugin-service.ts +0 -627
package/src/plugin-host.ts
CHANGED
|
@@ -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,28 @@ 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
|
+
inputSchema: PluginMcpToolInputSchema;
|
|
180
|
+
run(input: Record<string, unknown>): unknown | Promise<unknown>;
|
|
181
|
+
}
|
|
182
|
+
|
|
153
183
|
export interface AgentMemoryPluginHostV1 {
|
|
154
184
|
apiVersion: 1;
|
|
155
185
|
coreVersion: string;
|
|
156
186
|
registerCommand(command: PluginCommandV1): void;
|
|
157
187
|
registerSessionStartHook(hook: PluginSessionStartHookV1): void;
|
|
188
|
+
registerBackgroundRefresh?(hook: PluginBackgroundRefreshHookV1): void;
|
|
158
189
|
registerContextProvider?(provider: PluginContextProviderV1): void;
|
|
190
|
+
registerMcpTool?(tool: PluginMcpToolV1): void;
|
|
191
|
+
registerMcpStartup?(fn: () => void | Promise<void>): void;
|
|
159
192
|
getStateDirectory(): string;
|
|
160
193
|
getMemoryDirectory(): string;
|
|
161
194
|
getEntitlement(): Promise<PluginEntitlementStatusV1>;
|