-
Notifications
You must be signed in to change notification settings - Fork 55
feat: refactor Amazon Q module to use agentAPI #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Is this ready for review? I see its still marked as a draft PR @harleylrn |
@bpmct Will be ready Monday 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Matey,
Have dropped some comments through this, let me know if you have any questions.
Appreciate the work, it's shaping up nicely.
d233594
to
23b6ea7
Compare
I would try and keep both the |
OK @DevelopmentCats |
c016e10
to
df269aa
Compare
d29960f
to
3cdadb4
Compare
fb91ba1
to
00e6222
Compare
@harleylrn this is my agent.json
![]() |
@35C4n0r I had this issue before, then it disappeared....
|
@harleylrn, I made some changes for the review on my local in which I removed @harleylrn any idea why this might be happening ? I removed it after checking this (so that we allow all tools):
cc @matifali |
Don't have a clue 😄 |
@harleylrn here is a review in form of a patch (I know this isn't the best way to do this), if you have any comments/questions quote the change and ask :) |
PS: we would also need a PR in coder/agentapi to support AmazonQ. |
I have number of comments here:
Is it me to need to open the PR in coder/agentapi to support AmazonQ ? |
added a new patch with some minor changes review_2.patch
Yes, we just need a PR similar to this: coder/agentapi#63 If the patch lgty, feel free to make a commit with it 👍🏻 |
Getting the following error with those changes @35C4n0r : ARG_SERVER_PARAMETERS="-c /@${data.coder_workspace_owner.me.name}/${data.coder_workspace.me.name}.${var.agent_id}/apps/${local.app_slug}/chat" with forced the AgentAPI to run with it. Also the following comments:
For the second one opened the new issue to the aws-q-developer-cli project aws/amazon-q-developer-cli#2753 and created the PR for the same: aws/amazon-q-developer-cli#2754 |
e6f970d
to
a8ea067
Compare
I tired to setup the CODER_WILDCARD_ACCESS_URL parameter, but it didn't help at all. |
d75a401
to
6b0f653
Compare
Complete enhancement of the Amazon Q Coder registry module with comprehensive v2.0.0 features including AgentAPI integration, enhanced MCP support, and enterprise-ready capabilities. MAJOR FEATURES: - AgentAPI integration with web and CLI app support - Enhanced MCP (Model Context Protocol) integration for task reporting - Configurable installation URLs for air-gapped environments - Pre/post install script support for custom setup - Dynamic agent configuration with JSON template support - Comprehensive test suite with 13 Terraform tests and 19 TypeScript tests NEW VARIABLES: - coder_mcp_instructions: Dedicated MCP task reporting instructions (separate from system_prompt) - q_install_url: Configurable installation URL (default: AWS official, supports air-gapped) - agent_config: Custom agent configuration JSON support with dynamic naming - pre_install_script/post_install_script: Custom setup scripts for environment customization - trust_all_tools: Security configuration for tool permissions (default: false) AGENT CONFIGURATION ENHANCEMENTS: - Default agent config with @coder tool integration for MCP functionality - Configurable tool permissions (fs_read, @coder by default for security) - Dynamic agent name extraction from configuration JSON - Template-based configuration with system prompt injection - Consistent @coder tool inclusion in both tools and allowedTools arrays MCP INTEGRATION ARCHITECTURE: - Clean separation: system_prompt for AI behavior, coder_mcp_instructions for MCP integration - @coder tool integration for task reporting via coder_report_task - Granular progress reporting with working/complete/failure states - Environment variable exposure for MCP app status - Dedicated MCP instruction parameter handling in install script INSTALLATION & SCRIPTS: - Enhanced install.sh with architecture detection and comprehensive error handling - Improved start.sh with proper environment variable handling and simple prompts - Authentication tarball support for seamless login experience - Version management (default: Amazon Q 1.14.1, AgentAPI v0.6.0) - Base64 encoding/decoding for secure parameter transmission COMPREHENSIVE TESTING: - Terraform test suite (amazon-q.tftest.hcl) with 13 comprehensive test cases - TypeScript test coverage (main.test.ts) with 19 tests for all major functionality - Agent configuration validation and JSON parsing tests - Environment variable and installation parameter testing - Version configuration and air-gapped installation testing DOCUMENTATION & EXAMPLES: - Complete README with accurate variable documentation and usage examples - Corrected agent_config examples using proper JSON string format (no jsonencode) - Comprehensive variable descriptions with security and functionality notes - Enhanced agent configuration details with @coder tool integration - Complete MCP integration workflow documentation SECURITY & ENTERPRISE FEATURES: - Limited default tool permissions for security (fs_read, @coder only) - Air-gapped installation support with configurable URLs - Configurable trust settings for tool permissions - Enterprise-ready authentication mechanisms - Secure parameter handling with base64 encoding ARCHITECTURAL DESIGN: - Clean separation of concerns between AI behavior and MCP integration - Dedicated variables for different functionalities (maintainability) - Complex but clean agent configuration selection logic - Proper string vs JSON handling for configurations - Superior architectural design for customization and maintenance This comprehensive v2.0.0 release transforms the Amazon Q module into a production-ready, enterprise-capable solution with extensive customization options, robust testing coverage, and clean architectural design.
…mprovements - Add report_tasks variable for controlling task reporting to Coder UI - Add cli_app support with configurable display names - Add workdir variable for custom working directory - Add agentapi_chat_based_path for environments without wildcard access - Update AgentAPI version from v0.6.0 to v0.6.1 - Remove pre_install_script and post_install_script variables - Update module directory from .amazonq to .amazonq-module - Enhance install and start scripts with improved task reporting - Update README with new configuration options and examples
6b0f653
to
aa18354
Compare
@michaelbrewer can you help test this? Thanks |
The changes lgtm 👍🏻
@harleylrn thanks for your PR. Two things we need to keep track of here (can be done async after merging the PR)
Just needs some changes in the readme, cc: @matifali |
Switch to false by default Co-authored-by: 35C4n0r <[email protected]>
@35C4n0r Changed as you requested, even though I prefer it the other way around 😄 |
Co-authored-by: 35C4n0r <[email protected]>
- Added workdir parameter to all test configurations in main.test.ts - Added workdir parameter to all Terraform test runs in amazon-q.tftest.hcl - All tests now pass successfully after upstream merge
- workdir is required (no default), not /home/coder - agentapi_chat_based_path defaults to false, not true
Title:
feat: complete amazon-q module v2.0.0 with comprehensive enhancements
Description:
Closes #240
This PR introduces a complete rewrite and enhancement of the amazon-q module, bringing it to version 2.0.0. The module now provides AgentAPI support.
Type of Change
Module Information
Path:
registry/coder/modules/amazon-q
New version:
v2.0.0
Breaking change: [x] Yes [ ] No
Key Features & Enhancements
🚀 Core Functionality
🛠️ Customization & Configuration
📚 Documentation & Testing
d## Breaking Changes
This is a major version update (v2.0.0) with breaking changes:
Testing & Validation
terraform test
- 8/8 tests passing)bun run fmt
)Related Issues
Closes #240 - Amazon Q module enhancement request
Additional Notes
Screenshots:
Screen.Recording.2025-08-25.at.09.50.09_github.mp4
Screen.Recording.2025-08-25.at.13.56.28_final.mp4
/claim #240