Merge pull request #833 from KNN-07/fix/git-master-watermark-injection

fix(git-master): inject watermark only when enabled instead of overriding defaults
This commit is contained in:
Kenny
2026-01-15 20:36:18 -05:00
committed by GitHub
9 changed files with 157 additions and 86 deletions
+7 -1
View File
@@ -4,6 +4,7 @@ import { TOOL_DESCRIPTION_NO_SKILLS, TOOL_DESCRIPTION_PREFIX } from "./constants
import type { SkillArgs, SkillInfo, SkillLoadOptions } from "./types"
import type { LoadedSkill } from "../../features/opencode-skill-loader"
import { getAllSkills, extractSkillTemplate } from "../../features/opencode-skill-loader/skill-content"
import { injectGitMasterConfig } from "../../features/opencode-skill-loader/skill-content"
import type { SkillMcpManager, SkillMcpClientInfo, SkillMcpServerContext } from "../../features/skill-mcp-manager"
import type { Tool, Resource, Prompt } from "@modelcontextprotocol/sdk/types.js"
@@ -164,7 +165,12 @@ export function createSkillTool(options: SkillLoadOptions = {}): ToolDefinition
throw new Error(`Skill "${args.name}" not found. Available skills: ${available || "none"}`)
}
const body = await extractSkillBody(skill)
let body = await extractSkillBody(skill)
if (args.name === "git-master") {
body = injectGitMasterConfig(body, options.gitMasterConfig)
}
const dir = skill.path ? dirname(skill.path) : skill.resolvedPath || process.cwd()
const output = [
+3
View File
@@ -1,5 +1,6 @@
import type { SkillScope, LoadedSkill } from "../../features/opencode-skill-loader/types"
import type { SkillMcpManager } from "../../features/skill-mcp-manager"
import type { GitMasterConfig } from "../../config/schema"
export interface SkillArgs {
name: string
@@ -25,4 +26,6 @@ export interface SkillLoadOptions {
mcpManager?: SkillMcpManager
/** Session ID getter for MCP client identification */
getSessionID?: () => string
/** Git master configuration for watermark/co-author settings */
gitMasterConfig?: GitMasterConfig
}