Skip to content

Develop#286

Merged
Alex793x merged 31 commits intomainfrom
develop
Feb 5, 2026
Merged

Develop#286
Alex793x merged 31 commits intomainfrom
develop

Conversation

@Alex793x
Copy link
Contributor

No description provided.

dependabot bot and others added 30 commits January 12, 2026 20:41
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.224 to 1.0.228.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.224...v1.0.228)

---
updated-dependencies:
- dependency-name: serde
  dependency-version: 1.0.228
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Add AG-UI server mode to sync-ctl chat command:
- --ag-ui: Start AG-UI server alongside agent session
- --ag-ui-port: Configure server port (default 9090)

Server provides SSE/WebSocket endpoints for real-time frontend updates:
- /sse: Server-Sent Events stream
- /ws: WebSocket connection
- /health: Health check endpoint

Also includes server module created in ag-ui-sdk Phase 18:
- AgUiServer: HTTP server with axum
- EventBridge: Agent event to AG-UI protocol converter
- Routes: SSE, WebSocket, health handlers

Co-Authored-By: Claude <noreply@anthropic.com>
Wire AG-UI protocol events through the agent tool execution lifecycle:
- Add event_bridge field to DisplayState for AG-UI integration
- Add ag_ui_tool_call_id to ToolCallState for event correlation
- Emit ToolCallStart in on_tool_call when bridge is connected
- Emit ToolCallEnd in on_tool_result when bridge is connected
- Thread EventBridge from main.rs through run_command to agent

When --ag-ui flag is used, frontends connected via SSE/WebSocket
now receive real-time ToolCallStart and ToolCallEnd events as
the agent executes tools.

Co-Authored-By: Claude <noreply@anthropic.com>
- Add exit_error tracking for error event emission
- Emit RunStarted event before conversation loop begins
- Emit TextMessage events (start/content/end) when response received
- Emit RunFinished on clean exit, RunError on failures
- Set exit_error on terminal errors (max retries, timeout, unknown)

AG-UI event flow now complete for core agent interaction:
- RunStarted → TextMessages → ToolCalls → RunFinished/Error

Co-Authored-By: Claude <noreply@anthropic.com>
- Add AgentState, TokenUsageState, ConversationState types for serialization
- Add build_agent_state() helper to construct state from session/history
- Emit StateSnapshot after RunStarted with initial agent state
- Emit StateSnapshot after each response with updated token counts
- Emit StateDelta (JSON Patch) on plan mode toggle

Frontends can now display: project path, provider/model, token usage,
turn count, plan mode status, and compaction state.

Co-Authored-By: Claude <noreply@anthropic.com>
- Add interrupt() method for basic approval workflows
- Add interrupt_with_id() method for tracking/correlation
- Emit RunFinished with Interrupt outcome and InterruptInfo
- Add tests for all interrupt scenarios

EventBridge now supports human-in-the-loop patterns:
- reason: describes what needs approval (file_write, deployment)
- payload: JSON context for rendering approval UI
- id: tracking ID for resume correlation

Co-Authored-By: Claude <noreply@anthropic.com>
- Emit StepStarted("processing") when handling user input
- Emit ThinkingStart("Generating response") before LLM API call
- Emit ThinkingEnd after response is received
- Emit StepFinished("processing") after response handling complete

Frontends can now show:
- "Processing..." during the full turn
- "Thinking..." during LLM generation
- Status transitions between phases

Co-Authored-By: Claude <noreply@anthropic.com>
Add sync-ctl agent command for running the AG-UI server without
interactive stdin. Useful for containers and deployments where
the agent receives messages via SSE/WebSocket protocol.

Co-Authored-By: Claude <noreply@anthropic.com>
- Add Dockerfile.agent with multi-stage build for minimal image
- Add docker-compose.agent.yml for easy local deployment
- Add Kubernetes deployment manifest with service
- Add .dockerignore to optimize build context

Co-Authored-By: Claude <noreply@anthropic.com>
Add integration tests for EventBridge and server event flow:
- test_events_received_by_subscriber: verify events flow through channel
- test_step_and_thinking_events: verify step/thinking event sequence
- test_state_snapshot_event: verify state snapshots work
- test_event_bridge_from_state: verify multiple bridges share channel
- test_server_event_flow: verify end-to-end event reception

Total tests: 1175 (added 5 new integration tests)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add AgentMessage type wrapping RunAgentInput
- Add mpsc channel for incoming frontend messages
- Add message_sender() and take_message_receiver() methods
- Re-export Context, AgUiMessage, RunAgentInput, Tool types
- Add tests for message channel and receiver-only-once behavior
- Parse Text messages as RunAgentInput JSON
- Route valid messages to agent processor via message channel
- Log parse errors without crashing connection
- Handle Binary and Pong messages gracefully
- Add tracing for message debugging
- Add post_message handler accepting RunAgentInput JSON body
- Route messages to agent processor via message channel
- Return JSON acknowledgment with thread_id and run_id
- Add route at /message in server Router
- Add test for POST message acceptance and routing
- Add AgentProcessor struct with message_rx, event_bridge, sessions
- Add ProcessorConfig for provider/model/max_turns settings
- Add ThreadSession for per-thread conversation state
- Add history management with rig::completion::Message
- Add extract_user_input for AG-UI message parsing
- Add process_message placeholder for LLM integration
- 7 tests for processor components

Co-Authored-By: Claude <noreply@anthropic.com>
- Add run() method for main message processing loop
- Extract user input from RunAgentInput messages
- Emit RunStarted/TextMessage/RunFinished events
- Handle empty messages with RunError event
- Add 2 tests for run loop behavior

Co-Authored-By: Claude <noreply@anthropic.com>
- Add enable_processor and processor_config to AgUiConfig
- Add with_processor() and with_processor_config() builder methods
- Modify AgUiServer::run() to spawn processor when enabled
- Add integration test for processor with ServerState
- 3 new tests for processor wiring

Co-Authored-By: Claude <noreply@anthropic.com>
- Added @copilotkit/react-core for provider and hooks
- Added @copilotkit/react-ui for chat UI components
- Peer dependency warnings noted but non-blocking
- CopilotKitWrapper component configures CopilotKit
- Uses VITE_AGENT_URL env var for endpoint (default localhost:9090)
- Ready to wrap app for AG-UI server connectivity
- New /agent route for AG-UI agent conversations
- Uses useCopilotChat hook for message handling
- Real-time streaming display with loading states
- Shows connection info to AG-UI server endpoint
- Wrapped app with CopilotKitWrapper in root layout
- Added navigation links between Smart Reply and Agent Chat
- Active route styling for visual feedback
- Replaced custom useCopilotChat implementation with pre-built CopilotChat
- CopilotChat handles message types and streaming internally
- Imported CopilotKit styles for proper UI rendering
…rde-1.0.228

chore(deps): bump serde from 1.0.224 to 1.0.228
Add new API methods and types to enable the agent to dynamically fetch
Hetzner regions and server types with real-time availability and pricing
information, instead of relying on hardcoded static data.

New API methods in PlatformApiClient:
- get_hetzner_locations(): Fetch regions with available server types
- get_hetzner_server_types(): Fetch server types with pricing
- check_hetzner_availability(): Check specific availability

New types for Hetzner availability data:
- HetznerLocation, LocationWithAvailability
- ServerTypeSummary, AvailabilityCheckResult

New dynamic functions in cloud_provider_data.rs:
- get_hetzner_regions_dynamic(): Fetch with static fallback
- get_hetzner_server_types_dynamic(): Fetch with static fallback
- check_hetzner_availability(): Pre-deployment capacity check
- get_recommended_server_type(): Smart profile-based selection

The agent can now make intelligent deployment decisions based on
actual Hetzner API data including capacity, pricing, and availability.

Co-Authored-By: Claude <noreply@anthropic.com>
…wizard

Update the infrastructure selection step to use real-time Hetzner API data
instead of hardcoded static values when deploying to Hetzner Cloud.

Changes:
- select_infrastructure() is now async and accepts client + project_id
- For Hetzner: fetches regions with availability count, server types with pricing
- Displays real-time availability ("X types available") and pricing ("€X.XX/mo")
- Filters server types to only show those available in selected region
- Falls back to static data if API call fails or for non-Hetzner providers
- Added select_infrastructure_sync() for backward compatibility

The wizard now shows:
- Regions: "nbg1  Nuremberg (Germany) · 15 types available"
- Server types: "CX22  2 vCPU · 4 GB · €5.95/mo" (sorted by price)

This enables smarter deployment decisions based on actual availability
and pricing rather than potentially outdated hardcoded values.

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove HETZNER_LOCATIONS and HETZNER_SERVER_TYPES static arrays
- Make dynamic fetching mandatory for Hetzner deployments (no fallback)
- Add HetznerFetchResult enum for proper error handling:
  - Success: API returned data
  - NoCredentials: Hetzner credentials not configured
  - ApiError: API call failed
- Add smart agent helper functions for resource selection:
  - find_best_region: Find region with most available server types
  - find_cheapest_available: Find cheapest server in a region
  - get_recommended_server_type: Get optimal server for workload profile
  - check_hetzner_availability: Pre-deployment availability validation
- Update wizard to show clear error messages when credentials missing
- Export HetznerFetchResult and helper functions for agent use

This ensures the agent always uses real-time Hetzner API data for
smart resource selection instead of potentially stale hardcoded values.

Co-Authored-By: Claude <noreply@anthropic.com>
… for Hetzner

- Add new `list_hetzner_availability` agent tool that fetches real-time
  Hetzner Cloud region and server type availability with pricing
- Update deploy_service to require dynamic Hetzner availability check:
  - If Hetzner credentials not configured: inform user and ask them to
    configure or provide region/machine_type manually
  - If API fetch fails: inform user and suggest alternatives
  - No static fallback data - ensures agent always uses current info
- Remove static Hetzner fallback from recommendations module
- Agent must now call list_hetzner_availability before recommending
  Hetzner deployments

The tool provides:
- Real-time region availability with server type counts
- Server types with current EUR pricing (hourly/monthly)
- CPU, memory, disk specs per server type
- Recommendations for cheapest and best-value options
- Grouped view by CPU type (shared CX, dedicated CCX, AMD CPX)

Co-Authored-By: Claude <noreply@anthropic.com>
Switch to the same endpoint the frontend uses for Hetzner options:
- Uses /api/v1/cloud-runner/hetzner/options?projectId=xxx
- Returns both locations and server types in one API call
- Same endpoint as getHetznerOptions in frontend client.ts

This endpoint is verified to work with the current backend and
provides real-time Hetzner data including:
- Locations with city/country/network zone
- Server types with pricing and availability per location
- Deprecation status for server types

Also added "token" to the NoCredentials detection patterns.

Co-Authored-By: Claude <noreply@anthropic.com>
Switch back to /api/deployments/availability/* endpoints which check
Hetzner's datacenter API for ACTUAL capacity:

- /api/deployments/availability/locations - Returns locations with
  server types that are CURRENTLY available (not just exist)
- /api/deployments/availability/server-types - Returns server types
  sorted by price, filtered to those actually in stock

The previous /api/v1/cloud-runner/hetzner/options endpoint returned
ALL locations and server types without checking real-time capacity,
leading to incorrect recommendations (e.g., showing cx23 as cheapest
when it's actually out of stock).

Also expanded credential error detection patterns to catch:
- 401 status codes
- 412 (failedPrecondition) status codes
- Various "token" related messages

Co-Authored-By: Claude <noreply@anthropic.com>
…automatically searching available regions/machine types dynamically
@Alex793x Alex793x merged commit 0fce104 into main Feb 5, 2026
0 of 4 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