From 33e522e61238ce84589f838fb8243992b4ae1cc5 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Wed, 19 Nov 2025 21:44:41 +0530 Subject: [PATCH 1/9] feat: add mode flag and fix animation --- AGENTS.md | 11 +++++++++++ .../coder-labs/modules/sourcegraph-amp/README.md | 4 ++-- .../coder-labs/modules/sourcegraph-amp/main.tf | 12 ++++++++++++ .../modules/sourcegraph-amp/scripts/start.sh | 14 ++++++++++++-- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index bc69ef4a8..0f2de9015 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -144,6 +144,17 @@ Use semantic versioning for modules: - TypeScript for test utilities - Various npm packages for documentation processing +### Automated Dependency Management + +The repository includes automated weekly dependency bumping for agentic modules: + +- **Weekly Updates**: Automatic PRs created every Monday for AgentAPI version bumps +- **Integrated Testing**: All dependency updates are validated through CI tests +- **Auto-Merge**: PRs that pass all tests are automatically merged +- **Manual Trigger**: Can be triggered manually via GitHub Actions UI + +See [docs/DEPENDENCY_AUTOMATION.md](docs/DEPENDENCY_AUTOMATION.md) for detailed documentation. + ## Workflow Notes ### Contributing Process diff --git a/registry/coder-labs/modules/sourcegraph-amp/README.md b/registry/coder-labs/modules/sourcegraph-amp/README.md index 608defd60..942aeb556 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/README.md +++ b/registry/coder-labs/modules/sourcegraph-amp/README.md @@ -15,8 +15,8 @@ module "amp-cli" { source = "registry.coder.com/coder-labs/sourcegraph-amp/coder" version = "2.0.1" agent_id = coder_agent.example.id - sourcegraph_amp_api_key = var.sourcegraph_amp_api_key - install_sourcegraph_amp = true + amp_api_key = var.amp_api_key + install_amp = true agentapi_version = "latest" } ``` diff --git a/registry/coder-labs/modules/sourcegraph-amp/main.tf b/registry/coder-labs/modules/sourcegraph-amp/main.tf index fc36ea8d3..55f941524 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/main.tf +++ b/registry/coder-labs/modules/sourcegraph-amp/main.tf @@ -160,6 +160,16 @@ variable "mcp" { default = null } +variable "mode" { + type = string + description = "Set the agent mode (free, rush, smart) — controls the model, system prompt, and tool selection" + default = "" + validation { + condition = contains(["free", "rush", "smart"], var.mode) + error_message = "Invalid mode. Select one from (free, rush, smart)" + } +} + data "external" "env" { program = ["sh", "-c", "echo '{\"CODER_AGENT_TOKEN\":\"'$CODER_AGENT_TOKEN'\",\"CODER_AGENT_URL\":\"'$CODER_AGENT_URL'\"}'"] } @@ -170,6 +180,7 @@ locals { default_base_config = jsonencode({ "amp.anthropic.thinking.enabled" = true "amp.todos.enabled" = true + "amp.terminal.animation" = false }) user_config = jsondecode(var.base_amp_config != "" ? var.base_amp_config : local.default_base_config) @@ -237,6 +248,7 @@ module "agentapi" { ARG_AMP_START_DIRECTORY='${var.workdir}' \ ARG_AMP_TASK_PROMPT='${base64encode(var.ai_prompt)}' \ ARG_REPORT_TASKS='${var.report_tasks}' \ + ARG_MODE='${var.mode}' \ /tmp/start.sh EOT diff --git a/registry/coder-labs/modules/sourcegraph-amp/scripts/start.sh b/registry/coder-labs/modules/sourcegraph-amp/scripts/start.sh index 46dc2d761..31565145e 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/scripts/start.sh +++ b/registry/coder-labs/modules/sourcegraph-amp/scripts/start.sh @@ -27,8 +27,11 @@ echo "--------------------------------" printf "Workspace: %s\n" "$ARG_AMP_START_DIRECTORY" printf "Task Prompt: %s\n" "$ARG_AMP_TASK_PROMPT" printf "ARG_REPORT_TASKS: %s\n" "$ARG_REPORT_TASKS" +printf "ARG_MODE: %s\n" "$ARG_MODE" echo "--------------------------------" + + ensure_command amp echo "AMP version: $(amp --version)" @@ -48,6 +51,13 @@ else printf "amp_api_key not provided\n" fi +ARGS=() + +if [ -n "$ARG_MODE" ]; then + printf "Running agent in: %s mode" "$ARG_MODE" + ARGS+=(--mode "$ARG_MODE") +fi + if [ -n "$ARG_AMP_TASK_PROMPT" ]; then if [ "$ARG_REPORT_TASKS" == "true" ]; then printf "amp task prompt provided : %s" "$ARG_AMP_TASK_PROMPT\n" @@ -56,8 +66,8 @@ if [ -n "$ARG_AMP_TASK_PROMPT" ]; then PROMPT="$ARG_AMP_TASK_PROMPT" fi # Pipe the prompt into amp, which will be run inside agentapi - agentapi server --type amp --term-width=67 --term-height=1190 -- bash -c "echo \"$PROMPT\" | amp" + agentapi server --type amp --term-width=67 --term-height=1190 -- bash -c "echo \"$PROMPT\" | amp" "${ARGS[@]}" else printf "No task prompt given.\n" - agentapi server --type amp --term-width=67 --term-height=1190 -- amp + agentapi server --type amp --term-width=67 --term-height=1190 -- amp "${ARGS[@]}" fi From 0fc6e5a671275549b3f8a4f32655699e3627499c Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Wed, 19 Nov 2025 21:58:37 +0530 Subject: [PATCH 2/9] chore: validation fix --- registry/coder-labs/modules/sourcegraph-amp/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder-labs/modules/sourcegraph-amp/main.tf b/registry/coder-labs/modules/sourcegraph-amp/main.tf index 55f941524..7a182ae56 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/main.tf +++ b/registry/coder-labs/modules/sourcegraph-amp/main.tf @@ -165,7 +165,7 @@ variable "mode" { description = "Set the agent mode (free, rush, smart) — controls the model, system prompt, and tool selection" default = "" validation { - condition = contains(["free", "rush", "smart"], var.mode) + condition = contains(["", "free", "rush", "smart"], var.mode) error_message = "Invalid mode. Select one from (free, rush, smart)" } } From 1f139c532ce1ad80b017849b9cd2cbf1ee110f35 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Wed, 19 Nov 2025 22:05:36 +0530 Subject: [PATCH 3/9] wip --- registry/coder-labs/modules/sourcegraph-amp/scripts/install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/registry/coder-labs/modules/sourcegraph-amp/scripts/install.sh b/registry/coder-labs/modules/sourcegraph-amp/scripts/install.sh index 0af54e5e8..6b4e66493 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/scripts/install.sh +++ b/registry/coder-labs/modules/sourcegraph-amp/scripts/install.sh @@ -1,8 +1,6 @@ #!/bin/bash set -euo pipefail -source "$HOME"/.bashrc - # ANSI colors BOLD='\033[1m' GREEN='\033[0;32m' From 1212eda623e58dc9ca54c66397615bc6cc1592e6 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Wed, 19 Nov 2025 22:19:56 +0530 Subject: [PATCH 4/9] wip --- .../coder-labs/modules/sourcegraph-amp/README.md | 12 ++++++------ .../modules/sourcegraph-amp/scripts/start.sh | 6 ++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/registry/coder-labs/modules/sourcegraph-amp/README.md b/registry/coder-labs/modules/sourcegraph-amp/README.md index 942aeb556..5a9dde2c3 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/README.md +++ b/registry/coder-labs/modules/sourcegraph-amp/README.md @@ -12,12 +12,12 @@ Run [Amp CLI](https://ampcode.com/) in your workspace to access Sourcegraph's AI ```tf module "amp-cli" { - source = "registry.coder.com/coder-labs/sourcegraph-amp/coder" - version = "2.0.1" - agent_id = coder_agent.example.id - amp_api_key = var.amp_api_key - install_amp = true - agentapi_version = "latest" + source = "registry.coder.com/coder-labs/sourcegraph-amp/coder" + version = "2.0.1" + agent_id = coder_agent.example.id + amp_api_key = var.amp_api_key + install_amp = true + agentapi_version = "latest" } ``` diff --git a/registry/coder-labs/modules/sourcegraph-amp/scripts/start.sh b/registry/coder-labs/modules/sourcegraph-amp/scripts/start.sh index 31565145e..d8dcb80d1 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/scripts/start.sh +++ b/registry/coder-labs/modules/sourcegraph-amp/scripts/start.sh @@ -30,8 +30,6 @@ printf "ARG_REPORT_TASKS: %s\n" "$ARG_REPORT_TASKS" printf "ARG_MODE: %s\n" "$ARG_MODE" echo "--------------------------------" - - ensure_command amp echo "AMP version: $(amp --version)" @@ -54,8 +52,8 @@ fi ARGS=() if [ -n "$ARG_MODE" ]; then - printf "Running agent in: %s mode" "$ARG_MODE" - ARGS+=(--mode "$ARG_MODE") + printf "Running agent in: %s mode" "$ARG_MODE" + ARGS+=(--mode "$ARG_MODE") fi if [ -n "$ARG_AMP_TASK_PROMPT" ]; then From 8d94feb6dc59e84d530dd27c0ce8139883256662 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Wed, 19 Nov 2025 22:29:52 +0530 Subject: [PATCH 5/9] wip --- registry/coder-labs/modules/sourcegraph-amp/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/registry/coder-labs/modules/sourcegraph-amp/main.tf b/registry/coder-labs/modules/sourcegraph-amp/main.tf index 7a182ae56..5e857115e 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/main.tf +++ b/registry/coder-labs/modules/sourcegraph-amp/main.tf @@ -161,9 +161,9 @@ variable "mcp" { } variable "mode" { - type = string + type = string description = "Set the agent mode (free, rush, smart) — controls the model, system prompt, and tool selection" - default = "" + default = "" validation { condition = contains(["", "free", "rush", "smart"], var.mode) error_message = "Invalid mode. Select one from (free, rush, smart)" From 22c7c85e52357845d1beb2eaec7ff73b1ca13f96 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Sun, 23 Nov 2025 13:11:02 +0530 Subject: [PATCH 6/9] chore: update amp version --- registry/coder-labs/modules/sourcegraph-amp/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder-labs/modules/sourcegraph-amp/main.tf b/registry/coder-labs/modules/sourcegraph-amp/main.tf index 5e857115e..d53cd816a 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/main.tf +++ b/registry/coder-labs/modules/sourcegraph-amp/main.tf @@ -55,7 +55,7 @@ variable "install_agentapi" { variable "agentapi_version" { type = string description = "The version of AgentAPI to install." - default = "v0.10.0" + default = "v0.11.1" } variable "cli_app" { From 72953994299143e4283d6032c1da6855c4b56064 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Sun, 23 Nov 2025 13:12:40 +0530 Subject: [PATCH 7/9] chore: bump module version --- registry/coder-labs/modules/sourcegraph-amp/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/registry/coder-labs/modules/sourcegraph-amp/README.md b/registry/coder-labs/modules/sourcegraph-amp/README.md index 5a9dde2c3..25693228c 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/README.md +++ b/registry/coder-labs/modules/sourcegraph-amp/README.md @@ -13,7 +13,7 @@ Run [Amp CLI](https://ampcode.com/) in your workspace to access Sourcegraph's AI ```tf module "amp-cli" { source = "registry.coder.com/coder-labs/sourcegraph-amp/coder" - version = "2.0.1" + version = "2.0.2" agent_id = coder_agent.example.id amp_api_key = var.amp_api_key install_amp = true @@ -48,7 +48,7 @@ variable "amp_api_key" { module "amp-cli" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder-labs/sourcegraph-amp/coder" - amp_version = "2.0.1" + amp_version = "2.0.2" agent_id = coder_agent.example.id amp_api_key = var.amp_api_key # recommended for tasks usage workdir = "/home/coder/project" From 4674eac58894eace20722fec3bd809157ee7fe91 Mon Sep 17 00:00:00 2001 From: 35C4n0r <70096901+35C4n0r@users.noreply.github.com> Date: Wed, 26 Nov 2025 07:49:42 +0530 Subject: [PATCH 8/9] Remove automated dependency management section Removed section on automated dependency management, including details on weekly updates, integrated testing, auto-merge, and manual trigger. --- AGENTS.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 0f2de9015..bc69ef4a8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -144,17 +144,6 @@ Use semantic versioning for modules: - TypeScript for test utilities - Various npm packages for documentation processing -### Automated Dependency Management - -The repository includes automated weekly dependency bumping for agentic modules: - -- **Weekly Updates**: Automatic PRs created every Monday for AgentAPI version bumps -- **Integrated Testing**: All dependency updates are validated through CI tests -- **Auto-Merge**: PRs that pass all tests are automatically merged -- **Manual Trigger**: Can be triggered manually via GitHub Actions UI - -See [docs/DEPENDENCY_AUTOMATION.md](docs/DEPENDENCY_AUTOMATION.md) for detailed documentation. - ## Workflow Notes ### Contributing Process From 72411755d4cf8b6352afa50a1504a34bbe60fcc7 Mon Sep 17 00:00:00 2001 From: 35C4n0r Date: Wed, 26 Nov 2025 07:53:31 +0530 Subject: [PATCH 9/9] chore: bump version --- registry/coder-labs/modules/sourcegraph-amp/README.md | 4 ++-- registry/coder-labs/modules/sourcegraph-amp/main.tf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/registry/coder-labs/modules/sourcegraph-amp/README.md b/registry/coder-labs/modules/sourcegraph-amp/README.md index 25693228c..6ba0576fa 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/README.md +++ b/registry/coder-labs/modules/sourcegraph-amp/README.md @@ -13,7 +13,7 @@ Run [Amp CLI](https://ampcode.com/) in your workspace to access Sourcegraph's AI ```tf module "amp-cli" { source = "registry.coder.com/coder-labs/sourcegraph-amp/coder" - version = "2.0.2" + version = "2.1.0" agent_id = coder_agent.example.id amp_api_key = var.amp_api_key install_amp = true @@ -48,7 +48,7 @@ variable "amp_api_key" { module "amp-cli" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder-labs/sourcegraph-amp/coder" - amp_version = "2.0.2" + amp_version = "2.1.0" agent_id = coder_agent.example.id amp_api_key = var.amp_api_key # recommended for tasks usage workdir = "/home/coder/project" diff --git a/registry/coder-labs/modules/sourcegraph-amp/main.tf b/registry/coder-labs/modules/sourcegraph-amp/main.tf index d53cd816a..c61e276de 100644 --- a/registry/coder-labs/modules/sourcegraph-amp/main.tf +++ b/registry/coder-labs/modules/sourcegraph-amp/main.tf @@ -162,7 +162,7 @@ variable "mcp" { variable "mode" { type = string - description = "Set the agent mode (free, rush, smart) — controls the model, system prompt, and tool selection" + description = "Set the agent mode (free, rush, smart) — controls the model, system prompt, and tool selection. Default: smart" default = "" validation { condition = contains(["", "free", "rush", "smart"], var.mode)