Commit graph

962 commits

Author SHA1 Message Date
Research Assistant
d5e7b2a5be fix: debounce page observer to prevent render spam 2026-05-20 17:03:50 +08:00
Research Assistant
bbf34f22f7 fix: match cache pos key instead of position_json 2026-05-20 17:03:27 +08:00
Research Assistant
7068b38d26 fix: add missing _annotationCache declaration and match by attachmentKey 2026-05-20 17:01:46 +08:00
Research Assistant
f5a7bf3469 feat: JSON annotation cache for plugin (no subprocess on reads) 2026-05-20 17:00:34 +08:00
Research Assistant
723e5fc5a4 fix: inline AnnotationDB class, remove local require 2026-05-20 16:55:19 +08:00
Research Assistant
1aa2b26837 refactor: use sql.js instead of subprocess for annotation reads 2026-05-20 16:53:53 +08:00
Research Assistant
e5f0c1f956 fix: extract annotations array from data envelope, add --pdf-path to create 2026-05-20 16:42:59 +08:00
Research Assistant
e809722a03 fix: correct annotation overlay coordinate normalization and pdf-path resolution 2026-05-20 16:27:00 +08:00
Research Assistant
e66e7ed2d3 feat: add local annotation editing 2026-05-20 16:02:44 +08:00
Research Assistant
8e63f72847 feat: render annotation overlays 2026-05-20 16:00:51 +08:00
Research Assistant
d399a8838d feat: add pdf overlay patch lifecycle 2026-05-20 15:59:24 +08:00
Research Assistant
06e6485e46 feat: add annotation plugin bridge 2026-05-20 15:57:31 +08:00
Research Assistant
7692149705 feat: add annotation plugin helpers 2026-05-20 15:56:09 +08:00
Research Assistant
2aea1150d2 test: verify annotation persistence across memory rebuild
- TestMemoryRebuildSurvival proves annotations in annotations.db survive
  a full memory layer drop_all_tables + rebuild cycle, because the two
  databases are independent
2026-05-20 15:51:53 +08:00
Research Assistant
d2bfed9d12 feat: add annotation cli commands
- paperforge/cli.py                   adds annotation subparser with 7 subcommands
- paperforge/commands/annotation.py   dispatch + command implementations
  - import/list/create/patch/delete/export/status
  - all support --json output via PFResult envelope
- tests/cli/test_annotation_commands.py  10 tests: parser validation + integration
  create/list/patch/delete lifecycle
2026-05-20 15:51:32 +08:00
Research Assistant
f880d50092 feat: add annotation service
- paperforge/annotation/service.py  create/patch/delete/list/get/export
  - create_annotation()          local annotation with UUID
  - patch_annotation()           comment/color/tags only, enforces readonly guard
  - delete_annotation()          soft delete
  - get_annotation()             single row lookup
  - list_annotations()           filtered by paper/page/type
  - export_annotations_json()    JSON serialization
  - export_annotations_markdown() Markdown serialization
- tests/unit/annotation/test_service.py  11 tests: create, patch, readonly
  enforcement, soft/hard delete, list filtering, JSON/MD export
2026-05-20 15:48:20 +08:00
Research Assistant
ed869dffaa test: add fixture-driven annotation import coverage
- fixtures/zotero/build_test_db.py  generates minimal Zotero SQLite with
  highlight/underline/note annotations and tags
- tests/integration/test_annotation_import_workflow.py  end-to-end probe→import→verify
  pipeline using a real SQLite fixture (generated on demand, not checked in)
- .gitignore  excludes generated *.sqlite from fixtures/zotero
2026-05-20 15:47:13 +08:00
Research Assistant
c708e00184 feat: add annotation import reconciliation
- paperforge/annotation/importer.py  stable upsert by id, version tracking,
  soft-delete of stale rows, cross-source isolation
- paperforge/annotation/service.py   mark_deleted, hard_delete, list
- tests/unit/annotation/test_importer.py  5 tests: import, noop, update,
  soft-delete, source isolation
2026-05-20 15:46:06 +08:00
Research Assistant
85918eba14 feat: add zotero annotation probe
- paperforge/annotation/probe.py  read-only Zotero SQLite query layer
  - open_readonly()              URI mode=ro connection
  - copy_db_to_temp()            safe copy before reading
  - fetch_annotations()          SQL JOIN across items/itemAnnotations/itemAttachments
  - _fetch_tags()                tag aggregation
  - normalize_annotation_row()   type mapping + position JSON parsing
- tests/unit/annotation/test_probe.py  fixture-driven tests with minimal Zotero DB
2026-05-20 15:45:11 +08:00
Research Assistant
0efd6c83f6 feat: add annotation schema
- paperforge/annotation/schema.py  DDL, indexes, FTS5, sync_queue, version lifecycle
- ANNOTATIONS_SCHEMA_VERSION = 1, independent from memory layer
- FTS triggers on insert/update/delete for selected_text + comment + tags_json
- Schema is never dropped during memory rebuild
2026-05-20 15:43:14 +08:00
Research Assistant
771fff0111 feat: add annotation db helpers
- paperforge/annotation/__init__.py  package marker
- paperforge/annotation/db.py        path resolution and connection helpers
  (get_annotations_db_path, get_annotations_connection)
- tests/unit/annotation/test_schema.py  DB path, WAL, read-only tests
2026-05-20 15:41:18 +08:00
Research Assistant
3729381fd5 feat: add hardcoded-path audit gate with pre-commit hook
- New tests/audit/test_hardcoded_paths.py detects config-driven path
  literals hardcoded in Python source files
- Pre-commit hook runs the audit automatically before every commit
- Fixed three existing violations:
  paperforge/commands/sync.py    -> use paperforge_paths()
  paperforge/commands/dashboard.py -> use paperforge_paths()
  paperforge/worker/discussion.py  -> use paths.get('index')
2026-05-20 15:39:21 +08:00
Research Assistant
3c270c6932 docs: add pdf annotation layer design spec and implementation plan 2026-05-20 15:33:13 +08:00
Research Assistant
63c6be3f78 feat(skill): add version field to SKILL.md frontmatter and bootstrap, with pre-flight version check 2026-05-19 15:54:04 +08:00
Research Assistant
7c4f5b4bb0 docs: update AGENTS.md with skill graph structure, intent routing, bump/release, and skill deploy 2026-05-19 15:47:53 +08:00
Research Assistant
946102bb9e bump: 1.5.8 -> 1.5.9 2026-05-19 15:44:52 +08:00
Research Assistant
cf4d929a24 fix(skill): add multi-intent collision rule to intent routing 2026-05-19 15:40:33 +08:00
Research Assistant
c21fc8db1e chore: remove temp test file 2026-05-19 15:28:43 +08:00
Research Assistant
8eb02ebdd4 feat(skill): add pre-flight checklist harness to SKILL.md and all molecules 2026-05-19 15:28:37 +08:00
Research Assistant
5ffcbde139 fix(skill): update stale workflow names for agent readability, remove commit convention debris and system write commands 2026-05-19 15:13:01 +08:00
Research Assistant
dfc80d0783 refactor(skill): remove legacy literature workflow entrypoints 2026-05-19 14:57:40 +08:00
Research Assistant
ee7e7306a4 test(skill): align downstream docs and setup with layered skill tree 2026-05-19 14:56:40 +08:00
Research Assistant
f02ec8b9aa refactor(skill): move chart-reading and method-card-template into atom layer 2026-05-19 14:55:06 +08:00
Research Assistant
9109fa3fa3 feat(skill): add capture-project-knowledge molecule and atoms 2026-05-19 14:54:05 +08:00
Research Assistant
6c458fb02a refactor(skill): migrate single-paper and deep-read molecules 2026-05-19 14:52:09 +08:00
Research Assistant
f533b6e6e3 refactor(skill): split discovery and evidence molecules 2026-05-19 14:51:07 +08:00
Research Assistant
7e03832291 feat(skill): add clarify-user-intent atom 2026-05-19 14:49:00 +08:00
Research Assistant
d9ab8fdbe7 refactor(skill): rewrite compound router for skill graph 2026-05-19 14:48:15 +08:00
Research Assistant
1fd4ae1f9f chore(skill): scaffold molecule and atom files 2026-05-19 14:46:53 +08:00
Research Assistant
819f51ed95 test(skill): add skill graph contract tests 2026-05-19 14:44:56 +08:00
Research Assistant
2912acbb5e refactor(skill): add atoms and molecules directories 2026-05-19 14:42:35 +08:00
Research Assistant
29a7e195c6 fix: add return type annotation to main() and indent=2 to early-exit json.dump calls 2026-05-19 14:41:06 +08:00
Research Assistant
948abb8280 refactor(bootstrap): avoid double read of dc_json, add explanatory comments
- Hoist plugin_data to function scope so capabilities section reuses
  the parsed dict instead of re-reading the file
- Add inline comment explaining semantic_enabled duplicates
  memory_layer.vector_search by design (runtime-health is authoritative)
- Add inline comment noting semantic_ready is a placeholder until a
  separate readiness probe is implemented
2026-05-19 14:39:42 +08:00
Research Assistant
261e92a788 feat(bootstrap): add capability probes to bootstrap output
Adds a capabilities block to the bootstrap JSON with runtime probes:
- rg: checks if ripgrep is available
- metadata_search: always True (vault config present)
- paper_context: always True
- semantic_enabled/semantic_ready: derived from plugin data.json

Test verifies the contract with an isolated tmp_path vault.
2026-05-19 14:36:05 +08:00
Research Assistant
34556ae6f2 docs: expand memory and embedding layer description in architecture 2026-05-19 02:07:53 +08:00
Research Assistant
eb987cf138 docs: add memory and embedding layer to architecture section 2026-05-19 01:59:05 +08:00
Research Assistant
8022b47f41 docs: restructure changelog - 1.5.7 as recovery, 1.5.8 as full release 2026-05-19 01:42:37 +08:00
Research Assistant
90fddfe967 chore: update versions.json for 1.5.6-1.5.8 2026-05-19 01:35:02 +08:00
Research Assistant
4b7ceefb5a chore: bump version to 1.5.8 2026-05-19 01:34:40 +08:00
Research Assistant
2c20138fd0 fix(plugin): finish orphan modal i18n for all remaining strings 2026-05-19 01:33:23 +08:00