Skip to content

Route agent utility commands through core - #321

Merged
TraderSamwise merged 2 commits into
masterfrom
chore/core-sidecar-next-46
Jul 5, 2026
Merged

Route agent utility commands through core#321
TraderSamwise merged 2 commits into
masterfrom
chore/core-sidecar-next-46

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • route aimux input/ps/rename/migrate through daemon core text routes
  • add installed shim fast paths with healthy no-spawn and stale fallback coverage
  • document the agent utility command ownership cutover

Verification

  • yarn typecheck
  • yarn lint
  • yarn vitest src/daemon.test.ts src/installed-shim.test.ts src/core-command-ownership.test.ts
  • yarn vitest
  • yarn build

Summary by CodeRabbit

  • New Features

    • Added new aimux commands for agent workflows: input, ps, rename, and migrate.
    • These commands now support an optional --project <path> argument for targeting a specific project.
    • Improved output for agent status and command results, including a more detailed ps view and clearer result messages.
  • Bug Fixes

    • Improved routing so these commands work reliably from the CLI without unnecessary fallback behavior.

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 5, 2026 2:32pm

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 39 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4f5badc0-c789-41c1-a01d-88a786fb0422

📥 Commits

Reviewing files that changed from the base of the PR and between 632bea0 and 24294df.

📒 Files selected for processing (5)
  • scripts/installed-aimux-shim.sh
  • src/core-text.ts
  • src/daemon.test.ts
  • src/daemon.ts
  • src/installed-shim.test.ts
📝 Walkthrough

Walkthrough

Adds four new agent utility commands (input, ps, rename, migrate) end-to-end: new core API route constants, installed shim fast-path handlers, daemon route handlers with text renderers, CLI --project flag support, and corresponding tests and documentation updates.

Changes

Agent Utility Commands (input/ps/rename/migrate)

Layer / File(s) Summary
Route contract and text renderers
src/core-command-contract.ts, src/core-text.ts
Adds four /core/agents/*-text route constants and new payload interfaces plus renderer functions for agent input, ps, rename, and migrate output.
Daemon route handlers and dispatch
src/daemon.ts, src/daemon.test.ts
Adds LOCAL_CLI_TEXT_ROUTES entries, four private route handlers proxying to project-service agent endpoints, routeRequest() dispatch branches, and tests verifying proxying and response shapes without starting core actors.
Installed shim fast paths
scripts/installed-aimux-shim.sh, src/core-command-ownership.test.ts, src/installed-shim.test.ts, docs/command-ownership-inventory.md
Adds aimux_try_agent_* handler functions, dispatch arms for input/ps/rename/migrate, corresponding fast-path/ownership tests, and inventory documentation rows.
CLI project-scoped commands
src/main.ts
Adds optional --project flag to aimux input and aimux ps, resolving and forwarding projectRoot instead of always initializing local paths.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Shim as Installed Shim
  participant Daemon
  participant ProjectService as Project Service

  Shim->>Daemon: POST/GET /core/agents/*-text (project, sessionId, text/label/worktreePath)
  Daemon->>ProjectService: proxy to PROJECT_API_ROUTES.agents.* (ensureProject: false)
  ProjectService-->>Daemon: JSON payload
  Daemon-->>Shim: rendered text or JSON (via renderCoreAgent*Lines)
Loading

Possibly related PRs

  • TraderSamwise/aimux#298: Both PRs modify the installed shim's CLI dispatch logic in scripts/installed-aimux-shim.sh, touching the same command-dispatch code paths.
  • TraderSamwise/aimux#308: Both PRs extend the same daemon LOCAL_CLI_TEXT_ROUTES/routeRequest() core-text routing infrastructure with new fast-path route handlers.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: routing agent utility commands through core.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/core-sidecar-next-46

Comment @coderabbitai help to get the list of available commands.

@TraderSamwise

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@TraderSamwise
TraderSamwise merged commit 9272417 into master Jul 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant