Commit graph

57 commits

Author SHA1 Message Date
LLLin000
c534e481c7 fix: close 4 review gaps — registry, body/object-unit schemas, compat vector arm
Changes:
- Add paper-lookup, content-discovery, scoped-fetch to command registry
- Add unit_kind column to body_units schema (DEFAULT 'body')
- Replace object_units schema: object_role -> object_kind, object_label,
  caption_text, nearby_body_text; drop unit_text, drop object_role
- Bump schema version to 3 with deterministic drop/recreate migration for
  derived tables (body_units, body_units_fts, object_units)
- Update _upsert_body_units / _upsert_object_units for new columns
- Update build_object_units to emit object_kind, object_label, caption_text,
  nearby_body_text fields
- Add vector secondary arm to _run_compat_content_discovery: runs paper_fts
  primary, conditionally adds vector_retrieve secondary when vector is healthy
- Add/fix tests for schema columns, builder output, registry, and compat
  content-discovery vector-secondary path
2026-07-05 15:13:43 +08:00
LLLin000
2ab3aa4219 fix: deduplicate object unit_id and wire units persistence in builder
Fix 1 (units.py): object unit_id now includes the entry's block_id
instead of the node's block_span, fixing PRIMARY KEY collisions when
a section has multiple objects (e.g. two figure_captions).

Fix 2 (builder.py): retrieval units are now persisted during
build_from_index(). Scans each paper's OCR output directory for
structure-tree.json, builds body+object units and manifest, then
upserts into the DB tables and meta. Also clears body_units and
object_units at rebuild start alongside the other tables.
2026-07-05 14:28:43 +08:00
LLLin000
9d332980f0 feat: add body units, manifest, and body-unit FTS 2026-07-05 14:21:27 +08:00
LLLin000
9d5a008df1 feat: make paper lookup decomposed and coverage-scored 2026-07-05 14:14:03 +08:00
LLLin000
f8d928d6ed docs: design Layer 4 retrieval substrate 2026-07-05 02:05:27 +08:00
Research Assistant
03ad9ce64f feat: stabilize paperforge query planning 2026-05-27 21:20:15 +08:00
Research Assistant
f68f45f3a2 fix: improve search accuracy with multi-token LIKE and guided agent search queries
- _like_query: split multi-token queries into per-field AND matching
- lookup_paper: same multi-token AND for title lookup
- read-known-paper.md: restructure Step 1 by known-info type (zotero_key,
  DOI, author+year, title keyword, fuzzy)
- discover-papers.md Arm 2: note on author+year search pattern
- retrieval-routing.md Arm 2: same author+year search guidance
2026-05-25 16:42:11 +08:00
Research Assistant
19c28a8b91 chore: commit session work before hotfix switch 2026-05-18 22:47:30 +08:00
Research Assistant
885f20879e feat(memory): show (fast) in sync output when hash matches 2026-05-18 22:29:53 +08:00
Research Assistant
baa6c758f5 fix(vector): get_collection no longer silently deletes collection on error; memory builder skips full rebuild when index hash matches 2026-05-18 22:18:23 +08:00
Research Assistant
add220d93c feat(discussion): remove JSON output and markdown escaping 2026-05-18 21:09:54 +08:00
Research Assistant
a599cd930b Merge branch 'paperforge-stabilization'
# Conflicts:
#	paperforge/memory/vector_db.py
2026-05-18 18:47:07 +08:00
Research Assistant
98417b5245 refactor: update worker/asset_index.py and memory/runtime_health.py imports to embedding package 2026-05-18 17:21:43 +08:00
Research Assistant
f90327bfa3 refactor(memory): convert vector_db.py to deprecated forwarding shim 2026-05-18 17:18:53 +08:00
Research Assistant
2b552be9e6 feat: runtime contract hardening + skill/command truth alignment (Package A+B)
Atomic snapshots, canonical index mutation serialization, sync post-clean truth,
plugin path config-awareness, embed stop signal honesty, full snapshot bootstrap,
pf_ prefix unification, workflow command/lifecycle/path corrections,
mechanical/cognitive route separation with unknown-command guard.
2026-05-16 22:38:43 +08:00
Research Assistant
6bfb247549 feat: Python writes canonical runtime snapshot files for JS reads 2026-05-15 23:06:13 +08:00
Research Assistant
7b567af7c8 fix: add missing chunker module; restore deleted vector_db.py 2026-05-15 21:27:22 +08:00
Research Assistant
67199beae5 fix: reorder table drops to respect FK constraints; add rebuild logging 2026-05-15 17:42:10 +08:00
Research Assistant
fe33470303 feat: add layered runtime health computation 2026-05-15 01:15:39 +08:00
Research Assistant
64ee50a080 feat: add persistent vector build state helpers 2026-05-15 01:13:12 +08:00
Research Assistant
560be86b83 fix: refresh_paper FTS delete-before-upsert, import error checking 2026-05-14 22:47:48 +08:00
Research Assistant
e68d931134 fix: import_reading_log to JSONL, correction JSONL-first, events.py wrapper 2026-05-14 22:37:55 +08:00
Research Assistant
59ef9d9344 fix: dedupe correction import on rebuild, clean FTS row on refresh 2026-05-14 22:35:35 +08:00
Research Assistant
19d17797d1 feat: safe FTS search with token-quote and LIKE fallback 2026-05-14 21:50:29 +08:00
Research Assistant
0d3ff8dcdd feat: permanent correction-log.jsonl, fix original_id field alignment 2026-05-14 21:48:21 +08:00
Research Assistant
9dd1cbe893 refactor: unify reading-log reads to JSONL, deprecate paper_events writes 2026-05-14 21:44:05 +08:00
Research Assistant
750e8ade17 feat: import JSONL into DB on memory build 2026-05-14 17:48:23 +08:00
Research Assistant
6ccce87272 feat: upgrade reading-log to JSONL with context/tags/project fields and auto-render 2026-05-14 17:31:32 +08:00
Research Assistant
60c524b012 fix: align JSONL field names with spec (type/title, add verified) 2026-05-14 17:20:29 +08:00
Research Assistant
47904da95e feat: add permanent JSONL storage layer for reading-log and project-log 2026-05-14 17:08:10 +08:00
Research Assistant
c1001bcc78 feat: add reading_log and project_log tables to memory schema 2026-05-14 16:51:14 +08:00
Research Assistant
bfc4e9ffab fix: get_embed_status reads API model; defer display() after async status refresh 2026-05-14 00:18:03 +08:00
Research Assistant
7ad1d2405d debug: log API base_url to check env var passthrough 2026-05-13 22:25:20 +08:00
Research Assistant
110889da73 fix: pass API key/base/model as env vars to avoid saveSettings race 2026-05-13 22:22:37 +08:00
Research Assistant
58bd70ace7 feat: API model as text field (custom any name) + fix Python duplicate 2026-05-13 21:55:09 +08:00
Research Assistant
4113af1c99 feat: urllib-based model download bypasses HF hub + HF_TOKEN field 2026-05-13 21:33:09 +08:00
Research Assistant
d8435be4bd feat: huggingface_hub.set_endpoint() mirror + API base_url support 2026-05-13 21:03:24 +08:00
Research Assistant
571ac32ba0 fix: Python no longer overrides HF_ENDPOINT from stale settings 2026-05-13 19:21:21 +08:00
Research Assistant
ea8073c60f feat: HF mirror endpoint support for model downloads behind firewalls 2026-05-13 19:15:43 +08:00
Research Assistant
3d5a4a4e15 fix: lighter terminal output box + cache embedding model across papers 2026-05-13 19:12:52 +08:00
Research Assistant
c8cd9f5578 perf: executemany batching in builder + file read consolidation 2026-05-13 17:17:08 +08:00
Research Assistant
378ba6890a refactor: extract build_paper_row to shared _columns module 2026-05-13 17:07:14 +08:00
Research Assistant
58e2c7ae52 perf: fix FTS double-insert, drop trigger before bulk insert 2026-05-13 17:01:28 +08:00
Research Assistant
fd7f7f3278 perf: refresh_paper accepts entry dict, skip full index read 2026-05-13 16:58:39 +08:00
Research Assistant
8d3e4432c3 chore: add pre-commit JS syntax hook + stage missing vector CLI files 2026-05-12 23:34:24 +08:00
Research Assistant
b12c90bca9 feat(memory): add paper_events table + reading-log write/export command 2026-05-12 20:53:33 +08:00
Research Assistant
1ae7e074d8 feat(memory): dashboard reads from SQLite + incremental refresh_paper() 2026-05-12 20:08:46 +08:00
Research Assistant
b7530d5dee feat(memory): add agent context query module 2026-05-12 19:55:58 +08:00
Research Assistant
8182da1e87 fix(memory): match FTS column names to papers table (authors_json, collections_json) 2026-05-12 19:01:41 +08:00
Research Assistant
93ca222aaa feat(memory): add FTS5 full-text search with paperforge search command 2026-05-12 18:58:25 +08:00