Skip to content

Conversation

harleylrn
Copy link
Contributor

@harleylrn harleylrn commented Aug 22, 2025

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

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/amazon-q
New version: v2.0.0
Breaking change: [x] Yes [ ] No

Key Features & Enhancements

🚀 Core Functionality

  • AgentAPI Support: Web and CLI app integration with health checks
  • Amazon Q CLI Integration: Automatic installation and configuration of Amazon Q CLI
  • MCP Integration: Model Context Protocol support for task reporting to Coder
  • Authentication System: Tarball-based authentication with environment variable management

🛠️ Customization & Configuration

  • Pre/Post Install Scripts: Support for custom setup and finalization scripts
  • Agent Configuration: Templated agent config with tool and resource management
  • Custom System Prompts: Configurable AI behavior and task reporting instructions
  • Version Pinning: Support for specific Amazon Q CLI and AgentAPI versions

📚 Documentation & Testing

  • Comprehensive README: Complete user guide with examples, configuration details, and troubleshooting
  • Visual Documentation: Updated screenshots and interface examples
  • Terraform Testing: Complete .tftest.hcl with 8 test cases (all passing)
  • Registry Compliance: Full adherence to Coder Registry contributing guidelines

d## Breaking Changes

This is a major version update (v2.0.0) with breaking changes:

  • Renamed variables names (Removed experimantal_ prefix)
  • Updated AgentAPI integration method
  • Modified default configuration structure

Testing & Validation

  • Tests pass (terraform test - 8/8 tests passing)
  • Code formatted (bun run fmt)
  • Changes tested locally
  • Registry compliance verified
  • Documentation reviewed and updated

Related Issues

Closes #240 - Amazon Q module enhancement request

Additional Notes

  • Module is now production-ready with professional quality code and documentation
  • Full compliance with Coder Registry contributing guidelines
  • Comprehensive test coverage ensures reliability
  • Ready for registry submission and community use

Screenshots:

image image image
Screen.Recording.2025-08-25.at.09.50.09_github.mp4
Screen.Recording.2025-08-25.at.13.56.28_final.mp4

/claim #240

@bpmct
Copy link
Member

bpmct commented Aug 22, 2025

Is this ready for review? I see its still marked as a draft PR @harleylrn

@harleylrn
Copy link
Contributor Author

@bpmct Will be ready Monday 😄
WE want to verify it again internally first 😄

Copy link

@keirans keirans left a 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.

@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch 6 times, most recently from d233594 to 23b6ea7 Compare August 25, 2025 13:46
@DevelopmentCats
Copy link
Contributor

@harleylrn

I would try and keep both the main.test.ts as well as the new amazon-q.tftest.hcl since the CI will currently only run the typescript tests in the module dir's

@harleylrn
Copy link
Contributor Author

OK @DevelopmentCats
Will add it back 😄

@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch 3 times, most recently from c016e10 to df269aa Compare August 25, 2025 14:05
@harleylrn harleylrn requested a review from keirans August 25, 2025 14:07
@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch 3 times, most recently from d29960f to 3cdadb4 Compare August 25, 2025 23:05
@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch from 3cdadb4 to 72d988a Compare August 25, 2025 23:11
@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch 12 times, most recently from 4656085 to 64b5ac8 Compare August 27, 2025 00:57
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.
@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch from 64b5ac8 to 2dccd44 Compare August 27, 2025 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amazon Q Module: Tasks + AgentAPI Support
4 participants