Skip to content

Commit 3c87196

Browse files
Merge branch 'main' into brendan-kellam/multi-owner-support
2 parents 4319797 + 5dea84f commit 3c87196

File tree

104 files changed

+5273
-1217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+5273
-1217
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: "💡 Feature Request"
33
about: Suggest an idea for this project
44
title: "[FR] "
5-
labels: enhancement
5+
labels: Feature
66
assignees: ''
77

88
---

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [4.15.3] - 2026-03-10
11+
12+
### Fixed
13+
- [EE] Handle duplicate `resource` query parameters in the OAuth authorization endpoint. [#987](https://github.com/sourcebot-dev/sourcebot/pull/987)
14+
15+
## [4.15.2] - 2026-03-06
16+
17+
### Fixed
18+
- [EE] Avoid advertising OAuth support on MCP endpoints if that entitlement is not actually configured. [#985](https://github.com/sourcebot-dev/sourcebot/pull/985)
19+
20+
## [4.15.1] - 2026-03-06
21+
22+
### Fixed
23+
- Fixed issue where users would not be redirected to the homepage when clicking "continue with guest". [#984](https://github.com/sourcebot-dev/sourcebot/pull/984)
24+
25+
### Changed
26+
- Increased pagination limit to 1000 for bitbucket data center requests. [#981](https://github.com/sourcebot-dev/sourcebot/pull/981)
27+
28+
## [4.15.0] - 2026-03-05
29+
30+
### Added
31+
- Added MCP and API key usage tracking to analytics dashboard and added audit retention system [#950](https://github.com/sourcebot-dev/sourcebot/pull/950)
32+
33+
## [4.14.0] - 2026-03-05
34+
35+
### Added
36+
- Added support a MCP streamable http transport hosted at `/api/mcp`. [#976](https://github.com/sourcebot-dev/sourcebot/pull/976)
37+
- [EE] Added support for Oauth 2.1 to the remote MCP server hosted at `/api/mcp`. [#977](https://github.com/sourcebot-dev/sourcebot/pull/977)
38+
1039
## [4.13.2] - 2026-03-02
1140

1241
### Changed

CLAUDE.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export const GET = apiHandler(async (request: NextRequest) => {
184184

185185
## Next.js Router Navigation
186186

187-
Do NOT call `router.refresh()` immediately after `router.push()`. In Next.js 16, the prefetch cache and navigation system was completely rewritten, and calling `router.refresh()` right after `router.push()` creates a race condition — the refresh invalidates the cache and can interrupt the in-flight navigation, leaving the page stuck or not loading.
187+
Do NOT call `router.refresh()` immediately after `router.push()`. In Next.js 16, the prefetch cache and navigation system was completely rewritten, and calling `router.refresh()` right after `router.push()` creates a race condition. The refresh invalidates the cache and can interrupt the in-flight navigation, leaving the page stuck or not loading.
188188

189189
```ts
190190
// Bad - router.refresh() races with router.push() in Next.js 16
@@ -197,6 +197,18 @@ router.push(url); // ✅
197197

198198
If you need to refresh server component data after a mutation, use the server-side `refresh()` from `next/cache` in a Server Action instead of `router.refresh()` on the client.
199199

200+
## Documentation Writing Style
201+
202+
When writing or editing `.mdx` files in `docs/`:
203+
204+
- Do NOT use em dashes (``). Use periods to break sentences, commas, or parentheses instead.
205+
- Write in second person ("you") and present tense.
206+
- Keep sentences short and direct. Lead with what the user needs to know.
207+
- Use bold for UI elements and key terms (e.g., **Settings → API Keys**).
208+
- Use inline code for technical values, flags, and identifiers (e.g., `REPO_READ`).
209+
- Prefer short paragraphs (1-3 sentences). Use bullet lists to break up dense information.
210+
- Use tables for parameter documentation.
211+
200212
## Docs Images
201213

202214
Images added to `.mdx` files in `docs/` should be wrapped in a `<Frame>` component:
@@ -237,3 +249,4 @@ After the PR is created:
237249
- Update CHANGELOG.md with an entry under `[Unreleased]` linking to the new PR. New entries should be placed at the bottom of their section.
238250
- If the change touches `packages/mcp`, update `packages/mcp/CHANGELOG.md` instead
239251
- Do NOT add a CHANGELOG entry for documentation-only changes (e.g., changes only in `docs/`)
252+
- Enterprise-only features (gated by an entitlement) should be prefixed with `[EE]` in the CHANGELOG entry (e.g., `- [EE] Added support for ...`)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<a href="https://docs.sourcebot.dev/self-hosting/overview">
1212
<strong>Self Host</strong>
1313
</a> ·
14-
<a href="https://demo.sourcebot.dev">
14+
<a href="https://app.sourcebot.dev">
1515
<strong>Public Demo</strong>
1616
</a>
1717
</h3>
@@ -41,7 +41,7 @@ Sourcebot is a self-hosted tool that helps you understand your codebase.
4141
- **Ask Sourcebot:** Ask questions about your codebase and have Sourcebot provide detailed answers grounded with inline citations.
4242
- **Code search:** Search and navigate across all your repos and branches, no matter where they’re hosted.
4343

44-
Try it out in our [public demo](https://demo.sourcebot.dev)!
44+
Try it out in our [public demo](https://app.sourcebot.dev)!
4545

4646
https://github.com/user-attachments/assets/ed66a622-e38f-4947-a531-86df1e1e0218
4747

@@ -108,7 +108,7 @@ docker compose up
108108
To configure Sourcebot (index your own repos, connect your LLMs, etc), check out our [docs](https://docs.sourcebot.dev/docs/configuration/config-file).
109109

110110
> [!NOTE]
111-
> Sourcebot collects <a href="https://demo.sourcebot.dev/~/search?query=captureEvent%5C(%20repo%3Asourcebot">anonymous usage data</a> by default to help us improve the product. No sensitive data is collected, but if you'd like to disable this you can do so by setting the `SOURCEBOT_TELEMETRY_DISABLED` environment
111+
> Sourcebot collects <a href="https://app.sourcebot.dev/~/search?query=captureEvent%5C(%20repo%3Asourcebot">anonymous usage data</a> by default to help us improve the product. No sensitive data is collected, but if you'd like to disable this you can do so by setting the `SOURCEBOT_TELEMETRY_DISABLED` environment
112112
> variable to `true`. Please refer to our [telemetry docs](https://docs.sourcebot.dev/docs/overview#telemetry) for more information.
113113
114114
# Build from source

docs/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"docs/features/ask/add-model-providers"
5353
]
5454
},
55+
"docs/features/mcp-server",
5556
"docs/features/code-navigation",
5657
"docs/features/analytics",
57-
"docs/features/mcp-server",
5858
"docs/features/permission-syncing",
5959
{
6060
"group": "Agents",

docs/docs/configuration/audit-logs.mdx

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebarTitle: Audit logs
55

66
import LicenseKeyRequired from '/snippets/license-key-required.mdx'
77

8-
<LicenseKeyRequired />
8+
<LicenseKeyRequired feature="Audit Logs" />
99

1010
Audit logs are a collection of notable events performed by users within a Sourcebot deployment. Each audit log records information on the action taken, the user who performed the
1111
action, and when the action took place.
@@ -15,6 +15,9 @@ This feature gives security and compliance teams the necessary information to en
1515
## Enabling/Disabling Audit Logs
1616
Audit logs are enabled by default and can be controlled with the `SOURCEBOT_EE_AUDIT_LOGGING_ENABLED` [environment variable](/docs/configuration/environment-variables).
1717

18+
## Retention Policy
19+
By default, audit logs older than 180 days are automatically pruned daily. You can configure the retention period using the `SOURCEBOT_EE_AUDIT_RETENTION_DAYS` [environment variable](/docs/configuration/environment-variables). Set it to `0` to disable automatic pruning and retain logs indefinitely.
20+
1821
## Fetching Audit Logs
1922
Audit logs are stored in the [postgres database](/docs/overview#architecture) connected to Sourcebot. To fetch all of the audit logs, you can use the following API:
2023

@@ -110,26 +113,35 @@ curl --request GET '$SOURCEBOT_URL/api/ee/audit' \
110113

111114
| Action | Actor Type | Target Type |
112115
| :------- | :------ | :------|
113-
| `api_key.creation_failed` | `user` | `org` |
114116
| `api_key.created` | `user` | `api_key` |
115-
| `api_key.deletion_failed` | `user` | `org` |
117+
| `api_key.creation_failed` | `user` | `org` |
116118
| `api_key.deleted` | `user` | `api_key` |
119+
| `api_key.deletion_failed` | `user` | `org` |
120+
| `audit.fetch` | `user` | `org` |
121+
| `chat.deleted` | `user` | `chat` |
122+
| `chat.shared_with_users` | `user` | `chat` |
123+
| `chat.unshared_with_user` | `user` | `chat` |
124+
| `chat.visibility_updated` | `user` | `chat` |
125+
| `org.ownership_transfer_failed` | `user` | `org` |
126+
| `org.ownership_transferred` | `user` | `org` |
127+
| `user.created_ask_chat` | `user` | `org` |
117128
| `user.creation_failed` | `user` | `user` |
118-
| `user.owner_created` | `user` | `org` |
119-
| `user.performed_code_search` | `user` | `org` |
120-
| `user.performed_find_references` | `user` | `org` |
121-
| `user.performed_goto_definition` | `user` | `org` |
122-
| `user.created_ask_chat` | `user` | `org` |
123-
| `user.jit_provisioning_failed` | `user` | `org` |
124-
| `user.jit_provisioned` | `user` | `org` |
125-
| `user.join_request_creation_failed` | `user` | `org` |
126-
| `user.join_requested` | `user` | `org` |
127-
| `user.join_request_approve_failed` | `user` | `account_join_request` |
128-
| `user.join_request_approved` | `user` | `account_join_request` |
129-
| `user.invite_failed` | `user` | `org` |
130-
| `user.invites_created` | `user` | `org` |
129+
| `user.delete` | `user` | `user` |
130+
| `user.fetched_file_source` | `user` | `org` |
131+
| `user.fetched_file_tree` | `user` | `org` |
131132
| `user.invite_accept_failed` | `user` | `invite` |
132133
| `user.invite_accepted` | `user` | `invite` |
134+
| `user.invite_failed` | `user` | `org` |
135+
| `user.invites_created` | `user` | `org` |
136+
| `user.join_request_approve_failed` | `user` | `account_join_request` |
137+
| `user.join_request_approved` | `user` | `account_join_request` |
138+
| `user.list` | `user` | `org` |
139+
| `user.listed_repos` | `user` | `org` |
140+
| `user.owner_created` | `user` | `org` |
141+
| `user.performed_code_search` | `user` | `org` |
142+
| `user.performed_find_references` | `user` | `org` |
143+
| `user.performed_goto_definition` | `user` | `org` |
144+
| `user.read` | `user` | `user` |
133145
| `user.signed_in` | `user` | `user` |
134146
| `user.signed_out` | `user` | `user` |
135147
| `org.ownership_transfer_failed` | `user` | `org` |
@@ -182,7 +194,7 @@ curl --request GET '$SOURCEBOT_URL/api/ee/audit' \
182194
},
183195
"targetType": {
184196
"type": "string",
185-
"enum": ["user", "org", "file", "api_key", "account_join_request", "invite"]
197+
"enum": ["user", "org", "file", "api_key", "account_join_request", "invite", "chat"]
186198
},
187199
"sourcebotVersion": {
188200
"type": "string"
@@ -194,7 +206,8 @@ curl --request GET '$SOURCEBOT_URL/api/ee/audit' \
194206
"properties": {
195207
"message": { "type": "string" },
196208
"api_key": { "type": "string" },
197-
"emails": { "type": "string" }
209+
"emails": { "type": "string" },
210+
"source": { "type": "string" }
198211
},
199212
"additionalProperties": false
200213
},

docs/docs/configuration/environment-variables.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ The following environment variables allow you to configure your Sourcebot deploy
4242
| `HTTPS_PROXY` | - | <p>HTTPS proxy URL for routing SSL requests through a proxy server (e.g., `http://proxy.company.com:8080`). Requires `NODE_USE_ENV_PROXY=1`.</p> |
4343
| `NO_PROXY` | - | <p>Comma-separated list of hostnames or domains that should bypass the proxy (e.g., `localhost,127.0.0.1,.internal.domain`). Requires `NODE_USE_ENV_PROXY=1`.</p> |
4444
| `SOURCEBOT_EE_AUDIT_LOGGING_ENABLED` | `true` | <p>Enables/disables audit logging</p> |
45+
| `SOURCEBOT_EE_AUDIT_RETENTION_DAYS` | `180` | <p>The number of days to retain audit logs. Audit log records older than this will be automatically pruned daily. Set to `0` to disable pruning and retain logs indefinitely.</p> |
4546
| `AUTH_EE_GCP_IAP_ENABLED` | `false` | <p>When enabled, allows Sourcebot to automatically register/login from a successful GCP IAP redirect</p> |
4647
| `AUTH_EE_GCP_IAP_AUDIENCE` | - | <p>The GCP IAP audience to use when verifying JWT tokens. Must be set to enable GCP IAP JIT provisioning</p> |
4748
| `EXPERIMENT_EE_PERMISSION_SYNC_ENABLED` | `false` | <p>Enables [permission syncing](/docs/features/permission-syncing).</p> |

docs/docs/configuration/idp.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebarTitle: External identity providers
55

66
import LicenseKeyRequired from '/snippets/license-key-required.mdx'
77

8-
<LicenseKeyRequired />
8+
<LicenseKeyRequired feature="External Identity Providers" />
99

1010
You can connect Sourcebot to various **external identity providers** to associate a Sourcebot user with one or more external service accounts (ex. Google, GitHub, etc).
1111

docs/docs/connections/ado-cloud.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ Next, provide the access [token](/docs/configuration/config-file#tokens) via an
100100
// note: this env var can be named anything. It
101101
// doesn't need to be `ADO_TOKEN`.
102102
"env": "ADO_TOKEN"
103-
}
104-
// .. rest of config ..
103+
},
104+
// At least one of the following is required to specify which repos to sync:
105+
"repos": ["organizationName/projectName/repoName"],
106+
// "orgs": ["organizationName"],
107+
// "projects": ["organizationName/projectName"]
105108
}
106109
```
107110

docs/docs/connections/ado-server.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,11 @@ Next, provide the access [token](/docs/configuration/config-file#tokens) via an
114114
// note: this env var can be named anything. It
115115
// doesn't need to be `ADO_TOKEN`.
116116
"env": "ADO_TOKEN"
117-
}
118-
// .. rest of config ..
117+
},
118+
// At least one of the following is required to specify which repos to sync:
119+
"repos": ["collectionName/projectName/repoName"],
120+
// "orgs": ["collectionName"],
121+
// "projects": ["collectionName/projectName"]
119122
}
120123
```
121124

0 commit comments

Comments
 (0)