9 Commits

Author SHA1 Message Date
zszz3
2026ee4f18 fix: keep per-session data out of capability system blocks 2026-11-29 16:32:47 +08:00
Bingxi Zhao (Frank)
bf024d85d1 fix(ci): refresh preview route and locale contracts 2026-10-27 01:52:06 +08:00
evan188199-tech
271e4f7865 feat(knowledge): add KB frontier discovery tool (#1292) (#1293)
* feat(knowledge): add KB frontier discovery tool

* review: let agents.yaml own the query-derivation budget

`reason()` falls back to agents.yaml when the caller says nothing, which is
where every LLM budget in this codebase lives. 512 tokens is also the shape
that starves a reasoning model before it emits a single query — it spends the
allowance thinking and returns nothing, which is how #1318 shipped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: XZH <cto@xzh.ai>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 01:43:14 +08:00
Bingxi Zhao (Frank)
04040a2c06 release: v1.6.5
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.

Release notes: assets/releases/ver1-6-5.md
2026-09-06 13:46:29 +08:00
Bingxi Zhao (Frank)
8450a928c4 fix(obsidian): make vault failures legible instead of opaque
Builds on #922, which made read-only scans tolerate undecodable bytes and
kept the read-modify-write paths strict. Strict was the right call, but the
refusal was invisible: append_note / set_property let a raw
UnicodeDecodeError escape, _ObsidianTool.execute catches only VaultError,
so the model was told "an unknown error occurred" — the exact failure mode
#914 reported spending rounds guessing at.

* The two write paths raise VaultError naming the note, the byte offset and
  the fix. The vault is still never rewritten with U+FFFD in place of the
  user's bytes.
* Both decoders now live in one place each (_read_text / _read_text_exact)
  rather than four repeated read_text calls, so which of the two a new
  caller wants is a decision the module states once.
* execute() reports any other unexpected exception to the model by type and
  message, and logs the traceback for the operator.
* Frontmatter dates serialise through isoformat() rather than str(), so a
  YAML timestamp reaches the model as 2026-08-11T09:30:00 instead of
  2026-08-11 09:30:00, which is not a date it can hand back.
2026-08-20 00:56:34 +08:00
0xTidalBore
5afb2547da fix(obsidian): tolerate undecodable bytes and date frontmatter (#922)
Fixes #914, Fixes #915. Read-only vault scans degrade one note instead of aborting the whole search; json.dumps(default=str) keeps unquoted YAML dates serialisable. Read-modify-write paths deliberately stay strict so replacement chars never land back in the vault.
2026-08-19 23:36:14 +08:00
Bingxi Zhao (Frank)
a43f9fdf2a feat(knowledge): answer "how many files" from an inventory, not retrieval
Asked how many files a knowledge base holds, or whether some document is in
it, the model had only `rag` — and retrieval cannot answer either question:
the passages it returns say nothing about the size of the collection they
came from, so the model guessed from whichever chunks the query happened to
match. PageIndex KBs already answered correctly (their doc list is injected
into the system prompt) and Obsidian vaults have `list_notes`, which makes
this a wiring gap in the default engines rather than a limit of retrieval.

`deeptutor/knowledge/manifest.py` now owns a KB's document inventory as facts
read off disk, with two consumers that cannot disagree:

- the chat system prompt carries a per-KB inventory (count plus a truncated
  name list), so a count costs no tool round-trip — the failure mode where a
  weaker model never emits the call at all (cf. #532). Built once per turn on
  a worker thread, keeping the prompt byte-stable for the whole turn;
- a new `kb_files` tool enumerates on demand with glob / substring filtering,
  mounted under `rag`'s gate (a KB is attached) and deniable per partner the
  same way.

The inventory reports the document set and the KB's index status, and stops
there. It deliberately does not report how many documents reached the index:
every per-file record available is unreliable — LlamaIndex's docstore.json
counts nodes (chunk-level, so it drifts with the chunking config, and costs a
multi-MB parse to read), metadata.json's file_hashes is only written on the
incremental-add path, and last_indexed_count is the last batch's size rather
than a total. A confidently wrong count is worse than none. The prompt block
also states the rule that retrieved passages must never be used to infer how
many documents a KB holds or whether one exists in it.

Connected KBs degrade honestly instead of reporting zero: linked folders and
Obsidian vaults are enumerated in place, while a remote LightRAG server and a
connected subagent are declared unlistable. Hidden OS/editor entries
(.DS_Store, .obsidian/) stop counting as documents, and get_info's
raw_documents reads the same definition, so the KB page and the chat answer
can no longer disagree about the same KB.

Deep Research is untouched: its block loop narrows tools to the four that
produce block-level evidence, and a file list is not evidence for a subtopic.
2026-07-26 22:02:54 +08:00
Bingxi Zhao (Frank)
27a0947486 fix(chat): let rag coexist with an exclusive knowledge capability (#650)
Selecting an Obsidian vault (an exclusive KnowledgeCapability) silently
dropped every co-selected LlamaIndex KB: rag was unmounted, unseeded and
unmentioned. Capabilities now declare owned_kbs (the vault / agent refs
they consume via their own tools); the pipeline keeps rag mounted,
seeded and noted for the remaining coexisting KBs, while a pure-vault
turn still mounts nothing but the owned tools + ask_user.
2026-07-24 00:42:28 +08:00
Bingxi Zhao (Frank)
c9d387e2b6 super super great great update 2026-06-17 00:56:27 +08:00