feat(coder/modules/mux): update defaults and add-project (#677)
## Summary - Default `subdomain` to `true` so Mux uses subdomain routing by default. - Default `display_name` to `Mux`. - Make `add-project` optional (`null` by default) and pass `--add-project` to `mux server` when set. - Bump mux module README example version to `1.0.8`. ## Notes Changing the `subdomain` default may affect workspaces without wildcard subdomain support configured (they can explicitly set `subdomain = false`). ## Testing - `terraform validate` (registry/coder/modules/mux) - `terraform test -verbose` (registry/coder/modules/mux) --- Generated with Mux (AI coding agent).
This commit is contained in:
parent
8d53725005
commit
bd1c4c59cd
@ -1,31 +1,31 @@
|
||||
---
|
||||
display_name: mux
|
||||
display_name: Mux
|
||||
description: Coding Agent Multiplexer - Run multiple AI agents in parallel
|
||||
icon: ../../../../.icons/mux.svg
|
||||
verified: true
|
||||
tags: [ai, agents, development, multiplexer]
|
||||
---
|
||||
|
||||
# mux
|
||||
# Mux
|
||||
|
||||
Automatically install and run [mux](https://github.com/coder/mux) in a Coder workspace. By default, the module installs `mux@next` from npm (with a fallback to downloading the npm tarball if npm is unavailable). mux is a desktop application for parallel agentic development that enables developers to run multiple AI agents simultaneously across isolated workspaces.
|
||||
Automatically install and run [Mux](https://github.com/coder/mux) in a Coder workspace. By default, the module installs `mux@next` from npm (with a fallback to downloading the npm tarball if npm is unavailable). Mux is a desktop application for parallel agentic development that enables developers to run multiple AI agents simultaneously across isolated workspaces.
|
||||
|
||||
```tf
|
||||
module "mux" {
|
||||
count = data.coder_workspace.me.start_count
|
||||
source = "registry.coder.com/coder/mux/coder"
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
agent_id = coder_agent.main.id
|
||||
}
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- **Parallel Agent Execution**: Run multiple AI agents simultaneously on different tasks
|
||||
- **Mux Workspace Isolation**: Each agent works in its own isolated environment
|
||||
- **Git Divergence Visualization**: Track changes across different mux agent workspaces
|
||||
- **Git Divergence Visualization**: Track changes across different Mux agent workspaces
|
||||
- **Long-Running Processes**: Resume AI work after interruptions
|
||||
- **Cost Tracking**: Monitor API usage across agents
|
||||
|
||||
@ -37,7 +37,7 @@ module "mux" {
|
||||
module "mux" {
|
||||
count = data.coder_workspace.me.start_count
|
||||
source = "registry.coder.com/coder/mux/coder"
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
agent_id = coder_agent.main.id
|
||||
}
|
||||
```
|
||||
@ -48,20 +48,34 @@ module "mux" {
|
||||
module "mux" {
|
||||
count = data.coder_workspace.me.start_count
|
||||
source = "registry.coder.com/coder/mux/coder"
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
agent_id = coder_agent.main.id
|
||||
# Default is "latest"; set to a specific version to pin
|
||||
install_version = "0.4.0"
|
||||
}
|
||||
```
|
||||
|
||||
### Open a Project on Launch
|
||||
|
||||
Start Mux with `mux server --add-project /path/to/project`:
|
||||
|
||||
```tf
|
||||
module "mux" {
|
||||
count = data.coder_workspace.me.start_count
|
||||
source = "registry.coder.com/coder/mux/coder"
|
||||
version = "1.0.8"
|
||||
agent_id = coder_agent.main.id
|
||||
add-project = "/path/to/project"
|
||||
}
|
||||
```
|
||||
|
||||
### Custom Port
|
||||
|
||||
```tf
|
||||
module "mux" {
|
||||
count = data.coder_workspace.me.start_count
|
||||
source = "registry.coder.com/coder/mux/coder"
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
agent_id = coder_agent.main.id
|
||||
port = 8080
|
||||
}
|
||||
@ -69,13 +83,13 @@ module "mux" {
|
||||
|
||||
### Use Cached Installation
|
||||
|
||||
Run an existing copy of mux if found, otherwise install from npm:
|
||||
Run an existing copy of Mux if found, otherwise install from npm:
|
||||
|
||||
```tf
|
||||
module "mux" {
|
||||
count = data.coder_workspace.me.start_count
|
||||
source = "registry.coder.com/coder/mux/coder"
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
agent_id = coder_agent.main.id
|
||||
use_cached = true
|
||||
}
|
||||
@ -83,13 +97,13 @@ module "mux" {
|
||||
|
||||
### Skip Install
|
||||
|
||||
Run without installing from the network (requires mux to be pre-installed):
|
||||
Run without installing from the network (requires Mux to be pre-installed):
|
||||
|
||||
```tf
|
||||
module "mux" {
|
||||
count = data.coder_workspace.me.start_count
|
||||
source = "registry.coder.com/coder/mux/coder"
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
agent_id = coder_agent.main.id
|
||||
install = false
|
||||
}
|
||||
@ -101,6 +115,6 @@ module "mux" {
|
||||
|
||||
## Notes
|
||||
|
||||
- mux is currently in preview and you may encounter bugs
|
||||
- Mux is currently in preview and you may encounter bugs
|
||||
- Requires internet connectivity for agent operations (unless `install` is set to false)
|
||||
- Installs `mux@next` from npm by default (falls back to the npm tarball if npm is unavailable)
|
||||
|
||||
@ -17,43 +17,43 @@ variable "agent_id" {
|
||||
|
||||
variable "port" {
|
||||
type = number
|
||||
description = "The port to run mux on."
|
||||
description = "The port to run Mux on."
|
||||
default = 4000
|
||||
}
|
||||
|
||||
variable "display_name" {
|
||||
type = string
|
||||
description = "The display name for the mux application."
|
||||
default = "mux"
|
||||
description = "The display name for the Mux application."
|
||||
default = "Mux"
|
||||
}
|
||||
|
||||
variable "slug" {
|
||||
type = string
|
||||
description = "The slug for the mux application."
|
||||
description = "The slug for the Mux application."
|
||||
default = "mux"
|
||||
}
|
||||
|
||||
variable "install_prefix" {
|
||||
type = string
|
||||
description = "The prefix to install mux to."
|
||||
description = "The prefix to install Mux to."
|
||||
default = "/tmp/mux"
|
||||
}
|
||||
|
||||
variable "log_path" {
|
||||
type = string
|
||||
description = "The path for mux logs."
|
||||
description = "The path for Mux logs."
|
||||
default = "/tmp/mux.log"
|
||||
}
|
||||
|
||||
variable "add-project" {
|
||||
type = string
|
||||
description = "Path to add/open as a project in mux (idempotent)."
|
||||
default = ""
|
||||
description = "Optional path to add/open as a project in Mux on startup."
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "install_version" {
|
||||
type = string
|
||||
description = "The version or dist-tag of mux to install."
|
||||
description = "The version or dist-tag of Mux to install."
|
||||
default = "next"
|
||||
}
|
||||
|
||||
@ -80,13 +80,13 @@ variable "group" {
|
||||
|
||||
variable "install" {
|
||||
type = bool
|
||||
description = "Install mux from the network (npm or tarball). If false, run without installing (requires a pre-installed mux)."
|
||||
description = "Install Mux from the network (npm or tarball). If false, run without installing (requires a pre-installed Mux)."
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "use_cached" {
|
||||
type = bool
|
||||
description = "Use cached copy of mux if present; otherwise install from npm"
|
||||
description = "Use cached copy of Mux if present; otherwise install from npm"
|
||||
default = false
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ variable "subdomain" {
|
||||
Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder.
|
||||
If wildcards have not been setup by the administrator then apps with "subdomain" set to true will not be accessible.
|
||||
EOT
|
||||
default = false
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "open_in" {
|
||||
@ -115,13 +115,13 @@ variable "open_in" {
|
||||
|
||||
resource "coder_script" "mux" {
|
||||
agent_id = var.agent_id
|
||||
display_name = "mux"
|
||||
display_name = var.display_name
|
||||
icon = "/icon/mux.svg"
|
||||
script = templatefile("${path.module}/run.sh", {
|
||||
VERSION : var.install_version,
|
||||
PORT : var.port,
|
||||
LOG_PATH : var.log_path,
|
||||
ADD_PROJECT : var.add-project,
|
||||
ADD_PROJECT : var.add-project == null ? "" : var.add-project,
|
||||
INSTALL_PREFIX : var.install_prefix,
|
||||
OFFLINE : !var.install,
|
||||
USE_CACHED : var.use_cached,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user