Clean up and enhance memory plugin (#151)

* refactor storage to use worker-based vector operations

* update memory service and agent implementations

* update opencode plugin sdk

* update memory plugin documentation

* add tests for memory service and injection hook

* update lockfile for dependency changes

* Add memory plugin v0.0.13 with message deduplication and config UI

* Remove planning state feature from memory plugin
This commit is contained in:
Chris Scott authored and GitHub committed 2026-03-06 20:24:52 -05:00
1 parent 47ef830cbb
commit 6ef68774d8
53 files changed
+1683 -1885

No files matched your search

+26
View File
@@ -60,14 +60,40 @@ export type EmbeddingConfig = z.infer<typeof EmbeddingConfigSchema>
export const LoggingConfigSchema = z.object({
enabled: z.boolean(),
file: z.string().optional(),
debug: z.boolean().optional(),
})
export type LoggingConfig = z.infer<typeof LoggingConfigSchema>
export const CompactionConfigSchema = z.object({
customPrompt: z.boolean().optional(),
maxContextTokens: z.number().optional(),
})
export type CompactionConfig = z.infer<typeof CompactionConfigSchema>
export const MemoryInjectionConfigSchema = z.object({
enabled: z.boolean().optional(),
maxResults: z.number().optional(),
distanceThreshold: z.number().optional(),
maxTokens: z.number().optional(),
cacheTtlMs: z.number().optional(),
debug: z.boolean().optional(),
})
export type MemoryInjectionConfig = z.infer<typeof MemoryInjectionConfigSchema>
export const MessagesTransformConfigSchema = z.object({
enabled: z.boolean().optional(),
debug: z.boolean().optional(),
})
export type MessagesTransformConfig = z.infer<typeof MessagesTransformConfigSchema>
export const PluginConfigSchema = z.object({
dataDir: z.string().optional(),
embedding: EmbeddingConfigSchema,
dedupThreshold: z.number().min(0).max(1).default(0.25),
logging: LoggingConfigSchema.optional(),
compaction: CompactionConfigSchema.optional(),
memoryInjection: MemoryInjectionConfigSchema.optional(),
messagesTransform: MessagesTransformConfigSchema.optional(),
executionModel: z.string().optional(),
})
export type PluginConfig = z.infer<typeof PluginConfigSchema>
+3
View File
@@ -86,5 +86,8 @@ export type {
EmbeddingProviderType,
EmbeddingConfig,
LoggingConfig,
CompactionConfig,
MemoryInjectionConfig,
MessagesTransformConfig,
PluginConfig,
} from '../schemas/memory'