Project-level skills (.opencode/skills/ and .claude/skills/) were not discovered in desktop app environments because the discover functions hardcoded process.cwd() to resolve project paths. In desktop apps, process.cwd() points to the app installation directory rather than the user's project directory. Add optional directory parameter to all project-level skill discovery functions and thread ctx.directory from the plugin context through the entire skill loading pipeline. Falls back to process.cwd() when directory is not provided, preserving CLI compatibility.
10 lines
371 B
TypeScript
10 lines
371 B
TypeScript
import type { BrowserAutomationProvider, GitMasterConfig } from "../../config/schema"
|
|
|
|
export interface SkillResolutionOptions {
|
|
gitMasterConfig?: GitMasterConfig
|
|
browserProvider?: BrowserAutomationProvider
|
|
disabledSkills?: Set<string>
|
|
/** Project directory to discover project-level skills from. Falls back to process.cwd() if not provided. */
|
|
directory?: string
|
|
}
|