Skip to content

Commit 1e567f4

Browse files
chore: update to make auggie work more like other ai modules
1 parent 9de4f54 commit 1e567f4

File tree

3 files changed

+48
-15
lines changed

3 files changed

+48
-15
lines changed

registry/coder-labs/modules/auggie/README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ EOF # Required for tasks
6363
continue_previous_conversation = true
6464
interaction_mode = "quiet"
6565
auggie_model = "gpt5"
66+
report_tasks = true
6667
6768
# MCP configuration for additional integrations
6869
mcp = <<-EOF
@@ -71,10 +72,6 @@ EOF # Required for tasks
7172
"filesystem": {
7273
"command": "npx",
7374
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/coder/project"]
74-
},
75-
"git": {
76-
"command": "npx",
77-
"args": ["-y", "@modelcontextprotocol/server-git", "--repository", "/home/coder/project"]
7875
}
7976
}
8077
}
@@ -179,5 +176,3 @@ cat ~/.auggie-module/post_install.log
179176
- [Coder AI Agents Guide](https://coder.com/docs/tutorials/ai-agents)
180177
- [Auggie CLI Reference](https://docs.augmentcode.com/cli/reference)
181178
- [MCP Integration Guide](https://docs.augmentcode.com/cli/integrations#mcp-integrations)
182-
- [AgentAPI Documentation](https://github.com/coder/agentapi)
183-
- [Coder AI Agents Guide](https://coder.com/docs/tutorials/ai-agents)

registry/coder-labs/modules/auggie/main.tf

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ variable "icon" {
3838

3939
variable "folder" {
4040
type = string
41-
description = "The folder to run Codex in."
41+
description = "The folder to run Auggie in."
4242
}
4343

4444
variable "install_auggie" {
@@ -51,6 +51,10 @@ variable "auggie_version" {
5151
type = string
5252
description = "The version of Auggie to install."
5353
default = "" # empty string means the latest available version
54+
validation {
55+
condition = var.auggie_version == "" || can(regex("^v?[0-9]+\\.[0-9]+\\.[0-9]+", var.auggie_version))
56+
error_message = "auggie_version must be empty (for latest) or a valid semantic version like 'v1.2.3' or '1.2.3'."
57+
}
5458
}
5559

5660
variable "install_agentapi" {
@@ -63,17 +67,21 @@ variable "agentapi_version" {
6367
type = string
6468
description = "The version of AgentAPI to install."
6569
default = "v0.6.0"
70+
validation {
71+
condition = can(regex("^v[0-9]+\\.[0-9]+\\.[0-9]+", var.agentapi_version))
72+
error_message = "agentapi_version must be a valid semantic version starting with 'v', like 'v0.3.3'."
73+
}
6674
}
6775

6876
variable "pre_install_script" {
6977
type = string
70-
description = "Custom script to run before installing Codex."
78+
description = "Custom script to run before installing Auggie."
7179
default = null
7280
}
7381

7482
variable "post_install_script" {
7583
type = string
76-
description = "Custom script to run after installing Codex."
84+
description = "Custom script to run after installing Auggie."
7785
default = null
7886
}
7987

@@ -131,6 +139,30 @@ variable "auggie_model" {
131139
default = ""
132140
}
133141

142+
variable "report_tasks" {
143+
type = bool
144+
description = "Whether to enable task reporting to Coder UI via AgentAPI"
145+
default = false
146+
}
147+
148+
variable "cli_app" {
149+
type = bool
150+
description = "Whether to create a CLI app for Auggie"
151+
default = true
152+
}
153+
154+
variable "web_app_display_name" {
155+
type = string
156+
description = "Display name for the web app"
157+
default = "Auggie"
158+
}
159+
160+
variable "cli_app_display_name" {
161+
type = string
162+
description = "Display name for the CLI app"
163+
default = "Auggie CLI"
164+
}
165+
134166
resource "coder_env" "auggie_session_auth" {
135167
agent_id = var.agent_id
136168
name = "AUGMENT_SESSION_AUTH"
@@ -153,9 +185,10 @@ module "agentapi" {
153185
web_app_order = var.order
154186
web_app_group = var.group
155187
web_app_icon = var.icon
156-
web_app_display_name = "Auggie"
157-
cli_app_slug = "${local.app_slug}-cli"
158-
cli_app_display_name = "Auggie CLI"
188+
web_app_display_name = var.web_app_display_name
189+
cli_app = var.cli_app
190+
cli_app_slug = var.cli_app ? "${local.app_slug}-cli" : null
191+
cli_app_display_name = var.cli_app ? var.cli_app_display_name : null
159192
module_dir_name = local.module_dir_name
160193
install_agentapi = var.install_agentapi
161194
agentapi_version = var.agentapi_version
@@ -176,6 +209,7 @@ module "agentapi" {
176209
ARG_AUGGIE_INTERACTION_MODE='${var.interaction_mode}' \
177210
ARG_AUGMENT_SESSION_AUTH='${var.augment_session_token}' \
178211
ARG_AUGGIE_MODEL='${var.auggie_model}' \
212+
ARG_REPORT_TASKS='${var.report_tasks}' \
179213
/tmp/start.sh
180214
EOT
181215

registry/coder-labs/modules/auggie/scripts/start.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ ARG_AUGMENT_SESSION_AUTH=${ARG_AUGMENT_SESSION_AUTH:-}
2626
ARG_AUGGIE_CONTINUE_PREVIOUS_CONVERSATION=${ARG_AUGGIE_CONTINUE_PREVIOUS_CONVERSATION:-false}
2727
ARG_AUGGIE_INTERACTION_MODE=${ARG_AUGGIE_INTERACTION_MODE:-"interactive"}
2828
ARG_AUGGIE_MODEL=${ARG_AUGGIE_MODEL:-}
29+
ARG_REPORT_TASKS=${ARG_REPORT_TASKS:-false}
2930

3031
ARGS=()
3132

@@ -39,6 +40,7 @@ printf "continue_previous_conversation: %s\n" "$ARG_AUGGIE_CONTINUE_PREVIOUS_CON
3940
printf "auggie_interaction_mode: %s\n" "$ARG_AUGGIE_INTERACTION_MODE"
4041
printf "augment_session_auth: %s\n" "$ARG_AUGMENT_SESSION_AUTH"
4142
printf "auggie_model: %s\n" "$ARG_AUGGIE_MODEL"
43+
printf "report_tasks: %s\n" "$ARG_REPORT_TASKS"
4244

4345
echo "--------------------------------"
4446

@@ -64,7 +66,6 @@ function build_auggie_args() {
6466
ARGS+=(--model "$ARG_AUGGIE_MODEL")
6567
fi
6668

67-
# add user mcp file if it exists
6869
if [ -f "$HOME/.augment/user_mcp.json" ]; then
6970
ARGS+=(--mcp-config "$HOME/.augment/user_mcp.json")
7071
fi
@@ -75,7 +76,6 @@ function build_auggie_args() {
7576
done
7677
fi
7778

78-
# add coder mcp file
7979
ARGS+=(--mcp-config "$HOME/.augment/coder_mcp.json")
8080

8181
if [ -n "$ARG_AUGGIE_RULES" ]; then
@@ -88,7 +88,11 @@ function build_auggie_args() {
8888
fi
8989

9090
if [ -n "$ARG_TASK_PROMPT" ]; then
91-
PROMPT="Every step of the way, report your progress using coder_report_task tool with proper summary and statuses. Your task at hand: $ARG_TASK_PROMPT"
91+
if [ "$ARG_REPORT_TASKS" == "true" ]; then
92+
PROMPT="Every step of the way, report your progress using coder_report_task tool with proper summary and statuses. Your task at hand: $ARG_TASK_PROMPT"
93+
else
94+
PROMPT="$ARG_TASK_PROMPT"
95+
fi
9296
ARGS+=(--instruction "$PROMPT")
9397
fi
9498
}

0 commit comments

Comments
 (0)