You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clean up agent-service code structure and reconcile its types with the frontend #5563
The agent-service/ (Bun/TS) codebase has accumulated structural inconsistencies that hurt readability and risk silent wire-contract bugs.
Code structure
Problem
Detail
Definitions scattered
~25 interfaces/types live in client/tool/util/server files instead of types/
Duplicate definitions
LogicalPlan / PortSchema / InputPortInfo defined twice; AgentSettingsApi is field-for-field identical to UpdateAgentSettingsRequest
Impure "clients"
api/ mixes HTTP clients with types, endpoint config, and JWT helpers; the execution HTTP client lives in agent/tools/, while api/execution-api.ts holds only types
Misleading naming
AgentDelegateConfig is a runtime binding (not config) and is re-declared inline 3× with conflicting shapes; *Config is used for non-config objects
Duplicate logic
jsonToTableFormat and the input/output-shape formatter are duplicated across two files
Inconsistency with the frontend wire contract
The agent reads/writes the same workflow and compile payloads as the Angular frontend, but several types/ definitions have drifted from frontend/src/app/.../*.interface.ts:
Type
agent-service (current)
frontend (source of truth)
CommentBox
{commentBoxID, comments: string, x, y, width, height}
These avoid runtime breakage today only because the code reads a subset of the fields and passes the rest through opaquely — they are latent bugs, not correct shapes.
Activity
test(agent-service): cover api clients, jwt, and agent lifecycle
test(agent-service): cover delegate, execution, and tool paths
test(agent-service): cover startup banner logging
bobbai00 commentedon Jun 24, 2026
Superseded by #5747 and its sub-tasks — the type/structure cleanup and frontend-type reconciliation are covered there (#5749/#5748/#5750). Closing.