mirror of
https://github.com/LerianStudio/ring
synced 2026-05-03 21:48:22 +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
38 lines
1 KiB
TypeScript
38 lines
1 KiB
TypeScript
/**
|
|
* Ring Hook Factories Index
|
|
*
|
|
* Exports all hook factories and their configuration types.
|
|
*/
|
|
|
|
export type { ContextInjectionConfig } from "./context-injection.js"
|
|
// Context Injection Hook
|
|
export {
|
|
contextInjectionEntry,
|
|
createContextInjectionHook,
|
|
} from "./context-injection.js"
|
|
export type { SessionStartConfig } from "./session-start.js"
|
|
// Session Start Hook
|
|
export {
|
|
createSessionStartHook,
|
|
sessionStartEntry,
|
|
} from "./session-start.js"
|
|
|
|
import { contextInjectionEntry } from "./context-injection.js"
|
|
// All registry entries for bulk registration
|
|
import { sessionStartEntry } from "./session-start.js"
|
|
|
|
/**
|
|
* All built-in hook registry entries.
|
|
*/
|
|
export const builtInHookEntries = [sessionStartEntry, contextInjectionEntry] as const
|
|
|
|
/**
|
|
* Register all built-in hooks with a registry.
|
|
*/
|
|
export function registerBuiltInHooks(registry: {
|
|
registerFactory: (entry: (typeof builtInHookEntries)[number]) => void
|
|
}): void {
|
|
for (const entry of builtInHookEntries) {
|
|
registry.registerFactory(entry)
|
|
}
|
|
}
|