mirror of
https://github.com/boxpositron/absolute-dotfiles.git
synced 2026-10-24 08:23:19 +00:00
a750f158f5
Rewrites opencode.json, drops the with-context, websearch and terminal-bell plugins, adds plugins that strip Claude-only commands and OMC MCP servers, and vendors the impeccable, web-design-guidelines and frontend-workflow skills.
56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
type PrefixRule = {
|
|
readonly kind: "prefix"
|
|
readonly prefix: string
|
|
readonly reason: string
|
|
}
|
|
|
|
type ExactRule = {
|
|
readonly kind: "exact"
|
|
readonly name: string
|
|
readonly reason: string
|
|
}
|
|
|
|
export type ClaudeOnlyCommandRule = PrefixRule | ExactRule
|
|
|
|
export const CLAUDE_ONLY_COMMAND_RULES: readonly ClaudeOnlyCommandRule[] = [
|
|
{
|
|
kind: "prefix",
|
|
prefix: "oh-my-claudecode:",
|
|
reason: "Operates the Oh My ClaudeCode runtime and workflows.",
|
|
},
|
|
{
|
|
kind: "prefix",
|
|
prefix: "claude-notifications-go:",
|
|
reason: "Configures notification hooks, binaries, and files for Claude Code.",
|
|
},
|
|
{
|
|
kind: "exact",
|
|
name: "remember:doctor",
|
|
reason: "Executes diagnostics through CLAUDE_PLUGIN_ROOT; remember:remember stays because it supports multiple agent hosts.",
|
|
},
|
|
{
|
|
kind: "exact",
|
|
name: "mcp-server-dev:build-mcpb",
|
|
reason: "Produces Anthropic MCPB bundles with claude_desktop compatibility; the server and app builders stay because they target multiple MCP hosts.",
|
|
},
|
|
] as const
|
|
|
|
function matchesRule(name: string, rule: ClaudeOnlyCommandRule): boolean {
|
|
switch (rule.kind) {
|
|
case "prefix":
|
|
return name.startsWith(rule.prefix)
|
|
case "exact":
|
|
return name === rule.name
|
|
default:
|
|
return assertNever(rule)
|
|
}
|
|
}
|
|
|
|
function assertNever(value: never): never {
|
|
throw new Error(`Unhandled rule: ${JSON.stringify(value)}`)
|
|
}
|
|
|
|
export function isClaudeOnlyCommand(name: string): boolean {
|
|
return CLAUDE_ONLY_COMMAND_RULES.some((rule) => matchesRule(name, rule))
|
|
}
|