fix(tools): propagate startWorkConfig through skill tool and registry
SkillLoadOptions and createSkillTool now accept startWorkConfig and forward it to discoverCommandsSync. tool-registry passes pluginConfig.start_work to both call sites so the skill tool description and skill(name="start-work") invocation honour the worktree config flag. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -105,6 +105,7 @@ export function createToolRegistry(args: {
|
|||||||
const commands = discoverCommandsSync(ctx.directory, {
|
const commands = discoverCommandsSync(ctx.directory, {
|
||||||
pluginsEnabled: pluginConfig.claude_code?.plugins ?? true,
|
pluginsEnabled: pluginConfig.claude_code?.plugins ?? true,
|
||||||
enabledPluginsOverride: pluginConfig.claude_code?.plugins_override,
|
enabledPluginsOverride: pluginConfig.claude_code?.plugins_override,
|
||||||
|
startWorkConfig: pluginConfig.start_work,
|
||||||
})
|
})
|
||||||
const skillTool = createSkillTool({
|
const skillTool = createSkillTool({
|
||||||
commands,
|
commands,
|
||||||
@@ -112,6 +113,7 @@ export function createToolRegistry(args: {
|
|||||||
mcpManager: managers.skillMcpManager,
|
mcpManager: managers.skillMcpManager,
|
||||||
getSessionID: getSessionIDForMcp,
|
getSessionID: getSessionIDForMcp,
|
||||||
gitMasterConfig: pluginConfig.git_master,
|
gitMasterConfig: pluginConfig.git_master,
|
||||||
|
startWorkConfig: pluginConfig.start_work,
|
||||||
})
|
})
|
||||||
|
|
||||||
const taskSystemEnabled = pluginConfig.experimental?.task_system ?? false
|
const taskSystemEnabled = pluginConfig.experimental?.task_system ?? false
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ export function createSkillTool(options: SkillLoadOptions = {}): ToolDefinition
|
|||||||
cachedCommands = discoverCommandsSync(undefined, {
|
cachedCommands = discoverCommandsSync(undefined, {
|
||||||
pluginsEnabled: options.pluginsEnabled,
|
pluginsEnabled: options.pluginsEnabled,
|
||||||
enabledPluginsOverride: options.enabledPluginsOverride,
|
enabledPluginsOverride: options.enabledPluginsOverride,
|
||||||
|
startWorkConfig: options.startWorkConfig,
|
||||||
})
|
})
|
||||||
return cachedCommands
|
return cachedCommands
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,4 +37,6 @@ export interface SkillLoadOptions {
|
|||||||
pluginsEnabled?: boolean
|
pluginsEnabled?: boolean
|
||||||
/** Override plugin enablement from Claude settings by plugin key */
|
/** Override plugin enablement from Claude settings by plugin key */
|
||||||
enabledPluginsOverride?: Record<string, boolean>
|
enabledPluginsOverride?: Record<string, boolean>
|
||||||
|
/** start-work command configuration, controls worktree instructions in /start-work template */
|
||||||
|
startWorkConfig?: { worktree?: boolean }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user