feat: harness conversation api and basic agent UI - #124
Merged
07prajwal2000 merged 3 commits intoJul 26, 2026
Merged
Conversation
Vertical-slice endpoints for the new agent harness conversation model (agent_harness_conversations/runs, replacing the legacy location/routeId coupling on ai_chat_conversations): - GET /harness-conversations - paginated list, needUserQuery=true adds a 30-char truncated latest query per conversation - PATCH /harness-conversations/:conversationId - rename - DELETE /harness-conversations/:conversationId - delete - POST /harness-conversations/message - send a message; omitting conversationId creates a new conversation + run and enqueues HARNESS_START_JOB (reuses enqueueHarnessStart); rejects with 409 if the target conversation already has a run in progress Status shown to the user is resolved live from the Redis run snapshot (harness:run:<runId>:snapshot) while a run is in flight, falling back to the conversation's DB status once idle/terminal - the DB status only flips on terminal events so it lags mid-run. Perf hardening for high concurrency on constrained (1 vCPU/1GB) pods: - list's status resolution is now batched (RedisService.getActiveRuns/ getSnapshots via MGET) instead of up to 2 Redis round trips per row - list cache invalidation on mutations uses an O(1) per-user version counter (cacheVersion.ts) instead of deleteCacheKeysByPattern, which runs Redis KEYS - an O(N) full-keyspace scan that blocks Redis's single thread - the post-mutation status refresh query only runs on a cache hit, not after a fresh DB build that already has current statuses Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR contains 2 main changes: 1. Implementation of the harness conversation API endpoints for the AI gateway. 2. Implementation of the basic agent UI, including a beautifully designed Prompt Editor with glassmorphism UI.