-
Notifications
You must be signed in to change notification settings - Fork 4k
feat(agent): drop the integrations sub-agent — search and call connected actions directly #6447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5883dfe
3fd5aa6
6cb0fd0
09729c4
1afd2a0
0ab0d7f
7df470b
641dfdb
de719ef
df56a37
dec4dc6
e46cabc
fb5a846
4fa1adf
32aad8e
f7fe302
70618db
e3133c6
6b1a1a7
598938d
1cd6d89
91cd0eb
0605f17
09078cc
63ed318
e607cd4
2eeea2e
7b08d05
050e030
b1da249
5027e3d
de8a58e
641db94
d905eee
cfc1da5
c830a43
a1de5c5
c565771
9461e44
4f81a2c
06786d9
1d25092
263adad
d8f2a9e
059a6d3
dcf8363
6d6bd1d
aae205d
7d9ffca
a62a8fe
d7d062a
f895a99
3a77549
d34e8e4
9a8a000
f94ffcf
4573eba
c745015
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -311,21 +311,23 @@ export function formatTimelineEntry(entry: ToolTimelineEntry): { title: string; | |
| inferIntegrationNameFromPrompt(parsedArgs?.prompt) ?? | ||
| inferIntegrationName(entry.name); | ||
|
|
||
| let title: string; | ||
| if (provider) { | ||
| title = integrationActivityTitle(provider); | ||
| } else if (entry.name === 'delegate_to_integrations_agent') { | ||
| const rawToolkit = parsedArgs?.toolkit?.trim(); | ||
| title = rawToolkit | ||
| ? integrationActivityTitle(humanizeIdentifier(rawToolkit)) | ||
| : 'Checking your connected app'; | ||
| } else { | ||
| title = humanizeIdentifier(entry.name); | ||
| } | ||
|
|
||
| const title = provider ? integrationActivityTitle(provider) : humanizeIdentifier(entry.name); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve the integrations-agent delegation label This removes the special handling for [RULE] timeline-label-regression · |
||
| return { title, detail: entry.detail ?? parsedArgs?.prompt }; | ||
| } | ||
|
|
||
| // A connected-service action called directly (`GMAIL_SEND_EMAIL`, | ||
| // `SLACK_SEND_MESSAGE`): the orchestrator finds these through | ||
| // `tool_search` and calls them itself, so this is the row a user sees | ||
| // for "send that email". Label it by the service, with the action as | ||
| // the detail, rather than a raw humanised slug. | ||
| const directAction = inferIntegrationActionName(entry.name); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an e2e test for the new timeline integration action labelling The new direct-action formatting path has no test coverage in the indexed test graph. Add an end-to-end or focused formatter test covering representative actions, including a multi-word toolkit and the GOOGLECALENDAR form, so future changes cannot silently revert service/action labelling. [RULE] missing-regression-test · |
||
| if (directAction) { | ||
| return { | ||
| title: integrationActivityTitle(directAction.provider), | ||
| detail: entry.detail ?? directAction.action, | ||
| }; | ||
| } | ||
|
|
||
| // ── Tool-specific formatting with args-derived detail ────────────── | ||
| // Pass the completed result text so args-aware formatters can surface | ||
| // details only known post-execution (e.g. the resolved search provider). | ||
|
|
@@ -646,6 +648,32 @@ function inferIntegrationName(input?: string): string | undefined { | |
| return undefined; | ||
| } | ||
|
|
||
| /** | ||
| * Split a Composio action slug (`GMAIL_SEND_EMAIL`) into its known provider | ||
| * and a readable action ("Send email"). `undefined` for anything that is not | ||
| * an upper-case `<TOOLKIT>_<ACTION>` name on a known toolkit, so ordinary | ||
| * tools and unknown toolkits keep their generic label. | ||
| */ | ||
| function inferIntegrationActionName( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an e2e test for the new timeline integration action labelling The new [RULE] e2e-uncovered · |
||
| name: string | ||
| ): { provider: string; action: string } | undefined { | ||
| if (!/^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+$/.test(name)) return undefined; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Recognize GOOGLECALENDAR action prefixes A direct action such as [RULE] incomplete-toolkit-recognition · |
||
| // Try the longest toolkit prefix first (`GOOGLE_CALENDAR_...`), then the | ||
| // shortest (`GMAIL_...`). | ||
| const parts = name.split('_'); | ||
| for (let i = Math.min(parts.length - 1, 2); i >= 1; i -= 1) { | ||
| const toolkit = parts.slice(0, i).join('_'); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Recognize the GOOGLECALENDAR action prefix Composio uses action names such as [RULE] incomplete-provider-recognition · |
||
| if (KNOWN_TOOLKIT_RE.test(toolkit)) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Recognize the GOOGLECALENDAR action prefix Composio action names can use the [RULE] integration-toolkit-parsing · |
||
| const action = parts.slice(i).join(' ').toLowerCase(); | ||
| return { | ||
| provider: normalizeIntegrationName(toolkit), | ||
| action: action.charAt(0).toUpperCase() + action.slice(1), | ||
| }; | ||
| } | ||
| } | ||
| return undefined; | ||
| } | ||
|
|
||
| function integrationActivityTitle(provider: string): string { | ||
| switch (provider) { | ||
| case 'GitHub': | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,9 +124,11 @@ name: | |
| - Control: `steer_subagent`, `continue_subagent`, `close_subagent`, | ||
| `wait_subagent`, `wait`, `wait_loop`, `list_subagents`. | ||
| - Delegation: `DelegateGraphTool` (`delegate_graph.rs`), | ||
| `ArchetypeDelegationTool` and `SkillDelegationTool` (names set per | ||
| instance, e.g. `delegate_to_integrations_agent`), `CollapsedDelegationTool` | ||
| (`delegate_to`), and `agent_prepare_context`. | ||
| `ArchetypeDelegationTool` (name set per instance, e.g. `research`), | ||
| `CollapsedDelegationTool` (`delegate_to`), and `agent_prepare_context`. | ||
| There is no integrations delegate: connected Composio actions are | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the integrations delegation description consistent This assertion conflicts with the existing orchestration surface: [RULE] inaccurate-documentation · |
||
| `Deferred` tools on the orchestrator's own belt, found through | ||
| `tool_search` and called directly (`tools/orchestrator_tools.rs`). | ||
|
|
||
| `dispatch.rs` (`dispatch_subagent`, the shared spawn path every tool above | ||
| calls), `awaiting_user.rs` (the awaiting-user envelope), and | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserve the integrations-agent delegation label
When
entry.nameisdelegate_to_integrations_agentand no toolkit can be inferred from the arguments or prompt,provideris undefined and this now rendersDelegate To Integrations Agent. The removed branch intentionally displayedChecking your connected app(or the selected integration's activity title), so ordinary integration delegations lose their user-facing label. Keep the special case while adding the direct-action handling.Additional
securityobservationPreserve toolkit-specific labels for integration delegation
[RULE] preserve-existing-behavior
For
delegate_to_integrations_agent,provideris derived only from the prompt or the entry name. The removed branch usedparsedArgs?.toolkitto label the activity, so requests with a toolkit but no recognizable provider in the prompt now display the genericDelegate to integrations agenttitle instead of the connected service. Retain the toolkit-based fallback when formatting this delegation entry.[RULE] behavior-regression ·