-
Notifications
You must be signed in to change notification settings - Fork 76
feat: add opencode module #515
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
base: main
Are you sure you want to change the base?
Conversation
|
Can we add a screenshot? Of the module working in Coder? |
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.
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 |
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.
Please add an example to be used with Bedrock. Or link to the docs with what to change in the module.
| 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 |
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.
Please adjust it as per #507
We only need the coder server when task reporting is requested, and that too, a single tool
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.
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" |
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.
@35C4n0r You will need to add this to /site/static/icons in coder/coder to reference it like this within the coder ui
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.
will do 👍🏻
Description
Type of Change
Module Information
Path:
registry/coder-labs/modules/opencodeNew version:
v0.1.0Breaking change: [ ] Yes [ ] No
Testing & Validation
bun test)bun fmt)Related Issues