Skip to content

Commit 9f2fe38

Browse files
authored
Merge branch 'main' into feat/nexus-repository-module
2 parents f42da8f + 3efc22c commit 9f2fe38

File tree

6 files changed

+38
-71
lines changed

6 files changed

+38
-71
lines changed

registry/coder/modules/agentapi/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
---
22
display_name: AgentAPI
3-
description: Building block for modules that need to run an agentapi server
3+
description: Building block for modules that need to run an AgentAPI server
44
icon: ../../../../.icons/coder.svg
55
verified: true
6-
tags: [internal]
6+
tags: [internal, library]
77
---
88

99
# AgentAPI
1010

11-
The AgentAPI module is a building block for modules that need to run an agentapi server. It is intended primarily for internal use by Coder to create modules compatible with Tasks.
11+
> [!CAUTION]
12+
> We do not recommend using this module directly. Instead, please consider using one of our [Tasks-compatible AI agent modules](https://registry.coder.com/modules?search=tag%3Atasks).
1213
13-
We do not recommend using this module directly. Instead, please consider using one of our [Tasks-compatible AI agent modules](https://registry.coder.com/modules?search=tag%3Atasks).
14+
The AgentAPI module is a building block for modules that need to run an AgentAPI server. It is intended primarily for internal use by Coder to create modules compatible with Tasks.
1415

1516
```tf
1617
module "agentapi" {
1718
source = "registry.coder.com/coder/agentapi/coder"
18-
version = "1.0.1"
19+
version = "1.0.2"
1920
2021
agent_id = var.agent_id
2122
web_app_slug = local.app_slug
@@ -50,4 +51,4 @@ module "agentapi" {
5051

5152
## For module developers
5253

53-
For a complete example of how to use this module, see the [goose module](https://github.com/coder/registry/blob/main/registry/coder/modules/goose/main.tf).
54+
For a complete example of how to use this module, see the [Goose module](https://github.com/coder/registry/blob/main/registry/coder/modules/goose/main.tf).

registry/coder/modules/aider/README.md

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run [Aider](https://aider.chat) AI pair programming in your workspace. This modu
1313
```tf
1414
module "aider" {
1515
source = "registry.coder.com/coder/aider/coder"
16-
version = "1.1.1"
16+
version = "1.1.2"
1717
agent_id = coder_agent.example.id
1818
}
1919
```
@@ -30,29 +30,8 @@ module "aider" {
3030

3131
## Module Parameters
3232

33-
| Parameter | Description | Type | Default |
34-
| ---------------------------------- | -------------------------------------------------------------------------- | -------- | ------------------- |
35-
| `agent_id` | The ID of a Coder agent (required) | `string` | - |
36-
| `folder` | The folder to run Aider in | `string` | `/home/coder` |
37-
| `install_aider` | Whether to install Aider | `bool` | `true` |
38-
| `aider_version` | The version of Aider to install | `string` | `"latest"` |
39-
| `use_screen` | Whether to use screen for running Aider in the background | `bool` | `true` |
40-
| `use_tmux` | Whether to use tmux instead of screen for running Aider in the background | `bool` | `false` |
41-
| `session_name` | Name for the persistent session (screen or tmux) | `string` | `"aider"` |
42-
| `order` | Position of the app in the UI presentation | `number` | `null` |
43-
| `icon` | The icon to use for the app | `string` | `"/icon/aider.svg"` |
44-
| `experiment_report_tasks` | Whether to enable task reporting | `bool` | `true` |
45-
| `system_prompt` | System prompt for instructing Aider on task reporting and behavior | `string` | See default in code |
46-
| `task_prompt` | Task prompt to use with Aider | `string` | `""` |
47-
| `ai_provider` | AI provider to use with Aider (openai, anthropic, azure, etc.) | `string` | `"anthropic"` |
48-
| `ai_model` | AI model to use (can use Aider's built-in aliases like "sonnet", "4o") | `string` | `"sonnet"` |
49-
| `ai_api_key` | API key for the selected AI provider | `string` | `""` |
50-
| `custom_env_var_name` | Custom environment variable name when using custom provider | `string` | `""` |
51-
| `experiment_pre_install_script` | Custom script to run before installing Aider | `string` | `null` |
52-
| `experiment_post_install_script` | Custom script to run after installing Aider | `string` | `null` |
53-
| `experiment_additional_extensions` | Additional extensions configuration in YAML format to append to the config | `string` | `null` |
54-
55-
> **Note**: `use_screen` and `use_tmux` cannot both be enabled at the same time. By default, `use_screen` is set to `true` and `use_tmux` is set to `false`.
33+
> [!NOTE]
34+
> The `use_screen` and `use_tmux` parameters cannot both be enabled at the same time. By default, `use_screen` is set to `true` and `use_tmux` is set to `false`.
5635
5736
## Usage Examples
5837

@@ -68,7 +47,7 @@ variable "anthropic_api_key" {
6847
module "aider" {
6948
count = data.coder_workspace.me.start_count
7049
source = "registry.coder.com/coder/aider/coder"
71-
version = "1.1.1"
50+
version = "1.1.2"
7251
agent_id = coder_agent.example.id
7352
ai_api_key = var.anthropic_api_key
7453
}
@@ -93,7 +72,7 @@ variable "openai_api_key" {
9372
module "aider" {
9473
count = data.coder_workspace.me.start_count
9574
source = "registry.coder.com/coder/aider/coder"
96-
version = "1.1.1"
75+
version = "1.1.2"
9776
agent_id = coder_agent.example.id
9877
use_tmux = true
9978
ai_provider = "openai"
@@ -114,7 +93,7 @@ variable "custom_api_key" {
11493
module "aider" {
11594
count = data.coder_workspace.me.start_count
11695
source = "registry.coder.com/coder/aider/coder"
117-
version = "1.1.1"
96+
version = "1.1.2"
11897
agent_id = coder_agent.example.id
11998
ai_provider = "custom"
12099
custom_env_var_name = "MY_CUSTOM_API_KEY"
@@ -131,7 +110,7 @@ You can extend Aider's capabilities by adding custom extensions:
131110
module "aider" {
132111
count = data.coder_workspace.me.start_count
133112
source = "registry.coder.com/coder/aider/coder"
134-
version = "1.1.1"
113+
version = "1.1.2"
135114
agent_id = coder_agent.example.id
136115
ai_api_key = var.anthropic_api_key
137116
@@ -210,7 +189,7 @@ data "coder_parameter" "ai_prompt" {
210189
module "aider" {
211190
count = data.coder_workspace.me.start_count
212191
source = "registry.coder.com/coder/aider/coder"
213-
version = "1.1.1"
192+
version = "1.1.2"
214193
agent_id = coder_agent.example.id
215194
ai_api_key = var.anthropic_api_key
216195
task_prompt = data.coder_parameter.ai_prompt.value
@@ -308,7 +287,3 @@ If you encounter issues:
308287
3. **Browser mode issues**: If the browser interface doesn't open, check that you're accessing it from a machine that can reach your Coder workspace
309288

310289
For more information on using Aider, see the [Aider documentation](https://aider.chat/docs/).
311-
312-
```
313-
314-
```

registry/coder/modules/amazon-q/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Run [Amazon Q](https://aws.amazon.com/q/) in your workspace to access Amazon's A
1313
```tf
1414
module "amazon-q" {
1515
source = "registry.coder.com/coder/amazon-q/coder"
16-
version = "1.1.1"
16+
version = "1.1.2"
1717
agent_id = coder_agent.example.id
18+
1819
# Required: see below for how to generate
1920
experiment_auth_tarball = var.amazon_q_auth_tarball
2021
}
@@ -81,7 +82,7 @@ module "amazon-q" {
8182
```tf
8283
module "amazon-q" {
8384
source = "registry.coder.com/coder/amazon-q/coder"
84-
version = "1.1.1"
85+
version = "1.1.2"
8586
agent_id = coder_agent.example.id
8687
experiment_auth_tarball = var.amazon_q_auth_tarball
8788
experiment_use_tmux = true
@@ -93,7 +94,7 @@ module "amazon-q" {
9394
```tf
9495
module "amazon-q" {
9596
source = "registry.coder.com/coder/amazon-q/coder"
96-
version = "1.1.1"
97+
version = "1.1.2"
9798
agent_id = coder_agent.example.id
9899
experiment_auth_tarball = var.amazon_q_auth_tarball
99100
experiment_report_tasks = true
@@ -105,7 +106,7 @@ module "amazon-q" {
105106
```tf
106107
module "amazon-q" {
107108
source = "registry.coder.com/coder/amazon-q/coder"
108-
version = "1.1.1"
109+
version = "1.1.2"
109110
agent_id = coder_agent.example.id
110111
experiment_auth_tarball = var.amazon_q_auth_tarball
111112
experiment_pre_install_script = "echo Pre-install!"

registry/coder/modules/amazon-q/main.tf

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -125,24 +125,7 @@ variable "ai_prompt" {
125125
locals {
126126
encoded_pre_install_script = var.experiment_pre_install_script != null ? base64encode(var.experiment_pre_install_script) : ""
127127
encoded_post_install_script = var.experiment_post_install_script != null ? base64encode(var.experiment_post_install_script) : ""
128-
# We need to use allowed tools to limit the context Amazon Q receives.
129-
# Amazon Q can't handle big contexts, and the `create_template_version` tool
130-
# has a description that's too long.
131-
mcp_json = <<EOT
132-
{
133-
"mcpServers": {
134-
"coder": {
135-
"command": "coder",
136-
"args": ["exp", "mcp", "server", "--allowed-tools", "coder_report_task"],
137-
"env": {
138-
"CODER_MCP_APP_STATUS_SLUG": "amazon-q"
139-
}
140-
}
141-
}
142-
}
143-
EOT
144-
encoded_mcp_json = base64encode(local.mcp_json)
145-
full_prompt = <<-EOT
128+
full_prompt = <<-EOT
146129
${var.system_prompt}
147130
148131
Your first task is:
@@ -211,20 +194,19 @@ resource "coder_script" "amazon_q" {
211194
cd "$PREV_DIR"
212195
echo "Extracted auth tarball"
213196
197+
if [ "${var.experiment_report_tasks}" = "true" ]; then
198+
echo "Configuring Amazon Q to report tasks via Coder MCP..."
199+
q mcp add --name coder --command "coder" --args "exp,mcp,server,--allowed-tools,coder_report_task" --env "CODER_MCP_APP_STATUS_SLUG=amazon-q" --scope global --force
200+
echo "Added Coder MCP server to Amazon Q configuration"
201+
fi
202+
214203
if [ -n "${local.encoded_post_install_script}" ]; then
215204
echo "Running post-install script..."
216205
echo "${local.encoded_post_install_script}" | base64 -d > /tmp/post_install.sh
217206
chmod +x /tmp/post_install.sh
218207
/tmp/post_install.sh
219208
fi
220209
221-
if [ "${var.experiment_report_tasks}" = "true" ]; then
222-
echo "Configuring Amazon Q to report tasks via Coder MCP..."
223-
mkdir -p ~/.aws/amazonq
224-
echo "${local.encoded_mcp_json}" | base64 -d > ~/.aws/amazonq/mcp.json
225-
echo "Created the ~/.aws/amazonq/mcp.json configuration file"
226-
fi
227-
228210
if [ "${var.experiment_use_tmux}" = "true" ] && [ "${var.experiment_use_screen}" = "true" ]; then
229211
echo "Error: Both experiment_use_tmux and experiment_use_screen cannot be true simultaneously."
230212
echo "Please set only one of them to true."

registry/coder/modules/claude-code/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude
1313
```tf
1414
module "claude-code" {
1515
source = "registry.coder.com/coder/claude-code/coder"
16-
version = "2.0.4"
16+
version = "2.0.5"
1717
agent_id = coder_agent.example.id
1818
folder = "/home/coder"
1919
install_claude_code = true
@@ -84,7 +84,7 @@ resource "coder_agent" "main" {
8484
module "claude-code" {
8585
count = data.coder_workspace.me.start_count
8686
source = "registry.coder.com/coder/claude-code/coder"
87-
version = "2.0.4"
87+
version = "2.0.5"
8888
agent_id = coder_agent.example.id
8989
folder = "/home/coder"
9090
install_claude_code = true
@@ -102,7 +102,7 @@ Run Claude Code as a standalone app in your workspace. This will install Claude
102102
```tf
103103
module "claude-code" {
104104
source = "registry.coder.com/coder/claude-code/coder"
105-
version = "2.0.4"
105+
version = "2.0.5"
106106
agent_id = coder_agent.example.id
107107
folder = "/home/coder"
108108
install_claude_code = true

registry/coder/modules/claude-code/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,11 @@ resource "coder_ai_task" "claude_code" {
289289
id = coder_app.claude_code_web.id
290290
}
291291
}
292+
293+
# As of https://github.com/coder/coder/commit/6ba4b5bbc95e2e528d7f5b1e31fffa200ae1a6db,
294+
# there's a bug in Coder's Terraform statefile parsing which prevents it from seeing coder_apps
295+
# in certain scenarios. This is a workaround to bypass this bug until we have a proper fix.
296+
# For more details see https://github.com/coder/coder/issues/18776
297+
resource "terraform_data" "claude_code_app_id" {
298+
input = coder_app.claude_code_web.id
299+
}

0 commit comments

Comments
 (0)