This repository implements a plugin for OpenCode, an AI coding assistant, providing persistent, self-editable memory blocks and an optional journal feature. The plugin injects structured memory instructions into the agent's system prompt and exposes dedicated tools (memory_list, memory_get, memory_set, memory_replace, memory_oversized) for the agent to manage its own long-term memory. Memory blocks are stored as markdown files with YAML frontmatter on disk, split into global and project scopes. An optional journal system offers append-only entries with semantic search via local embeddings (all-MiniLM-L6-v2), tags, and metadata tracking. The architecture is cleanly modular: the plugin entry point (src/plugin.ts) orchestrates a configurable memory store (src/memory.ts), a journal store (src/journal.ts), a snapshot caching layer (src/snapshot.ts), and tool definitions (src/tools.ts). The snapshot store is particularly notable for its careful handling of concurrent renders, invalidation, and persistence across process restarts, making it a reusable caching pattern. The codebase is well-tested, uses modern TypeScript with strict mode, and follows OpenCode v2 plugin API conventions. While some components are coupled to the OpenCode ecosystem, the frontmatter utilities, embedding wrapper, and snapshot store are self-contained and could be extracted for use in other projects.
This repository contains a Zotero plugin for formatting item metadata, specifically designed to ensure the existence, correctness, and accuracy of all items and fields in a Zotero library. The plugin includes a rule system with core abstractions expressed as rules, and uses large reference datasets bundled as assets. It is built on the zotero-plugin-template and zotero-plugin-scaffold toolchain and is designed to work with Zotero 8 & 9.
lsq is a CLI tool written in Go that serves as a lightning-fast companion for Logseq, the open-source knowledge base. Its core functionality is creating, appending to, and viewing daily journal entries directly from the terminal, following Logseq's file naming and formatting conventions (Markdown or Org-mode). The tool provides a rich set of flags for targeting specific dates, searching pages via a trie-based index (including alias support), regex searching across journals and pages, and piping content from STDIN. It also supports indentation for nested list items and a configuration file in EDN format for persistent settings. The architecture is a single-binary monolith with clear separation into config, system (file I/O, editor launch), trie, todo state cycling, and an EDN validator module. While the tool is tightly coupled to Logseq's directory structure (journals/ and pages/ folders), the underlying components like the trie search, file appending logic, and configuration loading are well-isolated and could be reused in other Go projects with minimal adaptation.