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
|
description: Coding Agent Multiplexer - Run multiple AI agents in parallel
|
||||||
icon: ../../../../.icons/mux.svg
|
icon: ../../../../.icons/mux.svg
|
||||||
verified: true
|
verified: true
|
||||||
tags: [ai, agents, development, multiplexer]
|
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
|
```tf
|
||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.7"
|
version = "1.0.8"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Parallel Agent Execution**: Run multiple AI agents simultaneously on different tasks
|
- **Parallel Agent Execution**: Run multiple AI agents simultaneously on different tasks
|
||||||
- **Mux Workspace Isolation**: Each agent works in its own isolated environment
|
- **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
|
- **Long-Running Processes**: Resume AI work after interruptions
|
||||||
- **Cost Tracking**: Monitor API usage across agents
|
- **Cost Tracking**: Monitor API usage across agents
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ module "mux" {
|
|||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.7"
|
version = "1.0.8"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -48,20 +48,34 @@ module "mux" {
|
|||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.7"
|
version = "1.0.8"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
# Default is "latest"; set to a specific version to pin
|
# Default is "latest"; set to a specific version to pin
|
||||||
install_version = "0.4.0"
|
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
|
### Custom Port
|
||||||
|
|
||||||
```tf
|
```tf
|
||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.7"
|
version = "1.0.8"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
port = 8080
|
port = 8080
|
||||||
}
|
}
|
||||||
@ -69,13 +83,13 @@ module "mux" {
|
|||||||
|
|
||||||
### Use Cached Installation
|
### 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
|
```tf
|
||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.7"
|
version = "1.0.8"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
use_cached = true
|
use_cached = true
|
||||||
}
|
}
|
||||||
@ -83,13 +97,13 @@ module "mux" {
|
|||||||
|
|
||||||
### Skip Install
|
### 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
|
```tf
|
||||||
module "mux" {
|
module "mux" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/mux/coder"
|
source = "registry.coder.com/coder/mux/coder"
|
||||||
version = "1.0.7"
|
version = "1.0.8"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
install = false
|
install = false
|
||||||
}
|
}
|
||||||
@ -101,6 +115,6 @@ module "mux" {
|
|||||||
|
|
||||||
## Notes
|
## 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)
|
- 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)
|
- 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" {
|
variable "port" {
|
||||||
type = number
|
type = number
|
||||||
description = "The port to run mux on."
|
description = "The port to run Mux on."
|
||||||
default = 4000
|
default = 4000
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "display_name" {
|
variable "display_name" {
|
||||||
type = string
|
type = string
|
||||||
description = "The display name for the mux application."
|
description = "The display name for the Mux application."
|
||||||
default = "mux"
|
default = "Mux"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "slug" {
|
variable "slug" {
|
||||||
type = string
|
type = string
|
||||||
description = "The slug for the mux application."
|
description = "The slug for the Mux application."
|
||||||
default = "mux"
|
default = "mux"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "install_prefix" {
|
variable "install_prefix" {
|
||||||
type = string
|
type = string
|
||||||
description = "The prefix to install mux to."
|
description = "The prefix to install Mux to."
|
||||||
default = "/tmp/mux"
|
default = "/tmp/mux"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "log_path" {
|
variable "log_path" {
|
||||||
type = string
|
type = string
|
||||||
description = "The path for mux logs."
|
description = "The path for Mux logs."
|
||||||
default = "/tmp/mux.log"
|
default = "/tmp/mux.log"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "add-project" {
|
variable "add-project" {
|
||||||
type = string
|
type = string
|
||||||
description = "Path to add/open as a project in mux (idempotent)."
|
description = "Optional path to add/open as a project in Mux on startup."
|
||||||
default = ""
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "install_version" {
|
variable "install_version" {
|
||||||
type = string
|
type = string
|
||||||
description = "The version or dist-tag of mux to install."
|
description = "The version or dist-tag of Mux to install."
|
||||||
default = "next"
|
default = "next"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,13 +80,13 @@ variable "group" {
|
|||||||
|
|
||||||
variable "install" {
|
variable "install" {
|
||||||
type = bool
|
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
|
default = true
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "use_cached" {
|
variable "use_cached" {
|
||||||
type = bool
|
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
|
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.
|
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.
|
If wildcards have not been setup by the administrator then apps with "subdomain" set to true will not be accessible.
|
||||||
EOT
|
EOT
|
||||||
default = false
|
default = true
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "open_in" {
|
variable "open_in" {
|
||||||
@ -115,13 +115,13 @@ variable "open_in" {
|
|||||||
|
|
||||||
resource "coder_script" "mux" {
|
resource "coder_script" "mux" {
|
||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
display_name = "mux"
|
display_name = var.display_name
|
||||||
icon = "/icon/mux.svg"
|
icon = "/icon/mux.svg"
|
||||||
script = templatefile("${path.module}/run.sh", {
|
script = templatefile("${path.module}/run.sh", {
|
||||||
VERSION : var.install_version,
|
VERSION : var.install_version,
|
||||||
PORT : var.port,
|
PORT : var.port,
|
||||||
LOG_PATH : var.log_path,
|
LOG_PATH : var.log_path,
|
||||||
ADD_PROJECT : var.add-project,
|
ADD_PROJECT : var.add-project == null ? "" : var.add-project,
|
||||||
INSTALL_PREFIX : var.install_prefix,
|
INSTALL_PREFIX : var.install_prefix,
|
||||||
OFFLINE : !var.install,
|
OFFLINE : !var.install,
|
||||||
USE_CACHED : var.use_cached,
|
USE_CACHED : var.use_cached,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user