Skip to content

Add OpenCode SDK agent harness - #122

Open
ismaelvega wants to merge 8 commits into
vercel-labs:mainfrom
ismaelvega:main
Open

Add OpenCode SDK agent harness#122
ismaelvega wants to merge 8 commits into
vercel-labs:mainfrom
ismaelvega:main

Conversation

@ismaelvega

Copy link
Copy Markdown

What changed

Adds an OpenCode SDK agent harness and exposes it through the DeepSec CLI, including read-only tool controls, structured-output fallback handling, provider/model routing, and long-running request support. Extends Vercel Sandbox setup, credential brokering, packaging, tests, and documentation so the OpenCode agent works locally and in sandboxed runs.

Why

DeepSec could run Codex, Claude, and Pi agents, but did not have an OpenCode SDK integration. This adds OpenCode as a first-class agent while preserving the existing agent contract and sandbox security model.

Verification

  • pnpm test passes (2,200 passed, 1 expected live-sandbox skip)
  • pnpm lint passes
  • pnpm knip passes
  • pnpm -r build passes
  • pnpm test:bundle passes (23 tests)
  • Local OpenCode Go smoke test against this repository
  • Local packed-package smoke test against a separate real repository
  • Vercel Sandbox smoke test with Anthropic through AI Gateway/OIDC
  • If this adds a matcher: ran it against at least one real repo and confirmed the candidate count is sane (not applicable; no matcher added)

Notes for reviewer

  • OpenCode models use provider/model IDs; opencode-go/grok-4.5 was the primary live smoke-test target.
  • Zen and additional direct-provider API permutations are supported through the generic OpenCode provider routing but were intentionally not included in the live validation matrix for this PR.
  • OpenCode may return valid JSON as text instead of invoking StructuredOutput; the harness validates that response as a compatibility fallback.
  • pnpm lint exits successfully with one Biome warning for the escaped shell variable in the OpenCode Sandbox binary-resolution script.

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

@ismaelvega is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​opencode-ai@​1.18.3911006596100
Addednpm/​@​opencode-ai/​sdk@​1.18.3921007597100

View full report

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.

1 participant