diff --git a/opencode-server/Chart.yaml b/opencode-server/Chart.yaml index b6f7810..0b1c76d 100644 --- a/opencode-server/Chart.yaml +++ b/opencode-server/Chart.yaml @@ -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 diff --git a/opencode-server/files/opencode.json b/opencode-server/files/opencode.json index a7471f7..bd4b2d6 100644 --- a/opencode-server/files/opencode.json +++ b/opencode-server/files/opencode.json @@ -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}, diff --git a/opencode-server/files/skills/s3-presigned-file-delivery/SKILL.md b/opencode-server/files/skills/s3-presigned-file-delivery/SKILL.md index 75264e5..21e0131 100644 --- a/opencode-server/files/skills/s3-presigned-file-delivery/SKILL.md +++ b/opencode-server/files/skills/s3-presigned-file-delivery/SKILL.md @@ -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/ - ``` - - 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 `; 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}" - ``` - - 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