Commit Graph

30 Commits

Author SHA1 Message Date
Jyong
b79b8a879b feat(knowledge-fs): record and count every knowledge space query
Workflow KnowledgeFS retrieval nodes ran through `retrieval-tests`, which
never wrote an AnswerTrace or an overview event, so their queries were
missing from the retrieval history and from the space overview; the history
also only ever showed each member their own traces.

- AnswerTrace gains a `source` (retrieval_test | workflow | service_api |
  agent | mcp; migration 0051_answer_trace_source) derived from the
  Capability v2 caller kind. The retrieval-tests route records one trace per
  run (stages, evidence bundle, profile metadata), returns its id as
  `answerTraceId`, and the workflow node's failed-retrieval capture attaches
  to that trace instead of creating a second record.
- The quality trace list exposes and filters by `source`; traces from other
  caller kinds are visible to any current reader of the space, and counts and
  scores fall back to the evidence embedded in the trace when no bundle row
  exists.
- Overview accounting: retrieval-tests and Research tasks now emit
  `query.requested`, and the Research job state machine emits
  `query.completed` / `query.failed` on terminal stages (wired for both the
  in-process gateway and the durable runtime), so query volume, answer rate
  and outcomes include every caller. Activity details keep `source` and
  `taskKind`.
- Console and service trace routes accept a `source` filter; the retrieval
  test page shows a source badge and an all / retrieval tests / workflow
  filter, with translations for every locale.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-04 05:48:17 -04:00
FFXN
327e12ad23 fix(knowledge-fs): add namespace source preview jobs and pages schema 2026-09-04 17:23:29 +08:00
FFXN
0eb5bb700a feat(knowledge-fs): fix CI. 2026-09-04 16:13:13 +08:00
FFXN
ad059f55d4 feat(knowledge-fs): add namespace preview for initial website sources
- create website preview jobs before a knowledge space exists
- persist crawled page content in KnowledgeFS object storage
- import selected pages using preview job and page IDs
- validate preview ownership, expiry, and configuration fingerprint
- clean up preview content after cancellation, expiry, or consumption
- add namespace preview routes, capabilities, migrations, and contracts
- keep online document and drive flows unchanged
2026-09-04 15:52:36 +08:00
Stephen Zhou
b8d39bec5f
fix(knowledge-fs): persist durable query outcomes 2026-09-04 11:43:04 +08:00
FFXN
644a9b96a6 fix(knowledge-fs): harden semantic chunking and deletion cleanup
- retry semantic chunking when the LLM returns an invalid schema
- add corrective schema instructions to retry prompts
- remove capability grant foreign keys from durable deletion records
- preserve capability grant IDs as immutable audit provenance
- add migration and regression coverage
2026-09-03 16:59:57 +08:00
Jyong
afa771dcac feat(knowledge-fs): keep query images with retrieval test history
Query images attached to a retrieval test vanished as soon as the run's
history record was selected, and were never shown again after a reload,
because nothing persisted them: the gateway dropped `queryImages` when writing
`answer_traces`, the console trace/research responses had no image field, and
the composer cleared its images on every record selection.

- knowledge-fs: add a nullable JSON `query_images` column to `answer_traces`
  (migration 0049 for postgres and tidb), persist and read it in the answer
  trace repository, and expose `queryImages` on quality trace list items.
- api: enrich trace and research task responses with
  `KnowledgeFSQueryImageResponse`, resolving file names and short-lived signed
  preview URLs only for files the acting account still owns; regenerate the
  console and service contracts.
- web: keep composer images scoped to the selected record like the query
  text, remember images per run in this session, fall back to persisted
  previews (with a labelled placeholder when the file is gone), show them in
  the result panel and as a count on history records, and carry them into
  retests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-02 09:17:36 -04:00
Jyong
7876f6e670 fix(knowledge-fs): scope child deletion conflicts 2026-09-01 05:18:38 -04:00
Jyong
4f3a2952d6 perf(knowledge-fs): harden cross-format document ingestion 2026-08-31 07:48:35 -04:00
FFXN
c1b5d09196 fix(knowledge-fs): remove provider mode from sync policies and update related constraints 2026-08-28 14:43:22 +08:00
FFXN
4db73de307 fix(knowledge-fs): remove provider mode from sync policies and update related constraints 2026-08-28 14:24:20 +08:00
FFXN
ae495d3f97 fix(knowledge-fs): remove provider mode from sync policies and update related constraints 2026-08-28 14:06:49 +08:00
Jyong
66e3ae951f feat(knowledge): add golden question evaluations 2026-08-19 05:54:05 -04:00
Jyong
627c80b09a feat(knowledge-fs): optimize document ingestion pipeline 2026-08-17 02:40:21 -04:00
Jyong
ffd2a7094d restore semantic document compilation pipeline 2026-08-13 13:10:39 -04:00
Jyong
d064bf036c feat: capture workflow retrieval misses 2026-08-12 13:31:02 -04:00
Stephen Zhou
668b122632
style(knowledge-fs): format availability changes 2026-08-11 11:26:36 +08:00
Stephen Zhou
dabd74ac44
fix(knowledge-fs): align availability schema migration 2026-08-11 11:04:00 +08:00
FFXN
26544610ff feat(knowledge_fs): add document availability management with bulk update support 2026-08-11 10:01:33 +08:00
Jyong
1ac8c9e434 feat(knowledge-fs): add durable metadata management 2026-08-10 02:55:09 -04:00
Jyong
1d990de7e7 Refactor application components and update related functionality 2026-08-09 12:19:56 -04:00
Stephen Zhou
b88a8933ed
fix(knowledge-fs): allow zero-revision logical document deletion 2026-08-06 18:49:11 +08:00
Jyong
13ddabf832 Update application functionality and related components 2026-08-06 06:10:09 -04:00
Jyong
923507baeb Stream research task answer deltas through durable progress events 2026-08-02 12:45:51 -04:00
Jyong
e052b2e27f Support emoji icons and map Knowledge FS bad requests 2026-07-30 01:34:56 -04:00
Jyong
5869016c42 Restore Research answer synthesis routing 2026-07-29 13:32:01 -04:00
Stephen Zhou
ab0b2282ab
fix(dataset): complete New RAG connected source flows 2026-07-28 12:58:18 +08:00
Jyong
90b6a7f012 Expand workflow features and update related components 2026-07-23 22:53:41 -04:00
Jyong
29858d0db0 Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
Jyong
4ee43b8afc chore: migrate knowledge-fs source tree
Import the committed KnowledgeFS snapshot dc4072ee302317145612087ce7440851dc329fd0 under knowledge-fs/ without its Git history, local IDE settings, or build artifacts.
2026-07-20 04:54:20 -04:00