-
Notifications
You must be signed in to change notification settings - Fork 73
feat(goose): Add tmux support and Session Name variable to Goose #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
670f997
5af7e66
b0a479c
5b33802
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ Run the [Goose](https://block.github.io/goose/) agent in your workspace to gener | |
```tf | ||
module "goose" { | ||
source = "registry.coder.com/coder/goose/coder" | ||
version = "1.1.1" | ||
version = "1.2.0" | ||
agent_id = coder_agent.example.id | ||
folder = "/home/coder" | ||
install_goose = true | ||
|
@@ -24,14 +24,14 @@ module "goose" { | |
|
||
## Prerequisites | ||
|
||
- `screen` must be installed in your workspace to run Goose in the background | ||
- `screen` or `tmux` must be installed in your workspace to run Goose in the background | ||
- You must add the [Coder Login](https://registry.coder.com/modules/coder-login) module to your template | ||
|
||
The `codercom/oss-dogfood:latest` container image can be used for testing on container-based workspaces. | ||
|
||
## Examples | ||
|
||
Your workspace must have `screen` installed to use this. | ||
Your workspace must have `screen` or `tmux` installed to use the background session functionality. | ||
|
||
### Run in the background and report tasks (Experimental) | ||
|
||
|
@@ -90,7 +90,7 @@ resource "coder_agent" "main" { | |
module "goose" { | ||
count = data.coder_workspace.me.start_count | ||
source = "registry.coder.com/coder/goose/coder" | ||
version = "1.1.1" | ||
version = "1.2.0" | ||
agent_id = coder_agent.example.id | ||
folder = "/home/coder" | ||
install_goose = true | ||
|
@@ -99,8 +99,12 @@ module "goose" { | |
# Enable experimental features | ||
experiment_report_tasks = true | ||
|
||
# Run Goose in the background | ||
# Run Goose in the background with screen (pick one: screen or tmux) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From a data modeling standpoint, would we want to get rid of the screen and TMUX variables, and have a single string variable that has the value of I don't know what that would mean for how we've handled versions up until now, since that would be a breaking change, but it feels janky to me that a user can accidentally set both of them, even though only one should be set at a time. I know the script checks for whether they're both set, but for user clarity, it feels like the data should be modeled as being more mutually exclusive There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly that's a super valid point that would be a much simpler solution There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's keep the variables for now. |
||
experiment_use_screen = true | ||
# experiment_use_tmux = true # Alternative: use tmux instead of screen | ||
|
||
# Optional: customize the session name (defaults to "goose") | ||
# session_name = "goose-session" | ||
|
||
# Avoid configuring Goose manually | ||
experiment_auto_configure = true | ||
|
@@ -143,12 +147,12 @@ Note: The indentation in the heredoc is preserved, so you can write the YAML nat | |
|
||
## Run standalone | ||
|
||
Run Goose as a standalone app in your workspace. This will install Goose and run it directly without using screen or any task reporting to the Coder UI. | ||
Run Goose as a standalone app in your workspace. This will install Goose and run it directly without using screen or tmux, and without any task reporting to the Coder UI. | ||
|
||
```tf | ||
module "goose" { | ||
source = "registry.coder.com/coder/goose/coder" | ||
version = "1.1.1" | ||
version = "1.2.0" | ||
agent_id = coder_agent.example.id | ||
folder = "/home/coder" | ||
install_goose = true | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also move the script to a run.sh? It could also be a separate PR effort. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'll go ahead split it into the run script shouldn't be too hard