myagentmemory 0.4.16 → 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/LICENSE +1 -0
- package/README.md +78 -68
- package/dist/cli-spec.d.ts +7 -1
- package/dist/cli-spec.js +226 -12
- package/dist/cli.js +2140 -182
- 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 +6 -6
- package/dist/plugin-host.d.ts +51 -0
- package/dist/plugin-runtime.d.ts +20 -1
- package/dist/plugin-runtime.js +83 -2
- package/dist/plugin-service.d.ts +10 -4
- package/dist/plugin-service.js +83 -42
- package/dist/upgrade.d.ts +80 -0
- package/dist/upgrade.js +243 -0
- package/docs/official-plugin-bootstrap.md +30 -22
- 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 +230 -12
- package/src/completions.ts +26 -18
- package/src/core.ts +312 -123
- package/src/hooks.ts +395 -85
- package/src/plugin-bootstrap.ts +6 -6
- package/src/plugin-host.ts +53 -0
- package/src/cli.ts +0 -1271
- package/src/plugin-runtime.ts +0 -326
- package/src/plugin-service.ts +0 -628
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;
|
|
@@ -131,11 +148,47 @@ export interface PluginStructuredErrorV1 {
|
|
|
131
148
|
retryable?: boolean;
|
|
132
149
|
}
|
|
133
150
|
|
|
151
|
+
export interface PluginContextSectionV1 {
|
|
152
|
+
id: string;
|
|
153
|
+
label: string;
|
|
154
|
+
content: string;
|
|
155
|
+
artifactPath?: string;
|
|
156
|
+
metadata?: Record<string, unknown>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface PluginContextProviderV1 {
|
|
160
|
+
name: string;
|
|
161
|
+
requiredCapability: string;
|
|
162
|
+
provide(context: {
|
|
163
|
+
host: string;
|
|
164
|
+
cwd?: string;
|
|
165
|
+
query?: string;
|
|
166
|
+
signal: AbortSignal;
|
|
167
|
+
}): Promise<PluginContextSectionV1[]>;
|
|
168
|
+
}
|
|
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
|
+
|
|
134
183
|
export interface AgentMemoryPluginHostV1 {
|
|
135
184
|
apiVersion: 1;
|
|
136
185
|
coreVersion: string;
|
|
137
186
|
registerCommand(command: PluginCommandV1): void;
|
|
138
187
|
registerSessionStartHook(hook: PluginSessionStartHookV1): void;
|
|
188
|
+
registerBackgroundRefresh?(hook: PluginBackgroundRefreshHookV1): void;
|
|
189
|
+
registerContextProvider?(provider: PluginContextProviderV1): void;
|
|
190
|
+
registerMcpTool?(tool: PluginMcpToolV1): void;
|
|
191
|
+
registerMcpStartup?(fn: () => void | Promise<void>): void;
|
|
139
192
|
getStateDirectory(): string;
|
|
140
193
|
getMemoryDirectory(): string;
|
|
141
194
|
getEntitlement(): Promise<PluginEntitlementStatusV1>;
|