Repository navigation
Closed
Description
Summary
Add a first-class @sentry/junior-notion plugin with a shared internal Notion integration for read-only page search and summarization.
Why
For Junior's current Notion use case, a single workspace-scoped internal integration is simpler than per-user OAuth:
- one shared
NOTION_TOKEN - no
/notion authflow - explicit access boundary through Notion page sharing
- better fit for a single-workspace Slack assistant
We are keeping the recent oauth-bearer generalization work in core because other providers will still need provider-specific token exchange behavior, but Notion v1 itself should use the simpler internal integration model.
Scope
1) New package: @sentry/junior-notion
Add:
packages/junior-notion/package.jsonpackages/junior-notion/plugin.yamlpackages/junior-notion/README.mdpackages/junior-notion/skills/notion/SKILL.md
Initial behavior:
- capability:
notion.api.read - shared internal integration token via
NOTION_TOKEN - no per-user OAuth flow
/notion <query>:- search Notion pages
- fetch markdown for the top page result
- return a concise summary with the page URL
Notion defaults for v1:
api-domains: [api.notion.com]credentials.api-headersincludesNotion-Version: 2025-09-03- docs explain
Read contentand the requiredAdd connectionssharing step
2) Bearer broker behavior
- Keep generic
oauth-bearersupport in core for future OAuth providers - When a bearer plugin omits
oauth, allow it to use the shared env token even when requester context exists - Preserve existing per-user OAuth behavior for providers that do declare
oauth
3) Docs and release surfaces
- Add a Notion plugin docs page
- Update plugin overview, quickstart examples, and package lists
- Update root README package table/examples
- Update release metadata and CI packaging for
@sentry/junior-notion
Test plan
Run targeted tests:
pnpm --filter @sentry/junior exec vitest run tests/plugin-registry-packages.test.ts tests/oauth-callback.test.ts tests/sentry-broker.test.ts tests/jr-rpc-command.test.ts tests/state-adapter-token-store.test.tspnpm --filter @sentry/junior typecheckpnpm docs:check
Acceptance criteria
/notion <query>works with a configuredNOTION_TOKEN- Notion requests include the required
Notion-Versionheader - Docs explain internal integration setup,
Read content, andAdd connections - Existing Sentry and GitHub behavior remains unchanged
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat(plugins): Add Notion OAuth plugin support
docs(plugins): Expand Notion setup guide
ref(plugins): Switch Notion to an internal integration
ref(plugins): Simplify Notion shared-token wiring
ref(oauth): Extract shared authorization flow
feat(plugins): Add Notion OAuth plugin support (#82)