Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Apr 2, 2025

Context

This is how the evals system creates tasks programmatically and captures the task output.

Implementation

Screenshots

before after

How to Test

Get in Touch


Important

Adds Unix socket-based IPC to allow processes to interact with the Roo Code API, updating task management and command registration accordingly.

  • IPC Integration:
    • Introduces IpcServer in ipc.ts to handle Unix socket communication.
    • Updates API class in api.ts to support IPC commands like StartNewTask, CancelTask, and CloseTask.
    • Logs IPC activities using outputChannelLog in log.ts.
  • Task Management:
    • Modifies startNewTask in api.ts to handle new task configurations and tab management.
    • Adds task cancellation logic in cancelTask in api.ts.
  • Command Registration:
    • Exports openClineInNewTab in registerCommands.ts for opening tasks in new tabs.
  • Miscellaneous:
    • Updates package.json and e2e/package.json scripts for testing and building.
    • Adjusts test files in e2e/src/suite to align with new task handling logic.

This description was created by Ellipsis for 4bfb81d. It will automatically update as commits are pushed.

@cte cte requested a review from mrubens as a code owner April 2, 2025 19:00
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Apr 2, 2025
@cte cte changed the title Expose access to a the Roo Code API via a unix socket Allow processes to access the Roo Code API via a unix socket Apr 2, 2025
@dosubot dosubot bot added the enhancement New feature or request label Apr 2, 2025
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Apr 2, 2025

This pull request is quite large, with 23 files changed and over 2600 lines added. It includes a variety of changes such as API updates, test refactoring, and IPC server implementation. To make the review process more manageable, could you consider splitting this pull request into smaller, more focused ones?

For example, you might separate the IPC server implementation into its own pull request, and group the test refactoring changes together. This would help reviewers focus on specific areas and ensure a more thorough review. Thank you!

@changeset-bot
Copy link

changeset-bot bot commented Apr 2, 2025

⚠️ No Changeset found

Latest commit: 0489182

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 2, 2025
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@cte cte merged commit a73fce9 into main Apr 2, 2025
12 checks passed
@cte cte deleted the cte/expose-roo-code-api-via-unix-socket branch April 2, 2025 19:42
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Apr 2, 2025
@kmackett
Copy link

kmackett commented Apr 4, 2025

where might one read about the Roo Code API and what can be accessed via the unix socket?

thanks!

@wkordalski
Copy link
Contributor

@cte
I see that this PR removes some Roo Code API functions (esp. getMessages(taskId: string)).
Is it intended? What are the reasons?

We are using getMessages to approximate whether user is running some task in Roo-Code or we can take control over Roo-Code.

We can do without getMessages API function, however it improves our approximations and thus UX.
Therefore we might be interested in reintroducing it, and knowing why it was removed can help us.

@cte
Copy link
Collaborator Author

cte commented Apr 9, 2025

We are using getMessages to approximate whether user is running some task in Roo-Code or we can take control over Roo-Code.

Now that you can run tasks in the sidebar or a tab I thought it made sense to just use the event emitter to collect messages, but if it's more convenient to have a default implementation that collects messages then I can add it back. I should have some time to do that tonight.

@wkordalski
Copy link
Contributor

wkordalski commented Apr 9, 2025

Now that you can run tasks in the sidebar or a tab I thought it made sense to just use the event emitter to collect messages

I think now that your decision can be the right one. Hold on with re-adding the getMessages function.
Probably it will be better if we (RooSpawn) change our approach on this subject than you (Roo-Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants