feat: ingest Kagi Assistant threads
build / test (push) Successful in 3m21s
build / image (push) Successful in 35s

Add a Kagi source that indexes Assistant conversations with the subscriber
session token, one entry per thread.

- Read the token from KAGI_SESSION_TOKEN, KAGI_SESSION_TOKEN_FILE, or the
  kagi-cli config ([auth] session_token); accept full session-link URLs.
- List conversations through /api/conversations, load each thread via
  /api/v2/conversations/{id}/init, and walk older turn pages through the
  branch turns endpoint.
- Render one markdown document per thread (stable fingerprint by conversation
  UUID, content hash for versioning), keeping the newest turns when a thread
  exceeds the body budget.
- Skip re-fetching threads whose updated_at has not moved during this process.
- Wire the 30-minute watcher ticker + sync status, the `knox kagi` command,
  the full ingest sweep, MCP scope filtering, thread anchoring, and web links.
This commit is contained in:
2026-11-27 13:43:10 -08:00
parent 65fdcbc789
commit d27c682c19
10 changed files with 977 additions and 10 deletions
+1
View File
@@ -74,6 +74,7 @@ and maintains a searchable index. Use 'knox watch' for daemon mode.`,
root.AddCommand(knoxcmd.NewTopicsCmd(kdb))
root.AddCommand(knoxcmd.NewGiteaCmd(kdb))
root.AddCommand(knoxcmd.NewKarakeepCmd(kdb))
root.AddCommand(knoxcmd.NewKagiCmd(kdb))
root.AddCommand(knoxcmd.NewBookOrbitCmd(kdb))
root.AddCommand(knoxcmd.NewBrevierCmd(kdb))
root.AddCommand(knoxcmd.NewSkillsHealthCmd())