Skip to content

Commit 97bffd1

Browse files
Merge branch 'main' into cat/contrib-docs-testing
2 parents 2f8552f + 8acda84 commit 97bffd1

File tree

42 files changed

+2444
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2444
-81
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Validate formatting
5151
run: bun fmt:ci
5252
- name: Check for typos
53-
uses: crate-ci/typos@v1.36.3
53+
uses: crate-ci/typos@v1.37.2
5454
with:
5555
config: .github/typos.toml
5656
validate-readme-files:

.icons/auto-dev-server.svg

Lines changed: 4 additions & 0 deletions
Loading

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,4 +502,8 @@ When reporting bugs, include:
502502
4. **Breaking changes** without defaults
503503
5. **Not running** formatting (`bun run fmt`) and tests (`terraform test`, and `bun test main.test.ts` if applicable) before submitting
504504

505+
## For Maintainers
506+
507+
Guidelines for reviewing PRs, managing releases, and maintaining the registry. [See the maintainer guide for detailed information.](./MAINTAINER.md)
508+
505509
Happy contributing! 🚀

MAINTAINER.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Check that PRs have:
2323
- [ ] Working tests (`terraform test`)
2424
- [ ] Formatted code (`bun run fmt`)
2525
- [ ] Avatar image for new namespaces (`avatar.png` or `avatar.svg` in `.images/`)
26+
- [ ] Version label: `version:patch`, `version:minor`, or `version:major`
2627

2728
### Version Guidelines
2829

@@ -32,7 +33,8 @@ When reviewing PRs, ensure the version change follows semantic versioning:
3233
- **Minor** (1.2.3 → 1.3.0): New features, adding inputs
3334
- **Major** (1.2.3 → 2.0.0): Breaking changes (removing inputs, changing types)
3435

35-
PRs should clearly indicate the version change (e.g., `v1.2.3 → v1.2.4`).
36+
PRs should clearly indicate the intended version change (e.g., `v1.2.3 → v1.2.4`) and include the appropriate label: `version:patch`, `version:minor`, or `version:major`.
37+
The “Version Bump” CI uses this label to validate required updates (README version refs, etc.).
3638

3739
### Validate READMEs
3840

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ Simply include that snippet inside your Coder template, defining any data depend
4848
## Contributing
4949

5050
We are always accepting new contributions. [Please see our contributing guide for more information.](./CONTRIBUTING.md)
51+
52+
## For Maintainers
53+
54+
Guidelines for maintainers reviewing PRs and managing releases. [See the maintainer guide for more information.](./MAINTAINER.md)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run Auggie CLI in your workspace to access Augment's AI coding assistant with ad
1313
```tf
1414
module "auggie" {
1515
source = "registry.coder.com/coder-labs/auggie/coder"
16-
version = "0.1.0"
16+
version = "0.2.0"
1717
agent_id = coder_agent.example.id
1818
folder = "/home/coder/project"
1919
}
@@ -47,7 +47,7 @@ module "coder-login" {
4747
4848
module "auggie" {
4949
source = "registry.coder.com/coder-labs/auggie/coder"
50-
version = "0.1.0"
50+
version = "0.2.0"
5151
agent_id = coder_agent.example.id
5252
folder = "/home/coder/project"
5353
@@ -103,7 +103,7 @@ EOF
103103
```tf
104104
module "auggie" {
105105
source = "registry.coder.com/coder-labs/auggie/coder"
106-
version = "0.1.0"
106+
version = "0.2.0"
107107
agent_id = coder_agent.example.id
108108
folder = "/home/coder/project"
109109

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ variable "install_agentapi" {
6666
variable "agentapi_version" {
6767
type = string
6868
description = "The version of AgentAPI to install."
69-
default = "v0.6.0"
69+
default = "v0.10.0"
7070
validation {
7171
condition = can(regex("^v[0-9]+\\.[0-9]+\\.[0-9]+", var.agentapi_version))
7272
error_message = "agentapi_version must be a valid semantic version starting with 'v', like 'v0.3.3'."
@@ -178,7 +178,7 @@ locals {
178178

179179
module "agentapi" {
180180
source = "registry.coder.com/coder/agentapi/coder"
181-
version = "1.1.1"
181+
version = "1.2.0"
182182

183183
agent_id = var.agent_id
184184
web_app_slug = local.app_slug

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run Codex CLI in your workspace to access OpenAI's models through the Codex inte
1313
```tf
1414
module "codex" {
1515
source = "registry.coder.com/coder-labs/codex/coder"
16-
version = "2.0.0"
16+
version = "2.1.0"
1717
agent_id = coder_agent.example.id
1818
openai_api_key = var.openai_api_key
1919
folder = "/home/coder/project"
@@ -33,7 +33,7 @@ module "codex" {
3333
module "codex" {
3434
count = data.coder_workspace.me.start_count
3535
source = "registry.coder.com/coder-labs/codex/coder"
36-
version = "2.0.0"
36+
version = "2.1.0"
3737
agent_id = coder_agent.example.id
3838
openai_api_key = "..."
3939
folder = "/home/coder/project"
@@ -60,7 +60,7 @@ module "coder-login" {
6060
6161
module "codex" {
6262
source = "registry.coder.com/coder-labs/codex/coder"
63-
version = "2.0.0"
63+
version = "2.1.0"
6464
agent_id = coder_agent.example.id
6565
openai_api_key = "..."
6666
ai_prompt = data.coder_parameter.ai_prompt.value
@@ -106,7 +106,7 @@ For custom Codex configuration, use `base_config_toml` and/or `additional_mcp_se
106106
```tf
107107
module "codex" {
108108
source = "registry.coder.com/coder-labs/codex/coder"
109-
version = "2.0.0"
109+
version = "2.1.0"
110110
# ... other variables ...
111111
112112
# Override default configuration

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ variable "install_agentapi" {
8080
variable "agentapi_version" {
8181
type = string
8282
description = "The version of AgentAPI to install."
83-
default = "v0.5.0"
83+
default = "v0.10.0"
8484
}
8585

8686
variable "codex_model" {
@@ -128,7 +128,7 @@ locals {
128128

129129
module "agentapi" {
130130
source = "registry.coder.com/coder/agentapi/coder"
131-
version = "1.1.1"
131+
version = "1.2.0"
132132

133133
agent_id = var.agent_id
134134
web_app_slug = local.app_slug
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
---
2+
display_name: Copilot CLI
3+
description: GitHub Copilot CLI agent for AI-powered terminal assistance
4+
icon: ../../../../.icons/github.svg
5+
verified: false
6+
tags: [agent, copilot, ai, github, tasks]
7+
---
8+
9+
# Copilot
10+
11+
Run [GitHub Copilot CLI](https://docs.github.com/copilot/concepts/agents/about-copilot-cli) in your workspace for AI-powered coding assistance directly from the terminal. This module integrates with [AgentAPI](https://github.com/coder/agentapi) for task reporting in the Coder UI.
12+
13+
```tf
14+
module "copilot" {
15+
source = "registry.coder.com/coder-labs/copilot/coder"
16+
version = "0.2.1"
17+
agent_id = coder_agent.example.id
18+
workdir = "/home/coder/projects"
19+
}
20+
```
21+
22+
> [!IMPORTANT]
23+
> This example assumes you have [Coder external authentication](https://coder.com/docs/admin/external-auth) configured with `id = "github"`. If not, you can provide a direct token using the `github_token` variable or provide the correct external authentication id for GitHub by setting `external_auth_id = "my-github"`.
24+
25+
> [!NOTE]
26+
> By default, this module is configured to run the embedded chat interface as a path-based application. In production, we recommend that you configure a [wildcard access URL](https://coder.com/docs/admin/setup#wildcard-access-url) and set `subdomain = true`. See [here](https://coder.com/docs/tutorials/best-practices/security-best-practices#disable-path-based-apps) for more details.
27+
28+
## Prerequisites
29+
30+
- **Node.js v22+** and **npm v10+**
31+
- **[Active Copilot subscription](https://docs.github.com/en/copilot/about-github-copilot/subscription-plans-for-github-copilot)** (GitHub Copilot Pro, Pro+, Business, or Enterprise)
32+
- **GitHub authentication** via one of:
33+
- [Coder external authentication](https://coder.com/docs/admin/external-auth) (recommended)
34+
- Direct token via `github_token` variable
35+
- Interactive login in Copilot
36+
37+
## Examples
38+
39+
### Usage with Tasks
40+
41+
For development environments where you want Copilot to have full access to tools and automatically resume sessions:
42+
43+
```tf
44+
data "coder_parameter" "ai_prompt" {
45+
type = "string"
46+
name = "AI Prompt"
47+
default = ""
48+
description = "Initial task prompt for Copilot."
49+
mutable = true
50+
}
51+
52+
module "copilot" {
53+
source = "registry.coder.com/coder-labs/copilot/coder"
54+
version = "0.2.1"
55+
agent_id = coder_agent.example.id
56+
workdir = "/home/coder/projects"
57+
58+
ai_prompt = data.coder_parameter.ai_prompt.value
59+
copilot_model = "claude-sonnet-4.5"
60+
allow_all_tools = true
61+
resume_session = true
62+
63+
trusted_directories = ["/home/coder/projects", "/tmp"]
64+
}
65+
```
66+
67+
### Advanced Configuration
68+
69+
Customize tool permissions, MCP servers, and Copilot settings:
70+
71+
```tf
72+
module "copilot" {
73+
source = "registry.coder.com/coder-labs/copilot/coder"
74+
version = "0.2.1"
75+
agent_id = coder_agent.example.id
76+
workdir = "/home/coder/projects"
77+
78+
# Version pinning (defaults to "0.0.334", use "latest" for newest version)
79+
copilot_version = "latest"
80+
81+
# Tool permissions
82+
allow_tools = ["shell(git)", "shell(npm)", "write"]
83+
trusted_directories = ["/home/coder/projects", "/tmp"]
84+
85+
# Custom Copilot configuration
86+
copilot_config = jsonencode({
87+
banner = "never"
88+
theme = "dark"
89+
})
90+
91+
# MCP server configuration
92+
mcp_config = jsonencode({
93+
mcpServers = {
94+
filesystem = {
95+
command = "npx"
96+
args = ["-y", "@modelcontextprotocol/server-filesystem", "/home/coder/projects"]
97+
description = "Provides file system access to the workspace"
98+
name = "Filesystem"
99+
timeout = 3000
100+
type = "local"
101+
tools = ["*"]
102+
trust = true
103+
}
104+
playwright = {
105+
command = "npx"
106+
args = ["-y", "@playwright/mcp@latest", "--headless", "--isolated"]
107+
description = "Browser automation for testing and previewing changes"
108+
name = "Playwright"
109+
timeout = 5000
110+
type = "local"
111+
tools = ["*"]
112+
trust = false
113+
}
114+
}
115+
})
116+
117+
# Pre-install Node.js if needed
118+
pre_install_script = <<-EOT
119+
#!/bin/bash
120+
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
121+
sudo apt-get install -y nodejs
122+
EOT
123+
}
124+
```
125+
126+
> [!NOTE]
127+
> GitHub Copilot CLI does not automatically install MCP servers. You have two options:
128+
>
129+
> - Use `npx -y` in the MCP config (shown above) to auto-install on each run
130+
> - Pre-install MCP servers in `pre_install_script` for faster startup (e.g., `npm install -g @modelcontextprotocol/server-filesystem`)
131+
132+
### Direct Token Authentication
133+
134+
Use this example when you want to provide a GitHub Personal Access Token instead of using Coder external auth:
135+
136+
```tf
137+
variable "github_token" {
138+
type = string
139+
description = "GitHub Personal Access Token"
140+
sensitive = true
141+
}
142+
143+
module "copilot" {
144+
source = "registry.coder.com/coder-labs/copilot/coder"
145+
version = "0.2.1"
146+
agent_id = coder_agent.example.id
147+
workdir = "/home/coder/projects"
148+
github_token = var.github_token
149+
}
150+
```
151+
152+
### Standalone Mode
153+
154+
Run Copilot as a command-line tool without task reporting or web interface. This installs and configures Copilot, making it available as a CLI app in the Coder agent bar that you can launch to interact with Copilot directly from your terminal. Set `report_tasks = false` to disable integration with Coder Tasks.
155+
156+
```tf
157+
module "copilot" {
158+
source = "registry.coder.com/coder-labs/copilot/coder"
159+
version = "0.2.1"
160+
agent_id = coder_agent.example.id
161+
workdir = "/home/coder"
162+
report_tasks = false
163+
cli_app = true
164+
}
165+
```
166+
167+
## Authentication
168+
169+
The module supports multiple authentication methods (in priority order):
170+
171+
1. **[Coder External Auth](https://coder.com/docs/admin/external-auth) (Recommended)** - Automatic if GitHub external auth is configured in Coder
172+
2. **Direct Token** - Pass `github_token` variable (OAuth or Personal Access Token)
173+
3. **Interactive** - Copilot prompts for login via `/login` command if no auth found
174+
175+
> [!NOTE]
176+
> OAuth tokens work best with Copilot. Personal Access Tokens may have limited functionality.
177+
178+
## Session Resumption
179+
180+
By default, the module resumes the latest Copilot session when the workspace restarts. Set `resume_session = false` to always start fresh sessions.
181+
182+
> [!NOTE]
183+
> Session resumption requires persistent storage for the home directory or workspace volume. Without persistent storage, sessions will not resume across workspace restarts.
184+
185+
## Troubleshooting
186+
187+
If you encounter any issues, check the log files in the `~/.copilot-module` directory within your workspace for detailed information.
188+
189+
```bash
190+
# Installation logs
191+
cat ~/.copilot-module/install.log
192+
193+
# Startup logs
194+
cat ~/.copilot-module/agentapi-start.log
195+
196+
# Pre/post install script logs
197+
cat ~/.copilot-module/pre_install.log
198+
cat ~/.copilot-module/post_install.log
199+
```
200+
201+
> [!NOTE]
202+
> To use tasks with Copilot, you must have an active GitHub Copilot subscription.
203+
> The `workdir` variable is required and specifies the directory where Copilot will run.
204+
205+
## References
206+
207+
- [GitHub Copilot CLI Documentation](https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli)
208+
- [Installing GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli)
209+
- [AgentAPI Documentation](https://github.com/coder/agentapi)
210+
- [Coder AI Agents Guide](https://coder.com/docs/tutorials/ai-agents)

0 commit comments

Comments
 (0)