Skip to content

Conversation

@35C4n0r
Copy link
Collaborator

@35C4n0r 35C4n0r commented Oct 28, 2025

Description

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder-labs/modules/opencode
New version: v0.1.0
Breaking change: [ ] Yes [ ] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Related Issues

@35C4n0r 35C4n0r self-assigned this Oct 28, 2025
@35C4n0r 35C4n0r marked this pull request as draft October 28, 2025 15:53
@35C4n0r 35C4n0r marked this pull request as ready for review October 29, 2025 01:33
@matifali
Copy link
Member

Can we add a screenshot? Of the module working in Coder?

Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we configure through the opencode.jsonc config file instead. It will help us support the entire config, including custom providers, without exposing many module inputs.
https://opencode.ai/docs/config/

}
```

### Standalone CLI Mode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an example to be used with Bedrock. Or link to the docs with what to change in the module.

Comment on lines 96 to 128
setup_coder_mcp_server() {
local mcp_config_file="$1"

# Set environment variables based on task reporting setting
if [ "$ARG_REPORT_TASKS" = "true" ]; then
echo "Configuring OpenCode task reporting"
export CODER_MCP_APP_STATUS_SLUG="$ARG_MCP_APP_STATUS_SLUG"
export CODER_MCP_AI_AGENTAPI_URL="http://localhost:3284"
echo "Coder integration configured for task reporting"
else
echo "Task reporting disabled or no app status slug provided."
export CODER_MCP_APP_STATUS_SLUG=""
export CODER_MCP_AI_AGENTAPI_URL=""
fi

# Add coder MCP server configuration to the JSON file
echo "Adding Coder MCP server configuration"

# Create the coder server configuration JSON
coder_config=$(
cat << EOF
{
"type": "local",
"command": ["coder", "exp", "mcp", "server"],
"enabled": true,
"environment": {
"CODER_MCP_APP_STATUS_SLUG": "${CODER_MCP_APP_STATUS_SLUG:-}",
"CODER_MCP_AI_AGENTAPI_URL": "${CODER_MCP_AI_AGENTAPI_URL:-}",
"CODER_AGENT_URL": "${CODER_AGENT_URL:-}",
"CODER_AGENT_TOKEN": "${CODER_AGENT_TOKEN:-}"
}
}
EOF
Copy link
Member

@matifali matifali Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adjust it as per #507
We only need the coder server when task reporting is requested, and that too, a single tool

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an opportunity to move this function to the agnetapi module as it's only used in the context of tasks.

variable "icon" {
type = string
description = "The icon to use for the app."
default = "/icon/opencode.svg"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@35C4n0r You will need to add this to /site/static/icons in coder/coder to reference it like this within the coder ui

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants