Thanks to visit codestin.com
Credit goes to github.com

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
@DevelopmentCats
Copy link
Contributor

Other than the above last nitpick comment I would say this looks good to me!

@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch from f4b6fd5 to 647b140 Compare September 10, 2025 01:15
@DevelopmentCats
Copy link
Contributor

Probably going to need to run bun run fmt

@DevelopmentCats
Copy link
Contributor

DevelopmentCats commented Sep 10, 2025

Everything LGTM. I have been out for a bit, and I don't think I have actually ever pulled and tested this. So I'm going to approve it, and then pull it and test it out once or twice, and then I will publish it!

Thanks for the contribution @harleylrn !

@DevelopmentCats
Copy link
Contributor

@harleylrn

Something I notice when testing this. With the default agent configuration, it does not trust fs_write by default. So without extra configuration to the agent configuration by the user this would stop to prompt the user to trust the fs_write tool before making any changes which wouldn't really allow for a smooth experience out of the box.

In general I see why you would leave it with the default trusted tools, but it would be better to configure it with the minimal required tools for tasks, while allowing further configuration by the user if they would like to restrict or expand access for the agent.

@harleylrn
Copy link
Contributor Author

harleylrn commented Sep 10, 2025

I disagree on that
By default we are giving minimal possible access to the tools.
If person wanna trust the tools he has 2 options:

  1. Provide his own agent config
  2. Use the trust_all_tools parameter, which is false by default

In any case it should be the user's decision, not default

UPD: I also saw that the list of the variables somehow got vanished from the README. Will update it in a moment

@matifali
Copy link
Member

matifali commented Sep 10, 2025

UPD: I also saw that the list of the variables somehow got vanished from the README. Will update it in a moment

We do not put variables in readme as they already have their separate tab. There is certainly an opportunity there to improve the design there.

@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch from 4e26f96 to b2532ee Compare September 10, 2025 11:22
@harleylrn
Copy link
Contributor Author

We do not put variables in readme as they already have their separate tab. There is certainly an opportunity there to improve the design there.

Got it, changed the README without the variables table.
I still strongly disagree to allow fs_write or all the tools by default. This is creating a huge security hole.
As a module provider, you should leave this decision in the hands of the end-user. If he wants to allow any tool that can have possible destructive effect - it should be his choice.
I added note to the README about that.
@matifali @DevelopmentCats

@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch from b2532ee to a2c6aee Compare September 10, 2025 11:31
@matifali
Copy link
Member

@harleylrn The goal for all Coder Agent modules to work out of the box with Coder tasks. And having fs_write is a required permission for the agent to autonomously work on a task.

This is the whole point of running agents in Coder as they can run in isolated sandboxes with higher autonomy.

@harleylrn
Copy link
Contributor Author

harleylrn commented Sep 10, 2025

@matifali @DevelopmentCats @keirans
Correct I'm totally agree on that.
But, and here is a huge but, the user should understand what he is doing and what is he allowing.
I'm not changing here any default behaviour of the AWS Q itself: by default fs_write tool is not trusted.
image
The task will still run by default, it will just stop and will wait for the trust approval from the user. I tested this as well 😄
If user want to test the task - this functionality is enough. If he wants to run it in production like - he will need to run with his own. configuration and not the default.

@matifali
Copy link
Member

@DevelopmentCats can you test it one last time and then I think its good to merge?

@harleylrn can we add an explicit example on how to run the Q agent in full autonomous mode? similar to --dangerously-skip-all option of Claude Code.

Does it make sense?

@harleylrn
Copy link
Contributor Author

harleylrn commented Sep 10, 2025

@harleylrn can we add an explicit example on how to run the Q agent in full autonomous mode? similar to --dangerously-skip-all option of Claude Code.

Does it make sense?

Yes, I added this in the README:
image

Or you would like to have the full example under the ##Danger title?
@matifali @DevelopmentCats

@keirans
Copy link

keirans commented Sep 10, 2025

Hey @DevelopmentCats @matifali

Just weighing in on the fs_write behaviour for this functionality in the module - I echo @harleylrn 's perspective on this behaviour being opt-in for the following reasons.

Cheers,

K

@matifali
Copy link
Member

Or you would like to have the full example under the ##Danger title?

Yes a full example would help a lot.

@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch from a2c6aee to 23f3e3c Compare September 10, 2025 13:49
…and parameters table

feat: amazon-q module v2.0.0 with comprehensive AgentAPI integration and parameters table

Update changes

fix formating
@harleylrn harleylrn force-pushed the feat/amazon_q_module-v2 branch from 23f3e3c to 63c9d92 Compare September 10, 2025 13:51
@harleylrn
Copy link
Contributor Author

Added comments and examples with the trust_all_tools trues option
@DevelopmentCats @matifali

Copy link
Contributor

@DevelopmentCats DevelopmentCats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work fine with the provided example for autonomous tasks

@DevelopmentCats DevelopmentCats merged commit 1601555 into coder:main Sep 10, 2025
4 checks passed
@35C4n0r 35C4n0r mentioned this pull request Sep 12, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 Bounty claim version:major Add to PRs requiring a major version upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amazon Q Module: Tasks + AgentAPI Support
7 participants