5bad7ac7a6
refactor: decouple meta plugins from DB via SaveMetaFn callback, extract shared utilities
...
- Add SaveMetaFn callback pattern: meta plugins receive a closure instead of
&Connection, enabling the same plugin code to work in local, client, and
server contexts (collect-to-Vec, collect-to-HashMap, or direct DB write)
- Client save now runs meta plugins locally during streaming (smart client
sets meta=false, server skips its own plugins)
- Add POST /api/item/{id}/update endpoint for re-running plugins on stored
content without downloading compressed data
- Add client update mode (--update with --meta-plugin flags)
- Extract shared utilities: stream_copy, print_serialized, build_path_table,
ensure_default_tag to reduce duplication across modes
- Add upsert_tag for idempotent tag addition (INSERT OR IGNORE)
- Add warn logging on save_meta lock failure in BaseMetaPlugin and MetaService
2026-03-14 22:36:59 -03:00
b3ca673b52
feat: add --update mode, --meta/--meta-plugin flags, streaming diff
...
- Add --update mode to modify tags and metadata for existing items by ID
- Add --meta key=value flag to set metadata during save/update
- Add --meta key (bare) to delete metadata keys or filter by existence
- Add --meta-plugin/-M name:{json} flag for plugin options via CLI
- Env meta plugin now uses options from --meta-plugin instead of only env vars
- Stream decompressed content to diff via /dev/fd pipes (no temp files)
- Wire --list-format CLI arg to settings (was parsed but ignored)
- Allow --info to accept tags (was restricted to numeric IDs only)
- Change DB meta filtering to HashMap<String, Option<String>> for exact match + key existence
- Fix fcntl error checking in diff pre_exec
- Fix README inaccuracies (delete by tag, nonexistent --digest flag, meta plugin key names)
2026-03-14 15:02:16 -03:00
Andrew Phillips
fddc7670aa
chore: remove unused update mode
2025-08-19 13:31:13 -03:00
Andrew Phillips
e9aaa5d5bf
fix: update digest handling in update mode
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-18 08:33:46 -03:00
Andrew Phillips
5c66ac3d8a
fix: remove unused config parameter in mode functions
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-16 12:11:31 -03:00
Andrew Phillips
3f13e490b3
refactor: remove meta data handling from update mode
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-16 12:05:18 -03:00
Andrew Phillips
c4b2a5d7e7
fix: update config type references and method calls
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-16 12:03:13 -03:00
Andrew Phillips
b6389419c0
fix: remove unused imports and resolve config module conflicts
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-15 16:39:11 -03:00
Andrew Phillips
56f4d8aad5
feat: implement unified settings system
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-15 16:36:58 -03:00
Andrew Phillips
0f06d31423
fix: remove unused imports, unnecessary mutable variables, and dead code
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-10 00:27:02 -03:00
Andrew Phillips
7210aa08d0
fix: correct variable name and mutable transaction handling in save and update modes
...
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat >
2025-08-10 00:26:18 -03:00
Andrew Phillips
d4370563c3
fix: correct mutable reference handling and remove unused variables
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-10 00:25:22 -03:00
Andrew Phillips
0e68e5ff03
fix: resolve mutable borrowing issues with Transaction and clean up warnings
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-10 00:24:42 -03:00
Andrew Phillips
469e3640b8
fix: resolve compilation errors by fixing mutable references and removing unused imports
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-10 00:23:58 -03:00
Andrew Phillips
cacf843da7
fix: resolve missing imports and incorrect mutable references in save and update modes
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-10 00:23:34 -03:00
Andrew Phillips
38f2caaf1b
fix: resolve compilation errors by adding missing imports and fixing type mismatches
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-10 00:22:12 -03:00
Andrew Phillips
cb408bafa1
fix: use database transactions for atomic operations in save and update modes
...
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-09 23:33:53 -03:00
Andrew Phillips
a3eb9e7056
fix: address critical memory safety, error handling, concurrency and security issues
...
This commit fixes several critical issues across the codebase:
1. Memory safety & resource leaks: Added proper cleanup for compression engine processes using RAII patterns
2. Error handling: Replaced unsafe unwrap() calls with proper error propagation using ok_or_else()?
3. Concurrency issues: Improved diff mode thread safety with proper error handling and RAII guards
4. Security concerns: Added validation for item IDs to prevent path traversal vulnerabilities
5. Database design: Wrapped database operations in transactions for atomicity in save/update modes
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat >
2025-08-09 23:33:06 -03:00
Andrew Phillips
e51a902660
refactor: integrate digest functionality into meta plugins and remove digest_engine module
...
Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) <aider@aider.chat >
2025-07-28 17:31:23 -03:00
Andrew Phillips
5a6a8ee97b
refactor: improve code formatting and readability in SQL and function calls
2025-05-14 22:50:35 -03:00
Andrew Phillips
dd8f828ed3
refactor: update function parameters to use references where appropriate
2025-05-14 22:09:23 -03:00
Andrew Phillips (aider)
4ac2943683
refactor: update store_item_digest_value calls to use new argument types
2025-05-14 17:18:11 -03:00
Andrew Phillips (aider)
72a8337f4e
refactor: use store_item_digest_value in mode_update and mode_save
2025-05-14 17:12:18 -03:00
Andrew Phillips (aider)
ac4660684d
fix: clone moved values to resolve ownership issues
2025-05-14 16:32:04 -03:00
Andrew Phillips (aider)
477a03fbb7
feat: store digest in meta entry with get_digest_type_meta as name
2025-05-14 16:29:27 -03:00
Andrew Phillips
bbdfe19836
feat: add compression and digest support with database schema updates
2025-05-14 09:45:51 -03:00
Andrew Phillips (aider)
dc76b6af52
refactor: use compression_engine.open for file handling in update mode
2025-05-13 19:02:51 -03:00
Andrew Phillips (aider)
51acd0933f
fix: Implement digest calculation loop and update item in DB
2025-05-13 19:01:52 -03:00
Andrew Phillips
932b32edef
refactor: move compression engine init and reorganize digest recalculation logic
2025-05-13 19:01:44 -03:00
Andrew Phillips (aider)
ce44134ab7
refactor: replace if let with match for digest type handling
2025-05-13 18:45:13 -03:00
Andrew Phillips (aider)
6d2640650c
fix: remove unused imports and fix as_ref usage
2025-05-13 18:44:03 -03:00
Andrew Phillips (aider)
98d10e787c
style: fix indentation in mode_update digest calculation
2025-05-13 18:43:17 -03:00
Andrew Phillips (aider)
f419392c8f
fix: close unclosed delimiter in update.rs
2025-05-13 18:42:36 -03:00
Andrew Phillips (aider)
10c3e2d5c8
fix: add ResultExt to anyhow imports
2025-05-13 18:41:53 -03:00
Andrew Phillips (aider)
d58dea9c3f
fix: add bail to anyhow import in update.rs
2025-05-13 18:41:30 -03:00
Andrew Phillips (aider)
64c4dce492
fix: add Context to anyhow import
2025-05-13 18:41:08 -03:00
Andrew Phillips (aider)
6d724c73b9
fix: Handle optional digest_type when checking for digest recalculation
2025-05-13 18:40:39 -03:00
Andrew Phillips
e7496b8978
fix: Fix COMPRESSION typo, correct DIGEST log tag, and refactor mode_update cloning
2025-05-13 18:36:23 -03:00
Andrew Phillips (aider)
eaeb83f12e
fix: add rusqlite Connection import and fix item_path scope
2025-05-13 18:31:46 -03:00
Andrew Phillips (aider)
d8e0cb9758
fix: add DigestType and get_digest_engine imports, fix item_path scope
2025-05-13 18:30:31 -03:00
Andrew Phillips (aider)
9a99bbd8bc
feat: Recalculate digest if digest_type is set but digest_value is missing
2025-05-13 18:26:42 -03:00
Andrew Phillips (aider)
8f93657fa1
refactor: consolidate imports for get_*_engine functions
2025-05-13 09:00:45 -03:00
Andrew Phillips (aider)
889c2bc838
refactor: update engine calls to use imported functions
2025-05-13 08:56:21 -03:00
Andrew Phillips (aider)
e15cf371e0
refactor: Update imports to use specific get_engine functions
2025-05-13 08:51:21 -03:00
Andrew Phillips (aider)
9330fc1db9
refactor: Rename get_engine to get_compression_engine and update references
2025-05-13 08:46:41 -03:00
Andrew Phillips
7db2a2ab75
(no commit message provided)
2025-05-13 08:16:47 -03:00
Andrew Phillips
9ba3a31e95
fix: remove duplicate digest argument and adjust imports
2025-05-12 22:11:56 -03:00
Andrew Phillips (aider)
f6b6bc5768
fix: add FromStr import, remove unused compression_engine import
2025-05-12 17:20:44 -03:00
Andrew Phillips (aider)
0dba671f8d
fix: Fix CompressionType and compression module references in save mode
2025-05-12 17:19:45 -03:00
Andrew Phillips (aider)
71a35a77a0
fix: correct compression module imports
2025-05-12 17:16:52 -03:00