Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opencode-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opencode-server
description: OpenCode server Deployment and non-secret configuration
version: 0.1.56
version: 0.1.57
appVersion: "1.18.23"
type: application
7 changes: 7 additions & 0 deletions opencode-server/files/opencode.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
},
"enabled_providers": ["kimi-for-coding", "minimax-coding-plan", "openai", "zai-coding-plan"],
"provider": {"kimi-for-coding": {"options": {"apiKey": "{env:KIMI_API_KEY}"}}},
"permission": {
"agent-pipe_download_artifact": "ask",
"agent-pipe_inspect_artifact": "allow",
"agent-pipe_upload_artifact": "ask",
"agent-pipe_verify_download": "allow"
},
"mcp": {
"agent-pipe": {"type": "remote", "url": "http://agent-pipe-uploader.opencode.svc:8080/mcp", "enabled": true, "oauth": false},
"apify": {"type": "remote", "url": "http://mcp-makeitwork-apify-remote-proxy.mcp.svc:8080/mcp", "enabled": true, "oauth": false},
"argocd": {"type": "remote", "url": "http://mcp-makeitwork-argocd-proxy.mcp.svc:8080/mcp", "enabled": true, "oauth": false},
"aws": {"type": "remote", "url": "http://mcp-makeitwork-aws-proxy.mcp.svc:8080/mcp", "enabled": true, "oauth": false},
Expand Down
18 changes: 3 additions & 15 deletions opencode-server/files/skills/s3-presigned-file-delivery/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,12 @@ Use the private `agent-pipe` bucket by default after its OpenTofu root has been

### In-session artifact on the isolated artifacts PVC

1. Confirm the artifact is a user-directed, non-secret file under `/artifacts/`; the uploader Pod cannot access the OpenCode home PVC.
1. Confirm the artifact is a user-directed, non-secret file under `/artifacts/`; the `agent-pipe` MCP service cannot access the OpenCode home PVC.
2. Mint a PUT URL for `agent-pipe` and the chosen `deliveries/...` key with `expires_in: 900`.
3. **Obtain explicit user confirmation** for the exact artifact path and S3 key before the PUT. This is a live S3 mutation.
4. List Pods in namespace `opencode` using label `app=agent-pipe-uploader`, then run the upload in its `curl` container with the generated URL unmodified:

```text
curl --fail --show-error --silent --request PUT --upload-file /artifacts/<filename> <presigned-put-url>
```

Use `kubernetes_pods_exec`; do not run a generic session shell or route the signed URL through a fetch tool, which may re-encode its SigV4 query string.
4. Call `agent-pipe_upload_artifact` with profile `agent-pipe`, the artifact's relative path, and the generated URL unmodified. The OpenCode permission prompt is required; do not approve the action without the user's explicit confirmation.
5. Verify with `aws s3api head-object --bucket agent-pipe --key <key>`; do not print object bytes in the conversation.
6. Mint a GET URL with `expires_in: 900`, then test that **exact, unchanged** URL with the same curl helper before returning it:

```text
curl --fail --show-error --silent --output /dev/null --write-out "%{http_code}" <presigned-get-url>
```

Continue only on HTTP 200. This is a GET request, not `curl --head`: the presigned method is part of the signature. Do not substitute a fetch tool or alter/partially re-encode the SigV4 query string.
6. Mint a GET URL with `expires_in: 900`, then call `agent-pipe_verify_download` with profile `agent-pipe` and that exact, unchanged URL. Continue only on a successful result. This is a GET request, not a HEAD request; do not substitute a fetch tool or alter/re-encode the SigV4 query string.
7. If the GET test fails, mint a fresh URL and test it again. Do not claim delivery or return an untested link. On success, return the **same tested URL** as a Markdown download link, state that it expires in about 15 minutes, and offer to re-issue it.

## Failure modes
Expand Down