Skip to content

Commit 03dd370

Browse files
authored
v0.8.42: knowledgebase queueing improvemnets, file search time fixes, outbox fixes
2 parents 3c8a4c4 + bfaeaba commit 03dd370

185 files changed

Lines changed: 92691 additions & 2058 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.

.github/workflows/codeql.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,15 @@ on:
6262

6363
concurrency:
6464
group: codeql-${{ github.ref }}
65-
cancel-in-progress: true
65+
# PR runs only. Superseding is what this is for: a PR push makes the previous
66+
# scan of that PR irrelevant, and `refs/pull/N/merge` keeps each PR in its own
67+
# group. The push and schedule triggers both resolve to `refs/heads/main`, so a
68+
# blanket `true` let the daily cron cancel the merge scan of the same commit --
69+
# a 2-minute window that finally landed on 3c8a4c4 (push 08:32:58 killed by the
70+
# 08:34:47 cron), leaving main with a red rollup for a commit that the cron had
71+
# in fact scanned clean. Non-PR events now queue instead: one pending run is
72+
# held per group, so the cron simply waits out the merge scan.
73+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
6674

6775
permissions:
6876
contents: read

.github/workflows/test-build.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@ jobs:
222222
working-directory: packages/db
223223
env:
224224
KNOWLEDGE_ACL_TEST_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/sim_auth_scim
225-
run: bunx vitest run script-migrations/0016_backfill_search_vectors.postgres.test.ts
225+
run: >-
226+
bunx vitest run
227+
script-migrations/0016_backfill_search_vectors.postgres.test.ts
228+
script-migrations/0018_repair_workspace_file_content_revision.postgres.test.ts
226229
227230
- name: Verify Search progress, pagination, and outbox scheduling in PostgreSQL
228231
working-directory: apps/sim
@@ -235,11 +238,36 @@ jobs:
235238
lib/knowledge/__integration__/search-source-pagination.integration.ts
236239
lib/knowledge/__integration__/search-reference-batching.integration.ts
237240
lib/knowledge/__integration__/embedding-insert-batches.integration.ts
241+
lib/knowledge/__integration__/connector-lifecycle-locks.integration.ts
242+
lib/knowledge/__integration__/connector-deferral.integration.ts
243+
lib/knowledge/__integration__/stored-document-recovery.integration.ts
244+
lib/knowledge/__integration__/connector-partition-work.integration.ts
245+
lib/knowledge/__integration__/listing-continuation.integration.ts
238246
lib/knowledge/__integration__/kb-block-search.integration.ts
239247
lib/core/outbox/service.integration.ts
240248
lib/knowledge/__integration__/connector-upload.integration.ts
241249
lib/uploads/contexts/organization-logo/application.integration.ts
242250
251+
- name: Verify Confluence identity and directory sync in PostgreSQL
252+
working-directory: apps/sim
253+
env:
254+
KNOWLEDGE_ACL_TEST_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/sim_auth_scim
255+
run: >-
256+
bunx vitest run --mode integration
257+
lib/knowledge/__integration__/confluence-identity.integration.ts
258+
lib/knowledge/__integration__/directory-sync.integration.ts
259+
260+
- name: Verify Confluence audience migrations and permission queries in PostgreSQL
261+
working-directory: apps/sim
262+
env:
263+
KNOWLEDGE_ACL_TEST_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/sim_acl_test
264+
run: |
265+
bun -e 'import postgres from "postgres"; const sql = postgres(process.env.DATABASE_URL); await sql`CREATE DATABASE sim_acl_test`; await sql.end()'
266+
bunx vitest run --mode integration lib/knowledge/access/group-membership.integration.ts
267+
bunx vitest run \
268+
lib/knowledge/access/predicate.postgres.test.ts \
269+
lib/knowledge/connectors/external-directory.postgres.test.ts
270+
243271
test-build:
244272
name: Lint and Test
245273
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }}

apps/docs/content/docs/knowledgebase/connectors.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Each connector has source-specific fields that control what gets synced. Example
7878

7979
- **Notion** — sync an entire workspace, a specific database, or a single page tree
8080
- **GitHub** — specify a repository, branch, and optional file extension filter
81-
- **Confluence** — enter your Atlassian domain and optionally filter by space key or content type
81+
- **Confluence** — enter your Atlassian domain and choose spaces, or **All** for all spaces accessible at each sync. Optionally filter by content type or label. PDF and Word (`.docx`, Word 97–2003 `.doc`) attachments on matching pages and blog posts are included as separate documents.
8282
- **Azure DevOps** — choose what to sync (wiki pages, work items, repository files, or all), with optional work item type/state filters, a custom WIQL query, and repository/branch/path filters
8383
- **Amazon S3** — point at a bucket with an optional key prefix and a customizable file extension allowlist; S3-compatible stores (Cloudflare R2, MinIO) are supported via a custom endpoint
8484
- **YouTube** — sync a channel (by `@handle` or ID) or playlist, with an optional published-after date filter and the option to exclude Shorts
@@ -88,6 +88,8 @@ Each connector has source-specific fields that control what gets synced. Example
8888

8989
Configuration is validated on save — if a repository doesn't exist or a domain is unreachable, you'll see an error immediately.
9090

91+
Confluence attachment indexing requires `read:attachment:confluence`. For a service account, include it when creating the scoped API token; see the [Confluence scope list](/search/confluence#using-a-service-account). Attachments are checked even when the parent page has not changed. Files over 100 MB appear as skipped; convert Word 6/95 files to `.docx` before attaching them.
92+
9193
</Step>
9294
<Step>
9395

apps/docs/content/docs/platform/self-hosting/environment-variables.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,10 @@ width. Check what you pick there, or upgrade Ollama.
234234
| `COPILOT_API_KEY` | API key for Chat. Without it the Sim Chat block, scheduled prompt jobs, and Inbox cannot run |
235235
| `NEXT_PUBLIC_CHAT_DISABLED` | Set to `true` to hide the Chat module: the workspace lands on your first workflow, with no chats list, scheduled tasks, or editor Chat panel. Chat is shown when unset; `npx sim-setup` sets it for you if you skip the chat key |
236236
| `PII_URL` | Base URL of the Presidio service backing PII detection and redaction. The Helm chart wires it to its own `pii` Service when `pii.enabled`; on Compose point it at the PII service on your network. The default `http://localhost:5001` exists only in local development, and leaving it makes redaction fail |
237-
| `DURABLE_SECRET_PROVENANCE_ENFORCED_SURFACES` | Durable stores where a value whose secret provenance was never recorded fails the run instead of logging a warning. `all`, or a comma-separated subset of `memory`, `table-row`, `knowledge`, `workspace-file`. Unset (nothing enforced) by default |
238237
| `ADMIN_API_KEY` | Admin API key for GitOps operations and organization provisioning |
239238

239+
Tracked memory, table rows, knowledge content, and workspace files require valid secret provenance before entering a model or a trusted runtime. Records with a null provenance tracking marker retain legacy compatibility.
240+
240241
## Enterprise Features
241242

242243
Enterprise features are unlocked by configuration rather than billing on self-hosted deployments. One switch turns on the full set; per-feature flags below it override the switch either way.

apps/docs/content/docs/search/coda.mdx

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,27 @@ Sign in to Coda with a dedicated integration account that can read the documents
1919

2020
Use a standard REST API token. Do not select the MCP restriction.
2121

22-
<Image className="mx-auto h-auto w-full max-w-2xl" src="/static/search/coda-api-token.jpg" alt="Coda API connections with the Generate new token dialog" width={1280} height={720} />
22+
<Image className="mx-auto h-auto w-full max-w-xl" loading="eager" src="/static/search/coda-token-creation.jpg" alt="Coda Generate new token dialog with a name and no restriction selected" width={600} height={281} />
2323

2424
</Step>
2525
<Step>
2626

27-
### Add the source
27+
### Add the credential
2828

29-
In Sim, open **Settings → Sources → Add source → Coda**. Add or select a Coda service account credential and enter the token when prompted.
29+
In Sim, open **Settings → Sources → Add source → Coda**. If Coda is already listed, open it and select **Add connection**.
30+
31+
Open **Service account → Add API token**. Paste the token, give it a recognizable display name, then select **Add API token**. You can also choose an existing Coda credential.
32+
33+
<Image className="mx-auto h-auto w-full max-w-md" src="/static/search/coda-credential.jpg" alt="Add Coda API token form with token, display name, and optional description fields" width={516} height={435} />
34+
35+
</Step>
36+
<Step>
37+
38+
### Choose documents
39+
40+
Select the documents to index, or leave the selection empty for discovery.
41+
42+
<Image className="mx-auto h-auto w-full max-w-md" src="/static/search/coda-setup.jpg" alt="Coda connection setup with a saved credential, Documents selector, and optional Enterprise organization ID" width={516} height={458} />
3043

3144
| Field | What to enter |
3245
|---|---|
@@ -40,7 +53,7 @@ The picker shows accessible documents the token owner has opened. Use IDs for ot
4053

4154
### Sync and verify
4255

43-
Select **Connect & Sync**. Open the source's **Documents** and **Sync history** to check indexing. Content and permission changes appear after synchronization.
56+
Select **Connect & Sync**. Open the source's **Documents** and **Sync history** to check indexing. Content and permission changes appear after synchronization. Have a teammate with a matching verified email search for a shared document, and confirm that an unshared teammate cannot find it.
4457

4558
To rotate the token, add the replacement credential, update the source, and verify a sync before revoking the old token.
4659

@@ -59,8 +72,17 @@ Ordinary connections index visible canvas text and base-table rows. Enterprise c
5972

6073
Enterprise mode excludes deactivated and deleted users. Direct-share guests absent from the organization directory are excluded; guests explicitly listed in a group or workspace may receive that membership's access. Ordinary connections cannot check Coda organization deactivation, so manage departing users' Sim membership too.
6174

62-
Sim refreshes permissions even when content is unchanged. Unverified permissions never become broad access, and Sim admin status does not override Coda sharing. For setup failures or missing results, check the token's access, Enterprise admin role if applicable, the teammate's verified email, and **Sync history**.
75+
Sim refreshes permissions even when content is unchanged. Unverified permissions never become broad access, and Sim admin status does not override Coda sharing.
76+
77+
These access rules apply to organization Search and **Admin access** sources. In a regular knowledge base, **Workspace access** shares all indexed content with that Sim workspace and ignores the Enterprise organization ID.
6378

64-
In a regular knowledge base, **Workspace access** intentionally shares all indexed content with that Sim workspace and does not use the Enterprise organization ID. The permissions above apply to organization Search and **Admin access** sources.
79+
## Troubleshooting
80+
81+
| Problem | Next step |
82+
|---|---|
83+
| Document missing from the picker | Open it in Coda with the token owner, or enter its document ID. |
84+
| Enterprise setup fails | Confirm the organization ID and Enterprise org-admin role. A workspace admin token is insufficient. |
85+
| Teammate sees no results | Check organization membership, their verified Sim email, the Coda share, and **Sync history**. |
86+
| Token expired or revoked | Replace the credential in the connection's **Settings**, then verify a sync. |
6587

6688
See Coda's [public API](https://coda.io/developers/apis/v1) and [Enterprise Admin API](https://coda.io/developers/apis/admin/v1).

apps/docs/content/docs/search/confluence.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Callout } from 'fumadocs-ui/components/callout'
77
import { Step, Steps } from 'fumadocs-ui/components/steps'
88
import { Image } from '@/components/ui/image'
99

10-
Search pages and blog posts from selected Confluence Cloud spaces. A Sim organization admin enables Confluence; **each teammate connects their own account**.
10+
Search pages, blog posts, and their PDF and Word attachments from selected Confluence Cloud spaces. A Sim organization admin enables Confluence; **each teammate connects their own account**.
1111

1212
| Method | How it works |
1313
| --- | --- |
@@ -38,7 +38,9 @@ Open **Settings → Sources → Add source** and select **Confluence**. This ope
3838

3939
### Choose the account and spaces
4040

41-
Under **Service account**, select a service account or [add one](#using-a-service-account). Enter the same **Confluence site** as the credential, then choose **Spaces**. **All** in the dropdown selects every space the account can currently browse; newly created spaces are not added automatically. Clear the picker search before selecting all.
41+
Under **Service account**, select a service account or [add one](#using-a-service-account). Enter the same **Confluence site** as the credential, then choose **Spaces**. **All** in the dropdown includes every space the syncing account can access at each sync, including newly accessible spaces. Clear the picker search before selecting all.
42+
43+
If you selected all spaces before this behavior was introduced, reselect **All** and save. Previously saved selections remain a fixed list of spaces.
4244

4345
To enter comma-separated keys such as `ENG, PRODUCT`, use the switch beside **Spaces**. Switching between the picker and manual entry keeps your selection.
4446

@@ -63,7 +65,7 @@ After an admin configures Confluence, open **Integrations** and select **Connect
6365
If Confluence is allowed but no source exists, select **Connect** beside Confluence. To add another site later, open the Confluence row’s actions menu (****) and select **Add Confluence site**:
6466

6567
1. Open **Your account** and select a saved account or **Connect Confluence account**. Authorize using the Atlassian email matching your verified Sim email.
66-
2. Enter the hostname under **Atlassian site**, then choose **Spaces**. Use **All** in the dropdown for the complete current list, or the arrows beside **Spaces** to enter comma-separated keys. You can select up to 1,000 spaces in this form.
68+
2. Enter the hostname under **Atlassian site**, then choose **Spaces**. Use **All** in the dropdown for all spaces accessible at each sync, or the arrows beside **Spaces** to enter comma-separated keys. You can select up to 1,000 individual spaces in this form.
6769
3. Select **Connect & Sync**. Sim saves the selected scope and starts indexing with your account.
6870

6971
<Image className="mx-auto h-auto w-full max-w-md"
@@ -87,6 +89,7 @@ Use a **scoped API token** from an Atlassian service account:
8789
read:confluence-content.all
8890
read:page:confluence
8991
read:blogpost:confluence
92+
read:attachment:confluence
9093
read:space:confluence
9194
read:label:confluence
9295
search:confluence
@@ -98,7 +101,7 @@ read:user:confluence
98101
read:group:confluence
99102
```
100103

101-
Use all 12 scopes for account validation, pickers, content, permissions, and directory reads. Central indexing does not need write scopes.
104+
Use all 13 scopes for account validation, pickers, content, attachments, permissions, and directory reads. Central indexing does not need write scopes.
102105

103106
4. Review and create the token, then copy it. Atlassian shows it only once.
104107
5. In Sim's source form, open **Service account → Add service account**. Paste the **API token**, enter **Site domain** (hostname only), and select **Add service account**. Continue in the source form with the same domain.
@@ -122,7 +125,9 @@ See Atlassian's [account setup](https://support.atlassian.com/user-management/do
122125
| **Filter by Label** | Optional comma-separated labels; content can match any listed label. |
123126
| **Metadata tags** | Labels, version, and last-modified tags. |
124127

125-
Search manages the schedule and hides item limits. It indexes published/current content and each page's own text, including supported local callouts and code blocks. Archived content, comments, attachment contents, and expanded Include Page, Excerpt Include, or third-party macro output are excluded. Referenced pages can be indexed separately with their own permissions.
128+
Search manages the schedule and hides item limits. It indexes published/current content and each page's own text, including supported local callouts and code blocks. PDF, Word `.docx`, and Word 97–2003 `.doc` attachments on the selected pages and blog posts are indexed as separate documents with their parent content's permissions. Space, content-type, and label filters apply to the parent content. Attachment changes are checked on each sync, even when the parent text has not changed.
129+
130+
Archived content, comments, other attachment formats, and expanded Include Page, Excerpt Include, or third-party macro output are excluded. Referenced pages can be indexed separately with their own permissions. Attachments over 100 MB are shown as skipped; convert older Word 6/95 files to `.docx` before attaching them.
126131

127132
## Manage access and sync
128133

@@ -146,6 +151,7 @@ In **Sync history**, **Continuing** means a healthy listing needs another batch.
146151
| A new page, blog post, or label is missing | Confluence search can take time to update. Once the content appears in Confluence search with the selected label, sync again. |
147152
| A restricted page is missing | Both your account and the crawling account need access to the page and its ancestors. |
148153
| Embedded content is missing | Index the referenced page separately; remote macro output is excluded. |
154+
| PDF or Word attachments are missing | Check `read:attachment:confluence` and access to the parent page. Existing service-account tokens may need to be replaced with one that includes this scope. Attachment access failures are reported as a partial sync. |
149155
| **Reconnect** or email mismatch | Authorize with the Atlassian account matching your verified Sim email and grant all requested permissions. |
150156

151157
Open a missing page as the affected teammate, check its space and page restrictions, then sync again after correcting access. See Atlassian's [content access](https://support.atlassian.com/confluence-cloud/docs/add-or-remove-page-restrictions/) and [permission inspection](https://support.atlassian.com/confluence-cloud/docs/inspect-a-users-permissions/) guides.

apps/docs/content/docs/search/gmail.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Search schedules syncs hourly. The first sync lists every thread in scope and ca
133133

134134
**Member accounts:** later syncs use each mailbox's Gmail change history, unless the configuration has a search filter. A full relisting runs about weekly, or sooner if Gmail no longer retains the saved history.
135135

136-
**Service account:** each sync revisits the selected active mailboxes and resumes unfinished listings. If Google reports that a user's mailbox is not set up or returns a mailbox `failedPrecondition`, Sim records a warning and continues with the remaining users. The crawl stays incomplete and retries affected users on the next scheduled crawl; existing indexed mail is not deleted because a mailbox could not be read. Credential, delegation, and Directory failures still stop the crawl.
136+
**Service account:** each user's progress is saved separately, so a large mailbox or an account-specific access failure does not hold up other users. Temporary failures retry automatically. Unavailable mailboxes are revisited without deleting indexed mail solely because the mailbox could not be read. Sim continues discovering users and refreshing existing mail and permissions while unfinished work resumes. Results with stale or unverified permissions remain hidden. Credential, delegation, Directory, and scope failures still require attention.
137137

138138
Updates, removals, and access refresh in the background. Empty mailboxes and filters with no matches complete normally with zero documents. Threads exceeding indexing size limits are skipped and reconsidered when they change.
139139

0 commit comments

Comments
 (0)