mirror of
https://github.com/LerianStudio/ring
synced 2026-04-21 13:37:27 +00:00
Move OpenCode runtime plugin and installer into Ring monorepo under platforms/opencode/. The installer reads skills, agents, and commands directly from the Ring monorepo's canonical directories (default/, dev-team/, pm-team/, etc.) — zero asset duplication. What's included: - installer.sh: reads from Ring dirs, applies frontmatter/tool transforms, installs to ~/.config/opencode/ - plugin/: TypeScript runtime (RingUnifiedPlugin) with hooks, lifecycle, loaders - src/: CLI (doctor, config-manager) - prompts/: session-start and context-injection templates - standards/: coding standards (from dev-team/docs/) - ring.jsonc: default config with full 86-skill/35-agent/33-command inventory What's NOT included (intentionally): - assets/ directory: eliminated, content comes from Ring monorepo - scripts/codereview/: eliminated, replaced by mithril - using-ring-opencode skill: uses canonical using-ring instead Transforms applied by installer: - Agent: type→mode, strip version/changelog/output_schema/input_schema - Skill: keep name+description frontmatter, body unchanged - Command: strip argument-hint (unsupported by OpenCode) - All: normalize tool names (Bash→bash, Read→read, etc.) - All: strip Model Requirement sections from agents Replaces: LerianStudio/ring-for-opencode repository Generated-by: Gandalf AI-Model: claude-opus-4
71 lines
1.4 KiB
TypeScript
71 lines
1.4 KiB
TypeScript
/**
|
|
* Ring Configuration System
|
|
*
|
|
* Layered configuration with Zod validation.
|
|
*
|
|
* @example
|
|
* ```typescript
|
|
* import {
|
|
* loadConfig,
|
|
* isHookDisabledInConfig,
|
|
* RingConfig,
|
|
* } from "./config"
|
|
*
|
|
* const config = loadConfig("/path/to/project")
|
|
* if (!isHookDisabledInConfig("session-start")) {
|
|
* // Hook is enabled
|
|
* }
|
|
* ```
|
|
*/
|
|
|
|
// Config handler for OpenCode injection
|
|
export {
|
|
type ConfigHandlerDeps,
|
|
createConfigHandler,
|
|
type OpenCodeConfig,
|
|
} from "./config-handler"
|
|
|
|
// Loader exports - configuration loading and management
|
|
export {
|
|
// Types
|
|
type ConfigLayer,
|
|
checkConfigChanged,
|
|
clearConfigCache,
|
|
deepMerge,
|
|
getCachedConfig,
|
|
getConfigLayers,
|
|
getExperimentalConfig,
|
|
// Config getters
|
|
getHookConfig,
|
|
isAgentDisabledInConfig,
|
|
isCommandDisabledInConfig,
|
|
// Disabled checks
|
|
isHookDisabledInConfig,
|
|
isSkillDisabledInConfig,
|
|
// Core functions
|
|
loadConfig,
|
|
// Utilities
|
|
parseJsoncContent,
|
|
// File watching
|
|
startConfigWatch,
|
|
stopConfigWatch,
|
|
} from "./loader"
|
|
// Schema exports - types and validation
|
|
export {
|
|
type AgentName,
|
|
AgentNameSchema,
|
|
type CommandName,
|
|
CommandNameSchema,
|
|
// Default values
|
|
DEFAULT_RING_CONFIG,
|
|
type ExperimentalConfig,
|
|
ExperimentalConfigSchema,
|
|
// TypeScript types
|
|
type HookName,
|
|
// Zod schemas
|
|
HookNameSchema,
|
|
type RingConfig,
|
|
RingConfigSchema,
|
|
type SkillName,
|
|
SkillNameSchema,
|
|
} from "./schema"
|