diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41fe022..50d2625 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,10 @@ jobs: working-directory: bin/kbsearch run: go test ./rank -count=1 + - name: Go tests (chats nested module) + working-directory: bin/chats + run: go test ./... -count=1 + - name: facts/audit self (lexicon consistency, no network) run: | ./bin/facts/audit self 2>/dev/null || echo "audit: not yet implemented; gate skipped" diff --git a/PLAN.md b/PLAN.md index f00fe68..9579e1c 100644 --- a/PLAN.md +++ b/PLAN.md @@ -118,10 +118,11 @@ Common props on every node/edge: `root`, `confidence`, `evidence[]`, `how`, 1. go vet + go test ./... (Go tools; root module) 2. `go test ./rank` in `bin/kbsearch` (cgo-free ranking + flag parser; nested module still needs ladybug for the rest) -3. python -m unittest discover (Py tools) -4. bin/facts/audit self (lexicon internal consistency) -5. bin/kb/eval (recall@5 ≥ 0.95, gates index regressions) -6. md-docs build/lint if docs tooling arrives. +3. `go test ./...` in `bin/chats` (Telegram + LinkedIn parsers; nested module) +4. python -m unittest discover (Py tools) +5. bin/facts/audit self (lexicon internal consistency) +6. bin/kb/eval (recall@5 ≥ 0.95, gates index regressions) +7. md-docs build/lint if docs tooling arrives. Feedback loop: every commit → PR → CI → green/gate → merge. Same discipline as `db/tech-poc`: contract first where there is an OpenAPI/message shape. diff --git a/bin/chats/linkedin.go b/bin/chats/linkedin.go index 4576ff4..78f9377 100644 --- a/bin/chats/linkedin.go +++ b/bin/chats/linkedin.go @@ -8,6 +8,7 @@ import ( "os" "os/exec" "path/filepath" + "regexp" "strings" "time" ) @@ -25,21 +26,248 @@ type lnInboxItem struct { Unread bool `json:"unread"` } -type lnInboxEnvelope struct { - Results []lnInboxItem `json:"results"` - HasMore bool `json:"hasMore"` +// mcp-server-linkedin v4.22 returns get_inbox / get_conversation as +// {url, sections:{inbox|conversation: textblob}, references:{...}}. +// The conversation list lives in references (kind=conversation); messages live +// in the sections text blob, delimited by " sent the following message +// at