chore(agent): de-ship Hangar agent surface to unblock clean build - #161
Conversation
The agent surface from PR #157 imports ai, @ai-sdk/react, @ai-sdk/openai-compatible, and roslib, but those packages were never declared in package.json. That breaks npm run check and the clean image build with missing-module errors. Agent work is out of scope for the cockpit-parity plan, which is the human-driven command deck. Remove the agent web surface, server modules, and their tests while keeping the mined docs and probe tooling. The cockpit remains unaffected because it uses a raw WebSocket client.
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
PR Summary by QodoRemove Hangar agent UI/API and Beast server modules to restore clean build
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
There was a problem hiding this comment.
Pull request overview
This PR removes the unfinished Hangar “Agent” surface (UI route, API route, and server-side BEAST agent bridge/modules) to restore clean npm run check / Docker image builds without adding undeclared AI/roslib dependencies. This aligns with the repo’s focus on the cockpit-parity command deck while keeping cockpit and probe tooling intact.
Changes:
- Removed
/agentUI route and/api/agent/chatendpoint. - Deleted
src/server/beast/*agent/bridge/model/tooling modules plus their Vitest coverage. - Removed the “Agent” station from the Shell navigation.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/server/beast/types.ts | Removed agent bridge/tooling types and motion caps constants. |
| src/server/beast/tools.ts | Removed AI SDK tool definitions and approval metadata helpers. |
| src/server/beast/schemas.ts | Removed Zod schemas for agent motion tool inputs. |
| src/server/beast/ros-singleton.ts | Removed server-side rosbridge singleton client and reconnect logic. |
| src/server/beast/prompts.ts | Removed agent system prompt string. |
| src/server/beast/motion-gate.ts | Removed motion gating helper utilities. |
| src/server/beast/model.ts | Removed agent model config/env gating and OpenAI-compatible model creation. |
| src/components/Shell.tsx | Removed “Agent” nav entry and its icon import. |
| src/app/api/agent/chat/route.ts | Removed the agent chat API route that depended on undeclared AI packages. |
| src/app/agent/page.tsx | Removed the /agent page that wired env/config into the client. |
| src/app/agent/AgentClient.tsx | Removed the client UI that depended on @ai-sdk/react / ai. |
| src/tests/ros-singleton.test.ts | Removed tests for the rosbridge singleton behavior. |
| src/tests/agent-tools.test.ts | Removed tests for agent tool schemas, approval gating, and motion honesty gates. |
| src/tests/agent-model.test.ts | Removed tests for agent model env parsing and enablement gating. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The repo migrated from the Coldaine namespace to the MooseGooseConsulting organization; the old ghcr.io/coldaine/robot-overview package path no longer authorizes the repo's GITHUB_TOKEN (permission_denied: installation does not exist), which was failing the image build+push on every PR.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c466cd5b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,19 +0,0 @@ | |||
| import { isHangarAgentEnabled, readAgentModelConfig } from '@/server/beast/model'; | |||
There was a problem hiding this comment.
Retire the documented agent route with the implementation
When an operator follows the repository's control documentation after this deletion, /agent now returns 404 even though docs/beast-control-topology.md:47,60,83 still presents the agent chat, Next.js route, and roslib singleton as active, and robot/beast/ros2_ws/docs/BEAST.md:26 still assigns /agent to the repository root. Update these owner documents or clearly mark the architecture as historical while de-shipping the route so they no longer direct users to a nonexistent control surface.
AGENTS.md reference: AGENTS.md:L110-L116
Useful? React with 👍 / 👎.
Code Review by Qodo
1. Stale /agent documentation
|
| import { isHangarAgentEnabled, readAgentModelConfig } from '@/server/beast/model'; | ||
| import { AgentClient } from './AgentClient'; | ||
|
|
There was a problem hiding this comment.
1. Stale /agent documentation 🐞 Bug ⚙ Maintainability
The PR removes the /agent route and related server modules, but docs still describe Hangar as owning an “/agent” surface (and a server-side roslib singleton). This mismatch will send readers/operators to a now-nonexistent route and misrepresent the current control topology.
Agent Prompt
## Issue description
This PR removes the `/agent` UI/API and related server-side agent modules, but `docs/beast-control-topology.md` still lists `/agent` (and a “Next.js route + roslib singleton”) as part of Hangar’s current surface.
## Issue Context
After this change, `/agent` will 404, and the server-side `roslib` singleton no longer exists, so the topology doc should either remove those references or explicitly mark them as de-shipped.
## Fix Focus Areas
- docs/beast-control-topology.md[45-49]
- docs/beast-control-topology.md[81-86]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6511980d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| env: | ||
| REGISTRY: ghcr.io | ||
| IMAGE_NAME: coldaine/robot-overview | ||
| IMAGE_NAME: moosegooseconsulting/robot-overview |
There was a problem hiding this comment.
Update deployments to use the new image namespace
When the next main image is deployed, this workflow publishes its digest under ghcr.io/moosegooseconsulting/robot-overview, but docs/deploy.md:24,69-72 still directs the operator to bump the digest of the currently documented ghcr.io/coldaine/robot-overview manifest. Container digests are repository-scoped, so retaining the old repository path with a digest produced here will make the rollout fail to pull; update the deployment instructions and the external manifest to switch both the repository path and digest.
AGENTS.md reference: AGENTS.md:L110-L115
Useful? React with 👍 / 👎.
|
The source/build portion now passes after removing the undeclared agent surface. The remaining hosted failure is GHCR: pushing ghcr.io/moosegooseconsulting/robot-overview returns 403 Forbidden. The organization package exists but its Actions/package access is not granted to this repository; this requires org package-admin settings, not a source-code change. |
|
Package access is fixed: MooseGooseConsulting/RobotOverview now has Write Actions access to the robot-overview GHCR package. Rerun attempt 3 passed the image build and push. The PR remains blocked only because main requires the GitGuardian Security Checks status, which is not being emitted on this PR; no bypass was used. |
The agent surface (PR #157) imports ai, @ai-sdk/react, @ai-sdk/openai-compatible, and roslib, but those packages were never declared in package.json. That broke npm run check and the clean image build with missing-module errors, which the de-ship PR #161 worked around by deleting the agent. Restore the agent surface instead and declare the four missing deps (versions from 1c7b75b): ai ^7.0.48, @ai-sdk/react ^4.0.51, @ai-sdk/openai-compatible ^3.0.20, roslib ^2.1.0. Clean npm ci + full npm run check (lint, typecheck, vitest, next build) now passes. Co-authored-by: AI Assistant <ai@example.com>
User description
Summary
Why
The agent surface introduced in PR #157 imports �i, @ai-sdk/react, @ai-sdk/openai-compatible, and
oslib, but those packages were deliberately never declared in package.json. The missing modules break
pm run check and the clean image build. Agent work is out of scope for the cockpit-parity plan, which is the human-driven command deck.
Verification
pm run lint: passed with 0 errors and 3 pre-existing warnings.
pm run typecheck: passed.
px vitest run: 37 files, 424 tests passed.
pm run build: passed.
oslib, or rom 'ai' references remain in src.
No merge is performed by this PR creation.
CodeAnt-AI Description
Remove the unfinished Hangar agent surface and restore clean builds
What Changed
Impact
✅ Clean builds without missing agent dependencies✅ No unsupported Agent page or chat endpoint✅ Cockpit navigation remains available💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.