feat: Linear and Notion live-sync recipes + fix embedding config key lookup#192
Open
mishanefedov wants to merge 1 commit intogarrytan:masterfrom
Open
feat: Linear and Notion live-sync recipes + fix embedding config key lookup#192mishanefedov wants to merge 1 commit intogarrytan:masterfrom
mishanefedov wants to merge 1 commit intogarrytan:masterfrom
Conversation
Two new integration recipes following the existing deterministic-collector pattern (code for data, LLMs for judgment): - recipes/linear-to-brain.md — GraphQL-based Linear sync (issues, projects, cycles) with incremental updates, priority mapping, and assignee enrichment. Single API key credential, no OAuth dance. - recipes/notion-to-brain.md — Notion API live sync (pages + database rows) as a complement to the existing one-shot migrate skill. Handles block rendering, incremental sync via last_edited_time, and the sharing-required constraint. - skills/RESOLVER.md — add routing entries for both recipes, disambiguating the new live-sync paths from the existing one-shot Notion migration skill. - src/core/embedding.ts — fix: read OPENAI_API_KEY from config.json when env var is not set. Prevents embed failures when the key is stored in ~/.gbrain/config.json (the recommended local install path) but not exported as an environment variable. All 1191 unit tests pass. 0 failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Two new integration recipes following the existing deterministic-collector pattern (code for data, LLMs for judgment), plus a bug fix.
recipes/linear-to-brain.md
Live sync of Linear issues, projects, and cycles into brain pages for offline semantic search. Complements MCP real-time access —
gbrain queryworks without an active session or network connection.pageInfo.hasNextPage+endCursor)updatedAtfilter (only changed issues re-fetched)brain/linear/issues/{YYYY-MM}/{id}.mdLINEAR_API_KEY(read-only, no OAuth)recipes/notion-to-brain.md
Live Notion API sync as a complement to the existing one-shot
migrateskill. Handles the ongoing case: new pages appear in the brain automatically on a schedule.POST /v1/search) — no hardcoded page IDslast_edited_timeskills/RESOLVER.md
Added routing entries for both recipes, disambiguating the new live-sync paths from the existing one-shot Notion migration skill.
src/core/embedding.ts (bug fix)
new OpenAI()reads only fromOPENAI_API_KEYenv var. If the key is stored in~/.gbrain/config.json(theopenai_api_keyfield thatloadConfig()already defines), the embedding step silently fails. Fix: fall back toloadConfig()?.openai_api_keywhen the env var is absent. Env var still takes precedence.Tests
E2E tests skipped (no DATABASE_URL) — new recipes don't touch the engine layer, covered by the integration frontmatter tests.
Fits the welcome PRs list
Both recipes fall squarely in this category.