mirror of
https://github.com/stablyai/orca.git
synced 2026-10-09 08:02:35 +00:00
Add Grok orchestration group routing (#8058)
* docs: design Grok orchestration group * docs: plan Grok orchestration group implementation * fix: add Grok orchestration group * test(orchestration): accept Windows skill newlines * Fix @grok orchestration group matching and remove stale planning docs - Reuse the shared buildAgentNameRe matcher in groups.ts instead of a divergent local regex, so orchestration groups honor the same Windows launcher-suffix rule (grok.exe/.cmd/.bat/.ps1) as the rest of Orca's agent-title detection. - Add test coverage for real Grok OSC title shapes (spinner-collapsed, session titles) and Windows launcher-suffix titles. - Delete the now-completed design and implementation-plan docs for the Grok orchestration group work. --------- Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
This commit is contained in:
@@ -956,7 +956,10 @@ describe('shared agent-hook-listener', () => {
|
||||
'grok',
|
||||
{
|
||||
paneKey: PANE_KEY,
|
||||
payload: { hookEventName: 'user_prompt_submit', prompt: '<user_query>fix the bug</user_query>' }
|
||||
payload: {
|
||||
hookEventName: 'user_prompt_submit',
|
||||
prompt: '<user_query>fix the bug</user_query>'
|
||||
}
|
||||
},
|
||||
'production'
|
||||
)
|
||||
|
||||
@@ -33,7 +33,7 @@ export const AGENT_NAMES = [
|
||||
// `openclaude.exe`; still reject arbitrary dotted path fragments.
|
||||
const WINDOWS_EXECUTABLE_SUFFIX_RE = String.raw`(?:\.(?:exe|cmd|bat|ps1))`
|
||||
|
||||
function buildAgentNameRe(name: string): RegExp {
|
||||
export function buildAgentNameRe(name: string): RegExp {
|
||||
return new RegExp(
|
||||
`(?<![\\w./\\\\-])${name}(?:${WINDOWS_EXECUTABLE_SUFFIX_RE})?(?![\\w./\\\\-])`,
|
||||
'i'
|
||||
|
||||
@@ -38,7 +38,9 @@ describe('isKnownHarnessInjectedUserTurnText', () => {
|
||||
isKnownHarnessInjectedUserTurnText('A message arrived from teammate-b:\n<agent-message>hi')
|
||||
).toBe(true)
|
||||
expect(
|
||||
isKnownHarnessInjectedUserTurnText('Another Claude session sent a message:\n<agent-message>hi')
|
||||
isKnownHarnessInjectedUserTurnText(
|
||||
'Another Claude session sent a message:\n<agent-message>hi'
|
||||
)
|
||||
).toBe(true)
|
||||
expect(isKnownHarnessInjectedUserTurnText('No response requested.')).toBe(true)
|
||||
expect(isKnownHarnessInjectedUserTurnText('[Request interrupted by user]')).toBe(true)
|
||||
@@ -78,7 +80,9 @@ describe('isKnownHarnessInjectedUserTurnText', () => {
|
||||
expect(
|
||||
isKnownHarnessInjectedUserTurnText('<script>alert(1)</script> — why is this flagged?')
|
||||
).toBe(false)
|
||||
expect(isKnownHarnessInjectedUserTurnText('<https://example.com/a-b> what is this?')).toBe(false)
|
||||
expect(isKnownHarnessInjectedUserTurnText('<https://example.com/a-b> what is this?')).toBe(
|
||||
false
|
||||
)
|
||||
expect(isKnownHarnessInjectedUserTurnText('<foo-bar@example.com> sent me this')).toBe(false)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user