Skip to content

feat(opencode): add PowerContext integration - #1329

Merged
Teingi merged 6 commits into
oceanbase:masterfrom
happy-v587:feat/opencode-integration
Aug 25, 2026
Merged

feat(opencode): add PowerContext integration#1329
Teingi merged 6 commits into
oceanbase:masterfrom
happy-v587:feat/opencode-integration

Conversation

@happy-v587

@happy-v587 happy-v587 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Closes #1330.

Tracking issue: #1213.

Rationale for this change

PowerContext supports several coding-agent hosts but did not have a native OpenCode integration. This adds project-scoped recall, prompt capture, and curated durable-context tools while keeping the PowerContext Server as the single runtime and storage boundary.

What changes are included in this PR?

  • Add a native OpenCode 1.x plugin with bounded automatic recall, independent prompt capture, fail-open HTTP behavior, Git-based scope mapping, secret filtering, and curated pc_* tools.
  • Require confirmation for durable tool mutations while keeping Candidate approval and rejection as explicit human operations.
  • Add powercontext setup opencode and powercontext doctor opencode, including OpenCode version validation and an ownership-protected global project-context Skill installation.
  • Generate the OpenCode operation table from openapi/powercontext.yaml and add TypeScript, CLI, contract, packaging, and isolated real-OpenCode validation.
  • Add English and Chinese setup documentation and navigation entries.

Are there any user-facing changes?

Yes. Users can install the integration with:

powercontext setup opencode --source oceanbase/powercontext --ref master

The plugin requires OpenCode 1.18.21 or newer in the 1.x line. Configuration uses the POWERCONTEXT_OPENCODE_ environment prefix. This change does not modify the HTTP API, persisted formats, or existing integration behavior.

How was this change tested?

  • make check
  • make test — 644 passed, 13 skipped
  • make contract-test — 29 passed
  • make opencode-test — 10 Vitest tests, TypeScript check, and bundle build
  • make docs-test
  • make build
  • Isolated real OpenCode 1.18.21 installation with powercontext setup opencode followed by a successful three-check powercontext doctor opencode

AI usage statement

OpenAI Codex (GPT-5) was used to inspect the repository and OpenCode plugin contract, implement the integration, write tests and documentation, resolve the latest-base conflicts, and run verification.

@happy-v587 happy-v587 mentioned this pull request Aug 24, 2026
1 task
@happy-v587
happy-v587 marked this pull request as ready for review August 24, 2026 04:23
@happy-v587

Copy link
Copy Markdown
Contributor Author

@PsiACE PTAL

Comment thread src/powercontext/cli/opencode.py Outdated
Comment thread src/powercontext/cli/opencode.py Outdated
Comment thread integrations/opencode/plugins/powercontext/src/index.ts Outdated
@happy-v587
happy-v587 requested a review from Teingi August 24, 2026 09:05
Comment thread integrations/opencode/plugins/powercontext/src/index.ts
Comment thread integrations/opencode/plugins/powercontext/src/index.ts Outdated

@Teingi Teingi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Teingi
Teingi merged commit 5d36f79 into oceanbase:master Aug 25, 2026
12 checks passed
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.

feat: OpenCode integration

2 participants