Skip to content

Commit 2942439

Browse files
committed
feat(search): add personal assistant actions and per-tool permissions
1 parent 967e363 commit 2942439

177 files changed

Lines changed: 37561 additions & 746 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ 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 MSHIP_SEARCH_INTEGRATION_TOOLS=true
208+
bunx --no-install playwright install --with-deps chromium
206209
export INTERNAL_API_SECRET=desktop-inbox-http-ci-local-secret-at-least-32-characters
207210
export DB_TX_TRIPWIRE=throw
208211
start_app desktop-inbox 3019 'desktop executor' record-http-status
@@ -212,6 +215,11 @@ case "$group" in
212215
DESKTOP_INBOX_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
213216
DESKTOP_INBOX_E2E_REPORT_PATH="$report_dir/desktop-inbox-http-report.json" \
214217
bun run test:desktop-inbox:e2e
218+
ASSISTANT_ACTIONS_E2E_BASE_URL="$local_app_url" \
219+
ASSISTANT_ACTIONS_E2E_DATABASE_URL="$DATABASE_URL" \
220+
ASSISTANT_ACTIONS_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
221+
ASSISTANT_ACTIONS_E2E_REPORT_PATH="$report_dir/assistant-actions-ui-report.json" \
222+
bun --no-env-file scripts/test-assistant-actions-e2e.ts
215223
;;
216224

217225
project-files)

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Sim requests these scopes when someone connects a Jira account. For a self-hoste
2929
| `read:jira-user` | View Jira user profiles, including email addresses |
3030
| `read:jira-work` | View Jira projects and issues, and search issues |
3131
| `write:jira-work` | Create, edit, and delete Jira issues, comments, and worklogs |
32+
| `write:sprint:jira-software` | Create and update Jira Software sprints |
3233
| `read:me` | Read profile information |
3334
| `offline_access` | Access account when not using the application |
3435
| `read:issue.vote:jira` | Read Jira issue votes |
@@ -353,10 +354,44 @@ 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+
| `sprint` | json | Created sprint with id, self, state, name, originBoardId, and optional goal, startDate, endDate |
384+
| ↳ `id` | number | Sprint ID |
385+
| ↳ `self` | string | Sprint REST URL |
386+
| ↳ `state` | string | Initial state: future |
387+
| ↳ `name` | string | Sprint name |
388+
| ↳ `originBoardId` | number | Origin board ID |
389+
| ↳ `goal` | string | Sprint goal |
390+
| ↳ `startDate` | string | Planned start timestamp |
391+
| ↳ `endDate` | string | Planned end timestamp |
392+
393+
</ReferenceDetails>
394+
360395
### Jira Bulk Read
361396

362397
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
@@ -27,6 +27,7 @@ Sim requests these scopes when someone connects a Jira account. For a self-hoste
2727
| `read:jira-user` | View Jira user profiles, including email addresses |
2828
| `read:jira-work` | View Jira projects and issues, and search issues |
2929
| `write:jira-work` | Create, edit, and delete Jira issues, comments, and worklogs |
30+
| `write:sprint:jira-software` | Create and update Jira Software sprints |
3031
| `read:me` | Read profile information |
3132
| `offline_access` | Access account when not using the application |
3233
| `read:issue.vote:jira` | Read Jira issue votes |

‎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: 27 additions & 1 deletion
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"
@@ -43,6 +43,30 @@ You do not choose repositories, channels, labels, or an indexing method during p
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+
## Tool permissions
47+
48+
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:
49+
50+
| Preference | Behavior |
51+
| --- | --- |
52+
| **Allow** | Runs without a review prompt, within your account and organization permissions. |
53+
| **Ask** | Waits for you to review the exact proposal. |
54+
| **Block** | Cannot run through Assistant. |
55+
56+
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.
57+
58+
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.
59+
60+
<Image
61+
src="/static/search/assistant-tool-permissions.png"
62+
alt="Connected account settings with Read-only tools and Write tools groups and per-tool Allow, Ask, and Block preferences"
63+
width={1440}
64+
height={1000}
65+
variant="result"
66+
/>
67+
68+
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.
69+
4670
## Reconnect or disconnect
4771

4872
Use **Reconnect** when a grant expires, is revoked, or needs more scopes. A temporary provider outage does not necessarily require reconnecting.
@@ -64,3 +88,5 @@ Live Search calls the provider for each request. Waiting for a Sim sync or retry
6488

6589
- [Search access and freshness](/search#access-and-freshness)
6690
- [Knowledge-base connectors](/knowledgebase/connectors)
91+
92+
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.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ Sim Search helps you find and use information from your company's connected apps
1010
| You want to… | Start here |
1111
| --- | --- |
1212
| Find and browse documents | [Find content](/search/find-content): open **Search** in the organization sidebar. |
13-
| Get an explanation or compare sources | [Ask questions](/search/ask-questions): open **Home**; choose **Search** if the conversation-mode menu is shown. |
13+
| Get an explanation or compare sources | [Ask questions](/search/ask-questions): open **Search → Assistant**. |
1414
| Understand a particular result | Open the result's **… → Summarize** menu, then ask follow-up questions. |
1515
| Create a draft from your findings | [Draft from your sources](/search/ask-questions#draft-from-your-sources): ask for an update, email, FAQ, or presentation outline in the conversation. |
1616
| Prepare for a meeting | [Combine Calendar and project sources](/search/ask-questions#prepare-for-a-meeting) into a brief with decisions and reading material. |
1717

18-
Members without builder access start in Search automatically on **Home** and can ask immediately without a mode menu.
18+
**Search** contains two views: **Search** for browsing results and **Assistant** for questions, summaries, and supported actions.
1919

2020
For example, ask “Why did the Atlas launch date change? Use the project documents in Confluence and Google Drive, and cite the sources.” Open the citations to check the evidence, then continue with “What does each owner need to do before launch?”
2121

22-
Search mode retrieves and reads information and drafts text in your conversation. It does not send the draft or change source records. You choose where to use the reviewed result.
22+
Assistant retrieves information and drafts text in your conversation. When integration actions are enabled, it can also use your connected accounts. Reads run silently and writes ask for review by default; [review actions and configure tool permissions](/search/ask-questions#review-actions).
2323

2424
Start with [Get started](/search/quickstart), then explore [Ask questions](/search/ask-questions) for more examples. [Connect your account](/search/connect-your-account) if your source requires a personal connection. The source setup below is for organization admins.
2525

‎apps/docs/content/docs/search/quickstart.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ You can also search with a question:
2727
2828
## 3. Summarize what you found
2929

30-
Open a result's **…** menu and choose **Summarize**. Sim opens a conversation on Home and uses that document as the starting point.
30+
Open a result's **…** menu and choose **Summarize**. Sim opens a conversation in Search → Assistant and uses that document as the starting point.
3131

3232
Read the summary and follow its citations to check the source. Then ask:
3333

3434
> Turn the onboarding steps in this document into a checklist. Keep the source references.
3535
3636
## 4. Ask a broader question
3737

38-
For a question across documents, open **Home**. If a conversation-mode menu is shown, select **Search** before sending your first message. Members without builder access start in Search automatically and can ask immediately:
38+
For a question across documents, open **Search → Assistant** and ask:
3939

4040
> What does a new account owner need to know about customer onboarding? Find the relevant guides, summarize the key steps, and cite the sources.
4141
71.8 KB
Loading
79.5 KB
Loading

‎apps/sim/app/api/copilot/tool-permission/route.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ async function applyDecision(
5656
logger.warn('Failed to fetch async tool call', { toolCallId, error: getErrorMessage(err) })
5757
return null
5858
})
59-
if (!existing) return null
59+
if (!existing || existing.assistantAction) return null
6060

6161
const run = await getRunSegment(existing.runId).catch((err) => {
6262
logger.warn('Failed to fetch run segment', {

0 commit comments

Comments
 (0)