Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Allow for dynamic workspace selection for muxing#1248

Closed
JAORMX wants to merge 1 commit intomainfrom
workspace-header
Closed

Allow for dynamic workspace selection for muxing#1248
JAORMX wants to merge 1 commit intomainfrom
workspace-header

Conversation

@JAORMX
Copy link
Copy Markdown
Contributor

@JAORMX JAORMX commented Mar 7, 2025

This allows for the muxing endpoint to detect the X-CodeGate-Workspace
header in requests. This will allow CodeGate to search for that
workspace and use it's routing configuration explicitly.

If the a workspace is requested and it does not exist, a warning will be
issued and the active workspace will be defaulted to.

The use case for this is for background agents to be able to select a
relevant workspace and not need to disrupt the user's IDE session.

Note that this is not a persistent session and merely a dynamic runtime
setting.

Signed-off-by: Juan Antonio Osorio ozz@stacklok.com

This allows for the muxing endpoint to detect the `X-CodeGate-Workspace`
header in requests. This will allow CodeGate to search for that
workspace and use it's routing configuration explicitly.

If the a workspace is requested and it does not exist, a warning will be
issued and the active workspace will be defaulted to.

The use case for this is for background agents to be able to select a
relevant workspace and not need to disrupt the user's IDE session.

Note that this is not a persistent session and merely a dynamic runtime
setting.

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@JAORMX JAORMX marked this pull request as draft March 7, 2025 13:17
@lukehinds
Copy link
Copy Markdown

How do you see this work with filters?

@JAORMX
Copy link
Copy Markdown
Contributor Author

JAORMX commented Mar 7, 2025

So, you could have several workspaces with different rules and filters. This would allow an agent like Stitch to choose the workspace they want to take into use; so one wouldn't disrupt the user's IDE session if they have one open. Next week I'll do a rule matcher that selects from a "label" which will simply be an HTTP header. Then from stitch we can set the header per expert.

@JAORMX JAORMX closed this Mar 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants