diff --git a/registry/coder/modules/agentapi/README.md b/registry/coder/modules/agentapi/README.md index 22ce50fe..33e58297 100644 --- a/registry/coder/modules/agentapi/README.md +++ b/registry/coder/modules/agentapi/README.md @@ -16,7 +16,7 @@ The AgentAPI module is a building block for modules that need to run an AgentAPI ```tf module "agentapi" { source = "registry.coder.com/coder/agentapi/coder" - version = "2.3.0" + version = "2.4.0" agent_id = var.agent_id web_app_slug = local.app_slug diff --git a/registry/coder/modules/agentapi/main.tf b/registry/coder/modules/agentapi/main.tf index 6f177036..50d6bf68 100644 --- a/registry/coder/modules/agentapi/main.tf +++ b/registry/coder/modules/agentapi/main.tf @@ -53,6 +53,12 @@ variable "folder" { default = "/home/coder" } +variable "web_app" { + type = bool + description = "Whether to create the web workspace app. This is automatically enabled when using Coder Tasks, regardless of this setting." + default = true +} + variable "cli_app" { type = bool description = "Whether to create the CLI workspace app." @@ -220,6 +226,11 @@ resource "coder_env" "boundary_config" { } locals { + # If this is a Task, always create the web app regardless of var.web_app + # since coder_ai_task requires the app to function. + is_task = try(data.coder_task.me.enabled, false) + web_app = var.web_app || local.is_task + # we always trim the slash for consistency workdir = trimsuffix(var.folder, "/") encoded_pre_install_script = var.pre_install_script != null ? base64encode(var.pre_install_script) : "" @@ -305,6 +316,8 @@ resource "coder_script" "agentapi_shutdown" { } resource "coder_app" "agentapi_web" { + count = local.web_app ? 1 : 0 + slug = var.web_app_slug display_name = var.web_app_display_name agent_id = var.agent_id @@ -341,5 +354,5 @@ resource "coder_app" "agentapi_cli" { } output "task_app_id" { - value = coder_app.agentapi_web.id + value = local.web_app ? coder_app.agentapi_web[0].id : "" } diff --git a/registry/coder/modules/claude-code/README.md b/registry/coder/modules/claude-code/README.md index 5a2eacd6..c4be4595 100644 --- a/registry/coder/modules/claude-code/README.md +++ b/registry/coder/modules/claude-code/README.md @@ -13,7 +13,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude ```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.8.2" + version = "4.9.0" agent_id = coder_agent.main.id workdir = "/home/coder/project" claude_api_key = "xxxx-xxxxx-xxxx" @@ -60,7 +60,7 @@ By default, when `enable_boundary = true`, the module uses `coder boundary` subc ```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.8.2" + version = "4.9.0" agent_id = coder_agent.main.id workdir = "/home/coder/project" enable_boundary = true @@ -81,7 +81,7 @@ For tasks integration with AI Bridge, add `enable_aibridge = true` to the [Usage ```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.8.2" + version = "4.9.0" agent_id = coder_agent.main.id workdir = "/home/coder/project" enable_aibridge = true @@ -110,7 +110,7 @@ data "coder_task" "me" {} module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.8.2" + version = "4.9.0" agent_id = coder_agent.main.id workdir = "/home/coder/project" ai_prompt = data.coder_task.me.prompt @@ -133,7 +133,7 @@ This example shows additional configuration options for version pinning, custom ```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.8.2" + version = "4.9.0" agent_id = coder_agent.main.id workdir = "/home/coder/project" @@ -189,7 +189,7 @@ Run and configure Claude Code as a standalone CLI in your workspace. ```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.8.2" + version = "4.9.0" agent_id = coder_agent.main.id workdir = "/home/coder/project" install_claude_code = true @@ -211,7 +211,7 @@ variable "claude_code_oauth_token" { module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.8.2" + version = "4.9.0" agent_id = coder_agent.main.id workdir = "/home/coder/project" claude_code_oauth_token = var.claude_code_oauth_token @@ -284,7 +284,7 @@ resource "coder_env" "bedrock_api_key" { module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.8.2" + version = "4.9.0" agent_id = coder_agent.main.id workdir = "/home/coder/project" model = "global.anthropic.claude-sonnet-4-5-20250929-v1:0" @@ -341,7 +341,7 @@ resource "coder_env" "google_application_credentials" { module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.8.2" + version = "4.9.0" agent_id = coder_agent.main.id workdir = "/home/coder/project" model = "claude-sonnet-4@20250514" diff --git a/registry/coder/modules/claude-code/main.tf b/registry/coder/modules/claude-code/main.tf index ba45d69c..3781ee36 100644 --- a/registry/coder/modules/claude-code/main.tf +++ b/registry/coder/modules/claude-code/main.tf @@ -47,6 +47,12 @@ variable "report_tasks" { default = true } +variable "web_app" { + type = bool + description = "Whether to create the web app for Claude Code. When false, AgentAPI still runs but no web UI app icon is shown in the Coder dashboard. This is automatically enabled when using Coder Tasks, regardless of this setting." + default = true +} + variable "cli_app" { type = bool description = "Whether to create a CLI app for Claude Code" @@ -362,9 +368,10 @@ locals { module "agentapi" { source = "registry.coder.com/coder/agentapi/coder" - version = "2.2.0" + version = "2.3.0" - agent_id = var.agent_id + agent_id = var.agent_id + # TODO: pass web_app = var.web_app once agentapi module is published with web_app support web_app_slug = local.app_slug web_app_order = var.order web_app_group = var.group