Skip to content

chore(agent): de-ship Hangar agent surface to unblock clean build - #161

Merged
Coldaine merged 3 commits into
mainfrom
chore/drop-agent-surface
Aug 3, 2026
Merged

chore(agent): de-ship Hangar agent surface to unblock clean build#161
Coldaine merged 3 commits into
mainfrom
chore/drop-agent-surface

Conversation

@Coldaine

@Coldaine Coldaine commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

User description

Summary

  • Remove the Hangar Agent web route, chat API route, Beast agent server modules, and their tests.
  • Remove the Agent station from the Shell navigation.
  • Keep the mined Beast documentation, probe tooling, cockpit UI, raw WebSocket client, package manifests, and ROS workspace untouched.

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.

  • Source audit: no live /agent, server/beast, @ai-sdk,
    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

  • Removed the Agent page, chat endpoint, server-side robot agent bridge, motion tools, and related tests
  • Removed the Agent station from the main navigation
  • Kept the existing cockpit and other Hangar stations available

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:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

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:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

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.

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.
Copilot AI review requested due to automatic review settings August 3, 2026 13:37
@codeant-ai

codeant-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 9c466cd Aug 03, 2026 · 13:37 13:38

@codeant-ai

codeant-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Remove Hangar agent UI/API and Beast server modules to restore clean build

🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Remove Hangar agent UI route and chat API to eliminate undeclared AI SDK imports.
• Delete Beast agent server modules (ROS bridge/tools/model) and their associated tests.
• Remove Agent station from Shell navigation to prevent dead links.
Diagram

graph TD
  ShellNav["Shell nav"] --> AgentPage["/agent page (removed)"] --> AgentAPI["Agent chat API (removed)"] --> BeastServer["Beast server (removed)"]
  BeastServer --> AIDeps{{"AI SDK"}}
  BeastServer --> Roslib{{"roslib"}}
  ShellNav --> Cockpit["Cockpit UI"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Declare and vendor the missing AI/ROS dependencies
  • ➕ Preserves the Hangar agent surface for continued development/testing
  • ➕ Avoids deleting recently added code and tests
  • ➖ Adds new dependencies and lockfile churn for a feature stated as out-of-scope
  • ➖ Increases maintenance surface and build size for unused functionality
2. Keep code but remove hard imports (dynamic import + runtime feature gate)
  • ➕ Retains agent code behind a flag while keeping clean builds without deps
  • ➕ Allows incremental reintroduction later
  • ➖ More complex and easier to regress via bundler/typechecking edge cases
  • ➖ Still leaves dead routes/UI unless fully gated at routing and nav layers
3. Move agent surface into a separate package/app
  • ➕ Clean separation of concerns; agent dependencies isolated
  • ➕ Main cockpit build stays lean and stable
  • ➖ Higher upfront restructuring cost
  • ➖ Requires build/deploy orchestration for multi-package setup

Recommendation: Given agent work is explicitly out of scope and currently breaks clean builds due to undeclared dependencies, fully de-shipping the UI/API/server modules is the most reliable way to unblock CI and image builds. If agent work resumes soon, consider the separate-package approach to prevent dependency leakage into the cockpit app.

Files changed (1) +0 / -2

Bug fix (1) +0 / -2
Shell.tsxRemove Agent station from Shell navigation +0/-2

Remove Agent station from Shell navigation

• Drops the /agent navigation entry and its Bot icon import so the UI no longer exposes the removed agent route.

src/components/Shell.tsx

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /agent UI route and /api/agent/chat endpoint.
  • 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/app/agent/page.tsx
@@ -1,19 +0,0 @@
import { isHangarAgentEnabled, readAgentModelConfig } from '@/server/beast/model';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Informational

1. Stale /agent documentation 🐞 Bug ⚙ Maintainability
Description
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.
Code

src/app/agent/page.tsx[L1-3]

-import { isHangarAgentEnabled, readAgentModelConfig } from '@/server/beast/model';
-import { AgentClient } from './AgentClient';
-
Evidence
The app navigation no longer includes an /agent station (indicating the route is intentionally
removed), but the control-topology doc still enumerates “/agent” and a server-side roslib singleton
as Hangar-owned surfaces, which is now inaccurate post-PR.

src/components/Shell.tsx[42-51]
docs/beast-control-topology.md[45-49]
docs/beast-control-topology.md[81-86]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread src/app/agent/page.tsx
Comment on lines -1 to -3
import { isHangarAgentEnabled, readAgentModelConfig } from '@/server/beast/model';
import { AgentClient } from './AgentClient';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Informational

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@Coldaine

Coldaine commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

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.

@Coldaine

Coldaine commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

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.

@Coldaine
Coldaine merged commit a89da75 into main Aug 3, 2026
1 of 3 checks passed
@Coldaine
Coldaine deleted the chore/drop-agent-surface branch August 3, 2026 15:06
Coldaine added a commit that referenced this pull request Aug 3, 2026
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>
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.

2 participants