-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(mship): add parallel subagents, improve streaming performance #5122
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
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1a4518a
feat(subagents): add support for parallel subagents
Sg312 b6c3018
fix(subagents): address parallel-subagent bugs
Sg312 5f836da
progress on streaming refactor
icecrasher321 d96638e
improvement(subagents): update comment to reflect new go feature flag
Sg312 c4180cd
Merge branch 'dev' of github.com:simstudioai/sim into dev
icecrasher321 1872b29
debug mode progress
icecrasher321 f09cd98
remove debug logs
icecrasher321 a43c647
fix(validation): add escape annotation
Sg312 ed9d5ba
improvement(code): remove dead fallbacks
icecrasher321 9f2cc02
fix subagent lane fallback issue
icecrasher321 9199758
fix(mothership): increase default redis event limit to 100k from 5k
icecrasher321 dfe879c
fix(mothership): streaming invariant projection enforcement
icecrasher321 45a53c4
Merge branch 'staging' into dev
icecrasher321 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,6 +196,7 @@ | |
| "sixtyfour", | ||
| "slack", | ||
| "smtp", | ||
| "sportmonks", | ||
| "sqs", | ||
| "square", | ||
| "ssh", | ||
|
|
||
1,517 changes: 1,517 additions & 0 deletions
1,517
apps/docs/content/docs/en/integrations/sportmonks.mdx
Large diffs are not rendered by default.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
.../[workspaceId]/home/components/message-content/components/agent-group/agent-group.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| /** | ||
| * @vitest-environment node | ||
| */ | ||
| import { describe, expect, it } from 'vitest' | ||
| import type { ToolCallData, ToolCallStatus } from '../../../../types' | ||
| import type { AgentGroupItem } from './agent-group' | ||
| import { isAgentGroupResolved } from './agent-group' | ||
|
|
||
| let toolSeq = 0 | ||
|
|
||
| function tool(status: ToolCallStatus): AgentGroupItem { | ||
| toolSeq += 1 | ||
| const data: ToolCallData = { | ||
| id: `tool-${toolSeq}`, | ||
| toolName: 'grep', | ||
| displayTitle: 'Searching', | ||
| status, | ||
| } | ||
| return { type: 'tool', data } | ||
| } | ||
|
|
||
| function text(content: string): AgentGroupItem { | ||
| return { type: 'text', content } | ||
| } | ||
|
|
||
| function group(items: AgentGroupItem[], isDelegating = false): AgentGroupItem { | ||
| return { | ||
| type: 'agent_group', | ||
| group: { | ||
| id: `group-${toolSeq}`, | ||
| agentName: 'deploy', | ||
| agentLabel: 'Deploy', | ||
| items, | ||
| isDelegating, | ||
| isOpen: true, | ||
| }, | ||
| } | ||
| } | ||
|
|
||
| describe('isAgentGroupResolved', () => { | ||
| it('is unresolved when there is no work yet', () => { | ||
| expect(isAgentGroupResolved([])).toBe(false) | ||
| expect(isAgentGroupResolved([text('thinking...')])).toBe(false) | ||
| }) | ||
|
|
||
| it('resolves once every own tool is terminal', () => { | ||
| expect(isAgentGroupResolved([tool('success')])).toBe(true) | ||
| expect(isAgentGroupResolved([tool('success'), tool('error')])).toBe(true) | ||
| }) | ||
|
|
||
| it('stays unresolved while any own tool is still executing', () => { | ||
| expect(isAgentGroupResolved([tool('success'), tool('executing')])).toBe(false) | ||
| }) | ||
|
|
||
| it('resolves a parent whose only work is a finished child group', () => { | ||
| expect(isAgentGroupResolved([group([tool('success')])])).toBe(true) | ||
| }) | ||
|
|
||
| it('stays unresolved while a nested child is still delegating', () => { | ||
| expect(isAgentGroupResolved([group([], true)])).toBe(false) | ||
| }) | ||
|
|
||
| it('stays unresolved while a nested child has an executing tool', () => { | ||
| expect(isAgentGroupResolved([group([tool('executing')])])).toBe(false) | ||
| }) | ||
|
|
||
| it('resolves deep nesting only when every descendant is terminal', () => { | ||
| expect(isAgentGroupResolved([group([group([tool('success')])])])).toBe(true) | ||
| expect(isAgentGroupResolved([group([group([tool('executing')])])])).toBe(false) | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...p/workspace/[workspaceId]/home/components/message-content/components/agent-group/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| export type { AgentGroupItem, NestedAgentGroup } from './agent-group' | ||
| export { AgentGroup } from './agent-group' | ||
| export { AgentGroup, isAgentGroupResolved } from './agent-group' | ||
| export { CircleStop } from './tool-call-item' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.