Skip to content

Commit 1732ec4

Browse files
Merge branch 'v5' into bkellam/multi-idp
2 parents 68fed42 + ded4282 commit 1732ec4

99 files changed

Lines changed: 4675 additions & 803 deletions

File tree

Some content is hidden

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

CHANGELOG.md

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

88
## [Unreleased]
99

10-
### Added
11-
- Added ask connectors: connect 3rd party MCP servers to your ask agent. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
12-
- Added progress bar when navigating between pages. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
13-
- Added a integrated changelog into the sidebar. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
10+
Checkout the [migration guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide) for details on upgrading your instance to v5.
1411

1512
### Changed
16-
- [**Breaking Change**] Changed the default role assignment to `Owner` for organizations on the free tier. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
17-
- [**Breaking Change**] Relicensed Ask Sourcebot and MCP under ee. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
13+
- [**Breaking Change**] Changed the default role assignment to `Owner` for organizations on the free tier. See the [v4 to v5 guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide). [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
14+
- [**Breaking Change**] Relicensed Ask Sourcebot and MCP under ee. See the [v4 to v5 guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide). [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
15+
- [**Breaking Change**] Removed the embedded Postgres and Redis from the Docker image. External Postgres and Redis are now required: set `DATABASE_URL` and `REDIS_URL`, or deploy with the provided `docker-compose.yml`. See the [v4 to v5 guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide). [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
16+
- [**Breaking Change**] Sourcebot no longer auto-generates `AUTH_SECRET` and `SOURCEBOT_ENCRYPTION_KEY`, nor reads them from the plaintext files it previously wrote to the data volume; both must now be set explicitly as environment variables. See the [v4 to v5 guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide). [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
1817
- Redesigned the app layout with a new collapsible sidebar navigation, replacing the previous top navigation bar. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
1918
- Expired offline license keys no longer crash the process. An expired key now degrades to the unlicensed state. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
2019
- Improved the `setup-sourcebot` wizard: prompts for a setup directory, clarifies that secrets are stored locally in `.env`, switches multi-select to Tab, hides "No results" until a real search runs, and detects/cleans up conflicting Docker deployments and volumes before starting. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
2120

21+
### Added
22+
- Added ask connectors: connect 3rd party MCP servers to your ask agent. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
23+
- Added progress bar when navigating between pages. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
24+
- Added a integrated changelog into the sidebar. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
25+
- Added scroll position restoration when viewing files in the code browser, so returning to a previously viewed file restores your scroll position. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
26+
27+
### Fixed
28+
- Fixed git "dubious ownership" errors when the container runs as a non-root user by setting `safe.directory` at the system level instead of the global (root-only) level. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
29+
2230
## [4.17.4] - 2026-05-30
2331

2432
### Changed

Dockerfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ ENV NODE_ENV=production
163163
ENV NEXT_TELEMETRY_DISABLED=1
164164
ENV DATA_DIR=/data
165165
ENV DATA_CACHE_DIR=$DATA_DIR/.sourcebot
166-
ENV DATABASE_DATA_DIR=$DATA_CACHE_DIR/db
167-
ENV REDIS_DATA_DIR=$DATA_CACHE_DIR/redis
168166
ENV SOURCEBOT_PUBLIC_KEY_PATH=/app/public.pem
169167
# PAPIK = Project API Key
170168
# Note that this key does not need to be kept secret, so it's not
@@ -180,7 +178,7 @@ ENV SOURCEBOT_LOG_LEVEL=info
180178
# ENV SOURCEBOT_TELEMETRY_DISABLED=1
181179

182180
# Configure dependencies
183-
RUN apk add --no-cache git ca-certificates bind-tools tini jansson wget supervisor uuidgen curl perl jq redis postgresql16 postgresql16-contrib openssl util-linux unzip && \
181+
RUN apk add --no-cache git ca-certificates bind-tools tini jansson wget supervisor uuidgen curl perl jq openssl util-linux unzip && \
184182
apk upgrade --no-cache
185183

186184
# Remove npm (unused — we use Yarn). The Node.js base image bundles npm
@@ -200,8 +198,6 @@ ARG GID=1500
200198
# The container can be run as root (default) or as sourcebot user using docker run --user
201199
RUN addgroup -g $GID sourcebot && \
202200
adduser -D -u $UID -h /app -S sourcebot && \
203-
adduser sourcebot postgres && \
204-
adduser sourcebot redis && \
205201
chown -R sourcebot /app && \
206202
adduser sourcebot node && \
207203
mkdir /var/log/sourcebot && \
@@ -250,12 +246,7 @@ COPY --chown=sourcebot:sourcebot --from=shared-libs-builder /app/packages/shared
250246
COPY --chown=sourcebot:sourcebot --from=shared-libs-builder /app/packages/queryLanguage ./packages/queryLanguage
251247

252248
# Fixes git "dubious ownership" issues when the volume is mounted with different permissions to the container.
253-
RUN git config --global safe.directory "*"
254-
255-
# Configure the database
256-
RUN mkdir -p /run/postgresql && \
257-
chown -R postgres:postgres /run/postgresql && \
258-
chmod 775 /run/postgresql
249+
RUN git config --system safe.directory "*"
259250

260251
# Make app directory accessible to both root and sourcebot user
261252
RUN chown -R sourcebot /app \

docs/docs/configuration/auth/roles-and-permissions.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ Note that when [permission syncing](/docs/features/permission-syncing) is enable
1717
On the free plan, all signed-in users are given the `Owner` role.
1818
</Note>
1919

20+
## Default role assignment
21+
22+
When a user joins your organization, they are assigned a default role. This assignment, and the ability to [manage the user's role](#managing-member-roles) afterwards, depends on [your plan](/docs/activating-a-subscription):
23+
24+
| Plan | Default role | Role management |
25+
| :--- | :----------- | :-------------- |
26+
| **Free** | `Owner` | Not available. A user's role cannot be changed. |
27+
| **Paid** | `Member` | Available. Owners can [promote or demote](#managing-member-roles) members. |
2028

2129
## Managing member roles
2230

docs/docs/configuration/environment-variables.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The following environment variables allow you to configure your Sourcebot deploy
1212
| :------- | :------ | :---------- |
1313
| `AUTH_CREDENTIALS_LOGIN_ENABLED` | `true` | <p>Enables/disables authentication with basic credentials. Username and passwords are stored encrypted at rest within the postgres database. Checkout the [auth docs](/docs/configuration/auth/authentication) for more info</p> |
1414
| `AUTH_EMAIL_CODE_LOGIN_ENABLED` | `false` | <p>Enables/disables authentication with a login code that's sent to a users email. `SMTP_CONNECTION_URL` and `EMAIL_FROM_ADDRESS` must also be set. Checkout the [auth docs](/docs/configuration/auth/authentication) for more info </p> |
15-
| `AUTH_SECRET` | Automatically generated at startup if no value is provided. Generated using `openssl rand -base64 33` | <p>Used to validate login session cookies</p> |
15+
| `AUTH_SECRET` **(required)** | - | <p>Used to validate login session cookies. Genearte one with `openssl rand -base64 33`.</p> |
1616
| `AUTH_SESSION_MAX_AGE_SECONDS` | `2592000` (30 days) | <p>Relative time from now in seconds when to expire the session.</p> |
1717
| `AUTH_SESSION_UPDATE_AGE_SECONDS` | `86400` (1 day) | <p>How often the session should be updated in seconds. If set to `0`, session is updated every time.</p> |
1818
| `OAUTH_AUTHORIZATION_CODE_TTL_SECONDS` | `600` (10 minutes) | <p>Lifetime of an OAuth authorization code, in seconds.</p> |
@@ -22,13 +22,11 @@ The following environment variables allow you to configure your Sourcebot deploy
2222
| `CONFIG_PATH` | `-` | <p>The container relative path to the declarative configuration file. See [this doc](/docs/configuration/declarative-config) for more info.</p> |
2323
| `DATA_CACHE_DIR` | `$DATA_DIR/.sourcebot` | <p>The root data directory in which all data written to disk by Sourcebot will be located.</p> |
2424
| `DATA_DIR` | `/data` | <p>The directory within the container to store all persistent data. Typically, this directory will be volume mapped such that data is persisted across container restarts (e.g., `docker run -v $(pwd):/data`)</p> |
25-
| `DATABASE_DATA_DIR` | `$DATA_CACHE_DIR/db` | <p>The data directory for the default Postgres database.</p> |
26-
| `DATABASE_URL` | `postgresql://postgres@ localhost:5432/sourcebot` | <p>Connection string of your Postgres database. By default, a Postgres database is automatically provisioned at startup within the container.</p><p>If you'd like to use a non-default schema, you can provide it as a parameter in the database url.</p><p>You can also use `DATABASE_HOST`, `DATABASE_USERNAME`, `DATABASE_PASSWORD`, `DATABASE_NAME`, and `DATABASE_ARGS` to construct the database url.</p> |
25+
| `DATABASE_URL` **(required)** | - | <p>Connection string of your Postgres database, e.g. `postgresql://user:password@host:5432/sourcebot`.</p><p>If you'd like to use a non-default schema, you can provide it as a parameter in the database url.</p><p>You can also use `DATABASE_HOST`, `DATABASE_USERNAME`, `DATABASE_PASSWORD`, `DATABASE_NAME`, and `DATABASE_ARGS` to construct the database url.</p> |
2726
| `EMAIL_FROM_ADDRESS` | `-` | <p>The email address that transactional emails will be sent from. See [this doc](/docs/configuration/transactional-emails) for more info.</p> |
2827
| `FORCE_ENABLE_ANONYMOUS_ACCESS` | `false` | <p>When enabled, [anonymous access](/docs/configuration/auth/access-settings#anonymous-access) to the organization will always be enabled</p>
2928
| `REQUIRE_APPROVAL_NEW_MEMBERS` | - | <p>When set, controls whether new users require approval before accessing your deployment. If not set, the setting can be configured via the UI. See [member approval](/docs/configuration/auth/access-settings#member-approval) for more info.</p>
30-
| `REDIS_DATA_DIR` | `$DATA_CACHE_DIR/redis` | <p>The data directory for the default Redis instance.</p> |
31-
| `REDIS_URL` | `redis://localhost:6379` | <p>Connection string of your Redis instance. By default, a Redis database is automatically provisioned at startup within the container.</p><p>To enable TLS, see [this doc](/docs/deployment/infrastructure/redis#tls).</p> |
29+
| `REDIS_URL` **(required)** | - | <p>Connection string of your Redis instance, e.g. `redis://host:6379`.</p><p>To enable TLS, see [this doc](/docs/deployment/infrastructure/redis#tls).</p> |
3230
| `REDIS_REMOVE_ON_COMPLETE` | `0` | <p>Controls how many completed jobs are allowed to remain in Redis queues</p> |
3331
| `REDIS_REMOVE_ON_FAIL` | `100` | <p>Controls how many failed jobs are allowed to remain in Redis queues</p> |
3432
| `REPO_SYNC_RETRY_BASE_SLEEP_SECONDS` | `60` | <p>The base sleep duration (in seconds) for exponential backoff when retrying repository sync operations that fail</p> |
@@ -38,7 +36,7 @@ The following environment variables allow you to configure your Sourcebot deploy
3836
| `SMTP_PORT` | `-` | <p>The port of the SMTP server.</p> |
3937
| `SMTP_USERNAME` | `-` | <p>The username for SMTP authentication.</p> |
4038
| `SMTP_PASSWORD` | `-` | <p>The password for SMTP authentication.</p> |
41-
| `SOURCEBOT_ENCRYPTION_KEY` | Automatically generated at startup if no value is provided. Generated using `openssl rand -base64 24` | <p>Used to encrypt connection secrets and generate API keys.</p> |
39+
| `SOURCEBOT_ENCRYPTION_KEY` **(required)** | - | <p>Used to encrypt connection secrets and generate API keys. Generate one with `openssl rand -base64 24`.</p> |
4240
| `SOURCEBOT_PUBLIC_KEY_PATH` | `/app/public.pem` | <p>Sourcebot's public key that's used to verify encrypted license key signatures.</p> |
4341
| `SOURCEBOT_LOG_LEVEL` | `info` | <p>The Sourcebot logging level. Valid values are `debug`, `info`, `warn`, `error`, in order of severity.</p> |
4442
| `SOURCEBOT_STRUCTURED_LOGGING_ENABLED` | `false` | <p>Enables/disable structured JSON logging. See [this doc](/docs/configuration/structured-logging) for more info.</p> |

docs/docs/features/ask/connectors.mdx

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ If Ask Sourcebot needs to use a tool that requires approval, it pauses and asks
3232
An owner must add a connector before organization members can use it.
3333

3434
To add a connector:
35-
1. **Settings → Workspace → Ask Agent**
35+
1. **Settings → Workspace → Ask Sourcebot**
3636
2. Click **Add connector**.
3737
3. Enter the MCP server URL and the name the organization will see for this server.
3838

@@ -50,9 +50,68 @@ then enter the OAuth client ID and client secret in Sourcebot.
5050
</Frame>
5151
</div>
5252

53+
## OAuth Scopes
54+
55+
Owners can configure which OAuth scopes users authorize when connecting to a connector.
56+
57+
Sourcebot checks the connector for discoverable scopes and shows them as options. You can also add custom scopes.
58+
59+
<div className="max-w-sm mx-auto">
60+
<Frame>
61+
<img
62+
src="/images/connectors_oauth_scopes.png"
63+
alt="OAuth scopes discovery"
64+
/>
65+
</Frame>
66+
</div>
67+
68+
Owners can change connector scopes at any time from **Settings → Workspace → Ask Sourcebot** and select **Edit OAuth scopes**.
69+
70+
<div className="max-w-xl mx-auto">
71+
<Frame>
72+
<img
73+
src="/images/connectors_edit_scopes.png"
74+
alt="OAuth scopes editing"
75+
/>
76+
</Frame>
77+
</div>
78+
79+
<Warning>
80+
Changing connector scopes requires all users to re-authenticate with that connector.
81+
</Warning>
82+
83+
## Tool Permissions
84+
85+
Owners can configure how Ask Sourcebot may use each tool exposed by a connector. Changes take effect immediately and do not require users to re-authenticate.
86+
87+
To edit tool permissions, open the connector menu from **Settings → Workspace → Ask Sourcebot** and select **Edit tool permissions**.
88+
89+
<div className="max-w-xl mx-auto">
90+
<Frame>
91+
<img
92+
src="/images/connectors_edit_tool_permissions.png"
93+
alt="Tools editing"
94+
/>
95+
</Frame>
96+
</div>
97+
98+
Each tool can be **Allowed**, require **Needs Approval**, or be **Blocked**. Allowed tools can run without pausing the chat, tools that need approval ask the user before running, and blocked tools are not available to Ask Sourcebot.
99+
100+
Sourcebot groups tools by the hints reported by the connector. Tools with a read-only hint are grouped separately and tools without that hint are treated as write/delete tools.
101+
102+
<div className="max-w-lg mx-auto">
103+
<Frame>
104+
<img
105+
src="/images/connectors_tool_permissions.png"
106+
alt="Tool permissions view"
107+
/>
108+
</Frame>
109+
</div>
110+
111+
53112
## Connecting
54113

55-
After an owner adds connectors for your organization, go to **Settings → Account → Ask Agent** to connect them.
114+
After an owner adds connectors for your organization, go to **Settings → Account → Ask Sourcebot** to connect them.
56115

57116
You can see all available connectors on this page. After you connect one, you can inspect the tools it provides and what each tool does.
58117

0 commit comments

Comments
 (0)