Skip to content

Commit 929021d

Browse files
authored
feat(search): unify organization search and reviewed assistant actions (#9428)
* feat(search): move assistant into organization search * feat(search): add personal assistant actions and per-tool permissions * chore(search): finalize migration and validation artifacts * chore(search): align regression fixtures with account permissions * chore(tests): make asynchronous validation deterministic * fix(db): rebase assistant migration and preserve atomic expansion * docs(search): show dedicated organization search navigation * fix(search): preserve drafts and harden reviewed action delivery * fix(search): finalize refusal stream contract and validation * test(search): assert credential rejection independently of wording * fix(search): align review limits and isolate OAuth token refresh * fix(docs): preserve spacing above nested sidebar sections * docs(search): remove stale mode instructions and clarify actions * fix(search): distinguish unavailable account connections * chore(search): validate rebased migration and module graph * fix(tests): wait for durable text before recovery faults * fix(tests): wait for Search URL persistence before reload
1 parent 8a14967 commit 929021d

248 files changed

Lines changed: 39344 additions & 2659 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/scripts/http-e2e.sh‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ case "$group" in
203203
export REDIS_URL=redis://127.0.0.1:6379
204204
export NEXT_PUBLIC_FORCE_HOSTED=false
205205
export COPILOT_TOOL_PERMISSIONS_ENABLED=true
206+
export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true
207+
export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true
208+
export MSHIP_SEARCH_INTEGRATION_TOOLS=true
209+
bunx --no-install playwright install --with-deps chromium
206210
export INTERNAL_API_SECRET=desktop-inbox-http-ci-local-secret-at-least-32-characters
207211
export DB_TX_TRIPWIRE=throw
208212
start_app desktop-inbox 3019 'desktop executor' record-http-status
@@ -212,6 +216,16 @@ case "$group" in
212216
DESKTOP_INBOX_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
213217
DESKTOP_INBOX_E2E_REPORT_PATH="$report_dir/desktop-inbox-http-report.json" \
214218
bun run test:desktop-inbox:e2e
219+
ASSISTANT_ACTIONS_E2E_BASE_URL="$local_app_url" \
220+
ASSISTANT_ACTIONS_E2E_DATABASE_URL="$DATABASE_URL" \
221+
ASSISTANT_ACTIONS_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
222+
ASSISTANT_ACTIONS_E2E_REPORT_PATH="$report_dir/assistant-actions-ui-report.json" \
223+
bun --no-env-file scripts/test-assistant-actions-e2e.ts
224+
ORGANIZATION_SEARCH_E2E_BASE_URL="$local_app_url" \
225+
ORGANIZATION_SEARCH_E2E_DATABASE_URL="$DATABASE_URL" \
226+
ORGANIZATION_SEARCH_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
227+
ORGANIZATION_SEARCH_E2E_REPORT_PATH="$report_dir/organization-search-ui-report.json" \
228+
bun --no-env-file scripts/test-organization-search-e2e.ts
215229
;;
216230

217231
project-files)

‎apps/desktop/e2e/source-connect.spec.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ test('source authorization returns to its desktop screen and refreshes live', as
9494
json({
9595
credentialGroup: null,
9696
availableProviders: [],
97+
assistantProviders: [],
9798
availableMcpConnectors: [],
9899
canManage: false,
99100
indexingAvailable: true,

‎apps/docs/components/docs-layout/docs-sidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function SidebarScrollArea() {
5656
className={cn('min-h-0 flex-1 overflow-y-auto overscroll-contain', scrollFadeClass)}
5757
{...scrollFadeAttributes(edges)}
5858
>
59-
<div className='flex flex-col gap-px px-2 py-4 lg:pr-3.5 lg:pl-[calc(var(--nav-inset)-8px)]'>
59+
<div className='flex flex-col gap-px px-2 py-4 lg:pr-3.5 lg:pl-[calc(var(--nav-inset)-8px)] [&>[data-separator]:first-child]:mt-0'>
6060
<SidebarTree key={root.$id} nodes={root.children} />
6161
</div>
6262
</div>

‎apps/docs/components/docs-layout/sidebar-components.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export function SidebarFolder({ item, children }: SidebarFolderProps) {
121121

122122
export function SidebarSeparator({ item }: SidebarSeparatorProps) {
123123
return (
124-
<div data-separator className='mt-4 mb-1.5 px-2 first:mt-0'>
124+
<div data-separator className='mt-4 mb-1.5 px-2'>
125125
<p className='text-[var(--text-icon)] text-caption'>{item.name}</p>
126126
</div>
127127
)

‎apps/docs/content/docs/chat/index.mdx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ Ask Sim to build workflows, research a topic, create files, query tables, or act
3030

3131
## Start a chat [#how-it-works]
3232

33-
1. Select **New chat** in the sidebar.
34-
2. Choose **Build** for the workspace actions described in this section. Where available, **Search** answers questions from connected sources.
35-
3. Describe the task, its inputs, and the result you want.
33+
1. Select **New chat** in a workspace, or **Home** in the organization sidebar.
34+
2. Describe the task, its inputs, and the result you want.
35+
36+
For questions about connected sources, open **Search → Assistant** in the organization view. Use the **Search** tab to browse results. See [Sim Search](/search).
3637

3738
**Plan** helps research needs and develop a solution before implementation. It appears only for eligible platform administrators with **Super admin mode** enabled on a deployment that enables this capability. An organization Admin role alone does not enable it.
3839

@@ -43,7 +44,7 @@ For example:
4344
- "Create a workflow that takes a contract PDF, extracts key terms, and emails a summary to legal."
4445
- "Add a daily schedule to the prospect workflow and deploy it. At 8am America/New_York, find new high-fit prospects and post them to #outbound in Slack."
4546

46-
Chat can work across accessible resources. When you open Sim inside a workflow, that conversation is scoped to the workflow. In the organization view, **Build** requires permission to create organization workspaces; each action in an existing workspace still checks its access and enabled capabilities. Available actions depend on your role, connected accounts, workspace settings, and organization policy. Planning a solution does not by itself authorize deploying it or sending messages.
47+
Chat can work across accessible resources. When you open Sim inside a workflow, that conversation is scoped to the workflow. In the organization view, **Home** requires permission to create organization workspaces; each action in an existing workspace still checks its access and enabled capabilities. Available actions depend on your role, connected accounts, workspace settings, and organization policy. Planning a solution does not by itself authorize deploying it or sending messages.
4748

4849
## Add context [#adding-context]
4950

‎apps/docs/content/docs/integrations/jira.mdx‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Sim requests these scopes when someone connects a Jira account. For a self-hoste
6767
| `read:cmdb-schema:jira` | View Assets object schemas |
6868
| `read:cmdb-type:jira` | View Assets object types |
6969
| `read:cmdb-attribute:jira` | View Assets object type attributes |
70+
| `write:sprint:jira-software` | Create and update Jira Software sprints |
7071

7172
## Use the block [#usage-instructions]
7273

@@ -353,10 +354,45 @@ Create a new Jira issue
353354
| `summary` | string | Issue summary |
354355
| `success` | boolean | Whether the issue was created successfully |
355356
| `url` | string | URL to the created issue in Jira |
357+
| `warning` | string | A requested follow-up that failed after issue creation; do not recreate the issue |
356358
| `assigneeId` | string | Account ID of the assigned user \(null if no assignee was set\) |
357359

358360
</ReferenceDetails>
359361

362+
### Jira Create Sprint
363+
364+
Create a future sprint on a Jira Software board
365+
366+
<ReferenceDetails>
367+
368+
#### Input
369+
370+
| Parameter | Type | Required | Description |
371+
| --------- | ---- | -------- | ----------- |
372+
| `domain` | string | Yes | Jira site domain, such as yourcompany.atlassian.net |
373+
| `originBoardId` | number | Yes | Numeric ID of the Jira Software board that owns the sprint |
374+
| `name` | string | Yes | Sprint name |
375+
| `goal` | string | No | Sprint goal |
376+
| `startDate` | string | No | Planned start as an ISO 8601 timestamp with timezone |
377+
| `endDate` | string | No | Planned end as an ISO 8601 timestamp with timezone |
378+
379+
#### Output
380+
381+
| Parameter | Type | Description |
382+
| --------- | ---- | ----------- |
383+
| `warning` | string | Creation succeeded but sprint details are unavailable |
384+
| `sprint` | json | Created sprint with id, self, state, name, originBoardId, and optional goal, startDate, endDate |
385+
| ↳ `id` | number | Sprint ID |
386+
| ↳ `self` | string | Sprint REST URL |
387+
| ↳ `state` | string | Initial state: future |
388+
| ↳ `name` | string | Sprint name |
389+
| ↳ `originBoardId` | number | Origin board ID |
390+
| ↳ `goal` | string | Sprint goal |
391+
| ↳ `startDate` | string | Planned start timestamp |
392+
| ↳ `endDate` | string | Planned end timestamp |
393+
394+
</ReferenceDetails>
395+
360396
### Jira Bulk Read
361397

362398
Retrieve multiple Jira issues from a project in bulk

‎apps/docs/content/docs/integrations/jira_service_management.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Sim requests these scopes when someone connects a Jira account. For a self-hoste
6565
| `read:cmdb-schema:jira` | View Assets object schemas |
6666
| `read:cmdb-type:jira` | View Assets object types |
6767
| `read:cmdb-attribute:jira` | View Assets object type attributes |
68+
| `write:sprint:jira-software` | Create and update Jira Software sprints |
6869

6970
## Use the block [#usage-instructions]
7071

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ Plain JavaScript without imports runs in isolated-vm within Node child workers i
188188
| Variable | Description |
189189
|----------|-------------|
190190
| `COPILOT_API_KEY` | API key for the default Sim service. Required for Chat, the Sim Chat workflow block, and Inbox operations that use that service |
191+
| `MSHIP_SEARCH_INTEGRATION_TOOLS` | Opt in to personal-account reads and reviewed actions in Search Assistant. Off by default. Applies when AppConfig is disabled or no feature-flags document is available; an available AppConfig document takes precedence. Requires organization account setup and configured provider credentials. Tool permissions and source restrictions still apply. See [Connect your account](/search/connect-your-account) |
191192
| `NEXT_PUBLIC_CHAT_DISABLED` | Set to `true` to hide the Chat module: the workspace lands on your first workflow, with no chats list or editor Chat panel. Chat is shown when unset; `bunx sim-setup` sets it for you if you skip the chat key |
192193
| `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. Local development and the Helm fallback use `http://localhost:5001`; that address works only when the service is reachable there. Point production at a running service to use redaction |
193194
| `ADMIN_API_KEY` | Admin API key for GitOps operations and organization provisioning |

‎apps/docs/content/docs/search/ask-questions.mdx‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Your organization must enable Search and make a source available to you. [Connec
1111

1212
## Ask your first question
1313

14-
1. Open **Home** in the organization sidebar. From a workspace, open the workspace menu and select **Back to organization** first.
15-
2. If Home shows a conversation-mode menu, choose **Search** before sending your first message. Members without builder access start in Search automatically and can ask immediately.
14+
1. Open **Search** in the organization sidebar. From a workspace, open the workspace menu and select **Back to organization** first.
15+
2. Choose **Assistant** at the top of the Search view.
1616
3. Ask a specific question and press **Enter**.
1717

1818
For example:
@@ -32,7 +32,7 @@ Include the project, topic, or timeframe that matters. If you know where the ans
3232

3333
> Find our launch plan in Confluence. Summarize the scope and the launch date, with sources.
3434
35-
Search mode finds and reads information. You can also ask it to [draft content from the findings](/search/ask-questions#draft-from-your-sources); the draft stays in the conversation until you choose where to use it.
35+
Assistant finds and reads information. You can also ask it to [draft content from the findings](/search/ask-questions#draft-from-your-sources); the draft stays in the conversation until you choose where to use it.
3636

3737
## Check the sources
3838

@@ -121,7 +121,25 @@ Continue with specific revisions:
121121

122122
Provide a style example or brand guidance when consistency matters. Check names, numbers, dates, links, and commitments against the sources. For an external audience, include only information intended for that audience and keep internal supporting material separate for your review.
123123

124-
Copy the reviewed draft into the app where you want to use it. Search creates text in your conversation; it doesn't send or publish the draft or change source records.
124+
Copy the reviewed draft into another app, or ask Assistant to create it using your connected account when that operation is available.
125+
126+
## Review actions
127+
128+
When integration actions are enabled, Assistant can answer questions and take supported actions in the same conversation. For example, ask it to draft an email in Gmail or create a Jira issue using your own connected account.
129+
130+
Reads run without a prompt by default. Writes wait for review by default. Open **Review** to see the app, account, destination, and proposed content. Edit the supported fields, then select **Allow** or **Cancel** for each action. For several proposals, **Allow N shown** approves the actions currently displayed in the review.
131+
132+
<Image
133+
src="/static/search/assistant-action-review.png"
134+
alt="Assistant action review showing the connected Jira account, exact site and project, editable issue summary and description, and Allow or Cancel controls"
135+
width={1440}
136+
height={1000}
137+
variant="result"
138+
/>
139+
140+
Each decision applies to that proposal. Changing its account or destination requires a new proposal. An action can still fail if your account is disconnected or an administrator changes access before execution. If the provider outcome is unknown, check the original app before asking Assistant to repeat a write.
141+
142+
Configure persistent **Allow**, **Ask**, or **Block** preferences under **Integrations → Tool permissions** for your account. See [tool permissions](/search/connect-your-account#tool-permissions).
125143

126144
## Start from a document
127145

‎apps/docs/content/docs/search/connect-your-account.mdx‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ After your admin adds a source in **Settings → Sources**, connect your own acc
1212
1. Join the Sim organization through its invitation or SSO. Use the verified email required by the provider connection.
1313
2. Open **Integrations**, find the provider, and select **Connect**.
1414
3. Complete authorization in the new tab. If the popup is blocked, allow it and select **Connect** again.
15-
4. Return to **Search** or **Home** and search for content your account can open. Read a result and follow its source link.
15+
4. Return to **Search** or **Search → Assistant** and search for content your account can open. Read a result and follow its source link.
1616

1717
<Image
1818
src="/static/search/connect-confluence.webp"
@@ -39,10 +39,36 @@ You do not choose repositories, channels, labels, or an indexing method during p
3939
| Confluence service account | Connect Confluence. Both your account and the service connection must read the selected content. |
4040
| Coda | Connect personal Coda MCP. Service mode also verifies the parent document with its REST token. |
4141
| GitLab | No personal connection. Your verified Sim email must match current GitLab identity and permissions, or the admin's CSV mapping and project grant. |
42-
| [Generic Secrets, Member mode](/search/generic-secrets) | Select **Manage secrets** in Integrations and save your own values for Build and Plan. |
42+
| [Generic Secrets, Member mode](/search/generic-secrets) | Select **Manage secrets** in Integrations and save your own values for organization Home conversations. |
4343

4444
Gmail, Calendar, and Drive have separate grants. Connecting one does not authorize the others. Except for GitLab's permission model, a service account restricts resources rather than replacing your personal connection.
4545

46+
Creating Jira sprints requires the Jira sprint permission. If your account was connected before sprint actions were added, reconnect it to grant that permission. Existing Jira operations continue to use their existing permissions.
47+
48+
## Tool permissions
49+
50+
When Assistant integration actions are enabled, open **Integrations** and select **Tool permissions** beside your connected account. Set a preference for each operation or use the **Read-only tools** and **Write tools** group controls:
51+
52+
| Preference | Behavior |
53+
| --- | --- |
54+
| **Allow** | Runs without a review prompt, within your account and organization permissions. |
55+
| **Ask** | Waits for you to review the exact proposal. |
56+
| **Block** | Cannot run through Assistant. |
57+
58+
Read-only operations default to Allow; write operations default to Ask. An organization can require review even when you select Allow. A group-level Allow covers the currently listed operation versions; newly added or changed operations still ask. **Reset** restores the group's current default for that operation.
59+
60+
These preferences belong to your account. They cannot grant access to another person's credentials or bypass an administrator's source restrictions. If a related app uses a restricted Search source, direct operations remain unavailable; Assistant can search and read within the configured scope.
61+
62+
<Image
63+
src="/static/search/assistant-tool-permissions.png"
64+
alt="Connected account settings with Read-only tools and Write tools groups and per-tool Allow, Ask, and Block preferences"
65+
width={1440}
66+
height={1000}
67+
variant="result"
68+
/>
69+
70+
Apps used only for actions appear under **Assistant apps**. An admin makes the app available in organization source settings, then each member connects their own account in Integrations.
71+
4672
## Reconnect or disconnect
4773

4874
Use **Reconnect** when a grant expires, is revoked, or needs more scopes. A temporary provider outage does not necessarily require reconnecting.

0 commit comments

Comments
 (0)