Conversation
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 pull request introduces a major refactor and enhancement to the Double Agent web application, focusing on modularizing reusable web endpoints, improving frontend robustness, and ensuring correct packaging of static assets. The most significant change is the creation of the
AgentWebAppMixinclass, which encapsulates all web app routes and static asset definitions for agent drivers, enabling code reuse and simplifying maintenance. Additionally, the frontend JavaScript is improved for better error handling and initialization, and the Python package is updated to include all necessary web assets. Comprehensive tests are added to verify the new backend and caching logic.Backend refactor and new web app mixin:
AgentWebAppMixininAFL/double_agent/AgentWebAppMixin.py, providing reusable web endpoints and static asset bindings for agent drivers. This includes HTML rendering, pipeline and input builder endpoints, pipeline operation management, tiled input group configuration, and utility endpoints for the web UI. All web-app-related backend logic is now consolidated in this mixin for maintainability and reusability.Frontend improvements:
main.js(moved toAFL/double_agent/apps/pipeline_builder/js/main.js) to handle backend responses that may include warnings, display these warnings in the UI, and robustly initialize the application by loading core pipeline state and operations in parallel with improved error reporting. [1] [2]Packaging and static assets:
pyproject.tomlto ensure all HTML, CSS, JS, and SVG files underAFL/double_agent/appsare included in the package build, guaranteeing that all web assets are available when deployed.Testing and validation:
tests/test_agentdriver_pipeline_ops.pyto verify the caching behavior of pipeline operations, the correctness of static directory mappings, HTML rendering, app link setup, and backend method ownership in the new mixin.Minor configuration changes:
pyproject.tomlfor clarity.