feat(ego-browser): expose listProfiles and thread profileId through task-space creation - #281
Open
deepanshu1422 wants to merge 1 commit into
Open
Conversation
…ask-space creation listProfiles() was only reachable via the undocumented ego.listProfiles() CDP call, and useOrCreateTaskSpace/newTaskSpace silently dropped a profileId argument, always binding new spaces to the default profile — the only reliable way to target a specific profile was the low-level ego.createTaskSpace(name, profileId). Add a documented listProfiles() helper (mirrors listTaskSpaces), and thread an optional profileId through newTaskSpace/useOrCreateTaskSpace so they actually honor it instead of silently ignoring it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
listProfiles()helper (mirrorslistTaskSpaces()), reachable viaego.listProfiles()under the hood — previously only reachable through the undocumented rawego.listProfiles()call.profileIdthroughnewTaskSpace(name, profileId)/useOrCreateTaskSpace(nameOrId, profileId)so they actually bind a new task space to a requested browser profile instead of silently ignoring the argument and always using the default profile.Why
Hit this directly: asked an agent to open a task space on a specific ego lite browser profile (e.g. "Deepanshu (Toptal)"), and it silently opened the default profile instead —
useOrCreateTaskSpace(name, { profileId })swallows the option. The only reliable path was the low-levelego.createTaskSpace(name, profileId)(positional args). This wraps that properly at the helper layer.Test plan
npm run typecheckcleannpm test— 315/315 passing, including new coverage forlistProfiles()normalization andprofileIdthreading throughnewTaskSpace/useOrCreateTaskSpacenpm run buildcleanego.listProfiles()/ego.createTaskSpace(name, profileId)work as expected🤖 Generated with Claude Code