Skip to content

Load OpenCode skills (#2832)#2891

Open
razzeee wants to merge 1 commit into
pingdotgg:mainfrom
razzeee:opencode-skills
Open

Load OpenCode skills (#2832)#2891
razzeee wants to merge 1 commit into
pingdotgg:mainfrom
razzeee:opencode-skills

Conversation

@razzeee
Copy link
Copy Markdown

@razzeee razzeee commented Jun 1, 2026

What Changed

We now fetch skills from opencode

Why

Skills are fun and sometimes useful

UI Changes

None

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Open in Devin Review

Note

Low Risk
Adds parallel OpenCode API calls during provider refresh; per-directory failures are swallowed and project-list errors fall back to server cwd only, with no auth or data-model changes.

Overview
OpenCode provider status now loads skills from the OpenCode SDK (app.skills) and exposes them on the server provider snapshot alongside models and agents.

Multi-directory discovery: checkOpenCodeProviderStatus and loadOpenCodeInventory take a list of working directories instead of a single cwd. The OpenCode driver builds that list from the server startup directory plus non-deleted project workspace roots from ProjectionProjectRepository, with a safe fallback to server cwd only if listing projects fails. Skills are fetched per directory in parallel, merged with first-occurrence wins (server cwd first, then projects in creation order).

Wiring: ProjectionProjectRepositoryLive is merged into the runtime layer before SQLite persistence so OpenCode driver hydration can resolve the repository. Tests and CLI layers get a NoOpProjectionProjectRepository so layers that boot OpenCode do not need real project DB state.

Reviewed by Cursor Bugbot for commit fef119c. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Load OpenCode skills from multiple project directories into provider snapshots

  • loadOpenCodeInventory in opencodeRuntime.ts now accepts an array of working directories, fetches skills from each via client.app.skills, and deduplicates results by name (first occurrence wins).
  • checkOpenCodeProviderStatus in OpenCodeProvider.ts maps returned skills to ServerProviderSkill entries and includes them in the provider snapshot alongside models.
  • The OpenCode driver in OpenCodeDriver.ts fetches all projects from ProjectionProjectRepository, builds a deduplicated list of workspace roots, and passes them to the status probe; on error it logs a warning and falls back to server cwd.
  • ProjectionProjectRepositoryLive is added to the core runtime layer in server.ts, and a NoOpProjectionProjectRepository is introduced for test environments.

Macroscope summarized 8b51b75.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ce7936ae-0529-4d15-b2e4-f7e8b38d4241

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jun 1, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1287661. Configure here.

Comment thread apps/server/src/provider/opencodeRuntime.ts Outdated
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Jun 1, 2026

Approvability

Verdict: Needs human review

This PR introduces new feature behavior - loading OpenCode skills from multiple project directories with deduplication logic. Changes to runtime skill discovery behavior beyond a bug fix warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@razzeee
Copy link
Copy Markdown
Author

razzeee commented Jun 1, 2026

Hrm, this doesn't seem to pick up repo specific skills - will look into that

duncan4123 pushed a commit to duncan4123/t3code that referenced this pull request Jun 1, 2026
…lls/

PR pingdotgg#2811 (pingdotgg/t3code) adds local filesystem skill loading for the
OpenCode provider by reading .agents/skills/<dir>/SKILL.md.

Fork compatibility: Clean apply. Both affected files match upstream
base structure. Requires @effect/platform-node (already a dependency).

PR pingdotgg#2891 conflict analysis: Both PRs modify checkOpenCodeProviderStatus
success path. Approaches are complementary (local vs server). Recommend
applying pingdotgg#2811 first, then pingdotgg#2891 on top with skill deduplication.

Detailed findings in review-pr-2811.md.
duncan4123 pushed a commit to duncan4123/t3code that referenced this pull request Jun 1, 2026
Compatibility assessment and recommendation for upstream PR pingdotgg#2891
(skills fetching from opencode server, fixes issue pingdotgg#2832).

Assessment: APPLY. Clean additive change, 2 files, +29/-3 lines.
- adds OpenCodeSkill interface and skills to OpenCodeInventory
- adds loadSkills (parallel with providers/agents)
- maps skills to ServerProviderSkill contract in checkOpenCodeProviderStatus
- no breaking call sites; ServerProvider.skills defaults to []
- fixes 'Opencode Skills not found' by populating skills field

Risk: minimal. SDK call error surfaces through existing probe fallback.
Optional defense: filter skills with empty names, but not necessary.
@razzeee razzeee force-pushed the opencode-skills branch from 8b51b75 to fef119c Compare June 1, 2026 15:24
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Jun 1, 2026
@razzeee
Copy link
Copy Markdown
Author

razzeee commented Jun 1, 2026

Seems to work fine like this

duncan4123 pushed a commit to duncan4123/t3code that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant